method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public final Iterable<java.lang.String> queryKeysByCreatedDate(java.util.Date createdDate) {
final Filter filter = createEqualsFilter(COLUMN_NAME_CREATEDDATE, createdDate);
return queryIterableKeys(0, -1, null, null, null, false, null, false, filter);
} | final Iterable<java.lang.String> function(java.util.Date createdDate) { final Filter filter = createEqualsFilter(COLUMN_NAME_CREATEDDATE, createdDate); return queryIterableKeys(0, -1, null, null, null, false, null, false, filter); } | /**
* query-key-by method for attribute field createdDate
* @param createdDate the specified attribute
* @return an Iterable of keys to the DmContacts with the specified attribute
*/ | query-key-by method for attribute field createdDate | queryKeysByCreatedDate | {
"repo_name": "goldengekko/Meetr-Backend",
"path": "src/main/java/com/goldengekko/meetr/dao/GeneratedDmContactDaoImpl.java",
"license": "gpl-3.0",
"size": 37469
} | [
"java.util.Date",
"net.sf.mardao.core.Filter"
] | import java.util.Date; import net.sf.mardao.core.Filter; | import java.util.*; import net.sf.mardao.core.*; | [
"java.util",
"net.sf.mardao"
] | java.util; net.sf.mardao; | 2,354,091 |
@Override
public Comparator<? super E> comparator() {
return comparator;
} | Comparator<? super E> function() { return comparator; } | /**
* Returns the comparator that orders the elements, which is {@link Ordering#natural()} when the
* natural ordering of the elements is used. Note that its behavior is not consistent with {@link
* SortedSet#comparator()}, which returns {@code null} to indicate natural ordering.
*/ | Returns the comparator that orders the elements, which is <code>Ordering#natural()</code> when the natural ordering of the elements is used. Note that its behavior is not consistent with <code>SortedSet#comparator()</code>, which returns null to indicate natural ordering | comparator | {
"repo_name": "EdwardLee03/guava",
"path": "guava/src/com/google/common/collect/ImmutableSortedSet.java",
"license": "apache-2.0",
"size": 32096
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 760,142 |
public Set<String> getDefaultNames() {
return new HashSet<String>(getNames(this.defaults));
} | Set<String> function() { return new HashSet<String>(getNames(this.defaults)); } | /**
* Returns the current set of defaults names.
*
* Changes to the underlying HttpParams are not reflected
* in the set - it is a snapshot.
*
* @return the names, as a Set<String>
* @since 4.2
* @throws UnsupportedOperationException if the default HttpParams instance does ... | Returns the current set of defaults names. Changes to the underlying HttpParams are not reflected in the set - it is a snapshot | getDefaultNames | {
"repo_name": "cictourgune/MDP-Airbnb",
"path": "httpcomponents-core-4.4/httpcore/src/main/java-deprecated/org/apache/http/params/DefaultedHttpParams.java",
"license": "apache-2.0",
"size": 5572
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,278,396 |
public List<MonKitCategory> getCategories() {
NodeList nodes = root.getElementsByTagName( "category" );
List<MonKitCategory> elements = new ArrayList<MonKitCategory>();
for( int i = 0, len = nodes.getLength(); i < len; ++i ) {
Node node = nodes.item( i );
if(... | List<MonKitCategory> function() { NodeList nodes = root.getElementsByTagName( STR ); List<MonKitCategory> elements = new ArrayList<MonKitCategory>(); for( int i = 0, len = nodes.getLength(); i < len; ++i ) { Node node = nodes.item( i ); if( node.getNodeType() == Node.ELEMENT_NODE ) { Element e = (Element) node; String ... | /**
* Get a List of the available categories
*
* @return
*/ | Get a List of the available categories | getCategories | {
"repo_name": "Praqma/MonKit",
"path": "src/main/java/net/praqma/monkit/MonKit.java",
"license": "mit",
"size": 15372
} | [
"java.util.ArrayList",
"java.util.List",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import java.util.ArrayList; import java.util.List; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 1,093,245 |
@Test
public void shouldAllowingCopyingSharedNode() throws RepositoryException {
String originalPath = "/Cars/Utility";
String sharedPath = "/NewArea/SharedUtility";
// Make the original a shareable node ...
Node original = makeShareable(originalPath);
session.save();
... | void function() throws RepositoryException { String originalPath = STR; String sharedPath = STR; Node original = makeShareable(originalPath); session.save(); Node sharedNode = makeShare(originalPath, sharedPath); assertSharedSetIncludes(original, originalPath, sharedPath); assertSharedSetIncludes(sharedNode, originalPa... | /**
* Verify that it is possible to copy a (proxy) node in a shared set.
*
* @throws RepositoryException
*/ | Verify that it is possible to copy a (proxy) node in a shared set | shouldAllowingCopyingSharedNode | {
"repo_name": "flownclouds/modeshape",
"path": "modeshape-jcr/src/test/java/org/modeshape/jcr/ShareableNodesTest.java",
"license": "apache-2.0",
"size": 30702
} | [
"javax.jcr.Node",
"javax.jcr.RepositoryException"
] | import javax.jcr.Node; import javax.jcr.RepositoryException; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 2,193,100 |
private int obtainLOCValue(String filename) throws Exception {
ITextResource textRoot = createTextScope(getTmpDirectory(),
new String[] { filename }, null);
LOCAnalyzer currentCounter = new LOCAnalyzer();
currentCounter.setRoot(textRoot);
currentCounter.init(new ProcessorInfoMock());
ITextResource roo... | int function(String filename) throws Exception { ITextResource textRoot = createTextScope(getTmpDirectory(), new String[] { filename }, null); LOCAnalyzer currentCounter = new LOCAnalyzer(); currentCounter.setRoot(textRoot); currentCounter.init(new ProcessorInfoMock()); ITextResource rootWithResults = (ITextResource) e... | /**
* Create a {@link FileSystemScope}, add test files to it and obtain the loc
* for the files.
*
* @param filename
* The name of the child to get the loc number for.
* @return The scope with the results added to the leaf's result list.
*/ | Create a <code>FileSystemScope</code>, add test files to it and obtain the loc for the files | obtainLOCValue | {
"repo_name": "vimaier/conqat",
"path": "org.conqat.engine.resource/test-src/org/conqat/engine/resource/analysis/LOCAnalyzerTest.java",
"license": "apache-2.0",
"size": 4136
} | [
"java.util.Map",
"org.conqat.engine.commons.node.NodeUtils",
"org.conqat.engine.commons.traversal.TraversalUtils",
"org.conqat.engine.core.logging.testutils.ProcessorInfoMock",
"org.conqat.engine.resource.text.ITextResource"
] | import java.util.Map; import org.conqat.engine.commons.node.NodeUtils; import org.conqat.engine.commons.traversal.TraversalUtils; import org.conqat.engine.core.logging.testutils.ProcessorInfoMock; import org.conqat.engine.resource.text.ITextResource; | import java.util.*; import org.conqat.engine.commons.node.*; import org.conqat.engine.commons.traversal.*; import org.conqat.engine.core.logging.testutils.*; import org.conqat.engine.resource.text.*; | [
"java.util",
"org.conqat.engine"
] | java.util; org.conqat.engine; | 1,725,149 |
public IStatus getStatus() {
return fLastStatus;
} | IStatus function() { return fLastStatus; } | /**
* Returns the last status.
*
* @return IStatus
*/ | Returns the last status | getStatus | {
"repo_name": "ControlSystemStudio/org.csstudio.iter",
"path": "plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/StatusDialog.java",
"license": "epl-1.0",
"size": 8155
} | [
"org.eclipse.core.runtime.IStatus"
] | import org.eclipse.core.runtime.IStatus; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,106,543 |
private void initialize() throws JSONException
{
schema = new JSONObject(schemaJSON);
if (schemaKeys != null) {
schema.put(Schema.FIELD_SCHEMA_KEYS, SchemaUtils.createJSONObject(schemaKeys));
}
valueToType = Maps.newHashMap();
JSONArray values = schema.getJSONArray(FIELD_VALUES);
P... | void function() throws JSONException { schema = new JSONObject(schemaJSON); if (schemaKeys != null) { schema.put(Schema.FIELD_SCHEMA_KEYS, SchemaUtils.createJSONObject(schemaKeys)); } valueToType = Maps.newHashMap(); JSONArray values = schema.getJSONArray(FIELD_VALUES); Preconditions.checkState(values.length() > 0, STR... | /**
* This is a helper method to initialize the schema.
* @throws JSONException This exception is thrown if there is an error parsing the JSON
* which specified this schema.
*/ | This is a helper method to initialize the schema | initialize | {
"repo_name": "siyuanh/apex-malhar",
"path": "library/src/main/java/com/datatorrent/lib/appdata/schemas/SnapshotSchema.java",
"license": "apache-2.0",
"size": 8815
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.Maps",
"java.util.Collections",
"org.codehaus.jettison.json.JSONArray",
"org.codehaus.jettison.json.JSONException",
"org.codehaus.jettison.json.JSONObject"
] | import com.google.common.base.Preconditions; import com.google.common.collect.Maps; import java.util.Collections; import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.codehaus.jettison.json.*; | [
"com.google.common",
"java.util",
"org.codehaus.jettison"
] | com.google.common; java.util; org.codehaus.jettison; | 1,834,018 |
public static void deleteRow(HTableInterface table, String rowKey) throws Exception {
Delete delete = new Delete(Bytes.toBytes(rowKey));
table.delete(delete);
LOGGER.info(">>>> HBase Delete {} row with key = {} ", new String(table.getTableName()), rowKey);
} | static void function(HTableInterface table, String rowKey) throws Exception { Delete delete = new Delete(Bytes.toBytes(rowKey)); table.delete(delete); LOGGER.info(STR, new String(table.getTableName()), rowKey); } | /**
* delete a row by rowkey
*
* @param table
* @param rowKey
* @throws Exception
*/ | delete a row by rowkey | deleteRow | {
"repo_name": "micmiu/bigdata-tutorial",
"path": "hbase-tutorial/src/main/java/com/micmiu/bigdata/hbase/HBaseUtils.java",
"license": "apache-2.0",
"size": 4989
} | [
"org.apache.hadoop.hbase.client.Delete",
"org.apache.hadoop.hbase.client.HTableInterface",
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,276,297 |
public ResultReason findEvidence(Element input, ReasonType type) {
ResultReason res = new ResultReason();
res.type = type;
res.kind = ReasonKind.UNKNOWN;
res.source = input.html();
res.link = getUserPageUrl();
res.desc = "No indicitave information found.";
// first, search for the words that... | ResultReason function(Element input, ReasonType type) { ResultReason res = new ResultReason(); res.type = type; res.kind = ReasonKind.UNKNOWN; res.source = input.html(); res.link = getUserPageUrl(); res.desc = STR; boolean fallback = true; String raw = input.html().toLowerCase(); String[] paragraphs = Utils.splitBreaks... | /**
* This function is used for a section of a page (journals, profile, etc.).
* It finds indicitave words, and returns the reason with a result.
*
* @param input The node that may contain the text of interest.
* @param type Where this node came from, e.g. profile, journal, etc.
* @return The result ... | This function is used for a section of a page (journals, profile, etc.). It finds indicitave words, and returns the reason with a result | findEvidence | {
"repo_name": "iconmaster5326/who2comm",
"path": "src/main/java/info/iconmaster/who2comm/user/User.java",
"license": "apache-2.0",
"size": 10535
} | [
"info.iconmaster.who2comm.Utils",
"info.iconmaster.who2comm.user.ResultReason",
"org.jsoup.nodes.Element"
] | import info.iconmaster.who2comm.Utils; import info.iconmaster.who2comm.user.ResultReason; import org.jsoup.nodes.Element; | import info.iconmaster.who2comm.*; import info.iconmaster.who2comm.user.*; import org.jsoup.nodes.*; | [
"info.iconmaster.who2comm",
"org.jsoup.nodes"
] | info.iconmaster.who2comm; org.jsoup.nodes; | 1,974,113 |
public static Bitmap decodeFile(String pathName, Options opts) {
Bitmap bm = null;
InputStream stream = null;
try {
stream = new FileInputStream(pathName);
bm = decodeStream(stream, null, opts);
} catch (Exception e) {
Log.e("BitmapFac... | static Bitmap function(String pathName, Options opts) { Bitmap bm = null; InputStream stream = null; try { stream = new FileInputStream(pathName); bm = decodeStream(stream, null, opts); } catch (Exception e) { Log.e(STR, STR + e); } finally { if (stream != null) { try { stream.close(); } catch (IOException e) { } } } r... | /**
* Decode a file path into a bitmap. If the specified file name is null,
* or cannot be decoded into a bitmap, the function returns null.
*
* @param pathName complete path name for the file to be decoded.
* @param opts null-ok; Options that control downsampling and whether the
* ... | Decode a file path into a bitmap. If the specified file name is null, or cannot be decoded into a bitmap, the function returns null | decodeFile | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/graphics/BitmapFactory.java",
"license": "apache-2.0",
"size": 28254
} | [
"android.util.Log",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import android.util.Log; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 2,715,623 |
@Override
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) {
if (!(msg instanceof HttpMessage || msg instanceof HttpContent)) {
ctx.write(msg, promise);
return;
}
boolean release = true;
SimpleChannelPromiseAggregator prom... | void function(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) { if (!(msg instanceof HttpMessage msg instanceof HttpContent)) { ctx.write(msg, promise); return; } boolean release = true; SimpleChannelPromiseAggregator promiseAggregator = new SimpleChannelPromiseAggregator(promise, ctx.channel(), ctx.exec... | /**
* Handles conversion of {@link HttpMessage} and {@link HttpContent} to HTTP/2 frames.
*/ | Handles conversion of <code>HttpMessage</code> and <code>HttpContent</code> to HTTP/2 frames | write | {
"repo_name": "jongyeol/netty",
"path": "codec-http2/src/main/java/io/netty/handler/codec/http2/HttpToHttp2ConnectionHandler.java",
"license": "apache-2.0",
"size": 5062
} | [
"io.netty.buffer.ByteBuf",
"io.netty.channel.ChannelHandlerContext",
"io.netty.channel.ChannelPromise",
"io.netty.handler.codec.http.FullHttpMessage",
"io.netty.handler.codec.http.HttpContent",
"io.netty.handler.codec.http.HttpMessage",
"io.netty.handler.codec.http.LastHttpContent",
"io.netty.handler.... | import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; import io.netty.handler.codec.http.FullHttpMessage; import io.netty.handler.codec.http.HttpContent; import io.netty.handler.codec.http.HttpMessage; import io.netty.handler.codec.http.LastHttpContent; i... | import io.netty.buffer.*; import io.netty.channel.*; import io.netty.handler.codec.http.*; import io.netty.handler.codec.http2.*; import io.netty.util.*; | [
"io.netty.buffer",
"io.netty.channel",
"io.netty.handler",
"io.netty.util"
] | io.netty.buffer; io.netty.channel; io.netty.handler; io.netty.util; | 2,702,414 |
if (lock.tryLock()) {
try {
runnable.run();
} finally {
lock.unlock();
}
} else {
Completable.fromRunnable(() -> {
lock.lock();
try {
runnable.run();
} finally {
... | if (lock.tryLock()) { try { runnable.run(); } finally { lock.unlock(); } } else { Completable.fromRunnable(() -> { lock.lock(); try { runnable.run(); } finally { lock.unlock(); } }).subscribeOn(Schedulers.io()) .subscribe(); } } | /**
* Take the lock and execute runnable (to prevent changes to preferences being lost when enqueueing while sync is
* in progress). If the lock is free, the runnable is directly executed in the calling thread to prevent overhead.
*/ | Take the lock and execute runnable (to prevent changes to preferences being lost when enqueueing while sync is in progress). If the lock is free, the runnable is directly executed in the calling thread to prevent overhead | executeLockedAsync | {
"repo_name": "AntennaPod/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/sync/LockingAsyncExecutor.java",
"license": "gpl-3.0",
"size": 1056
} | [
"io.reactivex.Completable",
"io.reactivex.schedulers.Schedulers"
] | import io.reactivex.Completable; import io.reactivex.schedulers.Schedulers; | import io.reactivex.*; import io.reactivex.schedulers.*; | [
"io.reactivex",
"io.reactivex.schedulers"
] | io.reactivex; io.reactivex.schedulers; | 947,589 |
public List<SgpCursosPostgrado> getCursosDocente(String idDocente, String dependenciaId){
List<SgpCursosPostgrado> resultado = new ArrayList<SgpCursosPostgrado>();
Session s;
Transaction t = null;
try {
s = db.abrirSesion();
t = s.beginTransaction();
... | List<SgpCursosPostgrado> function(String idDocente, String dependenciaId){ List<SgpCursosPostgrado> resultado = new ArrayList<SgpCursosPostgrado>(); Session s; Transaction t = null; try { s = db.abrirSesion(); t = s.beginTransaction(); String sql = STR + STR + STR + STR + STR + STR + dependenciaId + " " + STR + STR + i... | /**
* Obtiene el listado de los posgrados en los que el docente tiene asignaturas ofertadas
* @param idDocente id del docente a consultar
* @param dependenciaId id de la dependencia que ha sido seleccionada
* @return
*/ | Obtiene el listado de los posgrados en los que el docente tiene asignaturas ofertadas | getCursosDocente | {
"repo_name": "newdigicash/WSPosgrado",
"path": "src/java/negocio/cursos.java",
"license": "gpl-2.0",
"size": 38569
} | [
"java.util.ArrayList",
"java.util.List",
"org.hibernate.Session",
"org.hibernate.Transaction"
] | import java.util.ArrayList; import java.util.List; import org.hibernate.Session; import org.hibernate.Transaction; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 2,329,562 |
protected Precondition makePrecondition(final InputPort port, int portIndex) {
return makePrecondition(port);
}
| Precondition function(final InputPort port, int portIndex) { return makePrecondition(port); } | /**
* Subclasses might override this method in order to specify preconditions dependent on the
* number of port. For example when a parameter lists the input types, etc...
*/ | Subclasses might override this method in order to specify preconditions dependent on the number of port. For example when a parameter lists the input types, etc.. | makePrecondition | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/operator/ports/InputPortExtender.java",
"license": "agpl-3.0",
"size": 9710
} | [
"com.rapidminer.operator.ports.metadata.Precondition"
] | import com.rapidminer.operator.ports.metadata.Precondition; | import com.rapidminer.operator.ports.metadata.*; | [
"com.rapidminer.operator"
] | com.rapidminer.operator; | 496,409 |
public void addLabelsToNode(Map<NodeId, Set<String>> addedLabelsToNode)
throws IOException {
if (!nodeLabelsEnabled) {
LOG.error(NODE_LABELS_NOT_ENABLED_ERR);
throw new IOException(NODE_LABELS_NOT_ENABLED_ERR);
}
addedLabelsToNode = normalizeNodeIdToLabels(addedLabelsToNode);
checkAd... | void function(Map<NodeId, Set<String>> addedLabelsToNode) throws IOException { if (!nodeLabelsEnabled) { LOG.error(NODE_LABELS_NOT_ENABLED_ERR); throw new IOException(NODE_LABELS_NOT_ENABLED_ERR); } addedLabelsToNode = normalizeNodeIdToLabels(addedLabelsToNode); checkAddLabelsToNode(addedLabelsToNode); internalUpdateLa... | /**
* add more labels to nodes
*
* @param addedLabelsToNode node {@literal ->} labels map
*/ | add more labels to nodes | addLabelsToNode | {
"repo_name": "Authorlove/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java",
"license": "apache-2.0",
"size": 34452
} | [
"java.io.IOException",
"java.util.Map",
"java.util.Set",
"org.apache.hadoop.yarn.api.records.NodeId"
] | import java.io.IOException; import java.util.Map; import java.util.Set; import org.apache.hadoop.yarn.api.records.NodeId; | import java.io.*; import java.util.*; import org.apache.hadoop.yarn.api.records.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,060,167 |
public Response editComment(String commentId, String commentText) throws JinxException {
JinxUtils.validateParams(commentId, commentText);
Map<String, String> params = new TreeMap<>();
params.put("method", "flickr.photos.comments.editComment");
params.put("comment_id", commentId);
params.put("comm... | Response function(String commentId, String commentText) throws JinxException { JinxUtils.validateParams(commentId, commentText); Map<String, String> params = new TreeMap<>(); params.put(STR, STR); params.put(STR, commentId); params.put(STR, commentText); return jinx.flickrPost(params, Response.class); } | /**
* Edit the text of a comment as the currently authenticated user.
* <br>
* This method requires authentication with 'write' permission.
*
* @param commentId (Required) The id of the comment to edit.
* @param commentText (Required) Update the comment to this text.
* @return object with the sta... | Edit the text of a comment as the currently authenticated user. This method requires authentication with 'write' permission | editComment | {
"repo_name": "jeremybrooks/jinx",
"path": "src/main/java/net/jeremybrooks/jinx/api/PhotosCommentsApi.java",
"license": "gpl-3.0",
"size": 8009
} | [
"java.util.Map",
"java.util.TreeMap",
"net.jeremybrooks.jinx.JinxException",
"net.jeremybrooks.jinx.JinxUtils",
"net.jeremybrooks.jinx.response.Response"
] | import java.util.Map; import java.util.TreeMap; import net.jeremybrooks.jinx.JinxException; import net.jeremybrooks.jinx.JinxUtils; import net.jeremybrooks.jinx.response.Response; | import java.util.*; import net.jeremybrooks.jinx.*; import net.jeremybrooks.jinx.response.*; | [
"java.util",
"net.jeremybrooks.jinx"
] | java.util; net.jeremybrooks.jinx; | 197,315 |
Collection<AgentMetaModel> getAgents(); | Collection<AgentMetaModel> getAgents(); | /**
* Note that since agent names are only unique per fabric, there may be agents
* with the same name. {@link #findAgent(String, String)}.
*
* @return all agents managed by glu
*/ | Note that since agent names are only unique per fabric, there may be agents with the same name. <code>#findAgent(String, String)</code> | getAgents | {
"repo_name": "qixiaobo/glu",
"path": "provisioner/org.linkedin.glu.provisioner-core/src/main/java/org/pongasoft/glu/provisioner/core/metamodel/GluMetaModel.java",
"license": "apache-2.0",
"size": 2783
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,122,529 |
public static void waitForInteractable(final Tab tab) {
Assert.assertFalse(ThreadUtils.runningOnUiThread());
final CallbackHelper interactableCallback = new CallbackHelper();
TestThreadUtils.runOnUiThreadBlocking(() -> {
// If a tab is hidden, don't wait for interactivity. See n... | static void function(final Tab tab) { Assert.assertFalse(ThreadUtils.runningOnUiThread()); final CallbackHelper interactableCallback = new CallbackHelper(); TestThreadUtils.runOnUiThreadBlocking(() -> { if (tab.isUserInteractable() tab.isHidden()) { interactableCallback.notifyCalled(); return; } tab.addObserver(new Tab... | /**
* Waits for the tab to become interactable. This occurs after load, once all view
* animations have completed.
*
* @param tab The tab to wait for interactability on.
*/ | Waits for the tab to become interactable. This occurs after load, once all view animations have completed | waitForInteractable | {
"repo_name": "nwjs/chromium.src",
"path": "chrome/test/android/javatests/src/org/chromium/chrome/test/util/ChromeTabUtils.java",
"license": "bsd-3-clause",
"size": 37187
} | [
"java.util.concurrent.TimeUnit",
"java.util.concurrent.TimeoutException",
"org.chromium.base.ThreadUtils",
"org.chromium.base.test.util.CallbackHelper",
"org.chromium.chrome.browser.tab.Tab",
"org.chromium.content_public.browser.test.util.TestThreadUtils",
"org.junit.Assert"
] | import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.CallbackHelper; import org.chromium.chrome.browser.tab.Tab; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.junit.Assert; | import java.util.concurrent.*; import org.chromium.base.*; import org.chromium.base.test.util.*; import org.chromium.chrome.browser.tab.*; import org.chromium.content_public.browser.test.util.*; import org.junit.*; | [
"java.util",
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.content_public",
"org.junit"
] | java.util; org.chromium.base; org.chromium.chrome; org.chromium.content_public; org.junit; | 445,157 |
private static List<Long> getAllCustomTargetingKeyIds(DfpServices dfpServices, DfpSession session)
throws RemoteException {
List<Long> customTargetingKeyIds = Lists.newArrayList();
// Get the CustomTargetingService.
CustomTargetingServiceInterface customTargetingService =
dfpServices.get(se... | static List<Long> function(DfpServices dfpServices, DfpSession session) throws RemoteException { List<Long> customTargetingKeyIds = Lists.newArrayList(); CustomTargetingServiceInterface customTargetingService = dfpServices.get(session, CustomTargetingServiceInterface.class); StatementBuilder statementBuilder = new Stat... | /**
* Gets all custom targeting key IDs.
*/ | Gets all custom targeting key IDs | getAllCustomTargetingKeyIds | {
"repo_name": "gawkermedia/googleads-java-lib",
"path": "examples/dfp_axis/src/main/java/dfp/axis/v201505/customtargetingservice/GetAllCustomTargetingKeysAndValues.java",
"license": "apache-2.0",
"size": 6110
} | [
"com.google.api.ads.dfp.axis.factory.DfpServices",
"com.google.api.ads.dfp.axis.utils.v201505.StatementBuilder",
"com.google.api.ads.dfp.axis.v201505.CustomTargetingKey",
"com.google.api.ads.dfp.axis.v201505.CustomTargetingKeyPage",
"com.google.api.ads.dfp.axis.v201505.CustomTargetingServiceInterface",
"c... | import com.google.api.ads.dfp.axis.factory.DfpServices; import com.google.api.ads.dfp.axis.utils.v201505.StatementBuilder; import com.google.api.ads.dfp.axis.v201505.CustomTargetingKey; import com.google.api.ads.dfp.axis.v201505.CustomTargetingKeyPage; import com.google.api.ads.dfp.axis.v201505.CustomTargetingServiceIn... | import com.google.api.ads.dfp.axis.factory.*; import com.google.api.ads.dfp.axis.utils.v201505.*; import com.google.api.ads.dfp.axis.v201505.*; import com.google.api.ads.dfp.lib.client.*; import com.google.common.collect.*; import java.rmi.*; import java.util.*; | [
"com.google.api",
"com.google.common",
"java.rmi",
"java.util"
] | com.google.api; com.google.common; java.rmi; java.util; | 2,215,262 |
private void parseImage(HashMap<Integer,HashSet<Emoticon>> result,
JSONObject image, String regex) {
Integer emoticonSet = null;
if (image.get("emoticon_set") != null) {
emoticonSet = ((Number) image.get("emoticon_set")).intValue();
}
String url = (St... | void function(HashMap<Integer,HashSet<Emoticon>> result, JSONObject image, String regex) { Integer emoticonSet = null; if (image.get(STR) != null) { emoticonSet = ((Number) image.get(STR)).intValue(); } String url = (String) image.get("url"); int height = ((Number) image.get(STR)).intValue(); int width = ((Number) imag... | /**
* Parse a single image of an emoticon. Directly saves the icon into the
* Map of emotesets.
*
* @param result The Map of emotesets this image should be save into
* @param image The JSONObject that directly contains the image
* @param regex The pattern for this emoticon
*/ | Parse a single image of an emoticon. Directly saves the icon into the Map of emotesets | parseImage | {
"repo_name": "pokemane/TwitchChatClient",
"path": "src/chatty/util/api/EmoticonManager.java",
"license": "mit",
"size": 7795
} | [
"java.util.HashMap",
"java.util.HashSet",
"org.json.simple.JSONObject"
] | import java.util.HashMap; import java.util.HashSet; import org.json.simple.JSONObject; | import java.util.*; import org.json.simple.*; | [
"java.util",
"org.json.simple"
] | java.util; org.json.simple; | 1,218,246 |
public static void showText(Activity activity, int textResourceId, Style style) {
showText(activity, activity.getString(textResourceId), style);
} | static void function(Activity activity, int textResourceId, Style style) { showText(activity, activity.getString(textResourceId), style); } | /**
* Creates a {@link Crouton} with provided text-resource and style for a given
* activity and displays it directly.
*
* @param activity
* The {@link Activity} that the {@link Crouton} should be attached
* to.
* @param textResourceId
* The resource id of the text you want to display.
... | Creates a <code>Crouton</code> with provided text-resource and style for a given activity and displays it directly | showText | {
"repo_name": "ianschmitz/carmen-day-spa",
"path": "library/src/de/keyboardsurfer/android/widget/crouton/Crouton.java",
"license": "gpl-2.0",
"size": 31305
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 208,555 |
public ARXResult getResult() {
return result;
}
| ARXResult function() { return result; } | /**
* Returns the current result.
*
* @return the result
*/ | Returns the current result | getResult | {
"repo_name": "COWYARD/arx",
"path": "src/gui/org/deidentifier/arx/gui/model/Model.java",
"license": "apache-2.0",
"size": 38532
} | [
"org.deidentifier.arx.ARXResult"
] | import org.deidentifier.arx.ARXResult; | import org.deidentifier.arx.*; | [
"org.deidentifier.arx"
] | org.deidentifier.arx; | 283,166 |
public static Optional<List<?>> asList(@Nullable Object obj) {
if (obj == null) {
return Optional.empty();
}
if (obj instanceof List) {
return Optional.<List<?>> of((List<?>) obj);
}
Class<?> clazz = obj.getClass();
if (clazz.isArray()) {
... | static Optional<List<?>> function(@Nullable Object obj) { if (obj == null) { return Optional.empty(); } if (obj instanceof List) { return Optional.<List<?>> of((List<?>) obj); } Class<?> clazz = obj.getClass(); if (clazz.isArray()) { if (clazz.getComponentType().isPrimitive()) { return Optional.<List<?>> of(Coerce.prim... | /**
* Gets the given object as a {@link List}.
*
* @param obj
* The object to translate
* @return The list, if available
*/ | Gets the given object as a <code>List</code> | asList | {
"repo_name": "kenzierocks/AutoErgel",
"path": "src/main/java/me/kenzierocks/autoergel/osadata/util/Coerce.java",
"license": "mit",
"size": 26624
} | [
"java.util.Arrays",
"java.util.List",
"java.util.Optional",
"javax.annotation.Nullable"
] | import java.util.Arrays; import java.util.List; import java.util.Optional; import javax.annotation.Nullable; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,978,128 |
CollectionLoader getDataLoader(); | CollectionLoader getDataLoader(); | /**
* Returns {@link DataLoader} which the filter is applied to.
*/ | Returns <code>DataLoader</code> which the filter is applied to | getDataLoader | {
"repo_name": "dimone-kun/cuba",
"path": "modules/gui/src/com/haulmont/cuba/gui/components/Filter.java",
"license": "apache-2.0",
"size": 9915
} | [
"com.haulmont.cuba.gui.model.CollectionLoader"
] | import com.haulmont.cuba.gui.model.CollectionLoader; | import com.haulmont.cuba.gui.model.*; | [
"com.haulmont.cuba"
] | com.haulmont.cuba; | 2,185,510 |
protected final PortletSession getSession(boolean allowCreate) {
try {
this.session = this.request.getPortletSession(allowCreate);
return this.session;
}
catch (IllegalStateException ex) {
// Couldn't access session... let's check why.
if (this.session == null) {
// No matter what happened - we... | final PortletSession function(boolean allowCreate) { try { this.session = this.request.getPortletSession(allowCreate); return this.session; } catch (IllegalStateException ex) { if (this.session == null) { throw ex; } if (allowCreate) { boolean canAskForExistingSession = false; try { this.session = this.request.getPortl... | /**
* Exposes the {@link PortletSession} that we're wrapping.
* @param allowCreate whether to allow creation of a new session if none exists yet
*/ | Exposes the <code>PortletSession</code> that we're wrapping | getSession | {
"repo_name": "mattxia/spring-2.5-analysis",
"path": "src/org/springframework/web/portlet/context/PortletRequestAttributes.java",
"license": "apache-2.0",
"size": 8630
} | [
"javax.portlet.PortletSession"
] | import javax.portlet.PortletSession; | import javax.portlet.*; | [
"javax.portlet"
] | javax.portlet; | 1,678,088 |
RunState getRunState() throws IOException;
| RunState getRunState() throws IOException; | /**
* The {@link RunState} of the service - this does NOT tell you whether the
* service is ready to act as a leader or follower.
*/ | The <code>RunState</code> of the service - this does NOT tell you whether the service is ready to act as a leader or follower | getRunState | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "bigdata/src/java/com/bigdata/ha/HAGlue.java",
"license": "gpl-2.0",
"size": 13598
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 278,458 |
protected void initializeEditingDomain() {
// Create an adapter factory that yields item providers.
//
adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
... | void function() { adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new variabilityItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new SoftwareItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new RealizationItemProviderAdapterFact... | /**
* This sets up the editing domain for the model editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This sets up the editing domain for the model editor. | initializeEditingDomain | {
"repo_name": "kopl/SPLevo",
"path": "VPM/org.splevo.vpm.editor/src-gen/org/splevo/vpm/software/presentation/SoftwareEditor.java",
"license": "epl-1.0",
"size": 68081
} | [
"org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory",
"org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory",
"org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory",
"org.eclipse.featuremodel.provider.FeatureModelItemProviderAdapterFactory",
"org.splevo.vpm.rea... | import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; import org.eclipse.featuremodel.provider.FeatureModelItemProviderAdapterFactory; import org.... | import org.eclipse.emf.ecore.provider.*; import org.eclipse.emf.edit.provider.*; import org.eclipse.emf.edit.provider.resource.*; import org.eclipse.featuremodel.provider.*; import org.splevo.vpm.realization.provider.*; import org.splevo.vpm.software.provider.*; import org.splevo.vpm.variability.provider.*; | [
"org.eclipse.emf",
"org.eclipse.featuremodel",
"org.splevo.vpm"
] | org.eclipse.emf; org.eclipse.featuremodel; org.splevo.vpm; | 2,616,770 |
public static float getOutputCropAspectRatio(@NonNull Intent intent) {
return intent.getParcelableExtra(EXTRA_OUTPUT_CROP_ASPECT_RATIO);
} | static float function(@NonNull Intent intent) { return intent.getParcelableExtra(EXTRA_OUTPUT_CROP_ASPECT_RATIO); } | /**
* Retrieve cropped image aspect ratio from the result Intent
*
* @param intent crop result intent
* @return aspect ratio as a floating point value (x:y) - so it will be 1 for 1:1 or 4/3 for 4:3
*/ | Retrieve cropped image aspect ratio from the result Intent | getOutputCropAspectRatio | {
"repo_name": "gaojianyang/only",
"path": "Only/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java",
"license": "gpl-3.0",
"size": 20781
} | [
"android.content.Intent",
"android.support.annotation.NonNull"
] | import android.content.Intent; import android.support.annotation.NonNull; | import android.content.*; import android.support.annotation.*; | [
"android.content",
"android.support"
] | android.content; android.support; | 1,992,109 |
public void storeReply(UniqueID receiverID, Reply reply) throws RemoteException; | void function(UniqueID receiverID, Reply reply) throws RemoteException; | /**
* The reply passed in parameter must be synchronously logged on the server. It must
* be associated with the ID passed in parameter.
* @param receiverID the ID associated to the reply.
* @param reply the reply to log.
* @throws RemoteException If communication with server fails.
*/ | The reply passed in parameter must be synchronously logged on the server. It must be associated with the ID passed in parameter | storeReply | {
"repo_name": "acontes/programming",
"path": "src/Core/org/objectweb/proactive/core/body/ft/servers/storage/CheckpointServer.java",
"license": "agpl-3.0",
"size": 6237
} | [
"java.rmi.RemoteException",
"org.objectweb.proactive.core.UniqueID",
"org.objectweb.proactive.core.body.reply.Reply"
] | import java.rmi.RemoteException; import org.objectweb.proactive.core.UniqueID; import org.objectweb.proactive.core.body.reply.Reply; | import java.rmi.*; import org.objectweb.proactive.core.*; import org.objectweb.proactive.core.body.reply.*; | [
"java.rmi",
"org.objectweb.proactive"
] | java.rmi; org.objectweb.proactive; | 2,418,595 |
public Date getLastModified()
{
return lastModified;
}
| Date function() { return lastModified; } | /**
* Gets the last modification date.
*
* @return the last modification date
*/ | Gets the last modification date | getLastModified | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/main/java/org/alfresco/repo/security/sync/NodeDescription.java",
"license": "lgpl-3.0",
"size": 3171
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,565,200 |
@Deprecated("please use #onUpdate(long deltaTime, P param) instead.")
protected void onUpdate(P param) {
}
| @Deprecated(STR) void function(P param) { } | /**
* called on update this state. often called by
* {@linkplain IController#notifyStateUpdate(Object)} .
*
* @param param
* the extra parameter.
*/ | called on update this state. often called by IController#notifyStateUpdate(Object) | onUpdate | {
"repo_name": "LightSun/Mvcs",
"path": "Mvcs-java/src/main/java/com/heaven7/java/mvcs/AbstractState.java",
"license": "apache-2.0",
"size": 7995
} | [
"com.heaven7.java.base.anno.Deprecated"
] | import com.heaven7.java.base.anno.Deprecated; | import com.heaven7.java.base.anno.*; | [
"com.heaven7.java"
] | com.heaven7.java; | 160,071 |
protected AbstractFile[] ls(AbstractArchiveEntryFile entryFile, FilenameFilter filenameFilter, FileFilter fileFilter) throws IOException {
// Make sure the entries tree is created and up-to-date
checkEntriesTree();
if (!entryFile.isBrowsable()) {
throw new IOException();... | AbstractFile[] function(AbstractArchiveEntryFile entryFile, FilenameFilter filenameFilter, FileFilter fileFilter) throws IOException { checkEntriesTree(); if (!entryFile.isBrowsable()) { throw new IOException(); } DefaultMutableTreeNode matchNode = entryTreeRoot.findEntryNode(entryFile.getEntry().getPath()); if (matchN... | /**
* Returns the contents of the specified folder entry.
*
* @throws UnsupportedFileOperationException if {@link FileOperation#READ_FILE} operations are not supported by the
* underlying file protocol.
*/ | Returns the contents of the specified folder entry | ls | {
"repo_name": "trol73/mucommander",
"path": "src/main/com/mucommander/commons/file/AbstractArchiveFile.java",
"license": "gpl-3.0",
"size": 25399
} | [
"com.mucommander.commons.file.filter.FileFilter",
"com.mucommander.commons.file.filter.FilenameFilter",
"java.io.IOException",
"javax.swing.tree.DefaultMutableTreeNode"
] | import com.mucommander.commons.file.filter.FileFilter; import com.mucommander.commons.file.filter.FilenameFilter; import java.io.IOException; import javax.swing.tree.DefaultMutableTreeNode; | import com.mucommander.commons.file.filter.*; import java.io.*; import javax.swing.tree.*; | [
"com.mucommander.commons",
"java.io",
"javax.swing"
] | com.mucommander.commons; java.io; javax.swing; | 2,273,158 |
@Test(timeout = 20000)
public void testReceivedMessageWithUlongMessageIdAndSendValueAsCorrelationId() throws Exception {
recieveMessageIdSendCorrelationIdTestImpl(UnsignedLong.valueOf(123456789L));
} | @Test(timeout = 20000) void function() throws Exception { recieveMessageIdSendCorrelationIdTestImpl(UnsignedLong.valueOf(123456789L)); } | /**
* Tests that receiving a message with a ulong typed message-id, and then sending a message which
* uses the result of calling getJMSMessageID as the value for setJMSCorrelationId results in
* transmission of the expected AMQP message content.
*/ | Tests that receiving a message with a ulong typed message-id, and then sending a message which uses the result of calling getJMSMessageID as the value for setJMSCorrelationId results in transmission of the expected AMQP message content | testReceivedMessageWithUlongMessageIdAndSendValueAsCorrelationId | {
"repo_name": "avranju/qpid-jms",
"path": "qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/MessageIntegrationTest.java",
"license": "apache-2.0",
"size": 92138
} | [
"org.apache.qpid.proton.amqp.UnsignedLong",
"org.junit.Test"
] | import org.apache.qpid.proton.amqp.UnsignedLong; import org.junit.Test; | import org.apache.qpid.proton.amqp.*; import org.junit.*; | [
"org.apache.qpid",
"org.junit"
] | org.apache.qpid; org.junit; | 782,028 |
@Test
public void testProcessSLOResponseRemoveSession() throws Exception {
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
HttpSession session = mock(HttpSession.class);
when(request.getRequestURL()).thenReturn(new StringBuffer("ht... | void function() throws Exception { HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse response = mock(HttpServletResponse.class); HttpSession session = mock(HttpSession.class); when(request.getRequestURL()).thenReturn(new StringBuffer(STRdata/logout_responses/logout_response_deflated.xml.b... | /**
* Tests the processSLO methods of Auth
* Case: process LogoutResponse, remove session
*
* @throws Exception
*
* @see com.onelogin.saml2.Auth#processSLO
*/ | Tests the processSLO methods of Auth Case: process LogoutResponse, remove session | testProcessSLOResponseRemoveSession | {
"repo_name": "onelogin/java-saml",
"path": "toolkit/src/test/java/com/onelogin/saml2/test/AuthTest.java",
"license": "mit",
"size": 108047
} | [
"com.onelogin.saml2.Auth",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"org.junit.Assert",
"org.mockito.Mockito"
] | import com.onelogin.saml2.Auth; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.junit.Assert; import org.mockito.Mockito; | import com.onelogin.saml2.*; import javax.servlet.http.*; import org.junit.*; import org.mockito.*; | [
"com.onelogin.saml2",
"javax.servlet",
"org.junit",
"org.mockito"
] | com.onelogin.saml2; javax.servlet; org.junit; org.mockito; | 378,842 |
private boolean isAttached(Spannable str, Selection selection, Object span, SpanCollectMode mode) {
int spanStart = str.getSpanStart(span);
int spanEnd = str.getSpanEnd(span);
int selStart = selection.start();
int selEnd = selection.end();
// [start, end] define the intersec... | boolean function(Spannable str, Selection selection, Object span, SpanCollectMode mode) { int spanStart = str.getSpanStart(span); int spanEnd = str.getSpanEnd(span); int selStart = selection.start(); int selEnd = selection.end(); int start = Math.max(spanStart, selStart); int end = Math.min(spanEnd, selEnd); if (start ... | /**
* Note: a ParagraphSpan is always applied to a paragraph (including the crlf)
* --> it will never be a point unless the cursor is in the last empty line!
*/ | Note: a ParagraphSpan is always applied to a paragraph (including the crlf) --> it will never be a point unless the cursor is in the last empty line | isAttached | {
"repo_name": "1gravity/Android-RTEditor",
"path": "RTEditor/src/main/java/com/onegravity/rteditor/effects/ParagraphSpanCollector.java",
"license": "apache-2.0",
"size": 3895
} | [
"android.text.Spannable",
"android.text.Spanned",
"com.onegravity.rteditor.utils.Selection"
] | import android.text.Spannable; import android.text.Spanned; import com.onegravity.rteditor.utils.Selection; | import android.text.*; import com.onegravity.rteditor.utils.*; | [
"android.text",
"com.onegravity.rteditor"
] | android.text; com.onegravity.rteditor; | 300,274 |
return new ParallaxLayoutInflater(this, newContext,fragment);
}
class ParallaxFactory implements LayoutInflater.Factory {
private LayoutInflater inflater;
private final String[] sClassPrefix = {
"android.widget.",
"android.view."
};
public Para... | return new ParallaxLayoutInflater(this, newContext,fragment); } class ParallaxFactory implements LayoutInflater.Factory { private LayoutInflater inflater; private final String[] sClassPrefix = { STR, STR }; public ParallaxFactory(LayoutInflater layoutInflater) { this.inflater = layoutInflater; } | /**
* Create a copy of the existing LayoutInflater object, with the copy
* pointing to a different Context than the original. This is used by
* {@link ContextThemeWrapper} to create a new LayoutInflater to go along
* with the new Context theme.
*
* @param newContext The new Context to ass... | Create a copy of the existing LayoutInflater object, with the copy pointing to a different Context than the original. This is used by <code>ContextThemeWrapper</code> to create a new LayoutInflater to go along with the new Context theme | cloneInContext | {
"repo_name": "leerduo/ParallaxSplash",
"path": "app/src/main/java/me/chenfuduo/parallaxsplash/ParallaxLayoutInflater.java",
"license": "apache-2.0",
"size": 5088
} | [
"android.view.LayoutInflater"
] | import android.view.LayoutInflater; | import android.view.*; | [
"android.view"
] | android.view; | 1,030,821 |
public void testBuildTemplate() {
Object model = Model.getModelManagementFactory().createModel();
Object templatedClass =
Model.getCoreFactory().buildClass("Template", model);
Object parameterizedClass = Model.getCoreFactory().buildClass(
"Parameterized... | void function() { Object model = Model.getModelManagementFactory().createModel(); Object templatedClass = Model.getCoreFactory().buildClass(STR, model); Object parameterizedClass = Model.getCoreFactory().buildClass( STR, model); assertNotNull(STR, parameterizedClass); Object binding = Model.getCoreFactory().buildBindin... | /**
* Test building a template ModelElement.
*/ | Test building a template ModelElement | testBuildTemplate | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/argouml_critics/argouml-app/tests/org/argouml/model/TestCoreFactory.java",
"license": "gpl-3.0",
"size": 29851
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,871,672 |
public Paint getRoseHighlightPaint() {
return this.roseHighlightPaint;
} | Paint function() { return this.roseHighlightPaint; } | /**
* Returns the paint used to draw the circles, symbols and labels on the
* compass.
*
* @return The paint (never <code>null</code>).
*
* @see #setRoseHighlightPaint(Paint)
*/ | Returns the paint used to draw the circles, symbols and labels on the compass | getRoseHighlightPaint | {
"repo_name": "opensim-org/opensim-gui",
"path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/CompassPlot.java",
"license": "apache-2.0",
"size": 26592
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 682,854 |
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}
public DaoMaster(SQLiteDatabase db) {
this(new StandardDatabase(db... | static DaoSession function(Context context, String name) { Database db = new DevOpenHelper(context, name).getWritableDb(); DaoMaster daoMaster = new DaoMaster(db); return daoMaster.newSession(); } public DaoMaster(SQLiteDatabase db) { this(new StandardDatabase(db)); } public DaoMaster(Database db) { super(db, SCHEMA_VE... | /**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/ | Convenience method using a <code>DevOpenHelper</code> | newDevSession | {
"repo_name": "alipay/SoloPi",
"path": "src/shared/src/main/java/com/alipay/hulu/shared/io/db/DaoMaster.java",
"license": "apache-2.0",
"size": 3267
} | [
"android.content.Context",
"android.database.sqlite.SQLiteDatabase",
"org.greenrobot.greendao.database.Database",
"org.greenrobot.greendao.database.StandardDatabase"
] | import android.content.Context; import android.database.sqlite.SQLiteDatabase; import org.greenrobot.greendao.database.Database; import org.greenrobot.greendao.database.StandardDatabase; | import android.content.*; import android.database.sqlite.*; import org.greenrobot.greendao.database.*; | [
"android.content",
"android.database",
"org.greenrobot.greendao"
] | android.content; android.database; org.greenrobot.greendao; | 949,371 |
@Public
@Stable
@Idempotent
public RegisterApplicationMasterResponse registerApplicationMaster(
RegisterApplicationMasterRequest request)
throws YarnException, IOException; | RegisterApplicationMasterResponse function( RegisterApplicationMasterRequest request) throws YarnException, IOException; | /**
* <p>
* The interface used by a new <code>ApplicationMaster</code> to register with
* the <code>ResourceManager</code>.
* </p>
*
* <p>
* The <code>ApplicationMaster</code> needs to provide details such as RPC
* Port, HTTP tracking url etc. as specified in
* {@link RegisterApplicationMast... | The interface used by a new <code>ApplicationMaster</code> to register with the <code>ResourceManager</code>. The <code>ApplicationMaster</code> needs to provide details such as RPC Port, HTTP tracking url etc. as specified in <code>RegisterApplicationMasterRequest</code>. The <code>ResourceManager</code> responds with... | registerApplicationMaster | {
"repo_name": "bruthe/hadoop-2.6.0r",
"path": "src/yarn/api/org/apache/hadoop/yarn/api/ApplicationMasterProtocol.java",
"license": "apache-2.0",
"size": 6711
} | [
"java.io.IOException",
"org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest",
"org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse",
"org.apache.hadoop.yarn.exceptions.YarnException"
] | import java.io.IOException; import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest; import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse; import org.apache.hadoop.yarn.exceptions.YarnException; | import java.io.*; import org.apache.hadoop.yarn.api.protocolrecords.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,227,749 |
@GET
public List<BookDetailDTO> getBooks(@PathParam("authorsId") Long authorsId) {
LOGGER.log(Level.INFO, "AuthorBooksResource getBooks: input: {0}", authorsId);
List<BookDetailDTO> lista = booksListEntity2DTO(authorBookLogic.getBooks(authorsId));
LOGGER.log(Level.INFO, "AuthorBooksR... | List<BookDetailDTO> function(@PathParam(STR) Long authorsId) { LOGGER.log(Level.INFO, STR, authorsId); List<BookDetailDTO> lista = booksListEntity2DTO(authorBookLogic.getBooks(authorsId)); LOGGER.log(Level.INFO, STR, lista); return lista; } | /**
* Busca y devuelve todos los libros que existen en un autor.
*
* @param authorsId El ID del autor del cual se buscan los libros
* @return JSONArray {@link BookDetailDTO} - Los libros encontrados en el
* autor. Si no hay ninguno retorna una lista vacía.
*/ | Busca y devuelve todos los libros que existen en un autor | getBooks | {
"repo_name": "Uniandes-isis2603/backstepbystep",
"path": "frontstepbystep-api/src/main/java/co/edu/uniandes/csw/bookstore/resources/AuthorBooksResource.java",
"license": "mit",
"size": 8817
} | [
"co.edu.uniandes.csw.bookstore.dtos.BookDetailDTO",
"java.util.List",
"java.util.logging.Level",
"javax.ws.rs.PathParam"
] | import co.edu.uniandes.csw.bookstore.dtos.BookDetailDTO; import java.util.List; import java.util.logging.Level; import javax.ws.rs.PathParam; | import co.edu.uniandes.csw.bookstore.dtos.*; import java.util.*; import java.util.logging.*; import javax.ws.rs.*; | [
"co.edu.uniandes",
"java.util",
"javax.ws"
] | co.edu.uniandes; java.util; javax.ws; | 1,494,850 |
public void SetTouchGraph(TGLinkBrowser src) {
this.tg = src; //pass in the reference to the TGLinkBrowser
}
| void function(TGLinkBrowser src) { this.tg = src; } | /**
* initialization of the thermomodel panel
*
* Must pass the CT object to this Model Panel so that it updates accordingly
*
*/ | initialization of the thermomodel panel Must pass the CT object to this Model Panel so that it updates accordingly | SetTouchGraph | {
"repo_name": "dennycd/rna-dv",
"path": "src/rnaedit/GUI/StructureModifierPanel.java",
"license": "lgpl-3.0",
"size": 11451
} | [
"com.touchgraph.linkbrowser.TGLinkBrowser"
] | import com.touchgraph.linkbrowser.TGLinkBrowser; | import com.touchgraph.linkbrowser.*; | [
"com.touchgraph.linkbrowser"
] | com.touchgraph.linkbrowser; | 295,138 |
public static FilePath getHomeDirectory(VirtualChannel ch) throws InterruptedException, IOException {
return ch.call(new GetHomeDirectory());
} | static FilePath function(VirtualChannel ch) throws InterruptedException, IOException { return ch.call(new GetHomeDirectory()); } | /**
* Gets the {@link FilePath} representation of the "~" directory
* (User's home directory in the Unix sense) of the given channel.
*/ | Gets the <code>FilePath</code> representation of the "~" directory (User's home directory in the Unix sense) of the given channel | getHomeDirectory | {
"repo_name": "pjanouse/jenkins",
"path": "core/src/main/java/hudson/FilePath.java",
"license": "mit",
"size": 148331
} | [
"hudson.remoting.VirtualChannel",
"java.io.IOException"
] | import hudson.remoting.VirtualChannel; import java.io.IOException; | import hudson.remoting.*; import java.io.*; | [
"hudson.remoting",
"java.io"
] | hudson.remoting; java.io; | 1,868,136 |
public void threadUnexpectedException(Throwable t) {
threadRecordFailure(t);
t.printStackTrace();
if (t instanceof RuntimeException)
throw (RuntimeException) t;
else if (t instanceof Error)
throw (Error) t;
else {
AssertionFailedError afe =... | void function(Throwable t) { threadRecordFailure(t); t.printStackTrace(); if (t instanceof RuntimeException) throw (RuntimeException) t; else if (t instanceof Error) throw (Error) t; else { AssertionFailedError afe = new AssertionFailedError(STR + t); afe.initCause(t); throw afe; } } | /**
* Records the given exception using {@link #threadRecordFailure},
* then rethrows the exception, wrapping it in an
* AssertionFailedError if necessary.
*/ | Records the given exception using <code>#threadRecordFailure</code>, then rethrows the exception, wrapping it in an AssertionFailedError if necessary | threadUnexpectedException | {
"repo_name": "madvay/j2objc",
"path": "jre_emul/android/libcore/jsr166-tests/src/test/java/jsr166/JSR166TestCase.java",
"license": "apache-2.0",
"size": 40137
} | [
"junit.framework.AssertionFailedError"
] | import junit.framework.AssertionFailedError; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 389,629 |
public void setAbstractSpecimenCollectionGroupCollection(Collection<AbstractSpecimenCollectionGroup> abstractSpecimenCollectionGroupCollection){
this.abstractSpecimenCollectionGroupCollection = abstractSpecimenCollectionGroupCollection;
}
| void function(Collection<AbstractSpecimenCollectionGroup> abstractSpecimenCollectionGroupCollection){ this.abstractSpecimenCollectionGroupCollection = abstractSpecimenCollectionGroupCollection; } | /**
* Sets the value of abstractSpecimenCollectionGroupCollection attribute
**/ | Sets the value of abstractSpecimenCollectionGroupCollection attribute | setAbstractSpecimenCollectionGroupCollection | {
"repo_name": "NCIP/catissue-core",
"path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/domain/Site.java",
"license": "bsd-3-clause",
"size": 7975
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,135,537 |
private static void multiTableToCsvFile(MultiTable table, Path outputPath) {
PrintWriter writer;
// Open our output file for writing
try {
writer = new PrintWriter(outputPath.toString(), "UTF-8");
} catch (FileNotFoundException | UnsupportedEncodingException ex) {
throw new RuntimeExceptio... | static void function(MultiTable table, Path outputPath) { PrintWriter writer; try { writer = new PrintWriter(outputPath.toString(), "UTF-8"); } catch (FileNotFoundException UnsupportedEncodingException ex) { throw new RuntimeException(STR + outputPath); } int numRows = table.getRowCount(); int numCols = table.getColumn... | /**
* Writes the contents of a MultiTable to a CSV file.
* @param table MultiTable to write
* @param outputPath path to the output CSV file
*/ | Writes the contents of a MultiTable to a CSV file | multiTableToCsvFile | {
"repo_name": "synthetichealth/synthea",
"path": "src/main/java/org/mitre/synthea/engine/PhysiologySimulator.java",
"license": "apache-2.0",
"size": 15573
} | [
"java.io.FileNotFoundException",
"java.io.PrintWriter",
"java.io.UnsupportedEncodingException",
"java.nio.file.Path",
"org.simulator.math.odes.MultiTable"
] | import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.nio.file.Path; import org.simulator.math.odes.MultiTable; | import java.io.*; import java.nio.file.*; import org.simulator.math.odes.*; | [
"java.io",
"java.nio",
"org.simulator.math"
] | java.io; java.nio; org.simulator.math; | 282,198 |
public boolean hasListener(EventListener listener) {
List list = Arrays.asList(this.listenerList.getListenerList());
return list.contains(listener);
}
| boolean function(EventListener listener) { List list = Arrays.asList(this.listenerList.getListenerList()); return list.contains(listener); } | /**
* Returns <code>true</code> if the specified object is registered with
* the dataset as a listener. Most applications won't need to call this
* method, it exists mainly for use by unit testing code.
*
* @param listener the listener.
*
* @return A boolean.
*/ | Returns <code>true</code> if the specified object is registered with the dataset as a listener. Most applications won't need to call this method, it exists mainly for use by unit testing code | hasListener | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-3.0",
"size": 142687
} | [
"java.util.Arrays",
"java.util.EventListener",
"java.util.List"
] | import java.util.Arrays; import java.util.EventListener; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,469,531 |
public BigDecimal getInvoicedQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_InvoicedQty);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_InvoicedQty); if (bd == null) return Env.ZERO; return bd; } | /** Get Quantity Invoiced .
@return The quantity invoiced
*/ | Get Quantity Invoiced | getInvoicedQty | {
"repo_name": "pplatek/adempiere",
"path": "base/src/org/compiere/model/X_C_ProjectLine.java",
"license": "gpl-2.0",
"size": 15521
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 36,749 |
protected final void setupModuleInterceptors_InOutSchedule()
{
//
// Mimic ModelValidator behaviour
Services.get(IModelInterceptorRegistry.class)
.addModelInterceptor(ReceiptScheduleValidator.instance);
InOutCandidateValidator.registerSSAggregationKeyDependencies();
} | final void function() { Services.get(IModelInterceptorRegistry.class) .addModelInterceptor(ReceiptScheduleValidator.instance); InOutCandidateValidator.registerSSAggregationKeyDependencies(); } | /**
* Setup module interceptors: Receipt Schedule/Shipment Schedule
*/ | Setup module interceptors: Receipt Schedule/Shipment Schedule | setupModuleInterceptors_InOutSchedule | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.handlingunits.base/src/test/java/de/metas/handlingunits/HUTestHelper.java",
"license": "gpl-2.0",
"size": 74946
} | [
"de.metas.inoutcandidate.modelvalidator.InOutCandidateValidator",
"de.metas.inoutcandidate.modelvalidator.ReceiptScheduleValidator",
"org.adempiere.ad.modelvalidator.IModelInterceptorRegistry",
"org.adempiere.util.Services"
] | import de.metas.inoutcandidate.modelvalidator.InOutCandidateValidator; import de.metas.inoutcandidate.modelvalidator.ReceiptScheduleValidator; import org.adempiere.ad.modelvalidator.IModelInterceptorRegistry; import org.adempiere.util.Services; | import de.metas.inoutcandidate.modelvalidator.*; import org.adempiere.ad.modelvalidator.*; import org.adempiere.util.*; | [
"de.metas.inoutcandidate",
"org.adempiere.ad",
"org.adempiere.util"
] | de.metas.inoutcandidate; org.adempiere.ad; org.adempiere.util; | 2,247,182 |
public void removeCheckingPaths(TreePath[] paths) {
getCheckingModel().removeCheckingPaths(paths);
} | void function(TreePath[] paths) { getCheckingModel().removeCheckingPaths(paths); } | /**
* Remove paths from the checking.
*/ | Remove paths from the checking | removeCheckingPaths | {
"repo_name": "lorebiga/CheckboxTree",
"path": "src/main/java/eu/floraresearch/lablib/gui/checkboxtree/CheckboxTree.java",
"license": "gpl-2.0",
"size": 16235
} | [
"javax.swing.tree.TreePath"
] | import javax.swing.tree.TreePath; | import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 2,087,973 |
@Test
public void ConsumeMangledJWTTests_exp_jti() throws Exception {
// build 2 JWT tokens - both use the same jti
builder.setGeneratedJwtId();
String longLivedJwtToken = buildToken();
Expectations longLivedExpectations = addGoodResponseAndClaimsExpectations(currentAction, bui... | void function() throws Exception { builder.setGeneratedJwtId(); String longLivedJwtToken = buildToken(); Expectations longLivedExpectations = addGoodResponseAndClaimsExpectations(currentAction, builder); longLivedExpectations = updateExpectationsForJsonAttribute(longLivedExpectations, PayloadConstants.JWT_ID, builder.g... | /**
* Create a JWT token with a jti claim and an exp value that is short. Use the token a couple of times after sleeping
* (waiting for the token to expire)
* The exp should be checked before the jti
*
* @throws Exception
*/ | Create a JWT token with a jti claim and an exp value that is short. Use the token a couple of times after sleeping (waiting for the token to expire) The exp should be checked before the jti | ConsumeMangledJWTTests_exp_jti | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.fat.common.jwt/fat/src/com/ibm/ws/security/fat/common/jwt/sharedTests/ConsumeMangledJWTTests.java",
"license": "epl-1.0",
"size": 34559
} | [
"com.gargoylesoftware.htmlunit.Page",
"com.ibm.ws.security.fat.common.expectations.Expectations",
"com.ibm.ws.security.fat.common.jwt.PayloadConstants"
] | import com.gargoylesoftware.htmlunit.Page; import com.ibm.ws.security.fat.common.expectations.Expectations; import com.ibm.ws.security.fat.common.jwt.PayloadConstants; | import com.gargoylesoftware.htmlunit.*; import com.ibm.ws.security.fat.common.expectations.*; import com.ibm.ws.security.fat.common.jwt.*; | [
"com.gargoylesoftware.htmlunit",
"com.ibm.ws"
] | com.gargoylesoftware.htmlunit; com.ibm.ws; | 67,954 |
public boolean testConnection()
{
if (jdbcSource == null)
{
try
{
findDatasource();
}
catch (NamingException ne)
{
return false;
}
}
return true;
}
| boolean function() { if (jdbcSource == null) { try { findDatasource(); } catch (NamingException ne) { return false; } } return true; } | /**
* A simple test to see if the jndi datasource exists.
*
* Note that this test does not ensure that the datasource will return valid
* connections.
*/ | A simple test to see if the jndi datasource exists. Note that this test does not ensure that the datasource will return valid connections | testConnection | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/lib/sql/JNDIConnectionPool.java",
"license": "gpl-3.0",
"size": 8929
} | [
"javax.naming.NamingException"
] | import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 210,050 |
@Test
@Ignore
public void testMoreThreadsThanConnectionsSteal() throws SQLException, InterruptedException, CloneNotSupportedException{
BoneCPConfig config = this.config.clone();
config.setNullOnConnectionTimeout(false);
config.setConnectionTimeoutInMs(Long.MAX_VALUE);
poolClass = new BoneCP(config);
f... | @Test void function() throws SQLException, InterruptedException, CloneNotSupportedException{ BoneCPConfig config = this.config.clone(); config.setNullOnConnectionTimeout(false); config.setConnectionTimeoutInMs(Long.MAX_VALUE); poolClass = new BoneCP(config); final CountDownLatch cdl = new CountDownLatch(5); for (int i=... | /** Same test as above but this time the threads are done from using it. All connections should go back to the normal queue in the fallback
* strategy.
* @throws SQLException
* @throws InterruptedException
* @throws CloneNotSupportedException
*/ | Same test as above but this time the threads are done from using it. All connections should go back to the normal queue in the fallback strategy | testMoreThreadsThanConnectionsSteal | {
"repo_name": "squidsolutions/bonecp",
"path": "bonecp/src/test/java/com/jolbox/bonecp/TestCachedConnectionStrategy.java",
"license": "apache-2.0",
"size": 8374
} | [
"java.sql.SQLException",
"java.util.concurrent.CountDownLatch",
"org.junit.Test"
] | import java.sql.SQLException; import java.util.concurrent.CountDownLatch; import org.junit.Test; | import java.sql.*; import java.util.concurrent.*; import org.junit.*; | [
"java.sql",
"java.util",
"org.junit"
] | java.sql; java.util; org.junit; | 1,848,166 |
public void renameTo(Path target) throws IOException {
checkSameFilesystem(target);
fileSystem.renameTo(this, target);
} | void function(Path target) throws IOException { checkSameFilesystem(target); fileSystem.renameTo(this, target); } | /**
* Renames the file denoted by the current path to the location "target", not
* following symbolic links.
*
* <p>Files cannot be atomically renamed across devices; copying is required.
* Use {@link FileSystemUtils#copyFile} followed by {@link Path#delete}.
*
* @throws IOException if the rename f... | Renames the file denoted by the current path to the location "target", not following symbolic links. Files cannot be atomically renamed across devices; copying is required. Use <code>FileSystemUtils#copyFile</code> followed by <code>Path#delete</code> | renameTo | {
"repo_name": "kidaa/bazel",
"path": "src/main/java/com/google/devtools/build/lib/vfs/Path.java",
"license": "apache-2.0",
"size": 40203
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 844,666 |
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(input);
return doc;
} | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(input); return doc; } | /**
* Get xml document, by stream
*
* @param input
* @return
* @throws Exception
*/ | Get xml document, by stream | getDocument | {
"repo_name": "javajoker/infoecos",
"path": "src/com/infoecos/util/XmlUtil.java",
"license": "gpl-2.0",
"size": 5612
} | [
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"org.w3c.dom.Document"
] | import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; | import javax.xml.parsers.*; import org.w3c.dom.*; | [
"javax.xml",
"org.w3c.dom"
] | javax.xml; org.w3c.dom; | 2,034,957 |
private Map<String, TaskReport> getTaskCompletionReports(@Nullable String errorMsg)
{
return TaskReport.buildTaskReports(
new IngestionStatsAndErrorsTaskReport(
task.getId(),
new IngestionStatsAndErrorsTaskReportData(
ingestionState,
getTaskComplet... | Map<String, TaskReport> function(@Nullable String errorMsg) { return TaskReport.buildTaskReports( new IngestionStatsAndErrorsTaskReport( task.getId(), new IngestionStatsAndErrorsTaskReportData( ingestionState, getTaskCompletionUnparseableEvents(), getTaskCompletionRowStats(), errorMsg, errorMsg == null ) ) ); } | /**
* Return a map of reports for the task.
*
* A successfull task should always have a null errorMsg. Segments availability is inherently confirmed
* if the task was succesful.
*
* A falied task should always have a non-null errorMsg. Segment availability is never confirmed if the task
* was not s... | Return a map of reports for the task. A successfull task should always have a null errorMsg. Segments availability is inherently confirmed if the task was succesful. A falied task should always have a non-null errorMsg. Segment availability is never confirmed if the task was not successful | getTaskCompletionReports | {
"repo_name": "mghosh4/druid",
"path": "indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java",
"license": "apache-2.0",
"size": 77012
} | [
"java.util.Map",
"javax.annotation.Nullable",
"org.apache.druid.indexing.common.IngestionStatsAndErrorsTaskReport",
"org.apache.druid.indexing.common.IngestionStatsAndErrorsTaskReportData",
"org.apache.druid.indexing.common.TaskReport"
] | import java.util.Map; import javax.annotation.Nullable; import org.apache.druid.indexing.common.IngestionStatsAndErrorsTaskReport; import org.apache.druid.indexing.common.IngestionStatsAndErrorsTaskReportData; import org.apache.druid.indexing.common.TaskReport; | import java.util.*; import javax.annotation.*; import org.apache.druid.indexing.common.*; | [
"java.util",
"javax.annotation",
"org.apache.druid"
] | java.util; javax.annotation; org.apache.druid; | 1,747,072 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<OperationInner> list(Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<OperationInner> list(Context context); | /**
* Returns the list of supported REST operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected ... | Returns the list of supported REST operations | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/azurestack/azure-resourcemanager-azurestack/src/main/java/com/azure/resourcemanager/azurestack/fluent/OperationsClient.java",
"license": "mit",
"size": 1614
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.azurestack.fluent.models.OperationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.azurestack.fluent.models.OperationInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.azurestack.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,105,634 |
public static String getMimeType(Context mContext, Uri uri) {
ContentResolver cR = mContext.getContentResolver();
String mimeType = cR.getType(uri);
if (mimeType == null) {
mimeType = getMimeType(uri.toString());
}
return mimeType;
} | static String function(Context mContext, Uri uri) { ContentResolver cR = mContext.getContentResolver(); String mimeType = cR.getType(uri); if (mimeType == null) { mimeType = getMimeType(uri.toString()); } return mimeType; } | /**
* Retrieves uri mime-type using ContentResolver
*
* @param mContext
* @param uri
* @return
*/ | Retrieves uri mime-type using ContentResolver | getMimeType | {
"repo_name": "yun2win/yun2win-sdk-android",
"path": "yun2winDemo/app/src/main/java/y2w/common/StorageManager.java",
"license": "mit",
"size": 10168
} | [
"android.content.ContentResolver",
"android.content.Context",
"android.net.Uri"
] | import android.content.ContentResolver; import android.content.Context; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 2,551,933 |
Assert.fail( "Test 'ToolsService_getLocalizedDBModuleTest.testSuccessPath()}' not implemented." );
}
| Assert.fail( STR ); } | /**
* Test succes path for service method <code>getLocalizedDBModule</code>
*
* Tests expected behaviour of service method.
*/ | Test succes path for service method <code>getLocalizedDBModule</code> Tests expected behaviour of service method | testSuccessPath | {
"repo_name": "phoenixctms/ctsms",
"path": "core/src/test/java/org/phoenixctms/ctsms/service/shared/test/ToolsService_getLocalizedDBModuleTest.java",
"license": "lgpl-2.1",
"size": 1317
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 1,585,617 |
public long count() throws Exception {
final String id = new AbstractID().toString();
output(new Utils.CountHelper<T>(id)).name("count()");
JobExecutionResult res = getExecutionEnvironment().execute();
return res.<Long>getAccumulatorResult(id);
} | long function() throws Exception { final String id = new AbstractID().toString(); output(new Utils.CountHelper<T>(id)).name(STR); JobExecutionResult res = getExecutionEnvironment().execute(); return res.<Long>getAccumulatorResult(id); } | /**
* Convenience method to get the count (number of elements) of a DataSet.
*
* @return A long integer that represents the number of elements in the data set.
*/ | Convenience method to get the count (number of elements) of a DataSet | count | {
"repo_name": "tillrohrmann/flink",
"path": "flink-java/src/main/java/org/apache/flink/api/java/DataSet.java",
"license": "apache-2.0",
"size": 87624
} | [
"org.apache.flink.api.common.JobExecutionResult",
"org.apache.flink.util.AbstractID"
] | import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.util.AbstractID; | import org.apache.flink.api.common.*; import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,165,732 |
private void initViews() {
ivBack = (ImageView) findViewById(R.id.ivBack);
etPswOld = (EditText) findViewById(R.id.etPswOld);
etPswNew = (EditText) findViewById(R.id.etPswNew);
tbPswFlag = (ToggleButton) findViewById(R.id.tbPswFlag);
btnConfirm = (Button) findViewById(R.id.btnConfirm);
tvResult = (TextVi... | void function() { ivBack = (ImageView) findViewById(R.id.ivBack); etPswOld = (EditText) findViewById(R.id.etPswOld); etPswNew = (EditText) findViewById(R.id.etPswNew); tbPswFlag = (ToggleButton) findViewById(R.id.tbPswFlag); btnConfirm = (Button) findViewById(R.id.btnConfirm); tvResult = (TextView) findViewById(R.id.tv... | /**
* Inits the views.
*/ | Inits the views | initViews | {
"repo_name": "gizwits/Gizwits-WaterHeater_Android",
"path": "src/com/gizwits/framework/activity/account/ChangePswActivity.java",
"license": "mit",
"size": 7804
} | [
"android.text.InputFilter",
"android.view.View",
"android.widget.Button",
"android.widget.EditText",
"android.widget.ImageView",
"android.widget.RelativeLayout",
"android.widget.TextView",
"android.widget.ToggleButton",
"com.gizwits.framework.utils.DialogManager",
"com.gizwits.framework.widget.MyI... | import android.text.InputFilter; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.ToggleButton; import com.gizwits.framework.utils.DialogManager; import com... | import android.text.*; import android.view.*; import android.widget.*; import com.gizwits.framework.utils.*; import com.gizwits.framework.widget.*; | [
"android.text",
"android.view",
"android.widget",
"com.gizwits.framework"
] | android.text; android.view; android.widget; com.gizwits.framework; | 2,232,886 |
@OnMessage
public void onMessage(@PathParam("clientId") String clientId, String applicationConfig) {
LOGGER.config(() -> "Client: " + clientId + ", status: " + applicationConfig);
if (applicationConfig != null && !applicationConfig.isEmpty()) {
clients.register(fromJSON(applicationConfig));... | void function(@PathParam(STR) String clientId, String applicationConfig) { LOGGER.config(() -> STR + clientId + STR + applicationConfig); if (applicationConfig != null && !applicationConfig.isEmpty()) { clients.register(fromJSON(applicationConfig)); } else { clients.deRegister(clientId); } } | /**
* Heartbeat endpoint.
* Registers that the client is still there and updates configuration
* if changed.
*
* @param clientId The client id
* @param applicationConfig The updated configuration
*/ | Heartbeat endpoint. Registers that the client is still there and updates configuration if changed | onMessage | {
"repo_name": "arun-gupta/snoop",
"path": "snoop-service/src/main/java/eu/agilejava/snoop/SnoopStatusEndpoint.java",
"license": "mit",
"size": 2393
} | [
"javax.websocket.server.PathParam"
] | import javax.websocket.server.PathParam; | import javax.websocket.server.*; | [
"javax.websocket"
] | javax.websocket; | 1,212,565 |
void clear() {
Arrays.fill(reps, 0, htab.size(), null);
htab.clear();
} | void clear() { Arrays.fill(reps, 0, htab.size(), null); htab.clear(); } | /**
* Resets table to its initial (empty) state.
*/ | Resets table to its initial (empty) state | clear | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/java/io/ObjectOutputStream.java",
"license": "gpl-2.0",
"size": 93107
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 893,115 |
@Override
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
int rc = super.tightMarshal1(wireFormat, o, bs);
return rc + 0;
} | int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | tightMarshal1 | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/KeepAliveInfoMarshaller.java",
"license": "apache-2.0",
"size": 3538
} | [
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat"
] | import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; | import java.io.*; import org.apache.activemq.openwire.codec.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 2,469,608 |
public Configuration getConfiguration() {
return getProcessingContext().getConfiguration();
} | Configuration function() { return getProcessingContext().getConfiguration(); } | /**
* Returns the report configuration that was used to initiate this processing run.
*
* @return the report configuration.
*/ | Returns the report configuration that was used to initiate this processing run | getConfiguration | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/parameters/ComputedParameterValues.java",
"license": "lgpl-2.1",
"size": 7353
} | [
"org.pentaho.reporting.libraries.base.config.Configuration"
] | import org.pentaho.reporting.libraries.base.config.Configuration; | import org.pentaho.reporting.libraries.base.config.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 2,519,082 |
private static void showResult(FMSDKResponse<QueryNetworkResp> resp)
{
QueryNetworkResp queryNetworkResp = resp.getResult();
// Response object is null
if (null == queryNetworkResp)
{
System.out.println("Failed to get the network's ID, the result is null.");
... | static void function(FMSDKResponse<QueryNetworkResp> resp) { QueryNetworkResp queryNetworkResp = resp.getResult(); if (null == queryNetworkResp) { System.out.println(STR); return; } if (!STR.equals(resp.getResultCode())) { System.out.println(STR + resp.getResultCode() + "]" + queryNetworkResp.getFaultString()); return;... | /**
* Show the details of the response object returned by "QueryNetwork" interface
* @param resp Result return by interface
* @since eSDK Cloud V100R003C20
*/ | Show the details of the response object returned by "QueryNetwork" interface | showResult | {
"repo_name": "eSDK/esdk_cloud_fm_r3_native_java",
"path": "test/demo/FM/EN/eSDK_FM_Native_Demo_JAVA/src/com/huawei/esdk/fusionmanager/demo/network/QueryNetworkDemo.java",
"license": "apache-2.0",
"size": 5861
} | [
"com.huawei.esdk.fusionmanager.local.bean.FMSDKResponse",
"com.huawei.esdk.fusionmanager.local.bean.net.IpRangeSet",
"com.huawei.esdk.fusionmanager.local.bean.net.NetworkSet",
"com.huawei.esdk.fusionmanager.local.bean.net.QueryNetworkResp",
"java.util.List"
] | import com.huawei.esdk.fusionmanager.local.bean.FMSDKResponse; import com.huawei.esdk.fusionmanager.local.bean.net.IpRangeSet; import com.huawei.esdk.fusionmanager.local.bean.net.NetworkSet; import com.huawei.esdk.fusionmanager.local.bean.net.QueryNetworkResp; import java.util.List; | import com.huawei.esdk.fusionmanager.local.bean.*; import com.huawei.esdk.fusionmanager.local.bean.net.*; import java.util.*; | [
"com.huawei.esdk",
"java.util"
] | com.huawei.esdk; java.util; | 2,419,412 |
@Override
public void initGui()
{
this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format("gui.done")));
} | void function() { this.buttonList.add(new GuiButton(1, this.width / 2 - 75, this.height - 38, I18n.format(STR))); } | /**
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
* window resizes, the buttonList is cleared beforehand.
*/ | Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the window resizes, the buttonList is cleared beforehand | initGui | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraftforge/fml/client/GuiModsMissingForServer.java",
"license": "lgpl-2.1",
"size": 3037
} | [
"net.minecraft.client.gui.GuiButton",
"net.minecraft.client.resources.I18n"
] | import net.minecraft.client.gui.GuiButton; import net.minecraft.client.resources.I18n; | import net.minecraft.client.gui.*; import net.minecraft.client.resources.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 1,807,515 |
private void loadDraftComments(Account.Id author, @Nullable Ref ref) {
if (draftCommentNotes == null || !author.equals(draftCommentNotes.getAuthor()) || ref != null) {
draftCommentNotes = new DraftCommentNotes(args, getChangeId(), author, ref);
draftCommentNotes.load();
}
} | void function(Account.Id author, @Nullable Ref ref) { if (draftCommentNotes == null !author.equals(draftCommentNotes.getAuthor()) ref != null) { draftCommentNotes = new DraftCommentNotes(args, getChangeId(), author, ref); draftCommentNotes.load(); } } | /**
* If draft comments have already been loaded for this author, then they will not be reloaded.
* However, this method will load the comments if no draft comments have been loaded or if the
* caller would like the drafts for another author.
*/ | If draft comments have already been loaded for this author, then they will not be reloaded. However, this method will load the comments if no draft comments have been loaded or if the caller would like the drafts for another author | loadDraftComments | {
"repo_name": "GerritCodeReview/gerrit",
"path": "java/com/google/gerrit/server/notedb/ChangeNotes.java",
"license": "apache-2.0",
"size": 26212
} | [
"com.google.gerrit.common.Nullable",
"com.google.gerrit.entities.Account",
"org.eclipse.jgit.lib.Ref"
] | import com.google.gerrit.common.Nullable; import com.google.gerrit.entities.Account; import org.eclipse.jgit.lib.Ref; | import com.google.gerrit.common.*; import com.google.gerrit.entities.*; import org.eclipse.jgit.lib.*; | [
"com.google.gerrit",
"org.eclipse.jgit"
] | com.google.gerrit; org.eclipse.jgit; | 1,372,951 |
public void addChildArea(Area childArea) {
} | void function(Area childArea) { } | /**
* Add a child area to the current area. If this causes the maximum
* dimension of the current area to be exceeded, the parent LM is called
* to add it.
* @param childArea the child area to be added
*/ | Add a child area to the current area. If this causes the maximum dimension of the current area to be exceeded, the parent LM is called to add it | addChildArea | {
"repo_name": "chunlinyao/fop",
"path": "fop-core/src/main/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java",
"license": "apache-2.0",
"size": 17907
} | [
"org.apache.fop.area.Area"
] | import org.apache.fop.area.Area; | import org.apache.fop.area.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,118,647 |
public void setUserManager(UserManager userManager) {
this.userManager = userManager;
} | void function(UserManager userManager) { this.userManager = userManager; } | /**
* Sets the {@link UserManager} that to which this presentation component delegates
* in order to perform complex business logic.
*
* @param userManager the {@link UserManager} that to which this presentation component delegates
* in order to perform complex business logic... | Sets the <code>UserManager</code> that to which this presentation component delegates in order to perform complex business logic | setUserManager | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "samples/showcases/formtags/src/org/springframework/showcase/formtags/web/ListController.java",
"license": "apache-2.0",
"size": 2147
} | [
"org.springframework.showcase.formtags.service.UserManager"
] | import org.springframework.showcase.formtags.service.UserManager; | import org.springframework.showcase.formtags.service.*; | [
"org.springframework.showcase"
] | org.springframework.showcase; | 344,410 |
public URL asURL() throws ParsableException {
try {
return new URL(param);
} catch (MalformedURLException e) {
throw new ParsableException(e);
}
} | URL function() throws ParsableException { try { return new URL(param); } catch (MalformedURLException e) { throw new ParsableException(e); } } | /**
* Convert the parameter into an {@link URL} representation
*
* @return
* The formed URL
* @throws ParsableException
* If the parameter was not on a correct format
*/ | Convert the parameter into an <code>URL</code> representation | asURL | {
"repo_name": "kroghnet/jawn",
"path": "jawn-core/src/main/java/net/javapla/jawn/core/Param.java",
"license": "lgpl-3.0",
"size": 3493
} | [
"java.net.MalformedURLException",
"net.javapla.jawn.core.exceptions.ParsableException"
] | import java.net.MalformedURLException; import net.javapla.jawn.core.exceptions.ParsableException; | import java.net.*; import net.javapla.jawn.core.exceptions.*; | [
"java.net",
"net.javapla.jawn"
] | java.net; net.javapla.jawn; | 796,162 |
public static int getStartPage()
{
final String str = JForumExecutionContext.getRequest().getParameter("start");
int start;
if (StringUtils.isEmpty(str)) {
start = 0;
}
else {
start = Integer.parseInt(str);
if (start < 0) {
start = 0;
}
}
return start;
} | static int function() { final String str = JForumExecutionContext.getRequest().getParameter("start"); int start; if (StringUtils.isEmpty(str)) { start = 0; } else { start = Integer.parseInt(str); if (start < 0) { start = 0; } } return start; } | /**
* Returns the initial page to start fetching records from.
*
* @return The initial page number
*/ | Returns the initial page to start fetching records from | getStartPage | {
"repo_name": "mheinzerling/jforum2",
"path": "src/main/java/net/jforum/view/forum/common/ViewCommon.java",
"license": "bsd-3-clause",
"size": 9238
} | [
"net.jforum.JForumExecutionContext",
"org.apache.commons.lang3.StringUtils"
] | import net.jforum.JForumExecutionContext; import org.apache.commons.lang3.StringUtils; | import net.jforum.*; import org.apache.commons.lang3.*; | [
"net.jforum",
"org.apache.commons"
] | net.jforum; org.apache.commons; | 2,823,660 |
public void setCreated(Date value); | void function(Date value); | /**
* Setter for <code>cattle.generic_object.created</code>.
*/ | Setter for <code>cattle.generic_object.created</code> | setCreated | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/GenericObject.java",
"license": "apache-2.0",
"size": 4719
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,615,421 |
private void logChildren() {
Log.d(TAG, "internal representation of views on the screen");
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
Log.d(TAG, "item " + getPosition(child) + ", coord:"
+ mOrientationHelper.getDecoratedStart(c... | void function() { Log.d(TAG, STR); for (int i = 0; i < getChildCount(); i++) { View child = getChildAt(i); Log.d(TAG, STR + getPosition(child) + STR + mOrientationHelper.getDecoratedStart(child)); } Log.d(TAG, STR); } | /**
* Used for debugging.
* Logs the internal representation of children to default logger.
*/ | Used for debugging. Logs the internal representation of children to default logger | logChildren | {
"repo_name": "weiwenqiang/GitHub",
"path": "Subentry/vlayout-master/vlayout/src/main/java/com/alibaba/android/vlayout/ExposeLinearLayoutManagerEx.java",
"license": "apache-2.0",
"size": 79060
} | [
"android.util.Log",
"android.view.View"
] | import android.util.Log; import android.view.View; | import android.util.*; import android.view.*; | [
"android.util",
"android.view"
] | android.util; android.view; | 2,717,714 |
public FieldQuery getUrl(final int index) {
return ListUtil.get(this.url, index);
} | FieldQuery function(final int index) { return ListUtil.get(this.url, index); } | /**
* Get the url query at the input index.
*
* @param index Index of the url query to get.
* @return {@link FieldQuery} at the input index.
*/ | Get the url query at the input index | getUrl | {
"repo_name": "CitrineInformatics/java-citrination-client",
"path": "src/main/java/io/citrine/jcc/search/pif/query/core/FileReferenceQuery.java",
"license": "apache-2.0",
"size": 16721
} | [
"io.citrine.jcc.util.ListUtil"
] | import io.citrine.jcc.util.ListUtil; | import io.citrine.jcc.util.*; | [
"io.citrine.jcc"
] | io.citrine.jcc; | 2,307,048 |
public native boolean isParityError(int portHandle) throws IOException; | native boolean function(int portHandle) throws IOException; | /**
* Returns <code>true</code> if there was a parity error.
* <p>
* Java code must synchronize on the <code>CommPort</code> instance
* when calling this method.
* </p>
* @param portHandle The port handle or token.
* @return <code>true</code> if there was a parity error.
* @throw... | Returns <code>true</code> if there was a parity error. Java code must synchronize on the <code>CommPort</code> instance when calling this method. | isParityError | {
"repo_name": "makerbot/RXTX-devel",
"path": "Rewrite2010/src/java/main/gnu/io/Dispatcher.java",
"license": "lgpl-2.1",
"size": 44635
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 936,483 |
public static Level getLogLevel(Class<?> implementingClass, Configuration conf) {
return Level.toLevel(conf.getInt(enumToConfKey(implementingClass, GeneralOpts.LOG_LEVEL), Level.INFO.toInt()));
} | static Level function(Class<?> implementingClass, Configuration conf) { return Level.toLevel(conf.getInt(enumToConfKey(implementingClass, GeneralOpts.LOG_LEVEL), Level.INFO.toInt())); } | /**
* Gets the log level from this configuration.
*
* @param implementingClass
* the class whose name will be used as a prefix for the property configuration key
* @param conf
* the Hadoop configuration object to configure
* @return the log level
* @since 1.5.0
* @see #setLo... | Gets the log level from this configuration | getLogLevel | {
"repo_name": "phrocker/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java",
"license": "apache-2.0",
"size": 11303
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.log4j.Level"
] | import org.apache.hadoop.conf.Configuration; import org.apache.log4j.Level; | import org.apache.hadoop.conf.*; import org.apache.log4j.*; | [
"org.apache.hadoop",
"org.apache.log4j"
] | org.apache.hadoop; org.apache.log4j; | 953,950 |
HistoryEvent createDecisionEvaluatedEvt(DelegateExecution execution, DmnDecisionEvaluationEvent decisionEvaluationEvent); | HistoryEvent createDecisionEvaluatedEvt(DelegateExecution execution, DmnDecisionEvaluationEvent decisionEvaluationEvent); | /**
* Creates the history event fired when a decision is evaluated while execute
* a process instance.
*
* @param execution
* the current execution
* @param decisionEvaluationEvent
* the evaluation event
* @return the history event
*
* @see #createDecisionEvaluatedEvt(Dmn... | Creates the history event fired when a decision is evaluated while execute a process instance | createDecisionEvaluatedEvt | {
"repo_name": "xasx/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/impl/history/producer/DmnHistoryEventProducer.java",
"license": "apache-2.0",
"size": 2651
} | [
"org.camunda.bpm.dmn.engine.delegate.DmnDecisionEvaluationEvent",
"org.camunda.bpm.engine.delegate.DelegateExecution",
"org.camunda.bpm.engine.impl.history.event.HistoryEvent"
] | import org.camunda.bpm.dmn.engine.delegate.DmnDecisionEvaluationEvent; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.impl.history.event.HistoryEvent; | import org.camunda.bpm.dmn.engine.delegate.*; import org.camunda.bpm.engine.delegate.*; import org.camunda.bpm.engine.impl.history.event.*; | [
"org.camunda.bpm"
] | org.camunda.bpm; | 1,089,951 |
public GalleryMode getGalleryMode() {
return m_galleryMode;
} | GalleryMode function() { return m_galleryMode; } | /**
* Returns the gallery mode.<p>
*
* @return the gallery mode
*/ | Returns the gallery mode | getGalleryMode | {
"repo_name": "serrapos/opencms-core",
"path": "src-gwt/org/opencms/ade/galleries/client/preview/ui/A_CmsPreviewDialog.java",
"license": "lgpl-2.1",
"size": 9619
} | [
"org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants"
] | import org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants; | import org.opencms.ade.galleries.shared.*; | [
"org.opencms.ade"
] | org.opencms.ade; | 1,292,947 |
Map<String, String> packageNameMap() {
if (packageNames == null) {
return emptyMap();
}
Map<String, String> names = new LinkedHashMap<String, String>();
for (PackageName name : packageNames) {
names.put(name.getUri(), name.getPackage());
}
ret... | Map<String, String> packageNameMap() { if (packageNames == null) { return emptyMap(); } Map<String, String> names = new LinkedHashMap<String, String>(); for (PackageName name : packageNames) { names.put(name.getUri(), name.getPackage()); } return names; } | /**
* Returns a map of URIs to package name, as specified by the packageNames
* parameter.
*/ | Returns a map of URIs to package name, as specified by the packageNames parameter | packageNameMap | {
"repo_name": "Banno/scalaxb",
"path": "mvn-scalaxb/src/main/java/org/scalaxb/maven/AbstractScalaxbMojo.java",
"license": "mit",
"size": 12299
} | [
"java.util.Collections",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,864,100 |
public void deleteCommentCategory(QueryQuestionCommentCategory queryQuestionCommentCategory) {
queryQuestionCommentCategoryDAO.delete(queryQuestionCommentCategory);
} | void function(QueryQuestionCommentCategory queryQuestionCommentCategory) { queryQuestionCommentCategoryDAO.delete(queryQuestionCommentCategory); } | /**
* Deletes a comment category
*
* @param queryQuestionCommentCategory category
*/ | Deletes a comment category | deleteCommentCategory | {
"repo_name": "Metatavu/edelphi",
"path": "common-cdi/src/main/java/fi/metatavu/edelphi/queries/QueryPageController.java",
"license": "gpl-3.0",
"size": 33661
} | [
"fi.metatavu.edelphi.domainmodel.querydata.QueryQuestionCommentCategory"
] | import fi.metatavu.edelphi.domainmodel.querydata.QueryQuestionCommentCategory; | import fi.metatavu.edelphi.domainmodel.querydata.*; | [
"fi.metatavu.edelphi"
] | fi.metatavu.edelphi; | 755,366 |
void handleSubscriberException(Throwable e, SubscriberExceptionContext context) {
checkNotNull(e);
checkNotNull(context);
try {
exceptionHandler.handleException(e, context);
} catch (Throwable e2) {
// if the handler threw an exception... well, just log it
logger.log(
Level... | void handleSubscriberException(Throwable e, SubscriberExceptionContext context) { checkNotNull(e); checkNotNull(context); try { exceptionHandler.handleException(e, context); } catch (Throwable e2) { logger.log( Level.SEVERE, String.format(Locale.ROOT, STR, e2, e), e2); } } | /**
* Handles the given exception thrown by a subscriber with the given context.
*/ | Handles the given exception thrown by a subscriber with the given context | handleSubscriberException | {
"repo_name": "DavesMan/guava",
"path": "guava/src/com/google/common/eventbus/EventBus.java",
"license": "apache-2.0",
"size": 9319
} | [
"com.google.common.base.Preconditions",
"java.util.Locale",
"java.util.logging.Level"
] | import com.google.common.base.Preconditions; import java.util.Locale; import java.util.logging.Level; | import com.google.common.base.*; import java.util.*; import java.util.logging.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,915,675 |
@Deprecated
default PubSubAsyncNodeSelection<K, V> replicas() {
return nodes(redisClusterNode -> redisClusterNode.is(RedisClusterNode.NodeFlag.REPLICA));
} | default PubSubAsyncNodeSelection<K, V> replicas() { return nodes(redisClusterNode -> redisClusterNode.is(RedisClusterNode.NodeFlag.REPLICA)); } | /**
* Select all replicas.
*
* @return API with asynchronous executed commands on a selection of replica cluster nodes.
* @since 5.2
*/ | Select all replicas | replicas | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/cluster/pubsub/api/async/RedisClusterPubSubAsyncCommands.java",
"license": "apache-2.0",
"size": 4386
} | [
"io.lettuce.core.cluster.models.partitions.RedisClusterNode"
] | import io.lettuce.core.cluster.models.partitions.RedisClusterNode; | import io.lettuce.core.cluster.models.partitions.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 586,055 |
public void addInstanceIndex(int index) {
if (indexes == null) {
indexes = new ArrayList<>(DEFAULT_SIZE);
}
if (instances == null) {
instances = new ArrayList<>(DEFAULT_SIZE);
}
indexes.add(index);
if (discDSet != null) {
instances.... | void function(int index) { if (indexes == null) { indexes = new ArrayList<>(DEFAULT_SIZE); } if (instances == null) { instances = new ArrayList<>(DEFAULT_SIZE); } indexes.add(index); if (discDSet != null) { instances.add(discDSet.getInstance(index)); } } | /**
* This method adds a data index and a corresponding data point to this
* discretized category object.
*
* @param index Integer that is the index of the instance to add to the
* category.
*/ | This method adds a data index and a corresponding data point to this discretized category object | addInstanceIndex | {
"repo_name": "datapoet/hubminer",
"path": "src/main/java/learning/supervised/DiscreteCategory.java",
"license": "gpl-3.0",
"size": 3799
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,017,190 |
private void vetOuterJoin( Connection conn ) throws Exception
{
File traceFile = SupportFilesSetup.getReadWrite( TRACE_FILE_NAME );
SupportFilesSetup.deleteFile( traceFile );
// turn on xml-based optimizer tracing
goodStatement
(
conn,
"c... | void function( Connection conn ) throws Exception { File traceFile = SupportFilesSetup.getReadWrite( TRACE_FILE_NAME ); SupportFilesSetup.deleteFile( traceFile ); goodStatement ( conn, STR ); goodStatement ( conn, STR ); goodStatement ( conn, STR + traceFile.getPath() + STR ); goodStatement ( conn, STR + traceFile.getP... | /**
* <p>
* Test xml optimizer tracing of outer joins.
* </p>
*/ | Test xml optimizer tracing of outer joins. | vetOuterJoin | {
"repo_name": "trejkaz/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/XMLOptimizerTraceTest.java",
"license": "apache-2.0",
"size": 25261
} | [
"java.io.File",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"org.apache.derbyTesting.junit.SupportFilesSetup"
] | import java.io.File; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import org.apache.derbyTesting.junit.SupportFilesSetup; | import java.io.*; import java.sql.*; import org.apache.*; | [
"java.io",
"java.sql",
"org.apache"
] | java.io; java.sql; org.apache; | 2,894,312 |
protected static ExpressionOperator length() {
ExpressionOperator exOperator = new ExpressionOperator();
exOperator.setSelector(ExpressionOperator.Length);
Vector<String> v = NonSynchronizedVector.newInstance(2);
v.addElement("CHAR_LENGTH(");
v.addElement(")");
exOper... | static ExpressionOperator function() { ExpressionOperator exOperator = new ExpressionOperator(); exOperator.setSelector(ExpressionOperator.Length); Vector<String> v = NonSynchronizedVector.newInstance(2); v.addElement(STR); v.addElement(")"); exOperator.printsAs(v); exOperator.bePrefix(); exOperator.setNodeClass(ClassC... | /**
* Obtains the number of characters in the data string value expression.<br>
* Builds Symfoware equivalent to length(string_exp).<br>
*
* Symfoware: CHAR_LENGTH(string_exp)
*
* @return the defined expression operator.
*/ | Obtains the number of characters in the data string value expression. Builds Symfoware equivalent to length(string_exp). Symfoware: CHAR_LENGTH(string_exp) | length | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/SymfowarePlatform.java",
"license": "epl-1.0",
"size": 51856
} | [
"java.util.Vector",
"org.eclipse.persistence.expressions.ExpressionOperator",
"org.eclipse.persistence.internal.expressions.FunctionExpression",
"org.eclipse.persistence.internal.helper.ClassConstants",
"org.eclipse.persistence.internal.helper.NonSynchronizedVector"
] | import java.util.Vector; import org.eclipse.persistence.expressions.ExpressionOperator; import org.eclipse.persistence.internal.expressions.FunctionExpression; import org.eclipse.persistence.internal.helper.ClassConstants; import org.eclipse.persistence.internal.helper.NonSynchronizedVector; | import java.util.*; import org.eclipse.persistence.expressions.*; import org.eclipse.persistence.internal.expressions.*; import org.eclipse.persistence.internal.helper.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 719,320 |
@Test
public void acceptEitherExample() {
String original = "Message";
StringBuilder result = new StringBuilder();
CompletableFuture<Void> cf = CompletableFuture.completedFuture(original)
.thenApplyAsync(s -> delayedUpperCase(s))
.acceptEither(CompletableF... | void function() { String original = STR; StringBuilder result = new StringBuilder(); CompletableFuture<Void> cf = CompletableFuture.completedFuture(original) .thenApplyAsync(s -> delayedUpperCase(s)) .acceptEither(CompletableFuture.completedFuture(original).thenApplyAsync(s -> delayedLowerCase(s)), s -> result.append(s... | /**
* 11. Consuming result of either of two completed stages
* Similar to the previous example,
* but using a Consumer instead of a Function (the dependent CompletableFuture has a type void):
*/ | 11. Consuming result of either of two completed stages Similar to the previous example, but using a Consumer instead of a Function (the dependent CompletableFuture has a type void): | acceptEitherExample | {
"repo_name": "yuweijun/learning-programming",
"path": "language-java/src/test/java/com/example/util/concurrent/CompletableFutureExamples.java",
"license": "mit",
"size": 23884
} | [
"java.util.concurrent.CompletableFuture",
"org.junit.Assert"
] | import java.util.concurrent.CompletableFuture; import org.junit.Assert; | import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,738,058 |
public void removeOrderFromSharedPreferences() {
SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.putString(PREFERENCES_TEXT_FIELD, PREFERENCES_EMPTY);
editor.commit();
} | void function() { SharedPreferences.Editor editor = mSharedPreferences.edit(); editor.putString(PREFERENCES_TEXT_FIELD, PREFERENCES_EMPTY); editor.commit(); } | /**
* Sets sharedpreferences current order string value to 'empty'.
*/ | Sets sharedpreferences current order string value to 'empty' | removeOrderFromSharedPreferences | {
"repo_name": "MiWy/CourierApplication",
"path": "app/src/main/java/com/tryouts/courierapplication/fragments/CurrentOrderFragment.java",
"license": "mpl-2.0",
"size": 7186
} | [
"android.content.SharedPreferences"
] | import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 763,874 |
public SharedObjects getSharedObjects() {
return sharedObjects;
}
| SharedObjects function() { return sharedObjects; } | /**
* Gets the shared objects.
* @return the sharedObjects
*/ | Gets the shared objects | getSharedObjects | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 103745
} | [
"org.pentaho.di.shared.SharedObjects"
] | import org.pentaho.di.shared.SharedObjects; | import org.pentaho.di.shared.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 797,158 |
public BigDecimal getAvailableBalance() {
return availableBalance;
} | BigDecimal function() { return availableBalance; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cash_acc.available_balance
*
* @return the value of cash_acc.available_balance
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column cash_acc.available_balance | getAvailableBalance | {
"repo_name": "fuhongliang/taolijie",
"path": "src/main/java/com/fh/taolijie/domain/CashAccModel.java",
"license": "gpl-3.0",
"size": 8782
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 551,706 |
public static void assertNotMatchesRegex(
String message, String expectedRegex, String actual) {
Matcher matcher = getMatcher(expectedRegex, actual);
if (matcher.matches()) {
failMatch(message, expectedRegex, actual);
}
} | static void function( String message, String expectedRegex, String actual) { Matcher matcher = getMatcher(expectedRegex, actual); if (matcher.matches()) { failMatch(message, expectedRegex, actual); } } | /**
* Asserts that {@code expectedRegex} does not exactly match {@code actual},
* and fails with {@code message} if it does. Note that you can also use
* this for a literal string, by wrapping your expected string in
* {@link Pattern#quote}.
*/ | Asserts that expectedRegex does not exactly match actual, and fails with message if it does. Note that you can also use this for a literal string, by wrapping your expected string in <code>Pattern#quote</code> | assertNotMatchesRegex | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "test-runner/src/android/test/MoreAsserts.java",
"license": "apache-2.0",
"size": 20943
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 660,333 |
@Override
protected boolean doAuthenticate(Request request, HttpServletResponse response)
throws IOException {
// NOTE: We don't try to reauthenticate using any existing SSO session,
// because that will only work if the original authentication was
// BASIC or FORM, wh... | boolean function(Request request, HttpServletResponse response) throws IOException { if (checkForCachedAuthentication(request, response, false)) { return true; } Principal principal = null; String authorization = request.getHeader(STR); DigestInfo digestInfo = new DigestInfo(getOpaque(), getNonceValidity(), getKey(), n... | /**
* Authenticate the user making this request, based on the specified
* login configuration. Return <code>true</code> if any specified
* constraint has been satisfied, or <code>false</code> if we have
* created a response challenge already.
*
* @param request Request we are proces... | Authenticate the user making this request, based on the specified login configuration. Return <code>true</code> if any specified constraint has been satisfied, or <code>false</code> if we have created a response challenge already | doAuthenticate | {
"repo_name": "IAMTJW/Tomcat-8.5.20",
"path": "tomcat-8.5.20/java/org/apache/catalina/authenticator/DigestAuthenticator.java",
"license": "apache-2.0",
"size": 22167
} | [
"java.io.IOException",
"java.security.Principal",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.catalina.connector.Request"
] | import java.io.IOException; import java.security.Principal; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.connector.Request; | import java.io.*; import java.security.*; import javax.servlet.http.*; import org.apache.catalina.connector.*; | [
"java.io",
"java.security",
"javax.servlet",
"org.apache.catalina"
] | java.io; java.security; javax.servlet; org.apache.catalina; | 1,157,786 |
public static boolean disableConnect(SelectionKey key)
{
try {
key.interestOps(key.interestOps() & ~SelectionKey.OP_CONNECT);
return true;
} catch(Exception ex) {
return false;
}
}
| static boolean function(SelectionKey key) { try { key.interestOps(key.interestOps() & ~SelectionKey.OP_CONNECT); return true; } catch(Exception ex) { return false; } } | /**
* Modify the given selection key so that it does not include the connect
* operation.
*
* @param key The selection key to modify
* @return True is the key was modified, false otherwise
*/ | Modify the given selection key so that it does not include the connect operation | disableConnect | {
"repo_name": "cfloersch/Stdlib",
"path": "src/main/java/xpertss/io/NIOUtils.java",
"license": "gpl-2.0",
"size": 16983
} | [
"java.nio.channels.SelectionKey"
] | import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,775,907 |
public void marshallToResult(Object obj, Result result) throws DhxException;
// public void marshallToNode(Object obj, Node node) throws DhxException; | void function(Object obj, Result result) throws DhxException; | /**
* Marshalls object to result.
*
* @param obj - object to marshall
* @param result - result into which object will be marshalled
* @throws DhxException - thrown if error occurs while marshalling object
*/ | Marshalls object to result | marshallToResult | {
"repo_name": "e-gov/DHX-adapter",
"path": "dhx-adapter-ws/src/main/java/ee/ria/dhx/ws/service/DhxMarshallerService.java",
"license": "mit",
"size": 6880
} | [
"ee.ria.dhx.exception.DhxException",
"javax.xml.transform.Result"
] | import ee.ria.dhx.exception.DhxException; import javax.xml.transform.Result; | import ee.ria.dhx.exception.*; import javax.xml.transform.*; | [
"ee.ria.dhx",
"javax.xml"
] | ee.ria.dhx; javax.xml; | 2,516,112 |
public void validate(Object obj, Errors errors)
{
Board u = (Board) obj;
if (u != null)
{
}
} | void function(Object obj, Errors errors) { Board u = (Board) obj; if (u != null) { } } | /**
* Validate the information on the form. Also checks the Board Manager
* to see if the given board name already exists.
* <p>
* @param obj The form backing object to validate.
* @param errors The errors object for error messages.
*/ | Validate the information on the form. Also checks the Board Manager to see if the given board name already exists. | validate | {
"repo_name": "iwethey/iwethey",
"path": "src/org/iwethey/forums/web/board/NewBoardValidator.java",
"license": "apache-2.0",
"size": 1544
} | [
"org.iwethey.forums.domain.Board",
"org.springframework.validation.Errors"
] | import org.iwethey.forums.domain.Board; import org.springframework.validation.Errors; | import org.iwethey.forums.domain.*; import org.springframework.validation.*; | [
"org.iwethey.forums",
"org.springframework.validation"
] | org.iwethey.forums; org.springframework.validation; | 2,369,744 |
public Observable<ServiceResponse<Page<VpnServerConfigurationInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<VpnServerConfigurationInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Lists all the vpnServerConfigurations in a resource group.
*
ServiceResponse<PageImpl<VpnServerConfigurationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return ... | Lists all the vpnServerConfigurations in a resource group | listByResourceGroupNextSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/VpnServerConfigurationsInner.java",
"license": "mit",
"size": 70526
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 432,418 |
ServiceFuture<DataLakeAnalyticsAccount> updateAsync(String resourceGroupName, String accountName, final ServiceCallback<DataLakeAnalyticsAccount> serviceCallback); | ServiceFuture<DataLakeAnalyticsAccount> updateAsync(String resourceGroupName, String accountName, final ServiceCallback<DataLakeAnalyticsAccount> serviceCallback); | /**
* Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
* @param accountName The name of the Data Lake Analytics account... | Updates the Data Lake Analytics account object specified by the accountName with the contents of the account object | updateAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java",
"license": "mit",
"size": 49196
} | [
"com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 307,803 |
public void setMinDollarAmountPurchased(BigDecimal value) {
setValue(minDollarAmountPurchased, value);
} | void function(BigDecimal value) { setValue(minDollarAmountPurchased, value); } | /**
* Set the <code>min_dollar_amount_purchased</code> parameter IN value to the routine
*/ | Set the <code>min_dollar_amount_purchased</code> parameter IN value to the routine | setMinDollarAmountPurchased | {
"repo_name": "bjansen/ceylon-jooq-example",
"path": "gen-source/gen/example/jooq/routines/RewardsReport.java",
"license": "mit",
"size": 2126
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,472,095 |
protected String usePreferredFirstName(LdapUserData userData) {
if(StringUtils.isNotBlank(userData.getPreferredFirstName())) {
if (M_log.isDebugEnabled()) {
M_log.debug("usePreferredFirstName() using firstNamePreferred.");
}
return userData.getPreferredFirstName();
} else {
if (M_log.isDebugE... | String function(LdapUserData userData) { if(StringUtils.isNotBlank(userData.getPreferredFirstName())) { if (M_log.isDebugEnabled()) { M_log.debug(STR); } return userData.getPreferredFirstName(); } else { if (M_log.isDebugEnabled()) { M_log.debug(STR); } return userData.getFirstName(); } } | /**
* Determines if a user has a preferredFirstName set and if so, returns it for use.
* Otherwise, returns their firstName as normal.
*
* @param userData the <code>LdapUserData</code> for the user
* @return a String of the user's first name.
*/ | Determines if a user has a preferredFirstName set and if so, returns it for use. Otherwise, returns their firstName as normal | usePreferredFirstName | {
"repo_name": "hackbuteer59/sakai",
"path": "providers/jldap/src/java/edu/amc/sakai/user/SimpleLdapAttributeMapper.java",
"license": "apache-2.0",
"size": 25144
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 13,510 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.