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
private static byte[] getArrayFieldVal() { byte[] res = new byte[3]; ThreadLocalRandom.current().nextBytes(res); return res; }
static byte[] function() { byte[] res = new byte[3]; ThreadLocalRandom.current().nextBytes(res); return res; }
/** * Generates random array to use when creating binary object with field of array {@link FieldType type}. */
Generates random array to use when creating binary object with field of array <code>FieldType type</code>
getArrayFieldVal
{ "repo_name": "a1vanov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java", "license": "apache-2.0", "size": 18942 }
[ "java.util.concurrent.ThreadLocalRandom" ]
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
149,449
@Generated @Selector("trackGroups") public native NSArray<? extends AVAssetTrackGroup> trackGroups();
@Selector(STR) native NSArray<? extends AVAssetTrackGroup> function();
/** * [@property] trackGroups * <p> * All track groups in the receiver. * <p> * The value of this property is an NSArray of AVAssetTrackGroups, each representing a different grouping of tracks in the receiver. */
[@property] trackGroups All track groups in the receiver. The value of this property is an NSArray of AVAssetTrackGroups, each representing a different grouping of tracks in the receiver
trackGroups
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/avfoundation/AVAsset.java", "license": "apache-2.0", "size": 38049 }
[ "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;
824,902
public static void addFindBugsNature(IProject project, IProgressMonitor monitor) throws CoreException { if (hasFindBugsNature(project)) { return; } IProjectDescription description = project.getDescription(); String[] prevNatures = description.getNatureIds(); for (...
static void function(IProject project, IProgressMonitor monitor) throws CoreException { if (hasFindBugsNature(project)) { return; } IProjectDescription description = project.getDescription(); String[] prevNatures = description.getNatureIds(); for (int i = 0; i < prevNatures.length; i++) { if (FindbugsPlugin.NATURE_ID.e...
/** * Adds a FindBugs nature to a project. * * @param project * The project the nature will be applied to. * @param monitor * A progress monitor. Must not be null. * @throws CoreException */
Adds a FindBugs nature to a project
addFindBugsNature
{ "repo_name": "johnscancella/spotbugs", "path": "eclipsePlugin/src/de/tobject/findbugs/util/ProjectUtilities.java", "license": "lgpl-2.1", "size": 5251 }
[ "de.tobject.findbugs.FindbugsPlugin", "org.eclipse.core.resources.IProject", "org.eclipse.core.resources.IProjectDescription", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IProgressMonitor" ]
import de.tobject.findbugs.FindbugsPlugin; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor;
import de.tobject.findbugs.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "de.tobject.findbugs", "org.eclipse.core" ]
de.tobject.findbugs; org.eclipse.core;
2,406,973
public static void close(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException sex) { // ignore } }
static void function(ResultSet resultSet) { if (resultSet == null) { return; } try { resultSet.close(); } catch (SQLException sex) { } }
/** * Closes result set safely without throwing an exception. */
Closes result set safely without throwing an exception
close
{ "repo_name": "wsldl123292/jodd", "path": "jodd-db/src/main/java/jodd/db/DbUtil.java", "license": "bsd-3-clause", "size": 3462 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,948,221
public static <T> T convertTo(CamelContext context, Class<T> type, Object value) { notNull(context, "camelContext"); return context.getTypeConverter().convertTo(type, value); }
static <T> T function(CamelContext context, Class<T> type, Object value) { notNull(context, STR); return context.getTypeConverter().convertTo(type, value); }
/** * Converts the given value to the requested type */
Converts the given value to the requested type
convertTo
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-support/src/main/java/org/apache/camel/support/CamelContextHelper.java", "license": "apache-2.0", "size": 30027 }
[ "org.apache.camel.CamelContext", "org.apache.camel.util.ObjectHelper" ]
import org.apache.camel.CamelContext; import org.apache.camel.util.ObjectHelper;
import org.apache.camel.*; import org.apache.camel.util.*;
[ "org.apache.camel" ]
org.apache.camel;
1,477,830
public DataInputStream openDataInputStream() { return m_data_input_stream; }
DataInputStream function() { return m_data_input_stream; }
/** * Get the current data input stream for the stream connection. * * @return data input stream */
Get the current data input stream for the stream connection
openDataInputStream
{ "repo_name": "tommythorn/yari", "path": "shared/cacao-related/phoneme_feature/midp/src/protocol/http/reference/classes/com/sun/midp/io/j2me/http/StreamConnectionElement.java", "license": "gpl-2.0", "size": 5800 }
[ "java.io.DataInputStream" ]
import java.io.DataInputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,371,025
@Override public FilterRegistration getFilterRegistration(String filterName) { return null; }
FilterRegistration function(String filterName) { return null; }
/** * This method always returns {@code null}. * @see javax.servlet.ServletContext#getFilterRegistration(java.lang.String) */
This method always returns null
getFilterRegistration
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.test/org/springframework/mock/web/MockServletContext.java", "license": "mit", "size": 21869 }
[ "javax.servlet.FilterRegistration" ]
import javax.servlet.FilterRegistration;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
773,352
public MicrosoftGraphWorkbookChartLegendFormat withAdditionalProperties(Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; }
MicrosoftGraphWorkbookChartLegendFormat function(Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; }
/** * Set the additionalProperties property: workbookChartLegendFormat. * * @param additionalProperties the additionalProperties value to set. * @return the MicrosoftGraphWorkbookChartLegendFormat object itself. */
Set the additionalProperties property: workbookChartLegendFormat
withAdditionalProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphWorkbookChartLegendFormat.java", "license": "mit", "size": 3722 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,665,158
public static IAST forEachAppend(IAST ast, IASTAppendable result, Function<IExpr, IExpr> function) { int size = ast.size(); for (int i = 1; i < size; i++) { result.append(function.apply(ast.get(i))); } return result; }
static IAST function(IAST ast, IASTAppendable result, Function<IExpr, IExpr> function) { int size = ast.size(); for (int i = 1; i < size; i++) { result.append(function.apply(ast.get(i))); } return result; }
/** * Append each argument of <code>ast</code> to <code>result</code> by applying the given <code> * function</code> to each argument. * * @param ast * @param result * @param function * @return */
Append each argument of <code>ast</code> to <code>result</code> by applying the given <code> function</code> to each argument
forEachAppend
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/eval/util/Lambda.java", "license": "gpl-3.0", "size": 5960 }
[ "java.util.function.Function", "org.matheclipse.core.interfaces.IASTAppendable", "org.matheclipse.core.interfaces.IExpr" ]
import java.util.function.Function; import org.matheclipse.core.interfaces.IASTAppendable; import org.matheclipse.core.interfaces.IExpr;
import java.util.function.*; import org.matheclipse.core.interfaces.*;
[ "java.util", "org.matheclipse.core" ]
java.util; org.matheclipse.core;
76,713
public void processParameters(List<SqlParameter> parameters) { this.callParameters = reconcileParameters(parameters); }
void function(List<SqlParameter> parameters) { this.callParameters = reconcileParameters(parameters); }
/** * Process the list of parameters provided, and if procedure column metadata is used, * the parameters will be matched against the metadata information and any missing * ones will be automatically included. * @param parameters the list of parameters to use as a base */
Process the list of parameters provided, and if procedure column metadata is used, the parameters will be matched against the metadata information and any missing ones will be automatically included
processParameters
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/spring/org/springframework/jdbc/core/metadata/CallMetaDataContext.java", "license": "gpl-2.0", "size": 22849 }
[ "java.util.List", "org.springframework.jdbc.core.SqlParameter" ]
import java.util.List; import org.springframework.jdbc.core.SqlParameter;
import java.util.*; import org.springframework.jdbc.core.*;
[ "java.util", "org.springframework.jdbc" ]
java.util; org.springframework.jdbc;
259,527
List<Member> getMemberChildren(List<Member> members);
List<Member> getMemberChildren(List<Member> members);
/** * Returns direct children of each element of <code>members</code>. * * @param members Array of members * @return array of child members * * @pre members != null * @post return != null */
Returns direct children of each element of <code>members</code>
getMemberChildren
{ "repo_name": "Twixer/mondrian-3.1.5", "path": "src/main/mondrian/olap/SchemaReader.java", "license": "epl-1.0", "size": 14002 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
376,852
@Test public void testGetTransactions_int_int() { try { List result = instance.getTransactions(10, 1); } catch (Exception e) { String error = e.getLocalizedMessage(); if (!error.contains("Transaction is not mapped")) { fail("Exception : " + er...
void function() { try { List result = instance.getTransactions(10, 1); } catch (Exception e) { String error = e.getLocalizedMessage(); if (!error.contains(STR)) { fail(STR + error); } } }
/** * Test of getTransactions method, of class AccountManager. */
Test of getTransactions method, of class AccountManager
testGetTransactions_int_int
{ "repo_name": "B3Partners/kaartenbalie", "path": "src/test/java/nl/b3p/kaartenbalie/core/server/accounting/AccountManagerTest.java", "license": "lgpl-3.0", "size": 4683 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
888,283
EReference getTrace_FirstCommand();
EReference getTrace_FirstCommand();
/** * Returns the meta object for the reference '{@link eu.mondo.collaboration.operationtracemodel.Trace#getFirstCommand <em>First Command</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>First Command</em>'. * @see eu.mondo.collaboration.operatio...
Returns the meta object for the reference '<code>eu.mondo.collaboration.operationtracemodel.Trace#getFirstCommand First Command</code>'.
getTrace_FirstCommand
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/traceModel/src/eu/mondo/collaboration/operationtracemodel/OperationtracemodelPackage.java", "license": "epl-1.0", "size": 59018 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,712,425
private void dateEscape() throws SQLException { if (!getDateTimeField(dateMask)) { throw new SQLException( Messages.get("error.parsesql.syntax", "date", String.valueOf(s)), "22019"); } } static final byte[] timestampMask = { '...
void function() throws SQLException { if (!getDateTimeField(dateMask)) { throw new SQLException( Messages.get(STR, "date", String.valueOf(s)), "22019"); } } static final byte[] timestampMask = { '#','#','#','#','-','#','#','-','#','#',' ', '#','#',':','#','#',':','#','#' };
/** * Process the JDBC escape {d 'CCCC-MM-DD'}. * * @throws SQLException */
Process the JDBC escape {d 'CCCC-MM-DD'}
dateEscape
{ "repo_name": "kcsl/immutability-benchmark", "path": "benchmark-applications/reiminfer-oopsla-2012/source/jTDS/src/net/sourceforge/jtds/jdbc/SQLParser.java", "license": "mit", "size": 29755 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,183,627
public void setColor(Color value);
void function(Color value);
/** * Sets the color to use. * * @param value the color */
Sets the color to use
setColor
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/visualization/image/selectionshape/ColorSelectionShapePainter.java", "license": "gpl-3.0", "size": 1489 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
615,296
EList<Minitl_Binding_Check> getMinitl_Binding_Check_Sequence();
EList<Minitl_Binding_Check> getMinitl_Binding_Check_Sequence();
/** * Returns the value of the '<em><b>Minitl Binding Check Sequence</b></em>' reference list. * The list contents are of type {@link minitlTrace.Steps.Minitl_Binding_Check}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Minitl Binding Check Sequence</em>' reference list isn't clear, * there ...
Returns the value of the 'Minitl Binding Check Sequence' reference list. The list contents are of type <code>minitlTrace.Steps.Minitl_Binding_Check</code>. If the meaning of the 'Minitl Binding Check Sequence' reference list isn't clear, there really should be more of a description here...
getMinitl_Binding_Check_Sequence
{ "repo_name": "tetrabox/minitl", "path": "plugins/org.tetrabox.example.minitl.trace/src/minitlTrace/SpecificTrace.java", "license": "gpl-3.0", "size": 7204 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,579,900
public Collection<FileFilter> getAll() { return filters; } /** * Accept any file that any of our filters will accept. * * {@inheritDoc}
Collection<FileFilter> function() { return filters; } /** * Accept any file that any of our filters will accept. * * {@inheritDoc}
/** * Return all added FileFilters. * * @return collection of FileFilters */
Return all added FileFilters
getAll
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_critics/argouml-app/src/org/argouml/persistence/PersistenceManager.java", "license": "gpl-3.0", "size": 16511 }
[ "java.util.Collection", "javax.swing.filechooser.FileFilter" ]
import java.util.Collection; import javax.swing.filechooser.FileFilter;
import java.util.*; import javax.swing.filechooser.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
2,777,233
@Path("certificates/{attr}") ClientAttributeCertificateResource getCertficateResource(@PathParam("attr") String attributePrefix);
@Path(STR) ClientAttributeCertificateResource getCertficateResource(@PathParam("attr") String attributePrefix);
/** * Get representation of certificate resource * * @param attributePrefix * @return */
Get representation of certificate resource
getCertficateResource
{ "repo_name": "keycloak/keycloak", "path": "integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ClientResource.java", "license": "apache-2.0", "size": 6826 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam;
import javax.ws.rs.*;
[ "javax.ws" ]
javax.ws;
1,853,730
private static void closeStreams(Closeable... streams) { // Added if to avoid NullPointerException in case one stream is being passed as null if (null != streams) { for (Closeable stream : streams) { if (null != stream) { try { stream.close(); } catch (IOException...
static void function(Closeable... streams) { if (null != streams) { for (Closeable stream : streams) { if (null != stream) { try { stream.close(); } catch (IOException e) { LOG.error(STR + stream); } } } } }
/** * This method closes the streams * * @param streams - streams to close. */
This method closes the streams
closeStreams
{ "repo_name": "ksimar/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java", "license": "apache-2.0", "size": 25107 }
[ "java.io.Closeable", "java.io.IOException" ]
import java.io.Closeable; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,072,625
protected Parser createParser(File source) { if (source != null) { String sourceName = source.getName(); int lastDot = sourceName.lastIndexOf('.'); if (lastDot >= 0 && lastDot + 1 < sourceName.length()) { char afterDot = sourceName.charAt(lastDot + 1); ...
Parser function(File source) { if (source != null) { String sourceName = source.getName(); int lastDot = sourceName.lastIndexOf('.'); if (lastDot >= 0 && lastDot + 1 < sourceName.length()) { char afterDot = sourceName.charAt(lastDot + 1); if (afterDot == 'f' afterDot == 'F') { return new FortranParser(); } } } return n...
/** * <p> * Create parser to determine dependencies. * </p> * <p> * Will create appropriate parser (C++, FORTRAN) based on file extension. * </p> * * @param source File */
Create parser to determine dependencies. Will create appropriate parser (C++, FORTRAN) based on file extension.
createParser
{ "repo_name": "dougm/ant-contrib-cpptasks", "path": "src/main/java/net/sf/antcontrib/cpptasks/gcc/cross/sparc_sun_solaris2/GccCCompiler.java", "license": "apache-2.0", "size": 9911 }
[ "java.io.File", "net.sf.antcontrib.cpptasks.parser.CParser", "net.sf.antcontrib.cpptasks.parser.FortranParser", "net.sf.antcontrib.cpptasks.parser.Parser" ]
import java.io.File; import net.sf.antcontrib.cpptasks.parser.CParser; import net.sf.antcontrib.cpptasks.parser.FortranParser; import net.sf.antcontrib.cpptasks.parser.Parser;
import java.io.*; import net.sf.antcontrib.cpptasks.parser.*;
[ "java.io", "net.sf.antcontrib" ]
java.io; net.sf.antcontrib;
1,049,079
public NumericDoubleValues select(final SortedNumericDoubleValues values, final double missingValue) { final NumericDoubleValues singleton = FieldData.unwrapSingleton(values); if (singleton != null) { return new NumericDoubleValues() { private boolean hasValue;
NumericDoubleValues function(final SortedNumericDoubleValues values, final double missingValue) { final NumericDoubleValues singleton = FieldData.unwrapSingleton(values); if (singleton != null) { return new NumericDoubleValues() { private boolean hasValue;
/** * Return a {@link NumericDoubleValues} instance that can be used to sort documents * with this mode and the provided values. When a document has no value, * <code>missingValue</code> is returned. * * Allowed Modes: SUM, AVG, MEDIAN, MIN, MAX */
Return a <code>NumericDoubleValues</code> instance that can be used to sort documents with this mode and the provided values. When a document has no value, <code>missingValue</code> is returned. Allowed Modes: SUM, AVG, MEDIAN, MIN, MAX
select
{ "repo_name": "Stacey-Gammon/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/MultiValueMode.java", "license": "apache-2.0", "size": 36273 }
[ "org.elasticsearch.index.fielddata.FieldData", "org.elasticsearch.index.fielddata.NumericDoubleValues", "org.elasticsearch.index.fielddata.SortedNumericDoubleValues" ]
import org.elasticsearch.index.fielddata.FieldData; import org.elasticsearch.index.fielddata.NumericDoubleValues; import org.elasticsearch.index.fielddata.SortedNumericDoubleValues;
import org.elasticsearch.index.fielddata.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
2,128,201
private I_CmsStringModel createStringModel(final CmsUUID id, final String propName, final boolean isStructure) { final CmsClientProperty property = m_properties.get(propName); return new I_CmsStringModel() { private boolean m_active; private EventBus m_eventBus = new Simp...
I_CmsStringModel function(final CmsUUID id, final String propName, final boolean isStructure) { final CmsClientProperty property = m_properties.get(propName); return new I_CmsStringModel() { private boolean m_active; private EventBus m_eventBus = new SimpleEventBus();
/** * Creates a string model which uses a field of a CmsClientProperty for storing its value.<p> * * @param id the structure id * @param propName the property id * @param isStructure if true, the structure value field should be used, else the resource value field * * * @return th...
Creates a string model which uses a field of a CmsClientProperty for storing its value
createStringModel
{ "repo_name": "ggiudetti/opencms-core", "path": "src-gwt/org/opencms/gwt/client/property/CmsSimplePropertyEditor.java", "license": "lgpl-2.1", "size": 12488 }
[ "com.google.gwt.event.shared.EventBus", "com.google.gwt.event.shared.SimpleEventBus", "org.opencms.gwt.shared.property.CmsClientProperty", "org.opencms.util.CmsUUID" ]
import com.google.gwt.event.shared.EventBus; import com.google.gwt.event.shared.SimpleEventBus; import org.opencms.gwt.shared.property.CmsClientProperty; import org.opencms.util.CmsUUID;
import com.google.gwt.event.shared.*; import org.opencms.gwt.shared.property.*; import org.opencms.util.*;
[ "com.google.gwt", "org.opencms.gwt", "org.opencms.util" ]
com.google.gwt; org.opencms.gwt; org.opencms.util;
2,216,285
public static EventState persist(Session session, boolean external) { return new EventState(Event.PERSIST, null, null, null, null, null, null, session, external); } /** * {@inheritDoc}
static EventState function(Session session, boolean external) { return new EventState(Event.PERSIST, null, null, null, null, null, null, session, external); } /** * {@inheritDoc}
/** * Creates a new {@link javax.jcr.observation.Event} of type * {@link javax.jcr.observation.Event#PERSIST}. * * @param session the session that changed the property. * @param external flag indicating whether this is an external event * @return an <code>EventState</code> instance. ...
Creates a new <code>javax.jcr.observation.Event</code> of type <code>javax.jcr.observation.Event#PERSIST</code>
persist
{ "repo_name": "Overseas-Student-Living/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java", "license": "apache-2.0", "size": 37993 }
[ "javax.jcr.Session", "javax.jcr.observation.Event" ]
import javax.jcr.Session; import javax.jcr.observation.Event;
import javax.jcr.*; import javax.jcr.observation.*;
[ "javax.jcr" ]
javax.jcr;
1,743,360
@Test public void testGetInputs() { assertEquals(dataBundle, execution.getDataBundle()); }
void function() { assertEquals(dataBundle, execution.getDataBundle()); }
/** * Test method for {@link org.apache.taverna.platform.execution.api.AbstractExecution#getInputs()}. */
Test method for <code>org.apache.taverna.platform.execution.api.AbstractExecution#getInputs()</code>
testGetInputs
{ "repo_name": "apache/incubator-taverna-engine", "path": "taverna-execution-api/src/test/java/org/apache/taverna/platform/execution/api/AbstractExecutionTest.java", "license": "apache-2.0", "size": 3752 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
801,608
public MetaProperty<CurrencyAmount> tickValue() { return tickValue; }
MetaProperty<CurrencyAmount> function() { return tickValue; }
/** * The meta-property for the {@code tickValue} property. * @return the meta-property, not null */
The meta-property for the tickValue property
tickValue
{ "repo_name": "ChinaQuants/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/SecurityPriceInfo.java", "license": "apache-2.0", "size": 18662 }
[ "com.opengamma.strata.basics.currency.CurrencyAmount", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.basics.currency.CurrencyAmount; import org.joda.beans.MetaProperty;
import com.opengamma.strata.basics.currency.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
517,065
@Test public void removeIndicesFrontToBack() { IntegerHighSparsityChunk iasc = new IntegerHighSparsityChunk(0); DoubleHighSparsityChunk dasc = new DoubleHighSparsityChunk(0); for (int i = 0; i < 1000; i += 10) { iasc.set(i, 1); dasc.set(i, 1); } for (int i = 0; i < 1000; i += 10) { iasc.set(i, 0...
void function() { IntegerHighSparsityChunk iasc = new IntegerHighSparsityChunk(0); DoubleHighSparsityChunk dasc = new DoubleHighSparsityChunk(0); for (int i = 0; i < 1000; i += 10) { iasc.set(i, 1); dasc.set(i, 1); } for (int i = 0; i < 1000; i += 10) { iasc.set(i, 0); dasc.set(i, 0); } for (int i = 0; i < 1000; i++) {...
/** * Remove indices front to back. */
Remove indices front to back
removeIndicesFrontToBack
{ "repo_name": "cm-is-dog/rapidminer-studio-core", "path": "src/test/java/com/rapidminer/example/table/internal/SparseChunkTest.java", "license": "agpl-3.0", "size": 5752 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,318,367
public List<V> getCachedValues(List<K> keys) { List<V> values = new ArrayList<V>(); for (K key : keys) { if (cache.containsKey(key)) { values.add(cache.get(key)); } } return values; }
List<V> function(List<K> keys) { List<V> values = new ArrayList<V>(); for (K key : keys) { if (cache.containsKey(key)) { values.add(cache.get(key)); } } return values; }
/** * Will return cached objects for given keys. If no key is found, no object * is added to the return. * * @param keys * keys to search in the cache * @return cached objects for the given known keys */
Will return cached objects for given keys. If no key is found, no object is added to the return
getCachedValues
{ "repo_name": "wadanii/kulturarv", "path": "src/dk/codeunited/kulturarv/kulturarvClient/cache/AbstractCache.java", "license": "gpl-3.0", "size": 1999 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,629,098
public final boolean canConsiderSessionRecovery(Context context) { String sessionId = Utils.getStringFromPreference(context, PREFS_KEY_SESSION_ID); String routeId = Utils.getStringFromPreference(context, PREFS_KEY_ROUTE_ID); if (null == sessionId || null == routeId) { return fals...
final boolean function(Context context) { String sessionId = Utils.getStringFromPreference(context, PREFS_KEY_SESSION_ID); String routeId = Utils.getStringFromPreference(context, PREFS_KEY_ROUTE_ID); if (null == sessionId null == routeId) { return false; } LOGD(TAG, STR + STR); return true; }
/** * Returns <code>true</code> if there is enough persisted information to attempt a session * recovery. For this to return <code>true</code>, there needs to be persisted session ID and * route ID from the last successful launch. * * @param context * @return */
Returns <code>true</code> if there is enough persisted information to attempt a session recovery. For this to return <code>true</code>, there needs to be persisted session ID and route ID from the last successful launch
canConsiderSessionRecovery
{ "repo_name": "hanspeide/CastSupportLib", "path": "src/com/google/sample/castcompanionlibrary/cast/BaseCastManager.java", "license": "apache-2.0", "size": 43986 }
[ "android.content.Context", "com.google.sample.castcompanionlibrary.utils.Utils" ]
import android.content.Context; import com.google.sample.castcompanionlibrary.utils.Utils;
import android.content.*; import com.google.sample.castcompanionlibrary.utils.*;
[ "android.content", "com.google.sample" ]
android.content; com.google.sample;
2,557,965
protected ChangeLevel setAlarmState(final SeverityLevel current_severity, final SeverityLevel severity, final String message, final Instant timestamp) { ChangeLevel level = setAlarmState(current_severity, severity, message, this); if (level == ChangeLevel.NONE) ...
ChangeLevel function(final SeverityLevel current_severity, final SeverityLevel severity, final String message, final Instant timestamp) { ChangeLevel level = setAlarmState(current_severity, severity, message, this); if (level == ChangeLevel.NONE) return level; this.timestamp = timestamp; return level; }
/** Update status/message/time stamp and maximize * severities of parent entries. * * Ends up maximizing severity of parent chain, * so caller must lock root. * * @param current_severity Current severity of PV * @param severity Alarm severity * @param message Alarm message ...
Update status/message/time stamp and maximize severities of parent entries. Ends up maximizing severity of parent chain, so caller must lock root
setAlarmState
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "applications/alarm/alarm-plugins/org.csstudio.alarm.beast/src/org/csstudio/alarm/beast/client/AlarmTreeLeaf.java", "license": "epl-1.0", "size": 4717 }
[ "java.time.Instant", "org.csstudio.alarm.beast.SeverityLevel" ]
import java.time.Instant; import org.csstudio.alarm.beast.SeverityLevel;
import java.time.*; import org.csstudio.alarm.beast.*;
[ "java.time", "org.csstudio.alarm" ]
java.time; org.csstudio.alarm;
149,408
azure .kubernetesClusters() .manager() .serviceClient() .getManagedClusters() .start("rg1", "clustername1", Context.NONE); }
azure .kubernetesClusters() .manager() .serviceClient() .getManagedClusters() .start("rg1", STR, Context.NONE); }
/** * Sample code: Start Managed Cluster. * * @param azure The entry point for accessing resource management APIs in Azure. */
Sample code: Start Managed Cluster
startManagedCluster
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java", "license": "mit", "size": 967 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
2,286,666
JdbcTemplate getJdbcTemplate();
JdbcTemplate getJdbcTemplate();
/** * Returns a JDBC template for performing database operations. * * @return A JDBC template. */
Returns a JDBC template for performing database operations
getJdbcTemplate
{ "repo_name": "ibmibmibm/libresonic", "path": "libresonic-main/src/main/java/org/libresonic/player/dao/DaoHelper.java", "license": "gpl-3.0", "size": 1507 }
[ "org.springframework.jdbc.core.JdbcTemplate" ]
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.*;
[ "org.springframework.jdbc" ]
org.springframework.jdbc;
1,385,038
public static final void rescheduleMissedAlarms(ContentResolver cr, Context context, AlarmManager manager) { // Get all the alerts that have been scheduled but have not fired // and should have fired by now and are not too old. long now = System.currentTimeMil...
static final void function(ContentResolver cr, Context context, AlarmManager manager) { long now = System.currentTimeMillis(); long ancient = now - DateUtils.DAY_IN_MILLIS; String[] projection = new String[] { ALARM_TIME, }; Cursor cursor = CalendarAlerts.query(cr, projection, WHERE_RESCHEDULE_MISSED_ALARMS, new String...
/** * Searches the CalendarAlerts table for alarms that should have fired * but have not and then reschedules them. This method can be called * at boot time to restore alarms that may have been lost due to a * phone reboot. * * @param cr the ContentResolver ...
Searches the CalendarAlerts table for alarms that should have fired but have not and then reschedules them. This method can be called at boot time to restore alarms that may have been lost due to a phone reboot
rescheduleMissedAlarms
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/provider/Calendar.java", "license": "gpl-3.0", "size": 57284 }
[ "android.app.AlarmManager", "android.content.ContentResolver", "android.content.Context", "android.database.Cursor", "android.text.format.DateUtils", "android.util.Log" ]
import android.app.AlarmManager; import android.content.ContentResolver; import android.content.Context; import android.database.Cursor; import android.text.format.DateUtils; import android.util.Log;
import android.app.*; import android.content.*; import android.database.*; import android.text.format.*; import android.util.*;
[ "android.app", "android.content", "android.database", "android.text", "android.util" ]
android.app; android.content; android.database; android.text; android.util;
916,598
@Override public Object clone() { GraphicsState cState = new GraphicsState(); cState.cliprgn = null; // copy immutable fields cState.strokePaint = this.strokePaint; cState.fillPaint = this.fillPaint; cState.strokeAlpha = th...
Object function() { GraphicsState cState = new GraphicsState(); cState.cliprgn = null; cState.strokePaint = this.strokePaint; cState.fillPaint = this.fillPaint; cState.strokeAlpha = this.strokeAlpha; cState.fillAlpha = this.fillAlpha; cState.stroke = new BasicStroke(this.stroke.getLineWidth(), this.stroke.getEndCap(), ...
/** Clone this Graphics state. * * Note that cliprgn is not cloned. It must be set manually from * the current graphics object's clip */
Clone this Graphics state. Note that cliprgn is not cloned. It must be set manually from the current graphics object's clip
clone
{ "repo_name": "denisfalqueto/PDFrenderer", "path": "src/main/java/com/sun/pdfview/PDFRenderer.java", "license": "lgpl-2.1", "size": 34029 }
[ "java.awt.BasicStroke", "java.awt.geom.AffineTransform" ]
import java.awt.BasicStroke; import java.awt.geom.AffineTransform;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,228,953
public void removeMouseListener(MapMouseListener listener) { if (listener == null) { throw new IllegalArgumentException(Messages.getString("arg_null_error")); // $NON-NLS-1$ } toolManager.removeMouseListener(listener); } /** * Register an object that wishes to rece...
void function(MapMouseListener listener) { if (listener == null) { throw new IllegalArgumentException(Messages.getString(STR)); } toolManager.removeMouseListener(listener); } /** * Register an object that wishes to receive {@code MapPaneEvent}s * * @param listener an object that implements {@code MapPaneListener}
/** * Unregister the {@code MapMouseListener} object. * * @param listener the listener to remove * @throws IllegalArgumentException if listener is null */
Unregister the MapMouseListener object
removeMouseListener
{ "repo_name": "geotools/geotools", "path": "modules/unsupported/swt/src/main/java/org/geotools/swt/SwtMapPane.java", "license": "lgpl-2.1", "size": 48335 }
[ "org.geotools.swt.event.MapMouseListener", "org.geotools.swt.event.MapPaneEvent", "org.geotools.swt.event.MapPaneListener", "org.geotools.swt.utils.Messages" ]
import org.geotools.swt.event.MapMouseListener; import org.geotools.swt.event.MapPaneEvent; import org.geotools.swt.event.MapPaneListener; import org.geotools.swt.utils.Messages;
import org.geotools.swt.event.*; import org.geotools.swt.utils.*;
[ "org.geotools.swt" ]
org.geotools.swt;
215,457
@Override @BeanTagAttribute(name = "simpleConstraint", type = BeanTagAttribute.AttributeType.SINGLEBEAN) public SimpleConstraint getSimpleConstraint() { return this.simpleConstraint; }
@BeanTagAttribute(name = STR, type = BeanTagAttribute.AttributeType.SINGLEBEAN) SimpleConstraint function() { return this.simpleConstraint; }
/** * Simple constraints for the input field * * <p> * A simple constraint which store the values for constraints such as required, * min/max length, and min/max value. * </p> * * @return the simple constraint of the input field */
Simple constraints for the input field A simple constraint which store the values for constraints such as required, min/max length, and min/max value.
getSimpleConstraint
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/field/InputField.java", "license": "apache-2.0", "size": 55426 }
[ "org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute", "org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint" ]
import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint;
import org.kuali.rice.krad.datadictionary.parse.*; import org.kuali.rice.krad.datadictionary.validation.constraint.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,557,737
public Builder setPairingTs(long pairingTs) { this.pairingTs = TimestampUtils.getISO8601StringForTime(pairingTs); return this; }
Builder function(long pairingTs) { this.pairingTs = TimestampUtils.getISO8601StringForTime(pairingTs); return this; }
/** * Set pairing time * * @param pairingTs The time the device was paired * @return a reference to this {@code Builder} object to fulfill the "Builder" pattern */
Set pairing time
setPairingTs
{ "repo_name": "fitpay/fitpay-android-sdk", "path": "fitpay/src/main/java/com/fitpay/android/api/models/device/Device.java", "license": "mit", "size": 22454 }
[ "com.fitpay.android.utils.TimestampUtils" ]
import com.fitpay.android.utils.TimestampUtils;
import com.fitpay.android.utils.*;
[ "com.fitpay.android" ]
com.fitpay.android;
13,767
public static synchronized List<GPUContext> getAllGPUContexts() { if (!initialized) initializeGPU(); if(!oldAvailableGpus.equals(AVAILABLE_GPUS)) { LOG.warn("GPUContextPool was already initialized with " + DMLConfig.AVAILABLE_GPUS + "=" + oldAvailableGpus + ". Cannot reinitialize it with " + DMLConfig...
static synchronized List<GPUContext> function() { if (!initialized) initializeGPU(); if(!oldAvailableGpus.equals(AVAILABLE_GPUS)) { LOG.warn(STR + DMLConfig.AVAILABLE_GPUS + "=" + oldAvailableGpus + STR + DMLConfig.AVAILABLE_GPUS + "=" + AVAILABLE_GPUS); } return pool; }
/** * Gets an initialized list of GPUContexts * * @return null if no GPUContexts in pool, otherwise a valid list of GPUContext */
Gets an initialized list of GPUContexts
getAllGPUContexts
{ "repo_name": "deroneriksson/incubator-systemml", "path": "src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUContextPool.java", "license": "apache-2.0", "size": 8749 }
[ "java.util.List", "org.apache.sysml.conf.DMLConfig" ]
import java.util.List; import org.apache.sysml.conf.DMLConfig;
import java.util.*; import org.apache.sysml.conf.*;
[ "java.util", "org.apache.sysml" ]
java.util; org.apache.sysml;
826,211
// Create REST adapter. if (mRetrofit == null) { final Retrofit.Builder retrofitBuilder = new Retrofit.Builder(); OkHttpClient.Builder builder = new OkHttpClient().newBuilder(); builder.addInterceptor(new HeaderInterceptor()); if (BuildConfig.DEBUG) { ...
if (mRetrofit == null) { final Retrofit.Builder retrofitBuilder = new Retrofit.Builder(); OkHttpClient.Builder builder = new OkHttpClient().newBuilder(); builder.addInterceptor(new HeaderInterceptor()); if (BuildConfig.DEBUG) { builder.addInterceptor(new LoggingInterceptor()); } retrofitBuilder.client(builder.build());...
/** * Get single instance of {@link Retrofit} * with additional {@link OkHttpClient} & {@link HeaderInterceptor} * If debug mode is enabled {@link LoggingInterceptor} is added * * @return instance */
Get single instance of <code>Retrofit</code> with additional <code>OkHttpClient</code> & <code>HeaderInterceptor</code> If debug mode is enabled <code>LoggingInterceptor</code> is added
getRetrofit
{ "repo_name": "VenomVendor/Wordpress-SDK", "path": "src/main/java/com/venomvendor/sdk/wordpress/network/connections/request/ConnectionHandler.java", "license": "apache-2.0", "size": 4170 }
[ "com.venomvendor.sdk.wordpress.BuildConfig", "com.venomvendor.sdk.wordpress.WordpressSDK", "com.venomvendor.sdk.wordpress.network.core.APIFactory" ]
import com.venomvendor.sdk.wordpress.BuildConfig; import com.venomvendor.sdk.wordpress.WordpressSDK; import com.venomvendor.sdk.wordpress.network.core.APIFactory;
import com.venomvendor.sdk.wordpress.*; import com.venomvendor.sdk.wordpress.network.core.*;
[ "com.venomvendor.sdk" ]
com.venomvendor.sdk;
2,903,490
public boolean forOneArbitraryMatch(final Dir pParent, final FSObject pChild, final Consumer<? super ContentInNotLive.Match> processor) { return rawForOneArbitraryMatch(new Object[]{pParent, pChild}, processor); }
boolean function(final Dir pParent, final FSObject pChild, final Consumer<? super ContentInNotLive.Match> processor) { return rawForOneArbitraryMatch(new Object[]{pParent, pChild}, processor); }
/** * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. * Neither determinism nor randomness of selection is guaranteed. * @param pParent the fixed value of pattern parameter parent, or null if not bound. * @param p...
Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. Neither determinism nor randomness of selection is guaranteed
forOneArbitraryMatch
{ "repo_name": "viatra/VIATRA-Generator", "path": "Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/ContentInNotLive.java", "license": "epl-1.0", "size": 31527 }
[ "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem", "java.util.function.Consumer" ]
import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; import java.util.function.Consumer;
import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.*; import java.util.function.*;
[ "hu.bme.mit", "java.util" ]
hu.bme.mit; java.util;
1,186,398
public LogoutConfigurer<H> logoutRequestMatcher(RequestMatcher logoutRequestMatcher) { this.logoutRequestMatcher = logoutRequestMatcher; return this; } /** * The URL to redirect to after logout has occurred. The default is "/login?logout". * This is a shortcut for invoking {@link #logoutSuccessHandler(Log...
LogoutConfigurer<H> function(RequestMatcher logoutRequestMatcher) { this.logoutRequestMatcher = logoutRequestMatcher; return this; } /** * The URL to redirect to after logout has occurred. The default is STR. * This is a shortcut for invoking {@link #logoutSuccessHandler(LogoutSuccessHandler)}
/** * The RequestMatcher that triggers log out to occur. In most circumstances users will * use {@link #logoutUrl(String)} which helps enforce good practices. * * @see #logoutUrl(String) * * @param logoutRequestMatcher the RequestMatcher used to determine if logout should * occur. * @return the {@link L...
The RequestMatcher that triggers log out to occur. In most circumstances users will use <code>#logoutUrl(String)</code> which helps enforce good practices
logoutRequestMatcher
{ "repo_name": "panchenko/spring-security", "path": "config/src/main/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurer.java", "license": "apache-2.0", "size": 11308 }
[ "org.springframework.security.web.authentication.logout.LogoutSuccessHandler", "org.springframework.security.web.util.matcher.RequestMatcher" ]
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.security.web.authentication.logout.*; import org.springframework.security.web.util.matcher.*;
[ "org.springframework.security" ]
org.springframework.security;
417,244
@Deprecated //deprecation: it should be used for debug only and in very rare cases. public void setSync(@Nullable final TObject newValue) { set(newValue).toBlocking().subscribe(); }
void function(@Nullable final TObject newValue) { set(newValue).toBlocking().subscribe(); }
/** * Sets value synchronously. You should NOT use this method normally. Use {@link #set(Object)} asynchronously instead. * * @param newValue Value to set; */
Sets value synchronously. You should NOT use this method normally. Use <code>#set(Object)</code> asynchronously instead
setSync
{ "repo_name": "TouchInstinct/RoboSwag-core", "path": "src/main/java/ru/touchin/roboswag/core/observables/storable/BaseStorable.java", "license": "apache-2.0", "size": 21411 }
[ "android.support.annotation.Nullable" ]
import android.support.annotation.Nullable;
import android.support.annotation.*;
[ "android.support" ]
android.support;
497,333
public static StreamExecutionEnvironment getExecutionEnvironment() { return Utils.resolveFactory(threadLocalContextEnvironmentFactory, contextEnvironmentFactory) .map(StreamExecutionEnvironmentFactory::createExecutionEnvironment) .orElseGet(StreamExecutionEnvironment::createStreamExecutionEnvironment); }
static StreamExecutionEnvironment function() { return Utils.resolveFactory(threadLocalContextEnvironmentFactory, contextEnvironmentFactory) .map(StreamExecutionEnvironmentFactory::createExecutionEnvironment) .orElseGet(StreamExecutionEnvironment::createStreamExecutionEnvironment); }
/** * Creates an execution environment that represents the context in which the * program is currently executed. If the program is invoked standalone, this * method returns a local execution environment, as returned by * {@link #createLocalEnvironment()}. * * @return The execution environment of the context...
Creates an execution environment that represents the context in which the program is currently executed. If the program is invoked standalone, this method returns a local execution environment, as returned by <code>#createLocalEnvironment()</code>
getExecutionEnvironment
{ "repo_name": "fhueske/flink", "path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java", "license": "apache-2.0", "size": 80066 }
[ "org.apache.flink.api.java.Utils" ]
import org.apache.flink.api.java.Utils;
import org.apache.flink.api.java.*;
[ "org.apache.flink" ]
org.apache.flink;
162,111
List<InterceptStrategy> getInterceptStrategies();
List<InterceptStrategy> getInterceptStrategies();
/** * Gets the interceptor strategies * * @return the list of current interceptor strategies */
Gets the interceptor strategies
getInterceptStrategies
{ "repo_name": "shuliangtao/apache-camel-2.13.0-src", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 47147 }
[ "java.util.List", "org.apache.camel.spi.InterceptStrategy" ]
import java.util.List; import org.apache.camel.spi.InterceptStrategy;
import java.util.*; import org.apache.camel.spi.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
1,214,633
@Override public void exitSreuop(@NotNull PoCoParser.SreuopContext ctx) { }
@Override public void exitSreuop(@NotNull PoCoParser.SreuopContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterSreuop
{ "repo_name": "Corjuh/PoCo-Compiler", "path": "Parser/gen/PoCoParserBaseListener.java", "license": "lgpl-2.1", "size": 18482 }
[ "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;
706,484
private boolean shouldCheck(final DetailAST aAST) { final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS); final Scope declaredScope = ScopeUtils.getScopeFromMods(mods); final Scope scope = ScopeUtils.inInterfaceOrAnnotationBlock(aAST) ? Scope...
boolean function(final DetailAST aAST) { final DetailAST mods = aAST.findFirstToken(TokenTypes.MODIFIERS); final Scope declaredScope = ScopeUtils.getScopeFromMods(mods); final Scope scope = ScopeUtils.inInterfaceOrAnnotationBlock(aAST) ? Scope.PUBLIC : declaredScope; final Scope surroundingScope = ScopeUtils.getSurroun...
/** * Whether we should check this node. * @param aAST a given node. * @return whether we should check a given node. */
Whether we should check this node
shouldCheck
{ "repo_name": "maikelsteneker/checkstyle-throwsIndent", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java", "license": "lgpl-2.1", "size": 11849 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.Scope", "com.puppycrawl.tools.checkstyle.api.ScopeUtils", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.Scope; import com.puppycrawl.tools.checkstyle.api.ScopeUtils; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
1,440,830
private List<Cloudlet> createCloudlets() { final List<Cloudlet> list = new ArrayList<>(CLOUDLETS); UtilizationModel utilization = new UtilizationModelFull(); for (int c = 0; c < CLOUDLETS; c++) { Cloudlet cloudlet = new CloudletSimple(c, CLOUDLET_LENGTH, CLOUDLET_...
List<Cloudlet> function() { final List<Cloudlet> list = new ArrayList<>(CLOUDLETS); UtilizationModel utilization = new UtilizationModelFull(); for (int c = 0; c < CLOUDLETS; c++) { Cloudlet cloudlet = new CloudletSimple(c, CLOUDLET_LENGTH, CLOUDLET_PES) .setFileSize(1024) .setOutputSize(1024) .setUtilizationModel(utili...
/** * Creates a list of Cloudlets. */
Creates a list of Cloudlets
createCloudlets
{ "repo_name": "RaysaOliveira/cloudsim-plus", "path": "cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/CloudletSchedulerTimeSharedExample1.java", "license": "gpl-3.0", "size": 6997 }
[ "java.util.ArrayList", "java.util.List", "org.cloudbus.cloudsim.cloudlets.Cloudlet", "org.cloudbus.cloudsim.cloudlets.CloudletSimple", "org.cloudbus.cloudsim.utilizationmodels.UtilizationModel", "org.cloudbus.cloudsim.utilizationmodels.UtilizationModelFull" ]
import java.util.ArrayList; import java.util.List; import org.cloudbus.cloudsim.cloudlets.Cloudlet; import org.cloudbus.cloudsim.cloudlets.CloudletSimple; import org.cloudbus.cloudsim.utilizationmodels.UtilizationModel; import org.cloudbus.cloudsim.utilizationmodels.UtilizationModelFull;
import java.util.*; import org.cloudbus.cloudsim.cloudlets.*; import org.cloudbus.cloudsim.utilizationmodels.*;
[ "java.util", "org.cloudbus.cloudsim" ]
java.util; org.cloudbus.cloudsim;
1,646,233
public FeatureResultSet queryFeaturesForChunk(String[] columns, double minX, double minY, double maxX, double maxY, int limit, long offset) { return queryFeaturesForChunk(columns, minX, minY, maxX, maxY, getPkColumnName(), limit, offset); }
FeatureResultSet function(String[] columns, double minX, double minY, double maxX, double maxY, int limit, long offset) { return queryFeaturesForChunk(columns, minX, minY, maxX, maxY, getPkColumnName(), limit, offset); }
/** * Query for features within the bounds ordered by id, starting at the * offset and returning no more than the limit * * @param columns * columns * @param minX * min x * @param minY * min y * @param maxX * max x * @param maxY * max y ...
Query for features within the bounds ordered by id, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "mil.nga.geopackage.features.user.FeatureResultSet" ]
import mil.nga.geopackage.features.user.FeatureResultSet;
import mil.nga.geopackage.features.user.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
1,962,737
public boolean isBurning(IBlockAccess world, BlockPos pos) { return false; }
boolean function(IBlockAccess world, BlockPos pos) { return false; }
/** * Determines if this block should set fire and deal fire damage * to entities coming into contact with it. * * @param world The current world * @param pos Block position in world * @return True if the block should deal damage */
Determines if this block should set fire and deal fire damage to entities coming into contact with it
isBurning
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java", "license": "gpl-3.0", "size": 115325 }
[ "net.minecraft.util.math.BlockPos", "net.minecraft.world.IBlockAccess" ]
import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess;
import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
1,530,841
public void setFeatureTypeInfo(final Collection<? extends FeatureTypeInfo> newValues) { featureTypes = writeCollection(newValues, featureTypes, FeatureTypeInfo.class); }
void function(final Collection<? extends FeatureTypeInfo> newValues) { featureTypes = writeCollection(newValues, featureTypes, FeatureTypeInfo.class); }
/** * Sets the subset of feature types from cited feature catalogue occurring in resource. * * @param newValues The new feature types. * * @since 0.5 */
Sets the subset of feature types from cited feature catalogue occurring in resource
setFeatureTypeInfo
{ "repo_name": "desruisseaux/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureCatalogueDescription.java", "license": "apache-2.0", "size": 11510 }
[ "java.util.Collection", "org.opengis.metadata.content.FeatureTypeInfo" ]
import java.util.Collection; import org.opengis.metadata.content.FeatureTypeInfo;
import java.util.*; import org.opengis.metadata.content.*;
[ "java.util", "org.opengis.metadata" ]
java.util; org.opengis.metadata;
245,996
public static <T> Expression stax(String clazzName, boolean isNamespaceAware) { return new StAXJAXBIteratorExpression<T>(clazzName, isNamespaceAware); }
static <T> Expression function(String clazzName, boolean isNamespaceAware) { return new StAXJAXBIteratorExpression<T>(clazzName, isNamespaceAware); }
/** * Creates a {@link org.apache.camel.component.stax.StAXJAXBIteratorExpression}. * * @param clazzName the FQN name of the class which has JAXB annotations to bind POJO. * @param isNamespaceAware sets the namespace awareness of the xml reader */
Creates a <code>org.apache.camel.component.stax.StAXJAXBIteratorExpression</code>
stax
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-stax/src/main/java/org/apache/camel/component/stax/StAXBuilder.java", "license": "apache-2.0", "size": 2451 }
[ "org.apache.camel.Expression" ]
import org.apache.camel.Expression;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
553,362
private CompactSelection selectExpiredStoreFiles( CompactSelection candidates, long maxExpiredTimeStamp) { List<StoreFile> filesToCompact = candidates.getFilesToCompact(); if (filesToCompact == null || filesToCompact.size() == 0) return null; ArrayList<StoreFile> expiredStoreFiles = null; ...
CompactSelection function( CompactSelection candidates, long maxExpiredTimeStamp) { List<StoreFile> filesToCompact = candidates.getFilesToCompact(); if (filesToCompact == null filesToCompact.size() == 0) return null; ArrayList<StoreFile> expiredStoreFiles = null; boolean hasExpiredStoreFiles = false; CompactSelection e...
/** * Select the expired store files to compact * * @param candidates the initial set of storeFiles * @param maxExpiredTimeStamp * The store file will be marked as expired if its max time stamp is * less than this maxExpiredTimeStamp. * @return A CompactSelection contains the expi...
Select the expired store files to compact
selectExpiredStoreFiles
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/CompactionPolicy.java", "license": "apache-2.0", "size": 15697 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hbase.regionserver.StoreFile" ]
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.regionserver.StoreFile;
import java.util.*; import org.apache.hadoop.hbase.regionserver.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,095,057
public void testReturnTrueWhenISpecifyALocationAndInputLocationIsNull() { NullEqualToIsParentOrIsGrandparentOfCurrentLocation predicate = new NullEqualToIsParentOrIsGrandparentOfCurrentLocation(Suppliers.ofInstance(region)); Hardware md = new HardwareBuilder().id("foo").location(null).build(); asse...
void function() { NullEqualToIsParentOrIsGrandparentOfCurrentLocation predicate = new NullEqualToIsParentOrIsGrandparentOfCurrentLocation(Suppliers.ofInstance(region)); Hardware md = new HardwareBuilder().id("foo").location(null).build(); assertTrue(predicate.apply(md)); }
/** * If the input location is null, then the data isn't location sensitive */
If the input location is null, then the data isn't location sensitive
testReturnTrueWhenISpecifyALocationAndInputLocationIsNull
{ "repo_name": "yanzhijun/jclouds-aliyun", "path": "compute/src/test/java/org/jclouds/compute/domain/internal/NullEqualToIsParentOrIsGrandparentOfCurrentLocationTest.java", "license": "apache-2.0", "size": 9234 }
[ "com.google.common.base.Suppliers", "org.jclouds.compute.domain.Hardware", "org.jclouds.compute.domain.HardwareBuilder", "org.testng.Assert" ]
import com.google.common.base.Suppliers; import org.jclouds.compute.domain.Hardware; import org.jclouds.compute.domain.HardwareBuilder; import org.testng.Assert;
import com.google.common.base.*; import org.jclouds.compute.domain.*; import org.testng.*;
[ "com.google.common", "org.jclouds.compute", "org.testng" ]
com.google.common; org.jclouds.compute; org.testng;
278,620
public void setDateTime(Element el, String key, DateTime value) { if (value != null) { String str = value.castToString(null); if (str != null) el.setAttribute(key, str); } }
void function(Element el, String key, DateTime value) { if (value != null) { String str = value.castToString(null); if (str != null) el.setAttribute(key, str); } }
/** * sets a datetime value to a XML Element * * @param el Element to set value on it * @param key key to set * @param value value to set */
sets a datetime value to a XML Element
setDateTime
{ "repo_name": "jzuijlek/Lucee", "path": "core/src/main/java/lucee/runtime/schedule/StorageUtil.java", "license": "lgpl-2.1", "size": 14065 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,056,156
protected void updateActions(List actionIds) { ActionRegistry registry = getActionRegistry(); Iterator iter = actionIds.iterator(); while (iter.hasNext()) { IAction action = registry.getAction(iter.next()); if (action instanceof UpdateAction) ((UpdateAction) action).update(); } }
void function(List actionIds) { ActionRegistry registry = getActionRegistry(); Iterator iter = actionIds.iterator(); while (iter.hasNext()) { IAction action = registry.getAction(iter.next()); if (action instanceof UpdateAction) ((UpdateAction) action).update(); } }
/** * A convenience method for updating a set of actions defined by the given * List of action IDs. The actions are found by looking up the ID in the * {@link #getActionRegistry() action registry}. If the corresponding action * is an {@link UpdateAction}, it will have its <code>update()</code> method * c...
A convenience method for updating a set of actions defined by the given List of action IDs. The actions are found by looking up the ID in the <code>#getActionRegistry() action registry</code>. If the corresponding action is an <code>UpdateAction</code>, it will have its <code>update()</code> method called
updateActions
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.gef/src/org/eclipse/gef/ui/parts/GraphicalEditor.java", "license": "lgpl-2.1", "size": 14380 }
[ "java.util.Iterator", "java.util.List", "org.eclipse.gef.ui.actions.ActionRegistry", "org.eclipse.gef.ui.actions.UpdateAction", "org.eclipse.jface.action.IAction" ]
import java.util.Iterator; import java.util.List; import org.eclipse.gef.ui.actions.ActionRegistry; import org.eclipse.gef.ui.actions.UpdateAction; import org.eclipse.jface.action.IAction;
import java.util.*; import org.eclipse.gef.ui.actions.*; import org.eclipse.jface.action.*;
[ "java.util", "org.eclipse.gef", "org.eclipse.jface" ]
java.util; org.eclipse.gef; org.eclipse.jface;
367,181
public static void partialURLEncodeVal(Appendable dest, String val) throws IOException { for (int i=0; i<val.length(); i++) { char ch = val.charAt(i); if (ch < 32) { dest.append('%'); if (ch < 0x10) dest.append('0'); dest.append(Integer.toHexString(ch)); } else { ...
static void function(Appendable dest, String val) throws IOException { for (int i=0; i<val.length(); i++) { char ch = val.charAt(i); if (ch < 32) { dest.append('%'); if (ch < 0x10) dest.append('0'); dest.append(Integer.toHexString(ch)); } else { switch (ch) { case ' ': dest.append('+'); break; case '&': dest.append("%2...
/** * URLEncodes a value, replacing only enough chars so that * the URL may be unambiguously pasted back into a browser. * <p> * Characters with a numeric value less than 32 are encoded. * &amp;,=,%,+,space are encoded. */
URLEncodes a value, replacing only enough chars so that the URL may be unambiguously pasted back into a browser. Characters with a numeric value less than 32 are encoded. &amp;,=,%,+,space are encoded
partialURLEncodeVal
{ "repo_name": "q474818917/solr-5.2.0", "path": "solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java", "license": "apache-2.0", "size": 9331 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
783,216
@Authorized( { PrivilegeConstants.EDIT_PERSONS }) public PersonAddress unvoidPersonAddress(PersonAddress personAddress) throws APIException;
@Authorized( { PrivilegeConstants.EDIT_PERSONS }) PersonAddress function(PersonAddress personAddress) throws APIException;
/** * Unvoid PersonAddress in the database, effectively marking this as a valid PersonAddress again * * @param personAddress PersonAddress to unvoid * @return the newly unvoided personAddress * @throws APIException * @should unvoid voided personAddress */
Unvoid PersonAddress in the database, effectively marking this as a valid PersonAddress again
unvoidPersonAddress
{ "repo_name": "shiangree/openmrs-core", "path": "api/src/main/java/org/openmrs/api/PersonService.java", "license": "mpl-2.0", "size": 42154 }
[ "org.openmrs.PersonAddress", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import org.openmrs.PersonAddress; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "org.openmrs", "org.openmrs.annotation", "org.openmrs.util" ]
org.openmrs; org.openmrs.annotation; org.openmrs.util;
1,125,631
public void start() { Preconditions.checkState(!isStarted, "Already started");
void function() { Preconditions.checkState(!isStarted, STR);
/** * Starts the initial call. The call is attempted on the caller's thread. Further call attempts * will be scheduled by the {@link RetryingFuture}. */
Starts the initial call. The call is attempted on the caller's thread. Further call attempts will be scheduled by the <code>RetryingFuture</code>
start
{ "repo_name": "googleapis/java-bigquerystorage", "path": "google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/readrows/ReadRowsAttemptCallable.java", "license": "apache-2.0", "size": 10724 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,006,043
void preOrderOperation(PortfolioNode portfolioNode);
void preOrderOperation(PortfolioNode portfolioNode);
/** * Event called before a node is traversed. * * @param portfolioNode the node to be traversed, not null */
Event called before a node is traversed
preOrderOperation
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Core/src/main/java/com/opengamma/core/position/impl/PortfolioNodeTraversalCallback.java", "license": "apache-2.0", "size": 2042 }
[ "com.opengamma.core.position.PortfolioNode" ]
import com.opengamma.core.position.PortfolioNode;
import com.opengamma.core.position.*;
[ "com.opengamma.core" ]
com.opengamma.core;
2,742,258
private static ConcurrentNavigableMap dmap5() { ConcurrentSkipListMap map = new ConcurrentSkipListMap(); assertTrue(map.isEmpty()); map.put(m1, "A"); map.put(m5, "E"); map.put(m3, "C"); map.put(m2, "B"); map.put(m4, "D"); assertFalse(map.isEmpty()); ...
static ConcurrentNavigableMap function() { ConcurrentSkipListMap map = new ConcurrentSkipListMap(); assertTrue(map.isEmpty()); map.put(m1, "A"); map.put(m5, "E"); map.put(m3, "C"); map.put(m2, "B"); map.put(m4, "D"); assertFalse(map.isEmpty()); assertEquals(5, map.size()); return map.descendingMap(); }
/** * Returns a new map from Integers -5 to -1 to Strings "A"-"E". */
Returns a new map from Integers -5 to -1 to Strings "A"-"E"
dmap5
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "jsr166-tests/src/test/java/jsr166/ConcurrentSkipListSubMapTest.java", "license": "gpl-2.0", "size": 42185 }
[ "java.util.concurrent.ConcurrentNavigableMap", "java.util.concurrent.ConcurrentSkipListMap" ]
import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,605,749
java.sql.Date getCurrentSqlDate();
java.sql.Date getCurrentSqlDate();
/** * Returns the current date/time as a java.sql.Date * * @return current date/time */
Returns the current date/time as a java.sql.Date
getCurrentSqlDate
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/core/api/src/main/java/org/kuali/rice/core/api/datetime/DateTimeService.java", "license": "apache-2.0", "size": 6780 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,970,125
public static ExpressionVisitor getDependenciesVisitor(HashSet<DbObject> dependencies) { return new ExpressionVisitor(GET_DEPENDENCIES, 0, dependencies, null, null, null, null); }
static ExpressionVisitor function(HashSet<DbObject> dependencies) { return new ExpressionVisitor(GET_DEPENDENCIES, 0, dependencies, null, null, null, null); }
/** * Create a new visitor object to collect dependencies. * * @param dependencies the dependencies set * @return the new visitor */
Create a new visitor object to collect dependencies
getDependenciesVisitor
{ "repo_name": "titus08/frostwire-desktop", "path": "lib/jars-src/h2-1.3.164/org/h2/expression/ExpressionVisitor.java", "license": "gpl-3.0", "size": 8166 }
[ "java.util.HashSet", "org.h2.engine.DbObject" ]
import java.util.HashSet; import org.h2.engine.DbObject;
import java.util.*; import org.h2.engine.*;
[ "java.util", "org.h2.engine" ]
java.util; org.h2.engine;
1,322,692
public static boolean areItemStacksEqual(@Nullable ItemStack stackA, @Nullable ItemStack stackB) { return stackA == null && stackB == null ? true : (stackA != null && stackB != null ? stackA.isItemStackEqual(stackB) : false); }
static boolean function(@Nullable ItemStack stackA, @Nullable ItemStack stackB) { return stackA == null && stackB == null ? true : (stackA != null && stackB != null ? stackA.isItemStackEqual(stackB) : false); }
/** * compares ItemStack argument1 with ItemStack argument2; returns true if both ItemStacks are equal */
compares ItemStack argument1 with ItemStack argument2; returns true if both ItemStacks are equal
areItemStacksEqual
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/item/ItemStack.java", "license": "lgpl-2.1", "size": 40541 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,699,944
public Map<AlluxioNodeType, ProcessState> remove(final String hostname) { return mCluster.remove(hostname); }
Map<AlluxioNodeType, ProcessState> function(final String hostname) { return mCluster.remove(hostname); }
/** * Remove a node from the cluster. * * @param hostname the node to remove with the given hostname * @return the most recent status of the Alluxio processes known on that node */
Remove a node from the cluster
remove
{ "repo_name": "Alluxio/alluxio", "path": "hub/server/src/main/java/alluxio/hub/manager/util/AlluxioCluster.java", "license": "apache-2.0", "size": 4759 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,312,638
void onEnter(Consumer<? super RequestContext> callback);
void onEnter(Consumer<? super RequestContext> callback);
/** * Registers {@code callback} to be run when re-entering this {@link RequestContext}, usually when using * the {@link #makeContextAware} family of methods. Any thread-local state associated with this context * should be restored by this callback. * * @param callback a {@link Consumer} whose ...
Registers callback to be run when re-entering this <code>RequestContext</code>, usually when using the <code>#makeContextAware</code> family of methods. Any thread-local state associated with this context should be restored by this callback
onEnter
{ "repo_name": "imasahiro/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/RequestContext.java", "license": "apache-2.0", "size": 21953 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
907,098
private static FontBoxFont getMappedFont(FontName baseName) { if (!GENERIC_FONTS.containsKey(baseName)) { synchronized (GENERIC_FONTS) { if (!GENERIC_FONTS.containsKey(baseName)) { PDType1Font type1Font = new PDT...
static FontBoxFont function(FontName baseName) { if (!GENERIC_FONTS.containsKey(baseName)) { synchronized (GENERIC_FONTS) { if (!GENERIC_FONTS.containsKey(baseName)) { PDType1Font type1Font = new PDType1Font(baseName); GENERIC_FONTS.put(baseName, type1Font.getFontBoxFont()); } } } return GENERIC_FONTS.get(baseName); }
/** * Returns the mapped font for the specified Standard 14 font. The mapped font is cached. * * @param baseName name of the standard 14 font * @return the mapped font */
Returns the mapped font for the specified Standard 14 font. The mapped font is cached
getMappedFont
{ "repo_name": "apache/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/Standard14Fonts.java", "license": "apache-2.0", "size": 12965 }
[ "org.apache.fontbox.FontBoxFont" ]
import org.apache.fontbox.FontBoxFont;
import org.apache.fontbox.*;
[ "org.apache.fontbox" ]
org.apache.fontbox;
1,170,967
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (StoryboardsPackage.Literals.STORYBOARD_DIAGRAM__STORYBOARDACTIONS, Storyb...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (StoryboardsPackage.Literals.STORYBOARD_DIAGRAM__STORYBOARDACTIONS, StoryboardsFactory.eINSTANCE.createAction())); newChildDescriptors.add (...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "LeonoraG/storyboard-creator", "path": "eu.scasefp7.eclipse.storyboards.edit/src/eu/scasefp7/eclipse/storyboards/provider/StoryboardDiagramItemProvider.java", "license": "apache-2.0", "size": 6910 }
[ "eu.scasefp7.eclipse.storyboards.StoryboardsFactory", "eu.scasefp7.eclipse.storyboards.StoryboardsPackage", "java.util.Collection" ]
import eu.scasefp7.eclipse.storyboards.StoryboardsFactory; import eu.scasefp7.eclipse.storyboards.StoryboardsPackage; import java.util.Collection;
import eu.scasefp7.eclipse.storyboards.*; import java.util.*;
[ "eu.scasefp7.eclipse", "java.util" ]
eu.scasefp7.eclipse; java.util;
169,367
public void setUserAgent(String userAgent) { HttpProtocolParams.setUserAgent(this.httpClient.getParams(), userAgent); }
void function(String userAgent) { HttpProtocolParams.setUserAgent(this.httpClient.getParams(), userAgent); }
/** * Sets the User-Agent header to be sent with each request. By default, "Android Asynchronous * Http Client/VERSION (http://loopj.com/android-async-http/)" is used. * * @param userAgent the string to use in the User-Agent header. */
Sets the User-Agent header to be sent with each request. By default, "Android Asynchronous Http Client/VERSION (HREF)" is used
setUserAgent
{ "repo_name": "chen-android/guoliao", "path": "seal/src/main/java/com/GuoGuo/JuicyChat/server/network/http/AsyncHttpClient.java", "license": "mit", "size": 40933 }
[ "org.apache.http.params.HttpProtocolParams" ]
import org.apache.http.params.HttpProtocolParams;
import org.apache.http.params.*;
[ "org.apache.http" ]
org.apache.http;
995,791
private void handleInterface(Class<?> anInterface, String instanceFieldName, boolean methodFilter, SourceCodeFormatter eventNameSwitchBlock, SourceCodeFormatter eventIdSwitchBlock) { if (Jvm.dontChain(anInterface)) return; if (!handledInterfaces.add(anInterface)) return; ...
void function(Class<?> anInterface, String instanceFieldName, boolean methodFilter, SourceCodeFormatter eventNameSwitchBlock, SourceCodeFormatter eventIdSwitchBlock) { if (Jvm.dontChain(anInterface)) return; if (!handledInterfaces.add(anInterface)) return; for (@NotNull Method m : anInterface.getMethods()) { Class<?> d...
/** * Generates code for handling all method calls of passed interface. * Called recursively for chained methods. * * @param anInterface Processed interface. * @param instanceFieldName In generated code, methods are executed on field with this name. * @param methodFilter ...
Generates code for handling all method calls of passed interface. Called recursively for chained methods
handleInterface
{ "repo_name": "OpenHFT/Chronicle-Wire", "path": "src/main/java/net/openhft/chronicle/wire/GenerateMethodReader.java", "license": "apache-2.0", "size": 31274 }
[ "java.lang.reflect.Method", "java.lang.reflect.Modifier", "net.openhft.chronicle.core.Jvm", "net.openhft.chronicle.wire.utils.SourceCodeFormatter", "org.jetbrains.annotations.NotNull" ]
import java.lang.reflect.Method; import java.lang.reflect.Modifier; import net.openhft.chronicle.core.Jvm; import net.openhft.chronicle.wire.utils.SourceCodeFormatter; import org.jetbrains.annotations.NotNull;
import java.lang.reflect.*; import net.openhft.chronicle.core.*; import net.openhft.chronicle.wire.utils.*; import org.jetbrains.annotations.*;
[ "java.lang", "net.openhft.chronicle", "org.jetbrains.annotations" ]
java.lang; net.openhft.chronicle; org.jetbrains.annotations;
2,634,187
private void checkm() throws DatatypeException, IOException { if (context.length() == 0) { appendToContext(current); } current = reader.read(); appendToContext(current); skipSpaces(); checkArg('m', "x coordinate"); skipCommaSpaces(); check...
void function() throws DatatypeException, IOException { if (context.length() == 0) { appendToContext(current); } current = reader.read(); appendToContext(current); skipSpaces(); checkArg('m', STR); skipCommaSpaces(); checkArg('m', STR); boolean expectNumber = skipCommaSpaces2(); _checkl('m', expectNumber); }
/** * Checks an 'm' command. */
Checks an 'm' command
checkm
{ "repo_name": "YOTOV-LIMITED/validator", "path": "src/nu/validator/datatype/SvgPathData.java", "license": "mit", "size": 40310 }
[ "java.io.IOException", "org.relaxng.datatype.DatatypeException" ]
import java.io.IOException; import org.relaxng.datatype.DatatypeException;
import java.io.*; import org.relaxng.datatype.*;
[ "java.io", "org.relaxng.datatype" ]
java.io; org.relaxng.datatype;
1,783,963
public static Resource speciation() { return _namespace_CDAO("CDAO_0000121"); }
static Resource function() { return _namespace_CDAO(STR); }
/** * -- No comment or description provided. -- * (http://purl.obolibrary.org/obo/CDAO_0000121) */
-- No comment or description provided. -- (HREF)
speciation
{ "repo_name": "BioInterchange/BioInterchange", "path": "supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/CDAO.java", "license": "mit", "size": 85675 }
[ "com.hp.hpl.jena.rdf.model.Resource" ]
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.*;
[ "com.hp.hpl" ]
com.hp.hpl;
1,656,245
public void crearAgentes() { // Si se produce excepcion al crear alguno de los agentes, se aborta el // proceso. try { logger.debug("GestorAgentes: Creando los agentes definidos en la configuracion."); trazas.aceptaNuevaTraza(new InfoTraza("GestorAgentes", "Creando los agentes definidos en la confi...
void function() { try { logger.debug(STR); trazas.aceptaNuevaTraza(new InfoTraza(STR, STR, InfoTraza.NivelTraza.debug)); if (config == null) config = (ItfUsoConfiguracion) ClaseGeneradoraRepositorioInterfaces.instance() .obtenerInterfaz( NombresPredefinidos.ITF_USO + NombresPredefinidos.CONFIGURACION); listaDescripcion...
/** * Crea los agentes que se especifiquen en la configuracion o los localiza si se encuentran * remotos * */
Crea los agentes que se especifiquen en la configuracion o los localiza si se encuentran remotos
crearAgentes
{ "repo_name": "palomagc/MovieChatter", "path": "src/icaro/gestores/gestorAgentes/comportamiento/AccionesSemanticasGestorAgentes.java", "license": "gpl-2.0", "size": 56312 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
637,714
public SetupSidePanel changeSidePanel(SetupSidePanel sPanel) { sidePanel = sPanel; if(setupPanel != null && sidePanel != null) setupPanel.setSidePanel(sidePanel); final FragmentTransaction ft = fragmentManager.beginTransaction(); if(sidePanel != null){ ft.replace(R.id.fragment_setup_si...
SetupSidePanel function(SetupSidePanel sPanel) { sidePanel = sPanel; if(setupPanel != null && sidePanel != null) setupPanel.setSidePanel(sidePanel); final FragmentTransaction ft = fragmentManager.beginTransaction(); if(sidePanel != null){ ft.replace(R.id.fragment_setup_sidepanel, sidePanel); } ft.commit(); return sideP...
/** * Setup side panel * @param sPanel SetupSidePanel variable. * @return The side panel. */
Setup side panel
changeSidePanel
{ "repo_name": "JayHuang/ChaseMe", "path": "ChaseMe/src/org/chaseme/fragments/helpers/SuperSetupFragment.java", "license": "gpl-3.0", "size": 6865 }
[ "android.support.v4.app.FragmentTransaction", "org.chaseme.fragments.calibration.SetupSidePanel" ]
import android.support.v4.app.FragmentTransaction; import org.chaseme.fragments.calibration.SetupSidePanel;
import android.support.v4.app.*; import org.chaseme.fragments.calibration.*;
[ "android.support", "org.chaseme.fragments" ]
android.support; org.chaseme.fragments;
279,669
public static String getFullDisplayName(@Nullable BlueOrganization org, @Nonnull Item item) { ItemGroup<?> group = getBaseGroup(org); String[] displayNames = Functions.getRelativeDisplayNameFrom(item, group).split(" » "); StringBuilder encodedDisplayName=new StringBuilder(); for(int...
static String function(@Nullable BlueOrganization org, @Nonnull Item item) { ItemGroup<?> group = getBaseGroup(org); String[] displayNames = Functions.getRelativeDisplayNameFrom(item, group).split(STR); StringBuilder encodedDisplayName=new StringBuilder(); for(int i=0;i<displayNames.length;i++) { if(i!=0) { encodedDisp...
/** * Returns full display name relative to the <code>BlueOrganization</code> base. Each display name is separated by * '/' and each display name is url encoded * * @param org the organization the item belongs to * @param item to return the full display name of * * @return full displa...
Returns full display name relative to the <code>BlueOrganization</code> base. Each display name is separated by '/' and each display name is url encoded
getFullDisplayName
{ "repo_name": "kzantow/blueocean-plugin", "path": "blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/AbstractPipelineImpl.java", "license": "mit", "size": 10322 }
[ "hudson.model.Item", "hudson.model.ItemGroup", "io.jenkins.blueocean.rest.model.BlueOrganization", "javax.annotation.Nonnull", "javax.annotation.Nullable" ]
import hudson.model.Item; import hudson.model.ItemGroup; import io.jenkins.blueocean.rest.model.BlueOrganization; import javax.annotation.Nonnull; import javax.annotation.Nullable;
import hudson.model.*; import io.jenkins.blueocean.rest.model.*; import javax.annotation.*;
[ "hudson.model", "io.jenkins.blueocean", "javax.annotation" ]
hudson.model; io.jenkins.blueocean; javax.annotation;
463,337
//---------// // onEvent // //---------// @Override public void onEvent (StubEvent stubEvent) { try { // Ignore RELEASING if (stubEvent.movement == MouseMovement.RELEASING) { return; } SheetStub stub = stubEven...
void function (StubEvent stubEvent) { try { if (stubEvent.movement == MouseMovement.RELEASING) { return; } SheetStub stub = stubEvent.getData(); setStubAvailable(stub != null); setStubValid((stub != null) && stub.isValid()); BookActions.getInstance().updateSheetValidity(stub); if (stub != null) { final OmrStep currentS...
/** * Process received notification of sheet stub selection. * * @param stubEvent the notified sheet stub event */
Process received notification of sheet stub selection
onEvent
{ "repo_name": "Audiveris/audiveris", "path": "src/main/org/audiveris/omr/sheet/ui/StubDependent.java", "license": "agpl-3.0", "size": 22207 }
[ "org.audiveris.omr.sheet.Book", "org.audiveris.omr.sheet.Sheet", "org.audiveris.omr.sheet.SheetStub", "org.audiveris.omr.sig.ui.InterController", "org.audiveris.omr.step.OmrStep", "org.audiveris.omr.ui.selection.MouseMovement", "org.audiveris.omr.ui.selection.StubEvent" ]
import org.audiveris.omr.sheet.Book; import org.audiveris.omr.sheet.Sheet; import org.audiveris.omr.sheet.SheetStub; import org.audiveris.omr.sig.ui.InterController; import org.audiveris.omr.step.OmrStep; import org.audiveris.omr.ui.selection.MouseMovement; import org.audiveris.omr.ui.selection.StubEvent;
import org.audiveris.omr.sheet.*; import org.audiveris.omr.sig.ui.*; import org.audiveris.omr.step.*; import org.audiveris.omr.ui.selection.*;
[ "org.audiveris.omr" ]
org.audiveris.omr;
324,437
public Argument coverExampleBottomUp(List<FeatureTerm> examples, FeatureTerm example, Collection<Argument> acceptedArguments, ArgumentAcceptability aa, Path dp, Path sp, Ontology o, FTKBase dm) throws FeatureTermException { FeatureTerm startingPoint_d = example.readPath(dp).clone(dm, o); FeatureTerm startingP...
Argument function(List<FeatureTerm> examples, FeatureTerm example, Collection<Argument> acceptedArguments, ArgumentAcceptability aa, Path dp, Path sp, Ontology o, FTKBase dm) throws FeatureTermException { FeatureTerm startingPoint_d = example.readPath(dp).clone(dm, o); FeatureTerm startingPoint_s = example.readPath(sp)...
/** * Cover example bottom up. * * @param examples * the examples * @param example * the example * @param acceptedArguments * the accepted arguments * @param aa * the aa * @param dp * the dp * @param sp * the sp * @param o ...
Cover example bottom up
coverExampleBottomUp
{ "repo_name": "santiontanon/fterm", "path": "src/ftl/argumentation/core/ArgumentationBasedLearning.java", "license": "bsd-3-clause", "size": 16316 }
[ "java.util.Collection", "java.util.LinkedList", "java.util.List" ]
import java.util.Collection; import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,504,749
public void setProcessInstance(ProcessInstance processInstance) { this.processInstance = processInstance; }
void function(ProcessInstance processInstance) { this.processInstance = processInstance; }
/** * Set the process instance (when created). */
Set the process instance (when created)
setProcessInstance
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/engine/event/ResponseEventImpl.java", "license": "agpl-3.0", "size": 4186 }
[ "com.silverpeas.workflow.api.instance.ProcessInstance" ]
import com.silverpeas.workflow.api.instance.ProcessInstance;
import com.silverpeas.workflow.api.instance.*;
[ "com.silverpeas.workflow" ]
com.silverpeas.workflow;
213,449
@Path("{tapServiceUUID}") @PUT @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) @StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = "Operation successful"), @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = "N...
@Path(STR) @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) @StatusCodes({ @ResponseCode(code = HttpURLConnection.HTTP_OK, condition = STR), @ResponseCode(code = HttpURLConnection.HTTP_NOT_FOUND, condition = STR), @ResponseCode(code = HttpURLConnection.HTTP_UNAVAILABLE, condition = ST...
/** * Updates a Tap Service. */
Updates a Tap Service
updateTapService
{ "repo_name": "opendaylight/neutron", "path": "northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapServiceNorthbound.java", "license": "epl-1.0", "size": 6187 }
[ "com.webcohesion.enunciate.metadata.rs.ResponseCode", "com.webcohesion.enunciate.metadata.rs.StatusCodes", "java.net.HttpURLConnection", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response" ]
import com.webcohesion.enunciate.metadata.rs.ResponseCode; import com.webcohesion.enunciate.metadata.rs.StatusCodes; import java.net.HttpURLConnection; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.c...
import com.webcohesion.enunciate.metadata.rs.*; import java.net.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "com.webcohesion.enunciate", "java.net", "javax.ws" ]
com.webcohesion.enunciate; java.net; javax.ws;
1,506,848
public int drawText(Canvas canvas, String text, int maxWPix, TextPaint paint) { if (TextUtils.isEmpty(text)) { return 1; } // 需要根据文字长度控制换行 // 测量文字的长度 List<String> mStrList = getDrawRowStr(text, maxWPix, paint); FontMetrics fm = paint....
int function(Canvas canvas, String text, int maxWPix, TextPaint paint) { if (TextUtils.isEmpty(text)) { return 1; } List<String> mStrList = getDrawRowStr(text, maxWPix, paint); FontMetrics fm = paint.getFontMetrics(); int hSize = (int)Math.ceil(fm.descent - fm.ascent); for (int i = 0; i < mStrList.size(); i++) { float ...
/** * Draw text. * * @param canvas the canvas * @param text the text * @param maxWPix the max w pix * @param paint the paint * @return the int */
Draw text
drawText
{ "repo_name": "JinBuHanLin/eshow-android", "path": "eshow_framwork/src/cn/org/eshow/framwork/view/sample/AbTextView.java", "license": "apache-2.0", "size": 10934 }
[ "android.graphics.Canvas", "android.graphics.Paint", "android.text.TextPaint", "android.text.TextUtils", "java.util.List" ]
import android.graphics.Canvas; import android.graphics.Paint; import android.text.TextPaint; import android.text.TextUtils; import java.util.List;
import android.graphics.*; import android.text.*; import java.util.*;
[ "android.graphics", "android.text", "java.util" ]
android.graphics; android.text; java.util;
1,904,061
@ActionDoc(text = "Sends a Tweet via Twitter", returns = "<code>true</code>, if sending the tweet has been successful and <code>false</code> in all other cases.") public static boolean sendTweet(@ParamDoc(name = "tweetTxt", text = "the Tweet to send") String tweetTxt) { if (!TwitterActionService.isPrope...
@ActionDoc(text = STR, returns = STR) static boolean function(@ParamDoc(name = STR, text = STR) String tweetTxt) { if (!TwitterActionService.isProperlyConfigured) { logger.debug(STR); return false; } if (!isEnabled) { logger.debug(STR); return false; } try { tweetTxt = StringUtils.abbreviate(tweetTxt, CHARACTER_LIMIT);...
/** * Sends a Tweet via Twitter * * @param tweetTxt the Tweet to send * * @return <code>true</code>, if sending the tweet has been successful and * <code>false</code> in all other cases. */
Sends a Tweet via Twitter
sendTweet
{ "repo_name": "falkena/openhab", "path": "bundles/action/org.openhab.action.twitter/src/main/java/org/openhab/action/twitter/internal/Twitter.java", "license": "epl-1.0", "size": 4228 }
[ "org.apache.commons.lang.StringUtils", "org.openhab.core.scriptengine.action.ActionDoc", "org.openhab.core.scriptengine.action.ParamDoc" ]
import org.apache.commons.lang.StringUtils; import org.openhab.core.scriptengine.action.ActionDoc; import org.openhab.core.scriptengine.action.ParamDoc;
import org.apache.commons.lang.*; import org.openhab.core.scriptengine.action.*;
[ "org.apache.commons", "org.openhab.core" ]
org.apache.commons; org.openhab.core;
1,041,885
public static DateTime getDateTime(String dts) { int year, month, day; String dateStr = dts; String timeStr = null; if (dts.contains(":")) { String[] v = dts.split("\\s+"); dateStr = v[0].trim(); timeStr = v[1].trim(); } if...
static DateTime function(String dts) { int year, month, day; String dateStr = dts; String timeStr = null; if (dts.contains(":")) { String[] v = dts.split("\\s+"); dateStr = v[0].trim(); timeStr = v[1].trim(); } if (dateStr.contains("/")) { String[] ymd = dateStr.split("/"); month = Integer.parseInt(ymd[0]); day = Integ...
/** * Get date time from string * * @param dts Date time string * @return DateTime */
Get date time from string
getDateTime
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/global/util/DateUtil.java", "license": "lgpl-3.0", "size": 13197 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,590,783
public void deleteRow(int index) throws DOMException;
void function(int index) throws DOMException;
/** * Delete a table row. * @param index The index of the row to be deleted. This index starts * from 0 and is relative to the logical order (not document order) of * all the rows contained inside the table. If the index is -1 the * last row in the table is deleted. * @exception D...
Delete a table row
deleteRow
{ "repo_name": "decatur/j2js-agent", "path": "src/main/java/org/w3c/dom5/html/HTMLTableElement.java", "license": "bsd-2-clause", "size": 9166 }
[ "org.w3c.dom5.DOMException" ]
import org.w3c.dom5.DOMException;
import org.w3c.dom5.*;
[ "org.w3c.dom5" ]
org.w3c.dom5;
1,988,704
public synchronized Set<ExecutionTask> remainingPartitionMovements() { return _executionTaskPlanner.remainingReplicaMovements(); }
synchronized Set<ExecutionTask> function() { return _executionTaskPlanner.remainingReplicaMovements(); }
/** * Returns the remaining partition movement tasks. */
Returns the remaining partition movement tasks
remainingPartitionMovements
{ "repo_name": "becketqin/cruise-control", "path": "cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/executor/ExecutionTaskManager.java", "license": "bsd-2-clause", "size": 19955 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
262,712
@Test public void testInitialize_withAllInput() throws Exception { String componentId = "testInitialize_withAllInput"; String consumerKey = "testInitialize_withAllInput-consumer-key"; String consumerSecret = "testInitialize_withAllInput-consumer-secret"; String profiles = "123, 456, 789"; String tokenK...
void function() throws Exception { String componentId = STR; String consumerKey = STR; String consumerSecret = STR; String profiles = STR; String tokenKey = STR; String tokenSecret = STR; String languages = STR; String searchTerms = STR; Properties props = new Properties(); props.put(TwitterStreamSource.CFG_TWITTER_CON...
/** * Test case for {@link TwitterStreamSource#initialize(java.util.Properties)} being provided * properties showing all input */
Test case for <code>TwitterStreamSource#initialize(java.util.Properties)</code> being provided properties showing all input
testInitialize_withAllInput
{ "repo_name": "ottogroup/SPQR", "path": "spqr-operators/spqr-twitter/src/test/java/com/ottogroup/bi/spqr/operator/twitter/source/TwitterStreamSourceTest.java", "license": "apache-2.0", "size": 17032 }
[ "com.twitter.hbc.httpclient.BasicClient", "java.util.Properties", "org.junit.Assert", "org.mockito.Mockito" ]
import com.twitter.hbc.httpclient.BasicClient; import java.util.Properties; import org.junit.Assert; import org.mockito.Mockito;
import com.twitter.hbc.httpclient.*; import java.util.*; import org.junit.*; import org.mockito.*;
[ "com.twitter.hbc", "java.util", "org.junit", "org.mockito" ]
com.twitter.hbc; java.util; org.junit; org.mockito;
1,417,928
@Override public void addEntry(Resource entry) { resources.add( entry ); }
void function(Resource entry) { resources.add( entry ); }
/** Add a new entry resource from the EntryFilter * * @param entry */
Add a new entry resource from the EntryFilter
addEntry
{ "repo_name": "opengeospatial/Java-OpenMobility", "path": "AugTech_GeoAPI_Impl/com/augtech/geoapi/context/xml/ContextFilterImpl.java", "license": "apache-2.0", "size": 13498 }
[ "org.opengis.context.Resource" ]
import org.opengis.context.Resource;
import org.opengis.context.*;
[ "org.opengis.context" ]
org.opengis.context;
1,017,443
public Builder setSound(Uri sound) { mSound = sound; mAudioStreamType = STREAM_DEFAULT; return this; }
Builder function(Uri sound) { mSound = sound; mAudioStreamType = STREAM_DEFAULT; return this; }
/** * Set the sound to play. It will play on the default stream. */
Set the sound to play. It will play on the default stream
setSound
{ "repo_name": "mateor/pdroid", "path": "android-4.0.3_r1/trunk/frameworks/base/core/java/android/app/Notification.java", "license": "gpl-3.0", "size": 36241 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
377,193
@Override public void enterContinue(@NotNull BigDataScriptParser.ContinueContext ctx) { }
@Override public void enterContinue(@NotNull BigDataScriptParser.ContinueContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitPost
{ "repo_name": "leepc12/BigDataScript", "path": "src/org/bds/antlr/BigDataScriptBaseListener.java", "license": "apache-2.0", "size": 36363 }
[ "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;
449,820
@Test public void isSpringDamper() { DistanceJoint dj = new DistanceJoint(b1, b2, new Vector2(1.0, 2.0), new Vector2(-3.0, 0.5)); TestCase.assertFalse(dj.isSpringDamper()); dj.setFrequency(0.0); TestCase.assertFalse(dj.isSpringDamper()); dj.setFrequency(1.0); TestCase.assertFalse(dj.isSpringDamper...
void function() { DistanceJoint dj = new DistanceJoint(b1, b2, new Vector2(1.0, 2.0), new Vector2(-3.0, 0.5)); TestCase.assertFalse(dj.isSpringDamper()); dj.setFrequency(0.0); TestCase.assertFalse(dj.isSpringDamper()); dj.setFrequency(1.0); TestCase.assertFalse(dj.isSpringDamper()); dj.setFrequency(15.24); TestCase.ass...
/** * Tests the isSpringDamper method. */
Tests the isSpringDamper method
isSpringDamper
{ "repo_name": "dmitrykolesnikovich/dyn4j", "path": "junit/org/dyn4j/dynamics/DistanceJointTest.java", "license": "bsd-3-clause", "size": 5929 }
[ "junit.framework.TestCase", "org.dyn4j.dynamics.joint.DistanceJoint", "org.dyn4j.geometry.Vector2" ]
import junit.framework.TestCase; import org.dyn4j.dynamics.joint.DistanceJoint; import org.dyn4j.geometry.Vector2;
import junit.framework.*; import org.dyn4j.dynamics.joint.*; import org.dyn4j.geometry.*;
[ "junit.framework", "org.dyn4j.dynamics", "org.dyn4j.geometry" ]
junit.framework; org.dyn4j.dynamics; org.dyn4j.geometry;
2,618,143
public void run() { //TODO add sensor failure detection to abort loop and return to manual/variable voltage control while (true) { //skip PID if the thread is disabled if(enabled){ current = (long) Timer.getFPGATimestamp() * Math.pow(10, -3); dtMeasured = (long) (current - previous); if(d...
void function() { while (true) { if(enabled){ current = (long) Timer.getFPGATimestamp() * Math.pow(10, -3); dtMeasured = (long) (current - previous); if(dtMeasured == 0){ dtMeasured = 5; } setpoint = PIDSetpoint.getPIDSetpoint(marker); currentMeasurement = PIDinput.getPIDSource(marker); double error = (setpoint) - (cur...
/** * Called when the thread the PIDThread is passed into is started (myThread.start()) */
Called when the thread the PIDThread is passed into is started (myThread.start())
run
{ "repo_name": "nnapior/SubsystemPID", "path": "src/org/usfirst/frc1073/SubsystemPID/PIDThread.java", "license": "bsd-3-clause", "size": 6330 }
[ "edu.wpi.first.wpilibj.Timer" ]
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.*;
[ "edu.wpi.first" ]
edu.wpi.first;
2,035,891
protected void connectToServer() throws CommunicationHandlerException { try { connection.connect(); log.info(String.format( "Connection to XMPP Server at %1$s established successfully......", server)); } catch (XMPPException xmppExcepion) { String errorMsg = "Connection attempt to the XMPP Se...
void function() throws CommunicationHandlerException { try { connection.connect(); log.info(String.format( STR, server)); } catch (XMPPException xmppExcepion) { String errorMsg = STR + server + STR + port + STR; log.info(errorMsg); throw new CommunicationHandlerException(errorMsg, xmppExcepion); } }
/** * Connects to the XMPP-Server and if attempt unsuccessful, then throws exception. * * @throws CommunicationHandlerException in the event of 'Connecting to' the XMPP server fails. */
Connects to the XMPP-Server and if attempt unsuccessful, then throws exception
connectToServer
{ "repo_name": "wso2-incubator/iot-server-appliances", "path": "WSO2Agents/wso2agents-mgt/org.wso2.carbon.device.mgt.iot.agent.kura.firealarm/org.wso2.carbon.device.mgt.iot.agent.kura.firealarm.core/src/main/java/org/wso2/carbon/device/mgt/iot/agent/kura/firealarm/core/communication/xmpp/XMPPCommunicationHandler.ja...
[ "org.jivesoftware.smack.XMPPException" ]
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,010,513
public void saveClusterTimeAggregateRecords(Map<TimelineClusterMetric, MetricHostAggregate> records, String tableName) throws SQLException { if (records == null || records.isEmpty()) { LOG.debug("Empty aggregate records."); return; } long start = ...
void function(Map<TimelineClusterMetric, MetricHostAggregate> records, String tableName) throws SQLException { if (records == null records.isEmpty()) { LOG.debug(STR); return; } long start = System.currentTimeMillis(); Connection conn = getConnection(); PreparedStatement stmt = null; try { stmt = conn.prepareStatement(...
/** * Save Metric aggregate records. * * @throws SQLException */
Save Metric aggregate records
saveClusterTimeAggregateRecords
{ "repo_name": "alexryndin/ambari", "path": "ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java", "license": "apache-2.0", "size": 72471 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.Map", "org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.MetricHostAggregate", "org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.TimelineClusterMe...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Map; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.MetricHostAggregate; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators....
import java.sql.*; import java.util.*; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.*;
[ "java.sql", "java.util", "org.apache.hadoop" ]
java.sql; java.util; org.apache.hadoop;
2,708,786
public void dispatchMessage(Message msg) { if (msg.callback != null) { handleCallback(msg); } else { if (mCallback != null) { if (mCallback.handleMessage(msg)) { return; } } handleMessage(msg); ...
void function(Message msg) { if (msg.callback != null) { handleCallback(msg); } else { if (mCallback != null) { if (mCallback.handleMessage(msg)) { return; } } handleMessage(msg); } } public Handler() { if (FIND_POTENTIAL_LEAKS) { final Class<? extends Handler> klass = getClass(); if ((klass.isAnonymousClass() klass.is...
/** * Handle system messages here. */
Handle system messages here
dispatchMessage
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/os/Handler.java", "license": "gpl-3.0", "size": 22811 }
[ "android.util.Log", "java.lang.reflect.Modifier" ]
import android.util.Log; import java.lang.reflect.Modifier;
import android.util.*; import java.lang.reflect.*;
[ "android.util", "java.lang" ]
android.util; java.lang;
2,434,113
public Collection<Column> getErrorColumns() { return Collections.unmodifiableCollection(errorColumns); }
Collection<Column> function() { return Collections.unmodifiableCollection(errorColumns); }
/** * Gets all the columns that have been marked as erroneous. * * @return an umodifiable collection of erroneous columns */
Gets all the columns that have been marked as erroneous
getErrorColumns
{ "repo_name": "mittop/vaadin", "path": "server/src/com/vaadin/ui/Grid.java", "license": "apache-2.0", "size": 222421 }
[ "java.util.Collection", "java.util.Collections" ]
import java.util.Collection; import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,486,624
@Override protected void makeOrUpdate(AbstractModifyDialog dlg, boolean edit) throws Exception { // make or update scene table = ScenePeer.makeOrUpdateScene((SceneDialog) getThis(), edit); }
void function(AbstractModifyDialog dlg, boolean edit) throws Exception { table = ScenePeer.makeOrUpdateScene((SceneDialog) getThis(), edit); }
/** * Makes or updates the scene that was edited within the dialog. * * @see ch.intertec.storybook.view.AbstractModifyDialog#makeOrUpdate(ch.intertec.storybook.view.AbstractModifyDialog, * boolean) */
Makes or updates the scene that was edited within the dialog
makeOrUpdate
{ "repo_name": "tmhorne/storybook", "path": "src/ch/intertec/storybook/view/modify/scene/SceneDialog.java", "license": "gpl-3.0", "size": 29280 }
[ "ch.intertec.storybook.model.ScenePeer", "ch.intertec.storybook.view.AbstractModifyDialog" ]
import ch.intertec.storybook.model.ScenePeer; import ch.intertec.storybook.view.AbstractModifyDialog;
import ch.intertec.storybook.model.*; import ch.intertec.storybook.view.*;
[ "ch.intertec.storybook" ]
ch.intertec.storybook;
1,513,893
public void Demo_Insercion () { Log.w (TAG, "Metodo Insercion"); //new Contacto(contacto,nombre,direccion,telefono,movil,fax,pbx,categoria,sector,creador,fecha,hora,pagina,claves,web,correo,clase); //Crear (new Contacto(1,"Jose Alexis Correa Valencia","Calle 13 Nro 5-50","317-3997946","","","","","",0,"2015-02...
void function () { Log.w (TAG, STR); }
/** * Insercion de valores de prueba */
Insercion de valores de prueba
Demo_Insercion
{ "repo_name": "Insside/android-iCiudades", "path": "buga/src/main/java/co/com/buga/buga/datos/adaptadores/Contactos.java", "license": "apache-2.0", "size": 10507 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
370,613
public void setUp(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; // set a custom shadow that overlays the main content when the drawer opens mDrawerLayout.setDrawerShadow(R.drawable.drawer_s...
void function(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionB...
/** * Users of this fragment must call this method to set up the navigation drawer interactions. * * @param fragmentId The android:id of this fragment in its activity's layout. * @param drawerLayout The DrawerLayout containing this fragment's UI. */
Users of this fragment must call this method to set up the navigation drawer interactions
setUp
{ "repo_name": "amritsinghbains/BuildmLearn-Toolkit-Android", "path": "source-code/app/src/main/java/org/buildmlearn/toolkit/fragment/NavigationDrawerFragment.java", "license": "bsd-3-clause", "size": 12099 }
[ "android.support.v4.view.GravityCompat", "android.support.v4.widget.DrawerLayout", "android.support.v7.app.ActionBar", "android.support.v7.app.ActionBarDrawerToggle" ]
import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v4.view.*; import android.support.v4.widget.*; import android.support.v7.app.*;
[ "android.support" ]
android.support;
2,070,012
public ValidatableWidget<TextBox> getValidateNameTextBox() { return validateNameTextBox; }
ValidatableWidget<TextBox> function() { return validateNameTextBox; }
/** * To get Validate Name Text Box. * * @return ValidatableWidget<TextBox> */
To get Validate Name Text Box
getValidateNameTextBox
{ "repo_name": "kuzavas/ephesoft", "path": "dcma-gwt/dcma-gwt-admin/src/main/java/com/ephesoft/dcma/gwt/admin/bm/client/view/tableinfo/EditTableInfoView.java", "license": "agpl-3.0", "size": 21397 }
[ "com.ephesoft.dcma.gwt.core.client.validator.ValidatableWidget", "com.google.gwt.user.client.ui.TextBox" ]
import com.ephesoft.dcma.gwt.core.client.validator.ValidatableWidget; import com.google.gwt.user.client.ui.TextBox;
import com.ephesoft.dcma.gwt.core.client.validator.*; import com.google.gwt.user.client.ui.*;
[ "com.ephesoft.dcma", "com.google.gwt" ]
com.ephesoft.dcma; com.google.gwt;
1,004,704
EAttribute getHYWE_NumCyc();
EAttribute getHYWE_NumCyc();
/** * Returns the meta object for the attribute '{@link gluemodel.substationStandard.Dataclasses.HYWE#getNumCyc <em>Num Cyc</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Num Cyc</em>'. * @see gluemodel.substationStandard.Dataclasses.HYWE#getNumCyc()...
Returns the meta object for the attribute '<code>gluemodel.substationStandard.Dataclasses.HYWE#getNumCyc Num Cyc</code>'.
getHYWE_NumCyc
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/Dataclasses/DataclassesPackage.java", "license": "mit", "size": 381891 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,297,760
public static Optional<BuildTarget> convert(Optional<UnconfiguredBuildTarget> buildTarget) { return buildTarget.map(ConfigurationBuildTargets::convert); }
static Optional<BuildTarget> function(Optional<UnconfiguredBuildTarget> buildTarget) { return buildTarget.map(ConfigurationBuildTargets::convert); }
/** * Performs conversion similar to {@link #convert(UnconfiguredBuildTarget)} for an optional value. */
Performs conversion similar to <code>#convert(UnconfiguredBuildTarget)</code> for an optional value
convert
{ "repo_name": "facebook/buck", "path": "src/com/facebook/buck/core/model/ConfigurationBuildTargets.java", "license": "apache-2.0", "size": 3342 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
531,524
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.activity_main, menu); return super.onCreateOptionsMenu(menu); }
boolean function(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.activity_main, menu); return super.onCreateOptionsMenu(menu); }
/** * Override Activity lifecycle method. */
Override Activity lifecycle method
onCreateOptionsMenu
{ "repo_name": "isattil4/solutions-mobile-backend-starter-android-client", "path": "src/com/google/cloud/backend/sample/guestbook/GuestbookActivity.java", "license": "apache-2.0", "size": 12377 }
[ "android.view.Menu", "android.view.MenuInflater" ]
import android.view.Menu; import android.view.MenuInflater;
import android.view.*;
[ "android.view" ]
android.view;
137,607
public List<RetentionLease> getPeerRecoveryRetentionLeases() { return replicationTracker.getPeerRecoveryRetentionLeases(); }
List<RetentionLease> function() { return replicationTracker.getPeerRecoveryRetentionLeases(); }
/** * Returns a list of retention leases for peer recovery installed in this shard copy. */
Returns a list of retention leases for peer recovery installed in this shard copy
getPeerRecoveryRetentionLeases
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 174872 }
[ "java.util.List", "org.elasticsearch.index.seqno.RetentionLease" ]
import java.util.List; import org.elasticsearch.index.seqno.RetentionLease;
import java.util.*; import org.elasticsearch.index.seqno.*;
[ "java.util", "org.elasticsearch.index" ]
java.util; org.elasticsearch.index;
1,634,110