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 String getSchema() throws SQLException { return null; }
String function() throws SQLException { return null; }
/** * Retrieves this <code>Connection</code> object's current schema name. * * @return the current schema name or <code>null</code> if there is none * @exception SQLException if a database access error occurs * or this method is called on a closed connection * @see #setSchema *...
Retrieves this <code>Connection</code> object's current schema name
getSchema
{ "repo_name": "zhangzuoqiang/Oceanus", "path": "oceanus-all/oceanus-exchange/oceanus-exchange-jdbc/src/main/java/com/bj58/oceanus/exchange/jdbc/AbstractConnection.java", "license": "apache-2.0", "size": 10234 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,667,691
public Builder setClientSecrets(String clientId, String clientSecret) { setClientAuthentication(new ClientParametersAuthentication(clientId, clientSecret)); return this; }
Builder function(String clientId, String clientSecret) { setClientAuthentication(new ClientParametersAuthentication(clientId, clientSecret)); return this; }
/** * Sets the client identifier and secret. * * <p>Overriding is only supported for the purpose of calling the super implementation and * changing the return type, but nothing else. */
Sets the client identifier and secret. Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else
setClientSecrets
{ "repo_name": "googleapis/google-api-java-client", "path": "google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java", "license": "apache-2.0", "size": 33763 }
[ "com.google.api.client.auth.oauth2.ClientParametersAuthentication" ]
import com.google.api.client.auth.oauth2.ClientParametersAuthentication;
import com.google.api.client.auth.oauth2.*;
[ "com.google.api" ]
com.google.api;
2,015,432
public void testStartForResultIsTrue() { assertTrue(Intents.startForResult(new Intent(Intent.ACTION_PICK))); assertTrue(Intents.startForResult(new Intent(Intent.ACTION_EDIT))); assertTrue(Intents.startForResult(new Intent(Intent.ACTION_INSERT))); assertTrue(Intents.startForResult(new...
void function() { assertTrue(Intents.startForResult(new Intent(Intent.ACTION_PICK))); assertTrue(Intents.startForResult(new Intent(Intent.ACTION_EDIT))); assertTrue(Intents.startForResult(new Intent(Intent.ACTION_INSERT))); assertTrue(Intents.startForResult(new Intent(Intent.ACTION_INSERT_OR_EDIT))); assertTrue(Intents...
/** * Checks return values for: * PICK,EDIT, INSERT, INSERT_OR_EDIT, GET_CONTENT, PICK_ACTIVITY */
Checks return values for: PICK,EDIT, INSERT, INSERT_OR_EDIT, GET_CONTENT, PICK_ACTIVITY
testStartForResultIsTrue
{ "repo_name": "SanaMobile/sana.mobile", "path": "app/src/androidTest/java/org/sana/android/content/test/IntentsTest.java", "license": "bsd-3-clause", "size": 7852 }
[ "android.content.Intent", "org.sana.android.content.Intents" ]
import android.content.Intent; import org.sana.android.content.Intents;
import android.content.*; import org.sana.android.content.*;
[ "android.content", "org.sana.android" ]
android.content; org.sana.android;
1,085,392
public static Date updateYear(final Date date, final Integer year) { final Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(GregorianCalendar.YEAR, year); return calendar.getTime(); }
static Date function(final Date date, final Integer year) { final Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(GregorianCalendar.YEAR, year); return calendar.getTime(); }
/** * Update year method. * * @param date * Date * @param year * integer * @return a new date, with updated year value */
Update year method
updateYear
{ "repo_name": "AWNICS/mm-api", "path": "MM/mm-tools/src/main/java/com/awn/common/process/utils/DateUtils.java", "license": "apache-2.0", "size": 15884 }
[ "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar" ]
import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar;
import java.util.*;
[ "java.util" ]
java.util;
2,575,869
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<DedicatedHostInner>> listByHostGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } i...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<DedicatedHostInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; r...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked excepti...
Get the next page of items
listByHostGroupNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/DedicatedHostsClientImpl.java", "license": "mit", "size": 71874 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.compute.fluent.models.DedicatedHostInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.compute.fluent.models.DedicatedHostInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,143,049
public static Response createErrorResponse(Response.Status status, String errormessage) { return createResponse(status, null, errormessage); }
static Response function(Response.Status status, String errormessage) { return createResponse(status, null, errormessage); }
/** * in case of error (404 and such) * * @param status * @param errormessage * @return Response containing a status and the errormessage in JSON format */
in case of error (404 and such)
createErrorResponse
{ "repo_name": "vkolotov/smarthome", "path": "bundles/io/org.eclipse.smarthome.io.rest/src/main/java/org/eclipse/smarthome/io/rest/JSONResponse.java", "license": "epl-1.0", "size": 7754 }
[ "javax.ws.rs.core.Response" ]
import javax.ws.rs.core.Response;
import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
593,764
public static boolean networkObjectExists(URL repositoryURL, ObjectId objectId) { HttpURLConnection connection = null; boolean exists = false; try { String internalIp = InetAddress.getLocalHost().getHostName(); String expanded = repositoryURL.toString() + "/repo/exist...
static boolean function(URL repositoryURL, ObjectId objectId) { HttpURLConnection connection = null; boolean exists = false; try { String internalIp = InetAddress.getLocalHost().getHostName(); String expanded = repositoryURL.toString() + STR + objectId.toString() + STR + internalIp; connection = (HttpURLConnection) new...
/** * Determines whether or not an object with the given {@link ObjectId} exists in the remote * repository. * * @param repositoryURL the URL of the repository * @param objectId the id to check for * @return true if the object existed, false otherwise */
Determines whether or not an object with the given <code>ObjectId</code> exists in the remote repository
networkObjectExists
{ "repo_name": "state-hiu/GeoGit", "path": "src/core/src/main/java/org/geogit/remote/HttpUtils.java", "license": "bsd-3-clause", "size": 19558 }
[ "com.google.common.base.Preconditions", "com.google.common.base.Throwables", "java.io.BufferedReader", "java.io.InputStream", "java.io.InputStreamReader", "java.net.HttpURLConnection", "java.net.InetAddress", "org.geogit.api.ObjectId" ]
import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.InetAddress; import org.geogit.api.ObjectId;
import com.google.common.base.*; import java.io.*; import java.net.*; import org.geogit.api.*;
[ "com.google.common", "java.io", "java.net", "org.geogit.api" ]
com.google.common; java.io; java.net; org.geogit.api;
2,082,055
public static DirtyResult dirty(@Nullable SkyValue oldValue) { return new DirtyResult(true, oldValue, null); }
static DirtyResult function(@Nullable SkyValue oldValue) { return new DirtyResult(true, oldValue, null); }
/** * Creates a DirtyResult indicating that external value is different from the value in the * graph, but this new value is not known. */
Creates a DirtyResult indicating that external value is different from the value in the graph, but this new value is not known
dirty
{ "repo_name": "dslomov/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyValueDirtinessChecker.java", "license": "apache-2.0", "size": 4064 }
[ "com.google.devtools.build.skyframe.SkyValue", "javax.annotation.Nullable" ]
import com.google.devtools.build.skyframe.SkyValue; import javax.annotation.Nullable;
import com.google.devtools.build.skyframe.*; import javax.annotation.*;
[ "com.google.devtools", "javax.annotation" ]
com.google.devtools; javax.annotation;
1,421,616
boolean shouldPreserveExtras(Node n) { return false; } void maybeInsertSpace() {}
boolean shouldPreserveExtras(Node n) { return false; } void maybeInsertSpace() {}
/** * If the body of a for loop or the then clause of an if statement has a single statement, should * it be wrapped in a block? Doing so can help when pretty-printing the code, and permits putting * a debugging breakpoint on the statement inside the condition. * * @param n node to process * @return {...
If the body of a for loop or the then clause of an if statement has a single statement, should it be wrapped in a block? Doing so can help when pretty-printing the code, and permits putting a debugging breakpoint on the statement inside the condition
shouldPreserveExtras
{ "repo_name": "GoogleChromeLabs/chromeos_smart_card_connector", "path": "third_party/closure-compiler/src/src/com/google/javascript/jscomp/CodeConsumer.java", "license": "apache-2.0", "size": 10809 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,799,522
public boolean setReplication(String src, short replication) throws IOException { checkOpen(); try (TraceScope ignored = newPathTraceScope("setReplication", src)) { return namenode.setReplication(src, replication); } catch (RemoteException re) { throw re.unwrapRemoteException(AccessContr...
boolean function(String src, short replication) throws IOException { checkOpen(); try (TraceScope ignored = newPathTraceScope(STR, src)) { return namenode.setReplication(src, replication); } catch (RemoteException re) { throw re.unwrapRemoteException(AccessControlException.class, FileNotFoundException.class, SafeModeEx...
/** * Set replication for an existing file. * @param src file name * @param replication replication to set the file to * * @see ClientProtocol#setReplication(String, short) */
Set replication for an existing file
setReplication
{ "repo_name": "legend-hua/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "apache-2.0", "size": 109420 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.hdfs.protocol.DSQuotaExceededException", "org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException", "org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException", "org.apache.hadoop.hdfs.protocol.UnresolvedPathExcept...
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.QuotaByStorageTypeExceededException; import org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException; import org.apache.hadoop.hdfs.protocol.Unr...
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; import org.apache.htrace.core.*;
[ "java.io", "org.apache.hadoop", "org.apache.htrace" ]
java.io; org.apache.hadoop; org.apache.htrace;
550,074
private static void testComplexPrint() { System.out.println("testComplexPrint"); String code = "10 a=45:b$=\"hallo\"\n20printcos(a),sin(a+1)b$b$;\"du ,.-\",,,b$\n30print\"hallo\"+b$;SPC(0):print\"du!\""; Basic inter = new Basic(code); inter.compile(config); inter.run(config); }
static void function() { System.out.println(STR); String code = STRhallo\STRdu ,.-\STRhallo\STRdu!\""; Basic inter = new Basic(code); inter.compile(config); inter.run(config); }
/** * Test complex print. */
Test complex print
testComplexPrint
{ "repo_name": "EgonOlsen71/basicv2", "path": "src/test/java/com/sixtyfour/test/InterpreterTest.java", "license": "unlicense", "size": 7849 }
[ "com.sixtyfour.Basic" ]
import com.sixtyfour.Basic;
import com.sixtyfour.*;
[ "com.sixtyfour" ]
com.sixtyfour;
1,209,536
protected RemoteApplicationVM removeMember(InternalDistributedMember id) { Future future = null; synchronized (this.membersLock) { Map oldMembersMap = this.membersMap; if (oldMembersMap.containsKey(id)) { Map newMembersMap = new HashMap(oldMembersMap); future = (Future) newMembersM...
RemoteApplicationVM function(InternalDistributedMember id) { Future future = null; synchronized (this.membersLock) { Map oldMembersMap = this.membersMap; if (oldMembersMap.containsKey(id)) { Map newMembersMap = new HashMap(oldMembersMap); future = (Future) newMembersMap.remove(id); if (future != null) { this.membersMap...
/** * Removes and returns the representation of the application VM member of the distributed system * with the given <code>id</code>. */
Removes and returns the representation of the application VM member of the distributed system with the given <code>id</code>
removeMember
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteGfManagerAgent.java", "license": "apache-2.0", "size": 48674 }
[ "java.util.HashMap", "java.util.Map", "java.util.concurrent.CancellationException", "java.util.concurrent.ExecutionException", "java.util.concurrent.Future", "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import java.util.HashMap; import java.util.Map; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import java.util.*; import java.util.concurrent.*; import org.apache.geode.distributed.internal.membership.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
1,493,302
@Trivial static boolean isDeferredExpression(String expression, boolean mask) { final String methodName = "isDeferredExpression"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, methodName, new Object[] { (expression == null) ? null : mask ? OBFUSCATED...
static boolean isDeferredExpression(String expression, boolean mask) { final String methodName = STR; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, methodName, new Object[] { (expression == null) ? null : mask ? OBFUSCATED_STRING : expression, mask }); } boolean result = false; if (exp...
/** * Return whether the expression is an deferred EL expression. * * @param expression The expression to evaluate. * @param mask Set whether to mask the expression and result. Useful for when passwords might be * contained in either the expression or the result. ...
Return whether the expression is an deferred EL expression
isDeferredExpression
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/ELHelper.java", "license": "epl-1.0", "size": 22623 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent;
import com.ibm.websphere.ras.*;
[ "com.ibm.websphere" ]
com.ibm.websphere;
1,475,647
public Object execute(final Map<Object, Object> iArgs) { if (recordId == null) throw new OCommandExecutionException("Can't execute the command because it hasn't been parsed yet"); Set<ORID> result = new HashSet<ORID>(); if (classList == null || classList.equals("")) { for (String clusterName : dat...
Object function(final Map<Object, Object> iArgs) { if (recordId == null) throw new OCommandExecutionException(STR); Set<ORID> result = new HashSet<ORID>(); if (classList == null classList.equals(STRCLUSTER:STRCLUSTER:STRCLUSTER:".length()), result); } else { browseClass(clazz, result); } } } return result; }
/** * Execute the FIND REFERENCES. */
Execute the FIND REFERENCES
execute
{ "repo_name": "cloudsmith/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLFindReferences.java", "license": "apache-2.0", "size": 8212 }
[ "com.orientechnologies.orient.core.exception.OCommandExecutionException", "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import com.orientechnologies.orient.core.exception.OCommandExecutionException; import java.util.HashSet; import java.util.Map; import java.util.Set;
import com.orientechnologies.orient.core.exception.*; import java.util.*;
[ "com.orientechnologies.orient", "java.util" ]
com.orientechnologies.orient; java.util;
2,550,837
void clearClassCache() throws IOException;
void clearClassCache() throws IOException;
/** * Discard the class cache. Implicitly also discards the instance cache. * * @throws IOException if an error occurs */
Discard the class cache. Implicitly also discards the instance cache
clearClassCache
{ "repo_name": "dongjiaqiang/jboss-marshalling", "path": "api/src/main/java/org/jboss/marshalling/Unmarshaller.java", "license": "apache-2.0", "size": 3071 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,624,077
public void addEarDefault(EarConfig config) { _earDefaultList.add(config); }
void function(EarConfig config) { _earDefaultList.add(config); }
/** * Adds an ear default */
Adds an ear default
addEarDefault
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/server/webapp/WebAppContainer.java", "license": "gpl-2.0", "size": 32116 }
[ "com.caucho.server.e_app.EarConfig" ]
import com.caucho.server.e_app.EarConfig;
import com.caucho.server.e_app.*;
[ "com.caucho.server" ]
com.caucho.server;
2,027,528
public List<StringSearchResult> getStringList(boolean searchSteps, boolean searchDatabases, boolean searchNotes) { List<StringSearchResult> stringList = new ArrayList<StringSearchResult>(); if (searchSteps) { // Loop over all steps in the transformation and see what the used // vars are... for (i...
List<StringSearchResult> function(boolean searchSteps, boolean searchDatabases, boolean searchNotes) { List<StringSearchResult> stringList = new ArrayList<StringSearchResult>(); if (searchSteps) { for (int i = 0; i < nrJobEntries(); i++) { JobEntryCopy entryMeta = getJobEntry(i); stringList.add(new StringSearchResult(e...
/** * Get a list of all the strings used in this job. * * @return A list of StringSearchResult with strings used in the job */
Get a list of all the strings used in this job
getStringList
{ "repo_name": "soluvas/pdi-ce", "path": "src/org/pentaho/di/job/JobMeta.java", "license": "apache-2.0", "size": 84884 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.NotePadMeta", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.core.reflection.StringSearchResult", "org.pentaho.di.core.reflection.StringSearcher", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.job.entry.JobEntryCopy", ...
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.reflection.StringSearchResult; import org.pentaho.di.core.reflection.StringSearcher; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job....
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.reflection.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.entry.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
774,700
Isect ip; tmp.sub2(c, ray.P); double dot = Vec.dot(tmp, ray.D); double disc = (dot * dot) - Vec.dot(tmp, tmp) + r2; if (disc < 0.0) { return null; } disc = Math.sqrt(disc); double t = ((dot - disc) < mindiff) ? (dot + disc) : (dot - disc); if (...
Isect ip; tmp.sub2(c, ray.P); double dot = Vec.dot(tmp, ray.D); double disc = (dot * dot) - Vec.dot(tmp, tmp) + r2; if (disc < 0.0) { return null; } disc = Math.sqrt(disc); double t = ((dot - disc) < mindiff) ? (dot + disc) : (dot - disc); if (t < mindiff) { return null; } ip = new Isect(); ip.t = t; ip.enter = (Vec.do...
/** * Modified intersection method - creates _many_ less Vecs * @author The ProActive Team * @author The ProActive Team */
Modified intersection method - creates _many_ less Vecs
intersect
{ "repo_name": "acontes/programming", "path": "src/Examples/org/objectweb/proactive/examples/c3d/prim/Sphere.java", "license": "agpl-3.0", "size": 4226 }
[ "org.objectweb.proactive.examples.c3d.geom.Vec" ]
import org.objectweb.proactive.examples.c3d.geom.Vec;
import org.objectweb.proactive.examples.c3d.geom.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
1,970,101
private static String getFields() { return ID.get() + "," + NAME.get() + "," + FIRST_NAME.get() + "," + LAST_NAME.get() + "," + EMAIL.get() + "," + GENDER.get() + "," + BIRTHDAY.get(); }
static String function() { return ID.get() + "," + NAME.get() + "," + FIRST_NAME.get() + "," + LAST_NAME.get() + "," + EMAIL.get() + "," + GENDER.get() + "," + BIRTHDAY.get(); }
/** * Get the field needed to do a request to facebook * * @return a String with the needed field */
Get the field needed to do a request to facebook
getFields
{ "repo_name": "furkansahin/team-heart-coders-public", "path": "SwissAffinity/app/src/main/java/ch/epfl/sweng/swissaffinity/AboutActivity.java", "license": "mit", "size": 7852 }
[ "ch.epfl.sweng.swissaffinity.utilities.network.ServerTags" ]
import ch.epfl.sweng.swissaffinity.utilities.network.ServerTags;
import ch.epfl.sweng.swissaffinity.utilities.network.*;
[ "ch.epfl.sweng" ]
ch.epfl.sweng;
87,291
public org.cagrid.demo.photosharing.gallery.client.GalleryClient createGallery(java.lang.String galleryName) throws RemoteException, org.apache.axis.types.URI.MalformedURIException, org.cagrid.demo.photosharing.stubs.types.PhotoSharingException ;
org.cagrid.demo.photosharing.gallery.client.GalleryClient function(java.lang.String galleryName) throws RemoteException, org.apache.axis.types.URI.MalformedURIException, org.cagrid.demo.photosharing.stubs.types.PhotoSharingException ;
/** * Create a photo gallery * * @param galleryName * @throws PhotoSharingException * */
Create a photo gallery
createGallery
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/general/demos/ImageGallery/PhotoSharing/src/org/cagrid/demo/photosharing/common/PhotoSharingI.java", "license": "bsd-3-clause", "size": 1411 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
1,837,954
private boolean collectRemoteMethods(ClassDefinition interfaceDef, Hashtable table) { if (!interfaceDef.isInterface()) { throw new Error( "expected interface, not class: " + interfaceDef.getName()); } ...
boolean function(ClassDefinition interfaceDef, Hashtable table) { if (!interfaceDef.isInterface()) { throw new Error( STR + interfaceDef.getName()); } boolean errors = false; nextMember: for (MemberDefinition member = interfaceDef.getFirstMember(); member != null; member = member.getNextMember()) { if (member.isMethod(...
/** * Collect and validate all methods from given interface and all of * its superinterfaces as remote methods. Remote methods are added * to the supplied hashtable. Returns true if successful, * or false if an error occurred. */
Collect and validate all methods from given interface and all of its superinterfaces as remote methods. Remote methods are added to the supplied hashtable. Returns true if successful, or false if an error occurred
collectRemoteMethods
{ "repo_name": "andreagenso/java2scala", "path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/sun/rmi/rmic/RemoteClass.java", "license": "apache-2.0", "size": 35778 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,572,003
public void queryResult(long id, String to, String from, Serializable payload);
void function(long id, String to, String from, Serializable payload);
/** * Sends a query response for a queryGet or querySet. * * @param id the query identifier used to match requests with responses * @param to the client actor's JID * @param from the service actor's JID * @param payload the result payload */
Sends a query response for a queryGet or querySet
queryResult
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/bam/ActorStream.java", "license": "gpl-2.0", "size": 5082 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
703,887
protected String stop(String name, StringManager smClient) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); super.stop(printWriter, name, smClient); return stringWriter.toString(); }
String function(String name, StringManager smClient) { StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); super.stop(printWriter, name, smClient); return stringWriter.toString(); }
/** * Stop the host with the specified name. * * @param name Host name */
Stop the host with the specified name
stop
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.22/HTMLHostManagerServlet.java", "license": "mit", "size": 20199 }
[ "java.io.PrintWriter", "java.io.StringWriter", "org.apache.tomcat.util.res.StringManager" ]
import java.io.PrintWriter; import java.io.StringWriter; import org.apache.tomcat.util.res.StringManager;
import java.io.*; import org.apache.tomcat.util.res.*;
[ "java.io", "org.apache.tomcat" ]
java.io; org.apache.tomcat;
2,495,738
public Iterable<Block> getBlocks(){ //TODO: performance issue, must iterate through all blocks ArrayList<Block> blocks = new ArrayList<Block>(); for(RenderableBlock renderable : blockCanvas.getBlocks()){ blocks.add(Block.getBlock(renderable.getBlockID())); } return blocks; }
Iterable<Block> function(){ ArrayList<Block> blocks = new ArrayList<Block>(); for(RenderableBlock renderable : blockCanvas.getBlocks()){ blocks.add(Block.getBlock(renderable.getBlockID())); } return blocks; }
/** * Returns the set of all Blocks in the Workspace. * Includes all live blocks on all pages. Does NOT include: * (1) Factory blocks, * (2) dead blocks, * (3) or subset blocks. * If no blocks are found, it returns an empty set. * @return all the Blocks in the Workspace * ...
Returns the set of all Blocks in the Workspace. Includes all live blocks on all pages. Does NOT include: (1) Factory blocks, (2) dead blocks, (3) or subset blocks. If no blocks are found, it returns an empty set
getBlocks
{ "repo_name": "ajhalbleib/aicg", "path": "appinventor/blockslib/src/openblocks/workspace/Workspace.java", "license": "mit", "size": 31600 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,616,363
private boolean validOutputProperty(String name) { return (name.equals(OutputKeys.ENCODING) || name.equals(OutputKeys.METHOD) || name.equals(OutputKeys.INDENT) || name.equals(OutputKeys.DOCTYPE_PUBLIC) || name.equals(OutputKeys.DOCTYPE_SYSTEM) ...
boolean function(String name) { return (name.equals(OutputKeys.ENCODING) name.equals(OutputKeys.METHOD) name.equals(OutputKeys.INDENT) name.equals(OutputKeys.DOCTYPE_PUBLIC) name.equals(OutputKeys.DOCTYPE_SYSTEM) name.equals(OutputKeys.CDATA_SECTION_ELEMENTS) name.equals(OutputKeys.MEDIA_TYPE) name.equals(OutputKeys.OM...
/** * Verifies if a given output property name is a property defined in * the JAXP 1.1 / TrAX spec */
Verifies if a given output property name is a property defined in the JAXP 1.1 / TrAX spec
validOutputProperty
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java", "license": "gpl-2.0", "size": 56555 }
[ "com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory", "javax.xml.transform.OutputKeys" ]
import com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory; import javax.xml.transform.OutputKeys;
import com.sun.org.apache.xml.internal.serializer.*; import javax.xml.transform.*;
[ "com.sun.org", "javax.xml" ]
com.sun.org; javax.xml;
1,197,319
@Generated @Selector("scaleFactorY") public native double scaleFactorY();
@Selector(STR) native double function();
/** * [@property] scaleFactorY * <p> * The upsampling scale factor for the y dimension. The default value is 1. */
[@property] scaleFactorY The upsampling scale factor for the y dimension. The default value is 1
scaleFactorY
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSCNNUpsampling.java", "license": "apache-2.0", "size": 6395 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,892,801
@Test public void testPullRequest() throws Exception { Map<String, byte[]> expectedContents = new HashMap<String, byte[]>(); expectedContents.put("src/pages/modifyThis.page", contents.getBytes()); expectedContents.put("src/pages/modifyThis.page-meta.xml", contents.getBytes()); ...
void function() throws Exception { Map<String, byte[]> expectedContents = new HashMap<String, byte[]>(); expectedContents.put(STR, contents.getBytes()); expectedContents.put(STR, contents.getBytes()); expectedContents.put(STR, contents.getBytes()); expectedContents.put(STR, contents.getBytes()); String oldBranch = STR;...
/** * Test the ghprb constructor. * * @throws Exception */
Test the ghprb constructor
testPullRequest
{ "repo_name": "ronvelzeboer/salesforce-migration-assistant-plugin", "path": "src/test/java/org/jenkinsci/plugins/sma/SMAGitTest.java", "license": "mit", "size": 9709 }
[ "java.util.HashMap", "java.util.Map", "org.eclipse.jgit.api.CreateBranchCommand", "org.eclipse.jgit.api.Git", "org.junit.Assert" ]
import java.util.HashMap; import java.util.Map; import org.eclipse.jgit.api.CreateBranchCommand; import org.eclipse.jgit.api.Git; import org.junit.Assert;
import java.util.*; import org.eclipse.jgit.api.*; import org.junit.*;
[ "java.util", "org.eclipse.jgit", "org.junit" ]
java.util; org.eclipse.jgit; org.junit;
263,630
public static short LASHeader_GetCreationYear(LiblasLibrary.LASHeaderH hHeader) { return LASHeader_GetCreationYear(Pointer.getPeer(hHeader)); }
static short function(LiblasLibrary.LASHeaderH hHeader) { return LASHeader_GetCreationYear(Pointer.getPeer(hHeader)); }
/** * Returns the file creation year. This is a four digit number representing the <br> * year for the file, ie 2003, 2008, etc.<br> * @return the creation year for the file or 0 if none is set<br> * Original signature : <code>short LASHeader_GetCreationYear(const LASHeaderH)</code><br> * <i>native declara...
Returns the file creation year. This is a four digit number representing the year for the file, ie 2003, 2008, etc
LASHeader_GetCreationYear
{ "repo_name": "petvana/las-bridj", "path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java", "license": "bsd-3-clause", "size": 116212 }
[ "org.bridj.Pointer" ]
import org.bridj.Pointer;
import org.bridj.*;
[ "org.bridj" ]
org.bridj;
1,558,092
void clear(DocumentReference documentReference);
void clear(DocumentReference documentReference);
/** * Remove from the cache an icon set corresponding to a document in the wiki. * @param documentReference reference of the document */
Remove from the cache an icon set corresponding to a document in the wiki
clear
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-icon/xwiki-platform-icon-api/src/main/java/org/xwiki/icon/IconSetCache.java", "license": "lgpl-2.1", "size": 3337 }
[ "org.xwiki.model.reference.DocumentReference" ]
import org.xwiki.model.reference.DocumentReference;
import org.xwiki.model.reference.*;
[ "org.xwiki.model" ]
org.xwiki.model;
45,150
private void loadCategories() { CmsRpcAction<List<CmsCategoryTreeEntry>> action = new CmsRpcAction<List<CmsCategoryTreeEntry>>() {
void function() { CmsRpcAction<List<CmsCategoryTreeEntry>> action = new CmsRpcAction<List<CmsCategoryTreeEntry>>() {
/** * Loading all available categories.<p> */
Loading all available categories
loadCategories
{ "repo_name": "PatidarWeb/opencms-core", "path": "src-gwt/org/opencms/ade/galleries/client/CmsGalleryController.java", "license": "lgpl-2.1", "size": 59819 }
[ "java.util.List", "org.opencms.gwt.client.rpc.CmsRpcAction", "org.opencms.gwt.shared.CmsCategoryTreeEntry" ]
import java.util.List; import org.opencms.gwt.client.rpc.CmsRpcAction; import org.opencms.gwt.shared.CmsCategoryTreeEntry;
import java.util.*; import org.opencms.gwt.client.rpc.*; import org.opencms.gwt.shared.*;
[ "java.util", "org.opencms.gwt" ]
java.util; org.opencms.gwt;
2,150,704
private void clearOtherSubscriptions() { final HashSet<String> toRemove = new HashSet<>(); for (BlaubotChannel channel : channels.values()) { final ConcurrentSkipListSet<String> subscriptions = channel.getSubscriptions(); for (String subscriptionUniqueDeviceId : subscriptions...
void function() { final HashSet<String> toRemove = new HashSet<>(); for (BlaubotChannel channel : channels.values()) { final ConcurrentSkipListSet<String> subscriptions = channel.getSubscriptions(); for (String subscriptionUniqueDeviceId : subscriptions) { if (!subscriptionUniqueDeviceId.equals(ownUniqueDeviceId)) { to...
/** * Simply removes subscriptions from the channels that are not ours */
Simply removes subscriptions from the channels that are not ours
clearOtherSubscriptions
{ "repo_name": "Blaubot/Blaubot", "path": "blaubot/src/main/java/eu/hgross/blaubot/messaging/BlaubotChannelManager.java", "license": "mit", "size": 40705 }
[ "java.util.HashSet", "java.util.concurrent.ConcurrentSkipListSet" ]
import java.util.HashSet; import java.util.concurrent.ConcurrentSkipListSet;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,125,675
default AdvancedOlingo2EndpointConsumerBuilder pollStrategy( PollingConsumerPollStrategy pollStrategy) { doSetProperty("pollStrategy", pollStrategy); return this; }
default AdvancedOlingo2EndpointConsumerBuilder pollStrategy( PollingConsumerPollStrategy pollStrategy) { doSetProperty(STR, pollStrategy); return this; }
/** * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing * you to provide your custom implementation to control error handling * usually occurred during the poll operation before an Exchange have * been created and being routed in Camel. * * The o...
A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option is a: <code>org.apache.camel.spi.PollingConsumerPollStrategy</cod...
pollStrategy
{ "repo_name": "objectiser/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/Olingo2EndpointBuilderFactory.java", "license": "apache-2.0", "size": 61498 }
[ "org.apache.camel.spi.PollingConsumerPollStrategy" ]
import org.apache.camel.spi.PollingConsumerPollStrategy;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
1,858,357
public static Map<String, HealthCheck.Result> runHealthChecks() { return DEFAULT_REGISTRY.runHealthChecks(); }
static Map<String, HealthCheck.Result> function() { return DEFAULT_REGISTRY.runHealthChecks(); }
/** * Runs the registered health checks and returns a map of the results. * * @return a map of the health check results */
Runs the registered health checks and returns a map of the results
runHealthChecks
{ "repo_name": "b-cuts/esper", "path": "esper/src/main/java/com/espertech/esper/metrics/codahale_metrics/metrics/HealthChecks.java", "license": "gpl-2.0", "size": 1927 }
[ "com.espertech.esper.metrics.codahale_metrics.metrics.core.HealthCheck", "java.util.Map" ]
import com.espertech.esper.metrics.codahale_metrics.metrics.core.HealthCheck; import java.util.Map;
import com.espertech.esper.metrics.codahale_metrics.metrics.core.*; import java.util.*;
[ "com.espertech.esper", "java.util" ]
com.espertech.esper; java.util;
2,802,608
public static boolean doesSymbolTableContainMatrixObject(LocalVariableMap symbolTable, String variableName) { return (symbolTable != null && symbolTable.keySet().contains(variableName) && symbolTable.get(variableName) instanceof MatrixObject); }
static boolean function(LocalVariableMap symbolTable, String variableName) { return (symbolTable != null && symbolTable.keySet().contains(variableName) && symbolTable.get(variableName) instanceof MatrixObject); }
/** * Determine if the symbol table contains a MatrixObject with the given * variable name. * * @param symbolTable * the LocalVariableMap * @param variableName * the variable name * @return {@code true} if the variable in the symbol table is a * MatrixObject, {@code false...
Determine if the symbol table contains a MatrixObject with the given variable name
doesSymbolTableContainMatrixObject
{ "repo_name": "asurve/arvind-sysml2", "path": "src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java", "license": "apache-2.0", "size": 41918 }
[ "org.apache.sysml.runtime.controlprogram.LocalVariableMap", "org.apache.sysml.runtime.controlprogram.caching.MatrixObject" ]
import org.apache.sysml.runtime.controlprogram.LocalVariableMap; import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
import org.apache.sysml.runtime.controlprogram.*; import org.apache.sysml.runtime.controlprogram.caching.*;
[ "org.apache.sysml" ]
org.apache.sysml;
2,803,764
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "Ibrahim-Keyrouz/Outgoings", "path": "Outgoings/src/java/beans/Report.java", "license": "gpl-2.0", "size": 4761 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,205,311
@Override public boolean isVisible() { for (int i = 0; i < Graphics.size(); i++) { Object obj = Graphics.get(i); if (obj instanceof GraphicsObjectInterface) { GraphicsObjectInterface graphics = (GraphicsObjectInterface) obj; if (graphics.isVisible()) { return true; ...
boolean function() { for (int i = 0; i < Graphics.size(); i++) { Object obj = Graphics.get(i); if (obj instanceof GraphicsObjectInterface) { GraphicsObjectInterface graphics = (GraphicsObjectInterface) obj; if (graphics.isVisible()) { return true; } } else if (obj instanceof Shape3D obj instanceof BranchGroup) { Vertic...
/** * Returns "true" if it's visible at least one component * @return boolean */
Returns "true" if it's visible at least one component
isVisible
{ "repo_name": "SciGaP/seagrid-rich-client", "path": "src/main/java/cct/j3d/VerticesObject.java", "license": "apache-2.0", "size": 18319 }
[ "org.scijava.java3d.BranchGroup", "org.scijava.java3d.Shape3D" ]
import org.scijava.java3d.BranchGroup; import org.scijava.java3d.Shape3D;
import org.scijava.java3d.*;
[ "org.scijava.java3d" ]
org.scijava.java3d;
1,436,812
EAttribute getCopydata_To();
EAttribute getCopydata_To();
/** * Returns the meta object for the attribute '{@link org.etl.sparrow.Copydata#getTo <em>To</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>To</em>'. * @see org.etl.sparrow.Copydata#getTo() * @see #getCopydata() * @generated */
Returns the meta object for the attribute '<code>org.etl.sparrow.Copydata#getTo To</code>'.
getCopydata_To
{ "repo_name": "jpvelsamy/sparrow", "path": "org.etl.dsl.etl.Sparrow/src-gen/org/etl/sparrow/SparrowPackage.java", "license": "apache-2.0", "size": 104623 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,143,372
public void chmod(final int mask) throws IOException, InterruptedException { if (!isUnix() || mask == -1) { return; }
void function(final int mask) throws IOException, InterruptedException { if (!isUnix() mask == -1) { return; }
/** * Sets the file permission. * * On Windows, no-op. * * @param mask File permission mask. To simplify the permission copying, if * the parameter is -1, this method becomes no-op. * @since 1.303 * @see #mode() */
Sets the file permission. On Windows, no-op
chmod
{ "repo_name": "sap-production/hudson-3.x", "path": "hudson-core/src/main/java/hudson/FilePath.java", "license": "apache-2.0", "size": 77110 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,365,382
private Object[] resolveHandlerArguments(Method handlerMethod, Object handler, NativeWebRequest webRequest, Exception thrownException) throws Exception { Class<?>[] paramTypes = handlerMethod.getParameterTypes(); Object[] args = new Object[paramTypes.length]; Class<?> handlerType = handler.getClass(); fo...
Object[] function(Method handlerMethod, Object handler, NativeWebRequest webRequest, Exception thrownException) throws Exception { Class<?>[] paramTypes = handlerMethod.getParameterTypes(); Object[] args = new Object[paramTypes.length]; Class<?> handlerType = handler.getClass(); for (int i = 0; i < args.length; i++) { ...
/** * Resolves the arguments for the given method. Delegates to {@link #resolveCommonArgument}. */
Resolves the arguments for the given method. Delegates to <code>#resolveCommonArgument</code>
resolveHandlerArguments
{ "repo_name": "QBNemo/spring-mvc-showcase", "path": "src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java", "license": "apache-2.0", "size": 18007 }
[ "java.lang.reflect.Method", "org.springframework.core.GenericTypeResolver", "org.springframework.core.MethodParameter", "org.springframework.core.annotation.SynthesizingMethodParameter", "org.springframework.web.bind.support.WebArgumentResolver", "org.springframework.web.context.request.NativeWebRequest" ...
import java.lang.reflect.Method; import org.springframework.core.GenericTypeResolver; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.web.bind.support.WebArgumentResolver; import org.springframework.web.context.request.N...
import java.lang.reflect.*; import org.springframework.core.*; import org.springframework.core.annotation.*; import org.springframework.web.bind.support.*; import org.springframework.web.context.request.*;
[ "java.lang", "org.springframework.core", "org.springframework.web" ]
java.lang; org.springframework.core; org.springframework.web;
2,627,696
public static void setProvider(Provider provider) throws SecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new JodaTimePermission("DateTimeZone.setProvider")); } setProvider0(provider); }
static void function(Provider provider) throws SecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new JodaTimePermission(STR)); } setProvider0(provider); }
/** * Sets the zone provider factory. * <p> * The zone provider is a pluggable instance factory that supplies the * actual instances of DateTimeZone. * * @param provider provider to use, or null for default * @throws SecurityException if you do not have the permission DateTim...
Sets the zone provider factory. The zone provider is a pluggable instance factory that supplies the actual instances of DateTimeZone
setProvider
{ "repo_name": "redfish64/TinyTravelTracker", "path": "app/src/main/java/org/joda/time/DateTimeZone.java", "license": "gpl-3.0", "size": 52033 }
[ "org.joda.time.tz.Provider" ]
import org.joda.time.tz.Provider;
import org.joda.time.tz.*;
[ "org.joda.time" ]
org.joda.time;
2,577,353
@InterfaceAudience.Public interface Children2Callback extends AsyncCallback { public void processResult(int rc, String path, Object ctx, List<String> children, Stat stat); }
@InterfaceAudience.Public interface Children2Callback extends AsyncCallback { void function(int rc, String path, Object ctx, List<String> children, Stat stat); }
/** * Process the result of the asynchronous call. * See {@link org.apache.zookeeper.AsyncCallback.ChildrenCallback}. * * @param rc The return code or the result of the call. * @param path The path that we passed to asynchronous calls. * @param ctx Wh...
Process the result of the asynchronous call. See <code>org.apache.zookeeper.AsyncCallback.ChildrenCallback</code>
processResult
{ "repo_name": "kfirlevari/zookeeper", "path": "src/java/main/org/apache/zookeeper/AsyncCallback.java", "license": "apache-2.0", "size": 13386 }
[ "java.util.List", "org.apache.yetus.audience.InterfaceAudience", "org.apache.zookeeper.data.Stat" ]
import java.util.List; import org.apache.yetus.audience.InterfaceAudience; import org.apache.zookeeper.data.Stat;
import java.util.*; import org.apache.yetus.audience.*; import org.apache.zookeeper.data.*;
[ "java.util", "org.apache.yetus", "org.apache.zookeeper" ]
java.util; org.apache.yetus; org.apache.zookeeper;
132,231
public void handleCommand(VirtualGateway gateway, HmDatapoint dp, HmDatapointConfig dpConfig, Object value) throws IOException, HomematicClientException;
void function(VirtualGateway gateway, HmDatapoint dp, HmDatapointConfig dpConfig, Object value) throws IOException, HomematicClientException;
/** * Handles the special functionality for the given virtual datapoint. */
Handles the special functionality for the given virtual datapoint
handleCommand
{ "repo_name": "mvolaart/openhab2-addons", "path": "addons/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/virtual/VirtualDatapointHandler.java", "license": "epl-1.0", "size": 2087 }
[ "java.io.IOException", "org.openhab.binding.homematic.internal.misc.HomematicClientException", "org.openhab.binding.homematic.internal.model.HmDatapoint", "org.openhab.binding.homematic.internal.model.HmDatapointConfig" ]
import java.io.IOException; import org.openhab.binding.homematic.internal.misc.HomematicClientException; import org.openhab.binding.homematic.internal.model.HmDatapoint; import org.openhab.binding.homematic.internal.model.HmDatapointConfig;
import java.io.*; import org.openhab.binding.homematic.internal.misc.*; import org.openhab.binding.homematic.internal.model.*;
[ "java.io", "org.openhab.binding" ]
java.io; org.openhab.binding;
1,893,821
public Set<String> getRuleClassNames() { return ruleClassMap.keySet(); }
Set<String> function() { return ruleClassMap.keySet(); }
/** * Returns the (immutable, unordered) set of names of all the known rule classes. */
Returns the (immutable, unordered) set of names of all the known rule classes
getRuleClassNames
{ "repo_name": "mikelalcon/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java", "license": "apache-2.0", "size": 15409 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,248,836
EClass getBaseRequestType();
EClass getBaseRequestType();
/** * Returns the meta object for class '{@link net.opengis.wfs20.BaseRequestType <em>Base Request Type</em>}'. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @return the meta object for class '<em>Base Request Type</em>'. * @see net.opengis.wfs20.BaseRequestType * @generated */
Returns the meta object for class '<code>net.opengis.wfs20.BaseRequestType Base Request Type</code>'.
getBaseRequestType
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java", "license": "lgpl-2.1", "size": 404067 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,181,378
protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SetType_id_feature"), getString("_UI_PropertyDescriptor_description", "_...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), LanguagePackage.Literals.SET_TYPE__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_I...
/** * This adds a property descriptor for the Id feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Id feature.
addIdPropertyDescriptor
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/org/w3/_2001/smil20/language/provider/SetTypeItemProvider.java", "license": "apache-2.0", "size": 255549 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.w3._2001.smil20.language.LanguagePackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.w3._2001.smil20.language.LanguagePackage;
import org.eclipse.emf.edit.provider.*; import org.w3.*;
[ "org.eclipse.emf", "org.w3" ]
org.eclipse.emf; org.w3;
2,134,433
public SQLException getConnectionCloseException(){ if(getPersistenceException() != null) { return getPersistenceException().getConnectionCloseException(); } return null; }
SQLException function(){ if(getPersistenceException() != null) { return getPersistenceException().getConnectionCloseException(); } return null; }
/** * If the wrapped exception is a PersistenceException, then this * method returns getPersistenceException().getConnectionCloseException(); * Else it returns null; * @return The connection close connection of the wrapped PersistenceException or null. */
If the wrapped exception is a PersistenceException, then this method returns getPersistenceException().getConnectionCloseException(); Else it returns null
getConnectionCloseException
{ "repo_name": "takezoux2/ButterflyPersistence-expands", "path": "src/main/java/com/jenkov/db/itf/PersistenceExceptionUnchecked.java", "license": "apache-2.0", "size": 2979 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
316,367
public void markMoveTargets(String nodeId) throws PortalException { throw new UnsupportedOperationException("Use an appropriate " + "processor for adding targets."); }
void function(String nodeId) throws PortalException { throw new UnsupportedOperationException(STR + STR); }
/** * Unsupported operation in DLM. This feature is handled by pluggable * processors in the DLM processing pipe. See properties/dlmContext.xml. */
Unsupported operation in DLM. This feature is handled by pluggable processors in the DLM processing pipe. See properties/dlmContext.xml
markMoveTargets
{ "repo_name": "MichaelVose2/uPortal", "path": "uportal-war/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java", "license": "apache-2.0", "size": 63162 }
[ "org.apereo.portal.PortalException" ]
import org.apereo.portal.PortalException;
import org.apereo.portal.*;
[ "org.apereo.portal" ]
org.apereo.portal;
2,460,477
public static void accountAndContainerNamePreconditionCheck(RestRequest restRequest) throws RestServiceException { String accountNameFromHeader = getHeader(restRequest.getArgs(), Headers.TARGET_ACCOUNT_NAME, false); String containerNameFromHeader = getHeader(restRequest.getArgs(), Headers.TARGET_CONTAINER_NAM...
static void function(RestRequest restRequest) throws RestServiceException { String accountNameFromHeader = getHeader(restRequest.getArgs(), Headers.TARGET_ACCOUNT_NAME, false); String containerNameFromHeader = getHeader(restRequest.getArgs(), Headers.TARGET_CONTAINER_NAME, false); if (accountNameFromHeader != null) { A...
/** * Check preconditions for request if the {@code restRequest} contains the target account and container. * @param restRequest the {@link RestRequest} that contains the {@link Account} and {@link Container} details. * @throws RestServiceException if preconditions check failed. */
Check preconditions for request if the restRequest contains the target account and container
accountAndContainerNamePreconditionCheck
{ "repo_name": "linkedin/ambry", "path": "ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java", "license": "apache-2.0", "size": 54119 }
[ "com.github.ambry.account.Account", "com.github.ambry.account.Container" ]
import com.github.ambry.account.Account; import com.github.ambry.account.Container;
import com.github.ambry.account.*;
[ "com.github.ambry" ]
com.github.ambry;
1,995,254
public DateTime getDateTime();
DateTime function();
/** * Retrieve the system time as a Joda DateTime object. * * @return - DateTime - a Joda DateTime object that contains the system time. */
Retrieve the system time as a Joda DateTime object
getDateTime
{ "repo_name": "yuweijun/learning-programming", "path": "java-libs/src/main/java/com/example/lib/joda/SystemClock.java", "license": "mit", "size": 2034 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,975,613
public static List<Category> getCategories(Context context, boolean fromDatabase) { if (null == mCategories || fromDatabase) { mCategories = loadCategories(context); } return mCategories; }
static List<Category> function(Context context, boolean fromDatabase) { if (null == mCategories fromDatabase) { mCategories = loadCategories(context); } return mCategories; }
/** * Gets all categories with their quizzes. * * @param context The context this is running in. * @param fromDatabase <code>true</code> if a data refresh is needed, else <code>false</code>. * @return All categories stored in the database. */
Gets all categories with their quizzes
getCategories
{ "repo_name": "Dunkin53000/ToutStade", "path": "app/src/main/java/com/google/samples/apps/topeka/persistence/TopekaDatabaseHelper.java", "license": "apache-2.0", "size": 20394 }
[ "android.content.Context", "com.google.samples.apps.topeka.model.Category", "java.util.List" ]
import android.content.Context; import com.google.samples.apps.topeka.model.Category; import java.util.List;
import android.content.*; import com.google.samples.apps.topeka.model.*; import java.util.*;
[ "android.content", "com.google.samples", "java.util" ]
android.content; com.google.samples; java.util;
2,199,905
public static boolean checkName(final String basePath, final String path, final NameScope scope) { if (scope == NameScope.FILE_SYSTEM) { // All good return true; } if (!path.startsWith(basePath)) { return false; } int baseLen = basePath.l...
static boolean function(final String basePath, final String path, final NameScope scope) { if (scope == NameScope.FILE_SYSTEM) { return true; } if (!path.startsWith(basePath)) { return false; } int baseLen = basePath.length(); if (VFS.isUriStyle()) { baseLen--; } if (scope == NameScope.CHILD) { if (path.length() == bas...
/** * Checks whether a path fits in a particular scope of another path. * * @param basePath An absolute, normalised path. * @param path An absolute, normalised path. * @param scope The NameScope. * @return true if the path fits in the scope, false otherwise. */
Checks whether a path fits in a particular scope of another path
checkName
{ "repo_name": "svn2github/commons-vfs2", "path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java", "license": "apache-2.0", "size": 15096 }
[ "org.apache.commons.vfs2.NameScope", "org.apache.commons.vfs2.VFS" ]
import org.apache.commons.vfs2.NameScope; import org.apache.commons.vfs2.VFS;
import org.apache.commons.vfs2.*;
[ "org.apache.commons" ]
org.apache.commons;
2,627,933
public List<Estado> consultarEstados(){ List<Estado> estados = em.createQuery("Select e from Estado e").getResultList(); return estados; }
List<Estado> function(){ List<Estado> estados = em.createQuery(STR).getResultList(); return estados; }
/** * Obtiene todos los estados desde la BD y los retorna en un List de tipo Estado. * @return List de Tipo ESTADO. */
Obtiene todos los estados desde la BD y los retorna en un List de tipo Estado
consultarEstados
{ "repo_name": "ASDFFDFASD/Biblioteca", "path": "src/model/EstadoModelo.java", "license": "mit", "size": 2686 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,055,280
public Collection<Callsite> getCallsitesInFunction() { if (callsitesInFunction != null) { return callsitesInFunction; } else { return ImmutableList.of(); } }
Collection<Callsite> function() { if (callsitesInFunction != null) { return callsitesInFunction; } else { return ImmutableList.of(); } }
/** * Returns the callsites in this function. */
Returns the callsites in this function
getCallsitesInFunction
{ "repo_name": "zombiezen/cardcpx", "path": "third_party/closure-compiler/src/com/google/javascript/jscomp/CallGraph.java", "license": "apache-2.0", "size": 23961 }
[ "com.google.common.collect.ImmutableList", "java.util.Collection" ]
import com.google.common.collect.ImmutableList; import java.util.Collection;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,665,789
@RequestMapping("/jsonObject") public @ResponseBody Integer jsonObjectTest(){ return new Integer(5); }
@RequestMapping(STR) @ResponseBody Integer function(){ return new Integer(5); }
/** * json object test */
json object test
jsonObjectTest
{ "repo_name": "coder-huang/spring-integration", "path": "spring-hibernate/src/main/java/com/spring/demo/DemoController.java", "license": "gpl-3.0", "size": 921 }
[ "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.ResponseBody" ]
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
[ "org.springframework.web" ]
org.springframework.web;
2,838,366
public void testConvertStringLocaleNull() { Object result = null; try { result = LocaleConvertUtils.convert("123", Integer.class, (Locale)null, "#,###"); } catch (final Exception e) { e.printStackTrace(); fail("Threw: " + e); } assertNotNul...
void function() { Object result = null; try { result = LocaleConvertUtils.convert("123", Integer.class, (Locale)null, "#,###"); } catch (final Exception e) { e.printStackTrace(); fail(STR + e); } assertNotNull(STR, result); assertEquals(STR, Integer.class, result.getClass()); assertEquals(STR, new Integer(123), result)...
/** * Test conversion of a String using a Locale and pattern. */
Test conversion of a String using a Locale and pattern
testConvertStringLocaleNull
{ "repo_name": "mohanaraosv/commons-beanutils", "path": "src/test/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsTestCase.java", "license": "apache-2.0", "size": 24767 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
253,065
public Object tryEscape(Object contents) { if (contents instanceof CharSequence) { return escapeXml(contents.toString()); } return contents; }
Object function(Object contents) { if (contents instanceof CharSequence) { return escapeXml(contents.toString()); } return contents; }
/** * Escapes the string representation of the supplied object if it derives from {@link java.lang.CharSequence}, * otherwise returns the object itself. * @param contents an object to be escaped for XML * @return an escaped string, or the object itself */
Escapes the string representation of the supplied object if it derives from <code>java.lang.CharSequence</code>, otherwise returns the object itself
tryEscape
{ "repo_name": "apache/incubator-groovy", "path": "subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java", "license": "apache-2.0", "size": 19229 }
[ "groovy.xml.XmlUtil" ]
import groovy.xml.XmlUtil;
import groovy.xml.*;
[ "groovy.xml" ]
groovy.xml;
2,608,816
public DeterministicKey deriveNextChild(ImmutableList<ChildNumber> parentPath, boolean relative, boolean createParent, boolean privateDerivation) { DeterministicKey parent = get(parentPath, relative, createParent); int nAttempts = 0; while (nAttempts++ < MAX_CHILD_DERIVATION_ATTEMPTS) { ...
DeterministicKey function(ImmutableList<ChildNumber> parentPath, boolean relative, boolean createParent, boolean privateDerivation) { DeterministicKey parent = get(parentPath, relative, createParent); int nAttempts = 0; while (nAttempts++ < MAX_CHILD_DERIVATION_ATTEMPTS) { try { ChildNumber createChildNumber = getNextC...
/** * Extends the tree by calculating the next key that hangs off the given parent path. For example, if you pass a * path of 1/2 here and there are already keys 1/2/1 and 1/2/2 then it will derive 1/2/3. * * @param parentPath the path to the parent * @param relative whether the path is relativ...
Extends the tree by calculating the next key that hangs off the given parent path. For example, if you pass a path of 1/2 here and there are already keys 1/2/1 and 1/2/2 then it will derive 1/2/3
deriveNextChild
{ "repo_name": "pavel4n/wowdoge.org", "path": "core/src/main/java/com/google/dogecoin/crypto/DeterministicHierarchy.java", "license": "apache-2.0", "size": 7736 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,319,296
public void loadFile(String path, double minSupRelative) throws IOException { String thisLine; BufferedReader myInput = null; try { FileInputStream fin = new FileInputStream(new File(path)); myInput = new BufferedReader(new InputStreamReader(fin)); int seq...
void function(String path, double minSupRelative) throws IOException { String thisLine; BufferedReader myInput = null; try { FileInputStream fin = new FileInputStream(new File(path)); myInput = new BufferedReader(new InputStreamReader(fin)); int sequenceID=1; while ((thisLine = myInput.readLine()) != null) { if (thisLi...
/** * From a file located at the given string path, we create a database * composed of a list of sequences * * @param path File path where we have the database * @param minSupRelative relative Minimum support * @throws IOException */
From a file located at the given string path, we create a database composed of a list of sequences
loadFile
{ "repo_name": "redaaz/GrammarInduction", "path": "Inducer/src/spm/clospan/SequenceDatabase.java", "license": "gpl-3.0", "size": 8211 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader", "java.util.HashSet", "java.util.Set" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashSet; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
51,166
ServiceFuture<Void> paramEnumAsync(String scenario, final ServiceCallback<Void> serviceCallback);
ServiceFuture<Void> paramEnumAsync(String scenario, final ServiceCallback<Void> serviceCallback);
/** * Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null. * * @param scenario Send a post request with header values "scenario": "valid" or "null" or "empty" * @param serviceCallback the async ServiceCallback to handle successful and fail...
Send a post request with header values "scenario": "valid", "value": "GREY" or "scenario": "null", "value": null
paramEnumAsync
{ "repo_name": "anudeepsharma/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/header/Headers.java", "license": "mit", "size": 53377 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,768,958
private int readBytesFormBuffer(byte[] buffer, int start, int bytesToRead) throws IOException { int sample = 0; int bytesRead = 0; while(bytesRead < bytesToRead) { //read left channel sample = readSample(); if(reduceChannels) { //there ...
int function(byte[] buffer, int start, int bytesToRead) throws IOException { int sample = 0; int bytesRead = 0; while(bytesRead < bytesToRead) { sample = readSample(); if(reduceChannels) { sample += readSample(); if(sample > 32767) sample = 32767; if(sample < -32768) sample = -32768; } if(pos < bytesInBuffer) { buffer[...
/** * This method computes the reduced samples form the input buffer and stores * them at the given position in the specified output buffer. If necessary the * input buffer will be refilled. * * @param buffer byte[] output buffer to store the reduce stream * @param start int current write positi...
This method computes the reduced samples form the input buffer and stores them at the given position in the specified output buffer. If necessary the input buffer will be refilled
readBytesFormBuffer
{ "repo_name": "AlpenDitrix/SemIII", "path": "AudioRecorder/src/comirva/audio/util/ReducedAudioInputStream.java", "license": "mit", "size": 14728 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,211,321
public void removeIgnoredView(View v) { mViewAbove.removeIgnoredView(v); }
void function(View v) { mViewAbove.removeIgnoredView(v); }
/** * Remove a View ignored by the Touch Down event when mode is Fullscreen * * @param v a view not wanted to be ignored anymore */
Remove a View ignored by the Touch Down event when mode is Fullscreen
removeIgnoredView
{ "repo_name": "evildoerX/weex-ouikit", "path": "platforms/android/farwolf/src/main/java/com/farwolf/view/sildmenu/SlidingMenu.java", "license": "mit", "size": 28664 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
7,675
registry = new Registry(); ff.put(APP, "FF"); p1 = RemoteProxyFactory.getNewBasicRemoteProxy(ff, "http://machine1:4444",registry); registry.add(p1); Map<String, Object> cap = new HashMap<String, Object>(); cap.put(APP, "FF"); request = new MockedNewSessionRequestHandler(registry, cap); // use all the ...
registry = new Registry(); ff.put(APP, "FF"); p1 = RemoteProxyFactory.getNewBasicRemoteProxy(ff, STRFF"); request = new MockedNewSessionRequestHandler(registry, cap); MockedRequestHandler newSessionRequest = new MockedRequestHandler(registry); newSessionRequest.setRequestType(RequestType.START_SESSION); newSessionReque...
/** * create a hub with 1 node accepting 1 FF * * @throws InterruptedException */
create a hub with 1 node accepting 1 FF
setup
{ "repo_name": "akiellor/selenium", "path": "java/server/test/org/openqa/grid/internal/AddingProxyAgainFreesResources.java", "license": "apache-2.0", "size": 2469 }
[ "org.junit.Assert", "org.openqa.grid.internal.mock.MockedNewSessionRequestHandler", "org.openqa.grid.internal.mock.MockedRequestHandler", "org.openqa.grid.web.servlet.handler.RequestType" ]
import org.junit.Assert; import org.openqa.grid.internal.mock.MockedNewSessionRequestHandler; import org.openqa.grid.internal.mock.MockedRequestHandler; import org.openqa.grid.web.servlet.handler.RequestType;
import org.junit.*; import org.openqa.grid.internal.mock.*; import org.openqa.grid.web.servlet.handler.*;
[ "org.junit", "org.openqa.grid" ]
org.junit; org.openqa.grid;
1,454,907
@Nullable public List<HttpMethod> checkHttpMethod(@Nullable HttpMethod requestMethod) { if (requestMethod == null) { return null; } if (this.resolvedMethods == null) { return Collections.singletonList(requestMethod); } return (this.resolvedMethods.contains(requestMethod) ? this.resolvedMethods : nul...
List<HttpMethod> function(@Nullable HttpMethod requestMethod) { if (requestMethod == null) { return null; } if (this.resolvedMethods == null) { return Collections.singletonList(requestMethod); } return (this.resolvedMethods.contains(requestMethod) ? this.resolvedMethods : null); }
/** * Check the HTTP request method (or the method from the * {@code Access-Control-Request-Method} header on a pre-flight request) * against the configured allowed methods. * @param requestMethod the HTTP request method to check * @return the list of HTTP methods to list in the response of a pre-flight * r...
Check the HTTP request method (or the method from the Access-Control-Request-Method header on a pre-flight request) against the configured allowed methods
checkHttpMethod
{ "repo_name": "spring-projects/spring-framework", "path": "spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java", "license": "apache-2.0", "size": 23895 }
[ "java.util.Collections", "java.util.List", "org.springframework.http.HttpMethod", "org.springframework.lang.Nullable" ]
import java.util.Collections; import java.util.List; import org.springframework.http.HttpMethod; import org.springframework.lang.Nullable;
import java.util.*; import org.springframework.http.*; import org.springframework.lang.*;
[ "java.util", "org.springframework.http", "org.springframework.lang" ]
java.util; org.springframework.http; org.springframework.lang;
1,309,489
private void loadMappingFromXMLReader(HashMap map, boolean packageIsKey) throws BuildException { try { QName parentElement = null; //if the reader is in the fragment that deals with package to namespace mappings while (mapXmlReader.hasNext()) { ...
void function(HashMap map, boolean packageIsKey) throws BuildException { try { QName parentElement = null; while (mapXmlReader.hasNext()) { switch (mapXmlReader.next()) { case XMLStreamConstants.START_ELEMENT : QName qname = mapXmlReader.getName(); if (MAPPING.equals(qname) && parentElement.equals(PKG2NS_MAPPINGS)) { m...
/** * load from an xml reader containing mapping info * @return a properties file with zero or more mappings * @throws BuildException if the load failed */
load from an xml reader containing mapping info
loadMappingFromXMLReader
{ "repo_name": "apache/axis2-java", "path": "modules/tool/axis2-ant-plugin/src/main/java/org/apache/ws/java2wsdl/NamespaceMapping.java", "license": "apache-2.0", "size": 8963 }
[ "java.util.HashMap", "javax.xml.namespace.QName", "javax.xml.stream.XMLStreamConstants", "org.apache.tools.ant.BuildException" ]
import java.util.HashMap; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamConstants; import org.apache.tools.ant.BuildException;
import java.util.*; import javax.xml.namespace.*; import javax.xml.stream.*; import org.apache.tools.ant.*;
[ "java.util", "javax.xml", "org.apache.tools" ]
java.util; javax.xml; org.apache.tools;
929,769
private Value createExcerpt(NodeId id) { if (excerptProvider == null) { return null; } try { long time = System.currentTimeMillis(); String excerpt = excerptProvider.getExcerpt(id, 3, 150); time = System.currentT...
Value function(NodeId id) { if (excerptProvider == null) { return null; } try { long time = System.currentTimeMillis(); String excerpt = excerptProvider.getExcerpt(id, 3, 150); time = System.currentTimeMillis() - time; log.debug(STR, time); if (excerpt != null) { return valueFactory.createValue(excerpt); } else { retur...
/** * Creates an excerpt for node with the given <code>id</code>. * * @param id a node id. * @return a StringValue or <code>null</code> if the excerpt cannot be * created or an error occurs. */
Creates an excerpt for node with the given <code>id</code>
createExcerpt
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RowIteratorImpl.java", "license": "apache-2.0", "size": 27684 }
[ "java.io.IOException", "javax.jcr.Value", "org.apache.jackrabbit.core.id.NodeId" ]
import java.io.IOException; import javax.jcr.Value; import org.apache.jackrabbit.core.id.NodeId;
import java.io.*; import javax.jcr.*; import org.apache.jackrabbit.core.id.*;
[ "java.io", "javax.jcr", "org.apache.jackrabbit" ]
java.io; javax.jcr; org.apache.jackrabbit;
734,616
@Override public ResourceLocator getResourceLocator() { return TypesEditPlugin.INSTANCE; }
ResourceLocator function() { return TypesEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/DomainItemProvider.java", "license": "epl-1.0", "size": 4906 }
[ "org.eclipse.emf.common.util.ResourceLocator" ]
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
473,309
public void unregisterFullOutline(TexOutlineTreeView view) { this.fullOutline = null; }
void function(TexOutlineTreeView view) { this.fullOutline = null; }
/** * unregister the full outline if the view is closed. * @param view the view. */
unregister the full outline if the view is closed
unregisterFullOutline
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/editor/TexEditor.java", "license": "epl-1.0", "size": 12485 }
[ "net.sourceforge.texlipse.treeview.views.TexOutlineTreeView" ]
import net.sourceforge.texlipse.treeview.views.TexOutlineTreeView;
import net.sourceforge.texlipse.treeview.views.*;
[ "net.sourceforge.texlipse" ]
net.sourceforge.texlipse;
206,212
public ApiResponse<Void> deleteItemWithHttpInfo(String authorization, UUID companyId, String code, String avalaraProductType) throws ApiException { com.squareup.okhttp.Call call = deleteItemValidateBeforeCall(authorization, companyId, code, avalaraProductType, null, null); return apiClient.execute(c...
ApiResponse<Void> function(String authorization, UUID companyId, String code, String avalaraProductType) throws ApiException { com.squareup.okhttp.Call call = deleteItemValidateBeforeCall(authorization, companyId, code, avalaraProductType, null, null); return apiClient.execute(call); }
/** * * Delete Item * @param authorization Bearer {auth} (required) * @param companyId Company ID (required) * @param code Item Code (required) * @param avalaraProductType Avalara Product Type (required) * @return ApiResponse&lt;Void&gt; * @throws ApiException If fail to call th...
Delete Item
deleteItemWithHttpInfo
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/api/CompanyItemGoodsApi.java", "license": "gpl-3.0", "size": 50394 }
[ "io.swagger.client.ApiException", "io.swagger.client.ApiResponse" ]
import io.swagger.client.ApiException; import io.swagger.client.ApiResponse;
import io.swagger.client.*;
[ "io.swagger.client" ]
io.swagger.client;
1,834,622
public static EnumIterator createIterator(List objects, QName objectQName, InputStream wsddInput) throws Exception { File tempSerializationDir = new File(Utils.getCaGridUserHome().getAbsolutePath(), SERIALIZATION_DIRECTORY); if (!tempSerializationDir.exists()) { tempSerializationDir.mkdirs(); } return cre...
static EnumIterator function(List objects, QName objectQName, InputStream wsddInput) throws Exception { File tempSerializationDir = new File(Utils.getCaGridUserHome().getAbsolutePath(), SERIALIZATION_DIRECTORY); if (!tempSerializationDir.exists()) { tempSerializationDir.mkdirs(); } return createIterator(objects, object...
/** * Serializes a List of serializable objects to a temp file on * the local disk, then creates an EnumIterator which can return * those objects. * * <b><i>NOTE:</b></i> The temp file is created in the current user's * home directory /.cagrid/SimplePersistantObjectIterator directory. * For securit...
Serializes a List of serializable objects to a temp file on the local disk, then creates an EnumIterator which can return those objects. home directory /.cagrid/SimplePersistantObjectIterator directory. For security reasons, access to this location must be controlled in a production data environment
createIterator
{ "repo_name": "NCIP/cagrid-core", "path": "caGrid/projects/wsEnum/src/java/utils/gov/nih/nci/cagrid/wsenum/utils/SimplePersistantObjectIterator.java", "license": "bsd-3-clause", "size": 6548 }
[ "gov.nih.nci.cagrid.common.Utils", "java.io.File", "java.io.InputStream", "java.util.List", "javax.xml.namespace.QName", "org.globus.ws.enumeration.EnumIterator" ]
import gov.nih.nci.cagrid.common.Utils; import java.io.File; import java.io.InputStream; import java.util.List; import javax.xml.namespace.QName; import org.globus.ws.enumeration.EnumIterator;
import gov.nih.nci.cagrid.common.*; import java.io.*; import java.util.*; import javax.xml.namespace.*; import org.globus.ws.enumeration.*;
[ "gov.nih.nci", "java.io", "java.util", "javax.xml", "org.globus.ws" ]
gov.nih.nci; java.io; java.util; javax.xml; org.globus.ws;
947,517
public void removeNoSubclassDependency(RVMClass source) { noSubclassHash.remove(source); }
void function(RVMClass source) { noSubclassHash.remove(source); }
/** * Delete all NoSubclass dependencies on the argument RVMClass */
Delete all NoSubclass dependencies on the argument RVMClass
removeNoSubclassDependency
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/inlining/InvalidationDatabase.java", "license": "epl-1.0", "size": 6013 }
[ "org.jikesrvm.classloader.RVMClass" ]
import org.jikesrvm.classloader.RVMClass;
import org.jikesrvm.classloader.*;
[ "org.jikesrvm.classloader" ]
org.jikesrvm.classloader;
2,205,121
Collection<QName> getProperties(QName model);
Collection<QName> getProperties(QName model);
/** * Get all properties for the specified model * * @param model QName * @return Collection<QName> */
Get all properties for the specified model
getProperties
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/data-model/source/java/org/alfresco/service/cmr/dictionary/DictionaryService.java", "license": "lgpl-3.0", "size": 10139 }
[ "java.util.Collection", "org.alfresco.service.namespace.QName" ]
import java.util.Collection; import org.alfresco.service.namespace.QName;
import java.util.*; import org.alfresco.service.namespace.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
1,667,470
maintainers.clear(); File mainfile = new File("servers/" + hostname + ".txt"); if (!mainfile.exists()) { return false; } String first, last, email, cell, irc; try { Scanner reader = new Scanner(mainfile); while (reader.hasNextLine()) { ...
maintainers.clear(); File mainfile = new File(STR + hostname + ".txt"); if (!mainfile.exists()) { return false; } String first, last, email, cell, irc; try { Scanner reader = new Scanner(mainfile); while (reader.hasNextLine()) { try { first = reader.nextLine().substring(2); last = reader.nextLine().substring(2); email ...
/** Fetch Maintainers from server files * * @return true if success, false if failed */
Fetch Maintainers from server files
fetchMaintainers
{ "repo_name": "jrddunbr/management-server", "path": "src/org/ja/ServerItem.java", "license": "mit", "size": 4944 }
[ "java.io.File", "java.util.Scanner" ]
import java.io.File; import java.util.Scanner;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,268,986
default boolean isVarargs() { return Modifier.isTransient(getModifiers()); }
default boolean isVarargs() { return Modifier.isTransient(getModifiers()); }
/** * Since we do not have direct access to the Varargs flag, we use the transient flag (that has * the same value). */
Since we do not have direct access to the Varargs flag, we use the transient flag (that has the same value)
isVarargs
{ "repo_name": "smarr/Truffle", "path": "espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/meta/ModifiersProvider.java", "license": "gpl-2.0", "size": 4196 }
[ "java.lang.reflect.Modifier" ]
import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,643,436
return workflowContext; } /** * Sets the value of the workflowContext property. * * @param value * allowed object is * {@link WorkflowContextType }
return workflowContext; } /** * Sets the value of the workflowContext property. * * @param value * allowed object is * {@link WorkflowContextType }
/** * Gets the value of the workflowContext property. * * @return * possible object is * {@link WorkflowContextType } * */
Gets the value of the workflowContext property
getWorkflowContext
{ "repo_name": "wuhaining/-wuhaining.github.io", "path": "ApplicationTest/bpmWebService/src/com/task/services/types/TaskServiceContextTaskBaseType.java", "license": "gpl-3.0", "size": 2558 }
[ "oracle.bpel.services.workflow.common.model.WorkflowContextType" ]
import oracle.bpel.services.workflow.common.model.WorkflowContextType;
import oracle.bpel.services.workflow.common.model.*;
[ "oracle.bpel.services" ]
oracle.bpel.services;
1,362,934
@Generated @CVariable() @MappedReturn(ObjCStringMapper.class) public static native String UIFontWidthTrait();
@CVariable() @MappedReturn(ObjCStringMapper.class) static native String function();
/** * This key is used with a trait dictionary to get the relative inter-glyph spacing value as an NSNumber. The valid value range is from -1.0 to 1.0. The value of 0.0 corresponds to the regular glyph spacing. */
This key is used with a trait dictionary to get the relative inter-glyph spacing value as an NSNumber. The valid value range is from -1.0 to 1.0. The value of 0.0 corresponds to the regular glyph spacing
UIFontWidthTrait
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/c/UIKit.java", "license": "apache-2.0", "size": 134869 }
[ "org.moe.natj.c.ann.CVariable", "org.moe.natj.general.ann.MappedReturn", "org.moe.natj.objc.map.ObjCStringMapper" ]
import org.moe.natj.c.ann.CVariable; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.map.ObjCStringMapper;
import org.moe.natj.c.ann.*; import org.moe.natj.general.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
1,741,604
boolean setVehicle(Entity entity);
boolean setVehicle(Entity entity);
/** * Sets the vehicle entity(the entity that is ridden by this one). * * @param entity The entity vehicle * @return True if the set was successful */
Sets the vehicle entity(the entity that is ridden by this one)
setVehicle
{ "repo_name": "caseif/SpongeAPI", "path": "src/main/java/org/spongepowered/api/data/manipulator/entity/PassengerData.java", "license": "mit", "size": 2092 }
[ "org.spongepowered.api.entity.Entity" ]
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.entity.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
607,359
public List<JobHopMeta> getJobhops() { return jobhops; }
List<JobHopMeta> function() { return jobhops; }
/** * Gets the jobhops. * * @return the jobhops */
Gets the jobhops
getJobhops
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src/org/pentaho/di/job/JobMeta.java", "license": "apache-2.0", "size": 103745 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
797,168
public boolean removeGroup(SpriteGroup group) { // last group is exclusive for extra group // it can't be removed! for (int i=0;i < groups.length-1;i++) { if (groups[i] == group) { groups = (SpriteGroup[]) Utility.cut(groups, i); // sprite group has been removed // therefore, any collision grou...
boolean function(SpriteGroup group) { for (int i=0;i < groups.length-1;i++) { if (groups[i] == group) { groups = (SpriteGroup[]) Utility.cut(groups, i); CollisionManager collisionGroup = getCollisionGroup(group); if (collisionGroup != null) { do { removeCollisionGroup(collisionGroup); collisionGroup = getCollisionGroup...
/** * Removes specified sprite group from this playfield. * * @param group sprite group to be removed from this playfield * @return true, if the sprite group is successfuly removed. */
Removes specified sprite group from this playfield
removeGroup
{ "repo_name": "idega/com.idega.games", "path": "docs/GTGE/tutorials/src/GTGE/PlayField.java", "license": "gpl-3.0", "size": 14726 }
[ "com.golden.gamedev.util.Utility" ]
import com.golden.gamedev.util.Utility;
import com.golden.gamedev.util.*;
[ "com.golden.gamedev" ]
com.golden.gamedev;
2,472,849
public void createTopics(final Map<InternalTopicConfig, Integer> topicsMap, final int replicationFactor, final long windowChangeLogAdditionalRetention, final MetadataResponse metadata) { final Map<String, CreateTopicsRequest.TopicDetails> topicRequestDetails = new HashMap<>(); ...
void function(final Map<InternalTopicConfig, Integer> topicsMap, final int replicationFactor, final long windowChangeLogAdditionalRetention, final MetadataResponse metadata) { final Map<String, CreateTopicsRequest.TopicDetails> topicRequestDetails = new HashMap<>(); for (Map.Entry<InternalTopicConfig, Integer> entry : ...
/** * Create a set of new topics using batch request. */
Create a set of new topics using batch request
createTopics
{ "repo_name": "zzwlstarby/mykafka", "path": "streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsKafkaClient.java", "license": "apache-2.0", "size": 17611 }
[ "java.util.HashMap", "java.util.Map", "java.util.Properties", "org.apache.kafka.clients.ClientRequest", "org.apache.kafka.clients.ClientResponse", "org.apache.kafka.common.protocol.Errors", "org.apache.kafka.common.requests.ApiError", "org.apache.kafka.common.requests.CreateTopicsRequest", "org.apac...
import java.util.HashMap; import java.util.Map; import java.util.Properties; import org.apache.kafka.clients.ClientRequest; import org.apache.kafka.clients.ClientResponse; import org.apache.kafka.common.protocol.Errors; import org.apache.kafka.common.requests.ApiError; import org.apache.kafka.common.requests.CreateTopi...
import java.util.*; import org.apache.kafka.clients.*; import org.apache.kafka.common.protocol.*; import org.apache.kafka.common.requests.*; import org.apache.kafka.common.utils.*; import org.apache.kafka.streams.*; import org.apache.kafka.streams.errors.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
579,709
public static MozuClient<com.mozu.api.contracts.core.extensible.Attribute> updateAttributeClient(com.mozu.api.contracts.core.extensible.Attribute attribute, String attributeFQN, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.attributedefinition.AttributeUrl.updateAttri...
static MozuClient<com.mozu.api.contracts.core.extensible.Attribute> function(com.mozu.api.contracts.core.extensible.Attribute attribute, String attributeFQN, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.attributedefinition.AttributeUrl.updateAttributeUrl(attributeFQN, respon...
/** * * <p><pre><code> * MozuClient<com.mozu.api.contracts.core.extensible.Attribute> mozuClient=UpdateAttributeClient( attribute, attributeFQN, responseFields); * client.setBaseAddress(url); * client.executeRequest(); * Attribute attribute = client.Result(); * </code></pre></p> * @param attr...
<code><code> MozuClient mozuClient=UpdateAttributeClient( attribute, attributeFQN, responseFields); client.setBaseAddress(url); client.executeRequest(); Attribute attribute = client.Result(); </code></code>
updateAttributeClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/orders/attributedefinition/AttributeClient.java", "license": "mit", "size": 13421 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,882,356
@Override public ResourceLocator getResourceLocator() { return AjiMLEditPlugin.INSTANCE; }
ResourceLocator function() { return AjiMLEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "SeelabFhdo/AjiL", "path": "ajiML.edit/src/ajiMLT/provider/CharTItemProvider.java", "license": "mit", "size": 2822 }
[ "org.eclipse.emf.common.util.ResourceLocator" ]
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,246,834
void export100() throws XMLStreamException { writer.setDefaultNamespace( WFS_NS ); writer.writeStartElement( WFS_NS, "WFS_Capabilities" ); writer.writeAttribute( "version", "1.0.0" ); writer.writeDefaultNamespace( WFS_NS ); writer.writeNamespace( ...
void export100() throws XMLStreamException { writer.setDefaultNamespace( WFS_NS ); writer.writeStartElement( WFS_NS, STR ); writer.writeAttribute( STR, "1.0.0" ); writer.writeDefaultNamespace( WFS_NS ); writer.writeNamespace( OWS_PREFIX, OWS_NS ); writer.writeNamespace( OGC_PREFIX, OGCNS ); writer.writeNamespace( GML_P...
/** * Produces a <code>WFS_Capabilities</code> document that complies to the WFS 1.0.0 specification. * * @throws XMLStreamException */
Produces a <code>WFS_Capabilities</code> document that complies to the WFS 1.0.0 specification
export100
{ "repo_name": "deegree/deegree3", "path": "deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/GetCapabilitiesHandler.java", "license": "lgpl-2.1", "size": 52543 }
[ "javax.xml.namespace.QName", "javax.xml.stream.XMLStreamException", "org.deegree.commons.ows.metadata.DatasetMetadata", "org.deegree.feature.persistence.FeatureStore", "org.deegree.feature.types.FeatureType", "org.deegree.filter.xml.FilterCapabilitiesExporter" ]
import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import org.deegree.commons.ows.metadata.DatasetMetadata; import org.deegree.feature.persistence.FeatureStore; import org.deegree.feature.types.FeatureType; import org.deegree.filter.xml.FilterCapabilitiesExporter;
import javax.xml.namespace.*; import javax.xml.stream.*; import org.deegree.commons.ows.metadata.*; import org.deegree.feature.persistence.*; import org.deegree.feature.types.*; import org.deegree.filter.xml.*;
[ "javax.xml", "org.deegree.commons", "org.deegree.feature", "org.deegree.filter" ]
javax.xml; org.deegree.commons; org.deegree.feature; org.deegree.filter;
19,164
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<PrivateEndpointConnectionInner> list(String resourceGroupName, String providerName);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<PrivateEndpointConnectionInner> list(String resourceGroupName, String providerName);
/** * List all the private endpoint connections associated with the attestation provider. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param providerName The name of the attestation provider. * @throws IllegalArgumentException thrown if parameter...
List all the private endpoint connections associated with the attestation provider
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/fluent/PrivateEndpointConnectionsClient.java", "license": "mit", "size": 8727 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.attestation.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.attestation.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.attestation.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
536,742
public Node getNode(String id) throws XMPPException { Node node = nodeMap.get(id); if (node == null) { DiscoverInfo info = new DiscoverInfo(); info.setTo(to); info.setNode(id); DiscoverInfo infoReply = (DiscoverInfo)SyncPacketSend.getReply(con, info); if (infoReply.getIdentities()....
Node function(String id) throws XMPPException { Node node = nodeMap.get(id); if (node == null) { DiscoverInfo info = new DiscoverInfo(); info.setTo(to); info.setNode(id); DiscoverInfo infoReply = (DiscoverInfo)SyncPacketSend.getReply(con, info); if (infoReply.getIdentities().next().getType().equals(NodeType.leaf.toStri...
/** * Retrieves the requested node, if it exists. It will throw an * exception if it does not. * * @param id - The unique id of the node * @return the node * @throws XMPPException The node does not exist */
Retrieves the requested node, if it exists. It will throw an exception if it does not
getNode
{ "repo_name": "ice-coffee/EIM", "path": "src/org/jivesoftware/smackx/pubsub/PubSubManager.java", "license": "apache-2.0", "size": 9818 }
[ "org.jivesoftware.smack.XMPPException", "org.jivesoftware.smackx.packet.DiscoverInfo", "org.jivesoftware.smackx.pubsub.packet.SyncPacketSend" ]
import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.packet.DiscoverInfo; import org.jivesoftware.smackx.pubsub.packet.SyncPacketSend;
import org.jivesoftware.smack.*; import org.jivesoftware.smackx.packet.*; import org.jivesoftware.smackx.pubsub.packet.*;
[ "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
org.jivesoftware.smack; org.jivesoftware.smackx;
2,903,829
@Override public RecordBatch getIncoming() { Preconditions.checkState (left != null, "Retuning null left batch. It's unexpected since right side will only be called iff " + "there is any valid left batch"); return left; }
RecordBatch function() { Preconditions.checkState (left != null, STR + STR); return left; }
/** * Returns the left side incoming for the Lateral Join. Used by right branch * leaf operator of Lateral to process the records at {@code leftJoinIndex}. * * @return - RecordBatch received as left side incoming */
Returns the left side incoming for the Lateral Join. Used by right branch leaf operator of Lateral to process the records at leftJoinIndex
getIncoming
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/LateralJoinBatch.java", "license": "apache-2.0", "size": 55858 }
[ "org.apache.drill.exec.record.RecordBatch", "org.apache.drill.shaded.guava.com.google.common.base.Preconditions" ]
import org.apache.drill.exec.record.RecordBatch; import org.apache.drill.shaded.guava.com.google.common.base.Preconditions;
import org.apache.drill.exec.record.*; import org.apache.drill.shaded.guava.com.google.common.base.*;
[ "org.apache.drill" ]
org.apache.drill;
763,330
public void setDebugTableUnderMouse (boolean debugTableUnderMouse) { setDebugTableUnderMouse(debugTableUnderMouse ? Debug.all : Debug.none); }
void function (boolean debugTableUnderMouse) { setDebugTableUnderMouse(debugTableUnderMouse ? Debug.all : Debug.none); }
/** If true, debug is enabled only for the first ascendant of the actor under the mouse that is a table. Can be combined with * {@link #setDebugAll(boolean)}. */
If true, debug is enabled only for the first ascendant of the actor under the mouse that is a table. Can be combined with
setDebugTableUnderMouse
{ "repo_name": "toa5/libgdx", "path": "gdx/src/com/badlogic/gdx/scenes/scene2d/Stage.java", "license": "apache-2.0", "size": 31839 }
[ "com.badlogic.gdx.scenes.scene2d.ui.Table" ]
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
386,982
private JCheckBox addCheckBox(boolean selected, boolean endOfRow) { JCheckBox box = new JCheckBox(); box.setSelected(selected); if (endOfRow) { c.gridwidth = GridBagConstraints.REMAINDER; // use rest of the line } else { c.gridwidth = 1; // default } layout.setConstraints(box, c); ...
JCheckBox function(boolean selected, boolean endOfRow) { JCheckBox box = new JCheckBox(); box.setSelected(selected); if (endOfRow) { c.gridwidth = GridBagConstraints.REMAINDER; } else { c.gridwidth = 1; } layout.setConstraints(box, c); add(box); return box; }
/** * Creates and adds a new checkbox to this panel * @param selected Is the checkbox initially selected * @param endOfRow Is the box last in the row in the layout * @return The created checkbox */
Creates and adds a new checkbox to this panel
addCheckBox
{ "repo_name": "DSG-UniFE/ICeDiM", "path": "gui/EventLogControlPanel.java", "license": "gpl-3.0", "size": 4417 }
[ "java.awt.GridBagConstraints", "javax.swing.JCheckBox" ]
import java.awt.GridBagConstraints; import javax.swing.JCheckBox;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,580,612
public static Certificate parse(InputStream input) throws IOException { int totalLength = TlsUtils.readUint24(input); if (totalLength == 0) { return EMPTY_CHAIN; } byte[] certListData = TlsUtils.readFully(totalLength, input); ByteArrayInputSt...
static Certificate function(InputStream input) throws IOException { int totalLength = TlsUtils.readUint24(input); if (totalLength == 0) { return EMPTY_CHAIN; } byte[] certListData = TlsUtils.readFully(totalLength, input); ByteArrayInputStream buf = new ByteArrayInputStream(certListData); Vector certificate_list = new V...
/** * Parse a {@link Certificate} from an {@link InputStream}. * * @param input the {@link InputStream} to parse from. * @return a {@link Certificate} object. * @throws IOException */
Parse a <code>Certificate</code> from an <code>InputStream</code>
parse
{ "repo_name": "iseki-masaya/spongycastle", "path": "core/src/main/java/org/spongycastle/crypto/tls/Certificate.java", "license": "mit", "size": 4489 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.io.InputStream", "java.util.Vector", "org.spongycastle.asn1.ASN1Primitive" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Vector; import org.spongycastle.asn1.ASN1Primitive;
import java.io.*; import java.util.*; import org.spongycastle.asn1.*;
[ "java.io", "java.util", "org.spongycastle.asn1" ]
java.io; java.util; org.spongycastle.asn1;
2,052,120
public final Property<HistoricalTimeSeriesSource> historicalTimeSeriesSource() { return metaBean().historicalTimeSeriesSource().createProperty(this); }
final Property<HistoricalTimeSeriesSource> function() { return metaBean().historicalTimeSeriesSource().createProperty(this); }
/** * Gets the the {@code historicalTimeSeriesSource} property. * @return the property, not null */
Gets the the historicalTimeSeriesSource property
historicalTimeSeriesSource
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/factory/engine/MinimalEngineContextsComponentFactory.java", "license": "apache-2.0", "size": 53677 }
[ "com.opengamma.core.historicaltimeseries.HistoricalTimeSeriesSource", "org.joda.beans.Property" ]
import com.opengamma.core.historicaltimeseries.HistoricalTimeSeriesSource; import org.joda.beans.Property;
import com.opengamma.core.historicaltimeseries.*; import org.joda.beans.*;
[ "com.opengamma.core", "org.joda.beans" ]
com.opengamma.core; org.joda.beans;
1,820,496
private static OutputStream openOutput(String name) throws IOException { if (name.equals("-") || name.startsWith("-.")) { return System.out; } return new FileOutputStream(name); }
static OutputStream function(String name) throws IOException { if (name.equals("-") name.startsWith("-.")) { return System.out; } return new FileOutputStream(name); }
/** * Opens and returns the named file for writing, treating "-" specially. * * @param name {@code non-null;} the file name * @return {@code non-null;} the opened file */
Opens and returns the named file for writing, treating "-" specially
openOutput
{ "repo_name": "janicduplessis/buck", "path": "third-party/java/dx/src/com/android/dx/command/dexer/Main.java", "license": "apache-2.0", "size": 59911 }
[ "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,836,695
Entity propose(KnowledgeBase base, PropertyProposal proposal) throws ProxyException;
Entity propose(KnowledgeBase base, PropertyProposal proposal) throws ProxyException;
/** * Propose a new property to the primary base. * * @param base used knowledge base * @param proposal property proposal * @return created entity * @throws IllegalArgumentException when the entity is already defined or some part of the * proposal is invalid * @throws ProxyException when...
Propose a new property to the primary base
propose
{ "repo_name": "odalic/sti", "path": "odalic/src/main/java/cz/cuni/mff/xrg/odalic/entities/EntitiesService.java", "license": "apache-2.0", "size": 3069 }
[ "cz.cuni.mff.xrg.odalic.bases.KnowledgeBase", "cz.cuni.mff.xrg.odalic.tasks.annotations.Entity", "uk.ac.shef.dcs.kbproxy.ProxyException" ]
import cz.cuni.mff.xrg.odalic.bases.KnowledgeBase; import cz.cuni.mff.xrg.odalic.tasks.annotations.Entity; import uk.ac.shef.dcs.kbproxy.ProxyException;
import cz.cuni.mff.xrg.odalic.bases.*; import cz.cuni.mff.xrg.odalic.tasks.annotations.*; import uk.ac.shef.dcs.kbproxy.*;
[ "cz.cuni.mff", "uk.ac.shef" ]
cz.cuni.mff; uk.ac.shef;
2,671,193
@Transactional protected void createQuestionValidValues(QuestionDescriptor question, FormDescriptor form, QuestionTransferObject newQuestdto, ModuleTransferObject moduledto, FormV2TransferObject formdto) { List<QuestionDescriptor.ValidValue> validValues = question.getValidValues(); int idx = 0;...
void function(QuestionDescriptor question, FormDescriptor form, QuestionTransferObject newQuestdto, ModuleTransferObject moduledto, FormV2TransferObject formdto) { List<QuestionDescriptor.ValidValue> validValues = question.getValidValues(); int idx = 0; for (QuestionDescriptor.ValidValue vValue : validValues) { if (vVa...
/** * Create valid value for a newly created question. * * @param question question generated from xml * @param form form generated from xml * @param newQuestdto new question dto that just got created in db, with new seqid and public id * @param moduledto */
Create valid value for a newly created question
createQuestionValidValues
{ "repo_name": "NCIP/cadsr-formbuilder", "path": "software/FormLoader/src/gov/nih/nci/cadsr/formloader/repository/impl/LoadServiceRepositoryImpl.java", "license": "bsd-3-clause", "size": 35708 }
[ "gov.nih.nci.cadsr.formloader.domain.FormDescriptor", "gov.nih.nci.cadsr.formloader.domain.QuestionDescriptor", "gov.nih.nci.ncicb.cadsr.common.dto.FormV2TransferObject", "gov.nih.nci.ncicb.cadsr.common.dto.FormValidValueTransferObject", "gov.nih.nci.ncicb.cadsr.common.dto.InstructionTransferObject", "gov...
import gov.nih.nci.cadsr.formloader.domain.FormDescriptor; import gov.nih.nci.cadsr.formloader.domain.QuestionDescriptor; import gov.nih.nci.ncicb.cadsr.common.dto.FormV2TransferObject; import gov.nih.nci.ncicb.cadsr.common.dto.FormValidValueTransferObject; import gov.nih.nci.ncicb.cadsr.common.dto.InstructionTransferO...
import gov.nih.nci.cadsr.formloader.domain.*; import gov.nih.nci.ncicb.cadsr.common.dto.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
167,033
public MetaProperty<Frequency> accrualFrequency() { return accrualFrequency; }
MetaProperty<Frequency> function() { return accrualFrequency; }
/** * The meta-property for the {@code accrualFrequency} property. * @return the meta-property, not null */
The meta-property for the accrualFrequency property
accrualFrequency
{ "repo_name": "jmptrader/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/swap/type/OvernightRateSwapLegConvention.java", "license": "apache-2.0", "size": 60593 }
[ "com.opengamma.strata.basics.schedule.Frequency", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.basics.schedule.Frequency; import org.joda.beans.MetaProperty;
import com.opengamma.strata.basics.schedule.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
2,212,575
public int convertToPixels(int dipCount, boolean horizontal) { return impl.convertToPixels(dipCount, horizontal); } /** * Converts from specified unit to pixels. * @param value The value to convert, expressed in unitType. * @param unitType The unit type. One of {@link Style#UNIT_TY...
int function(int dipCount, boolean horizontal) { return impl.convertToPixels(dipCount, horizontal); } /** * Converts from specified unit to pixels. * @param value The value to convert, expressed in unitType. * @param unitType The unit type. One of {@link Style#UNIT_TYPE_DIPS}, {@link Style#UNIT_TYPE_PIXELS}, * {@link S...
/** * Converts the dips count to pixels, dips are roughly 1mm in length. This is a very rough estimate and not * to be relied upon * * @param dipCount the dips that we will convert to pixels * @param horizontal indicates pixels in the horizontal plane * @return value in pixels */
Converts the dips count to pixels, dips are roughly 1mm in length. This is a very rough estimate and not to be relied upon
convertToPixels
{ "repo_name": "codenameone/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/Display.java", "license": "gpl-2.0", "size": 192339 }
[ "com.codename1.ui.plaf.Style" ]
import com.codename1.ui.plaf.Style;
import com.codename1.ui.plaf.*;
[ "com.codename1.ui" ]
com.codename1.ui;
508,922
public static String getCurrentTimeInString(SimpleDateFormat dateFormat) { return getTime(getCurrentTimeInLong(), dateFormat); }
static String function(SimpleDateFormat dateFormat) { return getTime(getCurrentTimeInLong(), dateFormat); }
/** * get current time in milliseconds * * @return */
get current time in milliseconds
getCurrentTimeInString
{ "repo_name": "dgrlucky/Awesome", "path": "library/src/main/java/com/library/common/util/TimeUtils.java", "license": "apache-2.0", "size": 1648 }
[ "java.text.SimpleDateFormat" ]
import java.text.SimpleDateFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,523,131
public void uninstallUI(JComponent c) { uninstallDefaults(c); BasicHTML.updateRenderer(c, ""); uninstallListeners(c); }
void function(JComponent c) { uninstallDefaults(c); BasicHTML.updateRenderer(c, ""); uninstallListeners(c); }
/** * This method uninstalls the UI for the given JComponent. * * @param c The JComponent to uninstall. */
This method uninstalls the UI for the given JComponent
uninstallUI
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/javax/swing/plaf/basic/BasicToolTipUI.java", "license": "gpl-2.0", "size": 8439 }
[ "javax.swing.JComponent" ]
import javax.swing.JComponent;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,065,013
public static String lookupConstantFieldValue(Class<?> clazz, String name) { if (clazz == null) { return null; } // remove leading dots if (name.startsWith(",")) { name = name.substring(1); } for (Field field : clazz.getFields()) { ...
static String function(Class<?> clazz, String name) { if (clazz == null) { return null; } if (name.startsWith(",")) { name = name.substring(1); } for (Field field : clazz.getFields()) { if (field.getName().equals(name)) { try { Object v = field.get(null); return v.toString(); } catch (IllegalAccessException e) { return...
/** * Lookup the constant field on the given class with the given name * * @param clazz the class * @param name the name of the field to lookup * @return the value of the constant field, or <tt>null</tt> if not found */
Lookup the constant field on the given class with the given name
lookupConstantFieldValue
{ "repo_name": "YMartsynkevych/camel", "path": "camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java", "license": "apache-2.0", "size": 68864 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,268,713
public static String[] getDefaultExtensions(IType resourceType) throws JavaModelException { String[] extensions = getDeclaredDefaultExtensions(resourceType); // Check the super interface hierarchy for @DefaultExtensions if (extensions.length == 0) { ITypeHierarchy superHierarchy = resourceTyp...
static String[] function(IType resourceType) throws JavaModelException { String[] extensions = getDeclaredDefaultExtensions(resourceType); ITypeHierarchy superHierarchy = resourceType.newSupertypeHierarchy(null); IType[] superInterfaces = superHierarchy.getAllSuperInterfaces(resourceType); for (IType superInterface : s...
/** * Find all default extensions for this resource type. If the type itself does * not declare any extensions, it may inherit extensions from any of the * interfaces in its super type hierarchy. */
Find all default extensions for this resource type. If the type itself does not declare any extensions, it may inherit extensions from any of the interfaces in its super type hierarchy
getDefaultExtensions
{ "repo_name": "pruebasetichat/google-plugin-for-eclipse", "path": "plugins/com.google.gdt.eclipse.platform.shared/src/com/google/gwt/eclipse/platform/clientbundle/ResourceTypeDefaultExtensions.java", "license": "epl-1.0", "size": 4134 }
[ "org.eclipse.jdt.core.IType", "org.eclipse.jdt.core.ITypeHierarchy", "org.eclipse.jdt.core.JavaModelException" ]
import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
1,469,406
public static Date parseDateTime(String date) throws ParseException { if (date == null) { return null; } Calendar result = Calendar.getInstance(); synchronized (DATETIME_PARSER) { result.setTime(DATETIME_PARSER.parse(date)); } return result.getTime(); }
static Date function(String date) throws ParseException { if (date == null) { return null; } Calendar result = Calendar.getInstance(); synchronized (DATETIME_PARSER) { result.setTime(DATETIME_PARSER.parse(date)); } return result.getTime(); }
/** * Parse a String of format yyyy/MM/dd hh:mm and return the corresponding Date. * @param date the String to be parsed. * @return the corresponding date. * @throws ParseException */
Parse a String of format yyyy/MM/dd hh:mm and return the corresponding Date
parseDateTime
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/webactiv/util/DateUtil.java", "license": "agpl-3.0", "size": 25701 }
[ "java.text.ParseException", "java.util.Calendar", "java.util.Date" ]
import java.text.ParseException; import java.util.Calendar; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
711,175
public void searchContent(@NonNull String query, @NonNull List<Attribute> metadata) { searchManager.setQuery(query); searchManager.setTags(metadata); newSearch.setValue(true); doSearchContent(); }
void function(@NonNull String query, @NonNull List<Attribute> metadata) { searchManager.setQuery(query); searchManager.setTags(metadata); newSearch.setValue(true); doSearchContent(); }
/** * Perform a new content search using the given query and metadata * * @param query Query to use for the search * @param metadata Metadata to use for the search */
Perform a new content search using the given query and metadata
searchContent
{ "repo_name": "AVnetWS/Hentoid", "path": "app/src/main/java/me/devsaki/hentoid/viewmodels/LibraryViewModel.java", "license": "apache-2.0", "size": 44536 }
[ "androidx.annotation.NonNull", "java.util.List", "me.devsaki.hentoid.database.domains.Attribute" ]
import androidx.annotation.NonNull; import java.util.List; import me.devsaki.hentoid.database.domains.Attribute;
import androidx.annotation.*; import java.util.*; import me.devsaki.hentoid.database.domains.*;
[ "androidx.annotation", "java.util", "me.devsaki.hentoid" ]
androidx.annotation; java.util; me.devsaki.hentoid;
1,525,375