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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public void finish() {
if (mAccountAuthenticatorResponse != null) {
// send the result bundle back if set, otherwise send an error.
if (mResultBundle != null) {
mAccountAuthenticatorResponse.onResult(mResultBundle);
} else {
m... | void function() { if (mAccountAuthenticatorResponse != null) { if (mResultBundle != null) { mAccountAuthenticatorResponse.onResult(mResultBundle); } else { mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, STR); } mAccountAuthenticatorResponse = null; } super.finish(); } | /**
* Sends the result or a GithubConstants.ERROR_CODE_CANCELED error if a result isn't present.
*/ | Sends the result or a GithubConstants.ERROR_CODE_CANCELED error if a result isn't present | finish | {
"repo_name": "Leaking/WeGit",
"path": "app/src/main/java/com/quinn/githubknife/ui/activity/LoginActivity.java",
"license": "apache-2.0",
"size": 6274
} | [
"android.accounts.AccountManager"
] | import android.accounts.AccountManager; | import android.accounts.*; | [
"android.accounts"
] | android.accounts; | 414,775 |
private List<Component> recursivelySelectVisible(Component v)
{
List<Component> list = new ArrayList<Component>();
if (v instanceof Container)
{
for (int i = 0; i < ((Container) v).getComponentCount(); i++)
{
list.addAll(recursivelySelectVisible(((Container) v).getComponent(i)));
}
}
if (v.is... | List<Component> function(Component v) { List<Component> list = new ArrayList<Component>(); if (v instanceof Container) { for (int i = 0; i < ((Container) v).getComponentCount(); i++) { list.addAll(recursivelySelectVisible(((Container) v).getComponent(i))); } } if (v.isVisible() !v.isOpaque()) list.add(v); return list; ... | /**
* Select all {@link View#VISIBLE visible} and 1-alpha views within the given view hierarchy
* @param v the view to search in
* @return a list the found views
*/ | Select all <code>View#VISIBLE visible</code> and 1-alpha views within the given view hierarchy | recursivelySelectVisible | {
"repo_name": "phil-brown/javaQuery",
"path": "src/self/philbrown/javaQuery/$.java",
"license": "apache-2.0",
"size": 101555
} | [
"java.awt.Component",
"java.awt.Container",
"java.util.ArrayList",
"java.util.List"
] | import java.awt.Component; import java.awt.Container; import java.util.ArrayList; import java.util.List; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,774,505 |
@Override public void enterStatement(@NotNull WhileParser.StatementContext ctx) { } | @Override public void enterStatement(@NotNull WhileParser.StatementContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitBinaryOperator | {
"repo_name": "rogierslag/MetaProgramming",
"path": "src/parser/WhileBaseListener.java",
"license": "gpl-2.0",
"size": 7277
} | [
"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; | 615,245 |
@Override
public User createProviderAdministrator(String firstname, String middlename, String lastname, School school) throws javax.ejb.FinderException, CreateException, RemoteException {
User newUser;
//SchoolBusiness schlBuiz = (SchoolBusiness) getServiceInstance(SchoolBusiness.class);
Group rootSchoolAdmin... | User function(String firstname, String middlename, String lastname, School school) throws javax.ejb.FinderException, CreateException, RemoteException { User newUser; Group rootSchoolAdminGroup = getSchoolBusiness().getRootProviderAdministratorGroup(); Group schoolGroup = getGroupBusiness().getGroupHome().findByPrimaryK... | /**
* Creates a new Administrator whith a with a firstname,middlename, lastname and school where middlename can be null
*/ | Creates a new Administrator whith a with a firstname,middlename, lastname and school where middlename can be null | createProviderAdministrator | {
"repo_name": "idega/se.idega.idegaweb.commune",
"path": "src/java/se/idega/idegaweb/commune/business/CommuneUserBusinessBean.java",
"license": "gpl-3.0",
"size": 45088
} | [
"com.idega.block.school.data.School",
"com.idega.user.data.Group",
"com.idega.user.data.User",
"java.rmi.RemoteException",
"javax.ejb.CreateException",
"javax.ejb.FinderException"
] | import com.idega.block.school.data.School; import com.idega.user.data.Group; import com.idega.user.data.User; import java.rmi.RemoteException; import javax.ejb.CreateException; import javax.ejb.FinderException; | import com.idega.block.school.data.*; import com.idega.user.data.*; import java.rmi.*; import javax.ejb.*; | [
"com.idega.block",
"com.idega.user",
"java.rmi",
"javax.ejb"
] | com.idega.block; com.idega.user; java.rmi; javax.ejb; | 744,645 |
private static DecodedInstruction decodeRegisterRange(
InstructionCodec format, int opcodeUnit, CodeInput in)
throws EOFException {
int opcode = byte0(opcodeUnit);
int registerCount = byte1(opcodeUnit);
int index = in.read();
int a = in.read();
IndexTy... | static DecodedInstruction function( InstructionCodec format, int opcodeUnit, CodeInput in) throws EOFException { int opcode = byte0(opcodeUnit); int registerCount = byte1(opcodeUnit); int index = in.read(); int a = in.read(); IndexType indexType = OpcodeInfo.getIndexType(opcode); return new RegisterRangeDecodedInstruct... | /**
* Helper method that decodes any of the three-unit register-range formats.
*/ | Helper method that decodes any of the three-unit register-range formats | decodeRegisterRange | {
"repo_name": "nikita36078/J2ME-Loader",
"path": "dexlib/src/main/java/com/android/dx/io/instructions/InstructionCodec.java",
"license": "apache-2.0",
"size": 31387
} | [
"com.android.dx.io.IndexType",
"com.android.dx.io.OpcodeInfo",
"java.io.EOFException"
] | import com.android.dx.io.IndexType; import com.android.dx.io.OpcodeInfo; import java.io.EOFException; | import com.android.dx.io.*; import java.io.*; | [
"com.android.dx",
"java.io"
] | com.android.dx; java.io; | 1,887,974 |
public void aceptarConexion() {
try {
conexionEntrante = servidor.accept();
System.out.println("Nueva conexion establecida");
listaConexiones.add(new Conexion(conexionEntrante));
} catch (IOException e1) {
e1.printStackTrace();
}
}
| void function() { try { conexionEntrante = servidor.accept(); System.out.println(STR); listaConexiones.add(new Conexion(conexionEntrante)); } catch (IOException e1) { e1.printStackTrace(); } } | /**
* Acepta conexiones entrantes y las agrega a la lista de conexiones.
*/ | Acepta conexiones entrantes y las agrega a la lista de conexiones | aceptarConexion | {
"repo_name": "a13xander/libreria",
"path": "Sockets/src/logica/Servidor.java",
"license": "mit",
"size": 1651
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 735,372 |
@Override
public void generateSelfSignedCert(File keyFile, File certFile, Subject sbj, int days) throws IOException {
write(keyFile, CLUSTER_KEY);
write(certFile, CLUSTER_CERT);
} | void function(File keyFile, File certFile, Subject sbj, int days) throws IOException { write(keyFile, CLUSTER_KEY); write(certFile, CLUSTER_CERT); } | /**
* Generate a self-signed certificate
*
* @param keyFile path to the file which will contain the private key
* @param certFile path to the file which will contain the self signed certificate
* @param sbj subject information
* @param days certificate duration
* @throws IOE... | Generate a self-signed certificate | generateSelfSignedCert | {
"repo_name": "scholzj/barnabas",
"path": "operator-common/src/test/java/io/strimzi/operator/common/operator/MockCertManager.java",
"license": "apache-2.0",
"size": 14124
} | [
"io.strimzi.certs.Subject",
"java.io.File",
"java.io.IOException"
] | import io.strimzi.certs.Subject; import java.io.File; import java.io.IOException; | import io.strimzi.certs.*; import java.io.*; | [
"io.strimzi.certs",
"java.io"
] | io.strimzi.certs; java.io; | 2,843,319 |
public List getPoolListSelectItems()
{
if (poolListSelectItems == null) {
poolListSelectItems = new ArrayList();
Collection objects = tree.getSortedObjects();
Iterator iter = objects.iterator();
while(iter.hasNext())
{
try
{
QuestionPoolFacade pool = (QuestionPo... | List function() { if (poolListSelectItems == null) { poolListSelectItems = new ArrayList(); Collection objects = tree.getSortedObjects(); Iterator iter = objects.iterator(); while(iter.hasNext()) { try { QuestionPoolFacade pool = (QuestionPoolFacade) iter.next(); poolListSelectItems.add(new SelectItem((pool.getQuestion... | /**
* DOCUMENTATION PENDING
*
* @return DOCUMENTATION PENDING
*/ | DOCUMENTATION PENDING | getPoolListSelectItems | {
"repo_name": "kingmook/sakai",
"path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/questionpool/QuestionPoolBean.java",
"license": "apache-2.0",
"size": 70111
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"java.util.List",
"javax.faces.model.SelectItem",
"org.sakaiproject.tool.assessment.facade.QuestionPoolFacade"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import javax.faces.model.SelectItem; import org.sakaiproject.tool.assessment.facade.QuestionPoolFacade; | import java.util.*; import javax.faces.model.*; import org.sakaiproject.tool.assessment.facade.*; | [
"java.util",
"javax.faces",
"org.sakaiproject.tool"
] | java.util; javax.faces; org.sakaiproject.tool; | 2,484,048 |
if (file == null) {
log.warn("Got null in getPersistentFile. Returning null");
return null;
}
if (file.getPath().equals(file.getAbsolutePath())) {
log.trace("getPersistentFile(" + file.getPath() + ") got a file that was already absolute");
return file;
... | if (file == null) { log.warn(STR); return null; } if (file.getPath().equals(file.getAbsolutePath())) { log.trace(STR + file.getPath() + STR); return file; } String persistentBase; try { persistentBase = System.getProperty(SYSPROP_PERSISTENT_DIR); } catch (NullPointerException e) { log.warn(STR + SYSPROP_PERSISTENT_DIR ... | /**
* Transforms the given file to an absolute path, if it is not absolute
* already. The absolute location will be relative to the System property
* "summa.control.client.persistent.dir". If that system property does not
* exist, the location will be relative to the current dir.
*
* @para... | Transforms the given file to an absolute path, if it is not absolute already. The absolute location will be relative to the System property "summa.control.client.persistent.dir". If that system property does not exist, the location will be relative to the current dir | getPersistentFile | {
"repo_name": "statsbiblioteket/summa",
"path": "Core/src/main/java/dk/statsbiblioteket/summa/common/configuration/Resolver.java",
"license": "apache-2.0",
"size": 9386
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,062,339 |
public static String normalizeColumnValueForItsDataType(String value, CarbonDimension dimension) {
try {
Object parsedValue = null;
// validation will not be done for timestamp datatype as for timestamp direct dictionary
// is generated. No dictionary file is created for timestamp datatype colum... | static String function(String value, CarbonDimension dimension) { try { Object parsedValue = null; switch (dimension.getDataType()) { case DECIMAL: return parseStringToBigDecimal(value, dimension); case SHORT: case INT: case LONG: parsedValue = normalizeIntAndLongValues(value, dimension.getDataType()); break; case DOUB... | /**
* This method will parse a given string value corresponding to its data type
*
* @param value value to parse
* @param dimension dimension to get data type and precision and scale in case of decimal
* data type
* @return
*/ | This method will parse a given string value corresponding to its data type | normalizeColumnValueForItsDataType | {
"repo_name": "mohammadshahidkhan/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java",
"license": "apache-2.0",
"size": 17747
} | [
"org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension"
] | import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension; | import org.apache.carbondata.core.metadata.schema.table.column.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 2,573,555 |
public ResultSet executeQuery(String sql) {
try {
return conn.createStatement().executeQuery(sql);
} catch (SQLException e) {
throw new RuntimeException(e);
}
} | ResultSet function(String sql) { try { return conn.createStatement().executeQuery(sql); } catch (SQLException e) { throw new RuntimeException(e); } } | /**
* Run a SQL query directly against the database.
*
* @param sql the SQL statement
* @return the result set
*/ | Run a SQL query directly against the database | executeQuery | {
"repo_name": "ferquies/2dam",
"path": "AD/Tema 2/h2/src/tools/org/h2/jaqu/Db.java",
"license": "gpl-3.0",
"size": 11386
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,854,235 |
void next(int segId, @Nullable GridCacheMapEntry next) {
if (segId % 2 == 0)
next0 = next;
else
next1 = next;
} | void next(int segId, @Nullable GridCacheMapEntry next) { if (segId % 2 == 0) next0 = next; else next1 = next; } | /**
* Sets next entry in bucket linked list within a hash map segment.
*
* @param segId Segment ID.
* @param next Next entry.
*/ | Sets next entry in bucket linked list within a hash map segment | next | {
"repo_name": "adeelmahmood/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java",
"license": "apache-2.0",
"size": 137266
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,006,886 |
@VisibleForTesting
static OMAInfo parseDownloadDescriptor(InputStream is) {
try {
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
factory.setNamespaceAware(true);
XmlPullParser parser = factory.newPullParser();
parser.setInput(is, null);... | static OMAInfo parseDownloadDescriptor(InputStream is) { try { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(true); XmlPullParser parser = factory.newPullParser(); parser.setInput(is, null); int eventType = parser.getEventType(); String currentAttribute = null; OMAInfo inf... | /**
* Parses the input stream and returns the OMA information.
*
* @param is The input stream to the parser.
* @return OMA information about the download content, or null if an error is found.
*/ | Parses the input stream and returns the OMA information | parseDownloadDescriptor | {
"repo_name": "Chilledheart/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java",
"license": "bsd-3-clause",
"size": 31893
} | [
"android.util.Log",
"java.io.IOException",
"java.io.InputStream",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.xmlpull.v1.XmlPullParser",
"org.xmlpull.v1.XmlPullParserException",
"org.xmlpull.v1.XmlPullParserFactory"
] | import android.util.Log; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserFactory; | import android.util.*; import java.io.*; import java.util.*; import org.xmlpull.v1.*; | [
"android.util",
"java.io",
"java.util",
"org.xmlpull.v1"
] | android.util; java.io; java.util; org.xmlpull.v1; | 1,147,397 |
Key<T> getKey(FindOptions options); | Key<T> getKey(FindOptions options); | /**
* Get the key of the first entity in the result set. Obeys the {@link Query} offset value.
*
* @param options the options to apply to the find operation
* @return the key of the first instance in the result, or null if the result set is empty.
* @since 1.3
*/ | Get the key of the first entity in the result set. Obeys the <code>Query</code> offset value | getKey | {
"repo_name": "evanchooly/morphia",
"path": "morphia/src/main/java/org/mongodb/morphia/query/QueryResults.java",
"license": "apache-2.0",
"size": 4863
} | [
"com.mongodb.client.model.FindOptions",
"org.mongodb.morphia.Key"
] | import com.mongodb.client.model.FindOptions; import org.mongodb.morphia.Key; | import com.mongodb.client.model.*; import org.mongodb.morphia.*; | [
"com.mongodb.client",
"org.mongodb.morphia"
] | com.mongodb.client; org.mongodb.morphia; | 476,618 |
@SuppressWarnings("unused")
protected void setCachedTypeId(@NotNull final Integer type)
{
immutableSetCachedTypeId(type);
} | @SuppressWarnings(STR) void function(@NotNull final Integer type) { immutableSetCachedTypeId(type); } | /**
* Specifies the cached type.
* @param type the type.
*/ | Specifies the cached type | setCachedTypeId | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/vo/LazyAttribute.java",
"license": "gpl-2.0",
"size": 34040
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,170,289 |
public void setClassExpression(Expression classExpression) {
this.classExpression = classExpression;
}
SuperExpr() {
super();
}
SuperExpr(Expression classExpression, NodeList<AnnotationExpr> annotations, int posBegin, int posEnd) {
super(annotations, posBegin, pos... | void function(Expression classExpression) { this.classExpression = classExpression; } SuperExpr() { super(); } SuperExpr(Expression classExpression, NodeList<AnnotationExpr> annotations, int posBegin, int posEnd) { super(annotations, posBegin, posEnd); this.classExpression = classExpression; } | /**
* Sets the class expression.
*
* @param classExpression the new class expression
*/ | Sets the class expression | setClassExpression | {
"repo_name": "DigiArea/jse-model",
"path": "com.digiarea.jse/src/com/digiarea/jse/SuperExpr.java",
"license": "epl-1.0",
"size": 2390
} | [
"com.digiarea.jse.AnnotationExpr",
"com.digiarea.jse.Expression",
"com.digiarea.jse.NodeList"
] | import com.digiarea.jse.AnnotationExpr; import com.digiarea.jse.Expression; import com.digiarea.jse.NodeList; | import com.digiarea.jse.*; | [
"com.digiarea.jse"
] | com.digiarea.jse; | 585,134 |
EReference getToolInfo_ToolInfoModel(); | EReference getToolInfo_ToolInfoModel(); | /**
* Returns the meta object for the containment reference '{@link fr.lip6.move.pnml.ptnet.ToolInfo#getToolInfoModel <em>Tool Info Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Tool Info Model</em>'.
* @see fr.lip6.move.pnml.ptnet... | Returns the meta object for the containment reference '<code>fr.lip6.move.pnml.ptnet.ToolInfo#getToolInfoModel Tool Info Model</code>'. | getToolInfo_ToolInfoModel | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/PtnetPackage.java",
"license": "epl-1.0",
"size": 146931
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,556,488 |
String histFilePath = File.createTempFile("lrb-test", null).getAbsolutePath();
LRBTopologyMain.main0(0, // offset
1, // executors
2, // xways
"127.0.0.1", // host
5060, // port
histFilePath, 2, // tasks,
false, // submit
true, // stormConfigDebug
2, // workers
"nameext", // nameext
500... | String histFilePath = File.createTempFile(STR, null).getAbsolutePath(); LRBTopologyMain.main0(0, 1, 2, STR, 5060, histFilePath, 2, false, true, 2, STR, 5000 ); } | /**
* Test of main method, of class LRBTopologyMain.
*
* @throws java.lang.Exception
*/ | Test of main method, of class LRBTopologyMain | testMain0 | {
"repo_name": "mjsax/aeolus",
"path": "queries/lrb/src/test/java/storm/lrb/LRBTopologyMainTest.java",
"license": "apache-2.0",
"size": 1597
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 956,509 |
private HttpEntity paramsToEntity(RequestParams params, ResponseHandlerInterface responseHandler) {
HttpEntity entity = null;
try {
if (params != null) {
entity = params.getEntity(responseHandler);
}
} catch (Throwable t) {
if (responseHan... | HttpEntity function(RequestParams params, ResponseHandlerInterface responseHandler) { HttpEntity entity = null; try { if (params != null) { entity = params.getEntity(responseHandler); } } catch (Throwable t) { if (responseHandler != null) responseHandler.sendFailureMessage(0, null, null, t); else t.printStackTrace(); }... | /**
* Returns HttpEntity containing data from RequestParams included with request declaration.
* Allows also passing progress from upload via provided ResponseHandler
*
* @param params additional request params
* @param responseHandler ResponseHandlerInterface or its subclass to be not... | Returns HttpEntity containing data from RequestParams included with request declaration. Allows also passing progress from upload via provided ResponseHandler | paramsToEntity | {
"repo_name": "blackdargn/AndroidUtil",
"path": "ext/asyn-http-library/src/main/java/com/loopj/android/http/AsyncHttpClient.java",
"license": "apache-2.0",
"size": 53797
} | [
"org.apache.http.HttpEntity"
] | import org.apache.http.HttpEntity; | import org.apache.http.*; | [
"org.apache.http"
] | org.apache.http; | 1,621,111 |
public void setElement(final DefaultParametricDatum datum) {
metadata = datum;
} | void function(final DefaultParametricDatum datum) { metadata = datum; } | /**
* Invoked by JAXB at unmarshalling time for storing the result temporarily.
*
* @param datum the unmarshalled element.
*/ | Invoked by JAXB at unmarshalling time for storing the result temporarily | setElement | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CD_ParametricDatum.java",
"license": "apache-2.0",
"size": 3227
} | [
"org.apache.sis.referencing.datum.DefaultParametricDatum"
] | import org.apache.sis.referencing.datum.DefaultParametricDatum; | import org.apache.sis.referencing.datum.*; | [
"org.apache.sis"
] | org.apache.sis; | 1,858,342 |
public void setManagedPreferenceDelegate(ManagedPreferenceDelegate delegate) {
mManagedPrefDelegate = delegate;
ManagedPreferencesUtils.initPreference(mManagedPrefDelegate, this);
} | void function(ManagedPreferenceDelegate delegate) { mManagedPrefDelegate = delegate; ManagedPreferencesUtils.initPreference(mManagedPrefDelegate, this); } | /**
* Sets the ManagedPreferenceDelegate which will determine whether this preference is managed.
*/ | Sets the ManagedPreferenceDelegate which will determine whether this preference is managed | setManagedPreferenceDelegate | {
"repo_name": "chromium/chromium",
"path": "chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/RadioButtonGroupPreloadPagesSettings.java",
"license": "bsd-3-clause",
"size": 7596
} | [
"org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate",
"org.chromium.components.browser_ui.settings.ManagedPreferencesUtils"
] | import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; import org.chromium.components.browser_ui.settings.ManagedPreferencesUtils; | import org.chromium.components.browser_ui.settings.*; | [
"org.chromium.components"
] | org.chromium.components; | 251,852 |
private void temperatureSensorChanged(SensorEvent event) {
try
{
if (event.sensor.getType() == Sensor.TYPE_TEMPERATURE)
{
values[19] = String.valueOf(event.values[0]);
}
//Time from the last event
long elapsed = System.currentTimeMillis() - dwQuietStart;
if (elapsed >= minimumI... | void function(SensorEvent event) { try { if (event.sensor.getType() == Sensor.TYPE_TEMPERATURE) { values[19] = String.valueOf(event.values[0]); } long elapsed = System.currentTimeMillis() - dwQuietStart; if (elapsed >= minimumInterval) { navigate(sensorUrl, NAMES, values); dwQuietStart = System.currentTimeMillis(); } }... | /**
* Handle data from the temperature sensor
* @param event
*/ | Handle data from the temperature sensor | temperatureSensorChanged | {
"repo_name": "tauplatform/tau",
"path": "extensions/rhoelementsext/ext/rhoelementsext/platform/android/rhoelements_temp/src/com/rho/rhoelements/plugins/RawSensorsPlugin.java",
"license": "mit",
"size": 30512
} | [
"android.hardware.Sensor",
"android.hardware.SensorEvent",
"com.rho.rhoelements.Common",
"com.rho.rhoelements.LogEntry",
"com.rho.rhoelements.NavigateException"
] | import android.hardware.Sensor; import android.hardware.SensorEvent; import com.rho.rhoelements.Common; import com.rho.rhoelements.LogEntry; import com.rho.rhoelements.NavigateException; | import android.hardware.*; import com.rho.rhoelements.*; | [
"android.hardware",
"com.rho.rhoelements"
] | android.hardware; com.rho.rhoelements; | 1,382,768 |
private void updateGroupViewDependencies(){
grouplist = db.fetchGrouplist();
hosts = db.fetchHosts(group.getId());
images = db.fetchGroupImages(group.getId());
Collections.sort(images);
} | void function(){ grouplist = db.fetchGrouplist(); hosts = db.fetchHosts(group.getId()); images = db.fetchGroupImages(group.getId()); Collections.sort(images); } | /**
* Updates the grouplist, images and hosts.
*/ | Updates the grouplist, images and hosts | updateGroupViewDependencies | {
"repo_name": "sneJ-/networkboot",
"path": "frontend/src/main/java/uk/ac/lsbu/networkboot/frontend/GroupBean.java",
"license": "gpl-2.0",
"size": 10200
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 1,277,663 |
public void insertNode(Node n, int pos)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!");
insertElementAt(n, pos);
} | void function(Node n, int pos) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); insertElementAt(n, pos); } | /**
* Insert a node at a given position.
*
* @param n Node to be added
* @param pos Offset at which the node is to be inserted,
* with 0 being the first position.
* @throws RuntimeException thrown if this NodeSet is not of
* a mutable type.
*/ | Insert a node at a given position | insertNode | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java",
"license": "gpl-2.0",
"size": 35779
} | [
"com.sun.org.apache.xalan.internal.res.XSLMessages",
"com.sun.org.apache.xpath.internal.res.XPATHErrorResources",
"org.w3c.dom.Node"
] | import com.sun.org.apache.xalan.internal.res.XSLMessages; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; import org.w3c.dom.Node; | import com.sun.org.apache.xalan.internal.res.*; import com.sun.org.apache.xpath.internal.res.*; import org.w3c.dom.*; | [
"com.sun.org",
"org.w3c.dom"
] | com.sun.org; org.w3c.dom; | 1,360,136 |
public boolean computeScale() {
resumeDraw();
if (mFinished) {
Paints.mPaintR = new Paint();
mCurrScale = 1.0f;
return false;
}
int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime);
if (timePassed < mDuration) {
float x = (float) timePassed *... | boolean function() { resumeDraw(); if (mFinished) { Paints.mPaintR = new Paint(); mCurrScale = 1.0f; return false; } int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime); if (timePassed < mDuration) { float x = (float) timePassed * mDurationReciprocal; x = mInterpolator.getInterpolation(x);... | /**
* Call this when you want to know the new scale. If it returns true,
* the animation is not yet finished.
*/ | Call this when you want to know the new scale. If it returns true, the animation is not yet finished | computeScale | {
"repo_name": "djcoin/svn2git_gvsig_mini",
"path": "src/es/prodevelop/gvsig/mini/views/overlay/TileRaster.java",
"license": "gpl-2.0",
"size": 84750
} | [
"android.graphics.Paint",
"android.view.animation.AnimationUtils"
] | import android.graphics.Paint; import android.view.animation.AnimationUtils; | import android.graphics.*; import android.view.animation.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 1,668,187 |
public void setProgressIndeterminate(boolean isIndeterminate) {
if (mType != SuperToast.Type.PROGRESS_HORIZONTAL) {
Log.e(TAG, "setProgressIndeterminate()" + ERROR_NOTPROGRESSHORIZONTALTYPE);
}
this.isProgressIndeterminate = isIndeterminate;
if (mProgressBar != null)... | void function(boolean isIndeterminate) { if (mType != SuperToast.Type.PROGRESS_HORIZONTAL) { Log.e(TAG, STR + ERROR_NOTPROGRESSHORIZONTALTYPE); } this.isProgressIndeterminate = isIndeterminate; if (mProgressBar != null) { mProgressBar.setIndeterminate(isIndeterminate); } } | /**
* Sets an indeterminate value to the progressbar of a PROGRESS
* {@link SuperToast.Type} {@value #TAG}.
*
* @param isIndeterminate boolean
*/ | Sets an indeterminate value to the progressbar of a PROGRESS <code>SuperToast.Type</code> #TAG | setProgressIndeterminate | {
"repo_name": "ihgoo/Android-UIView",
"path": "src/main/java/me/xunhou/androiduiview/toast/SuperCardToast.java",
"license": "mit",
"size": 59171
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,623,583 |
@Test
public void testDualConnections() throws Exception {
val testEntries = Arrays.asList(
notExistsEntry(1L, "one"),
unversionedEntry(2L, "two"),
versionedEntry(3L, "three", 123L));
val expectedVersions = Arrays.asList(0L, 1L, 2L);
// No... | void function() throws Exception { val testEntries = Arrays.asList( notExistsEntry(1L, "one"), unversionedEntry(2L, "two"), versionedEntry(3L, "three", 123L)); val expectedVersions = Arrays.asList(0L, 1L, 2L); val config = KeyValueTableClientConfiguration.builder().retryAttempts(1).build(); val context = new TestContex... | /**
* Tests the ability to separate read and write requests on their own connections.
*/ | Tests the ability to separate read and write requests on their own connections | testDualConnections | {
"repo_name": "pravega/pravega",
"path": "client/src/test/java/io/pravega/client/tables/impl/TableSegmentImplTest.java",
"license": "apache-2.0",
"size": 37020
} | [
"com.google.common.collect.Iterators",
"io.netty.buffer.Unpooled",
"io.pravega.client.tables.KeyValueTableClientConfiguration",
"io.pravega.common.Exceptions",
"io.pravega.common.util.RetriesExhaustedException",
"io.pravega.shared.protocol.netty.ConnectionFailedException",
"io.pravega.shared.protocol.ne... | import com.google.common.collect.Iterators; import io.netty.buffer.Unpooled; import io.pravega.client.tables.KeyValueTableClientConfiguration; import io.pravega.common.Exceptions; import io.pravega.common.util.RetriesExhaustedException; import io.pravega.shared.protocol.netty.ConnectionFailedException; import io.praveg... | import com.google.common.collect.*; import io.netty.buffer.*; import io.pravega.client.tables.*; import io.pravega.common.*; import io.pravega.common.util.*; import io.pravega.shared.protocol.netty.*; import io.pravega.test.common.*; import java.util.*; import java.util.concurrent.*; import java.util.stream.*; import o... | [
"com.google.common",
"io.netty.buffer",
"io.pravega.client",
"io.pravega.common",
"io.pravega.shared",
"io.pravega.test",
"java.util",
"org.junit"
] | com.google.common; io.netty.buffer; io.pravega.client; io.pravega.common; io.pravega.shared; io.pravega.test; java.util; org.junit; | 1,202,970 |
public int getRunLimit(UserCredentials credentials)
throws NetworkConnectionException {
byte[] limit = connection.read(getLink(ResourceLabel.RUNLIMIT),
MimeType.TEXT, credentials);
return Integer.parseInt(new String(limit).trim());
}
| int function(UserCredentials credentials) throws NetworkConnectionException { byte[] limit = connection.read(getLink(ResourceLabel.RUNLIMIT), MimeType.TEXT, credentials); return Integer.parseInt(new String(limit).trim()); } | /**
* Get the maximum number of run that this server can host concurrently.
*
* @return the maximum number of run that this server can host concurrently.
* @throws NetworkConnectionException
*/ | Get the maximum number of run that this server can host concurrently | getRunLimit | {
"repo_name": "Phoenix1708/t2-server-jar-android-0.1",
"path": "t2-server-jar-android-0.1-hyde/src/main/java/uk/org/taverna/server/client/Server.java",
"license": "bsd-3-clause",
"size": 13830
} | [
"uk.org.taverna.server.client.connection.MimeType",
"uk.org.taverna.server.client.connection.UserCredentials",
"uk.org.taverna.server.client.xml.ResourceLabel"
] | import uk.org.taverna.server.client.connection.MimeType; import uk.org.taverna.server.client.connection.UserCredentials; import uk.org.taverna.server.client.xml.ResourceLabel; | import uk.org.taverna.server.client.connection.*; import uk.org.taverna.server.client.xml.*; | [
"uk.org.taverna"
] | uk.org.taverna; | 1,755,835 |
private String formatNodeLabel(PatriciaTrie.PatriciaNode<V> node, KeyMapper<String> keyMapper, boolean formatBitString) {
StringBuilder builder = new StringBuilder();
builder.append("<<table border=\"0\" cellborder=\"0\">");
// Key
builder.append("<tr><td>");
builder.append("... | String function(PatriciaTrie.PatriciaNode<V> node, KeyMapper<String> keyMapper, boolean formatBitString) { StringBuilder builder = new StringBuilder(); builder.append(STR0\STR0\">"); builder.append(STR); builder.append(STR#00a000\">"); builder.append(getNodeLabel(node)); builder.append(STR); builder.append(STR); builde... | /**
* Format node label
*
* @param node node to format
* @param keyMapper keymapper to map keys to bits
* @param formatBitString true if the bits for this key should be included in the node
* @return formatted formatted node, not null
*/ | Format node label | formatNodeLabel | {
"repo_name": "atilika/kuromoji",
"path": "kuromoji-core/src/main/java/com/atilika/kuromoji/trie/PatriciaTrieFormatter.java",
"license": "apache-2.0",
"size": 8934
} | [
"com.atilika.kuromoji.trie.PatriciaTrie"
] | import com.atilika.kuromoji.trie.PatriciaTrie; | import com.atilika.kuromoji.trie.*; | [
"com.atilika.kuromoji"
] | com.atilika.kuromoji; | 2,872,295 |
@Nullable public static <T> T firstNotNull(@Nullable T... vals) {
if (vals == null)
return null;
for (T val : vals) {
if (val != null)
return val;
}
return null;
} | @Nullable static <T> T function(@Nullable T... vals) { if (vals == null) return null; for (T val : vals) { if (val != null) return val; } return null; } | /**
* Returns a first non-null value in a given array, if such is present.
*
* @param vals Input array.
* @return First non-null value, or {@code null}, if array is empty or contains
* only nulls.
*/ | Returns a first non-null value in a given array, if such is present | firstNotNull | {
"repo_name": "apache/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 387878
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,234,867 |
public void advance(Amount<Long, Time> period) {
Preconditions.checkNotNull(period);
long newNanos = nowNanos + period.as(Time.NANOSECONDS);
Preconditions.checkArgument(newNanos >= 0,
"invalid period %s - would move current time to a negative value: %sns", period, newNanos);
nowNanos = newNano... | void function(Amount<Long, Time> period) { Preconditions.checkNotNull(period); long newNanos = nowNanos + period.as(Time.NANOSECONDS); Preconditions.checkArgument(newNanos >= 0, STR, period, newNanos); nowNanos = newNanos; } | /**
* Advances the current time by {@code millis} milliseconds. Time can be retarded by passing a
* negative value.
*
* @param period the amount of time to advance the current time by
*/ | Advances the current time by millis milliseconds. Time can be retarded by passing a negative value | advance | {
"repo_name": "rosmo/aurora",
"path": "commons/src/main/java/org/apache/aurora/common/util/testing/FakeClock.java",
"license": "apache-2.0",
"size": 2554
} | [
"com.google.common.base.Preconditions",
"org.apache.aurora.common.quantity.Amount",
"org.apache.aurora.common.quantity.Time"
] | import com.google.common.base.Preconditions; import org.apache.aurora.common.quantity.Amount; import org.apache.aurora.common.quantity.Time; | import com.google.common.base.*; import org.apache.aurora.common.quantity.*; | [
"com.google.common",
"org.apache.aurora"
] | com.google.common; org.apache.aurora; | 2,528,781 |
@ResponseBody
@RequestMapping(value = "/{startTime}/{endTime}", method = RequestMethod.GET)
public void export(@PathVariable final String startTime, @PathVariable final String endTime,
HttpServletRequest request, HttpServletResponse response) {
List<PaymentSerialNumber> res = null;
JSON json = null;
Map<... | @RequestMapping(value = STR, method = RequestMethod.GET) void function(@PathVariable final String startTime, @PathVariable final String endTime, HttpServletRequest request, HttpServletResponse response) { List<PaymentSerialNumber> res = null; JSON json = null; Map<String, Object> responseMap = null; PrintWriter writer ... | /**
* export payment serial numbers
*
* @param startTime
* @param endTime
* @param request
* @param response
*/ | export payment serial numbers | export | {
"repo_name": "JoshEliYang/ReportAnalysis",
"path": "src/main/java/cn/springmvc/controller/PaymentSerialNumberController.java",
"license": "apache-2.0",
"size": 4036
} | [
"cn.springmvc.model.paymentSerialNo.PaymentSerialNumber",
"cn.springmvc.model.paymentSerialNo.SerialNumberQuery",
"com.alibaba.fastjson.JSON",
"com.springmvc.utils.ExcelUtils",
"java.io.PrintWriter",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"... | import cn.springmvc.model.paymentSerialNo.PaymentSerialNumber; import cn.springmvc.model.paymentSerialNo.SerialNumberQuery; import com.alibaba.fastjson.JSON; import com.springmvc.utils.ExcelUtils; import java.io.PrintWriter; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.htt... | import cn.springmvc.model.*; import com.alibaba.fastjson.*; import com.springmvc.utils.*; import java.io.*; import java.util.*; import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; | [
"cn.springmvc.model",
"com.alibaba.fastjson",
"com.springmvc.utils",
"java.io",
"java.util",
"javax.servlet",
"org.springframework.web"
] | cn.springmvc.model; com.alibaba.fastjson; com.springmvc.utils; java.io; java.util; javax.servlet; org.springframework.web; | 599,758 |
public Iterator<T> iterator(); | Iterator<T> function(); | /**
* Get an iterator that returns all of the elements in some order.
*/ | Get an iterator that returns all of the elements in some order | iterator | {
"repo_name": "tranchri/csc207-hw6",
"path": "src/edu/grinnell/tranchri/cohnhann/deweytyl/LinearStructure.java",
"license": "gpl-3.0",
"size": 1567
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,467,695 |
public HeadersConfigurer<H> deny() {
this.writer = new XFrameOptionsHeaderWriter(XFrameOptionsMode.DENY);
return and();
} | HeadersConfigurer<H> function() { this.writer = new XFrameOptionsHeaderWriter(XFrameOptionsMode.DENY); return and(); } | /**
* Specify to DENY framing any content from this application.
* @return the {@link HeadersConfigurer} for additional customization.
*/ | Specify to DENY framing any content from this application | deny | {
"repo_name": "fhanik/spring-security",
"path": "config/src/main/java/org/springframework/security/config/annotation/web/configurers/HeadersConfigurer.java",
"license": "apache-2.0",
"size": 33246
} | [
"org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter"
] | import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter; | import org.springframework.security.web.header.writers.frameoptions.*; | [
"org.springframework.security"
] | org.springframework.security; | 1,963,824 |
Coordinate[] getCoordinates(); | Coordinate[] getCoordinates(); | /**
* Get the coordinates.
*
* @return
*/ | Get the coordinates | getCoordinates | {
"repo_name": "geomajas/geomajas-project-graphics",
"path": "graphics/src/main/java/org/geomajas/graphics/client/object/role/CoordinateBased.java",
"license": "apache-2.0",
"size": 1659
} | [
"org.geomajas.geometry.Coordinate"
] | import org.geomajas.geometry.Coordinate; | import org.geomajas.geometry.*; | [
"org.geomajas.geometry"
] | org.geomajas.geometry; | 1,844,730 |
AggregatorBuilder<?> parse(String aggregationName, QueryParseContext context) throws IOException;
} | AggregatorBuilder<?> parse(String aggregationName, QueryParseContext context) throws IOException; } | /**
* Returns the aggregator factory with which this parser is associated, may return {@code null} indicating the
* aggregation should be skipped (e.g. when trying to aggregate on unmapped fields).
*
* @param aggregationName The name of the aggregation
* @param context ... | Returns the aggregator factory with which this parser is associated, may return null indicating the aggregation should be skipped (e.g. when trying to aggregate on unmapped fields) | parse | {
"repo_name": "nomoa/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/aggregations/Aggregator.java",
"license": "apache-2.0",
"size": 5631
} | [
"java.io.IOException",
"org.elasticsearch.index.query.QueryParseContext"
] | import java.io.IOException; import org.elasticsearch.index.query.QueryParseContext; | import java.io.*; import org.elasticsearch.index.query.*; | [
"java.io",
"org.elasticsearch.index"
] | java.io; org.elasticsearch.index; | 678,127 |
public Double calculateSimilarity(Map<String, Object> record1, Map<String, Object> record2, Map<String, String> parameters){
Double sim = 0.0;
calls_to_sim_functions += 1;
try {
Float sim1 = mongeElkan.compare(record1.get("Authors").toString(), record2.get("Authors").toString());... | Double function(Map<String, Object> record1, Map<String, Object> record2, Map<String, String> parameters){ Double sim = 0.0; calls_to_sim_functions += 1; try { Float sim1 = mongeElkan.compare(record1.get(STR).toString(), record2.get(STR).toString()); Float sim2 = levenshtein.compare(record1.get("title").toString(), rec... | /**
*
* Given two records, return their similarity in the range of [0,1].
*
* @param record1
* @param record2
* @param parameters: You could pass your parameters in a key, value form.
* @return: The similarity in a double value of a range [0,1].
*/ | Given two records, return their similarity in the range of [0,1] | calculateSimilarity | {
"repo_name": "JohnKoumarelas/DistributedDuplicateDetection",
"path": "src/main/java/de/hpi/is/idd/datasets/CoraUtility.java",
"license": "apache-2.0",
"size": 10227
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 162,027 |
void enterTag(@NotNull ClojureParser.TagContext ctx);
void exitTag(@NotNull ClojureParser.TagContext ctx); | void enterTag(@NotNull ClojureParser.TagContext ctx); void exitTag(@NotNull ClojureParser.TagContext ctx); | /**
* Exit a parse tree produced by {@link ClojureParser#tag}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>ClojureParser#tag</code> | exitTag | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/ClojureListener.java",
"license": "gpl-3.0",
"size": 13898
} | [
"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; | 109,921 |
mDB = mDBHelper.getWritableDatabase();
List<ShoppingCart> shoppingCartList = new ArrayList<ShoppingCart>();
String sql = "SELECT shop_id, shop_name FROM shop";
Cursor cursor = null;
Cursor c = null;
try {
cursor = mDB.rawQuery(sql, null);
List<Shop> shopList = new ArrayList<Shop>();
while ... | mDB = mDBHelper.getWritableDatabase(); List<ShoppingCart> shoppingCartList = new ArrayList<ShoppingCart>(); String sql = STR; Cursor cursor = null; Cursor c = null; try { cursor = mDB.rawQuery(sql, null); List<Shop> shopList = new ArrayList<Shop>(); while (cursor.moveToNext()) { int shopId = cursor.getInt(cursor.getCol... | /**
* search task
*/ | search task | getAll | {
"repo_name": "AskViky/CommunityService",
"path": "src/com/askviky/communityservice/db/sqlite/ShoppingCartDBService.java",
"license": "apache-2.0",
"size": 4168
} | [
"android.database.Cursor",
"com.askviky.communityservice.bean.Product",
"com.askviky.communityservice.bean.Shop",
"com.askviky.communityservice.bean.ShoppingCart",
"java.util.ArrayList",
"java.util.List"
] | import android.database.Cursor; import com.askviky.communityservice.bean.Product; import com.askviky.communityservice.bean.Shop; import com.askviky.communityservice.bean.ShoppingCart; import java.util.ArrayList; import java.util.List; | import android.database.*; import com.askviky.communityservice.bean.*; import java.util.*; | [
"android.database",
"com.askviky.communityservice",
"java.util"
] | android.database; com.askviky.communityservice; java.util; | 1,096,602 |
private void collectXmlBasedCallbackMethods(ARSCFileParser resParser,
LayoutFileParser lfp, AbstractCallbackAnalyzer jimpleClass) {
// Collect the XML-based callback methods
for (Entry<String, Set<Integer>> lcentry : jimpleClass.getLayoutClasses().entrySet()) {
final SootClass callbackClass = Scene.v().get... | void function(ARSCFileParser resParser, LayoutFileParser lfp, AbstractCallbackAnalyzer jimpleClass) { for (Entry<String, Set<Integer>> lcentry : jimpleClass.getLayoutClasses().entrySet()) { final SootClass callbackClass = Scene.v().getSootClass(lcentry.getKey()); for (Integer classId : lcentry.getValue()) { AbstractRes... | /**
* Collects the XML-based callback methods, e.g., Button.onClick() declared
* in layout XML files
* @param resParser The ARSC resource parser
* @param lfp The layout file parser
* @param jimpleClass The analysis class that gives us a mapping between
* layout IDs and components
*/ | Collects the XML-based callback methods, e.g., Button.onClick() declared in layout XML files | collectXmlBasedCallbackMethods | {
"repo_name": "uds-se/soot-infoflow-android",
"path": "src/soot/jimple/infoflow/android/SetupApplication.java",
"license": "lgpl-2.1",
"size": 32750
} | [
"java.util.HashSet",
"java.util.Map",
"java.util.Set"
] | import java.util.HashSet; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 603,928 |
public String buildQuery(int minimum)
{
String query;
boolean validQuery = false;
// the QName for the well known "name" attribute
String nameAttr = Repository.escapeQName(QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, ELEMENT_NAME));
StringBuilder pl... | String function(int minimum) { String query; boolean validQuery = false; String nameAttr = Repository.escapeQName(QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, ELEMENT_NAME)); StringBuilder plBuf = new StringBuilder(500).append("("); StringBuilder mnBuf = new StringBuilder(500).append("-("); String text = t... | /**
* Build the search query string based on the current search context members.
*
* @param minimum small possible textual string used for a match
* this does not effect fixed values searches (e.g. boolean, int values) or date ranges
*
* @return prepared search... | Build the search query string based on the current search context members | buildQuery | {
"repo_name": "Alfresco/community-edition",
"path": "projects/web-client/source/java/org/alfresco/web/bean/search/SearchContext.java",
"license": "lgpl-3.0",
"size": 39035
} | [
"org.alfresco.model.ContentModel",
"org.alfresco.service.namespace.NamespaceService",
"org.alfresco.service.namespace.QName",
"org.alfresco.util.SearchLanguageConversion",
"org.alfresco.web.bean.repository.Repository"
] | import org.alfresco.model.ContentModel; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.QName; import org.alfresco.util.SearchLanguageConversion; import org.alfresco.web.bean.repository.Repository; | import org.alfresco.model.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*; import org.alfresco.web.bean.repository.*; | [
"org.alfresco.model",
"org.alfresco.service",
"org.alfresco.util",
"org.alfresco.web"
] | org.alfresco.model; org.alfresco.service; org.alfresco.util; org.alfresco.web; | 2,109,665 |
@Test
public void testUnsubscribeViaReturnedSubscription() throws InterruptedException {
final AtomicBoolean unsubscribed = new AtomicBoolean();
final AtomicBoolean interrupted = new AtomicBoolean();
final CountDownLatch latch = new CountDownLatch(2);
Single<String> s = Single.c... | void function() throws InterruptedException { final AtomicBoolean unsubscribed = new AtomicBoolean(); final AtomicBoolean interrupted = new AtomicBoolean(); final CountDownLatch latch = new CountDownLatch(2); Single<String> s = Single.create(new OnSubscribe<String>() { | /**
* Assert that unsubscribe propagates when passing in a SingleSubscriber and not a Subscriber
*/ | Assert that unsubscribe propagates when passing in a SingleSubscriber and not a Subscriber | testUnsubscribeViaReturnedSubscription | {
"repo_name": "marcogarcia23/RxJava",
"path": "src/test/java/rx/SingleTest.java",
"license": "apache-2.0",
"size": 13863
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.atomic.AtomicBoolean"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; | import java.util.concurrent.*; import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 1,341,250 |
public static String[] getAttributeValues(final Element parent, final String childPath, final String[] attributes) {
if ((parent == null) || (attributes == null)) {
return null;
} else {
Element child = getLeafChild(parent, childPath);
return getAttributeValues(c... | static String[] function(final Element parent, final String childPath, final String[] attributes) { if ((parent == null) (attributes == null)) { return null; } else { Element child = getLeafChild(parent, childPath); return getAttributeValues(child, attributes); } } | /**
* Returns the value of the child element reached by the given path.
* This is useful in cases where a child has several attributes.
* Traverses the DOM tree from the parent until the child is reached.
*
* @param parent the parent <code>Element</code>
* @param childPath a path to t... | Returns the value of the child element reached by the given path. This is useful in cases where a child has several attributes. Traverses the DOM tree from the parent until the child is reached | getAttributeValues | {
"repo_name": "nikos/informa",
"path": "src/main/java/de/nava/informa/utils/XmlPathUtils.java",
"license": "epl-1.0",
"size": 11806
} | [
"org.jdom2.Element"
] | import org.jdom2.Element; | import org.jdom2.*; | [
"org.jdom2"
] | org.jdom2; | 423,200 |
public BooksCursor fetchBooksByGoodreadsBookId(long grId) throws SQLException {
String where = TBL_BOOKS.dot(DOM_GOODREADS_BOOK_ID) + "=" + grId;
return fetchAllBooks("", "", "", where, "", "", "");
}
| BooksCursor function(long grId) throws SQLException { String where = TBL_BOOKS.dot(DOM_GOODREADS_BOOK_ID) + "=" + grId; return fetchAllBooks(STRSTR", where, STRSTR"); } | /**
* Return a book (Cursor) that matches the given goodreads book Id.
* Note: MAYE RETURN MORE THAN ONE BOOK
*
* @param gdId Goodreads id of book(s) to retrieve
*
* @return Cursor positioned to matching book, if found
*
* @throws SQLException if note could not be found/retrieved
*/ | Return a book (Cursor) that matches the given goodreads book Id. Note: MAYE RETURN MORE THAN ONE BOOK | fetchBooksByGoodreadsBookId | {
"repo_name": "gvmelle/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/CatalogueDBAdapter.java",
"license": "gpl-3.0",
"size": 238306
} | [
"android.database.SQLException"
] | import android.database.SQLException; | import android.database.*; | [
"android.database"
] | android.database; | 2,429,887 |
public static String getContentFromElement(Element element, String namespaceURI, String localName) {
String elementContent = null;
NodeList nodes = element.getElementsByTagNameNS(namespaceURI, localName);
for (int i = 0; i < nodes.getLength(); i++) {
elementContent = nodes.item(i... | static String function(Element element, String namespaceURI, String localName) { String elementContent = null; NodeList nodes = element.getElementsByTagNameNS(namespaceURI, localName); for (int i = 0; i < nodes.getLength(); i++) { elementContent = nodes.item(i).getTextContent(); } return elementContent; } private W3cHe... | /**
* Get text content from element by namespace.
*
* @param element
* element
* @param namespaceURI
* Namespace URI
* @param localName
* local name
*
* @return Text content.
*/ | Get text content from element by namespace | getContentFromElement | {
"repo_name": "nuest/SOS",
"path": "core/api/src/main/java/org/n52/sos/util/W3cHelper.java",
"license": "gpl-2.0",
"size": 4019
} | [
"org.w3c.dom.Element",
"org.w3c.dom.NodeList"
] | import org.w3c.dom.Element; import org.w3c.dom.NodeList; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 614,713 |
public static byte[] toBase64(final byte[] bytes) {
return Base64.encodeBase64(bytes);
} | static byte[] function(final byte[] bytes) { return Base64.encodeBase64(bytes); } | /**
* Encodes the given <code>byte[]</code> to base64.
*
* @param bytes bytes to encode
*
* @return the base64 encoded bytes
*
* @see org.apache.commons.codec.binary.Base64#encodeBase64(byte[])
*/ | Encodes the given <code>byte[]</code> to base64 | toBase64 | {
"repo_name": "cismet/cismet-commons",
"path": "src/main/java/de/cismet/tools/Converter.java",
"license": "lgpl-3.0",
"size": 10878
} | [
"org.apache.commons.codec.binary.Base64"
] | import org.apache.commons.codec.binary.Base64; | import org.apache.commons.codec.binary.*; | [
"org.apache.commons"
] | org.apache.commons; | 594,792 |
public String apisApiIdDocumentsDocumentIdGetFingerprint(String apiId, String documentId,
String ifNoneMatch, String ifModifiedSince, Request request) {
String username = RestApiUtil.getLoggedInUsername(request);
try {
String lastUpdatedTime = RestAPIPublisherUtil.getApiPubli... | String function(String apiId, String documentId, String ifNoneMatch, String ifModifiedSince, Request request) { String username = RestApiUtil.getLoggedInUsername(request); try { String lastUpdatedTime = RestAPIPublisherUtil.getApiPublisher(username) .getLastUpdatedTimeOfDocument(documentId); return ETagUtils.generateET... | /**
* Retrieves the fingerprint of a document
*
* @param apiId UUID of API
* @param documentId UUID of the document
* @param ifNoneMatch If-None-Match header value
* @param ifModifiedSince If-Modified-Since header value
* @param request msf4j request object
... | Retrieves the fingerprint of a document | apisApiIdDocumentsDocumentIdGetFingerprint | {
"repo_name": "dewmini/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/impl/ApisApiServiceImpl.java",
"license": "apache-2.0",
"size": 88109
} | [
"org.wso2.carbon.apimgt.core.exception.APIManagementException",
"org.wso2.carbon.apimgt.core.util.ETagUtils",
"org.wso2.carbon.apimgt.rest.api.common.util.RestApiUtil",
"org.wso2.carbon.apimgt.rest.api.publisher.utils.RestAPIPublisherUtil",
"org.wso2.msf4j.Request"
] | import org.wso2.carbon.apimgt.core.exception.APIManagementException; import org.wso2.carbon.apimgt.core.util.ETagUtils; import org.wso2.carbon.apimgt.rest.api.common.util.RestApiUtil; import org.wso2.carbon.apimgt.rest.api.publisher.utils.RestAPIPublisherUtil; import org.wso2.msf4j.Request; | import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.util.*; import org.wso2.carbon.apimgt.rest.api.common.util.*; import org.wso2.carbon.apimgt.rest.api.publisher.utils.*; import org.wso2.msf4j.*; | [
"org.wso2.carbon",
"org.wso2.msf4j"
] | org.wso2.carbon; org.wso2.msf4j; | 2,544,771 |
public void testInsert() throws Exception {
final String KEY = KEY_BASE + testCount++;
final CountDownLatch readLatch = new CountDownLatch(1);
final CountDownLatch commitLatch = new CountDownLatch(1);
final CountDownLatch completionLatch = new CountDownLatch(2);
Thread ins... | void function() throws Exception { final String KEY = KEY_BASE + testCount++; final CountDownLatch readLatch = new CountDownLatch(1); final CountDownLatch commitLatch = new CountDownLatch(1); final CountDownLatch completionLatch = new CountDownLatch(2); Thread inserter = new Thread() { | /**
* Test method for {@link TransactionalAccess#insert(java.lang.Object, java.lang.Object, java.lang.Object)}.
*/ | Test method for <code>TransactionalAccess#insert(java.lang.Object, java.lang.Object, java.lang.Object)</code> | testInsert | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/entity/AbstractEntityRegionAccessStrategyTestCase.java",
"license": "epl-1.0",
"size": 29670
} | [
"java.util.concurrent.CountDownLatch"
] | import java.util.concurrent.CountDownLatch; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 91,072 |
public void setNewDetailLine(EffortCertificationDetail newDetailLine) {
this.newDetailLine = newDetailLine;
}
| void function(EffortCertificationDetail newDetailLine) { this.newDetailLine = newDetailLine; } | /**
* Sets the new detail line
*
* @param newDetailLine
*/ | Sets the new detail line | setNewDetailLine | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ec/document/web/struts/EffortCertificationForm.java",
"license": "agpl-3.0",
"size": 23484
} | [
"org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail"
] | import org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail; | import org.kuali.kfs.module.ec.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 670,812 |
@Test
public void testNextTupleGotoNext() throws Exception {
TestSpout s = new TestSpout(1);
SortedMap<String, Object> td1 = new TreeMap<>(testData);
s.addInputData(Utils.DEFAULT_STREAM_ID, td1);
SortedMap<String, Object> td2 = new TreeMap<>(testData);
s.addInputData("o... | void function() throws Exception { TestSpout s = new TestSpout(1); SortedMap<String, Object> td1 = new TreeMap<>(testData); s.addInputData(Utils.DEFAULT_STREAM_ID, td1); SortedMap<String, Object> td2 = new TreeMap<>(testData); s.addInputData(STR, td2); s.open(testStormConf, tc, sc); s.activate(); s.nextTuple(); verify(... | /**
* Assert that nextTuple will move to the next iterator if the first is
* empty.
*
* @throws Exception An unexpected Exception.
*/ | Assert that nextTuple will move to the next iterator if the first is empty | testNextTupleGotoNext | {
"repo_name": "krotscheck/storm-toolkit",
"path": "storm-toolkit-test/src/test/java/net/krotscheck/stk/test/topology/TestSpoutTest.java",
"license": "apache-2.0",
"size": 17116
} | [
"java.util.ArrayList",
"java.util.SortedMap",
"java.util.TreeMap",
"org.mockito.Matchers",
"org.mockito.Mockito"
] | import java.util.ArrayList; import java.util.SortedMap; import java.util.TreeMap; import org.mockito.Matchers; import org.mockito.Mockito; | import java.util.*; import org.mockito.*; | [
"java.util",
"org.mockito"
] | java.util; org.mockito; | 51,885 |
WorldManager worldManager(); | WorldManager worldManager(); | /**
* Gets the {@link WorldManager}.
*
* @return The world manager
*/ | Gets the <code>WorldManager</code> | worldManager | {
"repo_name": "SpongePowered/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/Server.java",
"license": "mit",
"size": 12164
} | [
"org.spongepowered.api.world.server.WorldManager"
] | import org.spongepowered.api.world.server.WorldManager; | import org.spongepowered.api.world.server.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 621,356 |
public void takeDBSnapShot(long checkpointId, long checkpointTimeStamp) {
Preconditions.checkArgument(snapshot == null, "Only one ongoing snapshot allowed!");
this.kvStateIterators = new ArrayList<>(stateBackend.kvStateInformation.size());
this.checkpointId = checkpointId;
this.checkpointTimeStamp = ch... | void function(long checkpointId, long checkpointTimeStamp) { Preconditions.checkArgument(snapshot == null, STR); this.kvStateIterators = new ArrayList<>(stateBackend.kvStateInformation.size()); this.checkpointId = checkpointId; this.checkpointTimeStamp = checkpointTimeStamp; this.snapshot = stateBackend.db.getSnapshot(... | /**
* 1) Create a snapshot object from RocksDB.
*
* @param checkpointId id of the checkpoint for which we take the snapshot
* @param checkpointTimeStamp timestamp of the checkpoint for which we take the snapshot
*/ | 1) Create a snapshot object from RocksDB | takeDBSnapShot | {
"repo_name": "PangZhi/flink",
"path": "flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java",
"license": "apache-2.0",
"size": 75037
} | [
"java.util.ArrayList",
"org.apache.flink.util.Preconditions"
] | import java.util.ArrayList; import org.apache.flink.util.Preconditions; | import java.util.*; import org.apache.flink.util.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 2,405,464 |
public void testPersistentPRWithGatewaySenderPersistenceEnabled_Restart() {
//create locator on local site
Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
"createFirstLocatorWithDSId", new Object[] { 1 });
//create locator on remote site
Integer nyPort = (Integer)vm1.invoke(WANTestBase... | void function() { Integer lnPort = (Integer)vm0.invoke(WANTestBase.class, STR, new Object[] { 1 }); Integer nyPort = (Integer)vm1.invoke(WANTestBase.class, STR, new Object[] { 2, lnPort }); vm2.invoke(WANTestBase.class, STR, new Object[] { nyPort }); vm3.invoke(WANTestBase.class, STR, new Object[] { nyPort }); vm4.invo... | /**
* Enable persistence for PR and GatewaySender.
* Pause the sender and do some puts in local region.
* Close the local site and rebuild the region and sender from disk store.
* Dispatcher should not start dispatching events recovered from persistent sender.
* Check if the remote site receives all th... | Enable persistence for PR and GatewaySender. Pause the sender and do some puts in local region. Close the local site and rebuild the region and sender from disk store. Dispatcher should not start dispatching events recovered from persistent sender. Check if the remote site receives all the events | testPersistentPRWithGatewaySenderPersistenceEnabled_Restart | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java",
"license": "apache-2.0",
"size": 91990
} | [
"com.gemstone.gemfire.internal.cache.wan.WANTestBase"
] | import com.gemstone.gemfire.internal.cache.wan.WANTestBase; | import com.gemstone.gemfire.internal.cache.wan.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 96,067 |
public void test_parallelSort$C_NPE() {
char[] char_array_null = null;
try {
java.util.Arrays.parallelSort(char_array_null);
fail("Should throw java.lang.NullPointerException");
} catch (NullPointerException expected) {
}
try {
java.util.Ar... | public void test_parallelSort$C_NPE() { char[] char_array_null = null; try { java.util.Arrays.parallelSort(char_array_null); fail(STR); } catch (NullPointerException expected) { } try { java.util.Arrays.parallelSort(char_array_null, (int) -1, (int) 1); fail(STR); } catch (NullPointerException expected) { } } | /**
* java.util.Arrays#parallelSort(char[]) & (char[], int, int) NPE
*/ | java.util.Arrays#parallelSort(char[]) & (char[], int, int) NPE | test_parallelSort$C_NPE | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java",
"license": "gpl-2.0",
"size": 207677
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 656,349 |
@Test(expectedExceptions = OpenGammaRuntimeException.class)
public void testNoIborIndexConventionOrSecurityForCompoundingLeg() {
final InMemoryConventionSource conventionSource = new InMemoryConventionSource();
conventionSource.addConvention(FIXED_LEG_CONVENTION.clone());
conventionSource.addConvention(... | @Test(expectedExceptions = OpenGammaRuntimeException.class) void function() { final InMemoryConventionSource conventionSource = new InMemoryConventionSource(); conventionSource.addConvention(FIXED_LEG_CONVENTION.clone()); conventionSource.addConvention(COMPOUNDING_LIBOR_LEG_CONVENTION.clone()); final SwapNode node = ne... | /**
* Tests the behaviour if the ibor index convention and security are not available for a compounding ibor leg convention.
*/ | Tests the behaviour if the ibor index convention and security are not available for a compounding ibor leg convention | testNoIborIndexConventionOrSecurityForCompoundingLeg | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/test/java/com/opengamma/financial/analytics/curve/SwapNodeCurrencyVisitorTest.java",
"license": "apache-2.0",
"size": 27347
} | [
"com.opengamma.OpenGammaRuntimeException",
"com.opengamma.engine.InMemoryConventionSource",
"com.opengamma.financial.analytics.ircurve.strips.SwapNode",
"com.opengamma.util.time.Tenor",
"org.testng.annotations.Test"
] | import com.opengamma.OpenGammaRuntimeException; import com.opengamma.engine.InMemoryConventionSource; import com.opengamma.financial.analytics.ircurve.strips.SwapNode; import com.opengamma.util.time.Tenor; import org.testng.annotations.Test; | import com.opengamma.*; import com.opengamma.engine.*; import com.opengamma.financial.analytics.ircurve.strips.*; import com.opengamma.util.time.*; import org.testng.annotations.*; | [
"com.opengamma",
"com.opengamma.engine",
"com.opengamma.financial",
"com.opengamma.util",
"org.testng.annotations"
] | com.opengamma; com.opengamma.engine; com.opengamma.financial; com.opengamma.util; org.testng.annotations; | 1,724,902 |
Configuration conf = HBaseConfiguration.create();
try {
Properties zkProperties = ZKConfig.makeZKProps(conf);
writeMyID(zkProperties);
QuorumPeerConfig zkConfig = new QuorumPeerConfig();
zkConfig.parseProperties(zkProperties);
runZKServer(zkConfig);
} catch (Exception e) {
e.... | Configuration conf = HBaseConfiguration.create(); try { Properties zkProperties = ZKConfig.makeZKProps(conf); writeMyID(zkProperties); QuorumPeerConfig zkConfig = new QuorumPeerConfig(); zkConfig.parseProperties(zkProperties); runZKServer(zkConfig); } catch (Exception e) { e.printStackTrace(); System.exit(-1); } } | /**
* Parse ZooKeeper configuration from HBase XML config and run a QuorumPeer.
* @param args String[] of command line arguments. Not used.
*/ | Parse ZooKeeper configuration from HBase XML config and run a QuorumPeer | main | {
"repo_name": "abaranau/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java",
"license": "apache-2.0",
"size": 5258
} | [
"java.util.Properties",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.zookeeper.server.quorum.QuorumPeerConfig"
] | import java.util.Properties; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.zookeeper.server.quorum.QuorumPeerConfig; | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.zookeeper.server.quorum.*; | [
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.util; org.apache.hadoop; org.apache.zookeeper; | 1,945,372 |
public static String getString(
final byte[] data,
final int offset,
final int length,
final String charset) {
Args.notNull(data, "Input");
Args.notEmpty(charset, "Charset");
try {
return new String(data, offset, length, charset);
} catch (... | static String function( final byte[] data, final int offset, final int length, final String charset) { Args.notNull(data, "Input"); Args.notEmpty(charset, STR); try { return new String(data, offset, length, charset); } catch (final UnsupportedEncodingException e) { return new String(data, offset, length); } } | /**
* Converts the byte array of HTTP content characters to a string. If
* the specified charset is not supported, default system encoding
* is used.
*
* @param data the byte array to be encoded
* @param offset the index of the first byte to encode
* @param length the number of bytes ... | Converts the byte array of HTTP content characters to a string. If the specified charset is not supported, default system encoding is used | getString | {
"repo_name": "mcomella/FirefoxAccounts-android",
"path": "thirdparty/src/main/java/ch/boye/httpclientandroidlib/util/EncodingUtils.java",
"license": "mpl-2.0",
"size": 5237
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 127 |
boolean processRequest(ServletRequest request, final ServletResponse response,
final FilterChain chain) throws IOException, ServletException
{
final ThreadContext previousThreadContext = ThreadContext.detach();
// Assume we are able to handle the request
boolean res = true;
final ClassLoader previousCla... | boolean processRequest(ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { final ThreadContext previousThreadContext = ThreadContext.detach(); boolean res = true; final ClassLoader previousClassLoader = Thread.currentThread().getContextClassLoader(); f... | /**
* This is Wicket's main method to execute a request
*
* @param request
* @param response
* @param chain
* @return false, if the request could not be processed
* @throws IOException
* @throws ServletException
*/ | This is Wicket's main method to execute a request | processRequest | {
"repo_name": "martin-g/wicket-osgi",
"path": "wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java",
"license": "apache-2.0",
"size": 19060
} | [
"java.io.IOException",
"javax.servlet.FilterChain",
"javax.servlet.ServletException",
"javax.servlet.ServletRequest",
"javax.servlet.ServletResponse",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.wicket.ThreadContext",
"org.apache.wicket.request.cycl... | import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.wicket.ThreadContext; import org.... | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.wicket.*; import org.apache.wicket.request.cycle.*; import org.apache.wicket.request.http.*; import org.apache.wicket.util.string.*; | [
"java.io",
"javax.servlet",
"org.apache.wicket"
] | java.io; javax.servlet; org.apache.wicket; | 1,621,055 |
public B mediaType(MediaType mt) {
return set("mediaType", mt);
} | B function(MediaType mt) { return set(STR, mt); } | /**
* Set the MIME Media Type of the object
* @param mt com.google.common.net.MediaType
* @return B
**/ | Set the MIME Media Type of the object | mediaType | {
"repo_name": "worldline-messaging/activitystreams",
"path": "core/src/main/java/com/ibm/common/activitystreams/ASObject.java",
"license": "apache-2.0",
"size": 65559
} | [
"com.google.common.net.MediaType"
] | import com.google.common.net.MediaType; | import com.google.common.net.*; | [
"com.google.common"
] | com.google.common; | 2,266,751 |
private boolean lineItemDisplaysOnPdf(PurchaseOrderItem poi) {
LOG.debug("lineItemDisplaysOnPdf() started");
// Shipping, freight, full order discount and trade in items.
if ((poi.getItemType() != null) && (poi.getItemType().getItemTypeCode().equals(PurapConstants.ItemTypeCodes.ITEM_TYPE_SH... | boolean function(PurchaseOrderItem poi) { LOG.debug(STR); if ((poi.getItemType() != null) && (poi.getItemType().getItemTypeCode().equals(PurapConstants.ItemTypeCodes.ITEM_TYPE_SHIP_AND_HAND_CODE) poi.getItemType().getItemTypeCode().equals(PurapConstants.ItemTypeCodes.ITEM_TYPE_FREIGHT_CODE) poi.getItemType().getItemTyp... | /**
* Determines whether the item should be displayed on the pdf.
*
* @param poi The PurchaseOrderItem to be determined whether it should be displayed on the pdf.
* @return boolean true if it should be displayed on the pdf.
*/ | Determines whether the item should be displayed on the pdf | lineItemDisplaysOnPdf | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/pdf/PurchaseOrderPdf.java",
"license": "apache-2.0",
"size": 53322
} | [
"org.kuali.kfs.module.purap.PurapConstants",
"org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem"
] | import org.kuali.kfs.module.purap.PurapConstants; import org.kuali.kfs.module.purap.businessobject.PurchaseOrderItem; | import org.kuali.kfs.module.purap.*; import org.kuali.kfs.module.purap.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,657,312 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ContentTypeContractInner> listByService(String resourceGroupName, String serviceName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ContentTypeContractInner> listByService(String resourceGroupName, String serviceName); | /**
* Lists the developer portal's content types. Content types describe content items' properties, validation rules,
* and constraints.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @throws IllegalArgumentExcept... | Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints | listByService | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/ContentTypesClient.java",
"license": "mit",
"size": 8938
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.apimanagement.fluent.models.ContentTypeContractInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.apimanagement.fluent.models.ContentTypeContractInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.apimanagement.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,151,583 |
@Override
public ResourceLocator getResourceLocator() {
return NetworkEditPlugin.INSTANCE;
} | ResourceLocator function() { return NetworkEditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "tht-krisztian/EMF-IncQuery-Examples",
"path": "network/network.edit/src/network/provider/CircleItemProvider.java",
"license": "epl-1.0",
"size": 7559
} | [
"org.eclipse.emf.common.util.ResourceLocator"
] | import org.eclipse.emf.common.util.ResourceLocator; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,737,151 |
private DocToIdIterator searchForNodes( IndexSearcherRef searcher,
String key, Object value, Object matching, Sort sortingOrNull, Set<Long> deletedNodes )
{
Query query = formQuery( key, value, matching );
try
{
searcher.incRef();
Hits hits = new Hits(... | DocToIdIterator function( IndexSearcherRef searcher, String key, Object value, Object matching, Sort sortingOrNull, Set<Long> deletedNodes ) { Query query = formQuery( key, value, matching ); try { searcher.incRef(); Hits hits = new Hits( searcher.getSearcher(), query, null, sortingOrNull ); return new DocToIdIterator(... | /**
* Returns a lazy iterator with the node ids.
*/ | Returns a lazy iterator with the node ids | searchForNodes | {
"repo_name": "neo4j-contrib/legacy-index",
"path": "src/main/java/org/neo4j/index/lucene/LuceneIndexService.java",
"license": "agpl-3.0",
"size": 24488
} | [
"java.io.IOException",
"java.util.Set",
"org.apache.lucene.search.Query",
"org.apache.lucene.search.Sort"
] | import java.io.IOException; import java.util.Set; import org.apache.lucene.search.Query; import org.apache.lucene.search.Sort; | import java.io.*; import java.util.*; import org.apache.lucene.search.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 1,409,472 |
public ProgressBar getProgress() {
return mProgress;
} | ProgressBar function() { return mProgress; } | /**
*
* Get progress
* @return
* @throws
*/ | Get progress | getProgress | {
"repo_name": "yinglovezhuzhu/PullView_eclipse",
"path": "PullView/src/com/opensource/pullview/PullHeaderView.java",
"license": "apache-2.0",
"size": 7658
} | [
"android.widget.ProgressBar"
] | import android.widget.ProgressBar; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,245,455 |
protected boolean isTransformedTouchPointInView(float x, float y, View child,
PointF outLocalPoint) {
final float[] point = getTempPoint();
point[0] = x;
point[1] = y;
transformPointToViewLocal(point, child);
final boolean isInView = child.pointInView(point[0], po... | boolean function(float x, float y, View child, PointF outLocalPoint) { final float[] point = getTempPoint(); point[0] = x; point[1] = y; transformPointToViewLocal(point, child); final boolean isInView = child.pointInView(point[0], point[1]); if (isInView && outLocalPoint != null) { outLocalPoint.set(point[0], point[1])... | /**
* Returns true if a child view contains the specified point when transformed
* into its coordinate space.
* Child must not be null.
* @hide
*/ | Returns true if a child view contains the specified point when transformed into its coordinate space. Child must not be null | isTransformedTouchPointInView | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/view/ViewGroup.java",
"license": "gpl-3.0",
"size": 275692
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 729,362 |
@Override
protected void doInsert(final Knowledge knowledge, final KEPConnection kepConnection)
{
throw new UnsupportedOperationException("this method doInsert schould never be called.");
}
/**
* Gets the metadata tag and test if it is not null and this class is
* interested in th... | void function(final Knowledge knowledge, final KEPConnection kepConnection) { throw new UnsupportedOperationException(STR); } /** * Gets the metadata tag and test if it is not null and this class is * interested in the send interest. If so, it gets the list of * {@link ContextSpaceDescriptor} form the metadata tag an i... | /**
* Should never be called. Throws {@link UnsupportedOperationException}.
*/ | Should never be called. Throws <code>UnsupportedOperationException</code> | doInsert | {
"repo_name": "SharedKnowledge/Incubator",
"path": "Descriptor/src/main/java/net/sharkfw/descriptor/peer/DescriptorAssimilationKP.java",
"license": "gpl-3.0",
"size": 8111
} | [
"net.sharkfw.descriptor.knowledgeBase.ContextSpaceDescriptor",
"net.sharkfw.knowledgeBase.Knowledge",
"net.sharkfw.knowledgeBase.SharkCS",
"net.sharkfw.peer.KEPConnection",
"net.sharkfw.peer.KnowledgePort"
] | import net.sharkfw.descriptor.knowledgeBase.ContextSpaceDescriptor; import net.sharkfw.knowledgeBase.Knowledge; import net.sharkfw.knowledgeBase.SharkCS; import net.sharkfw.peer.KEPConnection; import net.sharkfw.peer.KnowledgePort; | import net.sharkfw.*; import net.sharkfw.descriptor.*; import net.sharkfw.peer.*; | [
"net.sharkfw",
"net.sharkfw.descriptor",
"net.sharkfw.peer"
] | net.sharkfw; net.sharkfw.descriptor; net.sharkfw.peer; | 2,602,651 |
public void setSecretResolver(Resolver<char[]> secretResolver) {
this.secretResolver = secretResolver;
} | void function(Resolver<char[]> secretResolver) { this.secretResolver = secretResolver; } | /**
* Sets the secret resolver.
*
* @param secretResolver
* The secret resolver.
*/ | Sets the secret resolver | setSecretResolver | {
"repo_name": "atealxt/work-workspaces",
"path": "HttpForwardDemo/src_restlet/org/restlet/Guard.java",
"license": "mit",
"size": 19655
} | [
"org.restlet.util.Resolver"
] | import org.restlet.util.Resolver; | import org.restlet.util.*; | [
"org.restlet.util"
] | org.restlet.util; | 703,605 |
public int[] getCircleTranslate() throws MBFormatException {
return parse.array(paint, "circle-translate", new int[] {0, 0});
} | int[] function() throws MBFormatException { return parse.array(paint, STR, new int[] {0, 0}); } | /**
* (Optional) The geometry's offset. Values are [x, y] where negatives indicate left and up,
* respectively. Units in pixels. Defaults to 0, 0.
*
* @return x and y offset in pixels.
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/ | (Optional) The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively. Units in pixels. Defaults to 0, 0 | getCircleTranslate | {
"repo_name": "geotools/geotools",
"path": "modules/extension/mbstyle/src/main/java/org/geotools/mbstyle/layer/CircleMBLayer.java",
"license": "lgpl-2.1",
"size": 13997
} | [
"org.geotools.mbstyle.parse.MBFormatException"
] | import org.geotools.mbstyle.parse.MBFormatException; | import org.geotools.mbstyle.parse.*; | [
"org.geotools.mbstyle"
] | org.geotools.mbstyle; | 480,589 |
public Map<String, Map<String, Boolean>> getDeviceMap() {
return deviceMap;
} | Map<String, Map<String, Boolean>> function() { return deviceMap; } | /**
* Gets the deviceMap property.
*
* @return the deviceMap.
*/ | Gets the deviceMap property | getDeviceMap | {
"repo_name": "aosolorzano/hiperium-home",
"path": "src/main/java/com/hiperium/home/xbee/XBeeService.java",
"license": "gpl-3.0",
"size": 7562
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,414,275 |
public String getPath(Charset charset)
{
Args.notNull(charset, "charset");
StringBuilder path = new StringBuilder();
boolean slash = false;
for (String segment : getSegments())
{
if (slash)
{
path.append('/');
}
path.append(encodeSegment(segment, charset));
slash = true;
}
return ... | String function(Charset charset) { Args.notNull(charset, STR); StringBuilder path = new StringBuilder(); boolean slash = false; for (String segment : getSegments()) { if (slash) { path.append('/'); } path.append(encodeSegment(segment, charset)); slash = true; } return path.toString(); } | /**
* return path for current url in given encoding
*
* @param charset
* character set for encoding
*
* @return path string
*/ | return path for current url in given encoding | getPath | {
"repo_name": "mafulafunk/wicket",
"path": "wicket-request/src/main/java/org/apache/wicket/request/Url.java",
"license": "apache-2.0",
"size": 28582
} | [
"java.nio.charset.Charset",
"org.apache.wicket.util.lang.Args"
] | import java.nio.charset.Charset; import org.apache.wicket.util.lang.Args; | import java.nio.charset.*; import org.apache.wicket.util.lang.*; | [
"java.nio",
"org.apache.wicket"
] | java.nio; org.apache.wicket; | 1,830,068 |
public void testFindSdkFor_GwtUserProject() throws Exception {
GwtRuntimeTestUtilities.importGwtSourceProjects();
try {
IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
IJavaProject javaProject = javaModel.getJavaProject("gwt-user");
GWTRuntime sdk = GWTRunti... | void function() throws Exception { GwtRuntimeTestUtilities.importGwtSourceProjects(); try { IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()); IJavaProject javaProject = javaModel.getJavaProject(STR); GWTRuntime sdk = GWTRuntime.findSdkFor(javaProject); IClasspathEntry gwtUserEntry = Java... | /**
* Tests that we find an {@link com.google.gdt.eclipse.core.sdk.Sdk} on the
* gwt-user project.
*
* @throws Exception
*/ | Tests that we find an <code>com.google.gdt.eclipse.core.sdk.Sdk</code> on the gwt-user project | testFindSdkFor_GwtUserProject | {
"repo_name": "briandealwis/gwt-eclipse-plugin",
"path": "plugins/com.gwtplugins.gwt.eclipse.core.test/src/com/google/gwt/eclipse/core/runtime/GWTRuntimeTest.java",
"license": "epl-1.0",
"size": 9676
} | [
"com.google.gwt.eclipse.testing.GwtRuntimeTestUtilities",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.Path",
"org.eclipse.jdt.core.IClasspathAttribute",
"org.eclipse.jdt.core.IClasspathEntry",
"org.eclipse.jdt.core.IJavaModel",
"org.eclipse... | import com.google.gwt.eclipse.testing.GwtRuntimeTestUtilities; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IClasspathAttribute; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaMo... | import com.google.gwt.eclipse.testing.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; | [
"com.google.gwt",
"org.eclipse.core",
"org.eclipse.jdt"
] | com.google.gwt; org.eclipse.core; org.eclipse.jdt; | 1,898,832 |
protected NamedParameterJdbcTemplate namedParameterJdbcTemplate(Connection conn) {
return new NamedParameterJdbcTemplate(new SingleConnectionDataSource(conn, true));
} | NamedParameterJdbcTemplate function(Connection conn) { return new NamedParameterJdbcTemplate(new SingleConnectionDataSource(conn, true)); } | /**
* Get {@link NamedParameterJdbcTemplate} instance for a given
* {@link Connection}.
*
* <p>
* Note: the returned {@link JdbcTemplate} will not close the wrapped {@link Connection}!
* </p>
*
* @param conn
* @return
* @since 0.8.0
*/ | Get <code>NamedParameterJdbcTemplate</code> instance for a given <code>Connection</code>. Note: the returned <code>JdbcTemplate</code> will not close the wrapped <code>Connection</code>! | namedParameterJdbcTemplate | {
"repo_name": "DDTH/ddth-dao",
"path": "ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/impl/JdbcTemplateJdbcHelper.java",
"license": "mit",
"size": 5540
} | [
"java.sql.Connection",
"org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate",
"org.springframework.jdbc.datasource.SingleConnectionDataSource"
] | import java.sql.Connection; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.jdbc.datasource.SingleConnectionDataSource; | import java.sql.*; import org.springframework.jdbc.core.namedparam.*; import org.springframework.jdbc.datasource.*; | [
"java.sql",
"org.springframework.jdbc"
] | java.sql; org.springframework.jdbc; | 1,743,531 |
public SyntaxParser getSyntaxParser() {
return this.syntaxParser;
}
| SyntaxParser function() { return this.syntaxParser; } | /**
* Returns the text parser used to build a query node tree from a query
* string. The default text parser instance returned by this method is a
* {@link SyntaxParser}.
*
* @return the text parse used to build query node trees.
*
* @see SyntaxParser
* @see #setSyntaxParser(SyntaxPars... | Returns the text parser used to build a query node tree from a query string. The default text parser instance returned by this method is a <code>SyntaxParser</code> | getSyntaxParser | {
"repo_name": "terrancesnyder/solr-analytics",
"path": "lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/QueryParserHelper.java",
"license": "apache-2.0",
"size": 8568
} | [
"org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser"
] | import org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser; | import org.apache.lucene.queryparser.flexible.core.parser.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,911,096 |
public void openDrawer(View drawerView) {
if (!isDrawerView(drawerView)) {
throw new IllegalArgumentException("View " + drawerView + " is not a sliding drawer");
}
if (mFirstLayout) {
final LayoutParams lp = (LayoutParams) drawerView.getLayoutParams();
lp... | void function(View drawerView) { if (!isDrawerView(drawerView)) { throw new IllegalArgumentException(STR + drawerView + STR); } if (mFirstLayout) { final LayoutParams lp = (LayoutParams) drawerView.getLayoutParams(); lp.onScreen = 1.f; lp.knownOpen = true; } else { if (checkDrawerViewGravity(drawerView, Gravity.LEFT)) ... | /**
* Open the specified drawer view by animating it into view.
*
* @param drawerView Drawer view to open
*/ | Open the specified drawer view by animating it into view | openDrawer | {
"repo_name": "yongjhih/android_tools",
"path": "sdk/extras/android/support/v4/src/java/android/support/v4/widget/DrawerLayout.java",
"license": "apache-2.0",
"size": 59662
} | [
"android.view.Gravity",
"android.view.View"
] | import android.view.Gravity; import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,669,911 |
Colour getFillColour(); | Colour getFillColour(); | /**
* Returns a {@link Colour} representation for the background color of this Shape
* @return the background color. Cannot be null.
*/ | Returns a <code>Colour</code> representation for the background color of this Shape | getFillColour | {
"repo_name": "stumoodie/VisualLanguageToolkit",
"path": "src/org/pathwayeditor/businessobjects/drawingprimitives/IDrawingNodeAttribute.java",
"license": "apache-2.0",
"size": 4046
} | [
"org.pathwayeditor.businessobjects.drawingprimitives.attributes.Colour"
] | import org.pathwayeditor.businessobjects.drawingprimitives.attributes.Colour; | import org.pathwayeditor.businessobjects.drawingprimitives.attributes.*; | [
"org.pathwayeditor.businessobjects"
] | org.pathwayeditor.businessobjects; | 417,040 |
@Override
public long clearCache() throws SQLException {
synchronized (latestMetaDataLock) {
latestMetaData = newEmptyMetaData();
} | long function() throws SQLException { synchronized (latestMetaDataLock) { latestMetaData = newEmptyMetaData(); } | /**
* Clears the Phoenix meta data cache on each region server
* @throws SQLException
*/ | Clears the Phoenix meta data cache on each region server | clearCache | {
"repo_name": "apurtell/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java",
"license": "apache-2.0",
"size": 299325
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,139,816 |
@FXML
public void handleHelp() {
// Redirect to help.
getMain().setView(Main.HELP);
} | void function() { getMain().setView(Main.HELP); } | /**
* Help -> Help.
*/ | Help -> Help | handleHelp | {
"repo_name": "rockihack/Stud.IP-FileSync",
"path": "src/de/uni/hannover/studip/sync/views/RootLayoutController.java",
"license": "gpl-3.0",
"size": 4416
} | [
"de.uni.hannover.studip.sync.Main"
] | import de.uni.hannover.studip.sync.Main; | import de.uni.hannover.studip.sync.*; | [
"de.uni.hannover"
] | de.uni.hannover; | 1,912,500 |
public static Key key(BuildConfiguration buildConfiguration) {
return keyWithoutPlatformMapping(
buildConfiguration.fragmentClasses(), buildConfiguration.getBuildOptionsDiff());
}
@AutoCodec
public static final class Key implements SkyKey, Serializable {
private static final Interner<Key> ke... | static Key function(BuildConfiguration buildConfiguration) { return keyWithoutPlatformMapping( buildConfiguration.fragmentClasses(), buildConfiguration.getBuildOptionsDiff()); } static final class Key implements SkyKey, Serializable { private static final Interner<Key> functionInterner = BlazeInterners.newWeakInterner(... | /**
* Returns a configuration key for the given configuration.
*
* <p>Note that this key creation method does not apply a platform mapping, it is assumed that the
* passed configuration was created with one such and thus its key does not need to be mapped
* again.
*
* @param buildConfiguration conf... | Returns a configuration key for the given configuration. Note that this key creation method does not apply a platform mapping, it is assumed that the passed configuration was created with one such and thus its key does not need to be mapped again | key | {
"repo_name": "dslomov/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationValue.java",
"license": "apache-2.0",
"size": 7744
} | [
"com.google.common.collect.Interner",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.analysis.config.BuildOptions",
"com.google.devtools.build.lib.analysis.config.FragmentClassSet",
"com.google.devtools.build.lib.concurrent.BlazeInterners",
"com.google.d... | import com.google.common.collect.Interner; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.analysis.config.FragmentClassSet; import com.google.devtools.build.lib.concurrent.BlazeInterners; im... | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.concurrent.*; import com.google.devtools.build.skyframe.*; import java.io.*; | [
"com.google.common",
"com.google.devtools",
"java.io"
] | com.google.common; com.google.devtools; java.io; | 2,906,018 |
private void manualReload(final Locale locale) {
Properties props = new Properties();
String pathName = null;
String deployPathname = null;
Boolean dev = DynaSiteObjects.getDev();
if (dev == true) {
pathName = Constants.LOCAL_CLASSES_PATH;
deployPathname = Constants.DEPLOY_CLASSES_PATH;
}... | void function(final Locale locale) { Properties props = new Properties(); String pathName = null; String deployPathname = null; Boolean dev = DynaSiteObjects.getDev(); if (dev == true) { pathName = Constants.LOCAL_CLASSES_PATH; deployPathname = Constants.DEPLOY_CLASSES_PATH; } else { pathName = Constants.DEPLOY_CLASSES... | /**
* Does not work - the Classloader in PropertyMessageResources.loadLocale overrides this population of messages.
* @param locale
*/ | Does not work - the Classloader in PropertyMessageResources.loadLocale overrides this population of messages | manualReload | {
"repo_name": "chrisekelley/zeprs",
"path": "src/zeprs/org/rti/zcore/utils/struts/i18n/ReloadablePropertyMessageResources.java",
"license": "apache-2.0",
"size": 16202
} | [
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.Iterator",
"java.util.Locale",
"java.util.Properties",
"org.cidrz.webapp.dynasite.Constants",
"org.cidrz.webapp.dynasite.valueobject.DynaSiteObjects"
] | import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Iterator; import java.util.Locale; import java.util.Properties; import org.cidrz.webapp.dynasite.Constants; import org.cidrz.webapp.dynasite.valueobject.DynaSiteObjects; | import java.io.*; import java.util.*; import org.cidrz.webapp.dynasite.*; import org.cidrz.webapp.dynasite.valueobject.*; | [
"java.io",
"java.util",
"org.cidrz.webapp"
] | java.io; java.util; org.cidrz.webapp; | 426,341 |
private void downloadFileExporterSettings(File remoteFolder) throws SharedConfigurationException {
publishTask("Downloading File Exporter configuration");
File fileExporterFolder = new File(moduleDirPath, FILE_EXPORTER_FOLDER);
copyToLocalFolder(FILE_EXPORTER_SETTINGS_FILE, fileExporterFolde... | void function(File remoteFolder) throws SharedConfigurationException { publishTask(STR); File fileExporterFolder = new File(moduleDirPath, FILE_EXPORTER_FOLDER); copyToLocalFolder(FILE_EXPORTER_SETTINGS_FILE, fileExporterFolder.getAbsolutePath(), remoteFolder, true); } | /**
* Download File Exporter settings.
*
* @param remoteFolder Shared settings folder
*
* @throws SharedConfigurationException
*/ | Download File Exporter settings | downloadFileExporterSettings | {
"repo_name": "dgrove727/autopsy",
"path": "Experimental/src/org/sleuthkit/autopsy/experimental/configuration/SharedConfiguration.java",
"license": "apache-2.0",
"size": 60350
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,291,206 |
@Override
public void reset() {
for (Score s : this.scores.values())
s.setScore(0);
this.scores.clear();
} | void function() { for (Score s : this.scores.values()) s.setScore(0); this.scores.clear(); } | /**
* Resets scoreboard.
*/ | Resets scoreboard | reset | {
"repo_name": "dobrakmato/pexel-platform",
"path": "slave/src/main/java/eu/matejkormuth/pexel/slave/bukkit/scoreboard/TextScoreboard.java",
"license": "gpl-3.0",
"size": 3379
} | [
"org.bukkit.scoreboard.Score"
] | import org.bukkit.scoreboard.Score; | import org.bukkit.scoreboard.*; | [
"org.bukkit.scoreboard"
] | org.bukkit.scoreboard; | 377,187 |
private void generateSlavePartitionSchemas() throws KettleException
{
slaveServerPartitionsMap = new Hashtable<SlaveServer,Map<PartitionSchema,List<String>>>();
for (int i=0;i<referenceSteps.length;i++)
{
StepMeta stepMeta = referenceSteps[i];
StepPartiti... | void function() throws KettleException { slaveServerPartitionsMap = new Hashtable<SlaveServer,Map<PartitionSchema,List<String>>>(); for (int i=0;i<referenceSteps.length;i++) { StepMeta stepMeta = referenceSteps[i]; StepPartitioningMeta stepPartitioningMeta = stepMeta.getStepPartitioningMeta(); if (stepPartitioningMeta=... | /**
* We want to divide the available partitions over the slaves.
* Let's create a hashtable that contains the partition schema's
* Since we can only use a single cluster, we can divide them all over a single set of slave servers.
*
* @throws KettleException
*/ | We want to divide the available partitions over the slaves. Let's create a hashtable that contains the partition schema's Since we can only use a single cluster, we can divide them all over a single set of slave servers | generateSlavePartitionSchemas | {
"repo_name": "icholy/geokettle-2.0",
"path": "src/org/pentaho/di/trans/cluster/TransSplitter.java",
"license": "lgpl-2.1",
"size": 84736
} | [
"java.util.ArrayList",
"java.util.Hashtable",
"java.util.List",
"java.util.Map",
"org.pentaho.di.cluster.ClusterSchema",
"org.pentaho.di.cluster.SlaveServer",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.partition.PartitionSchema",
"org.pentaho.di.trans.step.StepMeta",
"org.pen... | import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import java.util.Map; import org.pentaho.di.cluster.ClusterSchema; import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.partition.PartitionSchema; import org.pentaho.di.trans.... | import java.util.*; import org.pentaho.di.cluster.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.partition.*; import org.pentaho.di.trans.step.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 698,175 |
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeLong(this.clientTime);
} | void function(PacketBuffer buf) throws IOException { buf.writeLong(this.clientTime); } | /**
* Writes the raw packet data to the data stream.
*/ | Writes the raw packet data to the data stream | writePacketData | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/network/status/client/CPacketPing.java",
"license": "gpl-3.0",
"size": 1227
} | [
"java.io.IOException",
"net.minecraft.network.PacketBuffer"
] | import java.io.IOException; import net.minecraft.network.PacketBuffer; | import java.io.*; import net.minecraft.network.*; | [
"java.io",
"net.minecraft.network"
] | java.io; net.minecraft.network; | 1,721,557 |
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(version);
v.add(sid);
v.add(digAlgorithm);
if (authenticatedAttributes != null)
{
v.add(new DERTaggedObject(false, 0, authenticatedAttributes));
... | ASN1Primitive function() { ASN1EncodableVector v = new ASN1EncodableVector(); v.add(version); v.add(sid); v.add(digAlgorithm); if (authenticatedAttributes != null) { v.add(new DERTaggedObject(false, 0, authenticatedAttributes)); } v.add(digEncryptionAlgorithm); v.add(encryptedDigest); if (unauthenticatedAttributes != n... | /**
* Produce an object suitable for an ASN1OutputStream.
*/ | Produce an object suitable for an ASN1OutputStream | toASN1Primitive | {
"repo_name": "thedrummeraki/Aki-SSL",
"path": "src/org/bouncycastle/asn1/cms/SignerInfo.java",
"license": "apache-2.0",
"size": 8595
} | [
"org.bouncycastle.asn1.ASN1EncodableVector",
"org.bouncycastle.asn1.ASN1Primitive",
"org.bouncycastle.asn1.DERSequence",
"org.bouncycastle.asn1.DERTaggedObject"
] | import org.bouncycastle.asn1.ASN1EncodableVector; import org.bouncycastle.asn1.ASN1Primitive; import org.bouncycastle.asn1.DERSequence; import org.bouncycastle.asn1.DERTaggedObject; | import org.bouncycastle.asn1.*; | [
"org.bouncycastle.asn1"
] | org.bouncycastle.asn1; | 169,676 |
protected Response customOperation(final String resource, final RequestTypeEnum requestType, final String id,
final String operationName, final RestOperationTypeEnum operationType)
throws IOException {
final Builder request = getResourceRequest(requestType, operationType).resource(re... | Response function(final String resource, final RequestTypeEnum requestType, final String id, final String operationName, final RestOperationTypeEnum operationType) throws IOException { final Builder request = getResourceRequest(requestType, operationType).resource(resource).id(id); return execute(request, operationName... | /**
* Execute a custom operation
*
* @param resource the resource to create
* @param requestType the type of request
* @param id the id of the resource on which to perform the operation
* @param operationName the name of the operation to execute
* @param operationType the rest operat... | Execute a custom operation | customOperation | {
"repo_name": "botunge/hapi-fhir",
"path": "hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java",
"license": "apache-2.0",
"size": 14041
} | [
"ca.uhn.fhir.jaxrs.server.util.JaxRsRequest",
"ca.uhn.fhir.rest.api.RequestTypeEnum",
"ca.uhn.fhir.rest.api.RestOperationTypeEnum",
"java.io.IOException",
"javax.ws.rs.core.Response"
] | import ca.uhn.fhir.jaxrs.server.util.JaxRsRequest; import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.api.RestOperationTypeEnum; import java.io.IOException; import javax.ws.rs.core.Response; | import ca.uhn.fhir.jaxrs.server.util.*; import ca.uhn.fhir.rest.api.*; import java.io.*; import javax.ws.rs.core.*; | [
"ca.uhn.fhir",
"java.io",
"javax.ws"
] | ca.uhn.fhir; java.io; javax.ws; | 812,588 |
public ServiceFuture<OperationStatusResponseInner> reimageAllAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback<OperationStatusResponseInner> serviceCallback) {
return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName... | ServiceFuture<OperationStatusResponseInner> function(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(reimageAllWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCall... | /**
* Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The inst... | Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks | reimageAllAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetVMsInner.java",
"license": "mit",
"size": 121964
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,718,913 |
@Test
public void testUTF8Encoding() throws IOException {
TestBtSerializer serializer = TestBtSerializer.newInstance();
configureEncoding(serializer, "UTF-8");
serializer.write("a�");
assertArrayEquals(new byte[] {97, -61, -81, -62, -65, -62, -67}, serializer.getData());
}
| void function() throws IOException { TestBtSerializer serializer = TestBtSerializer.newInstance(); configureEncoding(serializer, "UTF-8"); serializer.write("a�"); assertArrayEquals(new byte[] {97, -61, -81, -62, -65, -62, -67}, serializer.getData()); } | /**
* verifies that setting serializer-encoding to UTF-8 works as expected
*
* @throws IOException
*/ | verifies that setting serializer-encoding to UTF-8 works as expected | testUTF8Encoding | {
"repo_name": "dynaTrace/Dynatrace-Big-Data-Business-Transaction-Bridge",
"path": "src/com.dynatrace.diagnostics.flume.pb25/test/com/dynatrace/diagnostics/btexport/flume/BtSerializerTest.java",
"license": "bsd-3-clause",
"size": 4850
} | [
"java.io.IOException",
"org.junit.Assert"
] | import java.io.IOException; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 1,149,443 |
public static void registerItem(Item item, float[] vars)
{
registerItem(Item.getIdFromItem(item), vars);
}
| static void function(Item item, float[] vars) { registerItem(Item.getIdFromItem(item), vars); } | /**
* Register a weapon to give variables
* @param item the item
* @param vars the damage type ratio cutting:blunt
*/ | Register a weapon to give variables | registerItem | {
"repo_name": "AnonymousProductions/MineFantasy2",
"path": "src/main/java/minefantasy/mf2/api/armour/CustomDamageRatioEntry.java",
"license": "apache-2.0",
"size": 1752
} | [
"net.minecraft.item.Item"
] | import net.minecraft.item.Item; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,115,730 |
private SAXParserImpl newSAXParserImpl()
throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException
{
SAXParserImpl saxParserImpl;
try {
saxParserImpl = new SAXParserImpl(this, features);
} catch (SAXNotSupportedException e) {
... | SAXParserImpl function() throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException { SAXParserImpl saxParserImpl; try { saxParserImpl = new SAXParserImpl(this, features); } catch (SAXNotSupportedException e) { throw e; } catch (SAXNotRecognizedException e) { throw e; } catch (SAXException... | /**
* Common code for translating exceptions
*/ | Common code for translating exceptions | newSAXParserImpl | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java",
"license": "mit",
"size": 6885
} | [
"javax.xml.parsers.ParserConfigurationException",
"org.xml.sax.SAXException",
"org.xml.sax.SAXNotRecognizedException",
"org.xml.sax.SAXNotSupportedException"
] | import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; | import javax.xml.parsers.*; import org.xml.sax.*; | [
"javax.xml",
"org.xml.sax"
] | javax.xml; org.xml.sax; | 1,197,412 |
public Set<VTPM> getVTPMs(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "VM.get_VTPMs";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
... | Set<VTPM> function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result... | /**
* Get the VTPMs field of the given VM.
*
* @return value of the field
*/ | Get the VTPMs field of the given VM | getVTPMs | {
"repo_name": "cinderella/incubator-cloudstack",
"path": "deps/XenServerJava/com/xensource/xenapi/VM.java",
"license": "apache-2.0",
"size": 169722
} | [
"com.xensource.xenapi.Types",
"java.util.Map",
"java.util.Set",
"org.apache.xmlrpc.XmlRpcException"
] | import com.xensource.xenapi.Types; import java.util.Map; import java.util.Set; import org.apache.xmlrpc.XmlRpcException; | import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.xensource.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.xensource.xenapi; java.util; org.apache.xmlrpc; | 1,830,703 |
@Override()
public java.lang.Class<?> getJavaClass(
) {
return org.opennms.netmgt.config.rrd.ExportData.class;
} | @Override() java.lang.Class<?> function( ) { return org.opennms.netmgt.config.rrd.ExportData.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-webapp/target/generated-sources/castor/org/opennms/netmgt/config/rrd/descriptors/ExportDataDescriptor.java",
"license": "gpl-2.0",
"size": 8347
} | [
"org.opennms.netmgt.config.rrd.ExportData"
] | import org.opennms.netmgt.config.rrd.ExportData; | import org.opennms.netmgt.config.rrd.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 1,112,961 |
private void mergeGeometries(Mesh outMesh, List<Geometry> geometries) {
int[] compsForBuf = new int[VertexBuffer.Type.values().length];
VertexBuffer.Format[] formatForBuf = new VertexBuffer.Format[compsForBuf.length];
boolean[] normForBuf = new boolean[VertexBuffer.Type.values().length];
... | void function(Mesh outMesh, List<Geometry> geometries) { int[] compsForBuf = new int[VertexBuffer.Type.values().length]; VertexBuffer.Format[] formatForBuf = new VertexBuffer.Format[compsForBuf.length]; boolean[] normForBuf = new boolean[VertexBuffer.Type.values().length]; int totalVerts = 0; int totalTris = 0; int tot... | /**
* Merges all geometries in the collection into
* the output mesh. Does not take into account materials.
*
* @param geometries
* @param outMesh
*/ | Merges all geometries in the collection into the output mesh. Does not take into account materials | mergeGeometries | {
"repo_name": "zzuegg/jmonkeyengine",
"path": "jme3-core/src/main/java/com/jme3/scene/BatchNode.java",
"license": "bsd-3-clause",
"size": 27399
} | [
"com.jme3.scene.mesh.IndexBuffer",
"java.nio.Buffer",
"java.nio.FloatBuffer",
"java.util.List"
] | import com.jme3.scene.mesh.IndexBuffer; import java.nio.Buffer; import java.nio.FloatBuffer; import java.util.List; | import com.jme3.scene.mesh.*; import java.nio.*; import java.util.*; | [
"com.jme3.scene",
"java.nio",
"java.util"
] | com.jme3.scene; java.nio; java.util; | 977,795 |
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(POWER, Integer.valueOf(meta));
} | IBlockState function(int meta) { return this.getDefaultState().withProperty(POWER, Integer.valueOf(meta)); } | /**
* Convert the given metadata into a BlockState for this Block
*/ | Convert the given metadata into a BlockState for this Block | getStateFromMeta | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/block/BlockDaylightDetector.java",
"license": "gpl-2.0",
"size": 5888
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 1,312,051 |
private void maybeSetOrUpdateTitle() {
if (blipUi != null && editor != null) {
CMutableDocument document = editor.getDocument();
ConversationBlip editBlip = views.getBlip(blipUi);
if (editBlip.isRoot() && !TitleHelper.hasExplicitTitle(document)) {
Range titleRange = TitleHelper.findImpli... | void function() { if (blipUi != null && editor != null) { CMutableDocument document = editor.getDocument(); ConversationBlip editBlip = views.getBlip(blipUi); if (editBlip.isRoot() && !TitleHelper.hasExplicitTitle(document)) { Range titleRange = TitleHelper.findImplicitTitle(document); TitleHelper.setImplicitTitle(docu... | /**
* Sets or replaces an automatic title for the wave by annotating the first
* line of the root blip with <code>conv/title</code> annotation. Has
* effect only when the first line of the root blip is edited and no explicit
* title is set.
*/ | Sets or replaces an automatic title for the wave by annotating the first line of the root blip with <code>conv/title</code> annotation. Has effect only when the first line of the root blip is edited and no explicit title is set | maybeSetOrUpdateTitle | {
"repo_name": "JaredMiller/Wave",
"path": "src/org/waveprotocol/wave/client/wavepanel/impl/title/WaveTitleHandler.java",
"license": "apache-2.0",
"size": 3521
} | [
"org.waveprotocol.wave.client.editor.content.CMutableDocument",
"org.waveprotocol.wave.model.conversation.ConversationBlip",
"org.waveprotocol.wave.model.conversation.TitleHelper",
"org.waveprotocol.wave.model.document.util.Range"
] | import org.waveprotocol.wave.client.editor.content.CMutableDocument; import org.waveprotocol.wave.model.conversation.ConversationBlip; import org.waveprotocol.wave.model.conversation.TitleHelper; import org.waveprotocol.wave.model.document.util.Range; | import org.waveprotocol.wave.client.editor.content.*; import org.waveprotocol.wave.model.conversation.*; import org.waveprotocol.wave.model.document.util.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 1,579,915 |
SqlRexConvertlet get(SqlCall call); | SqlRexConvertlet get(SqlCall call); | /**
* Returns the convertlet applicable to a given expression.
*/ | Returns the convertlet applicable to a given expression | get | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/SqlRexConvertletTable.java",
"license": "apache-2.0",
"size": 1162
} | [
"org.apache.calcite.sql.SqlCall"
] | import org.apache.calcite.sql.SqlCall; | import org.apache.calcite.sql.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 837,444 |
public Put addImmutable(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value,
Tag[] tag) {
if (ts < 0) {
throw new IllegalArgumentException("Timestamp cannot be negative. ts=" + ts);
}
List<Cell> list = getCellList(family);
KeyValue kv = createPutKeyValue(fami... | Put function(byte[] family, ByteBuffer qualifier, long ts, ByteBuffer value, Tag[] tag) { if (ts < 0) { throw new IllegalArgumentException(STR + ts); } List<Cell> list = getCellList(family); KeyValue kv = createPutKeyValue(family, qualifier, ts, value, tag); list.add(kv); familyMap.put(family, list); return this; } | /**
* This expects that the underlying arrays won't change. It's intended
* for usage internal HBase to and for advanced client applications.
*/ | This expects that the underlying arrays won't change. It's intended for usage internal HBase to and for advanced client applications | addImmutable | {
"repo_name": "intel-hadoop/hbase-rhino",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java",
"license": "apache-2.0",
"size": 14561
} | [
"java.nio.ByteBuffer",
"java.util.List",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.Tag"
] | import java.nio.ByteBuffer; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.Tag; | import java.nio.*; import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.nio",
"java.util",
"org.apache.hadoop"
] | java.nio; java.util; org.apache.hadoop; | 1,669,615 |
public boolean dispatchKeyEvent(KeyEvent event) {
if (currentPlayer == exoPlayer) {
return localPlayerView.dispatchKeyEvent(event);
} else {
return castControlView.dispatchKeyEvent(event);
}
} | boolean function(KeyEvent event) { if (currentPlayer == exoPlayer) { return localPlayerView.dispatchKeyEvent(event); } else { return castControlView.dispatchKeyEvent(event); } } | /**
* Dispatches a given {@link KeyEvent} to the corresponding view of the current player.
*
* @param event The {@link KeyEvent}.
* @return Whether the event was handled by the target view.
*/ | Dispatches a given <code>KeyEvent</code> to the corresponding view of the current player | dispatchKeyEvent | {
"repo_name": "tntcrowd/ExoPlayer",
"path": "demos/cast/src/main/java/com/google/android/exoplayer2/castdemo/PlayerManager.java",
"license": "apache-2.0",
"size": 15215
} | [
"android.view.KeyEvent"
] | import android.view.KeyEvent; | import android.view.*; | [
"android.view"
] | android.view; | 581,491 |
@Test
public void testFindFirstWithPathNotMatchingSubelement() {
final BooleanElement subElement = new BooleanElement("1", false);
final ArrayElement element = new ArrayElement("foo", subElement);
final Element found = element.findFirst(Element.class, "n.*");
assertNull(found);
... | void function() { final BooleanElement subElement = new BooleanElement("1", false); final ArrayElement element = new ArrayElement("foo", subElement); final Element found = element.findFirst(Element.class, "n.*"); assertNull(found); } | /**
* Test method for {@link ArrayElement#findFirst}.
*/ | Test method for <code>ArrayElement#findFirst</code> | testFindFirstWithPathNotMatchingSubelement | {
"repo_name": "allanbank/mongodb-async-driver",
"path": "src/test/java/com/allanbank/mongodb/bson/element/ArrayElementTest.java",
"license": "apache-2.0",
"size": 21886
} | [
"com.allanbank.mongodb.bson.Element",
"org.junit.Assert"
] | import com.allanbank.mongodb.bson.Element; import org.junit.Assert; | import com.allanbank.mongodb.bson.*; import org.junit.*; | [
"com.allanbank.mongodb",
"org.junit"
] | com.allanbank.mongodb; org.junit; | 1,876,385 |
public DeleteItemOutcome deleteItem(String hashKeyName, Object hashKeyValue,
String rangeKeyName, Object rangeKeyValue,
Expected... expected); | DeleteItemOutcome function(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue, Expected... expected); | /**
* Conditional delete with the specified hash-and-range primary key and
* expected conditions.
*/ | Conditional delete with the specified hash-and-range primary key and expected conditions | deleteItem | {
"repo_name": "flofreud/aws-sdk-java",
"path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/api/DeleteItemApi.java",
"license": "apache-2.0",
"size": 3543
} | [
"com.amazonaws.services.dynamodbv2.document.DeleteItemOutcome",
"com.amazonaws.services.dynamodbv2.document.Expected"
] | import com.amazonaws.services.dynamodbv2.document.DeleteItemOutcome; import com.amazonaws.services.dynamodbv2.document.Expected; | import com.amazonaws.services.dynamodbv2.document.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 648,694 |
public T find(CriteriaQuery<T> criteriaQuery); | T function(CriteriaQuery<T> criteriaQuery); | /**
* Realiza uma busca por um item utilizando criteria.
*/ | Realiza uma busca por um item utilizando criteria | find | {
"repo_name": "templarfelix/framework",
"path": "base-ejb/src/main/java/io/easycm/framework/base/dao/CrudDAO.java",
"license": "gpl-2.0",
"size": 6614
} | [
"javax.persistence.criteria.CriteriaQuery"
] | import javax.persistence.criteria.CriteriaQuery; | import javax.persistence.criteria.*; | [
"javax.persistence"
] | javax.persistence; | 434,561 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.