method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/I_R_Group.java", "license": "gpl-2.0", "size": 5529 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,653,348
public CQLSSTableWriter rawAddRow(ByteBuffer... values) throws InvalidRequestException, IOException { return rawAddRow(Arrays.asList(values)); }
CQLSSTableWriter function(ByteBuffer... values) throws InvalidRequestException, IOException { return rawAddRow(Arrays.asList(values)); }
/** * Adds a new row to the writer given already serialized values. * * @param values the row values (corresponding to the bind variables of the * insertion statement used when creating by this writer) as binary. * @return this writer. */
Adds a new row to the writer given already serialized values
rawAddRow
{ "repo_name": "sharvanath/cassandra", "path": "src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java", "license": "apache-2.0", "size": 24863 }
[ "java.io.IOException", "java.nio.ByteBuffer", "java.util.Arrays", "org.apache.cassandra.exceptions.InvalidRequestException" ]
import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; import org.apache.cassandra.exceptions.InvalidRequestException;
import java.io.*; import java.nio.*; import java.util.*; import org.apache.cassandra.exceptions.*;
[ "java.io", "java.nio", "java.util", "org.apache.cassandra" ]
java.io; java.nio; java.util; org.apache.cassandra;
799,374
public Promise<Void> recycleAndGet() { Promise<Void> promise = this.promise; recycle(); return promise; }
Promise<Void> function() { Promise<Void> promise = this.promise; recycle(); return promise; }
/** * Recycle this instance and return the {@link Promise}. */
Recycle this instance and return the <code>Promise</code>
recycleAndGet
{ "repo_name": "NiteshKant/netty", "path": "common/src/main/java/io/netty/util/internal/PendingWrite.java", "license": "apache-2.0", "size": 2814 }
[ "io.netty.util.concurrent.Promise" ]
import io.netty.util.concurrent.Promise;
import io.netty.util.concurrent.*;
[ "io.netty.util" ]
io.netty.util;
249,515
public Formatter getShortFormatter() { return new NumberFormatter(6, 0); }
Formatter function() { return new NumberFormatter(6, 0); }
/** * Returns a formatter to format a short * * @return a new formatter. */
Returns a formatter to format a short
getShortFormatter
{ "repo_name": "scgray/jsqsh", "path": "jsqsh-core/src/main/java/org/sqsh/DataFormatter.java", "license": "apache-2.0", "size": 14248 }
[ "org.sqsh.format.NumberFormatter" ]
import org.sqsh.format.NumberFormatter;
import org.sqsh.format.*;
[ "org.sqsh.format" ]
org.sqsh.format;
1,289,030
public final void setTextShadowColor(IsColor color) { setTextShadowColor(IsColor.checkAndGetValue(color)); }
final void function(IsColor color) { setTextShadowColor(IsColor.checkAndGetValue(color)); }
/** * Sets the text shadow color color. * * @param color the text shadow color color */
Sets the text shadow color color
setTextShadowColor
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/datalabels/LabelItem.java", "license": "apache-2.0", "size": 61828 }
[ "org.pepstock.charba.client.colors.IsColor" ]
import org.pepstock.charba.client.colors.IsColor;
import org.pepstock.charba.client.colors.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
429,124
public void changeName(String name, IWContext iwc) { CachedBuilderPage xml = getCurrentCachedBuilderPage(iwc); if (xml != null) { if (!xml.getName().equals(name)) { xml.setName(name); Map<Integer, PageTreeNode> tree = PageTreeNode.getTree(iwc); if (tree != null) { String currentId = getCurren...
void function(String name, IWContext iwc) { CachedBuilderPage xml = getCurrentCachedBuilderPage(iwc); if (xml != null) { if (!xml.getName().equals(name)) { xml.setName(name); Map<Integer, PageTreeNode> tree = PageTreeNode.getTree(iwc); if (tree != null) { String currentId = getCurrentIBPage(iwc); if (currentId != null)...
/** * Changes the name of the current page. * * @param name * The new name for the page * @param iwc * The IdegeWeb Context object */
Changes the name of the current page
changeName
{ "repo_name": "idega/com.idega.builder", "path": "src/java/com/idega/builder/business/BuilderLogic.java", "license": "gpl-3.0", "size": 145872 }
[ "com.idega.presentation.IWContext", "java.util.Map" ]
import com.idega.presentation.IWContext; import java.util.Map;
import com.idega.presentation.*; import java.util.*;
[ "com.idega.presentation", "java.util" ]
com.idega.presentation; java.util;
703,968
TableName getName();
TableName getName();
/** * Gets the fully qualified table name instance of the table whose region we want to locate. */
Gets the fully qualified table name instance of the table whose region we want to locate
getName
{ "repo_name": "mahak/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableRegionLocator.java", "license": "apache-2.0", "size": 5955 }
[ "org.apache.hadoop.hbase.TableName" ]
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,921,417
private Message forkliftToJms(forklift.message.ActiveMQMessage message) throws ProducerException { try { Message msg = null; if (message.getMsg() != null) { try { msg = session.createTextMessage(message.getMsg()); } catch (Exceptio...
Message function(forklift.message.ActiveMQMessage message) throws ProducerException { try { Message msg = null; if (message.getMsg() != null) { try { msg = session.createTextMessage(message.getMsg()); } catch (Exception e) { throw new ProducerException(STR, e); } } setMessageProperties(msg, message.getProperties()); re...
/** * Generate javax.jms.Message from a Forklift Message * * @param message - Forklift message to be converted * @return - a new javax.jms.Message **/
Generate javax.jms.Message from a Forklift Message
forkliftToJms
{ "repo_name": "dcshock/forklift-kafka", "path": "connectors/activemq/src/main/java/forklift/producers/ActiveMQProducer.java", "license": "mit", "size": 9414 }
[ "javax.jms.Message" ]
import javax.jms.Message;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
2,114,804
public ArrayList<BoardSuggestedValue> getRowSuggestedValues(final UUID project) { final UUID locationId = UUID.fromString("bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9"); //$NON-NLS-1$ final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-preview.1"); //$NON-NLS-1$ final Map<String, O...
ArrayList<BoardSuggestedValue> function(final UUID project) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, project); final VssRestRequest httpRequest = super.cr...
/** * [Preview API 3.1-preview.1] * * @param project * Project ID * @return ArrayList&lt;BoardSuggestedValue&gt; */
[Preview API 3.1-preview.1]
getRowSuggestedValues
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/work/webapi/WorkHttpClientBase.java", "license": "mit", "size": 234377 }
[ "com.fasterxml.jackson.core.type.TypeReference", "com.microsoft.alm.client.HttpMethod", "com.microsoft.alm.client.VssMediaTypes", "com.microsoft.alm.client.VssRestRequest", "com.microsoft.alm.teamfoundation.work.webapi.BoardSuggestedValue", "com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersio...
import com.fasterxml.jackson.core.type.TypeReference; import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.work.webapi.BoardSuggestedValue; import com.microsoft.alm.visualstudio.services.webapi....
import com.fasterxml.jackson.core.type.*; import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.work.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*;
[ "com.fasterxml.jackson", "com.microsoft.alm", "java.util" ]
com.fasterxml.jackson; com.microsoft.alm; java.util;
880,747
public TypeInformation<IN2> getInputType2() { return input2.getOutputType(); }
TypeInformation<IN2> function() { return input2.getOutputType(); }
/** * Returns the {@code TypeInformation} for the elements from the second input. */
Returns the TypeInformation for the elements from the second input
getInputType2
{ "repo_name": "bowenli86/flink", "path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/TwoInputTransformation.java", "license": "apache-2.0", "size": 6185 }
[ "org.apache.flink.api.common.typeinfo.TypeInformation" ]
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.common.typeinfo.*;
[ "org.apache.flink" ]
org.apache.flink;
758,463
public Contextual<?> getBean(Object beanKey) { if (passivationCapable) { return beanManager.getPassivationCapableBean((String) beanKey); } else { return (Contextual<?>) beanKey; } }
Contextual<?> function(Object beanKey) { if (passivationCapable) { return beanManager.getPassivationCapableBean((String) beanKey); } else { return (Contextual<?>) beanKey; } }
/** * Restores the Bean from its beanKey. * @see #getBeanKey(javax.enterprise.context.spi.Contextual) */
Restores the Bean from its beanKey
getBean
{ "repo_name": "LightGuard/incubator-deltaspike", "path": "deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/context/ContextualStorage.java", "license": "apache-2.0", "size": 5416 }
[ "javax.enterprise.context.spi.Contextual" ]
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.*;
[ "javax.enterprise" ]
javax.enterprise;
1,592,163
private void unparkSuccessor(Node node) { int ws = node.waitStatus; if (ws < 0) node.compareAndSetWaitStatus(ws, 0); Node s = node.next; if (s == null || s.waitStatus > 0) { s = null; for (Node p = tail; p != node && p != null; p...
void function(Node node) { int ws = node.waitStatus; if (ws < 0) node.compareAndSetWaitStatus(ws, 0); Node s = node.next; if (s == null s.waitStatus > 0) { s = null; for (Node p = tail; p != node && p != null; p = p.prev) if (p.waitStatus <= 0) s = p; } if (s != null) LockSupport.unpark(s.thread); }
/** * Wakes up node's successor, if one exists. * * @param node the node */
Wakes up node's successor, if one exists
unparkSuccessor
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java", "license": "apache-2.0", "size": 71570 }
[ "java.util.concurrent.locks.AbstractQueuedSynchronizer" ]
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
1,026,603
public ReferenceData getReferenceData() { return refData; }
ReferenceData function() { return refData; }
/** * Gets the reference data. * <p> * Use of reference data is not necessary to parse most FpML documents. * It is only needed to handle some edge cases, notably around relative dates. * * @return the reference data */
Gets the reference data. Use of reference data is not necessary to parse most FpML documents. It is only needed to handle some edge cases, notably around relative dates
getReferenceData
{ "repo_name": "ChinaQuants/Strata", "path": "modules/loader/src/main/java/com/opengamma/strata/loader/fpml/FpmlDocument.java", "license": "apache-2.0", "size": 35318 }
[ "com.opengamma.strata.basics.ReferenceData" ]
import com.opengamma.strata.basics.ReferenceData;
import com.opengamma.strata.basics.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
1,501,351
protected void updateBusinessObjectDataStatusImpl(BusinessObjectDataKey businessObjectDataKey, String businessObjectDataStatus) { businessObjectDataHelper.updateBusinessObjectDataStatus(herdDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey), businessObjectDataStatus); }
void function(BusinessObjectDataKey businessObjectDataKey, String businessObjectDataStatus) { businessObjectDataHelper.updateBusinessObjectDataStatus(herdDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey), businessObjectDataStatus); }
/** * Implementation of the update business object data status. */
Implementation of the update business object data status
updateBusinessObjectDataStatusImpl
{ "repo_name": "seoj/herd", "path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/UploadDownloadHelperServiceImpl.java", "license": "apache-2.0", "size": 8847 }
[ "org.finra.herd.model.api.xml.BusinessObjectDataKey" ]
import org.finra.herd.model.api.xml.BusinessObjectDataKey;
import org.finra.herd.model.api.xml.*;
[ "org.finra.herd" ]
org.finra.herd;
245,913
private void unregisterMBean() { assert !U.IGNITE_MBEANS_DISABLED; String name = getClass().getSimpleName(); try { ObjectName objName = U.makeMBeanName(ctx.config().getIgniteInstanceName(), "Clients", name); ctx.config().getMBeanServer().unregisterMBean(objName); ...
void function() { assert !U.IGNITE_MBEANS_DISABLED; String name = getClass().getSimpleName(); try { ObjectName objName = U.makeMBeanName(ctx.config().getIgniteInstanceName(), STR, name); ctx.config().getMBeanServer().unregisterMBean(objName); if (log.isDebugEnabled()) log.debug(STR + objName); } catch (JMException e) {...
/** * Unregisters given MBean. */
Unregisters given MBean
unregisterMBean
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerProcessor.java", "license": "apache-2.0", "size": 22980 }
[ "javax.management.JMException", "javax.management.ObjectName", "org.apache.ignite.internal.util.typedef.internal.U" ]
import javax.management.JMException; import javax.management.ObjectName; import org.apache.ignite.internal.util.typedef.internal.U;
import javax.management.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "javax.management", "org.apache.ignite" ]
javax.management; org.apache.ignite;
995,169
protected void postProcessAnnotationConfiguration(AnnotationConfiguration config) throws HibernateException { }
void function(AnnotationConfiguration config) throws HibernateException { }
/** * To be implemented by subclasses that want to to perform custom * post-processing of the AnnotationConfiguration object after this * FactoryBean performed its default initialization. * @param config the current AnnotationConfiguration object * @throws HibernateException in case of Hibernate initiali...
To be implemented by subclasses that want to to perform custom post-processing of the AnnotationConfiguration object after this FactoryBean performed its default initialization
postProcessAnnotationConfiguration
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/tiger/src/org/springframework/orm/hibernate3/annotation/AnnotationSessionFactoryBean.java", "license": "unlicense", "size": 9286 }
[ "org.hibernate.HibernateException", "org.hibernate.cfg.AnnotationConfiguration" ]
import org.hibernate.HibernateException; import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.*; import org.hibernate.cfg.*;
[ "org.hibernate", "org.hibernate.cfg" ]
org.hibernate; org.hibernate.cfg;
1,837,201
public Path getDefaultEventLogsDirectory() { return getDirectoryApplicationRoot().resolve(DIRECTORY_EVENT_LOG); }
Path function() { return getDirectoryApplicationRoot().resolve(DIRECTORY_EVENT_LOG); }
/** * Default event logs directory */
Default event logs directory
getDefaultEventLogsDirectory
{ "repo_name": "ImagoTrigger/sdrtrunk", "path": "src/main/java/io/github/dsheirer/preference/directory/DirectoryPreference.java", "license": "gpl-3.0", "size": 13916 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
340,709
private void actionTypesDeleteTest(String type) throws SQLException, IOException { int jdbcType = DatabaseMetaDataTest.getJDBCType(type); int precision = DatabaseMetaDataTest.getPrecision(jdbcType, type); // BUG DERBY-2349 - need insert case to work first if (jdbcType ==...
void function(String type) throws SQLException, IOException { int jdbcType = DatabaseMetaDataTest.getJDBCType(type); int precision = DatabaseMetaDataTest.getPrecision(jdbcType, type); if (jdbcType == Types.BLOB) return; Statement s = createStatement(); assertUpdateCount(s, 1, STR); commit(); assertUpdateCount(s, 4, STR...
/** * Test deletes with the specified types in the action statement. * @param type * @throws SQLException * @throws IOException */
Test deletes with the specified types in the action statement
actionTypesDeleteTest
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/TriggerTest.java", "license": "agpl-3.0", "size": 61557 }
[ "com.splicemachine.dbTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest", "java.io.IOException", "java.sql.SQLException", "java.sql.Statement", "java.sql.Types" ]
import com.splicemachine.dbTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest; import java.io.IOException; import java.sql.SQLException; import java.sql.Statement; import java.sql.Types;
import com.splicemachine.*; import java.io.*; import java.sql.*;
[ "com.splicemachine", "java.io", "java.sql" ]
com.splicemachine; java.io; java.sql;
1,806,221
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setCharacterEncoding("UTF-8"); getAndPostChecker(req, resp, "get"); }
void function(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setCharacterEncoding("UTF-8"); getAndPostChecker(req, resp, "get"); }
/** * doGet method. * @param req request. * @param resp response. * @throws ServletException servlet exception. * @throws IOException input output exception. */
doGet method
doGet
{ "repo_name": "VardanMatevosyan/Vardan-Git-Repository", "path": "Servlet_JSP/crud/src/main/java/ru/matevosyan/servlet/UsersServlet.java", "license": "apache-2.0", "size": 7646 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
592,478
ArrayList<Box> axes = new ArrayList<Box>(); axes.add(axisX); axes.add(axisY); axes.add(axisZ); return axes; }
ArrayList<Box> axes = new ArrayList<Box>(); axes.add(axisX); axes.add(axisY); axes.add(axisZ); return axes; }
/** * Gets the three axes displayed by the gizmo. * * @return An ArrayList containing the three Box shapes used to represent * the axes, in the order x, y, z. */
Gets the three axes displayed by the gizmo
getAxes
{ "repo_name": "jarrah42/eavp", "path": "org.eclipse.eavp.viz.service.javafx.mesh.test/src/org/eclipse/eavp/viz/service/javafx/mesh/test/TestGizmo.java", "license": "epl-1.0", "size": 1348 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
807,048
long getAutoincrementIncrement() { if (SanityManager.DEBUG) { SanityManager.ASSERT(isAutoincrement, "isAutoincrement expected to be true"); } return autoincrementIncrement; }
long getAutoincrementIncrement() { if (SanityManager.DEBUG) { SanityManager.ASSERT(isAutoincrement, STR); } return autoincrementIncrement; }
/** * Get the autoincrement increment value * * @return Autoincrement increment value. */
Get the autoincrement increment value
getAutoincrementIncrement
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java", "license": "apache-2.0", "size": 27826 }
[ "org.apache.derby.iapi.services.sanity.SanityManager" ]
import org.apache.derby.iapi.services.sanity.SanityManager;
import org.apache.derby.iapi.services.sanity.*;
[ "org.apache.derby" ]
org.apache.derby;
1,390,718
public void exec (Loop loop) { threads = properties.actualThreads(); schedule = properties.schedule(); chunk = schedule.actualChunk (properties.chunk()); nextlb = new AtomicLong (blb); this.loop = loop; stop = false; Team.execute (threads, this); } // Hidden operations.
void function (Loop loop) { threads = properties.actualThreads(); schedule = properties.schedule(); chunk = schedule.actualChunk (properties.chunk()); nextlb = new AtomicLong (blb); this.loop = loop; stop = false; Team.execute (threads, this); }
/** * Execute this parallel for loop with the loop body specified by the given * {@linkplain Loop Loop} object. * * @param loop Loop object. * * @exception NullPointerException * (unchecked exception) Thrown if <TT>loop</TT> is null. */
Execute this parallel for loop with the loop body specified by the given Loop Loop object
exec
{ "repo_name": "JimiHFord/pj2", "path": "lib/edu/rit/pj2/IntParallelForLoop.java", "license": "lgpl-3.0", "size": 12063 }
[ "java.util.concurrent.atomic.AtomicLong" ]
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
67,145
private Node tryFoldStringCharCodeAt(Node n, Node stringNode, Node arg1) { Preconditions.checkArgument(n.isCall()); Preconditions.checkArgument(stringNode.isString()); int index; String stringAsString = stringNode.getString(); if (arg1 != null && arg1.isNumber() && arg1.getNext() == null...
Node function(Node n, Node stringNode, Node arg1) { Preconditions.checkArgument(n.isCall()); Preconditions.checkArgument(stringNode.isString()); int index; String stringAsString = stringNode.getString(); if (arg1 != null && arg1.isNumber() && arg1.getNext() == null) { index = (int) arg1.getDouble(); } else { return n; ...
/** * Try to fold .charCodeAt() calls on strings */
Try to fold .charCodeAt() calls on strings
tryFoldStringCharCodeAt
{ "repo_name": "brad4d/closure-compiler", "path": "src/com/google/javascript/jscomp/PeepholeReplaceKnownMethods.java", "license": "apache-2.0", "size": 25068 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
857,328
public Map<Long, String> mapUserGroups() throws ServerError { List<String> systemGroups = new ArrayList<String>(); systemGroups.add("system"); systemGroups.add("user"); systemGroups.add("guest"); Map<Long, String> names = new LinkedHashMap<Long, String>(); List<...
Map<Long, String> function() throws ServerError { List<String> systemGroups = new ArrayList<String>(); systemGroups.add(STR); systemGroups.add("user"); systemGroups.add("guest"); Map<Long, String> names = new LinkedHashMap<Long, String>(); List<ExperimenterGroup> groups = getUserGroups(); if (groups == null groups.size...
/** * Maps the user's groups for use by ScreenLogin.registerGroup() * Also strips system groups from this map * * @return map of group id & name * @throws ServerError if the groups could not be mapped */
Maps the user's groups for use by ScreenLogin.registerGroup() Also strips system groups from this map
mapUserGroups
{ "repo_name": "tp81/openmicroscopy", "path": "components/blitz/src/ome/formats/OMEROMetadataStoreClient.java", "license": "gpl-2.0", "size": 307206 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.LinkedHashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,731,481
public List<String> createPath( final String srcNodeId, final String dstNodeId) { List<String> path = new ArrayList<String>(); try { DijkstraShortestPath<String, String> alg = new DijkstraShortestPath<String, String>(graph); // Get the shortest path. // path = new Arra...
List<String> function( final String srcNodeId, final String dstNodeId) { List<String> path = new ArrayList<String>(); try { DijkstraShortestPath<String, String> alg = new DijkstraShortestPath<String, String>(graph); path = alg.getPath(srcNodeId, dstNodeId); } catch (IllegalArgumentException e) { } return path; }
/** * Create the shortest path using Dikstra's algorithm. * * @param srcNodeId * Source Node. * @param dstNodeId * Destination Node. * @return Path to the dstNode form the srcNode. */
Create the shortest path using Dikstra's algorithm
createPath
{ "repo_name": "nis-sdn/odenos", "path": "src/main/java/org/o3project/odenos/core/util/PathCalculator.java", "license": "apache-2.0", "size": 5396 }
[ "edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath", "java.util.ArrayList", "java.util.List" ]
import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath; import java.util.ArrayList; import java.util.List;
import edu.uci.ics.jung.algorithms.shortestpath.*; import java.util.*;
[ "edu.uci.ics", "java.util" ]
edu.uci.ics; java.util;
2,234,978
public final native void setInitialExtent(Extent initialExtent) ;
final native void function(Extent initialExtent) ;
/** * Set the initialExtent parameter. * * @param initialExtent - The initial extent of the WMTS layer. */
Set the initialExtent parameter
setInitialExtent
{ "repo_name": "CSTARS/gwt-esri", "path": "src/main/java/edu/ucdavis/cstars/client/layers/WMTSLayerInfo.java", "license": "lgpl-3.0", "size": 3376 }
[ "edu.ucdavis.cstars.client.geometry.Extent" ]
import edu.ucdavis.cstars.client.geometry.Extent;
import edu.ucdavis.cstars.client.geometry.*;
[ "edu.ucdavis.cstars" ]
edu.ucdavis.cstars;
326,962
public void onCreateNode(ChildAssociationRef childAssocRef) { if (log.isDebugEnabled()) { log.debug("onCreateNode " + childAssocRef); } String siteId = childAssocRef.getQName().getLocalName(); channelService.createChannel("TestChannelType1", "Test Chann...
void function(ChildAssociationRef childAssocRef) { if (log.isDebugEnabled()) { log.debug(STR + childAssocRef); } String siteId = childAssocRef.getQName().getLocalName(); channelService.createChannel(STR, STR, null); channelService.createChannel(STR, STR, null); channelService.createChannel(STR, STR, null); }
/** * On create node behaviour * * @param childAssocRef * child association reference */
On create node behaviour
onCreateNode
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/test-java/org/alfresco/repo/publishing/test/SiteType.java", "license": "lgpl-3.0", "size": 3019 }
[ "org.alfresco.service.cmr.repository.ChildAssociationRef" ]
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
11,237
protected void processCDATA() throws Exception { if (!XMLUtil.checkLiteral(reader, "CDATA[")) { XMLUtil.errorExpectedInput(reader.getSystemID(), reader.getLineNr(), "<![[CDATA["); } validator.PCDataAdded(reader.getSystemID(), reader.getLineNr()); try (final Reader reader = new CDATAReader(this.reader)) { ...
void function() throws Exception { if (!XMLUtil.checkLiteral(reader, STR)) { XMLUtil.errorExpectedInput(reader.getSystemID(), reader.getLineNr(), STR); } validator.PCDataAdded(reader.getSystemID(), reader.getLineNr()); try (final Reader reader = new CDATAReader(this.reader)) { builder.addPCData(reader, this.reader.getS...
/** * Processes a CDATA section. * * @throws java.lang.Exception * if something went wrong */
Processes a CDATA section
processCDATA
{ "repo_name": "freeplane/freeplane", "path": "freeplane/src/main/java/org/freeplane/n3/nanoxml/StdXMLParser.java", "license": "gpl-2.0", "size": 15593 }
[ "java.io.Reader" ]
import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
1,112,964
public EReference getAuxiliaryAccount_LastDebit() { return (EReference)getAuxiliaryAccount().getEStructuralFeatures().get(0); }
EReference function() { return (EReference)getAuxiliaryAccount().getEStructuralFeatures().get(0); }
/** * Returns the meta object for the containment reference '{@link CIM15.IEC61968.PaymentMetering.AuxiliaryAccount#getLastDebit <em>Last Debit</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Last Debit</em>'. * @see CIM15.IEC61968.Payment...
Returns the meta object for the containment reference '<code>CIM15.IEC61968.PaymentMetering.AuxiliaryAccount#getLastDebit Last Debit</code>'.
getAuxiliaryAccount_LastDebit
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61968/PaymentMetering/PaymentMeteringPackage.java", "license": "apache-2.0", "size": 290630 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,148,546
public boolean isIdenticalDnses(LinkProperties target) { Collection<InetAddress> targetDnses = target.getDnsServers(); String targetDomains = target.getDomains(); if (mDomains == null) { if (targetDomains != null) return false; } else { if (mDomains.equals(tar...
boolean function(LinkProperties target) { Collection<InetAddress> targetDnses = target.getDnsServers(); String targetDomains = target.getDomains(); if (mDomains == null) { if (targetDomains != null) return false; } else { if (mDomains.equals(targetDomains) == false) return false; } return (mDnses.size() == targetDnses....
/** * Compares this {@code LinkProperties} DNS addresses against the target * * @param target LinkProperties to compare. * @return {@code true} if both are identical, {@code false} otherwise. * @hide */
Compares this LinkProperties DNS addresses against the target
isIdenticalDnses
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/net/LinkProperties.java", "license": "apache-2.0", "size": 42081 }
[ "java.net.InetAddress", "java.util.Collection" ]
import java.net.InetAddress; import java.util.Collection;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,413,391
public Map<String, String> getTokenToEndpointMap();
Map<String, String> function();
/** * Retrieve a map of tokens to endpoints, including the bootstrapping * ones. * * @return a map of tokens to endpoints in ascending order */
Retrieve a map of tokens to endpoints, including the bootstrapping ones
getTokenToEndpointMap
{ "repo_name": "ikatsov/cassandra", "path": "src/java/org/apache/cassandra/service/StorageServiceMBean.java", "license": "apache-2.0", "size": 19603 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,161,580
private static void appendSharedElement(Element bookmarkElement) { bookmarkElement.addElement("shared_bookmark", "http://jivesoftware.com/jeps/bookmarks"); }
static void function(Element bookmarkElement) { bookmarkElement.addElement(STR, "http: }
/** * Adds the shared namespace element to indicate to clients that this bookmark is a shared bookmark. * * @param bookmarkElement the bookmark to add the shared element to. */
Adds the shared namespace element to indicate to clients that this bookmark is a shared bookmark
appendSharedElement
{ "repo_name": "OpenJunction/Openfire", "path": "src/plugins/clientControl/src/java/org/jivesoftware/openfire/plugin/spark/BookmarkInterceptor.java", "license": "gpl-2.0", "size": 9668 }
[ "org.dom4j.Element" ]
import org.dom4j.Element;
import org.dom4j.*;
[ "org.dom4j" ]
org.dom4j;
1,439,750
public okhttp3.Call patchClusterRoleBindingAsync( String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback<V1ClusterRoleBinding> _callback) throws ApiException { okhttp3.Call localV...
okhttp3.Call function( String name, V1Patch body, String pretty, String dryRun, String fieldManager, String fieldValidation, Boolean force, final ApiCallback<V1ClusterRoleBinding> _callback) throws ApiException { okhttp3.Call localVarCall = patchClusterRoleBindingValidateBeforeCall( name, body, pretty, dryRun, fieldMan...
/** * (asynchronously) partially update the specified ClusterRoleBinding * * @param name name of the ClusterRoleBinding (required) * @param body (required) * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional) * @param dryRun When present, indicates that modifications should...
(asynchronously) partially update the specified ClusterRoleBinding
patchClusterRoleBindingAsync
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java", "license": "apache-2.0", "size": 563123 }
[ "com.google.gson.reflect.TypeToken", "io.kubernetes.client.custom.V1Patch", "io.kubernetes.client.openapi.ApiCallback", "io.kubernetes.client.openapi.ApiException", "io.kubernetes.client.openapi.models.V1ClusterRoleBinding", "java.lang.reflect.Type" ]
import com.google.gson.reflect.TypeToken; import io.kubernetes.client.custom.V1Patch; import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.models.V1ClusterRoleBinding; import java.lang.reflect.Type;
import com.google.gson.reflect.*; import io.kubernetes.client.custom.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.lang.reflect.*;
[ "com.google.gson", "io.kubernetes.client", "java.lang" ]
com.google.gson; io.kubernetes.client; java.lang;
2,509,499
public static boolean showExitConfirmation(String message) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { ErrorHandler.error("Could not set system look and feel for exit confirmation.", e, true); } int n = JOptionPane.showConfirmDialog(null, message...
static boolean function(String message) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { ErrorHandler.error(STR, e, true); } int n = JOptionPane.showConfirmDialog(null, message, STR, JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); return (n != JOptionPane.YES...
/** * Shows a confirmation dialog (used before exiting the game). * @param message the message to display * @return true if user selects "yes", false otherwise */
Shows a confirmation dialog (used before exiting the game)
showExitConfirmation
{ "repo_name": "LemonLake/opsu", "path": "src/itdelatrisu/opsu/ui/UI.java", "license": "gpl-3.0", "size": 16776 }
[ "javax.swing.JOptionPane", "javax.swing.UIManager" ]
import javax.swing.JOptionPane; import javax.swing.UIManager;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
54,642
protected void receiveByteArrayFromStream(InputStream stream, byte[] buffer, int offset, int length) throws IOException, EOFException, ConnectException { StreamReader reader = new StreamReader(stream, buffer, offset, length); synchronized (reader) { reader.start(); while (rea...
void function(InputStream stream, byte[] buffer, int offset, int length) throws IOException, EOFException, ConnectException { StreamReader reader = new StreamReader(stream, buffer, offset, length); synchronized (reader) { reader.start(); while (reader.getBytesRemaining() > 0) { try { reader.wait(STREAM_TIMEOUT); } catc...
/** * Receives byte array from the input stream with timeout * @param stream the input stream * @param buffer the byte array * @param offset the offset * @param length the length * @throws java.io.IOException failed to receive data from stream * @throws java.io.EOFException Unexpected...
Receives byte array from the input stream with timeout
receiveByteArrayFromStream
{ "repo_name": "obiba/nanogong", "path": "src/gong/audio/AudioData.java", "license": "apache-2.0", "size": 22527 }
[ "java.io.EOFException", "java.io.IOException", "java.io.InputStream", "java.net.ConnectException" ]
import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.net.ConnectException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,804,041
AmazonSQS createSQSAsync(final SQSQueue queue);
AmazonSQS createSQSAsync(final SQSQueue queue);
/** * Returns a new Amazon SQS instance that can be used to access the specified queue. * @param queue The {@link SQSQueue} for which to create a client. * @return A new instance of an {@link AmazonSQSAsync} that is suitable for asynchronous access * to the specified queue. */
Returns a new Amazon SQS instance that can be used to access the specified queue
createSQSAsync
{ "repo_name": "jenkinsci/aws-codecommit-trigger-plugin", "path": "src/main/java/com/ribose/jenkins/plugin/awscodecommittrigger/interfaces/SQSFactory.java", "license": "apache-2.0", "size": 2929 }
[ "com.amazonaws.services.sqs.AmazonSQS" ]
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
999,104
@NonNull static String getAutoTrackName(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); String template = prefs.getString(SettingsActivity.KEY_AUTO_NAME, context.getString(R.string.pref_auto_name_default)); return getAutoName(template,...
static String getAutoTrackName(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); String template = prefs.getString(SettingsActivity.KEY_AUTO_NAME, context.getString(R.string.pref_auto_name_default)); return getAutoName(template, Calendar.getInstance().getTime()); }
/** * Get auto-generated track name * Default template: Auto_%y.%m.%d_%H.%M.%S * * @param context Context * @return Track name */
Get auto-generated track name Default template: Auto_%y.%m.%d_%H.%M.%S
getAutoTrackName
{ "repo_name": "bfabiszewski/ulogger-android", "path": "app/src/main/java/net/fabiszewski/ulogger/AutoNamePreference.java", "license": "gpl-3.0", "size": 4611 }
[ "android.content.Context", "android.content.SharedPreferences", "androidx.preference.PreferenceManager", "java.util.Calendar" ]
import android.content.Context; import android.content.SharedPreferences; import androidx.preference.PreferenceManager; import java.util.Calendar;
import android.content.*; import androidx.preference.*; import java.util.*;
[ "android.content", "androidx.preference", "java.util" ]
android.content; androidx.preference; java.util;
2,147,583
public boolean canSupport(Properties properties) { if (!requireAuthentication(properties)) return false; // // We check 2 System/Database properties: // // // - if db.authentication.provider is set to 'BUILTIN'. // // and in that case we are the authentication service that should // be run. ...
boolean function(Properties properties) { if (!requireAuthentication(properties)) return false; String authenticationProvider = PropertyUtil.getPropertyFromSet( properties, Property.AUTHENTICATION_PROVIDER_PARAMETER); return !((authenticationProvider != null) && (!authenticationProvider.isEmpty()) && (!(StringUtil.SQLE...
/** * Check if we should activate this authentication service. */
Check if we should activate this authentication service
canSupport
{ "repo_name": "splicemachine/spliceengine", "path": "db-engine/src/main/java/com/splicemachine/db/impl/jdbc/authentication/BasicAuthenticationServiceImpl.java", "license": "agpl-3.0", "size": 12570 }
[ "com.splicemachine.db.iapi.reference.Property", "com.splicemachine.db.iapi.reference.PropertyHelper", "com.splicemachine.db.iapi.services.property.PropertyUtil", "com.splicemachine.db.iapi.util.StringUtil", "java.util.Properties" ]
import com.splicemachine.db.iapi.reference.Property; import com.splicemachine.db.iapi.reference.PropertyHelper; import com.splicemachine.db.iapi.services.property.PropertyUtil; import com.splicemachine.db.iapi.util.StringUtil; import java.util.Properties;
import com.splicemachine.db.iapi.reference.*; import com.splicemachine.db.iapi.services.property.*; import com.splicemachine.db.iapi.util.*; import java.util.*;
[ "com.splicemachine.db", "java.util" ]
com.splicemachine.db; java.util;
746,988
@Override public void enterExpr_statement(@NotNull FunctionParser.Expr_statementContext ctx) { }
@Override public void enterExpr_statement(@NotNull FunctionParser.Expr_statementContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitLabel
{ "repo_name": "octopus-platform/joern", "path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java", "license": "lgpl-3.0", "size": 42232 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
647,246
Statistics getEvictionStatistics();
Statistics getEvictionStatistics();
/** * Returns null if the region is not configured for eviction otherwise returns the Statistics used * to measure eviction activity. */
Returns null if the region is not configured for eviction otherwise returns the Statistics used to measure eviction activity
getEvictionStatistics
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/InternalRegion.java", "license": "apache-2.0", "size": 7444 }
[ "org.apache.geode.Statistics" ]
import org.apache.geode.Statistics;
import org.apache.geode.*;
[ "org.apache.geode" ]
org.apache.geode;
2,383,734
private int unregisterHandles() { int cancelledHandles = 0; for (;;) { AcceptorOperationFuture future = cancelQueue.poll(); if (future == null) { break; } // close the channels for (SocketAddress a : future.getLocalAddresse...
int function() { int cancelledHandles = 0; for (;;) { AcceptorOperationFuture future = cancelQueue.poll(); if (future == null) { break; } for (SocketAddress a : future.getLocalAddresses()) { H handle = boundHandles.remove(a); if (handle == null) { continue; } try { close(handle); wakeup(); } catch (Throwable e) { Excep...
/** * This method just checks to see if anything has been placed into the * cancellation queue. The only thing that should be in the cancelQueue * is CancellationRequest objects and the only place this happens is in * the doUnbind() method. */
This method just checks to see if anything has been placed into the cancellation queue. The only thing that should be in the cancelQueue is CancellationRequest objects and the only place this happens is in the doUnbind() method
unregisterHandles
{ "repo_name": "jeffmaury/mina", "path": "mina-core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java", "license": "apache-2.0", "size": 25034 }
[ "java.net.SocketAddress", "org.apache.mina.util.ExceptionMonitor" ]
import java.net.SocketAddress; import org.apache.mina.util.ExceptionMonitor;
import java.net.*; import org.apache.mina.util.*;
[ "java.net", "org.apache.mina" ]
java.net; org.apache.mina;
1,794,654
@Pure @Inline(value = "$2.valueOf($1)", imported = {BigInteger.class}) public static BigInteger toBigInteger(short number) { return BigInteger.valueOf(number); }
@Inline(value = STR, imported = {BigInteger.class}) static BigInteger function(short number) { return BigInteger.valueOf(number); }
/** Convert the given value to {@code BigInteger}. * * @param number a number of {@code short} type. * @return the equivalent value to {@code number} of {@code BigInteger} type. */
Convert the given value to BigInteger
toBigInteger
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/numbers/cast/PrimitiveShortCastExtensions.java", "license": "apache-2.0", "size": 5269 }
[ "java.math.BigInteger", "org.eclipse.xtext.xbase.lib.Inline" ]
import java.math.BigInteger; import org.eclipse.xtext.xbase.lib.Inline;
import java.math.*; import org.eclipse.xtext.xbase.lib.*;
[ "java.math", "org.eclipse.xtext" ]
java.math; org.eclipse.xtext;
1,323,535
public static ResourceAdaptersDescriptor createWorkDeploymentMCFNoHashCode(String bc) { ResourceAdaptersDescriptor dashRaXml = Descriptors.create(ResourceAdaptersDescriptor.class, "work-ra.xml"); ResourceAdapterType dashRaXmlRt = dashRaXml.createResourceAdapter().archive("work.rar"); if (bc != ...
static ResourceAdaptersDescriptor function(String bc) { ResourceAdaptersDescriptor dashRaXml = Descriptors.create(ResourceAdaptersDescriptor.class, STR); ResourceAdapterType dashRaXmlRt = dashRaXml.createResourceAdapter().archive(STR); if (bc != null) dashRaXmlRt.bootstrapContext(bc); ConnectionDefinitionsType dashRaXm...
/** * Create the work.rar deployment * * @param bc The BootstrapContext name; <code>null</code> if default * @return The resource adapter descriptor */
Create the work.rar deployment
createWorkDeploymentMCFNoHashCode
{ "repo_name": "jandsu/ironjacamar", "path": "testsuite/src/test/java/org/ironjacamar/rars/ResourceAdapterFactory.java", "license": "epl-1.0", "size": 36781 }
[ "org.ironjacamar.embedded.dsl.resourceadapters20.api.ConnectionDefinitionsType", "org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdapterType", "org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdaptersDescriptor", "org.ironjacamar.rars.wm.WorkManagedConnectionFactoryNoHashCode", "org...
import org.ironjacamar.embedded.dsl.resourceadapters20.api.ConnectionDefinitionsType; import org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdapterType; import org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdaptersDescriptor; import org.ironjacamar.rars.wm.WorkManagedConnectionFactoryNoHashCo...
import org.ironjacamar.embedded.dsl.resourceadapters20.api.*; import org.ironjacamar.rars.wm.*; import org.jboss.shrinkwrap.descriptor.api.*;
[ "org.ironjacamar.embedded", "org.ironjacamar.rars", "org.jboss.shrinkwrap" ]
org.ironjacamar.embedded; org.ironjacamar.rars; org.jboss.shrinkwrap;
2,163,712
@Override public Container getContainer() { return (this.container); }
Container function() { return (this.container); }
/** * Get the Container associated with our Cluster * * @return The Container associated with our Cluster */
Get the Container associated with our Cluster
getContainer
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.22/SimpleTcpCluster.java", "license": "mit", "size": 28515 }
[ "org.apache.catalina.Container" ]
import org.apache.catalina.Container;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,622,155
public static ShortBuffer createShortBuffer(ShortBuffer buf, int size) { if (buf != null && buf.limit() == size) { buf.rewind(); return buf; } buf = createShortBuffer(size); return buf; }
static ShortBuffer function(ShortBuffer buf, int size) { if (buf != null && buf.limit() == size) { buf.rewind(); return buf; } buf = createShortBuffer(size); return buf; }
/** * Create a new ShortBuffer of an appropriate size to hold the specified * number of shorts only if the given buffer if not already the right size. * * @param buf * the buffer to first check and rewind * @param size * number of shorts that need to be he...
Create a new ShortBuffer of an appropriate size to hold the specified number of shorts only if the given buffer if not already the right size
createShortBuffer
{ "repo_name": "asiermarzo/Ultraino", "path": "AcousticFieldSim/src/acousticfield3d/utils/BufferUtils.java", "license": "mit", "size": 44937 }
[ "java.nio.ShortBuffer" ]
import java.nio.ShortBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,063,824
public Pet create(final String type, final String name) throws NameException { if (!this.knownPets.containsKey(type)) { throw new IllegalArgumentException("Unknown pet's type"); } try { return this.knownPets.get(type).getConstructor(String.class, Output.class).newIns...
Pet function(final String type, final String name) throws NameException { if (!this.knownPets.containsKey(type)) { throw new IllegalArgumentException(STR); } try { return this.knownPets.get(type).getConstructor(String.class, Output.class).newInstance(name, this.output); } catch(InvocationTargetException e) { if (e.getT...
/** * Create <code>Pet</code> object using provided type and name. * * @param type pet's type. * @param name pet's name. * @return created pet. * @throws NameException thrown when pet's name is wrong. */
Create <code>Pet</code> object using provided type and name
create
{ "repo_name": "lightstar/job4j-clinic", "path": "src/main/java/ru/lightstar/clinic/pet/PetFactory.java", "license": "gpl-3.0", "size": 2915 }
[ "java.lang.reflect.InvocationTargetException", "ru.lightstar.clinic.exception.NameException", "ru.lightstar.clinic.io.Output" ]
import java.lang.reflect.InvocationTargetException; import ru.lightstar.clinic.exception.NameException; import ru.lightstar.clinic.io.Output;
import java.lang.reflect.*; import ru.lightstar.clinic.exception.*; import ru.lightstar.clinic.io.*;
[ "java.lang", "ru.lightstar.clinic" ]
java.lang; ru.lightstar.clinic;
923,624
protected final Map<String, Object> convertPersonAttributesToPrincipalAttributes( final Map<String, List<Object>> attributes) { final Map<String, Object> convertedAttributes = new HashMap<>(); for (final Map.Entry<String, List<Object>> entry : attributes.entrySet()) { final L...
final Map<String, Object> function( final Map<String, List<Object>> attributes) { final Map<String, Object> convertedAttributes = new HashMap<>(); for (final Map.Entry<String, List<Object>> entry : attributes.entrySet()) { final List<Object> values = entry.getValue(); convertedAttributes.put(entry.getKey(), values.size...
/** * Convert person attributes to principal attributes. * @param attributes person attributes * @return principal attributes */
Convert person attributes to principal attributes
convertPersonAttributesToPrincipalAttributes
{ "repo_name": "jasonchw/cas", "path": "cas-server-core/src/main/java/org/jasig/cas/authentication/principal/cache/AbstractPrincipalAttributesRepository.java", "license": "apache-2.0", "size": 10860 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,670,057
private void forceMainActivityReload() { PackageManager pm = getPackageManager(); Intent launchIntent = pm.getLaunchIntentForPackage(getApplicationContext().getPackageName()); startActivity(launchIntent); }
void function() { PackageManager pm = getPackageManager(); Intent launchIntent = pm.getLaunchIntentForPackage(getApplicationContext().getPackageName()); startActivity(launchIntent); }
/** * Forces the main activity to re-launch if it's unloaded. */
Forces the main activity to re-launch if it's unloaded
forceMainActivityReload
{ "repo_name": "ajinkyamarathe/pushplugin", "path": "src/android/com/plugin/gcm/PushHandlerActivity.java", "license": "mit", "size": 1996 }
[ "android.content.Intent", "android.content.pm.PackageManager" ]
import android.content.Intent; import android.content.pm.PackageManager;
import android.content.*; import android.content.pm.*;
[ "android.content" ]
android.content;
1,954,877
private void recordDepScope(Node node, NameInformation name) { Preconditions.checkNotNull(name); scopes.put(node, name); } } private class HoistVariableAndFunctionDeclarations extends NodeTraversal.AbstractShallowCallback {
void function(Node node, NameInformation name) { Preconditions.checkNotNull(name); scopes.put(node, name); } } private class HoistVariableAndFunctionDeclarations extends NodeTraversal.AbstractShallowCallback {
/** * Defines a dependency scope. */
Defines a dependency scope
recordDepScope
{ "repo_name": "zombiezen/cardcpx", "path": "third_party/closure-compiler/src/com/google/javascript/jscomp/NameAnalyzer.java", "license": "apache-2.0", "size": 62937 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
2,445,266
protected boolean standardRetainAll(Collection<?> collection) { return Iterators.retainAll(iterator(), collection); }
boolean function(Collection<?> collection) { return Iterators.retainAll(iterator(), collection); }
/** * A sensible definition of {@link #retainAll} in terms of {@link #iterator}, * using the iterator's {@code remove} method. If you override {@link * #iterator}, you may wish to override {@link #retainAll} to forward to this * implementation. * * @since 7.0 */
A sensible definition of <code>#retainAll</code> in terms of <code>#iterator</code>, using the iterator's remove method. If you override <code>#iterator</code>, you may wish to override <code>#retainAll</code> to forward to this implementation
standardRetainAll
{ "repo_name": "ben-manes/guava", "path": "guava/src/com/google/common/collect/ForwardingCollection.java", "license": "apache-2.0", "size": 7624 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,689,261
public boolean isOptionRequired(Option o) { return requiredOptions.contains(o); }
boolean function(Option o) { return requiredOptions.contains(o); }
/** * Checks if a given Option is required according to the information stored * in the Map. * * @param o * the Option to check. * @return true if the option is required, false otherwise. If the Option is * not in the Map, false is returned. */
Checks if a given Option is required according to the information stored in the Map
isOptionRequired
{ "repo_name": "jgralab/common", "path": "ist_utilities/src/de/uni_koblenz/ist/utilities/option_handler/OptionHandler.java", "license": "gpl-3.0", "size": 14864 }
[ "org.apache.commons.cli.Option" ]
import org.apache.commons.cli.Option;
import org.apache.commons.cli.*;
[ "org.apache.commons" ]
org.apache.commons;
2,042,484
public void updateOtherRecordReferences(Hashtable oldToNewReferencesLookup) { int[] slideIDs = getKnownSlideIDs(); // Loop over all the slides we know about // Find where they used to live, and where they now live // Then, update the right bit of _ptrData with their new location for(int i=0; i<slideIDs.le...
void function(Hashtable oldToNewReferencesLookup) { int[] slideIDs = getKnownSlideIDs(); for(int i=0; i<slideIDs.length; i++) { Integer id = new Integer(slideIDs[i]); Integer oldPos = (Integer)_slideLocations.get(id); Integer newPos = (Integer)oldToNewReferencesLookup.get(oldPos); if(newPos == null) { logger.log(POILog...
/** * At write-out time, update the references to the sheets to their * new positions */
At write-out time, update the references to the sheets to their new positions
updateOtherRecordReferences
{ "repo_name": "benjaminy/STuneLite", "path": "OldJavaImplementation/poi-3.2-FINAL/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java", "license": "gpl-2.0", "size": 7602 }
[ "java.util.Hashtable", "org.apache.poi.util.LittleEndian", "org.apache.poi.util.POILogger" ]
import java.util.Hashtable; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.POILogger;
import java.util.*; import org.apache.poi.util.*;
[ "java.util", "org.apache.poi" ]
java.util; org.apache.poi;
1,444,982
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<ManagementLockObjectInner>> getByResourceGroupWithResponseAsync( String resourceGroupName, String lockName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ManagementLockObjectInner>> function( String resourceGroupName, String lockName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new Illega...
/** * Gets a management lock at the resource group level. * * @param resourceGroupName The name of the locked resource group. * @param lockName The name of the lock to get. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameter...
Gets a management lock at the resource group level
getByResourceGroupWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ManagementLocksClientImpl.java", "license": "mit", "size": 183211 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.resources.fluent.models.ManagementLockObjectInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.fluent.models.ManagementLockObjectInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
830,869
@Override protected void onError(AjaxRequestTarget target, Form<?> form) { Panel feedbackPanel = (Panel) form.get("feedbackPanel"); target.add(feedbackPanel); target.appendJavaScript("setupFeedbackPanel(\"#" + feedbackPanel.getMarkupId() + "\")"); }
void function(AjaxRequestTarget target, Form<?> form) { Panel feedbackPanel = (Panel) form.get(STR); target.add(feedbackPanel); target.appendJavaScript(STR#STR\")"); }
/** * Called when form submit fails. * * @param target target that produces an Ajax response * @param form the form that is submitted */
Called when form submit fails
onError
{ "repo_name": "mhusar/lemming", "path": "src/main/java/lemming/ui/SubmitLink.java", "license": "apache-2.0", "size": 1768 }
[ "org.apache.wicket.ajax.AjaxRequestTarget", "org.apache.wicket.markup.html.form.Form", "org.apache.wicket.markup.html.panel.Panel" ]
import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.ajax.*; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.panel.*;
[ "org.apache.wicket" ]
org.apache.wicket;
95,622
Translog.Operation next() throws IOException; } public interface Operation extends Writeable { enum Type { @Deprecated CREATE((byte) 1), INDEX((byte) 2), DELETE((byte) 3); private final byte id; Type(byte id) { ...
Translog.Operation next() throws IOException; } public interface Operation extends Writeable { enum Type { CREATE((byte) 1), INDEX((byte) 2), DELETE((byte) 3); private final byte id; Type(byte id) { this.id = id; }
/** * Returns the next operation in the snapshot or <code>null</code> if we reached the end. */
Returns the next operation in the snapshot or <code>null</code> if we reached the end
next
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/index/translog/Translog.java", "license": "apache-2.0", "size": 37977 }
[ "java.io.IOException", "org.elasticsearch.common.io.stream.Writeable" ]
import java.io.IOException; import org.elasticsearch.common.io.stream.Writeable;
import java.io.*; import org.elasticsearch.common.io.stream.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
1,715,919
@Override public ElisDataObject readData(UUID id) throws StorageException { return readData(id, false); }
ElisDataObject function(UUID id) throws StorageException { return readData(id, false); }
/** * Implementation of * {@link se.mah.elis.services.storage.Storage#readData(UUID) readData(UUID)}. * * @param UUID The object to be read. * @return The data object we're looking for. * @throws StorageException Thrown when object couldn't be read. * @since 1.0 */
Implementation of <code>se.mah.elis.services.storage.Storage#readData(UUID) readData(UUID)</code>
readData
{ "repo_name": "iotap-center/elis-platform", "path": "Elis user and persistent storage service implementations/src/main/java/se/mah/elis/impl/services/storage/StorageImpl.java", "license": "mit", "size": 63812 }
[ "se.mah.elis.data.ElisDataObject", "se.mah.elis.services.storage.exceptions.StorageException" ]
import se.mah.elis.data.ElisDataObject; import se.mah.elis.services.storage.exceptions.StorageException;
import se.mah.elis.data.*; import se.mah.elis.services.storage.exceptions.*;
[ "se.mah.elis" ]
se.mah.elis;
1,427,018
protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProofFeatureDef_name_feature"), getString("_UI_PropertyDescriptor_desc...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ProofProcessPackage.Literals.PROOF_FEATURE_DEF__NAME, true, false, false, ItemPropertyDescriptor....
/** * This adds a property descriptor for the Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Name feature.
addNamePropertyDescriptor
{ "repo_name": "andriusvelykis/proofprocess", "path": "org.ai4fm.proofprocess.edit/src/org/ai4fm/proofprocess/provider/ProofFeatureDefItemProvider.java", "license": "epl-1.0", "size": 5494 }
[ "org.ai4fm.proofprocess.ProofProcessPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.ai4fm.proofprocess.ProofProcessPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.ai4fm.proofprocess.*; import org.eclipse.emf.edit.provider.*;
[ "org.ai4fm.proofprocess", "org.eclipse.emf" ]
org.ai4fm.proofprocess; org.eclipse.emf;
2,232,970
public GetUsersInCourseOptions include(List<Include> includes) { addEnumList("include[]", includes); return this; }
GetUsersInCourseOptions function(List<Include> includes) { addEnumList(STR, includes); return this; }
/** * Optional sub-items to include in the user response * @param includes List of includes to request * @return This object to allow adding more options */
Optional sub-items to include in the user response
include
{ "repo_name": "kstateome/canvas-api", "path": "src/main/java/edu/ksu/canvas/requestOptions/GetUsersInCourseOptions.java", "license": "lgpl-3.0", "size": 3441 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,506,397
public SharedObjects readSharedObjects() throws KettleException { // Extract the shared steps, connections, etc. using the SharedObjects // class // String soFile = environmentSubstitute( sharedObjectsFile ); SharedObjects sharedObjects = new SharedObjects( soFile ); Map<?, SharedObjectInterfa...
SharedObjects function() throws KettleException { SharedObjects sharedObjects = new SharedObjects( soFile ); Map<?, SharedObjectInterface> objectsMap = sharedObjects.getObjectsMap(); loadSharedObject( object ); } return sharedObjects; }
/** * Read shared objects. * * @return the shared objects * @throws KettleException the kettle exception */
Read shared objects
readSharedObjects
{ "repo_name": "tkafalas/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/base/AbstractMeta.java", "license": "apache-2.0", "size": 57127 }
[ "java.util.Map", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.shared.SharedObjectInterface", "org.pentaho.di.shared.SharedObjects" ]
import java.util.Map; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.shared.SharedObjectInterface; import org.pentaho.di.shared.SharedObjects;
import java.util.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.shared.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,751,247
protected double estimateMaximumTickLabelHeight(Graphics2D g2) { RectangleInsets tickLabelInsets = getTickLabelInsets(); double result = tickLabelInsets.getTop() + tickLabelInsets.getBottom(); Font tickLabelFont = getTickLabelFont(); FontRenderContext frc = g2.getFontRenderCo...
double function(Graphics2D g2) { RectangleInsets tickLabelInsets = getTickLabelInsets(); double result = tickLabelInsets.getTop() + tickLabelInsets.getBottom(); Font tickLabelFont = getTickLabelFont(); FontRenderContext frc = g2.getFontRenderContext(); result += tickLabelFont.getLineMetrics("123", frc).getHeight(); ret...
/** * Estimates the maximum tick label height. * * @param g2 the graphics device. * * @return The maximum height. */
Estimates the maximum tick label height
estimateMaximumTickLabelHeight
{ "repo_name": "ilyessou/jfreechart", "path": "source/org/jfree/chart/axis/NumberAxis.java", "license": "lgpl-2.1", "size": 57325 }
[ "java.awt.Font", "java.awt.Graphics2D", "java.awt.font.FontRenderContext", "org.jfree.chart.util.RectangleInsets" ]
import java.awt.Font; import java.awt.Graphics2D; import java.awt.font.FontRenderContext; import org.jfree.chart.util.RectangleInsets;
import java.awt.*; import java.awt.font.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,448,897
public Color getDefaultColor() { return defaultColor; }
Color function() { return defaultColor; }
/** * Returns the default color that is used if none of the limits applies. * * @return the default color. */
Returns the default color that is used if none of the limits applies
getDefaultColor
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/function/ElementTrafficLightFunction.java", "license": "lgpl-2.1", "size": 19461 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
14,228
@Nullable public RefGraphAnnotator getAnnotator(@NotNull RefManager refManager) { return null; }
RefGraphAnnotator function(@NotNull RefManager refManager) { return null; }
/** * Returns the annotator which will receive callbacks while the reference graph * is being built. The annotator can be used to add additional markers to reference * graph nodes, through calls to {@link RefEntity#putUserData(com.intellij.openapi.util.Key, Object)}. * * @param refManager the reference g...
Returns the annotator which will receive callbacks while the reference graph is being built. The annotator can be used to add additional markers to reference graph nodes, through calls to <code>RefEntity#putUserData(com.intellij.openapi.util.Key, Object)</code>
getAnnotator
{ "repo_name": "hurricup/intellij-community", "path": "platform/analysis-api/src/com/intellij/codeInspection/GlobalInspectionTool.java", "license": "apache-2.0", "size": 11242 }
[ "com.intellij.codeInspection.reference.RefGraphAnnotator", "com.intellij.codeInspection.reference.RefManager", "org.jetbrains.annotations.NotNull" ]
import com.intellij.codeInspection.reference.RefGraphAnnotator; import com.intellij.codeInspection.reference.RefManager; import org.jetbrains.annotations.NotNull;
import com.intellij.*; import org.jetbrains.annotations.*;
[ "com.intellij", "org.jetbrains.annotations" ]
com.intellij; org.jetbrains.annotations;
797,389
public static Automaton subst(Automaton a, Map<Character, Set<Character>> map) { if (map.isEmpty()) { return a.cloneIfRequired(); } Set<Character> ckeys = new TreeSet<Character>(map.keySet()); char[] keys = new char[ckeys.size()]; int j = 0; for (Character c : ckeys) { keys[j++] = c; } a = a.cl...
static Automaton function(Automaton a, Map<Character, Set<Character>> map) { if (map.isEmpty()) { return a.cloneIfRequired(); } Set<Character> ckeys = new TreeSet<Character>(map.keySet()); char[] keys = new char[ckeys.size()]; int j = 0; for (Character c : ckeys) { keys[j++] = c; } a = a.cloneExpandedIfRequired(); for ...
/** * Returns an automaton where all transition labels have been substituted. * <p> * Each transition labeled <code>c</code> is changed to a set of transitions, one for each character in * <code>map(c)</code>. If <code>map(c)</code> is null, then the transition is unchanged. * * @param map * m...
Returns an automaton where all transition labels have been substituted. Each transition labeled <code>c</code> is changed to a set of transitions, one for each character in <code>map(c)</code>. If <code>map(c)</code> is null, then the transition is unchanged
subst
{ "repo_name": "ModelWriter/Source", "path": "plugins/dk.brics.automaton/src/dk/brics/automaton/SpecialOperations.java", "license": "epl-1.0", "size": 19514 }
[ "java.util.Map", "java.util.Set", "java.util.TreeSet" ]
import java.util.Map; import java.util.Set; import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
55,506
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "apache/geronimo", "path": "testsuite/javaee6-testsuite/servlet3.0-test/fragment2/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/fragment2/ShoppingCart.java", "license": "apache-2.0", "size": 5462 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,186,147
if (Util.isEmpty(link)) { return null; } Matcher matcher = HOST_PATTERN.matcher(link); if (matcher.matches()) { String e164 = matcher.group(2); if (PhoneNumberUtil.getInstance().isPossibleNumber(e164, Locale.getDefault().getCountry())) { return PhoneNumberFormatter.get(context)....
if (Util.isEmpty(link)) { return null; } Matcher matcher = HOST_PATTERN.matcher(link); if (matcher.matches()) { String e164 = matcher.group(2); if (PhoneNumberUtil.getInstance().isPossibleNumber(e164, Locale.getDefault().getCountry())) { return PhoneNumberFormatter.get(context).format(e164); } else { return null; } } e...
/** * If this is a valid signal.me link and has a valid e164, it will return the e164. Otherwise, it will return null. */
If this is a valid signal.me link and has a valid e164, it will return the e164. Otherwise, it will return null
parseE164FromLink
{ "repo_name": "WhisperSystems/Signal-Android", "path": "app/src/main/java/org/thoughtcrime/securesms/util/SignalMeUtil.java", "license": "gpl-3.0", "size": 1256 }
[ "com.google.i18n.phonenumbers.PhoneNumberUtil", "java.util.Locale", "java.util.regex.Matcher", "org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter" ]
import com.google.i18n.phonenumbers.PhoneNumberUtil; import java.util.Locale; import java.util.regex.Matcher; import org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter;
import com.google.i18n.phonenumbers.*; import java.util.*; import java.util.regex.*; import org.thoughtcrime.securesms.phonenumbers.*;
[ "com.google.i18n", "java.util", "org.thoughtcrime.securesms" ]
com.google.i18n; java.util; org.thoughtcrime.securesms;
1,624,859
@Override public void visit(final Axiom axiom) { for (Proof condition : this.weakestPreconditionStack.peek()) { // add the assumption to every provable expression Implication implication = AstNodeCreatorHelper.createImplication( AstNodeCloneHelper.clone(axiom.getExpression()), condition.g...
void function(final Axiom axiom) { for (Proof condition : this.weakestPreconditionStack.peek()) { Implication implication = AstNodeCreatorHelper.createImplication( AstNodeCloneHelper.clone(axiom.getExpression()), condition.getExpression()); condition.setExpression(implication); } }
/** * Visit an {@link Axiom}. * * <code><pre> * _axiom axiom * </pre></code> * * to * * <code><pre> * axiom => wp * </pre></code> * * @param axiom * the <code>Axiom</code> to visit */
Visit an <code>Axiom</code>. <code><code> _axiom axiom </code></code> to <code><code> axiom => wp </code></code>
visit
{ "repo_name": "team-worthwhile/worthwhile", "path": "implementierung/src/worthwhile.prover/src/edu/kit/iti/formal/pse/worthwhile/prover/transformer/WPStrategy.java", "license": "bsd-3-clause", "size": 24988 }
[ "edu.kit.iti.formal.pse.worthwhile.model.ast.Axiom", "edu.kit.iti.formal.pse.worthwhile.model.ast.Implication", "edu.kit.iti.formal.pse.worthwhile.model.ast.util.AstNodeCloneHelper", "edu.kit.iti.formal.pse.worthwhile.model.ast.util.AstNodeCreatorHelper" ]
import edu.kit.iti.formal.pse.worthwhile.model.ast.Axiom; import edu.kit.iti.formal.pse.worthwhile.model.ast.Implication; import edu.kit.iti.formal.pse.worthwhile.model.ast.util.AstNodeCloneHelper; import edu.kit.iti.formal.pse.worthwhile.model.ast.util.AstNodeCreatorHelper;
import edu.kit.iti.formal.pse.worthwhile.model.ast.*; import edu.kit.iti.formal.pse.worthwhile.model.ast.util.*;
[ "edu.kit.iti" ]
edu.kit.iti;
1,720,717
public void deleteTask(String jobId, String taskId) throws BatchErrorException, IOException { deleteTask(jobId, taskId, null); }
void function(String jobId, String taskId) throws BatchErrorException, IOException { deleteTask(jobId, taskId, null); }
/** * Deletes the specified task. * * @param jobId * The ID of the job containing the task. * @param taskId * The ID of the task. * @throws BatchErrorException * Exception thrown when an error response is received from the * Batc...
Deletes the specified task
deleteTask
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/batch/microsoft-azure-batch/src/main/java/com/microsoft/azure/batch/TaskOperations.java", "license": "mit", "size": 34364 }
[ "com.microsoft.azure.batch.protocol.models.BatchErrorException", "java.io.IOException" ]
import com.microsoft.azure.batch.protocol.models.BatchErrorException; import java.io.IOException;
import com.microsoft.azure.batch.protocol.models.*; import java.io.*;
[ "com.microsoft.azure", "java.io" ]
com.microsoft.azure; java.io;
341,952
private static Field getLabelStatusField() { if (labelStatusField == null) { labelStatusField = getLabelField("a"); if (labelStatusField == null) { labelStatusField = getLabelField("status"); } } return labelStatusField; }
static Field function() { if (labelStatusField == null) { labelStatusField = getLabelField("a"); if (labelStatusField == null) { labelStatusField = getLabelField(STR); } } return labelStatusField; }
/** * Returns the Field object corresponding to the Label.status field. * * @return the Field object corresponding to the Label.status field. */
Returns the Field object corresponding to the Label.status field
getLabelStatusField
{ "repo_name": "lewis-ing/bbossgroups-3.5", "path": "bboss-util/src-asm/bboss/org/objectweb/asm/util/CheckMethodAdapter.java", "license": "apache-2.0", "size": 52324 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,251,557
public void addContextLifecycleListeners( LifecycleListener... contextLifecycleListeners) { Assert.notNull(contextLifecycleListeners, "ContextLifecycleListeners must not be null"); this.contextLifecycleListeners.addAll(Arrays.asList(contextLifecycleListeners)); }
void function( LifecycleListener... contextLifecycleListeners) { Assert.notNull(contextLifecycleListeners, STR); this.contextLifecycleListeners.addAll(Arrays.asList(contextLifecycleListeners)); }
/** * Add {@link LifecycleListener}s that should be added to the Tomcat {@link Context}. * @param contextLifecycleListeners the listeners to add */
Add <code>LifecycleListener</code>s that should be added to the Tomcat <code>Context</code>
addContextLifecycleListeners
{ "repo_name": "habuma/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java", "license": "apache-2.0", "size": 26936 }
[ "java.util.Arrays", "org.apache.catalina.LifecycleListener", "org.springframework.util.Assert" ]
import java.util.Arrays; import org.apache.catalina.LifecycleListener; import org.springframework.util.Assert;
import java.util.*; import org.apache.catalina.*; import org.springframework.util.*;
[ "java.util", "org.apache.catalina", "org.springframework.util" ]
java.util; org.apache.catalina; org.springframework.util;
2,788,496
@Transactional public List<PoDetail> findWhereQtyEquals(float qty) throws PoDetailDaoException { try { return jdbcTemplate.query("SELECT id, ponumber, productcode, qty, producttype, unitprice, amount, ppn, poremarks, currencyCode, warranty, termpayment, termdelivery, discount, pph, total FROM " + getTableName...
List<PoDetail> function(float qty) throws PoDetailDaoException { try { return jdbcTemplate.query(STR + getTableName() + STR, this,qty); } catch (Exception e) { throw new PoDetailDaoException(STR, e); } }
/** * Returns all rows from the po_detail table that match the criteria 'qty = :qty'. */
Returns all rows from the po_detail table that match the criteria 'qty = :qty'
findWhereQtyEquals
{ "repo_name": "rmage/gnvc-ims", "path": "src/java/com/app/wms/engine/db/dao/spring/PoDetailDaoImpl.java", "license": "lgpl-3.0", "size": 19698 }
[ "com.app.wms.engine.db.dto.PoDetail", "com.app.wms.engine.db.exceptions.PoDetailDaoException", "java.util.List" ]
import com.app.wms.engine.db.dto.PoDetail; import com.app.wms.engine.db.exceptions.PoDetailDaoException; import java.util.List;
import com.app.wms.engine.db.dto.*; import com.app.wms.engine.db.exceptions.*; import java.util.*;
[ "com.app.wms", "java.util" ]
com.app.wms; java.util;
996,355
@Test public void testEmptySubdirectoryHasZipEntry() throws Exception { File zipDir = new File(tmpDir, "zip"); File subDirEmpty = new File(zipDir, "subDirEmpty"); assertTrue(subDirEmpty.mkdirs()); ZipFiles.zipDirectory(tmpDir, zipFile); assertZipOnlyContains("zip/subDirEmpty/"); }
void function() throws Exception { File zipDir = new File(tmpDir, "zip"); File subDirEmpty = new File(zipDir, STR); assertTrue(subDirEmpty.mkdirs()); ZipFiles.zipDirectory(tmpDir, zipFile); assertZipOnlyContains(STR); }
/** * An empty subdirectory must have its own zip-entry. */
An empty subdirectory must have its own zip-entry
testEmptySubdirectoryHasZipEntry
{ "repo_name": "tgroh/incubator-beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/util/ZipFilesTest.java", "license": "apache-2.0", "size": 10745 }
[ "java.io.File", "org.junit.Assert" ]
import java.io.File; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
2,791,860
protected void rebind(String namespaceURI, String localName, Element e) { AbstractDocument doc = (AbstractDocument) e.getOwnerDocument(); if (doc != document) { XBLManager xm = doc.getXBLManager(); if (xm instanceof DefaultXBLManager) { ((DefaultXBLManager) xm...
void function(String namespaceURI, String localName, Element e) { AbstractDocument doc = (AbstractDocument) e.getOwnerDocument(); if (doc != document) { XBLManager xm = doc.getXBLManager(); if (xm instanceof DefaultXBLManager) { ((DefaultXBLManager) xm).rebind(namespaceURI, localName, e); return; } } if (e instanceof B...
/** * Rebinds each bindable element of the given name in the given element's * subtree. */
Rebinds each bindable element of the given name in the given element's subtree
rebind
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/bridge/svg12/DefaultXBLManager.java", "license": "apache-2.0", "size": 70751 }
[ "org.apache.flex.forks.batik.dom.AbstractDocument", "org.apache.flex.forks.batik.dom.svg12.BindableElement", "org.apache.flex.forks.batik.dom.xbl.XBLManager", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.apache.flex.forks.batik.dom.AbstractDocument; import org.apache.flex.forks.batik.dom.svg12.BindableElement; import org.apache.flex.forks.batik.dom.xbl.XBLManager; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.apache.flex.forks.batik.dom.*; import org.apache.flex.forks.batik.dom.svg12.*; import org.apache.flex.forks.batik.dom.xbl.*; import org.w3c.dom.*;
[ "org.apache.flex", "org.w3c.dom" ]
org.apache.flex; org.w3c.dom;
1,321,927
public void createCategory(CategoryDetail category) { Connection con = DBUtil.makeConnection(JNDINames.DATABASE_DATASOURCE); try { int id = categoryDao.createCategory(con, category); category.setId(Integer.toString(id)); createCategoryIndex(category); } catch (SQLException e) { ...
void function(CategoryDetail category) { Connection con = DBUtil.makeConnection(JNDINames.DATABASE_DATASOURCE); try { int id = categoryDao.createCategory(con, category); category.setId(Integer.toString(id)); createCategoryIndex(category); } catch (SQLException e) { throw new ResourcesManagerRuntimeException(STR, Silver...
/** * Creating a new resource category. * * @param category */
Creating a new resource category
createCategory
{ "repo_name": "stephaneperry/Silverpeas-Components", "path": "resources-manager/resources-manager-ejb/src/main/java/com/silverpeas/resourcesmanager/control/ejb/ResourcesManagerBmEJB.java", "license": "agpl-3.0", "size": 25477 }
[ "com.silverpeas.resourcesmanager.model.CategoryDetail", "com.silverpeas.resourcesmanager.model.ResourcesManagerRuntimeException", "com.stratelia.webactiv.util.DBUtil", "com.stratelia.webactiv.util.JNDINames", "com.stratelia.webactiv.util.exception.SilverpeasRuntimeException", "java.sql.Connection", "jav...
import com.silverpeas.resourcesmanager.model.CategoryDetail; import com.silverpeas.resourcesmanager.model.ResourcesManagerRuntimeException; import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.JNDINames; import com.stratelia.webactiv.util.exception.SilverpeasRuntimeException; import java.sql.Co...
import com.silverpeas.resourcesmanager.model.*; import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.exception.*; import java.sql.*;
[ "com.silverpeas.resourcesmanager", "com.stratelia.webactiv", "java.sql" ]
com.silverpeas.resourcesmanager; com.stratelia.webactiv; java.sql;
259,777
private static void updateAttribute(Element parent, String attrName, String value) { if (parent != null) { Attribute attribute = parent.attribute(attrName); if (value != null) { if (attribute == null) { parent.addAttribute(attrName, value); ...
static void function(Element parent, String attrName, String value) { if (parent != null) { Attribute attribute = parent.attribute(attrName); if (value != null) { if (attribute == null) { parent.addAttribute(attrName, value); } else { attribute.setValue(value); } } else { if (attribute != null) { parent.remove(attribut...
/** * Updates the given xml element attribute with the given value.<p> * * @param parent the element to set the attribute for * @param attrName the attribute name * @param value the value to set, or <code>null</code> to remove */
Updates the given xml element attribute with the given value
updateAttribute
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/relations/CmsLinkUpdateUtil.java", "license": "lgpl-2.1", "size": 6746 }
[ "org.dom4j.Attribute", "org.dom4j.Element" ]
import org.dom4j.Attribute; import org.dom4j.Element;
import org.dom4j.*;
[ "org.dom4j" ]
org.dom4j;
385,326
@Nullable public static String encodeForXML(@Nullable String source) { return api().encodeForXML(source); }
static String function(@Nullable String source) { return api().encodeForXML(source); }
/** * Encodes a source string for XML element content. * DO NOT USE FOR WRITING ATTRIBUTE VALUES! * * @param source the input to encode * @return an encoded version of the source */
Encodes a source string for XML element content. DO NOT USE FOR WRITING ATTRIBUTE VALUES
encodeForXML
{ "repo_name": "ist-dresden/composum", "path": "commons/src/main/java/com/composum/sling/core/util/XSS.java", "license": "mit", "size": 12242 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,293,987
private void cleanupConnections() { for (Iterator<Map.Entry<Thread, Connection>> it = conns.entrySet().iterator(); it.hasNext(); ) { Map.Entry<Thread, Connection> entry = it.next(); Thread t = entry.getKey(); if (t.getState() == Thread.State.TERMINATED) { ...
void function() { for (Iterator<Map.Entry<Thread, Connection>> it = conns.entrySet().iterator(); it.hasNext(); ) { Map.Entry<Thread, Connection> entry = it.next(); Thread t = entry.getKey(); if (t.getState() == Thread.State.TERMINATED) { U.close(entry.getValue(), log); it.remove(); } } }
/** * Called periodically by {@link GridTimeoutProcessor} to clean up the {@link #stmtCache}. */
Called periodically by <code>GridTimeoutProcessor</code> to clean up the <code>#stmtCache</code>
cleanupConnections
{ "repo_name": "irudyak/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java", "license": "apache-2.0", "size": 111699 }
[ "java.sql.Connection", "java.util.Iterator", "java.util.Map", "org.apache.ignite.internal.util.typedef.internal.U" ]
import java.sql.Connection; import java.util.Iterator; import java.util.Map; import org.apache.ignite.internal.util.typedef.internal.U;
import java.sql.*; import java.util.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.sql", "java.util", "org.apache.ignite" ]
java.sql; java.util; org.apache.ignite;
2,305,460
@Override public BigDecimal toBigDecimal() { return BigDecimal.ZERO; }
BigDecimal function() { return BigDecimal.ZERO; }
/** * Converts to a Java BigDecimal. */
Converts to a Java BigDecimal
toBigDecimal
{ "repo_name": "CleverCloud/Quercus", "path": "quercus/src/main/java/com/caucho/quercus/env/NullValue.java", "license": "gpl-2.0", "size": 11788 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,785,003
@Test(dataProvider = "image sharing test cases") public void testSharedExperiment(String groupPermissions) throws Exception { final EventContext imageOwner, otherImageOwner, recipient; final ExperimenterGroup dataGroup; imageOwner = newUserAndGroup("rwrw--", true); fi...
@Test(dataProvider = STR) void function(String groupPermissions) throws Exception { final EventContext imageOwner, otherImageOwner, recipient; final ExperimenterGroup dataGroup; imageOwner = newUserAndGroup(STR, true); final long dataGroupId = imageOwner.groupId; dataGroup = new ExperimenterGroupI(dataGroupId, false); ...
/** * Test chown on an image that is used in the same experiment as another's image. * @param groupPermissions the permissions on the group in which the chown is to occur * @throws Exception unexpected */
Test chown on an image that is used in the same experiment as another's image
testSharedExperiment
{ "repo_name": "dominikl/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/chown/PermissionsTest.java", "license": "gpl-2.0", "size": 34686 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,246,639
public static void setUnitParameterValue(String key,String value,Unit unit,String sessionId) throws NoAvailableConnectionException, SQLException{ XAPS xaps = XAPSLoader.getXAPS(sessionId); XAPSUnit xapsUnit = XAPSLoader.getXAPSUnit(sessionId); List<UnitParameter> toAddOrChange = new ArrayList<UnitParameter>...
static void function(String key,String value,Unit unit,String sessionId) throws NoAvailableConnectionException, SQLException{ XAPS xaps = XAPSLoader.getXAPS(sessionId); XAPSUnit xapsUnit = XAPSLoader.getXAPSUnit(sessionId); List<UnitParameter> toAddOrChange = new ArrayList<UnitParameter>(); UnitParameter parameterToUpd...
/** * Adds or changes a single unit parameter. * * @param key the key * @param value the value * @param unit the unit * @param sessionId the session id * @throws NoAvailableConnectionException the no available connection exception * @throws SQLException the sQL exception */
Adds or changes a single unit parameter
setUnitParameterValue
{ "repo_name": "freeacs/web", "path": "src/com/owera/xaps/web/app/page/unit/Parameters.java", "license": "mit", "size": 2689 }
[ "com.owera.common.db.NoAvailableConnectionException", "com.owera.xaps.dbi.Parameter", "com.owera.xaps.dbi.Unit", "com.owera.xaps.dbi.UnitParameter", "com.owera.xaps.dbi.UnittypeParameter", "com.owera.xaps.dbi.XAPSUnit", "com.owera.xaps.web.app.util.XAPSLoader", "java.sql.SQLException", "java.util.Ar...
import com.owera.common.db.NoAvailableConnectionException; import com.owera.xaps.dbi.Parameter; import com.owera.xaps.dbi.Unit; import com.owera.xaps.dbi.UnitParameter; import com.owera.xaps.dbi.UnittypeParameter; import com.owera.xaps.dbi.XAPSUnit; import com.owera.xaps.web.app.util.XAPSLoader; import java.sql.SQLExce...
import com.owera.common.db.*; import com.owera.xaps.dbi.*; import com.owera.xaps.web.app.util.*; import java.sql.*; import java.util.*;
[ "com.owera.common", "com.owera.xaps", "java.sql", "java.util" ]
com.owera.common; com.owera.xaps; java.sql; java.util;
1,585,025
@Test public void testParseHttpOnly() { String testString = "foo=bar; HttpOnly"; CookieModel expected = new CookieModel("foo", "bar"); expected.httpOnly = true; CookieShim actual = CookieShim.parse(testString, expected.creationTime); assertAsExpected(testString, expected,...
void function() { String testString = STR; CookieModel expected = new CookieModel("foo", "bar"); expected.httpOnly = true; CookieShim actual = CookieShim.parse(testString, expected.creationTime); assertAsExpected(testString, expected, actual); testString = STR; expected = new CookieModel("foo", "bar"); expected.httpOnl...
/** * Tests parsing of a cookie with an HttpOnly attribute. */
Tests parsing of a cookie with an HttpOnly attribute
testParseHttpOnly
{ "repo_name": "teamfx/openjfx-9-dev-rt", "path": "modules/javafx.web/src/test/java/test/com/sun/webkit/network/CookieTest.java", "license": "gpl-2.0", "size": 24843 }
[ "com.sun.webkit.network.CookieShim" ]
import com.sun.webkit.network.CookieShim;
import com.sun.webkit.network.*;
[ "com.sun.webkit" ]
com.sun.webkit;
2,340,004
public List<String> verifyOAIharvester() { String oaiSource = harvestRow.getOaiSource(); String oaiSetId = harvestRow.getOaiSetId(); String metaPrefix = harvestRow.getHarvestMetadataConfig(); return verifyOAIharvester(oaiSource, oaiSetId, metaPrefix, true); }
List<String> function() { String oaiSource = harvestRow.getOaiSource(); String oaiSetId = harvestRow.getOaiSetId(); String metaPrefix = harvestRow.getHarvestMetadataConfig(); return verifyOAIharvester(oaiSource, oaiSetId, metaPrefix, true); }
/** * Verify OAI settings for the current collection * @return list of errors encountered during verification. Empty list indicates a "success" condition. */
Verify OAI settings for the current collection
verifyOAIharvester
{ "repo_name": "mdiggory/dryad-repo", "path": "dspace-api/src/main/java/org/dspace/harvest/OAIHarvester.java", "license": "bsd-3-clause", "size": 52145 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
878,277
public static void authenticateUser(String userToken, String collectionId, String articleId, String siteId, JsonHttpResponseHandler handler) throws Unsuppor...
static void function(String userToken, String collectionId, String articleId, String siteId, JsonHttpResponseHandler handler) throws UnsupportedEncodingException { final String authEndpoint =generateAuthEndpoint(userToken, collectionId, articleId, siteId); HttpClient.client.get(authEndpoint, handler); }
/** * Performs a network request on a different thread and delivers a message to the callback. * A JSON object with the results will be bound to the message. * It is necessary to provide either a collectionId or a siteId combined with an articleId. * * @param userToken The lftoken representi...
Performs a network request on a different thread and delivers a message to the callback. A JSON object with the results will be bound to the message. It is necessary to provide either a collectionId or a siteId combined with an articleId
authenticateUser
{ "repo_name": "Livefyre/StreamHub-Android-SDK", "path": "streamhub-android-sdk/src/main/java/com/livefyre/streamhub_android_sdk/network/AdminClient.java", "license": "mit", "size": 3330 }
[ "com.loopj.android.http.JsonHttpResponseHandler", "java.io.UnsupportedEncodingException" ]
import com.loopj.android.http.JsonHttpResponseHandler; import java.io.UnsupportedEncodingException;
import com.loopj.android.http.*; import java.io.*;
[ "com.loopj.android", "java.io" ]
com.loopj.android; java.io;
801,837
public String getCDNManagementURL () { Header header = getResponseHeader(FilesConstants.X_CDN_MANAGEMENT_URL); return header == null ? null : header.getValue(); }
String function () { Header header = getResponseHeader(FilesConstants.X_CDN_MANAGEMENT_URL); return header == null ? null : header.getValue(); }
/** * This method makes no assumptions about the user having been logged in. It simply looks for the CDN Management URL header * as defined by FilesConstants.X_CDN_MANAGEMENT_URL and if this exists it returns its value otherwise the value returned will be null. * * @return null if the user is not l...
This method makes no assumptions about the user having been logged in. It simply looks for the CDN Management URL header as defined by FilesConstants.X_CDN_MANAGEMENT_URL and if this exists it returns its value otherwise the value returned will be null
getCDNManagementURL
{ "repo_name": "stacksync/java-cloudfiles", "path": "src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java", "license": "mit", "size": 9643 }
[ "org.apache.http.Header" ]
import org.apache.http.Header;
import org.apache.http.*;
[ "org.apache.http" ]
org.apache.http;
1,180,642
public void beginPost202NoLocation(ProductInner product) throws CloudException, IOException { beginPost202NoLocationWithServiceResponseAsync(product).toBlocking().single().getBody(); }
void function(ProductInner product) throws CloudException, IOException { beginPost202NoLocationWithServiceResponseAsync(product).toBlocking().single().getBody(); }
/** * Long running post request, service returns a 202 to the initial request, without a location header. * * @param product Product to put * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization */
Long running post request, service returns a 202 to the initial request, without a location header
beginPost202NoLocation
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROSADsInner.java", "license": "mit", "size": 293065 }
[ "com.microsoft.azure.CloudException", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import java.io.IOException;
import com.microsoft.azure.*; import java.io.*;
[ "com.microsoft.azure", "java.io" ]
com.microsoft.azure; java.io;
2,083,119
@Test public void testInterface4() { String[] sourceFiles = new String[] { "./src/test/java/com/github/markusbernhardt/xmldoclet/simpledata/Interface4.java" }; Root rootNode = executeJavadoc(null, null, null, sourceFiles, null, new String[] { "-dryrun" }); Package packageNode = rootNode.getPackage().get...
void function() { String[] sourceFiles = new String[] { STR }; Root rootNode = executeJavadoc(null, null, null, sourceFiles, null, new String[] { STR }); Package packageNode = rootNode.getPackage().get(0); Interface interfaceNode = packageNode.getInterface().get(0); AnnotationInstance annotationInstanceNode = interface...
/** * testing a interface that implements one annotation */
testing a interface that implements one annotation
testInterface4
{ "repo_name": "sandeshh/xml-doclet", "path": "src/test/java/com/github/markusbernhardt/xmldoclet/InterfaceTest.java", "license": "apache-2.0", "size": 14540 }
[ "com.github.markusbernhardt.xmldoclet.simpledata.Interface4", "com.github.markusbernhardt.xmldoclet.xjc.AnnotationInstance", "com.github.markusbernhardt.xmldoclet.xjc.Interface", "com.github.markusbernhardt.xmldoclet.xjc.Package", "com.github.markusbernhardt.xmldoclet.xjc.Root", "org.junit.Assert" ]
import com.github.markusbernhardt.xmldoclet.simpledata.Interface4; import com.github.markusbernhardt.xmldoclet.xjc.AnnotationInstance; import com.github.markusbernhardt.xmldoclet.xjc.Interface; import com.github.markusbernhardt.xmldoclet.xjc.Package; import com.github.markusbernhardt.xmldoclet.xjc.Root; import org.juni...
import com.github.markusbernhardt.xmldoclet.simpledata.*; import com.github.markusbernhardt.xmldoclet.xjc.*; import org.junit.*;
[ "com.github.markusbernhardt", "org.junit" ]
com.github.markusbernhardt; org.junit;
1,368,339
public static boolean writeContent(Channel channel, HttpRequest httpRequest, CarbonMessage carbonMessage) { if (HTTPTransportContextHolder.getInstance().getHandlerExecutor() != null) { HTTPTransportContextHolder.getInstance().getHandlerExecutor(). executeAtTargetRequestReceiv...
static boolean function(Channel channel, HttpRequest httpRequest, CarbonMessage carbonMessage) { if (HTTPTransportContextHolder.getInstance().getHandlerExecutor() != null) { HTTPTransportContextHolder.getInstance().getHandlerExecutor(). executeAtTargetRequestReceiving(carbonMessage); } channel.write(httpRequest); if (c...
/** * Method used to write content to outbound endpoint. * * @param channel OutboundChanel * @param httpRequest HTTPRequest * @param carbonMessage Carbon Message * @return */
Method used to write content to outbound endpoint
writeContent
{ "repo_name": "thusithathilina/carbon-transports", "path": "http/org.wso2.carbon.transport.http.netty/src/main/java/org/wso2/carbon/transport/http/netty/sender/channel/ChannelUtils.java", "license": "apache-2.0", "size": 9320 }
[ "io.netty.buffer.ByteBuf", "io.netty.buffer.Unpooled", "io.netty.channel.Channel", "io.netty.handler.codec.http.DefaultHttpContent", "io.netty.handler.codec.http.HttpContent", "io.netty.handler.codec.http.HttpRequest", "io.netty.handler.codec.http.LastHttpContent", "java.nio.ByteBuffer", "org.wso2.c...
import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.Channel; import io.netty.handler.codec.http.DefaultHttpContent; import io.netty.handler.codec.http.HttpContent; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.LastHttpContent; import java.nio.Byt...
import io.netty.buffer.*; import io.netty.channel.*; import io.netty.handler.codec.http.*; import java.nio.*; import org.wso2.carbon.messaging.*; import org.wso2.carbon.transport.http.netty.internal.*; import org.wso2.carbon.transport.http.netty.message.*;
[ "io.netty.buffer", "io.netty.channel", "io.netty.handler", "java.nio", "org.wso2.carbon" ]
io.netty.buffer; io.netty.channel; io.netty.handler; java.nio; org.wso2.carbon;
2,290,200
log.info("Persisting RDS data to " + target); // If we'd write to the target directly, another process might try to read the file while we // write it. That would give the client a broken Json. So we first write to a temporary file // and then move the data over atomically. if (!Files.isDirectory(tmpT...
log.info(STR + target); if (!Files.isDirectory(tmpTargetParent)) { try { Files.createDirectories(tmpTargetParent); } catch (IOException e) { throw new IOException(STR + tmpTargetParent, e); } } try { Files.write(tmpTarget, rdsData.toString().getBytes(StandardCharsets.UTF_8)); } catch (IOException e) { throw new IOExcep...
/** * Persist data fetched from RDS * * @param rdsData the data to persist * @throws IOException for errors while persisting. */
Persist data fetched from RDS
persist
{ "repo_name": "caistleitner/RdsDataDownloader", "path": "src/main/java/com/seleritycorp/rds/downloader/RdsDataPersister.java", "license": "apache-2.0", "size": 4269 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets", "java.nio.file.Files", "java.nio.file.StandardCopyOption" ]
import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.StandardCopyOption;
import java.io.*; import java.nio.charset.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,020,192
public void updateLinkInformation(OspfLsa ospfLsa, OspfArea ospfArea) { if (ospfLsa.getOspfLsaType().equals(OspfLsaType.ROUTER)) { RouterLsa routerLsa = (RouterLsa) ospfLsa; routerLsa.lsType(); List<OspfLsaLink> ospfLsaLinkList = routerLsa.routerLink(); for (O...
void function(OspfLsa ospfLsa, OspfArea ospfArea) { if (ospfLsa.getOspfLsaType().equals(OspfLsaType.ROUTER)) { RouterLsa routerLsa = (RouterLsa) ospfLsa; routerLsa.lsType(); List<OspfLsaLink> ospfLsaLinkList = routerLsa.routerLink(); for (OspfLsaLink link : ospfLsaLinkList) { if (link.linkType() == 1 link.linkType() ==...
/** * Updates the deviceAndLinkInformation list for received OSPF LSA. * * @param ospfLsa OSPF LSA instance * @param ospfArea OSPF area instance */
Updates the deviceAndLinkInformation list for received OSPF LSA
updateLinkInformation
{ "repo_name": "sdnwiselab/onos", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java", "license": "apache-2.0", "size": 29530 }
[ "java.util.HashSet", "java.util.List", "java.util.Set", "org.onosproject.ospf.controller.OspfArea", "org.onosproject.ospf.controller.OspfLsa", "org.onosproject.ospf.controller.OspfLsaType", "org.onosproject.ospf.protocol.lsa.subtypes.OspfLsaLink", "org.onosproject.ospf.protocol.lsa.types.RouterLsa" ]
import java.util.HashSet; import java.util.List; import java.util.Set; import org.onosproject.ospf.controller.OspfArea; import org.onosproject.ospf.controller.OspfLsa; import org.onosproject.ospf.controller.OspfLsaType; import org.onosproject.ospf.protocol.lsa.subtypes.OspfLsaLink; import org.onosproject.ospf.protocol....
import java.util.*; import org.onosproject.ospf.controller.*; import org.onosproject.ospf.protocol.lsa.subtypes.*; import org.onosproject.ospf.protocol.lsa.types.*;
[ "java.util", "org.onosproject.ospf" ]
java.util; org.onosproject.ospf;
2,168,044
@TargetApi(21) public static boolean isSizeSupportedV21(String mimeType, boolean secure, int width, int height) throws DecoderQueryException { Assertions.checkState(Util.SDK_INT >= 21); MediaCodecInfo.VideoCapabilities videoCapabilities = getVideoCapabilitiesV21(mimeType, secure); return videoCapa...
@TargetApi(21) static boolean function(String mimeType, boolean secure, int width, int height) throws DecoderQueryException { Assertions.checkState(Util.SDK_INT >= 21); MediaCodecInfo.VideoCapabilities videoCapabilities = getVideoCapabilitiesV21(mimeType, secure); return videoCapabilities != null && videoCapabilities.i...
/** * Tests whether the device advertises it can decode video of a given type at a specified width * and height. * <p> * Must not be called if the device SDK version is less than 21. * * @param mimeType The mime type. * @param secure Whether the decoder is required to support secure decryption. Alw...
Tests whether the device advertises it can decode video of a given type at a specified width and height. Must not be called if the device SDK version is less than 21
isSizeSupportedV21
{ "repo_name": "malizadehq/MyTelegram", "path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/MediaCodecUtil.java", "license": "gpl-2.0", "size": 18842 }
[ "android.annotation.TargetApi", "android.media.MediaCodecInfo", "org.telegram.messenger.exoplayer.util.Assertions", "org.telegram.messenger.exoplayer.util.Util" ]
import android.annotation.TargetApi; import android.media.MediaCodecInfo; import org.telegram.messenger.exoplayer.util.Assertions; import org.telegram.messenger.exoplayer.util.Util;
import android.annotation.*; import android.media.*; import org.telegram.messenger.exoplayer.util.*;
[ "android.annotation", "android.media", "org.telegram.messenger" ]
android.annotation; android.media; org.telegram.messenger;
614,581
@Test public void testTargetEnvironment() { assumeNotNull(TestContext.targetEnvironment()); }
void function() { assumeNotNull(TestContext.targetEnvironment()); }
/** * Unit test to target environment. */
Unit test to target environment
testTargetEnvironment
{ "repo_name": "atf4j/atf4j", "path": "atf4j-core/src/test/java/net/atf4j/core/TestContextTest.java", "license": "gpl-3.0", "size": 4940 }
[ "org.junit.Assume" ]
import org.junit.Assume;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,862,321
public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream) throws IOException { byte [] buf = getBytes(aBuffer); encodeBuffer(buf, aStream); }
void function(ByteBuffer aBuffer, OutputStream aStream) throws IOException { byte [] buf = getBytes(aBuffer); encodeBuffer(buf, aStream); }
/** * Encode the <i>aBuffer</i> ByteBuffer and write the encoded * result to the OutputStream <i>aStream</i>. * <P> * The ByteBuffer's position will be advanced to ByteBuffer's limit. */
Encode the aBuffer ByteBuffer and write the encoded result to the OutputStream aStream. The ByteBuffer's position will be advanced to ByteBuffer's limit
encodeBuffer
{ "repo_name": "djBo/coolview-android", "path": "src/sun/misc/CharacterEncoder.java", "license": "mit", "size": 12074 }
[ "java.io.IOException", "java.io.OutputStream", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,261,045
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); if (tenantMap.get(tenantId) != null) { return tenantMap.get(tenantId).get(mediaType); } return null; }
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); if (tenantMap.get(tenantId) != null) { return tenantMap.get(tenantId).get(mediaType); } return null; }
/** * This method returns the registry path expression of the given media type * @param mediaType media type of the RXT(Configurable artifact) * @return registry path expression */
This method returns the registry path expression of the given media type
getStoragePath
{ "repo_name": "laki88/carbon-registry", "path": "components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/services/RXTStoragePathServiceImpl.java", "license": "apache-2.0", "size": 3112 }
[ "org.wso2.carbon.context.PrivilegedCarbonContext" ]
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.context.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,848,891
public Card setThumbnail(Drawable drawable) { mThumbnail = drawable; return this; }
Card function(Drawable drawable) { mThumbnail = drawable; return this; }
/** * Sets an optional thumbnail drawable that's displayed on the left side of the card. * * @param drawable The drawable to be displayed as a thumbnail. */
Sets an optional thumbnail drawable that's displayed on the left side of the card
setThumbnail
{ "repo_name": "jiachenning/Cards-UI", "path": "library/src/com/afollestad/cardsui/Card.java", "license": "mit", "size": 5850 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,110,215
@Override protected void addNotificationTargets(SnmpTargetMIB arg0, SnmpNotificationMIB arg1) { // TODO Auto-generated method stub }
void function(SnmpTargetMIB arg0, SnmpNotificationMIB arg1) { }
/** * Adds initial notification targets and filters. */
Adds initial notification targets and filters
addNotificationTargets
{ "repo_name": "sujeetr/learn", "path": "snmp/src/test/java/com/sujeet/snmp/agent/simulation/SnmpAgent.java", "license": "mit", "size": 5327 }
[ "org.snmp4j.agent.mo.snmp.SnmpNotificationMIB", "org.snmp4j.agent.mo.snmp.SnmpTargetMIB" ]
import org.snmp4j.agent.mo.snmp.SnmpNotificationMIB; import org.snmp4j.agent.mo.snmp.SnmpTargetMIB;
import org.snmp4j.agent.mo.snmp.*;
[ "org.snmp4j.agent" ]
org.snmp4j.agent;
1,132,294
public Collection<STB> getSTBCollection(){ return stbs; }
Collection<STB> function(){ return stbs; }
/** * Returns the collection of available STBs. */
Returns the collection of available STBs
getSTBCollection
{ "repo_name": "Z-app/zmote", "path": "src/se/z_app/stb/api/zenterio/Discovery.java", "license": "bsd-2-clause", "size": 3737 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
466,518
public DiskInner withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection) { if (this.innerProperties() == null) { this.innerProperties = new DiskProperties(); } this.innerProperties().withEncryptionSettingsCollection(encryptionSettingsCollection...
DiskInner function(EncryptionSettingsCollection encryptionSettingsCollection) { if (this.innerProperties() == null) { this.innerProperties = new DiskProperties(); } this.innerProperties().withEncryptionSettingsCollection(encryptionSettingsCollection); return this; }
/** * Set the encryptionSettingsCollection property: Encryption settings collection used for Azure Disk Encryption, can * contain multiple encryption settings per disk or snapshot. * * @param encryptionSettingsCollection the encryptionSettingsCollection value to set. * @return the DiskInner obj...
Set the encryptionSettingsCollection property: Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot
withEncryptionSettingsCollection
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/DiskInner.java", "license": "mit", "size": 29353 }
[ "com.azure.resourcemanager.compute.models.EncryptionSettingsCollection" ]
import com.azure.resourcemanager.compute.models.EncryptionSettingsCollection;
import com.azure.resourcemanager.compute.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
948,330
@Test public void testValidSslConnectionAdvanced() throws Exception { Configuration sslConfig = createSslConfig(); sslConfig.setInteger(SSL_INTERNAL_SESSION_CACHE_SIZE, 1); sslConfig.setInteger(SSL_INTERNAL_SESSION_TIMEOUT, 1_000); sslConfig.setInteger(SSL_INTERNAL_HANDSHAKE_TIMEOUT, 1_000); sslConfig.set...
void function() throws Exception { Configuration sslConfig = createSslConfig(); sslConfig.setInteger(SSL_INTERNAL_SESSION_CACHE_SIZE, 1); sslConfig.setInteger(SSL_INTERNAL_SESSION_TIMEOUT, 1_000); sslConfig.setInteger(SSL_INTERNAL_HANDSHAKE_TIMEOUT, 1_000); sslConfig.setInteger(SSL_INTERNAL_CLOSE_NOTIFY_FLUSH_TIMEOUT, ...
/** * Verify valid (advanced) ssl configuration and connection. */
Verify valid (advanced) ssl configuration and connection
testValidSslConnectionAdvanced
{ "repo_name": "hequn8128/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/NettyClientServerSslTest.java", "license": "apache-2.0", "size": 12480 }
[ "org.apache.flink.configuration.Configuration" ]
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.*;
[ "org.apache.flink" ]
org.apache.flink;
681,762
@Generated @Selector("setActionName:") public native void setActionName(String actionName);
@Selector(STR) native void function(String actionName);
/** * Call undoActionName or redoActionName to get the name of the next action to be undone or redone. * Returns @"" if there is nothing to undo/redo or no action names were registered. */
Call undoActionName or redoActionName to get the name of the next action to be undone or redone. Returns @"" if there is nothing to undo/redo or no action names were registered
setActionName
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/NSUndoManager.java", "license": "apache-2.0", "size": 10528 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,165,566
public void setBiographicalCategories(List<String> biographicalCategories) { this.biographicalCategories = biographicalCategories; }
void function(List<String> biographicalCategories) { this.biographicalCategories = biographicalCategories; }
/** * Setter for the biographicalCategories property. * * @param biographicalCategories * the biographicalCategories to set */
Setter for the biographicalCategories property
setBiographicalCategories
{ "repo_name": "hltcoe/annotated-nyt", "path": "src/main/java/com/nytlabs/corpus/NYTCorpusDocument.java", "license": "apache-2.0", "size": 37911 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,377,433
private static Response.ResponseBuilder getFileDownloadResponseBuilder(String fileName) { Response.ResponseBuilder responseBuilder = Response.ok(); updateCorsHeaders(responseBuilder); // add file attachment header responseBuilder.header("Content-Disposition", "attachment; filename=\"...
static Response.ResponseBuilder function(String fileName) { Response.ResponseBuilder responseBuilder = Response.ok(); updateCorsHeaders(responseBuilder); responseBuilder.header(STR, STRSTR\""); return responseBuilder; }
/** * create Response with support for cross site * * @return rest Response */
create Response with support for cross site
getFileDownloadResponseBuilder
{ "repo_name": "alancnet/artifactory", "path": "web/rest-common/src/main/java/org/artifactory/rest/common/util/ResponseHandler.java", "license": "apache-2.0", "size": 2648 }
[ "javax.ws.rs.core.Response" ]
import javax.ws.rs.core.Response;
import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,169,844