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 Set<Tag> getTags() {
return tags;
} | Set<Tag> function() { return tags; } | /**
* Return the tags created by this User
* @return
*/ | Return the tags created by this User | getTags | {
"repo_name": "fregaham/KiWi",
"path": "src/model/kiwi/model/user/User.java",
"license": "bsd-3-clause",
"size": 19827
} | [
"java.util.Set",
"kiwi.model.tagging.Tag"
] | import java.util.Set; import kiwi.model.tagging.Tag; | import java.util.*; import kiwi.model.tagging.*; | [
"java.util",
"kiwi.model.tagging"
] | java.util; kiwi.model.tagging; | 305,991 |
private void writeObject(ObjectOutputStream s) throws IOException {
}
// ///////////////
// Accessibility support
// ////////////// | void function(ObjectOutputStream s) throws IOException { } | /**
* See readObject() and writeObject() in JComponent for more information
* about serialization in Swing.
*/ | See readObject() and writeObject() in JComponent for more information about serialization in Swing | writeObject | {
"repo_name": "javalovercn/j2se_for_android",
"path": "src/javax/swing/JTextArea.java",
"license": "gpl-2.0",
"size": 18478
} | [
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.io.IOException; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,366,309 |
@VisibleForTesting
Path getNameNodeInfoPath() throws IOException {
return new Path(getRemoteStoragePath(getConf(), infraAppId),
DynoConstants.NN_INFO_FILE_NAME);
} | Path getNameNodeInfoPath() throws IOException { return new Path(getRemoteStoragePath(getConf(), infraAppId), DynoConstants.NN_INFO_FILE_NAME); } | /**
* Return the path to the property file containing information about the
* launched NameNode.
*/ | Return the path to the property file containing information about the launched NameNode | getNameNodeInfoPath | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-infra/src/main/java/org/apache/hadoop/tools/dynamometer/Client.java",
"license": "apache-2.0",
"size": 48758
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,505,315 |
public Observable<ServiceResponse<ConnectivityInformationInner>> checkConnectivityWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is... | Observable<ServiceResponse<ConnectivityInformationInner>> function(String resourceGroupName, String networkWatcherName, ConnectivityParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (networkWatcherName == null) { throw new IllegalArgumentException(STR); } if (this.c... | /**
* Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server.
*
* @param resourceGroupName The name of the network watcher resource group.
* @param networkWatcherName The name of the network watch... | Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server | checkConnectivityWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java",
"license": "mit",
"size": 186527
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.azure.LongRunningFinalState",
"com.microsoft.azure.LongRunningOperationOptions",
"com.microsoft.azure.management.network.v2019_04_01.ConnectivityParameters",
"com.microsoft.rest.ServiceResponse",
"com.microsoft.rest.Validator"
] | import com.google.common.reflect.TypeToken; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; import com.microsoft.azure.management.network.v2019_04_01.ConnectivityParameters; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; | import com.google.common.reflect.*; import com.microsoft.azure.*; import com.microsoft.azure.management.network.v2019_04_01.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.azure",
"com.microsoft.rest"
] | com.google.common; com.microsoft.azure; com.microsoft.rest; | 624,909 |
@Override
public boolean onDoubleTap(MotionEvent event) {
float zoomX = event.getX();
float zoomY = event.getY();
MultiLevelSingleTapZoomNetworkImageView.this.zoomOut(zoomX, zoomY);
return EVENT_DONE;
}
});
} | boolean function(MotionEvent event) { float zoomX = event.getX(); float zoomY = event.getY(); MultiLevelSingleTapZoomNetworkImageView.this.zoomOut(zoomX, zoomY); return EVENT_DONE; } }); } | /**
* Zoom out when double-tapping
*/ | Zoom out when double-tapping | onDoubleTap | {
"repo_name": "roydang/AndroyVolleyExt",
"path": "src_lib/com/navercorp/volleyextensions/view/MultiLevelSingleTapZoomNetworkImageView.java",
"license": "apache-2.0",
"size": 4750
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 702,368 |
private static FieldInfo extractFieldFromGetterOrSetter(Method method) {
String name = method.getName();
if (name.length() < 4)
return null;
String firstLetter = name.substring(3, 4);
// check if the 4th letter is in upper case
if (!firstLetter.toUpperCase().equal... | static FieldInfo function(Method method) { String name = method.getName(); if (name.length() < 4) return null; String firstLetter = name.substring(3, 4); if (!firstLetter.toUpperCase().equals(firstLetter)) return null; FieldInfo field = null; if (method.getParameterTypes().length == 0 && method.getReturnType() != void.... | /**
* Checks if method is getter or setter
* @param method
* @return FieldInfo
*/ | Checks if method is getter or setter | extractFieldFromGetterOrSetter | {
"repo_name": "zenframework/easy-services",
"path": "easy-services-util/src/main/java/org/zenframework/easyservices/util/cls/ClassInfo.java",
"license": "mit",
"size": 15190
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 101,713 |
public static Map<String, Object> updateImage(DispatchContext dctx, Map<String, ? extends Object> context) {
Map<String, Object> result = updateImageMethod(dctx, context);
return result;
} | static Map<String, Object> function(DispatchContext dctx, Map<String, ? extends Object> context) { Map<String, Object> result = updateImageMethod(dctx, context); return result; } | /**
* A service wrapper for the updateImageMethod method. Forces permissions to be checked.
*/ | A service wrapper for the updateImageMethod method. Forces permissions to be checked | updateImage | {
"repo_name": "rohankarthik/Ofbiz",
"path": "applications/content/src/main/java/org/apache/ofbiz/content/data/DataServices.java",
"license": "apache-2.0",
"size": 33016
} | [
"java.util.Map",
"org.apache.ofbiz.service.DispatchContext"
] | import java.util.Map; import org.apache.ofbiz.service.DispatchContext; | import java.util.*; import org.apache.ofbiz.service.*; | [
"java.util",
"org.apache.ofbiz"
] | java.util; org.apache.ofbiz; | 850,803 |
interface WithRouteFilter {
Update withRouteFilter(SubResource routeFilter);
} | interface WithRouteFilter { Update withRouteFilter(SubResource routeFilter); } | /**
* Specifies routeFilter.
* @param routeFilter The reference to the RouteFilter resource
* @return the next update stage
*/ | Specifies routeFilter | withRouteFilter | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/ExpressRouteCircuitPeering.java",
"license": "mit",
"size": 23162
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,242,518 |
public void setTokenStream(TokenStream tokenStream) {
this.isIndexed = true;
this.isTokenized = true;
this.tokenStream = tokenStream;
}
public Field(String name, String value, Store store, Index index) {
this(name, value, store, index, TermVector.NO);
}
public Field(String name, Str... | void function(TokenStream tokenStream) { this.isIndexed = true; this.isTokenized = true; this.tokenStream = tokenStream; } public Field(String name, String value, Store store, Index index) { this(name, value, store, index, TermVector.NO); } public Field(String name, String value, Store store, Index index, TermVector te... | /** Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true.
* May be combined with stored values from stringValue() or getBinaryValue() */ | Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true | setTokenStream | {
"repo_name": "fnp/pylucene",
"path": "lucene-java-3.5.0/lucene/src/java/org/apache/lucene/document/Field.java",
"license": "apache-2.0",
"size": 21331
} | [
"java.io.Reader",
"org.apache.lucene.analysis.TokenStream",
"org.apache.lucene.index.FieldInfo",
"org.apache.lucene.util.StringHelper"
] | import java.io.Reader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.util.StringHelper; | import java.io.*; import org.apache.lucene.analysis.*; import org.apache.lucene.index.*; import org.apache.lucene.util.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,836,096 |
@Deprecated()
private ZuluExecutionResult processRequest(final ImmutableZuluServerRequest req, final ImmutableQuery q, final ZuluExecutionScope scope) {
final ExecutionResult.Builder res = ExecutionResult.builder();
final ZuluResultReceiver receiver = q.resultReceiver();
// compile the query. may use... | @Deprecated() ZuluExecutionResult function(final ImmutableZuluServerRequest req, final ImmutableQuery q, final ZuluExecutionScope scope) { final ExecutionResult.Builder res = ExecutionResult.builder(); final ZuluResultReceiver receiver = q.resultReceiver(); final ZuluCompileResult compileResult = this.compile(q.query()... | /**
* use bind() instead.
*
* @param req
* @param q
* @param scope
* @return
*
*/ | use bind() instead | processRequest | {
"repo_name": "zourzouvillys/graphql",
"path": "graphql-runtime/src/main/java/io/zrz/graphql/zulu/engine/ZuluEngine.java",
"license": "apache-2.0",
"size": 14929
} | [
"com.google.common.base.Stopwatch",
"io.zrz.graphql.core.doc.GQLOpType",
"io.zrz.graphql.zulu.server.ImmutableQuery",
"io.zrz.graphql.zulu.server.ImmutableZuluServerRequest"
] | import com.google.common.base.Stopwatch; import io.zrz.graphql.core.doc.GQLOpType; import io.zrz.graphql.zulu.server.ImmutableQuery; import io.zrz.graphql.zulu.server.ImmutableZuluServerRequest; | import com.google.common.base.*; import io.zrz.graphql.core.doc.*; import io.zrz.graphql.zulu.server.*; | [
"com.google.common",
"io.zrz.graphql"
] | com.google.common; io.zrz.graphql; | 2,316,900 |
public Builder requiresConfigurationFragments(Class<?>... configurationFragments) {
configurationFragmentPolicy.requiresConfigurationFragments(
ImmutableSet.<Class<?>>copyOf(configurationFragments));
return this;
} | Builder function(Class<?>... configurationFragments) { configurationFragmentPolicy.requiresConfigurationFragments( ImmutableSet.<Class<?>>copyOf(configurationFragments)); return this; } | /**
* Declares that the implementation of the associated rule class requires the given
* fragments to be present in this rule's host and target configurations.
*
* <p>The value is inherited by subclasses.
*/ | Declares that the implementation of the associated rule class requires the given fragments to be present in this rule's host and target configurations. The value is inherited by subclasses | requiresConfigurationFragments | {
"repo_name": "variac/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/RuleClass.java",
"license": "apache-2.0",
"size": 82582
} | [
"com.google.common.collect.ImmutableSet"
] | import com.google.common.collect.ImmutableSet; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,280,665 |
public static Checksum checksum(File file, Checksum checksum) throws IOException {
if (file.isDirectory()) {
throw new IllegalArgumentException("Checksums can't be computed on directories");
}
InputStream in = null;
try {
in = new CheckedInputStream(new FileIn... | static Checksum function(File file, Checksum checksum) throws IOException { if (file.isDirectory()) { throw new IllegalArgumentException(STR); } InputStream in = null; try { in = new CheckedInputStream(new FileInputStream(file), checksum); IOUtils.copy(in, new NullOutputStream()); } finally { IOUtils.closeQuietly(in); ... | /**
* Computes the checksum of a file using the specified checksum object.
* Multiple files may be checked using one <code>Checksum</code> instance
* if desired simply by reusing the same checksum object.
* For example:
* <pre>
* long csum = FileUtils.checksum(file, new CRC32()).getValue... | Computes the checksum of a file using the specified checksum object. Multiple files may be checked using one <code>Checksum</code> instance if desired simply by reusing the same checksum object. For example: <code> long csum = FileUtils.checksum(file, new CRC32()).getValue(); </code> | checksum | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/UnifiedEmail/src/org/apache/commons/io/FileUtils.java",
"license": "gpl-3.0",
"size": 77172
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.zip.CheckedInputStream",
"java.util.zip.Checksum",
"org.apache.commons.io.output.NullOutputStream"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.zip.CheckedInputStream; import java.util.zip.Checksum; import org.apache.commons.io.output.NullOutputStream; | import java.io.*; import java.util.zip.*; import org.apache.commons.io.output.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 2,830,262 |
public final void printNode(CorePrinter output) {
} | final void function(CorePrinter output) { } | /**
* We don't print anything - we use {@link ASTPrintVisitor} instead
*/ | We don't print anything - we use <code>ASTPrintVisitor</code> instead | printNode | {
"repo_name": "vovagrechka/fucking-everything",
"path": "phizdets/phizdets-idea/eclipse-src/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/CatchClause.java",
"license": "apache-2.0",
"size": 2767
} | [
"org.eclipse.dltk.utils.CorePrinter"
] | import org.eclipse.dltk.utils.CorePrinter; | import org.eclipse.dltk.utils.*; | [
"org.eclipse.dltk"
] | org.eclipse.dltk; | 391,019 |
public static String getCharSetEncoding(String contentType) {
if (log.isDebugEnabled()) {
log.debug("Input contentType (" + contentType + ")");
}
if (contentType == null) {
// Using the default UTF-8
if (log.isDebugEnabled()) {
log.debug("C... | static String function(String contentType) { if (log.isDebugEnabled()) { log.debug(STR + contentType + ")"); } if (contentType == null) { if (log.isDebugEnabled()) { log.debug(STR + MessageContext.DEFAULT_CHAR_SET_ENCODING + ")"); } return MessageContext.DEFAULT_CHAR_SET_ENCODING; } int index = contentType.indexOf(HTTP... | /**
* Extracts and returns the character set encoding from the Content-type header
* <p/>
* Example: "Content-Type: text/xml; charset=utf-8" would return "utf-8"
*
* @param contentType a content-type (from HTTP or MIME, for instance)
* @return the character set encoding if found, or Messag... | Extracts and returns the character set encoding from the Content-type header Example: "Content-Type: text/xml; charset=utf-8" would return "utf-8" | getCharSetEncoding | {
"repo_name": "wso2/wso2-axis2",
"path": "modules/kernel/src/org/apache/axis2/builder/BuilderUtil.java",
"license": "apache-2.0",
"size": 39428
} | [
"org.apache.axis2.context.MessageContext",
"org.apache.axis2.transport.http.HTTPConstants"
] | import org.apache.axis2.context.MessageContext; import org.apache.axis2.transport.http.HTTPConstants; | import org.apache.axis2.context.*; import org.apache.axis2.transport.http.*; | [
"org.apache.axis2"
] | org.apache.axis2; | 2,674,033 |
public void setGameRoles(List<GameRole> gameRoles) {
this.gameRoles = gameRoles;
} | void function(List<GameRole> gameRoles) { this.gameRoles = gameRoles; } | /**
* Sets game roles.
*
* @param gameRoles the game roles
*/ | Sets game roles | setGameRoles | {
"repo_name": "thefinerthingsclub/finerleague",
"path": "finerleague-data/finerleague-data-entity/src/main/java/com/everis/alicante/thefinerthingsclub/finerleague/data/entity/Game.java",
"license": "gpl-3.0",
"size": 2996
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,604,219 |
public static Jid from(String localpart, String domainpart, String resource, JxmppContext context) throws XmppStringprepException {
// Every JID must come with an domainpart.
if (domainpart.isEmpty()) {
throw XmppStringprepException.MissingDomainpart.from(localpart, resource);
}
String jidString = XmppSt... | static Jid function(String localpart, String domainpart, String resource, JxmppContext context) throws XmppStringprepException { if (domainpart.isEmpty()) { throw XmppStringprepException.MissingDomainpart.from(localpart, resource); } String jidString = XmppStringUtils.completeJidFrom(localpart, domainpart, resource); J... | /**
* Get a {@link Jid} from the given parts.
* <p>
* Only the domainpart is required.
* </p>
*
* @param localpart a optional localpart.
* @param domainpart a required domainpart.
* @param resource a optional resourcepart.
* @param context the JXMPP context.
* @return a JID which consists of the giv... | Get a <code>Jid</code> from the given parts. Only the domainpart is required. | from | {
"repo_name": "Flowdalic/jxmpp",
"path": "jxmpp-jid/src/main/java/org/jxmpp/jid/impl/JidCreate.java",
"license": "apache-2.0",
"size": 48033
} | [
"org.jxmpp.JxmppContext",
"org.jxmpp.jid.Jid",
"org.jxmpp.stringprep.XmppStringprepException",
"org.jxmpp.util.XmppStringUtils"
] | import org.jxmpp.JxmppContext; import org.jxmpp.jid.Jid; import org.jxmpp.stringprep.XmppStringprepException; import org.jxmpp.util.XmppStringUtils; | import org.jxmpp.*; import org.jxmpp.jid.*; import org.jxmpp.stringprep.*; import org.jxmpp.util.*; | [
"org.jxmpp",
"org.jxmpp.jid",
"org.jxmpp.stringprep",
"org.jxmpp.util"
] | org.jxmpp; org.jxmpp.jid; org.jxmpp.stringprep; org.jxmpp.util; | 68,161 |
EReference getStatement_S6(); | EReference getStatement_S6(); | /**
* Returns the meta object for the containment reference '{@link com.euclideanspace.spad.editor.Statement#getS6 <em>S6</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>S6</em>'.
* @see com.euclideanspace.spad.editor.Statement#getS6(... | Returns the meta object for the containment reference '<code>com.euclideanspace.spad.editor.Statement#getS6 S6</code>'. | getStatement_S6 | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,709 |
public ServiceFuture<OperationStatusResponseInner> deleteAsync(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback<OperationStatusResponseInner> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instan... | ServiceFuture<OperationStatusResponseInner> function(String resourceGroupName, String vmScaleSetName, String instanceId, final ServiceCallback<OperationStatusResponseInner> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId), serviceCallback... | /**
* Deletes a virtual machine from a VM scale set.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param serviceCallback the async ServiceCallback to handle s... | Deletes a virtual machine from a VM scale set | deleteAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetVMsInner.java",
"license": "mit",
"size": 121964
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,718,921 |
public Set<NotificationTopic> getNotificationTopics();
| Set<NotificationTopic> function(); | /**
* Ask for the notfication <em>types</em> supported, and expected to be
* sent by this notification provider.
*/ | Ask for the notfication types supported, and expected to be sent by this notification provider | getNotificationTopics | {
"repo_name": "afbits/OneCMDBwithMaven",
"path": "src/org.onecmdb.core/src/main/java/org/onecmdb/core/internal/notification/NotificationProvider.java",
"license": "gpl-2.0",
"size": 1962
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,714,382 |
public synchronized void stopThread() {
mStopRequested = true;
mConnected = true;
notify();
Log.i(TAG,"Requesting a stop");
} | synchronized void function() { mStopRequested = true; mConnected = true; notify(); Log.i(TAG,STR); } | /**
* Stops the thread by forcing the run() method to return.
* Called when there's no valid WIFI.
*/ | Stops the thread by forcing the run() method to return. Called when there's no valid WIFI | stopThread | {
"repo_name": "trishan/posit-mobile",
"path": "android/src/org/hfoss/posit/web/SyncThread.java",
"license": "lgpl-2.1",
"size": 11687
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,260,771 |
@Test
public void testECOWithFormB05() {
LocalTime eventStartTime = new LocalTime(16, 30, 0);
LocalTime eventStopTime = new LocalTime(17, 50, 0);
LocalTime formStartTime = new LocalTime(16, 10, 0);
LocalTime formStopTime = new LocalTime(17, 0, 0);
LocalTime absenceTime = new LocalTime(16, 20, 0);
abs... | void function() { LocalTime eventStartTime = new LocalTime(16, 30, 0); LocalTime eventStopTime = new LocalTime(17, 50, 0); LocalTime formStartTime = new LocalTime(16, 10, 0); LocalTime formStopTime = new LocalTime(17, 0, 0); LocalTime absenceTime = new LocalTime(16, 20, 0); absenceWithClassConflictFormHelper(eventStart... | /**
* class times overlap event start, tardy time within class, before event
*/ | class times overlap event start, tardy time within class, before event | testECOWithFormB05 | {
"repo_name": "curtisullerich/attendance",
"path": "src/test/java/edu/iastate/music/marching/attendance/test/model/interact/FormClassConflictSimpleTest.java",
"license": "mit",
"size": 48344
} | [
"edu.iastate.music.marching.attendance.model.store.Absence",
"org.joda.time.LocalTime"
] | import edu.iastate.music.marching.attendance.model.store.Absence; import org.joda.time.LocalTime; | import edu.iastate.music.marching.attendance.model.store.*; import org.joda.time.*; | [
"edu.iastate.music",
"org.joda.time"
] | edu.iastate.music; org.joda.time; | 2,368,329 |
public View getStickyHeader() {
return mDrawerBuilder.mStickyHeaderView;
} | View function() { return mDrawerBuilder.mStickyHeaderView; } | /**
* get the StickyHeader View if set else NULL
*
* @return
*/ | get the StickyHeader View if set else NULL | getStickyHeader | {
"repo_name": "MaTriXy/MaterialDrawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/Drawer.java",
"license": "apache-2.0",
"size": 36601
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 768,948 |
@Override
public boolean deleteItem(Vehicle vehicle, User user) {
try {
database.begin();
PreparedStatement ps = database.prepareQuery("DELETE FROM dat_vehicles WHERE id = ?;");
ps.setInt(1, vehicle.getId());
ps.executeUpdate();
... | boolean function(Vehicle vehicle, User user) { try { database.begin(); PreparedStatement ps = database.prepareQuery(STR); ps.setInt(1, vehicle.getId()); ps.executeUpdate(); ps = database.prepareQuery(STR); ps.setInt(1, vehicle.getId()); ps.executeUpdate(); database.commit(); } catch (SQLException e) { try { database.ro... | /**
* Metoda usuwa element ze slownika
* @param vehicle Element do usuniecia
* @param user Obiekt zalogowanego uzytkownika
* @return true jezeli OK
*/ | Metoda usuwa element ze slownika | deleteItem | {
"repo_name": "makaw/somado",
"path": "src/main/java/datamodel/glossaries/GlossVehicles.java",
"license": "mit",
"size": 7914
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import java.sql.PreparedStatement; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,937,204 |
public ChannelFuture bind(SocketAddress localAddress) {
validate();
if (localAddress == null) {
throw new NullPointerException("localAddress");
}
return doBind(localAddress);
} | ChannelFuture function(SocketAddress localAddress) { validate(); if (localAddress == null) { throw new NullPointerException(STR); } return doBind(localAddress); } | /**
* Create a new {@link Channel} and bind it.
*/ | Create a new <code>Channel</code> and bind it | bind | {
"repo_name": "raksuns/netty_raks",
"path": "transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java",
"license": "apache-2.0",
"size": 12376
} | [
"io.netty.channel.ChannelFuture",
"java.net.SocketAddress"
] | import io.netty.channel.ChannelFuture; import java.net.SocketAddress; | import io.netty.channel.*; import java.net.*; | [
"io.netty.channel",
"java.net"
] | io.netty.channel; java.net; | 1,404,788 |
public long getRemainingDelay(final long nanoTimeNow, final Settings settings, final Settings indexSettings) {
final long delayTimeoutNanos = getAllocationDelayTimeoutSettingNanos(settings, indexSettings);
if (delayTimeoutNanos == 0L) {
return 0L;
} else {
assert nano... | long function(final long nanoTimeNow, final Settings settings, final Settings indexSettings) { final long delayTimeoutNanos = getAllocationDelayTimeoutSettingNanos(settings, indexSettings); if (delayTimeoutNanos == 0L) { return 0L; } else { assert nanoTimeNow >= unassignedTimeNanos; return Math.max(0L, delayTimeoutNano... | /**
* Calculates the delay left based on current time (in nanoseconds) and index/node settings.
*
* @return calculated delay in nanoseconds
*/ | Calculates the delay left based on current time (in nanoseconds) and index/node settings | getRemainingDelay | {
"repo_name": "mmaracic/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/cluster/routing/UnassignedInfo.java",
"license": "apache-2.0",
"size": 14497
} | [
"org.elasticsearch.common.settings.Settings"
] | import org.elasticsearch.common.settings.Settings; | import org.elasticsearch.common.settings.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,510,526 |
protected NettyConfiguration parseConfiguration(NettyConfiguration configuration, String remaining, Map<String, Object> parameters) throws Exception {
configuration.parseURI(new URI(remaining), parameters, this, "tcp", "udp");
return configuration;
} | NettyConfiguration function(NettyConfiguration configuration, String remaining, Map<String, Object> parameters) throws Exception { configuration.parseURI(new URI(remaining), parameters, this, "tcp", "udp"); return configuration; } | /**
* Parses the configuration
*
* @return the parsed and valid configuration to use
*/ | Parses the configuration | parseConfiguration | {
"repo_name": "lburgazzoli/apache-camel",
"path": "components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyComponent.java",
"license": "apache-2.0",
"size": 6018
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 959,601 |
@Override
public int getBaseType() throws SQLException {
try {
debugCodeCall("getBaseType");
checkClosed();
return Types.NULL;
} catch (Exception e) {
throw logAndConvert(e);
}
} | int function() throws SQLException { try { debugCodeCall(STR); checkClosed(); return Types.NULL; } catch (Exception e) { throw logAndConvert(e); } } | /**
* Returns the base type of the array. This database does support mixed type
* arrays and therefore there is no base type.
*
* @return Types.NULL
*/ | Returns the base type of the array. This database does support mixed type arrays and therefore there is no base type | getBaseType | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/jdbc/JdbcArray.java",
"license": "apache-2.0",
"size": 8810
} | [
"java.sql.SQLException",
"java.sql.Types"
] | import java.sql.SQLException; import java.sql.Types; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,833,902 |
public static PyExpr convertMapToOrderedDict(Map<PyExpr, PyExpr> dict) {
List<String> values = new ArrayList<>();
for (Map.Entry<PyExpr, PyExpr> entry : dict.entrySet()) {
values.add("(" + entry.getKey().getText() + ", " + entry.getValue().getText() + ")");
}
Joiner joiner = Joiner.on(", ");
... | static PyExpr function(Map<PyExpr, PyExpr> dict) { List<String> values = new ArrayList<>(); for (Map.Entry<PyExpr, PyExpr> entry : dict.entrySet()) { values.add("(" + entry.getKey().getText() + STR + entry.getValue().getText() + ")"); } Joiner joiner = Joiner.on(STR); return new PyExpr(STR + joiner.join(values) + "])",... | /**
* Convert a java Map to valid PyExpr as dict.
*
* @param dict A Map to be converted to PyExpr as a dictionary, both key and value should be
* PyExpr.
*/ | Convert a java Map to valid PyExpr as dict | convertMapToOrderedDict | {
"repo_name": "rpatil26/closure-templates",
"path": "java/src/com/google/template/soy/pysrc/restricted/PyExprUtils.java",
"license": "apache-2.0",
"size": 12457
} | [
"com.google.common.base.Joiner",
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import com.google.common.base.Joiner; import java.util.ArrayList; import java.util.List; import java.util.Map; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,433,270 |
public LIRPhaseSuite<PostAllocationOptimizationContext> getPostAllocationOptimizationStage() {
return postAllocStage;
} | LIRPhaseSuite<PostAllocationOptimizationContext> function() { return postAllocStage; } | /**
* {@link PostAllocationOptimizationPhase}s are executed after register allocation and before
* machine code generation.
* <p>
* A {@link PostAllocationOptimizationPhase} must not introduce new {@link Variable}s,
* {@link VirtualStackSlot}s or {@link StackSlot}s.
*/ | <code>PostAllocationOptimizationPhase</code>s are executed after register allocation and before machine code generation. A <code>PostAllocationOptimizationPhase</code> must not introduce new <code>Variable</code>s, <code>VirtualStackSlot</code>s or <code>StackSlot</code>s | getPostAllocationOptimizationStage | {
"repo_name": "smarr/GraalCompiler",
"path": "graal/com.oracle.graal.lir/src/com/oracle/graal/lir/phases/LIRSuites.java",
"license": "gpl-2.0",
"size": 3813
} | [
"com.oracle.graal.lir.phases.PostAllocationOptimizationPhase"
] | import com.oracle.graal.lir.phases.PostAllocationOptimizationPhase; | import com.oracle.graal.lir.phases.*; | [
"com.oracle.graal"
] | com.oracle.graal; | 405,208 |
@ResponseStatus(code = HttpStatus.NO_CONTENT)
@RequestMapping(value = "/{filterId}/enable", method = { RequestMethod.PATCH, RequestMethod.PUT })
@PreAuthorize("hasAuthority('" + CoreGroupPermission.MODULE_UPDATE + "')")
@ApiOperation(
value = "Activate filter builder",
nickname = "activateFilterBuilder",
... | @ResponseStatus(code = HttpStatus.NO_CONTENT) @RequestMapping(value = STR, method = { RequestMethod.PATCH, RequestMethod.PUT }) @PreAuthorize(STR + CoreGroupPermission.MODULE_UPDATE + "')") @ApiOperation( value = STR, nickname = STR, tags = { FilterBuilderController.TAG }, authorizations = { @Authorization(value = Swag... | /**
* Enable filter builder
*
* @param filterId
*/ | Enable filter builder | enable | {
"repo_name": "bcvsolutions/CzechIdMng",
"path": "Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/rest/impl/FilterBuilderController.java",
"license": "mit",
"size": 4628
} | [
"eu.bcvsolutions.idm.core.api.config.swagger.SwaggerConfig",
"eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission",
"io.swagger.annotations.ApiOperation",
"io.swagger.annotations.Authorization",
"io.swagger.annotations.AuthorizationScope",
"javax.validation.constraints.NotNull",
"org.springframewo... | import eu.bcvsolutions.idm.core.api.config.swagger.SwaggerConfig; import eu.bcvsolutions.idm.core.model.domain.CoreGroupPermission; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.Authorization; import io.swagger.annotations.AuthorizationScope; import javax.validation.constraints.NotNull; impo... | import eu.bcvsolutions.idm.core.api.config.swagger.*; import eu.bcvsolutions.idm.core.model.domain.*; import io.swagger.annotations.*; import javax.validation.constraints.*; import org.springframework.http.*; import org.springframework.security.access.prepost.*; import org.springframework.web.bind.annotation.*; | [
"eu.bcvsolutions.idm",
"io.swagger.annotations",
"javax.validation",
"org.springframework.http",
"org.springframework.security",
"org.springframework.web"
] | eu.bcvsolutions.idm; io.swagger.annotations; javax.validation; org.springframework.http; org.springframework.security; org.springframework.web; | 1,095,559 |
public List<Source> getXSLTemplates() {
ArrayList<Source> sourceList = PrintingUtils
.getXSLTforReport(BudgetPrintType.BUDGET_SUMMARY_TOTAL_REPORT
.getBudgetPrintType());
return sourceList;
} | List<Source> function() { ArrayList<Source> sourceList = PrintingUtils .getXSLTforReport(BudgetPrintType.BUDGET_SUMMARY_TOTAL_REPORT .getBudgetPrintType()); return sourceList; } | /**
* This method fetches the XSL style-sheets required for transforming the
* generated XML into PDF.
*
* @return {@link ArrayList}} of {@link Source} XSLs
*/ | This method fetches the XSL style-sheets required for transforming the generated XML into PDF | getXSLTemplates | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/coeus/common/budget/impl/print/BudgetSummaryTotalPrint.java",
"license": "apache-2.0",
"size": 2239
} | [
"java.util.ArrayList",
"java.util.List",
"javax.xml.transform.Source",
"org.kuali.coeus.common.budget.framework.print.BudgetPrintType",
"org.kuali.coeus.common.framework.print.util.PrintingUtils"
] | import java.util.ArrayList; import java.util.List; import javax.xml.transform.Source; import org.kuali.coeus.common.budget.framework.print.BudgetPrintType; import org.kuali.coeus.common.framework.print.util.PrintingUtils; | import java.util.*; import javax.xml.transform.*; import org.kuali.coeus.common.budget.framework.print.*; import org.kuali.coeus.common.framework.print.util.*; | [
"java.util",
"javax.xml",
"org.kuali.coeus"
] | java.util; javax.xml; org.kuali.coeus; | 810,351 |
public AsynchronousJobStatus getAsynchJobStatus(DispatcherServlet instance, Long userId, String jobId) throws Exception {
MockHttpServletRequest request = ServletTestHelperUtils.initRequest(
HTTPMODE.GET, UrlHelpers.ASYNCHRONOUS_JOB+"/"+jobId, userId, null);
MockHttpServletResponse response = new MockHttp... | AsynchronousJobStatus function(DispatcherServlet instance, Long userId, String jobId) throws Exception { MockHttpServletRequest request = ServletTestHelperUtils.initRequest( HTTPMODE.GET, UrlHelpers.ASYNCHRONOUS_JOB+"/"+jobId, userId, null); MockHttpServletResponse response = new MockHttpServletResponse(); instance.ser... | /**
* Get the status for a job
*
* @param instance
* @param userId
* @param jobId
* @return
* @throws Exception
*/ | Get the status for a job | getAsynchJobStatus | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/repository/src/test/java/org/sagebionetworks/repo/web/controller/ServletTestHelper.java",
"license": "apache-2.0",
"size": 93773
} | [
"org.sagebionetworks.repo.model.asynch.AsynchronousJobStatus",
"org.sagebionetworks.repo.web.UrlHelpers",
"org.sagebionetworks.schema.adapter.org.json.EntityFactory",
"org.springframework.mock.web.MockHttpServletRequest",
"org.springframework.mock.web.MockHttpServletResponse",
"org.springframework.web.ser... | import org.sagebionetworks.repo.model.asynch.AsynchronousJobStatus; import org.sagebionetworks.repo.web.UrlHelpers; import org.sagebionetworks.schema.adapter.org.json.EntityFactory; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.spring... | import org.sagebionetworks.repo.model.asynch.*; import org.sagebionetworks.repo.web.*; import org.sagebionetworks.schema.adapter.org.json.*; import org.springframework.mock.web.*; import org.springframework.web.servlet.*; | [
"org.sagebionetworks.repo",
"org.sagebionetworks.schema",
"org.springframework.mock",
"org.springframework.web"
] | org.sagebionetworks.repo; org.sagebionetworks.schema; org.springframework.mock; org.springframework.web; | 631,758 |
private void doSaveManifest(Jar dot) throws Exception {
String output = getProperty(SAVEMANIFEST);
if (output == null)
return;
File f = getFile(output);
if (f.isDirectory()) {
f = new File(f, "MANIFEST.MF");
}
if (!f.exists() || f.lastModified() < dot.lastModified()) {
IO.delete(f);
File fp ... | void function(Jar dot) throws Exception { String output = getProperty(SAVEMANIFEST); if (output == null) return; File f = getFile(output); if (f.isDirectory()) { f = new File(f, STR); } if (!f.exists() f.lastModified() < dot.lastModified()) { IO.delete(f); File fp = f.getParentFile(); IO.mkdirs(fp); try (OutputStream o... | /**
* Get the manifest and write it out separately if -savemanifest is set
*
* @param dot
*/ | Get the manifest and write it out separately if -savemanifest is set | doSaveManifest | {
"repo_name": "mcculls/bnd",
"path": "biz.aQute.bndlib/src/aQute/bnd/osgi/Builder.java",
"license": "apache-2.0",
"size": 50886
} | [
"java.io.File",
"java.io.OutputStream"
] | import java.io.File; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,316,410 |
public Date getGeneralizedTime(int len) throws IOException {
if (len > available())
throw new IOException("short read of DER Generalized Time");
if (len < 13)
throw new IOException("DER Generalized Time length error");
return getTime(len, true);
} | Date function(int len) throws IOException { if (len > available()) throw new IOException(STR); if (len < 13) throw new IOException(STR); return getTime(len, true); } | /**
* Returns the Generalized Time value that takes up the specified
* number of bytes in this buffer.
* @param len the number of bytes to use
*/ | Returns the Generalized Time value that takes up the specified number of bytes in this buffer | getGeneralizedTime | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/java.base/share/classes/sun/security/util/DerInputBuffer.java",
"license": "gpl-2.0",
"size": 15762
} | [
"java.io.IOException",
"java.util.Date"
] | import java.io.IOException; import java.util.Date; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,308,012 |
public Boolean getAllowsRecordDeletion(MaintenanceDocument document); | Boolean function(MaintenanceDocument document); | /**
* Indicates whether the given maintenance document is configured to allow record deletions
*
* @param document - maintenance document instance to check
* @return Boolean true if record deletion is allowed, false if not allowed, null if not configured
*/ | Indicates whether the given maintenance document is configured to allow record deletions | getAllowsRecordDeletion | {
"repo_name": "sbower/kuali-rice-1",
"path": "kns/src/main/java/org/kuali/rice/kns/service/MaintenanceDocumentDictionaryService.java",
"license": "apache-2.0",
"size": 12083
} | [
"org.kuali.rice.kns.document.MaintenanceDocument"
] | import org.kuali.rice.kns.document.MaintenanceDocument; | import org.kuali.rice.kns.document.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,188,312 |
public static Test suite(String property) {
return suite(addAll(property), getMissing(property));
} | static Test function(String property) { return suite(addAll(property), getMissing(property)); } | /**
* Generates a TestSuite for the given ClassLister property
* and returns it. Potentially missing test classes are output.
*
* @param property the GPC property to generate a test suite from
* @return the generated test suite
*/ | Generates a TestSuite for the given ClassLister property and returns it. Potentially missing test classes are output | suite | {
"repo_name": "automenta/adams-core",
"path": "src/test/java/adams/test/AdamsTestSuite.java",
"license": "gpl-3.0",
"size": 9261
} | [
"junit.framework.Test"
] | import junit.framework.Test; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,331,992 |
public void AddAtom(Atom atom){
if(this.getChildNode(atom.getAtomAsReteKey()) == null){
//System.out.println("Adding new SelectionNode!: " + atom);
SelectionNode sel = new SelectionNode(atom.getAtomAsReteKey(), this.rete);
//System.err.println("I am: " + this + "of size: ... | void function(Atom atom){ if(this.getChildNode(atom.getAtomAsReteKey()) == null){ SelectionNode sel = new SelectionNode(atom.getAtomAsReteKey(), this.rete); this.basicChildren.add(sel); } } /*public Collection<Instance> select(Term[] selectionCriteria){ return memory.select(selectionCriteria); } public boolean contains... | /**
*
* this registers an Atom to this basicNode. The basicNode creates a selectionNode for that atom and adds it to it's children
*
* @param atom the atom you want to register to this basicNode. (Has to be of same predicate as the BasicNodes predicate)
*/ | this registers an Atom to this basicNode. The basicNode creates a selectionNode for that atom and adds it to it's children | AddAtom | {
"repo_name": "AntoniusW/omiga",
"path": "src/Datastructure/Rete/BasicNode.java",
"license": "bsd-2-clause",
"size": 6317
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,902,253 |
public Ticket get(final String ticketId) {
final TicketDefinition metadata = this.ticketCatalog.find(ticketId);
if (metadata != null) {
final Map<String, AttributeValue> keys = new HashMap<>();
keys.put(ColumnNames.ID.getName(), new AttributeValue(ticketId));
fin... | Ticket function(final String ticketId) { final TicketDefinition metadata = this.ticketCatalog.find(ticketId); if (metadata != null) { final Map<String, AttributeValue> keys = new HashMap<>(); keys.put(ColumnNames.ID.getName(), new AttributeValue(ticketId)); final GetItemRequest request = new GetItemRequest() .withKey(k... | /**
* Get ticket.
*
* @param ticketId the ticket id
* @return the ticket
*/ | Get ticket | get | {
"repo_name": "petracvv/cas",
"path": "support/cas-server-support-dynamodb-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/DynamoDbTicketRegistryFacilitator.java",
"license": "apache-2.0",
"size": 11337
} | [
"com.amazonaws.services.dynamodbv2.model.AttributeValue",
"com.amazonaws.services.dynamodbv2.model.GetItemRequest",
"java.util.HashMap",
"java.util.Map",
"org.apereo.cas.ticket.Ticket",
"org.apereo.cas.ticket.TicketDefinition"
] | import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.GetItemRequest; import java.util.HashMap; import java.util.Map; import org.apereo.cas.ticket.Ticket; import org.apereo.cas.ticket.TicketDefinition; | import com.amazonaws.services.dynamodbv2.model.*; import java.util.*; import org.apereo.cas.ticket.*; | [
"com.amazonaws.services",
"java.util",
"org.apereo.cas"
] | com.amazonaws.services; java.util; org.apereo.cas; | 1,797,096 |
public void setContainerHLAnnotationHLAPI(
HLAnnotationHLAPI elem){
if(elem!=null)
item.setContainerHLAnnotation((HLAnnotation)elem.getContainedItem());
}
| void function( HLAnnotationHLAPI elem){ if(elem!=null) item.setContainerHLAnnotation((HLAnnotation)elem.getContainedItem()); } | /**
* set ContainerHLAnnotation
*/ | set ContainerHLAnnotation | setContainerHLAnnotationHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/SubstringHLAPI.java",
"license": "epl-1.0",
"size": 111893
} | [
"fr.lip6.move.pnml.hlpn.hlcorestructure.HLAnnotation",
"fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI"
] | import fr.lip6.move.pnml.hlpn.hlcorestructure.HLAnnotation; import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI; | import fr.lip6.move.pnml.hlpn.hlcorestructure.*; import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,719,617 |
ReportingTaskEntity deleteReportingTask(Revision revision, String reportingTaskId); | ReportingTaskEntity deleteReportingTask(Revision revision, String reportingTaskId); | /**
* Deletes the specified reporting task.
*
* @param revision Revision to compare with current base revision
* @param reportingTaskId The reporting task id
* @return snapshot
*/ | Deletes the specified reporting task | deleteReportingTask | {
"repo_name": "jskora/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 83710
} | [
"org.apache.nifi.web.api.entity.ReportingTaskEntity"
] | import org.apache.nifi.web.api.entity.ReportingTaskEntity; | import org.apache.nifi.web.api.entity.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 1,253,498 |
private List<Pair<String, Serializable>> searchForUniqueValuesOfOldestInstances(PropertyDefinition propertyDefinition, String definitionId, String fieldUri) {
String query = getUniqueValuesOfOldestInstancesSemanticQuery(propertyDefinition);
Map<String, Serializable> bindings = new HashMap<>(2);
bindings.put("d... | List<Pair<String, Serializable>> function(PropertyDefinition propertyDefinition, String definitionId, String fieldUri) { String query = getUniqueValuesOfOldestInstancesSemanticQuery(propertyDefinition); Map<String, Serializable> bindings = new HashMap<>(2); bindings.put(STR, definitionId); bindings.put(STR, fieldUri); ... | /**
* Searches all different values of couples <code>definitionId</code> and <code>fieldUri</code> and returns oldest
* instances for every one of them.
*
* @return list with pairs. A pair contain the instance id of oldest instance and the value.
*/ | Searches all different values of couples <code>definitionId</code> and <code>fieldUri</code> and returns oldest instances for every one of them | searchForUniqueValuesOfOldestInstances | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/instance-core/src/main/java/com/sirma/itt/sep/instance/unique/UniqueValueValidationServiceImpl.java",
"license": "lgpl-3.0",
"size": 17099
} | [
"com.sirma.itt.seip.Pair",
"com.sirma.itt.seip.domain.definition.PropertyDefinition",
"com.sirma.itt.seip.domain.instance.Instance",
"com.sirma.itt.seip.domain.search.SearchArguments",
"com.sirma.itt.seip.domain.search.SearchDialects",
"com.sirma.itt.seip.search.ResultItem",
"com.sirma.itt.seip.search.R... | import com.sirma.itt.seip.Pair; import com.sirma.itt.seip.domain.definition.PropertyDefinition; import com.sirma.itt.seip.domain.instance.Instance; import com.sirma.itt.seip.domain.search.SearchArguments; import com.sirma.itt.seip.domain.search.SearchDialects; import com.sirma.itt.seip.search.ResultItem; import com.sir... | import com.sirma.itt.seip.*; import com.sirma.itt.seip.domain.definition.*; import com.sirma.itt.seip.domain.instance.*; import com.sirma.itt.seip.domain.search.*; import com.sirma.itt.seip.search.*; import java.io.*; import java.util.*; import java.util.stream.*; | [
"com.sirma.itt",
"java.io",
"java.util"
] | com.sirma.itt; java.io; java.util; | 1,774,200 |
public static java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> findByc(
long companyId)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByc(companyId);
} | static java.util.List<de.fraunhofer.fokus.movepla.model.Entitlement> function( long companyId) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByc(companyId); } | /**
* Returns all the entitlements where companyId = ?.
*
* @param companyId the company ID
* @return the matching entitlements
* @throws SystemException if a system exception occurred
*/ | Returns all the entitlements where companyId = ? | findByc | {
"repo_name": "fraunhoferfokus/govapps",
"path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/persistence/EntitlementUtil.java",
"license": "bsd-3-clause",
"size": 25989
} | [
"com.liferay.portal.kernel.exception.SystemException",
"de.fraunhofer.fokus.movepla.model.Entitlement",
"java.util.List"
] | import com.liferay.portal.kernel.exception.SystemException; import de.fraunhofer.fokus.movepla.model.Entitlement; import java.util.List; | import com.liferay.portal.kernel.exception.*; import de.fraunhofer.fokus.movepla.model.*; import java.util.*; | [
"com.liferay.portal",
"de.fraunhofer.fokus",
"java.util"
] | com.liferay.portal; de.fraunhofer.fokus; java.util; | 100,073 |
@Nullable
public UpdateEnvironment getStatusEnvironment() {
return null;
} | UpdateEnvironment function() { return null; } | /**
* Returns the interface for performing "check status" operations (operations which show the differences between
* the local working copy state and the latest server state).
*
* @return the status interface, or null if the check status operation is not supported or required by the VCS.
*/ | Returns the interface for performing "check status" operations (operations which show the differences between the local working copy state and the latest server state) | getStatusEnvironment | {
"repo_name": "hurricup/intellij-community",
"path": "platform/vcs-api/src/com/intellij/openapi/vcs/AbstractVcs.java",
"license": "apache-2.0",
"size": 20104
} | [
"com.intellij.openapi.vcs.update.UpdateEnvironment"
] | import com.intellij.openapi.vcs.update.UpdateEnvironment; | import com.intellij.openapi.vcs.update.*; | [
"com.intellij.openapi"
] | com.intellij.openapi; | 825,279 |
try {
TestClient tc = new TestClient();
m = WSMarshallerFactory.createInstance();
m.removeAllTypeClasses();
m.addXmlTypeClass(Status.class);
// Wait some seconds until the SAL comes up
Thread.sleep(2500);
} catch (Exception e) {
logger.debug(e.getMessage(), e);
Assert.fail();
... | try { TestClient tc = new TestClient(); m = WSMarshallerFactory.createInstance(); m.removeAllTypeClasses(); m.addXmlTypeClass(Status.class); Thread.sleep(2500); } catch (Exception e) { logger.debug(e.getMessage(), e); Assert.fail(); } } | /**
* Start up the TestClient.
*
* @throws Exception
*/ | Start up the TestClient | setUpClass | {
"repo_name": "adelapie/open-ecard-IRMA",
"path": "bindings/http/src/test/java/org/openecard/control/binding/http/HTTPBindingTest.java",
"license": "apache-2.0",
"size": 8143
} | [
"org.openecard.ws.marshal.WSMarshallerFactory",
"org.openecard.ws.schema.Status",
"org.testng.Assert"
] | import org.openecard.ws.marshal.WSMarshallerFactory; import org.openecard.ws.schema.Status; import org.testng.Assert; | import org.openecard.ws.marshal.*; import org.openecard.ws.schema.*; import org.testng.*; | [
"org.openecard.ws",
"org.testng"
] | org.openecard.ws; org.testng; | 13,035 |
public void generate()
{
final XMLReader xmlReader = new XMLReader();
final Element doc = xmlReader.read(reader);
final NodeList nodeList = doc.getElementsByTagName("factionhub");
int size = nodeList.getLength();
final Map<String, Point> nameToPoint = new TreeMap<String,... | void function() { final XMLReader xmlReader = new XMLReader(); final Element doc = xmlReader.read(reader); final NodeList nodeList = doc.getElementsByTagName(STR); int size = nodeList.getLength(); final Map<String, Point> nameToPoint = new TreeMap<String, Point>(); for (int i = 0; i < size; i++) { final Node node = nod... | /**
* Generate enums.
*/ | Generate enums | generate | {
"repo_name": "jmthompson2015/vizzini",
"path": "game/illyriad/src/main/java/org/vizzini/illyriad/TradeHubEnumGenerator.java",
"license": "mit",
"size": 4462
} | [
"java.awt.Point",
"java.io.IOException",
"java.util.Map",
"java.util.TreeMap",
"org.vizzini.core.XMLReader",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import java.awt.Point; import java.io.IOException; import java.util.Map; import java.util.TreeMap; import org.vizzini.core.XMLReader; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import java.awt.*; import java.io.*; import java.util.*; import org.vizzini.core.*; import org.w3c.dom.*; | [
"java.awt",
"java.io",
"java.util",
"org.vizzini.core",
"org.w3c.dom"
] | java.awt; java.io; java.util; org.vizzini.core; org.w3c.dom; | 1,787,364 |
public void addChangeListener(PropertyChangeListener listener) {
jobExecutorStateChangeSupport.addPropertyChangeListener(listener);
} | void function(PropertyChangeListener listener) { jobExecutorStateChangeSupport.addPropertyChangeListener(listener); } | /**
* Adds a listener for general task execution state (how many tasks are running etc).
*/ | Adds a listener for general task execution state (how many tasks are running etc) | addChangeListener | {
"repo_name": "chipster/chipster",
"path": "src/main/java/fi/csc/microarray/client/tasks/TaskExecutor.java",
"license": "mit",
"size": 22296
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 2,785,001 |
public void countUserBindings() throws Exception {
GroupSpaceBinding groupSpaceBinding = this.getGroupSpaceBindingInstance(1, spaceId, "/platform/administrators");
groupSpaceBinding = groupSpaceBindingStorage.saveGroupSpaceBinding(groupSpaceBinding);
tearDownGroupbindingList.add(groupSpaceBinding);
User... | void function() throws Exception { GroupSpaceBinding groupSpaceBinding = this.getGroupSpaceBindingInstance(1, spaceId, STR); groupSpaceBinding = groupSpaceBindingStorage.saveGroupSpaceBinding(groupSpaceBinding); tearDownGroupbindingList.add(groupSpaceBinding); UserSpaceBinding userSpaceBinding = this.getUserBindingInst... | /**
* Test
* {@link org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage#getUserBindings(String, String)}
*
* @throws Exception
**/ | Test <code>org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage#getUserBindings(String, String)</code> | countUserBindings | {
"repo_name": "exodev/social",
"path": "component/core/src/test/java/org/exoplatform/social/core/binding/spi/RDBMSGroupSpaceBindingStorageTest.java",
"license": "lgpl-3.0",
"size": 21805
} | [
"org.exoplatform.social.core.binding.model.GroupSpaceBinding",
"org.exoplatform.social.core.binding.model.UserSpaceBinding",
"org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage"
] | import org.exoplatform.social.core.binding.model.GroupSpaceBinding; import org.exoplatform.social.core.binding.model.UserSpaceBinding; import org.exoplatform.social.core.storage.api.GroupSpaceBindingStorage; | import org.exoplatform.social.core.binding.model.*; import org.exoplatform.social.core.storage.api.*; | [
"org.exoplatform.social"
] | org.exoplatform.social; | 2,577,618 |
ToStringContext<NAMETYPE> parent();
class EmptyStringContext<NAMETYPE extends Name> implements ToStringContext<NAMETYPE> {
@Override
public String getBinding(String name) { return null; } | ToStringContext<NAMETYPE> parent(); class EmptyStringContext<NAMETYPE extends Name> implements ToStringContext<NAMETYPE> { public String getBinding(String name) { return null; } | /**
* Returns the parent context of this (the context we're in scope of when this is created),
* or null if this is the root.
*/ | Returns the parent context of this (the context we're in scope of when this is created), or null if this is the root | parent | {
"repo_name": "vespa-engine/vespa",
"path": "vespajlib/src/main/java/com/yahoo/tensor/functions/ToStringContext.java",
"license": "apache-2.0",
"size": 1386
} | [
"com.yahoo.tensor.evaluation.Name"
] | import com.yahoo.tensor.evaluation.Name; | import com.yahoo.tensor.evaluation.*; | [
"com.yahoo.tensor"
] | com.yahoo.tensor; | 2,475,850 |
protected String getVfsPrefix() {
if (null == m_vfsPrefix) {
m_vfsPrefix = OpenCms.getStaticExportManager().getVfsPrefix();
}
return m_vfsPrefix;
} | String function() { if (null == m_vfsPrefix) { m_vfsPrefix = OpenCms.getStaticExportManager().getVfsPrefix(); } return m_vfsPrefix; } | /**
* Initializes m_vfsPrefix lazily, otherwise it does not work.
* @return the VFS prefix as added to internal links
*/ | Initializes m_vfsPrefix lazily, otherwise it does not work | getVfsPrefix | {
"repo_name": "gallardo/opencms-core",
"path": "test/org/opencms/xml/content/TestCmsXmlContentWithVfs.java",
"license": "lgpl-2.1",
"size": 110539
} | [
"org.opencms.main.OpenCms"
] | import org.opencms.main.OpenCms; | import org.opencms.main.*; | [
"org.opencms.main"
] | org.opencms.main; | 389,544 |
public boolean isNear( Point2D q ) {
if ( waypoints.length == 0 )
return false;
return isNear( q, 0, waypoints.length - 1 );
}
private static class Segment {
int first;
int last;
int closest;
public Segment() {
this(-1, -2);
}
publ... | boolean function( Point2D q ) { if ( waypoints.length == 0 ) return false; return isNear( q, 0, waypoints.length - 1 ); } private static class Segment { int first; int last; int closest; public Segment() { this(-1, -2); } public Segment(int first, int last) { this.first = first; this.last = last; closest = -1; } | /**
* Determine if the given waypoint is within the target distance from any point in the sequence.
* @param q
* @return true if the waypoint is near the sequence, otherwise false.
*/ | Determine if the given waypoint is within the target distance from any point in the sequence | isNear | {
"repo_name": "melato/next-bus",
"path": "src/org/melato/geometry/gpx/ProximityFinder.java",
"license": "gpl-3.0",
"size": 11333
} | [
"org.melato.gps.Point2D"
] | import org.melato.gps.Point2D; | import org.melato.gps.*; | [
"org.melato.gps"
] | org.melato.gps; | 1,524,779 |
public DocumentMutation setOrReplace(@NonNullable FieldPath path, @NonNullable Document doc); | DocumentMutation function(@NonNullable FieldPath path, @NonNullable Document doc); | /**
* Sets or replaces the field at the given FieldPath to the specified
* {@code Document}.
*
* @param path path of the field that needs to be updated
* @param doc the new value to set at the FieldPath
* @return {@code this} for chained invocation
*/ | Sets or replaces the field at the given FieldPath to the specified Document | setOrReplace | {
"repo_name": "ojai/ojai",
"path": "java/core/src/main/java/org/ojai/store/DocumentMutation.java",
"license": "apache-2.0",
"size": 47815
} | [
"org.ojai.Document",
"org.ojai.FieldPath",
"org.ojai.annotation.API"
] | import org.ojai.Document; import org.ojai.FieldPath; import org.ojai.annotation.API; | import org.ojai.*; import org.ojai.annotation.*; | [
"org.ojai",
"org.ojai.annotation"
] | org.ojai; org.ojai.annotation; | 2,771,533 |
try {
CReilInstructionDialog.show(parent, codeNode);
} catch (final InternalTranslationException exception) {
CUtilityFunctions.logException(exception);
final String message = "E00XXX: " + "Could not show REIL code";
final String description =
CUtilityFunctions.createDescription(
... | try { CReilInstructionDialog.show(parent, codeNode); } catch (final InternalTranslationException exception) { CUtilityFunctions.logException(exception); final String message = STR + STR; final String description = CUtilityFunctions.createDescription( String.format(STR, codeNode.getAddress()), new String[] {STR}, new St... | /**
* Shows the REIL code for a code node.
*
* @param parent Parent window used for dialogs.
* @param codeNode The code node whose REIL code is shown.
*/ | Shows the REIL code for a code node | showReilCode | {
"repo_name": "google/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/ZyGraph/Implementations/CInstructionFunctions.java",
"license": "apache-2.0",
"size": 3382
} | [
"com.google.security.zynamics.binnavi.CUtilityFunctions",
"com.google.security.zynamics.binnavi.Gui",
"com.google.security.zynamics.reil.translators.InternalTranslationException"
] | import com.google.security.zynamics.binnavi.CUtilityFunctions; import com.google.security.zynamics.binnavi.Gui; import com.google.security.zynamics.reil.translators.InternalTranslationException; | import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.reil.translators.*; | [
"com.google.security"
] | com.google.security; | 1,749,931 |
protected Transformation<RowData> createSourceFunctionTransformation(
StreamExecutionEnvironment env,
SourceFunction<RowData> function,
boolean isBounded,
String operatorName,
TypeInformation<RowData> outputTypeInfo) {
env.clean(function);
... | Transformation<RowData> function( StreamExecutionEnvironment env, SourceFunction<RowData> function, boolean isBounded, String operatorName, TypeInformation<RowData> outputTypeInfo) { env.clean(function); final int parallelism; if (function instanceof ParallelSourceFunction) { parallelism = env.getParallelism(); } else ... | /**
* Adopted from {@link StreamExecutionEnvironment#addSource(SourceFunction, String,
* TypeInformation)} but with custom {@link Boundedness}.
*/ | Adopted from <code>StreamExecutionEnvironment#addSource(SourceFunction, String, TypeInformation)</code> but with custom <code>Boundedness</code> | createSourceFunctionTransformation | {
"repo_name": "StephanEwen/incubator-flink",
"path": "flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/common/CommonExecTableSourceScan.java",
"license": "apache-2.0",
"size": 7740
} | [
"org.apache.flink.api.common.typeinfo.TypeInformation",
"org.apache.flink.api.connector.source.Boundedness",
"org.apache.flink.api.dag.Transformation",
"org.apache.flink.streaming.api.environment.StreamExecutionEnvironment",
"org.apache.flink.streaming.api.functions.source.ParallelSourceFunction",
"org.ap... | import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.connector.source.Boundedness; import org.apache.flink.api.dag.Transformation; import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; import org.apache.flink.streaming.api.functions.source.ParallelSourceFuncti... | import org.apache.flink.api.common.typeinfo.*; import org.apache.flink.api.connector.source.*; import org.apache.flink.api.dag.*; import org.apache.flink.streaming.api.environment.*; import org.apache.flink.streaming.api.functions.source.*; import org.apache.flink.streaming.api.operators.*; import org.apache.flink.stre... | [
"org.apache.flink"
] | org.apache.flink; | 1,561,960 |
public static boolean hasController(HasMetadata resource) {
return getControllerUid(resource) != null;
} | static boolean function(HasMetadata resource) { return getControllerUid(resource) != null; } | /**
* Checks whether the resource has some controller(parent) or not.
*
* @param resource resource
* @return boolean value indicating whether it's a child or not.
*/ | Checks whether the resource has some controller(parent) or not | hasController | {
"repo_name": "fabric8io/kubernetes-client",
"path": "kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/KubernetesResourceUtil.java",
"license": "apache-2.0",
"size": 14662
} | [
"io.fabric8.kubernetes.api.model.HasMetadata"
] | import io.fabric8.kubernetes.api.model.HasMetadata; | import io.fabric8.kubernetes.api.model.*; | [
"io.fabric8.kubernetes"
] | io.fabric8.kubernetes; | 410,615 |
public List<ResourceReference> getResourceDependencies( JobMeta jobMeta ) {
return new ArrayList<ResourceReference>( 5 ); // default: return an empty resource dependency list. Lower the
// initial capacity
} | List<ResourceReference> function( JobMeta jobMeta ) { return new ArrayList<ResourceReference>( 5 ); } | /**
* Gets a list of all the resource dependencies that the step is depending on. In JobEntryBase, this method returns an
* empty resource dependency list.
*
* @return an empty list of ResourceReferences
* @see ResourceReference
*/ | Gets a list of all the resource dependencies that the step is depending on. In JobEntryBase, this method returns an empty resource dependency list | getResourceDependencies | {
"repo_name": "apratkin/pentaho-kettle",
"path": "engine/src/org/pentaho/di/job/entry/JobEntryBase.java",
"license": "apache-2.0",
"size": 41980
} | [
"java.util.ArrayList",
"java.util.List",
"org.pentaho.di.job.JobMeta",
"org.pentaho.di.resource.ResourceReference"
] | import java.util.ArrayList; import java.util.List; import org.pentaho.di.job.JobMeta; import org.pentaho.di.resource.ResourceReference; | import java.util.*; import org.pentaho.di.job.*; import org.pentaho.di.resource.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 1,989,425 |
loadUrl(NOTIFICATION_TEST_PAGE);
setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW);
Notification notification = showAndGetNotification("MyNotification", "{ body: 'Hello' }");
// Validate the contents of the notification.
assertEquals("MyNotification", notification.ext... | loadUrl(NOTIFICATION_TEST_PAGE); setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW); Notification notification = showAndGetNotification(STR, STR); assertEquals(STR, notification.extras.getString(Notification.EXTRA_TITLE)); assertEquals("Hello", notification.extras.getString(Notification.EXTRA_TEXT)); a... | /**
* Verifies that the intended default properties of a notification will indeed be set on the
* Notification object that will be send to Android.
*/ | Verifies that the intended default properties of a notification will indeed be set on the Notification object that will be send to Android | testDefaultNotificationProperties | {
"repo_name": "js0701/chromium-crosswalk",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java",
"license": "bsd-3-clause",
"size": 14563
} | [
"android.app.Notification",
"android.os.Build",
"org.chromium.chrome.browser.preferences.website.ContentSetting",
"org.chromium.chrome.browser.util.UrlUtilities"
] | import android.app.Notification; import android.os.Build; import org.chromium.chrome.browser.preferences.website.ContentSetting; import org.chromium.chrome.browser.util.UrlUtilities; | import android.app.*; import android.os.*; import org.chromium.chrome.browser.preferences.website.*; import org.chromium.chrome.browser.util.*; | [
"android.app",
"android.os",
"org.chromium.chrome"
] | android.app; android.os; org.chromium.chrome; | 763,296 |
public TestResult[] getBadChecksumTests() {
return badChecksumTests;
} | TestResult[] function() { return badChecksumTests; } | /**
* Get a list of tests that had bad checksums during the analysis.
* @return A set of tests, or null if none.
*/ | Get a list of tests that had bad checksums during the analysis | getBadChecksumTests | {
"repo_name": "Distrotech/icedtea7-2.3",
"path": "test/jtreg/com/sun/javatest/audit/Audit.java",
"license": "gpl-2.0",
"size": 27280
} | [
"com.sun.javatest.TestResult"
] | import com.sun.javatest.TestResult; | import com.sun.javatest.*; | [
"com.sun.javatest"
] | com.sun.javatest; | 1,421,347 |
public void testSimpleJPQL() {
// Clear db first.
testSetup();
EntityManager em = createEntityManager();
try {
// all
Query query = em.createQuery("Select o from Order o");
List results = query.getResultList();
if (results.size() != 10)... | void function() { testSetup(); EntityManager em = createEntityManager(); try { Query query = em.createQuery(STR); List results = query.getResultList(); if (results.size() != 10) { fail(STR + results); } Order order = (Order)results.get(0); query = em.createQuery(STR); query.setParameter("oid", order.id); results = quer... | /**
* Test JPQL.
*/ | Test JPQL | testSimpleJPQL | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/eclipselink.extension.nosql.test/src/org/eclipse/persistence/testing/tests/jpa/mongo/MongoTestSuite.java",
"license": "epl-1.0",
"size": 30664
} | [
"java.util.List",
"javax.persistence.EntityManager",
"javax.persistence.Query",
"org.eclipse.persistence.testing.models.jpa.mongo.Order"
] | import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; import org.eclipse.persistence.testing.models.jpa.mongo.Order; | import java.util.*; import javax.persistence.*; import org.eclipse.persistence.testing.models.jpa.mongo.*; | [
"java.util",
"javax.persistence",
"org.eclipse.persistence"
] | java.util; javax.persistence; org.eclipse.persistence; | 2,096,737 |
public static void bbSmileytoEmoji(SpannableStringBuilder ssb){
//Take care of emoticons that have others as their prefix, ie. :ohnoes:, :ohno:, :omg:
//:ohno: is a prefix of :ohnoes: and :o is a prefix of all 3
String[] conflicts = {":ohnoes:", ":ohno:", ":omg:"};
for (String emoticon : conflicts){
Strin... | static void function(SpannableStringBuilder ssb){ String[] conflicts = {STR, STR, ":omg:"}; for (String emoticon : conflicts){ String emoji = emojisBB.get(emoticon); for (int i = WhatBBParser.indexOf(ssb, emoticon); i != -1; i = WhatBBParser.indexOf(ssb, emoticon, i)){ ssb.replace(i, i + emoticon.length(), emoji); } } ... | /**
* Find site bb formatted smilies in the text and convert them to emoji characters in the text
* and the spannable string
*
* @param ssb spannable string to convert emojis in
*/ | Find site bb formatted smilies in the text and convert them to emoji characters in the text and the spannable string | bbSmileytoEmoji | {
"repo_name": "stuxo/WhatAndroid",
"path": "WhatAndroid/src/main/java/what/whatandroid/comments/SmileyProcessor.java",
"license": "bsd-2-clause",
"size": 6839
} | [
"android.text.SpannableStringBuilder",
"java.util.HashMap",
"java.util.Map",
"java.util.regex.Pattern"
] | import android.text.SpannableStringBuilder; import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; | import android.text.*; import java.util.*; import java.util.regex.*; | [
"android.text",
"java.util"
] | android.text; java.util; | 1,795,727 |
private PointF transformCoordTouchToBitmap(float x, float y, boolean clipToBitmap) {
matrix.getValues(m);
float origW = getDrawable().getIntrinsicWidth();
float origH = getDrawable().getIntrinsicHeight();
float transX = m[Matrix.MTRANS_X];
float transY = m[Matrix.MTRANS_Y];
... | PointF function(float x, float y, boolean clipToBitmap) { matrix.getValues(m); float origW = getDrawable().getIntrinsicWidth(); float origH = getDrawable().getIntrinsicHeight(); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y]; float finalX = ((x - transX) * origW) / getImageWidth(); float finalY = ... | /**
* This function will transform the coordinates in the touch event to the coordinate
* system of the drawable that the imageview contain
* @param x x-coordinate of touch event
* @param y y-coordinate of touch event
* @param clipToBitmap Touch event may occur within view, but outside image co... | This function will transform the coordinates in the touch event to the coordinate system of the drawable that the imageview contain | transformCoordTouchToBitmap | {
"repo_name": "gianei/SmartCatalogSPL",
"path": "core/src/main/java/com/glsebastiany/smartcatalogspl/core/presentation/widget/TouchImageView.java",
"license": "gpl-3.0",
"size": 43480
} | [
"android.graphics.Matrix",
"android.graphics.PointF"
] | import android.graphics.Matrix; import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,871,227 |
@Deployment(order = 1)
private ResourceAdapterArchive createResourceAdapter() throws Throwable
{
return ResourceAdapterFactory.createUnifiedSecurityRar();
} | @Deployment(order = 1) ResourceAdapterArchive function() throws Throwable { return ResourceAdapterFactory.createUnifiedSecurityRar(); } | /**
* The resource adapter
*
* @throws Throwable In case of an error
*/ | The resource adapter | createResourceAdapter | {
"repo_name": "jandsu/ironjacamar",
"path": "testsuite/src/test/java/org/ironjacamar/core/connectionmanager/pool/dflt/FlushFailingConnectionOnlyTestCase.java",
"license": "epl-1.0",
"size": 6221
} | [
"org.ironjacamar.embedded.Deployment",
"org.ironjacamar.rars.ResourceAdapterFactory",
"org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive"
] | import org.ironjacamar.embedded.Deployment; import org.ironjacamar.rars.ResourceAdapterFactory; import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; | import org.ironjacamar.embedded.*; import org.ironjacamar.rars.*; import org.jboss.shrinkwrap.api.spec.*; | [
"org.ironjacamar.embedded",
"org.ironjacamar.rars",
"org.jboss.shrinkwrap"
] | org.ironjacamar.embedded; org.ironjacamar.rars; org.jboss.shrinkwrap; | 285,105 |
public ModelNode execute(ModelNode request) throws Exception {
ModelControllerClient mcc = getModelControllerClient();
return mcc.execute(request, OperationMessageHandler.logging);
} | ModelNode function(ModelNode request) throws Exception { ModelControllerClient mcc = getModelControllerClient(); return mcc.execute(request, OperationMessageHandler.logging); } | /**
* Convienence method that executes the request.
*
* @param request request to execute
* @return results results of execution
* @throws Exception any error
*/ | Convienence method that executes the request | execute | {
"repo_name": "jsanda/hawkular-agent",
"path": "hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/JBossASClient.java",
"license": "apache-2.0",
"size": 17638
} | [
"org.jboss.as.controller.client.ModelControllerClient",
"org.jboss.as.controller.client.OperationMessageHandler",
"org.jboss.dmr.ModelNode"
] | import org.jboss.as.controller.client.ModelControllerClient; import org.jboss.as.controller.client.OperationMessageHandler; import org.jboss.dmr.ModelNode; | import org.jboss.as.controller.client.*; import org.jboss.dmr.*; | [
"org.jboss.as",
"org.jboss.dmr"
] | org.jboss.as; org.jboss.dmr; | 681,428 |
public BigFraction subtract(final long l) {
return subtract(BigInteger.valueOf(l));
} | BigFraction function(final long l) { return subtract(BigInteger.valueOf(l)); } | /**
* <p>
* Subtracts the value of a {@code long} from the value of this
* {@code BigFraction}, returning the result in reduced form.
* </p>
*
* @param l the {@code long} to subtract.
* @return a {@code BigFraction} instance with the resulting values.
*/ | Subtracts the value of a long from the value of this BigFraction, returning the result in reduced form. | subtract | {
"repo_name": "charles-cooper/idylfin",
"path": "src/org/apache/commons/math3/fraction/BigFraction.java",
"license": "apache-2.0",
"size": 38428
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 690,913 |
public Groups getGroups() {
if (groups == null) {
groups = accountRepository.getGroups(account);
}
return groups;
} | Groups function() { if (groups == null) { groups = accountRepository.getGroups(account); } return groups; } | /**
* Returns the value of account groups. Users list is lazy loaded from
* accounts api on demand.
*
* @return {@link #groups} - account groups
*/ | Returns the value of account groups. Users list is lazy loaded from accounts api on demand | getGroups | {
"repo_name": "ow2-xlcloud/vcms",
"path": "vcms-gui/modules/accounts/src/main/java/org/xlcloud/console/accounts/controllers/AccountBean.java",
"license": "apache-2.0",
"size": 16571
} | [
"org.xlcloud.service.Groups"
] | import org.xlcloud.service.Groups; | import org.xlcloud.service.*; | [
"org.xlcloud.service"
] | org.xlcloud.service; | 2,512,197 |
public Reader getLargeStringReader(String text) throws IOException {
long[] borders = largeStringPos.get(text);
if (borders == null)
throw new IllegalArgumentException("It's not large string");
return getLargeStringReader(borders[0], borders[1]);
}
| Reader function(String text) throws IOException { long[] borders = largeStringPos.get(text); if (borders == null) throw new IllegalArgumentException(STR); return getLargeStringReader(borders[0], borders[1]); } | /**
* Search large string position and allow to read this large string as reader.
* @param text
* @return reader substituting large strings
* @throws IOException
*/ | Search large string position and allow to read this large string as reader | getLargeStringReader | {
"repo_name": "MrCreosote/java_common",
"path": "src/us/kbase/common/service/JsonTokenStream.java",
"license": "mit",
"size": 44129
} | [
"java.io.IOException",
"java.io.Reader"
] | import java.io.IOException; import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 2,586,017 |
public static int compareDaysBetween(final Object object0, final Object object1, final boolean descending) {
try {
if (null == object0) {
return (null == object1) ? DominoUtils.EQUAL : (descending) ? DominoUtils.GREATER_THAN : DominoUtils.LESS_THAN;
} else if (null == object1) {
return (descendi... | static int function(final Object object0, final Object object1, final boolean descending) { try { if (null == object0) { return (null == object1) ? DominoUtils.EQUAL : (descending) ? DominoUtils.GREATER_THAN : DominoUtils.LESS_THAN; } else if (null == object1) { return (descending) ? DominoUtils.LESS_THAN : DominoUtils... | /**
* Compares two Objects as Dates
*
* Arguments are first compared by existence, then by value.
*
* @param object0
* First date to compare.
*
* @param object1
* Second date to compare.
*
* @param descending
* flags indicating comparison order. t... | Compares two Objects as Dates Arguments are first compared by existence, then by value | compareDaysBetween | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/utils/Dates.java",
"license": "apache-2.0",
"size": 47487
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 280,256 |
public void waitWhilePresent(String cssSelector, WebDriver webDriver, long timeOutInSeconds) {
WebDriverWait webDriverWait = new WebDriverWait(webDriver, timeOutInSeconds, calcSleepTimeMillis(timeOutInSeconds));
webDriverWait.until(ExpectedConditions.numberOfElementsToBe(By.cssSelector(cssSelector), 0));
}
| void function(String cssSelector, WebDriver webDriver, long timeOutInSeconds) { WebDriverWait webDriverWait = new WebDriverWait(webDriver, timeOutInSeconds, calcSleepTimeMillis(timeOutInSeconds)); webDriverWait.until(ExpectedConditions.numberOfElementsToBe(By.cssSelector(cssSelector), 0)); } | /**
* Wait until the selector matches zero elements
* @param cssSelector
* @param webDriver
* @param timeOutInSeconds
*/ | Wait until the selector matches zero elements | waitWhilePresent | {
"repo_name": "xtianus/yadaframework",
"path": "YadaWeb/src/main/java/net/yadaframework/selenium/YadaSeleniumUtil.java",
"license": "mit",
"size": 29078
} | [
"org.openqa.selenium.By",
"org.openqa.selenium.WebDriver",
"org.openqa.selenium.support.ui.ExpectedConditions",
"org.openqa.selenium.support.ui.WebDriverWait"
] | import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; | import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 130,570 |
protected HttpURLConnection post(String url, String body)
throws IOException {
return post(url, "application/x-www-form-urlencoded;charset=UTF-8", body);
} | HttpURLConnection function(String url, String body) throws IOException { return post(url, STR, body); } | /**
* Make an HTTP post to a given URL.
*
* @return HTTP response.
*/ | Make an HTTP post to a given URL | post | {
"repo_name": "avram/gcm",
"path": "gcm-server/src/com/google/android/gcm/server/Sender.java",
"license": "apache-2.0",
"size": 23652
} | [
"java.io.IOException",
"java.net.HttpURLConnection"
] | import java.io.IOException; import java.net.HttpURLConnection; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 304,724 |
private Node tryFoldAssignment(Node subtree) {
Preconditions.checkState(subtree.isAssign());
Node left = subtree.getFirstChild();
Node right = subtree.getLastChild();
// Only names
if (left.isName()
&& right.isName()
&& left.getString().equals(right.getString())) {
subtree.ge... | Node function(Node subtree) { Preconditions.checkState(subtree.isAssign()); Node left = subtree.getFirstChild(); Node right = subtree.getLastChild(); if (left.isName() && right.isName() && left.getString().equals(right.getString())) { subtree.getParent().replaceChild(subtree, right.detachFromParent()); reportCodeChange... | /**
* Try removing identity assignments
* @return the replacement node, if changed, or the original if not
*/ | Try removing identity assignments | tryFoldAssignment | {
"repo_name": "redforks/closure-compiler",
"path": "src/com/google/javascript/jscomp/PeepholeRemoveDeadCode.java",
"license": "apache-2.0",
"size": 32888
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,793,435 |
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
int column, RectangularShape bar, RectangleEdge base) {
Paint itemPaint = renderer.getItemPaint(row, column);
Color c0, c1;
if (itemPaint instanceof Color) {
c0 = (Color) itemPaint;
... | void function(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base) { Paint itemPaint = renderer.getItemPaint(row, column); Color c0, c1; if (itemPaint instanceof Color) { c0 = (Color) itemPaint; c1 = c0.brighter(); } else if (itemPaint instanceof GradientPaint) { Gradien... | /**
* Paints a single bar instance.
*
* @param g2 the graphics target.
* @param renderer the renderer.
* @param row the row index.
* @param column the column index.
* @param bar the bar
* @param base indicates which side of the rectangle is the base of the
* ... | Paints a single bar instance | paintBar | {
"repo_name": "integrated/jfreechart",
"path": "source/org/jfree/chart/renderer/xy/GradientXYBarPainter.java",
"license": "lgpl-2.1",
"size": 12909
} | [
"java.awt.Color",
"java.awt.GradientPaint",
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.Stroke",
"java.awt.geom.Rectangle2D",
"java.awt.geom.RectangularShape",
"org.jfree.ui.RectangleEdge"
] | import java.awt.Color; import java.awt.GradientPaint; import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.Rectangle2D; import java.awt.geom.RectangularShape; import org.jfree.ui.RectangleEdge; | import java.awt.*; import java.awt.geom.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.ui"
] | java.awt; org.jfree.ui; | 718,882 |
@Override
public void process(WatchedEvent event) {
if (Event.EventType.None == event.getType()
&& Event.KeeperState.Expired == event.getState()) {
Set<String> keySet = new HashSet<String>(listeners.keySet());
for (String logSegmentsPath : keySet) {
... | void function(WatchedEvent event) { if (Event.EventType.None == event.getType() && Event.KeeperState.Expired == event.getState()) { Set<String> keySet = new HashSet<String>(listeners.keySet()); for (String logSegmentsPath : keySet) { scheduleTask(logSegmentsPath, new ReadLogSegmentsTask(logSegmentsPath, this), 0L); } r... | /**
* Process the watched events for registered listeners
*/ | Process the watched events for registered listeners | process | {
"repo_name": "twitter/distributedlog",
"path": "distributedlog-core/src/main/java/com/twitter/distributedlog/impl/ZKLogSegmentMetadataStore.java",
"license": "apache-2.0",
"size": 13941
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.zookeeper.WatchedEvent"
] | import java.util.HashSet; import java.util.Set; import org.apache.zookeeper.WatchedEvent; | import java.util.*; import org.apache.zookeeper.*; | [
"java.util",
"org.apache.zookeeper"
] | java.util; org.apache.zookeeper; | 2,648,889 |
public final void writePingAck() throws ProtocolException {
try {
out.writeByte(MessageResponse.PING_ACK.getValue());
} catch (IOException e) {
throw new ProtocolException("I/O Error Marshaling a ProtocolAck", e);
}
} | final void function() throws ProtocolException { try { out.writeByte(MessageResponse.PING_ACK.getValue()); } catch (IOException e) { throw new ProtocolException(STR, e); } } | /**
* Writes a {@link MessageResponse#PING_ACK} into the ouput stream.
*
* @throws ProtocolException
* if there is an error in the underlying protocol
*/ | Writes a <code>MessageResponse#PING_ACK</code> into the ouput stream | writePingAck | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/modules/rmi2/src/ar/org/fitc/rmi/transport/jrmp/ServerProtocolHandler.java",
"license": "apache-2.0",
"size": 4604
} | [
"ar.org.fitc.rmi.transport.ProtocolException",
"java.io.IOException"
] | import ar.org.fitc.rmi.transport.ProtocolException; import java.io.IOException; | import ar.org.fitc.rmi.transport.*; import java.io.*; | [
"ar.org.fitc",
"java.io"
] | ar.org.fitc; java.io; | 1,404,992 |
public void setCodeTemplates(Map<String, CodeTemplate> codeTemplates) {
this.codeTemplates = codeTemplates;
} | void function(Map<String, CodeTemplate> codeTemplates) { this.codeTemplates = codeTemplates; } | /**
* Setter method for property <tt>codeTemplates</tt>.
*
* @param codeTemplates value to be assigned to property codeTemplates
*/ | Setter method for property codeTemplates | setCodeTemplates | {
"repo_name": "yunjuanyunshu-mayuan/CodeGenerate",
"path": "src/main/java/com/yunjuanyunshu/CodeMakerSettings.java",
"license": "apache-2.0",
"size": 10688
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,268,804 |
private void ageDeliveryPreds() {
double timeDiff = (SimClock.getTime() - this.lastAgeUpdate)
/ secondsInTimeUnit;
if (timeDiff == 0) {
return;
}
double mult = Math.pow(GAMMA, timeDiff);
for (Map.Entry<DTNHost, Double> e : preds.entrySet()) {
... | void function() { double timeDiff = (SimClock.getTime() - this.lastAgeUpdate) / secondsInTimeUnit; if (timeDiff == 0) { return; } double mult = Math.pow(GAMMA, timeDiff); for (Map.Entry<DTNHost, Double> e : preds.entrySet()) { e.setValue(e.getValue() * mult); } this.lastAgeUpdate = SimClock.getTime(); } | /**
* Ages all entries in the delivery predictions.
* <CODE>P(a,b) = P(a,b)_old * (GAMMA ^ k)</CODE>, where k is number of time
* units that have elapsed since the last time the metric was aged.
*
* @see #SECONDS_IN_UNIT_S
*/ | Ages all entries in the delivery predictions. <code>P(a,b) = P(a,b)_old * (GAMMA ^ k)</code>, where k is number of time units that have elapsed since the last time the metric was aged | ageDeliveryPreds | {
"repo_name": "barun-saha/one-simulator",
"path": "one_1.5.1-RC2/routing/SnwPtuRouter.java",
"license": "gpl-3.0",
"size": 11540
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,748,379 |
public boolean isBasketEmpty() {
return basket == null || basket.isEmpty();
}
/**
* Increments the quantity of the specified item in the basket by the
* quantity sent into the method.
*
* @param item
* The {@link com.idega.block.basket.data.BasketItem BasketItem} | boolean function() { return basket == null basket.isEmpty(); } /** * Increments the quantity of the specified item in the basket by the * quantity sent into the method. * * @param item * The {@link com.idega.block.basket.data.BasketItem BasketItem} | /**
* Returns whether basket is empty or not
*
* @return boolean
*/ | Returns whether basket is empty or not | isBasketEmpty | {
"repo_name": "idega/com.idega.block.basket",
"path": "src/java/com/idega/block/basket/business/BasketBusinessBean.java",
"license": "gpl-3.0",
"size": 5773
} | [
"com.idega.block.basket.data.BasketItem"
] | import com.idega.block.basket.data.BasketItem; | import com.idega.block.basket.data.*; | [
"com.idega.block"
] | com.idega.block; | 2,805,545 |
void addMetaData(String key, String data) throws ActiveMQException; | void addMetaData(String key, String data) throws ActiveMQException; | /**
* Attach any metadata to the session.
*
* @throws ActiveMQException
*/ | Attach any metadata to the session | addMetaData | {
"repo_name": "tabish121/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java",
"license": "apache-2.0",
"size": 54407
} | [
"org.apache.activemq.artemis.api.core.ActiveMQException"
] | import org.apache.activemq.artemis.api.core.ActiveMQException; | import org.apache.activemq.artemis.api.core.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,555,965 |
public GHCommit getCommit() throws IOException {
return getOwner().getCommit(getSHA1());
} | GHCommit function() throws IOException { return getOwner().getCommit(getSHA1()); } | /**
* Gets the commit to which this comment is associated with.
*/ | Gets the commit to which this comment is associated with | getCommit | {
"repo_name": "appbank2020/GitRobot",
"path": "src/org/kohsuke/github/GHCommitComment.java",
"license": "apache-2.0",
"size": 2776
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,195,485 |
public Task getCreationTask() throws ProcessManagerException {
try {
Task creationTask = Workflow.getTaskManager().getCreationTask(
currentUser, currentRole, processModel);
return creationTask;
} catch (WorkflowException e) {
throw new ProcessManagerException("SessionController",
... | Task function() throws ProcessManagerException { try { Task creationTask = Workflow.getTaskManager().getCreationTask( currentUser, currentRole, processModel); return creationTask; } catch (WorkflowException e) { throw new ProcessManagerException(STR, STR, e); } } | /**
* Returns the creation task.
*/ | Returns the creation task | getCreationTask | {
"repo_name": "CecileBONIN/Silverpeas-Components",
"path": "process-manager/process-manager-war/src/main/java/com/silverpeas/processManager/ProcessManagerSessionController.java",
"license": "agpl-3.0",
"size": 73623
} | [
"com.silverpeas.workflow.api.Workflow",
"com.silverpeas.workflow.api.WorkflowException",
"com.silverpeas.workflow.api.task.Task"
] | import com.silverpeas.workflow.api.Workflow; import com.silverpeas.workflow.api.WorkflowException; import com.silverpeas.workflow.api.task.Task; | import com.silverpeas.workflow.api.*; import com.silverpeas.workflow.api.task.*; | [
"com.silverpeas.workflow"
] | com.silverpeas.workflow; | 409,911 |
// FIXME: merge with NFSv4 defaults
if (filename.length() > 256) {
throw new NameTooLongException();
}
if (filename.length() == 0 || filename.indexOf('/') != -1 || filename.indexOf('\0') != -1 ) {
throw new AccessException();
}
} | if (filename.length() > 256) { throw new NameTooLongException(); } if (filename.length() == 0 filename.indexOf('/') != -1 filename.indexOf('\0') != -1 ) { throw new AccessException(); } } | /**
* Validate ${code filename} requirements.
* @param filename
* @throws AccessException if filename does not meet expected constrains
* @throws NameTooLongException if filename is longer than negotiated with PATHCONF operation.
*/ | Validate ${code filename} requirements | checkFilename | {
"repo_name": "devsunny/app-galleries",
"path": "dcache-nfs/src/main/java/org/dcache/nfs/v3/NameUtils.java",
"license": "mit",
"size": 1807
} | [
"org.dcache.nfs.status.AccessException",
"org.dcache.nfs.status.NameTooLongException"
] | import org.dcache.nfs.status.AccessException; import org.dcache.nfs.status.NameTooLongException; | import org.dcache.nfs.status.*; | [
"org.dcache.nfs"
] | org.dcache.nfs; | 1,649,367 |
private String getTaskId(Task task)
{
return task.getGUID() == null
? getIntegerString(task.getUniqueID())
: task.getGUID().toString();
} | String function(Task task) { return task.getGUID() == null ? getIntegerString(task.getUniqueID()) : task.getGUID().toString(); } | /**
* Gets the task id, using GUID if available else unique id
*/ | Gets the task id, using GUID if available else unique id | getTaskId | {
"repo_name": "ddelemeny/calligra",
"path": "filters/plan/mpxj/planconvert/src/plan/PlanWriter.java",
"license": "gpl-2.0",
"size": 54275
} | [
"net.sf.mpxj.Task"
] | import net.sf.mpxj.Task; | import net.sf.mpxj.*; | [
"net.sf.mpxj"
] | net.sf.mpxj; | 1,914,106 |
public InternalCache getCache() {
return _cache;
} | InternalCache function() { return _cache; } | /**
* Returns the GemFire cache
*
* @return the GemFire cache
*/ | Returns the GemFire cache | getCache | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java",
"license": "apache-2.0",
"size": 70723
} | [
"org.apache.geode.internal.cache.InternalCache"
] | import org.apache.geode.internal.cache.InternalCache; | import org.apache.geode.internal.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,634,502 |
@Override
public void fit(INDArray input, INDArray labels) {
setInput(input);
setLabels(labels);
applyDropOutIfNecessary(true);
if (solver == null) {
solver = new Solver.Builder().configure(conf()).listeners(getListeners()).model(this).build();
//Set the u... | void function(INDArray input, INDArray labels) { setInput(input); setLabels(labels); applyDropOutIfNecessary(true); if (solver == null) { solver = new Solver.Builder().configure(conf()).listeners(getListeners()).model(this).build(); Updater updater = solver.getOptimizer().getUpdater(); int updaterStateSize = updater.st... | /**
* Fit the model
*
* @param input the examples to classify (one example in each row)
* @param labels the example labels(a binary outcome matrix)
*/ | Fit the model | fit | {
"repo_name": "crockpotveggies/deeplearning4j",
"path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/LossLayer.java",
"license": "apache-2.0",
"size": 13180
} | [
"org.deeplearning4j.nn.api.Updater",
"org.deeplearning4j.optimize.Solver",
"org.nd4j.linalg.api.ndarray.INDArray",
"org.nd4j.linalg.factory.Nd4j"
] | import org.deeplearning4j.nn.api.Updater; import org.deeplearning4j.optimize.Solver; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; | import org.deeplearning4j.nn.api.*; import org.deeplearning4j.optimize.*; import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.factory.*; | [
"org.deeplearning4j.nn",
"org.deeplearning4j.optimize",
"org.nd4j.linalg"
] | org.deeplearning4j.nn; org.deeplearning4j.optimize; org.nd4j.linalg; | 1,793,284 |
private static HashMap readHashMap(final InputStreamer input) throws IOException
{
HashMap map = null;
int numberOfFields = input.readInt();
if( numberOfFields > 0 ) map = new HashMap();
String key;
Object value;
int valueType;
for(int i=0; i<numberOfF... | static HashMap function(final InputStreamer input) throws IOException { HashMap map = null; int numberOfFields = input.readInt(); if( numberOfFields > 0 ) map = new HashMap(); String key; Object value; int valueType; for(int i=0; i<numberOfFields; i++) { key = input.readUTF(); valueType = input.readByte(); if( valueTyp... | /**
* Internal method for deserializing a HashMap from an InputStreamer.
*/ | Internal method for deserializing a HashMap from an InputStreamer | readHashMap | {
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jserver/tcp/messaging/MessageHeader.java",
"license": "apache-2.0",
"size": 27161
} | [
"com.teletalk.jserver.util.InputStreamer",
"java.io.IOException",
"java.util.HashMap"
] | import com.teletalk.jserver.util.InputStreamer; import java.io.IOException; import java.util.HashMap; | import com.teletalk.jserver.util.*; import java.io.*; import java.util.*; | [
"com.teletalk.jserver",
"java.io",
"java.util"
] | com.teletalk.jserver; java.io; java.util; | 2,167,974 |
@Test
public void testGetByUnexistantCode() {
System.out.print("test Language getByCode with unexistant code");
String code = "dd";
Language result = lDao.getByCode(code);
Assert.assertNull(result);
} | void function() { System.out.print(STR); String code = "dd"; Language result = lDao.getByCode(code); Assert.assertNull(result); } | /**
* Test of getByCode method with null fecthing, of class LanguageDAOImpl.
*/ | Test of getByCode method with null fecthing, of class LanguageDAOImpl | testGetByUnexistantCode | {
"repo_name": "motech/MOTECH-Mobile",
"path": "motech-mobile-core/src/test/java/org/motechproject/mobile/core/dao/hibernate/LanguageDAOImplTest.java",
"license": "bsd-3-clause",
"size": 7478
} | [
"org.junit.Assert",
"org.motechproject.mobile.core.model.Language"
] | import org.junit.Assert; import org.motechproject.mobile.core.model.Language; | import org.junit.*; import org.motechproject.mobile.core.model.*; | [
"org.junit",
"org.motechproject.mobile"
] | org.junit; org.motechproject.mobile; | 113,039 |
@Override
public AuthenticatorFlowStatus process(HttpServletRequest request, HttpServletResponse response,
AuthenticationContext context)
throws AuthenticationFailedException, LogoutFailedException {
if (context.isLogoutRequest()) {
return AuthenticatorFlowStatus.SUCC... | AuthenticatorFlowStatus function(HttpServletRequest request, HttpServletResponse response, AuthenticationContext context) throws AuthenticationFailedException, LogoutFailedException { if (context.isLogoutRequest()) { return AuthenticatorFlowStatus.SUCCESS_COMPLETED; } else if (request.getParameter(TOTPAuthenticatorCons... | /**
* This method is overridden to check additional condition like whether request is having
* sendToken, token parameters, generateTOTPToken and authentication name.
*
* @param request Http servlet request
* @param response Http servlet response
* @param context AuthenticationContext
* @return Authenti... | This method is overridden to check additional condition like whether request is having sendToken, token parameters, generateTOTPToken and authentication name | process | {
"repo_name": "keerthu/identity-outbound-auth-totp",
"path": "component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticator.java",
"license": "apache-2.0",
"size": 20210
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.identity.application.authentication.framework.AuthenticatorFlowStatus",
"org.wso2.carbon.identity.application.authentication.framework.context.AuthenticationContext",
... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.application.authentication.framework.AuthenticatorFlowStatus; import org.wso2.carbon.identity.application.authentication.framework.context.Authenticati... | import javax.servlet.http.*; import org.apache.commons.lang.*; import org.wso2.carbon.identity.application.authentication.framework.*; import org.wso2.carbon.identity.application.authentication.framework.context.*; import org.wso2.carbon.identity.application.authentication.framework.exception.*; | [
"javax.servlet",
"org.apache.commons",
"org.wso2.carbon"
] | javax.servlet; org.apache.commons; org.wso2.carbon; | 428,635 |
void expandPluginConfiguration( Model model, ModelBuildingRequest request, ModelProblemCollector problems ); | void expandPluginConfiguration( Model model, ModelBuildingRequest request, ModelProblemCollector problems ); | /**
* Merges values from general build plugin configuration into the individual plugin executions of the given model.
*
* @param model The model whose build plugin configuration should be expanded, must not be <code>null</code>.
* @param request The model building request that holds further setting... | Merges values from general build plugin configuration into the individual plugin executions of the given model | expandPluginConfiguration | {
"repo_name": "Distrotech/maven",
"path": "maven-model-builder/src/main/java/org/apache/maven/model/plugin/PluginConfigurationExpander.java",
"license": "apache-2.0",
"size": 1774
} | [
"org.apache.maven.model.Model",
"org.apache.maven.model.building.ModelBuildingRequest",
"org.apache.maven.model.building.ModelProblemCollector"
] | import org.apache.maven.model.Model; import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.model.building.ModelProblemCollector; | import org.apache.maven.model.*; import org.apache.maven.model.building.*; | [
"org.apache.maven"
] | org.apache.maven; | 2,652,315 |
private static void addTotalRow(Table table, Object[] contents, RtfFont font, int borderTop,
int borderBottom) {
Cell labelCell = ReportServiceHelper.createTableCell(contents[0], font, null,
ReportServiceHelper.RTF_ALIGN_RIGHT, null, 2);
labelCell.... | static void function(Table table, Object[] contents, RtfFont font, int borderTop, int borderBottom) { Cell labelCell = ReportServiceHelper.createTableCell(contents[0], font, null, ReportServiceHelper.RTF_ALIGN_RIGHT, null, 2); labelCell.setBorderWidthTop(borderTop); labelCell.setBorderWidthBottom(borderBottom); table.a... | /**
* Adds a total row to the table.
*
* @param table
* the table.
* @param contents
* the columns contents.
* @param font
* the font to use.
* @param borderTop
* the border top width.
* @param borderBottom
* the border ... | Adds a total row to the table | addTotalRow | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/ejb/gov/opm/scrd/services/impl/reporting/BalancedScorecardPaymentReportService.java",
"license": "apache-2.0",
"size": 81516
} | [
"com.lowagie.text.Cell",
"com.lowagie.text.Table",
"com.lowagie.text.rtf.style.RtfFont"
] | import com.lowagie.text.Cell; import com.lowagie.text.Table; import com.lowagie.text.rtf.style.RtfFont; | import com.lowagie.text.*; import com.lowagie.text.rtf.style.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 1,514,372 |
public static Map<String, Object> getBufferedImage(String fileLocation, Locale locale)
throws IllegalArgumentException, IOException {
BufferedImage bufImg;
Map<String, Object> result = new LinkedHashMap<String, Object>();
try {
bufImg = ImageIO.read(... | static Map<String, Object> function(String fileLocation, Locale locale) throws IllegalArgumentException, IOException { BufferedImage bufImg; Map<String, Object> result = new LinkedHashMap<String, Object>(); try { bufImg = ImageIO.read(new File(fileLocation)); } catch (IllegalArgumentException e) { String errMsg = UtilP... | /**
* getBufferedImage
* <p>
* Set a buffered image
*
* @param fileLocation Full file Path or URL
* @return URL images for all different size types
* @throws IOException Error prevents the document from being fully parsed
* @throws IllegalArgumentException Errors occur in... | getBufferedImage Set a buffered image | getBufferedImage | {
"repo_name": "rohankarthik/Ofbiz",
"path": "framework/common/src/main/java/org/apache/ofbiz/common/image/ImageTransform.java",
"license": "apache-2.0",
"size": 13355
} | [
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException",
"java.util.LinkedHashMap",
"java.util.Locale",
"java.util.Map",
"javax.imageio.ImageIO",
"org.apache.ofbiz.base.util.Debug",
"org.apache.ofbiz.base.util.UtilProperties",
"org.apache.ofbiz.service.ModelService"
] | import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; import javax.imageio.ImageIO; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilProperties; import org.apache.ofbiz.service.Mo... | import java.awt.image.*; import java.io.*; import java.util.*; import javax.imageio.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.service.*; | [
"java.awt",
"java.io",
"java.util",
"javax.imageio",
"org.apache.ofbiz"
] | java.awt; java.io; java.util; javax.imageio; org.apache.ofbiz; | 933,771 |
public Collection<HelpTopic> getHelpTopics(); | Collection<HelpTopic> function(); | /**
* Returns a collection of all the registered help topics.
*
* @return All the registered help topics.
*/ | Returns a collection of all the registered help topics | getHelpTopics | {
"repo_name": "XKnucklesX/Offit",
"path": "src/org/Offit/help/HelpMap.java",
"license": "gpl-2.0",
"size": 2900
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 438,701 |
private void sortAirportsByHemipshere (AirportStatistics airportStats, JsonArray airportArray) {
int northernAirports = 0;
int southernAirports = 0;
for (int i = 0; i < airportArray.size(); i++) {
if (airportArray.getJsonObject(i).getDouble("longitude") >= 0) {
northernAirports ++;
} else {
south... | void function (AirportStatistics airportStats, JsonArray airportArray) { int northernAirports = 0; int southernAirports = 0; for (int i = 0; i < airportArray.size(); i++) { if (airportArray.getJsonObject(i).getDouble(STR) >= 0) { northernAirports ++; } else { southernAirports ++; } airportStats.increaseRegion(airportAr... | /**
*
* Helper method
*
* @param airportStats - AirportStatistics object to fill
* @param resultArray - JsonArray to parse
*/ | Helper method | sortAirportsByHemipshere | {
"repo_name": "sasa-radovanovic/ff-flight-diary",
"path": "src/main/java/frequentFlyer/flight_diary/repos/AirportRepo.java",
"license": "mit",
"size": 11405
} | [
"io.vertx.core.json.JsonArray"
] | import io.vertx.core.json.JsonArray; | import io.vertx.core.json.*; | [
"io.vertx.core"
] | io.vertx.core; | 1,831,664 |
public Entity<T> removeIdClass()
{
childNode.removeChildren("id-class");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: Entity ElementName: orm:inheritance ElementType : inheritance
// MaxOccurs:... | Entity<T> function() { childNode.removeChildren(STR); return this; } | /**
* Removes the <code>id-class</code> element
* @return the current instance of <code>Entity<T></code>
*/ | Removes the <code>id-class</code> element | removeIdClass | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm10/EntityImpl.java",
"license": "epl-1.0",
"size": 47108
} | [
"org.jboss.shrinkwrap.descriptor.api.orm10.Entity"
] | import org.jboss.shrinkwrap.descriptor.api.orm10.Entity; | import org.jboss.shrinkwrap.descriptor.api.orm10.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,769,088 |
@SmallTest
@Feature({"ContextualSearch"})
@Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
public void testTapGestureSelects() throws InterruptedException, TimeoutException {
clickWordNode("intelligence");
assertEquals("Intelligence", getSelectedText());
fakeResponse(false, 200,... | @Feature({STR}) @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) void function() throws InterruptedException, TimeoutException { clickWordNode(STR); assertEquals(STR, getSelectedText()); fakeResponse(false, 200, STR, STR, STR, false); assertContainsParameters(STR, STR); waitForPanelToPeek(); assertLoadedLowPriorityUrl... | /**
* Tests that a Tap gesture selects the expected text.
*/ | Tests that a Tap gesture selects the expected text | testTapGestureSelects | {
"repo_name": "was4444/chromium.src",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java",
"license": "bsd-3-clause",
"size": 103579
} | [
"java.util.concurrent.TimeoutException",
"org.chromium.base.test.util.Feature",
"org.chromium.base.test.util.Restriction"
] | import java.util.concurrent.TimeoutException; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction; | import java.util.concurrent.*; import org.chromium.base.test.util.*; | [
"java.util",
"org.chromium.base"
] | java.util; org.chromium.base; | 1,448,190 |
public LocalDateTime getCreatedAt() {
return createdAt;
} | LocalDateTime function() { return createdAt; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ASYNC_PROCESS.CREATED_AT
*
* @return the value of ASYNC_PROCESS.CREATED_AT
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column ASYNC_PROCESS.CREATED_AT | getCreatedAt | {
"repo_name": "agwlvssainokuni/springapp",
"path": "common/src/generated/java/cherry/common/db/gen/dto/AsyncProcess.java",
"license": "apache-2.0",
"size": 16723
} | [
"org.joda.time.LocalDateTime"
] | import org.joda.time.LocalDateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,511,340 |
protected void tabletypeinfo() {
clear();
try {
this.fetch.add(getMetaData().getTableTypes());
} catch (SQLException e) {
throw zxJDBC.makeException(e);
}
}
| void function() { clear(); try { this.fetch.add(getMetaData().getTableTypes()); } catch (SQLException e) { throw zxJDBC.makeException(e); } } | /**
* Gets a description of possible table types.
*/ | Gets a description of possible table types | tabletypeinfo | {
"repo_name": "DarioGT/OMS-PluginXML",
"path": "org.modelsphere.sms/lib/jython-2.2.1/src/java/src/com/ziclix/python/sql/PyExtendedCursor.java",
"license": "gpl-3.0",
"size": 18278
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 498,167 |
public ServiceFuture<SqlVirtualMachineGroupInner> updateAsync(String resourceGroupName, String sqlVirtualMachineGroupName, Map<String, String> tags, final ServiceCallback<SqlVirtualMachineGroupInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, sqlVi... | ServiceFuture<SqlVirtualMachineGroupInner> function(String resourceGroupName, String sqlVirtualMachineGroupName, Map<String, String> tags, final ServiceCallback<SqlVirtualMachineGroupInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, sqlVirtualMachineGroupName,... | /**
* Updates SQL virtual machine group tags.
*
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param tags... | Updates SQL virtual machine group tags | updateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/sqlvirtualmachine/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sqlvirtualmachine/v2017_03_01_preview/implementation/SqlVirtualMachineGroupsInner.java",
"license": "mit",
"size": 82749
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.Map"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 526,115 |
@Override
public List<Comparable> getColumnKeys() {
List<Comparable> result = new java.util.ArrayList<Comparable>();
int last = lastCategoryIndex();
for (int i = this.firstCategoryIndex; i < last; i++) {
result.add(this.underlying.getColumnKey(i));
}
re... | List<Comparable> function() { List<Comparable> result = new java.util.ArrayList<Comparable>(); int last = lastCategoryIndex(); for (int i = this.firstCategoryIndex; i < last; i++) { result.add(this.underlying.getColumnKey(i)); } return Collections.unmodifiableList(result); } | /**
* Returns the column keys.
*
* @return The keys.
*
* @see #getColumnKey(int)
*/ | Returns the column keys | getColumnKeys | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/data/gantt/SlidingGanttCategoryDataset.java",
"license": "lgpl-2.1",
"size": 20229
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 705,352 |
super.setEnvironment(environment);
this.reader.setEnvironment(environment);
this.scanner.setEnvironment(environment);
}
/**
* Provide a custom {@link BeanNameGenerator} for use with
* {@link AnnotatedBeanDefinitionReader} and/or {@link ClassPathBeanDefinitionScanner}
* , if any.
* <p>
* Default is
... | super.setEnvironment(environment); this.reader.setEnvironment(environment); this.scanner.setEnvironment(environment); } /** * Provide a custom {@link BeanNameGenerator} for use with * {@link AnnotatedBeanDefinitionReader} and/or {@link ClassPathBeanDefinitionScanner} * , if any. * <p> * Default is * {@link org.springfr... | /**
* {@inheritDoc}
* <p>
* Delegates given environment to underlying {@link AnnotatedBeanDefinitionReader} and
* {@link ClassPathBeanDefinitionScanner} members.
*/ | Delegates given environment to underlying <code>AnnotatedBeanDefinitionReader</code> and <code>ClassPathBeanDefinitionScanner</code> members | setEnvironment | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/spring-boot-master/spring-boot/src/main/java/org/springframework/boot/context/embedded/AnnotationConfigEmbeddedWebApplicationContext.java",
"license": "mit",
"size": 7281
} | [
"org.springframework.beans.factory.support.BeanNameGenerator",
"org.springframework.context.annotation.AnnotatedBeanDefinitionReader",
"org.springframework.context.annotation.ClassPathBeanDefinitionScanner"
] | import org.springframework.beans.factory.support.BeanNameGenerator; import org.springframework.context.annotation.AnnotatedBeanDefinitionReader; import org.springframework.context.annotation.ClassPathBeanDefinitionScanner; | import org.springframework.beans.factory.support.*; import org.springframework.context.annotation.*; | [
"org.springframework.beans",
"org.springframework.context"
] | org.springframework.beans; org.springframework.context; | 1,175,923 |
public String getIdentifier()
{
return ID3v24Frames.FRAME_ID_ENCODING_TIME;
} | String function() { return ID3v24Frames.FRAME_ID_ENCODING_TIME; } | /**
* The ID3v2 frame identifier
*
* @return the ID3v2 frame identifier for this frame type
*/ | The ID3v2 frame identifier | getIdentifier | {
"repo_name": "syntelos/cddb",
"path": "src/org/jaudiotagger/tag/id3/framebody/FrameBodyTDEN.java",
"license": "lgpl-3.0",
"size": 2147
} | [
"org.jaudiotagger.tag.id3.ID3v24Frames"
] | import org.jaudiotagger.tag.id3.ID3v24Frames; | import org.jaudiotagger.tag.id3.*; | [
"org.jaudiotagger.tag"
] | org.jaudiotagger.tag; | 1,107,799 |
public Client masterClient() {
NodeAndClient randomNodeAndClient = getRandomNodeAndClient(new NodeNamePredicate(getMasterName()));
if (randomNodeAndClient != null) {
return randomNodeAndClient.nodeClient(); // ensure node client master is requested
}
throw new AssertionEr... | Client function() { NodeAndClient randomNodeAndClient = getRandomNodeAndClient(new NodeNamePredicate(getMasterName())); if (randomNodeAndClient != null) { return randomNodeAndClient.nodeClient(); } throw new AssertionError(STR); } | /**
* Returns a node client to the current master node.
* Note: use this with care tests should not rely on a certain nodes client.
*/ | Returns a node client to the current master node. Note: use this with care tests should not rely on a certain nodes client | masterClient | {
"repo_name": "jmluy/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java",
"license": "apache-2.0",
"size": 110894
} | [
"org.elasticsearch.client.Client"
] | import org.elasticsearch.client.Client; | import org.elasticsearch.client.*; | [
"org.elasticsearch.client"
] | org.elasticsearch.client; | 2,763,973 |
public static void main(final String[] args) throws Exception {
if (args.length != 1) {
System.err.println("Verifies the given class.");
System.err.println("Usage: CheckClassAdapter "
+ "<fully qualified class name or class file name>");
return;
... | static void function(final String[] args) throws Exception { if (args.length != 1) { System.err.println(STR); System.err.println(STR + STR); return; } ClassReader cr; if (args[0].endsWith(STR)) { cr = new ClassReader(new FileInputStream(args[0])); } else { cr = new ClassReader(args[0]); } verify(cr, false, new PrintWri... | /**
* Checks a given class. <p> Usage: CheckClassAdapter <fully qualified
* class name or class file name>
*
* @param args the command line arguments.
*
* @throws Exception if the class cannot be found, or if an IO exception
* occurs.
*/ | Checks a given class. Usage: CheckClassAdapter <fully qualified class name or class file name> | main | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/tools/external/asm/org/objectweb/asm/util/CheckClassAdapter.java",
"license": "gpl-2.0",
"size": 15719
} | [
"java.io.FileInputStream",
"java.io.PrintWriter",
"org.objectweb.asm.ClassReader"
] | import java.io.FileInputStream; import java.io.PrintWriter; import org.objectweb.asm.ClassReader; | import java.io.*; import org.objectweb.asm.*; | [
"java.io",
"org.objectweb.asm"
] | java.io; org.objectweb.asm; | 648,893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.