method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void setMomentJsReference(final ResourceReference reference) {
this.momentJsEntry= new RegistryEntry(reference);
} | void function(final ResourceReference reference) { this.momentJsEntry= new RegistryEntry(reference); } | /**
* Sets the {@link ResourceReference} to use to load Chart.js bundled (chart.bundle.min.js).Use
* this method if you want to include the javascript file in your web
* application.
*
* @param reference reference a Resource to be used
*/ | Sets the <code>ResourceReference</code> to use to load Chart.js bundled (chart.bundle.min.js).Use this method if you want to include the javascript file in your web application | setMomentJsReference | {
"repo_name": "thombergs/wicked-charts",
"path": "wicket/wicked-charts-wicket15/src/main/java/de/adesso/wickedcharts/wicket15/JavaScriptResourceRegistry.java",
"license": "apache-2.0",
"size": 11286
} | [
"org.apache.wicket.request.resource.ResourceReference"
] | import org.apache.wicket.request.resource.ResourceReference; | import org.apache.wicket.request.resource.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 313,940 |
EList<Long> getVMultiplicities(); | EList<Long> getVMultiplicities(); | /**
* Returns the value of the '<em><b>VMultiplicities</b></em>' attribute list.
* The list contents are of type {@link java.lang.Long}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>VMultiplicities</em>' attribute list isn't clear,
* there really should be more of a description here...
* <... | Returns the value of the 'VMultiplicities' attribute list. The list contents are of type <code>java.lang.Long</code>. If the meaning of the 'VMultiplicities' attribute list isn't clear, there really should be more of a description here... | getVMultiplicities | {
"repo_name": "shenan4321/BIMplatform",
"path": "generated/cn/dlb/bim/models/ifc4/IfcBSplineSurfaceWithKnots.java",
"license": "agpl-3.0",
"size": 6529
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,750,643 |
public static <T> Function<Process, T> getParameter(RelationType<T> rType)
{
return new GetParameter<T>(rType);
} | static <T> Function<Process, T> function(RelationType<T> rType) { return new GetParameter<T>(rType); } | /***************************************
* Returns a new function instance which returns a certain process
* parameter.
*
* @param rType The type of the process parameter to return
*
* @return A new function instance
*/ | Returns a new function instance which returns a certain process parameter | getParameter | {
"repo_name": "esoco/esoco-business",
"path": "src/main/java/de/esoco/process/ProcessFunctions.java",
"license": "apache-2.0",
"size": 4433
} | [
"de.esoco.lib.expression.Function",
"org.obrel.core.RelationType"
] | import de.esoco.lib.expression.Function; import org.obrel.core.RelationType; | import de.esoco.lib.expression.*; import org.obrel.core.*; | [
"de.esoco.lib",
"org.obrel.core"
] | de.esoco.lib; org.obrel.core; | 2,400,201 |
public static SQLiteStatement compileDeleteStatement(SQLiteDatabase db, String tableName, String keyColumn) {
StringBuilder sql = new StringBuilder();
sql.append("DELETE FROM ");
sql.append(tableName);
sql.append(" WHERE ");
sql.append(keyColumn);
sql.append("=?");
return db.compileStatement(sql.toStri... | static SQLiteStatement function(SQLiteDatabase db, String tableName, String keyColumn) { StringBuilder sql = new StringBuilder(); sql.append(STR); sql.append(tableName); sql.append(STR); sql.append(keyColumn); sql.append("=?"); return db.compileStatement(sql.toString()); } | /**
* Compile a delete statement.
* @param db
* @param tableName
* @param keyColumn
* @return
*/ | Compile a delete statement | compileDeleteStatement | {
"repo_name": "arthurpitman/android-common",
"path": "src/com/arthurpitman/common/SQLiteUtils.java",
"license": "apache-2.0",
"size": 2999
} | [
"android.database.sqlite.SQLiteDatabase",
"android.database.sqlite.SQLiteStatement"
] | import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; | import android.database.sqlite.*; | [
"android.database"
] | android.database; | 764,021 |
public SortedSet<WLightpathRequest> getIncomingLigtpathRequests()
{
if (!getNet().isWithWdmLayer()) return new TreeSet<> ();
return n.getIncomingDemands(getNet().getWdmLayer().get().getNe()).stream().
filter(d->{ WTYPE t = getNet().getWType(d).orElse(null); return t == null? false : t.isLightpathRequest(); ... | SortedSet<WLightpathRequest> function() { if (!getNet().isWithWdmLayer()) return new TreeSet<> (); return n.getIncomingDemands(getNet().getWdmLayer().get().getNe()).stream(). filter(d->{ WTYPE t = getNet().getWType(d).orElse(null); return t == null? false : t.isLightpathRequest(); }). map(ee -> new WLightpathRequest(ee... | /**
* Returns the set of incoming lightpath requests to the node
* @return see above
*/ | Returns the set of incoming lightpath requests to the node | getIncomingLigtpathRequests | {
"repo_name": "girtel/Net2Plan",
"path": "Net2Plan-Core/src/main/java/com/net2plan/niw/WNode.java",
"license": "bsd-2-clause",
"size": 34848
} | [
"java.util.SortedSet",
"java.util.TreeSet",
"java.util.stream.Collectors"
] | import java.util.SortedSet; import java.util.TreeSet; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 692,448 |
public Listenable<TreeCacheListener> getListenable()
{
return listeners;
} | Listenable<TreeCacheListener> function() { return listeners; } | /**
* Return the cache listenable
*
* @return listenable
*/ | Return the cache listenable | getListenable | {
"repo_name": "joelittlejohn/curator",
"path": "curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java",
"license": "apache-2.0",
"size": 28920
} | [
"org.apache.curator.framework.listen.Listenable"
] | import org.apache.curator.framework.listen.Listenable; | import org.apache.curator.framework.listen.*; | [
"org.apache.curator"
] | org.apache.curator; | 1,773,452 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(LqnPackage.Literals.PHASE_ACTIVITIES__ACTIVITY,
LqnFactory.eINSTANCE.createActiv... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (LqnPackage.Literals.PHASE_ACTIVITIES__ACTIVITY, LqnFactory.eINSTANCE.createActivityPhase())); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "aciancone/klapersuite",
"path": "klapersuite.metamodel.lqn.edit/src/lqn/provider/PhaseActivitiesItemProvider.java",
"license": "epl-1.0",
"size": 4821
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 451,466 |
public List<PluginVersions> getPluginUpdates() throws PluginException; | List<PluginVersions> function() throws PluginException; | /**
* Returns updated versions of installed plugins.
* <p>
* Only plugins that the user has permission to update are returned.
*
* @return
*/ | Returns updated versions of installed plugins. Only plugins that the user has permission to update are returned | getPluginUpdates | {
"repo_name": "taverna-incubator/incubator-taverna-osgi",
"path": "taverna-plugin-api/src/main/java/uk/org/taverna/commons/plugin/PluginManager.java",
"license": "apache-2.0",
"size": 3445
} | [
"java.util.List",
"uk.org.taverna.commons.plugin.xml.jaxb.PluginVersions"
] | import java.util.List; import uk.org.taverna.commons.plugin.xml.jaxb.PluginVersions; | import java.util.*; import uk.org.taverna.commons.plugin.xml.jaxb.*; | [
"java.util",
"uk.org.taverna"
] | java.util; uk.org.taverna; | 561,882 |
protected void childSpecialRealValue(Production node, Node child)
throws ParseException {
node.addChild(child);
} | void function(Production node, Node child) throws ParseException { node.addChild(child); } | /**
* Called when adding a child to a parse tree node.
*
* @param node the parent node
* @param child the child node, or null
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when adding a child to a parse tree node | childSpecialRealValue | {
"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.Node",
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,725 |
List<Entity> getEntities(); | List<Entity> getEntities(); | /**
* Get any entities contained in the object. The entities' coordinates
* should be relative to the object, not absolute.
*
* @return Any entities contained in the object. May be {@code null}.
*/ | Get any entities contained in the object. The entities' coordinates should be relative to the object, not absolute | getEntities | {
"repo_name": "Captain-Chaos/WorldPainter",
"path": "WorldPainter/WPCore/src/main/java/org/pepsoft/worldpainter/objects/WPObject.java",
"license": "gpl-3.0",
"size": 13878
} | [
"java.util.List",
"org.pepsoft.minecraft.Entity"
] | import java.util.List; import org.pepsoft.minecraft.Entity; | import java.util.*; import org.pepsoft.minecraft.*; | [
"java.util",
"org.pepsoft.minecraft"
] | java.util; org.pepsoft.minecraft; | 1,117,567 |
public Set<PartitionMemberInfo> getPartitionMemberInfo(); | Set<PartitionMemberInfo> function(); | /**
* Returns an immutable set of <code>PartitionMemberInfo</code>
* representing every member that is configured to provide storage space to
* the partitioned region.
*
* @return set of member info configured for storage space
*/ | Returns an immutable set of <code>PartitionMemberInfo</code> representing every member that is configured to provide storage space to the partitioned region | getPartitionMemberInfo | {
"repo_name": "fengshao0907/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/PartitionRegionInfo.java",
"license": "apache-2.0",
"size": 3708
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 15,665 |
private boolean inHostsList(TaskTrackerStatus status) {
Set<String> hostsList = hostsReader.getHosts();
return (hostsList.isEmpty() || hostsList.contains(status.getHost()));
} | boolean function(TaskTrackerStatus status) { Set<String> hostsList = hostsReader.getHosts(); return (hostsList.isEmpty() hostsList.contains(status.getHost())); } | /**
* Return if the specified tasktracker is in the hosts list, if one was
* configured. If none was configured, then this returns true.
*/ | Return if the specified tasktracker is in the hosts list, if one was configured. If none was configured, then this returns true | inHostsList | {
"repo_name": "wzhuo918/StaticBalance_HadoopSource_noConf",
"path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java",
"license": "apache-2.0",
"size": 192532
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 631,706 |
public List<?> getListAttribute(String name) {
return (List<?>) getAttribute(name);
} | List<?> function(String name) { return (List<?>) getAttribute(name); } | /**
* Get List attribute by name
*
* @param name
* Attribute name
* @return Attribute
*/ | Get List attribute by name | getListAttribute | {
"repo_name": "Red5/red5-server-common",
"path": "src/main/java/org/red5/server/AttributeStore.java",
"license": "apache-2.0",
"size": 13477
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,526,899 |
public static boolean hasOnlyPrivateConstructors(Class clazz) {
boolean ok = true;
for (Constructor constructor : clazz.getDeclaredConstructors()) {
ok &= Modifier.isPrivate(constructor.getModifiers());
if (constructor.getParameterTypes().length == 0) {
constructor.setAccessible(true);
... | static boolean function(Class clazz) { boolean ok = true; for (Constructor constructor : clazz.getDeclaredConstructors()) { ok &= Modifier.isPrivate(constructor.getModifiers()); if (constructor.getParameterTypes().length == 0) { constructor.setAccessible(true); try { constructor.newInstance(); } catch (Exception e) { t... | /**
* Asserts that all constructors are private, usually for helper classes with
* only static methods. If a constructor does not have any parameters, then
* it's instantiated.
*/ | Asserts that all constructors are private, usually for helper classes with only static methods. If a constructor does not have any parameters, then it's instantiated | hasOnlyPrivateConstructors | {
"repo_name": "jblievremont/sonarqube",
"path": "sonar-testing-harness/src/main/java/org/sonar/test/TestUtils.java",
"license": "lgpl-3.0",
"size": 3338
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.Modifier"
] | import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 966,560 |
public String apisApiIdCommentsCommentIdPutFingerprint(String commentId, String apiId, CommentDTO body,
String ifMatch, String ifUnmodifiedSince, Request request) {
return getEtag(commentId, request.getProperty("LOGGED_IN_USER").toString());
} | String function(String commentId, String apiId, CommentDTO body, String ifMatch, String ifUnmodifiedSince, Request request) { return getEtag(commentId, request.getProperty(STR).toString()); } | /**
* Retrieves the fingerprint of a comment for commentPut
*
* @param commentId Comment ID
* @param apiId API ID
* @param body body of the request
* @param ifMatch If-Match header value
* @param ifUnmodifiedSince If-Unmodified-Since header value
* @param request msf4j request ... | Retrieves the fingerprint of a comment for commentPut | apisApiIdCommentsCommentIdPutFingerprint | {
"repo_name": "lakmali/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/java/org/wso2/carbon/apimgt/rest/api/store/impl/ApisApiServiceImpl.java",
"license": "apache-2.0",
"size": 43185
} | [
"org.wso2.carbon.apimgt.rest.api.store.dto.CommentDTO",
"org.wso2.msf4j.Request"
] | import org.wso2.carbon.apimgt.rest.api.store.dto.CommentDTO; import org.wso2.msf4j.Request; | import org.wso2.carbon.apimgt.rest.api.store.dto.*; import org.wso2.msf4j.*; | [
"org.wso2.carbon",
"org.wso2.msf4j"
] | org.wso2.carbon; org.wso2.msf4j; | 673,549 |
public void delayedFindMatching(PropFinder finder, RecorderFossil fossil, ResultRecorder recorder) {
throw new SubclassResponsibilityException();
} | void function(PropFinder finder, RecorderFossil fossil, ResultRecorder recorder) { throw new SubclassResponsibilityException(); } | /**
* This does the 'now' part of setting up a recorder, once the 'later' part has been set up.
* It does a walk south on the O-tree, then walks back north on all the H-trees, filtered by
* the Bert canopy.
*/ | This does the 'now' part of setting up a recorder, once the 'later' part has been set up. It does a walk south on the O-tree, then walks back north on all the H-trees, filtered by the Bert canopy | delayedFindMatching | {
"repo_name": "jonesd/udanax-gold2java",
"path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/be/ents/OrglRoot.java",
"license": "mit",
"size": 23521
} | [
"info.dgjones.abora.gold.backrec.ResultRecorder",
"info.dgjones.abora.gold.be.canopy.PropFinder",
"info.dgjones.abora.gold.fossil.RecorderFossil",
"info.dgjones.abora.gold.java.exception.SubclassResponsibilityException"
] | import info.dgjones.abora.gold.backrec.ResultRecorder; import info.dgjones.abora.gold.be.canopy.PropFinder; import info.dgjones.abora.gold.fossil.RecorderFossil; import info.dgjones.abora.gold.java.exception.SubclassResponsibilityException; | import info.dgjones.abora.gold.backrec.*; import info.dgjones.abora.gold.be.canopy.*; import info.dgjones.abora.gold.fossil.*; import info.dgjones.abora.gold.java.exception.*; | [
"info.dgjones.abora"
] | info.dgjones.abora; | 1,485,341 |
public void removeUserFromFolder(final String targetPath, final String userName) throws ManifoldCFException {
// MHL
} | void function(final String targetPath, final String userName) throws ManifoldCFException { } | /**
* Remove user ACL from folder.
*
* @param targetPath
* is the folder path to add the acl to, beginning with the share
* name and separated by "/" characters.
* @param userName
* is the user to remove.
*/ | Remove user ACL from folder | removeUserFromFolder | {
"repo_name": "francelabs/datafari",
"path": "datafari-share-connector/src/main/java/com/francelabs/datafari/connectors/share/SharedDriveHelpers.java",
"license": "apache-2.0",
"size": 6349
} | [
"org.apache.manifoldcf.core.interfaces.ManifoldCFException"
] | import org.apache.manifoldcf.core.interfaces.ManifoldCFException; | import org.apache.manifoldcf.core.interfaces.*; | [
"org.apache.manifoldcf"
] | org.apache.manifoldcf; | 671,573 |
protected void onExcessMessage(ProcessContext context) {
// TODO
} | void function(ProcessContext context) { } | /**
* Called when an excess message (after the expected number of messages) are
* received
*/ | Called when an excess message (after the expected number of messages) are received | onExcessMessage | {
"repo_name": "kingargyle/turmeric-bot",
"path": "components/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java",
"license": "apache-2.0",
"size": 6327
} | [
"org.apache.camel.bam.processor.ProcessContext"
] | import org.apache.camel.bam.processor.ProcessContext; | import org.apache.camel.bam.processor.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,460,981 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ServicePrincipalInner>> getWithResponseAsync(String objectId, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ServicePrincipalInner>> function(String objectId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (objectId == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.clie... | /**
* Gets service principal information from the directory. Query by objectId or pass a filter to query by appId.
*
* @param objectId The object ID of the service principal to get.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if param... | Gets service principal information from the directory. Query by objectId or pass a filter to query by appId | getWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/ServicePrincipalsClientImpl.java",
"license": "mit",
"size": 83566
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.authorization.fluent.models.ServicePrincipalInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.authorization.fluent.models.ServicePrincipalInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 163,324 |
protected void startAuthSession(HttpServletRequest servletRequest, HttpServletResponse servletResponse, U userSession, boolean isNew) {
AuthUtil.startUserSession(servletRequest, userSession);
if (!useCookie) {
return;
}
if (isNew || recreateCookieOnLogin) {
String[] cookieData = createCookieData(... | void function(HttpServletRequest servletRequest, HttpServletResponse servletResponse, U userSession, boolean isNew) { AuthUtil.startUserSession(servletRequest, userSession); if (!useCookie) { return; } if (isNew recreateCookieOnLogin) { String[] cookieData = createCookieData(userSession); if (cookieData != null) { Auth... | /**
* Starts auth session by saving session auth object and optionally creating an auth cookie.
* Auth cookie is created for new auth sessions and for old ones if recreation is enabled.
* @param servletRequest http request
* @param servletResponse http response
* @param userSession created session object... | Starts auth session by saving session auth object and optionally creating an auth cookie. Auth cookie is created for new auth sessions and for old ones if recreation is enabled | startAuthSession | {
"repo_name": "wjw465150/jodd",
"path": "jodd-joy/src/main/java/jodd/joy/auth/AuthenticationInterceptor.java",
"license": "bsd-2-clause",
"size": 9658
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,659,033 |
public void unsetMqttService(MqttService mqttService) {
this.mqttService = null;
} | void function(MqttService mqttService) { this.mqttService = null; } | /**
* Unsetter for Declarative Services.
*
* @param mqttService to remove.
*/ | Unsetter for Declarative Services | unsetMqttService | {
"repo_name": "paolodenti/openhab",
"path": "bundles/binding/org.openhab.binding.mqttitude/src/main/java/org/openhab/binding/mqttitude/internal/MqttitudeBinding.java",
"license": "epl-1.0",
"size": 7887
} | [
"org.openhab.io.transport.mqtt.MqttService"
] | import org.openhab.io.transport.mqtt.MqttService; | import org.openhab.io.transport.mqtt.*; | [
"org.openhab.io"
] | org.openhab.io; | 2,505,588 |
public static WorkflowAnnotations lookupProcessAnnotations(ExecutionUnit process) {
return (WorkflowAnnotations) process.getUserData(KEY_PROCESS_ANNOTATION);
} | static WorkflowAnnotations function(ExecutionUnit process) { return (WorkflowAnnotations) process.getUserData(KEY_PROCESS_ANNOTATION); } | /**
* Returns the process annotations for the given execution unit.
*
* @param process
* the execution unit in question
* @return the annotations or {@code null} if there are none
*/ | Returns the process annotations for the given execution unit | lookupProcessAnnotations | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/io/process/GUIProcessXMLFilter.java",
"license": "gpl-3.0",
"size": 25708
} | [
"com.rapidminer.gui.flow.processrendering.annotations.model.WorkflowAnnotations",
"com.rapidminer.operator.ExecutionUnit"
] | import com.rapidminer.gui.flow.processrendering.annotations.model.WorkflowAnnotations; import com.rapidminer.operator.ExecutionUnit; | import com.rapidminer.gui.flow.processrendering.annotations.model.*; import com.rapidminer.operator.*; | [
"com.rapidminer.gui",
"com.rapidminer.operator"
] | com.rapidminer.gui; com.rapidminer.operator; | 454,229 |
CacheTransport get() {
if(!hasLicense()) {
return nullTransport;
}
return defaultTransport.get();
}
| CacheTransport get() { if(!hasLicense()) { return nullTransport; } return defaultTransport.get(); } | /**
* returns the appropiate cache transport
* @return
*/ | returns the appropiate cache transport | get | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/business/CacheTransportStrategy.java",
"license": "gpl-3.0",
"size": 2073
} | [
"com.dotmarketing.business.cache.transport.CacheTransport"
] | import com.dotmarketing.business.cache.transport.CacheTransport; | import com.dotmarketing.business.cache.transport.*; | [
"com.dotmarketing.business"
] | com.dotmarketing.business; | 1,894,462 |
private static boolean powEquals(Rational x, Rational y, Rational r) {
assert x.signum() > 0 && r.signum() > 0;
if (Math.abs(y.intExp2()) >= Integer.SIZE) {
return false;
}
BigInteger n = y.biNumerator();
BigInteger d = y.biDenominator();
if (n.abs().bitLe... | static boolean function(Rational x, Rational y, Rational r) { assert x.signum() > 0 && r.signum() > 0; if (Math.abs(y.intExp2()) >= Integer.SIZE) { return false; } BigInteger n = y.biNumerator(); BigInteger d = y.biDenominator(); if (n.abs().bitLength() >= Integer.SIZE d.bitLength() >= Integer.SIZE) { return false; } i... | /**
* Checks if `x.pow(y) == r`
*/ | Checks if `x.pow(y) == r` | powEquals | {
"repo_name": "jinterval/jinterval",
"path": "jinterval-rational-java/src/main/java/net/java/jinterval/rational/StdFuns.java",
"license": "bsd-2-clause",
"size": 41897
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,562,539 |
@Test
public void testToString() {
Ip4Prefix prefix = Ip4Prefix.valueOf("1.2.3.0/24");
Ip4Address nextHop = Ip4Address.valueOf("5.6.7.8");
RouteEntry routeEntry = new RouteEntry(prefix, nextHop);
assertThat(routeEntry.toString(),
is("RouteEntry{prefix=1.2.3.0/... | void function() { Ip4Prefix prefix = Ip4Prefix.valueOf(STR); Ip4Address nextHop = Ip4Address.valueOf(STR); RouteEntry routeEntry = new RouteEntry(prefix, nextHop); assertThat(routeEntry.toString(), is(STR)); } | /**
* Tests object string representation.
*/ | Tests object string representation | testToString | {
"repo_name": "maxkondr/onos-porta",
"path": "apps/routing-api/src/test/java/org/onosproject/routing/RouteEntryTest.java",
"license": "apache-2.0",
"size": 5371
} | [
"org.hamcrest.Matchers",
"org.junit.Assert",
"org.onlab.packet.Ip4Address",
"org.onlab.packet.Ip4Prefix"
] | import org.hamcrest.Matchers; import org.junit.Assert; import org.onlab.packet.Ip4Address; import org.onlab.packet.Ip4Prefix; | import org.hamcrest.*; import org.junit.*; import org.onlab.packet.*; | [
"org.hamcrest",
"org.junit",
"org.onlab.packet"
] | org.hamcrest; org.junit; org.onlab.packet; | 2,628,596 |
private static boolean hasLocalInfo(RegisterSpec spec) {
return (spec != null)
&& (spec.getLocalItem().getName() != null);
} | static boolean function(RegisterSpec spec) { return (spec != null) && (spec.getLocalItem().getName() != null); } | /**
* Helper for {@link #hasAnyLocalInfo} which scrutinizes a single
* register spec.
*
* @param spec {@code non-null;} spec to scrutinize
* @return {@code true} iff the spec refers to any
* named locals
*/ | Helper for <code>#hasAnyLocalInfo</code> which scrutinizes a single register spec | hasLocalInfo | {
"repo_name": "mread/buck",
"path": "third-party/java/dx-from-kitkat/src/com/android/dx/dex/code/OutputFinisher.java",
"license": "apache-2.0",
"size": 27505
} | [
"com.android.dx.rop.code.RegisterSpec"
] | import com.android.dx.rop.code.RegisterSpec; | import com.android.dx.rop.code.*; | [
"com.android.dx"
] | com.android.dx; | 2,394,967 |
public static Tag uri(ServerWebExchange exchange) {
PathPattern pathPattern = exchange.getAttributeOrDefault(
HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE, null);
String uri = pathPattern == null ? exchange.getRequest().getURI().toString()
: pathPattern.getPatternString();
if (!StringUtils.hasText(ur... | static Tag function(ServerWebExchange exchange) { PathPattern pathPattern = exchange.getAttributeOrDefault( HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE, null); String uri = pathPattern == null ? exchange.getRequest().getURI().toString() : pathPattern.getPatternString(); if (!StringUtils.hasText(uri)) { uri = "/"; } ... | /**
* Creates a {@code uri} tag based on the URI of the given {@code exchange}. Uses the
* {@link HandlerMapping#BEST_MATCHING_PATTERN_ATTRIBUTE} best matching pattern.
* @param exchange the exchange
* @return the uri tag derived from the exchange
*/ | Creates a uri tag based on the URI of the given exchange. Uses the <code>HandlerMapping#BEST_MATCHING_PATTERN_ATTRIBUTE</code> best matching pattern | uri | {
"repo_name": "bbrouwer/spring-boot",
"path": "spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java",
"license": "apache-2.0",
"size": 3279
} | [
"io.micrometer.core.instrument.Tag",
"org.springframework.util.StringUtils",
"org.springframework.web.reactive.HandlerMapping",
"org.springframework.web.server.ServerWebExchange",
"org.springframework.web.util.pattern.PathPattern"
] | import io.micrometer.core.instrument.Tag; import org.springframework.util.StringUtils; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.util.pattern.PathPattern; | import io.micrometer.core.instrument.*; import org.springframework.util.*; import org.springframework.web.reactive.*; import org.springframework.web.server.*; import org.springframework.web.util.pattern.*; | [
"io.micrometer.core",
"org.springframework.util",
"org.springframework.web"
] | io.micrometer.core; org.springframework.util; org.springframework.web; | 1,031,856 |
synchronized public void openSocket( BluetoothSocket socket )
{
try
{
btSocket = socket;
m_input = btSocket.getInputStream();
m_output = btSocket.getOutputStream();
notificationThread = new NotificationThread();
readThread = new ReadThr... | synchronized void function( BluetoothSocket socket ) { try { btSocket = socket; m_input = btSocket.getInputStream(); m_output = btSocket.getOutputStream(); notificationThread = new NotificationThread(); readThread = new ReadThread(); notificationThread.start(); readThread.start(); } catch( IOException e ) { Log.e( TAG,... | /**
* Set Bluetooth Socket and open it.
* @param socket
*/ | Set Bluetooth Socket and open it | openSocket | {
"repo_name": "yangjun2/android",
"path": "androidhap/Test/ttcp/src/com/airbiquity/mcs/iostream/BtLayer.java",
"license": "unlicense",
"size": 6891
} | [
"android.bluetooth.BluetoothSocket",
"android.util.Log",
"java.io.IOException"
] | import android.bluetooth.BluetoothSocket; import android.util.Log; import java.io.IOException; | import android.bluetooth.*; import android.util.*; import java.io.*; | [
"android.bluetooth",
"android.util",
"java.io"
] | android.bluetooth; android.util; java.io; | 430,844 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<TrafficManagerNameAvailabilityInner> checkTrafficManagerRelativeDnsNameAvailabilityAsync(
CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) {
return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(paramete... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<TrafficManagerNameAvailabilityInner> function( CheckTrafficManagerRelativeDnsNameAvailabilityParameters parameters) { return checkTrafficManagerRelativeDnsNameAvailabilityWithResponseAsync(parameters) .flatMap( (Response<TrafficManagerNameAvailabilityInner> res) -> { if ... | /**
* Checks the availability of a Traffic Manager Relative DNS name.
*
* @param parameters Parameters supplied to check Traffic Manager name operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected b... | Checks the availability of a Traffic Manager Relative DNS name | checkTrafficManagerRelativeDnsNameAvailabilityAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/ProfilesClientImpl.java",
"license": "mit",
"size": 57785
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.trafficmanager.fluent.models.TrafficManagerNameAvailabilityInner",
"com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsNameAvailabilit... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.trafficmanager.fluent.models.TrafficManagerNameAvailabilityInner; import com.azure.resourcemanager.trafficmanager.models.CheckTrafficManagerRelativeDnsN... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.trafficmanager.fluent.models.*; import com.azure.resourcemanager.trafficmanager.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 235,431 |
public final Property<Double> putAmount() {
return metaBean().putAmount().createProperty(this);
} | final Property<Double> function() { return metaBean().putAmount().createProperty(this); } | /**
* Gets the the {@code putAmount} property.
* @return the property, not null
*/ | Gets the the putAmount property | putAmount | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/option/NonDeliverableFXOptionSecurity.java",
"license": "apache-2.0",
"size": 24557
} | [
"org.joda.beans.Property"
] | import org.joda.beans.Property; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,905,373 |
private void initiateSceneLoad()
{
if (mUseAssetManager)
{
// kick off asset manager operations...
mAssetManager = new AssetManager();
mAssetManager.setLoader(RubeScene.class, new RubeSceneAsyncLoader(new InternalFileHandleResolver()));
// kick things off..
... | void function() { if (mUseAssetManager) { mAssetManager = new AssetManager(); mAssetManager.setLoader(RubeScene.class, new RubeSceneAsyncLoader(new InternalFileHandleResolver())); mAssetManager.load(RUBE_SCENE_FILE_LIST[mRubeFileList][mRubeFileIndex], RubeScene.class); } mNextState = GAME_STATE.LOADING; } | /**
* Kicks off asset manager if selected...
*
*/ | Kicks off asset manager if selected.. | initiateSceneLoad | {
"repo_name": "tescott/RubeLoader",
"path": "RubeLoaderTest/src/com/gushikustudios/rube/RubeLoaderTest.java",
"license": "apache-2.0",
"size": 25341
} | [
"com.badlogic.gdx.assets.AssetManager",
"com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver",
"com.gushikustudios.rube.loader.RubeSceneAsyncLoader"
] | import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver; import com.gushikustudios.rube.loader.RubeSceneAsyncLoader; | import com.badlogic.gdx.assets.*; import com.badlogic.gdx.assets.loaders.resolvers.*; import com.gushikustudios.rube.loader.*; | [
"com.badlogic.gdx",
"com.gushikustudios.rube"
] | com.badlogic.gdx; com.gushikustudios.rube; | 2,903,952 |
@NonNull
public static SharedPreferences.Editor putJson(@NonNull SharedPreferences.Editor editor,
@NonNull String key, @Nullable Object obj) {
editor.putString(key, GsonHelper.toJson(obj));
return editor;
} | static SharedPreferences.Editor function(@NonNull SharedPreferences.Editor editor, @NonNull String key, @Nullable Object obj) { editor.putString(key, GsonHelper.toJson(obj)); return editor; } | /**
* Stores object as json encoded string.
* Gson library should be available in classpath.
*/ | Stores object as json encoded string. Gson library should be available in classpath | putJson | {
"repo_name": "alexvasilkov/AndroidCommons",
"path": "library/src/main/java/com/alexvasilkov/android/commons/prefs/PreferencesHelper.java",
"license": "apache-2.0",
"size": 7082
} | [
"android.content.SharedPreferences",
"android.support.annotation.NonNull",
"android.support.annotation.Nullable",
"com.alexvasilkov.android.commons.utils.GsonHelper"
] | import android.content.SharedPreferences; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.alexvasilkov.android.commons.utils.GsonHelper; | import android.content.*; import android.support.annotation.*; import com.alexvasilkov.android.commons.utils.*; | [
"android.content",
"android.support",
"com.alexvasilkov.android"
] | android.content; android.support; com.alexvasilkov.android; | 1,801,553 |
private static String makeSwingPropertiesFilename() {
String sep = File.separator;
// No need to wrap this in a doPrivileged as it's called from
// a doPrivileged.
String javaHome = System.getProperty("java.home");
if (javaHome == null) {
javaHome = "<java.home un... | static String function() { String sep = File.separator; String javaHome = System.getProperty(STR); if (javaHome == null) { javaHome = STR; } return javaHome + sep + "conf" + sep + STR; } public static class LookAndFeelInfo { private String name; private String className; public LookAndFeelInfo(String name, String class... | /**
* The location of the <code>swing.properties</code> property file is
* implementation-specific.
* It is typically located in the <code>conf</code> subdirectory of the Java
* installation directory. This method returns a bogus filename
* if <code>java.home</code> isn't defined.
*/ | The location of the <code>swing.properties</code> property file is implementation-specific. It is typically located in the <code>conf</code> subdirectory of the Java installation directory. This method returns a bogus filename if <code>java.home</code> isn't defined | makeSwingPropertiesFilename | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/UIManager.java",
"license": "apache-2.0",
"size": 60973
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 575,109 |
@Test
public void testExpirationNonPersistentRegion() throws Exception {
IgniteEx srv = startGrid(0);
srv.cluster().baselineAutoAdjustEnabled(false);
srv.cluster().state(ACTIVE);
CacheConfiguration<?, ?> cfg =
getCacheConfiguration(CACHE_NAME_ATOMIC_NON_PERSISTENT)
... | void function() throws Exception { IgniteEx srv = startGrid(0); srv.cluster().baselineAutoAdjustEnabled(false); srv.cluster().state(ACTIVE); CacheConfiguration<?, ?> cfg = getCacheConfiguration(CACHE_NAME_ATOMIC_NON_PERSISTENT) .setAtomicityMode(ATOMIC) .setDataRegionName(NON_PERSISTENT_DATA_REGION); srv.getOrCreateCac... | /**
* Tests that cache entries (cache related to non persistent region) correctly expired.
*
* @throws Exception If failed.
*/ | Tests that cache entries (cache related to non persistent region) correctly expired | testExpirationNonPersistentRegion | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsWithTtlTest.java",
"license": "apache-2.0",
"size": 19485
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.configuration.CacheConfiguration",
"org.apache.ignite.internal.IgniteEx"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; | import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,125,641 |
@Test
public void testFieldWithHiveDelims() throws IOException,
InterruptedException {
final String TABLE_NAME = "FIELD_WITH_NL_HIVE_IMPORT";
LOG.info("Doing import of single row into FIELD_WITH_NL_HIVE_IMPORT table");
setCurTableName(TABLE_NAME);
setNumCols(3);
String[] types = getTypesNew... | void function() throws IOException, InterruptedException { final String TABLE_NAME = STR; LOG.info(STR); setCurTableName(TABLE_NAME); setNumCols(3); String[] types = getTypesNewLineTest(); String[] vals = { STR, "42", STR + '\01' + STR + '\01' + "'", }; String[] moreArgs = { "--"+ BaseSqoopTool.HIVE_DROP_DELIMS_ARG }; ... | /**
* Test hive import with row that has new line in it.
*/ | Test hive import with row that has new line in it | testFieldWithHiveDelims | {
"repo_name": "dlanza1/sqoop",
"path": "src/test/com/cloudera/sqoop/hive/TestHiveImport.java",
"license": "apache-2.0",
"size": 19286
} | [
"com.cloudera.sqoop.tool.BaseSqoopTool",
"com.cloudera.sqoop.tool.ImportTool",
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException"
] | import com.cloudera.sqoop.tool.BaseSqoopTool; import com.cloudera.sqoop.tool.ImportTool; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; | import com.cloudera.sqoop.tool.*; import java.io.*; | [
"com.cloudera.sqoop",
"java.io"
] | com.cloudera.sqoop; java.io; | 1,911,474 |
public int getSessionState() {
return ServerApiUtils.getSessionState(session);
} | int function() { return ServerApiUtils.getSessionState(session); } | /**
* Get session state
*
* @return State (see class SessionState)
*/ | Get session state | getSessionState | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/RCSe/core/src/com/orangelabs/rcs/service/api/server/messaging/ImSession.java",
"license": "gpl-2.0",
"size": 22418
} | [
"com.orangelabs.rcs.service.api.server.ServerApiUtils"
] | import com.orangelabs.rcs.service.api.server.ServerApiUtils; | import com.orangelabs.rcs.service.api.server.*; | [
"com.orangelabs.rcs"
] | com.orangelabs.rcs; | 313,086 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.returns.ReasonCollection> getReasonsClient(String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.getReasonsUrl(responseFields);
String verb = "GET";
Class<?> clz = com.mozu.api.contracts.commerceruntime.retu... | static MozuClient<com.mozu.api.contracts.commerceruntime.returns.ReasonCollection> function(String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.getReasonsUrl(responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.commerceruntime.returns.ReasonCollection.clas... | /**
* commerce-returns Get GetReasons description DOCUMENT_HERE
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.returns.ReasonCollection> mozuClient=GetReasonsClient( responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* ReasonCollection reasonCollection = client.... | commerce-returns Get GetReasons description DOCUMENT_HERE <code><code> MozuClient mozuClient=GetReasonsClient( responseFields); client.setBaseAddress(url); client.executeRequest(); ReasonCollection reasonCollection = client.Result(); </code></code> | getReasonsClient | {
"repo_name": "bhewett/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/ReturnClient.java",
"license": "mit",
"size": 38320
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 675,229 |
public void setLong(long value)
{
_type = ColumnType.LONG;
_longData = value;
} | void function(long value) { _type = ColumnType.LONG; _longData = value; } | /**
* Sets the value as a long.
*/ | Sets the value as a long | setLong | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/db/sql/Data.java",
"license": "gpl-2.0",
"size": 9506
} | [
"com.caucho.db.table.Column"
] | import com.caucho.db.table.Column; | import com.caucho.db.table.*; | [
"com.caucho.db"
] | com.caucho.db; | 763,236 |
Dependency localGroovy(); | Dependency localGroovy(); | /**
* Creates a dependency on the Groovy that is distributed with the current version of Gradle.
*
* @return The dependency.
*/ | Creates a dependency on the Groovy that is distributed with the current version of Gradle | localGroovy | {
"repo_name": "tkmnet/RCRS-ADF",
"path": "gradle/gradle-2.1/src/core/org/gradle/api/artifacts/dsl/DependencyHandler.java",
"license": "bsd-2-clause",
"size": 12819
} | [
"org.gradle.api.artifacts.Dependency"
] | import org.gradle.api.artifacts.Dependency; | import org.gradle.api.artifacts.*; | [
"org.gradle.api"
] | org.gradle.api; | 2,500,172 |
private static Tree maybeMakeLambdaBody(MethodTree compareMethod, VisitorState state) {
ExpressionTree comparison = returnExpression(compareMethod);
if (comparison != null) {
// compare() is defined as simply `return something;`. Create a lambda.
return comparison;
}
MethodTree enclo... | static Tree function(MethodTree compareMethod, VisitorState state) { ExpressionTree comparison = returnExpression(compareMethod); if (comparison != null) { return comparison; } MethodTree enclosingMethod = state.findEnclosing(MethodTree.class); if (enclosingMethod == null) { return null; } | /**
* Converts the given method into a lambda, either expression or block, if "appropriate." For
* details about the various cases, see implementation comments.
*/ | Converts the given method into a lambda, either expression or block, if "appropriate." For details about the various cases, see implementation comments | maybeMakeLambdaBody | {
"repo_name": "google/truth",
"path": "refactorings/src/main/java/com/google/common/truth/refactorings/CorrespondenceSubclassToFactoryCall.java",
"license": "apache-2.0",
"size": 27239
} | [
"com.google.errorprone.VisitorState",
"com.sun.source.tree.ExpressionTree",
"com.sun.source.tree.MethodTree",
"com.sun.source.tree.Tree"
] | import com.google.errorprone.VisitorState; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.Tree; | import com.google.errorprone.*; import com.sun.source.tree.*; | [
"com.google.errorprone",
"com.sun.source"
] | com.google.errorprone; com.sun.source; | 1,614,720 |
private void attachWebEndpointAnnotation(MethodDescriptionComposite mdc, Method
method) {
WebEndpoint webEndpoint = (WebEndpoint)ConverterUtils.getAnnotation(
WebEndpoint.class, method);
if (webEndpoint != null) {
WebEndpointAnnot weAnnot = WebEndpointAnnot.cr... | void function(MethodDescriptionComposite mdc, Method method) { WebEndpoint webEndpoint = (WebEndpoint)ConverterUtils.getAnnotation( WebEndpoint.class, method); if (webEndpoint != null) { WebEndpointAnnot weAnnot = WebEndpointAnnot.createWebEndpointAnnotImpl(); weAnnot.setName(webEndpoint.name()); mdc.setWebEndpointAnno... | /**
* This method will drive the attachment of @WebEndpoint annotation data to the
* <code>MethodDescriptionComposite</code>
*
* @param mdc - <code>MethodDescriptionComposite</code>
* @param method - <code>Method</code>
*/ | This method will drive the attachment of @WebEndpoint annotation data to the <code>MethodDescriptionComposite</code> | attachWebEndpointAnnotation | {
"repo_name": "intalio/axis2",
"path": "modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java",
"license": "apache-2.0",
"size": 15047
} | [
"java.lang.reflect.Method",
"javax.xml.ws.WebEndpoint",
"org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite",
"org.apache.axis2.jaxws.description.builder.WebEndpointAnnot"
] | import java.lang.reflect.Method; import javax.xml.ws.WebEndpoint; import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite; import org.apache.axis2.jaxws.description.builder.WebEndpointAnnot; | import java.lang.reflect.*; import javax.xml.ws.*; import org.apache.axis2.jaxws.description.builder.*; | [
"java.lang",
"javax.xml",
"org.apache.axis2"
] | java.lang; javax.xml; org.apache.axis2; | 2,632,383 |
protected void drawLowFarOut(double aRadius, Graphics2D g2, double xx,
double m) {
double side = aRadius * 2;
g2.draw(new Line2D.Double(xx - side, m - side, xx + side, m - side));
g2.draw(new Line2D.Double(xx - side, m - side, xx, m));
g2.draw(new Line2D.Double(xx + ... | void function(double aRadius, Graphics2D g2, double xx, double m) { double side = aRadius * 2; g2.draw(new Line2D.Double(xx - side, m - side, xx + side, m - side)); g2.draw(new Line2D.Double(xx - side, m - side, xx, m)); g2.draw(new Line2D.Double(xx + side, m - side, xx, m)); } | /**
* Draws a triangle to indicate the presence of far out values.
*
* @param aRadius the radius.
* @param g2 the graphics device.
* @param xx the x value.
* @param m the min y value.
*/ | Draws a triangle to indicate the presence of far out values | drawLowFarOut | {
"repo_name": "sternze/CurrentTopics_JFreeChart",
"path": "source/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.java",
"license": "lgpl-2.1",
"size": 32448
} | [
"java.awt.Graphics2D",
"java.awt.geom.Line2D"
] | import java.awt.Graphics2D; import java.awt.geom.Line2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,719,086 |
public void test_print_String_nl_cr() {
for (boolean mustIgnoreEmptyLastLine : new boolean[]{false,true}) {
final MemPrintStream stream = new MemPrintStream(mustIgnoreEmptyLastLine);
try {
stream.print("a");
assertEquals(1, stream.getLines().size());
... | void function() { for (boolean mustIgnoreEmptyLastLine : new boolean[]{false,true}) { final MemPrintStream stream = new MemPrintStream(mustIgnoreEmptyLastLine); try { stream.print("a"); assertEquals(1, stream.getLines().size()); assertEquals("a", stream.getLines().get(0)); stream.print("\n"); assertEquals(vlc(stream, 1... | /**
* Tests "\n" and "\r" and "\r\n" handing.
*/ | Tests "\n" and "\r" and "\r\n" handing | test_print_String_nl_cr | {
"repo_name": "jeffhain/jadecy",
"path": "src/test/java/net/jadecy/utils/MemPrintStreamTest.java",
"license": "apache-2.0",
"size": 22124
} | [
"net.jadecy.utils.MemPrintStream"
] | import net.jadecy.utils.MemPrintStream; | import net.jadecy.utils.*; | [
"net.jadecy.utils"
] | net.jadecy.utils; | 1,547,600 |
private void iterateXFromY(ExecutorService executor) throws ExecutionException, InterruptedException {
RealMatrix YTY = MatrixUtils.transposeTimesSelf(Y);
Collection<Future<?>> futures = Lists.newArrayList();
addWorkers(RbyRow, Y, YTY, X, executor, futures);
int count = 0;
long total = 0;
fo... | void function(ExecutorService executor) throws ExecutionException, InterruptedException { RealMatrix YTY = MatrixUtils.transposeTimesSelf(Y); Collection<Future<?>> futures = Lists.newArrayList(); addWorkers(RbyRow, Y, YTY, X, executor, futures); int count = 0; long total = 0; for (Future<?> f : futures) { f.get(); coun... | /**
* Runs one iteration to compute X from Y.
*/ | Runs one iteration to compute X from Y | iterateXFromY | {
"repo_name": "bikash/oryx",
"path": "als-common/src/main/java/com/cloudera/oryx/als/common/factorizer/als/AlternatingLeastSquares.java",
"license": "apache-2.0",
"size": 20934
} | [
"com.cloudera.oryx.common.math.MatrixUtils",
"com.cloudera.oryx.common.stats.JVMEnvironment",
"com.google.common.collect.Lists",
"java.util.Collection",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Future",
"org.apache.commons.math3.linear.Re... | import com.cloudera.oryx.common.math.MatrixUtils; import com.cloudera.oryx.common.stats.JVMEnvironment; import com.google.common.collect.Lists; import java.util.Collection; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import org.apache.... | import com.cloudera.oryx.common.math.*; import com.cloudera.oryx.common.stats.*; import com.google.common.collect.*; import java.util.*; import java.util.concurrent.*; import org.apache.commons.math3.linear.*; | [
"com.cloudera.oryx",
"com.google.common",
"java.util",
"org.apache.commons"
] | com.cloudera.oryx; com.google.common; java.util; org.apache.commons; | 872,900 |
Registry getRegistry();
/**
* Returns the registry used to lookup components by name and as the given type
*
* @param type the registry type such as {@link org.apache.camel.impl.JndiRegistry} | Registry getRegistry(); /** * Returns the registry used to lookup components by name and as the given type * * @param type the registry type such as {@link org.apache.camel.impl.JndiRegistry} | /**
* Returns the registry used to lookup components by name and type such as the Spring ApplicationContext,
* JNDI or the OSGi Service Registry
*
* @return the registry
*/ | Returns the registry used to lookup components by name and type such as the Spring ApplicationContext, JNDI or the OSGi Service Registry | getRegistry | {
"repo_name": "curso007/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 79052
} | [
"org.apache.camel.spi.Registry"
] | import org.apache.camel.spi.Registry; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 686,541 |
public void duplicateROI()
{
manager.showReadyMessage();
List<ROIShape> selectedObjects = getSelectedROIShapes();
if (ROIUtil.onSeparatePlanes(selectedObjects) && ROIUtil.haveSameID(selectedObjects))
manager.duplicateROI(ROIUtil.getSameID(selectedObjects), selectedObjects );
else
manager.showMessag... | void function() { manager.showReadyMessage(); List<ROIShape> selectedObjects = getSelectedROIShapes(); if (ROIUtil.onSeparatePlanes(selectedObjects) && ROIUtil.haveSameID(selectedObjects)) manager.duplicateROI(ROIUtil.getSameID(selectedObjects), selectedObjects ); else manager.showMessage(STR + STR); } | /**
* Duplicates the ROI
* @see ROIActionController#duplicateROI()
*/ | Duplicates the ROI | duplicateROI | {
"repo_name": "MontpellierRessourcesImagerie/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/ROITable.java",
"license": "gpl-2.0",
"size": 55613
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.measurement.util.roitable.ROIUtil",
"org.openmicroscopy.shoola.util.roi.model.ROIShape"
] | import java.util.List; import org.openmicroscopy.shoola.agents.measurement.util.roitable.ROIUtil; import org.openmicroscopy.shoola.util.roi.model.ROIShape; | import java.util.*; import org.openmicroscopy.shoola.agents.measurement.util.roitable.*; import org.openmicroscopy.shoola.util.roi.model.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,515,493 |
public Map<String,FieldsSubsystemClass> queryEntitySubsystemClass(List<Tuple3<String, String, String>> qry, List<String> fields) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(qry);
args.add(fields);
TypeReference<List<Map<String,Field... | Map<String,FieldsSubsystemClass> function(List<Tuple3<String, String, String>> qry, List<String> fields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(qry); args.add(fields); TypeReference<List<Map<String,FieldsSubsystemClass>>> retType = new TypeReference<List<Map<Stri... | /**
* <p>Original spec-file function name: query_entity_SubsystemClass</p>
* <pre>
* </pre>
* @param qry instance of list of tuple of size 3: String, String, String
* @param fields instance of list of String
* @return instance of mapping from String to type {@link us.kbase.cdmien... | Original spec-file function name: query_entity_SubsystemClass <code> </code> | queryEntitySubsystemClass | {
"repo_name": "kbase/trees",
"path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java",
"license": "mit",
"size": 869221
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.Tuple3"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 1,967,511 |
public String getFormattedAcquisitionTime()
{
return DateFormat.getDateInstance().format(getAcquisitionTime());
} | String function() { return DateFormat.getDateInstance().format(getAcquisitionTime()); } | /**
* Returns the time of acquisition or the actual time if information
* not available.
*
* @return See above.
*/ | Returns the time of acquisition or the actual time if information not available | getFormattedAcquisitionTime | {
"repo_name": "hflynn/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/browser/ImageNode.java",
"license": "gpl-2.0",
"size": 9657
} | [
"java.text.DateFormat"
] | import java.text.DateFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,316,978 |
public YieldAndDiscountCurve getCurve(final IndexON index) {
return getMulticurveProvider().getCurve(index);
} | YieldAndDiscountCurve function(final IndexON index) { return getMulticurveProvider().getCurve(index); } | /**
* Gets the forward curve associated to a given ON index in the market.
* @param index The ON index.
* @return The curve.
*/ | Gets the forward curve associated to a given ON index in the market | getCurve | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/description/interestrate/BlackSwaptionFlatProviderDiscount.java",
"license": "apache-2.0",
"size": 6302
} | [
"com.opengamma.analytics.financial.instrument.index.IndexON",
"com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve"
] | import com.opengamma.analytics.financial.instrument.index.IndexON; import com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve; | import com.opengamma.analytics.financial.instrument.index.*; import com.opengamma.analytics.financial.model.interestrate.curve.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,322,380 |
private void validate()
{
if (StringUtil.isEmpty(sourceURI))
{
setErrorMessage(Messages.RepositorySelectionPage_SourceURIRequired_Message);
setPageComplete(false);
return;
}
String dstpath = destinationText.getText();
if (StringUtil.isEmpty(dstpath))
{
setErrorMessage(Messages.RepositorySel... | void function() { if (StringUtil.isEmpty(sourceURI)) { setErrorMessage(Messages.RepositorySelectionPage_SourceURIRequired_Message); setPageComplete(false); return; } String dstpath = destinationText.getText(); if (StringUtil.isEmpty(dstpath)) { setErrorMessage(Messages.RepositorySelectionPage_DestinatioNRequired_Messag... | /**
* Check internal state for page completion status.
*/ | Check internal state for page completion status | validate | {
"repo_name": "HossainKhademian/Studio3",
"path": "plugins/com.aptana.git.ui/src/com/aptana/git/ui/internal/wizards/RepositorySelectionPage.java",
"license": "gpl-3.0",
"size": 11166
} | [
"com.aptana.core.util.StringUtil",
"java.io.File",
"org.eclipse.osgi.util.NLS"
] | import com.aptana.core.util.StringUtil; import java.io.File; import org.eclipse.osgi.util.NLS; | import com.aptana.core.util.*; import java.io.*; import org.eclipse.osgi.util.*; | [
"com.aptana.core",
"java.io",
"org.eclipse.osgi"
] | com.aptana.core; java.io; org.eclipse.osgi; | 2,909,160 |
EReference getCreateStoredQueryType_StoredQueryDefinition(); | EReference getCreateStoredQueryType_StoredQueryDefinition(); | /**
* Returns the meta object for the containment reference list '{@link net.opengis.wfs20.CreateStoredQueryType#getStoredQueryDefinition <em>Stored Query Definition</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Stored Query Definition... | Returns the meta object for the containment reference list '<code>net.opengis.wfs20.CreateStoredQueryType#getStoredQueryDefinition Stored Query Definition</code>'. | getCreateStoredQueryType_StoredQueryDefinition | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java",
"license": "lgpl-2.1",
"size": 404067
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,181,389 |
@Test
public void downloadMultipleFiles() throws Exception {
Download t = makeProjectAndTask();
t.src(Arrays.asList(wireMock.url(TEST_FILE_NAME),
wireMock.url(TEST_FILE_NAME2)));
File dst = newTempDir();
t.dest(dst);
execute(t);
assertThat(new Fi... | void function() throws Exception { Download t = makeProjectAndTask(); t.src(Arrays.asList(wireMock.url(TEST_FILE_NAME), wireMock.url(TEST_FILE_NAME2))); File dst = newTempDir(); t.dest(dst); execute(t); assertThat(new File(dst, TEST_FILE_NAME)) .usingCharset(StandardCharsets.UTF_8) .hasContent(CONTENTS); assertThat(new... | /**
* Tests if multiple files can be downloaded to a directory
* @throws Exception if anything goes wrong
*/ | Tests if multiple files can be downloaded to a directory | downloadMultipleFiles | {
"repo_name": "michel-kraemer/gradle-download-task",
"path": "src/test/java/de/undercouch/gradle/tasks/download/DownloadTest.java",
"license": "apache-2.0",
"size": 13356
} | [
"java.io.File",
"java.nio.charset.StandardCharsets",
"java.util.Arrays",
"org.assertj.core.api.Assertions"
] | import java.io.File; import java.nio.charset.StandardCharsets; import java.util.Arrays; import org.assertj.core.api.Assertions; | import java.io.*; import java.nio.charset.*; import java.util.*; import org.assertj.core.api.*; | [
"java.io",
"java.nio",
"java.util",
"org.assertj.core"
] | java.io; java.nio; java.util; org.assertj.core; | 1,439,051 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<GeoBackupPolicyInner>> getWithResponseAsync(
String resourceGroupName,
String workspaceName,
String sqlPoolName,
GeoBackupPolicyName geoBackupPolicyName,
Context context) {
if (this.client.getEndpoi... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<GeoBackupPolicyInner>> function( String resourceGroupName, String workspaceName, String sqlPoolName, GeoBackupPolicyName geoBackupPolicyName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } i... | /**
* Get the specified SQL pool geo backup policy.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param geoBackupPolicyName The name of the geo backup polic... | Get the specified SQL pool geo backup policy | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolGeoBackupPoliciesClientImpl.java",
"license": "mit",
"size": 34949
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner",
"com.azure.resourcemanager.synapse.models.GeoBackupPolicyName"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner; import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.synapse.fluent.models.*; import com.azure.resourcemanager.synapse.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 723,980 |
public static <E> Vector<E> readVector(DataInput in) throws IOException, ClassNotFoundException {
InternalDataSerializer.checkIn(in);
int size = InternalDataSerializer.readArrayLength(in);
if (size == -1) {
return null;
} else {
Vector<E> list = new Vector<E>(size);
for (int i = 0;... | static <E> Vector<E> function(DataInput in) throws IOException, ClassNotFoundException { InternalDataSerializer.checkIn(in); int size = InternalDataSerializer.readArrayLength(in); if (size == -1) { return null; } else { Vector<E> list = new Vector<E>(size); for (int i = 0; i < size; i++) { E element = DataSerializer.<E... | /**
* Reads an <code>Vector</code> from a <code>DataInput</code>.
*
* @throws IOException A problem occurs while reading from <code>in</code>
* @throws ClassNotFoundException The class of one of the <Code>Vector</code>'s elements cannot be
* found.
*
* @see #writeVector
* @since GemFire ... | Reads an <code>Vector</code> from a <code>DataInput</code> | readVector | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/DataSerializer.java",
"license": "apache-2.0",
"size": 106864
} | [
"java.io.DataInput",
"java.io.IOException",
"java.util.Vector",
"org.apache.geode.internal.InternalDataSerializer",
"org.apache.geode.internal.logging.log4j.LogMarker"
] | import java.io.DataInput; import java.io.IOException; import java.util.Vector; import org.apache.geode.internal.InternalDataSerializer; import org.apache.geode.internal.logging.log4j.LogMarker; | import java.io.*; import java.util.*; import org.apache.geode.internal.*; import org.apache.geode.internal.logging.log4j.*; | [
"java.io",
"java.util",
"org.apache.geode"
] | java.io; java.util; org.apache.geode; | 77,052 |
public static XStreamDataFormat processAnnotations(ClassResolver resolver, Iterable<Class<?>> types) {
XStreamDataFormat answer = new XStreamDataFormat();
XStream xstream = answer.getXStream(resolver);
for (Class<?> type : types) {
xstream.processAnnotations(type);
}
... | static XStreamDataFormat function(ClassResolver resolver, Iterable<Class<?>> types) { XStreamDataFormat answer = new XStreamDataFormat(); XStream xstream = answer.getXStream(resolver); for (Class<?> type : types) { xstream.processAnnotations(type); } return answer; } | /**
* A factory method which takes a collection of types to be annotated
*/ | A factory method which takes a collection of types to be annotated | processAnnotations | {
"repo_name": "aaronwalker/camel",
"path": "components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java",
"license": "apache-2.0",
"size": 4188
} | [
"com.thoughtworks.xstream.XStream",
"org.apache.camel.spi.ClassResolver"
] | import com.thoughtworks.xstream.XStream; import org.apache.camel.spi.ClassResolver; | import com.thoughtworks.xstream.*; import org.apache.camel.spi.*; | [
"com.thoughtworks.xstream",
"org.apache.camel"
] | com.thoughtworks.xstream; org.apache.camel; | 1,672,088 |
@Deprecated
protected GraphPropertyEntity buildPropertyEntity2(String key, Object value, String majorLabel, String...labels) {
if (majorLabel == null) return null;
if (key == null) return null;
if (value == null) return null;
if (value instanceof String) {
String value_ = (String)value;
... | GraphPropertyEntity function(String key, Object value, String majorLabel, String...labels) { if (majorLabel == null) return null; if (key == null) return null; if (value == null) return null; if (value instanceof String) { String value_ = (String)value; if (value_.trim().isEmpty()) return null; } Map<String, Object> pr... | /**
* Everything with 2 at the end does not automatic add the METABOLITE_PROPERTY_LABEL
* @param key
* @param value
* @param majorLabel
* @param labels
* @return
*/ | Everything with 2 at the end does not automatic add the METABOLITE_PROPERTY_LABEL | buildPropertyEntity2 | {
"repo_name": "Fxe/biosynth-framework",
"path": "biosynth-integration/src/main/java/pt/uminho/sysbio/biosynth/integration/etl/AbstractMetaboliteTransform.java",
"license": "gpl-3.0",
"size": 22090
} | [
"java.util.Arrays",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"pt.uminho.sysbio.biosynth.integration.GraphPropertyEntity"
] | import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import pt.uminho.sysbio.biosynth.integration.GraphPropertyEntity; | import java.util.*; import pt.uminho.sysbio.biosynth.integration.*; | [
"java.util",
"pt.uminho.sysbio"
] | java.util; pt.uminho.sysbio; | 617,429 |
public void addItem(ItemStack item, int amount) {
Debug.info(" Cloned item type: " + item.getType());
for (ItemStack itemStack : backpack) {
if (item.isSimilar(itemStack)) {
// if items are similar they can be joined in a single itemstack
if (amount + ite... | void function(ItemStack item, int amount) { Debug.info(STR + item.getType()); for (ItemStack itemStack : backpack) { if (item.isSimilar(itemStack)) { if (amount + itemStack.getAmount() <= itemStack.getMaxStackSize()) { itemStack.setAmount(itemStack.getAmount() + amount); return; } else { amount -= itemStack.getMaxStack... | /**
* Adds the item to backpack. The amount of the itemstack doesn't matter,
* it's overwritten by amount parameter.
*
* @param item
* ItemStack to add to backpack
* @param amount
* amount of the items
*/ | Adds the item to backpack. The amount of the itemstack doesn't matter, it's overwritten by amount parameter | addItem | {
"repo_name": "fastlockel/BetonQuest",
"path": "src/main/java/pl/betoncraft/betonquest/database/DatabaseHandler.java",
"license": "gpl-3.0",
"size": 16773
} | [
"org.bukkit.inventory.ItemStack",
"pl.betoncraft.betonquest.utils.Debug"
] | import org.bukkit.inventory.ItemStack; import pl.betoncraft.betonquest.utils.Debug; | import org.bukkit.inventory.*; import pl.betoncraft.betonquest.utils.*; | [
"org.bukkit.inventory",
"pl.betoncraft.betonquest"
] | org.bukkit.inventory; pl.betoncraft.betonquest; | 559,316 |
TestFile getGradleHomeDir(); | TestFile getGradleHomeDir(); | /**
* Returns the root directory of the installed distribution
*/ | Returns the root directory of the installed distribution | getGradleHomeDir | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/GradleDistribution.java",
"license": "apache-2.0",
"size": 5766
} | [
"org.gradle.test.fixtures.file.TestFile"
] | import org.gradle.test.fixtures.file.TestFile; | import org.gradle.test.fixtures.file.*; | [
"org.gradle.test"
] | org.gradle.test; | 2,631,856 |
@Override
public ItemStack slotClick(final int slotId, final int dragType, final ClickType clickTypeIn, final EntityPlayer player) {
final ItemStack result = super.slotClick(slotId, dragType, clickTypeIn, player);
if (slotId == 0) {
// Clicked the result
for (final Objec... | ItemStack function(final int slotId, final int dragType, final ClickType clickTypeIn, final EntityPlayer player) { final ItemStack result = super.slotClick(slotId, dragType, clickTypeIn, player); if (slotId == 0) { for (final Object inventory : bridge$getFabric().fabric$allInventories()) { for (final IContainerListener... | /**
* Not an overwrite since the original method is not overridden in
* {@link ContainerPlayer} nor {@link ContainerWorkbench}. This
* adds the override to both of those classes to allow for
* performing listeners with potential inventory listeners registered
* through the API.
*
* @p... | Not an overwrite since the original method is not overridden in <code>ContainerPlayer</code> nor <code>ContainerWorkbench</code>. This adds the override to both of those classes to allow for performing listeners with potential inventory listeners registered through the API | slotClick | {
"repo_name": "SpongePowered/SpongeCommon",
"path": "src/main/java/org/spongepowered/common/mixin/core/inventory/CraftingContainerMixin.java",
"license": "mit",
"size": 3238
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.inventory.ClickType",
"net.minecraft.inventory.Container",
"net.minecraft.inventory.IContainerListener",
"net.minecraft.item.ItemStack"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ClickType; import net.minecraft.inventory.Container; import net.minecraft.inventory.IContainerListener; import net.minecraft.item.ItemStack; | import net.minecraft.entity.player.*; import net.minecraft.inventory.*; import net.minecraft.item.*; | [
"net.minecraft.entity",
"net.minecraft.inventory",
"net.minecraft.item"
] | net.minecraft.entity; net.minecraft.inventory; net.minecraft.item; | 2,138,283 |
EReference getConductingEquipment_Terminals(); | EReference getConductingEquipment_Terminals(); | /**
* Returns the meta object for the reference list '{@link outagePreventionJointarget.ConductingEquipment#getTerminals <em>Terminals</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Terminals</em>'.
* @see outagePreventionJointarget.ConductingEq... | Returns the meta object for the reference list '<code>outagePreventionJointarget.ConductingEquipment#getTerminals Terminals</code>'. | getConductingEquipment_Terminals | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/outagePreventionJointarget/OutagePreventionJointargetPackage.java",
"license": "mit",
"size": 67109
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 823,899 |
private boolean checkPatternMatch(String qualifiedName, Pattern pattern) {
Matcher matcher = pattern.matcher(qualifiedName);
return matcher.matches();
}
private static SchemaCache configSchema = new SchemaCache(Config.class.getResource("config.xsd")); | boolean function(String qualifiedName, Pattern pattern) { Matcher matcher = pattern.matcher(qualifiedName); return matcher.matches(); } private static SchemaCache configSchema = new SchemaCache(Config.class.getResource(STR)); | /**
* This will check if the qualified name matches the pattern
*
* @param qualifiedName
* The qualified name of the TypeDeclaration
* @param pattern
* The pattern obtained from the users input
*
*/ | This will check if the qualified name matches the pattern | checkPatternMatch | {
"repo_name": "samskivert/ikvm-openjdk",
"path": "build/linux-amd64/impsrc/com/sun/tools/internal/jxc/ConfigReader.java",
"license": "gpl-2.0",
"size": 9914
} | [
"com.sun.tools.internal.jxc.gen.config.Config",
"com.sun.tools.internal.xjc.SchemaCache",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import com.sun.tools.internal.jxc.gen.config.Config; import com.sun.tools.internal.xjc.SchemaCache; import java.util.regex.Matcher; import java.util.regex.Pattern; | import com.sun.tools.internal.jxc.gen.config.*; import com.sun.tools.internal.xjc.*; import java.util.regex.*; | [
"com.sun.tools",
"java.util"
] | com.sun.tools; java.util; | 2,174,709 |
protected static ListMultimap<Filter, Description> simulateSelfRandomizingTestRun(
List<Filter> filters, List<Description> descriptions) {
if (descriptions.isEmpty()) {
return ArrayListMultimap.create();
}
Deque<Description> mutatingDescriptions = Lists.newLinkedList(descriptions);
ListMul... | static ListMultimap<Filter, Description> function( List<Filter> filters, List<Description> descriptions) { if (descriptions.isEmpty()) { return ArrayListMultimap.create(); } Deque<Description> mutatingDescriptions = Lists.newLinkedList(descriptions); ListMultimap<Filter, Description> descriptionsRun = ArrayListMultimap... | /**
* Simulates test sharding with the given filters and test descriptions, for a
* set of test descriptions that is in a different order in every test shard.
*
* @param filters a list of filters, one per test shard
* @param descriptions a list of test descriptions
* @return a mapping from each filter... | Simulates test sharding with the given filters and test descriptions, for a set of test descriptions that is in a different order in every test shard | simulateSelfRandomizingTestRun | {
"repo_name": "hhclam/bazel",
"path": "src/java_tools/junitrunner/java/com/google/testing/junit/runner/sharding/testing/ShardingFilterTestCase.java",
"license": "apache-2.0",
"size": 9319
} | [
"com.google.common.collect.ArrayListMultimap",
"com.google.common.collect.ListMultimap",
"com.google.common.collect.Lists",
"java.util.Deque",
"java.util.List",
"org.junit.runner.Description",
"org.junit.runner.manipulation.Filter"
] | import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import java.util.Deque; import java.util.List; import org.junit.runner.Description; import org.junit.runner.manipulation.Filter; | import com.google.common.collect.*; import java.util.*; import org.junit.runner.*; import org.junit.runner.manipulation.*; | [
"com.google.common",
"java.util",
"org.junit.runner"
] | com.google.common; java.util; org.junit.runner; | 541,035 |
public static String getRelativeDirectory(InputFile inputFile) {
String relativePath = inputFile.getRelativePath();
if (StringUtils.contains(relativePath, "/")) {
return StringUtils.substringBeforeLast(relativePath, "/");
}
return "";
} | static String function(InputFile inputFile) { String relativePath = inputFile.getRelativePath(); if (StringUtils.contains(relativePath, "/")) { return StringUtils.substringBeforeLast(relativePath, "/"); } return ""; } | /**
* Extract the directory from relative path. Examples :
* - returns "org/foo" when relative path is "org/foo/Bar.java"
* - returns "" when relative path is "Bar.java"
*/ | Extract the directory from relative path. Examples : - returns "org/foo" when relative path is "org/foo/Bar.java" - returns "" when relative path is "Bar.java" | getRelativeDirectory | {
"repo_name": "joansmith/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/resources/InputFileUtils.java",
"license": "lgpl-3.0",
"size": 5037
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,635,866 |
private void tabCreatedInForeground(
int id, int sourceId, boolean newIsIncognito, float originX, float originY) {
LayoutTab newLayoutTab = createLayoutTab(id, newIsIncognito, NO_CLOSE_BUTTON, NO_TITLE);
if (mLayoutTabs == null || mLayoutTabs.length == 0) {
mLayoutTabs = new ... | void function( int id, int sourceId, boolean newIsIncognito, float originX, float originY) { LayoutTab newLayoutTab = createLayoutTab(id, newIsIncognito, NO_CLOSE_BUTTON, NO_TITLE); if (mLayoutTabs == null mLayoutTabs.length == 0) { mLayoutTabs = new LayoutTab[] {newLayoutTab}; } else { mLayoutTabs = new LayoutTab[] {m... | /**
* Animate opening a tab in the foreground.
*
* @param id The id of the new tab to animate.
* @param sourceId The id of the tab that spawned this new tab.
* @param newIsIncognito true if the new tab is an incognito tab.
* @param originX The X coordinate of the l... | Animate opening a tab in the foreground | tabCreatedInForeground | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/SimpleAnimationLayout.java",
"license": "bsd-3-clause",
"size": 20629
} | [
"android.animation.AnimatorSet",
"java.util.Arrays",
"java.util.LinkedList",
"org.chromium.chrome.browser.compositor.animation.CompositorAnimationHandler",
"org.chromium.chrome.browser.compositor.animation.CompositorAnimator",
"org.chromium.chrome.browser.compositor.layouts.components.LayoutTab",
"org.c... | import android.animation.AnimatorSet; import java.util.Arrays; import java.util.LinkedList; import org.chromium.chrome.browser.compositor.animation.CompositorAnimationHandler; import org.chromium.chrome.browser.compositor.animation.CompositorAnimator; import org.chromium.chrome.browser.compositor.layouts.components.Lay... | import android.animation.*; import java.util.*; import org.chromium.chrome.browser.compositor.animation.*; import org.chromium.chrome.browser.compositor.layouts.components.*; import org.chromium.ui.interpolators.*; | [
"android.animation",
"java.util",
"org.chromium.chrome",
"org.chromium.ui"
] | android.animation; java.util; org.chromium.chrome; org.chromium.ui; | 721,138 |
public DcmElement putUN(int tag, byte[] value) {
return put(value != null ? ValueElement.createUN(tag, value)
: ValueElement.createUN(tag));
} | DcmElement function(int tag, byte[] value) { return put(value != null ? ValueElement.createUN(tag, value) : ValueElement.createUN(tag)); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @param value
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putUN | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/branches/DCM4CHE_2_14_22_BRANCHA/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86392
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 2,695,362 |
@Test
public void testAlignment()
throws Exception
{
final DataExporterCallback callback = new AbstractDataExporterCallback()
{ | void function() throws Exception { final DataExporterCallback callback = new AbstractDataExporterCallback() { | /**
* Test alignment.
*
* @throws Exception the exception
*/ | Test alignment | testAlignment | {
"repo_name": "eFaps/Data-Exporter",
"path": "src/test/java/org/efaps/dataexporter/output/texttable/TextTableExporterTest.java",
"license": "apache-2.0",
"size": 7571
} | [
"org.efaps.dataexporter.model.AbstractDataExporterCallback",
"org.efaps.dataexporter.model.DataExporterCallback"
] | import org.efaps.dataexporter.model.AbstractDataExporterCallback; import org.efaps.dataexporter.model.DataExporterCallback; | import org.efaps.dataexporter.model.*; | [
"org.efaps.dataexporter"
] | org.efaps.dataexporter; | 652,064 |
@Test
public void testHighestPriReplSrcChosenDespiteMaxReplLimit() throws Exception {
bm.maxReplicationStreams = 0;
bm.replicationStreamsHardLimit = 1;
long blockId = 42; // arbitrary
Block aBlock = new Block(blockId, 0, 0);
List<DatanodeDescriptor> origNodes = getNodes(0, 1);
// A... | void function() throws Exception { bm.maxReplicationStreams = 0; bm.replicationStreamsHardLimit = 1; long blockId = 42; Block aBlock = new Block(blockId, 0, 0); List<DatanodeDescriptor> origNodes = getNodes(0, 1); addBlockOnNodes(blockId,origNodes.subList(0,1)); List<DatanodeDescriptor> cntNodes = new LinkedList<Datano... | /**
* Test that a source node for a highest-priority reconstruction is chosen
* even if all available source nodes have reached their replication limits.
*/ | Test that a source node for a highest-priority reconstruction is chosen even if all available source nodes have reached their replication limits | testHighestPriReplSrcChosenDespiteMaxReplLimit | {
"repo_name": "huafengw/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java",
"license": "apache-2.0",
"size": 61228
} | [
"java.util.ArrayList",
"java.util.LinkedList",
"java.util.List",
"org.apache.hadoop.hdfs.protocol.Block",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.apache.hadoop.hdfs.protocol.Block; import org.junit.Assert; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 2,290,688 |
LocalDateTime extractExpiryDate(Map<String, String> args) {
return extractExpiryDate(args, ZoneId.systemDefault());
} | LocalDateTime extractExpiryDate(Map<String, String> args) { return extractExpiryDate(args, ZoneId.systemDefault()); } | /**
* Uses system default TimeZone for expiry date calculations
* @param args
* @return
*/ | Uses system default TimeZone for expiry date calculations | extractExpiryDate | {
"repo_name": "icgc-dcc/dcc-storage",
"path": "score-client/src/main/java/bio/overture/score/client/util/PresignedUrlValidator.java",
"license": "gpl-3.0",
"size": 3786
} | [
"java.time.LocalDateTime",
"java.time.ZoneId",
"java.util.Map"
] | import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Map; | import java.time.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 2,538,727 |
String value;
try {
value = SystemPropertyUtil.get("org.jboss.netty.debug");
} catch (Exception e) {
value = null;
}
if (value == null) {
return false;
}
value = value.trim().toUpperCase();
return !value.startsWith("N") &&
... | String value; try { value = SystemPropertyUtil.get(STR); } catch (Exception e) { value = null; } if (value == null) { return false; } value = value.trim().toUpperCase(); return !value.startsWith("N") && !value.startsWith("F") && !value.equals("0"); } private DebugUtil() { } | /**
* Returns {@code true} if and only if Netty debug mode is enabled.
*/ | Returns true if and only if Netty debug mode is enabled | isDebugEnabled | {
"repo_name": "whg333/netty-3.2.5.Final",
"path": "src/main/java/org/jboss/netty/util/DebugUtil.java",
"license": "apache-2.0",
"size": 2229
} | [
"org.jboss.netty.util.internal.SystemPropertyUtil"
] | import org.jboss.netty.util.internal.SystemPropertyUtil; | import org.jboss.netty.util.internal.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 463,011 |
public static double[] projectNGramAlphabet(String s, Map<String, Integer> m) {
double[] res = new double[m.size()];
// assume all n-gram have same size
int n = m.keySet().iterator().next().length();
for(int i = 0 ; i < s.length()-n ; i++) {
String k = s.substring(i, i+n);
if(m.containsKey(k)) {
... | static double[] function(String s, Map<String, Integer> m) { double[] res = new double[m.size()]; int n = m.keySet().iterator().next().length(); for(int i = 0 ; i < s.length()-n ; i++) { String k = s.substring(i, i+n); if(m.containsKey(k)) { res[m.get(k)]++; } } return res; } | /**
* computes the histogram of occurrences of n-grams gien in the alphabet
* @param s string to compute the histoogram
* @param m alphabet of n-grams and corresponding indexes in the output vector
* @return histogram
*/ | computes the histogram of occurrences of n-grams gien in the alphabet | projectNGramAlphabet | {
"repo_name": "davidpicard/jkernelmachines",
"path": "src/main/java/net/jkernelmachines/projection/StringNGramProjection.java",
"license": "bsd-3-clause",
"size": 6468
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,124,808 |
private static String constructPath(byte[][] components, int start, int end) {
StringBuilder buf = new StringBuilder();
for (int i = start; i < end; i++) {
buf.append(DFSUtil.bytes2String(components[i]));
if (i < end - 1) {
buf.append(Path.SEPARATOR);
}
}
return buf.toString(... | static String function(byte[][] components, int start, int end) { StringBuilder buf = new StringBuilder(); for (int i = start; i < end; i++) { buf.append(DFSUtil.bytes2String(components[i])); if (i < end - 1) { buf.append(Path.SEPARATOR); } } return buf.toString(); } | /**
* Given some components, create a path name.
* @param components The path components
* @param start index
* @param end index
* @return concatenated path
*/ | Given some components, create a path name | constructPath | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodesInPath.java",
"license": "apache-2.0",
"size": 14761
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DFSUtil"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSUtil; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 468,335 |
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
try {
Document dDoc = loadXMLFromString(xml);
NodeList nl = dDoc.getElementsByTagName(nodeName);
return nl.item(0).getTextContent();
} catch (Exception e) {
e.printStackTrace();
return null;
... | DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); try { Document dDoc = loadXMLFromString(xml); NodeList nl = dDoc.getElementsByTagName(nodeName); return nl.item(0).getTextContent(); } catch (Exception e) { e.printStackTrace(); return null; } } | /**Sourced from
* http://stackoverflow.com/questions/4076910/how-to-retrieve-element-value-of-xml-using-java/4077986#4077986
* @param xml
* @return
* @throws Exception
*/ | Sourced from HREF | getFirstValueFromTag | {
"repo_name": "smap-consulting/smap-survey-manager",
"path": "src/main/java/org/smap/surveyModel/utils/AnswerValidator.java",
"license": "apache-2.0",
"size": 2230
} | [
"javax.xml.parsers.DocumentBuilderFactory",
"org.w3c.dom.Document",
"org.w3c.dom.NodeList"
] | import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.NodeList; | import javax.xml.parsers.*; import org.w3c.dom.*; | [
"javax.xml",
"org.w3c.dom"
] | javax.xml; org.w3c.dom; | 1,243,184 |
public void mouseClicked(MouseEvent e) {
TreePath path = ExportDBGlobalDBTree.this.getPathForLocation(e
.getX(), e.getY());
DBTreeNode node = null;
if (path != null)
node = (DBTreeNode) path.getLastPathComponent();
if (node == null) {
return;
}
if (SwingUtilities.isLeftMouseButto... | void function(MouseEvent e) { TreePath path = ExportDBGlobalDBTree.this.getPathForLocation(e .getX(), e.getY()); DBTreeNode node = null; if (path != null) node = (DBTreeNode) path.getLastPathComponent(); if (node == null) { return; } if (SwingUtilities.isLeftMouseButton(e)) { if (e.getClickCount() == 1) { if (node.getN... | /**
* Invoked when the mouse has been clicked on a component.
*/ | Invoked when the mouse has been clicked on a component | mouseClicked | {
"repo_name": "halayudha/bearded-octo-bugfixes",
"path": "BestPeerDevelop/sg/edu/nus/gui/dbview/ExportDBGlobalDBTree.java",
"license": "gpl-3.0",
"size": 9534
} | [
"java.awt.event.ActionListener",
"java.awt.event.MouseEvent",
"javax.swing.JMenuItem",
"javax.swing.JPopupMenu",
"javax.swing.SwingUtilities",
"javax.swing.tree.TreePath"
] | import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.SwingUtilities; import javax.swing.tree.TreePath; | import java.awt.event.*; import javax.swing.*; import javax.swing.tree.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,082,219 |
@Override
public Builder useExistingWordVectors(@NonNull WordVectors vec) {
return this;
} | Builder function(@NonNull WordVectors vec) { return this; } | /**
* This method has no effect for GloVe
*
* @param vec existing WordVectors model
* @return
*/ | This method has no effect for GloVe | useExistingWordVectors | {
"repo_name": "xuzhongxing/deeplearning4j",
"path": "deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/glove/Glove.java",
"license": "apache-2.0",
"size": 13479
} | [
"org.deeplearning4j.models.embeddings.wordvectors.WordVectors"
] | import org.deeplearning4j.models.embeddings.wordvectors.WordVectors; | import org.deeplearning4j.models.embeddings.wordvectors.*; | [
"org.deeplearning4j.models"
] | org.deeplearning4j.models; | 1,803,570 |
Iterator<IRelation> listRelators(); | Iterator<IRelation> listRelators(); | /**
* Returns an Iterator (possibly empty) of the relations in the enclosing
* graph that relate this concept. This method will return null if the
* concept does not belong to any graph (getEnclosingGraph() returns null).
*
* @return
* @bug Should this method be in Graph instead?
*/ | Returns an Iterator (possibly empty) of the relations in the enclosing graph that relate this concept. This method will return null if the concept does not belong to any graph (getEnclosingGraph() returns null) | listRelators | {
"repo_name": "topicquests/tq-elastic-ks",
"path": "src/main/java/org/topicquests/ks/cg/api/ICGConcept.java",
"license": "apache-2.0",
"size": 9076
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,569,823 |
public String[] filterCommands(String[] commands) throws IOException {
if (!useSharedDatabase) {
for (int i=0; i<commands.length; i++) {
if (USE_PATTERN.matcher(commands[i]).matches()) {
System.err.println(String.format(USE_COMMAND_WARNING, inputFile, commands[i]));
}
comma... | String[] function(String[] commands) throws IOException { if (!useSharedDatabase) { for (int i=0; i<commands.length; i++) { if (USE_PATTERN.matcher(commands[i]).matches()) { System.err.println(String.format(USE_COMMAND_WARNING, inputFile, commands[i])); } commands[i] = replaceTableNames(commands[i]); } } return command... | /**
* Filters the sql commands if necessary - eg. not using the shared database.
* @param commands The array of the sql commands before filtering
* @return The filtered array of the sql command strings
* @throws IOException File read error
*/ | Filters the sql commands if necessary - eg. not using the shared database | filterCommands | {
"repo_name": "alanfgates/hive",
"path": "itests/util/src/main/java/org/apache/hive/beeline/QFile.java",
"license": "apache-2.0",
"size": 17970
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,357,817 |
private void initGridView(GridView gridView) {
List<Map<String, Object>> listItems = new ArrayList<>();
for (int i = 0; i < title.length; i++) {
Map<String, Object> listItem = new HashMap<>();
listItem.put("title", title[i]);
listItems.add(listItem);
}
... | void function(GridView gridView) { List<Map<String, Object>> listItems = new ArrayList<>(); for (int i = 0; i < title.length; i++) { Map<String, Object> listItem = new HashMap<>(); listItem.put("title", title[i]); listItems.add(listItem); } simpleAdapter = new SimpleAdapter(this, listItems, R.layout.item_news, new Stri... | /**
* set adapter for gridView
*
* @param gridView
*/ | set adapter for gridView | initGridView | {
"repo_name": "lin2020/csapp",
"path": "app/src/main/java/club/baidu/hust/edu/cn/csapp/activity/NewsActivity.java",
"license": "apache-2.0",
"size": 7444
} | [
"android.widget.GridView",
"android.widget.SimpleAdapter",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import android.widget.GridView; import android.widget.SimpleAdapter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import android.widget.*; import java.util.*; | [
"android.widget",
"java.util"
] | android.widget; java.util; | 1,247,937 |
ActionExecutionValue get() throws ActionExecutionException, InterruptedException;
} | ActionExecutionValue get() throws ActionExecutionException, InterruptedException; } | /**
* Returns the final value of the action or an exception to indicate that the action failed (or
* the process was interrupted). This must only be called if {@link #isDone} returns true.
*/ | Returns the final value of the action or an exception to indicate that the action failed (or the process was interrupted). This must only be called if <code>#isDone</code> returns true | get | {
"repo_name": "ulfjack/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionState.java",
"license": "apache-2.0",
"size": 11517
} | [
"com.google.devtools.build.lib.actions.ActionExecutionException"
] | import com.google.devtools.build.lib.actions.ActionExecutionException; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 396,139 |
public boolean importFile(File directory, String destination) {
String solutionDirectory = ApplicationProperties.getInstance().getSolutionDirectory();
File destinationDirectory = new File(solutionDirectory + File.separator + destination);
File[] files = directory.listFiles();
if (fi... | boolean function(File directory, String destination) { String solutionDirectory = ApplicationProperties.getInstance().getSolutionDirectory(); File destinationDirectory = new File(solutionDirectory + File.separator + destination); File[] files = directory.listFiles(); if (files != null) { for (File file : files) { if (!... | /**
* Imports the directory represented by the directory parameter in to the
* corresponding destination specified as string.
* <p/>
* The destinationDirectory should actually exist on the file system. If
* matching file names are found in the destination directory then the
* conflicting f... | Imports the directory represented by the directory parameter in to the corresponding destination specified as string. The destinationDirectory should actually exist on the file system. If matching file names are found in the destination directory then the conflicting file will be renamed with system current time | importFile | {
"repo_name": "helicalinsight/helicalinsight",
"path": "core/src/main/java/com/helicalinsight/efw/io/EFWSRImportRule.java",
"license": "apache-2.0",
"size": 8308
} | [
"com.helicalinsight.efw.ApplicationProperties",
"com.helicalinsight.efw.exceptions.OperationFailedException",
"java.io.File",
"java.io.IOException",
"org.apache.commons.io.FileExistsException",
"org.apache.commons.io.FileUtils",
"org.apache.commons.io.FilenameUtils"
] | import com.helicalinsight.efw.ApplicationProperties; import com.helicalinsight.efw.exceptions.OperationFailedException; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileExistsException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; | import com.helicalinsight.efw.*; import com.helicalinsight.efw.exceptions.*; import java.io.*; import org.apache.commons.io.*; | [
"com.helicalinsight.efw",
"java.io",
"org.apache.commons"
] | com.helicalinsight.efw; java.io; org.apache.commons; | 476,850 |
@Test
public void testRESTServerSSL() throws Exception {
Configuration serverConfig = createRestSslConfigWithKeyStore();
SSLHandlerFactory ssl = SSLUtils.createRestServerSSLEngineFactory(serverConfig);
assertNotNull(ssl);
} | void function() throws Exception { Configuration serverConfig = createRestSslConfigWithKeyStore(); SSLHandlerFactory ssl = SSLUtils.createRestServerSSLEngineFactory(serverConfig); assertNotNull(ssl); } | /**
* Tests that REST Server SSL Engine is created given a valid SSL configuration.
*/ | Tests that REST Server SSL Engine is created given a valid SSL configuration | testRESTServerSSL | {
"repo_name": "fhueske/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/net/SSLUtilsTest.java",
"license": "apache-2.0",
"size": 19083
} | [
"org.apache.flink.configuration.Configuration",
"org.apache.flink.runtime.io.network.netty.SSLHandlerFactory",
"org.junit.Assert"
] | import org.apache.flink.configuration.Configuration; import org.apache.flink.runtime.io.network.netty.SSLHandlerFactory; import org.junit.Assert; | import org.apache.flink.configuration.*; import org.apache.flink.runtime.io.network.netty.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 2,430,988 |
private TransferOrderBody setTotal(@NonNull String total) {
this.total = total;
return this;
} | TransferOrderBody function(@NonNull String total) { this.total = total; return this; } | /**
* Sets buy/sell amount without fees.
*
* @param total buy/sell amount including fees.
* @return this {@link TransferOrderBody} instance.
*/ | Sets buy/sell amount without fees | setTotal | {
"repo_name": "coinbase/coinbase-java",
"path": "coinbase-java/src/main/java/com/coinbase/resources/trades/TransferOrderBody.java",
"license": "apache-2.0",
"size": 4934
} | [
"androidx.annotation.NonNull"
] | import androidx.annotation.NonNull; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 462,261 |
public static <T> FlowableConverter<T, Flowable<T>> tracedFlowable(
String tag, String streamName) {
Tracer t = new Tracer(tag, streamName);
return f ->
f.doOnSubscribe(t::onSubscribe)
.doOnNext(t::onNext)
.doOnComplete(t::onComplete)
.doOnError(t::onError);
... | static <T> FlowableConverter<T, Flowable<T>> function( String tag, String streamName) { Tracer t = new Tracer(tag, streamName); return f -> f.doOnSubscribe(t::onSubscribe) .doOnNext(t::onNext) .doOnComplete(t::onComplete) .doOnError(t::onError); } | /**
* Returns a converter for use with {@link Flowable#as} that logs all events that occur on the
* source stream.
*/ | Returns a converter for use with <code>Flowable#as</code> that logs all events that occur on the source stream | tracedFlowable | {
"repo_name": "google/ground-android",
"path": "gnd/src/main/java/com/google/android/gnd/rx/RxDebug.java",
"license": "apache-2.0",
"size": 4098
} | [
"io.reactivex.Flowable",
"io.reactivex.FlowableConverter"
] | import io.reactivex.Flowable; import io.reactivex.FlowableConverter; | import io.reactivex.*; | [
"io.reactivex"
] | io.reactivex; | 119,194 |
public Integer cuentaNumeroRegistrosTemporales() {
Integer rta = 0;
try (ReadFunction rf = new ReadFunction()) {
String query = "select count(1) conteo from in_tmpidexc";
ResultSet rs = rf.enviaQuery(query);
while (rs.next()) {
rta = rs.getInt("con... | Integer function() { Integer rta = 0; try (ReadFunction rf = new ReadFunction()) { String query = STR; ResultSet rs = rf.enviaQuery(query); while (rs.next()) { rta = rs.getInt(STR); } } catch (Exception e) { e.printStackTrace(); } return rta; } | /**
* Funcion con la cual obtengo el numero de registros que se encuentran en
* la tabla temporal
*
* @return
*/ | Funcion con la cual obtengo el numero de registros que se encuentran en la tabla temporal | cuentaNumeroRegistrosTemporales | {
"repo_name": "codesoftware/SIGEMCOWS",
"path": "src/java/co/com/codesoftware/logic/ProductoLogic.java",
"license": "apache-2.0",
"size": 38242
} | [
"co.com.codesoftware.persistencia.ReadFunction",
"java.sql.ResultSet"
] | import co.com.codesoftware.persistencia.ReadFunction; import java.sql.ResultSet; | import co.com.codesoftware.persistencia.*; import java.sql.*; | [
"co.com.codesoftware",
"java.sql"
] | co.com.codesoftware; java.sql; | 2,313,699 |
@Override
public Set<Map.Entry<String, List<String>>> entrySet() {
return getMap().entrySet();
} | Set<Map.Entry<String, List<String>>> function() { return getMap().entrySet(); } | /**
* Returns a set of parameter-list entries.
*/ | Returns a set of parameter-list entries | entrySet | {
"repo_name": "marklogic/java-client-api",
"path": "marklogic-client-api/src/main/java/com/marklogic/client/util/RequestParameters.java",
"license": "apache-2.0",
"size": 4793
} | [
"java.util.List",
"java.util.Map",
"java.util.Set"
] | import java.util.List; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,820,893 |
public BinaryObject buildEnum(String typeName, int ord); | BinaryObject function(String typeName, int ord); | /**
* Create enum object.
*
* @param typeName Type name.
* @param ord Ordinal.
* @return Enum object.
*/ | Create enum object | buildEnum | {
"repo_name": "apacheignite/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/IgniteBinary.java",
"license": "apache-2.0",
"size": 16357
} | [
"org.apache.ignite.binary.BinaryObject"
] | import org.apache.ignite.binary.BinaryObject; | import org.apache.ignite.binary.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,893,981 |
public ServiceMessageContext newServiceMessageContext(InvocationIdentifier identifier) {
return this.newServiceMessageContext(identifier, null);
} | ServiceMessageContext function(InvocationIdentifier identifier) { return this.newServiceMessageContext(identifier, null); } | /**
* Creates a new ServiceMessageContext implementation instance using an existing invocation
* identifier.
*
* @param identifier
* the invocation identifier
*
* @return the context
*/ | Creates a new ServiceMessageContext implementation instance using an existing invocation identifier | newServiceMessageContext | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.message/src/main/man/org/nabucco/framework/base/facade/message/context/ServiceContextFactory.java",
"license": "epl-1.0",
"size": 5557
} | [
"org.nabucco.framework.base.facade.message.tracing.InvocationIdentifier"
] | import org.nabucco.framework.base.facade.message.tracing.InvocationIdentifier; | import org.nabucco.framework.base.facade.message.tracing.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,496,118 |
Comparator getComparator(); | Comparator getComparator(); | /**
* Returns the comparator used for comparing nodes in the tree.
*
* @return the comparator for comparing nodes.
*/ | Returns the comparator used for comparing nodes in the tree | getComparator | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "platform/editor-ui-api/src/com/intellij/ide/util/treeView/smartTree/Sorter.java",
"license": "apache-2.0",
"size": 2329
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 265,577 |
public void updateKeyCredentials(String objectId, List<KeyCredentialInner> value) {
updateKeyCredentialsWithServiceResponseAsync(objectId, value).toBlocking().single().body();
} | void function(String objectId, List<KeyCredentialInner> value) { updateKeyCredentialsWithServiceResponseAsync(objectId, value).toBlocking().single().body(); } | /**
* Update the keyCredentials associated with a service principal.
*
* @param objectId The object ID for which to get service principal information.
* @param value A collection of KeyCredentials.
*/ | Update the keyCredentials associated with a service principal | updateKeyCredentials | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsInner.java",
"license": "mit",
"size": 50186
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 20,946 |
@Config("ness.event.jms.topic-name")
@Default("ness.events")
public String getTopicName()
{
return "ness.events";
} | @Config(STR) @Default(STR) String function() { return STR; } | /**
* The name of the event JMS topic.
*/ | The name of the event JMS topic | getTopicName | {
"repo_name": "11xor6/components-ness-event",
"path": "jms/src/main/java/com/nesscomputing/event/jms/JmsEventConfig.java",
"license": "apache-2.0",
"size": 1495
} | [
"org.skife.config.Config",
"org.skife.config.Default"
] | import org.skife.config.Config; import org.skife.config.Default; | import org.skife.config.*; | [
"org.skife.config"
] | org.skife.config; | 525,490 |
@Override
public boolean executableOn(EvacCellInterface cell) {
return !cell.getState().isEmpty();
} | boolean function(EvacCellInterface cell) { return !cell.getState().isEmpty(); } | /**
* Returns {@code true} if the rule can be executed. That is the case if an {@link ds.ca.Individual} stands on the
* specified {@link EvacCell}.
*
* @param cell the cell
* @return {@code true} if an individual stands on the cell, {@code false} otherwise
*/ | Returns true if the rule can be executed. That is the case if an <code>ds.ca.Individual</code> stands on the specified <code>EvacCell</code> | executableOn | {
"repo_name": "zet-evacuation/evacuation-cellular-automaton",
"path": "src/main/java/org/zet/cellularautomaton/algorithm/rule/SimpleMovementRule.java",
"license": "gpl-2.0",
"size": 3388
} | [
"org.zet.cellularautomaton.EvacCellInterface"
] | import org.zet.cellularautomaton.EvacCellInterface; | import org.zet.cellularautomaton.*; | [
"org.zet.cellularautomaton"
] | org.zet.cellularautomaton; | 940,146 |
protected Path getTargetRelativeFile(String ... comps) {
return getTargetRelativeFile(GenericUtils.isEmpty(comps) ? Collections.<String>emptyList() : Arrays.asList(comps));
} | Path function(String ... comps) { return getTargetRelativeFile(GenericUtils.isEmpty(comps) ? Collections.<String>emptyList() : Arrays.asList(comps)); } | /**
* Attempts to build a <U>relative</U> path whose root is the location
* of the Maven "target" folder associated with the project
*
* @param comps The path components - ignored if {@code null}/empty
* @return The {@link Path} representing the result - same as target folder if no co... | Attempts to build a relative path whose root is the location of the Maven "target" folder associated with the project | getTargetRelativeFile | {
"repo_name": "Niky4000/UsefulUtils",
"path": "projects/ssh/apache_mina/apache-sshd-1.2.0/sshd-core/src/test/java/org/apache/sshd/util/test/BaseTestSupport.java",
"license": "gpl-3.0",
"size": 21930
} | [
"java.nio.file.Path",
"java.util.Arrays",
"java.util.Collections",
"org.apache.sshd.common.util.GenericUtils"
] | import java.nio.file.Path; import java.util.Arrays; import java.util.Collections; import org.apache.sshd.common.util.GenericUtils; | import java.nio.file.*; import java.util.*; import org.apache.sshd.common.util.*; | [
"java.nio",
"java.util",
"org.apache.sshd"
] | java.nio; java.util; org.apache.sshd; | 1,200,001 |
@Test
public void testAppendDelimiterHandling()
{
BaseConfiguration srcConfig = new BaseConfiguration();
BaseConfiguration dstConfig = new BaseConfiguration();
dstConfig.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
srcConfig.setProperty(KEY_PREFIX, "C:\\Temp... | void function() { BaseConfiguration srcConfig = new BaseConfiguration(); BaseConfiguration dstConfig = new BaseConfiguration(); dstConfig.setListDelimiterHandler(new DefaultListDelimiterHandler(',')); srcConfig.setProperty(KEY_PREFIX, STR); dstConfig.append(srcConfig); assertEquals(STR, srcConfig.getString(KEY_PREFIX),... | /**
* Tests whether the list delimiter is correctly handled if a configuration
* is appended.
*/ | Tests whether the list delimiter is correctly handled if a configuration is appended | testAppendDelimiterHandling | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java",
"license": "apache-2.0",
"size": 42180
} | [
"org.apache.commons.configuration2.convert.DefaultListDelimiterHandler",
"org.junit.Assert"
] | import org.apache.commons.configuration2.convert.DefaultListDelimiterHandler; import org.junit.Assert; | import org.apache.commons.configuration2.convert.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 1,818,238 |
@XmlElement(name = "year")
public String getYear() {
return year;
} | @XmlElement(name = "year") String function() { return year; } | /**
* Gets the year.
*
* @return the year
*/ | Gets the year | getYear | {
"repo_name": "mlaggner/tinyMediaManager",
"path": "src/org/tinymediamanager/core/movie/connector/MovieToMpNfoConnector.java",
"license": "apache-2.0",
"size": 26166
} | [
"javax.xml.bind.annotation.XmlElement"
] | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 2,748,385 |
public static AttributeConfiguration getConfigurationInWorkspace()
{
AttributeConfiguration attrConfiuration = RequirementFactory.eINSTANCE.createAttributeConfiguration();
String attributeLocations = preferenceStorePlugIn.getString(CurrentPreferenceHelper.CURRENT_ATTRIBUTES_STORE);
Map<S... | static AttributeConfiguration function() { AttributeConfiguration attrConfiuration = RequirementFactory.eINSTANCE.createAttributeConfiguration(); String attributeLocations = preferenceStorePlugIn.getString(CurrentPreferenceHelper.CURRENT_ATTRIBUTES_STORE); Map<String, Vector<String>> currDefaultAttributes = deserialize... | /**
* Gets the requirement configuration defined at the workspace level.
*
* @return an model objetc ok kind {@link AttributeConfiguration}.
*/ | Gets the requirement configuration defined at the workspace level | getConfigurationInWorkspace | {
"repo_name": "pgaufillet/topcased-req",
"path": "plugins/org.topcased.requirement.core/src/org/topcased/requirement/core/preferences/CurrentPreferenceHelper.java",
"license": "epl-1.0",
"size": 11401
} | [
"java.util.Map",
"java.util.Set",
"java.util.Vector",
"org.topcased.requirement.AttributeConfiguration",
"org.topcased.requirement.AttributeValue",
"org.topcased.requirement.AttributesType",
"org.topcased.requirement.ConfiguratedAttribute",
"org.topcased.requirement.DefaultAttributeValue",
"org.topc... | import java.util.Map; import java.util.Set; import java.util.Vector; import org.topcased.requirement.AttributeConfiguration; import org.topcased.requirement.AttributeValue; import org.topcased.requirement.AttributesType; import org.topcased.requirement.ConfiguratedAttribute; import org.topcased.requirement.DefaultAttri... | import java.util.*; import org.topcased.requirement.*; | [
"java.util",
"org.topcased.requirement"
] | java.util; org.topcased.requirement; | 1,457,974 |
private static XField getFieldFromStack(final OpcodeStack stk, final String signature) {
int parmCount = SignatureUtils.getNumParameters(signature);
if (stk.getStackDepth() > parmCount) {
OpcodeStack.Item itm = stk.getStackItem(parmCount);
return itm.getXField();
}
... | static XField function(final OpcodeStack stk, final String signature) { int parmCount = SignatureUtils.getNumParameters(signature); if (stk.getStackDepth() > parmCount) { OpcodeStack.Item itm = stk.getStackItem(parmCount); return itm.getXField(); } return null; } | /**
* return the field object that the current method was called on, by finding the reference down in the stack based on the number of parameters
*
* @param stk
* the opcode stack where fields are stored
* @param signature
* the signature of the called method
*
... | return the field object that the current method was called on, by finding the reference down in the stack based on the number of parameters | getFieldFromStack | {
"repo_name": "rblasch/fb-contrib",
"path": "src/main/java/com/mebigfatguy/fbcontrib/detect/DubiousListCollection.java",
"license": "lgpl-2.1",
"size": 11597
} | [
"com.mebigfatguy.fbcontrib.utils.SignatureUtils",
"edu.umd.cs.findbugs.OpcodeStack",
"edu.umd.cs.findbugs.ba.XField"
] | import com.mebigfatguy.fbcontrib.utils.SignatureUtils; import edu.umd.cs.findbugs.OpcodeStack; import edu.umd.cs.findbugs.ba.XField; | import com.mebigfatguy.fbcontrib.utils.*; import edu.umd.cs.findbugs.*; import edu.umd.cs.findbugs.ba.*; | [
"com.mebigfatguy.fbcontrib",
"edu.umd.cs"
] | com.mebigfatguy.fbcontrib; edu.umd.cs; | 1,927,880 |
@Test
public void inBookSeries() throws ParseException {
String entry = "@incollection{kraemer-2021,\n" +
" author = {Michel Krämer},\n" +
" editor = {Hammoudi, Slimane and Quix, Christoph and Bernardino, Jorge},\n" +
" title = {Efficient Sche... | void function() throws ParseException { String entry = STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + "}"; BibTeXDatabase db = new BibTeXParser().parse(new StringReader(entry)); BibTeXConverter converter = new BibTeXConverter(); Map<String, CSLItemData> items = converter.toItemData(... | /**
* Test if a chapter in a book series is converted correctly
* @throws ParseException if the BibTeX entry could not be parsed
*/ | Test if a chapter in a book series is converted correctly | inBookSeries | {
"repo_name": "michel-kraemer/citeproc-java",
"path": "citeproc-java/src/test/java/de/undercouch/citeproc/bibtex/BibTeXConverterTest.java",
"license": "apache-2.0",
"size": 11876
} | [
"de.undercouch.citeproc.csl.CSLItemData",
"de.undercouch.citeproc.csl.CSLType",
"java.io.StringReader",
"java.util.Map",
"org.jbibtex.BibTeXDatabase",
"org.jbibtex.BibTeXParser",
"org.jbibtex.ParseException",
"org.junit.Assert"
] | import de.undercouch.citeproc.csl.CSLItemData; import de.undercouch.citeproc.csl.CSLType; import java.io.StringReader; import java.util.Map; import org.jbibtex.BibTeXDatabase; import org.jbibtex.BibTeXParser; import org.jbibtex.ParseException; import org.junit.Assert; | import de.undercouch.citeproc.csl.*; import java.io.*; import java.util.*; import org.jbibtex.*; import org.junit.*; | [
"de.undercouch.citeproc",
"java.io",
"java.util",
"org.jbibtex",
"org.junit"
] | de.undercouch.citeproc; java.io; java.util; org.jbibtex; org.junit; | 302,076 |
public int update(ContentValues contentValues, String whereClause, String[] whereArgs) throws LiteDatabaseException {
return getDatabase().update(getTableName(),
contentValues,
getLiteQuery().exchange(whereClause),
whereArgs);
} | int function(ContentValues contentValues, String whereClause, String[] whereArgs) throws LiteDatabaseException { return getDatabase().update(getTableName(), contentValues, getLiteQuery().exchange(whereClause), whereArgs); } | /**
* Update table record
* @param contentValues
* @param whereClause
* @param whereArgs
* @return
* @throws LiteDatabaseException
*/ | Update table record | update | {
"repo_name": "luhonghai/LiteDB",
"path": "litedb/src/main/java/com/luhonghai/litedb/LiteBaseDao.java",
"license": "mit",
"size": 27812
} | [
"android.content.ContentValues",
"com.luhonghai.litedb.exception.LiteDatabaseException"
] | import android.content.ContentValues; import com.luhonghai.litedb.exception.LiteDatabaseException; | import android.content.*; import com.luhonghai.litedb.exception.*; | [
"android.content",
"com.luhonghai.litedb"
] | android.content; com.luhonghai.litedb; | 1,060,274 |
public static <E> ImmutableList<E> copyOf(Iterator<? extends E> elements) {
// We special-case for 0 or 1 elements, but going further is madness.
if (!elements.hasNext()) {
return of();
}
E first = elements.next();
if (!elements.hasNext()) {
return of(first);
} else {
return ... | static <E> ImmutableList<E> function(Iterator<? extends E> elements) { if (!elements.hasNext()) { return of(); } E first = elements.next(); if (!elements.hasNext()) { return of(first); } else { return new ImmutableList.Builder<E>() .add(first) .addAll(elements) .build(); } } | /**
* Returns an immutable list containing the given elements, in order.
*
* @throws NullPointerException if any of {@code elements} is null
*/ | Returns an immutable list containing the given elements, in order | copyOf | {
"repo_name": "wolffcm/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/collect/ImmutableList.java",
"license": "agpl-3.0",
"size": 21900
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,258,909 |
public String toString(int indentFactor) throws JSONException {
StringWriter w = new StringWriter();
synchronized (w.getBuffer()) {
return this.write(w, indentFactor, 0).toString();
}
} | String function(int indentFactor) throws JSONException { StringWriter w = new StringWriter(); synchronized (w.getBuffer()) { return this.write(w, indentFactor, 0).toString(); } } | /**
* Make a prettyprinted JSON text of this JSONObject.
* <p>
* Warning: This method assumes that the data structure is acyclical.
* @param indentFactor The number of spaces to add to each level of
* indentation.
* @return a printable, displayable, portable, transmittable
* represe... | Make a prettyprinted JSON text of this JSONObject. Warning: This method assumes that the data structure is acyclical | toString | {
"repo_name": "PaperpixelStudio/kubes",
"path": "src/org/json/JSONObject.java",
"license": "mit",
"size": 54928
} | [
"java.io.StringWriter"
] | import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 573,731 |
public synchronized List<BuildableItem> getPendingItems() {
return new ArrayList<BuildableItem>(pendings.values());
} | synchronized List<BuildableItem> function() { return new ArrayList<BuildableItem>(pendings.values()); } | /**
* Gets the snapshot of all {@link BuildableItem}s.
*/ | Gets the snapshot of all <code>BuildableItem</code>s | getPendingItems | {
"repo_name": "sap-production/hudson-3.x",
"path": "hudson-core/src/main/java/hudson/model/Queue.java",
"license": "apache-2.0",
"size": 62240
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,448,100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.