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
@Test public void excludedBasedOnCustomExpressionSyntax() { CustomExpressionBasedNoBean noBean = BeanProvider.getContextualReference(CustomExpressionBasedNoBean.class, true); Assert.assertNull(noBean); }
void function() { CustomExpressionBasedNoBean noBean = BeanProvider.getContextualReference(CustomExpressionBasedNoBean.class, true); Assert.assertNull(noBean); }
/** * bean excluded based on a custom expression syntax */
bean excluded based on a custom expression syntax
excludedBasedOnCustomExpressionSyntax
{ "repo_name": "Danny02/deltaspike", "path": "deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ExcludeTest.java", "license": "apache-2.0", "size": 3183 }
[ "org.apache.deltaspike.core.api.provider.BeanProvider", "org.junit.Assert" ]
import org.apache.deltaspike.core.api.provider.BeanProvider; import org.junit.Assert;
import org.apache.deltaspike.core.api.provider.*; import org.junit.*;
[ "org.apache.deltaspike", "org.junit" ]
org.apache.deltaspike; org.junit;
1,903,105
public DocTemplateFinder getDocTemplateFinder() { return docTemplateFinder; }
DocTemplateFinder function() { return docTemplateFinder; }
/** * Returns the doc template finder. * * @return the doc template finder */
Returns the doc template finder
getDocTemplateFinder
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-dossier-portlet/docroot/WEB-INF/src/org/oep/dossiermgt/service/base/DossierProcBookmarkServiceBaseImpl.java", "license": "apache-2.0", "size": 49450 }
[ "org.oep.dossiermgt.service.persistence.DocTemplateFinder" ]
import org.oep.dossiermgt.service.persistence.DocTemplateFinder;
import org.oep.dossiermgt.service.persistence.*;
[ "org.oep.dossiermgt" ]
org.oep.dossiermgt;
2,400,416
public Builder id(Integer id) { this.id = id; return this; }
Builder function(Integer id) { this.id = id; return this; }
/** * The customer's ID number. */
The customer's ID number
id
{ "repo_name": "pforhan/wire", "path": "wire-runtime/src/test/proto-java/com/squareup/wire/protos/person/Person.java", "license": "apache-2.0", "size": 12892 }
[ "java.lang.Integer" ]
import java.lang.Integer;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,435,300
private boolean verifyValidSignature(String signedData, String signature) { try { return Security.verifyPurchase(BASE_64_ENCODED_PUBLIC_KEY, signedData, signature); } catch (IOException e) { Log.e(TAG, "Got an exception trying to validate a purchase: " + e); retur...
boolean function(String signedData, String signature) { try { return Security.verifyPurchase(BASE_64_ENCODED_PUBLIC_KEY, signedData, signature); } catch (IOException e) { Log.e(TAG, STR + e); return false; } }
/** * Verifies that the purchase was signed correctly for this developer's public key. * <p>Note: It's strongly recommended to perform such check on your backend since hackers can * replace this method with "constant true" if they decompile/rebuild your app. * </p> */
Verifies that the purchase was signed correctly for this developer's public key. Note: It's strongly recommended to perform such check on your backend since hackers can replace this method with "constant true" if they decompile/rebuild your app.
verifyValidSignature
{ "repo_name": "openfl/extension-iap", "path": "dependencies/android/src/org/haxe/extension/iap/util/BillingManager.java", "license": "mit", "size": 17401 }
[ "android.util.Log", "java.io.IOException" ]
import android.util.Log; import java.io.IOException;
import android.util.*; import java.io.*;
[ "android.util", "java.io" ]
android.util; java.io;
80,868
public SSLSession getSslSession() { return null; }
SSLSession function() { return null; }
/** * * Gets the SSLSession of the underlying connection, or null if SSL is not in use. * * Note that for client cert auth {@link #getSslSessionInfo()} should be used instead, as it * takes into account other information potentially provided by load balancers that terminate SSL * * @r...
Gets the SSLSession of the underlying connection, or null if SSL is not in use. Note that for client cert auth <code>#getSslSessionInfo()</code> should be used instead, as it takes into account other information potentially provided by load balancers that terminate SSL
getSslSession
{ "repo_name": "rhusar/undertow", "path": "core/src/main/java/io/undertow/server/ServerConnection.java", "license": "apache-2.0", "size": 9680 }
[ "javax.net.ssl.SSLSession" ]
import javax.net.ssl.SSLSession;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
1,440,135
private void validate( Element bindings ) { NamedNodeMap atts = bindings.getAttributes(); for( int i=0; i<atts.getLength(); i++ ) { Attr a = (Attr)atts.item(i); if( a.getNamespaceURI()!=null ) continue; // all foreign namespace OK. if( a.getLocal...
void function( Element bindings ) { NamedNodeMap atts = bindings.getAttributes(); for( int i=0; i<atts.getLength(); i++ ) { Attr a = (Attr)atts.item(i); if( a.getNamespaceURI()!=null ) continue; if( a.getLocalName().equals("node") ) continue; if( a.getLocalName().equals(STR)) continue; if( a.getLocalName().equals("scd"...
/** * Validates attributes of a &lt;jaxb:bindings> element. */
Validates attributes of a &lt;jaxb:bindings> element
validate
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/tools/internal/xjc/reader/internalizer/Internalizer.java", "license": "gpl-2.0", "size": 18555 }
[ "org.w3c.dom.Attr", "org.w3c.dom.Element", "org.w3c.dom.NamedNodeMap" ]
import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,631,162
public List<Account> search(SortCriteria crit) throws DataAccException { return super.list(Account.class, crit); }
List<Account> function(SortCriteria crit) throws DataAccException { return super.list(Account.class, crit); }
/** * Get all Account objects from database sorted by the given criteria * * @param crit the sorting criteria * @return a list with all existing Account objects * @throws DataAccException on error */
Get all Account objects from database sorted by the given criteria
search
{ "repo_name": "terrex/tntconcept-materials-testing", "path": "src/main/java/com/autentia/intra/dao/hibernate/AccountDAO.java", "license": "gpl-2.0", "size": 4209 }
[ "com.autentia.intra.businessobject.Account", "com.autentia.intra.dao.DataAccException", "com.autentia.intra.dao.SortCriteria", "java.util.List" ]
import com.autentia.intra.businessobject.Account; import com.autentia.intra.dao.DataAccException; import com.autentia.intra.dao.SortCriteria; import java.util.List;
import com.autentia.intra.businessobject.*; import com.autentia.intra.dao.*; import java.util.*;
[ "com.autentia.intra", "java.util" ]
com.autentia.intra; java.util;
446,052
scanClasses(EnumerationType.class); store.beginTransaction(); assertThat(query("MATCH (e:Type:Enum) RETURN e").getColumn("e"), hasItem(typeDescriptor(EnumerationType.class))); assertThat(query("MATCH (e:Type:Enum)-[:EXTENDS]->(s) RETURN s").getColumn("s"), hasItem(typeDescriptor(Enum.class))); ...
scanClasses(EnumerationType.class); store.beginTransaction(); assertThat(query(STR).getColumn("e"), hasItem(typeDescriptor(EnumerationType.class))); assertThat(query(STR).getColumn("s"), hasItem(typeDescriptor(Enum.class))); assertThat(query(STR).getColumn("f"), CoreMatchers.allOf( hasItem(fieldDescriptor(EnumerationTy...
/** * Verifies scanning of {@link EnumerationType}. * * @throws java.io.IOException * If the test fails. * @throws NoSuchMethodException * If the test fails. */
Verifies scanning of <code>EnumerationType</code>
implicitDefaultConstructor
{ "repo_name": "khmarbaise/jqassistant", "path": "plugin/java/src/test/java/com/buschmais/jqassistant/plugin/java/test/scanner/EnumerationIT.java", "license": "gpl-3.0", "size": 2097 }
[ "com.buschmais.jqassistant.plugin.java.test.matcher.MethodDescriptorMatcher", "com.buschmais.jqassistant.plugin.java.test.set.scanner.enumeration.EnumerationType", "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import com.buschmais.jqassistant.plugin.java.test.matcher.MethodDescriptorMatcher; import com.buschmais.jqassistant.plugin.java.test.set.scanner.enumeration.EnumerationType; import org.hamcrest.CoreMatchers; import org.junit.Assert;
import com.buschmais.jqassistant.plugin.java.test.matcher.*; import com.buschmais.jqassistant.plugin.java.test.set.scanner.enumeration.*; import org.hamcrest.*; import org.junit.*;
[ "com.buschmais.jqassistant", "org.hamcrest", "org.junit" ]
com.buschmais.jqassistant; org.hamcrest; org.junit;
880,297
public ArrayList<Path> getResources() { return getWrappedPath().getResources(); }
ArrayList<Path> function() { return getWrappedPath().getResources(); }
/** * Looks up all the existing resources. (Generally only useful * with MergePath. */
Looks up all the existing resources. (Generally only useful with MergePath
getResources
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/vfs/PathWrapper.java", "license": "gpl-2.0", "size": 16137 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
877,728
public List<XmlDom> tags(String tag, String attr, String value) { NodeList nl = root.getElementsByTagName(tag); return convert(nl, null, attr, value); }
List<XmlDom> function(String tag, String attr, String value) { NodeList nl = root.getElementsByTagName(tag); return convert(nl, null, attr, value); }
/** * Return a list of nodes that represents the matched tags that has attribute attr=value. * If attr == null, any tag with specified name matches. * If value == null, any nodes that has the attr matches. * * @param tag tag name * @param attr attr name to match * @param value attr value to match * @...
Return a list of nodes that represents the matched tags that has attribute attr=value. If attr == null, any tag with specified name matches. If value == null, any nodes that has the attr matches
tags
{ "repo_name": "libit/lr_dialer", "path": "app/src/main/java/com/androidquery/util/XmlDom.java", "license": "gpl-3.0", "size": 10479 }
[ "java.util.List", "org.w3c.dom.NodeList" ]
import java.util.List; import org.w3c.dom.NodeList;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
2,662,063
@Override public IPermissionManager newPermissionManager(String owner) { return new PermissionManagerImpl(owner, this); }
IPermissionManager function(String owner) { return new PermissionManagerImpl(owner, this); }
/** * Factory method for IPermissionManager. * * @return org.apereo.portal.security.IPermissionManager * @param owner java.lang.String */
Factory method for IPermissionManager
newPermissionManager
{ "repo_name": "stalele/uPortal", "path": "uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/security/provider/AuthorizationImpl.java", "license": "apache-2.0", "size": 48081 }
[ "org.apereo.portal.security.IPermissionManager" ]
import org.apereo.portal.security.IPermissionManager;
import org.apereo.portal.security.*;
[ "org.apereo.portal" ]
org.apereo.portal;
2,638,632
AuditMessagesManager getAuditMessagesManager();
AuditMessagesManager getAuditMessagesManager();
/** * Gets a AuditMessages manager. * @return AuditMessages manager */
Gets a AuditMessages manager
getAuditMessagesManager
{ "repo_name": "licehammer/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/PerunBl.java", "license": "bsd-2-clause", "size": 5201 }
[ "cz.metacentrum.perun.core.api.AuditMessagesManager" ]
import cz.metacentrum.perun.core.api.AuditMessagesManager;
import cz.metacentrum.perun.core.api.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
2,040,950
@BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final ImageAnnotatorClient create(ImageAnnotatorStub stub) { return new ImageAnnotatorClient(stub); } protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { this.settin...
@BetaApi(STR) static final ImageAnnotatorClient function(ImageAnnotatorStub stub) { return new ImageAnnotatorClient(stub); } protected ImageAnnotatorClient(ImageAnnotatorSettings settings) throws IOException { this.settings = settings; this.stub = ((ImageAnnotatorStubSettings) settings.getStubSettings()).createStub(); ...
/** * Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is * for advanced usage - prefer to use ImageAnnotatorSettings}. */
Constructs an instance of ImageAnnotatorClient, using the given stub for making calls. This is for advanced usage - prefer to use ImageAnnotatorSettings}
create
{ "repo_name": "vam-google/google-cloud-java", "path": "google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java", "license": "apache-2.0", "size": 15576 }
[ "com.google.api.core.BetaApi", "com.google.cloud.vision.v1.stub.ImageAnnotatorStub", "com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings", "com.google.longrunning.OperationsClient", "java.io.IOException" ]
import com.google.api.core.BetaApi; import com.google.cloud.vision.v1.stub.ImageAnnotatorStub; import com.google.cloud.vision.v1.stub.ImageAnnotatorStubSettings; import com.google.longrunning.OperationsClient; import java.io.IOException;
import com.google.api.core.*; import com.google.cloud.vision.v1.stub.*; import com.google.longrunning.*; import java.io.*;
[ "com.google.api", "com.google.cloud", "com.google.longrunning", "java.io" ]
com.google.api; com.google.cloud; com.google.longrunning; java.io;
1,769,775
public int[] getDistinctValues(final int level) { final IntOpenHashSet vals = new IntOpenHashSet(); for (int k = 0; k < map.length; k++) { vals.add(map[k][level]); } final int[] result = new int[vals.size()]; final int[] keys = vals.keys; final ...
int[] function(final int level) { final IntOpenHashSet vals = new IntOpenHashSet(); for (int k = 0; k < map.length; k++) { vals.add(map[k][level]); } final int[] result = new int[vals.size()]; final int[] keys = vals.keys; final boolean[] allocated = vals.allocated; int index = 0; for (int i = 0; i < allocated.length; ...
/** * Returns the distinct values. * * @param level * @return */
Returns the distinct values
getDistinctValues
{ "repo_name": "RaffaelBild/arx", "path": "src/main/org/deidentifier/arx/framework/data/GeneralizationHierarchy.java", "license": "apache-2.0", "size": 8045 }
[ "com.carrotsearch.hppc.IntOpenHashSet" ]
import com.carrotsearch.hppc.IntOpenHashSet;
import com.carrotsearch.hppc.*;
[ "com.carrotsearch.hppc" ]
com.carrotsearch.hppc;
1,471,041
@Generated @Selector("isSupportedForHome:") public static native boolean isSupportedForHome(HMHome home);
@Selector(STR) static native boolean function(HMHome home);
/** * Specifies whether the HMEvent can be added to HMEventTrigger on the given home. */
Specifies whether the HMEvent can be added to HMEventTrigger on the given home
isSupportedForHome
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/homekit/HMEvent.java", "license": "apache-2.0", "size": 5200 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,368,153
@SuppressWarnings("unchecked") private <S,T> void put(ClassPair<S,T> key, final ObjectConverter<? super S, ? extends T> converter) { assert key.getClass() == ClassPair.class; // See SystemConverter.equals(Object) assert key.cast(converter) != null : converter; assert Th...
@SuppressWarnings(STR) <S,T> void function(ClassPair<S,T> key, final ObjectConverter<? super S, ? extends T> converter) { assert key.getClass() == ClassPair.class; assert key.cast(converter) != null : converter; assert Thread.holdsLock(converters); if (converter instanceof SystemConverter<?,?> && converter.getSourceCla...
/** * Puts the given value in the {@linkplain #converters} map for the given key. */
Puts the given value in the #converters map for the given key
put
{ "repo_name": "Geomatys/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java", "license": "apache-2.0", "size": 29318 }
[ "org.apache.sis.util.ObjectConverter" ]
import org.apache.sis.util.ObjectConverter;
import org.apache.sis.util.*;
[ "org.apache.sis" ]
org.apache.sis;
173,483
private static boolean installOnExternalAsec(int installFlags) { if ((installFlags & PackageManager.INSTALL_INTERNAL) != 0) { return false; } if ((installFlags & PackageManager.INSTALL_EXTERNAL) != 0) { return true; } return false; }
static boolean function(int installFlags) { if ((installFlags & PackageManager.INSTALL_INTERNAL) != 0) { return false; } if ((installFlags & PackageManager.INSTALL_EXTERNAL) != 0) { return true; } return false; }
/** * Used during creation of InstallArgs * * @param installFlags package installation flags * @return true if should be installed on external storage */
Used during creation of InstallArgs
installOnExternalAsec
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/server/pm/PackageManagerService.java", "license": "gpl-3.0", "size": 736676 }
[ "android.content.pm.PackageManager" ]
import android.content.pm.PackageManager;
import android.content.pm.*;
[ "android.content" ]
android.content;
2,404,414
public void logout() throws IOException, SettingsException { logout(null, new LogoutRequestParams(), false); }
void function() throws IOException, SettingsException { logout(null, new LogoutRequestParams(), false); }
/** * Initiates the SLO process. * * @throws IOException * @throws SettingsException */
Initiates the SLO process
logout
{ "repo_name": "onelogin/java-saml", "path": "toolkit/src/main/java/com/onelogin/saml2/Auth.java", "license": "mit", "size": 63952 }
[ "com.onelogin.saml2.exception.SettingsException", "com.onelogin.saml2.logout.LogoutRequestParams", "java.io.IOException" ]
import com.onelogin.saml2.exception.SettingsException; import com.onelogin.saml2.logout.LogoutRequestParams; import java.io.IOException;
import com.onelogin.saml2.exception.*; import com.onelogin.saml2.logout.*; import java.io.*;
[ "com.onelogin.saml2", "java.io" ]
com.onelogin.saml2; java.io;
1,944,349
public Iterator<FB_Post> iteratorFeed( final String forcedTarget , final Integer limit ) { if ( LOGGER.isTraceEnabled() ) { LOGGER.trace( "[" + getClass().getSimpleName() + "] iteratorFeed() : forcedTarget=" + forcedTarget + ...
Iterator<FB_Post> function( final String forcedTarget , final Integer limit ) { if ( LOGGER.isTraceEnabled() ) { LOGGER.trace( "[" + getClass().getSimpleName() + STR + forcedTarget + STR + limit ); }
/** * Iterate a Facebook Feed. * * @param forcedTarget Target's ID (user or page). Could be null to use login target. * @param limit Maximum number of results by call. Could be null to use default. * @return a posts iterator */
Iterate a Facebook Feed
iteratorFeed
{ "repo_name": "fabienvauchelles/superpipes", "path": "superpipes/src/main/java/com/vaushell/superpipes/tools/scribe/fb/FacebookClient.java", "license": "lgpl-3.0", "size": 26083 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,842,946
public static boolean join(@Nullable GridWorker w, @Nullable IgniteLogger log) { if (w != null) try { w.join(); } catch (InterruptedException ignore) { warn(log, "Got interrupted while waiting for completion of runnable: " + w); ...
static boolean function(@Nullable GridWorker w, @Nullable IgniteLogger log) { if (w != null) try { w.join(); } catch (InterruptedException ignore) { warn(log, STR + w); Thread.currentThread().interrupt(); return false; } return true; }
/** * Joins runnable. * * @param w Worker to join. * @param log The logger to possible exception. * @return {@code true} if worker has not been interrupted, {@code false} if it was interrupted. */
Joins runnable
join
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 388551 }
[ "org.apache.ignite.IgniteLogger", "org.apache.ignite.internal.util.worker.GridWorker", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.worker.GridWorker; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.apache.ignite.internal.util.worker.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
1,549,667
public void writeTo(OutputStream out, Writer humanOut, boolean verbose) throws IOException { boolean annotate = (humanOut != null); ByteArrayAnnotatedOutput result = toDex0(annotate, verbose); if (out != null) { out.write(result.getArray()); } if (annota...
void function(OutputStream out, Writer humanOut, boolean verbose) throws IOException { boolean annotate = (humanOut != null); ByteArrayAnnotatedOutput result = toDex0(annotate, verbose); if (out != null) { out.write(result.getArray()); } if (annotate) { result.writeAnnotationsTo(humanOut); } }
/** * Writes the contents of this instance as either a binary or a * human-readable form, or both. * * @param out {@code null-ok;} where to write to * @param humanOut {@code null-ok;} where to write human-oriented output to * @param verbose whether to be verbose when writing human-oriented...
Writes the contents of this instance as either a binary or a human-readable form, or both
writeTo
{ "repo_name": "saleeh93/buck-cutom", "path": "third-party/java/dx-from-kitkat/src/com/android/dx/dex/file/DexFile.java", "license": "apache-2.0", "size": 20665 }
[ "com.android.dx.util.ByteArrayAnnotatedOutput", "java.io.IOException", "java.io.OutputStream", "java.io.Writer" ]
import com.android.dx.util.ByteArrayAnnotatedOutput; import java.io.IOException; import java.io.OutputStream; import java.io.Writer;
import com.android.dx.util.*; import java.io.*;
[ "com.android.dx", "java.io" ]
com.android.dx; java.io;
1,610,550
public Item getSelfRezStone() { Item item = null; item = getReviveStone(161001001); if (item == null) { item = getReviveStone(161000003); } if (item == null) { item = getReviveStone(161000004); } if (item == null) { item = g...
Item function() { Item item = null; item = getReviveStone(161001001); if (item == null) { item = getReviveStone(161000003); } if (item == null) { item = getReviveStone(161000004); } if (item == null) { item = getReviveStone(161000001); } return item; }
/** * Stone Use Order determined by highest inventory slot. :( If player has * two types, wrong one might be used. * * @param player * @return selfRezItem */
Stone Use Order determined by highest inventory slot. :( If player has two types, wrong one might be used
getSelfRezStone
{ "repo_name": "f14shm4n/aion-event-engine", "path": "EventEngine/src/com/aionemu/gameserver/model/gameobjects/player/Player.java", "license": "gpl-2.0", "size": 68792 }
[ "com.aionemu.gameserver.model.gameobjects.Item" ]
import com.aionemu.gameserver.model.gameobjects.Item;
import com.aionemu.gameserver.model.gameobjects.*;
[ "com.aionemu.gameserver" ]
com.aionemu.gameserver;
147,993
public void severe(String msg, Object... params) { log(Level.SEVERE, msg, params); }
void function(String msg, Object... params) { log(Level.SEVERE, msg, params); }
/** * Log a SEVERE message, with an array of object arguments. * <p> * If the logger is currently enabled for the SEVERE message * level then the given message is forwarded to all the * registered output Handler objects. * * @param msg The string message (or a key in the message catalog) * @para...
Log a SEVERE message, with an array of object arguments. If the logger is currently enabled for the SEVERE message level then the given message is forwarded to all the registered output Handler objects
severe
{ "repo_name": "simonrrr/gdata-java-client", "path": "java/src/com/google/gdata/util/common/logging/FormattingLogger.java", "license": "apache-2.0", "size": 37949 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,380,612
public static void playClip(String filename) { try { Clip clip = AudioSystem.getClip(); clip.open(AudioSystem.getAudioInputStream(GameWorld.class.getResource(filename))); clip.loop(0); } catch (Exception exc) { exc.printStac...
static void function(String filename) { try { Clip clip = AudioSystem.getClip(); clip.open(AudioSystem.getAudioInputStream(GameWorld.class.getResource(filename))); clip.loop(0); } catch (Exception exc) { exc.printStackTrace(System.out); } }
/** * Play the sound clip. * @param filename The sound clip name */
Play the sound clip
playClip
{ "repo_name": "haichuand/TankGame", "path": "Game2D/GameSounds.java", "license": "apache-2.0", "size": 3851 }
[ "javax.sound.sampled.AudioSystem", "javax.sound.sampled.Clip" ]
import javax.sound.sampled.AudioSystem; import javax.sound.sampled.Clip;
import javax.sound.sampled.*;
[ "javax.sound" ]
javax.sound;
1,755,603
public static void executedAndThenSendIndividualToMaster(TestSuiteChromosome testSuite) throws IllegalArgumentException{ if(testSuite == null){ throw new IllegalArgumentException("No defined test suite to send"); } if(!Properties.NEW_STATISTICS) return; for (TestChromosome test : testSuite.getTestC...
static void function(TestSuiteChromosome testSuite) throws IllegalArgumentException{ if(testSuite == null){ throw new IllegalArgumentException(STR); } if(!Properties.NEW_STATISTICS) return; for (TestChromosome test : testSuite.getTestChromosomes()) { if (test.getLastExecutionResult() == null) { ExecutionResult result =...
/** * First execute (if needed) the test cases to be sure to have latest correct data, * and then send it to Master */
First execute (if needed) the test cases to be sure to have latest correct data, and then send it to Master
executedAndThenSendIndividualToMaster
{ "repo_name": "sefaakca/EvoSuite-Sefa", "path": "client/src/main/java/org/evosuite/statistics/StatisticsSender.java", "license": "lgpl-3.0", "size": 7604 }
[ "org.evosuite.Properties", "org.evosuite.testcase.TestChromosome", "org.evosuite.testcase.execution.ExecutionResult", "org.evosuite.testcase.execution.TestCaseExecutor", "org.evosuite.testsuite.TestSuiteChromosome" ]
import org.evosuite.Properties; import org.evosuite.testcase.TestChromosome; import org.evosuite.testcase.execution.ExecutionResult; import org.evosuite.testcase.execution.TestCaseExecutor; import org.evosuite.testsuite.TestSuiteChromosome;
import org.evosuite.*; import org.evosuite.testcase.*; import org.evosuite.testcase.execution.*; import org.evosuite.testsuite.*;
[ "org.evosuite", "org.evosuite.testcase", "org.evosuite.testsuite" ]
org.evosuite; org.evosuite.testcase; org.evosuite.testsuite;
1,734,371
@Test public void testSelectAllJavaTypes() { final QueryApi query = session.createQueryApi(); query.select().type(JavaType.class.getName()).subTypes().selectEnd(); final QueryResult result = query.execute(sortMode, printInfo); final List<Node> nodes = result.getNodes(); ...
void function() { final QueryApi query = session.createQueryApi(); query.select().type(JavaType.class.getName()).subTypes().selectEnd(); final QueryResult result = query.execute(sortMode, printInfo); final List<Node> nodes = result.getNodes(); final NodeWrapper[] wrappers = wrapNodes(nodes);
/** * Test select all java types. */
Test select all java types
testSelectAllJavaTypes
{ "repo_name": "porcelli/OpenSpotLight", "path": "osl-graph/osl-graph-core/src/test/java/org/openspotlight/graph/query/SLGraphQueryTest.java", "license": "lgpl-3.0", "size": 227396 }
[ "java.util.List", "org.openspotlight.graph.Node", "org.openspotlight.graph.test.domain.node.JavaType" ]
import java.util.List; import org.openspotlight.graph.Node; import org.openspotlight.graph.test.domain.node.JavaType;
import java.util.*; import org.openspotlight.graph.*; import org.openspotlight.graph.test.domain.node.*;
[ "java.util", "org.openspotlight.graph" ]
java.util; org.openspotlight.graph;
2,769,133
public boolean markAsAbsent(String avNum, String sender) { Connection connection = connectDb(dbName); try { Statement statement = connection.createStatement(); statement.setQueryTimeout(60); // set timeout to 30 sec. statement.execute("UPDATE " + DB_MESSAGE_TABLE + " SET " + DB_MESSAGE_TYPE + "=" ...
boolean function(String avNum, String sender) { Connection connection = connectDb(dbName); try { Statement statement = connection.createStatement(); statement.setQueryTimeout(60); statement.execute(STR + DB_MESSAGE_TABLE + STR + DB_MESSAGE_TYPE + "=" + AttributeManager.MessageType.ATTENDANCE.getCode() + STR + DB_MESSAG...
/** * Change the DB_MESSAGE_ACKED field in the database to -1 to indicate that * this message came in as part of a bulk message. * * @param avNum * the AV number of the entry to ack * @param sender * the sender */
Change the DB_MESSAGE_ACKED field in the database to -1 to indicate that this message came in as part of a bulk message
markAsAbsent
{ "repo_name": "everdefiant/posit-mobile.haiti-server", "path": "src/haiti/server/modem/DbWriter.java", "license": "gpl-3.0", "size": 18276 }
[ "java.sql.Connection", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,498,310
private Result pImplementation(final int yyStart) throws IOException { JavaFiveParserColumn yyColumn = (JavaFiveParserColumn)column(yyStart); if (null == yyColumn.chunk1) yyColumn.chunk1 = new Chunk1(); if (null == yyColumn.chunk1.fImplementation) yyColumn.chunk1.fImplementation = pImplementation$1...
Result function(final int yyStart) throws IOException { JavaFiveParserColumn yyColumn = (JavaFiveParserColumn)column(yyStart); if (null == yyColumn.chunk1) yyColumn.chunk1 = new Chunk1(); if (null == yyColumn.chunk1.fImplementation) yyColumn.chunk1.fImplementation = pImplementation$1(yyStart); return yyColumn.chunk1.fI...
/** * Parse nonterminal xtc.lang.JavaFive.Implementation. * * @param yyStart The index. * @return The result. * @throws IOException Signals an I/O error. */
Parse nonterminal xtc.lang.JavaFive.Implementation
pImplementation
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/JavaFiveParser.java", "license": "lgpl-2.1", "size": 313913 }
[ "java.io.IOException", "xtc.parser.Result" ]
import java.io.IOException; import xtc.parser.Result;
import java.io.*; import xtc.parser.*;
[ "java.io", "xtc.parser" ]
java.io; xtc.parser;
2,746,240
@SuppressWarnings("unchecked") public List<Object> getList(String path) { Object o = getProperty(path); if (o == null) { return null; } else if (o instanceof List) { return (List<Object>) o; } else { return null; } }
@SuppressWarnings(STR) List<Object> function(String path) { Object o = getProperty(path); if (o == null) { return null; } else if (o instanceof List) { return (List<Object>) o; } else { return null; } }
/** * Gets a list of objects at a location. If the list is not defined, * null will be returned. The node must be an actual list. * * @param path path to node (dot notation) * @return boolean or default */
Gets a list of objects at a location. If the list is not defined, null will be returned. The node must be an actual list
getList
{ "repo_name": "sazert103/sazert103-studios", "path": "Sazcraft-Launcher/src/main/java/org/spoutcraft/launcher/yml/YAMLNode.java", "license": "gpl-3.0", "size": 16253 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,748,108
@GET @Path("/clusters/{clusterid}/users/{userid}/flows/{flowname}/apps/") @Produces(MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8) public Set<TimelineEntity> getFlowApps( @Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("clusterid") String clusterId, @...
@Path(STR) @Produces(MediaType.APPLICATION_JSON + STR + JettyUtils.UTF_8) Set<TimelineEntity> function( @Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam(STR) String clusterId, @PathParam(STR) String userId, @PathParam(STR) String flowName, @QueryParam("limit") String limit, @QueryParam(STR)...
/** * Return a list of apps for a given user, cluster id and flow name. If number * of matching apps are more than the limit, most recent apps till the limit * is reached, will be returned. * * @param req Servlet request. * @param res Servlet response. * @param clusterId Cluster id to which the app...
Return a list of apps for a given user, cluster id and flow name. If number of matching apps are more than the limit, most recent apps till the limit is reached, will be returned
getFlowApps
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java", "license": "apache-2.0", "size": 191681 }
[ "java.util.Set", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.Context", "javax.ws.rs.core.MediaType", "org.apache.hadoop.http.JettyUtils", "org.a...
import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.apache.hado...
import java.util.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.hadoop.http.*; import org.apache.hadoop.yarn.api.records.timelineservice.*;
[ "java.util", "javax.servlet", "javax.ws", "org.apache.hadoop" ]
java.util; javax.servlet; javax.ws; org.apache.hadoop;
1,877,477
private void drawEvents(Calendar date, float startFromPixel, Canvas canvas) { if (mEventRects != null && mEventRects.size() > 0) { for (int i = 0; i < mEventRects.size(); i++) { if (isSameDay(mEventRects.get(i).event.getStartTime(), date)) { // Calculate top....
void function(Calendar date, float startFromPixel, Canvas canvas) { if (mEventRects != null && mEventRects.size() > 0) { for (int i = 0; i < mEventRects.size(); i++) { if (isSameDay(mEventRects.get(i).event.getStartTime(), date)) { float top = mHourHeight * 24 * mEventRects.get(i).top / 1440 + mCurrentOrigin.y + mHeade...
/** * Draw all the events of a particular day. * @param date The day. * @param startFromPixel The left position of the day area. The events will never go any left from this value. * @param canvas The canvas to draw upon. */
Draw all the events of a particular day
drawEvents
{ "repo_name": "siavash-sajjad/Persian-Week-View", "path": "library/src/main/java/com/alamkanak/weekview/WeekView.java", "license": "apache-2.0", "size": 65086 }
[ "android.graphics.Canvas", "android.graphics.RectF", "java.util.Calendar" ]
import android.graphics.Canvas; import android.graphics.RectF; import java.util.Calendar;
import android.graphics.*; import java.util.*;
[ "android.graphics", "java.util" ]
android.graphics; java.util;
1,966,306
public static int getNbUnreadFor(String userId) { return (int) countNotReadMessagesOfFolder(userId, "INBOX"); }
static int function(String userId) { return (int) countNotReadMessagesOfFolder(userId, "INBOX"); }
/** * Gets the number of unread message of user represented by the given identifier. * @param userId the identifier of a user. * @return a number of unread message. */
Gets the number of unread message of user represented by the given identifier
getNbUnreadFor
{ "repo_name": "SilverDav/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/notification/user/UserNotificationServerEvent.java", "license": "agpl-3.0", "size": 5689 }
[ "org.silverpeas.core.notification.user.server.channel.silvermail.SILVERMAILPersistence" ]
import org.silverpeas.core.notification.user.server.channel.silvermail.SILVERMAILPersistence;
import org.silverpeas.core.notification.user.server.channel.silvermail.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
1,472,780
public HttpStatusCode statusCode() { return this.statusCode; }
HttpStatusCode function() { return this.statusCode; }
/** * Get the statusCode value. * * @return the statusCode value */
Get the statusCode value
statusCode
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-dns/src/main/java/com/microsoft/azure/management/dns/implementation/ZoneDeleteResultInner.java", "license": "mit", "size": 4010 }
[ "com.microsoft.azure.management.dns.HttpStatusCode" ]
import com.microsoft.azure.management.dns.HttpStatusCode;
import com.microsoft.azure.management.dns.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
811,254
private List<String> loadSparqlQueries(List<String> fileNames) { List<File> fileList = new ArrayList<File>(); List<String> queries = new ArrayList<String>(); for (String fileName : fileNames) { File file = new File(fileName); if (!file.canRead()) { LOGGER.warn("cannot read file: " + fil...
List<String> function(List<String> fileNames) { List<File> fileList = new ArrayList<File>(); List<String> queries = new ArrayList<String>(); for (String fileName : fileNames) { File file = new File(fileName); if (!file.canRead()) { LOGGER.warn(STR + file); continue; } if (file.isDirectory()) { for (File f : file.listFi...
/** * Loads SPARQL queries from the supplied files. * * @param fileNames The names of the query files. * @return The list of SPARQL queries. */
Loads SPARQL queries from the supplied files
loadSparqlQueries
{ "repo_name": "goerlitz/rdffederator", "path": "src/de/uni_koblenz/west/splendid/SPLENDID.java", "license": "lgpl-3.0", "size": 9498 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileNotFoundException", "java.io.FileReader", "java.io.IOException", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
551,840
public SparkThriftTransportProtocol thriftTransportProtocol() { return this.thriftTransportProtocol; }
SparkThriftTransportProtocol function() { return this.thriftTransportProtocol; }
/** * Get the thriftTransportProtocol property: The transport protocol to use in the Thrift layer. * * @return the thriftTransportProtocol value. */
Get the thriftTransportProtocol property: The transport protocol to use in the Thrift layer
thriftTransportProtocol
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/fluent/models/SparkLinkedServiceTypeProperties.java", "license": "mit", "size": 15323 }
[ "com.azure.resourcemanager.datafactory.models.SparkThriftTransportProtocol" ]
import com.azure.resourcemanager.datafactory.models.SparkThriftTransportProtocol;
import com.azure.resourcemanager.datafactory.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
635,349
public void setEnvironmentProperties(Map<String, Object> environmentProperties) { this.environmentProperties = environmentProperties; }
void function(Map<String, Object> environmentProperties) { this.environmentProperties = environmentProperties; }
/** * Sets the environmentProperties property. * * @param environmentProperties */
Sets the environmentProperties property
setEnvironmentProperties
{ "repo_name": "christophd/citrus", "path": "endpoints/citrus-jmx/src/main/java/com/consol/citrus/jmx/endpoint/JmxEndpointConfiguration.java", "license": "apache-2.0", "size": 8794 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,187,133
public Command[] getEndCommands() { return endCommands; }
Command[] function() { return endCommands; }
/** * Internal use only **/
Internal use only
getEndCommands
{ "repo_name": "oliverlietz/bd-j", "path": "AuthoringTools/com.hdcookbook.grin/com.hdcookbook.grin-se/src/main/java/com/hdcookbook/grin/features/SEFade.java", "license": "bsd-3-clause", "size": 6688 }
[ "com.hdcookbook.grin.commands.Command" ]
import com.hdcookbook.grin.commands.Command;
import com.hdcookbook.grin.commands.*;
[ "com.hdcookbook.grin" ]
com.hdcookbook.grin;
505,590
public void cancel() { findElement(By.className("v-grid-editor-cancel")).click(); }
void function() { findElement(By.className(STR)).click(); }
/** * Cancels this editor. * <p> * <em>Note:</em> that this closes the editor making this element * useless. */
Cancels this editor. Note: that this closes the editor making this element useless
cancel
{ "repo_name": "Darsstar/framework", "path": "testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java", "license": "apache-2.0", "size": 16529 }
[ "com.vaadin.testbench.By" ]
import com.vaadin.testbench.By;
import com.vaadin.testbench.*;
[ "com.vaadin.testbench" ]
com.vaadin.testbench;
191,686
public Object deepCopy(final Object value) throws HibernateException { if (value == null) { return null; } else if (value instanceof StatusType) { return value; } else { throw new IllegalArgumentException("Unexpected type that is mapped with " + this.getCl...
Object function(final Object value) throws HibernateException { if (value == null) { return null; } else if (value instanceof StatusType) { return value; } else { throw new IllegalArgumentException(STR + this.getClass().getSimpleName() + STR + value.getClass().getName()); } }
/** * Since {@link java.net.InetAddress} is immutable, we just return the original * value without copying it. */
Since <code>java.net.InetAddress</code> is immutable, we just return the original value without copying it
deepCopy
{ "repo_name": "RangerRick/opennms", "path": "opennms-model/src/main/java/org/opennms/netmgt/model/StatusTypeUserType.java", "license": "gpl-2.0", "size": 4346 }
[ "org.hibernate.HibernateException", "org.opennms.netmgt.model.OnmsArpInterface" ]
import org.hibernate.HibernateException; import org.opennms.netmgt.model.OnmsArpInterface;
import org.hibernate.*; import org.opennms.netmgt.model.*;
[ "org.hibernate", "org.opennms.netmgt" ]
org.hibernate; org.opennms.netmgt;
741,179
void preAction( HttpServletRequest request, Element[] requestSoapParts, Map<String, Object> context) throws Exception;
void preAction( HttpServletRequest request, Element[] requestSoapParts, Map<String, Object> context) throws Exception;
/** * This is called after the headers have been process but before the * body (DISCOVER/EXECUTE) has been processed. * */
This is called after the headers have been process but before the body (DISCOVER/EXECUTE) has been processed
preAction
{ "repo_name": "Twixer/mondrian-3.1.5", "path": "src/main/mondrian/xmla/XmlaRequestCallback.java", "license": "epl-1.0", "size": 4350 }
[ "java.util.Map", "javax.servlet.http.HttpServletRequest", "org.w3c.dom.Element" ]
import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.w3c.dom.Element;
import java.util.*; import javax.servlet.http.*; import org.w3c.dom.*;
[ "java.util", "javax.servlet", "org.w3c.dom" ]
java.util; javax.servlet; org.w3c.dom;
222,893
public void setRouteRefs(List<RouteContextRefDefinition> routeRefs) { this.routeRefs = routeRefs; }
void function(List<RouteContextRefDefinition> routeRefs) { this.routeRefs = routeRefs; }
/** * Refers to XML routes to include as routes in this CamelContext. */
Refers to XML routes to include as routes in this CamelContext
setRouteRefs
{ "repo_name": "mcollovati/camel", "path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java", "license": "apache-2.0", "size": 50811 }
[ "java.util.List", "org.apache.camel.model.RouteContextRefDefinition" ]
import java.util.List; import org.apache.camel.model.RouteContextRefDefinition;
import java.util.*; import org.apache.camel.model.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
549,717
public void setRenderer(final Component renderer) { this.renderer = renderer; }
void function(final Component renderer) { this.renderer = renderer; }
/** * DOCUMENT ME! * * @param renderer DOCUMENT ME! */
DOCUMENT ME
setRenderer
{ "repo_name": "cismet/cids-navigator", "path": "src/main/java/Sirius/navigator/ui/CidsMetaObjectBreadCrumb.java", "license": "gpl-3.0", "size": 2057 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,858,597
public void clearParameters() throws SQLException { if (statement_ != null) statement_.clearParameters(); }
void function() throws SQLException { if (statement_ != null) statement_.clearParameters(); }
/** * Clears the columns for the current row and releases all associated resources. * @exception SQLException If a database error occurs. **/
Clears the columns for the current row and releases all associated resources
clearParameters
{ "repo_name": "piguangming/jt400", "path": "cvsroot/src/com/ibm/as400/access/AS400JDBCRowSet.java", "license": "epl-1.0", "size": 311708 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,810,321
@Test public void shouldMarshalSingleLine() throws Exception { template.sendBody("direct:default", asMap("A", "1", "B", "2", "C", "3")); result.expectedMessageCount(1); result.assertIsSatisfied(); String body = assertIsInstanceOf(String.class, result.getExchanges().get(0).getIn...
void function() throws Exception { template.sendBody(STR, asMap("A", "1", "B", "2", "C", "3")); result.expectedMessageCount(1); result.assertIsSatisfied(); String body = assertIsInstanceOf(String.class, result.getExchanges().get(0).getIn().getBody()); assertEquals(join(STR), body); }
/** * Tests that we can marshal a single line with TSV. */
Tests that we can marshal a single line with TSV
shouldMarshalSingleLine
{ "repo_name": "ullgren/camel", "path": "components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityTsvDataFormatMarshalTest.java", "license": "apache-2.0", "size": 5609 }
[ "org.apache.camel.dataformat.univocity.UniVocityTestHelper", "org.apache.camel.test.junit5.TestSupport", "org.junit.jupiter.api.Assertions" ]
import org.apache.camel.dataformat.univocity.UniVocityTestHelper; import org.apache.camel.test.junit5.TestSupport; import org.junit.jupiter.api.Assertions;
import org.apache.camel.dataformat.univocity.*; import org.apache.camel.test.junit5.*; import org.junit.jupiter.api.*;
[ "org.apache.camel", "org.junit.jupiter" ]
org.apache.camel; org.junit.jupiter;
2,474,659
protected void enterDefval(Token node) throws ParseException { }
void function(Token node) throws ParseException { }
/** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */
Called when entering a parse tree node
enterDefval
{ "repo_name": "richb-hanover/mibble-2.9.2", "path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java", "license": "gpl-2.0", "size": 275483 }
[ "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Token" ]
import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Token;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
447,475
public List<OrderGroup> getOrderGroups() { Map<String, OrderGroup> orderGroups = new HashMap<String, OrderGroup>(); for (Order order : orders) { if (order.getOrderGroup() != null) { if (null == orderGroups.get(order.getOrderGroup().getUuid())) { orderGroups.put(order.getOrderGroup().getUuid(), order....
List<OrderGroup> function() { Map<String, OrderGroup> orderGroups = new HashMap<String, OrderGroup>(); for (Order order : orders) { if (order.getOrderGroup() != null) { if (null == orderGroups.get(order.getOrderGroup().getUuid())) { orderGroups.put(order.getOrderGroup().getUuid(), order.getOrderGroup()); } order.getOrd...
/** * Takes in a list of orders and pulls out the orderGroups within them * * @since 1.12 * @return list of orderGroups */
Takes in a list of orders and pulls out the orderGroups within them
getOrderGroups
{ "repo_name": "preethi29/openmrs-core", "path": "api/src/main/java/org/openmrs/Encounter.java", "license": "mpl-2.0", "size": 21436 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,638,161
static public Object loadFile(String in, Object inFileEnc, Env env) { if (Logger.debuglevelp(env)) { Logger.debug("[loadFile] in: ~S", Lists.list(in), env); Logger.debug("[loadFile] inFileEnc: ~S", Lists.list(inFileEnc), env); ...
static Object function(String in, Object inFileEnc, Env env) { if (Logger.debuglevelp(env)) { Logger.debug(STR, Lists.list(in), env); Logger.debug(STR, Lists.list(inFileEnc), env); } String inLisp, inFasl; if (in.endsWith(".lisp")) { inLisp = in; inFasl = null; } else if (in.endsWith(".fasl")) { inLisp = null; inFasl =...
/** * Loads a file denoted by <code>in</code> onto the lisp environment. * @param in Name of the input file. * If a file extension is either ".lisp" or ".fasl", then this * method loads a file specified by <code>in</code>. * Else, the method creates two pathname * ...
Loads a file denoted by <code>in</code> onto the lisp environment
loadFile
{ "repo_name": "hz7k-nzw/lapin", "path": "src/lapin/load/Loader.java", "license": "gpl-2.0", "size": 21404 }
[ "java.io.File", "java.io.InputStream" ]
import java.io.File; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,259,498
public Transition generateNextTransition(RectF drawableBounds, RectF viewport);
Transition function(RectF drawableBounds, RectF viewport);
/** * Generates the next transition to be played by the {@link KenBurnsView}. * @param drawableBounds the bounds of the drawable to be shown in the {@link KenBurnsView}. * @param viewport the rect that represents the viewport where * the transition will be played in. This is usually ...
Generates the next transition to be played by the <code>KenBurnsView</code>
generateNextTransition
{ "repo_name": "topicosdcc/App-QUIZ-STAR-WARS-Sqlite", "path": "app/src/main/java/com/ufrr/quizvestibularufrr/libraryKenburnsView/TransitionGenerator.java", "license": "apache-2.0", "size": 1293 }
[ "android.graphics.RectF" ]
import android.graphics.RectF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,824,919
@Test public void test() { double expected = Math.log(3 * 2 * 1); //T(4) = 3! double actual = (new LogGamma(4)).get(); assertEquals(expected, actual, 0.00001d); expected = Math.log(9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1); //T(10) = 9! actual = (new LogGamma(10)).get(); assertEquals(expected, actua...
void function() { double expected = Math.log(3 * 2 * 1); double actual = (new LogGamma(4)).get(); assertEquals(expected, actual, 0.00001d); expected = Math.log(9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1); actual = (new LogGamma(10)).get(); assertEquals(expected, actual, 0.00001d); }
/** * Tests log gamma computation. */
Tests log gamma computation
test
{ "repo_name": "vangj/multdir-core", "path": "src/test/java/net/multdir/log/LogGammaTests.java", "license": "apache-2.0", "size": 596 }
[ "net.multdir.log.LogGamma", "org.junit.Assert" ]
import net.multdir.log.LogGamma; import org.junit.Assert;
import net.multdir.log.*; import org.junit.*;
[ "net.multdir.log", "org.junit" ]
net.multdir.log; org.junit;
2,729,825
private JComponent getTopLevelRightPanel(boolean functionPaneRequired) { JSplitPane topBottomSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); DefaultSettings.setDefaultFeatureForJSplitPane(topBottomSplitPane); topBottomSplitPane.setDividerLocation(0.5); functionPane = new FunctionLibraryPane()...
JComponent function(boolean functionPaneRequired) { JSplitPane topBottomSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); DefaultSettings.setDefaultFeatureForJSplitPane(topBottomSplitPane); topBottomSplitPane.setDividerLocation(0.5); functionPane = new FunctionLibraryPane(); functionPane.setBorder(BorderFactory.cr...
/** * This constructs function and properties panels. * * @return the top level right pane. */
This constructs function and properties panels
getTopLevelRightPanel
{ "repo_name": "NCIP/caadapter", "path": "software/caadapter/src/java/gov/nih/nci/caadapter/ui/mapping/AbstractMappingPanel.java", "license": "bsd-3-clause", "size": 15412 }
[ "gov.nih.nci.caadapter.common.util.Config", "gov.nih.nci.caadapter.ui.common.DefaultSettings", "gov.nih.nci.caadapter.ui.common.functions.FunctionLibraryPane", "gov.nih.nci.caadapter.ui.common.properties.DefaultPropertiesPage", "java.awt.Dimension", "javax.swing.BorderFactory", "javax.swing.JComponent",...
import gov.nih.nci.caadapter.common.util.Config; import gov.nih.nci.caadapter.ui.common.DefaultSettings; import gov.nih.nci.caadapter.ui.common.functions.FunctionLibraryPane; import gov.nih.nci.caadapter.ui.common.properties.DefaultPropertiesPage; import java.awt.Dimension; import javax.swing.BorderFactory; import java...
import gov.nih.nci.caadapter.common.util.*; import gov.nih.nci.caadapter.ui.common.*; import gov.nih.nci.caadapter.ui.common.functions.*; import gov.nih.nci.caadapter.ui.common.properties.*; import java.awt.*; import javax.swing.*; import javax.swing.event.*;
[ "gov.nih.nci", "java.awt", "javax.swing" ]
gov.nih.nci; java.awt; javax.swing;
2,680,368
@Test public void testToADNodeConnector() throws ConstructionException { NodeId nodeId = new NodeId("openflow:1"); TpId source = new TpId("foo:2"); NodeConnector observedNodeConnector = TopologyMapping.toADNodeConnector(source, nodeId); Assert.assertEquals("OF|2@OF|00:00:00:00:0...
void function() throws ConstructionException { NodeId nodeId = new NodeId(STR); TpId source = new TpId("foo:2"); NodeConnector observedNodeConnector = TopologyMapping.toADNodeConnector(source, nodeId); Assert.assertEquals(STR, observedNodeConnector.toString()); }
/** * Test method for {@link org.opendaylight.controller.sal.compatibility.topology.TopologyMapping#toADNodeConnector(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId)}. * @throws ...
Test method for <code>org.opendaylight.controller.sal.compatibility.topology.TopologyMapping#toADNodeConnector(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId)</code>
testToADNodeConnector
{ "repo_name": "aryantaheri/controller", "path": "opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/topology/test/TopologyMappingTest.java", "license": "epl-1.0", "size": 3145 }
[ "junit.framework.Assert", "org.opendaylight.controller.sal.compatibility.topology.TopologyMapping", "org.opendaylight.controller.sal.core.ConstructionException", "org.opendaylight.controller.sal.core.NodeConnector", "org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId",...
import junit.framework.Assert; import org.opendaylight.controller.sal.compatibility.topology.TopologyMapping; import org.opendaylight.controller.sal.core.ConstructionException; import org.opendaylight.controller.sal.core.NodeConnector; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev1...
import junit.framework.*; import org.opendaylight.controller.sal.compatibility.topology.*; import org.opendaylight.controller.sal.core.*; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.*;
[ "junit.framework", "org.opendaylight.controller", "org.opendaylight.yang" ]
junit.framework; org.opendaylight.controller; org.opendaylight.yang;
2,477,641
public Value getBlue() throws DOMException { throw createDOMException(); }
Value function() throws DOMException { throw createDOMException(); }
/** * Implements {@link Value#getBlue()}. */
Implements <code>Value#getBlue()</code>
getBlue
{ "repo_name": "apache/batik", "path": "batik-css/src/main/java/org/apache/batik/css/engine/value/AbstractValue.java", "license": "apache-2.0", "size": 3958 }
[ "org.w3c.dom.DOMException" ]
import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
697,096
@SuppressWarnings("all") protected void addEmptyNewAwardReportTerms( Map<String, Object> hashMap, List<KeyValue> reportClasses){ List<AwardReportTerm> newAwardReportTerms = new ArrayList<AwardReportTerm>(); for(KeyValue KeyValue : reportClasses){ newAwardReportTerms.a...
@SuppressWarnings("all") void function( Map<String, Object> hashMap, List<KeyValue> reportClasses){ List<AwardReportTerm> newAwardReportTerms = new ArrayList<AwardReportTerm>(); for(KeyValue KeyValue : reportClasses){ newAwardReportTerms.add(new AwardReportTerm()); } hashMap.put( Constants.NEW_AWARD_REPORT_TERMS_LIST_K...
/** * * This method is a helper method for assignReportClassesForPanelHeaderDisplay * * @param hashMap * @param reportClasses * @return */
This method is a helper method for assignReportClassesForPanelHeaderDisplay
addEmptyNewAwardReportTerms
{ "repo_name": "blackcathacker/kc.preclean", "path": "coeus-code/src/main/java/org/kuali/kra/award/service/impl/AwardReportsServiceImpl.java", "license": "apache-2.0", "size": 8402 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.kuali.kra.award.paymentreports.awardreports.AwardReportTerm", "org.kuali.kra.infrastructure.Constants", "org.kuali.rice.core.api.util.KeyValue" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.kuali.kra.award.paymentreports.awardreports.AwardReportTerm; import org.kuali.kra.infrastructure.Constants; import org.kuali.rice.core.api.util.KeyValue;
import java.util.*; import org.kuali.kra.award.paymentreports.awardreports.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.core.api.util.*;
[ "java.util", "org.kuali.kra", "org.kuali.rice" ]
java.util; org.kuali.kra; org.kuali.rice;
2,240,856
private static HashMap<String, String> createLookupMap(ResourceBundle baseBundle) { final ArrayList<String> baseKeys = Collections.list(baseBundle.getKeys()); return new HashMap<>(baseKeys.stream().collect( Collectors.toMap( key -> new LocalizationKey(key).get...
static HashMap<String, String> function(ResourceBundle baseBundle) { final ArrayList<String> baseKeys = Collections.list(baseBundle.getKeys()); return new HashMap<>(baseKeys.stream().collect( Collectors.toMap( key -> new LocalizationKey(key).getTranslationValue(), key -> new LocalizationKey(baseBundle.getString(key)).g...
/** * Helper function to create a HashMap from the key/value pairs of a bundle. * * @param baseBundle JabRef language bundle with keys and values for translations. * @return Lookup map for the baseBundle. */
Helper function to create a HashMap from the key/value pairs of a bundle
createLookupMap
{ "repo_name": "oscargus/jabref", "path": "src/main/java/org/jabref/logic/l10n/Localization.java", "license": "mit", "size": 8856 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.HashMap", "java.util.ResourceBundle", "java.util.stream.Collectors" ]
import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.ResourceBundle; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
168,016
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { boolean flag = true; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag); if (movingobjectposition.typeOfHit...
ItemStack function(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { boolean flag = true; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag); if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) { int i = movingobjec...
/** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */
Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
onItemRightClick
{ "repo_name": "theflogat/Theflogats-Mods", "path": "fr/theflogat/chemicalPhysics/items/cells/EmptyCell.java", "license": "lgpl-3.0", "size": 3887 }
[ "fr.theflogat.chemicalPhysics.api.ItemObjectCPU", "fr.theflogat.chemicalPhysics.lib.config.Ids", "net.minecraft.block.material.Material", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.item.ItemStack", "net.minecraft.util.EnumMovingObjectType", "net.minecraft.util.MovingObjectPosition", "n...
import fr.theflogat.chemicalPhysics.api.ItemObjectCPU; import fr.theflogat.chemicalPhysics.lib.config.Ids; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MovingO...
import fr.theflogat.*; import net.minecraft.block.material.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "fr.theflogat", "net.minecraft.block", "net.minecraft.entity", "net.minecraft.item", "net.minecraft.util", "net.minecraft.world" ]
fr.theflogat; net.minecraft.block; net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world;
2,356,845
public List<ExitCodeRangeMapping> exitCodeRanges() { return this.exitCodeRanges; }
List<ExitCodeRangeMapping> function() { return this.exitCodeRanges; }
/** * Get the exitCodeRanges value. * * @return the exitCodeRanges value */
Get the exitCodeRanges value
exitCodeRanges
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ExitConditions.java", "license": "mit", "size": 3408 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
305,860
public void unfreeze() throws StandardException;
void function() throws StandardException;
/** * Unfreeze the database after a backup has been taken. * <P>Please see Derby on line documentation on backup and restore. * * @exception StandardException Thrown on error */
Unfreeze the database after a backup has been taken. Please see Derby on line documentation on backup and restore
unfreeze
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/iapi/store/raw/RawStoreFactory.java", "license": "apache-2.0", "size": 41291 }
[ "org.apache.derby.shared.common.error.StandardException" ]
import org.apache.derby.shared.common.error.StandardException;
import org.apache.derby.shared.common.error.*;
[ "org.apache.derby" ]
org.apache.derby;
2,716,239
protected SSLEngineResult.HandshakeStatus tasks() { Runnable r = null; while ( (r = sslEngine.getDelegatedTask()) != null) { r.run(); } return sslEngine.getHandshakeStatus(); }
SSLEngineResult.HandshakeStatus function() { Runnable r = null; while ( (r = sslEngine.getDelegatedTask()) != null) { r.run(); } return sslEngine.getHandshakeStatus(); }
/** * Executes all the tasks needed on the same thread. * @return HandshakeStatus */
Executes all the tasks needed on the same thread
tasks
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/tomcat/util/net/SecureNioChannel.java", "license": "apache-2.0", "size": 22952 }
[ "javax.net.ssl.SSLEngineResult" ]
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
2,047,009
static ImmutableSet<String> incrementalDexopts(RuleContext ruleContext, Iterable<String> tokenizedDexopts) { if (ruleContext.getConfiguration().isCodeCoverageEnabled()) { // TODO(bazel-team): Still needed? No longer done in AndroidCommon.createDexAction tokenizedDexopts = Iterables.concat(tokeni...
static ImmutableSet<String> incrementalDexopts(RuleContext ruleContext, Iterable<String> tokenizedDexopts) { if (ruleContext.getConfiguration().isCodeCoverageEnabled()) { tokenizedDexopts = Iterables.concat(tokenizedDexopts, ImmutableList.of(STR)); } return normalizeDexopts( Iterables.filter( tokenizedDexopts, Predicat...
/** * Derives options to use in incremental dexing actions from the given context and dx flags, where * the latter typically come from a {@code dexopts} attribute on a top-level target. This method * only works reliably if the given dexopts were tokenized, e.g., using * {@link RuleContext#getTokenizedStrin...
Derives options to use in incremental dexing actions from the given context and dx flags, where the latter typically come from a dexopts attribute on a top-level target. This method only works reliably if the given dexopts were tokenized, e.g., using <code>RuleContext#getTokenizedStringListAttr</code>
incrementalDexopts
{ "repo_name": "damienmg/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/android/DexArchiveAspect.java", "license": "apache-2.0", "size": 25755 }
[ "com.google.common.base.Predicates", "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableSet", "com.google.common.collect.Iterables", "com.google.devtools.build.lib.analysis.RuleContext" ]
import com.google.common.base.Predicates; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
728,357
public List<CmsRelation> getRelationsForResource(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter) throws CmsException { CmsUUID projectId = getProjectIdForContext(dbc); return getVfsDriver(dbc).readRelations(dbc, projectId, resource, filter); }
List<CmsRelation> function(CmsDbContext dbc, CmsResource resource, CmsRelationFilter filter) throws CmsException { CmsUUID projectId = getProjectIdForContext(dbc); return getVfsDriver(dbc).readRelations(dbc, projectId, resource, filter); }
/** * Returns all relations for the given resource matching the given filter.<p> * * @param dbc the current db context * @param resource the resource to retrieve the relations for * @param filter the filter to match the relation * * @return all relations for the given resource matchin...
Returns all relations for the given resource matching the given filter
getRelationsForResource
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/db/CmsDriverManager.java", "license": "lgpl-2.1", "size": 494693 }
[ "java.util.List", "org.opencms.file.CmsResource", "org.opencms.main.CmsException", "org.opencms.relations.CmsRelation", "org.opencms.relations.CmsRelationFilter", "org.opencms.util.CmsUUID" ]
import java.util.List; import org.opencms.file.CmsResource; import org.opencms.main.CmsException; import org.opencms.relations.CmsRelation; import org.opencms.relations.CmsRelationFilter; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.relations.*; import org.opencms.util.*;
[ "java.util", "org.opencms.file", "org.opencms.main", "org.opencms.relations", "org.opencms.util" ]
java.util; org.opencms.file; org.opencms.main; org.opencms.relations; org.opencms.util;
2,877,381
ReservationInterval computeExecutionInterval(Plan plan, ReservationDefinition reservation, ReservationRequest currentReservationStage, boolean allocateLeft, RLESparseResourceAllocation allocations);
ReservationInterval computeExecutionInterval(Plan plan, ReservationDefinition reservation, ReservationRequest currentReservationStage, boolean allocateLeft, RLESparseResourceAllocation allocations);
/** * Computes the earliest allowed starting time for a given stage. * * @param plan the Plan to which the reservation must be fitted * @param reservation the job contract * @param currentReservationStage the stage * @param allocateLeft is the job allocated from left to right * @param allocations E...
Computes the earliest allowed starting time for a given stage
computeExecutionInterval
{ "repo_name": "legend-hua/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/reservation/planning/StageExecutionInterval.java", "license": "apache-2.0", "size": 2108 }
[ "org.apache.hadoop.yarn.api.records.ReservationDefinition", "org.apache.hadoop.yarn.api.records.ReservationRequest", "org.apache.hadoop.yarn.server.resourcemanager.reservation.Plan", "org.apache.hadoop.yarn.server.resourcemanager.reservation.RLESparseResourceAllocation", "org.apache.hadoop.yarn.server.resou...
import org.apache.hadoop.yarn.api.records.ReservationDefinition; import org.apache.hadoop.yarn.api.records.ReservationRequest; import org.apache.hadoop.yarn.server.resourcemanager.reservation.Plan; import org.apache.hadoop.yarn.server.resourcemanager.reservation.RLESparseResourceAllocation; import org.apache.hadoop.yar...
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.reservation.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,474,445
@Test public void matchIcmpCodeTest() { Criterion criterion = Criteria.matchIcmpCode((byte) 250); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
void function() { Criterion criterion = Criteria.matchIcmpCode((byte) 250); ObjectNode result = criterionCodec.encode(criterion, context); assertThat(result, matchesCriterion(criterion)); }
/** * Tests ICMP code criterion. */
Tests ICMP code criterion
matchIcmpCodeTest
{ "repo_name": "sonu283304/onos", "path": "core/common/src/test/java/org/onosproject/codec/impl/CriterionCodecTest.java", "license": "apache-2.0", "size": 14736 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "org.hamcrest.MatcherAssert", "org.onosproject.codec.impl.CriterionJsonMatcher", "org.onosproject.net.flow.criteria.Criteria", "org.onosproject.net.flow.criteria.Criterion" ]
import com.fasterxml.jackson.databind.node.ObjectNode; import org.hamcrest.MatcherAssert; import org.onosproject.codec.impl.CriterionJsonMatcher; import org.onosproject.net.flow.criteria.Criteria; import org.onosproject.net.flow.criteria.Criterion;
import com.fasterxml.jackson.databind.node.*; import org.hamcrest.*; import org.onosproject.codec.impl.*; import org.onosproject.net.flow.criteria.*;
[ "com.fasterxml.jackson", "org.hamcrest", "org.onosproject.codec", "org.onosproject.net" ]
com.fasterxml.jackson; org.hamcrest; org.onosproject.codec; org.onosproject.net;
844,331
public JToolTip showToolTip() { enterMouse(); moveMouse(getCenterXForClick(), getCenterYForClick()); return waitToolTip(); }
JToolTip function() { enterMouse(); moveMouse(getCenterXForClick(), getCenterYForClick()); return waitToolTip(); }
/** * Showes tool tip. * * @return JToolTip component. * @throws TimeoutExpiredException */
Showes tool tip
showToolTip
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "test/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/JComponentOperator.java", "license": "gpl-2.0", "size": 41148 }
[ "javax.swing.JToolTip" ]
import javax.swing.JToolTip;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,064,861
public void setLocation( final int x, final int y ) { Display defaultDisplay = Display.getDefault( ); if ( defaultDisplay == Display.getCurrent( ) ) { uiSetLocation( x, y ); } else { defaultDisplay.syncExec( new Runnable( ) {
void function( final int x, final int y ) { Display defaultDisplay = Display.getDefault( ); if ( defaultDisplay == Display.getCurrent( ) ) { uiSetLocation( x, y ); } else { defaultDisplay.syncExec( new Runnable( ) {
/** * Set browser window location. * * @param x X coordinate of browser window's top-left corner * @param y Y coordinate of browser window's top-left corner */
Set browser window location
setLocation
{ "repo_name": "sguan-actuate/birt", "path": "viewer/org.eclipse.birt.report.viewer/src/org/eclipse/birt/report/viewer/browsers/embedded/EmbeddedBrowserAdapter.java", "license": "epl-1.0", "size": 3948 }
[ "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,870,630
private void addNorthAndSouthWalls(float mapWidth, float mapHeight) { GameCanvasFx canvas = super.getCanvas(); ObstacleUiFx northWallUi = new ObstacleBuilder(canvas, world) .x(mapWidth / 2).y(mapHeight - (WALL_WIDTH / 2)).degree(0) .width(mapWidth).height(WALL_WID...
void function(float mapWidth, float mapHeight) { GameCanvasFx canvas = super.getCanvas(); ObstacleUiFx northWallUi = new ObstacleBuilder(canvas, world) .x(mapWidth / 2).y(mapHeight - (WALL_WIDTH / 2)).degree(0) .width(mapWidth).height(WALL_WIDTH) .type(ObstacleType.WALL).build(); ObstacleUiFx southWallUi = new Obstacle...
/** * Method that adds the obstacle drawables to the map that represent the * north and south walls. * * @param mapWidth The width of the map. * @param mapHeight The height of the map. */
Method that adds the obstacle drawables to the map that represent the north and south walls
addNorthAndSouthWalls
{ "repo_name": "PTS3-S34A/Soccar", "path": "Soccar [Client]/src/nl/soccar/ui/fx/models/MapUiFx.java", "license": "mit", "size": 12803 }
[ "nl.soccar.library.enumeration.ObstacleType", "nl.soccar.ui.fx.GameCanvasFx", "nl.soccar.ui.fx.models.ObstacleUiFx" ]
import nl.soccar.library.enumeration.ObstacleType; import nl.soccar.ui.fx.GameCanvasFx; import nl.soccar.ui.fx.models.ObstacleUiFx;
import nl.soccar.library.enumeration.*; import nl.soccar.ui.fx.*; import nl.soccar.ui.fx.models.*;
[ "nl.soccar.library", "nl.soccar.ui" ]
nl.soccar.library; nl.soccar.ui;
1,352,838
public AggregateDefinition aggregate(Expression correlationExpression) { AggregateDefinition answer = new AggregateDefinition(correlationExpression); addOutput(answer); return answer; }
AggregateDefinition function(Expression correlationExpression) { AggregateDefinition answer = new AggregateDefinition(correlationExpression); addOutput(answer); return answer; }
/** * <a href="http://camel.apache.org/aggregator.html">Aggregator EIP:</a> * Creates an aggregator allowing you to combine a number of messages together into a single message. * * @param correlationExpression the expression used to calculate the * correlation key. ...
Creates an aggregator allowing you to combine a number of messages together into a single message
aggregate
{ "repo_name": "chicagozer/rheosoft", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 125020 }
[ "org.apache.camel.Expression" ]
import org.apache.camel.Expression;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
576,593
public void addTracker(ResourceTracker tracker) { synchronized (trackers) { // prevent GC between contains and add List<ResourceTracker> t = trackers.hardList(); if (!t.contains(tracker)) trackers.add(tracker); trackers.trimToSize(); }...
void function(ResourceTracker tracker) { synchronized (trackers) { List<ResourceTracker> t = trackers.hardList(); if (!t.contains(tracker)) trackers.add(tracker); trackers.trimToSize(); } }
/** * Adds the tracker to the list of trackers monitoring this * resource. * @param tracker to observing resource */
Adds the tracker to the list of trackers monitoring this resource
addTracker
{ "repo_name": "GITNE/icedtea-web", "path": "netx/net/sourceforge/jnlp/cache/Resource.java", "license": "gpl-2.0", "size": 13291 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
46,223
@SideOnly(Side.CLIENT) public boolean canBeHovered() { return horse.getType().isHorse(); } }); if (horse.isChested()) { for (int k = 0; k < i; ++k) { for (int l = 0; l < 5; ++l) ...
@SideOnly(Side.CLIENT) boolean function() { return horse.getType().isHorse(); } }); if (horse.isChested()) { for (int k = 0; k < i; ++k) { for (int l = 0; l < 5; ++l) { this.addSlotToContainer(new Slot(horseInventoryIn, 2 + l + k * 5, 80 + l * 18, 18 + k * 18)); } } } for (int i1 = 0; i1 < 3; ++i1) { for (int k1 = 0; k...
/** * Actualy only call when we want to render the white square effect over the slots. Return always True, * except for the armor slot of the Donkey/Mule (we can't interact with the Undead and Skeleton horses) */
Actualy only call when we want to render the white square effect over the slots. Return always True, except for the armor slot of the Donkey/Mule (we can't interact with the Undead and Skeleton horses)
canBeHovered
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/inventory/ContainerHorseInventory.java", "license": "gpl-3.0", "size": 4954 }
[ "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.*;
[ "net.minecraftforge.fml" ]
net.minecraftforge.fml;
1,116,436
private boolean isDefaultGiven(String swaggerContent) throws APIManagementException { Swagger swagger = getSwagger(swaggerContent); Map<String, SecuritySchemeDefinition> securityDefinitions = swagger.getSecurityDefinitions(); if (securityDefinitions == null) { return false; ...
boolean function(String swaggerContent) throws APIManagementException { Swagger swagger = getSwagger(swaggerContent); Map<String, SecuritySchemeDefinition> securityDefinitions = swagger.getSecurityDefinitions(); if (securityDefinitions == null) { return false; } OAuth2Definition checkDefault = (OAuth2Definition) securi...
/** * This method returns the boolean value which checks whether the swagger is included default security scheme or not * * @param swaggerContent resource json * @return boolean * @throws APIManagementException */
This method returns the boolean value which checks whether the swagger is included default security scheme or not
isDefaultGiven
{ "repo_name": "Rajith90/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/definitions/OAS2Parser.java", "license": "apache-2.0", "size": 84878 }
[ "io.swagger.models.Swagger", "io.swagger.models.auth.OAuth2Definition", "io.swagger.models.auth.SecuritySchemeDefinition", "java.util.Map", "org.wso2.carbon.apimgt.api.APIManagementException" ]
import io.swagger.models.Swagger; import io.swagger.models.auth.OAuth2Definition; import io.swagger.models.auth.SecuritySchemeDefinition; import java.util.Map; import org.wso2.carbon.apimgt.api.APIManagementException;
import io.swagger.models.*; import io.swagger.models.auth.*; import java.util.*; import org.wso2.carbon.apimgt.api.*;
[ "io.swagger.models", "java.util", "org.wso2.carbon" ]
io.swagger.models; java.util; org.wso2.carbon;
328,045
public Observable<ServiceResponse<String>> beginStopPacketCaptureWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } ...
Observable<ServiceResponse<String>> function(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualNetworkGatewayName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new...
/** * Stops packet capture on virtual network gateway in the specified resource group. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @throws IllegalArgumentException thrown if parameters fail the valida...
Stops packet capture on virtual network gateway in the specified resource group
beginStopPacketCaptureWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/VirtualNetworkGatewaysInner.java", "license": "mit", "size": 304865 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,790,227
public NumericOperand milliseconds(TimeOperand operand) { return createNumericFunction(this, "milliseconds", operand); }
NumericOperand function(TimeOperand operand) { return createNumericFunction(this, STR, operand); }
/** * Milliseconds numeric operand. * * @param operand the operand * @return the numeric operand */
Milliseconds numeric operand
milliseconds
{ "repo_name": "bluebiz/bluelytics-api", "path": "src/main/java/de/bluebiz/bluelytics/api/query/plan/expressions/operands/time/TimeOperand.java", "license": "apache-2.0", "size": 21683 }
[ "de.bluebiz.bluelytics.api.query.plan.expressions.operands.numeric.NumericOperand" ]
import de.bluebiz.bluelytics.api.query.plan.expressions.operands.numeric.NumericOperand;
import de.bluebiz.bluelytics.api.query.plan.expressions.operands.numeric.*;
[ "de.bluebiz.bluelytics" ]
de.bluebiz.bluelytics;
581,161
public static void copy(ByteString src, int srcIdx, ByteBuf dst, int dstIdx, int length) { final int thisLen = src.length(); if (srcIdx < 0 || length > thisLen - srcIdx) { throw new IndexOutOfBoundsException("expected: " + "0 <= srcIdx(" + srcIdx + ") <= srcIdx + length(" ...
static void function(ByteString src, int srcIdx, ByteBuf dst, int dstIdx, int length) { final int thisLen = src.length(); if (srcIdx < 0 length > thisLen - srcIdx) { throw new IndexOutOfBoundsException(STR + STR + srcIdx + STR + length + STR + thisLen + ')'); } checkNotNull(dst, "dst").setBytes(dstIdx, src.array(), src...
/** * Copies the content of {@code src} to a {@link ByteBuf} using {@link ByteBuf#writeBytes(byte[], int, int)}. * @param src The source of the data to copy. * @param srcIdx the starting offset of characters to copy. * @param dst the destination byte array. * @param dstIdx the starting offset i...
Copies the content of src to a <code>ByteBuf</code> using <code>ByteBuf#writeBytes(byte[], int, int)</code>
copy
{ "repo_name": "liuciuse/netty", "path": "buffer/src/main/java/io/netty/buffer/ByteBufUtil.java", "license": "apache-2.0", "size": 32258 }
[ "io.netty.util.ByteString", "io.netty.util.internal.ObjectUtil" ]
import io.netty.util.ByteString; import io.netty.util.internal.ObjectUtil;
import io.netty.util.*; import io.netty.util.internal.*;
[ "io.netty.util" ]
io.netty.util;
87,209
private void closeUniqueDatabaseConnections( Result result ) { // Don't close any connections if the parent job is using the same transaction // if ( parentJob != null && transactionId != null && parentJob.getTransactionId() != null && transactionId.equals( parentJob.getTransactionId() ) ) { ...
void function( Result result ) { parentJob.getTransactionId() ) ) { return; } && parentTrans.getTransactionId() != null && transactionId.equals( parentTrans.getTransactionId() ) ) { return; } synchronized ( map ) { List<Database> databaseList = new ArrayList<>( map.getMap().values() ); for ( Database database : databas...
/** * Close unique database connections. If there are errors in the Result, perform a rollback * * @param result * the result of the transformation execution */
Close unique database connections. If there are errors in the Result, perform a rollback
closeUniqueDatabaseConnections
{ "repo_name": "mdamour1976/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 199226 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.Result", "org.pentaho.di.core.database.Database", "org.pentaho.di.core.database.DatabaseTransactionListener", "org.pentaho.di.core.exception.KettleDatabaseException", "org.pentaho.di.i18n.BaseMessages" ]
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.Result; import org.pentaho.di.core.database.Database; import org.pentaho.di.core.database.DatabaseTransactionListener; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.i18n.BaseMessages;
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.i18n.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
384,259
public T caseElement(Element object) { return null; }
T function(Element object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Element</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of ...
Returns the result of interpreting the object as an instance of 'Element'. This implementation returns null; returning a non-null result will terminate the switch.
caseElement
{ "repo_name": "rkkoszewski/JavaQuickUIDSL", "path": "com.robertkoszewski.dsl.quickui/src-gen/com/robertkoszewski/dsl/quickUI/util/QuickUISwitch.java", "license": "mit", "size": 19270 }
[ "com.robertkoszewski.dsl.quickUI.Element" ]
import com.robertkoszewski.dsl.quickUI.Element;
import com.robertkoszewski.dsl.*;
[ "com.robertkoszewski.dsl" ]
com.robertkoszewski.dsl;
856,288
File file = new File(path + filename); StringBuffer contents = new StringBuffer(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); String text = null; while ((text = reader.readLine()) != null) { contents.append(text).append(Sy...
File file = new File(path + filename); StringBuffer contents = new StringBuffer(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); String text = null; while ((text = reader.readLine()) != null) { contents.append(text).append(System.getProperty(STR)); } } catch (FileNotFoundExcepti...
/** Reads a file and returns its contents as String. * @param path Path to the file, without its name. * @param filename The file's name. * @return The file's content. */
Reads a file and returns its contents as String
Read
{ "repo_name": "dfki-iui/oms", "path": "src/de/dfki/adom/client/Tools.java", "license": "gpl-3.0", "size": 1228 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileNotFoundException", "java.io.FileReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,014,848
public boolean allowRemoveResource(String id) { // check security boolean isAllowed = allowRemove(id); if(isAllowed) { try { checkExplicitLock(id); } catch(PermissionException e) { isAllowed = false; } } return isAllowed; } // allowRemoveResource
boolean function(String id) { boolean isAllowed = allowRemove(id); if(isAllowed) { try { checkExplicitLock(id); } catch(PermissionException e) { isAllowed = false; } } return isAllowed; }
/** * check permissions for removeResource(). * * @param id * The id of the new resource. * @return true if the user is allowed to removeResource(id), false if not. */
check permissions for removeResource()
allowRemoveResource
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java", "license": "apache-2.0", "size": 426240 }
[ "org.sakaiproject.exception.PermissionException" ]
import org.sakaiproject.exception.PermissionException;
import org.sakaiproject.exception.*;
[ "org.sakaiproject.exception" ]
org.sakaiproject.exception;
2,109,268
@Column(name = "environment_id", precision = 19) @Override public Long getStackId() { return (Long) get(12); }
@Column(name = STR, precision = 19) Long function() { return (Long) get(12); }
/** * Getter for <code>cattle.volume_template.environment_id</code>. */
Getter for <code>cattle.volume_template.environment_id</code>
getStackId
{ "repo_name": "vincent99/cattle", "path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/VolumeTemplateRecord.java", "license": "apache-2.0", "size": 17532 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
182,154
if (findRecord(regId) != null) { log.info("Device " + regId + " already registered, skipping register"); return; } RegistrationRecord record = new RegistrationRecord(); record.setRegId(regId); ofy().save().entity(record).now(); }
if (findRecord(regId) != null) { log.info(STR + regId + STR); return; } RegistrationRecord record = new RegistrationRecord(); record.setRegId(regId); ofy().save().entity(record).now(); }
/** * Register a device to the backend * * @param regId The Google Cloud Messaging registration Id to add */
Register a device to the backend
registerDevice
{ "repo_name": "jokkolabs/Culture-droid", "path": "backend/src/main/java/com/yeleman/culure_droid/backend/RegistrationEndpoint.java", "license": "apache-2.0", "size": 3139 }
[ "com.yeleman.culure_droid.backend.OfyService" ]
import com.yeleman.culure_droid.backend.OfyService;
import com.yeleman.culure_droid.backend.*;
[ "com.yeleman.culure_droid" ]
com.yeleman.culure_droid;
1,023,181
public static Message setupMessage(String name, long accountId, long mailboxId, boolean addBody, boolean saveIt, Context context, boolean starred, boolean read) { Message message = new Message(); message.mDisplayName = name; message.mMailboxKey = mailboxId; m...
static Message function(String name, long accountId, long mailboxId, boolean addBody, boolean saveIt, Context context, boolean starred, boolean read) { Message message = new Message(); message.mDisplayName = name; message.mMailboxKey = mailboxId; message.mAccountKey = accountId; message.mFlagRead = read; message.mFlagL...
/** * Create a message for test purposes */
Create a message for test purposes
setupMessage
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Exchange/exchange2/tests/src/com/android/exchange/provider/EmailContentSetupUtils.java", "license": "gpl-2.0", "size": 7893 }
[ "android.content.Context", "com.android.emailcommon.provider.EmailContent" ]
import android.content.Context; import com.android.emailcommon.provider.EmailContent;
import android.content.*; import com.android.emailcommon.provider.*;
[ "android.content", "com.android.emailcommon" ]
android.content; com.android.emailcommon;
2,327,384
public static boolean isLicenseExpiredException(ElasticsearchSecurityException exception) { return (exception != null) && (exception.getMetadata(EXPIRED_FEATURE_METADATA) != null); }
static boolean function(ElasticsearchSecurityException exception) { return (exception != null) && (exception.getMetadata(EXPIRED_FEATURE_METADATA) != null); }
/** * Checks if a given {@link ElasticsearchSecurityException} refers to a feature that * requires a valid license, but the license has expired. */
Checks if a given <code>ElasticsearchSecurityException</code> refers to a feature that requires a valid license, but the license has expired
isLicenseExpiredException
{ "repo_name": "GlenRSmith/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/license/LicenseUtils.java", "license": "apache-2.0", "size": 3141 }
[ "org.elasticsearch.ElasticsearchSecurityException" ]
import org.elasticsearch.ElasticsearchSecurityException;
import org.elasticsearch.*;
[ "org.elasticsearch" ]
org.elasticsearch;
1,639,876
@Override public void clear() { for (Entry<K,V> entry : heap) { entry.setKey(null); entry.setValue(null); } heap.clear(); }
void function() { for (Entry<K,V> entry : heap) { entry.setKey(null); entry.setValue(null); } heap.clear(); }
/** * Empty the priority queue */
Empty the priority queue
clear
{ "repo_name": "pdoro/data-structures-and-algorithms", "path": "src/main/java/com/pdomingo/data_structures/implementations/priority_queue/BinaryHeap.java", "license": "mit", "size": 5562 }
[ "com.pdomingo.data_structures.interfaces.Entry" ]
import com.pdomingo.data_structures.interfaces.Entry;
import com.pdomingo.data_structures.interfaces.*;
[ "com.pdomingo.data_structures" ]
com.pdomingo.data_structures;
98,884
public List<Contentlet> find(Category category, long languageId, boolean live, String orderBy, User user, boolean respectFrontendRoles) throws DotDataException, DotContentletStateException, DotSecurityException;
List<Contentlet> function(Category category, long languageId, boolean live, String orderBy, User user, boolean respectFrontendRoles) throws DotDataException, DotContentletStateException, DotSecurityException;
/** * Will return all content assigned to a specified Category * @param category Category to look for * @param languageId language to pull content for. If 0 will return all languages * @param live should return live or working content * @param orderBy indexName(previously known as dbColumnName) to order by. C...
Will return all content assigned to a specified Category
find
{ "repo_name": "guhb/core", "path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPI.java", "license": "gpl-3.0", "size": 64730 }
[ "com.dotmarketing.exception.DotDataException", "com.dotmarketing.exception.DotSecurityException", "com.dotmarketing.portlets.categories.model.Category", "com.dotmarketing.portlets.contentlet.model.Contentlet", "com.liferay.portal.model.User", "java.util.List" ]
import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.categories.model.Category; import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.liferay.portal.model.User; import java.util.List;
import com.dotmarketing.exception.*; import com.dotmarketing.portlets.categories.model.*; import com.dotmarketing.portlets.contentlet.model.*; import com.liferay.portal.model.*; import java.util.*;
[ "com.dotmarketing.exception", "com.dotmarketing.portlets", "com.liferay.portal", "java.util" ]
com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal; java.util;
290,514
// Tests for plain creation of RangeJunction ( single or within a Group or CompositeGroup or // AllGroup ) // which is agnostic of whether the RangeJunction is of type AND or OR ////////////////////////////////////////////////////////////////////////////////////// @Test public void testOrganizedOperandsSin...
void function() { LogWriter logger = CacheUtils.getLogger(); try { ExecutionContext context = new QueryExecutionContext(null, CacheUtils.getCache()); bindIteratorsAndCreateIndex(context); CompiledComparison[] cv = null; cv = new CompiledComparison[12]; cv[0] = new CompiledComparison(new CompiledPath(new CompiledID("p")...
/** * Tests the creation of a single RangeJunction if the CompiledJunction only contains same index * condition without iter operand for AND */
Tests the creation of a single RangeJunction if the CompiledJunction only contains same index condition without iter operand for AND
testOrganizedOperandsSingleRangeJunctionCreationWithNoIterOperandForAND
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/CompiledJunctionInternalsJUnitTest.java", "license": "apache-2.0", "size": 157169 }
[ "org.apache.geode.LogWriter", "org.apache.geode.cache.query.CacheUtils", "org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes", "org.junit.Assert" ]
import org.apache.geode.LogWriter; import org.apache.geode.cache.query.CacheUtils; import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes; import org.junit.Assert;
import org.apache.geode.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.parse.*; import org.junit.*;
[ "org.apache.geode", "org.junit" ]
org.apache.geode; org.junit;
708,003
private void checkValues(List<RowMetaAndData> transResults, List<RowMetaAndData> expectedResults) throws TestFailedException { TestUtilities.checkRows(transResults, expectedResults, 0); Iterator<RowMetaAndData> itrRows1 = transResults.iterator(); Iterator<RowMetaAndData> itrRows2...
void function(List<RowMetaAndData> transResults, List<RowMetaAndData> expectedResults) throws TestFailedException { TestUtilities.checkRows(transResults, expectedResults, 0); Iterator<RowMetaAndData> itrRows1 = transResults.iterator(); Iterator<RowMetaAndData> itrRows2 = expectedResults.iterator(); while ( itrRows1.has...
/** * Helper method to check that the values of the fields match * @param transResults output from transformation * @param expectedResults expected output * @throws TestFailedException If values don't match */
Helper method to check that the values of the fields match
checkValues
{ "repo_name": "graphiq-data/pdi-uniquelist-plugin", "path": "test-src/com/graphiq/kettle/steps/uniquelist/UniqueListStepTest.java", "license": "mit", "size": 10087 }
[ "java.util.Iterator", "java.util.List", "org.pentaho.di.core.RowMetaAndData", "org.pentaho.di.core.row.ValueMetaInterface" ]
import java.util.Iterator; import java.util.List; import org.pentaho.di.core.RowMetaAndData; import org.pentaho.di.core.row.ValueMetaInterface;
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.row.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,743,504
private void detachOffScreenChildren(boolean toLeft) { int numChildren = getChildCount(); int firstPosition = mFirstPosition; int start = 0; int count = 0; if (toLeft) { final int galleryLeft = mPaddingLeft; for (int i = 0; i < numChildren; i++) { ...
void function(boolean toLeft) { int numChildren = getChildCount(); int firstPosition = mFirstPosition; int start = 0; int count = 0; if (toLeft) { final int galleryLeft = mPaddingLeft; for (int i = 0; i < numChildren; i++) { int n = mIsRtl ? (numChildren - 1 - i) : i; final View child = getChildAt(n); if (child.getRigh...
/** * Detaches children that are off the screen (i.e.: Gallery bounds). * * @param toLeft Whether to detach children to the left of the Gallery, or * to the right. */
Detaches children that are off the screen (i.e.: Gallery bounds)
detachOffScreenChildren
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/widget/Gallery.java", "license": "apache-2.0", "size": 51121 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
130,004
public void register(Router router) { router.route(this.route).handler(this); }
void function(Router router) { router.route(this.route).handler(this); }
/** * Registers this handler with the given router. * * @param router the router to register with. */
Registers this handler with the given router
register
{ "repo_name": "mooman219/PokemonGoTool", "path": "src/main/java/com/gmail/mooman219/pokemongo/handler/RouteHandler.java", "license": "mit", "size": 1184 }
[ "io.vertx.ext.web.Router" ]
import io.vertx.ext.web.Router;
import io.vertx.ext.web.*;
[ "io.vertx.ext" ]
io.vertx.ext;
1,424,390
void undelete(final List<ObjectId> ids) throws KettleException;
void undelete(final List<ObjectId> ids) throws KettleException;
/** * Un deletes the list of files matching the ids * @param ids * @throws KettleException */
Un deletes the list of files matching the ids
undelete
{ "repo_name": "codek/pentaho-kettle", "path": "plugins/pdi-pur-plugin/src/org/pentaho/di/ui/repository/pur/services/ITrashService.java", "license": "apache-2.0", "size": 1837 }
[ "java.util.List", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.repository.ObjectId" ]
import java.util.List; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.repository.ObjectId;
import java.util.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.repository.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
2,533,358
@Test public void testAsyncSchedulerSkipNoHeartbeatNMs() throws Exception { int heartbeatInterval = 100; conf.setInt( CapacitySchedulerConfiguration.SCHEDULE_ASYNCHRONOUSLY_MAXIMUM_THREAD, 1); conf.setInt(CapacitySchedulerConfiguration.SCHEDULE_ASYNCHRONOUSLY_PREFIX + ".schedulin...
void function() throws Exception { int heartbeatInterval = 100; conf.setInt( CapacitySchedulerConfiguration.SCHEDULE_ASYNCHRONOUSLY_MAXIMUM_THREAD, 1); conf.setInt(CapacitySchedulerConfiguration.SCHEDULE_ASYNCHRONOUSLY_PREFIX + STR, 100); conf.setInt(YarnConfiguration.RM_NM_HEARTBEAT_INTERVAL_MS, heartbeatInterval); mg...
/** * Make sure scheduler skips NMs which haven't heartbeat for a while. * @throws Exception */
Make sure scheduler skips NMs which haven't heartbeat for a while
testAsyncSchedulerSkipNoHeartbeatNMs
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestCapacitySchedulerAsyncScheduling.java", "license": "apache-2.0", "size": 50314 }
[ "org.apache.hadoop.yarn.conf.YarnConfiguration" ]
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,628,403
public String toJSON() { StringWriter sw = new StringWriter(); JSONWriter jw = new JSONWriter(sw); jw.object(); writeJSONValue(jw); jw.endObject(); return sw.toString(); }
String function() { StringWriter sw = new StringWriter(); JSONWriter jw = new JSONWriter(sw); jw.object(); writeJSONValue(jw); jw.endObject(); return sw.toString(); }
/** * Returns the widgets contents as a JSON encoded string * * @return the widgets contents as a JSON encoded string */
Returns the widgets contents as a JSON encoded string
toJSON
{ "repo_name": "appnativa/rare", "path": "source/rare/core/com/appnativa/rare/widget/aWidget.java", "license": "gpl-3.0", "size": 150848 }
[ "com.appnativa.util.json.JSONWriter", "java.io.StringWriter" ]
import com.appnativa.util.json.JSONWriter; import java.io.StringWriter;
import com.appnativa.util.json.*; import java.io.*;
[ "com.appnativa.util", "java.io" ]
com.appnativa.util; java.io;
1,640,437
void onCheckedChanged(FloatingActionButton fabView, boolean isChecked); } private static final int[] CHECKED_STATE_SET = { android.R.attr.state_checked }; private static final String TAG = "FloatingActionButton"; // A boolean that tells if the FAB is checked or not. p...
void onCheckedChanged(FloatingActionButton fabView, boolean isChecked); } private static final int[] CHECKED_STATE_SET = { android.R.attr.state_checked }; private static final String TAG = STR; private boolean mChecked; private OnCheckedChangeListener mOnCheckedChangeListener; public FloatingActionButton(Context contex...
/** * Called when the checked state of a FAB has changed. * * @param fabView The FAB view whose state has changed. * @param isChecked The new checked state of buttonView. */
Called when the checked state of a FAB has changed
onCheckedChanged
{ "repo_name": "chenpusn/FluxyAndroidTodo", "path": "app/src/main/java/com/armueller/fluxytodo/google/FloatingActionButton.java", "license": "mit", "size": 5003 }
[ "android.content.Context", "android.util.AttributeSet" ]
import android.content.Context; import android.util.AttributeSet;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
349,114
private HttpConnection getConnection(long timeout) throws IOException { HttpConnection connection = null; while ((connection == null) && (connection = getIdleConnection()) == null && timeout > 0) { boolean startConnection = false; synchronized (this) ...
HttpConnection function(long timeout) throws IOException { HttpConnection connection = null; while ((connection == null) && (connection = getIdleConnection()) == null && timeout > 0) { boolean startConnection = false; synchronized (this) { int totalConnections = _connections.size() + _pendingConnections; if (totalConne...
/** * Get a connection. We either get an idle connection if one is available, or * we make a new connection, if we have not yet reached maxConnections. If we * have reached maxConnections, we wait until the number reduces. * * @param timeout max time prepared to block waiting to be able to...
Get a connection. We either get an idle connection if one is available, or we make a new connection, if we have not yet reached maxConnections. If we have reached maxConnections, we wait until the number reduces
getConnection
{ "repo_name": "wang88/jetty", "path": "jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java", "license": "apache-2.0", "size": 21496 }
[ "java.io.IOException", "org.eclipse.jetty.util.log.Log" ]
import java.io.IOException; import org.eclipse.jetty.util.log.Log;
import java.io.*; import org.eclipse.jetty.util.log.*;
[ "java.io", "org.eclipse.jetty" ]
java.io; org.eclipse.jetty;
1,844,908
public void receive(Message msg) { Object o = msg.getObject(); if (o instanceof UserMessage) { UserMessage message = (UserMessage) o; if (message.to == null) { if (message.clear) { String userId = message.from; synchronize...
void function(Message msg) { Object o = msg.getObject(); if (o instanceof UserMessage) { UserMessage message = (UserMessage) o; if (message.to == null) { if (message.clear) { String userId = message.from; synchronized (messageMap) { messageMap.remove(userId); } } else { logger.debug(STR); heartbeatMap.put(message.from,...
/** * JGroups message listener. */
JGroups message listener
receive
{ "repo_name": "hackbuteer59/sakai", "path": "portal/portal-chat/tool/src/java/org/sakaiproject/portal/chat/entity/PCServiceEntityProvider.java", "license": "apache-2.0", "size": 28757 }
[ "org.jgroups.Message" ]
import org.jgroups.Message;
import org.jgroups.*;
[ "org.jgroups" ]
org.jgroups;
2,049,777
EClass getPipelineElement();
EClass getPipelineElement();
/** * Returns the meta object for class '{@link pipeline.PipelineElement <em>Element</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Element</em>'. * @see pipeline.PipelineElement * @generated */
Returns the meta object for class '<code>pipeline.PipelineElement Element</code>'.
getPipelineElement
{ "repo_name": "QualiMaster/QM-IConf", "path": "pipelineGEditor/src/pipeline/PipelinePackage.java", "license": "apache-2.0", "size": 43163 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,178,480
@SuppressWarnings( "unchecked" ) private <T> T getRealObject( T object ) throws Exception { if ( AopUtils.isAopProxy( object ) ) { return (T) ((Advised) object).getTargetSource().getTarget(); } return object; } // --------------------...
@SuppressWarnings( STR ) <T> T function( T object ) throws Exception { if ( AopUtils.isAopProxy( object ) ) { return (T) ((Advised) object).getTargetSource().getTarget(); } return object; }
/** * If the given class is advised by Spring AOP it will return the target * class, i.e. the advised class. If not the given class is returned * unchanged. * * @param object the object. */
If the given class is advised by Spring AOP it will return the target class, i.e. the advised class. If not the given class is returned unchanged
getRealObject
{ "repo_name": "vmluan/dhis2-core", "path": "dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java", "license": "bsd-3-clause", "size": 76838 }
[ "org.springframework.aop.framework.Advised", "org.springframework.aop.support.AopUtils" ]
import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils;
import org.springframework.aop.framework.*; import org.springframework.aop.support.*;
[ "org.springframework.aop" ]
org.springframework.aop;
2,730,171
public void setValues( RowMetaInterface rowMeta, Object[] data, PreparedStatement ps, int ignoreThisValueIndex ) throws KettleDatabaseException { // now set the values in the row! int index = 0; for ( int i = 0; i < rowMeta.size(); i++ ) { if ( i != ignoreThisValueIndex ) { ValueMetaInte...
void function( RowMetaInterface rowMeta, Object[] data, PreparedStatement ps, int ignoreThisValueIndex ) throws KettleDatabaseException { int index = 0; for ( int i = 0; i < rowMeta.size(); i++ ) { if ( i != ignoreThisValueIndex ) { ValueMetaInterface v = rowMeta.getValueMeta( i ); Object object = data[ i ]; try { setV...
/** * Sets the values of the preparedStatement pstmt. * * @param rowMeta * @param data */
Sets the values of the preparedStatement pstmt
setValues
{ "repo_name": "pedrofvteixeira/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/database/Database.java", "license": "apache-2.0", "size": 180346 }
[ "java.sql.PreparedStatement", "org.pentaho.di.core.exception.KettleDatabaseException", "org.pentaho.di.core.row.RowMetaInterface", "org.pentaho.di.core.row.ValueMetaInterface" ]
import java.sql.PreparedStatement; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.ValueMetaInterface;
import java.sql.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.row.*;
[ "java.sql", "org.pentaho.di" ]
java.sql; org.pentaho.di;
2,648,530
protected JSONObject createActivityJSON( String tenantDomain, String path, NodeRef parentNodeRef, NodeRef nodeRef, String fileName) throws JSONException { JSONObject json = new JSONObject(); json.pu...
JSONObject function( String tenantDomain, String path, NodeRef parentNodeRef, NodeRef nodeRef, String fileName) throws JSONException { JSONObject json = new JSONObject(); json.put(STR, nodeRef); if (parentNodeRef != null) { json.put(STR, parentNodeRef); } if (path != null) { json.put("page", STR + path); } else { json....
/** * Create JSON suitable for create, modify or delete activity posts. * * @param tenantDomain * @param path * @param parentNodeRef * @param nodeRef * @param fileName * @throws JSONException * @return JSONObject */
Create JSON suitable for create, modify or delete activity posts
createActivityJSON
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/service/cmr/activities/FileFolderActivityPosterImpl.java", "license": "lgpl-3.0", "size": 3316 }
[ "org.alfresco.repo.tenant.TenantService", "org.alfresco.service.cmr.repository.NodeRef", "org.json.JSONException", "org.json.JSONObject" ]
import org.alfresco.repo.tenant.TenantService; import org.alfresco.service.cmr.repository.NodeRef; import org.json.JSONException; import org.json.JSONObject;
import org.alfresco.repo.tenant.*; import org.alfresco.service.cmr.repository.*; import org.json.*;
[ "org.alfresco.repo", "org.alfresco.service", "org.json" ]
org.alfresco.repo; org.alfresco.service; org.json;
177,163
public void flush() { if (getBoolean(MEMORY_STICK_MODE)) { try { exportPreferences("jabref.xml"); } catch (JabRefException e) { LOGGER.warn("Could not export preferences for memory stick mode: " + e.getMessage(), e); } } try...
void function() { if (getBoolean(MEMORY_STICK_MODE)) { try { exportPreferences(STR); } catch (JabRefException e) { LOGGER.warn(STR + e.getMessage(), e); } } try { prefs.flush(); } catch (BackingStoreException ex) { LOGGER.warn(STR, ex); } }
/** * Calling this method will write all preferences into the preference store. */
Calling this method will write all preferences into the preference store
flush
{ "repo_name": "mredaelli/jabref", "path": "src/main/java/net/sf/jabref/preferences/JabRefPreferences.java", "license": "mit", "size": 74079 }
[ "java.util.prefs.BackingStoreException", "net.sf.jabref.JabRefException" ]
import java.util.prefs.BackingStoreException; import net.sf.jabref.JabRefException;
import java.util.prefs.*; import net.sf.jabref.*;
[ "java.util", "net.sf.jabref" ]
java.util; net.sf.jabref;
227,303
private void showDialog(final Intent intent, final int requestCode, String message) { final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this); alertDialog.setMessage(message); alertDialog.setPositiveButton(getString(R.string.open_location_options), new DialogInterface.OnClickListener() {
void function(final Intent intent, final int requestCode, String message) { final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this); alertDialog.setMessage(message); alertDialog.setPositiveButton(getString(R.string.open_location_options), new DialogInterface.OnClickListener() {
/** * Prompt user to enable location tracking */
Prompt user to enable location tracking
showDialog
{ "repo_name": "shellygill/maps-app-android", "path": "maps-app/src/main/java/com/esri/android/mapsapp/MapsAppActivity.java", "license": "apache-2.0", "size": 17192 }
[ "android.content.DialogInterface", "android.content.Intent", "android.support.v7.app.AlertDialog" ]
import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog;
import android.content.*; import android.support.v7.app.*;
[ "android.content", "android.support" ]
android.content; android.support;
843,575
public static <T> Transformer<T, T> cloneTransformer() { return CloneTransformer.cloneTransformer(); }
static <T> Transformer<T, T> function() { return CloneTransformer.cloneTransformer(); }
/** * Gets a transformer that returns a clone of the input object. * The input object will be cloned using one of these techniques (in order): * <ul> * <li>public clone method * <li>public copy constructor * <li>serialization clone * <ul> * * @param <T> the input/output typ...
Gets a transformer that returns a clone of the input object. The input object will be cloned using one of these techniques (in order): public clone method public copy constructor serialization clone
cloneTransformer
{ "repo_name": "MuShiiii/commons-collections", "path": "src/main/java/org/apache/commons/collections4/TransformerUtils.java", "license": "apache-2.0", "size": 20863 }
[ "org.apache.commons.collections4.functors.CloneTransformer" ]
import org.apache.commons.collections4.functors.CloneTransformer;
import org.apache.commons.collections4.functors.*;
[ "org.apache.commons" ]
org.apache.commons;
2,567,484
public static <N, E extends N, T extends N> String getTextForElement( ReadableDocument<N, E, T> doc, LocationMapper<N> mapper, String tagName) { E element = getElementWithTagName(doc, tagName); if (element != null) { return getText(doc, mapper, element); } return null; }
static <N, E extends N, T extends N> String function( ReadableDocument<N, E, T> doc, LocationMapper<N> mapper, String tagName) { E element = getElementWithTagName(doc, tagName); if (element != null) { return getText(doc, mapper, element); } return null; }
/** * Shortcut to get the text for an element with a specific tag name. * @see DocHelper#getElementWithTagName(ReadableDocument, String) * @see DocHelper#getText(ReadableDocument, LocationMapper, Object) */
Shortcut to get the text for an element with a specific tag name
getTextForElement
{ "repo_name": "processone/google-wave-api", "path": "wave-model/src/main/java/org/waveprotocol/wave/model/document/util/DocHelper.java", "license": "apache-2.0", "size": 34765 }
[ "org.waveprotocol.wave.model.document.ReadableDocument", "org.waveprotocol.wave.model.document.indexed.LocationMapper" ]
import org.waveprotocol.wave.model.document.ReadableDocument; import org.waveprotocol.wave.model.document.indexed.LocationMapper;
import org.waveprotocol.wave.model.document.*; import org.waveprotocol.wave.model.document.indexed.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
1,788,833