content stringlengths 40 137k |
|---|
"private void loadModelExtensionMetadata(Class<?> similarClass) {\n try {\n Enumeration<URL> urls = similarClass.getClassLoader().getResources(\"String_Node_Str\");\n while (urls.hasMoreElements()) {\n URL url = urls.nextElement();\n reader = new BufferedReader(new InputStreamReader(url.openStream()));\n while (reader.ready()) {\n final String line = reader.readLine();\n if ((line == null) || line.isEmpty()) {\n continue;\n }\n if (line.charAt(0) != '#') {\n if (!line.contains(\"String_Node_Str\")) {\n Logger.getLogger(CompositeUtil.class.getName()).log(Level.INFO, \"String_Node_Str\", new String[] { \"String_Node_Str\", line });\n }\n String[] entry = line.split(\"String_Node_Str\");\n String base = entry[0];\n String ext = entry[1];\n List<String> list = modelExtensions.get(base);\n if (list == null) {\n list = new ArrayList<String>();\n modelExtensions.put(base, list);\n }\n list.add(ext);\n }\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(CompositeUtil.class.getName()).log(Level.SEVERE, null, ex);\n }\n}\n"
|
"public void actionPerformed(ActionEvent actor) {\n JComponent source = (JComponent) actor.getSource();\n List<PossibleAction> actions;\n PossibleAction chosenAction = null;\n if (source instanceof ClickField) {\n gbc = gb.getConstraints(source);\n actions = ((ClickField) source).getPossibleActions();\n SoundManager.notifyOfClickFieldSelection(actions.get(0));\n log.debug(\"String_Node_Str\" + actions.get(0).toString());\n if (actions == null || actions.size() == 0) {\n log.warn(\"String_Node_Str\");\n } else if (actions.get(0) instanceof SellShares) {\n List<String> options = new ArrayList<String>();\n List<SellShares> sellActions = new ArrayList<SellShares>();\n List<Integer> sellAmounts = new ArrayList<Integer>();\n SellShares sale;\n for (PossibleAction action : actions) {\n sale = (SellShares) action;\n int i = sale.getNumber();\n if (sale.getPresidentExchange() == 0) {\n options.add(LocalText.getText(\"String_Node_Str\", i, sale.getShare(), i * sale.getShare(), sale.getCompanyName(), gameUIManager.format(i * sale.getShareUnits() * sale.getPrice())));\n } else {\n options.add(LocalText.getText(\"String_Node_Str\", i, sale.getShare(), i * sale.getShare(), sale.getCompanyName(), gameUIManager.format(i * sale.getShareUnits() * sale.getPrice()), 3 - sale.getPresidentExchange(), sale.getPresidentExchange() * sale.getShareUnit()));\n }\n sellActions.add(sale);\n sellAmounts.add(i);\n }\n int index = 0;\n if (options.size() > 1) {\n String message = LocalText.getText(\"String_Node_Str\");\n String sp = (String) JOptionPane.showInputDialog(this, message, message, JOptionPane.QUESTION_MESSAGE, null, options.toArray(new String[0]), options.get(0));\n index = options.indexOf(sp);\n } else if (options.size() == 1) {\n String message = LocalText.getText(\"String_Node_Str\");\n int result = JOptionPane.showConfirmDialog(this, options.get(0), message, JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n index = (result == JOptionPane.OK_OPTION ? 0 : -1);\n }\n if (index < 0) {\n } else {\n chosenAction = sellActions.get(index);\n }\n } else if (actions.get(0) instanceof BuyCertificate) {\n boolean startCompany = false;\n List<String> options = new ArrayList<String>();\n List<BuyCertificate> buyActions = new ArrayList<BuyCertificate>();\n List<Integer> buyAmounts = new ArrayList<Integer>();\n BuyCertificate buy;\n String companyName = \"String_Node_Str\";\n String playerName = \"String_Node_Str\";\n int sharePerCert;\n int sharesPerCert;\n int shareUnit;\n for (PossibleAction action : actions) {\n buy = (BuyCertificate) action;\n playerName = buy.getPlayerName();\n PublicCompany company = buy.getCompany();\n companyName = company.getId();\n sharePerCert = buy.getSharePerCertificate();\n shareUnit = company.getShareUnit();\n sharesPerCert = sharePerCert / shareUnit;\n if (buy instanceof StartCompany) {\n startCompany = true;\n int[] startPrices;\n if (((StartCompany_1880) buy).mustSelectAPrice()) {\n startPrices = ((StartCompany_1880) buy).getStartPrices();\n Arrays.sort(startPrices);\n for (int i = 0; i < startPrices.length; i++) {\n options.add(\"String_Node_Str\" + startPrices[i]);\n }\n }\n } else {\n options.add(LocalText.getText(\"String_Node_Str\", sharePerCert, companyName, buy.getFromPortfolio().getName(), gameUIManager.format(sharesPerCert * buy.getPrice())));\n buyActions.add(buy);\n buyAmounts.add(1);\n for (int i = 2; i <= buy.getMaximumNumber(); i++) {\n options.add(LocalText.getText(\"String_Node_Str\", i, sharePerCert, companyName, buy.getFromPortfolio().getId(), gameUIManager.format(i * sharesPerCert * buy.getPrice())));\n buyActions.add(buy);\n buyAmounts.add(i);\n }\n }\n }\n int index = 0;\n if (options.size() > 1) {\n if (startCompany) {\n RadioButtonDialog dialog = new RadioButtonDialog(GameUIManager.COMPANY_START_PRICE_DIALOG, gameUIManager, parent, LocalText.getText(\"String_Node_Str\"), LocalText.getText(\"String_Node_Str\", playerName, companyName), options.toArray(new String[0]), 0);\n gameUIManager.setCurrentDialog(dialog, actions.get(0));\n parent.disableButtons();\n return;\n } else {\n String sp = (String) JOptionPane.showInputDialog(this, LocalText.getText(startCompany ? \"String_Node_Str\" : \"String_Node_Str\"), LocalText.getText(\"String_Node_Str\"), JOptionPane.QUESTION_MESSAGE, null, options.toArray(new String[0]), options.get(0));\n index = options.indexOf(sp);\n }\n } else if (options.size() == 1) {\n if (startCompany) {\n RadioButtonDialog dialog = new RadioButtonDialog(GameUIManager.COMPANY_START_PRICE_DIALOG, gameUIManager, parent, LocalText.getText(\"String_Node_Str\"), LocalText.getText(\"String_Node_Str\", playerName, companyName), options.toArray(new String[0]), 0);\n gameUIManager.setCurrentDialog(dialog, actions.get(0));\n parent.disableButtons();\n return;\n } else {\n int result = JOptionPane.showConfirmDialog(this, options.get(0), LocalText.getText(\"String_Node_Str\"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\n index = (result == JOptionPane.OK_OPTION ? 0 : -1);\n }\n }\n if (index < 0) {\n } else if (startCompany) {\n chosenAction = buyActions.get(index);\n ((StartCompany) chosenAction).setStartPrice(buyAmounts.get(index));\n ((StartCompany) chosenAction).setNumberBought(((StartCompany) chosenAction).getSharesPerCertificate());\n } else {\n chosenAction = buyActions.get(index);\n ((BuyCertificate) chosenAction).setNumberBought(buyAmounts.get(index));\n }\n } else if (actions.get(0) instanceof CashCorrectionAction) {\n CashCorrectionAction cca = (CashCorrectionAction) actions.get(0);\n String amountString = (String) JOptionPane.showInputDialog(this, LocalText.getText(\"String_Node_Str\", cca.getCashHolderName()), LocalText.getText(\"String_Node_Str\"), JOptionPane.QUESTION_MESSAGE, null, null, 0);\n if (amountString.substring(0, 1).equals(\"String_Node_Str\"))\n amountString = amountString.substring(1);\n int amount;\n try {\n amount = Integer.parseInt(amountString);\n } catch (NumberFormatException e) {\n amount = 0;\n }\n cca.setAmount(amount);\n chosenAction = cca;\n } else {\n chosenAction = processGameSpecificActions(actor, actions.get(0));\n }\n } else {\n log.warn(\"String_Node_Str\" + source.toString());\n }\n chosenAction = processGameSpecificFollowUpActions(actor, chosenAction);\n if (chosenAction != null)\n (parent).process(chosenAction);\n repaint();\n}\n"
|
"public static void checkVmMaxConfiguration(final String vmId, final int cpuNumber, final long memory) {\n final VcVirtualMachine vcVm = VcCache.getIgnoreMissing(vmId);\n int hardwareVersion = 0;\n if (vcVm == null) {\n logger.info(\"String_Node_Str\" + vmId + \"String_Node_Str\");\n hardwareVersion = -1;\n } else {\n hardwareVersion = VcContext.inVcSessionDo(new VcSession<Integer>() {\n\n protected Integer body() throws Exception {\n final VcVirtualMachine vcVm = VcCache.getIgnoreMissing(vmId);\n if (vcVm == null) {\n logger.info(\"String_Node_Str\" + vmId + \"String_Node_Str\");\n return -1;\n }\n VirtualMachine vimVm = vcVm.getManagedObject();\n EnvironmentBrowser envBrowser = MoUtil.getManagedObject(vimVm.getEnvironmentBrowser());\n ConfigOption configOption = envBrowser.queryConfigOption(null, null);\n int hardwareVersion = configOption.getHardwareOptions().getHwVersion();\n logger.info(\"String_Node_Str\" + hardwareVersion);\n return hardwareVersion;\n }\n });\n compareMaxConfiguration(vmId, hardwareVersion, cpuNumber, memory);\n}\n"
|
"public void onConnected(ClientDTO dto, Document document, boolean updateUI) {\n if (updateUI) {\n log.finest(\"String_Node_Str\" + Element.as(nativeNode).getString());\n Node newNode = Converter.fromCustomToNative(((TreeDocument) document).getRoot());\n nativeNode.getParentNode().replaceChild(newNode, nativeNode);\n }\n}\n"
|
"public FeatureExpr getContextOf(Function<T, Boolean> function) {\n return or(and(featureExpr, thenBranch.getContextOf(function)), and(not(featureExpr), elseBranch.getContextOf(function)));\n}\n"
|
"private List<JavaClass> findEntitiesInFolder(final File packageFile) {\n List<JavaClass> result = new ArrayList<JavaClass>();\n if (packageFile.exists()) {\n for (File source : packageFile.listFiles(entityFileFilter)) try {\n JavaClass javaClass = JavaParser.parse(source);\n if (javaClass.hasAnnotation(Entity.class))\n result.add(javaClass);\n } catch (FileNotFoundException e) {\n }\n for (File source : packageFile.listFiles(directoryFilter)) {\n List<JavaClass> subResults = findEntitiesInFolder(source);\n result.addAll(subResults);\n }\n }\n return result;\n}\n"
|
"public Collection<?> validate() throws IllegalActionException {\n String expression = getExpression();\n Matcher matcher = _PATTERN.matcher(expression);\n if (!matcher.matches()) {\n throw new IllegalActionException(this, \"String_Node_Str\" + expression);\n }\n String method = matcher.group(1);\n if (method.equals(\"String_Node_Str\")) {\n _method = Method.GET;\n } else if (method.equals(\"String_Node_Str\")) {\n _method = Method.PUT;\n } else if (method.equals(\"String_Node_Str\")) {\n _method = Method.SYNC;\n } else {\n throw new IllegalActionException(this, \"String_Node_Str\" + method);\n }\n _attributeName = matcher.group(2);\n try {\n _modifiedDate = new SimpleDateFormat(DATE_FORMAT).parse(matcher.group(3));\n } catch (ParseException e) {\n throw new IllegalActionException(this, e, \"String_Node_Str\" + expression);\n }\n _unit = matcher.group(4);\n _documentation = matcher.group(5);\n return super.validate();\n}\n"
|
"public void widgetSelected(SelectionEvent event) {\n String value = combo.getText();\n if (value.equals(NONE)) {\n value = null;\n }\n int rCode = canChangeDataSet(value);\n if (rCode == 2) {\n combo.setText(getDataSetName());\n } else {\n try {\n startTrans(\"String_Node_Str\");\n DataSetHandle dataSet = null;\n if (value != null) {\n dataSet = SessionHandleAdapter.getInstance().getReportDesignHandle().findDataSet(value);\n }\n inputElement.setDataSet(dataSet);\n generateBindingColumns();\n getPropertyHandle().setStringValue(null);\n commit();\n } catch (SemanticException e) {\n rollback();\n ExceptionHandler.handle(e);\n }\n } else {\n combo.setText(getDataSetName());\n }\n}\n"
|
"public Long toNonNullValue(TimeOfDay value) {\n return Long.valueOf((value.toLocalTime().getMillisOfDay()) * 1000000L);\n}\n"
|
"public boolean equals(Object o) {\n if (this == o) {\n return true;\n if (o == null || getClass() != o.getClass())\n return false;\n final RanChangeSet that = (RanChangeSet) o;\n if (!author.equals(that.author))\n return false;\n if (!changeLog.equals(that.changeLog))\n return false;\n return id.equals(that.id);\n}\n"
|
"public String generateVariableDeclaration() throws IllegalActionException {\n StringBuffer code = new StringBuffer();\n CompositeActor container = (CompositeActor) _director.getContainer();\n GenericCodeGenerator codeGenerator = getCodeGenerator();\n {\n NamedProgramCodeGeneratorAdapter adapterObject = (NamedProgramCodeGeneratorAdapter) codeGenerator.getAdapter(container);\n code.append(_generateVariableDeclaration(adapterObject));\n }\n Iterator<?> actors = container.deepEntityList().iterator();\n while (actors.hasNext()) {\n Actor actor = (Actor) actors.next();\n NamedProgramCodeGeneratorAdapter adapterObject = (NamedProgramCodeGeneratorAdapter) codeGenerator.getAdapter(actor);\n code.append(_generateVariableDeclaration(adapterObject));\n }\n ptolemy.actor.sched.StaticSchedulingDirector director = (ptolemy.actor.sched.StaticSchedulingDirector) getComponent();\n Schedule schedule = director.getScheduler().getSchedule();\n Iterator<?> actorsToFire = schedule.firingIterator();\n while (actorsToFire.hasNext()) {\n Firing firing = (Firing) actorsToFire.next();\n Actor actor = firing.getActor();\n if (actor instanceof ModularCodeGenTypedCompositeActor || actor instanceof ModularCompiledSDFTypedCompositeActor) {\n String className = NamedProgramCodeGeneratorAdapter.generateName((NamedObj) actor);\n String actorName = ModularCodeGenTypedCompositeActor.classToActorName(className);\n code.append(className + \"String_Node_Str\" + actorName + \"String_Node_Str\" + _eol);\n }\n }\n return code.toString();\n}\n"
|
"private Composite createColumnTableGroup(Composite parent) {\n Composite thePanel = WidgetFactory.createPanel(parent, SWT.NONE, 1, 1);\n GridLayoutFactory.fillDefaults().margins(10, 10).applyTo(thePanel);\n GridDataFactory.fillDefaults().grab(true, true).applyTo(thePanel);\n Composite buttonPanel = WidgetFactory.createPanel(thePanel, SWT.NONE, 1, 4);\n GridLayoutFactory.fillDefaults().numColumns(4).applyTo(buttonPanel);\n GridDataFactory.fillDefaults().grab(true, false).applyTo(buttonPanel);\n addColumnButton = new Button(buttonPanel, SWT.PUSH);\n addColumnButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.ADD));\n GridDataFactory.fillDefaults().applyTo(addColumnButton);\n addColumnButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n getRelationalReference().createColumn();\n handleInfoChanged();\n }\n });\n deleteColumnButton = new Button(buttonPanel, SWT.PUSH);\n deleteColumnButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DELETE));\n GridDataFactory.fillDefaults().applyTo(deleteColumnButton);\n deleteColumnButton.setEnabled(false);\n deleteColumnButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n RelationalColumn column = null;\n IStructuredSelection selection = (IStructuredSelection) columnsViewer.getSelection();\n for (Object obj : selection.toArray()) {\n if (obj instanceof RelationalColumn) {\n column = (RelationalColumn) obj;\n break;\n }\n }\n if (column != null) {\n getRelationalReference().removeColumn(column);\n deleteColumnButton.setEnabled(false);\n handleInfoChanged();\n }\n }\n });\n upColumnButton = new Button(buttonPanel, SWT.PUSH);\n upColumnButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.MOVE_UP));\n GridDataFactory.fillDefaults().applyTo(upColumnButton);\n upColumnButton.setEnabled(false);\n upColumnButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n RelationalColumn info = null;\n IStructuredSelection selection = (IStructuredSelection) columnsViewer.getSelection();\n for (Object obj : selection.toArray()) {\n if (obj instanceof RelationalColumn) {\n info = (RelationalColumn) obj;\n break;\n }\n }\n if (info != null) {\n int selectedIndex = columnsViewer.getTable().getSelectionIndex();\n getRelationalReference().moveColumnUp(info);\n handleInfoChanged();\n columnsViewer.getTable().select(selectedIndex - 1);\n downColumnButton.setEnabled(getRelationalReference().canMoveColumnDown(info));\n upColumnButton.setEnabled(getRelationalReference().canMoveColumnUp(info));\n }\n }\n });\n downColumnButton = new Button(buttonPanel, SWT.PUSH);\n downColumnButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.MOVE_DOWN));\n GridDataFactory.fillDefaults().applyTo(downColumnButton);\n downColumnButton.setEnabled(false);\n downColumnButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n RelationalColumn info = null;\n IStructuredSelection selection = (IStructuredSelection) columnsViewer.getSelection();\n for (Object obj : selection.toArray()) {\n if (obj instanceof RelationalColumn) {\n info = (RelationalColumn) obj;\n break;\n }\n }\n if (info != null) {\n int selectedIndex = columnsViewer.getTable().getSelectionIndex();\n getRelationalReference().moveColumnDown(info);\n handleInfoChanged();\n columnsViewer.getTable().select(selectedIndex + 1);\n downColumnButton.setEnabled(getRelationalReference().canMoveColumnDown(info));\n upColumnButton.setEnabled(getRelationalReference().canMoveColumnUp(info));\n }\n }\n });\n Table columnTable = new Table(thePanel, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);\n columnTable.setHeaderVisible(true);\n columnTable.setLinesVisible(true);\n columnTable.setLayout(new TableLayout());\n this.columnsViewer = new TableViewer(columnTable);\n GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).applyTo(columnsViewer.getControl());\n TableViewerColumn column = new TableViewerColumn(this.columnsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.columnNameLabel + \"String_Node_Str\");\n column.setEditingSupport(new ColumnNameEditingSupport(this.columnsViewer));\n column.setLabelProvider(new ColumnDataLabelProvider(0));\n column.getColumn().pack();\n column = new TableViewerColumn(this.columnsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.dataTypeLabel + \"String_Node_Str\");\n column.setLabelProvider(new ColumnDataLabelProvider(1));\n column.setEditingSupport(new DatatypeEditingSupport(this.columnsViewer));\n column.getColumn().pack();\n column = new TableViewerColumn(this.columnsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.lengthLabel);\n column.setLabelProvider(new ColumnDataLabelProvider(2));\n column.setEditingSupport(new ColumnWidthEditingSupport(this.columnsViewer));\n column.getColumn().pack();\n if (getRelationalReference() != null) {\n for (RelationalColumn row : getRelationalReference().getColumns()) {\n this.columnsViewer.add(row);\n }\n }\n this.columnsViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n IStructuredSelection sel = (IStructuredSelection) event.getSelection();\n if (sel.isEmpty()) {\n deleteColumnButton.setEnabled(false);\n upColumnButton.setEnabled(false);\n downColumnButton.setEnabled(false);\n } else {\n boolean enable = true;\n Object[] objs = sel.toArray();\n RelationalColumn columnInfo = null;\n for (Object obj : objs) {\n if (!(obj instanceof RelationalColumn)) {\n enable = false;\n break;\n } else {\n columnInfo = (RelationalColumn) obj;\n }\n }\n if (objs.length == 0) {\n enable = false;\n }\n deleteColumnButton.setEnabled(enable);\n if (enable) {\n upColumnButton.setEnabled(getRelationalReference().canMoveColumnUp(columnInfo));\n downColumnButton.setEnabled(getRelationalReference().canMoveColumnDown(columnInfo));\n }\n }\n }\n });\n return thePanel;\n}\n"
|
"private void stopToneCdma() {\n if (DBG)\n log(\"String_Node_Str\");\n mPhone.stopDtmf();\n stopLocalToneCdma();\n}\n"
|
"public Alarm get(UriInfo uriInfo, String tenantId, String alarm_id) {\n return fixAlarmLinks(uriInfo, repo.findById(tenantId, alarm_id));\n}\n"
|
"private int getFirstEmptyUsableSlotNumber() {\n for (InvTweaksContainerSection section : slotRefs.keySet()) {\n for (yp slot : slotRefs.get(section)) {\n if (isBasicSlot(slot) && !hasStack(slot)) {\n return getSlotNumber(slot);\n }\n }\n }\n return -1;\n}\n"
|
"private SortedSet<Description> getNegClassCandidatesRecursive(Description index, Description lowerClass) {\n SortedSet<Description> candidates = new TreeSet<Description>(conceptComparator);\n for (Description candidate : subHierarchy.getSuperClasses(lowerClass)) {\n if (!(candidate instanceof Thing)) {\n if (!isDisjoint(new Negation(candidate), index)) {\n boolean meaningful;\n if (instanceBasedDisjoints) {\n SortedSet<Individual> tmp = rs.getIndividuals(index);\n tmp.removeAll(rs.getIndividuals(new Negation(candidate)));\n meaningful = tmp.size() != 0;\n } else {\n meaningful = !isDisjoint(candidate, index);\n }\n if (meaningful) {\n candidates.add(new Negation(candidate));\n } else {\n candidates.addAll(getNegClassCandidatesRecursive(index, candidate));\n }\n }\n }\n }\n return candidates;\n}\n"
|
"public void generateDescriptorForJAXBElementSubclass(JavaClass javaClass, CoreProject project, NamespaceResolver nsr) {\n String jClassName = javaClass.getQualifiedName();\n TypeInfo info = typeInfo.get(jClassName);\n Descriptor xmlDescriptor = new XMLDescriptor();\n xmlDescriptor.setJavaClassName(jClassName);\n String[] factoryMethodParamTypes = info.getFactoryMethodParamTypes();\n MultiArgInstantiationPolicy policy = new MultiArgInstantiationPolicy();\n policy.useFactoryInstantiationPolicy(info.getObjectFactoryClassName(), info.getFactoryMethodName());\n policy.setParameterTypeNames(factoryMethodParamTypes);\n policy.setDefaultValues(new String[] { null });\n xmlDescriptor.setInstantiationPolicy(policy);\n JavaClass paramClass = helper.getJavaClass(factoryMethodParamTypes[0]);\n boolean isObject = paramClass.getName().equals(\"String_Node_Str\");\n if (helper.isBuiltInJavaType(paramClass) && !isObject) {\n if (isBinaryData(paramClass)) {\n BinaryDataMapping mapping = new XMLBinaryDataMapping();\n mapping.setAttributeName(\"String_Node_Str\");\n mapping.setXPath(\"String_Node_Str\");\n ((Field) mapping.getField()).setSchemaType(Constants.BASE_64_BINARY_QNAME);\n mapping.setSetMethodName(\"String_Node_Str\");\n mapping.setGetMethodName(\"String_Node_Str\");\n Class attributeClassification = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0], helper.getClassLoader());\n mapping.setAttributeClassification(attributeClassification);\n mapping.getNullPolicy().setNullRepresentedByEmptyNode(false);\n mapping.setShouldInlineBinaryData(false);\n if (mapping.getMimeType() == null) {\n if (areEquals(paramClass, javax.xml.transform.Source.class)) {\n mapping.setMimeTypePolicy(new FixedMimeTypePolicy(\"String_Node_Str\"));\n } else {\n mapping.setMimeTypePolicy(new FixedMimeTypePolicy(\"String_Node_Str\"));\n }\n }\n xmlDescriptor.addMapping((CoreMapping) mapping);\n } else {\n DirectMapping mapping = new XMLDirectMapping();\n mapping.setNullValueMarshalled(true);\n mapping.setAttributeName(\"String_Node_Str\");\n mapping.setGetMethodName(\"String_Node_Str\");\n mapping.setSetMethodName(\"String_Node_Str\");\n mapping.setXPath(\"String_Node_Str\");\n Class attributeClassification = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0], getClass().getClassLoader());\n mapping.setAttributeClassification(attributeClassification);\n xmlDescriptor.addMapping((CoreMapping) mapping);\n }\n } else if (paramClass.isEnum()) {\n EnumTypeInfo enumInfo = (EnumTypeInfo) typeInfo.get(paramClass.getQualifiedName());\n DirectMapping mapping = new XMLDirectMapping();\n mapping.setConverter(buildJAXBEnumTypeConverter(mapping, enumInfo));\n mapping.setNullValueMarshalled(true);\n mapping.setAttributeName(\"String_Node_Str\");\n mapping.setGetMethodName(\"String_Node_Str\");\n mapping.setSetMethodName(\"String_Node_Str\");\n mapping.setXPath(\"String_Node_Str\");\n Class attributeClassification = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0], getClass().getClassLoader());\n mapping.setAttributeClassification(attributeClassification);\n xmlDescriptor.addMapping((CoreMapping) mapping);\n } else {\n CompositeObjectMapping mapping = new XMLCompositeObjectMapping();\n mapping.setAttributeName(\"String_Node_Str\");\n mapping.setGetMethodName(\"String_Node_Str\");\n mapping.setSetMethodName(\"String_Node_Str\");\n mapping.setXPath(\"String_Node_Str\");\n if (isObject) {\n mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);\n } else {\n mapping.setReferenceClassName(factoryMethodParamTypes[0]);\n }\n xmlDescriptor.addMapping((CoreMapping) mapping);\n }\n xmlDescriptor.setNamespaceResolver(nsr);\n setSchemaContext(xmlDescriptor, info);\n project.addDescriptor((CoreDescriptor) xmlDescriptor);\n info.setDescriptor(xmlDescriptor);\n}\n"
|
"private void assertWritable() throws IOException {\n assertOpen();\n if (!isWritable) {\n throw new IOException(CoreMessages.getFormattedString(ResourceConstants.ARCHIVE_OPEN_FOR_WRITE, new Object[] { systemId }));\n }\n}\n"
|
"public void AskYesNo(String message, YesNoListener listener) {\n setMessage(message, false);\n this.listener = listener;\n if (yes == null) {\n yes = new Command(failSafeText(\"String_Node_Str\", \"String_Node_Str\"), Command.OK, 0);\n no = new Command(failSafeText(\"String_Node_Str\", \"String_Node_Str\"), Command.CANCEL, 0);\n this.addCommand(yes);\n this.addCommand(no);\n }\n}\n"
|
"protected void _generateRandomNumber() throws IllegalActionException {\n long[] sourceValues = new long[populations.getWidth()];\n long sourceTotal = 0;\n for (int i = 0; i < sourceValues.length; i++) {\n sourceValues[i] = ((LongToken) populations.get(i)).longValue();\n if (sourceValues[i] < 0) {\n throw new IllegalActionException(this, \"String_Node_Str\" + i + \"String_Node_Str\");\n sourceTotal += sourceValues[i];\n }\n int trialsRemaining = ((IntToken) trials.getToken()).intValue();\n long sourcePool = sourceTotal;\n _current = new IntToken[sourceValues.length];\n for (int i = 0; i < _current.length; i++) {\n int selected = 0;\n if ((trialsRemaining > 0) && (sourceValues[i] > 0)) {\n double p = (double) sourceValues[i] / (double) sourcePool;\n if (p < 1.0) {\n selected = _generator.nextInt(trialsRemaining, p);\n } else {\n selected = trialsRemaining;\n }\n }\n _current[i] = new IntToken(selected);\n trialsRemaining -= selected;\n sourcePool -= sourceValues[i];\n }\n}\n"
|
"private void addDimensions(List<TeleportDestinationClientInfo> destinationList) {\n WorldServer[] worlds = DimensionManager.getWorlds();\n for (WorldServer world : worlds) {\n int id = world.provider.getDimension();\n TeleportDestination destination = new TeleportDestination(new BlockPos(0, 70, 0), id);\n destination.setName(\"String_Node_Str\" + id);\n TeleportDestinationClientInfo teleportDestinationClientInfo = new TeleportDestinationClientInfo(destination);\n String dimName = world.provider.getDimensionName();\n teleportDestinationClientInfo.setDimensionName(dimName);\n destinationList.add(teleportDestinationClientInfo);\n }\n}\n"
|
"public static String debugInfo(InstallDriversMojo mojo, Driver driver) {\n return System.lineSeparator() + System.lineSeparator() + \"String_Node_Str\" + driver + System.lineSeparator() + System.lineSeparator() + \"String_Node_Str\" + System.lineSeparator() + directoryToString(mojo.cacheDirectory) + System.lineSeparator() + \"String_Node_Str\" + System.lineSeparator() + directoryToString(mojo.tempDirectory) + System.lineSeparator() + \"String_Node_Str\" + System.lineSeparator() + directoryToString(mojo.installationDirectory);\n}\n"
|
"public void run() {\n callback.onError(e);\n}\n"
|
"public void writeSummaryToParcel(Parcel out, boolean inclHistory) {\n pullPendingStateUpdatesLocked();\n final long NOW_SYS = SystemClock.uptimeMillis() * 1000;\n final long NOWREAL_SYS = SystemClock.elapsedRealtime() * 1000;\n out.writeInt(VERSION);\n writeHistory(out, inclHistory, true);\n out.writeInt(mStartCount);\n out.writeLong(computeUptime(NOW_SYS, STATS_SINCE_CHARGED));\n out.writeLong(computeRealtime(NOWREAL_SYS, STATS_SINCE_CHARGED));\n out.writeLong(startClockTime);\n out.writeString(mStartPlatformVersion);\n out.writeString(mEndPlatformVersion);\n mOnBatteryTimeBase.writeSummaryToParcel(out, NOW_SYS, NOWREAL_SYS);\n mOnBatteryScreenOffTimeBase.writeSummaryToParcel(out, NOW_SYS, NOWREAL_SYS);\n out.writeInt(mDischargeUnplugLevel);\n out.writeInt(mDischargePlugLevel);\n out.writeInt(mDischargeCurrentLevel);\n out.writeInt(mCurrentBatteryLevel);\n out.writeInt(getLowDischargeAmountSinceCharge());\n out.writeInt(getHighDischargeAmountSinceCharge());\n out.writeInt(getDischargeAmountScreenOnSinceCharge());\n out.writeInt(getDischargeAmountScreenOffSinceCharge());\n out.writeInt(mNumDischargeStepDurations);\n out.writeLongArray(mDischargeStepDurations);\n out.writeInt(mNumChargeStepDurations);\n out.writeLongArray(mChargeStepDurations);\n mScreenOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n for (int i = 0; i < NUM_SCREEN_BRIGHTNESS_BINS; i++) {\n mScreenBrightnessTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n mInteractiveTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n mLowPowerModeEnabledTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n mPhoneOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n for (int i = 0; i < SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) {\n mPhoneSignalStrengthsTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n mPhoneSignalScanningTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n for (int i = 0; i < NUM_DATA_CONNECTION_TYPES; i++) {\n mPhoneDataConnectionsTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n for (int i = 0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {\n mNetworkByteActivityCounters[i].writeSummaryFromParcelLocked(out);\n mNetworkPacketActivityCounters[i].writeSummaryFromParcelLocked(out);\n }\n mMobileRadioActiveTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n mMobileRadioActivePerAppTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n mMobileRadioActiveAdjustedTime.writeSummaryFromParcelLocked(out);\n mMobileRadioActiveUnknownTime.writeSummaryFromParcelLocked(out);\n mMobileRadioActiveUnknownCount.writeSummaryFromParcelLocked(out);\n mWifiOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n mGlobalWifiRunningTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n for (int i = 0; i < NUM_WIFI_STATES; i++) {\n mWifiStateTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n for (int i = 0; i < NUM_WIFI_SUPPL_STATES; i++) {\n mWifiSupplStateTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n for (int i = 0; i < NUM_WIFI_SIGNAL_STRENGTH_BINS; i++) {\n mWifiSignalStrengthsTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n mBluetoothOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n for (int i = 0; i < NUM_BLUETOOTH_STATES; i++) {\n mBluetoothStateTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n mFlashlightOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n out.writeInt(mKernelWakelockStats.size());\n for (Map.Entry<String, SamplingTimer> ent : mKernelWakelockStats.entrySet()) {\n Timer kwlt = ent.getValue();\n if (kwlt != null) {\n out.writeInt(1);\n out.writeString(ent.getKey());\n kwlt.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n }\n out.writeInt(mWakeupReasonStats.size());\n for (Map.Entry<String, LongSamplingCounter> ent : mWakeupReasonStats.entrySet()) {\n LongSamplingCounter counter = ent.getValue();\n if (counter != null) {\n out.writeInt(1);\n out.writeString(ent.getKey());\n counter.writeSummaryFromParcelLocked(out);\n } else {\n out.writeInt(0);\n }\n }\n out.writeInt(sNumSpeedSteps);\n final int NU = mUidStats.size();\n out.writeInt(NU);\n for (int iu = 0; iu < NU; iu++) {\n out.writeInt(mUidStats.keyAt(iu));\n Uid u = mUidStats.valueAt(iu);\n if (u.mWifiRunningTimer != null) {\n out.writeInt(1);\n u.mWifiRunningTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (u.mFullWifiLockTimer != null) {\n out.writeInt(1);\n u.mFullWifiLockTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (u.mWifiScanTimer != null) {\n out.writeInt(1);\n u.mWifiScanTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n for (int i = 0; i < Uid.NUM_WIFI_BATCHED_SCAN_BINS; i++) {\n if (u.mWifiBatchedScanTimer[i] != null) {\n out.writeInt(1);\n u.mWifiBatchedScanTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n }\n if (u.mWifiMulticastTimer != null) {\n out.writeInt(1);\n u.mWifiMulticastTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (u.mAudioTurnedOnTimer != null) {\n out.writeInt(1);\n u.mAudioTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (u.mVideoTurnedOnTimer != null) {\n out.writeInt(1);\n u.mVideoTurnedOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (u.mForegroundActivityTimer != null) {\n out.writeInt(1);\n u.mForegroundActivityTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n for (int i = 0; i < Uid.NUM_PROCESS_STATE; i++) {\n if (u.mProcessStateTimer[i] != null) {\n out.writeInt(1);\n u.mProcessStateTimer[i].writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n }\n if (u.mVibratorOnTimer != null) {\n out.writeInt(1);\n u.mVibratorOnTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (u.mUserActivityCounters == null) {\n out.writeInt(0);\n } else {\n out.writeInt(1);\n for (int i = 0; i < Uid.NUM_USER_ACTIVITY_TYPES; i++) {\n u.mUserActivityCounters[i].writeSummaryFromParcelLocked(out);\n }\n }\n if (u.mNetworkByteActivityCounters == null) {\n out.writeInt(0);\n } else {\n out.writeInt(1);\n for (int i = 0; i < NUM_NETWORK_ACTIVITY_TYPES; i++) {\n u.mNetworkByteActivityCounters[i].writeSummaryFromParcelLocked(out);\n u.mNetworkPacketActivityCounters[i].writeSummaryFromParcelLocked(out);\n }\n u.mMobileRadioActiveTime.writeSummaryFromParcelLocked(out);\n u.mMobileRadioActiveCount.writeSummaryFromParcelLocked(out);\n }\n final ArrayMap<String, Uid.Wakelock> wakeStats = u.mWakelockStats.getMap();\n int NW = wakeStats.size();\n out.writeInt(NW);\n for (int iw = 0; iw < NW; iw++) {\n out.writeString(wakeStats.keyAt(iw));\n Uid.Wakelock wl = wakeStats.valueAt(iw);\n if (wl.mTimerFull != null) {\n out.writeInt(1);\n wl.mTimerFull.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (wl.mTimerPartial != null) {\n out.writeInt(1);\n wl.mTimerPartial.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n if (wl.mTimerWindow != null) {\n out.writeInt(1);\n wl.mTimerWindow.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n }\n final ArrayMap<String, StopwatchTimer> syncStats = u.mSyncStats.getMap();\n int NS = syncStats.size();\n out.writeInt(NS);\n for (int is = 0; is < NS; is++) {\n out.writeString(syncStats.keyAt(is));\n syncStats.valueAt(is).writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n final ArrayMap<String, StopwatchTimer> jobStats = u.mJobStats.getMap();\n int NJ = jobStats.size();\n out.writeInt(NJ);\n for (int ij = 0; ij < NJ; ij++) {\n out.writeString(jobStats.keyAt(ij));\n jobStats.valueAt(ij).writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n }\n int NSE = u.mSensorStats.size();\n out.writeInt(NSE);\n for (int ise = 0; ise < NSE; ise++) {\n out.writeInt(u.mSensorStats.keyAt(ise));\n Uid.Sensor se = u.mSensorStats.valueAt(ise);\n if (se.mTimer != null) {\n out.writeInt(1);\n se.mTimer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);\n } else {\n out.writeInt(0);\n }\n }\n int NP = u.mProcessStats.size();\n out.writeInt(NP);\n for (int ip = 0; ip < NP; ip++) {\n out.writeString(u.mProcessStats.keyAt(ip));\n Uid.Proc ps = u.mProcessStats.valueAt(ip);\n out.writeLong(ps.mUserTime);\n out.writeLong(ps.mSystemTime);\n out.writeLong(ps.mForegroundTime);\n out.writeInt(ps.mStarts);\n final int N = ps.mSpeedBins.length;\n out.writeInt(N);\n for (int i = 0; i < N; i++) {\n if (ps.mSpeedBins[i] != null) {\n out.writeInt(1);\n ps.mSpeedBins[i].writeSummaryFromParcelLocked(out);\n } else {\n out.writeInt(0);\n }\n }\n ps.writeExcessivePowerToParcelLocked(out);\n }\n NP = u.mPackageStats.size();\n out.writeInt(NP);\n if (NP > 0) {\n for (Map.Entry<String, BatteryStatsImpl.Uid.Pkg> ent : u.mPackageStats.entrySet()) {\n out.writeString(ent.getKey());\n Uid.Pkg ps = ent.getValue();\n out.writeInt(ps.mWakeups);\n NS = ps.mServiceStats.size();\n out.writeInt(NS);\n if (NS > 0) {\n for (Map.Entry<String, BatteryStatsImpl.Uid.Pkg.Serv> sent : ps.mServiceStats.entrySet()) {\n out.writeString(sent.getKey());\n BatteryStatsImpl.Uid.Pkg.Serv ss = sent.getValue();\n long time = ss.getStartTimeToNowLocked(mOnBatteryTimeBase.getUptime(NOW_SYS));\n out.writeLong(time);\n out.writeInt(ss.mStarts);\n out.writeInt(ss.mLaunches);\n }\n }\n }\n }\n }\n}\n"
|
"private MediaFormat getSupportedFormat(String name, PayloadTypePacketExtension payloadType) {\n MediaDevice dev = devices.get(name);\n for (MediaFormat mf : dev.getSupportedFormats()) {\n if (mf.matches(mediaType, payloadType.getName(), payloadType.getClockrate(), payloadType.getChannels(), null)) {\n return mf;\n }\n }\n return null;\n}\n"
|
"public void processAlignment(final SAMRecord rec) {\n indexStats.recordMetaData(rec);\n final int alignmentStart = rec.getAlignmentStart();\n if (alignmentStart == SAMRecord.NO_ALIGNMENT_START) {\n return;\n }\n final int reference = rec.getReferenceIndex();\n if (reference != currentReference) {\n throw new SAMException(\"String_Node_Str\" + reference + \"String_Node_Str\" + currentReference + \"String_Node_Str\" + rec);\n }\n final Integer binNumber = rec.getIndexingBin();\n final int binNum = binNumber == null ? rec.computeIndexingBin() : binNumber;\n if (bins == null) {\n final SAMSequenceRecord seq = bamHeader.getSequence(reference);\n if (seq == null) {\n bins = new Bin[MAX_BINS + 1];\n } else {\n bins = new Bin[AbstractBAMFileIndex.getMaxBinNumberForSequenceLength(seq.getSequenceLength()) + 1];\n }\n }\n final Bin bin;\n if (bins[binNum] != null) {\n bin = bins[binNum];\n } else {\n bin = new Bin(reference, binNum);\n bins[binNum] = bin;\n binsSeen++;\n }\n final SAMFileSource source = rec.getFileSource();\n if (source == null) {\n throw new SAMException(\"String_Node_Str\" + rec);\n }\n final Chunk newChunk = ((BAMFileSpan) source.getFilePointer()).getSingleChunk();\n final long chunkStart = newChunk.getChunkStart();\n final long chunkEnd = newChunk.getChunkEnd();\n final List<Chunk> oldChunks = bin.getChunkList();\n if (!bin.containsChunks()) {\n bin.addInitialChunk(newChunk);\n } else {\n final Chunk lastChunk = bin.getLastChunk();\n if (BlockCompressedFilePointerUtil.areInSameOrAdjacentBlocks(lastChunk.getChunkEnd(), chunkStart)) {\n lastChunk.setChunkEnd(chunkEnd);\n } else {\n oldChunks.add(newChunk);\n bin.setLastChunk(newChunk);\n }\n }\n final int alignmentEnd = rec.getAlignmentEnd();\n int startWindow = LinearIndex.convertToLinearIndexOffset(alignmentStart);\n final int endWindow;\n if (alignmentEnd == SAMRecord.NO_ALIGNMENT_START) {\n startWindow = LinearIndex.convertToLinearIndexOffset(alignmentStart - 1);\n endWindow = startWindow;\n } else {\n endWindow = LinearIndex.convertToLinearIndexOffset(alignmentEnd);\n }\n if (endWindow > largestIndexSeen) {\n largestIndexSeen = endWindow;\n }\n for (int win = startWindow; win <= endWindow; win++) {\n if (index[win] == 0 || chunkStart < index[win]) {\n index[win] = chunkStart;\n }\n }\n}\n"
|
"private void initNamed() {\n Sampler.Builder sb = new Sampler.Builder(mRS);\n sb.setMin(Sampler.Value.LINEAR);\n sb.setMag(Sampler.Value.LINEAR);\n sb.setWrapS(Sampler.Value.CLAMP);\n sb.setWrapT(Sampler.Value.CLAMP);\n mSampler = sb.create();\n sb.setMin(Sampler.Value.NEAREST);\n sb.setMag(Sampler.Value.NEAREST);\n mSamplerText = sb.create();\n ProgramFragment.Builder bf = new ProgramFragment.Builder(mRS, null, null);\n bf.setTexEnable(true, 0);\n bf.setTexEnvMode(ProgramFragment.EnvMode.MODULATE, 0);\n mPFImages = bf.create();\n mPFImages.setName(\"String_Node_Str\");\n mPFImages.bindSampler(mSampler, 0);\n bf.setTexEnvMode(ProgramFragment.EnvMode.MODULATE, 0);\n mPFText = bf.create();\n mPFText.setName(\"String_Node_Str\");\n mPFText.bindSampler(mSamplerText, 0);\n ProgramStore.Builder bs = new ProgramStore.Builder(mRS, null, null);\n bs.setDepthFunc(ProgramStore.DepthFunc.LESS);\n bs.setDitherEnable(false);\n bs.setDepthMask(true);\n bs.setBlendFunc(ProgramStore.BlendSrcFunc.SRC_ALPHA, ProgramStore.BlendDstFunc.ONE_MINUS_SRC_ALPHA);\n mPSBackground = bs.create();\n mPSBackground.setName(\"String_Node_Str\");\n bs.setDepthFunc(ProgramStore.DepthFunc.ALWAYS);\n bs.setDepthMask(false);\n bs.setBlendFunc(ProgramStore.BlendSrcFunc.SRC_ALPHA, ProgramStore.BlendDstFunc.ONE_MINUS_SRC_ALPHA);\n mPSText = bs.create();\n mPSText.setName(\"String_Node_Str\");\n mPVAlloc = new ProgramVertex.MatrixAllocation(mRS);\n mPVAlloc.setupProjectionNormalized(mWidth, mHeight);\n ProgramVertex.Builder pvb = new ProgramVertex.Builder(mRS, null, null);\n mPV = pvb.create();\n mPV.setName(\"String_Node_Str\");\n mPV.bindAllocation(mPVAlloc);\n mPVOrthoAlloc = new ProgramVertex.MatrixAllocation(mRS);\n mPVOrthoAlloc.setupOrthoWindow(mWidth, mHeight);\n pvb.setTextureMatrixEnable(true);\n mPVOrtho = pvb.create();\n mPVOrtho.setName(\"String_Node_Str\");\n mPVOrtho.bindAllocation(mPVOrthoAlloc);\n mRS.contextBindProgramVertex(mPV);\n mAllocScratchBuf = new int[32];\n mAllocScratch = Allocation.createSized(mRS, Element.USER_I32(mRS), mAllocScratchBuf.length);\n mAllocScratch.data(mAllocScratchBuf);\n Log.e(\"String_Node_Str\", \"String_Node_Str\");\n {\n mIcons = new Allocation[29];\n mAllocIconIDBuf = new int[mIcons.length];\n mAllocIconID = Allocation.createSized(mRS, Element.USER_I32, mAllocIconIDBuf.length);\n mLabels = new Allocation[29];\n mAllocLabelIDBuf = new int[mLabels.length];\n mAllocLabelID = Allocation.createSized(mRS, Element.USER_I32, mLabels.length);\n Element ie8888 = Element.RGBA_8888;\n mIcons[0] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.browser, ie8888, true);\n mIcons[1] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.market, ie8888, true);\n mIcons[2] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.photos, ie8888, true);\n mIcons[3] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.settings, ie8888, true);\n mIcons[4] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.calendar, ie8888, true);\n mIcons[5] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.g1155, ie8888, true);\n mIcons[6] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.g2140, ie8888, true);\n mIcons[7] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.maps, ie8888, true);\n mIcons[8] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path431, ie8888, true);\n mIcons[9] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path676, ie8888, true);\n mIcons[10] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path754, ie8888, true);\n mIcons[11] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path815, ie8888, true);\n mIcons[12] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path1920, ie8888, true);\n mIcons[13] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path1927, ie8888, true);\n mIcons[14] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path3099, ie8888, true);\n mIcons[15] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path3950, ie8888, true);\n mIcons[16] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path4481, ie8888, true);\n mIcons[17] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.path5168, ie8888, true);\n mIcons[18] = Allocation.createFromBitmapResource(mRS, mRes, R.raw.polygon2408, ie8888, true);\n mLabels[0] = makeTextBitmap(\"String_Node_Str\");\n mLabels[1] = makeTextBitmap(\"String_Node_Str\");\n mLabels[2] = makeTextBitmap(\"String_Node_Str\");\n mLabels[3] = makeTextBitmap(\"String_Node_Str\");\n mLabels[4] = makeTextBitmap(\"String_Node_Str\");\n mLabels[5] = makeTextBitmap(\"String_Node_Str\");\n mLabels[6] = makeTextBitmap(\"String_Node_Str\");\n mLabels[7] = makeTextBitmap(\"String_Node_Str\");\n mLabels[8] = makeTextBitmap(\"String_Node_Str\");\n mLabels[9] = makeTextBitmap(\"String_Node_Str\");\n mLabels[10] = makeTextBitmap(\"String_Node_Str\");\n mLabels[11] = makeTextBitmap(\"String_Node_Str\");\n mLabels[12] = makeTextBitmap(\"String_Node_Str\");\n mLabels[13] = makeTextBitmap(\"String_Node_Str\");\n mLabels[14] = makeTextBitmap(\"String_Node_Str\");\n mLabels[15] = makeTextBitmap(\"String_Node_Str\");\n mLabels[16] = makeTextBitmap(\"String_Node_Str\");\n mLabels[17] = makeTextBitmap(\"String_Node_Str\");\n mLabels[18] = makeTextBitmap(\"String_Node_Str\");\n mIcons[19] = mIcons[0];\n mIcons[20] = mIcons[1];\n mIcons[21] = mIcons[2];\n mIcons[22] = mIcons[3];\n mIcons[23] = mIcons[4];\n mIcons[24] = mIcons[5];\n mIcons[25] = mIcons[6];\n mIcons[26] = mIcons[7];\n mIcons[27] = mIcons[8];\n mIcons[28] = mIcons[9];\n mLabels[19] = mLabels[0];\n mLabels[20] = mLabels[1];\n mLabels[21] = mLabels[2];\n mLabels[22] = mLabels[3];\n mLabels[23] = mLabels[4];\n mLabels[24] = mLabels[5];\n mLabels[25] = mLabels[6];\n mLabels[26] = mLabels[7];\n mLabels[27] = mLabels[8];\n mLabels[28] = mLabels[9];\n for (int ct = 0; ct < mIcons.length; ct++) {\n mIcons[ct].uploadToTexture(0);\n mLabels[ct].uploadToTexture(0);\n mAllocIconIDBuf[ct] = mIcons[ct].getID();\n mAllocLabelIDBuf[ct] = mLabels[ct].getID();\n }\n mAllocIconID.data(mAllocIconIDBuf);\n mAllocLabelID.data(mAllocLabelIDBuf);\n }\n}\n"
|
"public static int getMaximumRange(int profileType, TravelRangeType range) {\n Integer res = 0;\n switch(range) {\n case Distance:\n res = maximumRangeDistance;\n if (profileMaxRangeDistances != null && profileMaxRangeDistances.containsKey(profileType)) {\n res = profileMaxRangeDistances.get(profileType);\n }\n break;\n case Time:\n res = profileMaxRangeTimes.get(profileType);\n if (res == null)\n res = maximumRangeTime;\n break;\n }\n return res;\n}\n"
|
"public GenericPdu parse() {\n if (mPduDataStream == null) {\n return null;\n }\n mHeaders = parseHeaders(mPduDataStream);\n if (null == mHeaders) {\n return null;\n }\n int messageType = mHeaders.getOctet(PduHeaders.MESSAGE_TYPE);\n if (false == checkMandatoryHeader(mHeaders)) {\n log(\"String_Node_Str\");\n return null;\n }\n if ((PduHeaders.MESSAGE_TYPE_SEND_REQ == messageType) || (PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF == messageType)) {\n mBody = parseParts(mPduDataStream);\n if (null == mBody) {\n return null;\n }\n }\n switch(messageType) {\n case PduHeaders.MESSAGE_TYPE_SEND_REQ:\n SendReq sendReq = new SendReq(mHeaders, mBody);\n return sendReq;\n case PduHeaders.MESSAGE_TYPE_SEND_CONF:\n SendConf sendConf = new SendConf(mHeaders);\n return sendConf;\n case PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND:\n NotificationInd notificationInd = new NotificationInd(mHeaders);\n return notificationInd;\n case PduHeaders.MESSAGE_TYPE_NOTIFYRESP_IND:\n NotifyRespInd notifyRespInd = new NotifyRespInd(mHeaders);\n return notifyRespInd;\n case PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF:\n RetrieveConf retrieveConf = new RetrieveConf(mHeaders, mBody);\n byte[] contentType = retrieveConf.getContentType();\n if (null == contentType) {\n return null;\n }\n String ctTypeStr = new String(contentType);\n if (ctTypeStr.equals(ContentType.MULTIPART_MIXED) || ctTypeStr.equals(ContentType.MULTIPART_RELATED) || ctTypeStr.equals(ContentType.MULTIPART_ALTERNATIVE)) {\n return retrieveConf;\n }\n return null;\n case PduHeaders.MESSAGE_TYPE_DELIVERY_IND:\n DeliveryInd deliveryInd = new DeliveryInd(mHeaders);\n return deliveryInd;\n case PduHeaders.MESSAGE_TYPE_ACKNOWLEDGE_IND:\n AcknowledgeInd acknowledgeInd = new AcknowledgeInd(mHeaders);\n return acknowledgeInd;\n case PduHeaders.MESSAGE_TYPE_READ_ORIG_IND:\n ReadOrigInd readOrigInd = new ReadOrigInd(mHeaders);\n return readOrigInd;\n case PduHeaders.MESSAGE_TYPE_READ_REC_IND:\n ReadRecInd readRecInd = new ReadRecInd(mHeaders);\n return readRecInd;\n default:\n log(\"String_Node_Str\");\n return null;\n }\n}\n"
|
"public static ProgressDialog showHorizontalDialog(Activity activity) {\n ProgressDialog dialog = new ProgressDialog(activity);\n dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n dialog.setCancelable(true);\n if (activity.isFinishing() == false) {\n dialog.show();\n }\n return dialog;\n}\n"
|
"public void sendPing() {\n try {\n DatagramChannel sendChannel = DatagramChannel.open();\n sendChannel.send(buf, host);\n sendChannel.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
|
"public InstanceUsageEvent get() {\n return new InstanceUsageEvent(sensorData.getResourceUuid(), sensorData.getResourceName(), metricType.getMetricName(), sequenceNumber, dimensionType.getDimensionName(), usageValue, usageTimestamp);\n}\n"
|
"public ExecutionResult execute(PolicyContext context) {\n ExecutionResult trueResult = new ExecutionResult(context, true, \"String_Node_Str\");\n AbstractComponent component = context.getProperty(PolicyContext.PropertyName.TARGET_COMPONENT.getName(), AbstractComponent.class);\n if (!checkArguments(context, component))\n return trueResult;\n ViewType viewType = context.getProperty(PolicyContext.PropertyName.VIEW_TYPE.getName(), ViewType.class);\n ViewInfo targetViewInfo = context.getProperty(PolicyContext.PropertyName.TARGET_VIEW_INFO.getName(), ViewInfo.class);\n if (viewType == ViewType.OBJECT || viewType == ViewType.CENTER) {\n if (DropboxCanvasView.class.isAssignableFrom(targetViewInfo.getViewClass()) || targetViewInfo.getViewName().equals(\"String_Node_Str\"))\n return new ExecutionResult(context, true, \"String_Node_Str\");\n }\n return trueResult;\n}\n"
|
"public void render(float delta) {\n camera.update();\n screenShake();\n updateBallMovement(delta);\n checkPaddleOutOfBounds();\n checkForGameOver();\n checkTotalPaddleHits();\n particleEmitter.update(ball, delta);\n Gdx.gl.glClearColor(0, 0, 0, 1);\n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n batchDraw();\n}\n"
|
"public Map<TypeMappingInfo, QName> getTypeMappingInfoToSchemaType() {\n if (typeToTypeMappingInfo != null && typeToTypeMappingInfo.size() > 0) {\n return new HashMap<TypeMappingInfo, QName>();\n }\n return typeMappingInfoToSchemaType;\n}\n"
|
"public static Object getModelValueFromCursor(Cursor cursor, TableStructure tableStructure, Field field, String columnName, Class<?> fieldType) {\n int columnIndex = TextUtils.isEmpty(columnName) ? -1 : cursor.getColumnIndex(columnName);\n Object value = null;\n if (columnIndex >= 0 || (StructureUtils.isForeignKey(field) && ReflectionUtils.implementsModel(fieldType))) {\n boolean columnIsNull = cursor.isNull(columnIndex);\n TypeConverter typeSerializer = tableStructure.getManager().getTypeConverterForClass(fieldType);\n if (typeSerializer != null) {\n fieldType = typeSerializer.getDatabaseType();\n }\n if (fieldType.equals(Byte.class) || fieldType.equals(byte.class)) {\n value = cursor.getInt(columnIndex);\n } else if (fieldType.equals(Short.class) || fieldType.equals(short.class)) {\n value = cursor.getInt(columnIndex);\n } else if (fieldType.equals(Integer.class) || fieldType.equals(int.class)) {\n value = cursor.getInt(columnIndex);\n } else if (fieldType.equals(Long.class) || fieldType.equals(long.class)) {\n value = cursor.getLong(columnIndex);\n } else if (fieldType.equals(Float.class) || fieldType.equals(float.class)) {\n value = cursor.getFloat(columnIndex);\n } else if (fieldType.equals(Double.class) || fieldType.equals(double.class)) {\n value = cursor.getDouble(columnIndex);\n } else if (fieldType.equals(Boolean.class) || fieldType.equals(boolean.class)) {\n value = cursor.getInt(columnIndex) != 0;\n } else if (fieldType.equals(Character.class) || fieldType.equals(char.class)) {\n value = cursor.getString(columnIndex).charAt(0);\n } else if (fieldType.equals(String.class)) {\n value = cursor.getString(columnIndex);\n } else if (fieldType.equals(Byte[].class) || fieldType.equals(byte[].class)) {\n value = cursor.getBlob(columnIndex);\n } else if (StructureUtils.isForeignKey(field) && ReflectionUtils.implementsModel(fieldType)) {\n final Class<? extends Model> entityType = (Class<? extends Model>) fieldType;\n Column foreignKey = field.getAnnotation(Column.class);\n Object[] foreignColumns = new Object[foreignKey.references().length];\n for (int i = 0; i < foreignColumns.length; i++) {\n ForeignKeyReference foreignKeyReference = foreignKey.references()[i];\n foreignColumns[i] = getModelValueFromCursor(cursor, tableStructure, null, foreignKeyReference.columnName(), foreignKeyReference.columnType());\n }\n ConditionQueryBuilder conditionQueryBuilder = FlowManager.getPrimaryWhereQuery(entityType);\n value = new Select().from(entityType).where().whereQuery(conditionQueryBuilder.replaceEmptyParams(foreignColumns)).querySingle();\n } else if (ReflectionUtils.isSubclassOf(fieldType, Enum.class)) {\n final Class<? extends Enum> enumType = (Class<? extends Enum>) fieldType;\n value = Enum.valueOf(enumType, cursor.getString(columnIndex));\n }\n if (typeSerializer != null && !columnIsNull) {\n value = typeSerializer.getModelValue(value);\n }\n }\n return value;\n}\n"
|
"public void onClick(View arg0) {\n String username = user.getText().toString();\n String password = pass.getText().toString();\n PasswordHash pass;\n if (username.equals(\"String_Node_Str\"))\n return;\n if (savedUser != null && username.equalsIgnoreCase(savedUser) && (password.equals(\"String_Node_Str\")) && savedPass != null) {\n pass = savedPass;\n } else {\n if (password.equals(\"String_Node_Str\"))\n return;\n pass = new PasswordHash(password, false);\n }\n View focus = host.getActivity().getCurrentFocus();\n if (focus != null) {\n InputMethodManager inputManager = (InputMethodManager) host.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(focus.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n getModel().login(username, pass);\n settings.set(\"String_Node_Str\", configPass.isChecked());\n settings.set(\"String_Node_Str\", configChat.isChecked());\n enterChatImmediately = configChat.isChecked();\n if (configPass.isChecked()) {\n settings.set(\"String_Node_Str\", username);\n settings.set(\"String_Node_Str\", username + \"String_Node_Str\" + pass.getBaseHash());\n } else {\n settings.remove(\"String_Node_Str\");\n settings.remove(\"String_Node_Str\");\n }\n}\n"
|
"Object get(Object index) {\n Object base = null;\n if (this.storageType == TokenStorageType.CONSTANT) {\n return this.value;\n }\n if (this.namespace.containsKey(this.name)) {\n base = this.namespace.get(this.name);\n } else {\n throw new UndefinedValueException(String.format(\"String_Node_Str\", this.name));\n }\n if (index == null) {\n index = this.index;\n }\n if (index == null) {\n value = base;\n } else {\n if (base instanceof List) {\n List<Object> list = (List<Object>) base;\n Integer idx = null;\n if (index instanceof Long) {\n idx = new Integer(((Long) index).intValue());\n } else if (index instanceof String) {\n try {\n idx = new Integer((String) index);\n } catch (NumberFormatException e) {\n throw new InvalidTypeException(String.format(\"String_Node_Str\", this.name, index, e));\n }\n } else {\n throw new InvalidTypeException(String.format(\"String_Node_Str\", this.name, index, index.getClass().getSimpleName()));\n }\n try {\n value = list.get(idx);\n } catch (IndexOutOfBoundsException e) {\n throw new UndefinedValueException(String.format(\"String_Node_Str\", this.name, list.size(), idx));\n }\n } else if (base instanceof Map) {\n Map<String, Object> map = (Map<String, Object>) base;\n String idx = null;\n if (index instanceof String) {\n idx = (String) index;\n } else {\n throw new InvalidTypeException(String.format(\"String_Node_Str\", this.name, index, index.getClass().getSimpleName()));\n }\n if (!map.containsKey(idx)) {\n throw new UndefinedValueException(String.format(\"String_Node_Str\", this.name, index));\n }\n value = map.get(idx);\n } else {\n throw new InvalidTypeException(String.format(\"String_Node_Str\", this.name, index, base.getClass().getSimpleName()));\n }\n }\n this.type = classify(value);\n return value;\n}\n"
|
"public Map<String, String> getStringDataTypes() {\n return Collections.unmodifiableMap(stringDataTypes);\n}\n"
|
"public void run() {\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(HomeView.this, \"String_Node_Str\").setSmallIcon(R.drawable.aro).setContentTitle(\"String_Node_Str\").setContentText(contentsmall).setColor(ContextCompat.getColor(HomeView.this, R.color.colorPrimary)).setColorized(true).setChannelId(\"String_Node_Str\").setPriority(NotificationCompat.PRIORITY_DEFAULT);\n NotificationManager mNotificationManager = (NotificationManager) HomeView.this.getSystemService(Context.NOTIFICATION_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"String_Node_Str\", \"String_Node_Str\", NotificationManager.IMPORTANCE_DEFAULT);\n mNotificationManager.createNotificationChannel(channel);\n }\n mNotificationManager.notify(1047 + new Random().nextInt(1000), mBuilder.build());\n TextView t = findViewById(R.id.shares);\n String text = t.getText().toString();\n int parsed = 0;\n try {\n parsed = Integer.parseInt(text);\n } catch (Exception e) {\n }\n if (contentsmall.startsWith(\"String_Node_Str\"))\n t.setText((parsed + 1) + \"String_Node_Str\");\n}\n"
|
"public void map(KEYIN key, HCatRecord record, Context context) throws IOException, InterruptedException {\n HCatFieldSchema fieldSchema = null;\n for (short i = 0; i < columnSize; i++) {\n outputKey.set(i);\n fieldSchema = schema.get(i);\n Object fieldValue = record.get(fieldSchema.getName(), schema);\n if (fieldValue == null)\n continue;\n byte[] bytes = Bytes.toBytes(fieldValue.toString());\n outputValue.set(bytes, 0, bytes.length);\n context.write(outputKey, outputValue);\n }\n}\n"
|
"public void performPopupMenu(final Object source) {\n if (source == this.popupFileRefresh || source == this.popupRefreshItem || source == this.popupFileCSVRefresh || source == popupRootRefreshItem) {\n EncogWorkBench.getInstance().getMainWindow().getTree().refresh();\n } else if (source == this.popupRootNewFile) {\n try {\n CreateNewFile.performCreateFile();\n } catch (IOException e) {\n EncogWorkBench.displayError(\"String_Node_Str\", e);\n }\n }\n boolean first = true;\n List<ProjectItem> list = this.owner.getTree().getSelectedValue();\n if (list == null)\n return;\n for (ProjectItem selected : list) {\n if (source == this.popupFileDelete || source == this.popupFileCSVDelete || source == this.popupDataDelete || source == this.popupGeneralDelete) {\n if (first && !EncogWorkBench.askQuestion(\"String_Node_Str\", \"String_Node_Str\")) {\n return;\n }\n first = false;\n if (selected instanceof ProjectFile) {\n ((ProjectFile) selected).getFile().delete();\n }\n EncogWorkBench.getInstance().getMainWindow().getTree().refresh();\n } else if (source == this.popupFileOpen || source == this.popupFileCSVOpen) {\n if (selected instanceof ProjectFile) {\n EncogWorkBench.getInstance().getMainWindow().openFile(((ProjectFile) selected).getFile());\n }\n } else if (source == this.popupFileOpenText) {\n if (selected instanceof ProjectFile) {\n EncogWorkBench.getInstance().getMainWindow().openTextFile(((ProjectFile) selected).getFile());\n }\n } else if ((source == this.popupNetworkDelete) || (source == this.popupDataDelete) || (source == this.popupGeneralDelete) || (source == this.popupFileCSVDelete)) {\n if (first && !EncogWorkBench.askQuestion(\"String_Node_Str\", \"String_Node_Str\")) {\n return;\n }\n owner.getOperations().performObjectsDelete(selected);\n } else if (source == this.popupFileCSVExport) {\n String sourceFile = ((ProjectFile) selected).getFile().toString();\n String targetFile = FileUtil.forceExtension(sourceFile, \"String_Node_Str\");\n ImportExport.performExternal2Bin(new File(sourceFile), new File(targetFile), null);\n } else if (source == this.popupFileCSVWizard) {\n File sourceFile = ((ProjectFile) selected).getFile();\n EncogAnalystWizard.createEncogAnalyst(sourceFile);\n }\n first = false;\n }\n}\n"
|
"public Object calculate(Object value) {\n if (value == null) {\n return new Double(-1);\n }\n if (intervalStart == null) {\n return new Double(Math.floor(DateTimeUtil.diffMonth(defaultStart, (Date) value) / getDateIntervalRange()));\n } else {\n if (DateTimeUtil.diffMonth((Date) intervalStart, (Date) value) < 0) {\n return new Double(-1);\n } else {\n return new Double(Math.floor(DateTimeUtil.diffMonth((Date) intervalStart, (Date) value) / intervalRange));\n }\n }\n}\n"
|
"private static ChangeItem createExpected(ArtifactData data) {\n return ChangeItemUtil.newArtifactChange(ArtifactId.valueOf(data.getLocalId()), ArtifactTypeId.SENTINEL, GammaId.valueOf(data.getVersion().getGammaId()), determineModType(data), ApplicabilityToken.BASE);\n}\n"
|
"private void convertToNormal() {\n mergeTmp();\n resetDelta();\n for (int i = 0; i < sparseSet.size(); i++) {\n int k = deltaRead(sparseSet, i);\n int idx = getIndex(k, p);\n int r = decodeRunLength(k);\n if (registerSet.get(idx) < r) {\n registerSet.set(idx, r);\n }\n }\n format = Format.NORMAL;\n tmpSet.clear();\n sparseSet = null;\n}\n"
|
"protected void outputImg(Element ele, HashMap cssStyles, IContent content) {\n String src = ele.getAttribute(\"String_Node_Str\");\n if (src != null) {\n IImageContent image = new ImageContent(content);\n addChild(content, image);\n handleStyle(ele, cssStyles, image);\n if (!FileUtil.isLocalResource(src)) {\n image.setImageSource(IImageContent.IMAGE_URL);\n image.setURI(src);\n } else {\n ReportDesignHandle handle = content.getReportContent().getDesign().getReportDesign();\n URL url = handle.findResource(src, IResourceLocator.IMAGE);\n if (url != null) {\n src = url.toString();\n }\n image.setImageSource(IImageContent.IMAGE_FILE);\n image.setURI(src);\n }\n if (null != ele.getAttribute(\"String_Node_Str\") && !\"String_Node_Str\".equals(ele.getAttribute(\"String_Node_Str\"))) {\n image.setWidth(DimensionType.parserUnit(ele.getAttribute(\"String_Node_Str\"), DimensionType.UNITS_PX));\n }\n if (ele.getAttribute(\"String_Node_Str\") != null && !\"String_Node_Str\".equals(ele.getAttribute(\"String_Node_Str\"))) {\n image.setHeight(DimensionType.parserUnit(ele.getAttribute(\"String_Node_Str\"), DimensionType.UNITS_PX));\n }\n if (ele.getAttribute(\"String_Node_Str\") != null && !\"String_Node_Str\".equals(ele.getAttribute(\"String_Node_Str\"))) {\n image.setAltText(ele.getAttribute(\"String_Node_Str\"));\n }\n }\n}\n"
|
"public void testTrainWithLatentVars() {\n FactorTemplateList fts = new FactorTemplateList();\n ObsFeatureExtractor obsFe = new SimpleVCFeatureExtractor(fts);\n ObsFeatureConjoinerPrm prm = new ObsFeatureConjoinerPrm();\n prm.includeUnsupportedFeatures = true;\n ObsFeatureConjoiner ofc = new ObsFeatureConjoiner(prm, fts);\n FgAndVars fgv = getLinearChainFgWithVarsLatent(true, ofc, obsFe);\n VarConfig trainConfig = new VarConfig();\n trainConfig.put(fgv.w0, 0);\n trainConfig.put(fgv.w1, 1);\n trainConfig.put(fgv.w2, 0);\n trainConfig.put(fgv.t0, 0);\n trainConfig.put(fgv.t1, 1);\n trainConfig.put(fgv.t2, 1);\n FgExampleMemoryStore data = new FgExampleMemoryStore();\n data.add(new LabeledFgExample(fgv.fg, trainConfig, obsFe, fts));\n ofc.init(data);\n FgModel model = new FgModel(ofc.getNumParams());\n model = train(model, data);\n System.out.println(fts);\n System.out.println(DoubleArrays.toString(FgModelTest.getParams(model), \"String_Node_Str\"));\n JUnitUtils.assertArrayEquals(new double[] { -0.00, -0.00, -0.00, -0.00, 0.01, 0.01, 0.01, 0.01, -0.01, -0.01, -0.01, -0.01, -3.08, -3.08, -3.33, -3.33, 5.25, 5.25, 1.16, 1.16 }, FgModelTest.getParams(model), 1e-2);\n}\n"
|
"public void createEjbInstanceForInterceptors(Object[] params, EJBContextImpl ctx) throws Exception {\n Object instance;\n if (isJCDIEnabled()) {\n instance = ctx.getJCDIInjectionContext().createEjbAfterAroundConstruct();\n } else {\n instance = _constructEJBInstance();\n }\n ctx.setEJB(instance);\n}\n"
|
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (currentObject == null) {\n initializeRecord(atts);\n }\n if ((null != xPathNode.getXPathFragment() && xPathNode.getXPathFragment().nameIsText()) || xpathNodeIsMixedContent) {\n xpathNodeIsMixedContent = false;\n NodeValue xPathNodeUnmarshalNodeValue = xPathNode.getUnmarshalNodeValue();\n if (null != xPathNodeUnmarshalNodeValue) {\n xPathNodeUnmarshalNodeValue.endElement(xPathFragment, this);\n if (xPathNode.getParent() != null) {\n xPathNode = xPathNode.getParent();\n }\n }\n }\n if (null == rootElementName && null == rootElementLocalName && parentRecord == null) {\n rootElementLocalName = localName;\n rootElementName = qName;\n rootElementNamespaceUri = namespaceURI;\n schemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_LOCATION);\n noNamespaceSchemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.NO_NS_SCHEMA_LOCATION);\n }\n try {\n if (null != selfRecords) {\n for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {\n UnmarshalRecord selfRecord = selfRecords.get(x);\n if (selfRecord == null) {\n getFragmentBuilder().startElement(namespaceURI, localName, qName, atts);\n } else {\n selfRecord.startElement(namespaceURI, localName, qName, atts);\n }\n }\n }\n if (unmappedLevel != -1 && unmappedLevel <= levelIndex) {\n levelIndex++;\n return;\n }\n XPathNode node = getNonAttributeXPathNode(namespaceURI, localName, qName, atts);\n if (null == node && xPathNode.getTextNode() != null) {\n if (textWrapperFragment != null && localName.equals(textWrapperFragment.getLocalName())) {\n node = xPathNode.getTextNode();\n }\n }\n if (null == node) {\n NodeValue parentNodeValue = xPathNode.getUnmarshalNodeValue();\n if ((null == xPathNode.getXPathFragment()) && (parentNodeValue != null)) {\n XPathFragment parentFragment = new XPathFragment();\n parentFragment.setNamespaceAware(isNamespaceAware());\n if (namespaceURI != null && namespaceURI.length() == 0) {\n parentFragment.setLocalName(qName);\n parentFragment.setNamespaceURI(null);\n } else {\n parentFragment.setLocalName(localName);\n parentFragment.setNamespaceURI(namespaceURI);\n }\n if (parentNodeValue.startElement(parentFragment, this, atts)) {\n levelIndex++;\n } else {\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n } else {\n levelIndex++;\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n } else {\n xPathNode = node;\n unmarshalContext.startElement(this);\n levelIndex++;\n isXsiNil = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE) != null;\n NodeValue nodeValue = node.getUnmarshalNodeValue();\n if (null != nodeValue) {\n if (!nodeValue.startElement(xPathFragment, this, atts)) {\n startUnmappedElement(namespaceURI, localName, qName, atts);\n return;\n }\n }\n if (xPathNode.getAttributeChildren() != null || xPathNode.getAnyAttributeNodeValue() != null || selfRecords != null) {\n for (int i = 0, size = atts.getLength(); i < size; i++) {\n String attNamespace = atts.getURI(i);\n String attLocalName = atts.getLocalName(i);\n String value = atts.getValue(i);\n NodeValue attributeNodeValue = null;\n if ((attLocalName == null) || (attLocalName.length() == 0)) {\n String qname = atts.getQName(i);\n if (qname != null) {\n int qnameLength = qname.length();\n if (qnameLength > 0) {\n int idx = qname.indexOf(XMLConstants.COLON);\n if (idx > 0) {\n attLocalName = qname.substring(idx + 1, qnameLength);\n String attPrefix = qname.substring(0, idx);\n if (attPrefix.equals(XMLConstants.XMLNS)) {\n attNamespace = XMLConstants.XMLNS_URL;\n }\n } else {\n attLocalName = qname;\n if (attLocalName.equals(XMLConstants.XMLNS)) {\n attNamespace = XMLConstants.XMLNS_URL;\n }\n }\n }\n }\n }\n if (this.selfRecords != null) {\n for (int j = 0; j < selfRecords.size(); j++) {\n UnmarshalRecord nestedRecord = selfRecords.get(j);\n if (nestedRecord != null) {\n attributeNodeValue = nestedRecord.getAttributeChildNodeValue(attNamespace, attLocalName);\n if (attributeNodeValue != null) {\n attributeNodeValue.attribute(nestedRecord, attNamespace, attLocalName, value);\n }\n }\n }\n }\n if (attributeNodeValue == null) {\n attributeNodeValue = this.getAttributeChildNodeValue(attNamespace, attLocalName);\n try {\n if (attributeNodeValue != null) {\n attributeNodeValue.attribute(this, attNamespace, attLocalName, value);\n } else {\n if (xPathNode.getAnyAttributeNodeValue() != null) {\n xPathNode.getAnyAttributeNodeValue().attribute(this, attNamespace, attLocalName, value);\n }\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), documentLocator, e);\n xmlReader.getErrorHandler().warning(saxParseException);\n }\n }\n }\n }\n }\n }\n if (prefixesForFragment != null) {\n this.prefixesForFragment.clear();\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), documentLocator, e);\n xmlReader.getErrorHandler().error(saxParseException);\n }\n }\n}\n"
|
"public static Op surroundWithFilterIfNeccessary(Op op, RestrictionManagerImpl cnf) {\n Op result;\n if (cnf.isUnsatisfiable()) {\n result = new OpFilterIndexed(op, new RestrictionManagerImpl(new NestedNormalForm(new HashSet<Clause>(Collections.singleton(new Clause(new HashSet<Expr>(Collections.singleton(NodeValue.FALSE))))))));\n } else if (cnf.getCnf().isEmpty()) {\n result = op;\n } else {\n Op result = new OpFilterIndexed(op, cnf);\n return result;\n }\n}\n"
|
"public StepResult execute(final Design design, final StepContext context, final StepStatus status) {\n final StringBuilder log = new StringBuilder();\n final WorkflowContext fullContext = ((AbstractWorkflow) context.getWorkflow()).getWorkflowContext();\n final Map<DataFile, DataFile> filesToCopy = newHashMap();\n File repackagedJarFile = null;\n try {\n for (Sample sample : design.getSamples()) filesToCopy.putAll(findDataFilesInWorkflow(sample, context));\n removeNotExistingDataFile(filesToCopy);\n if (getDest().exists()) {\n throw new IOException(\"String_Node_Str\" + getDest());\n }\n if (!context.getRuntime().isHadoopMode()) {\n repackagedJarFile = HadoopJarRepackager.repack();\n final DataFile jarDataFile = new DataFile(repackagedJarFile.getAbsolutePath());\n filesToCopy.put(jarDataFile, getUploadedDataFile(jarDataFile));\n }\n final Settings settings = context.getRuntime().getSettings();\n reWriteDesign(context, filesToCopy);\n if (settings.isObfuscateDesign()) {\n DesignUtils.obfuscate(design, settings.isObfuscateDesignRemoveReplicateInfo());\n }\n final File newDesignFile = writeTempDesignFile(context, design);\n final DataFile uploadedDesignDataFile = getUploadedDataFile(new DataFile(context.getDesignPathname()));\n filesToCopy.put(new DataFile(newDesignFile.getAbsolutePath()), uploadedDesignDataFile);\n final DataFile currentParamDataFile = new DataFile(context.getWorkflowPathname());\n final DataFile uploadedParamDataFile = getUploadedDataFile(currentParamDataFile);\n filesToCopy.put(currentParamDataFile, uploadedParamDataFile);\n for (Map.Entry<DataFile, DataFile> e : filesToCopy.entrySet()) {\n log.append(\"String_Node_Str\");\n log.append(e.getKey());\n log.append(\"String_Node_Str\");\n log.append(e.getValue());\n log.append('\\n');\n }\n copy(filesToCopy);\n if (!newDesignFile.delete()) {\n LOGGER.warning(\"String_Node_Str\" + newDesignFile);\n }\n fullContext.setDesignPathname(uploadedDesignDataFile.getSource());\n fullContext.setWorkflowPathname(uploadedParamDataFile.getSource());\n } catch (IOException e) {\n return status.createStepResult(e);\n } catch (EoulsanIOException e) {\n return status.createStepResult(e);\n }\n if (!context.getRuntime().isHadoopMode()) {\n fullContext.setJarPathname(getDest().toString() + \"String_Node_Str\" + repackagedJarFile.getName());\n }\n status.setStepMessage(log.toString());\n return status.createStepResult();\n}\n"
|
"private HttpRequestLine parseURNGet(final String requestLine) throws IOException {\n URN urn = URN.createSHA1UrnFromHttpRequest(requestLine);\n FileDesc desc = RouterService.getFileManager().getFileDescForUrn(urn);\n if (desc == null) {\n return new HttpRequestLine(BAD_URN_QUERY_INDEX, \"String_Node_Str\", isHTTP11Request(requestLine));\n }\n int fileIndex = desc.getIndex();\n String fileName = desc.getName();\n return new HttpRequestLine(desc.getIndex(), desc.getName(), isHTTP11Request(requestLine));\n}\n"
|
"public ConditionalDistribution toConditionalDistribution(Map<Variable, Vector> expectedParameters) {\n List<Distribution> distributionList = new ArrayList();\n for (EF_Distribution dist : this.distributions) {\n EF_ConditionalLearningDistribution learningDistribution = (EF_ConditionalLearningDistribution) dist;\n ConditionalDistribution conditionalDistribution = learningDistribution.toConditionalDistribution(expectedParameters);\n if (conditionalDistribution instanceof BaseDistribution_MultinomialParents) {\n BaseDistribution_MultinomialParents base = (BaseDistribution_MultinomialParents) conditionalDistribution;\n distributionList.add(base.getBaseDistribution(0));\n } else {\n distributionList.add(conditionalDistribution);\n }\n }\n return new BaseDistribution_MultinomialParents(this.multinomialParents, distributionList);\n}\n"
|
"public synchronized ArrayList<JobInfo> getExpiredJobs() {\n ArrayList<JobInfo> expiredJobs = new ArrayList<JobInfo>();\n JobInfos jobInfos = getCompletedJobs();\n for (JobInfo job : jobInfos.getJobInfoList()) {\n long executedTime = job.commandExecutionDate;\n long currentTime = System.currentTimeMillis();\n long jobsRetentionPeriod = 86400000;\n managedJobConfig = domain.getExtensionByType(ManagedJobConfig.class);\n jobsRetentionPeriod = convert(managedJobConfig.getJobRetentionPeriod());\n if (currentTime - executedTime > jobsRetentionPeriod && job.state.equals(AdminCommandState.State.COMPLETED.name())) {\n expiredJobs.add(job);\n }\n }\n return expiredJobs;\n}\n"
|
"public void unlock(Freezable object, Location loc) {\n if (!object.mutability().equals(this)) {\n throw new AssertionError(\"String_Node_Str\");\n }\n if (!isMutable) {\n return;\n }\n if (!lockedItems.containsKey(object)) {\n throw new AssertionError(\"String_Node_Str\");\n }\n boolean changed = lockedItems.remove(hash, loc);\n if (!changed) {\n throw new AssertionError(Printer.format(\"String_Node_Str\" + \"String_Node_Str\", loc));\n }\n}\n"
|
"public void removeFriend(int userId) throws Exception {\n roster.unsubscribe(userId);\n QBRosterEntry rosterEntry = roster.getEntry(userId);\n if (rosterEntry != null && roster.contains(userId)) {\n roster.removeEntry(rosterEntry);\n } else {\n deleteUser(userId);\n }\n}\n"
|
"public void testNegate() throws TimeoutException {\n SAFA<CharPred, Character, SumOfProducts> a = atLeastOneAlpha.intersectionWith(atLeastOneNum, ba, boolexpr);\n SAFA<CharPred, Character, SumOfProducts> b = atLeastOneNum.intersectionWith(atLeastOneAlpha, ba, boolexpr);\n SAFA<CharPred, Character, SumOfProducts> notA = a.negate(ba, boolexpr);\n SAFA<CharPred, Character, SumOfProducts> notB = b.negate(ba, boolexpr);\n assertTrue(SAFA.isEmpty(a.intersectionWith(notA, ba, boolexpr), ba, boolexpr));\n assertTrue(SAFA.isEmpty(b.intersectionWith(notB, ba, boolexpr), ba, boolexpr));\n assertTrue(SAFA.isEquivalent(a, notA.negate(ba, boolexpr), ba, boolexpr));\n assertTrue(SAFA.isEquivalent(a, notB.negate(ba, boolexpr), ba, boolexpr));\n}\n"
|
"public static String getWorkingRootPackageName() {\n int i;\n StackTraceElement[] callStack = Thread.currentThread().getStackTrace();\n String rootClass = callStack[callStack.length - 1].getClassName();\n i = rootClass.indexOf('.');\n if (i == -1) {\n recursiveScan = false;\n return null;\n }\n return rootClass.substring(0, i);\n}\n"
|
"private Object manufactureParameterValue(Class<?> parameterType, Type genericType, List<Annotation> annotations, final Map<String, Type> typeArgsMap, final Type[] genericTypeArgsExtra, Map<Class<?>, Integer> pojos, Type... genericTypeArgs) throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {\n Object parameterValue = null;\n if (Collection.class.isAssignableFrom(parameterType)) {\n Collection<? super Object> defaultValue = null;\n Collection<? super Object> collection = resolveCollectionType(parameterType, defaultValue);\n if (collection != null) {\n Class<?> collectionElementType;\n AtomicReference<Type[]> collectionGenericTypeArgs = new AtomicReference<Type[]>(NO_TYPES);\n if (genericType instanceof ParameterizedType) {\n ParameterizedType pType = (ParameterizedType) genericType;\n Type actualTypeArgument = pType.getActualTypeArguments()[0];\n collectionElementType = resolveGenericParameter(actualTypeArgument, typeArgsMap, collectionGenericTypeArgs);\n } else {\n LOG.warn(\"String_Node_Str\" + \"String_Node_Str\", genericType);\n collectionElementType = Object.class;\n }\n Type[] genericTypeArgsAll = mergeTypeArrays(collectionGenericTypeArgs.get(), genericTypeArgs);\n fillCollection(pojos, annotations, collection, collectionElementType, genericTypeArgsAll);\n parameterValue = collection;\n }\n } else if (Map.class.isAssignableFrom(parameterType)) {\n Map<? super Object, ? super Object> defaultValue = null;\n Map<? super Object, ? super Object> map = resolveMapType(parameterType, defaultValue);\n if (map != null) {\n Class<?> keyClass;\n Class<?> elementClass;\n AtomicReference<Type[]> keyGenericTypeArgs = new AtomicReference<Type[]>(NO_TYPES);\n AtomicReference<Type[]> elementGenericTypeArgs = new AtomicReference<Type[]>(NO_TYPES);\n if (genericType instanceof ParameterizedType) {\n ParameterizedType pType = (ParameterizedType) genericType;\n Type[] actualTypeArguments = pType.getActualTypeArguments();\n keyClass = resolveGenericParameter(actualTypeArguments[0], typeArgsMap, keyGenericTypeArgs);\n elementClass = resolveGenericParameter(actualTypeArguments[1], typeArgsMap, elementGenericTypeArgs);\n } else {\n LOG.warn(\"String_Node_Str\" + \"String_Node_Str\", genericType);\n keyClass = Object.class;\n elementClass = Object.class;\n }\n Type[] genericTypeArgsAll = mergeTypeArrays(elementGenericTypeArgs.get(), genericTypeArgsExtra);\n MapArguments mapArguments = new MapArguments();\n mapArguments.setPojos(pojos);\n mapArguments.setAnnotations(annotations);\n mapArguments.setMapToBeFilled(map);\n mapArguments.setKeyClass(keyClass);\n mapArguments.setElementClass(elementClass);\n mapArguments.setKeyGenericTypeArgs(keyGenericTypeArgs.get());\n mapArguments.setElementGenericTypeArgs(genericTypeArgsAll);\n fillMap(mapArguments);\n parameterValue = map;\n }\n }\n if (parameterValue == null) {\n Map<String, Type> typeArgsMapForParam;\n if (genericType instanceof ParameterizedType) {\n typeArgsMapForParam = new HashMap<String, Type>(typeArgsMap);\n ParameterizedType parametrizedType = (ParameterizedType) genericType;\n TypeVariable<?>[] argumentTypes = parameterType.getTypeParameters();\n Type[] argumentGenericTypes = parametrizedType.getActualTypeArguments();\n for (int k = 0; k < argumentTypes.length; k++) {\n if (argumentGenericTypes[k] instanceof Class) {\n Class<?> genericParam = (Class<?>) argumentGenericTypes[k];\n typeArgsMapForParam.put(argumentTypes[k].getName(), genericParam);\n }\n }\n } else {\n typeArgsMapForParam = typeArgsMap;\n }\n parameterValue = manufactureParameterValue(pojos, parameterType, genericType, annotations, typeArgsMapForParam, genericTypeArgs);\n }\n return parameterValue;\n}\n"
|
"private void paintToken(Graphics2D g2) {\n if (getHexModel().getStations().size() > 1) {\n paintSplitStations(g2);\n return;\n }\n int numTokens = getHexModel().getTokens(0).size();\n ArrayList tokens = (ArrayList) getHexModel().getTokens(0);\n for (int i = 0; i < tokens.size(); i++) {\n PublicCompany co = (PublicCompany) tokens.get(i);\n Point origin = getTokenOrigin(numTokens, i, 1, 0);\n drawToken(g2, co, origin);\n }\n}\n"
|
"public void testGetRpcMethodMeta() {\n RpcClient rpcClient = new RpcClient();\n ProtobufRpcProxy<RpcServiceMetaService> pbrpcProxy = new ProtobufRpcProxy<RpcServiceMetaService>(rpcClient, RpcServiceMetaService.class);\n pbrpcProxy.setPort(PORT);\n RpcServiceMetaService proxy = pbrpcProxy.proxy();\n RpcServiceMetaList rpcServiceMetaInfo = proxy.getRpcServiceMetaInfo();\n Assert.assertEquals(5, rpcServiceMetaInfo.getRpcServiceMetas().size());\n List<RpcServiceMeta> rpcServiceMetas = rpcServiceMetaInfo.getRpcServiceMetas();\n for (RpcServiceMeta rpcServiceMeta : rpcServiceMetas) {\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + rpcServiceMeta.getServiceName());\n System.out.println(\"String_Node_Str\" + rpcServiceMeta.getMethodName());\n System.out.println(\"String_Node_Str\" + rpcServiceMeta.getInputObjName());\n System.out.println(\"String_Node_Str\" + rpcServiceMeta.getOutputObjName());\n System.out.println(\"String_Node_Str\" + rpcServiceMeta.getInputProto());\n System.out.println(\"String_Node_Str\" + rpcServiceMeta.getOutputProto());\n }\n System.out.println(\"String_Node_Str\");\n System.out.println(rpcServiceMetaInfo.getTypesIDL());\n System.out.println(rpcServiceMetaInfo.getRpcsIDL());\n}\n"
|
"private void setMaprTicketConfig(IMetadataConnection metadataConn, ClassLoader classLoader, boolean useKerberos) throws Exception {\n String mapRTicketUsername = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRDB_AUTHENTICATION_USERNAME);\n String mapRTicketPassword = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRDB_AUTHENTICATION_MAPRTICKET_PASSWORD);\n String mapRTicketCluster = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRDB_AUTHENTICATION_MAPRTICKET_CLUSTER);\n String mapRTicketDuration = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRDB_AUTHENTICATION_MAPRTICKET_DURATION);\n boolean setMapRHadoopLogin = Boolean.valueOf((String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRTICKET_SETMAPRHADOOPLOGIN));\n String mapRHadoopLogin = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRTICKET_MAPRHADOOPLOGIN);\n Long desiredTicketDurInSecs = 86400L;\n if (mapRTicketDuration != null && StringUtils.isNotBlank(mapRTicketDuration)) {\n if (mapRTicketDuration.endsWith(\"String_Node_Str\")) {\n mapRTicketDuration = mapRTicketDuration.substring(0, mapRTicketDuration.length() - 1);\n desiredTicketDurInSecs = Long.valueOf(mapRTicketDuration) + 'L';\n } else if (StringUtils.isNumeric(mapRTicketDuration)) {\n desiredTicketDurInSecs = Long.valueOf(mapRTicketDuration) + 'L';\n }\n }\n Object mapRClientConfig = ReflectionUtils.newInstance(\"String_Node_Str\", classLoader, new Object[] {});\n if (useKerberos) {\n System.setProperty(\"String_Node_Str\", setMapRHadoopLogin ? mapRHadoopLogin : \"String_Node_Str\");\n ReflectionUtils.invokeMethod(mapRClientConfig, \"String_Node_Str\", new Object[] { ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketCluster), desiredTicketDurInSecs });\n } else {\n if (setMapRHadoopLogin) {\n System.setProperty(\"String_Node_Str\", mapRHadoopLogin);\n } else {\n ReflectionUtils.invokeMethod(mapRClientConfig, \"String_Node_Str\", new Object[] { false }, boolean.class);\n }\n String version = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRDB_VERSION);\n Object[] argsObj = new Object[] { ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketCluster), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketUsername), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketPassword), desiredTicketDurInSecs };\n if (version != null && \"String_Node_Str\".compareTo(version) <= 0) {\n argsObj = new Object[] { ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketCluster), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketUsername), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketPassword), desiredTicketDurInSecs, \"String_Node_Str\" };\n }\n ReflectionUtils.invokeMethod(mapRClientConfig, \"String_Node_Str\", argsObj);\n }\n}\n"
|
"public void setParameters(Map parameters) {\n if (parameters == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n for (Iterator iter = parameters.entrySet().iterator(); iter.hasNext(); ) {\n Map.Entry entry = (Map.Entry) iter.next();\n if (!(entry.getKey() instanceof String)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (!(entry.getValue() instanceof String[])) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n this.parameters = StringUtils.copyParameters(parameters);\n}\n"
|
"public void reset(PlotConfiguration settings, boolean hard) {\n boolean xInverted = settings.getXAxisMaximumLocation() == XAxisMaximumLocationSetting.MAXIMUM_AT_LEFT;\n boolean yInverted = settings.getYAxisMaximumLocation() == YAxisMaximumLocationSetting.MAXIMUM_AT_BOTTOM;\n switch(settings.getAxisOrientationSetting()) {\n case X_AXIS_AS_TIME:\n xAxisPanel.setFrom(timeGroup, xInverted);\n yAxisPanel.setFrom(nonTimeGroup, yInverted);\n timeGroup.setTitle(\"String_Node_Str\");\n nonTimeGroup.setTitle(\"String_Node_Str\");\n break;\n case Y_AXIS_AS_TIME:\n yAxisPanel.setFrom(timeGroup, yInverted);\n xAxisPanel.setFrom(nonTimeGroup, xInverted);\n break;\n }\n super.reset(settings, hard);\n}\n"
|
"IOdaDataSourceDesign newOdaDataSource(OdaDataSourceHandle source) throws BirtException {\n OdaDataSourceDesign dteSource = new OdaDataSourceDesign(source.getQualifiedName());\n IBaseDataSourceEventHandler eventHandler = new DataSourceScriptExecutor(source, context);\n dteSource.setEventHandler(eventHandler);\n adaptBaseDataSource(source, dteSource);\n String driverName = source.getExtensionID();\n if (driverName == null || driverName.length() == 0) {\n throw new EngineException(\"String_Node_Str\" + source.getName());\n }\n dteSource.setExtensionID(driverName);\n Map staticProps = getExtensionProperties(source, source.getExtensionPropertyDefinitionList());\n if (staticProps != null && !staticProps.isEmpty()) {\n Iterator propNamesItr = staticProps.keySet().iterator();\n while (propNamesItr.hasNext()) {\n String propName = (String) propNamesItr.next();\n assert (propName != null);\n String propValue;\n String bindingExpr = source.getPropertyBinding(propName);\n if (needPropertyBinding() && bindingExpr != null && bindingExpr.length() > 0) {\n propValue = evaluatePropertyBindingExpr(bindingExpr);\n } else {\n propValue = (String) staticProps.get(propName);\n }\n if (this.context != null && (this.context.getDataEngine() instanceof DataGenerationEngine || this.context.getEngine() instanceof DteDataEngine)) {\n if (\"String_Node_Str\".equals(driverName) && (propName.equals(\"String_Node_Str\") || propName.equals(\"String_Node_Str\")) && propValue != null) {\n Object url = source.getModuleHandle().findResource((String) propValue, IResourceLocator.LIBRARY);\n propValue = url == null ? propValue : url.toString();\n }\n }\n dteSource.addPublicProperty(propName, propValue);\n }\n }\n Iterator elmtIter = source.privateDriverPropertiesIterator();\n if (elmtIter != null) {\n while (elmtIter.hasNext()) {\n ExtendedPropertyHandle modelProp = (ExtendedPropertyHandle) elmtIter.next();\n dteSource.addPrivateProperty(modelProp.getName(), modelProp.getValue());\n }\n }\n addPropertyConfigurationId(dteSource);\n return dteSource;\n}\n"
|
"public void viewWillDisappear(boolean animated) {\n super.viewWillDisappear(animated);\n this.currentPicker.setHidden(true);\n}\n"
|
"public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {\n UUID targetId = getTargetPointer().getFirst(game, source);\n if (targetId != null) {\n return targetId.equals(objectId) && source.getControllerId().equals(affectedControllerId) && Zone.GRAVEYARD.equals(game.getState().getZone(objectId));\n } else {\n discard();\n return false;\n }\n}\n"
|
"public static void unpackZip(File file, File destdir) throws IOException {\n byte[] dbuf = new byte[4096];\n ZipFile zf = new ZipFile(file);\n Enumeration entries = zf.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = (ZipEntry) entries.nextElement();\n String entrypath = entry.getName();\n File entryFile = new File(destdir, entrypath);\n File parentDir = entryFile.getParentFile();\n if (!parentDir.isDirectory()) {\n if (!parentDir.mkdirs()) {\n throw new MalformedURLException(UserMsg.CREATE_DIR_FAIL.toString(parentDir.toString()));\n }\n }\n URI child = NetUtil.getURI(entryFile);\n OutputStream dataOut = NetUtil.getOutputStream(child);\n InputStream dataIn = zf.getInputStream(entry);\n while (true) {\n int count = dataIn.read(dbuf);\n if (count == -1) {\n break;\n }\n dataOut.write(dbuf, 0, count);\n }\n dataOut.close();\n }\n}\n"
|
"private void updateChannelState(final HmDatapoint dp, Channel channel) throws IOException, BridgeHandlerNotAvailableException, ConverterException {\n if (dp.isTrigger()) {\n triggerChannel(channel.getUID(), ObjectUtils.toString(dp.getValue()));\n } else if (isLinked(channel)) {\n loadHomematicChannelValues(dp.getChannel());\n TypeConverter<?> converter = ConverterFactory.createConverter(channel.getAcceptedItemType());\n State state = converter.convertFromBinding(dp);\n if (state != null) {\n updateState(channel.getUID(), state);\n } else {\n logger.debug(\"String_Node_Str\", dp.getName());\n }\n }\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n try {\n if (pathToBrowser == null || \"String_Node_Str\".equals(pathToBrowser.trim())) {\n return;\n }\n int port = preferenceStore.getInt(WorkbenchPreferencePage.PREFERRED_SERVER_PORT);\n String serverUrl = format(Server.SERVER_CAPTURE_URL, port);\n String os = System.getProperty(\"String_Node_Str\");\n if (os.toLowerCase().contains(\"String_Node_Str\")) {\n String[] cmd = new String[] { \"String_Node_Str\", \"String_Node_Str\", pathToBrowser, serverUrl };\n Runtime.getRuntime().exec(cmd);\n } else {\n String[] cmd = new String[] { pathToBrowser, serverUrl };\n Runtime.getRuntime().exec(cmd);\n }\n } catch (IOException ioe) {\n }\n}\n"
|
"public void onValueChange(ValueChangeEvent<String> event) {\n boolean isValid = validator.test(event.getValue());\n confirmButton.setEnabled(isValid);\n if (isValid) {\n inputBox.addStyleName(\"String_Node_Str\");\n } else {\n inputBox.removeStyleName(\"String_Node_Str\");\n }\n}\n"
|
"public static boolean checkFilter(String what, String string) {\n if (what.equalsIgnoreCase(\"String_Node_Str\")) {\n logging.Debug(\"String_Node_Str\" + Config.filter_username);\n int lengtha = string.length();\n int lengthb = Config.filter_username.length();\n int i = 0;\n char thechar1, thechar2;\n while (i < lengtha) {\n thechar1 = string.charAt(i);\n int a = 0;\n while (a < lengthb) {\n thechar2 = Config.filter_username.charAt(a);\n if (thechar1 == thechar2 || thechar1 == '\\'' || thechar1 == '\\\"') {\n Util.logging.Info(string + \"String_Node_Str\" + thechar2);\n Config.has_badcharacters = true;\n return false;\n }\n a++;\n }\n i++;\n }\n Config.has_badcharacters = false;\n return true;\n } else if (what.equalsIgnoreCase(\"String_Node_Str\")) {\n logging.Debug(\"String_Node_Str\" + Config.filter_password);\n int lengtha = string.length();\n int lengthb = Config.filter_password.length();\n int i = 0;\n char thechar1, thechar2;\n while (i < lengtha) {\n thechar1 = string.charAt(i);\n int a = 0;\n while (a < lengthb) {\n thechar2 = Config.filter_password.charAt(a);\n if (thechar1 == thechar2 || thechar1 == '\\'' || thechar1 == '\\\"') {\n logging.Debug(\"String_Node_Str\" + thechar2);\n return false;\n }\n a++;\n }\n i++;\n }\n return true;\n }\n return true;\n}\n"
|
"public boolean onItemLongClick(AdapterView<?> parent, View view, int pos, long id) {\n positionrr = pos;\n AlertDialog.Builder builder = new AlertDialog.Builder(activity_context);\n builder.setCancelable(true).setPositiveButton(\"String_Node_Str\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String details = feed_list_adapter.get_info(position);\n String title = feed_list_adapter.getItem(position);\n details = details.substring(details.indexOf('\\n') + 1, details.indexOf(' '));\n (new File(storage + \"String_Node_Str\" + title + \"String_Node_Str\")).delete();\n (new File(storage + \"String_Node_Str\")).delete();\n (new File(storage + \"String_Node_Str\" + details + \"String_Node_Str\")).delete();\n (new File(storage + details + \"String_Node_Str\")).delete();\n File all_file = new File(storage + \"String_Node_Str\" + details + \"String_Node_Str\");\n List<String> feeds = read_file_to_list_static(\"String_Node_Str\" + details + \"String_Node_Str\", 0);\n all_file.delete();\n for (int i = 0; i < feeds.size(); i++) {\n if (!feeds.get(i).contains(title))\n append_string_to_file_static(\"String_Node_Str\" + details + \"String_Node_Str\", feeds.get(i) + \"String_Node_Str\");\n }\n if (!(new File(storage + \"String_Node_Str\" + details + \"String_Node_Str\")).exists()) {\n all_file = new File(storage + \"String_Node_Str\");\n feeds = read_file_to_list_static(\"String_Node_Str\", 0);\n all_file.delete();\n for (int i = 0; i < feeds.size(); i++) {\n if (!feeds.get(i).contains(details))\n append_string_to_file_static(\"String_Node_Str\", feeds.get(i) + \"String_Node_Str\");\n }\n }\n feed_list_adapter.remove_item(position);\n feed_list_adapter.notifyDataSetChanged();\n all_file = new File(storage + \"String_Node_Str\");\n feeds = read_file_to_list_static(\"String_Node_Str\", 0);\n all_file.delete();\n for (int i = 0; i < feeds.size(); i++) {\n if (!feeds.get(i).contains(title))\n append_string_to_file_static(\"String_Node_Str\", feeds.get(i) + \"String_Node_Str\");\n }\n feed_list_adapter.remove_item(position);\n feed_list_adapter.notifyDataSetChanged();\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n return true;\n}\n"
|
"private boolean theMoneyIsOK(double mostRecentReserve) {\n if (inNeed.containsKey(this.getId()))\n return false;\n double oneTurnAgoFoodReserve = getDataModel().getReservedFoodHistory().getValue(1);\n if (mostRecentReserve >= 100) {\n return true;\n } else if ((mostRecentReserve <= 100) && (oneTurnAgoFoodReserve - mostRecentReserve > 20)) {\n inNeed.put(this.getId(), 100 - mostRecentReserve);\n System.out.println(getDataModel().getName() + \"String_Node_Str\" + (100 - mostRecentReserve) + \"String_Node_Str\");\n return false;\n } else\n return false;\n}\n"
|
"public List<EmailWrapper> generateFeedbackSessionClosedEmails(FeedbackSessionAttributes session) {\n if (session.isPrivateSession()) {\n return new ArrayList<>();\n }\n CourseAttributes course = coursesLogic.getCourse(session.getCourseId());\n boolean isEmailNeededForStudents = false;\n try {\n isEmailNeededForStudents = fsLogic.isFeedbackSessionHasQuestionForStudents(session.getFeedbackSessionName(), session.getCourseId());\n } catch (EntityDoesNotExistException e) {\n log.severe(\"String_Node_Str\" + session.getCourseId() + \"String_Node_Str\" + \"String_Node_Str\" + session.getFeedbackSessionName() + \"String_Node_Str\");\n }\n List<InstructorAttributes> instructors = isEmailNeededForStudents ? instructorsLogic.getInstructorsForCourse(session.getCourseId()) : new ArrayList<>();\n List<StudentAttributes> students = isEmailNeededForStudents ? studentsLogic.getStudentsForCourse(session.getCourseId()) : new ArrayList<>();\n String template = EmailTemplates.USER_FEEDBACK_SESSION.replace(\"String_Node_Str\", FEEDBACK_STATUS_SESSION_CLOSED);\n String additionalContactInformation = getAdditionalContactInformationFragment(course);\n return generateFeedbackSessionEmailBases(course, session, students, instructors, template, EmailType.FEEDBACK_CLOSED.getSubject(), FEEDBACK_ACTION_VIEW, additionalContactInformation);\n}\n"
|
"public void onStart(IContext context) throws JFException {\n console = context.getConsole();\n engine = context.getEngine();\n history = context.getHistory();\n indicators = context.getIndicators();\n this.context = context;\n Set subscribedInstruments = new HashSet();\n subscribedInstruments.add(instrument);\n context.setSubscribedInstruments(subscribedInstruments);\n IChart chart = context.getChart(instrument);\n if (chart != null && engine.getType() == IEngine.Type.TEST) {\n chart.addIndicator(indicators.getIndicator(\"String_Node_Str\"), new Object[] { dcTimePeriod });\n }\n for (IOrder order : engine.getOrders(instrument)) {\n if (order.getLabel().substring(0, id.length()).equals(id)) {\n if (this.order != null) {\n console.getOut().println(this.order.getLabel() + \"String_Node_Str\");\n }\n this.order = order;\n counter = Integer.valueOf(order.getLabel().substring(5, 14));\n console.getNotif().println(order.getLabel() + \"String_Node_Str\");\n }\n }\n if (isActive(order))\n console.getInfo().println(order.getLabel() + \"String_Node_Str\");\n}\n"
|
"public void verifyExternalIdentifier(ExternalIdentifier externalId) throws Exception {\n checkNotNull(externalId);\n if (isBlank(externalId.getIdentifier())) {\n throw new InvalidEntityException(externalId, \"String_Node_Str\");\n }\n fphsDao.verifyExternalId(externalId);\n}\n"
|
"private void addStatusSupport(final DataBindingContext ctx) {\n aggregateStatus = new AggregateValidationStatus(ctx.getValidationStatusProviders(), AggregateValidationStatus.MAX_SEVERITY);\n aggregateStatus.addValueChangeListener(new IValueChangeListener() {\n public void handleValueChange(ValueChangeEvent event) {\n handleStateChange((IStatus) event.diff.getNewValue(), ctx);\n }\n });\n}\n"
|
"private int smem_reverse_hash_int(long hash_value) throws SQLException {\n db.hash_rev_int.setLong(1, hash_value);\n final ResultSet rs = db.hash_rev_int.executeQuery();\n try {\n if (!rs.next()) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n int toReturn = rs.getInt(0 + 1);\n rs.close();\n return toReturn;\n } finally {\n rs.close();\n }\n}\n"
|
"private boolean isFullScreenView() {\n StaplerRequest req = Stapler.getCurrentRequest();\n return req == null ? false : req.getParameter(\"String_Node_Str\") == null ? false : Boolean.parseBoolean(req.getParameter(\"String_Node_Str\"));\n}\n"
|
"public static void initialize() {\n mixpanel = MixpanelAPI.getInstance(WordPress.getContext(), Config.MIXPANEL_TOKEN);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(WordPress.getContext());\n int sessionCount = preferences.getInt(\"String_Node_Str\", 0);\n sessionCount++;\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(\"String_Node_Str\", sessionCount);\n editor.commit();\n boolean connected = WordPress.hasValidWPComCredentials(WordPress.getContext());\n int numBlogs = WordPress.wpDB.getShownAccounts().size();\n try {\n JSONObject properties = new JSONObject();\n properties.put(\"String_Node_Str\", \"String_Node_Str\");\n properties.put(\"String_Node_Str\", sessionCount);\n properties.put(\"String_Node_Str\", connected);\n properties.put(\"String_Node_Str\", numBlogs);\n mixpanel.registerSuperProperties(properties);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (connected) {\n String username = preferences.getString(WordPress.WPCOM_USERNAME_PREFERENCE, null);\n mixpanel.identify(username);\n mixpanel.getPeople().increment(\"String_Node_Str\", 1);\n try {\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"String_Node_Str\", username);\n jsonObj.put(\"String_Node_Str\", username);\n mixpanel.getPeople().set(jsonObj);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n}\n"
|
"public void writeToParcel(Parcel out, int flags) {\n out.writeString(bssid);\n out.writeString(venueName);\n if (networkAuthTypeList == null) {\n out.writeInt(0);\n } else {\n out.writeInt(networkAuthType.size());\n for (NetworkAuthType auth : networkAuthType) {\n out.writeInt(auth.type);\n out.writeString(auth.redirectUrl);\n }\n }\n if (roamingConsortium == null) {\n out.writeInt(0);\n } else {\n out.writeInt(roamingConsortium.size());\n for (String oi : roamingConsortium) out.writeString(oi);\n }\n if (ipAddrTypeAvailability == null) {\n out.writeInt(IpAddressType.NULL_VALUE);\n } else {\n out.writeInt(ipAddrTypeAvailability.availability);\n }\n if (naiRealm == null) {\n out.writeInt(0);\n } else {\n out.writeInt(naiRealm.size());\n for (NaiRealm realm : naiRealm) {\n out.writeInt(realm.encoding);\n out.writeString(realm.realm);\n }\n }\n if (cellularNetwork == null) {\n out.writeInt(0);\n } else {\n out.writeInt(cellularNetwork.size());\n for (CellularNetwork plmn : cellularNetwork) {\n out.writeString(plmn.mcc);\n out.writeString(plmn.mnc);\n }\n }\n if (domainName == null) {\n out.writeInt(0);\n } else {\n out.writeInt(domainName.size());\n for (String fqdn : domainName) out.writeString(fqdn);\n }\n out.writeString(operatorFriendlyName);\n if (wanMetrics == null) {\n out.writeInt(0);\n } else {\n out.writeInt(1);\n out.writeInt(wanMetrics.wanInfo);\n out.writeLong(wanMetrics.downlinkSpeed);\n out.writeLong(wanMetrics.uplinkSpeed);\n out.writeInt(wanMetrics.downlinkLoad);\n out.writeInt(wanMetrics.uplinkLoad);\n out.writeInt(wanMetrics.lmd);\n }\n if (connectionCapability == null) {\n out.writeInt(0);\n } else {\n out.writeInt(connectionCapability.size());\n for (IpProtoPort ip : connectionCapability) {\n out.writeInt(ip.proto);\n out.writeInt(ip.port);\n out.writeInt(ip.status);\n }\n }\n if (osuProviderList == null) {\n out.writeInt(0);\n } else {\n out.writeInt(osuProviderList.size());\n for (WifiPasspointOsuProvider osu : osuProviderList) osu.writeToParcel(out, flags);\n }\n}\n"
|
"protected boolean _yesNoCancelQuestion(String question) throws CancelException {\n Object[] message = new Object[1];\n message[0] = _messageComponent(StringUtilities.ellipsis(question, StringUtilities.ELLIPSIS_LENGTH_LONG));\n Object[] options = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n int selected = JOptionPane.showOptionDialog(getContext(), message, \"String_Node_Str\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]);\n if (selected == 0) {\n return true;\n } else if (selected == 2) {\n throw new ptolemy.util.CancelException();\n } else {\n return false;\n }\n}\n"
|
"private void skipStartedTag(XMLStreamReader reader) throws XMLStreamException {\n final String name = reader.getLocalName();\n int read = 1;\n while (read > 0 && reader.hasNext()) {\n reader.next();\n if (reader.hasName()) {\n read = !(reader.isEndElement() && name.equals(reader.getLocalName()));\n }\n }\n}\n"
|
"void clear() {\n lock.lock();\n try {\n list.clear();\n reverse.clear();\n } finally {\n lock.unlock();\n }\n}\n"
|
"protected void drawText() {\n drawString(StringHelper.localize(\"String_Node_Str\"), 5, GRAY);\n drawString(StringHelper.localize(\"String_Node_Str\") + \"String_Node_Str\" + StringHelper.getScaledNumber(planter.getRange()), infoScreenX, infoScreenW, infroScreenY3, (planter.hasUpgrade(UpgradeType.WITHER)) ? GREEN : WHITE);\n if (planter.isInvalidTool()) {\n drawString(getTextLine(1, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, ORANGE);\n drawString(getTextLine(2, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, ORANGE);\n } else if (planter.isLooked()) {\n boolean readyToPlant = false;\n if (planter.isFull()) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else if ((!planter.hasFuel()) && (!planter.isBurning())) {\n String fuelString = \"String_Node_Str\";\n if (planter.hasEngine())\n fuelString = \"String_Node_Str\";\n drawString(StringHelper.localize(fuelString), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else if ((planter.getStackInSlot(planter.SLOT_SEEDS) == null) && (!planter.isBurning())) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else if (planter.getStackInSlot(planter.SLOT_HOE) == null) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else {\n readyToPlant = true;\n String status = \"String_Node_Str\";\n if (planter.getStatus() == 1)\n status = \"String_Node_Str\";\n else if (planter.getStatus() == 2)\n status = \"String_Node_Str\";\n drawString(StringHelper.localize(status), infoScreenX, infoScreenW, infroScreenY2, BLUE);\n }\n if (!readyToPlant) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, RED);\n } else if (planter.isBurning()) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, BLUE);\n } else {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, GREEN);\n }\n } else {\n drawString(getTextLine(1, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, GREEN);\n drawString(getTextLine(2, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, GREEN);\n }\n}\n"
|
"private void maybeCollectMember(Node member, Node nodeWithJsDocInfo, Node value) {\n JSDocInfo info = nodeWithJsDocInfo.getJSDocInfo();\n if (info == null || !member.isGetProp() || !member.getFirstChild().isThis()) {\n return;\n }\n member.getFirstChild().setJSType(thisType);\n JSType thisObjectType = thisType.toObjectType();\n if (thisObjectType != null) {\n ImmutableList<TemplateType> keys = thisObjectType.getTemplateTypeMap().getTemplateKeys();\n typeRegistry.setTemplateTypeNames(keys);\n }\n JSType jsType = getDeclaredType(info, member, value);\n if (thisObjectType != null) {\n typeRegistry.clearTemplateTypeNames();\n }\n Node name = member.getLastChild();\n if (jsType != null) {\n thisTypeForProperties.defineDeclaredProperty(name.getString(), jsType, member);\n }\n}\n"
|
"public int startSearch(int key) {\n key = maskUnsetKey(key);\n searchPos = indexToPos(key & capacityMask);\n return searchHash = key;\n}\n"
|
"private void remapTargets(Map<InstructionHandle, InstructionHandle> instrMap, InstructionHandle next) {\n for (Map.Entry<InstructionHandle, InstructionHandle> e : instrMap.entrySet()) {\n InstructionHandle oldIh = e.getKey();\n InstructionHandle newIh = e.getValue();\n Instruction i = oldIh.getInstruction();\n Instruction c = newIh.getInstruction();\n if (i instanceof BranchInstruction) {\n BranchInstruction bi = (BranchInstruction) i;\n BranchInstruction bc = (BranchInstruction) c;\n InstructionHandle target = bi.getTarget();\n if (bi instanceof Select) {\n InstructionHandle[] targets = ((Select) bi).getTargets();\n for (int j = 0; j < targets.length; j++) {\n InstructionHandle newTarget = instrMap.get(targets[j]);\n ((Select) bc).setTarget(j, newTarget != null ? newTarget : next);\n }\n }\n InstructionHandle newTarget = instrMap.get(target);\n bc.setTarget(newTarget != null ? newTarget : next);\n }\n }\n}\n"
|
"public void readFromNBT(NBTTagCompound tag) {\n super.readFromNBT(tag);\n _inventories = new ItemStack[getSizeInventory()];\n if (tag.hasKey(\"String_Node_Str\")) {\n NBTTagList tagList = tag.getTagList(\"String_Node_Str\", 10);\n for (int i = 0; i < tagList.tagCount(); i++) {\n NBTTagCompound itemTag = (NBTTagCompound) tagList.getCompoundTagAt(i);\n int slot = itemTag.getByte(\"String_Node_Str\") & 0xff;\n if (slot >= 0 && slot <= _inventories.length) {\n ItemStack itemStack = new ItemStack((Block) null, 0, 0);\n itemStack.readFromNBT(itemTag);\n _inventories[slot] = itemStack;\n }\n }\n }\n if (tag.hasKey(\"String_Node_Str\")) {\n this.isInlet = tag.getBoolean(\"String_Node_Str\");\n }\n}\n"
|
"public Collection merge(Collection e1, Collection e2) {\n CollectionImpl m = new CollectionImpl();\n m.setDescription(nullSafeIdentical(e1.getDescription(), e2.getDescription(), \"String_Node_Str\"));\n m.setDisplayId(nullSafeIdentical(e1.getDisplayId(), e2.getDisplayId(), \"String_Node_Str\"));\n m.setName(nullSafeIdentical(e1.getName(), e2.getName(), \"String_Node_Str\"));\n m.setURI(nullSafeIdentical(e1.getURI(), e2.getURI(), \"String_Node_Str\"));\n java.util.Collection<DnaComponent> dc = nullSafeCollectionMerge(e1.getComponents(), e2.getComponents(), \"String_Node_Str\", new ArrayList<DnaComponent>(), getComponentMerger());\n for (DnaComponent c : dc) {\n m.addComponent(c);\n }\n return m;\n}\n"
|
"public ImmutableSet<CodeSignIdentity> get() {\n ProcessExecutorParams processExecutorParams = ProcessExecutorParams.builder().setCommand(ImmutableList.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")).build();\n Set<ProcessExecutor.Option> options = EnumSet.of(ProcessExecutor.Option.EXPECTING_STD_OUT);\n ProcessExecutor.Result result;\n try {\n result = processExecutor.launchAndExecute(processExecutorParams, options, Optional.<String>absent(), Optional.<Long>absent(), Optional.<Function<Process, Void>>absent());\n } catch (InterruptedException | IOException e) {\n LOG.warn(\"String_Node_Str\");\n return ImmutableSet.of();\n }\n if (result.getExitCode() != 0) {\n throw new RuntimeException(\"String_Node_Str\" + result.getStderr());\n }\n Matcher matcher = CODE_SIGN_IDENTITY_PATTERN.matcher(result.getStdout().get());\n ImmutableSet.Builder<CodeSignIdentity> builder = ImmutableSet.builder();\n while (matcher.find()) {\n String hash = matcher.group(1);\n String fullName = matcher.group(2);\n CodeSignIdentity identity = CodeSignIdentity.builder().setHash(hash).setFullName(fullName).build();\n builder.add(identity);\n LOG.debug(\"String_Node_Str\" + identity.toString());\n }\n ImmutableSet<CodeSignIdentity> allValidIdentities = builder.build();\n if (allValidIdentities.isEmpty()) {\n LOG.warn(\"String_Node_Str\");\n } else if (allValidIdentities.size() > 1) {\n LOG.info(\"String_Node_Str\" + \"String_Node_Str\");\n }\n return allValidIdentities;\n}\n"
|
"public static void tracePolygon(Batcher b, Polygon polygon, Vector2 position, Color color) {\n b.begin(Primitive.LINE_LOOP);\n {\n for (Vector2 vertex : polygon.getVertices()) {\n b.vertex(tempVec2.set(vertex).addSelf(polygon.getPosition()).addSelf(position));\n b.color(color);\n }\n }\n b.end();\n}\n"
|
"public List getConnection(String dbType, String url, String username, String pwd, String dataBase, String schemaBase, final String driverClassName, final String driverJarPath, String dbVersion, String additionalParams) {\n boolean isColsed = false;\n List conList = new ArrayList();\n try {\n if (conn != null) {\n isColsed = conn.isClosed();\n }\n } catch (Exception e) {\n log.error(e.toString());\n }\n List list = new ArrayList();\n DriverShim wapperDriver = null;\n if (isReconnect || conn == null || isColsed) {\n try {\n closeConnection(true);\n checkDBConnectionTimeout();\n list = connect(dbType, url, username, pwd, driverClassName, driverJarPath, dbVersion, additionalParams);\n if (list != null && list.size() > 0) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) instanceof Connection) {\n conn = (Connection) list.get(i);\n }\n if (list.get(i) instanceof DriverShim) {\n wapperDriver = (DriverShim) list.get(i);\n }\n }\n }\n if (schemaBase != null && !schemaBase.equals(\"String_Node_Str\")) {\n final boolean equals = EDatabaseTypeName.getTypeFromDbType(dbType).getProduct().equals(EDatabaseTypeName.ORACLEFORSID.getProduct());\n if (!ExtractMetaDataFromDataBase.checkSchemaConnection(schemaBase, conn, equals, dbType)) {\n schema = null;\n }\n } else {\n boolean teradata = EDatabaseTypeName.getTypeFromDbType(dbType).getProduct().equals(EDatabaseTypeName.TERADATA.getProduct());\n boolean as400 = EDatabaseTypeName.getTypeFromDbType(dbType).getProduct().equals(EDatabaseTypeName.AS400.getProduct());\n if (teradata) {\n schema = dataBase;\n } else if (as400) {\n schema = retrieveSchemaPatternForAS400(url);\n } else if (EDatabaseTypeName.SAS.getProduct().equals(EDatabaseTypeName.getTypeFromDbType(dbType).getProduct())) {\n schema = dataBase;\n } else {\n schema = null;\n }\n }\n conList.add(conn);\n if (wapperDriver != null) {\n conList.add(wapperDriver);\n }\n } catch (MissingDriverException e) {\n throw e;\n } catch (SQLException e) {\n log.error(e.toString());\n throw new RuntimeException(e);\n } catch (Exception e) {\n log.error(e.toString());\n throw new RuntimeException(e);\n }\n }\n return conList;\n}\n"
|
"public void mapCertificate_failed() throws Exception {\n mock.checking(new Expectations() {\n {\n one(wrappedUr).mapCertificate(certs);\n will(throwException(new com.ibm.ws.security.registry.CertificateMapFailedException(\"String_Node_Str\")));\n }\n });\n X509Certificate[] certs = new X509Certificate[] { CERT };\n wrapper.mapCertificate(certs);\n}\n"
|
"private String getReferencingListener() {\n if (networkConfig != null) {\n List<NetworkListener> list = networkConfig.getNetworkListeners().getNetworkListener();\n for (NetworkListener listener : list) {\n String virtualServer = listener.findHttpProtocol().getHttp().getDefaultVirtualServer();\n if (virtualServer != null && virtualServer.equals(vsid)) {\n return listener.getName();\n }\n }\n }\n return null;\n}\n"
|
"public static int masstp(Player player, String[] args) {\n if (!player.canUseCommand(\"String_Node_Str\"))\n return EXIT_FAIL;\n }\n if (vMinecraftSettings.getInstance().cmdMasstp())\n return EXIT_FAIL;\n for (Player p : etc.getServer().getPlayerList()) {\n if (!p.hasControlOver(player)) {\n p.teleportTo(player);\n }\n }\n player.sendMessage(Colors.Blue + \"String_Node_Str\");\n return EXIT_SUCCESS;\n}\n"
|
"public Revision execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {\n Revision revision = getRevisionByRoid(roid);\n if (revision == null) {\n throw new UserException(\"String_Node_Str\");\n }\n Project project = revision.getProject();\n User user = getUserByUoid(authorization.getUoid());\n if (authorization.hasRightsOnProjectOrSuperProjectsOrSubProjects(user, project)) {\n return revision;\n }\n throw new UserException(\"String_Node_Str\" + project.getName() + \"String_Node_Str\");\n}\n"
|
"public Matrix buildMatrix(Bitmap bitmap, boolean rotated) {\n float dx = bitmap.getWidth() / 2;\n float dy = bitmap.getHeight() / 2;\n if (mGeometry.hasSwitchedWidthHeight()) {\n float temp = dx;\n dx = dy;\n dy = temp;\n }\n float w = r.left * 2 + r.width();\n float h = r.top * 2 + r.height();\n Matrix m = mGeometry.buildGeometryMatrix(w, h, 1f, dx, dy, false);\n return m;\n}\n"
|
"public boolean clearPlot(final PlotWorld plotworld, final Plot plot, final boolean isDelete, final Runnable whenDone) {\n final String world = plotworld.worldname;\n final HybridPlotWorld dpw = ((HybridPlotWorld) plotworld);\n final Location pos1 = MainUtil.getPlotBottomLocAbs(world, plot.id).add(1, 0, 1);\n final Location pos2 = MainUtil.getPlotTopLocAbs(world, plot.id);\n setWallFilling(dpw, plot.id, new PlotBlock[] { dpw.WALL_FILLING });\n final int p1x = pos1.getX();\n final int p1z = pos1.getZ();\n final int p2x = pos2.getX();\n final int p2z = pos2.getZ();\n final int bcx = p1x >> 4;\n final int bcz = p1z >> 4;\n final int tcx = p2x >> 4;\n final int tcz = p2z >> 4;\n final boolean canRegen = plotworld.TYPE == 0 && plotworld.TERRAIN == 0;\n final PlotBlock[] plotfloor = dpw.TOP_BLOCK;\n final PlotBlock[] filling = dpw.MAIN_BLOCK;\n final PlotBlock[] bedrock = (dpw.PLOT_BEDROCK ? new PlotBlock[] { new PlotBlock((short) 7, (byte) 0) } : filling);\n final PlotBlock air = new PlotBlock((short) 0, (byte) 0);\n setWallFilling(dpw, plot.id, new PlotBlock[] { dpw.WALL_FILLING });\n ChunkManager.chunkTask(pos1, pos2, new RunnableVal<int[]>() {\n\n public void run() {\n long start = System.currentTimeMillis();\n while (chunks.size() > 0 && System.currentTimeMillis() - start < 20) {\n ChunkLoc chunk = chunks.remove(0);\n int x = chunk.x;\n int z = chunk.z;\n int xxb = x << 4;\n int zzb = z << 4;\n int xxt = xxb + 15;\n int zzt = zzb + 15;\n if (canRegen) {\n if (xxb >= p1x && xxt <= p2x && zzb >= p1z && zzt <= p2z) {\n BukkitUtil.regenerateChunk(world, x, z);\n continue;\n }\n }\n if (x == bcx) {\n xxb = p1x;\n }\n if (x == tcx) {\n xxt = p2x;\n }\n if (z == bcz) {\n zzb = p1z;\n }\n if (z == tcz) {\n zzt = p2z;\n }\n BukkitUtil.setBiome(plot.world, xxb, zzb, xxt, zzt, dpw.PLOT_BIOME);\n Location bot = new Location(world, xxb, 0, zzb);\n Location top = new Location(world, xxt + 1, 1, zzt + 1);\n MainUtil.setCuboidAsync(world, bot, top, bedrock);\n bot.setY(1);\n top.setY(dpw.PLOT_HEIGHT);\n MainUtil.setCuboidAsync(world, bot, top, filling);\n bot.setY(dpw.PLOT_HEIGHT);\n top.setY(dpw.PLOT_HEIGHT + 1);\n MainUtil.setCuboidAsync(world, bot, top, plotfloor);\n bot.setY(dpw.PLOT_HEIGHT + 1);\n top.setY(256);\n MainUtil.setSimpleCuboidAsync(world, bot, top, air);\n }\n if (chunks.size() != 0) {\n TaskManager.runTaskLater(this, 1);\n } else {\n pastePlotSchematic(dpw, pos1, pos2);\n final PlotBlock wall = isDelete ? dpw.WALL_BLOCK : dpw.CLAIMED_WALL_BLOCK;\n setWall(dpw, plot.id, new PlotBlock[] { wall });\n SetBlockQueue.addNotify(whenDone);\n }\n }\n });\n return true;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.