content
stringlengths
40
137k
"public void close() {\n if (!disposed) {\n disposed = true;\n LwjglSubRegion region = subregionStack.pop();\n while (!region.equals(this)) {\n logger.error(\"String_Node_Str\");\n region.close();\n region = subregionStack.pop();\n }\n if (croppingRegion) {\n glScissor(previousState.region.minX(), previousState.region.minY(), previousState.region.width(), previousState.region.height());\n }\n state = previousState;\n }\n}\n"
"protected Object execute(Object data) {\n if (data instanceof String) {\n try {\n Map<Object, Object> topLevelMap = new HashMap<Object, Object>();\n OMElement parentElement = AXIOMUtil.stringToOM(data.toString());\n topLevelMap.put(parentElement.getQName().toString(), getMapFromXML(parentElement));\n return topLevelMap;\n } catch (XMLStreamException e) {\n throw new ExecutionPlanRuntimeException(\"String_Node_Str\" + e.getMessage(), e);\n }\n } else {\n throw new ExecutionPlanRuntimeException(\"String_Node_Str\");\n }\n}\n"
"private int getLetterNumber(ContainerArea area) {\n int count = 0;\n Iterator iter = area.getChildren();\n while (iter.hasNext()) {\n AbstractArea child = (AbstractArea) iter.next();\n if (child instanceof TextArea) {\n String text = ((TextArea) child).getText();\n count = text.length();\n } else if (child instanceof ContainerArea) {\n count += getLetterNumber((ContainerArea) child);\n }\n }\n return count;\n}\n"
"protected void onDestroy() {\n if (isFinishing())\n destroyPresenter();\n super.onDestroy();\n}\n"
"protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception {\n rawBuffer.writeBytes(msg, 0, msg.readableBytes());\n Frame frame = null;\n do {\n frame = decode();\n if (frame != null) {\n resultCallback.onNext(frame);\n }\n } while (frame != null);\n}\n"
"protected org.eclipse.persistence.internal.helper.DatabaseType buildDatabaseTypeFromMetadataType(DatabaseType dType, String catalog) {\n if (dType instanceof ArgumentType) {\n dType = ((ArgumentType) dType).getDataType();\n }\n if (dType.isComposite()) {\n String typeName = dType.getTypeName();\n String compatibleType = dType.getTypeName();\n String javaTypeName = (dType.getTypeName()).toLowerCase();\n if (dType instanceof PLSQLType) {\n if (catalog != null) {\n typeName = (catalog + \"String_Node_Str\").concat(typeName);\n compatibleType = (catalog + \"String_Node_Str\").concat(compatibleType);\n javaTypeName = (catalog.toLowerCase() + \"String_Node_Str\").concat(javaTypeName);\n }\n if (dType instanceof PLSQLRecordType) {\n PLSQLrecord plsqlRec = new PLSQLrecord();\n plsqlRec.setTypeName(typeName);\n plsqlRec.setCompatibleType(compatibleType);\n plsqlRec.setJavaTypeName(javaTypeName);\n for (FieldType fld : ((PLSQLRecordType) dType).getFields()) {\n if (fld.getDataType() instanceof PrecisionType) {\n PrecisionType precisionType = (PrecisionType) fld.getDataType();\n plsqlRec.addField(fld.getFieldName(), buildDatabaseTypeFromMetadataType(precisionType), (int) precisionType.getPrecision(), (int) precisionType.getScale());\n } else if (fld.getDataType() instanceof SizedType) {\n SizedType sizedType = (SizedType) fld.getDataType();\n plsqlRec.addField(fld.getFieldName(), buildDatabaseTypeFromMetadataType(sizedType), (int) sizedType.getSize());\n } else {\n plsqlRec.addField(fld.getFieldName(), buildDatabaseTypeFromMetadataType(fld.getDataType(), catalog));\n }\n }\n return plsqlRec;\n }\n PLSQLCollection plsqlCollection = new PLSQLCollection();\n plsqlCollection.setTypeName(typeName);\n plsqlCollection.setCompatibleType(compatibleType);\n plsqlCollection.setJavaTypeName(javaTypeName + COLLECTION_WRAPPER_SUFFIX);\n plsqlCollection.setNestedType(buildDatabaseTypeFromMetadataType(((PLSQLCollectionType) dType).getNestedType(), catalog));\n return plsqlCollection;\n }\n if (dType instanceof VArrayType) {\n OracleArrayType varray = new OracleArrayType();\n varray.setTypeName(typeName);\n varray.setCompatibleType(compatibleType);\n varray.setJavaTypeName(getGeneratedWrapperClassName(javaTypeName, dbwsBuilder.getProjectName()));\n varray.setNestedType(buildDatabaseTypeFromMetadataType(((VArrayType) dType).getEnclosedType(), null));\n return varray;\n }\n if (dType instanceof ObjectType) {\n OracleObjectType objType = new OracleObjectType();\n objType.setTypeName(typeName);\n objType.setCompatibleType(compatibleType);\n objType.setJavaTypeName(javaTypeName);\n Map<String, org.eclipse.persistence.internal.helper.DatabaseType> fields = objType.getFields();\n ObjectType oType = (ObjectType) dType;\n for (FieldType field : oType.getFields()) {\n fields.put(field.getFieldName(), buildDatabaseTypeFromMetadataType(field.getDataType()));\n }\n return objType;\n }\n if (dType instanceof ObjectTableType) {\n OracleArrayType tableType = new OracleArrayType();\n tableType.setTypeName(typeName);\n tableType.setCompatibleType(compatibleType);\n tableType.setJavaTypeName(javaTypeName + COLLECTION_WRAPPER_SUFFIX);\n org.eclipse.persistence.internal.helper.DatabaseType nestedType = buildDatabaseTypeFromMetadataType(((ObjectTableType) dType).getEnclosedType(), null);\n Class wrapper = getWrapperClass(nestedType);\n if (wrapper != null) {\n ((ComplexDatabaseType) nestedType).setJavaType(wrapper);\n }\n tableType.setNestedType(nestedType);\n return tableType;\n }\n return null;\n } else if (dType instanceof ScalarDatabaseTypeEnum) {\n return OraclePLSQLTypes.getDatabaseTypeForCode(((ScalarDatabaseTypeEnum) dType).getTypeName());\n }\n return JDBCTypes.getDatabaseTypeForCode(org.eclipse.persistence.tools.dbws.Util.getJDBCTypeFromTypeName(dType.getTypeName()));\n}\n"
"private void fling(int velocityY) {\n if (getChildCount() > 0) {\n int scrollRange = getScrollRange();\n float topAmount = getCurrentOverScrollAmount(true);\n float bottomAmount = getCurrentOverScrollAmount(false);\n if (velocityY < 0 && topAmount > 0) {\n mOwnScrollY -= (int) topAmount;\n mDontReportNextOverScroll = true;\n setOverScrollAmount(0, true, false);\n mMaxOverScroll = Math.abs(velocityY) / 1000f * getRubberBandFactor(true) * mOverflingDistance + topAmount;\n } else if (velocityY > 0 && bottomAmount > 0) {\n mOwnScrollY += bottomAmount;\n setOverScrollAmount(0, false, false);\n mMaxOverScroll = Math.abs(velocityY) / 1000f * getRubberBandFactor(false) * mOverflingDistance + bottomAmount;\n } else {\n mMaxOverScroll = 0.0f;\n }\n int minScrollY = Math.max(0, scrollRange);\n if (mExpandedInThisMotion) {\n minScrollY = Math.min(minScrollY, mMaxScrollAfterExpand);\n }\n mScroller.fling(mScrollX, mOwnScrollY, 1, velocityY, 0, 0, 0, minScrollY, 0, mExpandedInThisMotion && mOwnScrollY >= 0 ? 0 : Integer.MAX_VALUE / 2);\n postInvalidateOnAnimation();\n }\n}\n"
"public void renameTo(AbstractFile destFile) throws IOException, UnsupportedFileOperationException {\n checkRenamePrerequisites(destFile, true, false);\n destFile = destFile.getTopAncestor();\n File destJavaIoFile = ((LocalFile) destFile).file;\n if (IS_WINDOWS) {\n if (!getRoot().equals(destFile.getRoot()))\n throw new IOException();\n if (OsVersions.WINDOWS_ME.isCurrentOrLower()) {\n if (destFile.exists())\n if (!destJavaIoFile.delete())\n throw new IOException();\n } else if (Kernel32.isAvailable()) {\n if (!Kernel32.getInstance().MoveFileEx(absPath, destFile.getAbsolutePath(), Kernel32API.MOVEFILE_REPLACE_EXISTING | Kernel32API.MOVEFILE_WRITE_THROUGH)) {\n String errorMessage = Integer.toString(Kernel32.getInstance().GetLastError());\n throw new IOException(\"String_Node_Str\" + errorMessage);\n } else {\n return;\n }\n }\n }\n if (!file.renameTo(destJavaIoFile))\n throw new IOException();\n}\n"
"public long getFilePointer() {\n try {\n return delegate.getFilePointer();\n } catch (IOException e) {\n logger.log(Level.FINE, e.getMessage(), e);\n return -1;\n }\n}\n"
"private static void formatVariableComponents(Set<VariableComponent> variableComponents, List<NamedProperty<QName>> properties) {\n for (VariableComponent variableComponent : variableComponents) {\n List<NamedProperty<QName>> list = new ArrayList<>();\n formatCommonIdentifiedData(list, variableComponent);\n list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariable, variableComponent.getVariable().getIdentity()));\n list.add(NamedProperty(Sbol2Terms.VariableComponent.hasOperator, OperatorType.convertToURI(variableComponent.getOperator())));\n for (URI variant : variableComponent.getVariantURIs()) {\n list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariants, variant));\n }\n for (URI variantCollection : variableComponent.getVariantCollectionURIs()) {\n list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariantCollections, variantCollection));\n }\n for (URI variantDerivation : variableComponent.getVariantDerivations()) {\n list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariantDerivations, variantDerivation));\n }\n properties.add(NamedProperty(Sbol2Terms.CombinatorialDerivation.hasVariableComponent, NestedDocument(Sbol2Terms.VariableComponent.VariableComponent, variableComponent.getIdentity(), NamedProperties(list))));\n }\n}\n"
"private void tryToEnsureIAmNotABrokenMachine(Pair<Master, Machine> master) {\n if (master.other().getMachineId() == machineId) {\n return;\n } else if (master.first() == null) {\n RuntimeException cause = new RuntimeException(\"String_Node_Str\");\n shutdown(cause, false);\n throw cause;\n }\n XaDataSource nioneoDataSource = getConfig().getTxModule().getXaDataSourceManager().getXaDataSource(Config.DEFAULT_DATA_SOURCE_NAME);\n long myLastCommittedTx = nioneoDataSource.getLastCommittedTxId();\n long highestCommonTxId = Math.min(myLastCommittedTx, master.other().getLastCommittedTxId());\n int masterForMyHighestCommonTxId = -1;\n try {\n masterForMyHighestCommonTxId = nioneoDataSource.getMasterForCommittedTx(highestCommonTxId);\n ;\n } catch (IOException e) {\n msgLog.logMessage(\"String_Node_Str\" + highestCommonTxId + \"String_Node_Str\", e);\n return;\n }\n int masterForMastersHighestCommonTxId = master.first().getMasterIdForCommittedTx(highestCommonTxId).response();\n if (masterForMyHighestCommonTxId == masterForMastersHighestCommonTxId) {\n msgLog.logMessage(\"String_Node_Str\" + highestCommonTxId + \"String_Node_Str\" + masterForMyHighestCommonTxId, true);\n return;\n } else {\n String msg = \"String_Node_Str\" + machineId + \"String_Node_Str\" + highestCommonTxId + \"String_Node_Str\" + masterForMyHighestCommonTxId + \"String_Node_Str\" + master.other().getMachineId() + \"String_Node_Str\" + masterForMastersHighestCommonTxId;\n msgLog.logMessage(msg, true);\n RuntimeException exception = new BranchedDataException(msg);\n shutdown(exception, false);\n throw exception;\n }\n}\n"
"private void doRatioCalculation(String dirPath, String[] parameters) throws ProcessException {\n String ratioCalc = \"String_Node_Str\" + dirPath + \"String_Node_Str\" + parameters[6];\n try {\n logString = logString + executeScript(parse(ratioCalc));\n ErrorLogger.log(\"String_Node_Str\", \"String_Node_Str\" + logString);\n } catch (InterruptedException e) {\n throw new ProcessException(\"String_Node_Str\" + dirPath);\n } catch (IOException e) {\n throw new ProcessException(\"String_Node_Str\" + dirPath);\n }\n}\n"
"public static final List<CommonTree> getBlockChildren(CommonTree ct) {\n return ScribParserUtil.toCommonTreeList(ct.getChildren());\n}\n"
"public void testFetchItemsForApplication() {\n DummyRestClient mockClient = new DummyRestClient(RestResult.success());\n ItemProvider provider = new ItemProvider(mockClient);\n ResultListener<Item.FilterResult> mockListener = Mockito.mock(ResultListener.class);\n provider.getAll(4L, mockListener, null, null);\n Mockito.verify(mockListener).onRequestPerformed(null);\n Mockito.verifyNoMoreInteractions(mockListener);\n Uri uri = mockClient.getMockUri();\n assertEquals(Uri.parse(\"String_Node_Str\"), uri);\n}\n"
"protected void createContents() {\n shlYetAnotherLogcat = new Shell();\n shlYetAnotherLogcat.addShellListener(new ShellAdapter() {\n public void shellClosed(ShellEvent e) {\n if (logcat.isActive()) {\n logcat.stop();\n try {\n logcat.dispose();\n } catch (Exception e1) {\n Log.write(e1.getMessage());\n }\n }\n Log.finish();\n }\n });\n shlYetAnotherLogcat.addControlListener(new ControlAdapter() {\n public void controlResized(ControlEvent e) {\n if (tbTabContainer != null) {\n tbTabContainer.setSize(shlYetAnotherLogcat.getSize().x - 40, shlYetAnotherLogcat.getSize().y - 80);\n }\n }\n });\n shlYetAnotherLogcat.setSize(450, 300);\n shlYetAnotherLogcat.setText(\"String_Node_Str\");\n Menu menu = new Menu(shlYetAnotherLogcat, SWT.BAR);\n shlYetAnotherLogcat.setMenuBar(menu);\n MenuItem mnMainMenu = new MenuItem(menu, SWT.CASCADE);\n mnMainMenu.setText(\"String_Node_Str\");\n Menu menu_1 = new Menu(mnMainMenu);\n mnMainMenu.setMenu(menu_1);\n MenuItem mnAddFilter = new MenuItem(menu_1, SWT.NONE);\n mnAddFilter.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n onmnNewFilterClick();\n }\n });\n mnAddFilter.setText(\"String_Node_Str\");\n MenuItem mnFilters = new MenuItem(menu_1, SWT.NONE);\n mnFilters.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n onmnFilterManagerClick();\n }\n });\n mnFilters.setText(\"String_Node_Str\");\n MenuItem mnSystemMenu = new MenuItem(menu, SWT.CASCADE);\n mnSystemMenu.setText(\"String_Node_Str\");\n Menu menu_2 = new Menu(mnSystemMenu);\n mnSystemMenu.setMenu(menu_2);\n mnStart = new MenuItem(menu_2, SWT.NONE);\n mnStart.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n onmnStartClick();\n }\n });\n mnStart.setText(\"String_Node_Str\");\n MenuItem mnSetAdb = new MenuItem(menu_2, SWT.NONE);\n mnSetAdb.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n onmnSetAdbClick();\n }\n });\n mnSetAdb.setText(\"String_Node_Str\");\n MenuItem mnAboutMenu = new MenuItem(menu, SWT.NONE);\n mnAboutMenu.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n MessageBox msg = new MessageBox(shlYetAnotherLogcat);\n msg.setText(\"String_Node_Str\");\n msg.setMessage(\"String_Node_Str\");\n msg.open();\n }\n });\n mnAboutMenu.setText(\"String_Node_Str\");\n tbTabContainer = new TabFolder(shlYetAnotherLogcat, SWT.NONE);\n tbTabContainer.addControlListener(new ControlAdapter() {\n public void controlResized(ControlEvent e) {\n onTabContainerResized();\n }\n });\n tbTabContainer.setBounds(10, 10, 403, 222);\n userFilters = new IterableArrayList<UserFilterObject>();\n setting = Setting.loadSetting();\n logcat = new LogcatManager();\n logcat.setAdb(setting.adbExecutableFile);\n userFilters = UserFilterObject.loadFilters(\"String_Node_Str\");\n TabContent allLog = new TabContent(tbTabContainer, \"String_Node_Str\");\n try {\n logcat.addSlot(\"String_Node_Str\", null, allLog);\n } catch (Exception e) {\n Log.write(e.getMessage());\n e.printStackTrace(Log.getPrintStreamInstance());\n }\n if (userFilters == null) {\n userFilters = new IterableArrayList<UserFilterObject>();\n } else {\n TabContent filterTabPage;\n for (UserFilterObject filter : userFilters) {\n filterTabPage = new TabContent(tbTabContainer, filter.getFilterName());\n try {\n logcat.addSlot(filter.getFilterName(), filter.getFilterList()).linkUi(filterTabPage);\n } catch (Exception e1) {\n Log.write(e1.getMessage());\n e1.printStackTrace(Log.getPrintStreamInstance());\n }\n }\n }\n}\n"
"private void measureHorizontal(int widthMeasureSpec, int heightMeasureSpec) {\n int wSize = MeasureSpec.getSize(widthMeasureSpec) - (getPaddingLeft() + getPaddingRight());\n if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED)\n wSize = Integer.MAX_VALUE;\n int count = getChildCount();\n int rowWidth = 0;\n int totalHeight = 0;\n int rowMaxHeight = 0;\n int childWidth;\n int maxRowHeight = getPaddingTop() + getPaddingBottom();\n for (int i = 0; i < count; i++) {\n final View child = getChildAt(i);\n if (child.getVisibility() != GONE) {\n measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);\n final LayoutParams lp = (LayoutParams) child.getLayoutParams();\n childWidth = child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin;\n childHeight = child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;\n rowMaxHeight = Math.max(rowMaxHeight, childHeight);\n if (childWidth + rowWidth > wSize) {\n totalHeight += rowMaxHeight;\n maxRowHeight = Math.max(maxRowHeight, rowWidth);\n rowWidth = childWidth;\n rowMaxHeight = 0;\n } else {\n rowWidth += childWidth;\n }\n }\n }\n if (rowWidth != 0) {\n maxRowHeight = Math.max(maxRowHeight, rowWidth);\n totalHeight += rowMaxHeight;\n }\n if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED)\n wSize = maxRowHeight - (getPaddingLeft() + getPaddingRight());\n setMeasuredDimension(resolveSize(wSize, widthMeasureSpec), resolveSize(totalHeight + getPaddingTop() + getPaddingBottom(), heightMeasureSpec));\n}\n"
"public void testTrailing5() throws IOException {\n int[] values = new int[] { 2011, 3, 9, 4, 39, 5, 22, 265 };\n String[] types = new String[] { TimeMember.TIME_LEVEL_TYPE_YEAR, TimeMember.TIME_LEVEL_TYPE_QUARTER, TimeMember.TIME_LEVEL_TYPE_MONTH, TimeMember.TIME_LEVEL_TYPE_WEEK_OF_MONTH, TimeMember.TIME_LEVEL_TYPE_WEEK_OF_YEAR, TimeMember.TIME_LEVEL_TYPE_DAY_OF_WEEK, TimeMember.TIME_LEVEL_TYPE_DAY_OF_MONTH, TimeMember.TIME_LEVEL_TYPE_DAY_OF_YEAR };\n TimeMember timeMember = new TimeMember(values, types);\n IPeriodsFunction periodsFunction = TimeFunctionFactory.createTrailingFunction(TimeMember.TIME_LEVEL_TYPE_DAY_OF_YEAR, 3);\n ReferenceDate referenceDate = new ReferenceDate(new Date(2011, 8, 22));\n ((AbstractMDX) periodsFunction).setReferenceDate(referenceDate);\n List<TimeMember> timeMembers = periodsFunction.getResult(timeMember);\n printMembers(timeMembers);\n checkOutputFile();\n}\n"
"private void flushToTmpIndex() throws IOException {\n if (_documents.isEmpty()) {\n return;\n }\n _usingLocalTmpindex = true;\n if (_localTmpWriter == null) {\n String localDirPath = System.getProperty(JAVA_IO_TMPDIR);\n _localTmpPath = new File(localDirPath, UUID.randomUUID().toString() + \"String_Node_Str\");\n HdfsDirectory directory = new HdfsDirectory(_configuration, new Path(_localTmpPath.toURI()));\n _localTmpDir = new ProgressableDirectory(directory, BlurOutputFormat.getProgressable());\n _localTmpWriter = new IndexWriter(_localTmpDir, _overFlowConf.clone());\n List<List<Field>> docs = new ArrayList<List<Field>>(_documents.values());\n docs.get(0).add(new StringField(BlurConstants.PRIME_DOC, BlurConstants.PRIME_DOC_VALUE, Store.NO));\n _localTmpWriter.addDocuments(docs);\n } else {\n _localTmpWriter.addDocuments(_documents.values());\n }\n _documents.clear();\n}\n"
"private void updateSchema() {\n Object updateObject = result.getUpdateObject();\n if (updateObject == null) {\n return;\n }\n if (updateObject instanceof Node) {\n Node node = (Node) updateObject;\n boolean builtIn = true;\n final IExternalNode externalNode = node.getExternalNode();\n if (result.getResultType() == EUpdateResult.UPDATE) {\n if (result.isChecked()) {\n if (result.getParameter() instanceof List) {\n if (PluginChecker.isEBCDICPluginLoaded()) {\n IEBCDICProviderService service = (IEBCDICProviderService) GlobalServiceRegister.getDefault().getService(IEBCDICProviderService.class);\n if (service != null) {\n if (service.isEbcdicNode(node)) {\n List<Object> parameter = (List<Object>) result.getParameter();\n if (parameter.size() >= 2) {\n IMetadataTable newTable = (IMetadataTable) parameter.get(0);\n String schemaName = (String) parameter.get(1);\n IMetadataTable metadataTable = MetadataToolHelper.getMetadataTableFromNodeLabel(node, schemaName);\n if (metadataTable != null) {\n MetadataToolHelper.copyTable(newTable, metadataTable);\n }\n syncSchemaForEBCDIC(node, metadataTable);\n }\n return;\n }\n }\n }\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMapperService.class)) {\n IDesignerMapperService service = (IDesignerMapperService) GlobalServiceRegister.getDefault().getService(IDesignerMapperService.class);\n if (service == null || externalNode == null || externalNode.getExternalData() == null) {\n return;\n }\n List<Object> parameter = (List<Object>) result.getParameter();\n if (parameter.size() == 2) {\n if (node.getComponent() != null && \"String_Node_Str\".equals(node.getComponent().getName())) {\n IMetadataTable newTable = (IMetadataTable) parameter.get(0);\n String schemaId = (String) parameter.get(1);\n service.updateMapperTableEntries(externalNode, schemaId, newTable);\n node.setMetadataList(externalNode.getMetadataList());\n syncSchemaForTMap(node);\n for (IExternalMapTable latestTable : externalNode.getExternalData().getOutputTables()) {\n for (IMetadataTable tableExsit : node.getMetadataList()) {\n if (latestTable.getName().equals(tableExsit.getTableName())) {\n List<IMetadataColumn> newColumns = newTable.getListColumns();\n for (IMetadataColumn column : tableExsit.getListColumns()) {\n for (IMetadataColumn newColumn : newColumns) {\n if (newColumn.getLabel().equals(column.getLabel())) {\n column.setTalendType(newColumn.getTalendType());\n column.setNullable(newColumn.isNullable());\n column.setComment(newColumn.getComment());\n column.setDefault(newColumn.getDefault());\n column.setLength(newColumn.getLength());\n column.setType(newColumn.getType());\n column.setKey(newColumn.isKey());\n column.setPrecision(newColumn.getPrecision());\n break;\n }\n }\n }\n break;\n }\n }\n }\n }\n }\n return;\n }\n } else if (result.getParameter() instanceof IMetadataTable) {\n IMetadataTable newTable = (IMetadataTable) result.getParameter();\n if (newTable != null) {\n for (INodeConnector nodeConnector : node.getListConnector()) {\n if (nodeConnector.getBaseSchema().equals(newTable.getAttachedConnector())) {\n List<IElementParameter> params = node.getElementParametersFromField(EParameterFieldType.SCHEMA_TYPE);\n if (params != null) {\n for (IElementParameter param : params) {\n ChangeMetadataCommand cmd = null;\n if (param.getChildParameters() != null && param.getChildParameters().get(\"String_Node_Str\") != null && result.getContextModeConnectionItem() != null) {\n final Object value = param.getChildParameters().get(\"String_Node_Str\").getValue();\n String idAndName = result.getContextModeConnectionItem().getProperty().getId() + UpdatesConstants.SEGMENT_LINE + newTable.getLabel();\n if (idAndName.equals(value)) {\n cmd = new ChangeMetadataCommand(node, param, null, newTable);\n }\n } else {\n cmd = new ChangeMetadataCommand(node, param, null, newTable);\n }\n if (cmd != null) {\n String propertyValue = (String) node.getPropertyValue(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n IRepositoryViewObject lastVersion = UpdateRepositoryUtils.getRepositoryObjectById(propertyValue);\n Connection repositoryConn = null;\n if (lastVersion != null) {\n final Item item = lastVersion.getProperty().getItem();\n if (item != null && item instanceof ConnectionItem) {\n repositoryConn = ((ConnectionItem) item).getConnection();\n }\n }\n cmd.setConnection(repositoryConn);\n cmd.setRepositoryMode(true);\n cmd.execute(true);\n }\n }\n } else {\n MetadataToolHelper.copyTable(newTable, node.getMetadataFromConnector(nodeConnector.getName()));\n }\n }\n }\n builtIn = false;\n }\n }\n }\n } else if (result.getResultType() == EUpdateResult.RENAME) {\n List<Object> parameter = (List<Object>) result.getParameter();\n if (parameter.size() >= 3) {\n IMetadataTable newTable = (IMetadataTable) parameter.get(0);\n String oldSourceId = (String) parameter.get(1);\n String newSourceId = (String) parameter.get(2);\n if (PluginChecker.isEBCDICPluginLoaded()) {\n IEBCDICProviderService service = (IEBCDICProviderService) GlobalServiceRegister.getDefault().getService(IEBCDICProviderService.class);\n if (service != null) {\n if (service.isEbcdicNode(node)) {\n String[] sourceIdAndChildName = UpdateManagerUtils.getSourceIdAndChildName(oldSourceId);\n final String oldSchemaName = sourceIdAndChildName[1];\n sourceIdAndChildName = UpdateManagerUtils.getSourceIdAndChildName(newSourceId);\n final String newSchemaName = sourceIdAndChildName[1];\n Map<String, Object> lineValue = (Map<String, Object>) parameter.get(3);\n if (lineValue != null) {\n IMetadataTable metadataTable = MetadataToolHelper.getMetadataTableFromNode(node, oldSchemaName);\n Object schemaName = lineValue.get(IEbcdicConstant.FIELD_SCHEMA);\n if (metadataTable != null && schemaName != null) {\n lineValue.put(IEbcdicConstant.FIELD_SCHEMA, newSchemaName);\n MetadataToolHelper.copyTable(newTable, metadataTable);\n syncSchemaForEBCDIC(node, metadataTable);\n metadataTable.setLabel(newSchemaName);\n }\n }\n return;\n }\n }\n }\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMapperService.class)) {\n IDesignerMapperService service = (IDesignerMapperService) GlobalServiceRegister.getDefault().getService(IDesignerMapperService.class);\n if (service == null || externalNode == null || externalNode.getExternalData() == null) {\n return;\n }\n IExternalData externalData = externalNode.getExternalData();\n parameter = (List<Object>) result.getParameter();\n if (parameter.size() == 3) {\n if (node.getComponent() != null && \"String_Node_Str\".equals(node.getComponent().getName())) {\n newTable = (IMetadataTable) parameter.get(0);\n String schemaId = (String) parameter.get(1);\n String newSchemaId = (String) parameter.get(2);\n service.renameMapperTable(externalNode, schemaId, newSchemaId, newTable);\n node.setMetadataList(externalNode.getMetadataList());\n syncSchemaForTMap(node);\n }\n }\n return;\n }\n String schemaParamName = UpdatesConstants.SCHEMA + UpdatesConstants.COLON + EParameterName.REPOSITORY_SCHEMA_TYPE.getName();\n IElementParameter repositoryParam = node.getElementParameter(schemaParamName);\n if (repositoryParam != null && oldSourceId.equals(repositoryParam.getValue())) {\n node.setPropertyValue(schemaParamName, newSourceId);\n if (newTable != null) {\n for (INodeConnector nodeConnector : node.getListConnector()) {\n if (nodeConnector.getBaseSchema().equals(newTable.getAttachedConnector())) {\n MetadataToolHelper.copyTable(newTable, node.getMetadataFromConnector(nodeConnector.getName()));\n }\n }\n }\n builtIn = false;\n }\n schemaParamName = UpdatesConstants.SCHEMA_TARGET + UpdatesConstants.COLON + EParameterName.REPOSITORY_SCHEMA_TYPE.getName();\n repositoryParam = node.getElementParameter(schemaParamName);\n if (repositoryParam != null && oldSourceId.equals(repositoryParam.getValue())) {\n node.setPropertyValue(schemaParamName, newSourceId);\n if (newTable != null) {\n for (INodeConnector nodeConnector : node.getListConnector()) {\n if (nodeConnector.getBaseSchema().equals(repositoryParam.getContext())) {\n MetadataToolHelper.copyTable(newTable, node.getMetadataFromConnector(nodeConnector.getName()));\n }\n }\n }\n builtIn = false;\n }\n }\n } else if (result.getResultType() == EUpdateResult.BUIL_IN) {\n if (UpdatesConstants.SCHEMA_TARGET.equals(result.getParameter())) {\n node.setPropertyValue(UpdatesConstants.SCHEMA_TARGET + \"String_Node_Str\" + EParameterName.SCHEMA_TYPE.getName(), EmfComponent.BUILTIN);\n } else {\n if (PluginChecker.isEBCDICPluginLoaded()) {\n IEBCDICProviderService service = (IEBCDICProviderService) GlobalServiceRegister.getDefault().getService(IEBCDICProviderService.class);\n if (service != null) {\n if (service.isEbcdicNode(node)) {\n Object parameter = result.getParameter();\n if (parameter instanceof Map) {\n Map<String, Object> lineValue = (Map<String, Object>) parameter;\n lineValue.remove(IEbcdicConstant.FIELD_SCHEMA + IEbcdicConstant.REF_TYPE);\n }\n node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(), EmfComponent.BUILTIN);\n return;\n }\n }\n }\n if (PluginChecker.isJobLetPluginLoaded()) {\n IJobletProviderService service = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n if (service != null && service.isJobletInOutComponent(node)) {\n node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName() + \"String_Node_Str\" + EParameterName.SCHEMA_TYPE.getName(), EmfComponent.BUILTIN);\n }\n }\n node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(), EmfComponent.BUILTIN);\n for (IElementParameter param : node.getElementParameters()) {\n SAPParametersUtils.setNoRepositoryParams(param);\n }\n }\n } else if (result.getResultType() == EUpdateResult.DELETE) {\n node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(), EmfComponent.BUILTIN);\n } else if (result.getResultType() == EUpdateResult.RELOAD) {\n List<Object> parameter = (List<Object>) result.getParameter();\n String connectionId = null;\n String tableLabel = null;\n IRepositoryViewObject toReload = null;\n IMetadataTable tableToReload = null;\n if (parameter instanceof List) {\n List listParameter = parameter;\n connectionId = (String) node.getPropertyValue(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n tableLabel = ((String) listParameter.get(0)).split(UpdatesConstants.SEGMENT_LINE)[0];\n }\n if (connectionId != null) {\n try {\n toReload = ProxyRepositoryFactory.getInstance().getLastVersion(connectionId);\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n }\n if (toReload != null) {\n Item item = toReload.getProperty().getItem();\n if (item != null && item instanceof DatabaseConnectionItem) {\n DatabaseConnectionItem dbItem = (DatabaseConnectionItem) item;\n Connection connection = dbItem.getConnection();\n if (connection instanceof DatabaseConnection) {\n DatabaseConnection dbConn = (DatabaseConnection) connection;\n Set<MetadataTable> tables = ProjectNodeHelper.getTablesFromSpecifiedDataPackage(dbConn);\n if (tables != null && !tables.isEmpty()) {\n Iterator it = tables.iterator();\n while (it.hasNext() && tableToReload == null) {\n MetadataTable table = (MetadataTable) it.next();\n String label = table.getLabel();\n if (tableLabel != null) {\n if (label != null && label.equals(tableLabel)) {\n tableToReload = ConvertionHelper.convert(table);\n break;\n }\n }\n }\n }\n Set<org.talend.core.model.metadata.builder.connection.MetadataTable> newTables = ConnectionHelper.getTables(connection);\n if (newTables != null && !newTables.isEmpty() && tableToReload == null) {\n Iterator it = newTables.iterator();\n while (it.hasNext() && tableToReload == null) {\n MetadataTable table = (MetadataTable) it.next();\n String label = table.getLabel();\n if (tableLabel != null) {\n if (label != null && label.equals(tableLabel)) {\n tableToReload = ConvertionHelper.convert(table);\n break;\n }\n }\n }\n }\n }\n }\n if (tableToReload != null) {\n int index = -1;\n List<IMetadataTable> tablesInNode = node.getMetadataList();\n for (IMetadataTable table : tablesInNode) {\n if (table.getLabel().equals(tableToReload.getLabel())) {\n index = tablesInNode.indexOf(table);\n break;\n }\n }\n if (index >= 0) {\n IMetadataTable oldTable = tablesInNode.get(index);\n tableToReload.setAttachedConnector(oldTable.getAttachedConnector());\n tableToReload.setDbms(oldTable.getDbms());\n tablesInNode.remove(index);\n tablesInNode.add(index, tableToReload);\n builtIn = false;\n }\n }\n }\n }\n if (builtIn) {\n node.setPropertyValue(EParameterName.SCHEMA_TYPE.getName(), EmfComponent.BUILTIN);\n }\n }\n}\n"
"private long convertToLong(String part) throws ParseException {\n Matcher m = pattern.matcher(String.valueOf(part));\n if (!m.matches())\n throw new IllegalArgumentException(String.format(Messages.CellEditor_NotANumber, part));\n String strBefore = m.group(1);\n Number before = strBefore.trim().length() > 0 ? full.parse(strBefore) : Long.valueOf(0);\n String strAfter = m.group(3);\n long after = 0;\n if (strAfter != null && strAfter.length() > 0) {\n after = Integer.parseInt(strAfter);\n int length = (int) Math.log10(factor);\n for (int ii = strAfter.length(); ii > length; ii--) after /= 10;\n for (int ii = strAfter.length(); ii < length; ii++) after *= 10;\n }\n long resultValue = before.longValue() * (int) factor + after;\n return resultValue;\n}\n"
"public ResourcesManager doUnify() throws TarException, ZipException, FileNotFoundException, IOException {\n final File originalFile = getOriginalFileResouce();\n Assert.isNotNull(originalFile);\n final String absolutePath = originalFile.getAbsolutePath();\n if (!originalFile.exists()) {\n throw new FileNotFoundException(absolutePath);\n }\n final File tmpWorkFolder = getTmpResWorkFolder();\n if (originalFile.isDirectory()) {\n try {\n FileCopyUtils.copyFolder(originalFile, tmpWorkFolder, interruptable);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n } else if (originalFile.isFile()) {\n this.isArchiveFile = true;\n ProviderManager archiveProviderManager = null;\n ILeveledImportStructureProvider importProvider = null;\n if (ArchiveFileManipulations.isTarFile(absolutePath)) {\n TarFile tarFile = new TarFile(originalFile);\n importProvider = new TarLeveledStructureProvider(tarFile);\n archiveProviderManager = ResourcesManagerFactory.getInstance().createResourcesManager(importProvider);\n } else if (ArchiveFileManipulations.isZipFile(absolutePath)) {\n ZipFile zipFile = new ZipFile(originalFile);\n importProvider = new ZipLeveledStructureProvider(zipFile);\n archiveProviderManager = ResourcesManagerFactory.getInstance().createResourcesManager(importProvider);\n }\n if (archiveProviderManager != null && importProvider != null) {\n if (!archiveProviderManager.collectPath2Object(importProvider.getRoot())) {\n throw new IOException(\"String_Node_Str\");\n }\n try {\n decompress(archiveProviderManager, tmpWorkFolder);\n } finally {\n if (archiveProviderManager != null) {\n archiveProviderManager.closeResource();\n }\n }\n }\n }\n collectPath2Object(tmpWorkFolder);\n return this;\n}\n"
"public Notification retrieveNotification(String notificationId) throws RequestNotValidException, GenericException, NotFoundException, AuthorizationDeniedException {\n StoragePath notificationPath = ModelUtils.getNotificationStoragePath(notificationId);\n Binary binary = storage.getBinary(notificationPath);\n Notification ret;\n InputStream inputStream = null;\n try {\n inputStream = binary.getContent().createInputStream();\n ret = JsonUtils.getObjectFromJson(inputStream, Notification.class);\n } catch (IOException | RequestNotValidException e) {\n throw new GenericException(\"String_Node_Str\", e);\n } finally {\n IOUtils.closeQuietly(inputStream);\n }\n return ret;\n}\n"
"protected CrawlDataItem parseLine(String line) {\n CrawlDataItem item;\n log.trace(\"String_Node_Str\" + line);\n try {\n item = super.parseLine(line);\n } catch (RuntimeException e) {\n log.debug(\"String_Node_Str\" + line + \"String_Node_Str\", e);\n return null;\n }\n if (item != null && item.getContentDigest() != null) {\n if (item.getContentDigest().toLowerCase().startsWith(SHA1_PREFIX)) {\n item.setContentDigest(item.getContentDigest().substring(SHA1_PREFIX.length()));\n }\n }\n if (item != null && item.getOrigin() == null) {\n CDXRecord foundRecord = null;\n while (lastRecord == null || lastRecord.getURL().compareTo(item.getURL()) <= 0) {\n if (lastRecord != null && lastRecord.getURL().equals(item.getURL())) {\n if (foundRecord == null || lastRecord.getDate().compareTo(foundRecord.getDate()) > 0) {\n foundRecord = lastRecord;\n log.trace(\"String_Node_Str\" + foundRecord.getArcfile() + \"String_Node_Str\" + foundRecord.getOffset() + \"String_Node_Str\");\n }\n }\n try {\n String record = reader.readLine();\n if (record == null) {\n break;\n }\n if (record.length() == 0) {\n continue;\n }\n try {\n lastRecord = new CDXRecord(record);\n } catch (ArgumentNotValid e) {\n log.debug(\"String_Node_Str\" + record + \"String_Node_Str\", e);\n continue;\n }\n log.trace(\"String_Node_Str\" + record + \"String_Node_Str\");\n } catch (IOException e) {\n throw new IOFailure(\"String_Node_Str\", e);\n }\n }\n if (foundRecord == null) {\n log.debug(\"String_Node_Str\" + item.getURL() + \"String_Node_Str\" + (lastRecord == null ? \"String_Node_Str\" : lastRecord.getURL()) + \"String_Node_Str\");\n return null;\n }\n String origin = foundRecord.getArcfile() + \"String_Node_Str\" + foundRecord.getOffset();\n item.setOrigin(origin);\n log.debug(\"String_Node_Str\" + item.getURL() + \"String_Node_Str\" + origin + \"String_Node_Str\");\n }\n return item;\n}\n"
"void parseResponse(JSONObject response) throws JSONException {\n FollowersModel model = new FollowersModel(123456, response);\n assertEquals(model.getTotalEmail(), 2931);\n assertEquals(model.getTotalWPCom(), 7926165);\n assertEquals(model.getTotal(), 2931);\n assertEquals(model.getPage(), 1);\n assertEquals(model.getPages(), 419);\n assertNotNull(model.getFollowers());\n assertEquals(model.getFollowers().size(), 7);\n FollowerModel first = model.getFollowers().get(0);\n assertEquals(first.getAvatar(), \"String_Node_Str\" + \"String_Node_Str\");\n assertEquals(first.getLabel(), \"String_Node_Str\");\n assertNull(first.getURL());\n assertNull(first.getFollowData());\n assertEquals(first.getDateSubscribed(), \"String_Node_Str\");\n FollowerModel last = model.getFollowers().get(6);\n assertEquals(last.getAvatar(), \"String_Node_Str\" + \"String_Node_Str\");\n assertEquals(last.getLabel(), \"String_Node_Str\");\n assertNull(last.getURL());\n assertNull(last.getFollowData());\n assertEquals(last.getDateSubscribed(), \"String_Node_Str\");\n}\n"
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n try {\n String requestUri = request.getRequestURL().toString();\n requestUri = requestUri.replace(request.getPathInfo(), \"String_Node_Str\");\n UnsubscribeData data = UnsubscribeParser.createFromURI(request);\n String page = createConfirmationPage(requestUri, data);\n response.setStatus(HttpServletResponse.SC_OK);\n response.setContentType(\"String_Node_Str\");\n response.setContentLength(page.length());\n response.getWriter().append(page);\n } catch (Exception ex) {\n handleError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, \"String_Node_Str\", ex);\n }\n}\n"
"private List<String> installLinux(String expandedInstallDir) {\n LOG.info(\"String_Node_Str\", getEntity().getConfig(RiakNode.SUGGESTED_VERSION));\n isPackageInstall = true;\n String installBin = Urls.mergePaths(expandedInstallDir, \"String_Node_Str\");\n String apt = chainGroup(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + sudo(\"String_Node_Str\"), sudo(\"String_Node_Str\"), sudo(\"String_Node_Str\"), sudo(\"String_Node_Str\" + getEntity().getConfig(RiakNode.SUGGESTED_VERSION) + \"String_Node_Str\"));\n String yum = chainGroup(\"String_Node_Str\", sudo(\"String_Node_Str\"), sudo(\"String_Node_Str\" + getEntity().getConfig(RiakNode.SUGGESTED_VERSION) + \"String_Node_Str\"));\n return ImmutableList.<String>builder().add(\"String_Node_Str\" + installBin).add(INSTALL_CURL).add(alternatives(apt, yum)).add(\"String_Node_Str\" + Urls.mergePaths(installBin, \"String_Node_Str\")).add(\"String_Node_Str\" + Urls.mergePaths(installBin, \"String_Node_Str\")).build();\n}\n"
"public DeregisterImageResponseType deregister(DeregisterImageType request) throws EucalyptusCloudException {\n DeregisterImageResponseType reply = request.getReply();\n Context ctx = Contexts.lookup();\n try {\n ImageInfo imgInfo = EntityWrapper.get(ImageInfo.class).lookupAndClose(Images.exampleWithImageId(request.getImageId()));\n if (Lookups.checkPrivilege(request, PolicySpec.EC2_RESOURCE_IMAGE, request.getImageId(), Accounts.lookupUserFullNameById(imgInfo.getOwnerUserId()))) {\n Images.deregisterImage(imgInfo.getDisplayName());\n } else {\n throw new EucalyptusCloudException(\"String_Node_Str\");\n }\n return reply;\n } catch (NoSuchImageException ex) {\n LOG.trace(ex);\n reply.set_return(false);\n return reply;\n } catch (NoSuchElementException ex) {\n LOG.trace(ex);\n reply.set_return(false);\n return reply;\n }\n}\n"
"private DeveloperProducts getDevProductMap(Consumer consumer, String sku) {\n List<String> devProductIds = new ArrayList<String>();\n devProductIds.add(sku);\n for (ConsumerInstalledProduct ip : consumer.getInstalledProducts()) {\n devProductIds.add(ip.getProductId());\n }\n Owner owner = consumer.getOwner();\n Map<String, ProductData> productMap = new HashMap<String, ProductData>();\n Map<String, ContentData> contentMap = new HashMap<String, ContentData>();\n log.debug(\"String_Node_Str\");\n for (ProductData product : this.productAdapter.getProductsByIds(owner, devProductIds)) {\n if (product == null) {\n continue;\n }\n if (sku.equals(product.getId()) && StringUtils.isEmpty(product.getAttributeValue(Product.Attributes.SUPPORT_LEVEL))) {\n product.setAttribute(Product.Attributes.SUPPORT_LEVEL, this.DEFAULT_DEV_SLA);\n }\n product.setLocked(true);\n ProductData existingProduct = productMap.get(product.getId());\n if (existingProduct != null && !existingProduct.equals(product)) {\n log.warn(\"String_Node_Str\" + \"String_Node_Str\", product.getId(), existingProduct, product);\n } else {\n productMap.put(product.getId(), product);\n Collection<ProductContentData> pcdCollection = product.getProductContent();\n if (pcdCollection != null) {\n for (ProductContentData pcd : pcdCollection) {\n if (pcd == null) {\n log.error(\"String_Node_Str\", product);\n throw new IllegalStateException(\"String_Node_Str\" + product);\n }\n ContentData content = pcd.getContent();\n if (content == null || content.getId() == null) {\n log.error(\"String_Node_Str\" + \"String_Node_Str\", product);\n throw new IllegalStateException(\"String_Node_Str\" + \"String_Node_Str\" + product);\n }\n ContentData existingContent = contentMap.get(content.getId());\n if (existingContent != null && !existingContent.equals(content)) {\n log.warn(\"String_Node_Str\" + \"String_Node_Str\", content.getId(), existingContent, content);\n } else {\n contentMap.put(content.getId(), content);\n }\n }\n }\n }\n }\n log.debug(\"String_Node_Str\", contentMap.size());\n for (ContentData cdata : contentMap.values()) {\n cdata.setLocked(true);\n }\n Map<String, Content> importedContent = this.contentManager.importContent(owner, contentMap, productMap.keySet()).getImportedEntities();\n log.debug(\"String_Node_Str\", productMap.size());\n Map<String, Product> importedProducts = this.productManager.importProducts(owner, productMap, importedContent);\n log.debug(\"String_Node_Str\", productMap.size(), sku);\n return new DeveloperProducts(sku, importedProducts);\n}\n"
"public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id) {\n case R.id.action_reset:\n if (!mwBoard.inMetaBootMode()) {\n mwBoard.getModule(Debug.class).resetAsync().continueWith(ignored -> {\n attemptReconnect(0);\n return null;\n });\n Snackbar.make(findViewById(R.id.drawer_layout), R.string.message_soft_reset, Snackbar.LENGTH_LONG).show();\n } else {\n Snackbar.make(findViewById(R.id.drawer_layout), R.string.message_no_soft_reset, Snackbar.LENGTH_LONG).show();\n }\n return true;\n case R.id.action_disconnect:\n mwBoard.getModule(Settings.class).editBleConnParams().maxConnectionInterval(125f).commit();\n mwBoard.disconnectAsync();\n finish();\n return true;\n case R.id.action_manual_dfu:\n if (checkLocationPermission()) {\n startContentSelectionIntent();\n }\n break;\n }\n return super.onOptionsItemSelected(item);\n}\n"
"public void testOneMemberWriteBehindWithEvictions() throws Exception {\n final String mapName = \"String_Node_Str\";\n final TestEventBasedMapStore testMapStore = new TestEventBasedMapStore();\n testMapStore.loadAllLatch = new CountDownLatch(1);\n final Config config = newConfig(testMapStore, 2);\n final TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(1);\n final HazelcastInstance node1 = nodeFactory.newHazelcastInstance(config);\n final IMap map = node1.getMap(mapName);\n assertTrue(\"String_Node_Str\", testMapStore.loadAllLatch.await(10, TimeUnit.SECONDS));\n final int populationCount = 100;\n testMapStore.storeLatch = new CountDownLatch(populationCount);\n for (int i = 0; i < populationCount; i++) {\n map.put(i, \"String_Node_Str\" + i);\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.LOAD, testMapStore.waitForEvent(30));\n }\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.STORE_ALL, testMapStore.waitForEvent(30));\n assertEquals(100, testMapStore.getStore().size());\n for (int i = 0; i < 100; i++) {\n map.evict(i);\n }\n assertEquals(null, testMapStore.waitForEvent(30));\n assertEquals(100, testMapStore.getStore().size());\n for (int i = 0; i < 100; i++) {\n map.put(i, \"String_Node_Str\" + i);\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.LOAD, testMapStore.waitForEvent(30));\n }\n for (int i = 0; i < 100; i++) {\n map.evict(i);\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.STORE, testMapStore.waitForEvent(30));\n }\n assertEquals(null, testMapStore.waitForEvent(2));\n assertEquals(100, testMapStore.getStore().size());\n assertEquals(0, map.size());\n for (int i = 0; i < 100; i++) {\n map.put(i, \"String_Node_Str\" + i);\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.LOAD, testMapStore.waitForEvent(30));\n }\n for (int i = 0; i < 100; i++) {\n map.remove(i);\n }\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.STORE_ALL, testMapStore.waitForEvent(30));\n assertEquals(TestEventBasedMapStore.STORE_EVENTS.DELETE_ALL, testMapStore.waitForEvent(30));\n assertEquals(0, testMapStore.getStore().size());\n assertEquals(0, map.size());\n assertEquals(null, testMapStore.waitForEvent(30));\n}\n"
"public void setCoupon(Coupon coupon) {\n if (coupon != null) {\n this.couponKeyString = coupon.getIdString();\n }\n}\n"
"final boolean checkFit(IDisplayServer xs, Label la, int iLabelLocation) throws GenerationException {\n if (iType == TEXT || bCategoryScale) {\n return true;\n }\n final double dAngleInDegrees = la.getCaption().getFont().getRotation();\n double x = 0, y = 0;\n int iPointToCheck = 0;\n if (iLabelLocation == ABOVE || iLabelLocation == BELOW) {\n iPointToCheck = (dAngleInDegrees < 0 && dAngleInDegrees > -90) ? 3 : 0;\n } else if (iLabelLocation == LEFT || iLabelLocation == RIGHT) {\n iPointToCheck = (dAngleInDegrees < 0 && dAngleInDegrees > -90) ? 2 : 3;\n }\n double[] da = daTickCoordinates;\n RotatedRectangle rrPrev = null, rr;\n if ((iType & (NUMERICAL | LINEAR)) == (NUMERICAL | LINEAR)) {\n double dAxisValue = asDouble(getMinimum()).doubleValue();\n final double dAxisStep = asDouble(getStep()).doubleValue();\n String sText;\n DecimalFormat df = null;\n if (fs == null) {\n df = new DecimalFormat(getNumericPattern());\n }\n final NumberDataElement nde = NumberDataElementImpl.create(0);\n for (int i = 0; i < da.length; i++) {\n nde.setValue(dAxisValue);\n try {\n sText = ValueFormatter.format(nde, fs, lcl, df);\n } catch (DataFormatException dfex) {\n DefaultLoggerImpl.instance().log(dfex);\n sText = NULL_STRING;\n }\n if (iLabelLocation == ABOVE || iLabelLocation == BELOW) {\n x = da[i];\n } else if (iLabelLocation == LEFT || iLabelLocation == RIGHT) {\n y = da[i];\n }\n la.getCaption().setValue(sText);\n try {\n rr = computePolygon(xs, iLabelLocation, la, x, y);\n } catch (UnexpectedInputException uiex) {\n throw new GenerationException(uiex);\n }\n Point p = rr.getPoint(iPointToCheck);\n if (rrPrev != null && (rrPrev.contains(p) || rrPrev.getPoint(iPointToCheck).equals(p))) {\n return false;\n }\n rrPrev = rr;\n dAxisValue += dAxisStep;\n }\n } else if ((iType & (NUMERICAL | LOGARITHMIC)) == (NUMERICAL | LOGARITHMIC)) {\n double dAxisValue = asDouble(getMinimum()).doubleValue();\n final double dAxisStep = asDouble(getStep()).doubleValue();\n String sText;\n DecimalFormat df;\n NumberDataElement nde = NumberDataElementImpl.create(0);\n for (int i = 0; i < da.length; i++) {\n nde.setValue(dAxisValue);\n try {\n sText = ValueFormatter.format(nde, fs, lcl, df);\n } catch (DataFormatException dfex) {\n DefaultLoggerImpl.instance().log(dfex);\n sText = NULL_STRING;\n }\n if (iLabelLocation == ABOVE || iLabelLocation == BELOW) {\n x = da[i];\n } else if (iLabelLocation == LEFT || iLabelLocation == RIGHT) {\n y = da[i];\n }\n la.getCaption().setValue(sText);\n try {\n rr = computePolygon(xs, iLabelLocation, la, x, y);\n } catch (UnexpectedInputException uiex) {\n throw new GenerationException(uiex);\n }\n Point p = rr.getPoint(iPointToCheck);\n if (rrPrev != null && (rrPrev.contains(p) || rrPrev.getPoint(iPointToCheck).equals(p))) {\n return false;\n }\n rrPrev = rr;\n dAxisValue *= dAxisStep;\n }\n } else if (iType == DATE_TIME) {\n CDateTime cdt, cdtAxisValue = asDateTime(oMinimum);\n final int iUnit = asInteger(oUnit);\n final int iStep = asInteger(oStep);\n final SimpleDateFormat sdf = new SimpleDateFormat(CDateTime.getPreferredFormat(iUnit));\n String sText;\n cdt = cdtAxisValue;\n for (int i = 0; i < da.length; i++) {\n sText = sdf.format(cdt.getTime());\n if (iLabelLocation == ABOVE || iLabelLocation == BELOW)\n x = da[i];\n else if (iLabelLocation == LEFT || iLabelLocation == RIGHT)\n y = da[i];\n la.getCaption().setValue(sText);\n try {\n rr = computePolygon(xs, iLabelLocation, la, x, y);\n } catch (UnexpectedInputException uiex) {\n throw new GenerationException(uiex);\n }\n Point p = rr.getPoint(iPointToCheck);\n if (rrPrev != null && (rrPrev.contains(p) || rrPrev.getPoint(iPointToCheck).equals(p))) {\n return false;\n }\n rrPrev = rr;\n cdt = cdtAxisValue.forward(iUnit, iStep * (i + 1));\n }\n }\n return true;\n}\n"
"public void testUnmarshalLevelElement() throws Exception {\n if (null == xmlInputFactory) {\n return;\n }\n InputStream instream = ClassLoader.getSystemResourceAsStream(\"String_Node_Str\");\n XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(instream);\n xmlStreamReader.next();\n XMLStreamReaderReader staxReader = new XMLStreamReaderReader();\n XMLContext xmlContext = new XMLContext(new AddressProject());\n XMLUnmarshaller xmlUnmarshaller = xmlContext.createUnmarshaller();\n staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());\n XMLStreamReaderInputSource inputSource = new XMLStreamReaderInputSource(xmlStreamReader);\n xmlUnmarshaller.unmarshal(staxReader, inputSource);\n if (xmlStreamReader.getEventType() != XMLStreamReader.END_DOCUMENT) {\n fail(\"String_Node_Str\");\n }\n instream.close();\n}\n"
"protected final DeploymentContext configureDeployment() {\n configureProperties();\n String joinedPackages = Joiner.on(',').join(getResourcePackages()) + \"String_Node_Str\";\n return ServletDeploymentContext.builder(OryxApplication.class).initParam(\"String_Node_Str\", OryxApplication.class.getName()).contextParam(OryxApplication.class.getName() + \"String_Node_Str\", joinedPackages).addListener(getInitListenerClass()).build();\n}\n"
"public void testFireAsynch() throws Exception {\n final IRemoteService service = registerAndGetRemoteService();\n System.out.println(\"String_Node_Str\");\n service.fireAsynch(createRemoteConcat(\"String_Node_Str\", \"String_Node_Str\"));\n System.out.println(\"String_Node_Str\");\n sleep(1500);\n}\n"
"public void testTranslateUrl() throws Exception {\n URLTranslator urlTranslator = new URLTranslator();\n urlTranslator.translate(ORIGINAL_URL);\n assertEquals(TRANSLATED_URL, urlTranslator.getTranslation(ORIGINAL_URL));\n}\n"
"private void flushTransactionalChanges() {\n if (VERBOSE_LOGGING) {\n Log.v(TAG, \"String_Node_Str\" + (inProfileMode() ? \"String_Node_Str\" : \"String_Node_Str\"));\n }\n final SQLiteDatabase db = mDbHelper.get().getWritableDatabase();\n for (long rawContactId : mTransactionContext.get().getInsertedRawContactIds()) {\n mDbHelper.get().updateRawContactDisplayName(db, rawContactId);\n mAggregator.get().onRawContactInsert(mTransactionContext.get(), db, rawContactId);\n }\n Set<Long> dirtyRawContacts = mTransactionContext.get().getDirtyRawContactIds();\n if (!dirtyRawContacts.isEmpty()) {\n mSb.setLength(0);\n mSb.append(UPDATE_RAW_CONTACT_SET_DIRTY_SQL);\n appendIds(mSb, dirtyRawContacts);\n mSb.append(\"String_Node_Str\");\n db.execSQL(mSb.toString());\n }\n Set<Long> updatedRawContacts = mTransactionContext.get().getUpdatedRawContactIds();\n if (!updatedRawContacts.isEmpty()) {\n mSb.setLength(0);\n mSb.append(UPDATE_RAW_CONTACT_SET_VERSION_SQL);\n appendIds(mSb, updatedRawContacts);\n mSb.append(\"String_Node_Str\");\n db.execSQL(mSb.toString());\n }\n final Set<Long> changedRawContacts = mTransactionContext.get().getChangedRawContactIds();\n ContactsTableUtil.updateContactLastUpdateByRawContactId(db, changedRawContacts);\n for (Map.Entry<Long, Object> entry : mTransactionContext.get().getUpdatedSyncStates()) {\n long id = entry.getKey();\n if (mDbHelper.get().getSyncState().update(db, id, entry.getValue()) <= 0) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n }\n mTransactionContext.get().clearExceptSearchIndexUpdates();\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_section);\n HSKBItem kbSectionItem = (HSKBItem) getIntent().getSerializableExtra(\"String_Node_Str\");\n if (savedInstanceState == null) {\n HSKBItem kbSectionItem = (HSKBItem) getIntent().getSerializableExtra(EXTRAS_SECTION_ITEM);\n SectionFragment sectionFragment = HSFragmentManager.getSectionFragment(this, kbSectionItem);\n HSFragmentManager.putFragmentInActivity(this, R.id.container, sectionFragment, \"String_Node_Str\");\n getHelpStackActionBar().setTitle(kbSectionItem.getSubject());\n }\n}\n"
"public static GxtEventsExecutor createExecutor(Component aComponent, JavaScriptObject aEventsThis) throws Exception {\n final GxtEventsExecutor executor = new GxtEventsExecutor(aComponent, aEventsThis);\n aComponent.setData(HANDLER_DATA_NAME, executor);\n if (aComponent instanceof HasSelectHandlers)\n ((HasSelectHandlers) aComponent).addSelectHandler(executor);\n if (aComponent instanceof PlatypusCheckBox) {\n final PlatypusCheckBox pcheck = (PlatypusCheckBox) aComponent;\n pcheck.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n public void onValueChange(ValueChangeEvent<Boolean> event) {\n PlatypusButtonGroup pgroup = pcheck.getButtonGroup();\n if (pgroup == null)\n executor.onSelect(new SurrogateSelectEvent(event.getSource()));\n }\n });\n }\n aComponent.addDomHandler(executor, MouseOverEvent.getType());\n aComponent.addDomHandler(executor, MouseOutEvent.getType());\n aComponent.addDomHandler(executor, MouseDownEvent.getType());\n aComponent.addDomHandler(executor, MouseUpEvent.getType());\n aComponent.addDomHandler(executor, MouseWheelEvent.getType());\n aComponent.addDomHandler(executor, MouseMoveEvent.getType());\n aComponent.addDomHandler(executor, ClickEvent.getType());\n aComponent.addDomHandler(executor, DoubleClickEvent.getType());\n if (aComponent instanceof HasKeyDownHandlers)\n ((HasKeyDownHandlers) aComponent).addKeyDownHandler(executor);\n if (aComponent instanceof HasKeyUpHandlers)\n ((HasKeyUpHandlers) aComponent).addKeyUpHandler(executor);\n if (aComponent instanceof HasKeyPressHandlers)\n ((HasKeyPressHandlers) aComponent).addKeyPressHandler(executor);\n if (aComponent instanceof HasFocusHandlers)\n ((HasFocusHandlers) aComponent).addFocusHandler(executor);\n if (aComponent instanceof HasBlurHandlers)\n ((HasBlurHandlers) aComponent).addBlurHandler(executor);\n if (aComponent instanceof HasShowHandlers)\n ((HasShowHandlers) aComponent).addShowHandler(executor);\n if (aComponent instanceof HasResizeHandlers)\n ((HasResizeHandlers) aComponent).addResizeHandler(executor);\n if (aComponent instanceof HasHideHandlers)\n ((HasHideHandlers) aComponent).addHideHandler(executor);\n if (aComponent instanceof HasRemoveHandlers)\n ((HasRemoveHandlers) aComponent).addRemoveHandler(executor);\n if (aComponent instanceof HasAddHandlers)\n ((HasAddHandlers) aComponent).addAddHandler(executor);\n if (aComponent instanceof HasMoveHandlers)\n ((HasMoveHandlers) aComponent).addMoveHandler(executor);\n if (aComponent instanceof HasSelectionHandlers<?>)\n ((HasSelectionHandlers<Widget>) aComponent).addSelectionHandler(executor);\n return executor;\n}\n"
"private void compressGraphLabels(DirectedGraph<Vertex<Map<Integer, StringBuilder>>, Edge<Map<Integer, StringBuilder>>> graph) {\n String label;\n for (Edge<Map<Integer, StringBuilder>> edge : graph.getEdges()) {\n for (int i : edge.getLabel().keySet()) {\n label = labelMap.get(edge.getLabel().get(i).toString());\n if (label == null) {\n label = Integer.toString(labelCounter);\n labelCounter++;\n labelMap.put(edge.getLabel().get(i).toString(), label);\n }\n edge.getLabel().put(i, new StringBuilder(label));\n }\n }\n for (Vertex<Map<Integer, StringBuilder>> vertex : graph.getVertices()) {\n for (int i : vertex.getLabel().keySet()) {\n label = labelMap.get(vertex.getLabel().get(i));\n if (label == null) {\n label = Integer.toString(labelCounter);\n labelCounter++;\n labelMap.put(vertex.getLabel().get(i).toString(), label);\n }\n vertex.getLabel().put(i, new StringBuilder(label));\n }\n }\n}\n"
"public SingleSelectionField<V> bind(ListProperty<V> itemsBinding, ObjectProperty<V> selectionBinding) {\n items.bindBidirectional(itemsBinding);\n selection.bindBidirectional(selectionBinding);\n return this;\n}\n"
"private boolean isAgentRunning(AgentInfo agentInfo) {\n if (agentInfo.getStatus() != null) {\n return agentInfo.getStatus().getState() == AgentLifeCycleState.RUNNING;\n } else {\n return false;\n }\n}\n"
"private String describeTypes(List<TypeRefComponent> types) throws Exception {\n if (types.isEmpty())\n return \"String_Node_Str\";\n StringBuilder b = new StringBuilder();\n if (types.size() == 1)\n describeType(b, types.get(0));\n else {\n boolean first = true;\n b.append(\"String_Node_Str\");\n for (TypeRefComponent t : types) {\n if (first)\n first = false;\n else\n b.append(\"String_Node_Str\");\n describeType(b, t);\n }\n }\n return b.toString();\n}\n"
"public void setup() throws IOException {\n map2 = newUdpSocketShmIntString(1, 1234);\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n}\n"
"public Set<Utilization> registerUtilization(long facilityId, List<Utilization> utilization, User currentUser) {\n authorize(currentUser, repository.getFacilityInfo(facilityId), FACILITY_UTILIZATION_UPDATE);\n initUtilizationDefaults(facilityId, utilization);\n validateUtilizations(facilityId, utilization);\n utilizationRepository.insertUtilizations(utilization);\n predictionService.signalUpdateNeeded(utilization);\n return findLatestUtilization(facilityId);\n}\n"
"public float getLongitude() {\n Object lng = entity.getProperty(LONGITUDE_KEY);\n if (lng instanceof Double) {\n lng = ((Double) lng).floatValue();\n }\n return (Float) lng;\n}\n"
"private double parseFinalEnergy(String lammpsOutput) {\n Double finalEnergy = Double.POSITIVE_INFINITY;\n int verbosity = GAParameters.getParams().getVerbosity();\n String[] lines = lammpsOutput.split(\"String_Node_Str\");\n int i;\n for (i = 0; i < lines.length; i++) {\n if (lines[i].matches(\"String_Node_Str\")) {\n String[] energies = lines[i + 2].trim().split(\"String_Node_Str\");\n try {\n finalEnergy = Double.parseDouble(energies[4]);\n } catch (NumberFormatException x) {\n System.out.println(\"String_Node_Str\");\n }\n }\n }\n return finalEnergy;\n}\n"
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n XMLField field = null;\n Object value = this.getCharacters();\n Class attributeClassification = null;\n boolean isSwaRef = false;\n if (isCollection) {\n isSwaRef = ((XMLBinaryDataCollectionMapping) mapping).isSwaRef();\n field = (XMLField) ((XMLBinaryDataCollectionMapping) mapping).getField();\n attributeClassification = ((XMLBinaryDataCollectionMapping) mapping).getAttributeElementClass();\n } else {\n isSwaRef = ((XMLBinaryDataMapping) mapping).isSwaRef();\n field = (XMLField) ((XMLBinaryDataMapping) mapping).getField();\n attributeClassification = ((XMLBinaryDataMapping) mapping).getAttributeClassification();\n }\n if (isSwaRef && (parent.getUnmarshaller().getAttachmentUnmarshaller() != null)) {\n if (attributeClassification != null && attributeClassification == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {\n value = parent.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsDataHandler(value.toString());\n } else {\n value = parent.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsByteArray(value.toString());\n }\n if (converter != null) {\n if (converter instanceof XMLConverter) {\n value = ((XMLConverter) converter).convertDataValueToObjectValue(value, parent.getSession(), parent.getUnmarshaller());\n } else {\n value = converter.convertDataValueToObjectValue(value, parent.getSession());\n }\n }\n } else {\n Object valueFromReader = this.parent.getXMLReader().getValue(getCharacters(), attributeClassification);\n if (null != valueFromReader) {\n value = valueFromReader;\n } else {\n String valueString = value.toString();\n if (valueString.length() == 0 && nullPolicy.isNullRepresentedByEmptyNode()) {\n value = null;\n } else {\n value = XMLConversionManager.getDefaultXMLManager().convertSchemaBase64ToByteArray(valueString);\n }\n }\n value = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(value, attributeClassification, parent.getSession());\n }\n if (converter != null) {\n if (converter instanceof XMLConverter) {\n value = ((XMLConverter) converter).convertDataValueToObjectValue(value, parent.getSession(), parent.getUnmarshaller());\n } else {\n value = converter.convertDataValueToObjectValue(value, parent.getSession());\n }\n }\n if (isCollection) {\n if (value != null) {\n parent.addAttributeValue((ContainerValue) nodeValue, value);\n }\n } else {\n parent.setAttributeValue(value, mapping);\n }\n if (!field.isSelfField()) {\n parent.getXMLReader().setContentHandler(parent);\n parent.endElement(namespaceURI, localName, qName);\n }\n resetStringBuffer();\n}\n"
"protected void createPopupWindow() {\n mPopupWindow = new CustomPopupWindow();\n mPopupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);\n mPopupWindow.setFocusable(true);\n mPopupWindow.setClippingEnabled(false);\n}\n"
"protected void checkInvoiceDate() throws AxelorException {\n if (Invoice.filter(\"String_Node_Str\", invoice.getInvoiceDate(), invoice.getOperationTypeSelect()).count() > 0) {\n throw new AxelorException(String.format(\"String_Node_Str\"), IException.CONFIGURATION_ERROR);\n }\n}\n"
"public void postBuild(Progress p, boolean buildPyramid) throws IOException, JobFailedException, JobCancelledException {\n if (buildPyramid) {\n MrsImagePyramid pyramid = MrsImagePyramid.open(_outputName, getProviderProperties());\n MrsImagePyramidMetadata metadata = pyramid.getMetadata();\n Aggregator aggregator;\n if (metadata.getClassification() == Classification.Continuous) {\n aggregator = new MeanAggregator();\n } else {\n aggregator = new ModeAggregator();\n }\n BuildPyramidDriver.build(_outputName, aggregator, createConfiguration(), getProviderProperties());\n }\n p.complete();\n}\n"
"public void run() {\n keepRunning = true;\n _smsLogger.logStart(operator, cid + \"String_Node_Str\", lac + \"String_Node_Str\", new Date());\n do {\n Iterator<String> itMsgs = listMsgs.iterator();\n int count = 0;\n while (keepRunning && itMsgs.hasNext()) {\n String nextMsg = itMsgs.next();\n sendSMS(_toPhoneNumber, nextMsg, _useDataPort, _addTrackingMetadata);\n Message msg = new Message();\n Bundle data = new Bundle();\n data.putString(\"String_Node_Str\", \"String_Node_Str\" + nextMsg + \"String_Node_Str\");\n count++;\n data.putInt(\"String_Node_Str\", count);\n msg.setData(data);\n handler.sendMessage(msg);\n try {\n Thread.sleep(_timeDelay);\n } catch (InterruptedException e) {\n Log.i(TAG, \"String_Node_Str\", e);\n }\n }\n } while (_doLoop);\n Message msg = new Message();\n Bundle data = new Bundle();\n data.putInt(\"String_Node_Str\", -1);\n msg.setData(data);\n handler.sendMessage(msg);\n}\n"
"public boolean handleOpenStackLiberty12WithUbuntu1404(TemplatePlanContext context, AbstractNodeTemplate nodeTemplate) {\n AbstractNodeTemplate ubuntuNodeTemplate = this.findUbuntuNode(nodeTemplate);\n Variable ubuntuAMIIdVar = null;\n if (ubuntuNodeTemplate == null) {\n LOG.error(\"String_Node_Str\");\n return false;\n }\n if (this.isUbuntuNodeTypeWithImplicitImage(ubuntuNodeTemplate.getType().getId())) {\n ubuntuAMIIdVar = context.createGlobalStringVariable(\"String_Node_Str\", this.createUbuntuImageStringFromNodeType(ubuntuNodeTemplate.getType().getId()));\n }\n LOG.debug(\"String_Node_Str\" + ubuntuNodeTemplate.getId() + \"String_Node_Str\" + ubuntuNodeTemplate.getType().getId().toString());\n Variable instanceIdPropWrapper = null;\n for (String instanceIdName : PluginUtils.getSupportedVirtualMachineInstanceIdPropertyNames()) {\n instanceIdPropWrapper = context.getPropertyVariable(ubuntuNodeTemplate, instanceIdName);\n if (instanceIdPropWrapper == null) {\n instanceIdPropWrapper = context.getPropertyVariable(instanceIdName, true);\n if (instanceIdPropWrapper == null) {\n instanceIdPropWrapper = context.getPropertyVariable(instanceIdName, false);\n }\n }\n }\n if (instanceIdPropWrapper == null) {\n Handler.LOG.warn(\"String_Node_Str\");\n return false;\n }\n Variable serverIpPropWrapper = null;\n for (String vmIpName : PluginUtils.getSupportedVirtualMachineIPPropertyNames()) {\n serverIpPropWrapper = context.getPropertyVariable(vmIpName);\n if (serverIpPropWrapper == null) {\n serverIpPropWrapper = context.getPropertyVariable(vmIpName, true);\n if (serverIpPropWrapper == null) {\n serverIpPropWrapper = context.getPropertyVariable(vmIpName, false);\n }\n }\n }\n if (serverIpPropWrapper == null) {\n Handler.LOG.warn(\"String_Node_Str\");\n return false;\n }\n Variable sshUserVariable = null;\n for (String userName : PluginUtils.getSupportedVirtualMachineLoginUserNamePropertyNames()) {\n sshUserVariable = context.getPropertyVariable(userName);\n if (sshUserVariable == null) {\n sshUserVariable = context.getPropertyVariable(userName, true);\n if (sshUserVariable == null) {\n sshUserVariable = context.getPropertyVariable(userName, false);\n }\n }\n }\n if (sshUserVariable == null) {\n return false;\n } else {\n if (Utils.isVariableValueEmpty(sshUserVariable, context)) {\n sshUserVariable = null;\n }\n }\n Variable sshKeyVariable = null;\n for (String passwordName : PluginUtils.getSupportedVirtualMachineLoginPasswordPropertyNames()) {\n sshKeyVariable = context.getPropertyVariable(passwordName);\n if (sshKeyVariable == null) {\n sshKeyVariable = context.getPropertyVariable(passwordName, true);\n if (sshKeyVariable == null) {\n sshKeyVariable = context.getPropertyVariable(passwordName, false);\n }\n }\n }\n if (sshKeyVariable == null) {\n return false;\n } else {\n if (Utils.isVariableValueEmpty(sshKeyVariable, context)) {\n sshKeyVariable = null;\n }\n }\n if (sshUserVariable == null) {\n LOG.debug(\"String_Node_Str\");\n context.addStringValueToPlanRequest(Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_VMLOGINNAME);\n }\n if (sshKeyVariable == null) {\n LOG.debug(\"String_Node_Str\");\n context.addStringValueToPlanRequest(Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_VMLOGINPASSWORD);\n }\n LOG.debug(\"String_Node_Str\");\n context.addStringValueToPlanRequest(\"String_Node_Str\");\n LOG.debug(\"String_Node_Str\");\n context.addStringValueToPlanRequest(\"String_Node_Str\");\n Map<String, Variable> createEC2InternalExternalPropsInput = new HashMap<String, Variable>();\n for (String externalParameter : Handler.createVMInstanceExternalInputParams) {\n Variable variable = context.getPropertyVariable(externalParameter);\n if (variable == null) {\n variable = context.getPropertyVariable(externalParameter, true);\n if (variable == null) {\n variable = context.getPropertyVariable(externalParameter, false);\n }\n }\n if (externalParameter.equals(\"String_Node_Str\") && ubuntuAMIIdVar != null) {\n createEC2InternalExternalPropsInput.put(externalParameter, ubuntuAMIIdVar);\n continue;\n }\n if (variable == null) {\n Handler.LOG.warn(\"String_Node_Str\" + externalParameter);\n return false;\n } else {\n Handler.LOG.debug(\"String_Node_Str\" + externalParameter);\n }\n if (Utils.isVariableValueEmpty(variable, context)) {\n Handler.LOG.debug(\"String_Node_Str\");\n createEC2InternalExternalPropsInput.put(externalParameter, null);\n } else {\n createEC2InternalExternalPropsInput.put(externalParameter, variable);\n }\n }\n Map<String, Variable> createEC2InternalExternalPropsOutput = new HashMap<String, Variable>();\n createEC2InternalExternalPropsOutput.put(Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_VMINSTANCEID, instanceIdPropWrapper);\n createEC2InternalExternalPropsOutput.put(Properties.OPENTOSCA_DECLARATIVE_PROPERTYNAME_VMIP, serverIpPropWrapper);\n context.addStringValueToPlanRequest(\"String_Node_Str\");\n this.invokerOpPlugin.handle(context, Interfaces.OPENTOSCA_DECLARATIVE_INTERFACE_CLOUDPROVIDER_CREATEVM, Interfaces.OPENTOSCA_DECLARATIVE_INTERFACE_CLOUDPROVIDER, \"String_Node_Str\", createEC2InternalExternalPropsInput, createEC2InternalExternalPropsOutput);\n Map<String, Variable> startRequestInputParams = new HashMap<String, Variable>();\n startRequestInputParams.put(\"String_Node_Str\", serverIpPropWrapper);\n startRequestInputParams.put(\"String_Node_Str\", sshUserVariable);\n startRequestInputParams.put(\"String_Node_Str\", sshKeyVariable);\n this.invokerOpPlugin.handle(context, ubuntuNodeTemplate.getId(), true, Interfaces.OPENTOSCA_DECLARATIVE_INTERFACE_OPERATINGSYSTEM_WAITFORAVAIL, Interfaces.OPENTOSCA_DECLARATIVE_INTERFACE_OPERATINGSYSTEM, \"String_Node_Str\", startRequestInputParams, new HashMap<String, Variable>(), false);\n return true;\n}\n"
"private void writeHierarchies(final ModelConfiguration config, final String prefix, final ZipOutputStream zip) throws IOException {\n if (config.getInput() != null) {\n if (config.getInput().getDefinition() != null) {\n for (final String a : config.getInput().getDefinition().getQuasiIdentifyingAttributes()) {\n final String[][] h = config.getInput().getDefinition().getHierarchy(a);\n if (h != null) {\n zip.putNextEntry(new ZipEntry(prefix + \"String_Node_Str\" + toFileName(a) + \"String_Node_Str\"));\n final CSVDataOutput out = new CSVDataOutput(zip, model.getSeparator());\n out.write(h);\n }\n }\n }\n }\n for (Entry<String, Hierarchy> entry : config.getHierarchies().entrySet()) {\n final String[][] h = entry.getValue().getHierarchy();\n String a = entry.getKey();\n if (!done.contains(a)) {\n if (h != null) {\n zip.putNextEntry(new ZipEntry(prefix + \"String_Node_Str\" + toFileName(a) + \"String_Node_Str\"));\n final CSVDataOutput out = new CSVDataOutput(zip, model.getSeparator());\n out.write(h);\n }\n }\n }\n}\n"
"public int hashCode() {\n return (consumerId == null) ? super.hashCode() : consumerId.hashCode();\n}\n"
"public void renderItem(ItemRenderType type, ItemStack item, Object... data) {\n String texture = ConstantValue.SYNTHESIS_MODEL;\n GL11.glPushMatrix();\n GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(texture));\n switch(type) {\n case EQUIPPED:\n GL11.glTranslatef(0.5F, 1.6F, 0.0F);\n GL11.glRotatef(180f, -1f, 0f, 1f);\n break;\n case EQUIPPED_FIRST_PERSON:\n GL11.glTranslatef(0.5F, 1.6F, 0.0F);\n GL11.glRotatef(180f, -1f, 0f, 1f);\n break;\n case INVENTORY:\n GL11.glTranslatef(0.0F, 1.0F, 0.0F);\n GL11.glRotatef(180f, 0f, 0f, 1f);\n break;\n case ENTITY:\n GL11.glTranslatef(0.0F, 0.7f, 0.0F);\n GL11.glRotatef(180f, 0f, 0f, 1f);\n GL11.glScalef(0.5f, 0.5f, 0.5f);\n break;\n }\n model.render(0.0625F);\n GL11.glPopMatrix();\n}\n"
"public void actionPerformed(ActionEvent e) {\n JMenuItem smileyItem = (JMenuItem) e.getSource();\n String buttonText = smileyItem.getToolTipText();\n for (Smiley smiley : imageList) {\n String smileyString = smiley.getSmileyStrings()[0];\n if (buttonText.equals(smileyString)) {\n chatWritePanel.appendText(smileyString);\n chatWritePanel.getEditorPane().requestFocus();\n }\n }\n}\n"
"public HE_Mesh apply(final HE_Selection selection) {\n if (selection.parent.getNumberOfVertices() <= goal) {\n return selection.parent;\n }\n _mesh = selection.parent;\n _mesh.triangulate();\n _mesh.resetVertexInternalLabels();\n if (_mesh.getNumberOfVertices() <= 4) {\n return _mesh;\n }\n buildHeap(selection);\n HE_Vertex v;\n Entry entry;\n List<HE_Vertex> vertices;\n while (_mesh.getNumberOfVertices() > goal && heap.size() > 0 && _mesh.getNumberOfVertices() > 4) {\n boolean valid = false;\n do {\n entry = heap.pop();\n v = entry.v;\n valid = selection.contains(v) && (entry.version == v.getInternalLabel());\n } while (heap.size() > 0 && !valid);\n if (valid) {\n vertices = v.getNeighborVertices();\n if (_mesh.collapseHalfedge(v.getHalfedge())) {\n vertexCost.remove(v.key());\n selection.remove(v);\n counter++;\n updateHeap(vertices, selection);\n }\n }\n }\n return _mesh;\n}\n"
"public void resetTable() {\n mTable = null;\n mSize = 0;\n mSequence = mParent.mSequence;\n}\n"
"public EventArgScoringAlignment<TypeRoleFillerRealis> score(ScoringData scoringData) {\n final ScoringData preprocessorResult = preprocessor.transform(scoringData);\n final Function<Response, TypeRoleFillerRealis> equivalenceClassFunction = TypeRoleFillerRealis.extractFromSystemResponse(preprocessorResult.answerKey().get().corefAnnotation().strictCASNormalizerFunction());\n final StandardScoringAligner<TypeRoleFillerRealis> scoringAligner = StandardScoringAligner.forEquivalenceClassFunction(equivalenceClassFunction);\n return scoringAligner.align(scoringData.answerKey().get(), scoringData.systemOutput().get());\n}\n"
"public boolean equals(final Object other) {\n if (other == this) {\n return true;\n }\n FontKey ors;\n try {\n ors = (FontKey) other;\n } catch (ClassCastException cce) {\n return false;\n }\n return (this.fontSize == ors.fontSize) && (this.fontFamily != null && this.fontFamily.equals(ors.fontFamily)) && (this.fontStyle != null && this.fontStyle.equals(ors.fontStyle)) && (this.fontWeight != null && this.fontWeight.equals(ors.fontWeight)) && (this.fontWeight != null && this.fontWeight.equals(ors.fontVariant)) && (this.superscript != null && this.superscript.intValue() == ors.superscript.intValue()) && Objects.equals(this.locales, ors.locales);\n}\n"
"public CameraFile waitForImage() {\n checkNotClosed();\n PointerByReference event = new PointerByReference();\n try {\n final PointerByReference event_data = new PointerByReference();\n CameraUtils.check(GPhoto2Native.INSTANCE.gp_camera_wait_for_event(camera, 0, event, event_data, CameraList.CONTEXT), \"String_Node_Str\");\n if (event.getPointer().getInt(0) == GP_EVENT_FILE_ADDED) {\n final CameraFilePath path = new CameraFilePath(event_data.getValue());\n path.read();\n final CameraFile.Path p = new CameraFile.Path(path);\n LOGGER.debug(\"String_Node_Str\");\n return p.newFile(camera);\n } else {\n return null;\n }\n } catch (CameraException ex) {\n LOGGER.error(\"String_Node_Str\");\n return null;\n }\n}\n"
"public Configuration getParentConfiguration() {\n return parentConfigurationSet ? (Configuration) getParent() : null;\n}\n"
"public String generateInitializeCode() throws IllegalActionException {\n StringBuffer code = new StringBuffer();\n code.append(super.generateInitializeCode());\n ptolemy.actor.CompositeActor container = (ptolemy.actor.CompositeActor) getComponent().getContainer();\n NamedProgramCodeGeneratorAdapter containerAdapter = (NamedProgramCodeGeneratorAdapter) getCodeGenerator().getAdapter(container);\n Iterator<?> actors = container.deepEntityList().iterator();\n while (actors.hasNext()) {\n NamedObj actor = (NamedObj) actors.next();\n ProgramCodeGeneratorAdapter actorAdapter = (ProgramCodeGeneratorAdapter) getCodeGenerator().getAdapter(actor);\n StringBuffer resetCode = new StringBuffer();\n Iterator<?> inputPorts = ((Actor) actorAdapter.getComponent()).inputPortList().iterator();\n while (inputPorts.hasNext()) {\n IOPort port = (IOPort) inputPorts.next();\n resetCode.append(_ports.initializeOffsets(port));\n }\n if (resetCode.length() > 0) {\n resetCode.append(_eol + getCodeGenerator().comment(1, actor.getName() + \"String_Node_Str\"));\n code.append(resetCode);\n }\n }\n String resetCode = _resetOutputPortsOffset();\n if (resetCode.length() > 0) {\n code.append(_eol + getCodeGenerator().comment(getComponent().getName() + \"String_Node_Str\"));\n code.append(resetCode);\n }\n Iterator<?> outputPorts = container.outputPortList().iterator();\n while (outputPorts.hasNext()) {\n IOPort outputPort = (IOPort) outputPorts.next();\n int rate = DFUtilities.getTokenInitProduction(outputPort);\n if (rate > 0) {\n for (int i = 0; i < outputPort.getWidthInside(); i++) {\n if (i < outputPort.getWidth()) {\n String name = outputPort.getName();\n if (outputPort.isMultiport()) {\n name = name + '#' + i;\n }\n for (int k = 0; k < rate; k++) {\n code.append(containerAdapter.getReference(name + \"String_Node_Str\" + k, true));\n code.append(\"String_Node_Str\");\n code.append(containerAdapter.getReference(\"String_Node_Str\" + name + \"String_Node_Str\" + k));\n code.append(\"String_Node_Str\" + _eol);\n }\n }\n }\n _updatePortOffset(outputPort, code, rate);\n }\n }\n return code.toString();\n}\n"
"public void _refresh_All() throws java.rmi.RemoteException {\n if (robContainer != null) {\n robContainer.refreshAll();\n }\n}\n"
"public boolean isShutDown() {\n return this.isShutDown;\n}\n"
"public void displayWater() {\n String recipeUnitsAbrv = Quantity.getVolAbrv(myRecipe.getVolUnits());\n String mashUnitsAbrv = Quantity.getVolAbrv(myRecipe.mash.getMashVolUnits());\n totalWaterLbl.setText(myRecipe.getTotalWater());\n totalUnitsLbl.setText(recipeUnitsAbrv);\n usedMashLbl.setText(myRecipe.mash.getTotalWaterStr());\n usedInMashUnitsLbl.setText(mashUnitsAbrv);\n absorbedLbl.setText(myRecipe.mash.getAbsorbedStr());\n absorbedUnitsLbl.setText(mashUnitsAbrv);\n spargeWithLbl.setText(myRecipe.getSparge());\n spargeUnitsLbl.setText(mashUnitsAbrv);\n collectTxt.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits())));\n collectUnitsLbl.setText(recipeUnitsAbrv);\n postBoilTxt.setValue(new Double(myRecipe.getPostBoilVol(myRecipe.getVolUnits())));\n postBoilUnitsLbl.setText(recipeUnitsAbrv);\n chillShrinkLbl.setText(myRecipe.getChillShrink());\n kettleTxt.setValue(new Double(myRecipe.getKettleLoss()));\n kettleUnitsLbl.setText(recipeUnitsAbrv);\n trubLossTxt.setValue(new Double(myRecipe.getTrubLoss()));\n trubLossUnitsLbl.setText(recipeUnitsAbrv);\n miscLossTxt.setValue(new Double(myRecipe.getMiscLoss()));\n miscLosUnitsLbl.setText(recipeUnitsAbrv);\n finalVolTxt.setValue(new Double(myRecipe.getFinalWortVol()));\n finalUnitsLbl.setText(recipeUnitsAbrv);\n}\n"
"public void updateROMDesignerState(DesignerState designerState, OdaDataSourceHandle sourceHandle) throws SemanticException {\n if (designerState == null || sourceHandle == null)\n return;\n DesignerStateAdapter.updateROMDesignerState(designerState, sourceHandle);\n}\n"
"public void moveTaskToBack(int taskId) {\n enforceCallingPermission(android.Manifest.permission.REORDER_TASKS, \"String_Node_Str\");\n synchronized (this) {\n TaskRecord tr = recentTaskForIdLocked(taskId);\n if (tr != null) {\n if (tr == mStackSupervisor.mLockTaskModeTask) {\n mStackSupervisor.showLockTaskToast();\n return;\n }\n if (DEBUG_STACK)\n Slog.d(TAG, \"String_Node_Str\" + tr);\n ActivityStack stack = tr.stack;\n if (stack.mResumedActivity != null && stack.mResumedActivity.task == tr) {\n if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(), Binder.getCallingUid(), -1, -1, \"String_Node_Str\")) {\n return;\n }\n }\n final long origId = Binder.clearCallingIdentity();\n try {\n stack.moveTaskToBackLocked(taskId, null);\n } finally {\n Binder.restoreCallingIdentity(origId);\n }\n }\n }\n}\n"
"private void assignMapReduceWorkingPath(TableDescriptor tableDescriptor) throws IOException {\n Map<String, String> tableProperties = tableDescriptor.getTableProperties();\n String mrIncWorkingPathStr = getProperty(tableProperties, BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH);\n if (mrIncWorkingPathStr == null) {\n mrIncWorkingPathStr = _configuration.get(BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH);\n if (mrIncWorkingPathStr == null) {\n LOG.info(\"String_Node_Str\", tableDescriptor.getName());\n return;\n }\n mrIncWorkingPathStr = new Path(mrIncWorkingPathStr, tableDescriptor.getName()).toString();\n tableDescriptor.putToTableProperties(BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH, mrIncWorkingPathStr);\n }\n Path mrIncWorkingPath = new Path(mrIncWorkingPathStr);\n FileSystem fileSystem = mrIncWorkingPath.getFileSystem(_config);\n Path newData = new Path(mrIncWorkingPath, NEW);\n Path tmpData = new Path(mrIncWorkingPath, TMP);\n Path inprogressData = new Path(mrIncWorkingPath, INPROGRESS);\n Path completeData = new Path(mrIncWorkingPath, COMPLETE);\n Path fileCache = new Path(mrIncWorkingPath, CACHE);\n String permission = getProperty(tableProperties, BlurConstants.BLUR_BULK_UPDATE_WORKING_PATH_PERMISSION);\n FsPermission fsPermission;\n if (permission == null || permission.isEmpty()) {\n fileSystem.mkdirs(mrIncWorkingPath);\n fileSystem.mkdirs(newData);\n fileSystem.mkdirs(tmpData);\n fileSystem.mkdirs(inprogressData);\n fileSystem.mkdirs(completeData);\n fileSystem.mkdirs(fileCache);\n } else {\n fsPermission = new FsPermission(permission);\n }\n fileSystem.mkdirs(mrIncWorkingPath, fsPermission);\n fileSystem.mkdirs(newData, fsPermission);\n fileSystem.mkdirs(tmpData, fsPermission);\n fileSystem.mkdirs(inprogressData, fsPermission);\n fileSystem.mkdirs(completeData, fsPermission);\n fileSystem.mkdirs(fileCache, fsPermission);\n}\n"
"public void onPermissionsGranted() {\n if (sketch != null) {\n sketch.onPermissionsGranted();\n}\n"
"private List<String> copyResources(String destination) throws IOException {\n final List<String> allCopiedPaths = newArrayList();\n for (final Resource resource : resources) {\n final File source = new File(resource.getDirectory());\n final List<String> includes = resource.getIncludes();\n final List<String> excludes = resource.getExcludes();\n final DirectoryScanner scanner = new DirectoryScanner();\n scanner.setBasedir(source);\n scanner.setIncludes(includes.isEmpty() ? null : includes.toArray(new String[includes.size()]));\n scanner.setExcludes(excludes.isEmpty() ? null : excludes.toArray(new String[excludes.size()]));\n scanner.scan();\n final String[] includedFiles = scanner.getIncludedFiles();\n if (includedFiles.length == 0) {\n getLog().info(\"String_Node_Str\");\n }\n final List<String> copiedPaths = newArrayList();\n boolean copyWholeDir = includes.isEmpty() && excludes.isEmpty() && resource.getTargetPath() != null;\n final String targetPath = resource.getTargetPath() == null ? \"String_Node_Str\" : resource.getTargetPath();\n if (copyWholeDir) {\n final Path destPath = Paths.get(destination, targetPath);\n getLog().info(String.format(\"String_Node_Str\", source, destPath));\n Files.createDirectories(destPath);\n FileUtils.copyDirectoryStructure(source, destPath.toFile());\n copiedPaths.add(separatorsToUnix(targetPath));\n } else {\n for (String included : includedFiles) {\n final Path sourcePath = Paths.get(resource.getDirectory()).resolve(included);\n final Path destPath = Paths.get(destination, targetPath).resolve(included);\n getLog().info(String.format(\"String_Node_Str\", sourcePath, destPath));\n Files.createDirectories(destPath.getParent());\n Files.copy(sourcePath, destPath, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\n copiedPaths.add(separatorsToUnix(Paths.get(targetPath).resolve(included).toString()));\n }\n }\n Collections.sort(copiedPaths);\n allCopiedPaths.addAll(copiedPaths);\n }\n return allCopiedPaths;\n}\n"
"public void startFlushTimer() {\n if (mFlushInterval <= 0 || mTimer != null) {\n return;\n }\n mTimer = new Timer();\n TimerTask task = new TimerTask() {\n Liquid instance = Liquid.getInstance();\n public void run() {\n instance.flush();\n }\n };\n mTimer.scheduleAtFixedRate(task, 0, mFlushInterval * 1000);\n LQLog.infoVerbose(\"String_Node_Str\");\n}\n"
"private int parseThreadNum() {\n int threads = 6;\n try {\n threads = Integer.parseInt(Environment.getProperty(Constants.SHIFU_CORRELATION_MULTI_THREADS, threads + \"String_Node_Str\"));\n } catch (Exception e) {\n log.warn(\"String_Node_Str\", threads);\n }\n if (threads <= 0) {\n threads = 4;\n }\n return threads;\n}\n"
"public HeaderParamDeclList<RoleKind> reconstruct(List<? extends HeaderParamDecl<RoleKind>> decls) {\n ScribDel del = del();\n RoleDeclList rdl = AstFactoryImpl.FACTORY.RoleDeclList(castRoleDecls(decls));\n rdl = (RoleDeclList) rdl.del(del);\n return rdl;\n}\n"
"public Str append(String s) {\n if (\"String_Node_Str\".equals(s)) {\n return this;\n }\n if (EMPTY_STR.equals(this)) {\n return of(s);\n }\n return of(this.s.concat(s));\n}\n"
"public Data read() {\n synchronized (queue) {\n if (queue.size() == 0) {\n return null;\n } else {\n Object data = queue.remove(0);\n if (data == null) {\n return null;\n } else {\n return (Data) data;\n }\n }\n }\n}\n"
"void addParameterArgs(List list) {\n Iterator iterator = paramValues.keySet().iterator();\n while (iterator.hasNext()) {\n String key = (String) iterator.next();\n Object obj = paramValues.get(key);\n if (obj instanceof Object[]) {\n Object[] temp = (Object[]) obj;\n for (int i = 0; i < temp.length; i++) {\n String value = String.valueOf(temp[i]);\n StringBuffer buff = new StringBuffer();\n buff.append(\"String_Node_Str\");\n buff.append(ATTR_MULPARAMRTER);\n buff.append(i);\n buff.append(key);\n buff.append(\"String_Node_Str\");\n buff.append(value);\n list.add(buff.toString());\n }\n } else {\n String value = String.valueOf(paramValues.get(key));\n StringBuffer buff = new StringBuffer();\n buff.append(\"String_Node_Str\");\n buff.append(ATTR_PARAMRTER);\n buff.append(key);\n buff.append(\"String_Node_Str\");\n buff.append(value);\n list.add(buff.toString());\n }\n }\n}\n"
"public WorkflowBuilder multiInput(String moduleName, String description, String name, List<Object> value, DataType type) {\n check();\n if (!workflow.modules.containsKey(moduleName))\n throw new IllegalArgumentException(\"String_Node_Str\" + moduleName + \"String_Node_Str\");\n ModuleImpl module = workflow.modules.get(moduleName);\n module.addMultiInput(name, description, value, type);\n return this;\n}\n"
"public void act(float delta) {\n super.act(delta);\n Text currentSubtitle = World.getInstance().getTextManager().getCurrentText();\n if (subtitle != currentSubtitle) {\n subtitle = currentSubtitle;\n if (currentSubtitle == null && isVisible()) {\n setVisible(false);\n } else if (currentSubtitle != null && !isVisible()) {\n setVisible(true);\n }\n if (isVisible()) {\n float posx = currentSubtitle.x;\n float posy = currentSubtitle.y;\n unprojectTmp.set(posx, posy, 0);\n World.getInstance().getSceneCamera().scene2screen(getStage().getViewport(), unprojectTmp);\n float maxWidth = currentSubtitle.type == Text.Type.TALK ? maxTalkWidth : maxRectangleWidth;\n final TextManagerUIStyle style = getStyle(currentSubtitle);\n Color color = currentSubtitle.color != null ? currentSubtitle.color : style.defaultColor;\n if (color == null)\n color = Color.BLACK;\n layout.setText(style.font, currentSubtitle.str, color, maxWidth, Align.center, true);\n if (posx == TextManager.POS_CENTER || posx == TextManager.POS_SUBTITLE) {\n posx = (getStage().getViewport().getScreenWidth() - layout.width) / 2;\n fontX = (getStage().getViewport().getScreenWidth() - maxWidth) / 2;\n } else {\n posx = unprojectTmp.x;\n fontX = posx + (layout.width - maxWidth) / 2;\n }\n if (posy == TextManager.POS_CENTER) {\n posy = (getStage().getViewport().getScreenHeight() - layout.height) / 2;\n } else if (posy == TextManager.POS_SUBTITLE) {\n posy = getStage().getViewport().getScreenHeight() - layout.height - DPIUtils.getMarginSize() * 4;\n } else {\n posy = unprojectTmp.y;\n }\n setPosition(posx - PADDING, posy - PADDING);\n setSize(layout.width + PADDING * 2, layout.height + PADDING * 2);\n if (currentSubtitle.type == Text.Type.TALK) {\n if (style.talkBubble != null) {\n setY(getY() + DPIUtils.getTouchMinSize() / 3 + PADDING);\n } else {\n setY(getY() + PADDING);\n }\n setX(getX() - layout.width / 2);\n fontX = posx - maxWidth / 2;\n if (getX() < 0 && getX() > -getWidth()) {\n setX(0 + PADDING);\n fontX = getX() + PADDING + (layout.width - maxWidth) / 2;\n } else if (getX() + getWidth() > getStage().getViewport().getScreenWidth() && getX() + getWidth() < getStage().getViewport().getScreenWidth() + getWidth()) {\n setX(getStage().getViewport().getScreenWidth() - getWidth());\n fontX = getStage().getViewport().getScreenWidth() - layout.width / 2 - PADDING - maxWidth / 2;\n }\n if (getY() + getHeight() > getStage().getViewport().getScreenHeight()) {\n setY(getStage().getViewport().getScreenHeight() - getHeight() - PADDING);\n }\n }\n }\n }\n}\n"
"private JPQLGrammar jpqlGrammar() {\n if (JPAQueryBuilderManager.systemQueryBuilderValidationLevel == ParserValidationType.EclipseLink) {\n return DefaultEclipseLinkJPQLGrammar.instance();\n }\n if (JPAQueryBuilderManager.systemQueryBuilderValidationLevel == ParserValidationType.JPA10) {\n return JPQLGrammar1_0.instance();\n } else if (JPAQueryBuilderManager.systemQueryBuilderValidationLevel == ParserValidationType.JPA20) {\n return JPQLGrammar2_0.instance();\n } else if (JPAQueryBuilderManager.systemQueryBuilderValidationLevel == ParserValidationType.JPA21) {\n return JPQLGrammar2_1.instance();\n } else {\n return DefaultEclipseLinkJPQLGrammar.instance();\n }\n}\n"
"public void shouldEnrichTestMethod() throws NoSuchMethodException {\n HostIpTestEnricher hostIpTestEnricher = new HostIpTestEnricher();\n hostIpTestEnricher.hostUriContext = new Instance<HostIpContext>() {\n\n public HostUriContext get() {\n return new HostUriContext(\"String_Node_Str\");\n }\n };\n MyTest test = new MyTest();\n Object[] myMethods = hostIpTestEnricher.resolve(test.getClass().getMethod(\"String_Node_Str\", String.class, String.class));\n assertThat((String) myMethods[1], is(\"String_Node_Str\"));\n}\n"
"public Connection getConnection() throws SQLException {\n lock.lock();\n try {\n if (conn == null)\n conn = DriverManager.getConnection(dbUrl);\n while (connInUse) wait();\n connInUse = true;\n return conn;\n } catch (InterruptedException e) {\n throw new SeekInnerCalmException(e);\n } finally {\n lock.unlock();\n }\n}\n"
"private String applyFont(String fontName, int fontStyle, float fontSize, String text) {\n if (isIntrinsicFont(fontName)) {\n return applyIntrinsicFont(fontName, fontStyle, fontSize, text);\n } else {\n try {\n String fontPath = getFontPath(fontName);\n if (fontPath == null) {\n return applyIntrinsicFont(fontName, fontStyle, fontSize, text);\n }\n ITrueTypeWriter trueTypeWriter = getTrueTypeFontWriter(fontPath);\n String displayName = fontName.replace(' ', '_');\n trueTypeWriter.useDisplayName(displayName);\n trueTypeWriter.ensureGlyphsAvailable(text);\n setFont(displayName, fontSize);\n return toHexString(text);\n } catch (Exception e) {\n log.log(Level.WARNING, \"String_Node_Str\" + fontName);\n }\n return null;\n }\n}\n"
"long getOSGiTimeout() {\n long timeout = DEFAULT_TIMEOUT;\n Object timeoutval = reference.getProperty(OSGI_BASIC_TIMEOUT);\n if (timeoutval != null) {\n if (timeoutval instanceof Long) {\n timeout = ((Long) timeoutval).longValue();\n } else if (timeoutval instanceof Integer) {\n timeout = ((Integer) timeoutval).longValue();\n } else if (timeoutval instanceof String) {\n timeout = Long.valueOf((String) timeoutval).longValue();\n }\n }\n return timeout;\n}\n"
"public void onReceiveComplete(SocketChannel channel, TCPMessage readRequest) {\n ByteBuffer data = readRequest.getByteBuffer();\n byte[] id = new byte[RequestID.ID_SIZE];\n data.get(id);\n String messageType = ByteUtils.unPackString(data);\n int clientId = data.getInt();\n RequestID requestID = RequestID.fromBytes(id);\n Message.Builder builder = messageBuilders.get(messageType);\n if (builder == null) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n try {\n builder.clear();\n int headerLength = 8 + id.length + messageType.getBytes().length;\n int dataLength = readRequest.getLength() - headerLength;\n byte[] d = new byte[dataLength];\n data.get(d);\n builder.mergeFrom(d);\n Message m = builder.build();\n MessageHandler handler = requestHandlers.get(messageType);\n handler.onMessage(requestID, clientId, m);\n requestToWorkers.put(requestID, clientId);\n requestChannels.put(requestID, channel);\n } catch (InvalidProtocolBufferException e) {\n LOG.log(Level.SEVERE, \"String_Node_Str\", e);\n }\n}\n"
"public void openDoor(OpenDoorEvent event, EntityRef entity, DoorComponent door) {\n Side newSide = door.openSide;\n BlockRegionComponent regionComp = entity.getComponent(BlockRegionComponent.class);\n Block bottomBlock = door.bottomBlockFamily.getBlockForPlacement(worldProvider, blockEntityRegistry, regionComp.region.min(), newSide, Side.TOP);\n worldProvider.setBlock(regionComp.region.min(), bottomBlock);\n Block topBlock = door.topBlockFamily.getBlockForPlacement(worldProvider, blockEntityRegistry, regionComp.region.max(), newSide, Side.TOP);\n worldProvider.setBlock(regionComp.region.max(), topBlock);\n if (door.openSound != null) {\n entity.send(new PlaySoundEvent(door.openSound, 1f));\n }\n door.isOpen = true;\n}\n"
"protected void startUp() throws Exception {\n runThread = Thread.currentThread();\n processExecutor = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory(getServiceName() + \"String_Node_Str\"));\n}\n"
"private String getInstantiatedClassName(AstNode newExpr) {\n AstNode variable = newExpr.getFirstChild(PHPGrammar.VARIABLE);\n AstNode classNameNode = variable.getFirstChild();\n if (classNameNode.is(PHPKeyword.NAMESPACE)) {\n return getClassName(variable);\n } else if (classNameNode.is(PHPGrammar.CLASS_NAME, GenericTokenType.IDENTIFIER) && classNameNode.getFirstChild().isNot(PHPKeyword.STATIC)) {\n return getClassName(classNameNode);\n }\n return null;\n}\n"
"protected void visitRawTextNode(RawTextNode node) {\n currentRawTextNode = node;\n currentRawText = node.getRawText();\n currentRawTextOffset = 0;\n currentRawTextIndex = 0;\n while (currentRawTextIndex < currentRawText.length()) {\n int startIndex = currentRawTextIndex;\n if (currentRawTextNode.missingWhitespaceAt(startIndex)) {\n handleJoinedWhitespace(currentPoint(), false);\n }\n State startState = context.getState();\n switch(startState) {\n case NONE:\n currentRawTextIndex = currentRawTextOffset = currentRawText.length();\n break;\n case PCDATA:\n handlePcData();\n break;\n case DOUBLE_QUOTED_ATTRIBUTE_VALUE:\n handleQuotedAttributeValue(true);\n break;\n case SINGLE_QUOTED_ATTRIBUTE_VALUE:\n handleQuotedAttributeValue(false);\n break;\n case BEFORE_ATTRIBUTE_VALUE:\n handleBeforeAttributeValue();\n break;\n case AFTER_TAG_NAME_OR_ATTRIBUTE:\n handleAfterTagNameOrAttribute();\n break;\n case BEFORE_ATTRIBUTE_NAME:\n handleBeforeAttributeName();\n break;\n case UNQUOTED_ATTRIBUTE_VALUE:\n handleUnquotedAttributeValue();\n break;\n case AFTER_ATTRIBUTE_NAME:\n handleAfterAttributeName();\n break;\n case HTML_TAG_NAME:\n handleHtmlTagName();\n break;\n case RCDATA_STYLE:\n handleRcData(TagName.SpecialTagName.STYLE);\n break;\n case RCDATA_TITLE:\n handleRcData(TagName.SpecialTagName.TITLE);\n break;\n case RCDATA_SCRIPT:\n handleRcData(TagName.SpecialTagName.SCRIPT);\n break;\n case RCDATA_TEXTAREA:\n handleRcData(TagName.SpecialTagName.TEXTAREA);\n break;\n case CDATA:\n handleCData();\n break;\n case HTML_COMMENT:\n handleHtmlComment();\n break;\n case XML_DECLARATION:\n handleXmlDeclaration();\n break;\n case DOUBLE_QUOTED_XML_ATTRIBUTE_VALUE:\n handleXmlAttributeQuoted(true);\n break;\n case SINGLE_QUOTED_XML_ATTRIBUTE_VALUE:\n handleXmlAttributeQuoted(false);\n break;\n default:\n throw new UnsupportedOperationException(\"String_Node_Str\" + startState);\n }\n if (context.getState() == startState && startIndex == currentRawTextIndex) {\n throw new IllegalStateException(\"String_Node_Str\" + startState.name() + \"String_Node_Str\" + currentLocation());\n }\n if (currentRawTextOffset > currentRawTextIndex) {\n throw new IllegalStateException(\"String_Node_Str\" + currentRawTextOffset + \"String_Node_Str\" + currentRawTextIndex);\n }\n }\n if (currentRawTextIndex != currentRawText.length()) {\n throw new AssertionError(\"String_Node_Str\");\n }\n if (currentRawTextOffset < currentRawTextIndex && currentRawTextOffset != 0) {\n RawTextNode suffix = consumeAsRawText();\n edits.replace(node, suffix);\n }\n if (currentRawTextNode.missingWhitespaceAt(currentRawText.length())) {\n handleJoinedWhitespace(currentRawTextNode.getSourceLocation().getEndPoint());\n }\n}\n"
"public void sendToken(Receiver receiver, Token token) throws IllegalActionException {\n Time currentTime = getDirector().getModelTime();\n if (_nextTimeFree == null || _tokens.size() == 0 || currentTime.compareTo(_nextTimeFree) != 0 || receiver != _nextReceiver) {\n receiver.put(null);\n }\n Token tokenToSend = _receiversAndTokensToSendTo.get(receiver);\n if (tokenToSend != null) {\n if (!tokenToSend.equals(token)) {\n throw new IllegalActionException(this, receiver.getContainer(), \"String_Node_Str\" + tokenToSend + \"String_Node_Str\" + token + \"String_Node_Str\");\n }\n } else {\n if (getDirector() instanceof FixedPointDirector) {\n _receiversAndTokensToSendTo.put(receiver, token);\n } else {\n _tokens.put(new Object[] { receiver, token });\n if (_tokens.size() == 1) {\n _nextTimeFree = currentTime.add(_serviceTimeValue);\n _nextReceiver = (Receiver) ((Object[]) _tokens.get(0))[0];\n _fireAt(_nextTimeFree);\n }\n } else {\n _receiversAndTokensToSendTo.put(receiver, token);\n }\n }\n if (token == null) {\n return;\n }\n if (_debugging) {\n _debug(\"String_Node_Str\" + getDirector().getModelTime() + \"String_Node_Str\" + receiver.getContainer().getFullName() + \"String_Node_Str\" + token);\n }\n}\n"
"public static ArrayList<OrderDetail> getOrderDetail() {\n String reqUrl = getRequestUrl(null, ORDER_DETAIL_PAGE);\n String respStr = RequestHelper.doRequestPost(reqUrl, null);\n try {\n return ResponseParser.parseOrderDetail(respStr);\n } catch (JSONException e) {\n LogUtils.logE(e.getMessage());\n } catch (Exception e) {\n LogUtils.logD(e.getMessage());\n }\n return null;\n}\n"
"public void modelGroupAdded(NSNotification n) {\n EOModelGroup group = (EOModelGroup) n.object();\n if (group.modelNamed(\"String_Node_Str\") != null && group.modelNamed(\"String_Node_Str\") != null) {\n createRelationship(\"String_Node_Str\", ERCMailAddress.ENTITY_NAME, \"String_Node_Str\", SESComplaintNotification.ENTITY_NAME, \"String_Node_Str\", true, EOClassDescription.DeleteRuleDeny, false, true, false);\n createRelationship(\"String_Node_Str\", ERCMailAddress.ENTITY_NAME, \"String_Node_Str\", SESBounceNotification.ENTITY_NAME, \"String_Node_Str\", true, EOClassDescription.DeleteRuleDeny, false, true, false);\n }\n}\n"
"public void computeSingleNBRBruteForce() {\n Set<QueryTree<String>> posExampleTrees = DBpediaExample.getPosExampleTrees();\n Set<QueryTree<String>> negExampleTrees = DBpediaExample.getNegExampleTrees();\n LGGGenerator<String> lggGenerator = new LGGGeneratorImpl<String>();\n NBRGenerator<String> nbrGenerator = new NBRGeneratorImpl<String>(new BruteForceNBRStrategy<String>());\n int cnt = 1;\n for (QueryTree<String> tree : posExampleTrees) {\n System.out.println(\"String_Node_Str\" + cnt);\n tree.dump();\n System.out.println(\"String_Node_Str\");\n cnt++;\n }\n QueryTree<String> lgg = lggGenerator.getLGG(posExampleTrees);\n System.out.println(\"String_Node_Str\");\n lgg.dump(new PrintWriter(System.out));\n System.out.println(\"String_Node_Str\");\n cnt = 1;\n for (QueryTree<String> tree : negExampleTrees) {\n System.out.println(\"String_Node_Str\" + cnt);\n tree.dump(new PrintWriter(System.out));\n System.out.println(\"String_Node_Str\");\n cnt++;\n }\n System.out.println(\"String_Node_Str\");\n QueryTree<String> nbr = nbrGenerator.getNBR(lgg, negExampleTrees);\n nbr.dump(new PrintWriter(System.out));\n}\n"
"public boolean usesVirtualAccess() {\n if (hasAccess()) {\n return getAccess().equals(MetadataConstants.VIRTUAL);\n } else {\n return m_classAccessor.usesVirtualAccess();\n }\n}\n"
"public void terminateInstance(MemberContext memberContext) throws InvalidCartridgeTypeException, InvalidMemberException, MemberTerminationFailedException {\n terminateContainer(memberContext);\n}\n"
"public Object get(String name, Scriptable start) {\n try {\n return this.cursor.getObject((String) measureMapping.get(name));\n } catch (OLAPException e) {\n throw new RuntimeException(new DataException(e.getLocalizedMessage()));\n }\n}\n"
"protected int wallsLeftWeight() {\n return 3;\n}\n"
"public void register(int recordId, TreeElement item) {\n long freeMemory = Runtime.getRuntime().freeMemory();\n double memory = freeMemory * 1.0 / totalMem;\n if (memory < .2) {\n Runtime.getRuntime().gc();\n freeMemory = Runtime.getRuntime().freeMemory();\n memory = freeMemory * 1.0 / totalMem;\n }\n if (memory < .2) {\n currentCapacity = Math.max(10, (int) (currentCapacity * .6));\n System.out.println(\"String_Node_Str\" + currentCapacity);\n while (cache.size() > currentCapacity - 1) {\n randomPop();\n }\n }\n if (cache.size() == currentCapacity) {\n if (currentCapacity < capacityDesired && memory > .3) {\n currentCapacity++;\n System.out.println(\"String_Node_Str\" + currentCapacity);\n } else {\n for (int i = 0; i < 3; ++i) {\n randomPop();\n }\n }\n }\n cache.put(new Integer(recordId), item);\n cacheList.addElement(new Integer(recordId));\n}\n"
"public Location testPostWithReturn(final Location location, final String testdata) throws Exception {\n DefaultRiakObject ro = new DefaultRiakObject(location);\n ro.setContent(testdata.getBytes());\n PostOptions options = new DefaultPostOptions() {\n\n public boolean getReturnBody() {\n return true;\n }\n };\n final Location[] loc = new Location[1];\n RiakFuture waiter = this.target.post(ro, options, new TestingHandler<RiakObject<byte[]>>() {\n public void handle(RiakContentsResponse<RiakObject<byte[]>> response) throws Exception {\n RiakObject<byte[]> returned = response.getContents();\n assertNotNull(returned.getLocation());\n Location l = returned.getLocation();\n assertEquals(location.getBucket(), l.getBucket());\n assertFalse(l.getKey().isEmpty());\n loc[0] = l;\n }\n });\n waitFor(waiter);\n return loc[0];\n}\n"