content
stringlengths
40
137k
"private void writeFile() throws IOException {\n final MessageType schema = new MessageType(\"String_Node_Str\", new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, \"String_Node_Str\"), new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, \"String_Node_Str\"), new PrimitiveType(Repetition.OP...
"public String getPathFromUrl(final String url) {\n String denormalizedUrl = denormalizeSeparators(url);\n return uploadDirectory.getAbsolutePath() + File.separator + denormalizedUrl.substring(denormalizedUrl.indexOf(File.separatorChar) + L_FILE_URL_PREFIX.length() - 1);\n}\n"
"public void testGetSummoner() throws InterruptedException, TimeoutException, ExecutionException {\n try {\n handler.getSummoner(SUMMONER_NAME_2).get(1, MINUTES);\n } catch (RequestException ex) {\n if (isNotServerside(ex))\n throw ex;\n }\n}\n"
"public void Init(FMLInitializationEvent event) {\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"String_Node_Str\");\n AEApi.instance().partHelper().registerNewLayer(\"String_Node_Str\", \"Strin...
"protected File getAssemblyFile(Assembler assembler, File assemblyDir) {\n if (assemblyDir.getName().equals(\"String_Node_Str\")) {\n return assembler.getScaffoldsFile().getAbsoluteFile();\n } else if (assemblyDir.getName().equals(\"String_Node_Str\")) {\n return assembler.getContigsFile();\n } e...
"private void extractStatements(ControlFlowAnalyzer initiallyLive) {\n Map<Integer, List<JsStatement>> fragmentStats = new LinkedHashMap<Integer, List<JsStatement>>();\n {\n LivenessPredicate alreadyLoaded = new NothingAlivePredicate();\n LivenessPredicate liveNow = new CfaLivenessPredicate(initiall...
"public void doubleClick(DoubleClickEvent event) {\n ISelection selection = ServerView.this.getViewer().getSelection();\n TreeObject xo = (TreeObject) ((IStructuredSelection) selection).getFirstElement();\n if (xo.getType() == TreeObject._ACTION_) {\n Class<?> actionClass = (Class<?>) xo.getWsKey();\n ...
"public static String toSan(Board board, int move) {\n board.generateLegalMoves();\n boolean isLegal = false;\n boolean disambiguate = false;\n boolean fileEqual = false;\n boolean rankEqual = false;\n for (int i = 0; i < board.legalMoveCount; i++) {\n int move2 = board.legalMoves[i];\n ...
"public static final Complex[] resize(final Complex[] array, final int newLength, final int startIdx) {\n Complex[] returnValue = new Complex[newLength];\n int copySize = Math.min(newLength, array.length - startIdx);\n if ((startIdx >= array.length) && (copySize > 0)) {\n throw new IllegalArgumentExcept...
"public static String[] getJobTypeToDispaly() {\n String[] dispalyNames = new String[values().length];\n for (int i = 0; i < values().length; i++) {\n dispalyNamesList.add(i, values()[i].getDisplayName());\n }\n if (!PluginChecker.isStormPluginLoader()) {\n dispalyNamesList.remove(JobType.BIGD...
"public static void main(final String[] args) {\n final Mat pFrame = imread(\"String_Node_Str\", CV_LOAD_IMAGE_GRAYSCALE), cFrame = imread(\"String_Node_Str\", CV_LOAD_IMAGE_GRAYSCALE), pGray = new Mat(), cGray = new Mat(), Optical_Flow = new Mat();\n pFrame.convertTo(pGray, CV_32FC1);\n cFrame.convertTo(cGray...
"private BufferedStructureArray passBaseCubeResultSet(IAggregationResultSet baseResultSet, List<IAggregationResultSet> drillResultSets, List<IEdgeDrillFilter> drillFilters) throws IOException {\n BufferedStructureArray tempBufferArray = new BufferedStructureArray(AggregationResultRow.getCreator(), 2000);\n List<M...
"public boolean onOptionsItemSelected(MenuItem item) {\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\" + item);\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\" + item.getItemId());\n switch(item.getItemId()) {\n case R.id.menuSave:\n updateDatabase();\n setResult(...
"public synchronized boolean removeSSRC(long ssrc) {\n if (ssrcs.length == 1) {\n if (ssrcs[0] == ssrc) {\n ssrcs = NO_SSRCS;\n return true;\n } else\n return false;\n } else {\n for (int i = 0; i < ssrcs.length; i++) {\n if (ssrcs[i] == ssrc) {\n ...
"protected void onShutdown() {\n txMetricsCollector.gauge(\"String_Node_Str\", committingChangeSets.size());\n txMetricsCollector.gauge(\"String_Node_Str\", committedChangeSets.size());\n txMetricsCollector.gauge(\"String_Node_Str\", inProgress.size());\n txMetricsCollector.gauge(\"String_Node_Str\", getInv...
"protected Component deserializeItem(JsonElement json, JsonDeserializationContext context) {\n return context.deserialize(json, ComponentTypeAdapterFactory.getJsonComponentType(json));\n}\n"
"private void readIndexes(String schema) throws JDBCException, SQLException {\n updateListeners(\"String_Node_Str\" + database.toString() + \"String_Node_Str\");\n for (Table table : tablesMap.values()) {\n ResultSet rs;\n Statement statement = null;\n if (database instanceof OracleDatabase) ...
"protected BufferedImage getButtonImage(T phenotype, int width, int height, double[] inputMultipliers) {\n GameBundle bundle = setUpGameWithLevelFromCPPN(phenotype);\n BufferedImage levelImage = GVGAIUtil.getLevelImage(((BasicGame) bundle.game), bundle.level, (Agent) bundle.agent, width, height, bundle.randomSeed...
"public static <T> ConfigurationMetadata<T> getConfigurationMetadata(Class<T> configClass) {\n ConfigurationMetadata<T> metadata = new ConfigurationMetadata<T>(configClass, false);\n return metadata;\n}\n"
"public void setSelectedItem(TreeItem item, boolean fireEvents) {\n if (item == null) {\n if (curSelection == null) {\n return;\n }\n curSelection.setSelected(false);\n curSelection = null;\n return;\n }\n onSelection(item, fireEvents, true);\n}\n"
"public void createControl(Composite parent) {\n cmpContent = new Composite(parent, SWT.NONE);\n {\n GridLayout glContent = new GridLayout(2, false);\n cmpContent.setLayout(glContent);\n GridData gd = new GridData(GridData.FILL_BOTH);\n cmpContent.setLayoutData(gd);\n }\n Composi...
"public void run() {\n String sql = \"String_Node_Str\";\n List<String> args = new ArrayList<String>();\n if (dateFrom != null)\n args.add(\"String_Node_Str\" + dateFrom + \"String_Node_Str\");\n if (dateTo != null)\n args.add(\"String_Node_Str\" + dateTo + \"String_Node_Str\");\n if (playe...
"public void KKTFactorAndSolve(VectorNd vel, VectorNd fpar, VectorNd bf, VectorNd btmp, VectorNd vel0, double h, double a0, double a1, double a2, double a3) {\n updateStateSizes();\n int velSize = myActiveVelSize;\n boolean analyze = false;\n updateSolveMatrixStructure();\n if (myKKTSolveMatrixVersion !=...
"public void onCreate(Bundle _savedInstanceState) {\n super.onCreate(_savedInstanceState);\n setContentView(R.layout.main);\n context = getApplicationContext();\n DisplayMetrics dm = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(dm);\n Options.getInstance().scaleConversion(...
"public static Dbms getDbms(String dbmsId) {\n if (dbmsId == null) {\n throw new IllegalArgumentException();\n }\n Dbms[] allDbmsArray = getAllDbmsArray();\n for (Dbms dbms : allDbmsArray) {\n if (dbmsId.equals(dbms.getId())) {\n return dbms;\n }\n }\n ExceptionHandler....
"public void setResultPanel(Object result) {\n System.out.println(\"String_Node_Str\" + result + \"String_Node_Str\");\n if (resultPane instanceof JEditorPane) {\n if (result == null)\n result = \"String_Node_Str\";\n ((JEditorPane) resultPane).setText(result.toString());\n } else {\n ...
"public String getDefaultWebAppName(String appPrefix) {\n return appPrefix + '_' + randomPrefix + '_' + getDefaultWebAppProjectName();\n}\n"
"public final boolean sameBits(OffsetBitVector B) {\n if (this == B) {\n return true;\n }\n int wordDiff = wordDiff(offset, set.offset);\n int maxWord = Math.min(bits.length, set.bits.length - wordDiff);\n int i = 0;\n if (wordDiff < 0) {\n for (; i < -wordDiff; i++) {\n if (b...
"private int runQueryIntentServices() {\n Intent intent;\n try {\n intent = parseIntentAndUser();\n } catch (URISyntaxException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n try {\n List<ResolveInfo> result = mInterface.queryIntentServices(intent, null, 0, mTargetUser)....
"private synchronized void cacheNewRootObject(IRootObject rootObject) throws RepositoryException {\n Integer key = new Integer(rootObject.getID());\n if (rootObjectsById.containsKey(key)) {\n throw new RepositoryException(\"String_Node_Str\" + rootObjectsById + \"String_Node_Str\");\n }\n CacheRecord...
"public void replaceVars(Map<String, Oparg> renames) {\n replaceVarsInBlocks(renames, false);\n ICUtil.replaceVarsInList(renames, waitVars, true);\n ICUtil.replaceVarsInList(renames, usedVariables, true);\n ICUtil.replaceVarsInList(renames, containersToRegister, true);\n}\n"
"private void loadMediaPackages(HashMap<SdInstallArgs, String> processCids, int[] uidArr, HashSet<String> removeCids) {\n ArrayList<String> pkgList = new ArrayList<String>();\n Set<SdInstallArgs> keys = processCids.keySet();\n boolean doGc = false;\n for (SdInstallArgs args : keys) {\n String codePat...
"private static double getDouble(Object o) throws BirtException {\n if (o == null)\n return Double.NaN;\n return DataTypeUtil.toDouble(o);\n}\n"
"public void drop(DropTargetEvent event) {\n DropTarget dropTarget = (DropTarget) event.getSource();\n Control control = dropTarget.getControl();\n XmlToSchemaDraggedData draggedData = XPathTransfer.getInstance().getDraggedData();\n List<TransferableXPathEntry> transferableEntryList = draggedData.getTransfe...
"public void changeToPreRunning() {\n if (state != State.DESTROYED && state != State.STARTED) {\n return;\n }\n log.fine(String.format(\"String_Node_Str\", id, configuration));\n state = State.PRE_RUNNING;\n}\n"
"protected boolean putIfAbsent(Data key, Object value, ExpiryPolicy expiryPolicy, String caller, boolean disableWriteThrough) {\n final ExpiryPolicy localExpiryPolicy = expiryPolicy != null ? expiryPolicy : defaultExpiryPolicy;\n final long now = Clock.currentTimeMillis();\n final long start = isStatisticsEnab...
"public static void main(String[] args) {\n String password = \"String_Node_Str\";\n String username = \"String_Node_Str\";\n System.out.println(Calendar.getInstance().getTime());\n GoogleSkyJamAPI api = new GoogleSkyJamAPI(new ApacheConnector(), new JSON(), new File(\"String_Node_Str\"));\n GoogleMusicA...
"public void run() {\n changeExecutionState(ExecutionState.REPLAYING, null);\n if (this.executionObserver.isCanceled()) {\n changeExecutionState(ExecutionState.CANCELED, null);\n return;\n }\n resetAllOutputBroker();\n try {\n replayCheckpoint();\n if (this.executionObserver.i...
"public void buildCellStyle(ICellContent cell, StringBuffer styleBuffer, boolean isHead, boolean fixedCellHeight) {\n IStyle style = getElementStyle(cell);\n if (fixedReport) {\n HTMLEmitterUtil.buildOverflowStyle(styleBuffer, style, true);\n }\n IStyle cellMergedStyle = new CellMergedStyle(cell);\n ...
"public void scaleMshotImageBasedOnScrollPos(int scrollPos) {\n if (mImageMshot == null) {\n return;\n }\n float scale = Math.max(0f, 0.9f + (-scrollPos * 0.008f));\n if (scale != mCurrentMshotScale) {\n float centerX = mMshotWidth * 0.5f;\n Matrix matrix = new Matrix();\n matrix...
"public static ExperimentResults runExperiment(ErrorEstimationMethod method, List<boolean[][]> functionOutputs, List<boolean[]> trueLabels, List<boolean[][]> evaluationFunctionOutputs, double alpha, double gamma) {\n double[][] errorRates = new double[functionOutputs.size()][];\n boolean[][] labels = new boolean[...
"public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = (prime * result) + connectionSetupTime;\n result = (prime * result) + ((name == null) ? 0 : name.hashCode());\n result = (prime * result) + timoutInSeconds;\n result = (prime * result) + ((version == null) ? 0 : version.hash...
"public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {\n super.onReceivedError(view, errorCode, description, failingUrl);\n if (getActivity() != null)\n onTaskError(ErrorActivity.createErrorIntent(getActivity(), 0, description, false, null));\n}\n"
"public String getMeasureAlias(final int i) {\n Util.assertTrue(i == 0);\n return columnNames.get(columnNames.size() - 1);\n}\n"
"private boolean exists() {\n if ((vsid == null) || (httpService == null))\n return false;\n List<VirtualServer> list = httpService.getVirtualServer();\n for (VirtualServer vs : list) {\n String currId = vs.getId();\n if (currId != null && currId.equals(vsid))\n return true;\n ...
"protected MathTransform initialValue() {\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n try {\n final String googleWebMercatorCode = \"String_Node_Str\";\n final String cartesianCode = \"String_Node_Str\";\n final CRSAuthorityFactory crsAuthorityFactory = CRS.getAuthorityF...
"public void widgetDefaultSelected(SelectionEvent e) {\n if (getSelection() instanceof StructuredSelection) {\n List list = new ArrayList();\n Object selectedObject = ((StructuredSelection) getSelection()).getFirstElement();\n list.add(selectedObject);\n ReportRequest r = new ReportReques...
"public boolean applies(GameEvent event, Ability source, Game game) {\n Player blockController = game.getPlayer(source.getControllerId());\n if (blockController != null) {\n return true;\n }\n return false;\n}\n"
"public void update(TimeStep timeStep) {\n super.update(timeStep);\n alpha.update(timeStep);\n ease.update(timeStep);\n double dt = timeStep.asFraction();\n int newX = (int) Math.round(pos.x + vel.x * speed * dt);\n int newY = (int) Math.round(pos.y + vel.y * speed * dt);\n speed = getRandom().next...
"public void validateVoForCreation(EntityManager entityManager, CommentVo commentVo) throws MultipleMessagesException, DataBaseException {\n MultipleMessagesException multipleMessageException = new MultipleMessagesException();\n if (commentVo == null) {\n multipleMessageException.addMessage(\"String_Node_S...
"public static void main(String[] args) {\n String metaF = \"String_Node_Str\";\n GeoCoding gc;\n try {\n gc = new S1GeoCodingImpl(metaF);\n double lat = -27.49984;\n double lon = 30.69116;\n double pixel = 370.5;\n double line = 16482.2;\n double[] r;\n try {\n...
"public void increaseRank() {\n if (hasValidRank()) {\n curRank++;\n }\n}\n"
"public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory, IProgressMonitor monitor) {\n return execute(commandPath, args, env, changeToDirectory, monitor, null);\n}\n"
"public void createTestArtifact() throws OseeCoreException {\n testTopBranch = BranchManager.createTopLevelBranch(\"String_Node_Str\");\n testWorkingBranch = BranchManager.createWorkingBranch(CoverageTestUtil.getTestBranch(), \"String_Node_Str\");\n readOnlyTestUnitNames = ArtifactQuery.getOrCreate(ArtifactTes...
"public boolean isAttacked(UUID defenderId, Game game) {\n for (CombatGroup group : groups) {\n if (group.getDefenderId().equals(defenderId)) {\n return true;\n if (group.defenderIsPlaneswalker) {\n Permanent permanent = game.getPermanent(group.getDefenderId());\n if (p...
"public Result getUploadsForStudy(String studyId, String startTimeString, String endTimeString) throws EntityNotFoundException {\n getAuthenticatedSession(WORKER);\n DateTime startTime = DateUtils.getDateTimeOrDefault(startTimeString, null);\n DateTime endTime = DateUtils.getDateTimeOrDefault(endTimeString, nu...
"public void testExtractDisplayId1() {\n String extractedDisplayId = extractDisplayId(uri1);\n assertEquals(uri1toplevelDisplayId, extractedDisplayId);\n}\n"
"public void testGeneric() throws TransformException {\n final MathTransform first = null;\n final AffineTransform2D second = new AffineTransform2D(0.5, 0, 0, 0.25, 0, 0);\n transform = new ConcatenatedTransform(first, second);\n isInverseTransformSupported = false;\n validate();\n final double[] sour...
"public void receive(Event[] events) {\n EventPrinter.print(events);\n for (Event event : events) {\n if (event.isExpired()) {\n removeEventCount++;\n Assert.assertEquals(\"String_Node_Str\", removeEventCount, event.getData(2));\n if (removeEventCount == 1) {\n ...
"public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {\n if (XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {\n this.c_id = atts.getValue(\"String_Node_Str\", HREF_ATTRI...
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = game.getObject(source.getSourceId());\n if (controller != null && sourceObject != null) {\n for (UUID playerId : controller.getInRange()) {\n Player p...
"private ResponsePacket readSimpleResponsePacket(InputStream inputStream) throws ProtocolException, IOException {\n byte[] payload = IOUtils.read(inputStream, 50, 3000);\n ChannelBuffer cb = ChannelBuffers.wrappedBuffer(payload);\n short packetType = cb.readShort();\n ResponsePacket packet = ResponsePacket....
"public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {\n ResponseWriter writer = facesContext.getResponseWriter();\n Draggable draggable;\n if (component instanceof Draggable) {\n draggable = (Draggable) component;\n } else {\n throw new FacesException(\"...
"public Method run() {\n Class<?> foundClass = subject;\n Method method = null;\n for (foundClass = subject; method == null; foundClass = foundClass.getSuperclass()) {\n try {\n if (foundClass == null) {\n return null;\n }\n method = foundClass.getDeclared...
"public <T> T call(Callable<T> callable, CallArgs args) throws Exception {\n MDC.put(Constants.MDC_STAGE_KEY, stageName);\n try {\n return delegate.call(callable);\n } finally {\n MDC.remove(Constants.MDC_STAGE_KEY);\n }\n}\n"
"private void updatePanel(int top) {\n boolean chart3d = false;\n if (mnuPie3d.isSelected() || mnuBar3d.isSelected()) {\n chart3d = true;\n }\n chartData.setTop(top);\n updateChartEvents(chart3d);\n reloadTable();\n updateTextArea();\n}\n"
"boolean okToShowLocked(ActivityRecord r) {\n return isCurrentProfileLocked(r.userId) || (r.info.flags & FLAG_SHOW_ON_LOCK_SCREEN) != 0;\n}\n"
"private Long getHashRate() {\n HttpRequestFactory requestFactory = new NetHttpTransport().createRequestFactory(new HttpRequestInitializer() {\n public void initialize(HttpRequest request) {\n request.setParser(new JsonObjectParser(new JacksonFactory()));\n }\n });\n try {\n Htt...
"public static void refresh() {\n FMLCommonHandler.instance().getMinecraftServerInstance().addScheduledTask(EnchanterRecipeCategory::refresh);\n}\n"
"private void handleCell(CrosstabCellHandle cell, String emptyVlaue) throws BirtException {\n if (cell == null) {\n return;\n }\n if (handler != null) {\n ICrosstabCell cellItem = new CrosstabCellImpl(cell);\n handler.callFunction(CrosstabScriptHandler.ON_PREPARE_CELL, cellItem, context);\...
"public Boolean call() throws Exception {\n Payload message = PayloadService.instance.findLatest(product.getId(), userId);\n if (message == null) {\n return true;\n }\n boolean ok = false;\n if (message.getClients() != null) {\n for (String client : message.getClients()) {\n Conn...
"private void validateFields(Class<?> klass, String[] row) {\n Mapper mapper = Mapper.of(klass);\n List<String> invalidFields = new ArrayList<String>();\n List<String> invalidRules = new ArrayList<String>();\n for (String col : row) {\n if (!isValidColumn(col)) {\n continue;\n }\n ...
"public String getCondition() {\n Date d2 = (Date) d.clone();\n d2.setDate(d.getDate() + 1);\n return \"String_Node_Str\" + df.format(d) + \"String_Node_Str\" + df.format(d2) + \"String_Node_Str\";\n}\n"
"public void applyContainerBottomStyle(XlsContainer container) {\n ContainerSizeInfo rule = container.getSizeInfo();\n StyleEntry entry = container.getStyle();\n int start = rule.getStartCoordinate();\n int col = engine.getAxis().getColumnIndexByCoordinate(start);\n int span = engine.getAxis().getColumnI...
"public static String toXmlString(Map<String, Object> attributes) {\n StringBuilder result = new StringBuilder();\n result.append(\"String_Node_Str\").append(XML_ROOT_NODE).append(\"String_Node_Str\");\n for (Map.Entry<String, Object> entry : attributes.entrySet()) {\n result.append(\"String_Node_Str\")...
"public String addUser(String json) {\n String strName = null;\n try {\n JSONObject content = new JSONObject(json);\n User u = new User();\n u.createNewID();\n if (content.getString(\"String_Node_Str\") != null) {\n u.setFirstName(content.getString(\"String_Node_Str\"));\n ...
"public void onEnable() {\n plugin = this;\n if (!new File(this.getDataFolder() + \"String_Node_Str\").exists()) {\n saveDefaultConfig();\n if (verbose) {\n logger.log(Level.INFO, \"String_Node_Str\");\n }\n saveDefaultConfig();\n }\n eventList.add(new PlayerListener()...
"public int getTag() {\n return 2009120232;\n}\n"
"protected void addTypeAttribute(MarshalRecord marshalRecord, String typeValue) {\n String xsiPrefix = null;\n if (marshalRecord.getNamespaceResolver() != null) {\n xsiPrefix = marshalRecord.getNamespaceResolver().resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n } else {\n xsiPrefix = XML...
"public void onPageSelected(int position) {\n mSelectedTab = position;\n if (position != ViewEventFragmentPagerAdapter.TAB_INFO) {\n hideFab(true);\n } else {\n syncFabVisibilityWithMyTbaEnabled(true);\n }\n}\n"
"public void shouldFailIfAllValidatorsFail() {\n LogicalValidator<String> validator = validateThat(is(\"String_Node_Str\")).or(validateThat(is(\"String_Node_Str\"))).assigningFailuresTo(\"String_Node_Str\").castValidator();\n assertThat(validator.validate(\"String_Node_Str\").messages(\"String_Node_Str\"), hasExa...
"public static String readBigString(IOBuffer buffer) {\n int len = buffer.getShort();\n byte[] chars = new byte[len];\n for (int i = 0; i < len; i++) {\n chars[i] = buffer.getByte();\n }\n return new String(chars);\n}\n"
"protected void pageChange(final int newPageIndex) {\n super.pageChange(newPageIndex);\n setName();\n if (newPageIndex == 1) {\n if (codeEditor instanceof ISyntaxCheckableEditor) {\n moveCursorToSelectedComponent();\n }\n codeSync();\n if (codeEditor instanceof ISyntaxChe...
"public void run() {\n ClusterInstanceContext instanceContext = getAllNetworkPartitionCtxts().get(networkPartitionId).getClusterInstanceContext(instanceId);\n for (ClusterLevelPartitionContext partitionContext : instanceContext.getPartitionCtxts()) {\n log.info(\"String_Node_Str\" + getClusterId() + \"Stri...
"private void killAllWorkers() {\n List workers = getAllWorkers();\n for (Iterator iter = workers.iterator(); iter.hasNext(); ) {\n DownloadWorker doomed = (DownloadWorker) iter.next();\n doomed.interrupt();\n }\n List pushObservers = pushes.getAllAndClear();\n for (Iterator i = pushObserve...
"public int clampViewPositionVertical(View child, int top, int dy) {\n int newTop = draggableView.getHeight() - capturedView.getHeight();\n if (draggableView.isMinimized() && Math.abs(dy) >= MINIMUM_DY_FOR_VERTICAL_DRAG || (!draggableView.isMinimized() && !draggableView.isDragViewAtBottom())) {\n final int...
"protected final void initDefault() {\n LineAttributes lia = LineAttributesImpl.createDefault(null, LineStyle.SOLID_LITERAL, 1);\n setLineAttributes(lia);\n Label lb = LabelImpl.createDefault();\n setLabel(lb);\n Grid gr = ComponentFactory.eINSTANCE.createGrid();\n lia = LineAttributesImpl.createDefau...
"public static final HashMap gaussianHMM(int startAt, double[] y, double[][] A, double[] mu, double[] sigma, double[] prior) {\n int nStates = mu.length;\n double[][] alphas = new double[y.length][nStates];\n double[][] betas = new double[y.length][nStates];\n double[] Py = new double[y.length];\n double...
"void refreshMenuDrawer() {\n if (mDrawerAdapter == null)\n return;\n setupCurrentBlog();\n updateMenuDrawer();\n Blog currentBlog = WordPress.getCurrentBlog();\n if (currentBlog != null && mDrawerListView != null && mDrawerListView.getHeaderViewsCount() > 0) {\n for (int i = 0; i < mBlogID...
"public void startRequest(MRCRequest rq) {\n try {\n final chmodRequest rqArgs = (chmodRequest) rq.getRequestArgs();\n final VolumeManager vMan = master.getVolumeManager();\n final FileAccessManager faMan = master.getFileAccessManager();\n validateContext(rq);\n Path p = new Path(r...
"protected static <C, R extends Message> R syncCall(SERVICES service, UserCredentials userCreds, Auth auth, Options options, UUIDResolver uuidResolver, UUIDIterator it, boolean uuidIteratorHasAddresses, boolean delayNextTry, int maxRetries, C callRequest, ReusableBuffer buffer, CallGenerator<C, R> callGen) throws Posix...
"private void attachSampleFile(PDDocument doc) throws IOException {\n PDEmbeddedFilesNameTreeNode efTree = new PDEmbeddedFilesNameTreeNode();\n PDComplexFileSpecification fs = new PDComplexFileSpecification();\n fs.setFile(\"String_Node_Str\");\n COSDictionary dict = fs.getCOSDictionary();\n dict.setName...
"public Object[] getConstructorArgs() {\n Object[][] workerConfiguration = new Object[sparqls + updates][];\n int i = 0;\n for (SPARQLWorkerConfig config : sparqlWorkers) {\n workerConfiguration[i++] = config.asConstructorArgs();\n }\n for (UPDATEWorkerConfig config : updateWorkers) {\n wor...
"private int getResultCount(String query, SparqlEndpoint endpoint, ExtractionDBCache cache) {\n com.hp.hpl.jena.query.ResultSet rs = SparqlQuery.convertJSONtoResultSet(cache.executeSelectQuery(endpoint, getDistinctQuery(query)));\n SortedSet<String> resources = new TreeSet<String>();\n QuerySolution qs;\n w...
"private void populateMeshViewSection(Section section, FormToolkit toolkit) {\n section.setText(\"String_Node_Str\");\n section.setDescription(\"String_Node_Str\");\n Composite container = toolkit.createComposite(section, SWT.NONE);\n section.setClient(container);\n container.setLayout(new GridLayout(1, ...
"private void extractMachines() {\n machines = new ArrayList<Machine>();\n List<Element> le = physLocRoot.elements(Constants.DEPLOY_MACHINE);\n for (Element e : le) {\n String os = e.attributeValue(Constants.MACHINE_OPERATING_SYSTEM_ATTRIBUTE);\n if (os != null && os.equalsIgnoreCase(Constants.OP...
"public boolean hasNext() {\n if (next != null)\n return true;\n SootClass currentClass = current.getDeclaringClass();\n while (true) {\n SootClass superClass = currentClass.getSuperclassUnsafe();\n if (superClass == null)\n break;\n SootMethod m = superClass.getMethodUns...
"public void bindView(View view, final Context context, Cursor cursor) {\n final ViewHolder viewHolder = (ViewHolder) view.getTag();\n QBDialog dialog = DatabaseManager.getDialogFromCursor(cursor);\n if (dialog.getType().equals(QBDialogType.PRIVATE)) {\n int occupantId = ChatUtils.getOccupantIdFromList(...
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n if (A.getMain() == null || MainActivity.selectedFile == null || MainActivity.cartridgeFile == null) {\n finish();\n return;\n }\n setContentView(R.layout.layout_details);\n TextView tvName = (TextView...
"public void updateSettingForChannelAndType(Channel channel, Type type, String settingName, boolean newValue, long blogId) {\n String typeName = type.toString();\n try {\n switch(channel) {\n case BLOGS:\n JSONObject blogJson = getBlogSettings().get(blogId);\n if (b...