content
stringlengths
40
137k
"public void startEntity(String name) throws SAXException {\n if (null != lexicalHandler) {\n lexicalHandler.startEntity(name);\n }\n}\n"
"public static void main(String[] args) throws Exception {\n Injector injector = Guice.createInjector(Stage.PRODUCTION, new LifecycleModule(), new DummyServiceLocatorModule(), new EmbeddedJettyJerseyModule(), new RESTEventReceiverModule(CollectorEventProcessor.class, \"String_Node_Str\"), new UDPEventReceiverModule(...
"private void onClickOtaEndButton() {\n if (DBG)\n log(\"String_Node_Str\");\n if (!mApplication.cdmaOtaProvisionData.inOtaSpcState) {\n if (PhoneUtils.hangup(mApplication.phone) == false) {\n setSpeaker(false);\n mInCallScreen.handleOtaCallEnd();\n }\n }\n}\n"
"public synchronized void render(GL2 gl) {\n if (neighborSetID == -1 || similarities == null)\n return;\n float yOffset = 0;\n for (GLBrick brick : neighborBrickOrder) {\n int foreignGroupID = brick.getGroup().getGroupID();\n float similarity = similarities[foreignGroupID];\n float ...
"public void getStr(int col, CharSink sink) {\n rec.getStr(col, sink);\n}\n"
"public void run() {\n positionsLock.readLock().lock();\n try {\n int size = positions.size() * 3;\n float[] vertices;\n vertexVBO.lock();\n try {\n vertices = vertexVBO.getBuffer();\n if (vertices == null || vertices.length != size) {\n vertices = ...
"public static ColumnsInfo createTable(ITableContent table, int width, int dpi) {\n int tableWidth = getElementWidth(table, width, dpi);\n int columnCount = table.getColumnCount();\n if (columnCount == 0) {\n return null;\n }\n int[] columns = new int[columnCount];\n int unassignedCount = 0;\n ...
"public void testInsert() {\n Delete.table(InsertModel.class);\n Insert<InsertModel> insert = Insert.into(InsertModel.class).orFail().columns(InsertModel$Table.NAME, InsertModel$Table.VALUE).values(\"String_Node_Str\", \"String_Node_Str\");\n assertEquals(\"String_Node_Str\", insert.getQuery());\n FlowManag...
"public static int[] shape(int[] shape, NDArrayIndex... indices) {\n return shape(shape, new int[shape.length], indices);\n}\n"
"public void cmdXkcd(Context ctx) {\n if (ctx.rawArgs.length() < 1) {\n ctx.send(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\").queue();\n return;\n }\n String first = ctx.args.get(0);\n String second = \"Strin...
"private int parseIntParam(String name, String value) throws JATEException {\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException nfe) {\n String msg = String.format(\"String_Node_Str\" + \"String_Node_Str\", name, value);\n log.error(msg);\n throw new JATEExcepti...
"private void drawDiagonalLine(ICellContent cell, double cellWidth) {\n DiagonalLineInfo diagonalLineInfo = new DiagonalLineInfo();\n int diagonalWidth = PropertyUtil.getDimensionValue(cell, cell.getDiagonalWidth(), (int) cellWidth) / 1000;\n diagonalLineInfo.setDiagonalLine(cell.getDiagonalNumber(), cell.getD...
"public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(name).append(\"String_Node_Str\").append(value);\n if (!StringUtils.isBlank(comment)) {\n builder.append(\"String_Node_Str\").append(comment);\n }\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n TextView textView = new TextView(getActivity());\n textView.setText(\"String_Node_Str\");\n return textView;\n}\n"
"protected static void createTrigger(Connection conn, String schema, String table) throws SQLException {\n Statement stat = conn.createStatement();\n String trigger = StringUtils.quoteIdentifier(schema) + \"String_Node_Str\" + StringUtils.quoteIdentifier(TRIGGER_PREFIX + table);\n stat.execute(\"String_Node_St...
"private void smartAppendExclusive(short[] vl, short val) {\n int oldend;\n if ((nbrruns == 0) || (BufferUtil.toIntUnsigned(val) > (oldend = BufferUtil.toIntUnsigned(getValue(nbrruns - 1)) + BufferUtil.toIntUnsigned(getLength(nbrruns - 1)) + 1))) {\n vl[2 * nbrruns] = val;\n vl[2 * nbrruns + 1] = 0;...
"public String RunSelfForever() {\n System.out.println(\"String_Node_Str\");\n throw new RuntimeException(\"String_Node_Str\");\n}\n"
"private static void countReadsInFeatures(final File samFile, final InputStream gffFile, final File outFile, final StrandUsage stranded, final OverlapMode overlapMode, final String featureType, final String attributeId, final boolean quiet, final int minAverageQual, final File samOutFile, Reporter reporter, String coun...
"private String procedure(Procedure procedure) {\n if (!includeProcedures)\n return null;\n if (ignoreTeiidProcedures && isTeiidProcedure(procedure.getName()))\n return null;\n StringBuilder sb = new StringBuilder();\n boolean isFunction = procedure.isFunction();\n if (isFunction) {\n ...
"public static Set<Vertex> verticesByFullUris(Graph graph, Collection<String> fullUris) {\n Set<Vertex> vertices = new HashSet<Vertex>();\n for (String fullUri : fullUris) {\n Vertex v = vertexByFullUri(graph, fullUri);\n if (v != null)\n vertices.add(v);\n }\n return vertices;\n}\n...
"public Monitor createMonitor(Trajectory trajectory, Formula property) {\n if (trajectory.getLastPoint().getTime() < property.getTimeNeeded()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + property + \"String_Node_Str\" + property.getTimeNeeded() + \"String_Node_Str\" + trajectory.getLastPoint(...
"private static void editChatLineList(List<ChatLine> lineList, Function<Message, Boolean> toReplace, Message... replacements) {\n ListIterator<ChatLine> chatLineIterator = lineList.listIterator();\n while (chatLineIterator.hasNext()) {\n ChatLine chatLine = chatLineIterator.next();\n boolean result ...
"protected String computeKey() {\n Fingerprint f = new Fingerprint();\n f.addString(GUID);\n f.addInt(privateHeaders.size());\n for (Artifact artifact : privateHeaders) {\n f.addPath(artifact.getExecPath());\n }\n f.addInt(publicHeaders.size());\n for (Artifact artifact : publicHeaders) {\n ...
"public Object exec(List args) throws TemplateModelException {\n if (args.size() != 1) {\n throw new TemplateModelException(\"String_Node_Str\" + biName + \"String_Node_Str\" + args.size() + \"String_Node_Str\");\n }\n TemplateModel tzArgTM = (TemplateModel) args.get(0);\n TimeZone tzArg;\n Object...
"public int getIndex(short x) {\n return this.binarySearch(0, size, x);\n}\n"
"protected boolean containment(EObject eObject) {\n return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof TasksGroup) || (eObject instanceof Task) || (eObject instanceof Loop) || (eObject instanceof TaskReference);\n}\n"
"private int getAcceptCount(PrepareState proposalState) {\n int acceptCount = 0;\n PrepareNumber prepareNumber = proposalState.getPrepareRequest().getNumber();\n for (PrepareResponse prepareResponse : proposalState.getProposalResponses()) {\n if (prepareNumber.compareTo(prepareResponse.getMaxNumberPrepa...
"public void renderSeries(IPrimitiveRenderer ipr, Plot p, ISeriesRenderingHints isrh) throws ChartException {\n try {\n validateDataSetCount(isrh);\n } catch (ChartException vex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, vex);\n }\n boolean bRenderin...
"public void enforce(HttpRequest request, HttpResponder responder) throws Exception {\n Iterator<MethodArgument> arguments = parseArguments(request);\n EntityId entityId = deserializeNext(arguments);\n Principal principal = deserializeNext(arguments);\n Action action = deserializeNext(arguments);\n LOG.d...
"public void initialize(AbstractSession session) throws DescriptorException {\n super.initialize(session);\n if (this.fieldToClassMappings.size() == 0) {\n this.convertClassNamesToClasses(((XMLConversionManager) session.getDatasourcePlatform().getConversionManager()).getLoader());\n }\n Iterator<XMLM...
"protected List<MapGetAllCodec.ResponseParameters> getAllInternal(Map<Integer, List<Data>> pIdToKeyData, Map<K, V> result) {\n Map<Data, Boolean> markers = EMPTY_MAP;\n List<MapGetAllCodec.ResponseParameters> responses;\n try {\n for (Entry<Integer, List<Data>> partitionKeyEntry : pIdToKeyData.entrySet(...
"public void createTable(DataAccess data) throws DatabaseWriteException {\n Connection conn = pool.getConnectionFromPool();\n PreparedStatement ps = null;\n try {\n StringBuilder fields = new StringBuilder();\n HashMap<Column, Object> columns = data.toDatabaseEntryList();\n Iterator<Column...
"public ILayout createLayout(ContainerArea parent, LayoutContext context, IContent content) {\n switch(content.getContentType()) {\n case IContent.DATA_CONTENT:\n case IContent.LABEL_CONTENT:\n case IContent.TEXT_CONTENT:\n if (PropertyUtil.isInlineElement(content)) {\n ...
"private List<GraphSourceItem> generateIf(SourceGeneratorLocalData localData, GraphTargetItem expression, List<GraphTargetItem> onTrueCmds, List<GraphTargetItem> onFalseCmds, boolean ternar) throws CompilationException {\n List<GraphSourceItem> ret = new ArrayList<>();\n List<AVM2Instruction> onTrue;\n List<AV...
"public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, InterruptedException, PluginException {\n this.setBrowserExclusive();\n br.getHeaders().put(\"String_Node_Str\", \"String_Node_Str\");\n br.getPage(downloadLink.getDownloadURL());\n if (br.containsHTML(\"String_Nod...
"public void setNextParticle() throws NameDuplicationException, IllegalActionException {\n Token _result;\n Token processNoiseSample;\n LinkedList newParticle = new LinkedList();\n for (int i = 0; i < _stateSpaceSize; i++) {\n Parameter p = (Parameter) (_updateEquations.get(_stateVariables[i])).getAt...
"public Pony importPony() {\n if (this.version == VERSION_COWSAY)\n return this.importCow();\n boolean[] plain = new boolean[9];\n Color[] colours = new Color[256];\n boolean[] format = plain;\n Color background = null, foreground = null;\n for (int i = 0; i < 256; i++) {\n Colour colour...
"public void onQPyExec(View v) {\n if (checkAppInstalledByName(getApplicationContext(), extPlgPlusName)) {\n Toast.makeText(this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent();\n intent.setClassName(extPlgPlusName, \"String_Node_Str\");\n intent.setAction...
"public static void main(String[] args) {\n SplashScreen.getInstance().post(\"String_Node_Str\" + System.getProperty(\"String_Node_Str\") + \"String_Node_Str\");\n handlePrintUsageRequest(args);\n handleLaunchArguments(args);\n setupLogging();\n try (final TerasologyEngine engine = new TerasologyEngine(c...
"public void actionPerformed(ActionEvent actor) {\n int returnVal = 0;\n player = GameManager.getCurrentPlayer();\n if (actor.getActionCommand().equalsIgnoreCase(BUY)) {\n buyButtonClicked();\n passButton.setText(\"String_Node_Str\");\n passButton.setMnemonic(KeyEvent.VK_D);\n } else if...
"public List<Sample> getSamples() {\n List<Sample> samples = this.experiment.getSamples();\n List<Sample> result = new ArrayList<>(samples.size());\n for (Sample sample : samples) {\n result.add(new UnmodifiableSample(sample));\n }\n return Collections.unmodifiableList(result);\n}\n"
"private String getNonceFromResponse(Response response) {\n WWWAuthenticate wwwAuth = (WWWAuthenticate) response.getHeader(SIPHeaderNames.WWW_AUTHENTICATE);\n if (wwwAuth != null)\n return wwwAuth.getNonce();\n ProxyAuthenticate proxyAuth = (ProxyAuthenticate) response.getHeader(SIPHeaderNames.PROXY_AUT...
"public void drawAngularGridLines(Graphics2D g2, PolarPlot plot, List<ValueTick> ticks, Rectangle2D dataArea) {\n g2.setFont(plot.getAngleLabelFont());\n g2.setStroke(plot.getAngleGridlineStroke());\n g2.setPaint(plot.getAngleGridlinePaint());\n ValueAxis axis = plot.getAxis();\n double centerValue, oute...
"int extendOriginalSequenceNumber(short ssOrigSeqnum) {\n ExtendedSequenceNumberInterval mostRecentInterval = currentExtendedSequenceNumberInterval;\n if (mostRecentInterval == null) {\n Map.Entry<Integer, ExtendedSequenceNumberInterval> entry = intervals.lastEntry();\n if (entry != null) {\n ...
"public void processElement(ProcessContext c) {\n Variant v = c.element();\n List<TableRow> calls = new ArrayList<>();\n for (Call call : v.getCalls()) {\n calls.add(new TableRow().set(\"String_Node_Str\", call.getCallSetName()).set(\"String_Node_Str\", call.getPhaseset()).set(\"String_Node_Str\", call....
"public void run() {\n System.out.println(\"String_Node_Str\");\n List<MKAnnotation> photos = loadPhotoSet(\"String_Node_Str\");\n if (photos == null)\n throw new UnsupportedOperationException(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n PhotoMapViewController.this.photos = p...
"public void testAverageGetTimeStat() {\n ICache<Integer, String> cache = createCache();\n CacheStatistics stats = cache.getLocalCacheStatistics();\n final int ENTRY_COUNT = 100;\n for (int i = 0; i < ENTRY_COUNT; i++) {\n cache.put(i, \"String_Node_Str\" + i);\n }\n long start = System.nanoTim...
"public void onReceiveHangUpFromUser(Integer integer) {\n Log.d(CALL_INTEGRATION, \"String_Node_Str\");\n if (!isCleintReadyAccept) {\n waitingTasksMap.clear();\n finish();\n }\n if (currentFragment instanceof IncomingCallFragment || currentFragment instanceof OutgoingCallFragment) {\n ...
"private void _evalFieldMacro(Entity<?> en, List<MappingInfo> infos) {\n for (MappingInfo info : infos) {\n if (null != info.annPrev) {\n en.addBeforeInsertMacro(__macro(en.getField(info.name), _annToFieldMacroInfo(info.annPrev.els(), info.annPrev.value())));\n }\n if (null != info.an...
"public void discoverSearchTest() throws Exception {\n getClient().perform(get(\"String_Node_Str\")).andExpect(status().isOk()).andExpect(jsonPath(\"String_Node_Str\", is(\"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\", containsString(\"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\", conta...
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n DivisionOfficeManager doManager = new DivisionOfficeManagerSession();\n RequestDispatcher view = request.getRequestDispatcher(\"String_Node_Str\");\n ArrayList<String> buildingName = new Ar...
"public Container or(BitmapContainer value2) {\n BitmapContainer value1 = this;\n BitmapContainer answer = new BitmapContainer();\n for (int k = 0; k < answer.bitmap.length; ++k) {\n answer.bitmap[k] = value1.bitmap[k] | value2.bitmap[k];\n answer.cardinality += Long.bitCount(answer.bitmap[k]);\n...
"public void match(PactRecord value1, PactRecord value2, Collector out) throws Exception {\n keyString = value1.getField(0, keyString);\n keyString.setValue(\"String_Node_Str\" + (Integer.parseInt(keyString.getValue()) + 1));\n value1.setField(0, keyString);\n value1.getField(1, valueString);\n int val1 ...
"public void testRuntimeException() {\n this.request(\"String_Node_Str\").jsonGet();\n}\n"
"private void initOptions() {\n ConfigurableOption bidiProcessing = new ConfigurableOption(BIDI_PROCESSING);\n bidiProcessing.setDisplayName(getMessage(\"String_Node_Str\"));\n bidiProcessing.setDataType(IConfigurableOption.DataType.BOOLEAN);\n bidiProcessing.setDisplayType(IConfigurableOption.DisplayType.C...
"public void initialize() throws IllegalActionException {\n InputStream source = null;\n Parameter p;\n p = (Parameter) getAttribute(\"String_Node_Str\");\n _xframesize = ((IntToken) p.getToken()).intValue();\n p = (Parameter) getAttribute(\"String_Node_Str\");\n _yframesize = ((IntToken) p.getToken()...
"private static void setupChestLoot(String category) {\n if (DimletConfiguration.unknownDimletChestLootRarity > 0) {\n ChestGenHooks chest = ChestGenHooks.getInfo(category);\n chest.addItem(new WeightedRandomChestContent(DimletSetup.unknownDimlet, 0, DimletConfiguration.unknownDimletChestLootMinimum, D...
"public void loadPlugins() {\n if (alienInitDirectory == null || alienInitDirectory.isEmpty() || alienPluginsInitPath == null) {\n log.debug(\"String_Node_Str\");\n return;\n }\n if (!Files.exists(alienPluginsInitPath) || !Files.isDirectory(alienPluginsInitPath)) {\n log.warn(\"String_Node...
"public static boolean pathFinished(HumanNPC npc) {\n return npc.getHandle().pathFinished();\n}\n"
"public void testAddMethod() throws Exception {\n javaClass.addMethod().setName(\"String_Node_Str\").setReturnTypeVoid().setBody(\"String_Node_Str\").getOrigin();\n List<Method> methods = javaClass.getMethods();\n assertEquals(3, methods.size());\n assertNull(methods.get(2).getReturnType());\n}\n"
"private XPathFragment getXPathFragmentForValue(Object value, MarshalRecord marshalRecord, XMLMarshaller marshaller) {\n if (xmlAnyCollectionMapping.usesXMLRoot() && (value instanceof XMLRoot)) {\n XMLRoot xmlRootValue = (XMLRoot) value;\n XPathFragment xmlRootFragment = new XPathFragment(xmlRootValue....
"public final Method[] getReflectiveMethods() {\n if (methods != null)\n return methods;\n Class baseclass = getJavaClass();\n Method[] allmethods = baseclass.getDeclaredMethods();\n int n = allmethods.length;\n methods = new Method[n];\n for (int i = 0; i < n; ++i) {\n Method m = allmet...
"protected void writeInternal(ObjectDataOutput out) throws IOException {\n super.writeInternal(out);\n int count = data.size();\n out.writeInt(count);\n if (count > 0) {\n long now = Clock.currentTimeMillis();\n for (Map.Entry<String, Map<Data, CacheRecord>> entry : source.entrySet()) {\n ...
"private int countTokensInText(String text) {\n WhitespaceTokenizer tokenizer = new WhitespaceTokenizer();\n tokenizer.setReader(new StringReader(text));\n int tokens = 0;\n try {\n while (tokenizer.incrementToken()) {\n ++tokens;\n }\n } catch (Exception e) {\n LOGGER.err...
"public void onWebSocketMessage(WebSocketMessage message) {\n message.getUsernames().stream().filter(username -> webSocketUserPresenceHandler.isPresent(username)).forEach(username -> {\n log.debug(\"String_Node_Str\", message, username);\n messagingTemplate.convertAndSendToUser(username, \"String_Node_...
"public KeySetView<K> keySet() {\n return asset.acquireView(KeySetView.class, context);\n}\n"
"public void show() {\n final Locale locale = I18N.getCurrentLocale();\n String filename = null;\n UIModes uiMode = UIModes.valueOf(Config.getProperty(Config.UI_MODE, \"String_Node_Str\").toUpperCase(Locale.ENGLISH));\n if (Gdx.input.isPeripheralAvailable(Peripheral.MultitouchScreen) && uiMode == UIModes.TW...
"private void fillDataStore(String text) {\n dataStore.clear();\n int enIndex = text.indexOf(\"String_Node_Str\");\n int frIndex = text.indexOf(\"String_Node_Str\");\n if (enIndex >= 0 && frIndex >= 0) {\n if (enIndex < frIndex) {\n String enDesc = text.substring(enIndex + 4, frIndex - 1);...
"public void decorate(Object element, IDecoration decoration) {\n final INodePO node = (INodePO) element;\n IProblem worstProblem = ProblemFactory.getWorstProblem(node.getProblems());\n if (worstProblem != null) {\n switch(worstProblem.getStatus().getSeverity()) {\n case IStatus.WARNING:\n ...
"public void clearData() {\n if (_selectedItemIndex < 0) {\n return;\n }\n _items.get(_selectedItemIndex).setSelected(false);\n}\n"
"private static Boolean madeEnough(Generation offspring) {\n GAParameters params = GAParameters.getParams();\n if (GAParameters.getParams().getRecord().getGenNum() == 0) {\n List<Pair<StructureOrgCreator, Integer>> initialOrgCreators = params.getInitialOrgCreators();\n for (Pair<StructureOrgCreator,...
"private void addPrimitiveValueConvertingAsNeeded(Class<?> targetType) {\n Object convertedValue = null;\n if (valueToReturn instanceof Number) {\n convertedValue = convertFromNumber(targetType, (Number) valueToReturn);\n } else if (valueToReturn instanceof Character) {\n convertedValue = convert...
"public void addNewsItem(NewsItem ni, Category cat, int matchCount) {\n if (cat.isLeafCategory()) {\n _cache.removeEntriesForGroups(new String[] { \"String_Node_Str\" + cat.getKey() });\n SQL_NewsItem sni = (SQL_NewsItem) ni;\n if (!sni.inTheDB())\n _log.error(\"String_Node_Str\" + sn...
"private void addReplicas(Volume volume, String fileName, int replicaNumber) throws IOException, InterruptedException {\n List<String> osdUUIDs = volume.getSuitableOSDs(userCredentials, fileName, replicaNumber);\n assert (osdUUIDs.size() >= replicaNumber);\n int currentReplicaNumber = volume.listReplicas(userC...
"void onEvent() {\n long transactionId = inWire.read(TRANSACTION_ID).int64();\n timestamp = inWire.read(TIME_STAMP).int64();\n channelId = inWire.read(CHANNEL_ID).int16();\n inWire.read(METHOD_NAME).text(methodName);\n if (\"String_Node_Str\".contentEquals(methodName)) {\n writeVoid(bytesMap -> {\...
"public void dispose(final GL gl) {\n super.dispose(gl);\n final GL3 gl3 = gl.getGL3();\n final int[] handles = new int[1];\n handles[0] = vbo;\n gl3.glDeleteBuffers(1, handles, 0);\n if (!this.vaoMap.isEmpty()) {\n try {\n for (GLContext context : this.vaoMap.keySet()) {\n ...
"public int compareTo(ReplazableString other) {\n int n = Math.min(used, other.used);\n int k = 0;\n while (k < n) {\n int c1 = this.buffer[k] & 0xFF;\n int c2 = other.buffer[k] & 0xFF;\n if (c1 != c2) {\n return c1 - c2;\n }\n k++;\n }\n return used - other....
"private boolean needsValueFunction(PathExpression expression) {\n JoinNode baseNode = (JoinNode) expression.getBaseNode();\n return !expression.isCollectionKeyPath() && baseNode.getParentTreeNode() != null && baseNode.getParentTreeNode().isMap() && expression.getField() == null;\n}\n"
"public void run() throws IOException {\n FileUtils.mkdir(outputDir.getAbsolutePath());\n final List<File> tests = FileUtils.getFiles(baseDir, includes, excludes);\n if (tests.isEmpty()) {\n logger.warn(\"String_Node_Str\");\n return;\n }\n logger.info(\"String_Node_Str\", threadCount);\n ...
"public void updateTick(World world, int x, int y, int z, Random rand) {\n if (!world.isRemote) {\n if (this.isRandomlyRadioactive) {\n AxisAlignedBB bounds = AxisAlignedBB.getBoundingBox(x - this.radius, y - this.radius, z - this.radius, x + this.radius, y + this.radius, z + this.radius);\n ...
"private SegmentBody loadSegmentFromCache(Map<SegmentHeader, SegmentBody> headerBodies, SegmentHeader header) {\n SegmentBody body = headerBodies.get(header);\n if (body != null) {\n return body;\n }\n body = cacheMgr.compositeCache.get(header);\n if (body == null) {\n cacheMgr.remove(heade...
"private synchronized void loadPredictions() {\n InputStream in = null;\n try {\n predicted = new HashMap();\n Properties temp = NetUtil.loadProperties(predictURI);\n Iterator iter = temp.keySet().iterator();\n while (iter.hasNext()) {\n String title = (String) iter.next();\...
"public List<Object> toList() {\n List<Object> list = new ArrayList<Object>();\n list.add(data);\n if (selectedCell != null) {\n list.add(selectedCell);\n }\n return list;\n}\n"
"public void setStatus(String statusText) {\n final Menu menu = systemTrayMenu;\n if (menu instanceof _AppIndicatorTray) {\n ((_AppIndicatorTray) menu).setStatus(statusText);\n } else if (menu instanceof _AppIndicatorNativeTray) {\n ((_AppIndicatorNativeTray) menu).setStatus(statusText);\n } e...
"public boolean lvlup(boolean ignoreItems) {\n checkForItems();\n if (ignoreItems == true) {\n if (getLevel() == -1 && getExp() != 0)\n setExp(0);\n if (getLevel() == -1) {\n Messaging.sendMessage(player, Language.cantLevel);\n return false;\n } else if (nextL...
"private String escapeString(char[] src, int from, int to) {\n int len = 1 + to - from;\n if (has_escape(src, from, to) == false) {\n return src.substring(from, to);\n }\n final StringBuilder buf = new StringBuilder(len);\n for (int i = from; i <= to; i++) {\n char c = src[i];\n if (...
"protected void handleIQEvent(IQEvent evt) {\n final IQ iq = evt.getIQ();\n if (iq instanceof RosterPacket) {\n final RosterPacket rosterPacket = (RosterPacket) iq;\n if (rosterPacket.getType() == IQ.Type.SET || rosterPacket.getType() == IQ.Type.RESULT) {\n for (final Iterator i = rosterP...
"private DataType resolveTypeName(String modelName, String typeName) {\n DataType result = resolveTopic(modelName, typeName);\n if (result == null) {\n if (modelName == null || modelName.equals(\"String_Node_Str\")) {\n for (Model model : models.values()) {\n DataType modelResult ...
"private void spellCheck(QueryRequest req, QueryResult res) throws IOException {\n ArrayList queryTerms = gatherTerms(req.query);\n SpellcheckParams params = req.spellcheckParams;\n if (params.docScoreCutoff > 0 && maxDocScore > params.docScoreCutoff)\n return;\n if (params.totalDocsCutoff > 0 && tot...
"public void onSuccess(AVIMTypedMessage message) {\n LogUtils.i();\n loadMessagesWhenInit(adapter.getCount());\n}\n"
"public static byte[] fromList(List<Tag> tags) {\n if (tags == null || tags.isEmpty()) {\n return HConstants.EMPTY_BYTE_ARRAY;\n }\n int length = 0;\n for (Tag tag : tags) {\n length += tag.getValueLength() + Tag.INFRASTRUCTURE_SIZE;\n }\n byte[] b = new byte[length];\n int pos = 0;\n...
"public Void install(String path, AssetTree assetTree) throws IOException {\n String uri = path + \"String_Node_Str\" + putReturnsNull + \"String_Node_Str\" + removeReturnsNull;\n MapView mapView = assetTree.acquireMap(uri, keyType, valueType);\n if (importFile != null) {\n Wire wire = Wire.fromFile(imp...
"public static ArrayList<edu.ucsb.eucalyptus.msgs.Volume> getVolumeReply(Map<String, AttachedVolume> attachedVolumes, List<Volume> volumes) throws EucalyptusCloudException {\n Multimap<String, Volume> partitionVolumeMap = HashMultimap.create();\n Map<String, StorageVolume> idStorageVolumeMap = Maps.newHashMap();\...
"public static IBinding loadBinding(DataInputStream dis) throws IOException, DataException {\n int type = IOUtil.readInt(dis);\n String name = IOUtil.readString(dis);\n String function = IOUtil.readString(dis);\n IBaseExpression expr = ExprUtil.loadBaseExpr(dis);\n IBaseExpression filter = ExprUtil.loadB...
"public void printLine(String sproduct, double dprice, double dunits) {\n try {\n m_fiscal.printRecItem(sproduct, roundFiscal(dprice * dunits), (int) (dunits * 1000), taxinfo, roundFiscal(dprice), \"String_Node_Str\");\n } catch (JposException e) {\n }\n}\n"
"private void performZoom(MotionEvent event) {\n if (event.getPointerCount() >= 2) {\n float totalDist = spacing(event);\n if (totalDist > 10f) {\n PointF t = getTrans(mTouchPointCenter.x, mTouchPointCenter.y);\n if (mTouchMode == PINCH_ZOOM) {\n float scale = total...
"private void addConditionalExprBindings(TotalExprBinding result, IConditionalExpression key, List bindings, String groupName) throws EngineException {\n try {\n IConditionalExpression ce = key;\n if (hasAggregationInFilter(key)) {\n result.addNewExpression(ce);\n return;\n ...
"public Date generateDateBetween(String minString, String maxString, RandomWrapper rnd) {\n SimpleDateFormat df = new SimpleDateFormat(\"String_Node_Str\");\n Date minDate = null;\n Date maxDate = null;\n try {\n minDate = df.parse(minString);\n maxDate = df.parse(maxString);\n } catch (Par...
"protected void computeResult() {\n MavenProject targetPOM = getTargetPOM();\n IMavenProjectFacade facade = MavenPlugin.getDefault().getMavenProjectManager().getMavenProject(targetPOM.getGroupId(), targetPOM.getArtifactId(), targetPOM.getVersion());\n Model targetModel;\n EditingDomain targetEditingDomain;\...
"private JavaRDD<Cells> executeInitialStep(LogicalStep logicalStep, JavaRDD<Cells> rdd, String tableName) throws ExecutionException {\n LogicalStep currentStep = logicalStep;\n while (currentStep != null) {\n if (currentStep instanceof Filter) {\n executeFilter((Filter) currentStep, rdd);\n ...