content
stringlengths
40
137k
"private void initUIContentsForComboCustomTypes() {\n comboCustomTypes.removeSelectionChangedListener(customChangedListener);\n List<String> allCustomTypeNames = null;\n if (xsdSimpleType.getSchema() != null) {\n allCustomTypeNames = Util.getAllCustomTypeNames(xsdSimpleType.getSchema());\n }\n if (xsdSimpleType.getName() != null) {\n allCustomTypeNames.remove(xsdSimpleType.getName());\n }\n comboCustomTypes.setInput(allCustomTypeNames);\n comboCustomTypes.setSelection(new StructuredSelection(xsdSimpleType.getBaseType().getName()));\n radCustomTypes.setSelection(!comboCustomTypes.getSelection().isEmpty());\n comboCustomTypes.addSelectionChangedListener(customChangedListener);\n}\n"
"public void startRequest(MRCRequest rq) {\n try {\n Args rqArgs = (Args) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n Path p = new Path(rqArgs.path);\n VolumeInfo volume = vMan.getVolumeByName(p.getComp(0));\n StorageManager sMan = vMan.getStorageManager(volume.getId());\n PathResolver res = new PathResolver(sMan, p);\n faMan.checkSearchPermission(sMan, res, rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n res.checkIfFileDoesNotExist();\n FileMetadata file = res.getFile();\n String target = sMan.getSoftlinkTarget(file.getId());\n if (target != null) {\n rqArgs.path = target;\n p = new Path(rqArgs.path);\n if (!vMan.hasVolume(p.getComp(0))) {\n finishRequest(rq, new ErrorRecord(ErrorClass.REDIRECT, target));\n return;\n }\n volume = vMan.getVolumeByName(p.getComp(0));\n sMan = vMan.getStorageManager(volume.getId());\n res = new PathResolver(sMan, p);\n file = res.getFile();\n }\n faMan.checkPermission(FileAccessManager.READ_ACCESS, sMan, file, res.getParentDirId(), rq.getDetails().userId, rq.getDetails().superUser, rq.getDetails().groupIds);\n AtomicDBUpdate update = null;\n if (!master.getConfig().isNoAtime()) {\n update = sMan.createAtomicDBUpdate(master, rq);\n MRCHelper.updateFileTimes(res.getParentDirId(), file, true, false, false, sMan, update);\n }\n Map<String, Map<String, Object>> result = new HashMap<String, Map<String, Object>>();\n Iterator<FileMetadata> it = sMan.getChildren(res.getFile().getId());\n while (it.hasNext()) {\n FileMetadata child = it.next();\n Map<String, Object> statInfo = MRCOpHelper.createStatInfo(sMan, faMan, child, sMan.getSoftlinkTarget(child.getId()), rq.getDetails().userId, rq.getDetails().groupIds, null, null, null);\n result.put(child.getFileName(), statInfo);\n }\n rq.setData(ReusableBuffer.wrap(JSONParser.writeJSON(result).getBytes()));\n if (update != null)\n update.execute();\n else\n finishRequest(rq);\n } catch (UserException exc) {\n Logging.logMessage(Logging.LEVEL_TRACE, this, exc);\n finishRequest(rq, new ErrorRecord(ErrorClass.USER_EXCEPTION, exc.getErrno(), exc.getMessage(), exc));\n } catch (Exception exc) {\n finishRequest(rq, new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR, \"String_Node_Str\", exc));\n }\n}\n"
"public void sendToServer(IMessage message) {\n channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER);\n channels.get(Side.CLIENT).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);\n}\n"
"public String toString() {\n final StringBuilder b = new StringBuilder(this.preRelease.length() + this.buildMetaData.length() + TO_STRING_ESTIMATE);\n b.append(this.major).append(\"String_Node_Str\").append(this.minor).append(\"String_Node_Str\").append(this.patch);\n if (!this.preRelease.isEmpty()) {\n b.append(\"String_Node_Str\").append(this.preRelease);\n }\n if (!this.buildMetaData.isEmpty()) {\n b.append(\"String_Node_Str\").append(this.buildMetaData);\n }\n return b.toString();\n}\n"
"public void taskComplete(RunTaskResult result) {\n Task task = jobService.getTask(result.taskId);\n DispatchJob job = frontEndDispatcher.getJob(task.getJobId());\n DispatchProc proc = dispatchService.getDispatchProc(result.procId);\n TaskState newState;\n if (result.exitStatus == 0) {\n newState = TaskState.SUCCEEDED;\n } else {\n newState = TaskState.DEAD;\n }\n logger.info(\"String_Node_Str\", new Object[] { proc.getNodeName(), proc.getTaskName(), result.exitStatus });\n logger.info(\"String_Node_Str\", newState.toString());\n if (!jobService.stopTask(task, newState)) {\n logger.warn(\"String_Node_Str\", proc.getTaskName());\n return;\n } else {\n dispatchService.unassignProc(proc);\n }\n if (!jobService.hasPendingFrames(job)) {\n jobService.shutdown(job);\n dispatchService.unbookProc(proc);\n }\n dispatchPool.execute(new DispatchProcToJob(proc, job, frontEndDispatcher));\n}\n"
"public void earthGrabSelf() {\n closestEntity = player;\n getGround();\n ParticleEffect.BLOCK_CRACK.display((ParticleEffect.ParticleData) new ParticleEffect.BlockData(blockType, blockByte), 1F, 1F, 1F, 0.1F, 100, player.getLocation(), 500);\n if (closestEntity != null) {\n ArrayList<Block> blocks = new ArrayList<Block>();\n Location location = closestEntity.getLocation();\n Location loc1 = location.clone();\n Location loc2 = location.clone();\n Location testLoc, testLoc2;\n double factor = 3;\n double factor2 = 4;\n int height1 = 3;\n int height2 = 2;\n for (double angle = 0; angle <= 360; angle += 20) {\n testLoc = loc1.clone().add(factor * Math.cos(Math.toRadians(angle)), 1, factor * Math.sin(Math.toRadians(angle)));\n testLoc2 = loc2.clone().add(factor2 * Math.cos(Math.toRadians(angle)), 1, factor2 * Math.sin(Math.toRadians(angle)));\n for (int y = 0; y < height - height1; y++) {\n testLoc = testLoc.clone().add(0, -1, 0);\n if (isEarthbendable(testLoc.getBlock())) {\n if (!blocks.contains(testLoc.getBlock())) {\n new RaiseEarth(player, testLoc, height1 + y - 1);\n }\n blocks.add(testLoc.getBlock());\n break;\n }\n }\n for (int y = 0; y < height - height2; y++) {\n testLoc2 = testLoc2.clone().add(0, -1, 0);\n if (isEarthbendable(testLoc2.getBlock())) {\n if (!blocks.contains(testLoc2.getBlock())) {\n new RaiseEarth(player, testLoc2, height2 + y - 1);\n }\n blocks.add(testLoc2.getBlock());\n break;\n }\n }\n }\n bPlayer.addCooldown(this);\n }\n}\n"
"public org.hl7.fhir.dstu2.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Identifier tgt = new org.hl7.fhir.dstu2.model.Identifier();\n copyElement(src, tgt);\n if (src.hasUse())\n tgt.setUse(convertIdentifierUse(src.getUse()));\n if (src.hasType())\n tgt.setType(convertCodeableConcept(src.getType()));\n if (src.hasSystem())\n tgt.setSystem(src.getSystem());\n if (src.hasValue())\n tgt.setValue(src.getValue());\n if (src.hasPeriod())\n tgt.setPeriod(convertPeriod(src.getPeriod()));\n if (src.hasAssigner())\n tgt.setAssigner(convertReference(src.getAssigner()));\n return tgt;\n}\n"
"private void testByteBuffer(int len) {\n if (len < 4) {\n return;\n }\n Random r = new Random(len);\n CompressLZF comp = new CompressLZF();\n for (int pattern = 0; pattern < 4; pattern++) {\n byte[] b = new byte[len];\n switch(pattern) {\n case 0:\n break;\n case 1:\n {\n r.nextBytes(b);\n break;\n }\n case 2:\n {\n for (int x = 0; x < len; x++) {\n b[x] = (byte) (x & 10);\n }\n break;\n }\n case 3:\n {\n for (int x = 0; x < len; x++) {\n b[x] = (byte) (x / 10);\n }\n break;\n }\n default:\n }\n if (r.nextInt(2) < 1) {\n for (int x = 0; x < len; x++) {\n if (r.nextInt(20) < 1) {\n b[x] = (byte) (r.nextInt(255));\n }\n }\n }\n ByteBuffer buff = ByteBuffer.wrap(b);\n byte[] temp = new byte[100 + b.length * 2];\n int compLen = comp.compress(buff, 0, temp, 0);\n ByteBuffer test = ByteBuffer.wrap(temp, 0, compLen);\n byte[] exp = new byte[b.length];\n CompressLZF.expand(test, ByteBuffer.wrap(exp));\n assertEquals(b, exp);\n }\n}\n"
"protected R doAsyncTask() {\n R r = null;\n r = _mJob.doJob();\n return r;\n}\n"
"protected boolean _isTopLevel() {\n NamedObj container = getContainer();\n if (container instanceof CompositeActor) {\n if (((CompositeActor) container).getExecutiveDirector() == null) {\n return true;\n } else {\n return false;\n }\n }\n}\n"
"public void receivedGday(Peer peer, Packet.GDay packet) {\n User u = new User(packet.nickname, peer.getAddress().toString());\n if (!peers.containsKey(u)) {\n this.peers.put(u, peer);\n System.out.println(u + \"String_Node_Str\" + peer.getAddress());\n }\n this.peers.get(u).receivedGDay();\n}\n"
"private void initialize(String sql) throws SQLException {\n if (sql == null) {\n sql = \"String_Node_Str\";\n }\n originalSQL = sql;\n sqlCommand = sql;\n int len = sql.length() + 1;\n char[] command = new char[len];\n int[] types = new int[len];\n len--;\n sql.getChars(0, len, command, 0);\n boolean changed = false;\n command[len] = ' ';\n int startLoop = 0;\n for (int i = 0; i < len; i++) {\n char c = command[i];\n int type = 0;\n switch(c) {\n case '/':\n if (command[i + 1] == '*') {\n changed = true;\n command[i] = ' ';\n command[i + 1] = ' ';\n startLoop = i;\n i += 2;\n checkRunOver(i, len, startLoop);\n while (command[i] != '*' || command[i + 1] != '/') {\n command[i++] = ' ';\n checkRunOver(i, len, startLoop);\n }\n command[i] = ' ';\n command[i + 1] = ' ';\n i++;\n } else if (command[i + 1] == '/') {\n changed = true;\n startLoop = i;\n while (true) {\n c = command[i];\n if (c == '\\n' || c == '\\r' || i >= len - 1) {\n break;\n }\n command[i++] = ' ';\n checkRunOver(i, len, startLoop);\n }\n } else {\n type = CHAR_SPECIAL_1;\n }\n break;\n case '-':\n if (command[i + 1] == '-') {\n changed = true;\n startLoop = i;\n while (true) {\n c = command[i];\n if (c == '\\n' || c == '\\r' || i >= len - 1) {\n break;\n }\n command[i++] = ' ';\n checkRunOver(i, len, startLoop);\n }\n } else {\n type = CHAR_SPECIAL_1;\n }\n break;\n case '$':\n if (SysProperties.DOLLAR_QUOTING && command[i + 1] == '$' && (i == 0 || command[i - 1] <= ' ')) {\n changed = true;\n command[i] = ' ';\n command[i + 1] = ' ';\n startLoop = i;\n i += 2;\n checkRunOver(i, len, startLoop);\n while (command[i] != '$' || command[i + 1] != '$') {\n types[i++] = CHAR_DOLLAR_QUOTED_STRING;\n checkRunOver(i, len, startLoop);\n }\n command[i] = ' ';\n command[i + 1] = ' ';\n i++;\n } else {\n type = CHAR_NAME;\n }\n break;\n case '(':\n case ')':\n case '{':\n case '}':\n case '*':\n case ',':\n case ';':\n case '+':\n case '%':\n case '?':\n case '@':\n case ']':\n type = CHAR_SPECIAL_1;\n break;\n case '!':\n case '<':\n case '>':\n case '|':\n case '=':\n case ':':\n case '~':\n type = CHAR_SPECIAL_2;\n break;\n case '.':\n type = CHAR_DECIMAL;\n break;\n case '\\'':\n type = types[i] = CHAR_STRING;\n startLoop = i;\n while (command[++i] != '\\'') {\n checkRunOver(i, len, startLoop);\n }\n break;\n case '[':\n if (database.getMode().squareBracketQuotedNames) {\n command[i] = '\"';\n changed = true;\n type = types[i] = CHAR_QUOTED;\n startLoop = i;\n while (command[++i] != ']') {\n checkRunOver(i, len, startLoop);\n }\n command[i] = '\"';\n } else {\n type = CHAR_SPECIAL_1;\n }\n break;\n case '`':\n command[i] = '\"';\n changed = true;\n type = types[i] = CHAR_QUOTED;\n startLoop = i;\n while (command[++i] != '`') {\n checkRunOver(i, len, startLoop);\n c = command[i];\n command[i] = Character.toUpperCase(c);\n }\n command[i] = '\"';\n break;\n case '\\\"':\n type = types[i] = CHAR_QUOTED;\n startLoop = i;\n while (command[++i] != '\\\"') {\n checkRunOver(i, len, startLoop);\n }\n break;\n case '_':\n type = CHAR_NAME;\n break;\n default:\n if (c >= 'a' && c <= 'z') {\n command[i] = (char) (c - ('a' - 'A'));\n changed = true;\n type = CHAR_NAME;\n } else if (c >= 'A' && c <= 'Z') {\n type = CHAR_NAME;\n } else if (c >= '0' && c <= '9') {\n type = CHAR_VALUE;\n } else {\n if (Character.isJavaIdentifierPart(c)) {\n type = CHAR_NAME;\n char u = Character.toUpperCase(c);\n if (u != c) {\n command[i] = u;\n changed = true;\n }\n }\n }\n }\n types[i] = (byte) type;\n }\n sqlCommandChars = command;\n types[len] = CHAR_END;\n characterTypes = types;\n if (changed) {\n sqlCommand = new String(command);\n }\n parseIndex = 0;\n}\n"
"public polyglot.ast.Node leave(polyglot.ast.Node old, polyglot.ast.Node n, polyglot.visit.NodeVisitor visitor) {\n if (n instanceof polyglot.ast.LocalDecl) {\n localDecls.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalDecl) n).localInstance()));\n }\n if (n instanceof polyglot.ast.Local) {\n if (!(locals.contains(new polyglot.util.IdentityKey(((polyglot.ast.Local) n).localInstance())))) {\n locals.add(new polyglot.util.IdentityKey(((polyglot.ast.Local) n).localInstance()));\n }\n }\n if (n instanceof polyglot.ast.Formal) {\n localDecls.add(new polyglot.util.IdentityKey(((polyglot.ast.Formal) n).localInstance()));\n }\n return n;\n}\n"
"private void propaHadoopCfgChanges(IRepositoryNode repositoryNode) {\n if (repositoryNode == null || repositoryNode.getObject() == null) {\n return;\n }\n IHadoopClusterService hadoopClusterService = null;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopClusterService.class)) {\n hadoopClusterService = (IHadoopClusterService) GlobalServiceRegister.getDefault().getService(IHadoopClusterService.class);\n }\n if (hadoopClusterService == null || !hadoopClusterService.isHadoopSubnode(repositoryNode)) {\n return;\n }\n IProcess process = editor.getProcess();\n if (!ComponentCategory.CATEGORY_4_MAPREDUCE.getName().equals(process.getComponentsType())) {\n return;\n }\n Item subItem = repositoryNode.getObject().getProperty().getItem();\n Item hadoopClusterItem = hadoopClusterService.getHadoopClusterBySubitemId(subItem.getProperty().getId());\n String hadoopClusterId = hadoopClusterItem.getProperty().getId();\n String propertyParamName = MR_PROPERTY_PREFIX + EParameterName.PROPERTY_TYPE.getName();\n String propertyRepTypeParamName = MR_PROPERTY_PREFIX + EParameterName.REPOSITORY_PROPERTY_TYPE.getName();\n IElementParameter propertyParam = process.getElementParameter(propertyParamName);\n if (EmfComponent.REPOSITORY.equals(propertyParam.getValue())) {\n String propertyId = (String) process.getElementParameter(propertyRepTypeParamName).getValue();\n if (hadoopClusterId.equals(propertyId)) {\n return;\n }\n }\n Connection hcConnection = ((ConnectionItem) hadoopClusterItem).getConnection();\n if (hadoopClusterService.hasDiffsFromClusterToProcess(((ConnectionItem) hadoopClusterItem).getConnection(), process)) {\n boolean confirmUpdate = MessageDialog.openConfirm(editor.getSite().getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n if (confirmUpdate) {\n propertyParam.setValue(EmfComponent.REPOSITORY);\n ChangeValuesFromRepository command = new ChangeValuesFromRepository(process, connection, propertyRepTypeParamName, hadoopClusterId);\n execCommandStack(command);\n }\n }\n}\n"
"public static Map<String, XmlBindings> getXmlBindingsFromProperties(Map properties, ClassLoader classLoader) {\n Map<String, List<XmlBindings>> bindings = new HashMap<String, List<XmlBindings>>();\n Object value = null;\n if (properties != null) {\n if ((value = properties.get(JAXBContextProperties.OXM_METADATA_SOURCE)) == null) {\n value = properties.get(ECLIPSELINK_OXM_XML_KEY);\n }\n }\n if (value != null) {\n if (value instanceof Map) {\n Map<String, Object> metadataFiles = null;\n try {\n metadataFiles = (Map<String, Object>) value;\n } catch (ClassCastException x) {\n throw org.eclipse.persistence.exceptions.JAXBException.incorrectValueParameterTypeForOxmXmlKey();\n }\n if (metadataFiles != null) {\n for (Entry<String, Object> entry : metadataFiles.entrySet()) {\n String key = null;\n List<XmlBindings> xmlBindings = new ArrayList<XmlBindings>();\n try {\n key = entry.getKey();\n if (key == null) {\n throw org.eclipse.persistence.exceptions.JAXBException.nullMapKey();\n }\n } catch (ClassCastException cce) {\n throw org.eclipse.persistence.exceptions.JAXBException.incorrectKeyParameterType();\n }\n Object metadataSource = entry.getValue();\n if (metadataSource == null) {\n throw org.eclipse.persistence.exceptions.JAXBException.nullMetadataSource(key);\n }\n if (metadataSource instanceof List) {\n for (Object next : (List) metadataSource) {\n XmlBindings binding = getXmlBindings(next, classLoader, properties);\n if (binding != null) {\n xmlBindings.add(binding);\n }\n }\n } else {\n XmlBindings binding = getXmlBindings(metadataSource, classLoader, properties);\n if (binding != null) {\n xmlBindings.add(binding);\n }\n }\n if (xmlBindings != null) {\n bindings.put(key, xmlBindings);\n }\n }\n }\n } else if (value instanceof List) {\n for (Object metadataSource : (List) value) {\n if (metadataSource == null) {\n throw org.eclipse.persistence.exceptions.JAXBException.nullMetadataSource();\n }\n bindings = processBindingFile(bindings, metadataSource, classLoader, properties);\n }\n } else {\n bindings = processBindingFile(bindings, value, classLoader, properties);\n }\n }\n Map<String, XmlBindings> mergedBindings = new HashMap<String, XmlBindings>(bindings.size());\n for (Entry<String, List<XmlBindings>> next : bindings.entrySet()) {\n mergedBindings.put(next.getKey(), XMLProcessor.mergeXmlBindings(next.getValue()));\n }\n return mergedBindings;\n}\n"
"public List<Map<String, Object>> getBlogsBy(String byString, String[] extraFields, int limit, boolean shouldHideJetpack) {\n if (db == null) {\n return new Vector<>();\n }\n if (shouldHideJetpack) {\n String hideJetpackArgs = String.format(\"String_Node_Str\", encryptPassword(\"String_Node_Str\"));\n if (TextUtils.isEmpty(byString)) {\n byString = hideJetpackArgs;\n } else {\n byString = hideJetpackArgs + \"String_Node_Str\" + byString;\n }\n }\n String limitStr = null;\n if (limit != 0) {\n limitStr = String.valueOf(limit);\n }\n String[] baseFields = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n String[] allFields = baseFields;\n if (extraFields != null) {\n allFields = (String[]) ArrayUtils.addAll(baseFields, extraFields);\n }\n Cursor c = db.query(BLOGS_TABLE, allFields, byString, null, null, null, null, limitStr);\n int numRows = c.getCount();\n c.moveToFirst();\n List<Map<String, Object>> blogs = new Vector<>();\n for (int i = 0; i < numRows; i++) {\n int id = c.getInt(0);\n String blogName = c.getString(1);\n String username = c.getString(2);\n int blogId = c.getInt(3);\n String url = c.getString(4);\n if (id > 0) {\n Map<String, Object> blogMap = new HashMap<>();\n blogMap.put(\"String_Node_Str\", id);\n blogMap.put(\"String_Node_Str\", blogName);\n blogMap.put(\"String_Node_Str\", username);\n blogMap.put(\"String_Node_Str\", blogId);\n blogMap.put(\"String_Node_Str\", url);\n int extraFieldsIndex = baseFields.length;\n if (extraFields != null) {\n for (int j = 0; j < extraFields.length; ++j) {\n blogMap.put(extraFields[j], c.getString(extraFieldsIndex + j));\n }\n }\n blogs.add(blogMap);\n }\n c.moveToNext();\n }\n c.close();\n Collections.sort(blogs, BlogUtils.BlogNameComparator);\n return blogs;\n}\n"
"private static Map<Integer, JMethod> findRunAsyncMethods(JProgram program) throws NumberFormatException {\n Map<Integer, JMethod> splitPointToLoadMethod = new HashMap<Integer, JMethod>();\n for (JDeclaredType type : program.getDeclaredTypes()) {\n Matcher matcher = LOADER_CLASS_PATTERN.matcher(type.getName());\n if (matcher.matches()) {\n int sp = Integer.parseInt(matcher.group(1));\n JMethod loadMethod = null;\n for (JMethod meth : type.methods) {\n if (meth.getName().equals(FragmentLoaderCreator.LOADER_METHOD_RUN_ASYNC)) {\n loadMethod = meth;\n }\n }\n splitPointToLoadMethod.put(sp, loadMethod);\n }\n }\n return splitPointToLoadMethod;\n}\n"
"public double squaredDistance(INDArray other) {\n double sd = 0.0;\n if (other instanceof IComplexNDArray) {\n IComplexNDArray n = (IComplexNDArray) other;\n IComplexNDArray nLinear = n.linearView();\n for (int i = 0; i < length; i++) {\n IComplexNumber diff = linearView().getComplex(i).sub(nLinear.getComplex(i));\n double d = diff.absoluteValue().doubleValue();\n sd += d * d;\n }\n return sd;\n }\n for (int i = 0; i < length; i++) {\n INDArray linear = other.linearView();\n IComplexNumber diff = linearView().getComplex(i).sub(linear.getDouble(i));\n double d = (double) diff.absoluteValue();\n sd += d * d;\n }\n return sd;\n}\n"
"void updateUserDefinedParameter(DataSetParameters parameters) {\n userDefinedParams = new ArrayList();\n if (parameters == null) {\n for (int i = 0; i < setDefinedParams.size(); i++) {\n tmpParams.add(((OdaDataSetParameterHandle) setDefinedParams.get(i)).getStructure());\n }\n } else {\n List posList = getPositions(parameters);\n for (int i = 0; i < setDefinedParams.size(); i++) {\n OdaDataSetParameterHandle paramHandle = (OdaDataSetParameterHandle) setDefinedParams.get(i);\n Integer position = paramHandle.getPosition();\n if (position == null)\n continue;\n if (!posList.contains(position)) {\n tmpParams.add(paramHandle.getStructure());\n }\n }\n }\n userDefinedParams = new ArrayList();\n for (int i = 0; i < tmpParams.size(); i++) {\n userDefinedParams.add(((OdaDataSetParameter) tmpParams.get(i)).copy());\n }\n tmpParams.clear();\n}\n"
"public ByteBuffer startRecordingAndReturnByteBuffer(final Object audioFormat1, final Object stop) throws SoundTransformException {\n final RecordSoundProcessor processor = this;\n if (!(audioFormat1 instanceof AudioFormat)) {\n throw new SoundTransformException(TargetDataLineRecordSoundProcessorErrorCode.AUDIO_FORMAT_EXPECTED, new IllegalArgumentException());\n }\n final AudioFormat audioFormat = (AudioFormat) audioFormat1;\n final OutputAsByteBuffer bytesExporter = $.select(OutputAsByteBuffer.class);\n bytesExporter.init(TargetDataLineRecordSoundProcessor.DEFAULT_BYTE_BUFFER_SIZE);\n this.startRecording(audioFormat, bytesExporter);\n new StopProperlyThread(stop, processor).start();\n return bytesExporter.getOutput();\n}\n"
"private void computePartialTile2(final int subSwathIndex, final int burstIndex, Rectangle targetRectangle, final Map<Band, Tile> targetTileMap) throws Exception {\n try {\n final int rgOffset = (cohWinRg - 1) / 2;\n final int azOffset = (cohWinAz - 1) / 2;\n final int cohx0 = targetRectangle.x - rgOffset;\n final int cohy0 = targetRectangle.y - azOffset;\n final int cohw = targetRectangle.width + cohWinRg - 1;\n final int cohh = targetRectangle.height + cohWinAz - 1;\n final Rectangle rect = new Rectangle(cohx0, cohy0, cohw, cohh);\n final BorderExtender border = BorderExtender.createInstance(BorderExtender.BORDER_ZERO);\n final int y0 = targetRectangle.y;\n final int yN = y0 + targetRectangle.height - 1;\n final int x0 = targetRectangle.x;\n final int xN = targetRectangle.x + targetRectangle.width - 1;\n final long minLine = burstIndex * subSwath[subSwathIndex - 1].linesPerBurst;\n final long maxLine = minLine + subSwath[subSwathIndex - 1].linesPerBurst - 1;\n final long minPixel = 0;\n final long maxPixel = subSwath[subSwathIndex - 1].samplesPerBurst - 1;\n Band targetBand_I;\n Band targetBand_Q;\n for (String ifgKey : targetMap.keySet()) {\n final ProductContainer product = targetMap.get(ifgKey);\n final Tile mstTileReal = getSourceTile(product.sourceMaster.realBand, rect, border);\n final Tile mstTileImag = getSourceTile(product.sourceMaster.imagBand, rect, border);\n final ComplexDoubleMatrix dataMaster = TileUtilsDoris.pullComplexDoubleMatrix(mstTileReal, mstTileImag);\n final Tile slvTileReal = getSourceTile(product.sourceSlave.realBand, rect, border);\n final Tile slvTileImag = getSourceTile(product.sourceSlave.imagBand, rect, border);\n final ComplexDoubleMatrix dataSlave = TileUtilsDoris.pullComplexDoubleMatrix(slvTileReal, slvTileImag);\n ComplexDoubleMatrix dataMaster2 = null, dataSlave2 = null;\n if (includeCoherence) {\n dataMaster2 = new ComplexDoubleMatrix(mstTileReal.getHeight(), mstTileReal.getWidth());\n dataSlave2 = new ComplexDoubleMatrix(slvTileReal.getHeight(), slvTileReal.getWidth());\n dataMaster2.copy(dataMaster);\n dataSlave2.copy(dataSlave);\n }\n if (subtractFlatEarthPhase) {\n DoubleMatrix rangeAxisNormalized = DoubleMatrix.linspace(x0, xN, dataMaster.columns);\n rangeAxisNormalized = normalizeDoubleMatrix(rangeAxisNormalized, minPixel, maxPixel);\n DoubleMatrix azimuthAxisNormalized = DoubleMatrix.linspace(y0, yN, dataMaster.rows);\n azimuthAxisNormalized = normalizeDoubleMatrix(azimuthAxisNormalized, minLine, maxLine);\n final String polynomialName = product.sourceSlave.name + \"String_Node_Str\" + (subSwathIndex - 1) + \"String_Node_Str\" + burstIndex;\n final DoubleMatrix polyCoeffs = flatEarthPolyMap.get(polynomialName);\n final DoubleMatrix realReferencePhase = PolyUtils.polyval(azimuthAxisNormalized, rangeAxisNormalized, polyCoeffs, PolyUtils.degreeFromCoefficients(polyCoeffs.length));\n final ComplexDoubleMatrix complexReferencePhase = new ComplexDoubleMatrix(MatrixFunctions.cos(realReferencePhase), MatrixFunctions.sin(realReferencePhase));\n dataSlave.muli(complexReferencePhase);\n }\n dataMaster.muli(dataSlave.conji());\n targetBand_I = targetProduct.getBand(product.getBandName(Unit.REAL));\n Tile tileOutReal = targetTileMap.get(targetBand_I);\n targetBand_Q = targetProduct.getBand(product.getBandName(Unit.IMAGINARY));\n Tile tileOutImag = targetTileMap.get(targetBand_Q);\n DoubleMatrix cohMatrix = null;\n ProductData samplesCoh = null;\n if (includeCoherence) {\n for (int i = 0; i < dataMaster.length; i++) {\n double tmp = norm(dataMaster2.get(i));\n dataMaster2.put(i, dataMaster2.get(i).mul(dataSlave2.get(i).conj()));\n dataSlave2.put(i, new ComplexDouble(norm(dataSlave2.get(i)), tmp));\n }\n cohMatrix = SarUtils.coherence2(dataMaster2, dataSlave2, cohWinAz, cohWinRg);\n final Band targetBandCoh = targetProduct.getBand(product.getBandName(Unit.COHERENCE));\n final Tile tileOutCoh = targetTileMap.get(targetBandCoh);\n samplesCoh = tileOutCoh.getDataBuffer();\n }\n final ProductData samplesReal = tileOutReal.getDataBuffer();\n final ProductData samplesImag = tileOutImag.getDataBuffer();\n final DoubleMatrix dataReal = dataMaster.real();\n final DoubleMatrix dataImag = dataMaster.imag();\n final int maxX = targetRectangle.x + targetRectangle.width;\n final int maxY = targetRectangle.y + targetRectangle.height;\n final TileIndex tgtIndex = new TileIndex(tileOutReal);\n for (int y = targetRectangle.y; y < maxY; y++) {\n tgtIndex.calculateStride(y);\n final int yy = y - targetRectangle.y;\n for (int x = targetRectangle.x; x < maxX; x++) {\n final int trgIndex = tgtIndex.getIndex(x);\n final int xx = x - targetRectangle.x;\n samplesReal.setElemFloatAt(trgIndex, (float) dataReal.get(yy, xx));\n samplesImag.setElemFloatAt(trgIndex, (float) dataImag.get(yy, xx));\n if (samplesCoh != null) {\n samplesCoh.setElemFloatAt(trgIndex, (float) cohMatrix.get(yy, xx));\n }\n }\n }\n }\n } catch (Throwable e) {\n OperatorUtils.catchOperatorException(getId(), e);\n }\n}\n"
"protected float calcTerrainDetail(float x, float z) {\n float result = 0.0f;\n result += _pGen3.noiseNoiseWithOctaves(0.02f * x, 0.02f, 0.02f * z, 12);\n return result;\n}\n"
"protected IStructuredSelection getSelection() {\n IEvaluationContext context = (IEvaluationContext) event.getApplicationContext();\n Object selectVariable = context.getVariable(ISources.ACTIVE_CURRENT_SELECTION_NAME);\n if (selectVariable != null) {\n if (selectVariable instanceof IStructuredSelection) {\n return (IStructuredSelection) selectVariable;\n } else {\n return new StructuredSelection(selectVariable);\n }\n }\n}\n"
"private Class classForName(String className, boolean silentFail) {\n try {\n return getClassLoader().loadClass(className);\n } catch (ClassNotFoundException e) {\n if (silentFail) {\n Message.info(\"String_Node_Str\" + className + \"String_Node_Str\" + _classpathURLs + \"String_Node_Str\");\n return null;\n } else {\n throw new RuntimeException(\"String_Node_Str\" + className + \"String_Node_Str\" + _classpathURLs + \"String_Node_Str\");\n }\n }\n}\n"
"void loadProperties() throws ConfigurationException {\n final File file = PropertiesUtil.findConfigFile(\"String_Node_Str\");\n if (null == file) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n s_logger.info(\"String_Node_Str\" + file.getAbsolutePath());\n InputStream propertiesStream = null;\n try {\n propertiesStream = new FileInputStream(file);\n _properties.load(propertiesStream);\n } catch (final FileNotFoundException ex) {\n throw new CloudRuntimeException(\"String_Node_Str\" + file.getAbsolutePath(), ex);\n } catch (final IOException ex) {\n throw new CloudRuntimeException(\"String_Node_Str\" + file.getAbsolutePath(), ex);\n } finally {\n IOUtils.closeQuietly(propertiesStream);\n }\n}\n"
"protected static void send(Message message, String template, Map<String, Object> params) {\n String bodyHtml = null;\n String bodyText = \"String_Node_Str\";\n try {\n Template templateHtml = TemplateLoader.load(template + \"String_Node_Str\");\n bodyHtml = templateHtml.render(params);\n message.setHtmlBody(bodyHtml);\n } catch (TemplateNotFoundException e) {\n Logger.error(\"String_Node_Str\", e);\n }\n try {\n Template templateText = TemplateLoader.load(template + \"String_Node_Str\");\n bodyText = templateText.render(params);\n message.setTextBody(bodyText);\n } catch (TemplateNotFoundException e) {\n Logger.debug(\"String_Node_Str\", e);\n }\n if (StringUtils.isNotEmpty(bodyHtml) || StringUtils.isNotEmpty(bodyText)) {\n Logger.debug(\"String_Node_Str\");\n try {\n getMailService().send(message);\n } catch (IOException e) {\n Logger.error(\"String_Node_Str\", e);\n } catch (ApiDeadlineExceededException e) {\n Logger.error(\"String_Node_Str\", e);\n }\n }\n}\n"
"public Set<String> loadAllKeys() {\n if (sleepBeforeLoadAllKeys) {\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n countLoadAllKeys.incrementAndGet();\n Set<String> result = new HashSet<String>(store.keySet());\n List<String> resultList = new ArrayList<String>(result);\n Collections.sort(resultList);\n return result;\n}\n"
"public static boolean isEarthbendable(Player player, String ability, Block block) {\n Material material = block.getType();\n boolean valid = false;\n for (String s : config.getStringList(\"String_Node_Str\")) if (material == Material.getMaterial(s)) {\n valid = true;\n break;\n }\n if (isMetal(block) && canMetalbend(player)) {\n valid = true;\n }\n if (!valid)\n return false;\n if (tempNoEarthbending.contains(block))\n valid = false;\n if (GeneralMethods.isRegionProtectedFromBuild(player, ability, block.getLocation()))\n valid = false;\n return valid;\n}\n"
"public void execute() throws IOException {\n try {\n for (String tableName : getTableNames()) {\n StringBuilder sb = new StringBuilder();\n ResultSet rs = this.cursor.executeQuery(buildSelect(tableName));\n while (rs.next()) {\n StringBuilder recID = new StringBuilder();\n recID.append(\"String_Node_Str\");\n for (String idField : getIDFields(tableName)) {\n recID.append(\"String_Node_Str\");\n String id = rs.getString(idField);\n if (id != null) {\n id = id.trim();\n }\n id = SpecialEntities.xmlEncode(id);\n recID.append(id);\n }\n String tableNS = \"String_Node_Str\" + tableName;\n sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(tableNS);\n sb.append(\"String_Node_Str\");\n sb.append(buildTableFieldNS(tableName));\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(buildTableRecordNS(tableName));\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(recID);\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(buildTableType(tableName));\n sb.append(\"String_Node_Str\");\n List<String> dataFieldList;\n if (this.queryStrings != null && this.queryStrings.containsKey(tableName)) {\n dataFieldList = getResultSetFields(rs);\n } else {\n dataFieldList = getDataFields(tableName);\n }\n for (String dataField : dataFieldList) {\n String field = tableNS + \"String_Node_Str\" + dataField.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n sb.append(SpecialEntities.xmlEncode(field));\n sb.append(\"String_Node_Str\");\n if (rs.getString(dataField) != null) {\n sb.append(SpecialEntities.xmlEncode(rs.getString(dataField).trim()));\n }\n sb.append(\"String_Node_Str\");\n sb.append(field);\n sb.append(\"String_Node_Str\");\n }\n for (String relationField : getFkRelationFields(tableName).keySet()) {\n sb.append(\"String_Node_Str\");\n sb.append(tableNS);\n sb.append(\"String_Node_Str\");\n sb.append(relationField.replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n sb.append(\"String_Node_Str\");\n sb.append(this.buildTableRecordNS(getFkRelationFields(tableName).get(relationField)));\n sb.append(\"String_Node_Str\" + rs.getString(relationField).trim());\n sb.append(\"String_Node_Str\");\n }\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n log.trace(\"String_Node_Str\" + tableName + \"String_Node_Str\" + recID);\n this.rh.addRecord(tableName + \"String_Node_Str\" + recID, sb.toString(), this.getClass());\n }\n }\n } catch (SQLException e) {\n throw new IOException(e.getMessage(), e);\n }\n}\n"
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n Field xmlField = null;\n if (isCollection) {\n xmlField = (Field) ((BinaryDataCollectionMapping) mapping).getField();\n } else {\n xmlField = (Field) ((BinaryDataMapping) mapping).getField();\n }\n if (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName)) {\n if (record.isNamespaceAware() && !Constants.XOP_URL.equals(namespaceURI)) {\n return;\n }\n XMLAttachmentUnmarshaller attachmentUnmarshaller = record.getUnmarshaller().getAttachmentUnmarshaller();\n Object data = null;\n Class attributeClassification = null;\n if (isCollection) {\n attributeClassification = ((BinaryDataCollectionMapping) mapping).getAttributeElementClass();\n } else {\n attributeClassification = mapping.getAttributeClassification();\n }\n if (attachmentUnmarshaller == null) {\n throw XMLMarshalException.noAttachmentUnmarshallerSet(this.c_id);\n }\n if (attributeClassification.equals(XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER)) {\n data = attachmentUnmarshaller.getAttachmentAsDataHandler(this.c_id);\n } else {\n data = attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);\n }\n CoreContainerPolicy cp = null;\n if (isCollection) {\n cp = mapping.getContainerPolicy();\n }\n data = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data, mapping.getAttributeClassification(), record.getSession(), cp);\n data = converter.convertDataValueToObjectValue(data, record.getSession(), unmarshaller);\n if (isCollection) {\n if (data != null) {\n record.addAttributeValue((ContainerValue) nodeValue, data);\n }\n } else {\n record.setAttributeValue(data, mapping);\n }\n if (!xmlField.isSelfField()) {\n XMLReader xmlReader = record.getXMLReader();\n xmlReader.setContentHandler(record);\n xmlReader.setLexicalHandler(record);\n }\n } else if (c_id == null) {\n if (!xmlField.isSelfField()) {\n XMLReader xmlReader = record.getXMLReader();\n xmlReader.setContentHandler(record);\n xmlReader.setLexicalHandler(record);\n record.endElement(namespaceURI, localName, qName);\n }\n }\n}\n"
"public void start(String executionId, IExecutionTracker executionTracker) {\n super.start(executionId, executionTracker);\n error = null;\n if (resource == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n TypedProperties properties = flowStep.getComponent().toTypedProperties(getSettingDefinitions(false));\n replaceRows = properties.is(REPLACE);\n updateFirst = properties.is(UPDATE_FIRST);\n insertFallback = properties.is(INSERT_FALLBACK);\n quoteIdentifiers = properties.is(QUOTE_IDENTIFIERS);\n stopProcessingOnError = properties.is(STOP_PROCESSING_ON_ERROR, true);\n fitToColumn = properties.is(FIT_TO_COLUMN);\n DataSource dataSource = (DataSource) resource.reference();\n platform = JdbcDatabasePlatformFactory.createNewPlatformInstance(dataSource, new SqlTemplateSettings(), quoteIdentifiers);\n targetTables = new ArrayList<TargetTableDefintion>();\n for (ModelEntity entity : model.getModelEntities()) {\n Table table = platform.getTableFromCache(entity.getName(), true);\n if (table != null) {\n targetTables.add(new TargetTableDefintion(entity, new TargetTable(DmlType.UPDATE, entity, table.copy()), new TargetTable(DmlType.INSERT, entity, table.copy())));\n }\n }\n}\n"
"public void write(int address, int data, boolean word, long cycles) {\n address = address - offset;\n if (DEBUG) {\n log(\"String_Node_Str\" + Utils.hex(address, 4) + \"String_Node_Str\" + data + \"String_Node_Str\" + word);\n }\n switch(address) {\n case MPY:\n if (DEBUG)\n log(\"String_Node_Str\" + data);\n op1 = mpy = data;\n signed = false;\n accumulating = false;\n break;\n case MPYS:\n op1 = mpys = data;\n if (DEBUG)\n log(\"String_Node_Str\" + data);\n signed = true;\n accumulating = false;\n break;\n case MAC:\n op1 = mac = data;\n if (DEBUG)\n log(\"String_Node_Str\" + data);\n signed = false;\n accumulating = true;\n break;\n case MACS:\n op1 = macs = data;\n if (DEBUG)\n log(\"String_Node_Str\" + data);\n signed = true;\n accumulating = true;\n break;\n case RESLO:\n resLo = data;\n break;\n case RESHI:\n resHi = data;\n break;\n case OP2:\n if (DEBUG)\n log(\"String_Node_Str\" + data);\n sumext = 0;\n op2 = data;\n if (signed) {\n if (!word) {\n if (op1 > 0x80)\n op1 = op1 | 0xff00;\n if (op2 > 0x80)\n op2 = op2 | 0xff00;\n }\n op1 = op1 > 0x8000 ? op1 - 0x10000 : op1;\n op2 = op2 > 0x8000 ? op2 - 0x10000 : op2;\n }\n long res = (long) op1 * (long) op2;\n if (DEBUG)\n log(\"String_Node_Str\" + op1 + \"String_Node_Str\" + op2 + \"String_Node_Str\" + res);\n if (signed) {\n sumext = res < 0 ? 0xffff : 0;\n }\n if (accumulating) {\n res += ((long) resHi << 16) + resLo;\n if (!signed) {\n sumext = res > 0xffffffffL ? 1 : 0;\n }\n } else if (!signed) {\n sumext = 0;\n }\n resHi = (int) ((res >> 16) & 0xffff);\n resLo = (int) (res & 0xffff);\n if (DEBUG)\n log(\"String_Node_Str\" + res);\n break;\n case MPY32L:\n op1 = mpy32L = data;\n signed = false;\n accumulating = false;\n break;\n case MPY32H:\n mpy32H = data;\n op1 = (op1 & 0xffff) | (data << 16);\n break;\n case MPYS32L:\n if (!word && data >= 0x80) {\n data -= 0x100;\n }\n op1 = mpy32L = data;\n signed = true;\n accumulating = false;\n break;\n case MPYS32H:\n if (!word & data > 0x80) {\n data -= 0x100;\n }\n mpys32H = data;\n op1 = (op1 & 0xffff) | (data << 16);\n break;\n case MAC32L:\n op1 = mac32L = data;\n signed = false;\n accumulating = true;\n break;\n case MAC32H:\n mac32H = data;\n op1 = (op1 & 0xffff) | (data << 16);\n break;\n case MACS32L:\n if (!word & data > 0x80) {\n data -= 0x100;\n }\n op1 = macs32L = data;\n signed = true;\n accumulating = true;\n break;\n case MACS32H:\n if (!word & data > 0x80) {\n data -= 0x100;\n }\n macs32H = data;\n op1 = (op1 & 0xffff) | (data << 16);\n break;\n case OP2L:\n if (signed && !word && data >= 0x80) {\n data -= 0x80;\n }\n op2L = op2 = data;\n break;\n case OP2H:\n {\n long p;\n if (signed && !word && data >= 0x80) {\n data -= 0x80;\n }\n op2 = (op2 & 0xffff) | (data << 16);\n if (signed) {\n p = (long) op1 * (long) op2;\n } else {\n long uop1, uop2;\n uop1 = op1;\n if (uop1 < 0) {\n uop1 += 0x100000000L;\n }\n uop2 = op2;\n if (uop2 < 0) {\n uop2 += 0x100000000L;\n }\n p = uop1 * uop2;\n }\n if (accumulating) {\n res64 += p;\n } else {\n res64 = p;\n }\n resLo = res0 = (int) res64 & 0xffff;\n resHi = res1 = (int) (res64 >> 16) & 0xffff;\n res2 = (int) (res64 >> 32) & 0xffff;\n res3 = (int) (res64 >> 48) & 0xffff;\n break;\n }\n default:\n logw(WarningType.EMULATION_ERROR, \"String_Node_Str\" + Utils.hex(address, 4));\n break;\n }\n}\n"
"public int doStartTag() {\n RequestContext requestContext = (RequestContext) this.pageContext.getAttribute(RequestContextAwareTag.REQUEST_CONTEXT_PAGE_ATTRIBUTE);\n if (date == null && getPath() != null) {\n try {\n String resolvedPath = ExpressionEvaluationUtils.evaluateString(\"String_Node_Str\", getPath(), pageContext);\n String nestedPath = (String) pageContext.getAttribute(NestedPathTag.NESTED_PATH_VARIABLE_NAME, PageContext.REQUEST_SCOPE);\n if (nestedPath != null) {\n resolvedPath = nestedPath + resolvedPath;\n }\n BindStatus status = new BindStatus(requestContext, resolvedPath, false);\n log.debug(\"String_Node_Str\" + status);\n if (status.getValue() != null) {\n log.debug(\"String_Node_Str\" + status.getValue());\n if (status.getValue().getClass() == Date.class)\n date = (Date) status.getValue();\n else {\n log.debug(\"String_Node_Str\" + status.getValueType());\n Timestamp timestamp = (Timestamp) status.getEditor().getValue();\n date = new Date(timestamp.getTime());\n }\n }\n } catch (Exception e) {\n log.warn(\"String_Node_Str\" + getPath(), e);\n return SKIP_BODY;\n }\n }\n if (dateWasSet == false && date == null) {\n log.warn(\"String_Node_Str\" + pageContext.getPage() + \"String_Node_Str\" + pageContext.getRequest().getLocalName() + \"String_Node_Str\" + pageContext.getRequest().getRequestDispatcher(\"String_Node_Str\"));\n return SKIP_BODY;\n }\n if (type == null)\n type = \"String_Node_Str\";\n DateFormat dateFormat = null;\n if (format != null && format.length() > 0) {\n dateFormat = new SimpleDateFormat(format);\n } else if (type.equals(\"String_Node_Str\")) {\n dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n } else {\n log.debug(\"String_Node_Str\" + Context.getLocale());\n if (type.equals(\"String_Node_Str\")) {\n dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, Context.getLocale());\n } else if (type.equals(\"String_Node_Str\")) {\n dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, Context.getLocale());\n } else if (type.equals(\"String_Node_Str\")) {\n dateFormat = Context.getDateFormat();\n } else {\n dateFormat = Context.getDateFormat();\n }\n }\n if (dateFormat == null)\n dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n String datestr = \"String_Node_Str\";\n try {\n if (date != null) {\n datestr = dateFormat.format(date);\n }\n } catch (IllegalArgumentException e) {\n log.error(\"String_Node_Str\" + date);\n log.error(\"String_Node_Str\" + format);\n log.error(e);\n datestr = date.toString();\n }\n try {\n pageContext.getOut().write(datestr);\n } catch (IOException e) {\n log.error(e);\n }\n release();\n return SKIP_BODY;\n}\n"
"public void testRecordSubtypeChain() throws Exception {\n RecordTypeBuilder builder = new RecordTypeBuilder(registry);\n builder.addProperty(\"String_Node_Str\", STRING_TYPE, null);\n JSType aType = builder.build();\n builder = new RecordTypeBuilder(registry);\n builder.addProperty(\"String_Node_Str\", STRING_TYPE, null);\n builder.addProperty(\"String_Node_Str\", STRING_TYPE, null);\n JSType abType = builder.build();\n builder = new RecordTypeBuilder(registry);\n builder.addProperty(\"String_Node_Str\", STRING_TYPE, null);\n builder.addProperty(\"String_Node_Str\", STRING_TYPE, null);\n builder.addProperty(\"String_Node_Str\", NUMBER_TYPE, null);\n JSType abcType = builder.build();\n List<JSType> typeChain = Lists.newArrayList(registry.getNativeType(JSTypeNative.ALL_TYPE), registry.getNativeType(JSTypeNative.OBJECT_PROTOTYPE), registry.getNativeType(JSTypeNative.OBJECT_TYPE), aType, abOrAcType, abType, abcType, registry.getNativeType(JSTypeNative.NO_OBJECT_TYPE), registry.getNativeType(JSTypeNative.NO_TYPE));\n verifySubtypeChain(typeChain);\n}\n"
"public String getRelativeName() {\n return isSeparateFile() ? ResourceUtil.getRelativePath(fileUri.toString(), baseUri.toString(), \"String_Node_Str\") : fileUri.toString();\n}\n"
"protected void onReliableMessageReceived(int from, byte[] msg) {\n info(\"String_Node_Str\" + from + \"String_Node_Str\" + Utility.byteArrayToString(msg));\n}\n"
"public boolean isCompatible(DLNAResource resource) {\n if (PlayerUtil.isAudio(resource, Format.Identifier.AC3) || PlayerUtil.isAudio(resource, Format.Identifier.ADPCM) || PlayerUtil.isAudio(resource, Format.Identifier.ADTS) || PlayerUtil.isAudio(resource, Format.Identifier.AIFF) || PlayerUtil.isAudio(resource, Format.Identifier.APE) || PlayerUtil.isAudio(resource, Format.Identifier.ATRAC) || PlayerUtil.isAudio(resource, Format.Identifier.AU) || PlayerUtil.isAudio(resource, Format.Identifier.DSD) || PlayerUtil.isAudio(resource, Format.Identifier.DTS) || PlayerUtil.isAudio(resource, Format.Identifier.EAC3) || PlayerUtil.isAudio(resource, Format.Identifier.FLAC) || PlayerUtil.isAudio(resource, Format.Identifier.M4A) || PlayerUtil.isAudio(resource, Format.Identifier.MKA) || PlayerUtil.isAudio(resource, Format.Identifier.MLP) || PlayerUtil.isAudio(resource, Format.Identifier.MP3) || PlayerUtil.isAudio(resource, Format.Identifier.MPA) || PlayerUtil.isAudio(resource, Format.Identifier.MPC) || PlayerUtil.isAudio(resource, Format.Identifier.OGG) || PlayerUtil.isAudio(resource, Format.Identifier.RA) || PlayerUtil.isAudio(resource, Format.Identifier.SHN) || PlayerUtil.isAudio(resource, Format.Identifier.THREEGA) || PlayerUtil.isAudio(resource, Format.Identifier.THREEG2A) || PlayerUtil.isAudio(resource, Format.Identifier.THD) || PlayerUtil.isAudio(resource, Format.Identifier.TTA) || PlayerUtil.isAudio(resource, Format.Identifier.WAV) || PlayerUtil.isAudio(resource, Format.Identifier.WMA) || PlayerUtil.isAudio(resource, Format.Identifier.WV) || PlayerUtil.isWebAudio(resource)) {\n return true;\n }\n return false;\n}\n"
"public void testParsingBlankImportFollowedByClassDeclaration_538() throws Exception {\n runNegativeTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n ModuleNode mn = getModuleNode(\"String_Node_Str\");\n assertNotNull(mn);\n assertFalse(mn.encounteredUnrecoverableError());\n List<ImportNode> imports = mn.getImports();\n ImportNode recoveredImport = imports.get(0);\n assertEquals(\"String_Node_Str\", recoveredImport.getType().getName());\n ClassNode cn = mn.getClasses().get(0);\n assertNotNull(cn);\n assertEquals(\"String_Node_Str\", cn.getName());\n}\n"
"public static void handleOnCreate(CellContent content, IRowData rowData, ExecutionContext context, boolean fromGrid) {\n try {\n Object generateBy = content.getGenerateBy();\n if (generateBy == null) {\n return;\n }\n ReportItemDesign cellDesign = (ReportItemDesign) generateBy;\n ICellInstance cell = new CellInstance(content, rowData, context, fromGrid);\n if (handleJS(cell, cellDesign.getOnCreate(), context).didRun())\n return;\n ICellEventHandler eh = getEventHandler(cellDesign, context);\n if (eh != null)\n eh.onCreate(cell, context.getReportContext());\n } catch (Exception e) {\n addException(context, e);\n }\n}\n"
"public Node writeDescriptor(Node parent, WebBundleDescriptorImpl bundleDescriptor) {\n Element web = (Element) super.writeDescriptor(parent, bundleDescriptor);\n SunWebAppImpl sunWebApp = (SunWebAppImpl) bundleDescriptor.getSunDescriptor();\n appendTextChild(web, RuntimeTagNames.CONTEXT_ROOT, bundleDescriptor.getContextRoot());\n SecurityRoleMapping[] roleMappings = sunWebApp.getSecurityRoleMapping();\n if (roleMappings != null && roleMappings.length > 0) {\n SecurityRoleMappingNode srmn = new SecurityRoleMappingNode();\n for (int i = 0; i < roleMappings.length; i++) {\n srmn.writeDescriptor(web, RuntimeTagNames.SECURITY_ROLE_MAPPING, roleMappings[i]);\n }\n }\n Set servlets = bundleDescriptor.getServletDescriptors();\n org.glassfish.web.deployment.node.runtime.gf.ServletNode servletNode = new org.glassfish.web.deployment.node.runtime.gf.ServletNode();\n for (Iterator itr = servlets.iterator(); itr.hasNext(); ) {\n WebComponentDescriptor servlet = (WebComponentDescriptor) itr.next();\n servletNode.writeDescriptor(web, RuntimeTagNames.SERVLET, servlet);\n }\n IdempotentUrlPattern[] patterns = sunWebApp.getIdempotentUrlPatterns();\n if (patterns != null && patterns.length > 0) {\n IdempotentUrlPatternNode node = new IdempotentUrlPatternNode();\n for (int i = 0; i < patterns.length; i++) {\n node.writeDescriptor(web, RuntimeTagNames.IDEMPOTENT_URL_PATTERN, patterns[i]);\n }\n }\n if (sunWebApp.getSessionConfig() != null) {\n SessionConfigNode scn = new SessionConfigNode();\n scn.writeDescriptor(web, RuntimeTagNames.SESSION_CONFIG, sunWebApp.getSessionConfig());\n }\n Set<EjbReference> ejbRefs = bundleDescriptor.getEjbReferenceDescriptors();\n if (ejbRefs != null && ejbRefs.size() > 0) {\n EjbRefNode node = new EjbRefNode();\n for (EjbReference ejbRef : ejbRefs) {\n node.writeDescriptor(web, RuntimeTagNames.EJB_REF, ejbRef);\n }\n }\n Set<ResourceReferenceDescriptor> resourceRefs = bundleDescriptor.getResourceReferenceDescriptors();\n if (resourceRefs != null && resourceRefs.size() > 0) {\n ResourceRefNode node = new ResourceRefNode();\n for (ResourceReferenceDescriptor resourceRef : resourceRefs) {\n node.writeDescriptor(web, RuntimeTagNames.RESOURCE_REF, resourceRef);\n }\n }\n Set<ResourceEnvReferenceDescriptor> resourceEnvRefs = bundleDescriptor.getResourceEnvReferenceDescriptors();\n if (resourceEnvRefs != null && resourceEnvRefs.size() > 0) {\n ResourceEnvRefNode node = new ResourceEnvRefNode();\n for (ResourceEnvReferenceDescriptor resourceEnvRef : resourceEnvRefs) {\n node.writeDescriptor(web, RuntimeTagNames.RESOURCE_ENV_REF, resourceEnvRef);\n }\n }\n if (bundleDescriptor.hasServiceReferenceDescriptors()) {\n ServiceRefNode serviceNode = new ServiceRefNode();\n for (Iterator serviceItr = bundleDescriptor.getServiceReferenceDescriptors().iterator(); serviceItr.hasNext(); ) {\n ServiceReferenceDescriptor next = (ServiceReferenceDescriptor) serviceItr.next();\n serviceNode.writeDescriptor(web, WebServicesTagNames.SERVICE_REF, next);\n }\n }\n MessageDestinationRefNode.writeMessageDestinationReferences(web, bundleDescriptor);\n Cache cache = sunWebApp.getCache();\n if (cache != null) {\n CacheNode cn = new CacheNode();\n cn.writeDescriptor(web, RuntimeTagNames.CACHE, cache);\n }\n ClassLoader classLoader = sunWebApp.getClassLoader();\n if (classLoader != null) {\n ClassLoaderNode cln = new ClassLoaderNode();\n cln.writeDescriptor(web, RuntimeTagNames.CLASS_LOADER, classLoader);\n }\n if (sunWebApp.getJspConfig() != null) {\n WebPropertyNode propertyNode = new WebPropertyNode();\n Node jspConfig = appendChild(web, RuntimeTagNames.JSP_CONFIG);\n propertyNode.writeDescriptor(jspConfig, RuntimeTagNames.PROPERTY, sunWebApp.getJspConfig().getWebProperty());\n }\n if (sunWebApp.getLocaleCharsetInfo() != null) {\n LocaleCharsetInfoNode localeNode = new LocaleCharsetInfoNode();\n localeNode.writeDescriptor(web, RuntimeTagNames.LOCALE_CHARSET_INFO, sunWebApp.getLocaleCharsetInfo());\n }\n if (sunWebApp.isParameterEncoding()) {\n Element parameter = appendChild(web, RuntimeTagNames.PARAMETER_ENCODING);\n if (sunWebApp.getAttributeValue(SunWebApp.PARAMETER_ENCODING, SunWebApp.FORM_HINT_FIELD) != null) {\n setAttribute(parameter, RuntimeTagNames.FORM_HINT_FIELD, sunWebApp.getAttributeValue(SunWebApp.PARAMETER_ENCODING, SunWebApp.FORM_HINT_FIELD));\n }\n if (sunWebApp.getAttributeValue(SunWebApp.PARAMETER_ENCODING, SunWebApp.DEFAULT_CHARSET) != null) {\n setAttribute(parameter, RuntimeTagNames.DEFAULT_CHARSET, sunWebApp.getAttributeValue(SunWebApp.PARAMETER_ENCODING, SunWebApp.DEFAULT_CHARSET));\n }\n }\n if (sunWebApp.getWebProperty() != null) {\n WebPropertyNode props = new WebPropertyNode();\n props.writeDescriptor(web, RuntimeTagNames.PROPERTY, sunWebApp.getWebProperty());\n }\n if (sunWebApp.getValve() != null) {\n ValveNode valve = new ValveNode();\n valve.writeDescriptor(web, RuntimeTagNames.VALVE, sunWebApp.getValve());\n }\n RuntimeDescriptorNode.writeMessageDestinationInfo(web, bundleDescriptor);\n WebServiceRuntimeNode webServiceNode = new WebServiceRuntimeNode();\n webServiceNode.writeWebServiceRuntimeInfo(web, bundleDescriptor);\n if (sunWebApp.getAttributeValue(SunWebApp.ERROR_URL) != null) {\n setAttribute(web, RuntimeTagNames.ERROR_URL, sunWebApp.getAttributeValue(SunWebApp.ERROR_URL));\n }\n if (sunWebApp.getAttributeValue(SunWebApp.HTTPSERVLET_SECURITY_PROVIDER) != null) {\n setAttribute(web, RuntimeTagNames.HTTPSERVLET_SECURITY_PROVIDER, sunWebApp.getAttributeValue(SunWebApp.HTTPSERVLET_SECURITY_PROVIDER));\n }\n appendTextChild(web, RuntimeTagNames.KEEP_STATE, String.valueOf(bundleDescriptor.getKeepState()));\n return web;\n}\n"
"public void setLargeString(String largeString) {\n _largeString = processString(largeString);\n repaint();\n}\n"
"public <KB extends KnowledgeBase> KB load(Class<KB> klass) {\n openDB();\n Atomic.Var<KB> knowledgeBaseVar = db.getAtomicVar(\"String_Node_Str\");\n return knowledgeBaseVar.get();\n}\n"
"private int compareColumnValue(DataSetRow m1, DataSetRow m2, int depth) {\n if (depth >= _priorities.length)\n return 0;\n int columnNumber = _priorities[depth];\n int direction = _directions[columnNumber];\n int result = 0;\n Object o1 = m1.getPrettyObjectValue(columnNumber);\n Object o2 = m2.getPrettyObjectValue(columnNumber);\n if (\"String_Node_Str\".equals(o1) || \"String_Node_Str\".equals(o2)) {\n if (\"String_Node_Str\".equals(o1) && !\"String_Node_Str\".equals(o2)) {\n result = 1;\n } else if (o1 != null && o2 == null) {\n result = -1;\n } else {\n result = 0;\n }\n if (result == 0) {\n return compareColumnValue(m1, m2, depth + 1);\n }\n if (direction == SWT.DOWN) {\n return result * -1;\n }\n return result;\n }\n if (o1 instanceof Comparable && o2 instanceof Comparable)\n result = ((Comparable) o1).compareTo((Comparable) o2);\n if (result == 0)\n return compareColumnValue(m1, m2, depth + 1);\n if (direction == SWT.DOWN) {\n return result * -1;\n }\n return result;\n}\n"
"private int encodeHash(long x, int p, int sp) {\n int idx = (int) (x >>> (64 - sp));\n int zeroTest = 0;\n if (p < sp) {\n zeroTest = idx << ((32 - sp) + p);\n }\n if (zeroTest == 0) {\n final int runLength = Long.numberOfLeadingZeros((x << this.p) | (1 << (this.p - 1))) + 1;\n int invrl = runLength ^ 63;\n return idx << 6 | invrl << 1 | 1;\n } else {\n return idx << 1;\n }\n}\n"
"public void setCallDateFromCallLogDateTime() {\n DateTimeFormatter formatter = DateTimeFormat.forPattern(\"String_Node_Str\");\n callDateFromCallLogDateTime = formatter.print(callLog.getStartTime());\n}\n"
"public void render(StringOutput sb, Renderer renderer, Object val, Locale locale, int alignment, String action) {\n int indent;\n String type;\n String title;\n String altText;\n if (val instanceof Map) {\n Map nodeData = (Map) val;\n Integer indentObj = (Integer) nodeData.get(AssessmentHelper.KEY_INDENT);\n indent = (indentObj == null ? 0 : indentObj.intValue());\n type = (String) nodeData.get(AssessmentHelper.KEY_TYPE);\n title = (String) nodeData.get(AssessmentHelper.KEY_TITLE_SHORT);\n altText = (String) nodeData.get(AssessmentHelper.KEY_TITLE_LONG);\n } else if (val instanceof NodeTableRow) {\n NodeTableRow row = (NodeTableRow) val;\n indent = row.getIndent();\n type = row.getType();\n title = row.getShortTitle();\n altText = row.getLongTitle();\n } else {\n return;\n }\n String cssClass = CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type).getIconCSSClass();\n if (isIndentationEnabled()) {\n appendIndent(sb, indent);\n }\n sb.append(\"String_Node_Str\").append(cssClass).append(\"String_Node_Str\");\n if (altText != null) {\n sb.append(\"String_Node_Str\").append(StringHelper.escapeHtml(altText)).append(\"String_Node_Str\");\n }\n sb.append(\"String_Node_Str\");\n sb.append(StringHelper.escapeHtml(title));\n sb.append(\"String_Node_Str\");\n}\n"
"public TermsEnum intersect(CompiledAutomaton compiled, BytesRef startTerm) throws IOException {\n return new ExitableTermsEnum(_terms.intersect(compiled, startTerm), _exitObject);\n}\n"
"public void setBuyableCerts() {\n if (!mayCurrentPlayerBuyAnything())\n return;\n List<PublicCertificateI> certs;\n PublicCertificateI cert;\n PublicCompanyI comp;\n StockSpaceI stockSpace;\n Portfolio from;\n int price;\n int number;\n int playerCash = currentPlayer.getCash();\n PublicCompanyI companyBoughtThisTurn = (PublicCompanyI) companyBoughtThisTurnWrapper.getObject();\n if (companyBoughtThisTurn == null) {\n from = ipo;\n Map<String, List<PublicCertificateI>> map = from.getCertsPerCompanyMap();\n int shares;\n for (String compName : map.keySet()) {\n certs = map.get(compName);\n if (certs == null || certs.isEmpty())\n continue;\n cert = certs.get(0);\n comp = cert.getCompany();\n if (isSaleRecorded(currentPlayer, comp))\n continue;\n if (currentPlayer.maxAllowedNumberOfSharesToBuy(comp, cert.getShare()) < 1)\n continue;\n shares = cert.getShares();\n if (!cert.isPresidentShare()) {\n if (cert.getCertificatePrice() <= playerCash) {\n possibleActions.add(new BuyCertificate(cert, from));\n }\n } else if (!comp.hasStarted()) {\n if (comp.getParPrice() != null) {\n price = comp.getParPrice().getPrice() * cert.getShares();\n possibleActions.add(new StartCompany(cert, price));\n } else {\n List<Integer> startPrices = new ArrayList<Integer>();\n for (int startPrice : stockMarket.getStartPrices()) {\n if (startPrice * shares <= playerCash) {\n startPrices.add(startPrice);\n }\n }\n if (startPrices.size() > 0) {\n int[] prices = new int[startPrices.size()];\n Arrays.sort(prices);\n for (int i = 0; i < prices.length; i++) {\n prices[i] = startPrices.get(i);\n }\n possibleActions.add(new StartCompany(cert, prices));\n }\n }\n } else if (comp.hasParPrice()) {\n price = comp.getParPrice().getPrice() * cert.getShares();\n if (price <= playerCash) {\n possibleActions.add(new BuyCertificate(cert, from, price));\n }\n }\n }\n }\n from = pool;\n Map<String, List<PublicCertificateI>> map = from.getCertsPerCompanyMap();\n for (String compName : map.keySet()) {\n certs = map.get(compName);\n if (certs == null || certs.isEmpty())\n continue;\n number = certs.size();\n cert = certs.get(0);\n comp = cert.getCompany();\n if (isSaleRecorded(currentPlayer, comp))\n continue;\n if (currentPlayer.maxAllowedNumberOfSharesToBuy(comp, cert.getShare()) < 1)\n continue;\n stockSpace = comp.getCurrentPrice();\n price = stockSpace.getPrice();\n if (companyBoughtThisTurn != null) {\n if (comp != companyBoughtThisTurn)\n continue;\n if (!stockSpace.isNoBuyLimit())\n continue;\n }\n if (!stockSpace.isNoBuyLimit()) {\n number = 1;\n if (!currentPlayer.mayBuyCompanyShare(comp, number))\n continue;\n if (!stockSpace.isNoCertLimit() && !currentPlayer.mayBuyCertificate(comp, number))\n continue;\n }\n while (number > 0 && playerCash < number * price) number--;\n if (number > 0) {\n possibleActions.add(new BuyCertificate(cert, from, price, number));\n }\n }\n if (gameManager.canAnyCompanyHoldShares()) {\n for (PublicCompanyI company : companyManager.getAllPublicCompanies()) {\n certs = company.getPortfolio().getCertificatesPerCompany(company.getName());\n if (certs == null || certs.isEmpty())\n continue;\n cert = certs.get(0);\n if (isSaleRecorded(currentPlayer, company))\n continue;\n if (!currentPlayer.mayBuyCompanyShare(company, 1))\n continue;\n if (currentPlayer.maxAllowedNumberOfSharesToBuy(company, certs.get(0).getShare()) < 1)\n continue;\n stockSpace = company.getCurrentPrice();\n if (!stockSpace.isNoCertLimit() && !currentPlayer.mayBuyCertificate(company, 1))\n continue;\n if (cert.getCertificatePrice() <= playerCash) {\n possibleActions.add(new BuyCertificate(cert, company.getPortfolio()));\n }\n }\n }\n}\n"
"public void onComplete(Bundle values, FacebookException facebookException) {\n parseFacebookFeedError(values, facebookException);\n}\n"
"public void linkChains2Compound(Structure s) {\n List<Compound> compounds = s.getCompounds();\n for (Compound comp : compounds) {\n List<Chain> chains = new ArrayList<Chain>();\n List<String> chainIds = comp.getChainIds();\n if (chainIds == null)\n continue;\n for (String chainId : chainIds) {\n if (chainId.equals(\"String_Node_Str\"))\n chainId = \"String_Node_Str\";\n try {\n Chain c = s.findChain(chainId);\n chains.add(c);\n } catch (StructureException e) {\n logger.error(\"String_Node_Str\", e);\n }\n }\n comp.setChains(chains);\n }\n if (compounds.size() == 1) {\n Compound comp = compounds.get(0);\n if (comp.getChainIds() == null) {\n List<Chain> chains = s.getChains(0);\n if (chains.size() == 1) {\n Chain ch = chains.get(0);\n List<String> chainIds = new ArrayList<String>();\n chainIds.add(ch.getChainID());\n comp.setChainIds(chainIds);\n comp.addChain(ch);\n }\n }\n }\n for (Compound comp : compounds) {\n if (comp.getChainIds() == null) {\n continue;\n }\n for (String chainId : comp.getChainIds()) {\n if (chainId.equals(\"String_Node_Str\"))\n continue;\n try {\n Chain c = s.getChainByPDB(chainId);\n c.setCompound(comp);\n } catch (StructureException e) {\n e.printStackTrace();\n }\n }\n }\n}\n"
"public synchronized Integer getStartStatesTaskCount(String taskRoleName) {\n int startStatesTaskCount = 0;\n List<TaskStatus> taskStatusList = taskStatuseses.get(taskRoleName).getTaskStatusArray();\n for (TaskStatus taskStatus : taskStatusList) {\n if (!TaskStateDefinition.START_STATES.contains(taskStatus.getTaskState())) {\n unassociatedTastCount++;\n }\n }\n return unassociatedTastCount;\n}\n"
"private int findForAdd(long key) {\n int theHashCode = (int) key & 0x7FFFFFFF;\n long[] keys = this.keys;\n int hashSize = keys.length;\n int jump = 1 + theHashCode % (hashSize - 2);\n int index = theHashCode % hashSize;\n long currentKey = keys[index];\n while ((currentKey != NULL) && (currentKey != REMOVED) && (key != currentKey)) {\n if (index < jump) {\n index += hashSize - jump;\n } else {\n index -= jump;\n }\n currentKey = keys[index];\n }\n return index;\n}\n"
"public static Group[] search(Context context, String query, int offset, int limit) throws SQLException {\n String params = \"String_Node_Str\" + query.toLowerCase() + \"String_Node_Str\";\n StringBuffer queryBuf = new StringBuffer();\n queryBuf.append(\"String_Node_Str\");\n if (\"String_Node_Str\".equals(ConfigurationManager.getProperty(\"String_Node_Str\"))) {\n if (limit > 0 || offset > 0) {\n queryBuf.insert(0, \"String_Node_Str\");\n queryBuf.append(\"String_Node_Str\");\n }\n if (limit > 0) {\n queryBuf.append(\"String_Node_Str\");\n if (offset > 0)\n limit += offset;\n }\n if (offset > 0) {\n queryBuf.insert(0, \"String_Node_Str\");\n queryBuf.append(\"String_Node_Str\");\n }\n } else {\n if (limit > 0)\n queryBuf.append(\"String_Node_Str\");\n if (offset > 0)\n queryBuf.append(\"String_Node_Str\");\n }\n Integer int_param;\n try {\n int_param = Integer.valueOf(query);\n } catch (NumberFormatException e) {\n int_param = new Integer(-1);\n }\n TableRowIterator rows = DatabaseManager.query(context, dbquery, new Object[] { params, int_param });\n List groupRows = rows.toList();\n Group[] groups = new Group[groupRows.size()];\n for (int i = 0; i < groupRows.size(); i++) {\n TableRow row = (TableRow) groupRows.get(i);\n Group fromCache = (Group) context.fromCache(Group.class, row.getIntColumn(\"String_Node_Str\"));\n if (fromCache != null) {\n groups[i] = fromCache;\n } else {\n groups[i] = new Group(context, row);\n }\n }\n return groups;\n}\n"
"static RenderingHints mergeRenderingHints(RenderingHints defaultHints, RenderingHints hints) {\n RenderingHints mergedHints;\n if (hints == null || hints.isEmpty()) {\n mergedHints = defaultHints;\n } else if (defaultHints == null || defaultHints.isEmpty()) {\n mergedHints = hints;\n } else {\n mergedHints = new RenderingHints((Map) defaultHints);\n mergedHints.add(hints);\n }\n return mergedHints;\n}\n"
"public void run() {\n while (!stopOperation) {\n try {\n NetworkMessage msg = messageQueue.take();\n Schema schema;\n byte classType;\n if (msg instanceof PlayerRegistrationMessage) {\n schema = playerRegSchema;\n classType = 1;\n } else if (msg instanceof NetworkMessageMedium) {\n schema = mediumMsgSchema;\n classType = 2;\n } else if (msg instanceof NetworkMessageLarge) {\n schema = largeMsgSchema;\n classType = 3;\n } else {\n schema = networkMsgSchema;\n classType = 0;\n }\n byte[] serializedObject = ProtostuffIOUtil.toByteArray(msg, schema, buffer);\n b.clear();\n b.putInt(serializedObject.length);\n byte[] lengthField = b.array();\n byte[] message = new byte[serializedObject.length + lengthField.length + 1];\n message[0] = classType;\n System.arraycopy(lengthField, 0, message, 1, lengthField.length);\n System.arraycopy(serializedObject, 0, message, lengthField.length + 1, serializedObject.length);\n if (message.length > 8000) {\n System.out.println(\"String_Node_Str\" + message.length + \"String_Node_Str\");\n int bytesWriten = 0;\n while (bytesWriten != message.length) {\n if (message.length - bytesWriten > 4096) {\n os.write(message, bytesWriten, 4096);\n bytesWriten += 4096;\n System.out.println(\"String_Node_Str\" + bytesWriten + \"String_Node_Str\" + message.length + \"String_Node_Str\");\n } else {\n os.write(message, bytesWriten, message.length - bytesWriten);\n bytesWriten += message.length - bytesWriten;\n System.out.println(\"String_Node_Str\" + bytesWriten + \"String_Node_Str\" + message.length + \"String_Node_Str\");\n }\n }\n } else {\n os.write(message);\n }\n os.flush();\n } catch (IOException e) {\n System.err.println(\"String_Node_Str\" + e);\n } catch (InterruptedException e) {\n } catch (Exception e) {\n System.err.println(\"String_Node_Str\");\n e.printStackTrace(System.err);\n } finally {\n buffer.clear();\n }\n }\n}\n"
"public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) {\n RectangleInsets insets = getInsets();\n insets.trim(area);\n if (info != null) {\n info.setPlotArea(area);\n info.setDataArea(area);\n }\n drawBackground(g2, area);\n drawOutline(g2, area);\n Shape savedClip = g2.getClip();\n g2.clip(area);\n Composite originalComposite = g2.getComposite();\n g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, getForegroundAlpha()));\n if (!DatasetUtilities.isEmptyOrNull(this.dataset)) {\n int seriesCount = 0, catCount = 0;\n if (this.dataExtractOrder == TableOrder.BY_ROW) {\n seriesCount = this.dataset.getRowCount();\n catCount = this.dataset.getColumnCount();\n } else {\n seriesCount = this.dataset.getColumnCount();\n catCount = this.dataset.getRowCount();\n }\n if (this.maxValue == DEFAULT_MAX_VALUE) {\n calculateMaxValue(seriesCount, catCount);\n double gapHorizontal = area.getWidth() * getInteriorGap();\n double gapVertical = area.getHeight() * getInteriorGap();\n double X = area.getX() + gapHorizontal / 2;\n double Y = area.getY() + gapVertical / 2;\n double W = area.getWidth() - gapHorizontal;\n double H = area.getHeight() - gapVertical;\n double headW = area.getWidth() * this.headPercent;\n double headH = area.getHeight() * this.headPercent;\n double min = Math.min(W, H) / 2;\n X = (X + X + W) / 2 - min;\n Y = (Y + Y + H) / 2 - min;\n W = 2 * min;\n H = 2 * min;\n Point2D centre = new Point2D.Double(X + W / 2, Y + H / 2);\n Rectangle2D radarArea = new Rectangle2D.Double(X, Y, W, H);\n for (int cat = 0; cat < catCount; cat++) {\n double angle = getStartAngle() + (getDirection().getFactor() * cat * 360 / catCount);\n Point2D endPoint = getWebPoint(radarArea, angle, 1);\n Line2D line = new Line2D.Double(centre, endPoint);\n g2.setPaint(this.axisLinePaint);\n g2.setStroke(this.axisLineStroke);\n g2.draw(line);\n drawLabel(g2, radarArea, 0.0, cat, angle, 360.0 / catCount);\n }\n for (int series = 0; series < seriesCount; series++) {\n drawRadarPoly(g2, radarArea, centre, info, series, catCount, headH, headW);\n }\n } else {\n drawNoDataMessage(g2, area);\n }\n g2.setClip(savedClip);\n g2.setComposite(originalComposite);\n drawOutline(g2, area);\n}\n"
"public void close() throws IOException {\n super.close();\n isClosed = true;\n warmUpStrategy = NoWarmUpStrategy.INSTANCE;\n synchronized (consumerMonitor) {\n consumerMonitor.notifyAll();\n }\n debug(\"String_Node_Str\" + inputStreamBuffer.size());\n debug(\"String_Node_Str\" + consumeStrategy.isConsumed());\n while (!inputStreamBuffer.isEmpty() || !consumeStrategy.isConsumed()) {\n try {\n debug(\"String_Node_Str\" + inputStreamBuffer.size() + \"String_Node_Str\");\n synchronized (exhaustLock) {\n exhaustLock.wait(1000);\n }\n throwLastFailure();\n debug(\"String_Node_Str\");\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n }\n throwLastFailure();\n debug(\"String_Node_Str\");\n}\n"
"private Position decode235(Channel channel, SocketAddress remoteAddress, String protocol, String[] values) throws ParseException {\n int index = 0;\n String type = values[index++].substring(5);\n if (!type.equals(\"String_Node_Str\") && !type.equals(\"String_Node_Str\") && !type.equals(\"String_Node_Str\") && !type.equals(\"String_Node_Str\")) {\n return null;\n }\n Position position = new Position();\n position.setProtocol(getProtocolName());\n if (type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\")) {\n position.set(Position.KEY_ALARM, Position.ALARM_GENERAL);\n }\n DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, values[index++]);\n if (deviceSession == null) {\n return null;\n }\n position.setDeviceId(deviceSession.getDeviceId());\n if (protocol.equals(\"String_Node_Str\") || protocol.equals(\"String_Node_Str\")) {\n index += 1;\n }\n position.set(Position.KEY_VERSION_FW, values[index++]);\n DateFormat dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"String_Node_Str\"));\n position.setTime(dateFormat.parse(values[index++] + values[index++]));\n if (!protocol.equals(\"String_Node_Str\")) {\n index += 1;\n }\n position.setLatitude(Double.parseDouble(values[index++]));\n position.setLongitude(Double.parseDouble(values[index++]));\n position.setSpeed(UnitsConverter.knotsFromKph(Double.parseDouble(values[index++])));\n position.setCourse(Double.parseDouble(values[index++]));\n position.set(Position.KEY_SATELLITES, Integer.parseInt(values[index++]));\n position.setValid(values[index++].equals(\"String_Node_Str\"));\n position.set(Position.KEY_ODOMETER, Integer.parseInt(values[index++]));\n position.set(Position.KEY_POWER, Double.parseDouble(values[index++]));\n position.set(Position.PREFIX_IO + 1, values[index++]);\n index += 1;\n if (type.equals(\"String_Node_Str\")) {\n position.set(Position.KEY_INDEX, Integer.parseInt(values[index++]));\n }\n if (hbm) {\n if (index < values.length) {\n position.set(Position.KEY_HOURS, Integer.parseInt(values[index++]));\n }\n if (index < values.length) {\n position.set(Position.KEY_BATTERY, Double.parseDouble(values[index++]));\n }\n if (index < values.length && values[index++].equals(\"String_Node_Str\")) {\n position.set(Position.KEY_ARCHIVE, true);\n }\n if (includeAdc) {\n position.set(Position.PREFIX_ADC + 1, Double.parseDouble(values[index++]));\n position.set(Position.PREFIX_ADC + 2, Double.parseDouble(values[index++]));\n position.set(Position.PREFIX_ADC + 3, Double.parseDouble(values[index++]));\n }\n if (values.length - index >= 2) {\n String driverUniqueId = values[index++];\n if (values[index++].equals(\"String_Node_Str\") && !driverUniqueId.isEmpty()) {\n position.set(Position.KEY_DRIVER_UNIQUE_ID, driverUniqueId);\n }\n }\n if (includeTemp) {\n for (int i = 1; i <= 3; i++) {\n String temperature = values[index++];\n String value = temperature.substring(temperature.indexOf(':') + 1);\n if (!value.isEmpty()) {\n position.set(Position.PREFIX_TEMP + i, Double.parseDouble(value));\n }\n }\n }\n }\n return position;\n}\n"
"public void testSerializedProgress() throws Exception {\n DownloadManager manager = new DownloadManagerStub();\n FileManager fileman = new FileManagerStub();\n ActivityCallback callback = new ActivityCallbackStub();\n IncompleteFileManager ifm = new IncompleteFileManager();\n RemoteFileDesc rfd = newRFD(\"String_Node_Str\");\n File incompleteFile = ifm.getFile(rfd);\n int amountDownloaded = 100;\n VerifyingFile vf = new VerifyingFile(false);\n vf.addInterval(new Interval(0, amountDownloaded - 1));\n ifm.addEntry(incompleteFile, vf);\n ManagedDownloader downloader = new ManagedDownloader(\"String_Node_Str\", new RemoteFileDesc[] { rfd }, ifm);\n downloader.initialize(manager, fileman, callback);\n try {\n Thread.sleep(200);\n } catch (InterruptedException e) {\n }\n assertEquals(amountDownloaded, downloader.getAmountRead());\n try {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ObjectOutputStream out = new ObjectOutputStream(baos);\n out.writeObject(downloader);\n out.flush();\n out.close();\n downloader.stop();\n ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));\n downloader = (ManagedDownloader) in.readObject();\n in.close();\n downloader.initialize(manager, fileman, callback);\n } catch (IOException e) {\n fail(\"String_Node_Str\", e);\n }\n try {\n Thread.sleep(200);\n } catch (InterruptedException e) {\n }\n assertEquals(amountDownloaded, downloader.getAmountRead());\n downloader.stop();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n }\n}\n"
"double computeTreeSTBipartitions(MGDInference_DP inference) {\n double unweigthedConstant = 0;\n double weightedConstant = 0;\n int k = inference.trees.size();\n String[] leaves = stTaxa;\n int n = leaves.length;\n boolean duploss = (inference.optimizeDuploss == 3);\n geneTreeSTBCount = new HashMap<STBipartition, Integer>(k * n);\n geneTreeInvalidSTBCont = new HashMap<AbstractMap.SimpleEntry<STITreeCluster, STITreeCluster>, Integer>();\n STITreeCluster all = new STITreeCluster();\n for (int i = 0; i < stTaxa.length; i++) {\n all.addLeaf(i);\n }\n addToClusters(all, leaves.length, false);\n for (int t = 0; t < inference.trees.size(); t++) {\n Tree tr = inference.trees.get(t);\n STITreeCluster allInducedByGT = new STITreeCluster();\n String[] gtLeaves = tr.getLeaves();\n for (int i = 0; i < gtLeaves.length; i++) {\n String l = gtLeaves[i];\n allInducedByGT.addLeaf(GlobalMaps.taxonIdentifier.taxonId(getSpeciesName(l)));\n }\n treeAlls.add(allInducedByGT);\n int allInducedByGTSize = allInducedByGT.getClusterSize();\n weightedConstant += duploss ? 2 * (allInducedByGTSize - 1) : 0;\n unweigthedConstant += (tr.getLeafCount() - 1);\n Map<TNode, STITreeCluster> nodeToSTCluster = new HashMap<TNode, STITreeCluster>(n);\n for (TNode node : tr.postTraverse()) {\n if (node.isLeaf()) {\n String nodeName = getSpeciesName(node.getName());\n STITreeCluster cluster = new STITreeCluster();\n cluster.addLeaf(nodeName);\n addToClusters(cluster, 1, true);\n nodeToSTCluster.put(node, cluster);\n if (!rooted) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n } else {\n int childCount = node.getChildCount();\n STITreeCluster[] childbslist = new STITreeCluster[childCount];\n BitSet bs = new BitSet(leaves.length);\n int index = 0;\n for (TNode child : node.getChildren()) {\n childbslist[index++] = nodeToSTCluster.get(child);\n bs.or(nodeToSTCluster.get(child).getBitSet());\n }\n STITreeCluster cluster = new STITreeCluster();\n cluster.setCluster((BitSet) bs.clone());\n int size = cluster.getClusterSize();\n addToClusters(cluster, size, true);\n nodeToSTCluster.put(node, cluster);\n if (rooted) {\n if (index > 2) {\n throw new RuntimeException(\"String_Node_Str\" + tr + \"String_Node_Str\" + node);\n }\n STITreeCluster l_cluster = childbslist[0];\n STITreeCluster r_cluster = childbslist[1];\n tryAddingSTB(l_cluster, r_cluster, cluster, node, true);\n } else {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n }\n int s = 0;\n for (Integer c : geneTreeSTBCount.values()) {\n s += c;\n }\n System.err.println(\"String_Node_Str\" + geneTreeSTBCount.size());\n System.err.println(\"String_Node_Str\" + s);\n s = clusters.getClusterCount();\n System.err.println(\"String_Node_Str\" + s);\n weights = new HashMap<STBipartition, Integer>(geneTreeSTBCount.size() * 2);\n if (inference.DLbdWeigth == -1) {\n inference.DLbdWeigth = (weightedConstant + 2 * k + 0.0D) / 2 * (k * n);\n System.out.println(\"String_Node_Str\" + inference.DLbdWeigth);\n }\n return (unweigthedConstant + (1 - inference.DLbdWeigth) * weightedConstant);\n}\n"
"public void testDeleteById() throws Exception {\n testSave();\n listAll = dao.getAll();\n int size = listAll.size();\n Assert.assertEquals(1, size, DB_MUST_BE_NOT_EMPTY);\n for (Persistent p : listAll) {\n dao.delete(p.getId());\n }\n testDBEmpty();\n}\n"
"public static BufferBackedFileMetadata getMetadata(BabuDB database, String dbName, long parentId, String fileName) throws BabuDBException {\n byte[] rcKey = BabuDBStorageHelper.createFileKey(parentId, fileName, FileMetadata.RC_METADATA);\n byte[] rcValue = database.directLookup(dbName, BabuDBStorageManager.FILE_INDEX, rcKey);\n if (rcValue != null) {\n if (rcValue[0] == 2)\n return resolveLink(database, dbName, rcValue, fileName);\n byte[][] keyBufs = new byte[][] { BabuDBStorageHelper.createFileKey(parentId, fileName, FileMetadata.FC_METADATA), rcKey, BabuDBStorageHelper.createFileKey(parentId, fileName, FileMetadata.XLOC_METADATA) };\n byte[][] valBufs = new byte[][] { database.directLookup(dbName, BabuDBStorageManager.FILE_INDEX, keyBufs[0]), rcValue, database.directLookup(dbName, BabuDBStorageManager.FILE_INDEX, keyBufs[2]) };\n return new BufferBackedFileMetadata(keyBufs, valBufs, BabuDBStorageManager.FILE_INDEX);\n } else\n return null;\n}\n"
"public static DatabaseConnection fillDbConnectionInformation(DatabaseConnection dbConn, IMetadataConnection metadataConnection) {\n boolean noStructureExists = ConnectionHelper.getAllCatalogs(dbConn).isEmpty() && ConnectionHelper.getAllSchemas(dbConn).isEmpty();\n java.sql.Connection sqlConn = null;\n try {\n if (noStructureExists) {\n IMetadataConnection metaConnection = metadataConnection;\n if (metadataConnection == null) {\n metaConnection = ConvertionHelper.convert(dbConn);\n }\n EDatabaseTypeName currentEDatabaseType = EDatabaseTypeName.getTypeFromDbType(metaConnection.getDbType());\n if (currentEDatabaseType != null) {\n MetadataFillFactory dbInstance = MetadataFillFactory.getDBInstance(currentEDatabaseType);\n dbInstance.fillUIConnParams(metaConnection, dbConn);\n sqlConn = MetadataConnectionUtils.createConnection(metaConnection).getObject();\n if (sqlConn != null) {\n MetadataFillFactory.getDBInstance(currentDBUrlType).fillCatalogs(dbConn, databaseMetaData, metaConnection, MetadataConnectionUtils.getPackageFilter(dbConn, databaseMetaData, true));\n MetadataFillFactory.getDBInstance(currentDBUrlType).fillSchemas(dbConn, databaseMetaData, metaConnection, MetadataConnectionUtils.getPackageFilter(dbConn, databaseMetaData, false));\n }\n }\n }\n } catch (Exception e) {\n log.error(e, e);\n } finally {\n if (sqlConn != null) {\n ConnectionUtils.closeConnection(sqlConn);\n }\n closeDerbyDriver();\n }\n return dbConn;\n}\n"
"public Object previous() {\n if (nextIndex <= 0) {\n if (previous != null) {\n Object result = previous;\n previous = null;\n nextIndex--;\n lastIndex = nextIndex;\n return result;\n } else {\n throw new NoSuchElementException(\"String_Node_Str\" + nextIndex + \"String_Node_Str\" + source.size());\n }\n } else {\n nextIndex--;\n lastIndex = nextIndex;\n Object result = source.get(nextIndex);\n return result;\n }\n}\n"
"protected Object normalizePut(LValue val) {\n if (val.isNil()) {\n return null;\n } else if (val.isUserData()) {\n LUserData ud = (LUserData) val;\n return new LUserData(new WeakReference(ud.m_instance), ud.m_metatable);\n } else {\n return new WeakReference(val);\n }\n}\n"
"public void testGetConnection() throws Exception {\n HazelcastClient client = mock(HazelcastClient.class);\n InetSocketAddress inetSocketAddress = new InetSocketAddress(\"String_Node_Str\", 5701);\n final Connection connection = mock(Connection.class);\n final CountDownLatch latch = new CountDownLatch(2);\n final List<LifecycleState> lifecycleEvents = new ArrayList<LifecycleState>();\n final LifecycleServiceClientImpl lifecycleService = createLifecycleServiceClientImpl(client, lifecycleEvents);\n ConnectionManager connectionManager = new ConnectionManager(client, lifecycleService, inetSocketAddress, 60000) {\n\n protected Connection getNextConnection() {\n latch.countDown();\n return connection;\n }\n };\n ClientBinder binder = mock(ClientBinder.class);\n connectionManager.setBinder(binder);\n connectionManager.getConnection();\n assertEquals(connection, connectionManager.getConnection());\n verify(binder).bind(connection);\n assertEquals(connection, connectionManager.getConnection());\n assertEquals(1, latch.getCount());\n assertArrayEquals(new Object[] { LifecycleState.CLIENT_CONNECTION_OPENING }, lifecycleEvents.toArray());\n}\n"
"public void spawn() {\n if (enpc == null) {\n WorldServer ws = ((CraftWorld) l.getWorld()).getHandle();\n MinecraftServer ms = ((CraftServer) ws.getServer()).getServer();\n enpc = new EntityNPC(ms, ws, n, new ItemInWorldManager(ws));\n enpc.setLocation(l.getX(), l.getY(), l.getZ(), l.getYaw(), l.getPitch());\n ws.addEntity(enpc);\n ws.players.remove(enpc);\n if (plugin.spoutcraft) {\n for (Player p : plugin.getServer().getOnlinePlayers()) {\n plugin.spoutconnect.sendSkin(p, enpc.id, getSkinURL());\n }\n }\n }\n}\n"
"private void setSourceWin32Exe() throws IOException {\n sourceWin32Exe = new File(info.libDir, SOURCE_WIN32_EXE_FILENAME);\n if (!sourceWin32Exe.isFile()) {\n InputStream in = null;\n FileOutputStream out = null;\n try {\n in = WindowsService.class.getResourceAsStream(\"String_Node_Str\" + SOURCE_WIN32_EXE_FILENAME);\n out = new FileOutputStream(sourceWin32Exe);\n copyStream(in, out);\n trace(\"String_Node_Str\" + sourceWin32Exe);\n } finally {\n if (in != null)\n in.close();\n if (out != null)\n out.close();\n }\n }\n trace(\"String_Node_Str\" + sourceWin32Exe);\n}\n"
"protected void parseToken(Parser parser, IToken token) throws SyntaxError {\n boolean parsed;\n try {\n parsed = parser.parse(this, token);\n } catch (SyntaxError error) {\n throw error;\n } catch (Exception ex) {\n String message = ex.getMessage();\n if (message == null) {\n message = ex.getClass().getName();\n }\n DyvilCompiler.logger.throwing(\"String_Node_Str\", \"String_Node_Str\", ex);\n throw new SyntaxError(token, \"String_Node_Str\" + token.getText() + \"String_Node_Str\" + message);\n }\n if (!parsed) {\n throw new SyntaxError(token, \"String_Node_Str\" + token.getText() + \"String_Node_Str\");\n }\n}\n"
"public void updatePanel() {\n System.out.println(\"String_Node_Str\");\n Robot robot = Robot.getInstance();\n gps_switch.setState(robot.getGpsState());\n gps_switch.repaint();\n IMU_switch.setState(Robot.getInstance().getImuState());\n IMU_switch.repaint();\n frontCam_switch.setState(Robot.getInstance().getFrontCamState());\n frontCam_switch.repaint();\n backCam_switch.setState(Robot.getInstance().getBackCamState());\n backCam_switch.repaint();\n encoders_switch.setState(Robot.getInstance().getEncoderState());\n encoders_switch.updateSensorMessage_lbl(Robot.getInstance().getEncoderMsg());\n encoders_switch.repaint();\n controlInputs_switch.setState(Robot.getInstance().getControlInputState());\n controlInputs_switch.repaint();\n updateStartPause_btn();\n}\n"
"public ColumnBinaryMakerConfig getColumnBinaryMakerConfig(final ColumnBinaryMakerConfig commonConfig, final IColumnAnalizeResult analizeResult) {\n ColumnBinaryMakerConfig currentConfig = new ColumnBinaryMakerConfig(commonConfig);\n StringColumnAnalizeResult castColumnAnalizeResult = (StringColumnAnalizeResult) analizeResult;\n IColumnBinaryMaker makerClass;\n if (castColumnAnalizeResult.maybeSorted()) {\n makerClass = rangeUniqColumnBinaryMaker;\n } else {\n int dump = dumpColumnBinaryMaker.calcBinarySize(analizeResult);\n int uniq = uniqColumnBinaryMaker.calcBinarySize(analizeResult);\n if (dump < uniq) {\n makerClass = dumpColumnBinaryMaker;\n } else {\n makerClass = uniqColumnBinaryMaker;\n }\n }\n if (currentConfig.stringMakerClass.getClass().getName().equals(makerClass.getClass().getName())) {\n return null;\n }\n currentConfig.stringMakerClass = makerClass;\n return currentConfig;\n}\n"
"private HashMap<Integer, String> getSeatDatas(int classId) throws SQLException {\n HashMap<Integer, String> map = new HashMap<Integer, String>();\n SafeResultSet resultSet = DataBase.getInstance().executeQuery(\"String_Node_Str\", classId);\n while (resultSet.next()) {\n map.put(resultSet.getInt(\"String_Node_Str\"), AES256.decrypt(resultSet.getString(\"String_Node_Str\")));\n }\n return map;\n}\n"
"public void testGetFileForOutput() throws IOException {\n CachingFileManager fm = new CachingFileManager(CachingArchiveProvider.getDefault(), bCp, null, SourceLevelUtils.JDK1_8, false, true);\n JavaFileObject res = (JavaFileObject) fm.getFileForOutput(StandardLocation.CLASS_PATH, \"String_Node_Str\", \"String_Node_Str\", null);\n assertEquals(Arrays.asList(\"String_Node_Str\"), toContent(Collections.<JavaFileObject>singleton(res)));\n assertEquals(Arrays.asList(\"String_Node_Str\"), toInferedName(fm, Collections.<JavaFileObject>singleton(res)));\n fm = new CachingFileManager(CachingArchiveProvider.getDefault(), mvCp, null, Source.JDK1_8, false, true);\n res = (JavaFileObject) fm.getFileForOutput(StandardLocation.CLASS_PATH, \"String_Node_Str\", \"String_Node_Str\", null);\n assertEquals(Arrays.asList(\"String_Node_Str\"), toContent(Collections.<JavaFileObject>singleton(res)));\n assertEquals(Arrays.asList(\"String_Node_Str\"), toInferedName(fm, Collections.<JavaFileObject>singleton(res)));\n fm = new CachingFileManager(CachingArchiveProvider.getDefault(), bCp, null, Source.JDK1_9, false, true);\n res = (JavaFileObject) fm.getFileForOutput(StandardLocation.CLASS_PATH, \"String_Node_Str\", \"String_Node_Str\", null);\n assertEquals(Arrays.asList(\"String_Node_Str\"), toContent(Collections.<JavaFileObject>singleton(res)));\n assertEquals(Arrays.asList(\"String_Node_Str\"), toInferedName(fm, Collections.<JavaFileObject>singleton(res)));\n fm = new CachingFileManager(CachingArchiveProvider.getDefault(), mvCp, null, Source.JDK1_9, false, true);\n res = (JavaFileObject) fm.getFileForOutput(StandardLocation.CLASS_PATH, \"String_Node_Str\", \"String_Node_Str\", null);\n assertEquals(Arrays.asList(\"String_Node_Str\"), toContent(Collections.<JavaFileObject>singleton(res)));\n assertEquals(Arrays.asList(\"String_Node_Str\"), toInferedName(fm, Collections.<JavaFileObject>singleton(res)));\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n setContentView(R.layout.activity_linechart);\n tvX = (TextView) findViewById(R.id.tvXMax);\n tvY = (TextView) findViewById(R.id.tvYMax);\n mSeekBarX = (SeekBar) findViewById(R.id.seekBar1);\n mSeekBarY = (SeekBar) findViewById(R.id.seekBar2);\n mSeekBarX.setProgress(45);\n mSeekBarY.setProgress(100);\n mSeekBarY.setOnSeekBarChangeListener(this);\n mSeekBarX.setOnSeekBarChangeListener(this);\n mChart = (LineChart) findViewById(R.id.chart1);\n mChart.setViewPortOffsets(0, 0, 0, 0);\n mChart.setBackgroundColor(Color.rgb(104, 241, 175));\n mChart.setDescription(\"String_Node_Str\");\n mChart.setTouchEnabled(true);\n mChart.setDragEnabled(true);\n mChart.setScaleEnabled(true);\n mChart.setPinchZoom(false);\n mChart.setDrawGridBackground(false);\n tf = Typeface.createFromAsset(getAssets(), \"String_Node_Str\");\n XAxis x = mChart.getXAxis();\n x.setEnabled(false);\n YAxis y = mChart.getAxisLeft();\n y.setTypeface(tf);\n y.setLabelCount(6, false);\n y.setTextColor(Color.WHITE);\n y.setPosition(YAxis.YAxisLabelPosition.INSIDE_CHART);\n y.setDrawGridLines(false);\n y.setAxisLineColor(Color.WHITE);\n mChart.getAxisRight().setEnabled(false);\n setData(45, 100);\n mChart.getLegend().setEnabled(false);\n mChart.animateXY(2000, 2000);\n mChart.invalidate();\n}\n"
"public void modifyText(ModifyEvent e) {\n metadata.put(IParameterConstant.ANALYSIS_AUTHOR, authorText.getText());\n getConnectionParams().setMetadate(metadata);\n}\n"
"private Node createExternObjectLit(Node exportedObjectLit) {\n Node lit = IR.objectlit();\n lit.setTypeI(exportedObjectLit.getTypeI());\n lit.setJSDocInfo(buildEmptyJSDoc());\n int index = 1;\n for (Node child = exportedObjectLit.getFirstChild(); child != null; child = child.getNext()) {\n if (child.isStringKey()) {\n lit.addChildToBack(IR.propdef(IR.stringKey(child.getString()), IR.number(index++)));\n }\n }\n return lit;\n}\n"
"public void testSetReplyToAddressFromDestinationWithNullDestination() {\n AmqpJmsMessageFacade message = Mockito.mock(AmqpJmsMessageFacade.class);\n helper.setReplyToAddressFromDestination(message, null);\n Mockito.verify(message).setReplyToAddress(null);\n Mockito.verify(message).removeAnnotation(REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME);\n}\n"
"private void addParticleDetail(XSDSchema xsdSchema, XSDParticle xsdParticle, ATreeNode parentNode, String currentPath) throws OdaException, IllegalAccessException, InvocationTargetException {\n XSDTerm xsdTerm = xsdParticle.getTerm();\n if (xsdTerm instanceof XSDElementDeclaration) {\n XSDElementDeclaration xsdElementDeclarationParticle = (XSDElementDeclaration) xsdTerm;\n ATreeNode partNode = new ATreeNode();\n String elementName = xsdElementDeclarationParticle.getName();\n String prefix = null;\n String namespace = xsdElementDeclarationParticle.getTargetNamespace();\n XSDTypeDefinition typeDef = xsdElementDeclarationParticle.getTypeDefinition();\n if (typeDef == null) {\n XSDSchema schemaFromNamespace = getXSDSchemaFromNamespace(namespace);\n if (schemaFromNamespace == null) {\n schemaFromNamespace = xsdSchema;\n }\n xsdElementDeclarationParticle = schemaFromNamespace.resolveElementDeclarationURI(xsdElementDeclarationParticle.getURI());\n typeDef = xsdElementDeclarationParticle.getTypeDefinition();\n }\n String typeNamespace = typeDef.getTargetNamespace();\n if (typeNamespace != null && !typeNamespace.equals(namespace)) {\n XSDSchema schemaOfType = getXSDSchemaFromNamespace(typeNamespace);\n if (schemaOfType != null) {\n XSDTypeDefinition typeDefinition = schemaOfType.resolveComplexTypeDefinitionURI(typeDef.getURI());\n if (typeDefinition != null && typeDefinition.getContainer() != null) {\n typeDef = typeDefinition;\n }\n }\n }\n if (namespace != null) {\n prefix = namespaceToPrefix.get(namespace);\n if (prefix == null) {\n prefix = ((XSDElementDeclaration) xsdTerm).getQName().contains(\"String_Node_Str\") ? ((XSDElementDeclaration) xsdTerm).getQName().split(\"String_Node_Str\")[0] : \"String_Node_Str\";\n if (isEnableGeneratePrefix() && (prefix == null || prefix.isEmpty())) {\n prefix = \"String_Node_Str\" + prefixNumberGenerated;\n prefixNumberGenerated++;\n }\n if (namespaceToPrefix.containsValue(prefix)) {\n prefix = prefix + prefixNumberGenerated;\n prefixNumberGenerated++;\n }\n if (prefix != null && !prefix.isEmpty()) {\n namespaceToPrefix.put(namespace, prefix);\n } else {\n ATreeNode namespaceNode = new ATreeNode();\n namespaceNode.setDataType(\"String_Node_Str\");\n namespaceNode.setType(ATreeNode.NAMESPACE_TYPE);\n namespaceNode.setValue(namespace);\n partNode.addChild(namespaceNode);\n }\n }\n }\n partNode.setCurrentNamespace(namespace);\n if (prefix != null && !prefix.isEmpty()) {\n elementName = prefix + \"String_Node_Str\" + elementName;\n }\n partNode.setValue(elementName);\n partNode.setType(ATreeNode.ELEMENT_TYPE);\n partNode.setDataType(xsdElementDeclarationParticle.getName());\n parentNode.addChild(partNode);\n boolean resolvedAsComplex = false;\n if (typeDef instanceof XSDComplexTypeDefinition) {\n if (!currentPath.contains(\"String_Node_Str\" + elementName + \"String_Node_Str\")) {\n String path = currentPath + elementName + \"String_Node_Str\";\n XSDTypeDefinition xsdTypeDefinition = typeDef;\n if (xsdTypeDefinition != null && xsdTypeDefinition.getName() != null) {\n partNode.setDataType(xsdTypeDefinition.getQName());\n }\n addComplexTypeDetails(xsdSchema, partNode, xsdTypeDefinition, prefix, namespace, path);\n }\n resolvedAsComplex = true;\n } else if (typeDef.getTargetNamespace() != null) {\n resolvedAsComplex = true;\n if (!currentPath.contains(\"String_Node_Str\" + elementName + \"String_Node_Str\")) {\n String path = currentPath + elementName + \"String_Node_Str\";\n XSDComplexTypeDefinition generalType = xsdSchema.resolveComplexTypeDefinition(typeDef.getQName());\n XSDTypeDefinition xsdTypeDefinition = xsdElementDeclarationParticle.getTypeDefinition();\n if (generalType.getContainer() != null) {\n xsdTypeDefinition = generalType;\n }\n if (xsdTypeDefinition != null && xsdTypeDefinition.getName() != null) {\n partNode.setDataType(xsdTypeDefinition.getName());\n }\n if (xsdTypeDefinition instanceof XSDComplexTypeDefinition) {\n addComplexTypeDetails(xsdSchema, partNode, xsdTypeDefinition, prefix, namespace, path);\n } else {\n resolvedAsComplex = false;\n }\n }\n }\n if (!resolvedAsComplex) {\n String dataType = xsdElementDeclarationParticle.getTypeDefinition().getQName();\n if (dataType == null && xsdElementDeclarationParticle.getTypeDefinition().getBaseType() != null) {\n if (!\"String_Node_Str\".equals(xsdElementDeclarationParticle.getTypeDefinition().getBaseType().getQName())) {\n dataType = xsdElementDeclarationParticle.getTypeDefinition().getBaseType().getQName();\n }\n }\n partNode.setDataType(dataType);\n }\n handleOptionalAttribute(partNode, xsdParticle);\n addSubstitutionDetails(xsdSchema, partNode, xsdElementDeclarationParticle, null);\n } else if (xsdTerm instanceof XSDModelGroup) {\n XSDModelGroup xsdModelGroup = (XSDModelGroup) xsdTerm;\n ATreeNode node = addChoiceDetails(parentNode, xsdModelGroup);\n handleOptionalAttribute(node, xsdParticle);\n for (Object element : xsdModelGroup.getParticles()) {\n XSDParticle childParticle = (XSDParticle) element;\n addParticleDetail(xsdSchema, childParticle, node, currentPath);\n }\n }\n}\n"
"private void initLineChart() {\n mLineChart.setDescription(\"String_Node_Str\");\n mLineChart.setDragEnabled(false);\n mLineChart.setScaleEnabled(false);\n mLineChart.setTouchEnabled(true);\n mLineChart.setDrawGridBackground(false);\n mLineChart.setDrawBorders(false);\n mLineChart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);\n mLineChart.getXAxis().setDrawGridLines(false);\n mLineChart.getAxisRight().setEnabled(false);\n for (int j = 0; j < 12; j++) {\n xLineVals1.add(j + 1 + \"String_Node_Str\");\n }\n refreshLineChart(0);\n}\n"
"protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object obj, BindException errors) throws Exception {\n HttpSession httpSession = request.getSession();\n String view = getFormView();\n if (!errors.hasErrors()) {\n User loginUser = Context.getAuthenticatedUser();\n UserService us = Context.getUserService();\n User user = null;\n try {\n Context.addProxyPrivilege(OpenmrsConstants.PRIV_VIEW_USERS);\n user = us.getUser(loginUser.getUserId());\n } finally {\n Context.removeProxyPrivilege(OpenmrsConstants.PRIV_VIEW_USERS);\n }\n OptionsForm opts = (OptionsForm) obj;\n Map<String, String> properties = user.getUserProperties();\n properties.put(OpenmrsConstants.USER_PROPERTY_DEFAULT_LOCATION, opts.getDefaultLocation());\n properties.put(OpenmrsConstants.USER_PROPERTY_DEFAULT_LOCALE, opts.getDefaultLocale());\n properties.put(OpenmrsConstants.USER_PROPERTY_PROFICIENT_LOCALES, opts.getProficientLocales());\n properties.put(OpenmrsConstants.USER_PROPERTY_SHOW_RETIRED, opts.getShowRetiredMessage().toString());\n properties.put(OpenmrsConstants.USER_PROPERTY_SHOW_VERBOSE, opts.getVerbose().toString());\n properties.put(OpenmrsConstants.USER_PROPERTY_NOTIFICATION, opts.getNotification() == null ? \"String_Node_Str\" : opts.getNotification().toString());\n properties.put(OpenmrsConstants.USER_PROPERTY_NOTIFICATION_ADDRESS, opts.getNotificationAddress().toString());\n if (!opts.getOldPassword().equals(\"String_Node_Str\")) {\n try {\n String password = opts.getNewPassword();\n if (password.length() > 0) {\n try {\n OpenmrsUtil.validatePassword(user.getUsername(), password, String.valueOf(user.getUserId()));\n } catch (PasswordException e) {\n errors.reject(e.getMessage());\n }\n if (password.equals(opts.getOldPassword()) && !errors.hasErrors())\n errors.reject(\"String_Node_Str\");\n }\n if (!errors.hasErrors()) {\n us.changePassword(opts.getOldPassword(), password);\n if (properties.containsKey(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD))\n properties.remove(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD);\n }\n } catch (APIException e) {\n errors.rejectValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n } else {\n if (!opts.getNewPassword().equals(\"String_Node_Str\")) {\n errors.rejectValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n if (!opts.getSecretQuestionPassword().equals(\"String_Node_Str\")) {\n if (!errors.hasErrors()) {\n try {\n user.setSecretQuestion(opts.getSecretQuestionNew());\n us.changeQuestionAnswer(opts.getSecretQuestionPassword(), opts.getSecretQuestionNew(), opts.getSecretAnswerNew());\n } catch (APIException e) {\n errors.rejectValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n } else if (!opts.getSecretAnswerNew().equals(\"String_Node_Str\")) {\n errors.rejectValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (opts.getUsername().length() > 0 && !errors.hasErrors()) {\n try {\n Context.addProxyPrivilege(OpenmrsConstants.PRIV_VIEW_USERS);\n if (us.hasDuplicateUsername(user)) {\n errors.rejectValue(\"String_Node_Str\", \"String_Node_Str\");\n }\n } finally {\n Context.removeProxyPrivilege(OpenmrsConstants.PRIV_VIEW_USERS);\n }\n }\n if (!errors.hasErrors()) {\n user.setUsername(opts.getUsername());\n user.setUserProperties(properties);\n PersonName newPersonName = opts.getPersonName();\n PersonName existingPersonName = user.getPersonName();\n if (!existingPersonName.equalsContent(newPersonName)) {\n existingPersonName.setPreferred(false);\n existingPersonName.setVoided(true);\n existingPersonName.setVoidedBy(user);\n existingPersonName.setDateVoided(new Date());\n existingPersonName.setVoidReason(\"String_Node_Str\");\n newPersonName.setPreferred(true);\n user.addName(newPersonName);\n }\n try {\n Context.addProxyPrivilege(OpenmrsConstants.PRIV_EDIT_USERS);\n us.saveUser(user, null);\n } finally {\n Context.removeProxyPrivilege(OpenmrsConstants.PRIV_EDIT_USERS);\n }\n Context.refreshAuthenticatedUser();\n httpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, \"String_Node_Str\");\n } else {\n return super.processFormSubmission(request, response, opts, errors);\n }\n view = getSuccessView();\n }\n return new ModelAndView(new RedirectView(view));\n}\n"
"public void lock() {\n if (!lockRequired()) {\n return;\n }\n try {\n synchronized (lock) {\n while (checkStateBeforeLocking()) {\n if (timeout != -1) {\n lock.wait(timeout);\n } else {\n lock.wait();\n }\n }\n }\n if (getState() < STARTED) {\n workTimedOut();\n }\n if (lockRequired()) {\n synchronized (lock) {\n if (checkStateBeforeLocking()) {\n lock.wait();\n }\n }\n }\n } catch (Exception e) {\n setException(e);\n }\n}\n"
"private PopupMenu createPopupMenu() {\n PopupMenu popup = new PopupMenu(getContext(), popupMenuButton);\n if (!session.isPieceSelected(pieceIndex)) {\n popup.getMenu().add(Menu.NONE, MENU_ADD_PIECE, Menu.NONE, R.string.armor_set_builder_add_piece);\n } else {\n popup.getMenu().add(Menu.NONE, MENU_REMOVE_PIECE, Menu.NONE, R.string.armor_set_builder_remove_piece);\n popup.getMenu().add(Menu.NONE, MENU_PIECE_INFO, Menu.NONE, R.string.armor_set_builder_piece_info);\n }\n if (session.getAvailableSlots(pieceIndex) > 0) {\n popup.getMenu().add(Menu.NONE, MENU_ADD_DECORATION, Menu.NONE, R.string.armor_set_builder_add_decoration);\n }\n if (session.hasDecorations(pieceIndex)) {\n popup.getMenu().add(Menu.NONE, MENU_REMOVE_DECORATION, Menu.NONE, R.string.armor_set_builder_remove_decoration);\n }\n popup.setOnMenuItemClickListener(new PiecePopupMenuClickListener());\n return popup;\n}\n"
"private void addValueToDocPartRow(Map<Integer, Map<String, List<KVValue<?>>>> currentDocPartRow, TableRef tableRef, Integer pid, Integer seq, KVValue<?> value) {\n if (seq == null) {\n setDocPartRowValue(currentDocPartRow, tableRef, pid, null, ImmutableList.of(value));\n } else {\n addToDocPartRow(currentDocPartRow, tableRef, pid, seq, value);\n }\n}\n"
"public org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptContactComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent();\n copyElement(src, tgt);\n tgt.setName(src.getName());\n for (org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(convertContactPoint(t));\n return tgt;\n}\n"
"public void handleEvent(FutureEvent<Set<URN>> event) {\n LOG.debugf(\"String_Node_Str\", file);\n removeFutureForFile(file);\n if (contains(fd)) {\n addUrnsToFileDesc(fd, metadata, event, task, oldFileDesc);\n }\n if (event.getType() != FutureEvent.Type.CANCELLED) {\n broadcastFinished(file);\n }\n}\n"
"private final void clearUnusedColumnHints(DataSetHandle dataSetHandle, IResultMetaData metaData) throws BirtException {\n PropertyHandle handle = dataSetHandle.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP);\n if (handle != null && handle.getListValue() != null) {\n ArrayList list = handle.getListValue();\n int count = list.size();\n for (int n = count - 1; n >= 0; n--) {\n ColumnHint hint = (ColumnHint) list.get(n);\n String columnName = (String) hint.getProperty(handle.getModule(), ColumnHint.COLUMN_NAME_MEMBER);\n boolean found = false;\n if (!isEmpty(hint, handle.getModule().getModuleHandle())) {\n for (int m = 0; m < metaData.getColumnCount() && !found; m++) {\n found = columnName.equals(metaData.getColumnName(m + 1));\n }\n }\n if (!found) {\n try {\n handle.removeItem(hint);\n } catch (PropertyValueException e) {\n }\n }\n }\n }\n}\n"
"private void modifySourceStaticFieldInstructionsInTargetClass(MethodDeclaration sourceMethod, MethodDeclaration newMethodDeclaration, ASTRewrite targetRewriter) {\n ExpressionExtractor extractor = new ExpressionExtractor();\n List<Expression> sourceVariableInstructions = extractor.getVariableInstructions(sourceMethod.getBody());\n List<Expression> newVariableInstructions = extractor.getVariableInstructions(newMethodDeclaration.getBody());\n int i = 0;\n for (Expression expression : sourceVariableInstructions) {\n SimpleName simpleName = (SimpleName) expression;\n IBinding binding = simpleName.resolveBinding();\n if (binding != null && binding.getKind() == IBinding.VARIABLE) {\n IVariableBinding variableBinding = (IVariableBinding) binding;\n if (variableBinding.isField() && (variableBinding.getModifiers() & Modifier.STATIC) != 0) {\n if (declaredInSourceTypeDeclarationOrSuperclass(variableBinding)) {\n AST ast = newMethodDeclaration.getAST();\n SimpleName qualifier = ast.newSimpleName(sourceTypeDeclaration.getName().getIdentifier());\n if (simpleName.getParent() instanceof FieldAccess) {\n FieldAccess fieldAccess = (FieldAccess) newVariableInstructions.get(i).getParent();\n targetRewriter.set(fieldAccess, FieldAccess.EXPRESSION_PROPERTY, qualifier, null);\n } else if (!(simpleName.getParent() instanceof QualifiedName) && !RefactoringUtility.isEnumConstantInSwitchCaseExpression(simpleName)) {\n SimpleName newSimpleName = ast.newSimpleName(simpleName.getIdentifier());\n QualifiedName newQualifiedName = ast.newQualifiedName(qualifier, newSimpleName);\n targetRewriter.replace(newVariableInstructions.get(i), newQualifiedName, null);\n }\n setPublicModifierToSourceField(variableBinding);\n } else {\n AST ast = newMethodDeclaration.getAST();\n SimpleName qualifier = null;\n if ((variableBinding.getModifiers() & Modifier.PUBLIC) != 0) {\n qualifier = ast.newSimpleName(variableBinding.getDeclaringClass().getName());\n Set<ITypeBinding> typeBindings = new LinkedHashSet<ITypeBinding>();\n typeBindings.add(variableBinding.getDeclaringClass());\n RefactoringUtility.getSimpleTypeBindings(typeBindings, requiredImportDeclarationsInExtractedClass);\n } else {\n qualifier = ast.newSimpleName(sourceTypeDeclaration.getName().getIdentifier());\n }\n if (simpleName.getParent() instanceof FieldAccess) {\n FieldAccess fieldAccess = (FieldAccess) newVariableInstructions.get(i).getParent();\n targetRewriter.set(fieldAccess, FieldAccess.EXPRESSION_PROPERTY, qualifier, null);\n } else if (!(simpleName.getParent() instanceof QualifiedName)) {\n SimpleName newSimpleName = ast.newSimpleName(simpleName.getIdentifier());\n QualifiedName newQualifiedName = ast.newQualifiedName(qualifier, newSimpleName);\n targetRewriter.replace(newVariableInstructions.get(i), newQualifiedName, null);\n }\n }\n }\n }\n i++;\n }\n}\n"
"public boolean apply(Game game, Ability source, Ability abilityToModify) {\n Player controller = game.getPlayer(abilityToModify.getControllerId());\n if (controller != null) {\n Mana mana = abilityToModify.getManaCostsToPay().getMana();\n int reduceMax = mana.getColorless();\n if (reduceMax > 0 && mana.count() == mana.getColorless()) {\n reduceMax--;\n }\n choice.setChoices(set);\n choice.setMessage(\"String_Node_Str\");\n if (player.choose(Outcome.Benefit, choice, game)) {\n int reduce = Integer.parseInt(choice.getChoice());\n mana.setColorless(mana.getColorless() - reduce);\n abilityToModify.getManaCostsToPay().load(mana.toString());\n return true;\n }\n }\n return false;\n}\n"
"private void updateMinMax() {\n if (model == null || model.getInputConfig() == null || cmbMin == null || cmbMin.isDisposed()) {\n return;\n }\n final List<String> minItems = new ArrayList<String>();\n final List<String> maxItems = new ArrayList<String>();\n minItems.add(ITEM_ALL);\n int length = 0;\n Hierarchy hierarchy = model.getInputConfig().getHierarchy(attribute);\n if (!(hierarchy == null || hierarchy.getHierarchy() == null || hierarchy.getHierarchy().length == 0 || hierarchy.getHierarchy()[0] == null || hierarchy.getHierarchy()[0].length == 0)) {\n length = hierarchy.getHierarchy()[0].length;\n }\n for (int i = 0; i < length; i++) {\n minItems.add(String.valueOf(i));\n maxItems.add(String.valueOf(i));\n }\n maxItems.add(ITEM_ALL);\n Integer minModel = model.getInputConfig().getMinimumGeneralization(attribute);\n int minIndex = minModel != null ? minModel + 1 : 0;\n Integer maxModel = model.getInputConfig().getMaximumGeneralization(attribute);\n int maxIndex = maxModel != null ? maxModel : maxItems.size() - 1;\n maxIndex = maxIndex > maxItems.size() - 1 ? maxItems.size() - 1 : maxIndex;\n maxIndex = maxIndex < 0 ? maxItems.size() - 1 : maxIndex;\n minIndex = minIndex > minItems.size() - 1 ? minItems.size() - 1 : minIndex;\n minIndex = minIndex < 0 ? 0 : minIndex;\n minIndex = minIndex > (maxIndex + 1) ? maxIndex + 1 : minIndex;\n cmbMin.setItems(minItems.toArray(new String[minItems.size()]));\n cmbMax.setItems(maxItems.toArray(new String[maxItems.size()]));\n cmbMin.select(minIndex);\n cmbMax.select(maxIndex);\n actionMinChanged();\n actionMaxChanged();\n}\n"
"private void addBranch(final Spot start, final double vx, final double vy, final int iteration, final int nDivisions, final int nFramesPerDivision) {\n if (iteration >= nDivisions) {\n return;\n }\n final Spot previousSpot = model.getGraph().vertexRef();\n final Spot spot = model.getGraph().vertexRef();\n final Spot daughter = model.getGraph().vertexRef();\n final Link link = model.getGraph().edgeRef();\n final double[] pos = new double[3];\n final double[][] cov = new double[][] { { RADIUS, 0, 0 }, { 0, RADIUS, 0 }, { 0, 0, RADIUS } };\n previousSpot.refTo(start);\n for (int it = 0; it < nFramesPerDivision; it++) {\n pos[0] = previousSpot.getDoublePosition(0) + vx;\n pos[1] = previousSpot.getDoublePosition(1) + vy;\n pos[2] = previousSpot.getDoublePosition(2);\n final int frame = previousSpot.getTimepoint() + 1;\n model.getGraph().addVertex(spot).init(frame, pos, cov);\n model.getGraph().addEdge(previousSpot, spot, link).init();\n previousSpot.refTo(spot);\n }\n for (int id = 0; id < 2; id++) {\n final double sign = id == 0 ? 1 : -1;\n final double x;\n final double y;\n final double z;\n if (iteration % 2 == 0) {\n x = previousSpot.getDoublePosition(0);\n y = previousSpot.getDoublePosition(1);\n z = previousSpot.getDoublePosition(2) + sign * VELOCITY * (1 - 0.5d * iteration / nDivisions) * 2;\n } else {\n x = previousSpot.getDoublePosition(0) - sign * vy * (1 - 0.5d * iteration / nDivisions) * 2;\n y = previousSpot.getDoublePosition(1) + sign * vx * (1 - 0.5d * iteration / nDivisions) * 2;\n z = previousSpot.getDoublePosition(2);\n }\n final int frame = previousSpot.getTimepoint() + 1;\n pos[0] = x;\n pos[1] = y;\n pos[2] = z;\n model.addSpot(frame, pos, cov, daughter);\n model.addLink(previousSpot, daughter, link);\n addBranch(daughter, vx, vy, iteration + 1, nDivisions, nFramesPerDivision);\n }\n model.getGraph().releaseRef(previousSpot);\n model.getGraph().releaseRef(spot);\n model.getGraph().releaseRef(daughter);\n model.getGraph().releaseRef(link);\n}\n"
"public boolean appliesToTraceType(Class<? extends ITmfTrace> traceclass) {\n boolean applies = false;\n final IConfigurationElement[] tracetypeCE = fCe.getChildren(TmfAnalysisModuleSourceConfigElement.TRACETYPE_ELEM);\n for (IConfigurationElement element : tracetypeCE) {\n Class<?> applyclass;\n try {\n applyclass = getBundle().loadClass(element.getAttribute(TmfAnalysisModuleSourceConfigElement.CLASS_ATTR));\n String classAppliesVal = element.getAttribute(TmfAnalysisModuleSourceConfigElement.APPLIES_ATTR);\n boolean classApplies = true;\n if (classAppliesVal != null) {\n classApplies = Boolean.parseBoolean(classAppliesVal);\n }\n if (classApplies) {\n applies = applyclass.isAssignableFrom(traceclass);\n } else {\n applies = !applyclass.isAssignableFrom(traceclass);\n }\n } catch (ClassNotFoundException e) {\n Activator.logError(\"String_Node_Str\", e);\n } catch (InvalidRegistryObjectException e) {\n Activator.logError(\"String_Node_Str\", e);\n }\n }\n return applies;\n}\n"
"public static void handleOnRender(IAutoTextContent content, ExecutionContext context) {\n Object generateBy = content.getGenerateBy();\n if (generateBy == null) {\n return;\n }\n ReportItemDesign autoTextDesign = (ReportItemDesign) generateBy;\n if (!needOnRender(autoTextDesign)) {\n return;\n }\n try {\n IAutoTextInstance autoText = new AutoTextInstance(content, context, RunningState.RENDER);\n if (handleJS(autoText, autoTextDesign.getOnRender(), context).didRun())\n return;\n IAutoTextEventHandler eh = getEventHandler(autoTextDesign, context);\n if (eh != null)\n eh.onRender(autoText, context.getReportContext());\n } catch (Exception e) {\n addException(context, e, autoTextDesign.getHandle());\n }\n}\n"
"public void doStartupSanityChecks() {\n ColorModel colorModel = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getColorModel();\n int[] bitAllocations = colorModel.getComponentSize();\n int bitDepth = bitAllocations[0] + bitAllocations[1] + bitAllocations[2];\n if (bitDepth != 24) {\n throw new IllegalStateException(\"String_Node_Str\" + bitAllocations[0] + \"String_Node_Str\" + bitAllocations[1] + \"String_Node_Str\" + bitAllocations[2]);\n }\n}\n"
"private ModelGraveStone getMemorialModel(int memorialType) {\n switch(memorialType) {\n case 1:\n return obelisk;\n case 2:\n return new ModelSteveStatueMemorial(this);\n case 3:\n return villagerStatue;\n case 4:\n return angelStatue;\n case 5:\n return dogStatue;\n case 6:\n return catStatue;\n case 7:\n return creeperStatue;\n case 0:\n default:\n return cross;\n }\n}\n"
"private void hideView() {\n if (mViewDisplayed && mRootView != null) {\n mWindowManager.removeView(mRootView);\n mViewDisplayed = false;\n }\n}\n"
"public void testIObject1() throws Exception {\n testTypesWithExtraExterns(EXTERNS_WITH_IOBJECT_DECLS, LINE_JOINER.join(\"String_Node_Str\", \"String_Node_Str\"));\n}\n"
"private Long shiftDownLeft(Long position) {\n Long dlShift = position >>> 7;\n return new Long(dlShift & ~RIGHT_MASK);\n}\n"
"public void initialize(String currentPerspective) {\n this.currentPerspective = currentPerspective;\n nodeAndProject = new HashMap<Object, List<Project>>();\n List<IRepositoryNode> nodes = null;\n String urlBranch = null;\n if (ProjectManager.getInstance().getCurrentBranchURL(project) != null) {\n urlBranch = showSVNRoot();\n }\n if (\"String_Node_Str\".equals(urlBranch) || urlBranch == null) {\n nodes = getChildren();\n } else {\n List<IRepositoryNode> root = getChildren();\n svnRootNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n svnRootNode.setProperties(EProperties.LABEL, ERepositoryObjectType.SVN_ROOT + \"String_Node_Str\" + urlBranch + \"String_Node_Str\");\n svnRootNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.SVN_ROOT);\n root.add(svnRootNode);\n nodes = svnRootNode.getChildren();\n }\n recBinNode = new BinRepositoryNode(this);\n nodes.add(recBinNode);\n businessProcessNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n businessProcessNode.setProperties(EProperties.LABEL, ERepositoryObjectType.BUSINESS_PROCESS);\n businessProcessNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.BUSINESS_PROCESS);\n nodes.add(businessProcessNode);\n processNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n processNode.setProperties(EProperties.LABEL, ERepositoryObjectType.PROCESS);\n processNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.PROCESS);\n nodes.add(processNode);\n if (PluginChecker.isJobLetPluginLoaded()) {\n jobletNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n jobletNode.setProperties(EProperties.LABEL, ERepositoryObjectType.JOBLET);\n jobletNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.JOBLET);\n nodes.add(jobletNode);\n }\n contextNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n contextNode.setProperties(EProperties.LABEL, ERepositoryObjectType.CONTEXT);\n contextNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.CONTEXT);\n nodes.add(contextNode);\n codeNode = new StableRepositoryNode(this, Messages.getString(\"String_Node_Str\"), ECoreImage.CODE_ICON);\n codeNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.CODE);\n nodes.add(codeNode);\n routineNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n routineNode.setProperties(EProperties.LABEL, ERepositoryObjectType.ROUTINES);\n routineNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.ROUTINES);\n codeNode.getChildren().add(routineNode);\n if (PluginChecker.isMetalanguagePluginLoaded()) {\n jobscriptsNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n jobscriptsNode.setProperties(EProperties.LABEL, ERepositoryObjectType.JOB_SCRIPT);\n jobscriptsNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.JOB_SCRIPT);\n codeNode.getChildren().add(jobscriptsNode);\n }\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IHeaderFooterProviderService.class)) {\n IHeaderFooterProviderService service = (IHeaderFooterProviderService) GlobalServiceRegister.getDefault().getService(IHeaderFooterProviderService.class);\n if (service.isVisible()) {\n metadataHeaderFooterConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataHeaderFooterConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_HEADER_FOOTER);\n metadataHeaderFooterConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_HEADER_FOOTER);\n codeNode.getChildren().add(metadataHeaderFooterConnectionNode);\n }\n }\n sqlPatternNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n sqlPatternNode.setProperties(EProperties.LABEL, ERepositoryObjectType.SQLPATTERNS);\n sqlPatternNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.SQLPATTERNS);\n nodes.add(sqlPatternNode);\n docNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n docNode.setProperties(EProperties.LABEL, ERepositoryObjectType.DOCUMENTATION);\n docNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.DOCUMENTATION);\n nodes.add(docNode);\n metadataNode = new RepositoryNode(null, this, ENodeType.STABLE_SYSTEM_FOLDER);\n metadataNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA);\n metadataNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA);\n nodes.add(metadataNode);\n metadataConNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataConNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_CONNECTIONS);\n metadataConNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_CONNECTIONS);\n metadataNode.getChildren().add(metadataConNode);\n metadataFileNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFileNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_DELIMITED);\n metadataFileNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_DELIMITED);\n metadataNode.getChildren().add(metadataFileNode);\n metadataFilePositionalNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFilePositionalNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_POSITIONAL);\n metadataFilePositionalNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_POSITIONAL);\n metadataNode.getChildren().add(metadataFilePositionalNode);\n metadataFileRegexpNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFileRegexpNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_REGEXP);\n metadataFileRegexpNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_REGEXP);\n metadataNode.getChildren().add(metadataFileRegexpNode);\n metadataFileXmlNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFileXmlNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_XML);\n metadataFileXmlNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_XML);\n metadataNode.getChildren().add(metadataFileXmlNode);\n metadataFileLdifNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFileLdifNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_LDIF);\n metadataFileLdifNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_LDIF);\n metadataNode.getChildren().add(metadataFileLdifNode);\n metadataFileExcelNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFileExcelNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_EXCEL);\n metadataFileExcelNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_EXCEL);\n metadataNode.getChildren().add(metadataFileExcelNode);\n ECodeLanguage codeLanguage = LanguageManager.getCurrentLanguage();\n if (codeLanguage != ECodeLanguage.PERL) {\n metadataLDAPSchemaNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataLDAPSchemaNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_LDAP_SCHEMA);\n metadataLDAPSchemaNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_LDAP_SCHEMA);\n metadataNode.getChildren().add(metadataLDAPSchemaNode);\n }\n metadataGenericSchemaNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataGenericSchemaNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_GENERIC_SCHEMA);\n metadataGenericSchemaNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_GENERIC_SCHEMA);\n metadataNode.getChildren().add(metadataGenericSchemaNode);\n metadataWSDLSchemaNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataWSDLSchemaNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_WSDL_SCHEMA);\n metadataWSDLSchemaNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_WSDL_SCHEMA);\n metadataNode.getChildren().add(metadataWSDLSchemaNode);\n if (codeLanguage != ECodeLanguage.PERL) {\n metadataSalesforceSchemaNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataSalesforceSchemaNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA);\n metadataSalesforceSchemaNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA);\n metadataNode.getChildren().add(metadataSalesforceSchemaNode);\n }\n if (PluginChecker.isSAPWizardPluginLoaded() && LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {\n metadataSAPConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataSAPConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_SAPCONNECTIONS);\n metadataSAPConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_SAPCONNECTIONS);\n metadataNode.getChildren().add(metadataSAPConnectionNode);\n }\n if (PluginChecker.isHL7PluginLoaded()) {\n metadataHL7ConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataHL7ConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_HL7);\n metadataHL7ConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_HL7);\n metadataNode.getChildren().add(metadataHL7ConnectionNode);\n }\n if (PluginChecker.isFTPPluginLoaded()) {\n metadataFTPConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataFTPConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_FTP);\n metadataFTPConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_FTP);\n metadataNode.getChildren().add(metadataFTPConnectionNode);\n }\n if (PluginChecker.isEBCDICPluginLoaded()) {\n metadataEbcdicConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataEbcdicConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_EBCDIC);\n metadataEbcdicConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_EBCDIC);\n metadataNode.getChildren().add(metadataEbcdicConnectionNode);\n }\n if (PluginChecker.isMDMPluginLoaded()) {\n metadataMDMConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataMDMConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_MDMCONNECTION);\n metadataMDMConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_MDMCONNECTION);\n metadataNode.getChildren().add(metadataMDMConnectionNode);\n }\n if (PluginChecker.isSurvivorshipPluginLoaded() || PluginChecker.isRulesPluginLoaded() || PluginChecker.isBRMSPluginLoaded()) {\n StableRepositoryNode baseRulesNode = new StableRepositoryNode(this, Messages.getString(\"String_Node_Str\"), ECoreImage.METADATA_RULES_ICON);\n baseRulesNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_RULES_MANAGEMENT);\n metadataNode.getChildren().add(baseRulesNode);\n if (PluginChecker.isBRMSPluginLoaded()) {\n metadataBRMSConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataBRMSConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_BRMS);\n metadataBRMSConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_BRMS);\n baseRulesNode.getChildren().add(metadataBRMSConnectionNode);\n }\n if (PluginChecker.isRulesPluginLoaded() && codeLanguage != ECodeLanguage.PERL) {\n metadataRulesNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataRulesNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_FILE_RULES);\n metadataRulesNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_FILE_RULES);\n baseRulesNode.getChildren().add(metadataRulesNode);\n }\n }\n if (PluginChecker.isValidationrulesPluginLoaded()) {\n metadataValidationRulesNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataValidationRulesNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_VALIDATION_RULES);\n metadataValidationRulesNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_VALIDATION_RULES);\n metadataNode.getChildren().add(metadataValidationRulesNode);\n }\n if (PluginChecker.isEDIFACTPluginLoaded()) {\n metadataEDIFactConnectionNode = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n metadataEDIFactConnectionNode.setProperties(EProperties.LABEL, ERepositoryObjectType.METADATA_EDIFACT);\n metadataEDIFactConnectionNode.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.METADATA_EDIFACT);\n metadataNode.getChildren().add(metadataEDIFactConnectionNode);\n }\n if (PluginChecker.isRefProjectLoaded() && getParent() != this && !getMergeRefProject() && project != null && project.getEmfProject().getReferencedProjects().size() > 0) {\n refProject = new RepositoryNode(null, this, ENodeType.SYSTEM_FOLDER);\n refProject.setProperties(EProperties.LABEL, ERepositoryObjectType.REFERENCED_PROJECTS);\n refProject.setProperties(EProperties.CONTENT_TYPE, ERepositoryObjectType.REFERENCED_PROJECTS);\n nodes.add(refProject);\n }\n initExtensionRepositoryNodes(nodes);\n hideHiddenNodes();\n try {\n hideHiddenNodesDependsUserRight();\n } catch (JSONException e) {\n ExceptionHandler.process(e);\n }\n collectRepositoryNodes(nodes);\n}\n"
"public ResolverHook begin(Collection<BundleRevision> triggers) {\n return new RegionResolverHook(this.regionMembership, this.importedPackages, triggers);\n}\n"
"public boolean backupSnapshotToSecondaryStorage(SnapshotVO ss) {\n long snapshotId = ss.getId();\n SnapshotVO snapshot = _snapshotDao.acquireInLockTable(snapshotId);\n if (snapshot == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + ss);\n }\n try {\n snapshot.setStatus(Snapshot.Status.BackingUp);\n _snapshotDao.update(snapshot.getId(), snapshot);\n long volumeId = snapshot.getVolumeId();\n VolumeVO volume = _volsDao.lockRow(volumeId, true);\n String primaryStoragePoolNameLabel = _storageMgr.getPrimaryStorageNameLabel(volume);\n Long dcId = volume.getDataCenterId();\n Long accountId = volume.getAccountId();\n HostVO secHost = getSecHost(volumeId, volume.getDataCenterId());\n String secondaryStoragePoolUrl = secHost.getStorageUrl();\n String snapshotUuid = snapshot.getPath();\n SnapshotVO prevSnapshot = null;\n String prevSnapshotUuid = null;\n String prevBackupUuid = null;\n SwiftVO swift = _swiftDao.findById(1L);\n long prevSnapshotId = snapshot.getPrevSnapshotId();\n if (prevSnapshotId > 0) {\n prevSnapshot = _snapshotDao.findByIdIncludingRemoved(prevSnapshotId);\n if (prevSnapshot.getBackupSnapshotId() != null && swift == null) {\n if (prevSnapshot.getVersion() != null && prevSnapshot.getVersion().equals(\"String_Node_Str\")) {\n prevBackupUuid = prevSnapshot.getBackupSnapshotId();\n prevSnapshotUuid = prevSnapshot.getPath();\n }\n } else if (prevSnapshot.getSwiftName() != null && swift != null) {\n prevBackupUuid = prevSnapshot.getSwiftName();\n prevSnapshotUuid = prevSnapshot.getPath();\n }\n }\n boolean isVolumeInactive = _storageMgr.volumeInactive(volume);\n String vmName = _storageMgr.getVmNameOnVolume(volume);\n BackupSnapshotCommand backupSnapshotCommand = new BackupSnapshotCommand(primaryStoragePoolNameLabel, secondaryStoragePoolUrl, dcId, accountId, volumeId, snapshot.getId(), volume.getPath(), snapshotUuid, snapshot.getName(), prevSnapshotUuid, prevBackupUuid, isVolumeInactive, vmName);\n if (swift != null) {\n backupSnapshotCommand.setSwift(toSwiftTO(swift));\n }\n String backedUpSnapshotUuid = null;\n boolean backedUp = false;\n BackupSnapshotAnswer answer = (BackupSnapshotAnswer) sendToPool(volume, backupSnapshotCommand);\n if (answer != null && answer.getResult()) {\n backedUpSnapshotUuid = answer.getBackupSnapshotName();\n if (backedUpSnapshotUuid != null) {\n backedUp = true;\n }\n } else if (answer != null) {\n s_logger.error(answer.getDetails());\n }\n Transaction txn = Transaction.currentTxn();\n txn.start();\n if (backedUp) {\n if (backupSnapshotCommand.getSwift() != null) {\n snapshot.setSwiftId(1L);\n snapshot.setSwiftName(backedUpSnapshotUuid);\n } else {\n snapshot.setBackupSnapshotId(backedUpSnapshotUuid);\n }\n if (answer.isFull()) {\n snapshot.setPrevSnapshotId(0);\n }\n snapshot.setStatus(Snapshot.Status.BackedUp);\n _snapshotDao.update(snapshotId, snapshot);\n if (snapshot.isRecursive()) {\n _accountMgr.incrementResourceCount(snapshot.getAccountId(), ResourceType.snapshot);\n }\n } else {\n s_logger.warn(\"String_Node_Str\");\n UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_SNAPSHOT_DELETE, snapshot.getAccountId(), snapshot.getDataCenterId(), snapshotId, snapshot.getName(), null, null, 0L);\n _usageEventDao.persist(usageEvent);\n _snapshotDao.remove(snapshotId);\n }\n txn.commit();\n return backedUp;\n } finally {\n if (snapshot != null) {\n _snapshotDao.releaseFromLockTable(snapshotId);\n }\n }\n}\n"