content
stringlengths
40
137k
"public void bootstrap(EngineReplication replication, int localIdentifer) throws InterruptedException {\n final byte remoteIdentifier = proxyReturnByte(identifierReply, identifier);\n final ModificationIterator mi = replication.acquireModificationIterator(remoteIdentifier);\n final long lastModificationTime = ...
"private static String restUpdateBidirectionalRelationship(String objectId, String type, String relationshipName, Object newValue, String persistenceUnit, MediaType inputMediaType, MediaType outputMediaType, String partner, boolean sendLinks) throws RestCallFailedException, JAXBException, URISyntaxException {\n Stri...
"private void localRecalculateSunlightAround(int x, int y, int z, int oldLightLevel) {\n for (Vector3i pos : Diamond3iIterator.iterate(new Vector3i(x, y, z), oldLightLevel - 1)) {\n chunkView.setSunlight(pos, (byte) 0);\n }\n for (Vector3i pos : Diamond3iIterator.iterateAtDistance(new Vector3i(x, y, z),...
"protected <T> Request updateDocumentRequest(final String key, final T value, final DocumentUpdateOptions options) {\n final Request request;\n request = new Request(db, RequestType.PATCH, executor.createPath(ArangoDBConstants.PATH_API_DOCUMENT, executor.createDocumentHandle(name, key)));\n final DocumentUpdat...
"public static void main(String[] args) {\n Config config = ResourceAllocator.loadConfig(new HashMap<>());\n JobConfig jobConfig = new JobConfig();\n BasicJob.BasicJobBuilder jobBuilder = BasicJob.newBuilder();\n jobBuilder.setName(\"String_Node_Str\");\n jobBuilder.setContainerClass(SortJob.class.getNam...
"public void testTypeof() {\n typeCheck(\"String_Node_Str\", NewTypeInference.INVALID_OPERAND_TYPE);\n typeCheck(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", NewTypeInference.INVALID_ARGUMENT_TYPE);\n typeCheck(\"String_Node_Str\" + \"String_Node_...
"public void refresh(CassandraConnection conn) throws Exception {\n m_schemaDescription = new StringBuffer();\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...
"private Response doSearch(final HttpServletRequest request, final String queryString, final Set<String> sources, final Set<String> inverseAttributes, final Set<String> types, final Set<String> flags, final boolean isGrsExpected) {\n if (sources == null || sources.isEmpty()) {\n throw new IllegalArgumentExcep...
"private void createRoutine(URL url, IPath path, String label, List<URI> neededJars) throws PersistenceException {\n if (url == null) {\n throw new IllegalArgumentException();\n }\n InputStream stream = null;\n try {\n Property property = PropertiesFactory.eINSTANCE.createProperty();\n ...
"private SizeBasedContent createSizeBasedContent(ContainerArea area) {\n SizeBasedContent sizeBasedContent = new SizeBasedContent();\n if (area.content instanceof AbstractContentWrapper) {\n sizeBasedContent.content = ((AbstractContentWrapper) area.content).getContent();\n } else {\n sizeBasedCon...
"public MapColor getMapColor(IBlockState state, IBlockAccess worldIn, BlockPos pos) {\n return base.getMapColor(new UCWBlockAccess(worldIn, false), pos);\n}\n"
"public void newAtomSite(AtomSite atom) {\n boolean startOfNewChain = false;\n String chain_id = atom.getLabel_asym_id();\n String fullname = fixFullAtomName(atom.getLabel_atom_id());\n String recordName = atom.getGroup_PDB();\n String residueNumber = atom.getAuth_seq_id();\n String groupCode3 = atom....
"public void run() {\n super.run();\n final ICommonActionExtensionSite actionSite = RepositoryFilterSettingActionProvider.this.getActionSite();\n RepositoryFilterSettingDialog dialog = new RepositoryFilterSettingDialog(actionSite, isActivedFilter(), isPecpectiveFiltering);\n if (dialog.open() == Window.OK) ...
"public Object getFactoryProperty(ReportDesign design, ElementPropertyDefn prop) {\n return getLocalProperty(design, prop);\n}\n"
"private void initializeEmitterConfigs(HttpServletRequest request, Map config) {\n if (config == null) {\n return;\n }\n for (Iterator itr = request.getParameterMap().entrySet().iterator(); itr.hasNext(); ) {\n Entry entry = (Entry) itr.next();\n String name = String.valueOf(entry.getKey()...
"public DomOperation createDomOperation(TreeOperation operation) {\n if (operation instanceof TreeInsertText) {\n return new DomInsertText(operation);\n } else if (operation instanceof TreeDeleteText) {\n return new DomDeleteText(operation);\n } else if (operation instanceof TreeInsertParagraph) ...
"public HostPodVO editPod(UpdatePodCmd cmd) throws InvalidParameterValueException, InternalErrorException {\n String cidr = cmd.getCidr();\n String startIp = cmd.getStartIp();\n String endIp = cmd.getEndIp();\n String gateway = cmd.getGateway();\n Long id = cmd.getId();\n String name = cmd.getPodName(...
"public void deferredInputStreamTrickWithFailure() throws IOException, ExecutionException, TimeoutException, InterruptedException {\n AsyncHttpClient client = getAsyncHttpClient(getAsyncHttpClientConfig());\n AsyncHttpClient.BoundRequestBuilder r = client.prepareGet(\"String_Node_Str\" + port1 + \"String_Node_Str...
"public double rescore(long itemID, double value) {\n double result = value;\n for (IDRescorer rescorer : rescorers) {\n value = rescorer.rescore(itemID, value);\n if (Double.isNaN(value)) {\n return Double.NaN;\n }\n }\n return value;\n}\n"
"public String toXML() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"String_Node_Str\");\n sb.append(\"String_Node_Str\" + getName() + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + getAmountAs(getUnits()) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + getMinutes() + \"Strin...
"public void pause() {\n if (player instanceof JavaSoundPlayer)\n ((JavaSoundPlayer) player).pause();\n else\n player.stop();\n}\n"
"public boolean onPrepareOptionsMenu(Menu menu) {\n super.onPrepareOptionsMenu(menu);\n final boolean haveItems = getItemCount() > 0;\n Uri selectedContentUri = getSelectedContentUri();\n if (haveItems && (selectedContentUri != null)) {\n long selectedId = getSelectedId();\n Uri selectedUri = ...
"public Object[] getParams() {\n return params;\n}\n"
"public static void createEncogAnalyst(File csvFile) {\n AnalystWizardDialog dialog = new AnalystWizardDialog(EncogWorkBench.getInstance().getMainWindow());\n if (csvFile != null) {\n dialog.getRawFile().setValue(csvFile.toString());\n }\n if (dialog.process()) {\n EncogAnalyst analyst = null;...
"public boolean postInit() {\n if (enable[Types.BASIC.ordinal()]) {\n GameRegistry.addRecipe(new ShapedOreRecipe(cacheBasic, new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'I', \"String_Node_Str\", 'X', \"String_Node_Str\" }));\n }\n if (enable[Types.HARDENED.ordinal()]) {...
"private Node<Double> reduceToCVPFormat(Node<Double> rootNode) {\n int arity = rootNode.getArity();\n if (arity > 0) {\n Node[] children = rootNode.getChildren();\n for (int i = 0; i < arity; i++) {\n rootNode.setChild(this.reduceToCVPFormat(children[i]), i);\n }\n if (rootN...
"private static Sequence parseSequences(SBOLDocument SBOLDoc, TopLevelDocument<QName> topLevel) {\n URI persistentIdentity = null;\n String version = null;\n String displayId = null;\n String name = null;\n String description = null;\n String elements = null;\n URI encoding = null;\n URI wasDeri...
"public boolean apply(Game game, Ability source) {\n Card card = game.getCard(source.getFirstTarget());\n Player player = game.getPlayer(source.getControllerId());\n if (card != null && player != null) {\n Player targetPlayer = game.getPlayer(card.getOwnerId());\n if (targetPlayer != null) {\n ...
"public void reloadCss(CssStyleSheet sheet) throws SemanticException {\n if (sheet == null)\n return;\n String fileName = sheet.getFileName();\n CssStyleSheet newStyleSheet;\n try {\n newStyleSheet = module.loadCss(fileName);\n } catch (StyleSheetException e) {\n String errorCode = M...
"protected <T extends Shutdownable> T addChild(final T child) {\n this.children.add(child);\n return child;\n}\n"
"public Answer ListTemplates(ListTemplateCommand cmd) {\n Transaction txn = Transaction.open(Transaction.SIMULATOR_DB);\n MockSecStorageVO storage = null;\n try {\n txn.start();\n storage = _mockSecStorageDao.findByUrl(nfsUrl);\n if (storage == null) {\n return new Answer(cmd, f...
"private void buildPojoQueryParameters(ExecutableElement executableElement, RestDocumentation.Resource.Method doc, RestImplementationSupport implementationSupport) {\n if (doc.getRequestMethod().equals(RequestMethod.GET.name())) {\n RestDocumentation.Resource.UrlFields subs = doc.getUrlParameters();\n ...
"protected EvictionPolicyEvaluator<Data, R> createEvictionPolicyEvaluator(EvictionConfig cacheEvictionConfig) {\n final EvictionPolicy evictionPolicy = cacheEvictionConfig.getEvictionPolicy();\n if (evictionPolicy == null || evictionPolicy == EvictionPolicy.NONE || evictionPolicy == EvictionPolicy.RANDOM) {\n ...
"private void triangles(HierarchicalGraph hgraph, AttributeModel attributeModel) {\n int ProgressCount = 0;\n Progress.start(progress, 7 * hgraph.getNodeCount());\n hgraph.readLock();\n N = hgraph.getNodeCount();\n nodeClustering = new double[N];\n network = new ArrayWrapper[N];\n HashMap<Node, Int...
"public void setArchiveLevel(short newLevel) {\n this.archiveLogLevel.set(newLevel);\n}\n"
"private boolean matchDataType(ScalarParameterHandle handle, ResultSetColumnHandle columnHandle) {\n String type = handle.getDataType();\n if (handle == selectedParameter && dataTypeChooser.isEnabled()) {\n type = getSelectedDataType();\n }\n if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type) |...
"public boolean getBooleanValue() {\n return value;\n}\n"
"public void itemStateChanged(ItemEvent e) {\n if (hideCompleted.isSelected())\n doHideCompleted();\n else\n doShowCompleted();\n}\n"
"public boolean isSupersetOf(CoreAttributeGroup<ATTRIBUTE_ITEM> anotherGroup) {\n if (anotherGroup == null) {\n return false;\n }\n if (anotherGroup != this) {\n if (hasItems()) {\n if (anotherGroup.hasItems()) {\n Iterator<Map.Entry<String, ATTRIBUTE_ITEM>> otherItemEnt...
"public static Address getDiscontigEnd() {\n return heapLimit.minus(1);\n}\n"
"public void testLaunchWithNullRunTestView() throws Exception {\n ILaunchConfiguration configuration = mock(ILaunchConfiguration.class);\n String mode = ILaunchManager.RUN_MODE;\n ILaunch launch = mock(ILaunch.class);\n IProgressMonitor monitor = mock(IProgressMonitor.class);\n RunTestsView runTestsView ...
"public void endElement(String uri, String localName, String qName) throws SAXException {\n if (qName.compareTo(SUB_LOG_TAG) == 0) {\n try {\n outputStream.close();\n buffer = null;\n ChangeLogParser parser = scmLogParsers.get(scmClass);\n if (parser != null) {\n ...
"private GraphTargetItem command(HashMap<String, Integer> registerVars, boolean inFunction, boolean inMethod, int forinlevel, boolean mustBeCommand, List<VariableActionItem> variables) throws IOException, ParseException {\n LexBufferer buf = new LexBufferer();\n lexer.addListener(buf);\n GraphTargetItem ret = ...
"public void glDrawElements(int primitive, int vertexCount, int type, int offset) {\n Data.renderCallsThisFrame++;\n Data.totalRenderCalls++;\n GLES30.glDrawElements(primitive, vertexCount, type, offset);\n}\n"
"public synchronized List<String> getVideoTranscodeOptions(DLNAResource dlna, DLNAMediaInfo media, OutputParams params) {\n List<String> transcodeOptions = new ArrayList<>();\n final String filename = dlna.getSystemName();\n final RendererConfiguration renderer = params.mediaRenderer;\n String customFFmpegO...
"public void test() throws Exception {\n println(\"String_Node_Str\");\n testWrongDatabaseInstanceOnReconnect();\n println(\"String_Node_Str\");\n testCache(false);\n println(\"String_Node_Str\");\n testCache(true);\n println(\"String_Node_Str\");\n testBigDatabase(false);\n println(\"String_...
"private List<QueryFilter<JsonPointer>> visitQueryFilters(List<QueryFilter<JsonPointer>> subFilters) {\n List<QueryFilter<JsonPointer>> visitedFilters = new ArrayList<>();\n for (QueryFilter<JsonPointer> filter : subFilters) {\n visitedFilters.add(asRelationshipQueryFilter(isReverse, filter));\n }\n ...
"public static void main(String[] args) throws Exception {\n EvaluationResult result = new AUCEvaluator().evaluate(new File(args[0]));\n log.info(String.valueOf(result));\n}\n"
"public void onEnable() {\n plugin = this;\n if (!checkVersion(getServer().getVersion(), getDescription().getVersion())) {\n String mwv = getDescription().getVersion();\n mwv = getDescription().getVersion().substring(mwv.indexOf('(') + 1, mwv.indexOf(')'));\n MyPetUtil.getLogger().warning(\"S...
"public void error(Exception error) {\n if (error == null) {\n LOGGER.error(\"String_Node_Str\");\n changeActionState(ActionState.AS_ERROR, \"String_Node_Str\", 0);\n } else {\n LOGGER.error(\"String_Node_Str\", error);\n errors.add(error.getMessage());\n stop = new GregorianCal...
"protected void execute(ApplicationNode selectedNode) {\n ServerSessionAdapter session = (ServerSessionAdapter) selectedNode.getValue();\n if (session.usesExternalConnectionPooling()) {\n promptUserToTurnOffExternalConnectionPooling();\n } else {\n navigatorSelectionModel().pushExpansionState();\...
"public Connection executeUpdate() {\n long start = System.currentTimeMillis();\n try {\n this.connection.setResult(statement.executeUpdate());\n this.connection.setKeys(this.returnGeneratedKeys ? statement.getStatement().getGeneratedKeys() : null);\n connection.setCanGetKeys(true);\n } ca...
"public void handleRequest(HttpServerExchange exchange, RequestContext context) throws Exception {\n if (context.getCollectionName().isEmpty() || context.getCollectionName().startsWith(\"String_Node_Str\")) {\n ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_NOT_ACCEPTABLE, \"String_Node_Str\");...
"public static boolean isUpdatedReportParameter(ScalarParameterHandle reportParam, OdaDataSetParameterHandle param, DataSetDesign dataSetDesign) {\n if (reportParam == null || param == null || dataSetDesign == null)\n return true;\n ParameterDefinition matchedParam = getValidParameterDefinition(param, data...
"public static final String selectNodesText(Node startingNode) {\n StringBuffer buffer = new StringBuffer();\n NodeList childNodes = startingNode.getChildNodes();\n for (int i = 0; i < childNodes.getLength(); i++) {\n Node node = childNodes.item(i);\n if (node.getNodeType() == Node.CDATA_SECTION_...
"public static void addToolbarToDialog(final Fragment context, final Dialog dialog, String title) {\n if (!context.isAdded() || dialog == null) {\n return;\n }\n Toolbar toolbar;\n if (dialog.findViewById(android.R.id.list) == null) {\n return;\n }\n ViewGroup root = (ViewGroup) dialog.f...
"protected final MediaType getAcceptableMediaType(HttpRequestContext requestContext) {\n if (produceMime.size() == 1) {\n return mediaType;\n } else {\n MediaType m = requestContext.getAcceptableMediaType(produceMime);\n if (m != null) {\n if (m.isWildcardType() || m.isWildcardSubt...
"public String[] getParameterValues(String name) {\n if (name == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n bodyAccessed = true;\n String[] values = (String[]) getParameterMap().get(name);\n if (values != null)\n values = StringUtils.copy(values);\n return v...
"public String toString() {\n return \"String_Node_Str\" + getClass().getSimpleName() + \"String_Node_Str\" + (callee == null ? \"String_Node_Str\" : callee) + \"String_Node_Str\" + methodName + \"String_Node_Str\" + parameters + \"String_Node_Str\";\n}\n"
"private void writeComplexTypeFile(WSDLDocInterface doc, ComplexType type, String parentPath) throws OutputFormatterException {\n logger.entering(\"String_Node_Str\", \"String_Node_Str\", new Object[] { doc, type });\n processedTypes.add(type);\n boolean isRecursive = false;\n StringBuffer html = new String...
"public VectorNd solve(double t0, double t1) {\n Q.setZero();\n P.setZero();\n for (QPTerm term : myCostTerms) {\n term.getQP(Q, P, t0, t1);\n }\n int rowoff = 0;\n for (LeastSquaresTerm term : myInequalityTerms) {\n if (term.isEnabled())\n rowoff = term.getTerm(A, b, rowoff, ...
"public void onRowSelection(RowSelectionEvent event) {\n try {\n if (getOnselect() != null && getOnselect().trim().length() > 0) {\n getXulDomContainer().invoke(getOnselect(), new Object[] { selectedRows.length > 0 ? selectedRows[0] : null });\n }\n Integer[] selectedRows = table.getS...
"public static void updateDialog(Context context, String dialogId, String lastMessage, long dateSent, long lastSenderId) {\n ContentResolver resolver = context.getContentResolver();\n ContentValues values = new ContentValues();\n values.put(DialogTable.Cols.COUNT_UNREAD_MESSAGES, countUnreadMessages);\n if ...
"public void onClick(View v) {\n if (accountCount == 1) {\n materialDialog.dismiss();\n SnackBarUtil.showSnackInfo(mSubmitButton, CreateOrEditAccountActivity.this, getResources().getString(R.string.retain_at_least_one_account));\n return;\n }\n accountManager.deleteAccountByID(mAccountID, ...
"public List<DavResource> getResources(String url) throws SardineException {\n HttpPropFind propFind = new HttpPropFind(url);\n propFind.setEntity(SardineUtil.getResourcesEntity());\n HttpResponse response = this.executeWrapper(propFind);\n StatusLine statusLine = response.getStatusLine();\n if (!Sardine...
"public List<Object> findByRelation(String colName, String colValue, Class entityClazz) {\n EntityMetadata m = KunderaMetadataManager.getEntityMetadata(entityClazz);\n String tableName = m.getTableName();\n String aliasName = \"String_Node_Str\" + tableName;\n StringBuilder queryBuilder = new StringBuilder(...
"public void testWithBranch() throws Exception {\n project.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n IvyResolve res = new IvyResolve();\n res.setProject(project);\n res.execute();\n deliver.setPubrevision(\"String_Node_Str\");\n deliver.setDeliverpattern(\"String_Node_Str\");\n deliv...
"public static DropItemEvent.Dispense callItemTossEvent(Event event) {\n DropItemEvent.Dispense spongeEvent = (DropItemEvent.Dispense) event;\n Object source = spongeEvent.getCause().root();\n if (spongeEvent.getEntities().size() <= 0) {\n return spongeEvent;\n }\n final Cause cause = spongeEvent....
"public static String getNiceTime(Timestamp time) {\n if (time == null)\n return \"String_Node_Str\";\n java.util.Date now = new java.util.Date();\n long secs = (now.getTime() - time.getTime()) / 1000;\n long mins = secs / 60;\n int min = (int) mins % 60;\n long hours = mins / 60;\n int hour...
"public void applyToCache() {\n HashMap<String, ArrayList<String>> nodesWithChangedChildren = new HashMap<String, ArrayList<String>>();\n ArrayList<String> addOrRemove = new ArrayList<String>();\n addOrRemove.addAll(addedNodes);\n addOrRemove.addAll(removedNodes);\n for (String p : addOrRemove) {\n ...
"public int[] getSpecialGroups(Context context, HttpServletRequest request) {\n try {\n if (context.getCurrentUser().getPasswordHash() != null && !context.getCurrentUser().getPasswordHash().toString().equals(\"String_Node_Str\")) {\n String groupName = ConfigurationManager.getProperty(\"String_Node...
"private void connectToService() {\n activity.startSession(course.getCurrentDay());\n serviceDisposable = activity.getSessionPublish().subscribe(service -> {\n if (course.getCurrentDay().getCurrentSentencePair() != null)\n nextSentence(course.getCurrentDay().getCurrentSentencePair());\n s...
"public static <T> List<T> listFromObjects(T... objects) {\n List<T> arrayList = new ArrayList<T>(objects.length);\n Collections.addAll(arrayList, objects);\n return arrayList;\n}\n"
"private void encodeSematicErrorFromString(Spec spec, String errorText, int severityError, IProgressMonitor monitor) {\n IFile module = null;\n int[] val = findLineAndColumn(0, errorText);\n int beginLine = val[0];\n int beginColumn = val[1];\n int endLine = 0;\n int endColumn = 0;\n val = findLine...
"public String chipinfo() {\n return \"String_Node_Str\" + on + \"String_Node_Str\" + ((status & STATUS_XOSC16M_STABLE) > 0) + \"String_Node_Str\" + ((status & STATUS_RSSI_VALID) > 0) + \"String_Node_Str\" + cca + \"String_Node_Str\" + ((registers[REG_IOCFG0] & FIFOP_POLARITY) == FIFOP_POLARITY) + \"String_Node_Str\...
"public Hierarchy getHierarchy(Context context, String attribute) {\n if (context.config == null || context.config == model.getInputConfig() || model.getOutputDefinition() == null) {\n return null;\n AttributeType type = model.getOutputDefinition().getAttributeType(attribute);\n if (type instanceof Hier...
"public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) {\n ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator;\n List<GraphSourceItem> ret = new ArrayList<>();\n GraphTargetItem val = value;\n if (val instanceof VariableActionItem) {\n ...
"public static MethodCache getCacheModel(WCETTool p) {\n OptionGroup options = JOPConfig.getOptions(p.getConfig());\n switch(options.getOption(JOPConfig.CACHE_IMPL)) {\n case NO_METHOD_CACHE:\n return new NoMethodCache(p);\n case LRU_CACHE:\n return BlockCache.fromConfig(p, tru...
"private static BaseElement createChildFromField(Object parent, Object parentInstance, Field field, Class<?> type) {\n BaseElement instance = (BaseElement) getValueField(field, parentInstance);\n if (instance == null)\n try {\n instance = getElementInstance(type, field.getName(), getNewLocator(f...
"public static TalendCombinedTemplateCreationEntry createEntryFrom(IComponent component) {\n if (component == null) {\n return null;\n }\n String name = component.getName();\n ImageDescriptor imageSmall = component.getIcon16();\n IPreferenceStore store = DesignerPlugin.getDefault().getPreferenceSt...
"public void preInit(FMLPreInitializationEvent event) {\n super.preInit(event);\n NetworkRegistry.instance().registerGuiHandler(this, proxy);\n MinecraftForge.EVENT_BUS.register(this);\n MinecraftForge.EVENT_BUS.register(proxy);\n Settings.CONFIGURATION.load();\n blockExplosive = new BlockExplosive(Se...
"protected void changeConnectionInformations() {\n if (connectionItem != null) {\n if (connectionItem.eIsProxy()) {\n connectionItem = (ConnectionItem) EObjectHelper.resolveObject(connectionItem);\n }\n RepositoryNode node = RepositoryNodeHelper.recursiveFind(((ConnectionItem) connect...
"public String getColumnName(final int columnIndex) {\n if (columnIndex == 0) {\n return \"String_Node_Str\";\n }\n if (this.layer instanceof HopfieldLayer) {\n return \"String_Node_Str\" + columnIndex;\n } else {\n return \"String_Node_Str\" + columnIndex;\n }\n}\n"
"static String convert(InputStream stream) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(stream));\n StringBuilder total = new StringBuilder();\n String line;\n while ((line = r.readLine()) != null) {\n total.append(line);\n total.append(RETURN_SYMBOL);\n ...
"public static By getFindElementType(String locator) {\n logger.entering(locator);\n Preconditions.checkArgument(StringUtils.isNotBlank(locator), INVALID_LOCATOR_ERR_MSG);\n By valueToReturn = null;\n String seleniumLocator = locator.trim();\n int typeDelimiterIndex = seleniumLocator.indexOf('=');\n S...
"public static COMPARISON_TYPE fromOperands(COMPARISON_TYPE lhsCt, COMPARISON_TYPE rhsCt) {\n if (rhsCt.ordinal() < lhsCt.ordinal()) {\n COMPARISON_TYPE x = lhsCt;\n lhsCt = rhsCt;\n rhsCt = x;\n }\n if (lhsCt == SCO || rhsCt == SCO) {\n return SCO;\n }\n if (lhsCt == BIG_DECI...
"protected SwfMetadataException metadataException(final String message, final Throwable cause) {\n final SwfMetadataException existingException = Exceptions.findCause(cause, SwfMetadataException.class);\n if (existingException != null) {\n return existingException;\n } else {\n return new SwfMeta...
"public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n boolean retVal = false;\n Player player = (Player) sender;\n if (this.plugin.hasPermission(player, AppStrings.COMMAND_LIST_PERMISSION, AppStrings.COMMAND_LIST)) {\n if (args.length == 0) {\n Stri...
"public static String streamToString(InputStream is) throws IOException {\n if (is != null) {\n Writer writer = new StringWriter();\n char[] buffer = new char[1024];\n try {\n Reader reader = new BufferedReader(new InputStreamReader(is, \"String_Node_Str\"));\n int n;\n ...
"public static int getCapitalizationType(final String text) {\n if (!Character.isUpperCase(text.codePointAt(0)))\n return CAPITALIZE_NONE;\n final int len = text.length();\n int capsCount = 1;\n int letterCount = 1;\n for (index = text.offsetByCodePoints(index, 1); index < len; index = text.offset...
"protected void trimStop(List<AminoAcidCompound> sequence) {\n AminoAcidCompound stop = sequence.get(sequence.size() - 1);\n boolean isStop = false;\n if (aminoAcidToCodon.containsKey(stop)) {\n for (Codon c : aminoAcidToCodon.get(stop)) {\n if (c.isStop()) {\n isStop = true;\n...
"public static boolean mergePlots(World world, ArrayList<PlotId> plotIds) {\n if (plotIds.size() < 2) {\n return false;\n }\n PlotId pos1 = plotIds.get(0);\n PlotId pos2 = plotIds.get(plotIds.size() - 1);\n PlotManager manager = PlotMain.getPlotManager(world);\n PlotWorld plotworld = PlotMain.g...
"protected void messageReceived(ChannelHandlerContext context, PacketData data) throws Exception {\n if (this.connection.isEncryptionEnabled()) {\n data.decrypt(this.connection);\n }\n Packet packet = this.protocol.getPacket(data.getId(), this.connection.getStage(), PacketDirection.IN);\n if (packet....
"public boolean setState(int[] stateSet) {\n int[] oldState = getState();\n boolean oldPressed = false;\n for (int i : oldState) {\n if (i == android.R.attr.state_pressed) {\n oldPressed = true;\n }\n }\n boolean status = super.setState(stateSet);\n boolean focused = false;\n ...
"public VInfo makeEmptyCopy(boolean locallyDeclared) {\n HashMap<String, VInfo> structFieldsNew = null;\n if (structFields != null) {\n structFieldsNew = new HashMap<String, VInfo>();\n for (Entry<String, VInfo> e : structFields.entrySet()) {\n structFieldsNew.put(e.getKey(), e.getValue()...
"private void followItemLink() {\n int pos = getSelectedItemPosition();\n Log.d(_TAG, \"String_Node_Str\" + pos + \"String_Node_Str\");\n if (pos > -1) {\n mCursor.moveTo(pos);\n Uri uri = null;\n if (feedType.equals(News.FEED_TYPE_RSS)) {\n String strUri = mCursor.getString(mCu...
"public void should_handle_intent_with_start_message_and_api_key() {\n Intent sensorbergServiceStartIntent = SensorbergServiceIntents.getStartServiceIntent(InstrumentationRegistry.getContext(), TestConstants.API_TOKEN_DEFAULT);\n int handleIntentResult = tested.handleIntent(sensorbergServiceStartIntent);\n Ass...
"public void updateBatch(List<? extends Object> entityList) {\n if (entityList == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n List<Object> globalList = Lists.newArrayList();\n List<Object> shardingList = Lists.newArrayList();\n for (Object entity : entityList) {\n ...
"public void cross(PactRecord dataPointRecord, PactRecord clusterCenterRecord, Collector out) {\n CoordVector dataPoint = dataPointRecord.getField(1, CoordVector.class);\n PactInteger clusterCenterId = clusterCenterRecord.getField(0, PactInteger.class);\n CoordVector clusterPoint = clusterCenterRecord.getField...
"private void refreshStatus() {\n AppUpdateStatusManager ausm = AppUpdateStatusManager.getInstance(this);\n Iterator<AppUpdateStatusManager.AppUpdateStatus> statuses = ausm.getByPackageName(app.packageName).iterator();\n if (statuses.hasNext()) {\n AppUpdateStatusManager.AppUpdateStatus status = statuse...