id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
109,600 | wcm-io/wcm-io-handler | commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java | AbstractElement.setAttributeValueAsLong | public final T setAttributeValueAsLong(String name, long value) {
setAttribute(name, Long.toString(value));
return (T)this;
} | java | public final T setAttributeValueAsLong(String name, long value) {
setAttribute(name, Long.toString(value));
return (T)this;
} | [
"public",
"final",
"T",
"setAttributeValueAsLong",
"(",
"String",
"name",
",",
"long",
"value",
")",
"{",
"setAttribute",
"(",
"name",
",",
"Long",
".",
"toString",
"(",
"value",
")",
")",
";",
"return",
"(",
"T",
")",
"this",
";",
"}"
] | Sets attribute value as long.
@param name Attribute name
@param value Attribute value as long
@return Self reference | [
"Sets",
"attribute",
"value",
"as",
"long",
"."
] | b0fc1c11a3ceb89efb73826dcfd480d6a00c19af | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java#L92-L95 |
109,601 | wcm-io/wcm-io-handler | commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java | AbstractElement.getAttributeValueAsLong | public final long getAttributeValueAsLong(String attributeName) {
Attribute attribute = getAttribute(attributeName);
if (attribute == null) {
return 0;
}
else {
try {
return attribute.getLongValue();
}
catch (DataConversionException ex) {
return 0;
}
}
... | java | public final long getAttributeValueAsLong(String attributeName) {
Attribute attribute = getAttribute(attributeName);
if (attribute == null) {
return 0;
}
else {
try {
return attribute.getLongValue();
}
catch (DataConversionException ex) {
return 0;
}
}
... | [
"public",
"final",
"long",
"getAttributeValueAsLong",
"(",
"String",
"attributeName",
")",
"{",
"Attribute",
"attribute",
"=",
"getAttribute",
"(",
"attributeName",
")",
";",
"if",
"(",
"attribute",
"==",
"null",
")",
"{",
"return",
"0",
";",
"}",
"else",
"{... | Gets attribute value as long.
@param attributeName Attribute name
@return Attribute value as long or 0 if not set. | [
"Gets",
"attribute",
"value",
"as",
"long",
"."
] | b0fc1c11a3ceb89efb73826dcfd480d6a00c19af | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java#L102-L115 |
109,602 | wcm-io/wcm-io-handler | commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java | AbstractElement.setAttributeValueAsInteger | public final T setAttributeValueAsInteger(String name, int value) {
setAttribute(name, Integer.toString(value));
return (T)this;
} | java | public final T setAttributeValueAsInteger(String name, int value) {
setAttribute(name, Integer.toString(value));
return (T)this;
} | [
"public",
"final",
"T",
"setAttributeValueAsInteger",
"(",
"String",
"name",
",",
"int",
"value",
")",
"{",
"setAttribute",
"(",
"name",
",",
"Integer",
".",
"toString",
"(",
"value",
")",
")",
";",
"return",
"(",
"T",
")",
"this",
";",
"}"
] | Sets attribute value as integer.
@param name Attribute name
@param value Attribute value as integer
@return Self reference | [
"Sets",
"attribute",
"value",
"as",
"integer",
"."
] | b0fc1c11a3ceb89efb73826dcfd480d6a00c19af | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java#L123-L126 |
109,603 | wcm-io/wcm-io-handler | commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java | AbstractElement.addContent | @Override
public final org.jdom2.Element addContent(Content content) {
// ignore empty elements
if (content == null) {
return null;
}
return super.addContent(content);
} | java | @Override
public final org.jdom2.Element addContent(Content content) {
// ignore empty elements
if (content == null) {
return null;
}
return super.addContent(content);
} | [
"@",
"Override",
"public",
"final",
"org",
".",
"jdom2",
".",
"Element",
"addContent",
"(",
"Content",
"content",
")",
"{",
"// ignore empty elements",
"if",
"(",
"content",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"super",
".",
"addCo... | Appends the child to the end of the element's content list
@param content Child to append to end of content list. Null values are ignored.
@return The element on which the method was called. | [
"Appends",
"the",
"child",
"to",
"the",
"end",
"of",
"the",
"element",
"s",
"content",
"list"
] | b0fc1c11a3ceb89efb73826dcfd480d6a00c19af | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java#L133-L140 |
109,604 | wcm-io/wcm-io-handler | commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java | AbstractElement.addContent | @Override
public final org.jdom2.Element addContent(Collection collection) {
// ignore empty elements
if (collection == null) {
return null;
}
return super.addContent(collection);
} | java | @Override
public final org.jdom2.Element addContent(Collection collection) {
// ignore empty elements
if (collection == null) {
return null;
}
return super.addContent(collection);
} | [
"@",
"Override",
"public",
"final",
"org",
".",
"jdom2",
".",
"Element",
"addContent",
"(",
"Collection",
"collection",
")",
"{",
"// ignore empty elements",
"if",
"(",
"collection",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"super",
".",... | Appends all children in the given collection to the end of the content list. In event of an exception
during add the original content will be unchanged and the objects in the supplied collection will be unaltered.
@param collection Collection to append. Null values are ignored.
@return the element on which the method w... | [
"Appends",
"all",
"children",
"in",
"the",
"given",
"collection",
"to",
"the",
"end",
"of",
"the",
"content",
"list",
".",
"In",
"event",
"of",
"an",
"exception",
"during",
"add",
"the",
"original",
"content",
"will",
"be",
"unchanged",
"and",
"the",
"obje... | b0fc1c11a3ceb89efb73826dcfd480d6a00c19af | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/commons/src/main/java/io/wcm/handler/commons/dom/AbstractElement.java#L177-L184 |
109,605 | wcm-io/wcm-io-handler | richtext/src/main/java/io/wcm/handler/richtext/util/XHtmlEntityResolver.java | XHtmlEntityResolver.resolveEntity | @Override
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
String filename = xhtmlResourceMap.get(publicId);
if (filename != null) {
String resourceName = resourceFolder + "/" + filename;
InputStream is = XHtmlEntityResolver.class.getResourceAs... | java | @Override
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
String filename = xhtmlResourceMap.get(publicId);
if (filename != null) {
String resourceName = resourceFolder + "/" + filename;
InputStream is = XHtmlEntityResolver.class.getResourceAs... | [
"@",
"Override",
"public",
"InputSource",
"resolveEntity",
"(",
"String",
"publicId",
",",
"String",
"systemId",
")",
"throws",
"SAXException",
",",
"IOException",
"{",
"String",
"filename",
"=",
"xhtmlResourceMap",
".",
"get",
"(",
"publicId",
")",
";",
"if",
... | Resolve XHtml resource entities, load from classpath resources. | [
"Resolve",
"XHtml",
"resource",
"entities",
"load",
"from",
"classpath",
"resources",
"."
] | b0fc1c11a3ceb89efb73826dcfd480d6a00c19af | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/richtext/src/main/java/io/wcm/handler/richtext/util/XHtmlEntityResolver.java#L61-L77 |
109,606 | jenkinsci/favorite-plugin | src/main/java/hudson/plugins/favorite/user/FavoriteUserProperty.java | FavoriteUserProperty.readResolve | Object readResolve() {
if (favorites != null) {
data = Maps.newConcurrentMap();
for (String job : favorites) {
data.put(job, true);
}
favorites = null;
}
return this;
} | java | Object readResolve() {
if (favorites != null) {
data = Maps.newConcurrentMap();
for (String job : favorites) {
data.put(job, true);
}
favorites = null;
}
return this;
} | [
"Object",
"readResolve",
"(",
")",
"{",
"if",
"(",
"favorites",
"!=",
"null",
")",
"{",
"data",
"=",
"Maps",
".",
"newConcurrentMap",
"(",
")",
";",
"for",
"(",
"String",
"job",
":",
"favorites",
")",
"{",
"data",
".",
"put",
"(",
"job",
",",
"true... | Migrates this properties storage from favourite's list to a map of booleans
@return this | [
"Migrates",
"this",
"properties",
"storage",
"from",
"favourite",
"s",
"list",
"to",
"a",
"map",
"of",
"booleans"
] | 4ce9b195b4d888190fe12c92d546d64f22728c22 | https://github.com/jenkinsci/favorite-plugin/blob/4ce9b195b4d888190fe12c92d546d64f22728c22/src/main/java/hudson/plugins/favorite/user/FavoriteUserProperty.java#L129-L138 |
109,607 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/index/IndexerWorkItemQueue.java | IndexerWorkItemQueue.stop | @Nonnull
@ReturnsMutableCopy
public ICommonsList <IIndexerWorkItem> stop ()
{
// don't take any more actions
m_aImmediateCollector.stopQueuingNewObjects ();
// Get all remaining objects and save them for late reuse
final ICommonsList <IIndexerWorkItem> aRemainingItems = m_aImmediateCollector.drai... | java | @Nonnull
@ReturnsMutableCopy
public ICommonsList <IIndexerWorkItem> stop ()
{
// don't take any more actions
m_aImmediateCollector.stopQueuingNewObjects ();
// Get all remaining objects and save them for late reuse
final ICommonsList <IIndexerWorkItem> aRemainingItems = m_aImmediateCollector.drai... | [
"@",
"Nonnull",
"@",
"ReturnsMutableCopy",
"public",
"ICommonsList",
"<",
"IIndexerWorkItem",
">",
"stop",
"(",
")",
"{",
"// don't take any more actions",
"m_aImmediateCollector",
".",
"stopQueuingNewObjects",
"(",
")",
";",
"// Get all remaining objects and save them for la... | Stop the indexer work queue immediately.
@return The list of all remaining objects in the queue. Never
<code>null</code>. | [
"Stop",
"the",
"indexer",
"work",
"queue",
"immediately",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/index/IndexerWorkItemQueue.java#L83-L97 |
109,608 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/index/IndexerWorkItemQueue.java | IndexerWorkItemQueue.queueObject | public void queueObject (@Nonnull final IIndexerWorkItem aItem)
{
ValueEnforcer.notNull (aItem, "Item");
m_aImmediateCollector.queueObject (aItem);
} | java | public void queueObject (@Nonnull final IIndexerWorkItem aItem)
{
ValueEnforcer.notNull (aItem, "Item");
m_aImmediateCollector.queueObject (aItem);
} | [
"public",
"void",
"queueObject",
"(",
"@",
"Nonnull",
"final",
"IIndexerWorkItem",
"aItem",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"aItem",
",",
"\"Item\"",
")",
";",
"m_aImmediateCollector",
".",
"queueObject",
"(",
"aItem",
")",
";",
"}"
] | Queue a work item and handle it asynchronously.
@param aItem
The item to be added. May not be <code>null</code>. | [
"Queue",
"a",
"work",
"item",
"and",
"handle",
"it",
"asynchronously",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/index/IndexerWorkItemQueue.java#L105-L109 |
109,609 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/reindex/ReIndexWorkItemList.java | ReIndexWorkItemList.addItem | public void addItem (@Nonnull final ReIndexWorkItem aItem) throws IllegalStateException
{
ValueEnforcer.notNull (aItem, "Item");
m_aRWLock.writeLocked ( () -> {
internalCreateItem (aItem);
});
LOGGER.info ("Added " + aItem.getLogText () + " to re-try list for retry #" + (aItem.getRetryCount () +... | java | public void addItem (@Nonnull final ReIndexWorkItem aItem) throws IllegalStateException
{
ValueEnforcer.notNull (aItem, "Item");
m_aRWLock.writeLocked ( () -> {
internalCreateItem (aItem);
});
LOGGER.info ("Added " + aItem.getLogText () + " to re-try list for retry #" + (aItem.getRetryCount () +... | [
"public",
"void",
"addItem",
"(",
"@",
"Nonnull",
"final",
"ReIndexWorkItem",
"aItem",
")",
"throws",
"IllegalStateException",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"aItem",
",",
"\"Item\"",
")",
";",
"m_aRWLock",
".",
"writeLocked",
"(",
"(",
")",
"->",
... | Add a unique item to the list.
@param aItem
The item to be added. May not be <code>null</code>.
@throws IllegalStateException
If an item with the same ID is already contained | [
"Add",
"a",
"unique",
"item",
"to",
"the",
"list",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/reindex/ReIndexWorkItemList.java#L63-L70 |
109,610 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java | PDIndexerManager._queueUniqueWorkItem | @Nonnull
private EChange _queueUniqueWorkItem (@Nonnull final IIndexerWorkItem aWorkItem)
{
ValueEnforcer.notNull (aWorkItem, "WorkItem");
// Check for duplicate
m_aRWLock.writeLock ().lock ();
try
{
if (!m_aUniqueItems.add (aWorkItem))
{
LOGGER.info ("Ignoring work item " +... | java | @Nonnull
private EChange _queueUniqueWorkItem (@Nonnull final IIndexerWorkItem aWorkItem)
{
ValueEnforcer.notNull (aWorkItem, "WorkItem");
// Check for duplicate
m_aRWLock.writeLock ().lock ();
try
{
if (!m_aUniqueItems.add (aWorkItem))
{
LOGGER.info ("Ignoring work item " +... | [
"@",
"Nonnull",
"private",
"EChange",
"_queueUniqueWorkItem",
"(",
"@",
"Nonnull",
"final",
"IIndexerWorkItem",
"aWorkItem",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"aWorkItem",
",",
"\"WorkItem\"",
")",
";",
"// Check for duplicate",
"m_aRWLock",
".",
"writ... | Queue a single work item of any type. If the item is already in the queue,
it is ignored.
@param aWorkItem
Work item to be queued. May not be <code>null</code>.
@return {@link EChange#CHANGED} if it was queued | [
"Queue",
"a",
"single",
"work",
"item",
"of",
"any",
"type",
".",
"If",
"the",
"item",
"is",
"already",
"in",
"the",
"queue",
"it",
"is",
"ignored",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java#L209-L240 |
109,611 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java | PDIndexerManager.queueWorkItem | @Nonnull
public EChange queueWorkItem (@Nonnull final IParticipantIdentifier aParticipantID,
@Nonnull final EIndexerWorkItemType eType,
@Nonnull @Nonempty final String sOwnerID,
@Nonnull @Nonempty final String sRequestingH... | java | @Nonnull
public EChange queueWorkItem (@Nonnull final IParticipantIdentifier aParticipantID,
@Nonnull final EIndexerWorkItemType eType,
@Nonnull @Nonempty final String sOwnerID,
@Nonnull @Nonempty final String sRequestingH... | [
"@",
"Nonnull",
"public",
"EChange",
"queueWorkItem",
"(",
"@",
"Nonnull",
"final",
"IParticipantIdentifier",
"aParticipantID",
",",
"@",
"Nonnull",
"final",
"EIndexerWorkItemType",
"eType",
",",
"@",
"Nonnull",
"@",
"Nonempty",
"final",
"String",
"sOwnerID",
",",
... | Queue a new work item
@param aParticipantID
Participant ID to use.
@param eType
Action type.
@param sOwnerID
Owner of this action
@param sRequestingHost
Requesting host (IP address)
@return {@link EChange#UNCHANGED} if the item was queued,
{@link EChange#UNCHANGED} if this item is already in the queue! | [
"Queue",
"a",
"new",
"work",
"item"
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java#L256-L266 |
109,612 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java | PDIndexerManager.expireOldEntries | public void expireOldEntries ()
{
// Expire old entries
final ICommonsList <IReIndexWorkItem> aExpiredItems = m_aReIndexList.getAndRemoveAllEntries (IReIndexWorkItem::isExpired);
if (aExpiredItems.isNotEmpty ())
{
LOGGER.info ("Expiring " + aExpiredItems.size () + " re-index work items and move ... | java | public void expireOldEntries ()
{
// Expire old entries
final ICommonsList <IReIndexWorkItem> aExpiredItems = m_aReIndexList.getAndRemoveAllEntries (IReIndexWorkItem::isExpired);
if (aExpiredItems.isNotEmpty ())
{
LOGGER.info ("Expiring " + aExpiredItems.size () + " re-index work items and move ... | [
"public",
"void",
"expireOldEntries",
"(",
")",
"{",
"// Expire old entries",
"final",
"ICommonsList",
"<",
"IReIndexWorkItem",
">",
"aExpiredItems",
"=",
"m_aReIndexList",
".",
"getAndRemoveAllEntries",
"(",
"IReIndexWorkItem",
"::",
"isExpired",
")",
";",
"if",
"(",... | Expire all re-index entries that are in the list for a too long time. This
is called from a scheduled job only. All respective items are move from the
re-index list to the dead list. | [
"Expire",
"all",
"re",
"-",
"index",
"entries",
"that",
"are",
"in",
"the",
"list",
"for",
"a",
"too",
"long",
"time",
".",
"This",
"is",
"called",
"from",
"a",
"scheduled",
"job",
"only",
".",
"All",
"respective",
"items",
"are",
"move",
"from",
"the"... | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java#L273-L291 |
109,613 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java | PDIndexerManager.reIndexParticipantData | public void reIndexParticipantData ()
{
final LocalDateTime aNow = PDTFactory.getCurrentLocalDateTime ();
// Get and remove all items to re-index "now"
final List <IReIndexWorkItem> aReIndexNowItems = m_aReIndexList.getAndRemoveAllEntries (aWorkItem -> aWorkItem.isRetryPossible (aNow));
if (LOGGER.i... | java | public void reIndexParticipantData ()
{
final LocalDateTime aNow = PDTFactory.getCurrentLocalDateTime ();
// Get and remove all items to re-index "now"
final List <IReIndexWorkItem> aReIndexNowItems = m_aReIndexList.getAndRemoveAllEntries (aWorkItem -> aWorkItem.isRetryPossible (aNow));
if (LOGGER.i... | [
"public",
"void",
"reIndexParticipantData",
"(",
")",
"{",
"final",
"LocalDateTime",
"aNow",
"=",
"PDTFactory",
".",
"getCurrentLocalDateTime",
"(",
")",
";",
"// Get and remove all items to re-index \"now\"",
"final",
"List",
"<",
"IReIndexWorkItem",
">",
"aReIndexNowIte... | Re-index all entries that are ready to be re-indexed now. This is called
from a scheduled job only. | [
"Re",
"-",
"index",
"all",
"entries",
"that",
"are",
"ready",
"to",
"be",
"re",
"-",
"indexed",
"now",
".",
"This",
"is",
"called",
"from",
"a",
"scheduled",
"job",
"only",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexerManager.java#L297-L317 |
109,614 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/clientcert/ClientCertificateValidator.java | ClientCertificateValidator.verifyClientCertificate | @Nonnull
public static ClientCertificateValidationResult verifyClientCertificate (@Nonnull final HttpServletRequest aHttpRequest,
@Nonnull final String sLogPrefix)
{
if (s_bIsCheckDisabled.get ())
{
if (LOGGER.isDebugEnabled ()... | java | @Nonnull
public static ClientCertificateValidationResult verifyClientCertificate (@Nonnull final HttpServletRequest aHttpRequest,
@Nonnull final String sLogPrefix)
{
if (s_bIsCheckDisabled.get ())
{
if (LOGGER.isDebugEnabled ()... | [
"@",
"Nonnull",
"public",
"static",
"ClientCertificateValidationResult",
"verifyClientCertificate",
"(",
"@",
"Nonnull",
"final",
"HttpServletRequest",
"aHttpRequest",
",",
"@",
"Nonnull",
"final",
"String",
"sLogPrefix",
")",
"{",
"if",
"(",
"s_bIsCheckDisabled",
".",
... | Extract certificates from request and validate them.
@param aHttpRequest
The HTTP request to use. May not be <code>null</code>.
@param sLogPrefix
The context - for logging only. May not be <code>null</code>.
@return Never <code>null</code>. | [
"Extract",
"certificates",
"from",
"request",
"and",
"validate",
"them",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/clientcert/ClientCertificateValidator.java#L264-L351 |
109,615 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/storage/PDStorageManager.java | PDStorageManager.getGroupedByParticipantID | @Nonnull
@ReturnsMutableCopy
public static IMultiMapListBased <IParticipantIdentifier, PDStoredBusinessEntity> getGroupedByParticipantID (@Nonnull final Iterable <PDStoredBusinessEntity> aDocs)
{
final MultiLinkedHashMapArrayListBased <IParticipantIdentifier, PDStoredBusinessEntity> ret = new MultiLinkedHashM... | java | @Nonnull
@ReturnsMutableCopy
public static IMultiMapListBased <IParticipantIdentifier, PDStoredBusinessEntity> getGroupedByParticipantID (@Nonnull final Iterable <PDStoredBusinessEntity> aDocs)
{
final MultiLinkedHashMapArrayListBased <IParticipantIdentifier, PDStoredBusinessEntity> ret = new MultiLinkedHashM... | [
"@",
"Nonnull",
"@",
"ReturnsMutableCopy",
"public",
"static",
"IMultiMapListBased",
"<",
"IParticipantIdentifier",
",",
"PDStoredBusinessEntity",
">",
"getGroupedByParticipantID",
"(",
"@",
"Nonnull",
"final",
"Iterable",
"<",
"PDStoredBusinessEntity",
">",
"aDocs",
")",... | Group the passed document list by participant ID
@param aDocs
The document list to group.
@return A non-<code>null</code> ordered map with the results. Order is like
the order of the input list. | [
"Group",
"the",
"passed",
"document",
"list",
"by",
"participant",
"ID"
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/storage/PDStorageManager.java#L562-L570 |
109,616 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/rest/IndexerResource.java | IndexerResource._checkClientCertificate | @Nonnull
private static ClientCertificateValidationResult _checkClientCertificate (@Nonnull final HttpServletRequest aHttpServletRequest,
@Nonnull final String sLogPrefix)
{
try
{
return ClientCertificateValidator.verifyClient... | java | @Nonnull
private static ClientCertificateValidationResult _checkClientCertificate (@Nonnull final HttpServletRequest aHttpServletRequest,
@Nonnull final String sLogPrefix)
{
try
{
return ClientCertificateValidator.verifyClient... | [
"@",
"Nonnull",
"private",
"static",
"ClientCertificateValidationResult",
"_checkClientCertificate",
"(",
"@",
"Nonnull",
"final",
"HttpServletRequest",
"aHttpServletRequest",
",",
"@",
"Nonnull",
"final",
"String",
"sLogPrefix",
")",
"{",
"try",
"{",
"return",
"ClientC... | Check if the current request contains a client certificate and whether it
is valid.
@param aHttpServletRequest
The current servlet request. May not be <code>null</code>.
@param sLogPrefix
The context - for logging only. May not be <code>null</code>.
@return The validation result | [
"Check",
"if",
"the",
"current",
"request",
"contains",
"a",
"client",
"certificate",
"and",
"whether",
"it",
"is",
"valid",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/rest/IndexerResource.java#L64-L78 |
109,617 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/reindex/ReIndexWorkItem.java | ReIndexWorkItem.incRetryCount | public void incRetryCount ()
{
m_nRetries++;
m_aPreviousRetryDT = PDTFactory.getCurrentLocalDateTime ();
m_aNextRetryDT = m_aPreviousRetryDT.plusMinutes (PDServerConfiguration.getReIndexRetryMinutes ());
} | java | public void incRetryCount ()
{
m_nRetries++;
m_aPreviousRetryDT = PDTFactory.getCurrentLocalDateTime ();
m_aNextRetryDT = m_aPreviousRetryDT.plusMinutes (PDServerConfiguration.getReIndexRetryMinutes ());
} | [
"public",
"void",
"incRetryCount",
"(",
")",
"{",
"m_nRetries",
"++",
";",
"m_aPreviousRetryDT",
"=",
"PDTFactory",
".",
"getCurrentLocalDateTime",
"(",
")",
";",
"m_aNextRetryDT",
"=",
"m_aPreviousRetryDT",
".",
"plusMinutes",
"(",
"PDServerConfiguration",
".",
"ge... | Increment the number of retries and update the previous and the next retry
datetime. | [
"Increment",
"the",
"number",
"of",
"retries",
"and",
"update",
"the",
"previous",
"and",
"the",
"next",
"retry",
"datetime",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/reindex/ReIndexWorkItem.java#L138-L143 |
109,618 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/PDLucene.java | PDLucene.getSearcher | @Nullable
public IndexSearcher getSearcher () throws IOException
{
_checkClosing ();
final IndexReader aReader = getReader ();
if (aReader == null)
{
// Index not readable
LOGGER.warn ("Index not readable");
return null;
}
if (m_aSearchReader == aReader)
{
// Rea... | java | @Nullable
public IndexSearcher getSearcher () throws IOException
{
_checkClosing ();
final IndexReader aReader = getReader ();
if (aReader == null)
{
// Index not readable
LOGGER.warn ("Index not readable");
return null;
}
if (m_aSearchReader == aReader)
{
// Rea... | [
"@",
"Nullable",
"public",
"IndexSearcher",
"getSearcher",
"(",
")",
"throws",
"IOException",
"{",
"_checkClosing",
"(",
")",
";",
"final",
"IndexReader",
"aReader",
"=",
"getReader",
"(",
")",
";",
"if",
"(",
"aReader",
"==",
"null",
")",
"{",
"// Index not... | Get a searcher on this index.
@return <code>null</code> if no reader or no searcher could be obtained
@throws IOException
On IO error | [
"Get",
"a",
"searcher",
"on",
"this",
"index",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/PDLucene.java#L264-L288 |
109,619 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/PDLucene.java | PDLucene.updateDocuments | @MustBeLocked (ELockType.WRITE)
public void updateDocuments (@Nullable final Term aDelTerm,
@Nonnull final Iterable <? extends Iterable <? extends IndexableField>> aDocs) throws IOException
{
long nSeqNum;
if (false)
{
// Delete and than add
nSeqNum = _getWrite... | java | @MustBeLocked (ELockType.WRITE)
public void updateDocuments (@Nullable final Term aDelTerm,
@Nonnull final Iterable <? extends Iterable <? extends IndexableField>> aDocs) throws IOException
{
long nSeqNum;
if (false)
{
// Delete and than add
nSeqNum = _getWrite... | [
"@",
"MustBeLocked",
"(",
"ELockType",
".",
"WRITE",
")",
"public",
"void",
"updateDocuments",
"(",
"@",
"Nullable",
"final",
"Term",
"aDelTerm",
",",
"@",
"Nonnull",
"final",
"Iterable",
"<",
"?",
"extends",
"Iterable",
"<",
"?",
"extends",
"IndexableField",
... | Atomically deletes documents matching the provided delTerm and adds a block
of documents with sequentially assigned document IDs, such that an external
reader will see all or none of the documents.
@param aDelTerm
the term to identify the document(s) to be deleted. May be
<code>null</code>.
@param aDocs
the documents ... | [
"Atomically",
"deletes",
"documents",
"matching",
"the",
"provided",
"delTerm",
"and",
"adds",
"a",
"block",
"of",
"documents",
"with",
"sequentially",
"assigned",
"document",
"IDs",
"such",
"that",
"an",
"external",
"reader",
"will",
"see",
"all",
"or",
"none",... | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/PDLucene.java#L331-L350 |
109,620 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/PDLucene.java | PDLucene.writeLockedAtomic | @Nonnull
public ESuccess writeLockedAtomic (@Nonnull final IThrowingRunnable <IOException> aRunnable) throws IOException
{
m_aRWLock.writeLock ().lock ();
try
{
if (isClosing ())
{
LOGGER.info ("Cannot executed something write locked, because Lucene is shutting down");
return... | java | @Nonnull
public ESuccess writeLockedAtomic (@Nonnull final IThrowingRunnable <IOException> aRunnable) throws IOException
{
m_aRWLock.writeLock ().lock ();
try
{
if (isClosing ())
{
LOGGER.info ("Cannot executed something write locked, because Lucene is shutting down");
return... | [
"@",
"Nonnull",
"public",
"ESuccess",
"writeLockedAtomic",
"(",
"@",
"Nonnull",
"final",
"IThrowingRunnable",
"<",
"IOException",
">",
"aRunnable",
")",
"throws",
"IOException",
"{",
"m_aRWLock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
... | Run the provided action within a locked section.
@param aRunnable
Callback to be executed
@return {@link ESuccess#FAILURE} if the index is just closing
@throws IOException
may be thrown by the callback | [
"Run",
"the",
"provided",
"action",
"within",
"a",
"locked",
"section",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/PDLucene.java#L381-L399 |
109,621 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/storage/field/AbstractPDField.java | AbstractPDField.getDocValue | @Nullable
public final NATIVE_TYPE getDocValue (@Nonnull final Document aDoc)
{
final IndexableField aField = getDocField (aDoc);
if (aField != null)
return getFieldNativeValue (aField);
return null;
} | java | @Nullable
public final NATIVE_TYPE getDocValue (@Nonnull final Document aDoc)
{
final IndexableField aField = getDocField (aDoc);
if (aField != null)
return getFieldNativeValue (aField);
return null;
} | [
"@",
"Nullable",
"public",
"final",
"NATIVE_TYPE",
"getDocValue",
"(",
"@",
"Nonnull",
"final",
"Document",
"aDoc",
")",
"{",
"final",
"IndexableField",
"aField",
"=",
"getDocField",
"(",
"aDoc",
")",
";",
"if",
"(",
"aField",
"!=",
"null",
")",
"return",
... | Get the value of this field in the provided document
@param aDoc
The Lucene result document
@return <code>null</code> if no such field is present, the stored value
otherwise. | [
"Get",
"the",
"value",
"of",
"this",
"field",
"in",
"the",
"provided",
"document"
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/storage/field/AbstractPDField.java#L142-L149 |
109,622 | phax/peppol-directory | peppol-directory-businesscard/src/main/java/com/helger/pd/businesscard/helper/PDBusinessCardHelper.java | PDBusinessCardHelper.parseBusinessCard | @Nullable
public static PDBusinessCard parseBusinessCard (@Nonnull final byte [] aData, @Nullable final Charset aCharset)
{
ValueEnforcer.notNull (aData, "Data");
{
// Read version 1
final PD1BusinessCardMarshaller aMarshaller1 = new PD1BusinessCardMarshaller ();
aMarshaller1.readExceptio... | java | @Nullable
public static PDBusinessCard parseBusinessCard (@Nonnull final byte [] aData, @Nullable final Charset aCharset)
{
ValueEnforcer.notNull (aData, "Data");
{
// Read version 1
final PD1BusinessCardMarshaller aMarshaller1 = new PD1BusinessCardMarshaller ();
aMarshaller1.readExceptio... | [
"@",
"Nullable",
"public",
"static",
"PDBusinessCard",
"parseBusinessCard",
"(",
"@",
"Nonnull",
"final",
"byte",
"[",
"]",
"aData",
",",
"@",
"Nullable",
"final",
"Charset",
"aCharset",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"aData",
",",
"\"Data\"",... | A generic reading API to read all supported versions of the BusinessCard
from a byte array and an optional character set.
@param aData
Bytes to read. May not be <code>null</code>.
@param aCharset
Character set to use. May be <code>null</code> in which case the XML
character set determination takes place.
@return <code... | [
"A",
"generic",
"reading",
"API",
"to",
"read",
"all",
"supported",
"versions",
"of",
"the",
"BusinessCard",
"from",
"a",
"byte",
"array",
"and",
"an",
"optional",
"character",
"set",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-businesscard/src/main/java/com/helger/pd/businesscard/helper/PDBusinessCardHelper.java#L61-L128 |
109,623 | phax/peppol-directory | peppol-directory-businesscard/src/main/java/com/helger/pd/businesscard/helper/PDBusinessCardHelper.java | PDBusinessCardHelper.parseBusinessCard | @Nullable
public static PDBusinessCard parseBusinessCard (@Nonnull final Node aNode)
{
ValueEnforcer.notNull (aNode, "Node");
{
// Read version 1
final PD1BusinessCardMarshaller aMarshaller1 = new PD1BusinessCardMarshaller ();
aMarshaller1.readExceptionCallbacks ().removeAll ();
fin... | java | @Nullable
public static PDBusinessCard parseBusinessCard (@Nonnull final Node aNode)
{
ValueEnforcer.notNull (aNode, "Node");
{
// Read version 1
final PD1BusinessCardMarshaller aMarshaller1 = new PD1BusinessCardMarshaller ();
aMarshaller1.readExceptionCallbacks ().removeAll ();
fin... | [
"@",
"Nullable",
"public",
"static",
"PDBusinessCard",
"parseBusinessCard",
"(",
"@",
"Nonnull",
"final",
"Node",
"aNode",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"aNode",
",",
"\"Node\"",
")",
";",
"{",
"// Read version 1",
"final",
"PD1BusinessCardMarsha... | A generic reading API to read all supported versions of the BusinessCard
from a DOM node.
@param aNode
Pre-parsed XML node to read. May not be <code>null</code>.
@return <code>null</code> if parsing fails.
@since 0.7.2 | [
"A",
"generic",
"reading",
"API",
"to",
"read",
"all",
"supported",
"versions",
"of",
"the",
"BusinessCard",
"from",
"a",
"DOM",
"node",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-businesscard/src/main/java/com/helger/pd/businesscard/helper/PDBusinessCardHelper.java#L139-L200 |
109,624 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/clientcert/ClientCertificateValidationResult.java | ClientCertificateValidationResult.createSuccess | @Nonnull
public static ClientCertificateValidationResult createSuccess (@Nonnull @Nonempty final String sClientID)
{
ValueEnforcer.notEmpty (sClientID, "ClientID");
return new ClientCertificateValidationResult (true, sClientID);
} | java | @Nonnull
public static ClientCertificateValidationResult createSuccess (@Nonnull @Nonempty final String sClientID)
{
ValueEnforcer.notEmpty (sClientID, "ClientID");
return new ClientCertificateValidationResult (true, sClientID);
} | [
"@",
"Nonnull",
"public",
"static",
"ClientCertificateValidationResult",
"createSuccess",
"(",
"@",
"Nonnull",
"@",
"Nonempty",
"final",
"String",
"sClientID",
")",
"{",
"ValueEnforcer",
".",
"notEmpty",
"(",
"sClientID",
",",
"\"ClientID\"",
")",
";",
"return",
"... | Create client certificate validation success
@param sClientID
Client ID to use. May neither be <code>null</code> nor empty.
@return Never <code>null</code>. | [
"Create",
"client",
"certificate",
"validation",
"success"
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/clientcert/ClientCertificateValidationResult.java#L76-L81 |
109,625 | phax/peppol-directory | peppol-directory-client/src/main/java/com/helger/pd/client/PDClient.java | PDClient.executeRequest | @Nonnull
@OverrideOnDemand
protected <T> T executeRequest (@Nonnull final HttpRequestBase aRequest,
@Nonnull final ResponseHandler <T> aHandler) throws IOException
{
// Contextual attributes set the local context level will take
// precedence over those set at the client ... | java | @Nonnull
@OverrideOnDemand
protected <T> T executeRequest (@Nonnull final HttpRequestBase aRequest,
@Nonnull final ResponseHandler <T> aHandler) throws IOException
{
// Contextual attributes set the local context level will take
// precedence over those set at the client ... | [
"@",
"Nonnull",
"@",
"OverrideOnDemand",
"protected",
"<",
"T",
">",
"T",
"executeRequest",
"(",
"@",
"Nonnull",
"final",
"HttpRequestBase",
"aRequest",
",",
"@",
"Nonnull",
"final",
"ResponseHandler",
"<",
"T",
">",
"aHandler",
")",
"throws",
"IOException",
"... | The main execution routine. Overwrite this method to add additional
properties to the call.
@param aRequest
The request to be executed. Never <code>null</code>.
@param aHandler
The response handler to be used. May not be <code>null</code>.
@return The return value of the response handler. Never <code>null</code>.
@thr... | [
"The",
"main",
"execution",
"routine",
".",
"Overwrite",
"this",
"method",
"to",
"add",
"additional",
"properties",
"to",
"the",
"call",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-client/src/main/java/com/helger/pd/client/PDClient.java#L245-L254 |
109,626 | phax/peppol-directory | peppol-directory-client/src/main/java/com/helger/pd/client/PDClient.java | PDClient.isServiceGroupRegistered | @Nonnull
public boolean isServiceGroupRegistered (@Nonnull final IParticipantIdentifier aParticipantID)
{
ValueEnforcer.notNull (aParticipantID, "ParticipantID");
final HttpGet aGet = new HttpGet (m_sPDIndexerURL + aParticipantID.getURIPercentEncoded ());
try
{
return executeRequest (aGet, ne... | java | @Nonnull
public boolean isServiceGroupRegistered (@Nonnull final IParticipantIdentifier aParticipantID)
{
ValueEnforcer.notNull (aParticipantID, "ParticipantID");
final HttpGet aGet = new HttpGet (m_sPDIndexerURL + aParticipantID.getURIPercentEncoded ());
try
{
return executeRequest (aGet, ne... | [
"@",
"Nonnull",
"public",
"boolean",
"isServiceGroupRegistered",
"(",
"@",
"Nonnull",
"final",
"IParticipantIdentifier",
"aParticipantID",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"aParticipantID",
",",
"\"ParticipantID\"",
")",
";",
"final",
"HttpGet",
"aGet",... | Gets a list of references to the CompleteServiceGroup's owned by the
specified userId. This is a non-specification compliant method.
@param aParticipantID
Participant ID to query for existence. May not be <code>null</code>.
@return <code>true</code> if the participant is in the index,
<code>false</code> otherwise. | [
"Gets",
"a",
"list",
"of",
"references",
"to",
"the",
"CompleteServiceGroup",
"s",
"owned",
"by",
"the",
"specified",
"userId",
".",
"This",
"is",
"a",
"non",
"-",
"specification",
"compliant",
"method",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-client/src/main/java/com/helger/pd/client/PDClient.java#L265-L280 |
109,627 | phax/peppol-directory | peppol-directory-publisher/src/main/java/com/helger/pd/publisher/exportall/ExportAllManager.java | ExportAllManager.streamFileXMLTo | public static void streamFileXMLTo (@Nonnull final UnifiedResponse aUR)
{
// Do it in a read lock!
s_aRWLock.readLock ().lock ();
try
{
final File f = _getFileXML ();
// setContent(IReadableResource) is lazy
aUR.setContent (new FileSystemResource (f));
}
finally
{
s... | java | public static void streamFileXMLTo (@Nonnull final UnifiedResponse aUR)
{
// Do it in a read lock!
s_aRWLock.readLock ().lock ();
try
{
final File f = _getFileXML ();
// setContent(IReadableResource) is lazy
aUR.setContent (new FileSystemResource (f));
}
finally
{
s... | [
"public",
"static",
"void",
"streamFileXMLTo",
"(",
"@",
"Nonnull",
"final",
"UnifiedResponse",
"aUR",
")",
"{",
"// Do it in a read lock!",
"s_aRWLock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"final",
"File",
"f",
"=",
"_getFileX... | Stream the stored XML file to the provided HTTP response
@param aUR
The response to stream to. May not be <code>null</code>. | [
"Stream",
"the",
"stored",
"XML",
"file",
"to",
"the",
"provided",
"HTTP",
"response"
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-publisher/src/main/java/com/helger/pd/publisher/exportall/ExportAllManager.java#L135-L149 |
109,628 | phax/peppol-directory | peppol-directory-publisher/src/main/java/com/helger/pd/publisher/exportall/ExportAllManager.java | ExportAllManager.streamFileExcelTo | public static void streamFileExcelTo (@Nonnull final UnifiedResponse aUR)
{
// Do it in a read lock!
s_aRWLock.readLock ().lock ();
try
{
final File f = _getFileExcel ();
// setContent(IReadableResource) is lazy
aUR.setContent (new FileSystemResource (f));
}
finally
{
... | java | public static void streamFileExcelTo (@Nonnull final UnifiedResponse aUR)
{
// Do it in a read lock!
s_aRWLock.readLock ().lock ();
try
{
final File f = _getFileExcel ();
// setContent(IReadableResource) is lazy
aUR.setContent (new FileSystemResource (f));
}
finally
{
... | [
"public",
"static",
"void",
"streamFileExcelTo",
"(",
"@",
"Nonnull",
"final",
"UnifiedResponse",
"aUR",
")",
"{",
"// Do it in a read lock!",
"s_aRWLock",
".",
"readLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"final",
"File",
"f",
"=",
"_getFil... | Stream the stored Excel file to the provided HTTP response
@param aUR
The response to stream to. May not be <code>null</code>. | [
"Stream",
"the",
"stored",
"Excel",
"file",
"to",
"the",
"provided",
"HTTP",
"response"
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-publisher/src/main/java/com/helger/pd/publisher/exportall/ExportAllManager.java#L246-L260 |
109,629 | phax/peppol-directory | peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexExecutor.java | PDIndexExecutor.executeWorkItem | @Nonnull
public static ESuccess executeWorkItem (@Nonnull final IPDStorageManager aStorageMgr,
@Nonnull final IIndexerWorkItem aWorkItem,
@Nonnegative final int nRetryCount,
@Nonnull final Con... | java | @Nonnull
public static ESuccess executeWorkItem (@Nonnull final IPDStorageManager aStorageMgr,
@Nonnull final IIndexerWorkItem aWorkItem,
@Nonnegative final int nRetryCount,
@Nonnull final Con... | [
"@",
"Nonnull",
"public",
"static",
"ESuccess",
"executeWorkItem",
"(",
"@",
"Nonnull",
"final",
"IPDStorageManager",
"aStorageMgr",
",",
"@",
"Nonnull",
"final",
"IIndexerWorkItem",
"aWorkItem",
",",
"@",
"Nonnegative",
"final",
"int",
"nRetryCount",
",",
"@",
"N... | This method is responsible for executing the specified work item depending
on its type.
@param aStorageMgr
Storage manager.
@param aWorkItem
The work item to be executed. May not be <code>null</code>.
@param nRetryCount
The retry count. For the initial indexing it is 0, for the first
retry 1 etc.
@param aSuccessHandle... | [
"This",
"method",
"is",
"responsible",
"for",
"executing",
"the",
"specified",
"work",
"item",
"depending",
"on",
"its",
"type",
"."
] | 98da26da29fb7178371d6b029516cbf01be223fb | https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/PDIndexExecutor.java#L62-L144 |
109,630 | vorburger/ch.vorburger.exec | src/main/java/ch/vorburger/exec/ManagedProcess.java | ManagedProcess.buffer | protected BufferedInputStream buffer(final InputStream inputStream) {
// reject null early on rather than waiting for IO operation to fail
if (inputStream == null) { // not checked by BufferedInputStream
throw new NullPointerException("inputStream == null");
}
return inputStr... | java | protected BufferedInputStream buffer(final InputStream inputStream) {
// reject null early on rather than waiting for IO operation to fail
if (inputStream == null) { // not checked by BufferedInputStream
throw new NullPointerException("inputStream == null");
}
return inputStr... | [
"protected",
"BufferedInputStream",
"buffer",
"(",
"final",
"InputStream",
"inputStream",
")",
"{",
"// reject null early on rather than waiting for IO operation to fail",
"if",
"(",
"inputStream",
"==",
"null",
")",
"{",
"// not checked by BufferedInputStream",
"throw",
"new",... | stolen from commons-io IOUtiles (@since v2.5) | [
"stolen",
"from",
"commons",
"-",
"io",
"IOUtiles",
"("
] | 98853c55c8dfb3a6185019b8928df2a091baa471 | https://github.com/vorburger/ch.vorburger.exec/blob/98853c55c8dfb3a6185019b8928df2a091baa471/src/main/java/ch/vorburger/exec/ManagedProcess.java#L136-L143 |
109,631 | vorburger/ch.vorburger.exec | src/main/java/ch/vorburger/exec/ManagedProcess.java | ManagedProcess.exitValue | @Override
public int exitValue() throws ManagedProcessException {
try {
return resultHandler.getExitValue();
} catch (IllegalStateException e) {
throw new ManagedProcessException("Exit Value not (yet) available for "
+ getProcLongName(), e);
}
... | java | @Override
public int exitValue() throws ManagedProcessException {
try {
return resultHandler.getExitValue();
} catch (IllegalStateException e) {
throw new ManagedProcessException("Exit Value not (yet) available for "
+ getProcLongName(), e);
}
... | [
"@",
"Override",
"public",
"int",
"exitValue",
"(",
")",
"throws",
"ManagedProcessException",
"{",
"try",
"{",
"return",
"resultHandler",
".",
"getExitValue",
"(",
")",
";",
"}",
"catch",
"(",
"IllegalStateException",
"e",
")",
"{",
"throw",
"new",
"ManagedPro... | Returns the exit value for the subprocess.
@return the exit value of the subprocess represented by this <code>Process</code> object. by
convention, the value <code>0</code> indicates normal termination.
@exception ManagedProcessException if the subprocess represented by this
<code>ManagedProcess</code> object has not ... | [
"Returns",
"the",
"exit",
"value",
"for",
"the",
"subprocess",
"."
] | 98853c55c8dfb3a6185019b8928df2a091baa471 | https://github.com/vorburger/ch.vorburger.exec/blob/98853c55c8dfb3a6185019b8928df2a091baa471/src/main/java/ch/vorburger/exec/ManagedProcess.java#L387-L395 |
109,632 | milaboratory/milib | src/main/java/com/milaboratory/core/io/sequence/fastq/FastqRecordsReader.java | FastqRecordsReader.close | @Override
public void close() {
if (!closed.compareAndSet(false, true))
return;
//is synchronized with itself and _next calls,
//so no synchronization on inner reader is needed
try {
synchronized (inputStream) {
inputStream.close();
... | java | @Override
public void close() {
if (!closed.compareAndSet(false, true))
return;
//is synchronized with itself and _next calls,
//so no synchronization on inner reader is needed
try {
synchronized (inputStream) {
inputStream.close();
... | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"{",
"if",
"(",
"!",
"closed",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"return",
";",
"//is synchronized with itself and _next calls,",
"//so no synchronization on inner reader is needed",
"try",... | Closes the output port | [
"Closes",
"the",
"output",
"port"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/sequence/fastq/FastqRecordsReader.java#L221-L235 |
109,633 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/FileIndex.java | FileIndex.write | public void write(OutputStream stream) throws IOException {
//Creating buffer
ByteArrayOutputStream bos = new ByteArrayOutputStream();
//Creating compressed output data stream
DeflaterOutputStream deflate = new DeflaterOutputStream(bos);
DataOutputStream dataStream = new DataOut... | java | public void write(OutputStream stream) throws IOException {
//Creating buffer
ByteArrayOutputStream bos = new ByteArrayOutputStream();
//Creating compressed output data stream
DeflaterOutputStream deflate = new DeflaterOutputStream(bos);
DataOutputStream dataStream = new DataOut... | [
"public",
"void",
"write",
"(",
"OutputStream",
"stream",
")",
"throws",
"IOException",
"{",
"//Creating buffer",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"//Creating compressed output data stream",
"DeflaterOutputStream",
"deflate... | Writes this index to specified output stream.
@param stream output stream
@throws IOException | [
"Writes",
"this",
"index",
"to",
"specified",
"output",
"stream",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/FileIndex.java#L151-L199 |
109,634 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/FileIndex.java | FileIndex.read | public static FileIndex read(InputStream stream) throws IOException {
//Creating raw input stream
DataInputStream raw = new DataInputStream(stream);
//Reading magic number
int magic = raw.readInt();
if (magic != MAGIC)
throw new IOException("Wrong magic number");
... | java | public static FileIndex read(InputStream stream) throws IOException {
//Creating raw input stream
DataInputStream raw = new DataInputStream(stream);
//Reading magic number
int magic = raw.readInt();
if (magic != MAGIC)
throw new IOException("Wrong magic number");
... | [
"public",
"static",
"FileIndex",
"read",
"(",
"InputStream",
"stream",
")",
"throws",
"IOException",
"{",
"//Creating raw input stream",
"DataInputStream",
"raw",
"=",
"new",
"DataInputStream",
"(",
"stream",
")",
";",
"//Reading magic number",
"int",
"magic",
"=",
... | Reads index from input stream.
@param stream input stream
@return {@code FileIndex}
@throws IOException | [
"Reads",
"index",
"from",
"input",
"stream",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/FileIndex.java#L230-L284 |
109,635 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/Alphabets.java | Alphabets.register | public static void register(Alphabet alphabet) {
if (alphabetsByName.put(alphabet.getAlphabetName(), alphabet) != null)
throw new IllegalStateException("Alphabet with this name is already registered.");
if (alphabetsById.put(alphabet.getId(), alphabet) != null)
throw new Illegal... | java | public static void register(Alphabet alphabet) {
if (alphabetsByName.put(alphabet.getAlphabetName(), alphabet) != null)
throw new IllegalStateException("Alphabet with this name is already registered.");
if (alphabetsById.put(alphabet.getId(), alphabet) != null)
throw new Illegal... | [
"public",
"static",
"void",
"register",
"(",
"Alphabet",
"alphabet",
")",
"{",
"if",
"(",
"alphabetsByName",
".",
"put",
"(",
"alphabet",
".",
"getAlphabetName",
"(",
")",
",",
"alphabet",
")",
"!=",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",... | Register new alphabet
@param alphabet alphabet | [
"Register",
"new",
"alphabet"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/Alphabets.java#L49-L55 |
109,636 | milaboratory/milib | src/main/java/com/milaboratory/util/Sorter.java | Sorter.sort | public static <T> OutputPortCloseable<T> sort(
OutputPort<T> initialSource,
Comparator<T> comparator,
int chunkSize,
Class<T> clazz,
File tempFile) throws IOException {
return sort(initialSource, comparator, chunkSize,
new ObjectSeriali... | java | public static <T> OutputPortCloseable<T> sort(
OutputPort<T> initialSource,
Comparator<T> comparator,
int chunkSize,
Class<T> clazz,
File tempFile) throws IOException {
return sort(initialSource, comparator, chunkSize,
new ObjectSeriali... | [
"public",
"static",
"<",
"T",
">",
"OutputPortCloseable",
"<",
"T",
">",
"sort",
"(",
"OutputPort",
"<",
"T",
">",
"initialSource",
",",
"Comparator",
"<",
"T",
">",
"comparator",
",",
"int",
"chunkSize",
",",
"Class",
"<",
"T",
">",
"clazz",
",",
"Fil... | Sort objects supporting PrimitivIO serialization. | [
"Sort",
"objects",
"supporting",
"PrimitivIO",
"serialization",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/util/Sorter.java#L52-L60 |
109,637 | milaboratory/milib | src/main/java/com/milaboratory/core/tree/BranchingEnumerator.java | BranchingEnumerator.move1 | private void move1() {
if (node == null)
return;
if (position >= reference.size()) {
node = null;
return;
}
node = node.links[reference.codeAt(position++)];
} | java | private void move1() {
if (node == null)
return;
if (position >= reference.size()) {
node = null;
return;
}
node = node.links[reference.codeAt(position++)];
} | [
"private",
"void",
"move1",
"(",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"return",
";",
"if",
"(",
"position",
">=",
"reference",
".",
"size",
"(",
")",
")",
"{",
"node",
"=",
"null",
";",
"return",
";",
"}",
"node",
"=",
"node",
".",
"... | Move the pointer one step forward. Move is made exactly matching the corresponding nucleotide in the reference
sequence, so this method prevents branching in the current position. | [
"Move",
"the",
"pointer",
"one",
"step",
"forward",
".",
"Move",
"is",
"made",
"exactly",
"matching",
"the",
"corresponding",
"nucleotide",
"in",
"the",
"reference",
"sequence",
"so",
"this",
"method",
"prevents",
"branching",
"in",
"the",
"current",
"position",... | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/tree/BranchingEnumerator.java#L67-L77 |
109,638 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/AbstractRandomAccessReader.java | AbstractRandomAccessReader.seekToRecord | public void seekToRecord(long recordNumber) throws IOException {
if (currentRecordNumber == recordNumber)
return;
long skip;
if (recordNumber < fileIndex.getStartingRecordNumber()) {
if (currentRecordNumber < recordNumber)
skip = recordNumber - currentReco... | java | public void seekToRecord(long recordNumber) throws IOException {
if (currentRecordNumber == recordNumber)
return;
long skip;
if (recordNumber < fileIndex.getStartingRecordNumber()) {
if (currentRecordNumber < recordNumber)
skip = recordNumber - currentReco... | [
"public",
"void",
"seekToRecord",
"(",
"long",
"recordNumber",
")",
"throws",
"IOException",
"{",
"if",
"(",
"currentRecordNumber",
"==",
"recordNumber",
")",
"return",
";",
"long",
"skip",
";",
"if",
"(",
"recordNumber",
"<",
"fileIndex",
".",
"getStartingRecor... | Sets the file-pointer offset, measured from the beginning of this file, at which the next record occurs.
@param recordNumber number of record, at which to set the file pointer.
@throws IOException if {@code pos} is less than {@code 0} or if an I/O error occurs. | [
"Sets",
"the",
"file",
"-",
"pointer",
"offset",
"measured",
"from",
"the",
"beginning",
"of",
"this",
"file",
"at",
"which",
"the",
"next",
"record",
"occurs",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/AbstractRandomAccessReader.java#L62-L92 |
109,639 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/AbstractRandomAccessReader.java | AbstractRandomAccessReader.take | @Override
public T take() {
T t = take0();
if (t != null)
++currentRecordNumber;
return t;
} | java | @Override
public T take() {
T t = take0();
if (t != null)
++currentRecordNumber;
return t;
} | [
"@",
"Override",
"public",
"T",
"take",
"(",
")",
"{",
"T",
"t",
"=",
"take0",
"(",
")",
";",
"if",
"(",
"t",
"!=",
"null",
")",
"++",
"currentRecordNumber",
";",
"return",
"t",
";",
"}"
] | Returns the next record or null if no more records exist.
@return next record or null if no more records exist | [
"Returns",
"the",
"next",
"record",
"or",
"null",
"if",
"no",
"more",
"records",
"exist",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/AbstractRandomAccessReader.java#L115-L121 |
109,640 | milaboratory/milib | src/main/java/com/milaboratory/core/mutations/Mutations.java | Mutations.getLengthDelta | public int getLengthDelta() {
int delta = 0;
for (int mut : mutations)
switch (mut & MUTATION_TYPE_MASK) {
case RAW_MUTATION_TYPE_DELETION:
--delta;
break;
case RAW_MUTATION_TYPE_INSERTION:
++delta;
... | java | public int getLengthDelta() {
int delta = 0;
for (int mut : mutations)
switch (mut & MUTATION_TYPE_MASK) {
case RAW_MUTATION_TYPE_DELETION:
--delta;
break;
case RAW_MUTATION_TYPE_INSERTION:
++delta;
... | [
"public",
"int",
"getLengthDelta",
"(",
")",
"{",
"int",
"delta",
"=",
"0",
";",
"for",
"(",
"int",
"mut",
":",
"mutations",
")",
"switch",
"(",
"mut",
"&",
"MUTATION_TYPE_MASK",
")",
"{",
"case",
"RAW_MUTATION_TYPE_DELETION",
":",
"--",
"delta",
";",
"b... | Returns the difference between the length of initial sequence and length of mutated sequence. Negative values
denotes that mutated sequence is shorter.
@return difference between the length of initial sequence and mutated sequence | [
"Returns",
"the",
"difference",
"between",
"the",
"length",
"of",
"initial",
"sequence",
"and",
"length",
"of",
"mutated",
"sequence",
".",
"Negative",
"values",
"denotes",
"that",
"mutated",
"sequence",
"is",
"shorter",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/Mutations.java#L248-L262 |
109,641 | milaboratory/milib | src/main/java/com/milaboratory/core/mutations/Mutations.java | Mutations.concat | public Mutations<S> concat(final Mutations<S> other) {
return new MutationsBuilder<>(alphabet, false)
.ensureCapacity(this.size() + other.size())
.append(this)
.append(other)
.createAndDestroy();
} | java | public Mutations<S> concat(final Mutations<S> other) {
return new MutationsBuilder<>(alphabet, false)
.ensureCapacity(this.size() + other.size())
.append(this)
.append(other)
.createAndDestroy();
} | [
"public",
"Mutations",
"<",
"S",
">",
"concat",
"(",
"final",
"Mutations",
"<",
"S",
">",
"other",
")",
"{",
"return",
"new",
"MutationsBuilder",
"<>",
"(",
"alphabet",
",",
"false",
")",
".",
"ensureCapacity",
"(",
"this",
".",
"size",
"(",
")",
"+",
... | Concatenates this and other | [
"Concatenates",
"this",
"and",
"other"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/Mutations.java#L267-L273 |
109,642 | milaboratory/milib | src/main/java/com/milaboratory/core/mutations/Mutations.java | Mutations.move | public Mutations<S> move(int offset) {
int[] newMutations = new int[mutations.length];
for (int i = 0; i < mutations.length; ++i)
newMutations[i] = Mutation.move(mutations[i], offset);
return new Mutations<S>(alphabet, newMutations, true);
} | java | public Mutations<S> move(int offset) {
int[] newMutations = new int[mutations.length];
for (int i = 0; i < mutations.length; ++i)
newMutations[i] = Mutation.move(mutations[i], offset);
return new Mutations<S>(alphabet, newMutations, true);
} | [
"public",
"Mutations",
"<",
"S",
">",
"move",
"(",
"int",
"offset",
")",
"{",
"int",
"[",
"]",
"newMutations",
"=",
"new",
"int",
"[",
"mutations",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"mutations",
".",
"lengt... | Moves positions of mutations by specified offset
@param offset offset
@return relocated positions | [
"Moves",
"positions",
"of",
"mutations",
"by",
"specified",
"offset"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/Mutations.java#L351-L356 |
109,643 | milaboratory/milib | src/main/java/com/milaboratory/core/mutations/Mutations.java | Mutations.removeMutationsInRange | public Mutations<S> removeMutationsInRange(int from, int to) {
if (to < from)
throw new IllegalArgumentException("Reversed ranges are not supported.");
// If range is empty return untouched mutations object
if (from == to)
return this;
// Determine range in muta... | java | public Mutations<S> removeMutationsInRange(int from, int to) {
if (to < from)
throw new IllegalArgumentException("Reversed ranges are not supported.");
// If range is empty return untouched mutations object
if (from == to)
return this;
// Determine range in muta... | [
"public",
"Mutations",
"<",
"S",
">",
"removeMutationsInRange",
"(",
"int",
"from",
",",
"int",
"to",
")",
"{",
"if",
"(",
"to",
"<",
"from",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Reversed ranges are not supported.\"",
")",
";",
"// If range i... | Removes mutations for a range of positions in the original sequence and performs shift of corresponding
positions of mutations.
<p>Insertions before {@code from} will be left untouched. Insertions after {@code (to - 1)} will be removed.</p>
<p>
<b>Important:</b> to remove leftmost insertions (left trailing insertions... | [
"Removes",
"mutations",
"for",
"a",
"range",
"of",
"positions",
"in",
"the",
"original",
"sequence",
"and",
"performs",
"shift",
"of",
"corresponding",
"positions",
"of",
"mutations",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/Mutations.java#L518-L552 |
109,644 | milaboratory/milib | src/main/java/com/milaboratory/util/ArraysUtils.java | ArraysUtils.getSortedDistinct | public static long[] getSortedDistinct(long[] values) {
if (values.length == 0)
return values;
Arrays.sort(values);
int shift = 0;
int i = 0;
while (i + shift + 1 < values.length)
if (values[i + shift] == values[i + shift + 1])
++shift;
... | java | public static long[] getSortedDistinct(long[] values) {
if (values.length == 0)
return values;
Arrays.sort(values);
int shift = 0;
int i = 0;
while (i + shift + 1 < values.length)
if (values[i + shift] == values[i + shift + 1])
++shift;
... | [
"public",
"static",
"long",
"[",
"]",
"getSortedDistinct",
"(",
"long",
"[",
"]",
"values",
")",
"{",
"if",
"(",
"values",
".",
"length",
"==",
"0",
")",
"return",
"values",
";",
"Arrays",
".",
"sort",
"(",
"values",
")",
";",
"int",
"shift",
"=",
... | Sort array & return array with removed repetitive values.
@param values input array (this method will quickSort this array)
@return sorted array of distinct values | [
"Sort",
"array",
"&",
"return",
"array",
"with",
"removed",
"repetitive",
"values",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/util/ArraysUtils.java#L60-L75 |
109,645 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequenceWithQuality.java | SequenceWithQuality.toPrettyString | public String toPrettyString() {
String seq = sequence.toString();
String qual = quality.toString();
return seq + '\n' + qual;
} | java | public String toPrettyString() {
String seq = sequence.toString();
String qual = quality.toString();
return seq + '\n' + qual;
} | [
"public",
"String",
"toPrettyString",
"(",
")",
"{",
"String",
"seq",
"=",
"sequence",
".",
"toString",
"(",
")",
";",
"String",
"qual",
"=",
"quality",
".",
"toString",
"(",
")",
";",
"return",
"seq",
"+",
"'",
"'",
"+",
"qual",
";",
"}"
] | Returns a pretty string representation of this.
@return pretty string representation of this | [
"Returns",
"a",
"pretty",
"string",
"representation",
"of",
"this",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceWithQuality.java#L127-L131 |
109,646 | milaboratory/milib | src/main/java/com/milaboratory/core/tree/NeighborhoodIterator.java | NeighborhoodIterator.ensureCapacity | private void ensureCapacity(int newSize) {
int oldSize;
if ((oldSize = branchingEnumerators.length) < newSize) {
branchingEnumerators = Arrays.copyOfRange(branchingEnumerators, 0, newSize);
for (int i = oldSize; i < newSize; ++i)
branchingEnumerators[i] = new Bran... | java | private void ensureCapacity(int newSize) {
int oldSize;
if ((oldSize = branchingEnumerators.length) < newSize) {
branchingEnumerators = Arrays.copyOfRange(branchingEnumerators, 0, newSize);
for (int i = oldSize; i < newSize; ++i)
branchingEnumerators[i] = new Bran... | [
"private",
"void",
"ensureCapacity",
"(",
"int",
"newSize",
")",
"{",
"int",
"oldSize",
";",
"if",
"(",
"(",
"oldSize",
"=",
"branchingEnumerators",
".",
"length",
")",
"<",
"newSize",
")",
"{",
"branchingEnumerators",
"=",
"Arrays",
".",
"copyOfRange",
"(",... | Ensures capacity for storing BranchingEnumerators.
@param newSize desired size | [
"Ensures",
"capacity",
"for",
"storing",
"BranchingEnumerators",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/tree/NeighborhoodIterator.java#L70-L77 |
109,647 | milaboratory/milib | src/main/java/com/milaboratory/core/tree/NeighborhoodIterator.java | NeighborhoodIterator.setupBranchingEnumerators | private void setupBranchingEnumerators() {
//Getting required sequence of differences (mutations)
final byte[] bSequence = branchingSequences[branchingSequenceIndex];
//Ensure number of branching enumerators
ensureCapacity(bSequence.length);
//Setting up initial branching enume... | java | private void setupBranchingEnumerators() {
//Getting required sequence of differences (mutations)
final byte[] bSequence = branchingSequences[branchingSequenceIndex];
//Ensure number of branching enumerators
ensureCapacity(bSequence.length);
//Setting up initial branching enume... | [
"private",
"void",
"setupBranchingEnumerators",
"(",
")",
"{",
"//Getting required sequence of differences (mutations)",
"final",
"byte",
"[",
"]",
"bSequence",
"=",
"branchingSequences",
"[",
"branchingSequenceIndex",
"]",
";",
"//Ensure number of branching enumerators",
"ensu... | Setts up BranchingEnumerators for current branching sequence | [
"Setts",
"up",
"BranchingEnumerators",
"for",
"current",
"branching",
"sequence"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/tree/NeighborhoodIterator.java#L82-L111 |
109,648 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/LinearGapAlignmentScoring.java | LinearGapAlignmentScoring.getAminoAcidBLASTScoring | public static LinearGapAlignmentScoring<AminoAcidSequence> getAminoAcidBLASTScoring(BLASTMatrix matrix, int gapPenalty) {
return new LinearGapAlignmentScoring<>(AminoAcidSequence.ALPHABET,
matrix.getMatrix(),
gapPenalty);
} | java | public static LinearGapAlignmentScoring<AminoAcidSequence> getAminoAcidBLASTScoring(BLASTMatrix matrix, int gapPenalty) {
return new LinearGapAlignmentScoring<>(AminoAcidSequence.ALPHABET,
matrix.getMatrix(),
gapPenalty);
} | [
"public",
"static",
"LinearGapAlignmentScoring",
"<",
"AminoAcidSequence",
">",
"getAminoAcidBLASTScoring",
"(",
"BLASTMatrix",
"matrix",
",",
"int",
"gapPenalty",
")",
"{",
"return",
"new",
"LinearGapAlignmentScoring",
"<>",
"(",
"AminoAcidSequence",
".",
"ALPHABET",
"... | Returns standard amino acid BLAST scoring
@param matrix BLAST substitution matrix
@param gapPenalty penalty for gap, must be < 0
@return standard amino acid BLAST scoring | [
"Returns",
"standard",
"amino",
"acid",
"BLAST",
"scoring"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/LinearGapAlignmentScoring.java#L153-L157 |
109,649 | milaboratory/milib | src/main/java/com/milaboratory/core/io/sequence/fasta/RandomAccessFastaIndex.java | RandomAccessFastaIndex.index | public static RandomAccessFastaIndex index(Path file, int indexStep, boolean save, LongProcessReporter reporter) {
Path indexFile = file.resolveSibling(file.getFileName() + INDEX_SUFFIX);
if (Files.exists(indexFile))
try (FileInputStream fis = new FileInputStream(indexFile.toFile())) {
... | java | public static RandomAccessFastaIndex index(Path file, int indexStep, boolean save, LongProcessReporter reporter) {
Path indexFile = file.resolveSibling(file.getFileName() + INDEX_SUFFIX);
if (Files.exists(indexFile))
try (FileInputStream fis = new FileInputStream(indexFile.toFile())) {
... | [
"public",
"static",
"RandomAccessFastaIndex",
"index",
"(",
"Path",
"file",
",",
"int",
"indexStep",
",",
"boolean",
"save",
",",
"LongProcessReporter",
"reporter",
")",
"{",
"Path",
"indexFile",
"=",
"file",
".",
"resolveSibling",
"(",
"file",
".",
"getFileName... | Index fasta file or loads previously created index
@param file file to index
@param indexStep index step
@param save whether to save index to {input_file_name}.mifdx file
@param reporter reporter
@return index | [
"Index",
"fasta",
"file",
"or",
"loads",
"previously",
"created",
"index"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/sequence/fasta/RandomAccessFastaIndex.java#L321-L366 |
109,650 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/kaligner1/KAlignerParameters.java | KAlignerParameters.getByName | public static KAlignerParameters getByName(String name) {
KAlignerParameters params = knownParameters.get(name);
if (params == null)
return null;
return params.clone();
} | java | public static KAlignerParameters getByName(String name) {
KAlignerParameters params = knownParameters.get(name);
if (params == null)
return null;
return params.clone();
} | [
"public",
"static",
"KAlignerParameters",
"getByName",
"(",
"String",
"name",
")",
"{",
"KAlignerParameters",
"params",
"=",
"knownParameters",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"params",
"==",
"null",
")",
"return",
"null",
";",
"return",
"param... | Returns parameters by specified preset name
@param name parameters preset name
@return parameters with specified preset name | [
"Returns",
"parameters",
"by",
"specified",
"preset",
"name"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/kaligner1/KAlignerParameters.java#L60-L65 |
109,651 | milaboratory/milib | src/main/java/com/milaboratory/core/io/sequence/fasta/FastaReader.java | FastaReader.asRawRecordsPort | public OutputPortCloseable<RawFastaRecord> asRawRecordsPort() {
return new OutputPortCloseable<RawFastaRecord>() {
@Override
public void close() {
FastaReader.this.close();
}
@Override
public RawFastaRecord take() {
ret... | java | public OutputPortCloseable<RawFastaRecord> asRawRecordsPort() {
return new OutputPortCloseable<RawFastaRecord>() {
@Override
public void close() {
FastaReader.this.close();
}
@Override
public RawFastaRecord take() {
ret... | [
"public",
"OutputPortCloseable",
"<",
"RawFastaRecord",
">",
"asRawRecordsPort",
"(",
")",
"{",
"return",
"new",
"OutputPortCloseable",
"<",
"RawFastaRecord",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"{",
"FastaReader",
".",
"t... | Returns output port of raw records.
@return output port of raw records | [
"Returns",
"output",
"port",
"of",
"raw",
"records",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/sequence/fasta/FastaReader.java#L159-L171 |
109,652 | librato/metrics-librato | src/main/java/com/librato/metrics/reporter/SourceInformation.java | SourceInformation.from | public static SourceInformation from(Pattern sourceRegex, String name) {
if (sourceRegex == null) {
return new SourceInformation(null, name);
}
Matcher matcher = sourceRegex.matcher(name);
if (matcher.groupCount() != 1) {
log.error("Source regex matcher must defin... | java | public static SourceInformation from(Pattern sourceRegex, String name) {
if (sourceRegex == null) {
return new SourceInformation(null, name);
}
Matcher matcher = sourceRegex.matcher(name);
if (matcher.groupCount() != 1) {
log.error("Source regex matcher must defin... | [
"public",
"static",
"SourceInformation",
"from",
"(",
"Pattern",
"sourceRegex",
",",
"String",
"name",
")",
"{",
"if",
"(",
"sourceRegex",
"==",
"null",
")",
"{",
"return",
"new",
"SourceInformation",
"(",
"null",
",",
"name",
")",
";",
"}",
"Matcher",
"ma... | If the pattern is not null, it will attempt to match against the supplied name to pull out the source. | [
"If",
"the",
"pattern",
"is",
"not",
"null",
"it",
"will",
"attempt",
"to",
"match",
"against",
"the",
"supplied",
"name",
"to",
"pull",
"out",
"the",
"source",
"."
] | 10713643cf7d80e0f9741a7e1e81d1f6d68dc3f6 | https://github.com/librato/metrics-librato/blob/10713643cf7d80e0f9741a7e1e81d1f6d68dc3f6/src/main/java/com/librato/metrics/reporter/SourceInformation.java#L18-L39 |
109,653 | milaboratory/milib | src/main/java/com/milaboratory/core/clustering/Clustering.java | Clustering.performClustering | public static <T, S extends Sequence<S>> List<Cluster<T>> performClustering(Collection<T> inputObjects,
SequenceExtractor<T, S> sequenceExtractor,
ClusteringStr... | java | public static <T, S extends Sequence<S>> List<Cluster<T>> performClustering(Collection<T> inputObjects,
SequenceExtractor<T, S> sequenceExtractor,
ClusteringStr... | [
"public",
"static",
"<",
"T",
",",
"S",
"extends",
"Sequence",
"<",
"S",
">",
">",
"List",
"<",
"Cluster",
"<",
"T",
">",
">",
"performClustering",
"(",
"Collection",
"<",
"T",
">",
"inputObjects",
",",
"SequenceExtractor",
"<",
"T",
",",
"S",
">",
"... | Helper method. See class description. | [
"Helper",
"method",
".",
"See",
"class",
"description",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/clustering/Clustering.java#L262-L266 |
109,654 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Alignment.java | Alignment.calculateScore | public int calculateScore(AlignmentScoring<S> scoring) {
return AlignmentUtils.calculateScore(sequence1, sequence1Range, mutations, scoring);
} | java | public int calculateScore(AlignmentScoring<S> scoring) {
return AlignmentUtils.calculateScore(sequence1, sequence1Range, mutations, scoring);
} | [
"public",
"int",
"calculateScore",
"(",
"AlignmentScoring",
"<",
"S",
">",
"scoring",
")",
"{",
"return",
"AlignmentUtils",
".",
"calculateScore",
"(",
"sequence1",
",",
"sequence1Range",
",",
"mutations",
",",
"scoring",
")",
";",
"}"
] | Calculates score for this alignment using another scoring.
@param scoring scoring
@return alignment score | [
"Calculates",
"score",
"for",
"this",
"alignment",
"using",
"another",
"scoring",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Alignment.java#L107-L109 |
109,655 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Alignment.java | Alignment.convertToSeq1Range | public Range convertToSeq1Range(Range rangeInSeq2) {
int from = aabs(convertToSeq1Position(rangeInSeq2.getFrom()));
int to = aabs(convertToSeq1Position(rangeInSeq2.getTo()));
if (from == -1 || to == -1)
return null;
return new Range(from, to);
} | java | public Range convertToSeq1Range(Range rangeInSeq2) {
int from = aabs(convertToSeq1Position(rangeInSeq2.getFrom()));
int to = aabs(convertToSeq1Position(rangeInSeq2.getTo()));
if (from == -1 || to == -1)
return null;
return new Range(from, to);
} | [
"public",
"Range",
"convertToSeq1Range",
"(",
"Range",
"rangeInSeq2",
")",
"{",
"int",
"from",
"=",
"aabs",
"(",
"convertToSeq1Position",
"(",
"rangeInSeq2",
".",
"getFrom",
"(",
")",
")",
")",
";",
"int",
"to",
"=",
"aabs",
"(",
"convertToSeq1Position",
"("... | Converts range in sequence2 to range in sequence1, or returns null if input range is not fully covered by
alignment
@param rangeInSeq2 range in sequence 2
@return range in sequence1 or null if rangeInSeq2 is not fully covered by alignment | [
"Converts",
"range",
"in",
"sequence2",
"to",
"range",
"in",
"sequence1",
"or",
"returns",
"null",
"if",
"input",
"range",
"is",
"not",
"fully",
"covered",
"by",
"alignment"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Alignment.java#L231-L239 |
109,656 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Alignment.java | Alignment.convertToSeq2Range | public Range convertToSeq2Range(Range rangeInSeq1) {
int from = aabs(convertToSeq2Position(rangeInSeq1.getFrom()));
int to = aabs(convertToSeq2Position(rangeInSeq1.getTo()));
if (from == -1 || to == -1)
return null;
return new Range(from, to);
} | java | public Range convertToSeq2Range(Range rangeInSeq1) {
int from = aabs(convertToSeq2Position(rangeInSeq1.getFrom()));
int to = aabs(convertToSeq2Position(rangeInSeq1.getTo()));
if (from == -1 || to == -1)
return null;
return new Range(from, to);
} | [
"public",
"Range",
"convertToSeq2Range",
"(",
"Range",
"rangeInSeq1",
")",
"{",
"int",
"from",
"=",
"aabs",
"(",
"convertToSeq2Position",
"(",
"rangeInSeq1",
".",
"getFrom",
"(",
")",
")",
")",
";",
"int",
"to",
"=",
"aabs",
"(",
"convertToSeq2Position",
"("... | Converts range in sequence1 to range in sequence2, or returns null if input range is not fully covered by
alignment
@param rangeInSeq1 range in sequence 1
@return range in sequence2 or null if rangeInSeq1 is not fully covered by alignment | [
"Converts",
"range",
"in",
"sequence1",
"to",
"range",
"in",
"sequence2",
"or",
"returns",
"null",
"if",
"input",
"range",
"is",
"not",
"fully",
"covered",
"by",
"alignment"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Alignment.java#L248-L256 |
109,657 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Alignment.java | Alignment.invert | public Alignment<S> invert(S sequence2) {
return new Alignment<>(sequence2, getRelativeMutations().invert().move(sequence2Range.getFrom()),
sequence2Range, sequence1Range, score);
} | java | public Alignment<S> invert(S sequence2) {
return new Alignment<>(sequence2, getRelativeMutations().invert().move(sequence2Range.getFrom()),
sequence2Range, sequence1Range, score);
} | [
"public",
"Alignment",
"<",
"S",
">",
"invert",
"(",
"S",
"sequence2",
")",
"{",
"return",
"new",
"Alignment",
"<>",
"(",
"sequence2",
",",
"getRelativeMutations",
"(",
")",
".",
"invert",
"(",
")",
".",
"move",
"(",
"sequence2Range",
".",
"getFrom",
"("... | Having sequence2 creates alignment from sequence2 to sequence1
@param sequence2 sequence2
@return inverted alignment | [
"Having",
"sequence2",
"creates",
"alignment",
"from",
"sequence2",
"to",
"sequence1"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Alignment.java#L273-L276 |
109,658 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Alignment.java | Alignment.similarity | public float similarity() {
int match = 0, mismatch = 0;
AlignmentIteratorForward<S> iterator = forwardIterator();
while (iterator.advance()) {
final int mut = iterator.getCurrentMutation();
if (mut == NON_MUTATION)
++match;
else
... | java | public float similarity() {
int match = 0, mismatch = 0;
AlignmentIteratorForward<S> iterator = forwardIterator();
while (iterator.advance()) {
final int mut = iterator.getCurrentMutation();
if (mut == NON_MUTATION)
++match;
else
... | [
"public",
"float",
"similarity",
"(",
")",
"{",
"int",
"match",
"=",
"0",
",",
"mismatch",
"=",
"0",
";",
"AlignmentIteratorForward",
"<",
"S",
">",
"iterator",
"=",
"forwardIterator",
"(",
")",
";",
"while",
"(",
"iterator",
".",
"advance",
"(",
")",
... | Returns number of matches divided by sum of number of matches and mismatches.
@return number of matches divided by sum of number of matches and mismatches | [
"Returns",
"number",
"of",
"matches",
"divided",
"by",
"sum",
"of",
"number",
"of",
"matches",
"and",
"mismatches",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Alignment.java#L283-L296 |
109,659 | librato/metrics-librato | src/main/java/com/librato/metrics/reporter/DeltaTracker.java | DeltaTracker.peekDelta | public Long peekDelta(String name, long count) {
Long previous = lookup.get(name);
return calculateDelta(name, previous, count);
} | java | public Long peekDelta(String name, long count) {
Long previous = lookup.get(name);
return calculateDelta(name, previous, count);
} | [
"public",
"Long",
"peekDelta",
"(",
"String",
"name",
",",
"long",
"count",
")",
"{",
"Long",
"previous",
"=",
"lookup",
".",
"get",
"(",
"name",
")",
";",
"return",
"calculateDelta",
"(",
"name",
",",
"previous",
",",
"count",
")",
";",
"}"
] | Gets the delta without updating the internal data store | [
"Gets",
"the",
"delta",
"without",
"updating",
"the",
"internal",
"data",
"store"
] | 10713643cf7d80e0f9741a7e1e81d1f6d68dc3f6 | https://github.com/librato/metrics-librato/blob/10713643cf7d80e0f9741a7e1e81d1f6d68dc3f6/src/main/java/com/librato/metrics/reporter/DeltaTracker.java#L49-L52 |
109,660 | librato/metrics-librato | src/main/java/com/librato/metrics/reporter/DeltaTracker.java | DeltaTracker.getDelta | public Long getDelta(String name, long count) {
Long previous = lookup.put(name, count);
return calculateDelta(name, previous, count);
} | java | public Long getDelta(String name, long count) {
Long previous = lookup.put(name, count);
return calculateDelta(name, previous, count);
} | [
"public",
"Long",
"getDelta",
"(",
"String",
"name",
",",
"long",
"count",
")",
"{",
"Long",
"previous",
"=",
"lookup",
".",
"put",
"(",
"name",
",",
"count",
")",
";",
"return",
"calculateDelta",
"(",
"name",
",",
"previous",
",",
"count",
")",
";",
... | Calculates the delta. If this is a new value that has not been seen before, zero will be assumed to be the
initial value. Updates the internal map with the supplied count.
@param name the name of the counter
@param count the counter value
@return the delta | [
"Calculates",
"the",
"delta",
".",
"If",
"this",
"is",
"a",
"new",
"value",
"that",
"has",
"not",
"been",
"seen",
"before",
"zero",
"will",
"be",
"assumed",
"to",
"be",
"the",
"initial",
"value",
".",
"Updates",
"the",
"internal",
"map",
"with",
"the",
... | 10713643cf7d80e0f9741a7e1e81d1f6d68dc3f6 | https://github.com/librato/metrics-librato/blob/10713643cf7d80e0f9741a7e1e81d1f6d68dc3f6/src/main/java/com/librato/metrics/reporter/DeltaTracker.java#L62-L65 |
109,661 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/quality/QualityTrimmer.java | QualityTrimmer.extendRange | public static Range extendRange(SequenceQuality quality, QualityTrimmerParameters parameters, Range initialRange) {
int lower = pabs(trim(quality, 0, initialRange.getLower(), -1, false, parameters));
int upper = pabs(trim(quality, initialRange.getUpper(), quality.size(), +1, false, parameters)) + 1;
... | java | public static Range extendRange(SequenceQuality quality, QualityTrimmerParameters parameters, Range initialRange) {
int lower = pabs(trim(quality, 0, initialRange.getLower(), -1, false, parameters));
int upper = pabs(trim(quality, initialRange.getUpper(), quality.size(), +1, false, parameters)) + 1;
... | [
"public",
"static",
"Range",
"extendRange",
"(",
"SequenceQuality",
"quality",
",",
"QualityTrimmerParameters",
"parameters",
",",
"Range",
"initialRange",
")",
"{",
"int",
"lower",
"=",
"pabs",
"(",
"trim",
"(",
"quality",
",",
"0",
",",
"initialRange",
".",
... | Extend initialRange to the biggest possible range that fulfils the criteria of QualityTrimmer along the whole extended region.
The criteria may not be fulfilled for the initial range.
@param quality quality values
@param parameters trimming parameters
@param initialRange initial range to extend
@return | [
"Extend",
"initialRange",
"to",
"the",
"biggest",
"possible",
"range",
"that",
"fulfils",
"the",
"criteria",
"of",
"QualityTrimmer",
"along",
"the",
"whole",
"extended",
"region",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/quality/QualityTrimmer.java#L158-L162 |
109,662 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/quality/QualityTrimmer.java | QualityTrimmer.trim | public static Range trim(SequenceQuality quality, QualityTrimmerParameters parameters) {
return trim(quality, parameters, new Range(0, quality.size()));
} | java | public static Range trim(SequenceQuality quality, QualityTrimmerParameters parameters) {
return trim(quality, parameters, new Range(0, quality.size()));
} | [
"public",
"static",
"Range",
"trim",
"(",
"SequenceQuality",
"quality",
",",
"QualityTrimmerParameters",
"parameters",
")",
"{",
"return",
"trim",
"(",
"quality",
",",
"parameters",
",",
"new",
"Range",
"(",
"0",
",",
"quality",
".",
"size",
"(",
")",
")",
... | Trims the quality string by cutting off low quality nucleotides on both edges.
The criteria of QualityTrimmer may not be fulfilled for the resulting range. This method detects
beginning of the region with stably high quality, once the beginning of the region is detected the algorithm
stops. Detected stop positions are... | [
"Trims",
"the",
"quality",
"string",
"by",
"cutting",
"off",
"low",
"quality",
"nucleotides",
"on",
"both",
"edges",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/quality/QualityTrimmer.java#L175-L177 |
109,663 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/quality/QualityTrimmer.java | QualityTrimmer.trim | public static Range trim(SequenceQuality quality, QualityTrimmerParameters parameters, Range initialRange) {
int lower = pabs(trim(quality, initialRange.getLower(), initialRange.getUpper(), +1, true, parameters)) + 1;
assert lower >= initialRange.getLower();
if (lower == initialRange.getUpper())... | java | public static Range trim(SequenceQuality quality, QualityTrimmerParameters parameters, Range initialRange) {
int lower = pabs(trim(quality, initialRange.getLower(), initialRange.getUpper(), +1, true, parameters)) + 1;
assert lower >= initialRange.getLower();
if (lower == initialRange.getUpper())... | [
"public",
"static",
"Range",
"trim",
"(",
"SequenceQuality",
"quality",
",",
"QualityTrimmerParameters",
"parameters",
",",
"Range",
"initialRange",
")",
"{",
"int",
"lower",
"=",
"pabs",
"(",
"trim",
"(",
"quality",
",",
"initialRange",
".",
"getLower",
"(",
... | Trims the initialRange by cutting off low quality nucleotides on both edges.
The criteria of QualityTrimmer may not be fulfilled for the resulting range. This method detects
beginning of the region with stably high quality, once the beginning of the region is detected the algorithm
stops. Detected stop positions are "... | [
"Trims",
"the",
"initialRange",
"by",
"cutting",
"off",
"low",
"quality",
"nucleotides",
"on",
"both",
"edges",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/quality/QualityTrimmer.java#L191-L201 |
109,664 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/AminoAcidSequence.java | AminoAcidSequence.translate | public static AminoAcidSequence translate(NucleotideSequence sequence) {
if (sequence.size() % 3 != 0)
throw new IllegalArgumentException("Only nucleotide sequences with size multiple " +
"of three are supported (in-frame).");
byte[] aaData = new byte[sequence.size() / 3]... | java | public static AminoAcidSequence translate(NucleotideSequence sequence) {
if (sequence.size() % 3 != 0)
throw new IllegalArgumentException("Only nucleotide sequences with size multiple " +
"of three are supported (in-frame).");
byte[] aaData = new byte[sequence.size() / 3]... | [
"public",
"static",
"AminoAcidSequence",
"translate",
"(",
"NucleotideSequence",
"sequence",
")",
"{",
"if",
"(",
"sequence",
".",
"size",
"(",
")",
"%",
"3",
"!=",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Only nucleotide sequences with size mul... | Translates sequence having length divisible by 3, starting from first nucleotide.
@param sequence nucleotide sequence
@return translated amino acid sequence | [
"Translates",
"sequence",
"having",
"length",
"divisible",
"by",
"3",
"starting",
"from",
"first",
"nucleotide",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/AminoAcidSequence.java#L145-L152 |
109,665 | milaboratory/milib | src/main/java/com/milaboratory/cli/ACommand.java | ACommand.validate | public void validate() {
for (String in : getInputFiles()) {
if (!new File(in).exists())
throwValidationException("ERROR: input file \"" + in + "\" does not exist.", false);
validateInfo(in);
}
} | java | public void validate() {
for (String in : getInputFiles()) {
if (!new File(in).exists())
throwValidationException("ERROR: input file \"" + in + "\" does not exist.", false);
validateInfo(in);
}
} | [
"public",
"void",
"validate",
"(",
")",
"{",
"for",
"(",
"String",
"in",
":",
"getInputFiles",
"(",
")",
")",
"{",
"if",
"(",
"!",
"new",
"File",
"(",
"in",
")",
".",
"exists",
"(",
")",
")",
"throwValidationException",
"(",
"\"ERROR: input file \\\"\"",... | Validate injected parameters and options | [
"Validate",
"injected",
"parameters",
"and",
"options"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/cli/ACommand.java#L70-L76 |
109,666 | milaboratory/milib | src/main/java/com/milaboratory/primitivio/PrimitivIO.java | PrimitivIO.dummySerializer | public static <T> Serializer<T> dummySerializer() {
return new Serializer<T>() {
@Override
public void write(PrimitivO output, T object) {
throw new RuntimeException("Dummy serializer.");
}
@Override
public T read(PrimitivI input) {
... | java | public static <T> Serializer<T> dummySerializer() {
return new Serializer<T>() {
@Override
public void write(PrimitivO output, T object) {
throw new RuntimeException("Dummy serializer.");
}
@Override
public T read(PrimitivI input) {
... | [
"public",
"static",
"<",
"T",
">",
"Serializer",
"<",
"T",
">",
"dummySerializer",
"(",
")",
"{",
"return",
"new",
"Serializer",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"write",
"(",
"PrimitivO",
"output",
",",
"T",
"object",
... | Serializer that throws exception for any serialization. Use for known objects. | [
"Serializer",
"that",
"throws",
"exception",
"for",
"any",
"serialization",
".",
"Use",
"for",
"known",
"objects",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/primitivio/PrimitivIO.java#L25-L47 |
109,667 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/AffineGapAlignmentScoring.java | AffineGapAlignmentScoring.getNucleotideBLASTScoring | public static AffineGapAlignmentScoring<NucleotideSequence> getNucleotideBLASTScoring(int gapOpenPenalty, int gapExtensionPenalty) {
return new AffineGapAlignmentScoring<>(NucleotideSequence.ALPHABET, 5, -4, gapOpenPenalty, gapExtensionPenalty);
} | java | public static AffineGapAlignmentScoring<NucleotideSequence> getNucleotideBLASTScoring(int gapOpenPenalty, int gapExtensionPenalty) {
return new AffineGapAlignmentScoring<>(NucleotideSequence.ALPHABET, 5, -4, gapOpenPenalty, gapExtensionPenalty);
} | [
"public",
"static",
"AffineGapAlignmentScoring",
"<",
"NucleotideSequence",
">",
"getNucleotideBLASTScoring",
"(",
"int",
"gapOpenPenalty",
",",
"int",
"gapExtensionPenalty",
")",
"{",
"return",
"new",
"AffineGapAlignmentScoring",
"<>",
"(",
"NucleotideSequence",
".",
"AL... | Returns Nucleotide BLAST scoring
@param gapOpenPenalty penalty for opening gap to be used in system
@param gapExtensionPenalty penalty for extending gap to be used in system
@return Nucleotide BLAST scoring | [
"Returns",
"Nucleotide",
"BLAST",
"scoring"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/AffineGapAlignmentScoring.java#L200-L202 |
109,668 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/AffineGapAlignmentScoring.java | AffineGapAlignmentScoring.getAminoAcidBLASTScoring | public static AffineGapAlignmentScoring<AminoAcidSequence> getAminoAcidBLASTScoring(BLASTMatrix matrix, int gapOpenPenalty, int gapExtensionPenalty) {
return new AffineGapAlignmentScoring<>(AminoAcidSequence.ALPHABET,
matrix.getMatrix(),
gapOpenPenalty, gapExtensionPenalty);
... | java | public static AffineGapAlignmentScoring<AminoAcidSequence> getAminoAcidBLASTScoring(BLASTMatrix matrix, int gapOpenPenalty, int gapExtensionPenalty) {
return new AffineGapAlignmentScoring<>(AminoAcidSequence.ALPHABET,
matrix.getMatrix(),
gapOpenPenalty, gapExtensionPenalty);
... | [
"public",
"static",
"AffineGapAlignmentScoring",
"<",
"AminoAcidSequence",
">",
"getAminoAcidBLASTScoring",
"(",
"BLASTMatrix",
"matrix",
",",
"int",
"gapOpenPenalty",
",",
"int",
"gapExtensionPenalty",
")",
"{",
"return",
"new",
"AffineGapAlignmentScoring",
"<>",
"(",
... | Returns AminoAcid BLAST scoring
@param matrix BLAST substitution matrix to be used
@param gapOpenPenalty penalty for opening gap to be used in system
@param gapExtensionPenalty penalty for extending gap to be used in system
@return AminoAcid BLAST scoring | [
"Returns",
"AminoAcid",
"BLAST",
"scoring"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/AffineGapAlignmentScoring.java#L224-L228 |
109,669 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequencesUtils.java | SequencesUtils.belongsToAlphabet | public static boolean belongsToAlphabet(Alphabet<?> alphabet, String string) {
for (int i = 0; i < string.length(); ++i)
if (alphabet.symbolToCode(string.charAt(i)) == -1)
return false;
return true;
} | java | public static boolean belongsToAlphabet(Alphabet<?> alphabet, String string) {
for (int i = 0; i < string.length(); ++i)
if (alphabet.symbolToCode(string.charAt(i)) == -1)
return false;
return true;
} | [
"public",
"static",
"boolean",
"belongsToAlphabet",
"(",
"Alphabet",
"<",
"?",
">",
"alphabet",
",",
"String",
"string",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"string",
".",
"length",
"(",
")",
";",
"++",
"i",
")",
"if",
"(",
... | Check if a sequence contains letters only from specified alphabet. So in can be converted to corresponding type
of sequence.
@param alphabet alphabet
@param string string to check
@return {@literal true} if sequence belongs to alphabet, {@literal false} if does not | [
"Check",
"if",
"a",
"sequence",
"contains",
"letters",
"only",
"from",
"specified",
"alphabet",
".",
"So",
"in",
"can",
"be",
"converted",
"to",
"corresponding",
"type",
"of",
"sequence",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequencesUtils.java#L39-L44 |
109,670 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequencesUtils.java | SequencesUtils.possibleAlphabets | public static Set<Alphabet<?>> possibleAlphabets(String string) {
HashSet<Alphabet<?>> alphabets = new HashSet<>();
for (Alphabet alphabet : Alphabets.getAll()) {
if (belongsToAlphabet(alphabet, string))
alphabets.add(alphabet);
}
return alphabets;
} | java | public static Set<Alphabet<?>> possibleAlphabets(String string) {
HashSet<Alphabet<?>> alphabets = new HashSet<>();
for (Alphabet alphabet : Alphabets.getAll()) {
if (belongsToAlphabet(alphabet, string))
alphabets.add(alphabet);
}
return alphabets;
} | [
"public",
"static",
"Set",
"<",
"Alphabet",
"<",
"?",
">",
">",
"possibleAlphabets",
"(",
"String",
"string",
")",
"{",
"HashSet",
"<",
"Alphabet",
"<",
"?",
">",
">",
"alphabets",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
"(",
"Alphabet",
"... | Returns a set of possible alphabets for a given string.
<p>Looks for alphabets registered in {@link com.milaboratory.core.sequence.Alphabets}.</p>
@param string target string (sequence)
@return set of possible alphabets for a given string | [
"Returns",
"a",
"set",
"of",
"possible",
"alphabets",
"for",
"a",
"given",
"string",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequencesUtils.java#L54-L61 |
109,671 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequencesUtils.java | SequencesUtils.concatenate | public static <S extends Seq<S>> S concatenate(S... sequences) {
if (sequences.length == 0)
throw new IllegalArgumentException("Zero arguments");
if (sequences.length == 1)
return sequences[0];
int size = 0;
for (S s : sequences)
size += s.size();
... | java | public static <S extends Seq<S>> S concatenate(S... sequences) {
if (sequences.length == 0)
throw new IllegalArgumentException("Zero arguments");
if (sequences.length == 1)
return sequences[0];
int size = 0;
for (S s : sequences)
size += s.size();
... | [
"public",
"static",
"<",
"S",
"extends",
"Seq",
"<",
"S",
">",
">",
"S",
"concatenate",
"(",
"S",
"...",
"sequences",
")",
"{",
"if",
"(",
"sequences",
".",
"length",
"==",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Zero arguments\"",
... | Returns a concatenation of several sequences.
@param sequences array of sequences
@param <S> type of sequences
@return concatenation of several sequences | [
"Returns",
"a",
"concatenation",
"of",
"several",
"sequences",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequencesUtils.java#L94-L111 |
109,672 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequencesUtils.java | SequencesUtils.convertNSequenceToBit2Array | public static Bit2Array convertNSequenceToBit2Array(NucleotideSequence seq) {
if (seq.containWildcards())
throw new IllegalArgumentException("Sequences with wildcards are not supported.");
Bit2Array bar = new Bit2Array(seq.size());
for (int i = 0; i < seq.size(); i++)
bar... | java | public static Bit2Array convertNSequenceToBit2Array(NucleotideSequence seq) {
if (seq.containWildcards())
throw new IllegalArgumentException("Sequences with wildcards are not supported.");
Bit2Array bar = new Bit2Array(seq.size());
for (int i = 0; i < seq.size(); i++)
bar... | [
"public",
"static",
"Bit2Array",
"convertNSequenceToBit2Array",
"(",
"NucleotideSequence",
"seq",
")",
"{",
"if",
"(",
"seq",
".",
"containWildcards",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Sequences with wildcards are not supported.\"",
")",
... | Used to write legacy file formats.
@return Bit2Array representation of nucleotide sequence | [
"Used",
"to",
"write",
"legacy",
"file",
"formats",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequencesUtils.java#L144-L151 |
109,673 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequencesUtils.java | SequencesUtils.convertBit2ArrayToNSequence | public static NucleotideSequence convertBit2ArrayToNSequence(Bit2Array bar) {
SequenceBuilder<NucleotideSequence> seq = NucleotideSequence.ALPHABET.createBuilder().ensureCapacity(bar.size());
for (int i = 0; i < bar.size(); i++)
seq.append((byte) bar.get(i));
return seq.createAndDest... | java | public static NucleotideSequence convertBit2ArrayToNSequence(Bit2Array bar) {
SequenceBuilder<NucleotideSequence> seq = NucleotideSequence.ALPHABET.createBuilder().ensureCapacity(bar.size());
for (int i = 0; i < bar.size(); i++)
seq.append((byte) bar.get(i));
return seq.createAndDest... | [
"public",
"static",
"NucleotideSequence",
"convertBit2ArrayToNSequence",
"(",
"Bit2Array",
"bar",
")",
"{",
"SequenceBuilder",
"<",
"NucleotideSequence",
">",
"seq",
"=",
"NucleotideSequence",
".",
"ALPHABET",
".",
"createBuilder",
"(",
")",
".",
"ensureCapacity",
"("... | Used to read legacy file formats.
@return NucleotideSequence constructed from Bit2Array | [
"Used",
"to",
"read",
"legacy",
"file",
"formats",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequencesUtils.java#L158-L163 |
109,674 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/FileIndexBuilder.java | FileIndexBuilder.setStartingRecordNumber | public FileIndexBuilder setStartingRecordNumber(long recordNumber) {
checkIfDestroyed();
if (index.size() != 1)
throw new IllegalStateException("Initial record is already initialised to " + index.get(0));
startingRecordNumber = recordNumber;
return this;
} | java | public FileIndexBuilder setStartingRecordNumber(long recordNumber) {
checkIfDestroyed();
if (index.size() != 1)
throw new IllegalStateException("Initial record is already initialised to " + index.get(0));
startingRecordNumber = recordNumber;
return this;
} | [
"public",
"FileIndexBuilder",
"setStartingRecordNumber",
"(",
"long",
"recordNumber",
")",
"{",
"checkIfDestroyed",
"(",
")",
";",
"if",
"(",
"index",
".",
"size",
"(",
")",
"!=",
"1",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"Initial record is already... | Sets the starting record number to a specified one.
@param recordNumber starting record number
@return this | [
"Sets",
"the",
"starting",
"record",
"number",
"to",
"a",
"specified",
"one",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/FileIndexBuilder.java#L94-L100 |
109,675 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/FileIndexBuilder.java | FileIndexBuilder.putMetadata | public FileIndexBuilder putMetadata(String key, String value) {
checkIfDestroyed();
metadata.put(key, value);
return this;
} | java | public FileIndexBuilder putMetadata(String key, String value) {
checkIfDestroyed();
metadata.put(key, value);
return this;
} | [
"public",
"FileIndexBuilder",
"putMetadata",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"checkIfDestroyed",
"(",
")",
";",
"metadata",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Puts metadata.
@param key metadata key
@param value metadata value
@return this | [
"Puts",
"metadata",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/FileIndexBuilder.java#L109-L113 |
109,676 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/FileIndexBuilder.java | FileIndexBuilder.appendNextRecord | public FileIndexBuilder appendNextRecord(long recordSize) {
checkIfDestroyed();
if (recordSize < 0)
throw new IllegalArgumentException("Size cannot be negative.");
if (currentRecord == step) {
index.add(startingByte + currentByte);
currentRecord = 0;
}... | java | public FileIndexBuilder appendNextRecord(long recordSize) {
checkIfDestroyed();
if (recordSize < 0)
throw new IllegalArgumentException("Size cannot be negative.");
if (currentRecord == step) {
index.add(startingByte + currentByte);
currentRecord = 0;
}... | [
"public",
"FileIndexBuilder",
"appendNextRecord",
"(",
"long",
"recordSize",
")",
"{",
"checkIfDestroyed",
"(",
")",
";",
"if",
"(",
"recordSize",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Size cannot be negative.\"",
")",
";",
"if",
"(",
... | Appends next record to this index builder and returns this.
@param recordSize size of record measured in bytes
@return this | [
"Appends",
"next",
"record",
"to",
"this",
"index",
"builder",
"and",
"returns",
"this",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/FileIndexBuilder.java#L121-L132 |
109,677 | milaboratory/milib | src/main/java/com/milaboratory/core/io/util/IOUtil.java | IOUtil.computeRawVarint64Size | public static int computeRawVarint64Size(final long value) {
if ((value & (0xffffffffffffffffL << 7)) == 0) return 1;
if ((value & (0xffffffffffffffffL << 14)) == 0) return 2;
if ((value & (0xffffffffffffffffL << 21)) == 0) return 3;
if ((value & (0xffffffffffffffffL << 28)) == 0) return... | java | public static int computeRawVarint64Size(final long value) {
if ((value & (0xffffffffffffffffL << 7)) == 0) return 1;
if ((value & (0xffffffffffffffffL << 14)) == 0) return 2;
if ((value & (0xffffffffffffffffL << 21)) == 0) return 3;
if ((value & (0xffffffffffffffffL << 28)) == 0) return... | [
"public",
"static",
"int",
"computeRawVarint64Size",
"(",
"final",
"long",
"value",
")",
"{",
"if",
"(",
"(",
"value",
"&",
"(",
"0xffffffffffffffff",
"L",
"<<",
"7",
")",
")",
"==",
"0",
")",
"return",
"1",
";",
"if",
"(",
"(",
"value",
"&",
"(",
... | Compute the number of bytes that would be needed to encode a varint.
<p>Copied from com.google.protobuf.CodedOutputStream from Google's protobuf library.</p> | [
"Compute",
"the",
"number",
"of",
"bytes",
"that",
"would",
"be",
"needed",
"to",
"encode",
"a",
"varint",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/io/util/IOUtil.java#L132-L143 |
109,678 | milaboratory/milib | src/main/java/com/milaboratory/util/LightFileDescriptor.java | LightFileDescriptor.checkModified | public boolean checkModified(LightFileDescriptor other) {
if (isAlwaysModified() || other.isAlwaysModified())
return true;
if (!name.equals(other.name))
return true;
if (!(hasChecksum() && other.hasChecksum()) && !(hasModificationDate() && other.hasModificationDate()))
... | java | public boolean checkModified(LightFileDescriptor other) {
if (isAlwaysModified() || other.isAlwaysModified())
return true;
if (!name.equals(other.name))
return true;
if (!(hasChecksum() && other.hasChecksum()) && !(hasModificationDate() && other.hasModificationDate()))
... | [
"public",
"boolean",
"checkModified",
"(",
"LightFileDescriptor",
"other",
")",
"{",
"if",
"(",
"isAlwaysModified",
"(",
")",
"||",
"other",
".",
"isAlwaysModified",
"(",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"name",
".",
"equals",
"(",
"other",... | Returns true if file modified | [
"Returns",
"true",
"if",
"file",
"modified"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/util/LightFileDescriptor.java#L86-L104 |
109,679 | milaboratory/milib | src/main/java/com/milaboratory/util/LightFileDescriptor.java | LightFileDescriptor.toBase64 | public String toBase64() {
return name
+ (checksum == null ? "null" : Base64.getDecoder().decode(checksum))
+ (lastModified == null ? "null" : lastModified);
} | java | public String toBase64() {
return name
+ (checksum == null ? "null" : Base64.getDecoder().decode(checksum))
+ (lastModified == null ? "null" : lastModified);
} | [
"public",
"String",
"toBase64",
"(",
")",
"{",
"return",
"name",
"+",
"(",
"checksum",
"==",
"null",
"?",
"\"null\"",
":",
"Base64",
".",
"getDecoder",
"(",
")",
".",
"decode",
"(",
"checksum",
")",
")",
"+",
"(",
"lastModified",
"==",
"null",
"?",
"... | A string representation of this. | [
"A",
"string",
"representation",
"of",
"this",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/util/LightFileDescriptor.java#L200-L204 |
109,680 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequenceQuality.java | SequenceQuality.minValue | public byte minValue() {
if (data.length == 0)
return 0;
byte min = Byte.MAX_VALUE;
for (byte b : data)
if (b < min)
min = b;
return min;
} | java | public byte minValue() {
if (data.length == 0)
return 0;
byte min = Byte.MAX_VALUE;
for (byte b : data)
if (b < min)
min = b;
return min;
} | [
"public",
"byte",
"minValue",
"(",
")",
"{",
"if",
"(",
"data",
".",
"length",
"==",
"0",
")",
"return",
"0",
";",
"byte",
"min",
"=",
"Byte",
".",
"MAX_VALUE",
";",
"for",
"(",
"byte",
"b",
":",
"data",
")",
"if",
"(",
"b",
"<",
"min",
")",
... | Returns the worst sequence quality value
@return worst sequence quality value | [
"Returns",
"the",
"worst",
"sequence",
"quality",
"value"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceQuality.java#L149-L158 |
109,681 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequenceQuality.java | SequenceQuality.meanValue | public byte meanValue() {
if (data.length == 0)
return 0;
int sum = 0;
for (byte b : data)
sum += b;
return (byte) (sum / data.length);
} | java | public byte meanValue() {
if (data.length == 0)
return 0;
int sum = 0;
for (byte b : data)
sum += b;
return (byte) (sum / data.length);
} | [
"public",
"byte",
"meanValue",
"(",
")",
"{",
"if",
"(",
"data",
".",
"length",
"==",
"0",
")",
"return",
"0",
";",
"int",
"sum",
"=",
"0",
";",
"for",
"(",
"byte",
"b",
":",
"data",
")",
"sum",
"+=",
";",
"return",
"(",
"byte",
")",
"(",
"su... | Returns average sequence quality value
@return average sequence quality value | [
"Returns",
"average",
"sequence",
"quality",
"value"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceQuality.java#L165-L173 |
109,682 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequenceQuality.java | SequenceQuality.getRange | @Override
public SequenceQuality getRange(Range range) {
byte[] rdata = Arrays.copyOfRange(data, range.getLower(), range.getUpper());
if (range.isReverse())
ArraysUtils.reverse(rdata);
return new SequenceQuality(rdata, true);
} | java | @Override
public SequenceQuality getRange(Range range) {
byte[] rdata = Arrays.copyOfRange(data, range.getLower(), range.getUpper());
if (range.isReverse())
ArraysUtils.reverse(rdata);
return new SequenceQuality(rdata, true);
} | [
"@",
"Override",
"public",
"SequenceQuality",
"getRange",
"(",
"Range",
"range",
")",
"{",
"byte",
"[",
"]",
"rdata",
"=",
"Arrays",
".",
"copyOfRange",
"(",
"data",
",",
"range",
".",
"getLower",
"(",
")",
",",
"range",
".",
"getUpper",
"(",
")",
")",... | Returns substring of current quality scores line.
@param range range
@return substring of current quality scores line | [
"Returns",
"substring",
"of",
"current",
"quality",
"scores",
"line",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceQuality.java#L202-L208 |
109,683 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequenceQuality.java | SequenceQuality.encodeTo | public void encodeTo(QualityFormat format, byte[] buffer, int offset) {
byte vo = format.getOffset();
for (int i = 0; i < data.length; ++i)
buffer[offset++] = (byte) (data[i] + vo);
}
/**
* Encodes current quality line with given offset. Common values for offset are 33 and 64.
... | java | public void encodeTo(QualityFormat format, byte[] buffer, int offset) {
byte vo = format.getOffset();
for (int i = 0; i < data.length; ++i)
buffer[offset++] = (byte) (data[i] + vo);
}
/**
* Encodes current quality line with given offset. Common values for offset are 33 and 64.
... | [
"public",
"void",
"encodeTo",
"(",
"QualityFormat",
"format",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
")",
"{",
"byte",
"vo",
"=",
"format",
".",
"getOffset",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"data",
... | Encodes current quality line with given offset. Common values for offset are 33 and 64.
@param offset offset
@return bytes encoded quality values | [
"Encodes",
"current",
"quality",
"line",
"with",
"given",
"offset",
".",
"Common",
"values",
"for",
"offset",
"are",
"33",
"and",
"64",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceQuality.java#L246-L266 |
109,684 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/SequenceQuality.java | SequenceQuality.getUniformQuality | public static SequenceQuality getUniformQuality(byte qualityValue, int length) {
byte[] data = new byte[length];
Arrays.fill(data, qualityValue);
return new SequenceQuality(data, true);
} | java | public static SequenceQuality getUniformQuality(byte qualityValue, int length) {
byte[] data = new byte[length];
Arrays.fill(data, qualityValue);
return new SequenceQuality(data, true);
} | [
"public",
"static",
"SequenceQuality",
"getUniformQuality",
"(",
"byte",
"qualityValue",
",",
"int",
"length",
")",
"{",
"byte",
"[",
"]",
"data",
"=",
"new",
"byte",
"[",
"length",
"]",
";",
"Arrays",
".",
"fill",
"(",
"data",
",",
"qualityValue",
")",
... | Creates a phred sequence quality containing only given values of quality.
@param qualityValue value to fill the quality values with
@param length size of quality string | [
"Creates",
"a",
"phred",
"sequence",
"quality",
"containing",
"only",
"given",
"values",
"of",
"quality",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/SequenceQuality.java#L312-L316 |
109,685 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/BandedLinearAligner.java | BandedLinearAligner.alignLeftAdded | public static Alignment<NucleotideSequence> alignLeftAdded(LinearGapAlignmentScoring scoring, NucleotideSequence seq1, NucleotideSequence seq2,
int offset1, int length1, int addedNucleotides1, int offset2, int length2, int addedNucleotides2,
... | java | public static Alignment<NucleotideSequence> alignLeftAdded(LinearGapAlignmentScoring scoring, NucleotideSequence seq1, NucleotideSequence seq2,
int offset1, int length1, int addedNucleotides1, int offset2, int length2, int addedNucleotides2,
... | [
"public",
"static",
"Alignment",
"<",
"NucleotideSequence",
">",
"alignLeftAdded",
"(",
"LinearGapAlignmentScoring",
"scoring",
",",
"NucleotideSequence",
"seq1",
",",
"NucleotideSequence",
"seq2",
",",
"int",
"offset1",
",",
"int",
"length1",
",",
"int",
"addedNucleo... | Semi-semi-global alignment with artificially added letters.
<p>Alignment where second sequence is aligned to the left part of first sequence.</p>
<p>Whole second sequence must be highly similar to the first sequence, except last {@code width} letters, which
are to be checked whether they can improve alignment or not.... | [
"Semi",
"-",
"semi",
"-",
"global",
"alignment",
"with",
"artificially",
"added",
"letters",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/BandedLinearAligner.java#L596-L610 |
109,686 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/kaligner2/KAligner2.java | KAligner2.addReference | public int addReference(NucleotideSequence sequence) {
if (sequence.containWildcards())
throw new IllegalArgumentException("Reference sequences with wildcards not supported.");
int id = mapper.addReference(sequence);
assert sequences.size() == id;
sequences.add(sequence);
... | java | public int addReference(NucleotideSequence sequence) {
if (sequence.containWildcards())
throw new IllegalArgumentException("Reference sequences with wildcards not supported.");
int id = mapper.addReference(sequence);
assert sequences.size() == id;
sequences.add(sequence);
... | [
"public",
"int",
"addReference",
"(",
"NucleotideSequence",
"sequence",
")",
"{",
"if",
"(",
"sequence",
".",
"containWildcards",
"(",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Reference sequences with wildcards not supported.\"",
")",
";",
"int",
... | Adds new reference sequence to the base of this mapper and returns index assigned to it.
@param sequence sequence
@return index assigned to the sequence | [
"Adds",
"new",
"reference",
"sequence",
"to",
"the",
"base",
"of",
"this",
"mapper",
"and",
"returns",
"index",
"assigned",
"to",
"it",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/kaligner2/KAligner2.java#L63-L70 |
109,687 | milaboratory/milib | src/main/java/com/milaboratory/core/motif/Motif.java | Motif.or | public Motif<S> or(Motif<S> other) {
if (other.size != size)
throw new IllegalArgumentException("Supports only motifs with the same size as this.");
BitArray result = data.clone();
result.or(other.data);
return new Motif<>(alphabet, size, result);
} | java | public Motif<S> or(Motif<S> other) {
if (other.size != size)
throw new IllegalArgumentException("Supports only motifs with the same size as this.");
BitArray result = data.clone();
result.or(other.data);
return new Motif<>(alphabet, size, result);
} | [
"public",
"Motif",
"<",
"S",
">",
"or",
"(",
"Motif",
"<",
"S",
">",
"other",
")",
"{",
"if",
"(",
"other",
".",
"size",
"!=",
"size",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Supports only motifs with the same size as this.\"",
")",
";",
"Bi... | Returns per-position or of two motifs.
<p>e.g. ATGC or TTCC = WTSC</p>
@param other
@return | [
"Returns",
"per",
"-",
"position",
"or",
"of",
"two",
"motifs",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/motif/Motif.java#L74-L82 |
109,688 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/BandedAligner.java | BandedAligner.alignGlobal | public static Alignment<NucleotideSequence> alignGlobal(final AlignmentScoring<NucleotideSequence> scoring,
final NucleotideSequence seq1, final NucleotideSequence seq2,
final int offset1, final int l... | java | public static Alignment<NucleotideSequence> alignGlobal(final AlignmentScoring<NucleotideSequence> scoring,
final NucleotideSequence seq1, final NucleotideSequence seq2,
final int offset1, final int l... | [
"public",
"static",
"Alignment",
"<",
"NucleotideSequence",
">",
"alignGlobal",
"(",
"final",
"AlignmentScoring",
"<",
"NucleotideSequence",
">",
"scoring",
",",
"final",
"NucleotideSequence",
"seq1",
",",
"final",
"NucleotideSequence",
"seq2",
",",
"final",
"int",
... | Classical Banded Alignment.
Both sequences must be highly similar.
Align 2 sequence completely (i.e. while first sequence will be aligned against whole second sequence).
@param scoring scoring system
@param seq1 first sequence
@param seq2 second sequence
@param offset1 offset in first sequence
@param length1 l... | [
"Classical",
"Banded",
"Alignment",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/BandedAligner.java#L27-L36 |
109,689 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Aligner.java | Aligner.alignGlobal | public static <S extends Sequence<S>> Alignment<S> alignGlobal(AlignmentScoring<S> alignmentScoring,
S seq1, S seq2) {
if (alignmentScoring instanceof AffineGapAlignmentScoring)
return alignGlobalAffine((AffineGapAlignmentScoring<S>)... | java | public static <S extends Sequence<S>> Alignment<S> alignGlobal(AlignmentScoring<S> alignmentScoring,
S seq1, S seq2) {
if (alignmentScoring instanceof AffineGapAlignmentScoring)
return alignGlobalAffine((AffineGapAlignmentScoring<S>)... | [
"public",
"static",
"<",
"S",
"extends",
"Sequence",
"<",
"S",
">",
">",
"Alignment",
"<",
"S",
">",
"alignGlobal",
"(",
"AlignmentScoring",
"<",
"S",
">",
"alignmentScoring",
",",
"S",
"seq1",
",",
"S",
"seq2",
")",
"{",
"if",
"(",
"alignmentScoring",
... | Performs global alignment
@param alignmentScoring scoring system
@param seq1 first sequence
@param seq2 second sequence
@return array of mutations | [
"Performs",
"global",
"alignment"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Aligner.java#L91-L98 |
109,690 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/Aligner.java | Aligner.alignLocal | public static <S extends Sequence<S>> Alignment<S> alignLocal(AlignmentScoring<S> alignmentScoring,
S seq1, S seq2) {
if (alignmentScoring instanceof AffineGapAlignmentScoring)
return alignLocalAffine((AffineGapAlignmentScoring<S>) al... | java | public static <S extends Sequence<S>> Alignment<S> alignLocal(AlignmentScoring<S> alignmentScoring,
S seq1, S seq2) {
if (alignmentScoring instanceof AffineGapAlignmentScoring)
return alignLocalAffine((AffineGapAlignmentScoring<S>) al... | [
"public",
"static",
"<",
"S",
"extends",
"Sequence",
"<",
"S",
">",
">",
"Alignment",
"<",
"S",
">",
"alignLocal",
"(",
"AlignmentScoring",
"<",
"S",
">",
"alignmentScoring",
",",
"S",
"seq1",
",",
"S",
"seq2",
")",
"{",
"if",
"(",
"alignmentScoring",
... | Performs local alignment
@param alignmentScoring scoring system
@param seq1 first sequence
@param seq2 second sequence
@return result of alignment with information about alignment positions in both sequences and array of mutations | [
"Performs",
"local",
"alignment"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Aligner.java#L331-L338 |
109,691 | milaboratory/milib | src/main/java/com/milaboratory/core/clustering/Cluster.java | Cluster.processAllChildren | public void processAllChildren(TObjectProcedure<Cluster<T>> procedure) {
if (children == null)
return;
for (Cluster<T> child : children) {
procedure.execute(child);
child.processAllChildren(procedure);
}
} | java | public void processAllChildren(TObjectProcedure<Cluster<T>> procedure) {
if (children == null)
return;
for (Cluster<T> child : children) {
procedure.execute(child);
child.processAllChildren(procedure);
}
} | [
"public",
"void",
"processAllChildren",
"(",
"TObjectProcedure",
"<",
"Cluster",
"<",
"T",
">",
">",
"procedure",
")",
"{",
"if",
"(",
"children",
"==",
"null",
")",
"return",
";",
"for",
"(",
"Cluster",
"<",
"T",
">",
"child",
":",
"children",
")",
"{... | do not process this cluster | [
"do",
"not",
"process",
"this",
"cluster"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/clustering/Cluster.java#L73-L80 |
109,692 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/Alphabet.java | Alphabet.getEmptySequence | public S getEmptySequence() {
if (empty == null)
synchronized (this) {
if (empty == null)
empty = createBuilder().createAndDestroy();
}
return empty;
} | java | public S getEmptySequence() {
if (empty == null)
synchronized (this) {
if (empty == null)
empty = createBuilder().createAndDestroy();
}
return empty;
} | [
"public",
"S",
"getEmptySequence",
"(",
")",
"{",
"if",
"(",
"empty",
"==",
"null",
")",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"empty",
"==",
"null",
")",
"empty",
"=",
"createBuilder",
"(",
")",
".",
"createAndDestroy",
"(",
")",
";",
"}... | Returns empty sequence singleton
@return empty sequence singleton | [
"Returns",
"empty",
"sequence",
"singleton"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/Alphabet.java#L280-L287 |
109,693 | milaboratory/milib | src/main/java/com/milaboratory/core/sequence/Alphabet.java | Alphabet.parse | public final S parse(String string) {
SequenceBuilder<S> builder = createBuilder().ensureCapacity(string.length());
for (int i = 0; i < string.length(); ++i) {
byte code = symbolToCode(string.charAt(i));
if (code == -1)
throw new IllegalArgumentException("Letter \... | java | public final S parse(String string) {
SequenceBuilder<S> builder = createBuilder().ensureCapacity(string.length());
for (int i = 0; i < string.length(); ++i) {
byte code = symbolToCode(string.charAt(i));
if (code == -1)
throw new IllegalArgumentException("Letter \... | [
"public",
"final",
"S",
"parse",
"(",
"String",
"string",
")",
"{",
"SequenceBuilder",
"<",
"S",
">",
"builder",
"=",
"createBuilder",
"(",
")",
".",
"ensureCapacity",
"(",
"string",
".",
"length",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0"... | Parses string representation of sequence.
@param string string representation of sequence
@return sequence | [
"Parses",
"string",
"representation",
"of",
"sequence",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/sequence/Alphabet.java#L317-L326 |
109,694 | milaboratory/milib | src/main/java/com/milaboratory/cli/PipelineConfiguration.java | PipelineConfiguration.compatibleWith | public boolean compatibleWith(PipelineConfiguration oth) {
if (oth == null)
return false;
if (pipelineSteps.length != oth.pipelineSteps.length)
return false;
for (int i = 0; i < pipelineSteps.length; ++i)
if (!pipelineSteps[i].compatibleWith(oth.pipelineSteps[... | java | public boolean compatibleWith(PipelineConfiguration oth) {
if (oth == null)
return false;
if (pipelineSteps.length != oth.pipelineSteps.length)
return false;
for (int i = 0; i < pipelineSteps.length; ++i)
if (!pipelineSteps[i].compatibleWith(oth.pipelineSteps[... | [
"public",
"boolean",
"compatibleWith",
"(",
"PipelineConfiguration",
"oth",
")",
"{",
"if",
"(",
"oth",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"pipelineSteps",
".",
"length",
"!=",
"oth",
".",
"pipelineSteps",
".",
"length",
")",
"return",
"... | Whether configurations are fully compatible | [
"Whether",
"configurations",
"are",
"fully",
"compatible"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/cli/PipelineConfiguration.java#L54-L63 |
109,695 | milaboratory/milib | src/main/java/com/milaboratory/cli/PipelineConfiguration.java | PipelineConfiguration.appendStep | public static PipelineConfiguration
appendStep(PipelineConfiguration history,
List<String> inputFiles,
ActionConfiguration configuration,
AppVersionInfo versionInfo) {
LightFileDescriptor[] inputDescriptors = inputFiles
.stream()
... | java | public static PipelineConfiguration
appendStep(PipelineConfiguration history,
List<String> inputFiles,
ActionConfiguration configuration,
AppVersionInfo versionInfo) {
LightFileDescriptor[] inputDescriptors = inputFiles
.stream()
... | [
"public",
"static",
"PipelineConfiguration",
"appendStep",
"(",
"PipelineConfiguration",
"history",
",",
"List",
"<",
"String",
">",
"inputFiles",
",",
"ActionConfiguration",
"configuration",
",",
"AppVersionInfo",
"versionInfo",
")",
"{",
"LightFileDescriptor",
"[",
"]... | Appends a new pipeline step | [
"Appends",
"a",
"new",
"pipeline",
"step"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/cli/PipelineConfiguration.java#L79-L95 |
109,696 | milaboratory/milib | src/main/java/com/milaboratory/cli/PipelineConfiguration.java | PipelineConfiguration.mkInitial | public static PipelineConfiguration
mkInitial(List<String> inputFiles,
ActionConfiguration configuration,
AppVersionInfo versionInfo) {
LightFileDescriptor[] inputDescriptors = inputFiles.stream()
.map(f -> LightFileDescriptor.calculate(Paths.get(f))).toArray(Ligh... | java | public static PipelineConfiguration
mkInitial(List<String> inputFiles,
ActionConfiguration configuration,
AppVersionInfo versionInfo) {
LightFileDescriptor[] inputDescriptors = inputFiles.stream()
.map(f -> LightFileDescriptor.calculate(Paths.get(f))).toArray(Ligh... | [
"public",
"static",
"PipelineConfiguration",
"mkInitial",
"(",
"List",
"<",
"String",
">",
"inputFiles",
",",
"ActionConfiguration",
"configuration",
",",
"AppVersionInfo",
"versionInfo",
")",
"{",
"LightFileDescriptor",
"[",
"]",
"inputDescriptors",
"=",
"inputFiles",
... | Creates initial history | [
"Creates",
"initial",
"history"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/cli/PipelineConfiguration.java#L98-L106 |
109,697 | milaboratory/milib | src/main/java/com/milaboratory/core/alignment/AlignmentUtils.java | AlignmentUtils.shiftIndelsAtHomopolymers | public static <S extends Sequence<S>> Alignment<S> shiftIndelsAtHomopolymers(Alignment<S> alignment) {
return new Alignment<>(alignment.sequence1,
MutationsUtil.shiftIndelsAtHomopolymers(alignment.sequence1, alignment.sequence1Range.getFrom(), alignment.mutations),
alignment.sequ... | java | public static <S extends Sequence<S>> Alignment<S> shiftIndelsAtHomopolymers(Alignment<S> alignment) {
return new Alignment<>(alignment.sequence1,
MutationsUtil.shiftIndelsAtHomopolymers(alignment.sequence1, alignment.sequence1Range.getFrom(), alignment.mutations),
alignment.sequ... | [
"public",
"static",
"<",
"S",
"extends",
"Sequence",
"<",
"S",
">",
">",
"Alignment",
"<",
"S",
">",
"shiftIndelsAtHomopolymers",
"(",
"Alignment",
"<",
"S",
">",
"alignment",
")",
"{",
"return",
"new",
"Alignment",
"<>",
"(",
"alignment",
".",
"sequence1"... | Shifts indels to the left at homopolymer regions | [
"Shifts",
"indels",
"to",
"the",
"left",
"at",
"homopolymer",
"regions"
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/AlignmentUtils.java#L164-L168 |
109,698 | milaboratory/milib | src/main/java/com/milaboratory/core/mutations/MutationsUtil.java | MutationsUtil.btopDecode | public static int[] btopDecode(String alignment, Alphabet alphabet) {
Matcher matcher = btopPattern.matcher(alignment);
IntArrayList mutations = new IntArrayList();
int sPosition = 0;
while (matcher.find()) {
String g = matcher.group();
if (isPositiveInteger(g))
... | java | public static int[] btopDecode(String alignment, Alphabet alphabet) {
Matcher matcher = btopPattern.matcher(alignment);
IntArrayList mutations = new IntArrayList();
int sPosition = 0;
while (matcher.find()) {
String g = matcher.group();
if (isPositiveInteger(g))
... | [
"public",
"static",
"int",
"[",
"]",
"btopDecode",
"(",
"String",
"alignment",
",",
"Alphabet",
"alphabet",
")",
"{",
"Matcher",
"matcher",
"=",
"btopPattern",
".",
"matcher",
"(",
"alignment",
")",
";",
"IntArrayList",
"mutations",
"=",
"new",
"IntArrayList",... | Decodes btop-encoded mutations.
@param alignment btop-encoded mutations
@return MiLib mutations | [
"Decodes",
"btop",
"-",
"encoded",
"mutations",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/MutationsUtil.java#L339-L358 |
109,699 | milaboratory/milib | src/main/java/com/milaboratory/core/mutations/MutationsUtil.java | MutationsUtil.nt2aaDetailed | public static MutationNt2AADescriptor[] nt2aaDetailed(NucleotideSequence seq1, Mutations<NucleotideSequence> mutations,
TranslationParameters translationParameters,
int maxShiftedTriplets) {
Mutat... | java | public static MutationNt2AADescriptor[] nt2aaDetailed(NucleotideSequence seq1, Mutations<NucleotideSequence> mutations,
TranslationParameters translationParameters,
int maxShiftedTriplets) {
Mutat... | [
"public",
"static",
"MutationNt2AADescriptor",
"[",
"]",
"nt2aaDetailed",
"(",
"NucleotideSequence",
"seq1",
",",
"Mutations",
"<",
"NucleotideSequence",
">",
"mutations",
",",
"TranslationParameters",
"translationParameters",
",",
"int",
"maxShiftedTriplets",
")",
"{",
... | Performs a comprehensive translation of mutations present in a nucleotide sequence to effective mutations in
corresponding amino acid sequence.
<p>The resulting array contains:</p>
<ul> <li>the original nucleotide mutation</li> <li>"individual" amino acid mutation, i.e. an expected amino acid
mutation given no other ... | [
"Performs",
"a",
"comprehensive",
"translation",
"of",
"mutations",
"present",
"in",
"a",
"nucleotide",
"sequence",
"to",
"effective",
"mutations",
"in",
"corresponding",
"amino",
"acid",
"sequence",
"."
] | 2349b3dccdd3c7948643760e570238d6e30d5a34 | https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/mutations/MutationsUtil.java#L517-L529 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.