content
stringlengths
40
137k
"public void update() {\n if (world.isRemote) {\n tubeLengthLast = tubeLengthCurrent;\n if (Math.abs(tubeLengthWanted - tubeLengthCurrent) <= 0.1) {\n tubeLengthCurrent = tubeLengthWanted;\n } else {\n tubeLengthCurrent = tubeLengthCurrent + Math.min(Math.abs((tubeLengthWanted - tubeLengthCurrent) / 10D), 0.1) * (tubeLengthWanted > tubeLengthCurrent ? 1 : -1);\n }\n return;\n }\n if (!battery.isFull()) {\n battery.addPower(MjAPI.MJ, false);\n }\n battery.tick(getWorld(), getPos());\n if (true) {\n sendNetworkUpdate(NET_LED_STATUS);\n }\n initCurrentPos();\n mine();\n}\n"
"public Object childReturnValueAt(int index) {\n LinkedList retList = (LinkedList) getDefinedProperty(CHILD_RETURN_VALUES_KEY);\n return retList.get(index);\n}\n"
"public Map<ECustomVersionGroup, Set<LibraryFile>> getImportLibLibraries() {\n Map<ECustomVersionGroup, Set<LibraryFile>> libMap = new HashMap<ECustomVersionGroup, Set<LibraryFile>>();\n if (isFromExistVersion) {\n IHadoopService hadoopService = null;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IHadoopService.class)) {\n hadoopService = (IHadoopService) GlobalServiceRegister.getDefault().getService(IHadoopService.class);\n }\n if (hadoopService != null) {\n for (ECustomVersionGroup group : existVersionSelectionMap.keySet()) {\n if (existVersionSelectionMap.get(group)) {\n if (types != null) {\n HashSet libInSameGroup = new HashSet<LibraryFile>();\n boolean commonGroupCalculated = false;\n for (ECustomVersionType type : types) {\n if (type.getGroup() == group) {\n Set<String> hadoopLibraries = new HashSet<String>();\n if (ECustomVersionType.PIG == type || ECustomVersionType.PIG_HBASE == type || ECustomVersionType.PIG_HCATALOG == type) {\n hadoopLibraries = getLibrariesForPig(type);\n } else {\n if (!commonGroupCalculated && (ECustomVersionType.HCATALOG == type || ECustomVersionType.OOZIE == type)) {\n type = ECustomVersionType.HDFS;\n }\n if (type == ECustomVersionType.HDFS) {\n commonGroupCalculated = true;\n }\n hadoopLibraries = hadoopService.getHadoopLibrariesByType(type, getDistribution(), getVersion());\n }\n Set<LibraryFile> convertToLibraryFile = customLibUtil.convertToLibraryFile(hadoopLibraries);\n libInSameGroup.addAll(convertToLibraryFile);\n }\n }\n libMap.put(group, libInSameGroup);\n }\n }\n }\n }\n } else if (isFromZip) {\n Set<ECustomVersionGroup> groups = new HashSet<ECustomVersionGroup>();\n for (ECustomVersionGroup group : fromZipSelectionMap.keySet()) {\n if (fromZipSelectionMap.get(group)) {\n groups.add(group);\n }\n }\n return customLibUtil.readZipFile(zipLocation, groups);\n }\n return libMap;\n}\n"
"public void showAllOfList(Integer errorCode, String filename, Integer serverId) throws SecurityException, ClassNotFoundException, NoSuchMethodException {\n String[] failParamTypes = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n Method tryAgain = Callback.getMethod(\"String_Node_Str\", this, failParamTypes);\n Object[] failParams = { null, filename, serverId };\n Callback tryAgainCallback = new Callback(tryAgain, this, failParams);\n String[] goodParamTypes = { Integer.class.getName(), byte[].class.getName() };\n Method printResults = Callback.getMethod(\"String_Node_Str\", this, goodParamTypes);\n Object[] goodParams = { null, null };\n Callback printCallback = new Callback(printResults, this, goodParams);\n get(serverId, filename, printCallback, tryAgainCallback);\n}\n"
"public DepEdgeMask decode(FgInferencer inf, UFgExample ex, AnnoSentence sent) {\n FactorGraph fg = ex.getFgLatPred();\n int n = sent.size();\n Pair<EdgeScores, Integer> pair = DepParseDecoder.getEdgeScores(inf, fg, n);\n EdgeScores scores = pair.get1();\n int linkVarCount = pair.get2();\n if (linkVarCount > 0) {\n return getDepEdgeMask(scores, prm.pruneMargProp, prm.maxPrunedHeads, prm.includeMbrParse);\n } else {\n return null;\n }\n}\n"
"public List<String> getPluginIds() {\n ArrayList<String> names = new ArrayList<>();\n for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {\n names.add(plugin.getName() + ';' + plugin.getDescription().getVersion() + ':' + plugin.isEnabled());\n }\n return names;\n}\n"
"public String toString() {\n StringBuilder buf = new StringBuilder(\"String_Node_Str\");\n buf.append(\"String_Node_Str\");\n buf.append(this.key);\n buf.append(\"String_Node_Str\" + getToolTipText());\n buf.append(\"String_Node_Str\" + getURLText());\n return buf.toString();\n}\n"
"public void saveHTML(File file, String videoFileName, String clientType, String clientVersion) throws FileNotFoundException {\n String html = BackupTubeCommon.getHTMLTemplate();\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_CLIENT_TYPE, BackupTubeCommon.escapeReplaceAllText(clientType));\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_CLIENT_VERSION, BackupTubeCommon.escapeReplaceAllText(clientVersion));\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_GEN_DATE, BackupTubeCommon.escapeReplaceAllText(BackupTubeCommon.getTimeString(BackupTubeCommon.getCurrentTime())));\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_TITLE, BackupTubeCommon.escapeReplaceAllText(getTitle() + \"String_Node_Str\" + getUploader()));\n String escapedVideoFileName = videoFileName.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_VIDEO_FILE, escapedVideoFileName);\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_VIDEO_TITLE, getTitle());\n String info = \"String_Node_Str\";\n LinkedList<VideoInfoModule> infoModules = new LinkedList();\n infoModules.add(this);\n for (VideoInfoModule module : getExtraModules()) {\n infoModules.add(module);\n }\n infoModules.add(getSiteInfo());\n for (VideoInfoModule moduleToShow : infoModules) {\n info += moduleToShow.getHTML() + \"String_Node_Str\";\n }\n html = html.replaceAll(BackupTubeCommon.TEMPLATE_INFO, info);\n PrintWriter writer = new PrintWriter(file);\n writer.write(html);\n writer.close();\n}\n"
"public static Bitmap getViewBitmap(View v) {\n if (v.getWidth() == 0 || v.getHeight() == 0)\n return null;\n }\n Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);\n v.destroyDrawingCache();\n v.setWillNotCacheDrawing(willNotCache);\n v.setDrawingCacheBackgroundColor(color);\n return bitmap;\n}\n"
"public List<DocumentElement> visit(boolean forViewEditor, String outputDir) {\n Debug.outln(\"String_Node_Str\" + forViewEditor + \"String_Node_Str\" + outputDir + \"String_Node_Str\");\n List<DocumentElement> res = new ArrayList<DocumentElement>();\n List<Reference> refs = new ArrayList<Reference>();\n if (getIgnore())\n return res;\n boolean gotText = getText() != null;\n boolean gotTargets = getTargets() != null && !getTargets().isEmpty();\n boolean gotStereotypeProperties = !Utils2.isNullOrEmpty(getStereotypeProperties());\n boolean allTargetsAreProperties = false;\n Debug.outln(\"String_Node_Str\" + gotText + \"String_Node_Str\" + getText());\n Debug.outln(\"String_Node_Str\" + gotTargets + \"String_Node_Str\" + MoreToString.Helper.toLongString(getTargets()));\n Debug.outln(\"String_Node_Str\" + gotStereotypeProperties + \"String_Node_Str\" + getStereotypeProperties());\n Debug.outln(\"String_Node_Str\" + attribute);\n if (gotText && !tryOcl) {\n Debug.outln(\"String_Node_Str\");\n if (forViewEditor || !getText().trim().equals(\"String_Node_Str\")) {\n Stereotype paragraphStereotype = Utils.getStereotype(DocGen3Profile.paragraphStereotype);\n Slot s = Utils.getSlot(getDgElement(), Utils.getStereotypePropertyByName(paragraphStereotype, \"String_Node_Str\"));\n if (s != null) {\n res.add(new DBParagraph(getText(), s, From.DVALUE));\n } else {\n if (getDgElement() != null && getFrom() != null) {\n res.add(new DBParagraph(getText(), getDgElement(), getFrom()));\n } else if (getDgElement() != null) {\n res.add(new DBParagraph(getText(), getDgElement(), From.DOCUMENTATION));\n } else {\n res.add(new DBParagraph(getText()));\n }\n }\n }\n } else if (gotText && !gotTargets) {\n Debug.outln(\"String_Node_Str\");\n addOclParagraph(res, getText(), new ArrayList<Object>());\n } else if (gotTargets) {\n allTargetsAreProperties = true;\n for (Object o : targets) {\n if (o != null && !(o instanceof Property)) {\n if (!(o instanceof Slot)) {\n allTargetsAreProperties = false;\n break;\n }\n }\n }\n for (Object o : targets) {\n Element e = null;\n if (o instanceof Element) {\n e = (Element) o;\n } else if (!tryOcl)\n continue;\n Reference ref = null;\n if (gotStereotypeProperties) {\n Debug.outln(\"String_Node_Str\" + o);\n for (Property p : getStereotypeProperties()) {\n ref = Reference.getPropertyReference(e, p);\n refs.add(ref);\n }\n } else {\n if (tryOcl && gotText) {\n Debug.outln(\"String_Node_Str\" + Utils.getName(o));\n ref = new Reference(o);\n } else {\n Debug.outln(\"String_Node_Str\");\n if (allTargetsAreProperties && tryOcl) {\n Object v = Utils.getElementAttribute(e, AvailableAttribute.Value);\n ref = new Reference(e, From.DVALUE, v);\n } else {\n ref = new Reference(e, From.DOCUMENTATION, ModelHelper.getComment(e));\n }\n }\n refs.add(ref);\n }\n }\n if (tryOcl && !iterate && gotText) {\n Debug.outln(\"String_Node_Str\");\n ArrayList<Object> results = new ArrayList<Object>();\n for (Reference r : refs) {\n results.add(r.getResult());\n }\n addOclParagraph(res, getText(), results);\n } else {\n if (!iterate) {\n Debug.error(false, \"String_Node_Str\" + dgElement);\n }\n for (Reference r : refs) {\n if (!tryOcl) {\n Debug.outln(\"String_Node_Str\" + r);\n res.addAll(Common.getReferenceAsDocumentElements(r));\n } else {\n if (gotText) {\n Debug.outln(\"String_Node_Str\" + r);\n addOclParagraph(res, getText(), r.getResult());\n } else {\n Debug.outln(\"String_Node_Str\" + r);\n addOclParagraph(res, r.getResult(), dgElement);\n }\n }\n }\n }\n }\n Debug.outln(\"String_Node_Str\" + forViewEditor + \"String_Node_Str\" + outputDir + \"String_Node_Str\" + res);\n return res;\n}\n"
"public static int getKeyCode(KeyEvent e) {\n LOGGER.debug(\"String_Node_Str\" + e + \"String_Node_Str\");\n int code = InputKeyEvent.KEYCODE_UNKNOWN.getCode();\n char c = e.getKeyChar();\n int keyCode = e.getKeyCode();\n InputKeyEvent inputKeyEvent = InputKeyEvent.getByCharacterOrKeyCode(Character.toLowerCase(c), keyCode);\n if (inputKeyEvent != null) {\n code = inputKeyEvent.getCode();\n }\n LOGGER.debug(String.format(\"String_Node_Str\", String.valueOf(e), code));\n return code;\n}\n"
"public void writeExpression(MethodWriter writer) throws BytecodeException {\n if (this.value == null) {\n return;\n }\n if (this.instance == null) {\n this.value.writeExpression(writer, this.field.getType());\n writer.writeInsn(Opcodes.AUTO_DUP);\n } else {\n this.instance.writeExpression(writer);\n this.value.writeExpression(writer);\n writer.writeInsn(Opcodes.AUTO_DUP_X1);\n }\n this.field.writeSet(writer, null, null, this.getLineNumber());\n}\n"
"public Rectangle call() throws Exception {\n TreeView<?> tree = getTree();\n tree.layout();\n Rectangle treeB = NodeBounds.getAbsoluteBounds(tree);\n Rectangle visibleTreeBounds = new Rectangle(0, 0, Rounding.round(treeB.getWidth()), Rounding.round(treeB.getHeight()));\n Rectangle intersection = rowBounds.intersection(visibleTreeBounds);\n if (intersection.isEmpty()) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));\n }\n return intersection;\n}\n"
"public byte[] comp(PublicKey publicKey) {\n ECPublicKey ecPublicKey;\n if (publicKey instanceof ECPublicKey) {\n ecPublicKey = (ECPublicKey) publicKey;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n ECPoint publicPoint = ecPublicKey.getW();\n BigInteger publicPointX = publicPoint.getAffineX();\n ECField field = ecPublicKey.getParams().getCurve().getField();\n if (field instanceof ECFieldFp) {\n ECFieldFp fieldFp = (ECFieldFp) field;\n int expectedLength = (int) Math.ceil(Utils.logarithm(fieldFp.getP().doubleValue(), 256));\n byte[] result = Utils.toUnsignedByteArray(publicPointX);\n if (result.length < expectedLength) {\n byte[] padding = new byte[expectedLength - result.length];\n result = Utils.concatByteArrays(padding, result);\n }\n return result;\n }\n return null;\n}\n"
"public static final void checkInterfaceModifiers(final int modifiers) {\n if ((modifiers & ~(PUBLIC_MOD | PROTECTED_MOD | PRIVATE_MOD | FINAL_MOD | ABSTRACT_MOD | STATIC_MOD | STRICTFP_MOD)) != 0) {\n throw new RuntimeException(\"String_Node_Str\" + toString(modifiers));\n }\n}\n"
"protected QueryStatus doFetchStatus(OperationHandle operationHandle) throws HiveSQLException, ExploreException, HandleNotFoundException {\n OperationStatus operationStatus;\n CLIService cliService = getCliService();\n try {\n if (getOperationStatus.getParameterTypes().length == 2) {\n operationStatus = (OperationStatus) getOperationStatus.invoke(cliService, operationHandle, true);\n } else {\n operationStatus = (OperationStatus) getOperationStatus.invoke(cliService, operationHandle);\n }\n } catch (IndexOutOfBoundsException | IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n }\n HiveSQLException hiveExn = operationStatus.getOperationException();\n if (hiveExn != null) {\n return new QueryStatus(hiveExn.getMessage(), hiveExn.getSQLState());\n }\n return new QueryStatus(QueryStatus.OpStatus.valueOf(operationStatus.getState().toString()), operationHandle.hasResultSet());\n}\n"
"protected String convertObjectToString(Object sourceObject, QName schemaTypeQName) throws ConversionException {\n if (sourceObject instanceof Calendar) {\n return stringFromCalendar((Calendar) sourceObject, schemaTypeQName);\n }\n if (sourceObject instanceof QName) {\n return stringFromQName((QName) sourceObject);\n }\n if (sourceObject instanceof java.sql.Date) {\n return stringFromSQLDate((java.sql.Date) sourceObject, schemaTypeQName);\n }\n if (sourceObject instanceof java.sql.Time) {\n return stringFromSQLTime((java.sql.Time) sourceObject, schemaTypeQName);\n }\n if (sourceObject instanceof java.sql.Timestamp) {\n return stringFromTimestamp((Timestamp) sourceObject, schemaTypeQName);\n }\n if (sourceObject instanceof java.util.Date) {\n return stringFromDate((java.util.Date) sourceObject, schemaTypeQName);\n }\n if (sourceObject instanceof XMLGregorianCalendar) {\n return stringFromXMLGregorianCalendar((XMLGregorianCalendar) sourceObject, schemaTypeQName);\n }\n if (sourceObject instanceof Duration) {\n return stringFromDuration((Duration) sourceObject);\n }\n return super.convertObjectToString(sourceObject);\n}\n"
"public void testDirect2D() throws TransformException {\n final AffineTransform2D first = new AffineTransform2D(1, 0, 0, 1, 2.00, 4.00);\n final AffineTransform2D second = new AffineTransform2D(1, 0, 0, 1, 0.25, 0.75);\n tolerance = 1E-10;\n transform = new ConcatenatedTransformDirect2D(first, second);\n validate();\n final double[] source = generateRandomCoordinates(CoordinateDomain.PROJECTED, 0);\n final double[] target = new double[source.length];\n first.transform(source, 0, target, 0, source.length / 2);\n second.transform(target, 0, target, 0, target.length / 2);\n verifyTransform(source, target);\n transform = new ConcatenatedTransform2D(first, second);\n validate();\n verifyTransform(source, target);\n transform = new ConcatenatedTransformDirect(first, second);\n verifyTransform(source, target);\n transform = new ConcatenatedTransform(first, second);\n verifyTransform(source, target);\n transform = MathTransforms.concatenate(first, second);\n assertInstanceOf(\"String_Node_Str\", AffineTransform2D.class, transform);\n validate();\n verifyTransform(source, target);\n}\n"
"static boolean isDnsReachable(int dns, int timeout) {\n try {\n socket = new DatagramSocket();\n socket.setSoTimeout(timeout);\n byte[] buf = new byte[DNS_QUERY_BASE_SIZE];\n fillQuery(buf);\n byte[] parts = new byte[4];\n parts[0] = (byte) (dns & 0xff);\n parts[1] = (byte) ((dns >> 8) & 0xff);\n parts[2] = (byte) ((dns >> 16) & 0xff);\n parts[3] = (byte) ((dns >> 24) & 0xff);\n InetAddress dnsAddress = InetAddress.getByAddress(parts);\n DatagramPacket packet = new DatagramPacket(buf, buf.length, dnsAddress, DNS_PORT);\n socket.send(packet);\n DatagramPacket replyPacket = new DatagramPacket(buf, buf.length);\n socket.receive(replyPacket);\n return true;\n } catch (SocketException e) {\n if (V) {\n Slog.v(TAG, \"String_Node_Str\", e);\n }\n return false;\n } catch (UnknownHostException e) {\n if (V) {\n Slog.v(TAG, \"String_Node_Str\", e);\n }\n return false;\n } catch (SocketTimeoutException e) {\n return false;\n } catch (IOException e) {\n if (V) {\n Slog.v(TAG, \"String_Node_Str\", e);\n }\n return false;\n } catch (Exception e) {\n if (V || Config.LOGD) {\n Slog.d(TAG, \"String_Node_Str\", e);\n }\n return false;\n }\n}\n"
"public Personalization getPersonalization() {\n if (persoCache == null) {\n persoCache = new Profile08();\n }\n return persoCache;\n}\n"
"public void clean2() {\n if (definitions.getCodeSystems() != null)\n definitions.getCodeSystems().clear();\n if (definitions.getValuesets() != null)\n definitions.getValuesets().clear();\n System.gc();\n}\n"
"public void setModified(boolean modif) {\n super.setModified(modif);\n if (!isModified()) {\n HtmlEditorSupport support = getLookup().lookup(HtmlEditorSupport.class);\n support.removeSaveCookie();\n }\n}\n"
"public AFPChain align(Atom[] ca1, Atom[] ca2, Object param) throws StructureException {\n long startTime = System.currentTimeMillis();\n Atom[] ca2m = prepareAtomsForAlign(ca2);\n if (debug) {\n System.out.format(\"String_Node_Str\", System.currentTimeMillis() - startTime);\n startTime = System.currentTimeMillis();\n }\n AFPChain afpChain = super.align(ca1, ca2m, params);\n if (debug) {\n System.out.format(\"String_Node_Str\", System.currentTimeMillis() - startTime);\n startTime = System.currentTimeMillis();\n }\n afpChain = postProcessAlignment(afpChain, ca1, ca2m, calculator);\n if (debug) {\n System.out.format(\"String_Node_Str\", System.currentTimeMillis() - startTime);\n startTime = System.currentTimeMillis();\n }\n return afpChain;\n}\n"
"protected void ensureSnapshot() {\n if (snapshot == null) {\n snapshot = previousDigest;\n snapshotSeqNo = lastExecuteSeqNo;\n }\n}\n"
"public List<ResourceField> getFields() {\n List<ResourceField> fields = new ArrayList<>();\n new ResourceField(fields, getPayloadName(), MSGKEY + \"String_Node_Str\", ResourceFieldType.Enum, new PayloadTypeListener(), getOwningComponent().getActionFacetNames());\n new ResourceField(fields, tlObj.getMimeTypes().toString(), MSGKEY + \"String_Node_Str\", ResourceFieldType.EnumList, new MimeTypeListener(), getMimeTypeStrings());\n new ResourceField(fields, tlObj.getParamGroupName(), MSGKEY + \"String_Node_Str\", ResourceFieldType.Enum, new ParamGroupListener(), getOwningComponent().getParameterGroupNames(false));\n new ResourceField(fields, tlObj.getPathTemplate(), MSGKEY + \"String_Node_Str\", ResourceField.ResourceFieldType.String, new PathTemplateListener());\n new ResourceField(fields, getHttpMethodAsString(), MSGKEY + \"String_Node_Str\", ResourceFieldType.Enum, new HttpMethodListener(), getHttpMethodStrings());\n return fields;\n}\n"
"public default float getSubTypeDistance(IType subtype) {\n return subtype.getSuperTypeDistance(this);\n}\n"
"public void testFilters3() throws Exception {\n this.GEN_add_filter = true;\n this.genBasicIV();\n this.closeArchiveWriter();\n DataEngineContext deContext2 = newContext(DataEngineContext.MODE_UPDATE, fileName, fileName);\n myPreDataEngine = DataEngine.newDataEngine(deContext2);\n this.UPDATE_add_filter = 1;\n this.UPDATE_add_sort = true;\n this.updatePreBasicIV();\n this.closeArchiveReader();\n this.closeArchiveWriter();\n DataEngineContext deContext3 = newContext(DataEngineContext.MODE_UPDATE, fileName, fileName);\n myPreDataEngine = DataEngine.newDataEngine(deContext3);\n this.PRE_add_filter = 2;\n this.PRE_execute_query = true;\n this.PRE_add_sort = true;\n this.preBasicIV();\n this.checkOutputFile();\n}\n"
"public void onPlayerHurt(LivingHurtEvent event, EntityPlayer victim, ItemStack armorStack, EntityEquipmentSlot slot) {\n if (event.getSource() == DamageSource.FALL) {\n boolean hasPower = ChargableUtility.hasPower(event.getEntityLiving(), (int) (event.getAmount() / Config.fallAssistDivisor));\n if (hasPower) {\n if (event.getAmount() <= 6.0F) {\n event.setAmount(0F);\n }\n event.setAmount(event.getAmount() / 3F);\n ChargableUtility.drainSteam(victim.getItemStackFromSlot(EntityEquipmentSlot.CHEST), (int) (event.getAmount() / Config.fallAssistDivisor), victim);\n if (event.getAmount() == 0.0F) {\n event.setResult(Event.Result.DENY);\n event.setCanceled(true);\n }\n }\n }\n}\n"
"void printAllLMNSyntax() {\n Env.p(\"String_Node_Str\");\n for (String memname : sortedMemNames) {\n FixedCounts fcs = memnameToCounts.get(memname);\n String memNameLMN = memname.equals(\"String_Node_Str\") ? \"String_Node_Str\" : memname;\n Env.p(memNameLMN + \"String_Node_Str\");\n for (Functor f : sortedFunctors) {\n if (TypeEnv.outOfPassiveFunctor(f) != TypeEnv.ACTIVE)\n continue;\n Map<Functor, TypeVarConstraint[]> functorToArgumentTypes = memnameToFunctorTypes.get(memname);\n boolean flagNoCount = false;\n if (fcs == null)\n flagNoCount = true;\n IntervalCount fc = null;\n if (!flagNoCount) {\n fc = fcs.functorToCount.get(f);\n if (fc == null)\n continue;\n if (fc.min.compare(new NumCount(0)) == 0 && fc.max.compare(new NumCount(0)) == 0) {\n continue;\n }\n }\n StringBuffer texp = new StringBuffer(\"String_Node_Str\");\n texp.append(\"String_Node_Str\");\n texp.append(f.getQuotedAtomName());\n texp.append(\"String_Node_Str\");\n texp.append(f.getArity());\n texp.append(\"String_Node_Str\");\n if (f.getArity() > 0) {\n if (functorToArgumentTypes != null && functorToArgumentTypes.containsKey(f)) {\n TypeVarConstraint[] argtypes = functorToArgumentTypes.get(f);\n for (int i = 0; i < argtypes.length; i++) {\n if (i != 0)\n texp.append(\"String_Node_Str\");\n texp.append(argtypes[i].shortStringLMNSyntax());\n }\n } else {\n for (int i = 0; i < f.getArity(); i++) {\n if (i != 0)\n texp.append(\"String_Node_Str\");\n texp.append(\"String_Node_Str\");\n }\n }\n }\n texp.append(\"String_Node_Str\");\n if (flagNoCount)\n texp.append(\"String_Node_Str\");\n else\n texp.append(fc);\n texp.append(\"String_Node_Str\");\n Env.p(texp);\n }\n if (fcs != null) {\n for (String childname : sortedMemNames) {\n if (fcs.memnameToCount.containsKey(childname)) {\n IntervalCount fc = fcs.memnameToCount.get(childname);\n if (fc == null)\n continue;\n String cname = childname.equals(\"String_Node_Str\") ? \"String_Node_Str\" : childname;\n Env.p(\"String_Node_Str\" + cname + \"String_Node_Str\" + fc + \"String_Node_Str\");\n }\n }\n }\n Env.p(\"String_Node_Str\");\n }\n Env.p(\"String_Node_Str\");\n}\n"
"public void init(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n Properties props = context.getProps();\n try {\n SourceType sourceType = SourceType.valueOf(props.getProperty(CommonConstants.MODELSET_SOURCE_TYPE, SourceType.HDFS.toString()));\n this.modelConfig = CommonUtils.loadModelConfig(props.getProperty(CommonConstants.SHIFU_MODEL_CONFIG), sourceType);\n this.columnConfigList = CommonUtils.loadColumnConfigList(props.getProperty(CommonConstants.SHIFU_COLUMN_CONFIG), sourceType);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n for (ColumnConfig config : this.columnConfigList) {\n if (config.isCategorical()) {\n Map<String, Integer> categoryMap = new HashMap<String, Integer>();\n for (int i = 0; i < config.getBinCategory().size(); i++) {\n categoryMap.put(config.getBinCategory().get(i), i);\n }\n this.categoryIndexMap.put(config.getColumnNum(), categoryMap);\n }\n }\n this.isContinuousEnabled = Boolean.TRUE.toString().equalsIgnoreCase(context.getProps().getProperty(CommonConstants.CONTINUOUS_TRAINING));\n this.workerThreadCount = modelConfig.getTrain().getWorkerThreadCount();\n this.threadPool = Executors.newFixedThreadPool(this.workerThreadCount);\n context.addCompletionCallBack(new WorkerCompletionCallBack<DTMasterParams, DTWorkerParams>() {\n public void callback(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n DTWorker.this.threadPool.shutdownNow();\n try {\n DTWorker.this.threadPool.awaitTermination(2, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n });\n this.trainerId = Integer.valueOf(context.getProps().getProperty(CommonConstants.SHIFU_TRAINER_ID, \"String_Node_Str\"));\n this.isOneVsAll = modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll();\n GridSearch gs = new GridSearch(modelConfig.getTrain().getParams());\n Map<String, Object> validParams = this.modelConfig.getTrain().getParams();\n if (gs.hasHyperParam()) {\n validParams = gs.getParams(this.trainerId);\n LOG.info(\"String_Node_Str\", validParams);\n }\n this.treeNum = Integer.valueOf(validParams.get(\"String_Node_Str\").toString());\n double memoryFraction = Double.valueOf(context.getProps().getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n LOG.info(\"String_Node_Str\", Runtime.getRuntime().maxMemory(), memoryFraction);\n double validationRate = this.modelConfig.getCrossValidationRate();\n if (Double.compare(validationRate, 0d) != 0) {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * (1 - validationRate)), new LinkedList<Data>());\n this.validationData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * validationRate), new LinkedList<Data>());\n } else {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction), new LinkedList<Data>());\n }\n int[] inputOutputIndex = DTrainUtils.getNumericAndCategoricalInputAndOutputCounts(this.columnConfigList);\n this.numericInputCount = inputOutputIndex[0];\n this.categoricalInputCount = inputOutputIndex[1];\n this.outputNodeCount = modelConfig.isRegression() ? inputOutputIndex[2] : modelConfig.getTags().size();\n this.isAfterVarSelect = inputOutputIndex[3] == 1 ? true : false;\n this.isCrossValidation = (modelConfig.getValidationDataSetRawPath() != null && !\"String_Node_Str\".equals(modelConfig.getValidationDataSetRawPath()));\n int numClasses = this.modelConfig.isClassification() ? this.modelConfig.getTags().size() : 2;\n String imStr = validParams.get(\"String_Node_Str\").toString();\n int minInstancesPerNode = Integer.valueOf(validParams.get(\"String_Node_Str\").toString());\n double minInfoGain = Double.valueOf(validParams.get(\"String_Node_Str\").toString());\n if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new Entropy(numClasses, minInstancesPerNode, minInfoGain);\n } else if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new Gini(numClasses, minInstancesPerNode, minInfoGain);\n } else if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new FriedmanMSE(minInstancesPerNode, minInfoGain);\n } else {\n impurity = new Variance(minInstancesPerNode, minInfoGain);\n }\n this.isRF = ALGORITHM.RF.toString().equalsIgnoreCase(modelConfig.getAlgorithm());\n this.isGBDT = ALGORITHM.GBT.toString().equalsIgnoreCase(modelConfig.getAlgorithm());\n String lossStr = validParams.get(\"String_Node_Str\").toString();\n if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new LogLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new AbsoluteLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new HalfGradSquaredLoss();\n } else {\n this.loss = new SquaredLoss();\n }\n if (this.isGBDT) {\n this.learningRate = Double.valueOf(validParams.get(NNTrainer.LEARNING_RATE).toString());\n Object swrObj = validParams.get(\"String_Node_Str\");\n if (swrObj != null) {\n this.gbdtSampleWithReplacement = Boolean.TRUE.toString().equalsIgnoreCase(swrObj.toString());\n }\n }\n if (this.isRF || (this.isGBDT && this.gbdtSampleWithReplacement)) {\n this.rng = new PoissonDistribution[treeNum];\n for (int i = 0; i < treeNum; i++) {\n this.rng[i] = new PoissonDistribution(this.modelConfig.getTrain().getBaggingSampleRate());\n }\n }\n LOG.info(\"String_Node_Str\", isAfterVarSelect, treeNum, impurity.getClass().getName(), loss.getClass().getName(), this.learningRate, this.gbdtSampleWithReplacement, this.isRF, this.isGBDT);\n}\n"
"private void repositionBlogInfoView() {\n int scrollPos = mListView.getVerticalScrollOffset();\n if (mBlogInfoView == null || scrollPos == mLastPostListScrollPos) {\n return;\n }\n mBlogInfoView.scaleMshotImageBasedOnScrollPos(scrollPos);\n View firstChild = mListView.getChildAt(0);\n boolean isSpacer = (firstChild != null && MSHOT_SPACER_TAG.equals(firstChild.getTag()));\n final int infoTop;\n if (isSpacer) {\n infoTop = Math.max(0, firstChild.getTop() + mBlogInfoView.getMshotHeight());\n } else {\n mshotBottom = 0;\n }\n mBlogInfoView.moveInfoContainer(mshotBottom);\n mLastPostListScrollPos = scrollPos;\n}\n"
"protected void startUp() throws Exception {\n LoggingContextAccessor.setLoggingContext(loggingContext);\n httpService = NettyHttpService.builder(workflowRunId.getProgram() + \"String_Node_Str\").setWorkerThreadPoolSize(2).setExecThreadPoolSize(4).setHost(hostname.getHostName()).addHttpHandlers(ImmutableList.of(new WorkflowServiceHandler(createStatusSupplier()))).build();\n httpService.startAndWait();\n runningThread = Thread.currentThread();\n createLocalDatasets();\n workflow = initializeWorkflow();\n}\n"
"public synchronized void menuRun() {\n threadRunning = true;\n interruptSent = false;\n noPauses = false;\n File stdoutFile = getCurrentDefaultStdoutFile();\n if (currentSettings.getStrValue(Settings.STDOUT_USE).equals(\"String_Node_Str\")) {\n try {\n if (stdoutFile.exists()) {\n stdoutFile.delete();\n }\n stdoutFile.createNewFile();\n } catch (IOException e) {\n String[] filename = { stdoutFile.getName() };\n gui.showError(new Message(\"String_Node_Str\", filename).toString());\n logger.warning(e.getMessage());\n }\n RunInfo runinfo;\n int runmode = currentSettings.getIntValue(Settings.RUN_MODE);\n int base = 0;\n int limit = currentSettings.getIntValue(Settings.MEMORY_SIZE);\n animator.init(control.getCpu(), base, limit);\n if ((runmode & ANIMATED) != 0) {\n gui.showAnimator();\n }\n do {\n currentState = B91_RUNNING;\n setGUICommandsForCurrentState();\n int nextLine = ((Processor) control.getCpu()).getValueOf(TTK91Cpu.CU_PC_CURRENT);\n gui.selectLine(nextLine, GUI.INSTRUCTIONS_AND_DATA_TABLE);\n runmode = currentSettings.getIntValue(Settings.RUN_MODE);\n try {\n runinfo = control.runLine();\n if (runinfo == null) {\n break;\n }\n } catch (TTK91NoKbdData needMoreData) {\n gui.addComment(new Message(\"String_Node_Str\").toString());\n gui.updateStatusBar(new Message(\"String_Node_Str\").toString());\n currentState = B91_WAIT_FOR_KBD;\n setGUICommandsForCurrentState();\n gui.enable(GUI.INPUT_FIELD);\n waitForContinueTask();\n gui.disable(GUI.INPUT_FIELD);\n continue;\n } catch (TTK91RuntimeException e) {\n gui.updateStatusBar(new Message(\"String_Node_Str\").toString());\n gui.addComment(e.getMessage());\n currentState = INTERRUPTED_WITH_PAUSE;\n setGUICommandsForCurrentState();\n break;\n }\n } catch (TTK91NoKbdData needMoreData) {\n gui.addComment(new Message(\"String_Node_Str\").toString());\n gui.updateStatusBar(new Message(\"String_Node_Str\").toString());\n currentState = B91_WAIT_FOR_KBD;\n setGUICommandsForCurrentState();\n gui.enable(GUI.INPUT_FIELD);\n waitForContinueTask();\n gui.disable(GUI.INPUT_FIELD);\n continue;\n } catch (TTK91RuntimeException e) {\n gui.updateStatusBar(new Message(\"String_Node_Str\").toString());\n gui.addComment(e.getMessage());\n currentState = INTERRUPTED_WITH_PAUSE;\n setGUICommandsForCurrentState();\n break;\n }\n if ((runmode & COMMENTED) != 0) {\n if (runinfo.getComments() != null) {\n gui.addComment(runinfo.getLineNumber() + \"String_Node_Str\" + runinfo.getComments());\n }\n }\n animator.stopAnimation();\n animator.animate(runinfo);\n gui.updateStatusBar(runinfo.getComments());\n if (runinfo.isExternalOp() && runinfo.whatOUT() != null) {\n if (runinfo.whatOUT()[0] == Processor.CRT) {\n gui.addOutputData(runinfo.whatOUT()[1]);\n }\n }\n int[] newRegisterValues = runinfo.getRegisters();\n gui.updateReg(GUI.R0, newRegisterValues[0]);\n gui.updateReg(GUI.R1, newRegisterValues[1]);\n gui.updateReg(GUI.R2, newRegisterValues[2]);\n gui.updateReg(GUI.R3, newRegisterValues[3]);\n gui.updateReg(GUI.R4, newRegisterValues[4]);\n gui.updateReg(GUI.R5, newRegisterValues[5]);\n gui.updateReg(GUI.R6, newRegisterValues[6]);\n gui.updateReg(GUI.R7, newRegisterValues[7]);\n gui.updateReg(GUI.PC, runinfo.getNewPC());\n LinkedList changedMemoryLines = runinfo.getChangedMemoryLines();\n Iterator changedMemoryLinesListIterator = changedMemoryLines.iterator();\n while (changedMemoryLinesListIterator.hasNext()) {\n Object[] listItem = (Object[]) changedMemoryLinesListIterator.next();\n int line = ((Integer) listItem[0]).intValue();\n MemoryLine contents = (MemoryLine) listItem[1];\n gui.updateInstructionsAndDataTableLine(line, contents.getBinary(), contents.getSymbolic());\n }\n gui.repaint();\n if ((runmode & LINE_BY_LINE) != 0 && noPauses == false) {\n currentState = B91_PAUSED;\n setGUICommandsForCurrentState();\n waitForContinueTask();\n } else {\n try {\n if (SLOWDOWN > 0)\n wait(SLOWDOWN);\n } catch (InterruptedException e) {\n System.out.println(\"String_Node_Str\");\n }\n }\n } while (interruptSent == false);\n if (currentState == INTERRUPTED_WITH_PAUSE) {\n setGUICommandsForCurrentState();\n waitForContinueTask();\n }\n load();\n currentState = B91_NOT_RUNNING;\n setGUICommandsForCurrentState();\n gui.unselectAll();\n gui.addComment(\"String_Node_Str\");\n gui.addComment(new Message(\"String_Node_Str\").toString());\n gui.addComment(\"String_Node_Str\");\n continueTask();\n threadRunning = false;\n continueTask();\n}\n"
"public static void save(String queryResultID, DataEngineContext context, ICubeQueryDefinition qd) throws DataException, IOException {\n DataOutputStream dos = null;\n try {\n StreamManager manager = new StreamManager(context, new QueryResultInfo(queryResultID, null, 0));\n int version = manager.getVersion();\n IDocArchiveWriter writer = context.getDocWriter();\n RAOutputStream outputStream = writer.createRandomAccessStream(queryResultID + STREAM_FLAG);\n dos = new DataOutputStream(outputStream);\n IOUtil.writeString(dos, qd.getName());\n IOUtil.writeBool(dos, qd.cacheQueryResults());\n IOUtil.writeInt(dos, qd.getFilterOption());\n saveBindings(dos, qd.getBindings(), version);\n saveFilters(dos, qd.getFilters(), version);\n saveSortDefns(dos, qd.getSorts());\n saveMeasures(dos, qd.getMeasures());\n saveComputedMeasures(dos, qd.getComputedMeasures());\n saveCalculatedMeasures(dos, qd.getDerivedMeasures(), version);\n saveEdges(dos, qd);\n saveCubeOperations(dos, qd.getCubeOperations(), version);\n dos.flush();\n } finally {\n if (dos != null) {\n dos.close();\n }\n }\n}\n"
"private void buildAndShowNotificationFromNoteData(Context context, Bundle data) {\n if (data == null) {\n AppLog.e(T.NOTIFS, \"String_Node_Str\");\n return;\n }\n final String wpcomNoteID = data.getString(PUSH_ARG_NOTE_ID, \"String_Node_Str\");\n if (TextUtils.isEmpty(wpcomNoteID)) {\n AppLog.e(T.NOTIFS, \"String_Node_Str\");\n return;\n }\n NotificationsUtils.buildNoteObjectFromBundleAndSaveIt(data);\n EventBus.getDefault().post(new NotificationEvents.NotificationsChanged(true));\n NotificationsActions.downloadNoteAndUpdateDB(wpcomNoteID, null, null);\n String noteType = StringUtils.notNullStr(data.getString(PUSH_ARG_TYPE));\n String title = StringEscapeUtils.unescapeHtml4(data.getString(PUSH_ARG_TITLE));\n if (title == null) {\n title = context.getString(R.string.app_name);\n }\n String message = StringEscapeUtils.unescapeHtml(data.getString(PUSH_ARG_MSG));\n long thisTime = System.currentTimeMillis();\n if (AppPrefs.getLastPushNotificationWpcomNoteId().equals(wpcomNoteID)) {\n long seconds = TimeUnit.MILLISECONDS.toSeconds(thisTime - AppPrefs.getLastPushNotificationTime());\n if (seconds <= 1) {\n AppLog.w(T.NOTIFS, \"String_Node_Str\");\n return;\n }\n }\n AppPrefs.setLastPushNotificationTime(thisTime);\n AppPrefs.setLastPushNotificationWpcomNoteId(wpcomNoteID);\n int pushId = 0;\n for (Integer id : sActiveNotificationsMap.keySet()) {\n if (id == null) {\n continue;\n }\n Bundle noteBundle = sActiveNotificationsMap.get(id);\n if (noteBundle != null && noteBundle.getString(PUSH_ARG_NOTE_ID, \"String_Node_Str\").equals(wpcomNoteID)) {\n pushId = id;\n sActiveNotificationsMap.put(pushId, data);\n break;\n }\n }\n if (pushId == 0) {\n pushId = PUSH_NOTIFICATION_ID + sActiveNotificationsMap.size();\n sActiveNotificationsMap.put(pushId, data);\n }\n if (NotificationsUtils.isNotificationsEnabled(context)) {\n Map<String, Object> properties = new HashMap<>();\n if (!TextUtils.isEmpty(noteType)) {\n if (noteType.equals(PUSH_TYPE_COMMENT)) {\n properties.put(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n properties.put(\"String_Node_Str\", noteType);\n }\n }\n bumpPushNotificationsAnalytics(Stat.PUSH_NOTIFICATION_RECEIVED, data, properties);\n AnalyticsTracker.flush();\n }\n NotificationCompat.Builder builder = getNotificationBuilder(context, title, message);\n Bitmap largeIconBitmap = getLargeIconBitmap(context, data.getString(\"String_Node_Str\"), shouldCircularizeNoteIcon(noteType));\n if (largeIconBitmap != null) {\n builder.setLargeIcon(largeIconBitmap);\n }\n showSingleNotificationForBuilder(context, builder, noteType, wpcomNoteID, pushId, true);\n showGroupNotificationForBuilder(context, builder, wpcomNoteID, message, false);\n}\n"
"public static void updateCassandraMeta(CassandraConnection conn, String colFamilyName, RowMetaInterface inputMeta, int keyIndex, CassandraColumnMetaData cassandraMeta) throws Exception {\n KsDef keySpace = conn.describeKeyspace();\n List<CfDef> colFams = null;\n if (keySpace != null) {\n colFams = keySpace.getCf_defs();\n } else {\n throw new Exception(\"String_Node_Str\");\n }\n CfDef colFamDefToUpdate = null;\n for (CfDef fam : colFams) {\n String columnFamilyName = fam.getName();\n if (columnFamilyName.equals(colFamilyName)) {\n colFamDefToUpdate = fam;\n break;\n }\n }\n if (colFamDefToUpdate == null) {\n throw new Exception(\"String_Node_Str\" + \"String_Node_Str\" + colFamilyName + \"String_Node_Str\");\n }\n String comment = colFamDefToUpdate.getComment();\n List<ValueMetaInterface> indexedVals = new ArrayList<ValueMetaInterface>();\n for (int i = 0; i < inputMeta.size(); i++) {\n if (i != keyIndex) {\n ValueMetaInterface colMeta = inputMeta.getValueMeta(i);\n if (colMeta.getStorageType() == ValueMetaInterface.STORAGE_TYPE_INDEXED) {\n indexedVals.add(colMeta);\n }\n String colName = colMeta.getName();\n if (!cassandraMeta.columnExistsInSchema(colName)) {\n String colType = CassandraColumnMetaData.getCassandraTypeForValueMeta(colMeta);\n ColumnDef newCol = new ColumnDef(ByteBuffer.wrap(colName.getBytes()), colType);\n colFamDefToUpdate.addToColumn_metadata(newCol);\n }\n }\n }\n if (indexedVals.size() > 0) {\n String before = \"String_Node_Str\";\n String after = \"String_Node_Str\";\n String meta = \"String_Node_Str\";\n if (comment != null && comment.length() > 0) {\n if (comment.indexOf(\"String_Node_Str\") >= 0) {\n before = comment.substring(0, comment.indexOf(\"String_Node_Str\"));\n after = comment.substring(comment.lastIndexOf(\"String_Node_Str\") + 3, comment.length());\n meta = comment.substring(comment.indexOf(\"String_Node_Str\", comment.lastIndexOf(\"String_Node_Str\")));\n meta = meta.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n StringBuffer buff = new StringBuffer();\n buff.append(meta);\n for (ValueMetaInterface vm : indexedVals) {\n String colName = vm.getName();\n if (meta.indexOf(colName) < 0) {\n Object[] legalVals = vm.getIndex();\n if (buff.length() > 0) {\n buff.append(\"String_Node_Str\").append(colName).append(\"String_Node_Str\");\n } else {\n buff.append(colName).append(\"String_Node_Str\");\n }\n for (int i = 0; i < legalVals.length; i++) {\n buff.append(legalVals[i].toString());\n if (i != legalVals.length - 1) {\n buff.append(\"String_Node_Str\");\n }\n }\n buff.append(\"String_Node_Str\");\n }\n }\n comment = before + \"String_Node_Str\" + buff.toString() + \"String_Node_Str\" + after;\n colFamDefToUpdate.setComment(comment);\n }\n conn.getClient().system_update_column_family(colFamDefToUpdate);\n cassandraMeta.refresh(conn);\n}\n"
"private void _createParentHierarchy(Node currentNode, String parentNodeName, HashMap<String, DBModel> dBModelsMap, XMLDBModel baseModel) {\n String currentNodeName = Utilities.getValueForAttribute(currentNode, XMLDBModel.DB_MODEL_ID_ATTR);\n if (currentNodeName != null) {\n if (!dBModelsMap.containsKey(currentNodeName) && currentNode.hasChildNodes()) {\n NodeList children = currentNode.getChildNodes();\n for (int i = 0; i < children.getLength(); i++) {\n if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {\n Node child = children.item(i);\n _createParentHierarchy(child, currentNodeId, dBModelsMap, baseModel);\n }\n }\n }\n if (parentNodeName != null && dBModelsMap.containsKey(currentNodeName)) {\n DBModel currentDBModel = dBModelsMap.get(currentNodeName);\n DBModel parentDBModel = new DBModel(parentNodeName);\n currentDBModel.addParent(parentDBModel);\n dBModelsMap.put(parentNodeName, parentDBModel);\n }\n }\n}\n"
"public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {\n dInventory inventory = (dInventory) scriptEntry.getObject(\"String_Node_Str\");\n Element qty = scriptEntry.getElement(\"String_Node_Str\");\n Type type = (Type) scriptEntry.getObject(\"String_Node_Str\");\n Object items_object = ((dList) scriptEntry.getObject(\"String_Node_Str\")).filter(dItem.class);\n List<dItem> items = (List<dItem>) items_object;\n if (items_object != null)\n items = (List<dItem>) items_object;\n dB.report(getName(), aH.debugObj(\"String_Node_Str\", type.name()) + qty.debug() + inventory.debug() + aH.debugObj(\"String_Node_Str\", items));\n switch(type) {\n case INVENTORY:\n inventory.clear();\n break;\n case ITEMINHAND:\n int inHandAmt = scriptEntry.getPlayer().getPlayerEntity().getItemInHand().getAmount();\n int theAmount = qty.asInt();\n ItemStack newHandItem = new ItemStack(0);\n if (theAmount > inHandAmt) {\n dB.echoDebug(\"String_Node_Str\");\n scriptEntry.getPlayer().getPlayerEntity().setItemInHand(newHandItem);\n } else {\n if (theAmount == inHandAmt) {\n scriptEntry.getPlayer().getPlayerEntity().setItemInHand(newHandItem);\n } else {\n newHandItem = new ItemStack(scriptEntry.getPlayer().getPlayerEntity().getItemInHand().getType(), inHandAmt - theAmount, scriptEntry.getPlayer().getPlayerEntity().getItemInHand().getData().getData());\n newHandItem.setItemMeta(scriptEntry.getPlayer().getPlayerEntity().getItemInHand().getItemMeta());\n scriptEntry.getPlayer().getPlayerEntity().setItemInHand(newHandItem);\n scriptEntry.getPlayer().getPlayerEntity().updateInventory();\n }\n }\n break;\n case MONEY:\n if (Depends.economy != null) {\n dB.echoDebug(\"String_Node_Str\" + qty.asDouble() + \"String_Node_Str\");\n Depends.economy.withdrawPlayer(scriptEntry.getPlayer().getName(), qty.asDouble());\n } else {\n dB.echoError(\"String_Node_Str\");\n }\n break;\n case ITEM:\n for (dItem item : items) {\n ItemStack is = item.getItemStack();\n if (is.getItemMeta() instanceof BookMeta)\n inventory.removeBook(is);\n is.setAmount(qty.asInt());\n if (!inventory.getInventory().removeItem(is).isEmpty())\n dB.echoError(\"String_Node_Str\" + qty.asInt() + \"String_Node_Str\" + item.identify() + \"String_Node_Str\");\n }\n break;\n }\n}\n"
"public void setText(Preview preview) {\n Point p = this.scrollPane.getViewport().getViewPosition();\n previewTableModel.setPreview(preview);\n SwingUtilities.invokeLater(new Runnable() {\n boolean structureChanged = previewTableModel.structureChanged();\n public void run() {\n if (structureChanged) {\n previewTableModel.fireTableStructureChanged();\n rescaleTableColumns();\n } else {\n previewTableModel.fireTableDataChanged();\n }\n previewTable.repaint();\n }\n });\n this.scrollPane.getViewport().setViewPosition(p);\n this.exportButton.setEnabled(preview != null);\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup root, Bundle savedInstanceState) {\n setStyle(STYLE_NORMAL, R.style.Calypso_SiteSettingsTheme);\n getDialog().setTitle(R.string.site_settings_related_posts_title);\n View v = inflater.inflate(R.layout.related_posts_dialog, root, false);\n mShowRelatedPosts = (WPSwitch) v.findViewById(R.id.toggle_related_posts_switch);\n mShowHeader = (CheckBox) v.findViewById(R.id.show_header_checkbox);\n mShowImages = (CheckBox) v.findViewById(R.id.show_images_checkbox);\n mPreviewHeader = (TextView) v.findViewById(R.id.preview_header);\n mRelatedPostsListHeader = (TextView) v.findViewById(R.id.related_posts_list_header);\n mRelatedPostsList = (LinearLayout) v.findViewById(R.id.related_posts_list);\n Bundle args = getArguments();\n if (args != null) {\n mShowRelatedPosts.setChecked(args.getBoolean(SHOW_RELATED_POSTS_KEY));\n mShowHeader.setChecked(args.getBoolean(SHOW_HEADER_KEY));\n mShowImages.setChecked(args.getBoolean(SHOW_IMAGES_KEY));\n }\n toggleShowHeader(mShowHeader.isChecked());\n toggleShowImages(mShowImages.isChecked());\n mShowRelatedPosts.setOnCheckedChangeListener(this);\n mShowHeader.setOnCheckedChangeListener(this);\n mShowImages.setOnCheckedChangeListener(this);\n toggleViews(mShowRelatedPosts.isChecked());\n return v;\n}\n"
"boolean addDeadlockedThread(long threadId) {\n Object oldValue = deadlockedThreadIdMap.putIfAbsent(threadId, DUMMY_VALUE);\n return oldValue == null;\n}\n"
"public void registerTemplates() {\n try {\n Map<String, ApplicationTemplateInfo> newInfoMap = Maps.newHashMap();\n Map<File, ApplicationTemplateInfo> newFileTemplateMap = Maps.newHashMap();\n File baseDir = new File(configuration.get(Constants.AppFabric.APP_TEMPLATE_DIR));\n List<File> files = DirUtils.listFiles(baseDir, \"String_Node_Str\");\n for (File file : files) {\n try {\n ApplicationTemplateInfo info = getTemplateInfo(file);\n newInfoMap.put(info.getName(), info);\n newFileTemplateMap.put(info.getFile().getAbsoluteFile(), info);\n } catch (IllegalArgumentException e) {\n LOG.error(\"String_Node_Str\", file.getName(), e);\n }\n }\n appTemplateInfos.set(newInfoMap);\n fileToTemplateMap.set(newFileTemplateMap);\n pluginRepository.inspectPlugins(newInfoMap.values());\n } catch (Exception e) {\n LOG.warn(\"String_Node_Str\", e);\n }\n}\n"
"public static List<DBObject> getData(String dbName, List<String> colls, int page, int pagesize) throws IllegalQueryParamenterException {\n List<String> _colls = colls.stream().filter(coll -> !RequestContext.isReservedResourceCollection(coll)).collect(Collectors.toList());\n int size = _colls.size();\n long total_pages;\n if (size > 0) {\n float _size = size + 0f;\n float _pagesize = pagesize + 0f;\n total_pages = Math.max(1, Math.round(Math.ceil(_size / _pagesize)));\n if (page > total_pages) {\n throw new IllegalQueryParamenterException(\"String_Node_Str\" + total_pages);\n }\n }\n _colls = _colls.subList((page - 1) * pagesize, (page - 1) * pagesize + pagesize > _colls.size() ? _colls.size() : (page - 1) * pagesize + pagesize);\n List<DBObject> data = new ArrayList<>();\n _colls.stream().map((coll) -> {\n BasicDBObject properties = new BasicDBObject();\n properties.put(\"String_Node_Str\", coll);\n DBObject collProperties = CollectionDAO.getCollectionProps(dbName, coll);\n if (collProperties != null)\n properties.putAll(collProperties);\n return properties;\n }).forEach((item) -> {\n data.add(item);\n });\n return data;\n}\n"
"public void onPluginEnable(PluginEnableEvent event) {\n List<Permission> pluginPermissions = event.getPlugin().getDescription().getPermissions();\n for (Permission permission : pluginPermissions) {\n calculatePermissionChildren(permission);\n }\n}\n"
"public Object convertDataValueToObjectValue(Object dataValue, Session session) {\n if (dataValue == null) {\n return null;\n }\n if (((String) dataValue).startsWith(oldPrefix)) {\n if (((String) dataValue).startsWith(oldOxmPrefix)) {\n dataValue = ((String) dataValue).replaceFirst(oldOxmPrefix, newOxmPrefix);\n } else {\n dataValue = ((String) dataValue).replaceFirst(oldPrefix, newPrefix);\n }\n }\n Object result = platformList.get(dataValue);\n if (result == null) {\n return dataValue;\n } else {\n return result;\n }\n}\n"
"private boolean killQueuedIfNecessary(int connectCode, int queuePos) {\n Assert.that(connectCode >= 0 && connectCode <= 4, \"String_Node_Str\");\n if (connectCode == 2)\n Assert.that(queuePos == -1, \"String_Node_Str\");\n if (queuePos > -1)\n Assert.that(connectCode == 1, \"String_Node_Str\");\n if (connectCode == 0)\n return false;\n if (connectCode == 3)\n return false;\n if (connectCode == 4)\n return false;\n Thread killThread = null;\n synchronized (this) {\n if (getNumDownloaders() < getSwarmCapacity()) {\n if (connectCode == 1)\n queuedThreads.put(currentThread, new Integer(queuePos));\n return true;\n if (queuedThreads.containsKey(Thread.currentThread()))\n return true;\n Iterator iter = queuedThreads.keySet().iterator();\n while (iter.hasNext()) {\n Object o = iter.next();\n int currQueue = ((Integer) queuedThreads.get(o)).intValue();\n if (currQueue > queuePos)\n killThread = (Thread) o;\n }\n if (killThread == null)\n return false;\n killThread.interrupt();\n if (connectCode == 1)\n queuedThreads.put(Thread.currentThread(), new Integer(queuePos));\n return true;\n }\n}\n"
"protected Properties createProperties(Dictionary props) {\n final Properties resultProps = new Properties(props);\n resultProps.setProperty(RemoteServiceRegistryImpl.REMOTEOBJECTCLASS, clazzes);\n resultProps.setProperty(RemoteServiceRegistryImpl.REMOTESERVICE_ID, new Long(getID().getContainerRelativeID()));\n final Object ranking = (props == null) ? null : props.get(RemoteServiceRegistryImpl.REMOTESERVICE_RANKING);\n serviceranking = (ranking instanceof Integer) ? ((Integer) ranking).intValue() : 0;\n return (resultProps);\n}\n"
"public void getInstantiationSourceCode_A$Configuration$TestMethodMeta_Null() throws Exception {\n Configuration config = null;\n TestMethodMeta testMethodMeta = null;\n DefaultGeneratorUtil.getInstantiationSourceCode(config, testMethodMeta);\n}\n"
"private synchronized static SslContext createSslContext() throws SSLException {\n if (sslBuilder == null) {\n sslBuilder = GrpcSslContexts.forClient().ciphers(null);\n }\n return sslBuilder.build();\n}\n"
"public final String processLogs(final String dirPath, boolean isPartitionerEnabled, Loader loader) throws JumbuneException, InterruptedException, ExecutionException, IOException {\n InputStream in = ConfigurationUtil.readFile(dirPath.substring(0, dirPath.indexOf(\"String_Node_Str\")) + SYMBOL_TABLE_NAME);\n if (in == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n props.load(in);\n LOGGER.debug(\"String_Node_Str\");\n Map<String, Map<String, List<String>>> mrChainSortedMap = createNodeFileMap(dirPath);\n final int numOfNodes = nodeFileMap.size();\n if (maxNumOfThreads > numOfNodes || maxNumOfThreads == 0) {\n maxNumOfThreads = numOfNodes;\n }\n LOGGER.debug(\"String_Node_Str\" + maxNumOfThreads + \"String_Node_Str\");\n LOGGER.debug(\"String_Node_Str\");\n ExecutorService pool = null;\n try {\n pool = Executors.newFixedThreadPool(maxNumOfThreads);\n final List<Future<Map<String, JobBean>>> analysisResults = new ArrayList<Future<Map<String, JobBean>>>();\n Callable<Map<String, JobBean>> nodeAnalysisTask;\n for (Map.Entry<String, Map<String, List<String>>> nodeFilePairs : nodeFileMap.entrySet()) {\n nodeAnalysisTask = new LogAnalyzerCallable(nodeFilePairs.getKey(), nodeFilePairs.getValue());\n analysisResults.add(pool.submit(nodeAnalysisTask));\n }\n Map<String, JobBean> nodeAnalysisResult;\n final Iterator<Future<Map<String, JobBean>>> iterator = analysisResults.iterator();\n while (iterator.hasNext()) {\n nodeAnalysisResult = (iterator.next()).get();\n addToLogMap(nodeAnalysisResult);\n iterator.remove();\n }\n } finally {\n if (pool != null) {\n pool.shutdown();\n }\n if (in != null) {\n in.close();\n }\n }\n DebugAnalysisBean debugAnalysisBean = new DebugAnalysisBean();\n debugAnalysisBean.setLogMap(logMap);\n if (jobChain != null) {\n setJobChainCounters();\n debugAnalysisBean.setJobChain(jobChain);\n }\n if (mrChainSortedMap != null) {\n Map<String, Map<String, List<ChainingInfoBean>>> mrChain = setMRChainCounters(mrChainSortedMap);\n debugAnalysisBean.setMrChain(mrChain);\n }\n if (isPartitionerEnabled) {\n Map<String, List<PartitionerInfoBean>> partitionerMap = getPartitionCounters(mrChainSortedMap);\n debugAnalysisBean.setPartitionerMap(partitionerMap);\n }\n YamlLoader yamlLoader = (YamlLoader) loader;\n List<Validation> validations = yamlLoader.getRegex();\n for (Validation validation : validations) {\n regexValidationsClasses.add(validation.getClassname());\n }\n validations = yamlLoader.getUserValidations();\n for (Validation validation : validations) {\n userDefValidationClasses.add(validation.getClassname());\n }\n List<String> classesRequiredInResult = new ArrayList<String>(regexValidationsClasses);\n classesRequiredInResult.addAll(userDefValidationClasses);\n Map<String, JobBean> logMap = debugAnalysisBean.getLogMap();\n Set<String> logMapKeys = logMap.keySet();\n List<String> jobList = new ArrayList<String>();\n List<JobCounterBean> jobCounterBeans = hadoopJobCounters.getJobCounterBeans();\n for (JobCounterBean jobCounterBean : jobCounterBeans) {\n jobList.add(jobCounterBean.getJobName());\n }\n for (String jobId : logMapKeys) {\n Set<String> jobMapKeys = logMap.get(jobId).getJobMap().keySet();\n Iterator<String> jobKeys = jobMapKeys.iterator();\n String mapperReducerName = null;\n while (jobKeys.hasNext()) {\n mapperReducerName = jobKeys.next();\n if (!classesRequiredInResult.contains(mapperReducerName)) {\n jobKeys.remove();\n }\n }\n if (jobList.contains(jobId)) {\n logMap.get(jobId).setTotalInputKeys(Integer.valueOf(JobCounterBean.getValueByJobNameAndProperty(jobCounterBeans, jobId, Constants.MAP_INPUT_RECORD)));\n logMap.get(jobId).setTotalContextWrites(Integer.valueOf(JobCounterBean.getValueByJobNameAndProperty(jobCounterBeans, jobId, Constants.REDUCE_OUTPUT_RECORD)));\n }\n }\n Map<String, DebugAnalysisBean> debugAnalysisMap = new HashMap<String, DebugAnalysisBean>();\n debugAnalysisMap.put(LPConstants.DEBUG_ANALYSIS, debugAnalysisBean);\n return getJsonFromDebugReport(debugAnalysisMap, debugAnalysisBean);\n}\n"
"private int getInteger(String propertyName, int defaultValue) {\n Config config = nodeEngine.getConfig();\n String property = config.getProperty(propertyName);\n return property == null ? defaultValue : parseInt(property);\n}\n"
"public void setCountDirect(String name, int count) {\n if (count < 0) {\n latches.remove(name);\n } else {\n CountDownLatchInfo latch = latches.get(name);\n if (latch == null) {\n latch = new CountDownLatchInfo(name);\n latches.put(name, latch);\n }\n latch.setCountDirect(count);\n }\n}\n"
"public Void answer(InvocationOnMock invocation) {\n for (Object arg : invocation.getArguments()) {\n if (arg instanceof AsyncCallback<?>) {\n ((AsyncCallback<?>) arg).onFailure(result);\n return null;\n }\n }\n throw new IllegalStateException(\"String_Node_Str\");\n}\n"
"protected void onViewAdded(View child) {\n super.onViewAdded(child);\n mStackScrollAlgorithm.notifyChildrenChanged(this);\n ((ExpandableView) child).setOnHeightChangedListener(this);\n generateAddAnimation(child, false);\n updateAnimationState(child);\n}\n"
"void doWait(double duration) {\n unit.getMover().letPass();\n if (disturbTime == 0) {\n disturbTime = System.currentTimeMillis();\n } else if (disturbTime + duration < System.currentTimeMillis()) {\n disturbTime = 0;\n stateMachine.popState();\n }\n}\n"
"private void sendShoutMessage() {\n String userName = \"String_Node_Str\";\n String recip = tbPhoneNumber.getString();\n String msg = tbMessage.getString();\n ShoutController sc = new ShoutController();\n String data = sc.buildDataMessage(userName);\n try {\n sc.sendSMSShout(recip, msg, data);\n ErrorAlert eAlert = new ErrorAlert(\"String_Node_Str\", \"String_Node_Str\", null, this);\n eAlert.show();\n } catch (Exception e) {\n ErrorAlert eAlert = new ErrorAlert(\"String_Node_Str\", \"String_Node_Str\", null, this);\n eAlert.show();\n e.printStackTrace();\n }\n}\n"
"public boolean attack(int playerId) {\n stopDefending(playerId);\n LOGGER.debug(\"String_Node_Str\" + playerId);\n if (attackLocation(playerId, 0, 1)) {\n return true;\n } else if (attackLocation(playerId, 0, -1)) {\n return true;\n } else if (attackLocation(playerId, 1, 0)) {\n return true;\n } else if (attackLocation(playerId, -1, 0)) {\n return true;\n } else {\n return false;\n }\n}\n"
"public void applyInternal() {\n Long maxNodeId = patchDAO.getMaxAdmNodeID();\n for (QName qname : qnames) {\n QName origional = QName.createQName(RecordsManagementModel.RM_URI, qname.getLocalName());\n if (qnameDAO.getQName(origional) != null) {\n qnameDAO.updateQName(origional, qname);\n }\n }\n long recordCount = patchDAO.getCountNodesWithAspects(Collections.singleton(ASPECT_RECORD));\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"String_Node_Str\" + recordCount + \"String_Node_Str\");\n }\n int completed = 0;\n Pair<Long, QName> recordAspect = qnameDAO.getQName(ASPECT_RECORD);\n if (recordAspect != null) {\n for (Long i = 0L; i < maxNodeId; i += BATCH_SIZE) {\n List<Long> nodeIds = patchDAO.getNodesByAspectQNameId(recordAspect.getFirst(), i, i + BATCH_SIZE);\n for (Long nodeId : nodeIds) {\n nodeDAO.addNodeAspects(nodeId, Collections.singleton(DOD5015Model.ASPECT_DOD_5015_RECORD));\n }\n completed += completed + nodeIds.size();\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + completed + \"String_Node_Str\" + recordCount);\n }\n }\n }\n}\n"
"static Word attemptToBeForwarder(ObjectReference object) {\n Word oldValue;\n do {\n oldValue = VM.objectModel.prepareAvailableBits(object);\n if (oldValue.and(FORWARDING_MASK).EQ(FORWARDED))\n return oldValue;\n } while (!VM.objectModel.attemptAvailableBits(object, oldValue, oldValue.or(BEING_FORWARDED)));\n return oldValue;\n}\n"
"public static List<Element> getConstraintElements(Object constrainedObject) {\n LinkedHashSet<Element> constraintElements = new LinkedHashSet<Element>();\n if (constrainedObject instanceof Element) {\n Element constrainedElement = ((Element) constrainedObject);\n if (StereotypesHelper.hasStereotypeOrDerived(constrainedElement, DocGen3Profile.constraintStereotype)) {\n constraintElements.add(constrainedElement);\n }\n if (constrainedElement instanceof com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint) {\n constraintElements.add(constrainedElement);\n }\n Collection<com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Constraint> constrs = constrainedElement.get_constraintOfConstrainedElement();\n if (constrs != null)\n constraintElements.addAll(constrs);\n constraintElements.addAll(Utils.collectRelatedElementsByStereotypeString(constrainedElement, DocGen3Profile.constraintStereotype, 0, true, 1));\n for (Element comment : BasicConstraint.getComments(constrainedElement)) {\n if (StereotypesHelper.hasStereotypeOrDerived(comment, DocGen3Profile.constraintStereotype)) {\n constraintElements.add(comment);\n }\n }\n }\n if (constrainedObject instanceof Collection) {\n for (Object o : (Collection<?>) constrainedObject) {\n constraintElements.addAll(getConstraintElements(o));\n }\n }\n return constraintElements;\n}\n"
"public void testExpression5() {\n String expression = oldExpressions[5];\n try {\n extractColumnExpression(new ScriptExpression(expression));\n fail(\"String_Node_Str\");\n } catch (BirtException e) {\n }\n}\n"
"private void initPageBuffer(PageContent pageContent) {\n MasterPageDesign pageDesign = (MasterPageDesign) pageContent.getGenerateBy();\n Report report = pageContent.getReportContent().getDesign();\n if (pageDesign.getOnPageStart() != null || pageDesign.getOnPageEnd() != null || report.getOnPageStart() != null || report.getOnPageEnd() != null) {\n bufferAllContents = true;\n } else {\n bufferAllContents = false;\n }\n this.contents.clear();\n this.pageContent = pageContent;\n}\n"
"protected void process() {\n if (batch.getMailBatch().getCode().equals(MailBatchRepository.CODE_BATCH_EMAIL_TIME_SHEET)) {\n if (batch.getMailBatch().getTemplate() != null)\n this.generateEmailTemplate();\n else\n this.generateEmail();\n } else if (batch.getMailBatch().getCode() == MailBatchRepository.CODE_BATCH_EMAIL_ALL_TIME_SHEET) {\n if (batch.getMailBatch().getTemplate() != null)\n this.generateAllEmailTemplate();\n else\n this.generateAllEmail();\n }\n}\n"
"public String toString() {\n return \"String_Node_Str\" + localIdentifier + \"String_Node_Str\" + remoteIdentifier;\n}\n"
"protected boolean continueRun() {\n if (!Platform.isRunning()) {\n return true;\n }\n boolean ret = true;\n if (monitor != null && monitor.isCanceled()) {\n keepRunning = false;\n } else if (this.isLowMemory) {\n ret = false;\n } else if (AnalysisThreadMemoryChangeNotifier.getInstance().isUsageThresholdExceeded()) {\n this.usedMemory = AnalysisThreadMemoryChangeNotifier.convertToMB(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed());\n ret = false;\n this.isLowMemory = true;\n }\n return ret;\n}\n"
"private String getDisplayValue() {\n if (cbExternalize.getSelection()) {\n if (defaultValue == null || defaultValue.equals(\"String_Node_Str\"))\n return new MessageFormat(Messages.getString(\"String_Node_Str\")).format(new Object[] { getKeyComponent(sResult) });\n else\n return defaultValue;\n }\n return getValueComponent(sResult);\n}\n"
"private JobDescription prepareJob() throws Exception {\n TaskDescription taskParams = this.taskParams;\n String targetPath = getResourceNode().getInstallDir();\n String targetHost = getResourceNode().getHost();\n String targetUser = getResourceNode().getUser();\n if (userNeeded && !targetUser.isEmpty()) {\n targetUser += \"String_Node_Str\";\n } else {\n targetUser = \"String_Node_Str\";\n }\n SoftwareDescription sd = new SoftwareDescription();\n sd.setExecutable(targetPath + WORKER_SCRIPT_PATH + WORKER_SCRIPT_NAME);\n ArrayList<String> lArgs = new ArrayList<String>();\n lArgs.add(lang);\n lArgs.add(getResourceNode().getWorkingDir());\n lArgs.add(getResourceNode().getLibPath());\n LinkedList<LogicalData> obsoleteFiles = getResource().clearObsoletes();\n if (obsoleteFiles != null) {\n lArgs.add(\"String_Node_Str\" + obsoleteFiles.size());\n for (LogicalData ld : obsoleteFiles) {\n String renaming = ld.getName();\n lArgs.add(renaming);\n }\n } else {\n lArgs.add(\"String_Node_Str\");\n }\n boolean isSpecific = false;\n String sandboxDir = null;\n AbstractMethodImplementation absImpl = (AbstractMethodImplementation) this.impl;\n switch(absImpl.getMethodType()) {\n case BINARY:\n BinaryImplementation binaryImpl = (BinaryImplementation) absImpl;\n sandboxDir = binaryImpl.getWorkingDir();\n isSpecific = true;\n break;\n case MPI:\n MPIImplementation mpiImpl = (MPIImplementation) absImpl;\n sandboxDir = mpiImpl.getWorkingDir();\n isSpecific = true;\n break;\n case OMPSS:\n OmpSsImplementation ompssImpl = (OmpSsImplementation) absImpl;\n sandboxDir = ompssImpl.getWorkingDir();\n isSpecific = true;\n break;\n case OPENCL:\n OpenCLImplementation openclImpl = (OpenCLImplementation) absImpl;\n sandboxDir = openclImpl.getWorkingDir();\n isSpecific = true;\n break;\n case METHOD:\n sandboxDir = null;\n break;\n }\n if (sandboxDir == null || sandboxDir.isEmpty() || sandboxDir.equals(Constants.UNASSIGNED)) {\n sandboxDir = getResourceNode().getWorkingDir() + File.separator + \"String_Node_Str\" + File.separator + \"String_Node_Str\" + this.jobId;\n isSpecific = false;\n }\n ArrayList<String> symlinks = new ArrayList<>();\n ArrayList<String> paramArgs = new ArrayList<>();\n processParameters(sandboxDir, symlinks, paramArgs);\n lArgs.add(sandboxDir);\n if (symlinks.size() > 0) {\n lArgs.add(\"String_Node_Str\" + symlinks.size());\n lArgs.addAll(symlinks);\n } else {\n lArgs.add(\"String_Node_Str\");\n }\n lArgs.add(Boolean.toString(Tracer.isActivated()));\n lArgs.add(getHostName());\n if (debug) {\n logger.debug(\"String_Node_Str\" + getHostName());\n }\n if (Tracer.isActivated()) {\n lArgs.add(String.valueOf(Tracer.getTaskEventsType()));\n lArgs.add(String.valueOf(this.taskParams.getId() + 1));\n int slot = Tracer.getNextSlot(targetHost);\n lArgs.add(String.valueOf(slot));\n sd.addAttribute(\"String_Node_Str\", slot);\n }\n lArgs.add(sandboxDir);\n lArgs.add(getResourceNode().getAppDir());\n lArgs.add(getClasspath());\n lArgs.add(getPythonpath());\n lArgs.add(String.valueOf(debug));\n lArgs.add(STORAGE_CONF);\n AbstractMethodImplementation absImpl = (AbstractMethodImplementation) this.impl;\n lArgs.add(String.valueOf(absImpl.getMethodType()));\n switch(absImpl.getMethodType()) {\n case METHOD:\n MethodImplementation methodImpl = (MethodImplementation) absImpl;\n lArgs.add(methodImpl.getDeclaringClass());\n String methodName = methodImpl.getAlternativeMethodName();\n if (methodName == null || methodName.isEmpty()) {\n methodName = taskParams.getName();\n }\n lArgs.add(methodName);\n break;\n case MPI:\n MPIImplementation mpiImpl = (MPIImplementation) absImpl;\n lArgs.add(mpiImpl.getMpiRunner());\n lArgs.add(mpiImpl.getBinary());\n break;\n case OMPSS:\n OmpSsImplementation ompssImpl = (OmpSsImplementation) absImpl;\n lArgs.add(ompssImpl.getBinary());\n break;\n case OPENCL:\n OpenCLImplementation openclImpl = (OpenCLImplementation) absImpl;\n lArgs.add(openclImpl.getKernel());\n break;\n case BINARY:\n BinaryImplementation binaryImpl = (BinaryImplementation) absImpl;\n lArgs.add(binaryImpl.getBinary());\n break;\n }\n lArgs.add(String.valueOf(slaveWorkersNodeNames.size()));\n lArgs.addAll(slaveWorkersNodeNames);\n lArgs.add(String.valueOf(((MethodResourceDescription) this.impl.getRequirements()).getTotalCPUComputingUnits()));\n lArgs.addAll(paramArgs);\n String[] arguments = new String[lArgs.size()];\n arguments = lArgs.toArray(arguments);\n try {\n sd.setArguments(arguments);\n } catch (NullPointerException e) {\n StringBuilder sb = new StringBuilder(\"String_Node_Str\" + this.jobId + \"String_Node_Str\" + absImpl.getMethodDefinition() + \"String_Node_Str\");\n int i = 0;\n for (Parameter param : taskParams.getParameters()) {\n sb.append(\"String_Node_Str\").append(i).append(\"String_Node_Str\");\n DataType type = param.getType();\n sb.append(\"String_Node_Str\").append(param.getType()).append(\"String_Node_Str\");\n if (type == DataType.FILE_T || type == DataType.OBJECT_T) {\n DependencyParameter dPar = (DependencyParameter) param;\n DataAccessId dAccId = dPar.getDataAccessId();\n sb.append(\"String_Node_Str\").append(dPar.getDataTarget()).append(\"String_Node_Str\");\n if (type == DataType.OBJECT_T) {\n if (dAccId instanceof RAccessId) {\n sb.append(\"String_Node_Str\" + \"String_Node_Str\").append(\"String_Node_Str\");\n } else {\n sb.append(\"String_Node_Str\" + \"String_Node_Str\").append(\"String_Node_Str\");\n }\n }\n } else if (type == DataType.STRING_T) {\n BasicTypeParameter btParS = (BasicTypeParameter) param;\n String value = btParS.getValue().toString();\n int numSubStrings = value.split(\"String_Node_Str\").length;\n sb.append(\"String_Node_Str\" + Integer.toString(numSubStrings)).append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\" + value).append(\"String_Node_Str\");\n } else {\n BasicTypeParameter btParB = (BasicTypeParameter) param;\n sb.append(\"String_Node_Str\" + btParB.getValue().toString()).append(\"String_Node_Str\");\n }\n i++;\n }\n logger.error(sb.toString());\n listener.jobFailed(this, JobEndStatus.SUBMISSION_FAILED);\n }\n sd.addAttribute(\"String_Node_Str\", jobId);\n sd.addAttribute(SoftwareDescription.WALLTIME_MAX, absImpl.getRequirements().getWallClockLimit());\n if (absImpl.getRequirements().getHostQueues().size() > 0) {\n sd.addAttribute(SoftwareDescription.JOB_QUEUE, absImpl.getRequirements().getHostQueues().get(0));\n }\n sd.addAttribute(\"String_Node_Str\", absImpl.getRequirements().getTotalCPUComputingUnits());\n sd.addAttribute(\"String_Node_Str\", absImpl.getRequirements().getTotalGPUComputingUnits());\n sd.addAttribute(\"String_Node_Str\", absImpl.getRequirements().getTotalFPGAComputingUnits());\n sd.addAttribute(SoftwareDescription.MEMORY_MAX, absImpl.getRequirements().getMemorySize());\n sd.addAttribute(SoftwareDescription.SANDBOX_ROOT, getResourceNode().getWorkingDir());\n sd.addAttribute(SoftwareDescription.SANDBOX_USEROOT, \"String_Node_Str\");\n sd.addAttribute(SoftwareDescription.SANDBOX_DELETE, \"String_Node_Str\");\n if (debug) {\n File outFile = GAT.createFile(context, Protocol.ANY_URI.getSchema() + File.separator + JOBS_DIR + \"String_Node_Str\" + jobId + \"String_Node_Str\" + this.getHistory() + \"String_Node_Str\");\n sd.setStdout(outFile);\n }\n if (debug || usingGlobus) {\n File errFile = GAT.createFile(context, Protocol.ANY_URI.getSchema() + File.separator + JOBS_DIR + \"String_Node_Str\" + jobId + \"String_Node_Str\" + this.getHistory() + \"String_Node_Str\");\n sd.setStderr(errFile);\n }\n Map<String, Object> attributes = new HashMap<String, Object>();\n attributes.put(RES_ATTR, Protocol.ANY_URI.getSchema() + targetUser + targetHost);\n attributes.put(\"String_Node_Str\", \"String_Node_Str\" + jobId);\n ResourceDescription rd = new HardwareResourceDescription(attributes);\n if (debug) {\n logger.debug(\"String_Node_Str\" + jobId + \"String_Node_Str\");\n logger.debug(\"String_Node_Str\" + targetHost);\n logger.debug(\"String_Node_Str\" + sd.getExecutable());\n StringBuilder sb = new StringBuilder(\"String_Node_Str\");\n for (String arg : sd.getArguments()) {\n sb.append(\"String_Node_Str\").append(arg);\n }\n logger.debug(sb.toString());\n }\n JobDescription jd = new JobDescription(sd, rd);\n return jd;\n}\n"
"public boolean exists(final DataFile src) {\n try {\n return internalDataFile(src).exists();\n } catch (IOException e) {\n return false;\n }\n}\n"
"private void printHistoryRecords(List history, OutputStreamWriter osw) throws IOException {\n Iterator iter = history.iterator();\n while (iter.hasNext()) {\n ChecksumHistory historyInfo = (ChecksumHistory) iter.next();\n StringBuffer buf = new StringBuffer(1000);\n buf.append(\"String_Node_Str\");\n buf.append(msg(\"String_Node_Str\")).append(\"String_Node_Str\").append(historyInfo.getBitstreamId()).append(\"String_Node_Str\");\n buf.append(msg(\"String_Node_Str\")).append(\"String_Node_Str\").append(DATE_FORMAT_MAX.format(historyInfo.getProcessStartDate())).append(\"String_Node_Str\");\n buf.append(msg(\"String_Node_Str\")).append(\"String_Node_Str\").append(DATE_FORMAT_MAX.format(historyInfo.getProcessEndDate())).append(\"String_Node_Str\");\n buf.append(msg(\"String_Node_Str\")).append(\"String_Node_Str\").append(historyInfo.getChecksumExpected()).append(\"String_Node_Str\");\n buf.append(msg(\"String_Node_Str\")).append(\"String_Node_Str\").append(historyInfo.getChecksumCalculated()).append(\"String_Node_Str\");\n buf.append(msg(\"String_Node_Str\")).append(\"String_Node_Str\").append(historyInfo.getResult()).append(\"String_Node_Str\");\n buf.append(\"String_Node_Str\");\n osw.write(buf.toString());\n }\n}\n"
"private boolean goToRandomDirection(Movable pushingMovable) {\n int offset = MatchConstants.random().nextInt(EDirection.NUMBER_OF_DIRECTIONS);\n EDirection pushedFromDir = EDirection.getDirection(this.getPos(), pushingMovable.getPos());\n for (int i = 0; i < EDirection.NUMBER_OF_DIRECTIONS; i++) {\n EDirection currDir = EDirection.VALUES[(i + offset) % EDirection.NUMBER_OF_DIRECTIONS];\n if (currDir != pushedFromDir && goInDirection(currDir, EGoInDirectionMode.GO_IF_ALLOWED_AND_FREE)) {\n return true;\n }\n }\n return false;\n}\n"
"private void updateIndefinitely(View view, Observable<FlipInfoViewModel> flipInfoVmSource, Observable<FlipViewModel> flipVmSource) {\n ImageView imageView = (ImageView) view.findViewById(R.id.image);\n final TextView shortIntroView = (TextView) view.findViewById(R.id.short_intro);\n imageView.reset();\n Observable<ImageViewModel> imageVmSource = new LoadingImageVmSource(NextopAndroid.getActive(view), 3000, flipVmSource).out;\n rxVg.bind(imageVmSource).subscribe(new ImageView.Updater(imageView, null, ImageView.Transition.instantHold()));\n Observable<String> shortIntroSource = flipInfoVmSource.map(new Func1<FlipInfoViewModel, String>() {\n public String call(FlipInfoViewModel flipInfoVm) {\n return flipInfoVm.intro;\n }\n });\n shortIntroSource.subscribe(new Action1<String>() {\n public void call(String intro) {\n shortIntroView.setText(intro);\n }\n });\n}\n"
"private static void processRemoteDocument() {\n ProcessingRequest pr = new ProcessingRequest();\n pr.setDocumentUrl(\"String_Node_Str\");\n pr.setDocumentType(\"String_Node_Str\");\n processRequest(pr, GATE_XML);\n}\n"
"protected boolean sendStop(final VirtualMachineGuru guru, final VirtualMachineProfile profile, final boolean force, final boolean checkBeforeCleanup) {\n final VirtualMachine vm = profile.getVirtualMachine();\n final StopCommand stop = new StopCommand(vm, getExecuteInSequence(vm.getHypervisorType()), checkBeforeCleanup);\n try {\n final Answer answer = _agentMgr.send(vm.getHostId(), stop);\n if (answer != null && answer instanceof StopAnswer) {\n final StopAnswer stopAns = (StopAnswer) answer;\n if (vm.getType() == VirtualMachine.Type.User) {\n final String platform = stopAns.getPlatform();\n if (platform != null) {\n final UserVmVO userVm = _userVmDao.findById(vm.getId());\n _userVmDao.loadDetails(userVm);\n userVm.setDetail(\"String_Node_Str\", platform);\n _userVmDao.saveDetails(userVm);\n }\n }\n final GPUDeviceTO gpuDevice = stop.getGpuDevice();\n if (gpuDevice != null) {\n _resourceMgr.updateGPUDetails(vm.getHostId(), gpuDevice.getGroupDetails());\n }\n if (!answer.getResult()) {\n final String details = answer.getDetails();\n s_logger.debug(\"String_Node_Str\" + details);\n return false;\n }\n guru.finalizeStop(profile, answer);\n } else {\n s_logger.error(\"String_Node_Str\" + vm.getInstanceName());\n return false;\n }\n } catch (final AgentUnavailableException e) {\n if (!force) {\n return false;\n }\n } catch (final OperationTimedoutException e) {\n if (!force) {\n return false;\n }\n }\n return true;\n}\n"
"public ClassificationStatistics getPrecisionRecallStats(double binaryThreshold, ImagePlus mask) {\n final ImageStack labelSlices = originalLabels.getImageStack();\n final ImageStack proposalSlices = proposedLabels.getImageStack();\n double pixelError = 0;\n double tp = 0;\n double tn = 0;\n double fp = 0;\n double fn = 0;\n final ExecutorService exe = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());\n final ArrayList<Future<ClassificationStatistics>> futures = new ArrayList<Future<ClassificationStatistics>>();\n try {\n for (int i = 1; i <= labelSlices.getSize(); i++) {\n futures.add(exe.submit(getPrecisionRecallStatsConcurrent(labelSlices.getProcessor(i).convertToFloat(), proposalSlices.getProcessor(i).convertToFloat(), (null != mask) ? mask.getImageStack().getProcessor(i).convertToFloat() : null, binaryThreshold)));\n }\n for (Future<ClassificationStatistics> f : futures) {\n ClassificationStatistics cs = f.get();\n pixelError += cs.metricValue;\n tp += cs.truePositives;\n tn += cs.trueNegatives;\n fp += cs.falsePositives;\n fn += cs.falseNegatives;\n }\n } catch (Exception ex) {\n IJ.log(\"String_Node_Str\");\n ex.printStackTrace();\n } finally {\n exe.shutdown();\n }\n return new ClassificationStatistics(tp, tn, fp, fn, pixelError / labelSlices.getSize());\n}\n"
"public static <T> Iterator<T> iterator(final Class<T> clazz, final String factoryId, final ClassLoader classLoader) throws Exception {\n final Set<String> classNames = parse(factoryId, classLoader);\n return new Iterator<T>() {\n final Iterator<ServiceDefinition> classIter = classDefinitions.iterator();\n\n public boolean hasNext() {\n return classIter.hasNext();\n }\n public T next() {\n final String className = classIter.next();\n try {\n return clazz.cast(ClassLoaderUtil.newInstance(classLoader, className));\n } catch (Exception e) {\n throw new HazelcastException(e);\n }\n }\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n}\n"
"public List<Account> getRecipients() {\n return GroupAccountManager.findAccountsByGroup2(folder.group, LinkType.establish);\n}\n"
"public boolean isLocked() {\n return OutPutStatusEnum.UTXO_CONFIRMED_CONSENSUS_LOCK == status || OutPutStatusEnum.UTXO_UNCONFIRMED_CONSENSUS_LOCK == status || OutPutStatusEnum.UTXO_CONFIRMED_TIME_LOCK == status || OutPutStatusEnum.UTXO_UNCONFIRMED_TIME_LOCK == status;\n}\n"
"public int getCount() {\n return sTemplate.getScene(0).getClips().size();\n}\n"
"public boolean isCurrentChannel(Channel channel) {\n if (this.channel == null) {\n return false;\n }\n return this.channel.equals(channel);\n}\n"
"public Result execute(Query query) {\n try {\n Result result = new RolapResult(query);\n for (int i = 0; i < query.axes.length; i++) {\n QueryAxis axis = query.axes[i];\n if (axis.nonEmpty) {\n result = new NonEmptyResult(result, query, i);\n }\n }\n }\n return result;\n}\n"
"public Properties getProperties() {\n if (properties == null) {\n properties = new Properties();\n try {\n properties.load(TiedStateAcousticModel.class.getResource(\"String_Node_Str\").openStream());\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n return properties;\n}\n"
"public void testSITE() throws IOException {\n String remark800Test = \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline;\n String sitesTest = \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline + \"String_Node_Str\" + newline;\n InputStream inStream = this.getClass().getResourceAsStream(\"String_Node_Str\");\n Structure s = parser.parsePDBFile(inStream);\n Chain chain = new ChainImpl();\n chain.setName(\"String_Node_Str\");\n for (Site site : s.getSites()) {\n for (Group group : site.getGroups()) {\n group.setChain(chain);\n }\n }\n StringBuilder remark800 = new StringBuilder();\n StringBuilder sites = new StringBuilder();\n for (Site site : s.getSites()) {\n remark800.append(site.remark800toPDB());\n sites.append(site.toPDB());\n }\n if (!remark800.toString().equals(remark800Test)) {\n }\n assertTrue(\"String_Node_Str\", remark800.toString().equals(remark800Test));\n if (!sites.toString().equals(sitesTest)) {\n System.out.println(\"String_Node_Str\");\n System.out.println(sitesTest);\n System.out.println(\"String_Node_Str\");\n System.out.println(sites.toString());\n }\n assertEquals(\"String_Node_Str\", sites.toString(), sitesTest);\n}\n"
"public synchronized List<IMetadataColumn> getListColumns(boolean withUnselected) {\n Iterator<IMetadataColumn> it = this.listColumns.iterator();\n while (it.hasNext()) {\n IMetadataColumn column = it.next();\n if (!column.isUsefulColumn()) {\n this.unusedColumns.add(column);\n it.remove();\n }\n }\n Iterator<IMetadataColumn> it2 = this.unusedColumns.iterator();\n while (it2.hasNext()) {\n IMetadataColumn column = it2.next();\n if (column.isUsefulColumn()) {\n this.listColumns.add(column);\n it2.remove();\n }\n }\n if (withUnselected) {\n List<IMetadataColumn> temp = new ArrayList<IMetadataColumn>();\n temp.addAll(this.listColumns);\n temp.addAll(this.unusedColumns);\n if (isRepository && originalColumns != null) {\n Collections.sort(temp, new Comparator<IMetadataColumn>() {\n public int compare(IMetadataColumn o1, IMetadataColumn o2) {\n int index1 = originalColumns.indexOf(o1.getLabel());\n int index2 = originalColumns.indexOf(o2.getLabel());\n return index1 - index2;\n }\n });\n }\n return temp;\n }\n return this.listColumns;\n}\n"
"public static ApplicationInfo generateApplicationInfo(Package p, int flags, PackageUserState state, int userId) {\n if (p == null)\n return null;\n if (!checkUseInstalledOrHidden(flags, state)) {\n return null;\n }\n ai = new ApplicationInfo(ai);\n if (userId != 0) {\n ai.uid = UserHandle.getUid(userId, ai.uid);\n ai.dataDir = PackageManager.getDataDirForUser(userId, ai.packageName);\n }\n if ((flags & PackageManager.GET_META_DATA) != 0) {\n ai.metaData = p.mAppMetaData;\n }\n if ((flags & PackageManager.GET_SHARED_LIBRARY_FILES) != 0) {\n ai.sharedLibraryFiles = p.usesLibraryFiles;\n }\n if (state.stopped) {\n ai.flags |= ApplicationInfo.FLAG_STOPPED;\n } else {\n ai.flags &= ~ApplicationInfo.FLAG_STOPPED;\n }\n updateApplicationInfo(ai, flags, state);\n return ai;\n}\n"
"public void createPreviewCharts(final ScrolledForm form, final Composite composite, final boolean isCreate) {\n List<Composite> previewChartList = new ArrayList<Composite>();\n if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {\n GraphBuilder gBuilder = new GraphBuilder();\n gBuilder.setTotalWeight(columnSetMultiIndicator.getCount());\n List<Object[]> listRows = columnSetMultiIndicator.getListRows();\n if (listRows != null) {\n JungGraphGenerator generator = new JungGraphGenerator(gBuilder, listRows);\n generator.generate(composite, false, true);\n }\n } else {\n List<ModelElement> numericOrDateList = new ArrayList<ModelElement>();\n if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {\n numericOrDateList = columnSetMultiIndicator.getNumericColumns();\n }\n if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {\n numericOrDateList = columnSetMultiIndicator.getDateColumns();\n }\n for (MetadataColumn column : numericOrDateList) {\n final MetadataColumn tdColumn = (MetadataColumn) column;\n ExpandableComposite exComp = toolkit.createExpandableComposite(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);\n exComp.setText(DefaultMessagesImpl.getString(\"String_Node_Str\", tdColumn.getName()));\n exComp.setLayout(new GridLayout());\n exComp.setData(columnSetMultiIndicator);\n previewChartList.add(exComp);\n final Composite comp = toolkit.createComposite(exComp);\n comp.setLayout(new GridLayout());\n comp.setLayoutData(new GridData(GridData.FILL_BOTH));\n if (tdColumn != null) {\n IRunnableWithProgress rwp = new IRunnableWithProgress() {\n public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n monitor.beginTask(DefaultMessagesImpl.getString(\"String_Node_Str\", tdColumn.getName()), IProgressMonitor.UNKNOWN);\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n new HideSeriesChartComposite(comp, analysis, columnSetMultiIndicator, tdColumn, false);\n }\n });\n monitor.done();\n }\n };\n try {\n new ProgressMonitorDialog(getSite().getShell()).run(true, false, rwp);\n } catch (Exception ex) {\n log.error(ex, ex);\n }\n }\n exComp.addExpansionListener(new ExpansionAdapter() {\n public void expansionStateChanged(ExpansionEvent e) {\n getChartComposite().layout();\n form.reflow(true);\n }\n });\n exComp.setExpanded(true);\n exComp.setClient(comp);\n }\n }\n if (!previewChartList.isEmpty()) {\n this.previewChartCompsites = previewChartList.toArray(new Composite[previewChartList.size()]);\n }\n}\n"
"public void Before() {\n message = new F_Message(RAW_DATA);\n}\n"
"private void instantiateQuery(Indicator indicator) {\n if (ColumnsetPackage.eINSTANCE.getColumnSetMultiValueIndicator().isSuperTypeOf(indicator.eClass())) {\n ColumnSetMultiValueIndicator colSetMultValIndicator = (ColumnSetMultiValueIndicator) indicator;\n final EList<ModelElement> analyzedColumns = colSetMultValIndicator.getAnalyzedColumns();\n final EList<String> numericFunctions = initializeNumericFunctions(colSetMultValIndicator);\n final EList<String> dateFunctions = initializeDateFunctions(colSetMultValIndicator);\n List<String> nominalColumns = new ArrayList<String>();\n for (ModelElement column : colSetMultValIndicator.getNominalColumns()) {\n nominalColumns.add(getQuotedColumnName(column));\n }\n List<String> computedColumns = new ArrayList<String>();\n for (ModelElement column : colSetMultValIndicator.getNumericColumns()) {\n for (String f : numericFunctions) {\n computedColumns.add(replaceVariablesLow(f, getQuotedColumnName(column)));\n }\n }\n for (ModelElement column : colSetMultValIndicator.getDateColumns()) {\n for (String f : dateFunctions) {\n computedColumns.add(replaceVariablesLow(f, getQuotedColumnName(column)));\n }\n }\n computedColumns.add(colSetMultValIndicator.getCountAll());\n String selectItems = createSelect(nominalColumns, computedColumns);\n final Expression sqlGenericExpression = dbms().getSqlExpression(indicator.getIndicatorDefinition());\n String grpByClause = createGroupBy(nominalColumns);\n String tableName = getTableName(analyzedColumns);\n String sqlExpr = dbms().fillGenericQueryWithColumnTableAndAlias(sqlGenericExpression.getBody(), selectItems, tableName, grpByClause);\n String stringDataFilter = AnalysisHelper.getStringDataFilter(cachedAnalysis);\n if (stringDataFilter == null) {\n stringDataFilter = \"String_Node_Str\";\n }\n sqlExpr = dbms().addWhereToStatement(sqlExpr, stringDataFilter);\n indicator.setInstantiatedExpression(BooleanExpressionHelper.createTdExpression(sqlGenericExpression.getLanguage(), sqlExpr));\n }\n}\n"
"private long[] getColumnIndices(String fieldName, ColumnType fieldType) {\n Table table = getTable().getTable();\n if (containsDot(fieldName)) {\n String[] names = splitString(fieldName);\n long[] columnIndices = new long[names.length];\n for (int i = 0; i < names.length - 1; i++) {\n long index = table.getColumnIndex(names[i]);\n if (index < 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + names[i] + \"String_Node_Str\");\n }\n ColumnType type = table.getColumnType(index);\n if (type == ColumnType.LINK || type == ColumnType.LINK_LIST) {\n table = table.getLinkTarget(index);\n columnIndices[i] = index;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + names[i] + \"String_Node_Str\");\n }\n }\n columnIndices[names.length - 1] = table.getColumnIndex(names[names.length - 1]);\n if (fieldType != table.getColumnType(columnIndices[names.length - 1])) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", names[names.length - 1]));\n }\n return columnIndices;\n } else {\n if (columns.get(fieldName) == null) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", fieldName));\n }\n ColumnType tableColumnType = table.getColumnType(columns.get(fieldName));\n if (fieldType != tableColumnType) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", fieldName, fieldType, tableColumnType));\n }\n return new long[] { columns.get(fieldName) };\n }\n}\n"
"public ChannelConfig updateChannel(ChannelConfig configuration, ChannelConfig oldConfig, boolean isLocalHost) {\n if (!configuration.equals(oldConfig)) {\n logger.info(\"String_Node_Str\", configuration, oldConfig);\n channelValidator.validate(configuration, oldConfig, isLocalHost);\n channelConfigDao.upsert(configuration);\n TagWebhook.updateTagWebhooksDoToChannelConfigChange(configuration);\n notify(configuration, oldConfig);\n } else {\n logger.info(\"String_Node_Str\", configuration);\n }\n return configuration;\n}\n"
"protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {\n String xml_file = null;\n if (getModelSetting(CFG_FILE_URL) != null) {\n xml_file = ((SettingsModelString) getModelSetting(CFG_FILE_URL)).getStringValue();\n }\n if (getModelSetting(CFG_FILE_URL) == null) {\n throw new InvalidSettingsException(\"String_Node_Str\");\n }\n if (xml_file.isEmpty() || xml_file.length() == 0) {\n throw new InvalidSettingsException(\"String_Node_Str\");\n }\n ParseXML handler = new ParseXML();\n SAXParserFactory factory = SAXParserFactory.newInstance();\n factory.setValidating(false);\n SAXParser parser = factory.newSAXParser();\n parser.parse(xml_file, handler);\n int nrColumns = 0;\n if (((SettingsModelBoolean) getModelSetting(CFG_splitSourceCol)).getBooleanValue() && ((SettingsModelBoolean) getModelSetting(CFG_splitDestinationCol)).getBooleanValue() == true) {\n nrColumns = 17;\n } else if (((SettingsModelBoolean) getModelSetting(CFG_splitSourceCol)).getBooleanValue() == true) {\n nrColumns = 15;\n } else if (((SettingsModelBoolean) getModelSetting(CFG_splitDestinationCol)).getBooleanValue() == true) {\n nrColumns = 15;\n } else {\n nrColumns = 13;\n }\n List<Attribute> colAttributes = getEchoColumnModel();\n BufferedDataContainer buf = exec.createDataContainer(AttributeUtils.compileTableSpecs(colAttributes));\n DataCell[] cells = new DataCell[nrColumns];\n setWarningMessage(\"String_Node_Str\" + EchoReportRecords.records.size());\n int counter = 0;\n for (EchoReportRecords r : EchoReportRecords.records) {\n cells[0] = new StringCell(r.getSrcPlateName());\n cells[1] = new StringCell(r.getSrcPlateBarcode());\n cells[2] = new StringCell(r.getSrcWell());\n cells[3] = new StringCell(r.getDestPlateName());\n cells[4] = new StringCell(r.getDestPlateBarcode());\n cells[5] = new StringCell(r.getDestWell());\n cells[6] = new StringCell(r.getXferVol());\n cells[7] = new StringCell(r.getActualVol());\n cells[8] = new StringCell(r.getCurrentFluidVolume());\n cells[9] = new StringCell(r.getFluidComposition());\n cells[10] = new StringCell(r.getFluidUnits());\n cells[11] = new StringCell(r.getFluidType());\n cells[12] = new StringCell(r.getXferStatus());\n int index = 12;\n if (((SettingsModelBoolean) getModelSetting(CFG_splitSourceCol)).getBooleanValue() == true) {\n String[] parts = splitPosition(r.getSrcWell());\n cells[index + 1] = new StringCell(parts[0]);\n cells[index + 2] = new StringCell(parts[1]);\n index = index + 2;\n }\n if (((SettingsModelBoolean) getModelSetting(CFG_splitDestinationCol)).getBooleanValue() == true) {\n String[] parts = splitPosition(r.getDestWell());\n cells[index + 1] = new StringCell(parts[0]);\n cells[index + 2] = new StringCell(parts[1]);\n }\n DataRow row = new DefaultRow(\"String_Node_Str\" + counter, cells);\n buf.addRowToTable(row);\n counter++;\n }\n buf.close();\n BufferedDataTable table = buf.getTable();\n int meta_nrColumns = 10;\n List<Attribute> colAttributes1 = getMetaDataColumnModel();\n BufferedDataContainer buf1 = exec.createDataContainer(AttributeUtils.compileTableSpecs(colAttributes1));\n DataCell[] cells1 = new DataCell[meta_nrColumns];\n setWarningMessage(\"String_Node_Str\" + EchoReportHeader.headers.size());\n int counter1 = 0;\n for (EchoReportHeader rh : EchoReportHeader.headers) {\n cells1[0] = new StringCell(rh.getRunID());\n cells1[1] = new StringCell(rh.getRunDateTime());\n cells1[2] = new StringCell(rh.getAppName());\n cells1[3] = new StringCell(rh.getAppVersion());\n cells1[4] = new StringCell(rh.getProtocolName());\n cells1[5] = new StringCell(rh.getUserName());\n }\n for (EchoReportFooter rf : EchoReportFooter.footers) {\n cells1[6] = new StringCell(rf.getInstrName());\n cells1[7] = new StringCell(rf.getInstrModel());\n cells1[8] = new StringCell(rf.getInstrSN());\n cells1[9] = new StringCell(rf.getInstrSWVersion());\n DataRow row = new DefaultRow(\"String_Node_Str\" + counter1, cells1);\n buf1.addRowToTable(row);\n counter1++;\n }\n buf1.close();\n BufferedDataTable table1 = buf1.getTable();\n return new BufferedDataTable[] { table, table1 };\n}\n"
"public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, CoreAbstractSession session, NamespaceResolver namespaceResolver) {\n if (xmlChoiceCollectionMapping.isReadOnly()) {\n return false;\n }\n Object value = xmlChoiceCollectionMapping.getAttributeValueFromObject(object);\n if (value == null) {\n AbstractNullPolicy wrapperNP = xmlChoiceCollectionMapping.getWrapperNullPolicy();\n if (wrapperNP != null && wrapperNP.getMarshalNullRepresentation() == XMLNullRepresentationType.XSI_NIL) {\n marshalRecord.nilSimple(namespaceResolver);\n return true;\n } else {\n return false;\n }\n }\n CoreContainerPolicy cp = getContainerPolicy();\n Object iterator = cp.iteratorFor(value);\n if (null != iterator && cp.hasNext(iterator)) {\n if (xPathFragment != null) {\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n marshalRecord.closeStartGroupingElements(groupingFragment);\n }\n } else {\n return marshalRecord.emptyCollection(xPathFragment, namespaceResolver, xmlChoiceCollectionMapping.getWrapperNullPolicy() != null);\n }\n if (marshalRecord.getMarshaller().getMediaType().isApplicationJSON()) {\n List<NodeValue> nodeValues = new ArrayList();\n List<List> values = new ArrayList<List>();\n NodeValue mixedNodeValue = null;\n List mixedValues = null;\n while (cp.hasNext(iterator)) {\n Object nextValue = xmlChoiceCollectionMapping.convertObjectValueToDataValue(cp.next(iterator, session), session, marshalRecord.getMarshaller());\n NodeValue nodeValue = getNodeValueForValue(nextValue);\n if (nodeValue != null) {\n if (nodeValue == this) {\n mixedNodeValue = this;\n if (mixedValues == null) {\n mixedValues = new ArrayList();\n }\n mixedValues.add(nextValue);\n } else {\n int index = nodeValues.indexOf(nodeValue);\n if (index > -1) {\n values.get(index).add(nextValue);\n } else {\n nodeValues.add(nodeValue);\n List valuesList = new ArrayList();\n valuesList.add(nextValue);\n values.add(valuesList);\n }\n }\n }\n }\n if (mixedNodeValue != null) {\n nodeValues.add(mixedNodeValue);\n values.add(mixedValues);\n }\n for (int i = 0; i < nodeValues.size(); i++) {\n NodeValue associatedNodeValue = nodeValues.get(i);\n List listValue = values.get(i);\n XPathFragment frag = null;\n if (associatedNodeValue == this) {\n frag = marshalRecord.getTextWrapperFragment();\n } else {\n frag = associatedNodeValue.getXPathNode().getXPathFragment();\n if (frag != null) {\n frag = getOwningFragment(associatedNodeValue, frag);\n associatedNodeValue = ((XMLChoiceCollectionMappingUnmarshalNodeValue) associatedNodeValue).getChoiceElementMarshalNodeValue();\n }\n }\n if (frag != null) {\n marshalRecord.startCollection();\n for (int j = 0; j < listValue.size(); j++) {\n marshalSingleValueWithNodeValue(frag, marshalRecord, object, listValue.get(j), session, namespaceResolver, ObjectMarshalContext.getInstance(), associatedNodeValue);\n }\n marshalRecord.endCollection();\n }\n }\n } else {\n while (cp.hasNext(iterator)) {\n Object nextValue = cp.next(iterator, session);\n marshalSingleValue(xPathFragment, marshalRecord, object, nextValue, session, namespaceResolver, ObjectMarshalContext.getInstance());\n }\n }\n return true;\n}\n"
"private boolean hasOverlap(long startDate, long endDate, long anotherStartDate, long anotherEndDate) {\n if (startDate >= endDate) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (anotherStartDate >= anotherEndDate) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (startDate <= anotherStartDate && anotherStartDate < endDate) {\n return true;\n }\n if (startDate < anotherEndDate && anotherEndDate <= endDate) {\n return true;\n }\n return false;\n}\n"
"public void requestLogin(OnLoginCompleteListener onLoginCompleteListener) {\n super.requestLogin(onLoginCompleteListener);\n mConnectRequested = true;\n try {\n mConnectionResult.startResolutionForResult(mActivity, REQUEST_AUTH);\n } catch (Exception e) {\n if (!googleApiClient.isConnecting()) {\n googleApiClient.connect();\n }\n }\n}\n"
"private Vector2 CastRay(Vector2 start, Vector2 end) {\n ri.start = start;\n ri.end = end;\n float oldDst = MAX_RAY_LENGTH;\n ri.calculateDir();\n for (MeshObject mesh : collision) {\n if (oldDst > ri.distanceToHit && RayCastHelper.IntersectLineCircle(mesh.position, mesh.radius, ri)) {\n oldDst = ri.distanceToHit;\n }\n }\n ri.calculateHit(ri.distanceToHit);\n return ri.hit;\n}\n"
"void onClick(ClickEvent e) {\n final IndicatorDTO newIndicator = new IndicatorDTO();\n newIndicator.setCollectIntervention(true);\n newIndicator.setAggregation(IndicatorDTO.AGGREGATE_SUM);\n newIndicator.setDatabaseId(databaseId);\n newIndicator.setCategory((element.getFormattedCode() + \"String_Node_Str\" + element.getDescription()).trim());\n showDialog(newIndicator, new FormDialogCallback() {\n\n public void onValidated() {\n dialog.hide();\n element.getIndicators().add(newIndicator);\n indicatorList.getStore().add(newIndicator);\n }\n });\n}\n"
"public static List<String> getLabels() {\n List<String> list = new ArrayList<String>();\n for (ReportType t : ReportType.values()) {\n if (!list.contains(t.getLabel())) {\n list.add(t.getLabel());\n }\n }\n return list;\n}\n"
"public static Transaction finalizeTransaction(UnsignedTransaction unsigned, List<byte[]> signatures) {\n TransactionInput[] inputs = new TransactionInput[unsigned._funding.length];\n for (int i = 0; i < unsigned._funding.length; i++) {\n ScriptInputStandard script = new ScriptInputStandard(signatures.get(i), unsigned._signingRequests[i].publicKey.getPublicKeyBytes());\n inputs[i] = new TransactionInput(unsigned._funding[i].outPoint, script, unsigned.getDefaultSequenceNumber());\n }\n Transaction transaction = new Transaction(1, inputs, unsigned._outputs, unsigned._isPop ? MAX_LOCK_TIME : 0);\n return transaction;\n}\n"
"private NodePos attachComment(AstNode n, int parapos) {\n int napos = parapos + n.getPosition();\n if (finishesAfterJsdoc(n, napos)) {\n if (capos < napos && !attachToChildren(n, napos)) {\n return setJsdoc(n, napos);\n }\n } else {\n return null;\n }\n int ntype = n.getType();\n NodePos res;\n switch(ntype) {\n case Token.BREAK:\n case Token.CONTINUE:\n return new NodePos(n, napos);\n case Token.CASE:\n SwitchCase cas = (SwitchCase) n;\n if (!cas.isDefault()) {\n res = attachComment(cas.getExpression(), napos);\n if (res != null) {\n return res;\n }\n }\n if (cas.getStatements() != null) {\n for (AstNode stm : cas.getStatements()) {\n res = attachComment(stm, napos);\n if (res != null) {\n return res;\n }\n }\n }\n return new NodePos(n, napos);\n case Token.DO:\n DoLoop dl = (DoLoop) n;\n res = attachComment(dl.getBody(), napos);\n if (res != null) {\n return res;\n }\n if (capos < dl.getWhilePosition()) {\n return new NodePos(n, napos);\n }\n res = attachComment(dl.getCondition(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.EXPR_RESULT:\n case Token.EXPR_VOID:\n if (n instanceof ExpressionStatement) {\n res = attachComment(((ExpressionStatement) n).getExpression(), napos);\n } else {\n res = attachComment(((LabeledStatement) n).getStatement(), napos);\n }\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.FOR:\n Loop loop = (Loop) n;\n if (n instanceof ForInLoop) {\n res = attachForInHeader((ForInLoop) loop, napos);\n } else {\n res = attachForLoopHeader((ForLoop) loop, napos);\n }\n if (res != null) {\n return res;\n }\n res = attachComment(loop.getBody(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.IF:\n IfStatement ifstm = (IfStatement) n;\n res = attachComment(ifstm.getCondition(), napos);\n if (res != null) {\n return res;\n }\n res = attachComment(ifstm.getThenPart(), napos);\n if (res != null) {\n return res;\n }\n if (capos < ifstm.getElsePosition()) {\n return new NodePos(n, napos);\n }\n res = attachComment(ifstm.getElsePart(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.FUNCTION:\n FunctionNode fun = (FunctionNode) n;\n Name nam = fun.getFunctionName();\n if (nam != null) {\n res = attachComment(nam, napos);\n if (res != null) {\n return res;\n }\n }\n for (AstNode param : fun.getParams()) {\n res = attachComment(param, napos);\n if (res != null) {\n return res;\n }\n }\n res = attachComment(fun.getBody(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.RETURN:\n AstNode retValue = ((ReturnStatement) n).getReturnValue();\n if (retValue != null) {\n res = attachComment(retValue, napos);\n if (res != null) {\n return res;\n }\n }\n return new NodePos(n, napos);\n case Token.SWITCH:\n SwitchStatement sw = (SwitchStatement) n;\n res = attachComment(sw.getExpression(), napos);\n if (res != null) {\n return res;\n }\n for (SwitchCase c : sw.getCases()) {\n res = attachComment(c, napos);\n }\n return new NodePos(n, napos);\n case Token.THROW:\n res = attachComment(((ThrowStatement) n).getExpression(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.TRY:\n TryStatement t = (TryStatement) n;\n res = attachComment(t.getTryBlock(), napos);\n if (res != null) {\n return res;\n }\n for (CatchClause cc : t.getCatchClauses()) {\n int catchstart = napos + cc.getPosition();\n if (capos < catchstart) {\n return new NodePos(n, napos);\n }\n res = attachComment(cc.getVarName(), catchstart);\n if (res != null) {\n return res;\n }\n res = attachComment(cc.getBody(), catchstart);\n if (res != null) {\n return res;\n }\n }\n int finpos = t.getFinallyPosition();\n if (finpos != -1) {\n if (capos < finpos) {\n return new NodePos(n, napos);\n }\n res = attachComment(t.getFinallyBlock(), napos);\n if (res != null) {\n return res;\n }\n }\n return new NodePos(n, napos);\n case Token.VAR:\n if (n instanceof VariableDeclaration) {\n for (VariableInitializer vi : ((VariableDeclaration) n).getVariables()) {\n res = attachComment(vi, napos);\n if (res != null) {\n return res;\n }\n }\n } else {\n res = attachComment(((VariableInitializer) n).getInitializer(), napos);\n if (res != null) {\n return res;\n }\n }\n return new NodePos(n, napos);\n case Token.WHILE:\n WhileLoop wh = (WhileLoop) n;\n res = attachComment(wh.getCondition(), napos);\n if (res != null) {\n return res;\n }\n if (capos < wh.getRp()) {\n return new NodePos(n, napos);\n }\n res = attachComment(wh.getBody(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.WITH:\n WithStatement w = (WithStatement) n;\n res = attachComment(w.getExpression(), napos);\n if (res != null) {\n return res;\n }\n if (capos < w.getRp()) {\n return new NodePos(n, napos);\n }\n res = attachComment(w.getStatement(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.ADD:\n case Token.AND:\n case Token.ASSIGN:\n case Token.ASSIGN_ADD:\n case Token.ASSIGN_BITAND:\n case Token.ASSIGN_BITOR:\n case Token.ASSIGN_BITXOR:\n case Token.ASSIGN_DIV:\n case Token.ASSIGN_LSH:\n case Token.ASSIGN_MOD:\n case Token.ASSIGN_MUL:\n case Token.ASSIGN_RSH:\n case Token.ASSIGN_SUB:\n case Token.ASSIGN_URSH:\n case Token.BITAND:\n case Token.BITOR:\n case Token.BITXOR:\n case Token.COLON:\n case Token.COMMA:\n case Token.DIV:\n case Token.EQ:\n case Token.GE:\n case Token.GET:\n case Token.GETPROP:\n case Token.GT:\n case Token.IN:\n case Token.INSTANCEOF:\n case Token.LE:\n case Token.LSH:\n case Token.LT:\n case Token.MOD:\n case Token.MUL:\n case Token.NE:\n case Token.OR:\n case Token.RSH:\n case Token.SET:\n case Token.SHEQ:\n case Token.SHNE:\n case Token.SUB:\n case Token.URSH:\n InfixExpression ie = (InfixExpression) n;\n res = attachComment(ie.getLeft(), napos);\n if (res != null) {\n return res;\n }\n if (capos < ie.getOperatorPosition()) {\n return new NodePos(n, napos);\n }\n res = attachComment(ie.getRight(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.ARRAYLIT:\n for (AstNode elm : ((ArrayLiteral) n).getElements()) {\n res = attachComment(elm, napos);\n if (res != null) {\n return res;\n }\n }\n return new NodePos(n, napos);\n case Token.BITNOT:\n case Token.DEC:\n case Token.DELPROP:\n case Token.INC:\n case Token.NEG:\n case Token.NOT:\n case Token.POS:\n case Token.TYPEOF:\n case Token.VOID:\n UnaryExpression ue = (UnaryExpression) n;\n res = attachComment(ue.getOperand(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.CALL:\n case Token.NEW:\n FunctionCall call = (FunctionCall) n;\n res = attachComment(call.getTarget(), napos);\n if (res != null) {\n return res;\n }\n if (capos < call.getLp()) {\n return new NodePos(n, napos);\n }\n for (AstNode param : call.getArguments()) {\n res = attachComment(param, napos);\n if (res != null) {\n return res;\n }\n }\n return new NodePos(n, napos);\n case Token.GETELEM:\n ElementGet elm = (ElementGet) n;\n res = attachComment(elm.getTarget(), napos);\n if (res != null) {\n return res;\n }\n if (capos < elm.getLb()) {\n return new NodePos(n, napos);\n }\n res = attachComment(elm.getElement(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.HOOK:\n ConditionalExpression hook = (ConditionalExpression) n;\n res = attachComment(hook.getTestExpression(), napos);\n if (res != null) {\n return res;\n }\n if (capos < hook.getQuestionMarkPosition()) {\n return new NodePos(n, napos);\n }\n res = attachComment(hook.getTrueExpression(), napos);\n if (res != null) {\n return res;\n }\n if (capos < hook.getColonPosition()) {\n return new NodePos(n, napos);\n }\n res = attachComment(hook.getFalseExpression(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.LP:\n res = attachComment(((ParenthesizedExpression) n).getExpression(), napos);\n if (res != null) {\n return res;\n }\n return new NodePos(n, napos);\n case Token.OBJECTLIT:\n for (InfixExpression prop : ((ObjectLiteral) n).getElements()) {\n res = attachComment(prop, napos);\n if (res != null) {\n return res;\n }\n }\n return new NodePos(n, napos);\n case Token.BLOCK:\n case Token.SCRIPT:\n AstNode kid = (AstNode) n.getFirstChild();\n while (kid != null) {\n res = attachComment(kid, napos);\n if (res != null) {\n return res;\n }\n kid = (AstNode) kid.getNext();\n }\n return new NodePos(n, napos);\n default:\n throw new RuntimeException(\"String_Node_Str\" + ntype);\n }\n}\n"
"private void prepareSortedStacks() throws DataException, IOException {\n allSortedFactRows = new ArrayList();\n int levelSize = 0;\n int measureSize = 0;\n while (true) {\n int maxLevelCount = -1;\n int aggregationIndex = -1;\n int[] levelSortType = null;\n for (int i = 0; i < aggregationCalculators.length; i++) {\n if (sortedFactRows[i] == null && ((aggregationCalculators[i].aggregation.getLevels() != null && aggregationCalculators[i].aggregation.getLevels().length > maxLevelCount) || (aggregationCalculators[i].aggregation.getLevels() == null && maxLevelCount == -1))) {\n aggregationIndex = i;\n if (aggregationCalculators[i].aggregation.getLevels() != null)\n maxLevelCount = aggregationCalculators[i].aggregation.getLevels().length;\n else\n maxLevelCount = 0;\n levelSortType = aggregationCalculators[i].aggregation.getSortTypes();\n }\n }\n if (aggregationIndex == -1) {\n break;\n }\n if (memoryCacheSize != 0) {\n if (levelSize == 0)\n levelSize = getLevelSize(aggregationCalculators[aggregationIndex].aggregation.getLevels());\n else {\n if (aggregationCalculators[aggregationIndex].aggregation.getLevels() != null)\n levelSize += SizeOfUtil.getArraySize(aggregationCalculators[aggregationIndex].aggregation.getLevels().length);\n }\n if (measureSize == 0)\n measureSize = getMeasureSize();\n else {\n if (dataSet4Aggregation.getMetaInfo().getMeasureInfos() != null)\n measureSize += SizeOfUtil.getArraySize(dataSet4Aggregation.getMetaInfo().getMeasureInfos().length);\n }\n }\n Comparator comparator = new Row4AggregationComparator(levelSortType);\n DiskSortedStack diskSortedStack = new DiskSortedStack(100, false, comparator, Row4Aggregation.getCreator());\n if (memoryCacheSize == 0) {\n diskSortedStack.setBufferSize(10000);\n diskSortedStack.setUseMemoryOnly(true);\n }\n DiskSortedStackWrapper diskSortedStackReader = new DiskSortedStackWrapper(diskSortedStack, levelIndex[aggregationIndex]);\n this.allSortedFactRows.add(diskSortedStackReader);\n for (int i = 0; i < aggregationCalculators.length; i++) {\n if (sortedFactRows[i] == null && cover(levelIndex[aggregationIndex], levelIndex[i])) {\n sortedFactRows[i] = diskSortedStackReader;\n }\n }\n }\n if (memoryCacheSize > 0) {\n int rowSize = 16 + (4 + (levelSize + measureSize) - 1) / 8 * 8;\n bufferSize = (int) (this.memoryCacheSize * 4 / 5 / rowSize);\n if (this.simpleFunc == null)\n bufferSize /= 5;\n for (int i = 0; i < allSortedFactRows.size(); i++) {\n DiskSortedStackWrapper diskSortedStackReader = (DiskSortedStackWrapper) allSortedFactRows.get(i);\n diskSortedStackReader.getDiskSortedStack().setBufferSize(bufferSize);\n }\n }\n}\n"
"protected ResourceLocation getEntityTexture(Entity entity) {\n int i = entity.getEntityId() % 5;\n return getTexture(i);\n}\n"