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
@SuppressWarnings("unchecked") public static void validateResponse(HttpURLConnection conn, int expectedStatus) throws IOException { if (conn.getResponseCode() != expectedStatus) { Exception toThrow; InputStream es = null; try { es = conn.getErrorStream(); ObjectMapper map...
@SuppressWarnings(STR) static void function(HttpURLConnection conn, int expectedStatus) throws IOException { if (conn.getResponseCode() != expectedStatus) { Exception toThrow; InputStream es = null; try { es = conn.getErrorStream(); ObjectMapper mapper = new ObjectMapper(); Map json = mapper.readValue(es, Map.class); j...
/** * Validates the status of an <code>HttpURLConnection</code> against an * expected HTTP status code. If the current status code is not the expected * one it throws an exception with a detail message using Server side error * messages if available. * <p/> * <b>NOTE:</b> this method will throw the de...
Validates the status of an <code>HttpURLConnection</code> against an expected HTTP status code. If the current status code is not the expected one it throws an exception with a detail message using Server side error messages if available. declared in the <code>throws</code> of the method signature
validateResponse
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/HttpExceptionUtils.java", "license": "apache-2.0", "size": 7130 }
[ "java.io.IOException", "java.io.InputStream", "java.lang.reflect.Constructor", "java.net.HttpURLConnection", "java.util.Map", "org.codehaus.jackson.map.ObjectMapper" ]
import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Constructor; import java.net.HttpURLConnection; import java.util.Map; import org.codehaus.jackson.map.ObjectMapper;
import java.io.*; import java.lang.reflect.*; import java.net.*; import java.util.*; import org.codehaus.jackson.map.*;
[ "java.io", "java.lang", "java.net", "java.util", "org.codehaus.jackson" ]
java.io; java.lang; java.net; java.util; org.codehaus.jackson;
415,403
protected JestResult getResultsById(final String id, final String type) { return getResultsById(id, index, type); }
JestResult function(final String id, final String type) { return getResultsById(id, index, type); }
/** * When given the id and a type (that is not _all). Uses default index for * this dao. * * @param id * @param type * @return */
When given the id and a type (that is not _all). Uses default index for this dao
getResultsById
{ "repo_name": "codeaudit/graphene", "path": "graphene-parent/graphene-dao-es/src/main/java/graphene/dao/es/BasicESDAO.java", "license": "apache-2.0", "size": 29453 }
[ "io.searchbox.client.JestResult" ]
import io.searchbox.client.JestResult;
import io.searchbox.client.*;
[ "io.searchbox.client" ]
io.searchbox.client;
150,996
public boolean adapterDetected () throws OneWireIOException, OneWireException { synchronized(conn) { return conn!=EMPTY_CONNECTION && conn.sock!=null; } }
boolean function () throws OneWireIOException, OneWireException { synchronized(conn) { return conn!=EMPTY_CONNECTION && conn.sock!=null; } }
/** * Detects adapter presence on the selected port. * * @return <code>true</code> if the adapter is confirmed to be connected to * the selected port, <code>false</code> if the adapter is not connected. * * @throws OneWireIOException * @throws OneWireException */
Detects adapter presence on the selected port
adapterDetected
{ "repo_name": "marcass/dz-1", "path": "dz3-owapi/src/main/java/com/dalsemi/onewire/adapter/NetAdapter.java", "license": "gpl-3.0", "size": 63815 }
[ "com.dalsemi.onewire.OneWireException" ]
import com.dalsemi.onewire.OneWireException;
import com.dalsemi.onewire.*;
[ "com.dalsemi.onewire" ]
com.dalsemi.onewire;
688,088
public void set(int n, int startPc, int length, CstString name, CstString descriptor, CstString signature, int index) { set0(n, new Item(startPc, length, name, descriptor, signature, index)); } /** * Gets the local variable information in this instance which matches * the give...
void function(int n, int startPc, int length, CstString name, CstString descriptor, CstString signature, int index) { set0(n, new Item(startPc, length, name, descriptor, signature, index)); } /** * Gets the local variable information in this instance which matches * the given {@link com.taobao.android.dx.cf.code.LocalV...
/** * Sets the item at the given index. * * <p><b>Note:</b> At least one of {@code descriptor} or * {@code signature} must be passed as non-null.</p> * * @param n {@code >= 0, < size();} which element * @param startPc {@code >= 0;} the start pc of this variable's scope * @param l...
Sets the item at the given index. Note: At least one of descriptor or signature must be passed as non-null
set
{ "repo_name": "alibaba/atlas", "path": "atlas-gradle-plugin/dexpatch/src/main/java/com/taobao/android/dx/cf/code/LocalVariableList.java", "license": "apache-2.0", "size": 12627 }
[ "com.taobao.android.dx.rop.cst.CstString" ]
import com.taobao.android.dx.rop.cst.CstString;
import com.taobao.android.dx.rop.cst.*;
[ "com.taobao.android" ]
com.taobao.android;
2,435,153
public static <T> Constructor<T> findFirstConstructor(Class<T> target, ConstructorFilter filter) { Set<Constructor<T>> cons = findConstructors(target, filter); if (cons.isEmpty()) { throw new IllegalArgumentException("No constructor found for " + target.getName() + " matching filter: " ...
static <T> Constructor<T> function(Class<T> target, ConstructorFilter filter) { Set<Constructor<T>> cons = findConstructors(target, filter); if (cons.isEmpty()) { throw new IllegalArgumentException(STR + target.getName() + STR + filter.describe()); } return cons.iterator().next(); }
/** * Returns the first constructor found that matches the filter parameter. * * @param target Class to get constructor for. * @param filter Filter to apply. * @param <T> Type of constructor. * * @return the first constructor found that matches the filter parameter. * @throws ...
Returns the first constructor found that matches the filter parameter
findFirstConstructor
{ "repo_name": "wigforss/Ka-Commons-Reflection", "path": "src/main/java/org/kasource/commons/reflection/util/ConstructorUtils.java", "license": "apache-2.0", "size": 4772 }
[ "java.lang.reflect.Constructor", "java.util.Set", "org.kasource.commons.reflection.filter.ConstructorFilter" ]
import java.lang.reflect.Constructor; import java.util.Set; import org.kasource.commons.reflection.filter.ConstructorFilter;
import java.lang.reflect.*; import java.util.*; import org.kasource.commons.reflection.filter.*;
[ "java.lang", "java.util", "org.kasource.commons" ]
java.lang; java.util; org.kasource.commons;
1,588,706
public void setEntityItemStack(ItemStack stack) { this.getDataManager().set(ITEM, Optional.fromNullable(stack)); this.getDataManager().setDirty(ITEM); }
void function(ItemStack stack) { this.getDataManager().set(ITEM, Optional.fromNullable(stack)); this.getDataManager().setDirty(ITEM); }
/** * Sets the ItemStack for this entity */
Sets the ItemStack for this entity
setEntityItemStack
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/item/EntityItem.java", "license": "gpl-3.0", "size": 18310 }
[ "com.google.common.base.Optional", "net.minecraft.item.ItemStack" ]
import com.google.common.base.Optional; import net.minecraft.item.ItemStack;
import com.google.common.base.*; import net.minecraft.item.*;
[ "com.google.common", "net.minecraft.item" ]
com.google.common; net.minecraft.item;
756,984
public static void process(Optimizer optimizer, SsaMethod ssaMethod) { DeadCodeRemover dc = new DeadCodeRemover(optimizer, ssaMethod); dc.run(); } private DeadCodeRemover(Optimizer optimizer, SsaMethod ssaMethod) { this.optimizer = optimizer; this.ssaMeth = ssaMethod; ...
static void function(Optimizer optimizer, SsaMethod ssaMethod) { DeadCodeRemover dc = new DeadCodeRemover(optimizer, ssaMethod); dc.run(); } private DeadCodeRemover(Optimizer optimizer, SsaMethod ssaMethod) { this.optimizer = optimizer; this.ssaMeth = ssaMethod; regCount = ssaMethod.getRegCount(); worklist = new BitSet...
/** * Process a method with the dead-code remver * * @param optimizer * @param ssaMethod method to process */
Process a method with the dead-code remver
process
{ "repo_name": "bocon13/buck", "path": "third-party/java/dx/src/com/android/dx/ssa/DeadCodeRemover.java", "license": "apache-2.0", "size": 8737 }
[ "java.util.BitSet" ]
import java.util.BitSet;
import java.util.*;
[ "java.util" ]
java.util;
1,980,278
public static boolean isOutputZipFormat(Configuration conf) { return conf.getBoolean(OUTPUT_ZIP_FILE, false); }
static boolean function(Configuration conf) { return conf.getBoolean(OUTPUT_ZIP_FILE, false); }
/** * return true if the output should be a zip file of the index, rather than * the raw index * * @param conf to use * @return true if output zip files is on */
return true if the output should be a zip file of the index, rather than the raw index
isOutputZipFormat
{ "repo_name": "ArchitectingHBase/examples", "path": "src/org/apache/solr/hadoop/SolrOutputFormat.java", "license": "apache-2.0", "size": 9744 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,762,736
public void setBackground(Vec3 colour);
void function(Vec3 colour);
/** * Set the background colour. * @param colour a vector representing the red, green, and blue values * to be used as the background colour. */
Set the background colour
setBackground
{ "repo_name": "jwfwessels/AFK", "path": "src/afk/gfx/GraphicsEngine.java", "license": "mit", "size": 6110 }
[ "com.hackoeur.jglm.Vec3" ]
import com.hackoeur.jglm.Vec3;
import com.hackoeur.jglm.*;
[ "com.hackoeur.jglm" ]
com.hackoeur.jglm;
1,556,351
public KinesisSystemDescriptor withProxyPort(int proxyPort) { this.proxyPort = Optional.of(proxyPort); return this; }
KinesisSystemDescriptor function(int proxyPort) { this.proxyPort = Optional.of(proxyPort); return this; }
/** * Proxy port to be used for this system. * @param proxyPort Proxy port * @return this system descriptor */
Proxy port to be used for this system
withProxyPort
{ "repo_name": "prateekm/samza", "path": "samza-aws/src/main/java/org/apache/samza/system/kinesis/descriptors/KinesisSystemDescriptor.java", "license": "apache-2.0", "size": 5323 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
936,983
protected Collection<String> getRoleNamesForGroups(final Collection<String> groupNames) { final Set<String> roleNames = new HashSet<>(); for (final String groupName : groupNames) { final String roleName = this.groupRolesMap.get(groupName); if (roleName != null) { ...
Collection<String> function(final Collection<String> groupNames) { final Set<String> roleNames = new HashSet<>(); for (final String groupName : groupNames) { final String roleName = this.groupRolesMap.get(groupName); if (roleName != null) { roleNames.add(roleName); } } return roleNames; }
/** * This method is called by to translate group names to role names. This implementation uses the groupRolesMap to * map group names to role names. * * @param groupNames * the group names that apply to the current user * @return a collection of roles that are implied by the gi...
This method is called by to translate group names to role names. This implementation uses the groupRolesMap to map group names to role names
getRoleNamesForGroups
{ "repo_name": "dblock/waffle", "path": "Source/JNA/waffle-shiro/src/main/java/waffle/shiro/GroupMappingWaffleRealm.java", "license": "epl-1.0", "size": 3072 }
[ "java.util.Collection", "java.util.HashSet", "java.util.Set" ]
import java.util.Collection; import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
390,271
public void init(GlobalContext gctx) { super.init(gctx); }
void function(GlobalContext gctx) { super.init(gctx); }
/** * Another FtpListener thing. */
Another FtpListener thing
init
{ "repo_name": "g2x3k/Drftpd2Stable", "path": "src/org/drftpd/thirdparty/plus/config/PlusConfig.java", "license": "gpl-2.0", "size": 5951 }
[ "org.drftpd.GlobalContext" ]
import org.drftpd.GlobalContext;
import org.drftpd.*;
[ "org.drftpd" ]
org.drftpd;
324,178
private final void tryPrefetching() throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "tryPrefetching"); int toPrefetchCount = 0; // count of gets to issue synchronized (this) { if (!detached) { int count = ...
final void function() throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, STR); int toPrefetchCount = 0; synchronized (this) { if (!detached) { int count = countOfOutstandingInfiniteTimeoutGets + countOfUnlockedMessages; if (TraceComponent.isAnyTracingEnab...
/** * Internal method. See if we need to prefetch more messages, and if yes, do the prefetch */
Internal method. See if we need to prefetch more messages, and if yes, do the prefetch
tryPrefetching
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/RemoteQPConsumerKey.java", "license": "epl-1.0", "size": 33101 }
[ "com.ibm.websphere.ras.TraceComponent", "com.ibm.websphere.sib.exception.SIResourceException", "com.ibm.ws.ffdc.FFDCFilter", "com.ibm.ws.sib.processor.SIMPConstants", "com.ibm.ws.sib.utils.ras.SibTr" ]
import com.ibm.websphere.ras.TraceComponent; import com.ibm.websphere.sib.exception.SIResourceException; import com.ibm.ws.ffdc.FFDCFilter; import com.ibm.ws.sib.processor.SIMPConstants; import com.ibm.ws.sib.utils.ras.SibTr;
import com.ibm.websphere.ras.*; import com.ibm.websphere.sib.exception.*; import com.ibm.ws.ffdc.*; import com.ibm.ws.sib.processor.*; import com.ibm.ws.sib.utils.ras.*;
[ "com.ibm.websphere", "com.ibm.ws" ]
com.ibm.websphere; com.ibm.ws;
1,111,678
@Override public Object compile(String templateName, String templateSource, Map<String, String> params) { final MustacheFactory factory = new CustomMustacheFactory(isJsonEscapingEnabled(params)); Reader reader = new FastStringReader(templateSource); return factory.compile(reader, "query-...
Object function(String templateName, String templateSource, Map<String, String> params) { final MustacheFactory factory = new CustomMustacheFactory(isJsonEscapingEnabled(params)); Reader reader = new FastStringReader(templateSource); return factory.compile(reader, STR); }
/** * Compile a template string to (in this case) a Mustache object than can * later be re-used for execution to fill in missing parameter values. * * @param templateSource * a string representing the template to compile. * @return a compiled template object for later execution....
Compile a template string to (in this case) a Mustache object than can later be re-used for execution to fill in missing parameter values
compile
{ "repo_name": "awislowski/elasticsearch", "path": "modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/MustacheScriptEngineService.java", "license": "apache-2.0", "size": 6955 }
[ "com.github.mustachejava.MustacheFactory", "java.io.Reader", "java.util.Map", "org.elasticsearch.common.io.FastStringReader" ]
import com.github.mustachejava.MustacheFactory; import java.io.Reader; import java.util.Map; import org.elasticsearch.common.io.FastStringReader;
import com.github.mustachejava.*; import java.io.*; import java.util.*; import org.elasticsearch.common.io.*;
[ "com.github.mustachejava", "java.io", "java.util", "org.elasticsearch.common" ]
com.github.mustachejava; java.io; java.util; org.elasticsearch.common;
1,480,687
public static DistributedQueue getInQueue(final SolrZkClient zkClient) { createOverseerNode(zkClient); return new DistributedQueue(zkClient, "/overseer/queue", null); }
static DistributedQueue function(final SolrZkClient zkClient) { createOverseerNode(zkClient); return new DistributedQueue(zkClient, STR, null); }
/** * Get queue that can be used to send messages to Overseer. */
Get queue that can be used to send messages to Overseer
getInQueue
{ "repo_name": "fogbeam/Heceta_solr", "path": "solr/core/src/java/org/apache/solr/cloud/Overseer.java", "license": "apache-2.0", "size": 44934 }
[ "org.apache.solr.common.cloud.SolrZkClient" ]
import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.cloud.*;
[ "org.apache.solr" ]
org.apache.solr;
19,692
public void unlock(final IgniteUuid fileId, final IgniteUuid lockId, final long modificationTime, final boolean updateSpace, final long space, @Nullable final IgfsFileAffinityRange affRange) throws IgniteCheckedException { if(client) { runClientTask(new IgfsClientMetaUnlockCalla...
void function(final IgniteUuid fileId, final IgniteUuid lockId, final long modificationTime, final boolean updateSpace, final long space, @Nullable final IgfsFileAffinityRange affRange) throws IgniteCheckedException { if(client) { runClientTask(new IgfsClientMetaUnlockCallable(cfg.getName(), IgfsUserContext.currentUser...
/** * Remove explicit lock on file held by the current stream. * * @param fileId File ID. * @param lockId Lock ID. * @param modificationTime Modification time to write to file info. * @param updateSpace Whether to update space. * @param space Space. * @param affRange Affinity ran...
Remove explicit lock on file held by the current stream
unlock
{ "repo_name": "shroman/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java", "license": "apache-2.0", "size": 131233 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.igfs.IgfsUserContext", "org.apache.ignite.internal.processors.igfs.client.meta.IgfsClientMetaUnlockCallable", "org.apache.ignite.lang.IgniteUuid", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.igfs.IgfsUserContext; import org.apache.ignite.internal.processors.igfs.client.meta.IgfsClientMetaUnlockCallable; import org.apache.ignite.lang.IgniteUuid; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.apache.ignite.igfs.*; import org.apache.ignite.internal.processors.igfs.client.meta.*; import org.apache.ignite.lang.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
139,690
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PrivateEndpointConnectionInner>> listByServerNextSinglePageAsync( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cann...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<PrivateEndpointConnectionInner>> function( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } context = this.client.mergeContext(context); return service .listByServerNext(nextLink, context) ....
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by serve...
Get the next page of items
listByServerNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 58978 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.sql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,073,298
private void setupChat() { Log.d(TAG, "setupChat()"); // Initialize the array adapter for the conversation thread mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message); mConversationView.setAdapter(mConversationArrayAdapter);
void function() { Log.d(TAG, STR); mConversationArrayAdapter = new ArrayAdapter<String>(getActivity(), R.layout.message); mConversationView.setAdapter(mConversationArrayAdapter);
/** * Set up the UI and background operations for chat. */
Set up the UI and background operations for chat
setupChat
{ "repo_name": "zurkaify/towlie", "path": "Application/src/main/java/com/example/android/bluetoothchat/SpeechToTextFragment.java", "license": "apache-2.0", "size": 10650 }
[ "android.util.Log", "android.widget.ArrayAdapter" ]
import android.util.Log; import android.widget.ArrayAdapter;
import android.util.*; import android.widget.*;
[ "android.util", "android.widget" ]
android.util; android.widget;
2,398,080
@Override public void updateComponent(final Object data) { String name = ((ProductItemBean) data).getName(); collapsible.getDecoratedLabel().setText(name); } } static class ProductItemRenderer extends WContainer { ProductItemRenderer() { setTemplate(ProductItemRenderer.class); // get th...
void function(final Object data) { String name = ((ProductItemBean) data).getName(); collapsible.getDecoratedLabel().setText(name); } } static class ProductItemRenderer extends WContainer { ProductItemRenderer() { setTemplate(ProductItemRenderer.class); setBeanProperty("."); } }
/** * Updates the component with new data. * * @param data the data to set on the component. */
Updates the component with new data
updateComponent
{ "repo_name": "bordertechorg/wcomponents", "path": "wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/RepeaterExample.java", "license": "gpl-3.0", "size": 5005 }
[ "com.github.bordertech.wcomponents.WContainer" ]
import com.github.bordertech.wcomponents.WContainer;
import com.github.bordertech.wcomponents.*;
[ "com.github.bordertech" ]
com.github.bordertech;
216,942
@Deprecated public int setSystemChannels(User loggedInUser, Integer sid, List<String> channelLabels) throws FaultException { Server server = XmlRpcSystemHelper.getInstance().lookupServer(loggedInUser, sid); List<Channel> channels = new ArrayList<Channel>(); log.debug("setSyst...
int function(User loggedInUser, Integer sid, List<String> channelLabels) throws FaultException { Server server = XmlRpcSystemHelper.getInstance().lookupServer(loggedInUser, sid); List<Channel> channels = new ArrayList<Channel>(); log.debug(STR); Channel baseChannel = null; log.debug(STR); for (String label : channelLab...
/** * Change a systems subscribed channels to the list of channels passed in. * @param loggedInUser The current user * @param sid The id for the system in question * @param channelLabels The list of labels to subscribe the system to * @return Returns 1 on success, Exception otherwise. * @t...
Change a systems subscribed channels to the list of channels passed in
setSystemChannels
{ "repo_name": "ogajduse/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java", "license": "gpl-2.0", "size": 133982 }
[ "com.redhat.rhn.FaultException", "com.redhat.rhn.domain.channel.Channel", "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.xmlrpc.InvalidChannelException", "com.redhat.rhn.frontend.xmlrpc.MultipleBaseChannelException", "com.redhat.rhn.frontend.xmlrpc.Per...
import com.redhat.rhn.FaultException; import com.redhat.rhn.domain.channel.Channel; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.InvalidChannelException; import com.redhat.rhn.frontend.xmlrpc.MultipleBaseChannelException; import com.redhat.rhn...
import com.redhat.rhn.*; import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import com.redhat.rhn.frontend.xmlrpc.system.*; import com.redhat.rhn.manager.channel.*; import com.redhat.rhn.manager.system.*; import ja...
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
566,341
@RequestMapping(value = "/Team", method = RequestMethod.POST) @ResponseBody public Team newTeam(@RequestBody Team team) { teamService.saveTeam(team); return teamDAO.findTeamByPrimaryKey(team.getId()); }
@RequestMapping(value = "/Team", method = RequestMethod.POST) Team function(@RequestBody Team team) { teamService.saveTeam(team); return teamDAO.findTeamByPrimaryKey(team.getId()); }
/** * Create a new Team entity * */
Create a new Team entity
newTeam
{ "repo_name": "didoux/Spring-BowlingDB", "path": "generated/bowling/web/rest/TeamRestController.java", "license": "gpl-2.0", "size": 3939 }
[ "org.springframework.web.bind.annotation.RequestBody", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod" ]
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.*;
[ "org.springframework.web" ]
org.springframework.web;
2,864,853
public void register(TestArtifact artifact, String testStepId) { if (outDir != null) { if (artifact != null && testStepId != null) { try (Writer writer = fsAccess.getBufferedWriter(outDir.resolve(testStepId + ".yaml"))) { writer.append("\"").append(artifact.ge...
void function(TestArtifact artifact, String testStepId) { if (outDir != null) { if (artifact != null && testStepId != null) { try (Writer writer = fsAccess.getBufferedWriter(outDir.resolve(testStepId + ".yaml"))) { writer.append("\"STR\STRSTR\"\n").flush(); } catch (IOException e) { logger.error(STR + STR, artifact.get...
/** * Registers an artifact created during a test step. * @param artifact the test artifact to be registered, specifying its type * and the path where it is stored in the file system. * @param testStepId the ID of the test step to which this artifact is to * be associated with. */
Registers an artifact created during a test step
register
{ "repo_name": "test-editor/core-fixture", "path": "src/main/java/org/testeditor/fixture/core/artifacts/TestArtifactRegistry.java", "license": "epl-1.0", "size": 5837 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,917,182
SearchStateArc[] getNextArcs() { SearchStateArc[] arcs; // this is the last state of the hmm // so check to see if we are at the end // of a word, if not get the next full hmm in the word // otherwise generate arcs to the next set of words ...
SearchStateArc[] getNextArcs() { SearchStateArc[] arcs; if (!isLastUnitOfWord()) { arcs = pState.getSuccessors(0, index + 1); } else { GrammarState gs = pState.getGrammarState(); arcs = gs.getNextGrammarStates(0, getRC()); } return arcs; }
/** * Returns the next set of arcs after this state and all substates have been processed * * @return the next set of arcs */
Returns the next set of arcs after this state and all substates have been processed
getNextArcs
{ "repo_name": "Strauss5805/MyDocks", "path": "src/PostProcessor/SphinxBased/OurDynamicFlatLinguist.java", "license": "agpl-3.0", "size": 44794 }
[ "edu.cmu.sphinx.linguist.SearchStateArc" ]
import edu.cmu.sphinx.linguist.SearchStateArc;
import edu.cmu.sphinx.linguist.*;
[ "edu.cmu.sphinx" ]
edu.cmu.sphinx;
2,584,492
@Override public String toString() { return Objects.toStringHelper(this) .add("first", first) .add("second", second) .toString(); }
String function() { return Objects.toStringHelper(this) .add("first", first) .add(STR, second) .toString(); }
/** * Returns a string representation of {@link ImmutablePair} object. * * @return string representation of this object. */
Returns a string representation of <code>ImmutablePair</code> object
toString
{ "repo_name": "tikaa/msf4j", "path": "core/src/main/java/org/wso2/msf4j/internal/router/ImmutablePair.java", "license": "apache-2.0", "size": 3482 }
[ "com.google.common.base.Objects" ]
import com.google.common.base.Objects;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
832,744
@Test public void testDateFieldsWithDateModels() { TimeZone origJvmDef = TimeZone.getDefault(); DateTimeZone origJodaDef = DateTimeZone.getDefault(); TimeZone tzClient = TimeZone.getTimeZone("GMT-12"); TimeZone tzServer = TimeZone.getTimeZone("GMT+14"); TimeZone.setDefault(tzServer); DateTimeZone.set...
void function() { TimeZone origJvmDef = TimeZone.getDefault(); DateTimeZone origJodaDef = DateTimeZone.getDefault(); TimeZone tzClient = TimeZone.getTimeZone(STR); TimeZone tzServer = TimeZone.getTimeZone(STR); TimeZone.setDefault(tzServer); DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer)); WebClientInfo cli...
/** * Validates the "value" tags of the &ltinput&gt fields for DateTimeField, DateField and * TimeField when they are given Date models containing Date instances. */
Validates the "value" tags of the &ltinput&gt fields for DateTimeField, DateField and TimeField when they are given Date models containing Date instances
testDateFieldsWithDateModels
{ "repo_name": "martin-g/wicket-osgi", "path": "wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatePickerTest.java", "license": "apache-2.0", "size": 25804 }
[ "java.text.DateFormat", "java.util.Calendar", "java.util.Date", "java.util.Locale", "java.util.TimeZone", "org.apache.wicket.protocol.http.request.WebClientInfo", "org.joda.time.DateTimeZone" ]
import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import org.apache.wicket.protocol.http.request.WebClientInfo; import org.joda.time.DateTimeZone;
import java.text.*; import java.util.*; import org.apache.wicket.protocol.http.request.*; import org.joda.time.*;
[ "java.text", "java.util", "org.apache.wicket", "org.joda.time" ]
java.text; java.util; org.apache.wicket; org.joda.time;
1,432,137
public void setFtpClientConfig(FTPClientConfig ftpClientConfig) { this.ftpClientConfig = ftpClientConfig; }
void function(FTPClientConfig ftpClientConfig) { this.ftpClientConfig = ftpClientConfig; }
/** * To use a custom instance of FTPClientConfig to configure the FTP client * the endpoint should use. */
To use a custom instance of FTPClientConfig to configure the FTP client the endpoint should use
setFtpClientConfig
{ "repo_name": "ullgren/camel", "path": "components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java", "license": "apache-2.0", "size": 15544 }
[ "org.apache.commons.net.ftp.FTPClientConfig" ]
import org.apache.commons.net.ftp.FTPClientConfig;
import org.apache.commons.net.ftp.*;
[ "org.apache.commons" ]
org.apache.commons;
607,264
public Collection<ZWaveNode> getNodes() { return this.zwaveNodes.values(); }
Collection<ZWaveNode> function() { return this.zwaveNodes.values(); }
/** * Gets the node list * * @return */
Gets the node list
getNodes
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 71347 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,486,647
protected void onCancelButtonSubmit(final AjaxRequestTarget target) { }
void function(final AjaxRequestTarget target) { }
/** * Called if user hit the cancel button. * @param target */
Called if user hit the cancel button
onCancelButtonSubmit
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-wicket/src/main/java/org/projectforge/web/dialog/ModalDialog.java", "license": "gpl-3.0", "size": 16893 }
[ "org.apache.wicket.ajax.AjaxRequestTarget" ]
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,701,645
@Override public void widgetSelected(SelectionEvent arg0) { try { readSheets(); } catch (IOException e) { setErrorMessage(Resources.getMessage("ImportWizardPageExcel.4")); //$NON-NLS-1$ ...
void function(SelectionEvent arg0) { try { readSheets(); } catch (IOException e) { setErrorMessage(Resources.getMessage(STR)); resetPage(); return; } comboSheet.setVisible(true); lblSheet.setVisible(true); btnContainsHeader.setVisible(true); comboSheet.select(workbook.getActiveSheetIndex()); comboSheet.notifyListeners(...
/** * Reads the sheets and selects active one */
Reads the sheets and selects active one
widgetSelected
{ "repo_name": "kbabioch/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/ImportWizardPageExcel.java", "license": "apache-2.0", "size": 19290 }
[ "java.io.IOException", "org.deidentifier.arx.gui.Controller", "org.deidentifier.arx.gui.resources.Resources", "org.eclipse.swt.events.SelectionAdapter", "org.eclipse.swt.events.SelectionEvent", "org.eclipse.swt.widgets.Button" ]
import java.io.IOException; import org.deidentifier.arx.gui.Controller; import org.deidentifier.arx.gui.resources.Resources; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Button;
import java.io.*; import org.deidentifier.arx.gui.*; import org.deidentifier.arx.gui.resources.*; import org.eclipse.swt.events.*; import org.eclipse.swt.widgets.*;
[ "java.io", "org.deidentifier.arx", "org.eclipse.swt" ]
java.io; org.deidentifier.arx; org.eclipse.swt;
88,217
@Deprecated // to be removed before 2.0 public RelOptCluster createCluster( RelDataTypeFactory typeFactory, RexBuilder rexBuilder) { return new RelOptCluster(planner, typeFactory, rexBuilder, nextCorrel, mapCorrelToRel); } /** * Constructs a new name for a correlating variable. It is...
@Deprecated RelOptCluster function( RelDataTypeFactory typeFactory, RexBuilder rexBuilder) { return new RelOptCluster(planner, typeFactory, rexBuilder, nextCorrel, mapCorrelToRel); } /** * Constructs a new name for a correlating variable. It is unique within the * whole query. * * @deprecated Use {@link RelOptCluster#c...
/** * Creates a cluster. * * @param typeFactory Type factory * @param rexBuilder Expression builder * @return New cluster */
Creates a cluster
createCluster
{ "repo_name": "julianhyde/calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptQuery.java", "license": "apache-2.0", "size": 3977 }
[ "org.apache.calcite.rel.type.RelDataTypeFactory", "org.apache.calcite.rex.RexBuilder" ]
import org.apache.calcite.rel.type.RelDataTypeFactory; import org.apache.calcite.rex.RexBuilder;
import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,384,834
List<String> getDeploymentResourceNames(String deploymentId);
List<String> getDeploymentResourceNames(String deploymentId);
/** * Retrieves a list of deployment resource names for the given deployment, * ordered alphabetically. * * @param deploymentId id of the deployment, cannot be null. * * @throws AuthorizationException * If the user has no {@link Permissions#READ} permission on {@link Resources#DEPLOYMENT}....
Retrieves a list of deployment resource names for the given deployment, ordered alphabetically
getDeploymentResourceNames
{ "repo_name": "langfr/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/RepositoryService.java", "license": "apache-2.0", "size": 38366 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
415,291
Verb getVerb(); /** * Returns the connection headers as a {@link Map}
Verb getVerb(); /** * Returns the connection headers as a {@link Map}
/** * Returns the HTTP Verb * * @return the verb */
Returns the HTTP Verb
getVerb
{ "repo_name": "brettwooldridge/scribe-java", "path": "src/main/java/org/scribe/model/Request.java", "license": "mit", "size": 3977 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
939,778
public void setSlaveServers( List<SlaveServer> slaveServers ) { this.slaveServers = slaveServers; }
void function( List<SlaveServer> slaveServers ) { this.slaveServers = slaveServers; }
/** * Sets the slave servers. * * @param slaveServers the slaveServers to set */
Sets the slave servers
setSlaveServers
{ "repo_name": "Advent51/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/base/AbstractMeta.java", "license": "apache-2.0", "size": 54941 }
[ "java.util.List", "org.pentaho.di.cluster.SlaveServer" ]
import java.util.List; import org.pentaho.di.cluster.SlaveServer;
import java.util.*; import org.pentaho.di.cluster.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
81,790
public void initButtons(String type) { b9 = new JPanel(); b9.setLayout(new FlowLayout()); JTextArea f = new JTextArea("Now editing: " + type + "\nThis is the starting room."); f.setEditable(false); b9.add(f); done = new JButton(); done.setText("Click here if done editing ...
void function(String type) { b9 = new JPanel(); b9.setLayout(new FlowLayout()); JTextArea f = new JTextArea(STR + type + STR); f.setEditable(false); b9.add(f); done = new JButton(); done.setText(STR + type); b9.add(done); done.addActionListener(this); b = new ButtonBuilder[16]; for (int x = 0; x < 16; x++) { b[x] = new...
/** * It initializes the panel, and sets the text on it * according to the which stage you are in. * * @param type: Which stage of the builder are you in? * The 'Room', 'Monster' and 'Item' stage? */
It initializes the panel, and sets the text on it according to the which stage you are in
initButtons
{ "repo_name": "ryanseys/zuul", "path": "src/Builders/AbstractBuilder.java", "license": "mit", "size": 2111 }
[ "java.awt.FlowLayout", "javax.swing.JButton", "javax.swing.JPanel", "javax.swing.JTextArea" ]
import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JTextArea;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,701,142
public Map<String, PermissionOverride> getUserOverrides() { return userOverrides; }
Map<String, PermissionOverride> function() { return userOverrides; }
/** * Gets the permissions overrides for users. (Key = User id). * * @return The user permissions overrides for this channel. */
Gets the permissions overrides for users. (Key = User id)
getUserOverrides
{ "repo_name": "andwn/discard", "path": "discord4droid/src/main/java/zone/pumpkinhill/discord4droid/handle/obj/Channel.java", "license": "gpl-3.0", "size": 21953 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
51,107
public Builder listener(@NonNull MenuItem.OnMenuItemClickListener listener) { this.menulistener = listener; return this; }
Builder function(@NonNull MenuItem.OnMenuItemClickListener listener) { this.menulistener = listener; return this; }
/** * Set OnMenuItemClickListener for BottomSheet * * @param listener OnMenuItemClickListener for BottomSheet * @return This Builder object to allow for chaining of calls to set methods */
Set OnMenuItemClickListener for BottomSheet
listener
{ "repo_name": "dkorolev/omim", "path": "android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java", "license": "apache-2.0", "size": 30552 }
[ "android.support.annotation.NonNull", "android.view.MenuItem" ]
import android.support.annotation.NonNull; import android.view.MenuItem;
import android.support.annotation.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
321,590
@Override public Adapter createDataTypeDescriptionAdapter() { if (dataTypeDescriptionItemProvider == null) { dataTypeDescriptionItemProvider = new DataTypeDescriptionItemProvider(this); } return dataTypeDescriptionItemProvider; } protected DesignationItemProvider designationItemProvider;
Adapter function() { if (dataTypeDescriptionItemProvider == null) { dataTypeDescriptionItemProvider = new DataTypeDescriptionItemProvider(this); } return dataTypeDescriptionItemProvider; } protected DesignationItemProvider designationItemProvider;
/** * This creates an adapter for a {@link org.openhealthtools.mdht.cts2.entity.DataTypeDescription}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This creates an adapter for a <code>org.openhealthtools.mdht.cts2.entity.DataTypeDescription</code>.
createDataTypeDescriptionAdapter
{ "repo_name": "drbgfc/mdht", "path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.edit/src/org/openhealthtools/mdht/cts2/entity/provider/EntityItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 21447 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,403,815
public static ITypeBinding findInterface(ITypeBinding implementingType, String qualifiedName) { if (implementingType.isInterface() && implementingType.getErasure().getQualifiedName().equals(qualifiedName)) { return implementingType; } for (ITypeBinding interfaze : getAllInterfaces(implementi...
static ITypeBinding function(ITypeBinding implementingType, String qualifiedName) { if (implementingType.isInterface() && implementingType.getErasure().getQualifiedName().equals(qualifiedName)) { return implementingType; } for (ITypeBinding interfaze : getAllInterfaces(implementingType)) { if (interfaze.getErasure().ge...
/** * Returns the type binding for a specific interface of a specific type. */
Returns the type binding for a specific interface of a specific type
findInterface
{ "repo_name": "Buggaboo/j2objc", "path": "translator/src/main/java/com/google/devtools/j2objc/util/BindingUtil.java", "license": "apache-2.0", "size": 30964 }
[ "org.eclipse.jdt.core.dom.ITypeBinding" ]
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
854,993
public void setYAsPercentage(double percentage) { setValueAndAddToParent(Property.Y, Utilities.getAsPercentage(percentage)); }
void function(double percentage) { setValueAndAddToParent(Property.Y, Utilities.getAsPercentage(percentage)); }
/** * Sets the position of label by the percentage (value between 0 and 1) of the vertical dimension. * * @param percentage the position of label by the percentage (value between 0 and 1) of the vertical dimension */
Sets the position of label by the percentage (value between 0 and 1) of the vertical dimension
setYAsPercentage
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/annotation/AlignPosition.java", "license": "apache-2.0", "size": 6621 }
[ "org.pepstock.charba.client.utils.Utilities" ]
import org.pepstock.charba.client.utils.Utilities;
import org.pepstock.charba.client.utils.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
2,345,817
@Override public Item addItem(Object itemId) throws UnsupportedOperationException { throw new UnsupportedOperationException("Cannot add new items to this container"); }
Item function(Object itemId) throws UnsupportedOperationException { throw new UnsupportedOperationException(STR); }
/** * Can be overridden if you want to support adding items. */
Can be overridden if you want to support adding items
addItem
{ "repo_name": "aihua/opennms", "path": "features/topology-map/org.opennms.features.topology.api/src/main/java/org/opennms/features/topology/api/browsers/OnmsVaadinContainer.java", "license": "agpl-3.0", "size": 21339 }
[ "com.vaadin.data.Item" ]
import com.vaadin.data.Item;
import com.vaadin.data.*;
[ "com.vaadin.data" ]
com.vaadin.data;
426,159
private LegendItemTable generateLegendItem(boolean haveNoIcon, String color, float spaceBefore, boolean iconBeforeName, PdfPCell[] cells) throws DocumentException { LegendItemTable legendItemTable; if (haveNoIcon && color == null) { legendItemTable = new LegendItemTable(1); ...
LegendItemTable function(boolean haveNoIcon, String color, float spaceBefore, boolean iconBeforeName, PdfPCell[] cells) throws DocumentException { LegendItemTable legendItemTable; if (haveNoIcon && color == null) { legendItemTable = new LegendItemTable(1); } else { legendItemTable = new LegendItemTable(2); } legendItem...
/** * Create a LegendItemTable with parameters * * @param haveNoIcon * @param color * @param spaceBefore * @param iconBeforeName * @param cells * * @return * * @throws DocumentException */
Create a LegendItemTable with parameters
generateLegendItem
{ "repo_name": "mbarto/mapfish-print", "path": "src/main/java/org/mapfish/print/config/layout/LegendsBlock.java", "license": "gpl-3.0", "size": 55404 }
[ "com.lowagie.text.DocumentException", "com.lowagie.text.pdf.PdfPCell", "org.mapfish.print.legend.LegendItemTable" ]
import com.lowagie.text.DocumentException; import com.lowagie.text.pdf.PdfPCell; import org.mapfish.print.legend.LegendItemTable;
import com.lowagie.text.*; import com.lowagie.text.pdf.*; import org.mapfish.print.legend.*;
[ "com.lowagie.text", "org.mapfish.print" ]
com.lowagie.text; org.mapfish.print;
1,547,125
private static CoreDBImplementation dbHelper; public static final void initDB(final IDBChanges callback){ dbHelper = CoreDBImplementation.obtain(callback); } /** * function initialise the loading of app config file under assets * * @param environment the mode the application to...
static CoreDBImplementation dbHelper; public static final void function(final IDBChanges callback){ dbHelper = CoreDBImplementation.obtain(callback); } /** * function initialise the loading of app config file under assets * * @param environment the mode the application to be launched, based on this value config * files...
/** * function initialize the DB creation * @param callback the callback listening for DB changes */
function initialize the DB creation
initDB
{ "repo_name": "rajeshcp/AndroidTestAPP", "path": "app/src/main/java/com/triode/androidtestapp/core/APPNucleus.java", "license": "apache-2.0", "size": 3795 }
[ "com.triode.androidtestapp.core.orm.CoreDBImplementation", "com.triode.androidtestapp.core.orm.IDBChanges" ]
import com.triode.androidtestapp.core.orm.CoreDBImplementation; import com.triode.androidtestapp.core.orm.IDBChanges;
import com.triode.androidtestapp.core.orm.*;
[ "com.triode.androidtestapp" ]
com.triode.androidtestapp;
408,458
public static NodeDescriptors parseLocalNodeDescriptors(ChannelBuffer cb, byte protocolId) throws BgpParseException { ChannelBuffer tempBuf = cb.copy(); short type = cb.readShort(); short length = cb.readShort(); if (cb...
static NodeDescriptors function(ChannelBuffer cb, byte protocolId) throws BgpParseException { ChannelBuffer tempBuf = cb.copy(); short type = cb.readShort(); short length = cb.readShort(); if (cb.readableBytes() < length) { throw new BgpParseException(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.OPTIONAL_ATTRIBUTE_E...
/** * Parse local node descriptors. * * @param cb ChannelBuffer * @param protocolId protocol identifier * @return LocalNodeDescriptors * @throws BgpParseException while parsing local node descriptors */
Parse local node descriptors
parseLocalNodeDescriptors
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/BgpPrefixLSIdentifier.java", "license": "apache-2.0", "size": 10731 }
[ "org.jboss.netty.buffer.ChannelBuffer", "org.onosproject.bgpio.exceptions.BgpParseException", "org.onosproject.bgpio.types.BgpErrorType" ]
import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.bgpio.exceptions.BgpParseException; import org.onosproject.bgpio.types.BgpErrorType;
import org.jboss.netty.buffer.*; import org.onosproject.bgpio.exceptions.*; import org.onosproject.bgpio.types.*;
[ "org.jboss.netty", "org.onosproject.bgpio" ]
org.jboss.netty; org.onosproject.bgpio;
2,595,124
public MetadataProvider getProviderFor(String sSourceRef, Date dLastModified) throws OAException;
MetadataProvider function(String sSourceRef, Date dLastModified) throws OAException;
/** * Return the MetadataProvider for the provided source reference * or null if the MetadataProvider was not available * * @param sSourceRef Source Reference or ID of a MetadataProvider * @param dLastModified Timestamp of last modification of service; when this is more recent than * the last refresh-dat...
Return the MetadataProvider for the provided source reference or null if the MetadataProvider was not available
getProviderFor
{ "repo_name": "GluuFederation/Asimba", "path": "asimba-saml2-utility/src/main/java/org/asimba/util/saml2/metadata/provider/IMetadataProviderManager.java", "license": "agpl-3.0", "size": 4216 }
[ "com.alfaariss.oa.OAException", "java.util.Date", "org.opensaml.saml2.metadata.provider.MetadataProvider" ]
import com.alfaariss.oa.OAException; import java.util.Date; import org.opensaml.saml2.metadata.provider.MetadataProvider;
import com.alfaariss.oa.*; import java.util.*; import org.opensaml.saml2.metadata.provider.*;
[ "com.alfaariss.oa", "java.util", "org.opensaml.saml2" ]
com.alfaariss.oa; java.util; org.opensaml.saml2;
1,718,565
public Drawable getIconDrawable() { return mIconDrawable; } } private TextView mTitleView; private TextView mDescriptionView; private TextView mBreadcrumbView; private ImageView mIconView;
Drawable function() { return mIconDrawable; } } private TextView mTitleView; private TextView mDescriptionView; private TextView mBreadcrumbView; private ImageView mIconView;
/** * Returns the icon drawable specified when this Guidance was constructed. * @return The icon for this Guidance. */
Returns the icon drawable specified when this Guidance was constructed
getIconDrawable
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/support/v17/leanback/widget/GuidanceStylist.java", "license": "gpl-3.0", "size": 12332 }
[ "android.graphics.drawable.Drawable", "android.widget.ImageView", "android.widget.TextView" ]
import android.graphics.drawable.Drawable; import android.widget.ImageView; import android.widget.TextView;
import android.graphics.drawable.*; import android.widget.*;
[ "android.graphics", "android.widget" ]
android.graphics; android.widget;
1,511,465
protected static void registerChartForDeletion(File tempFile, HttpSession session) { // Add chart to deletion list in session if (session != null) { ChartDeleter chartDeleter = (ChartDeleter) session.getAttribute("JFreeChart_Deleter"); if (char...
static void function(File tempFile, HttpSession session) { if (session != null) { ChartDeleter chartDeleter = (ChartDeleter) session.getAttribute(STR); if (chartDeleter == null) { chartDeleter = new ChartDeleter(); session.setAttribute(STR, chartDeleter); } chartDeleter.addChart(tempFile.getName()); } else { System.out...
/** * Adds a {@link ChartDeleter} object to the session object with the name * <code>JFreeChart_Deleter</code> if there is not already one bound to the * session and adds the filename to the list of charts to be deleted. * * @param tempFile the file to be deleted. * @param session the ...
Adds a <code>ChartDeleter</code> object to the session object with the name <code>JFreeChart_Deleter</code> if there is not already one bound to the session and adds the filename to the list of charts to be deleted
registerChartForDeletion
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/servlet/ServletUtilities.java", "license": "lgpl-2.1", "size": 16954 }
[ "java.io.File", "javax.servlet.http.HttpSession" ]
import java.io.File; import javax.servlet.http.HttpSession;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
544,783
private static void executeEmbed(CmdLineOptions options, OpenStego stego) throws OpenStegoException { String msgFileName = options.getStringValue("-mf"); String coverFileName = options.getStringValue("-cf"); String stegoFileName = options.getStringValue("-sf"); List<File> coverFileLi...
static void function(CmdLineOptions options, OpenStego stego) throws OpenStegoException { String msgFileName = options.getStringValue("-mf"); String coverFileName = options.getStringValue("-cf"); String stegoFileName = options.getStringValue("-sf"); List<File> coverFileList; if (stego.getConfig().isUseEncryption() && s...
/** * Method to execute "embed" command * * @param options Command-line options * @param stego {@link OpenStego} object * @throws OpenStegoException Processing issues */
Method to execute "embed" command
executeEmbed
{ "repo_name": "syvaidya/openstego", "path": "src/main/java/com/openstego/desktop/OpenStegoCmd.java", "license": "gpl-2.0", "size": 19486 }
[ "com.openstego.desktop.util.CommonUtil", "com.openstego.desktop.util.cmd.CmdLineOptions", "com.openstego.desktop.util.cmd.PasswordInput", "java.io.File", "java.util.List" ]
import com.openstego.desktop.util.CommonUtil; import com.openstego.desktop.util.cmd.CmdLineOptions; import com.openstego.desktop.util.cmd.PasswordInput; import java.io.File; import java.util.List;
import com.openstego.desktop.util.*; import com.openstego.desktop.util.cmd.*; import java.io.*; import java.util.*;
[ "com.openstego.desktop", "java.io", "java.util" ]
com.openstego.desktop; java.io; java.util;
1,108,354
@JsMethod public native Coordinate getFirstCoordinate();
native Coordinate function();
/** * Return the first coordinate of the geometry. * @return First coordinate. */
Return the first coordinate of the geometry
getFirstCoordinate
{ "repo_name": "iSergio/gwt-ol", "path": "ol4gwt-main/src/main/java/org/openlayers/ol/geom/SimpleGeometry.java", "license": "apache-2.0", "size": 2318 }
[ "org.openlayers.ol.Coordinate" ]
import org.openlayers.ol.Coordinate;
import org.openlayers.ol.*;
[ "org.openlayers.ol" ]
org.openlayers.ol;
1,393,298
public static FileOutputStream getCreateForWriteFileOutputStream(File f, int permissions) throws IOException { if (!Shell.WINDOWS) { // Use the native wrapper around open(2) try { FileDescriptor fd = NativeIO.POSIX.open(f.getAbsolutePath(), NativeIO.POSIX.O_WRONLY | NativeIO....
static FileOutputStream function(File f, int permissions) throws IOException { if (!Shell.WINDOWS) { try { FileDescriptor fd = NativeIO.POSIX.open(f.getAbsolutePath(), NativeIO.POSIX.O_WRONLY NativeIO.POSIX.O_CREAT NativeIO.POSIX.O_EXCL, permissions); return new FileOutputStream(fd); } catch (NativeIOException nioe) { ...
/** * Create the specified File for write access, ensuring that it does not exist. * @param f the file that we want to create * @param permissions we want to have on the file (if security is enabled) * * @throws AlreadyExistsException if the file already exists * @throws IOException if any other error...
Create the specified File for write access, ensuring that it does not exist
getCreateForWriteFileOutputStream
{ "repo_name": "legend-hua/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/nativeio/NativeIO.java", "license": "apache-2.0", "size": 34106 }
[ "java.io.File", "java.io.FileDescriptor", "java.io.FileOutputStream", "java.io.IOException", "org.apache.hadoop.io.SecureIOUtils", "org.apache.hadoop.util.Shell" ]
import java.io.File; import java.io.FileDescriptor; import java.io.FileOutputStream; import java.io.IOException; import org.apache.hadoop.io.SecureIOUtils; import org.apache.hadoop.util.Shell;
import java.io.*; import org.apache.hadoop.io.*; import org.apache.hadoop.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
492,467
public Operation withModifiedTime(DateTime modifiedTime) { this.modifiedTime = modifiedTime; return this; }
Operation function(DateTime modifiedTime) { this.modifiedTime = modifiedTime; return this; }
/** * Set time when operation has been updated. * * @param modifiedTime the modifiedTime value to set * @return the Operation object itself. */
Set time when operation has been updated
withModifiedTime
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/Operation.java", "license": "mit", "size": 5460 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,080,922
final boolean is(ScalarAttributeType scalarAttributeType) { return Scalar.of(targetType()).is(scalarAttributeType); }
final boolean is(ScalarAttributeType scalarAttributeType) { return Scalar.of(targetType()).is(scalarAttributeType); }
/** * Returns true if the types match. */
Returns true if the types match
is
{ "repo_name": "jentfoo/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/ConvertibleType.java", "license": "apache-2.0", "size": 7207 }
[ "com.amazonaws.services.dynamodbv2.datamodeling.StandardTypeConverters", "com.amazonaws.services.dynamodbv2.model.ScalarAttributeType" ]
import com.amazonaws.services.dynamodbv2.datamodeling.StandardTypeConverters; import com.amazonaws.services.dynamodbv2.model.ScalarAttributeType;
import com.amazonaws.services.dynamodbv2.datamodeling.*; import com.amazonaws.services.dynamodbv2.model.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
2,383,591
public void commit() throws IOException { if (hasErrors) { completeEdit(this, false); remove(entry.key); // the previous entry is stale } else { completeEdit(this, true); } }
void function() throws IOException { if (hasErrors) { completeEdit(this, false); remove(entry.key); } else { completeEdit(this, true); } }
/** * Commits this edit so it is visible to readers. This releases the * edit lock so another edit may be started on the same key. */
Commits this edit so it is visible to readers. This releases the edit lock so another edit may be started on the same key
commit
{ "repo_name": "dgrlucky/Awesome", "path": "library/src/main/java/com/library/common/image/DiskLruCache.java", "license": "apache-2.0", "size": 33896 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,704,292
@Override public By getElementLocator() { if(by != null) return this.by; By by = null; String locator = ""; try { locator = getElementLocatorAsString(); try{ locator = locator.substring(0, locator.indexOf(":")); }catch(StringIndexOutOfBoundsException e){} switch (locator.toLowerCase().rep...
By function() { if(by != null) return this.by; By by = null; String locator = STR:STR STRSTRclassnameSTRcssselectorSTRidSTRlinktextSTRnameSTRtagnameSTRxpathSTRng-modalSTRbuttontextSTRng-controllerSTRng-repeaterSTRUnknown Element Locator sent in: " + locator, getWrappedDriver()); } return by; } catch (Exception e) { e.p...
/** * Get the By Locator object used to create this element * * @author Justin * @return {@link By} Return the By object to reuse */
Get the By Locator object used to create this element
getElementLocator
{ "repo_name": "Orasi/java-automation-bs", "path": "src/main/java/com/orasi/core/interfaces/impl/ElementImpl.java", "license": "bsd-3-clause", "size": 30407 }
[ "com.orasi.core.interfaces.Element", "org.openqa.selenium.By" ]
import com.orasi.core.interfaces.Element; import org.openqa.selenium.By;
import com.orasi.core.interfaces.*; import org.openqa.selenium.*;
[ "com.orasi.core", "org.openqa.selenium" ]
com.orasi.core; org.openqa.selenium;
2,528,563
void doubleBufferMode(int visibleBuffer, int writeBuffer, boolean copyVisibleBufferToWriteBuffer, boolean autoSwap) throws InvalidMidiDataException;
void doubleBufferMode(int visibleBuffer, int writeBuffer, boolean copyVisibleBufferToWriteBuffer, boolean autoSwap) throws InvalidMidiDataException;
/** * Sets which buffer is written to, and which one is currently displayed (can be the same). * The "autoswap" parameter allows a "blinking" effect, where the Launchpad keeps swapping the visible and * non-visible buffers until autoswapping is turned off again. * * @param visibleBuffer The buf...
Sets which buffer is written to, and which one is currently displayed (can be the same). The "autoswap" parameter allows a "blinking" effect, where the Launchpad keeps swapping the visible and non-visible buffers until autoswapping is turned off again
doubleBufferMode
{ "repo_name": "OlivierCroisier/LP4J", "path": "lp4j-midi/src/main/java/net/thecodersbreakfast/lp4j/midi/protocol/MidiProtocolClient.java", "license": "apache-2.0", "size": 5199 }
[ "javax.sound.midi.InvalidMidiDataException" ]
import javax.sound.midi.InvalidMidiDataException;
import javax.sound.midi.*;
[ "javax.sound" ]
javax.sound;
264,835
private float crossCheckVertical(int startI, int centerJ, int maxCount, int originalStateCountTotal) { BitMatrix image = this.image; int maxI = image.getHeight(); int[] stateCount = crossCheckStateCount; stateCount[0] = 0; stateCount[1] = 0; stateCount[2] = 0; // Start counting up ...
float function(int startI, int centerJ, int maxCount, int originalStateCountTotal) { BitMatrix image = this.image; int maxI = image.getHeight(); int[] stateCount = crossCheckStateCount; stateCount[0] = 0; stateCount[1] = 0; stateCount[2] = 0; int i = startI; while (i >= 0 && image.get(centerJ, i) && stateCount[1] <= ma...
/** * <p>After a horizontal scan finds a potential alignment pattern, this method * "cross-checks" by scanning down vertically through the center of the possible * alignment pattern to see if the same proportion is detected.</p> * * @param startI row where an alignment pattern was detected * @param ce...
After a horizontal scan finds a potential alignment pattern, this method "cross-checks" by scanning down vertically through the center of the possible alignment pattern to see if the same proportion is detected
crossCheckVertical
{ "repo_name": "aqnote/AndroidTest", "path": "app-barcode/src/main/java/com/aqnote/app/barcode/core/qrcode/detector/AlignmentPatternFinder.java", "license": "apache-2.0", "size": 10112 }
[ "com.aqnote.app.barcode.core.common.BitMatrix" ]
import com.aqnote.app.barcode.core.common.BitMatrix;
import com.aqnote.app.barcode.core.common.*;
[ "com.aqnote.app" ]
com.aqnote.app;
930,817
@XmlElement @XmlSchemaType(name = "dateTime") @XmlJavaTypeAdapter(DateTimeMapper.class) public void setDateTime(DateTime dateTime) { preset(dateTimePropertyName, dateTime); this.dateTime = dateTime; }
@XmlSchemaType(name = STR) @XmlJavaTypeAdapter(DateTimeMapper.class) void function(DateTime dateTime) { preset(dateTimePropertyName, dateTime); this.dateTime = dateTime; }
/** * {@link #dateTime} mutator. * @param dateTime The new value. **/
<code>#dateTime</code> mutator
setDateTime
{ "repo_name": "skyvers/wildcat", "path": "skyve-ejb/src/generated/java/modules/test/domain/AllAttributesPersistent.java", "license": "lgpl-2.1", "size": 20166 }
[ "javax.xml.bind.annotation.XmlSchemaType", "javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter", "org.skyve.domain.types.DateTime", "org.skyve.impl.domain.types.jaxb.DateTimeMapper" ]
import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.skyve.domain.types.DateTime; import org.skyve.impl.domain.types.jaxb.DateTimeMapper;
import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*; import org.skyve.domain.types.*; import org.skyve.impl.domain.types.jaxb.*;
[ "javax.xml", "org.skyve.domain", "org.skyve.impl" ]
javax.xml; org.skyve.domain; org.skyve.impl;
1,698,907
private static void setXXX_setObjectNullNoTypeSpec( Statement s, PreparedStatement psi, PreparedStatement psq, int type) throws SQLException, IOException { // setObject(null) - see DERBY-1938 s.execute("DELETE FROM PM.TYPE_AS"); // setObject(null) psi.setObje...
static void function( Statement s, PreparedStatement psi, PreparedStatement psq, int type) throws SQLException, IOException { s.execute(STR); psi.setObject(1, null); psi.executeUpdate(); getValidValue(psq, jdbcTypes[type], STR); s.execute(STR); psi.setObject(1, null); psi.addBatch(); psi.executeBatch(); getValidValue(p...
/** * Passes Java null to the setObject-call, expecting the driver to set the * column value to SQL NULL. * <p> * This behavior was allowed/introduced by DERBY-1938. * * @param s statement used for auxiliary tasks * @param psi statement used for insert * @param psq statement used...
Passes Java null to the setObject-call, expecting the driver to set the column value to SQL NULL. This behavior was allowed/introduced by DERBY-1938
setXXX_setObjectNullNoTypeSpec
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java", "license": "apache-2.0", "size": 183716 }
[ "java.io.IOException", "java.sql.PreparedStatement", "java.sql.SQLException", "java.sql.Statement" ]
import java.io.IOException; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,625,493
public void comboboxselectFirst(String path, String locatortype1, String locatortype2) { clickButton(getResource(path), locatortype1); List<WebElement> elements = getElements(getLocator( ".x-combo-list-item", "css")); String varValue = elements.get(0).getText(); clickButton(getResource(path + ".select...
void function(String path, String locatortype1, String locatortype2) { clickButton(getResource(path), locatortype1); List<WebElement> elements = getElements(getLocator( STR, "css")); String varValue = elements.get(0).getText(); clickButton(getResource(path + STR).replace(STR, varValue), locatortype2); }
/** * Comboboxselect first. * * @param path * the path * @param locatortype1 * the locatortype1 * @param locatortype2 * the locatortype2 */
Comboboxselect first
comboboxselectFirst
{ "repo_name": "openMF/mifosx-e2e-testing", "path": "MifosTestAutomation/src/test/java/com/mifos/pages/MifosWebPage.java", "license": "mpl-2.0", "size": 59471 }
[ "java.util.List", "org.openqa.selenium.WebElement" ]
import java.util.List; import org.openqa.selenium.WebElement;
import java.util.*; import org.openqa.selenium.*;
[ "java.util", "org.openqa.selenium" ]
java.util; org.openqa.selenium;
1,136,977
private String getNextLine() throws IOException { if (!this.linesSkiped) { for (int i = 0; i < skipLines; i++) { br.readLine(); } this.linesSkiped = true; } String nextLine = br.readLine(); if (nextLine == null) { ...
String function() throws IOException { if (!this.linesSkiped) { for (int i = 0; i < skipLines; i++) { br.readLine(); } this.linesSkiped = true; } String nextLine = br.readLine(); if (nextLine == null) { hasNext = false; } return hasNext ? nextLine : null; }
/** * Reads the next line from the file. * * @return the next line from the file without trailing newline * @throws IOException * if bad things happen during the read */
Reads the next line from the file
getNextLine
{ "repo_name": "jiacai2050/JCB", "path": "src/au/com/bytecode/opencsv/CSVReader.java", "license": "gpl-3.0", "size": 9874 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
458,831
void setIcon(@Nullable Bitmap icon);
void setIcon(@Nullable Bitmap icon);
/** * Sets the icon of the dialog. * * @param icon * The icon, which should be set, as an instance of the class {@link Bitmap} or null, if * no icon should be shown */
Sets the icon of the dialog
setIcon
{ "repo_name": "michael-rapp/AndroidMaterialDialog", "path": "library/src/main/java/de/mrapp/android/dialog/model/MaterialDialogDecorator.java", "license": "apache-2.0", "size": 29588 }
[ "android.graphics.Bitmap", "androidx.annotation.Nullable" ]
import android.graphics.Bitmap; import androidx.annotation.Nullable;
import android.graphics.*; import androidx.annotation.*;
[ "android.graphics", "androidx.annotation" ]
android.graphics; androidx.annotation;
2,788,957
private boolean isToolInSite(Site thisSite, String toolId) { final Collection toolsInSite = thisSite.getTools(toolId); return ! toolsInSite.isEmpty(); }
boolean function(Site thisSite, String toolId) { final Collection toolsInSite = thisSite.getTools(toolId); return ! toolsInSite.isEmpty(); }
/** * Return TRUE if tool with id passed in exists in site passed in * FALSE otherwise. * * @param thisSite * Site object to check * @param toolId * Tool id to be checked * * @return */
Return TRUE if tool with id passed in exists in site passed in FALSE otherwise
isToolInSite
{ "repo_name": "pushyamig/sakai", "path": "msgcntr/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/SynopticMsgcntrManagerImpl.java", "license": "apache-2.0", "size": 42434 }
[ "java.util.Collection", "org.sakaiproject.site.api.Site" ]
import java.util.Collection; import org.sakaiproject.site.api.Site;
import java.util.*; import org.sakaiproject.site.api.*;
[ "java.util", "org.sakaiproject.site" ]
java.util; org.sakaiproject.site;
770,219
private List<Token> getTokens() { try { if (needsAnalysis) { tokens = viterbi.getBestTokens(sentence); needsAnalysis = false; } return tokens; } catch (IOException e) { throw new RuntimeException(e); } }
List<Token> function() { try { if (needsAnalysis) { tokens = viterbi.getBestTokens(sentence); needsAnalysis = false; } return tokens; } catch (IOException e) { throw new RuntimeException(e); } }
/** * Gets the tokens resulting from analysis of the current text, * re-performing the actual analysis if any change that would require it has * occurred since the previous analysis * * @return The tokens resulting from analysis of the current text */
Gets the tokens resulting from analysis of the current text, re-performing the actual analysis if any change that would require it has occurred since the previous analysis
getTokens
{ "repo_name": "aymkam/lucene-gosen", "path": "src/java/net/java/sen/ReadingProcessor.java", "license": "lgpl-2.1", "size": 20299 }
[ "java.io.IOException", "java.util.List", "net.java.sen.dictionary.Token" ]
import java.io.IOException; import java.util.List; import net.java.sen.dictionary.Token;
import java.io.*; import java.util.*; import net.java.sen.dictionary.*;
[ "java.io", "java.util", "net.java.sen" ]
java.io; java.util; net.java.sen;
879,061
protected boolean isMemberAvailable(CommitteeMembershipBase member, Date scheduledDate) { java.sql.Date sqlDate = new java.sql.Date(scheduledDate.getTime()); if (member.isActive(sqlDate)) { Calendar scheduleCalendar = getCalendar(scheduledDate); List<CommitteeMembershipRole> ...
boolean function(CommitteeMembershipBase member, Date scheduledDate) { java.sql.Date sqlDate = new java.sql.Date(scheduledDate.getTime()); if (member.isActive(sqlDate)) { Calendar scheduleCalendar = getCalendar(scheduledDate); List<CommitteeMembershipRole> roles = member.getMembershipRoles(); for (CommitteeMembershipRo...
/** * Is the member available for the given schedule meeting date? * The member must have a role for that date. * @param member the member * @param scheduledDate the date of the meeting * @return true if the member will be at the meeting; otherwise false * TODO: This method calls member.is...
Is the member available for the given schedule meeting date? The member must have a role for that date
isMemberAvailable
{ "repo_name": "geothomasp/kcmit", "path": "coeus-impl/src/main/java/org/kuali/coeus/common/committee/impl/service/impl/CommitteeServiceImplBase.java", "license": "agpl-3.0", "size": 18605 }
[ "java.util.Calendar", "java.util.Date", "java.util.List", "org.kuali.coeus.common.committee.impl.bo.CommitteeMembershipBase", "org.kuali.coeus.common.committee.impl.bo.CommitteeMembershipRole" ]
import java.util.Calendar; import java.util.Date; import java.util.List; import org.kuali.coeus.common.committee.impl.bo.CommitteeMembershipBase; import org.kuali.coeus.common.committee.impl.bo.CommitteeMembershipRole;
import java.util.*; import org.kuali.coeus.common.committee.impl.bo.*;
[ "java.util", "org.kuali.coeus" ]
java.util; org.kuali.coeus;
1,123,966
@JsonProperty( "num_hosts" ) public int getNumHosts() { return numHosts; }
@JsonProperty( STR ) int function() { return numHosts; }
/** * Gets the number of hosts. * * @return the number of hosts */
Gets the number of hosts
getNumHosts
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/scans/models/RemediationsResult.java", "license": "mit", "size": 2913 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,513,437
public String getStashURL() { String result = config.getStashURL(); if (result == null) { throw new StashConfigurationException( MessageFormat.format(EXCEPTION_STASH_CONF, StashPlugin.STASH_URL)); } if (result.endsWith("/")) { LOGGER.warn("Stripping trailing slash from {}, as it...
String function() { String result = config.getStashURL(); if (result == null) { throw new StashConfigurationException( MessageFormat.format(EXCEPTION_STASH_CONF, StashPlugin.STASH_URL)); } if (result.endsWith("/")) { LOGGER.warn(STR, StashPlugin.STASH_URL); result = StashPluginUtils.removeEnd(result, "/"); } return res...
/** * Mandatory Stash URL option. * * @throws StashConfigurationException if unable to get parameter */
Mandatory Stash URL option
getStashURL
{ "repo_name": "AmadeusITGroup/sonar-stash", "path": "src/main/java/org/sonar/plugins/stash/StashRequestFacade.java", "license": "mit", "size": 13637 }
[ "java.text.MessageFormat", "org.sonar.plugins.stash.exceptions.StashConfigurationException" ]
import java.text.MessageFormat; import org.sonar.plugins.stash.exceptions.StashConfigurationException;
import java.text.*; import org.sonar.plugins.stash.exceptions.*;
[ "java.text", "org.sonar.plugins" ]
java.text; org.sonar.plugins;
830,751
@Override public boolean authorize(Method method, Object target) { if (!isAllowedByDefault(method, target)) { return false; } try { authorizeRegionAccess(securityService, target); } catch (NotAuthorizedException noAuthorizedException) { return false; } return true; }
boolean function(Method method, Object target) { if (!isAllowedByDefault(method, target)) { return false; } try { authorizeRegionAccess(securityService, target); } catch (NotAuthorizedException noAuthorizedException) { return false; } return true; }
/** * Executes the authorization logic to determine whether the {@code method} is allowed to be * executed on the {@code target} object instance. * If the {@code target} object is an instance of {@link Region}, this methods also ensures that * the user has the {@code DATA:READ} permission granted for the ta...
Executes the authorization logic to determine whether the method is allowed to be executed on the target object instance. If the target object is an instance of <code>Region</code>, this methods also ensures that
authorize
{ "repo_name": "smgoller/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/query/security/RestrictedMethodAuthorizer.java", "license": "apache-2.0", "size": 16535 }
[ "java.lang.reflect.Method", "org.apache.geode.security.NotAuthorizedException" ]
import java.lang.reflect.Method; import org.apache.geode.security.NotAuthorizedException;
import java.lang.reflect.*; import org.apache.geode.security.*;
[ "java.lang", "org.apache.geode" ]
java.lang; org.apache.geode;
1,175,759
EClass getCarchaProject();
EClass getCarchaProject();
/** * Returns the meta object for class '{@link isistan.edu.carcha.model.carcha.CarchaProject <em>Project</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Project</em>'. * @see isistan.edu.carcha.model.carcha.CarchaProject * @generated */
Returns the meta object for class '<code>isistan.edu.carcha.model.carcha.CarchaProject Project</code>'.
getCarchaProject
{ "repo_name": "germanattanasio/traceability-assistant-eclipse-plugins", "path": "edu.isistan.carcha.model/src/isistan/edu/carcha/model/carcha/CarchaPackage.java", "license": "apache-2.0", "size": 22308 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
253,412
void releaseClassLoader() { try { classLoader.close(); } catch (IOException e) { LOG.warn("Failed to release user code class loader for " + Arrays.toString(libraries.toArray())); } } }
void releaseClassLoader() { try { classLoader.close(); } catch (IOException e) { LOG.warn(STR + Arrays.toString(libraries.toArray())); } } }
/** * Release the class loader to ensure any file descriptors are closed * and the cached libraries are deleted immediately. */
Release the class loader to ensure any file descriptors are closed and the cached libraries are deleted immediately
releaseClassLoader
{ "repo_name": "zohar-mizrahi/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManager.java", "license": "apache-2.0", "size": 10457 }
[ "java.io.IOException", "java.util.Arrays" ]
import java.io.IOException; import java.util.Arrays;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,252,755
@Override public void preInit() { super.preInit(); FMLCommonHandler.instance().bus().register(new WorldTickEventHandler()); // register my Items, Blocks, Entities, etc }
void function() { super.preInit(); FMLCommonHandler.instance().bus().register(new WorldTickEventHandler()); }
/** * Run before anything else. Read your config, create blocks, items, etc, * and register them with the GameRegistry */
Run before anything else. Read your config, create blocks, items, etc, and register them with the GameRegistry
preInit
{ "repo_name": "HarcVohoc/settlers", "path": "java/de/harc/settlers/proxy/ProxyClient.java", "license": "apache-2.0", "size": 1897 }
[ "de.harc.settlers.event.WorldTickEventHandler" ]
import de.harc.settlers.event.WorldTickEventHandler;
import de.harc.settlers.event.*;
[ "de.harc.settlers" ]
de.harc.settlers;
2,423,661
public Collection<LFVertex> targetView() { return (targetView == null) ? (targetView = new VertexView(false)) : targetView; }
Collection<LFVertex> function() { return (targetView == null) ? (targetView = new VertexView(false)) : targetView; }
/** * Gets a view of this filtered edge set as a set of LF vertices that are the * {@linkplain LFEdge#getTarget() target vertices} for each edge in this set. * @return A set containing every LF vertex that is the target vertex of some edge in this set. * Note that the returned collection is immutable, and may c...
Gets a view of this filtered edge set as a set of LF vertices that are the LFEdge#getTarget() target vertices for each edge in this set
targetView
{ "repo_name": "bkiefer/openccg", "path": "src/main/java/opennlp/ccg/disjunctivizer/FilteredLFEdgeSet.java", "license": "lgpl-2.1", "size": 4750 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,600,599
public static MArchive[] get(Properties ctx, String whereClause) { ArrayList list = new ArrayList(); PreparedStatement pstmt = null; String sql = "SELECT * FROM AD_Archive WHERE AD_Client_ID=?"; if ((whereClause != null) && (whereClause.length() > 0)) { sql += whereClause...
static MArchive[] function(Properties ctx, String whereClause) { ArrayList list = new ArrayList(); PreparedStatement pstmt = null; String sql = STR; if ((whereClause != null) && (whereClause.length() > 0)) { sql += whereClause; } sql += STR; try { pstmt = DB.prepareStatement(sql); pstmt.setInt(1, Env.getAD_Client_ID(ct...
/** * Get Archives * @param ctx context * @param whereClause optional where clause (starting with AND) * @return archives */
Get Archives
get
{ "repo_name": "facoy/facoy", "path": "RQs/bigclone/false_positive_samples/query_files/Type_3_ST/1414581.java", "license": "apache-2.0", "size": 8569 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.util.ArrayList", "java.util.Properties", "java.util.logging.Level" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Properties; import java.util.logging.Level;
import java.sql.*; import java.util.*; import java.util.logging.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
753,937
public void setConnectionCountHWMarkDate(Date connectionCountHWMarkDate) { this.connectionCountHWMarkDate = connectionCountHWMarkDate; }
void function(Date connectionCountHWMarkDate) { this.connectionCountHWMarkDate = connectionCountHWMarkDate; }
/** * Setter methode for property <code>connectionCountHWMarkDate</code>. * * @param connectionCountHWMarkDate Value for <code>connectionCountHWMarkDate</code>. */
Setter methode for property <code>connectionCountHWMarkDate</code>
setConnectionCountHWMarkDate
{ "repo_name": "lbehnke/hermesftp", "path": "src/main/java/com/apporiented/hermesftp/server/AbstractFtpServer.java", "license": "gpl-2.0", "size": 12343 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,256,787
public void clearSnapshot(String tag, String... keyspaces) throws IOException { ssProxy.clearSnapshot(tag, keyspaces); }
void function(String tag, String... keyspaces) throws IOException { ssProxy.clearSnapshot(tag, keyspaces); }
/** * Remove all the existing snapshots. */
Remove all the existing snapshots
clearSnapshot
{ "repo_name": "Bj0rnen/cassandra", "path": "src/java/org/apache/cassandra/tools/NodeProbe.java", "license": "apache-2.0", "size": 44317 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,981,365
public TimeZone getTimeZone() { return timeZone; }
TimeZone function() { return timeZone; }
/** * Returns the time zone for calendar operations. * @return time zone */
Returns the time zone for calendar operations
getTimeZone
{ "repo_name": "jackyhong/esper", "path": "esper/src/main/java/com/espertech/esper/client/ConfigurationEngineDefaults.java", "license": "gpl-2.0", "size": 69822 }
[ "java.util.TimeZone" ]
import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
2,151,700
@Test public void verifyTripling() { for (int n = 1; n < getMaxTests(); n++) { BigInteger u = seq.get(n - 1); BigInteger v = seq.get(n); BigInteger w = seq.get(n + 1); BigInteger x = TWO.multiply(v.pow(3)) .add(THREE.multiply...
void function() { for (int n = 1; n < getMaxTests(); n++) { BigInteger u = seq.get(n - 1); BigInteger v = seq.get(n); BigInteger w = seq.get(n + 1); BigInteger x = TWO.multiply(v.pow(3)) .add(THREE.multiply(v).multiply(u).multiply(w)); Assert.assertEquals(seq.get(3 * n), x); x = w.pow(3).add(THREE.multiply(w).multiply(...
/** * Verify tripling. */
Verify tripling
verifyTripling
{ "repo_name": "beargiles/projecteuler", "path": "src/test/java/com/invariantproperties/projecteuler/recurrence/FibonacciNumberTest.java", "license": "apache-2.0", "size": 7844 }
[ "java.math.BigInteger", "org.junit.Assert" ]
import java.math.BigInteger; import org.junit.Assert;
import java.math.*; import org.junit.*;
[ "java.math", "org.junit" ]
java.math; org.junit;
179,938
public static Map<String, Object> getDefaultModel() { Map<String, Object> defaultModel = new HashMap<>(); defaultModel.put("date", LocalDate.now()); defaultModel.put("userName", System.getProperty("user.name")); return defaultModel; }
static Map<String, Object> function() { Map<String, Object> defaultModel = new HashMap<>(); defaultModel.put("date", LocalDate.now()); defaultModel.put(STR, System.getProperty(STR)); return defaultModel; }
/** * Returns a default model with some already initialized key-value pairs. * Currently: * <ul> * <li>{@code date}: the current date</li> * <li>{@code userName}: the current logged in user</li> * </ul> * * @return a default template model */
Returns a default model with some already initialized key-value pairs. Currently: date: the current date userName: the current logged in user
getDefaultModel
{ "repo_name": "XillioQA/xill-platform-3.4", "path": "xill-ide-core/src/main/java/nl/xillio/migrationtool/template/Templater.java", "license": "apache-2.0", "size": 5346 }
[ "java.time.LocalDate", "java.util.HashMap", "java.util.Map" ]
import java.time.LocalDate; import java.util.HashMap; import java.util.Map;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
97,046
public final Vinterface getVinterface() { // Update the port mapping configuration. VTNPortMapConfig pmap = getPortMap(); PortMapConfig pmc = (pmap == null) ? null : pmap.toPortMapConfig(); return new VinterfaceBuilder(getInitialValue()). setPortMapConfig(pmc). ...
final Vinterface function() { VTNPortMapConfig pmap = getPortMap(); PortMapConfig pmc = (pmap == null) ? null : pmap.toPortMapConfig(); return new VinterfaceBuilder(getInitialValue()). setPortMapConfig(pmc). setVinterfaceStatus(getVinterfaceStatus()). build(); }
/** * Return the vinterface container associated with this instance. * * @return A {@link Vinterface} instance. */
Return the vinterface container associated with this instance
getVinterface
{ "repo_name": "opendaylight/vtn", "path": "manager/implementation/src/main/java/org/opendaylight/vtn/manager/internal/vnode/VInterface.java", "license": "epl-1.0", "size": 40518 }
[ "org.opendaylight.vtn.manager.internal.util.vnode.VTNPortMapConfig", "org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.mapping.port.rev150907.vtn.port.mappable.PortMapConfig", "org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.vinterface.rev150907.vtn.mappable.vinterface.list.Vinterface", "org.opendaylight.y...
import org.opendaylight.vtn.manager.internal.util.vnode.VTNPortMapConfig; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.mapping.port.rev150907.vtn.port.mappable.PortMapConfig; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.vinterface.rev150907.vtn.mappable.vinterface.list.Vinterface; import org.ope...
import org.opendaylight.vtn.manager.internal.util.vnode.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.mapping.port.rev150907.vtn.port.mappable.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.vinterface.rev150907.vtn.mappable.vinterface.list.*;
[ "org.opendaylight.vtn", "org.opendaylight.yang" ]
org.opendaylight.vtn; org.opendaylight.yang;
2,506,009
@LimitedPrivate("yarn") @Unstable public Resource getClusterResource();
@LimitedPrivate("yarn") Resource function();
/** * Get the whole resource capacity of the cluster. * @return the whole resource capacity of the cluster. */
Get the whole resource capacity of the cluster
getClusterResource
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/YarnScheduler.java", "license": "apache-2.0", "size": 12356 }
[ "org.apache.hadoop.classification.InterfaceAudience", "org.apache.hadoop.yarn.api.records.Resource" ]
import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.classification.*; import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,421,475
private boolean checkSecKeyMetadata(Format newFormat, SecondaryKeyMetadata oldMeta, SecondaryKeyMetadata newMeta, Evolver evolver) { if (oldMeta.getRelationship() != newMeta.getRelationshi...
boolean function(Format newFormat, SecondaryKeyMetadata oldMeta, SecondaryKeyMetadata newMeta, Evolver evolver) { if (oldMeta.getRelationship() != newMeta.getRelationship()) { evolver.addEvolveError (this, newFormat, STR + STR, STR + oldMeta.getKeyName() + STR + oldMeta.getRelationship() + STR + newMeta.getKeyName() + ...
/** * Checks that changes to secondary key metadata are legal. */
Checks that changes to secondary key metadata are legal
checkSecKeyMetadata
{ "repo_name": "EvilMcJerkface/jessy", "path": "lib/berkeleydb_core/src/com/sleepycat/persist/impl/ComplexFormat.java", "license": "mit", "size": 90409 }
[ "com.sleepycat.persist.model.SecondaryKeyMetadata" ]
import com.sleepycat.persist.model.SecondaryKeyMetadata;
import com.sleepycat.persist.model.*;
[ "com.sleepycat.persist" ]
com.sleepycat.persist;
2,461,498
void setPermissionsLevel(Permissions p, int level) { switch (level) { case AdminObject.PERMISSIONS_GROUP_READ: p.setGroupRead(true); break; case AdminObject.PERMISSIONS_GROUP_READ_LINK: p.setGroupRead(true); p.setGroupWrite(true); break; case AdminObject.PERMISSIONS_PUBLIC_READ: p...
void setPermissionsLevel(Permissions p, int level) { switch (level) { case AdminObject.PERMISSIONS_GROUP_READ: p.setGroupRead(true); break; case AdminObject.PERMISSIONS_GROUP_READ_LINK: p.setGroupRead(true); p.setGroupWrite(true); break; case AdminObject.PERMISSIONS_PUBLIC_READ: p.setWorldRead(true); break; case AdminO...
/** * Sets the permissions level. * * @param p The permissions of the object. * @param level The permissions to set. */
Sets the permissions level
setPermissionsLevel
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java", "license": "gpl-2.0", "size": 264705 }
[ "org.openmicroscopy.shoola.env.data.model.AdminObject" ]
import org.openmicroscopy.shoola.env.data.model.AdminObject;
import org.openmicroscopy.shoola.env.data.model.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
854,335
public void setVideoURI(Uri uri) { setVideoURI(uri, null); }
void function(Uri uri) { setVideoURI(uri, null); }
/** * Sets video URI. * * @param uri the URI of the video. */
Sets video URI
setVideoURI
{ "repo_name": "liuxu0703/AppFrame", "path": "lib_frame/src/main/java/lx/af/widget/VideoPlayTextureView.java", "license": "apache-2.0", "size": 28254 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
52,008
void addSupportedLanguage(Locale language);
void addSupportedLanguage(Locale language);
/** * Add the specified language. * * @param language * the new language */
Add the specified language
addSupportedLanguage
{ "repo_name": "shane-axiom/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/WritableContentCache.java", "license": "gpl-2.0", "size": 47509 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
302,864
protected void guaranteeStringByteBufferSize(int sizeNeeded) { if (sizeNeeded > stringByteBufferCurrentSize) { stringByteBufferCurrentSize = sizeNeeded; stringByteBuffer = ByteBuffer.allocateDirect(stringByteBufferCurrentSize); stringCharBuffer = strin...
void function(int sizeNeeded) { if (sizeNeeded > stringByteBufferCurrentSize) { stringByteBufferCurrentSize = sizeNeeded; stringByteBuffer = ByteBuffer.allocateDirect(stringByteBufferCurrentSize); stringCharBuffer = stringByteBuffer.asCharBuffer(); } if (stringByteBuffer == null) { stringByteBuffer = ByteBuffer.allocat...
/** Guarantee the size of the string byte buffer to be a minimum size. If the current * string byte buffer is not big enough, allocate a bigger one. The current buffer * will be garbage collected. * @param size the minimum size required */
Guarantee the size of the string byte buffer to be a minimum size. If the current string byte buffer is not big enough, allocate a bigger one. The current buffer will be garbage collected
guaranteeStringByteBufferSize
{ "repo_name": "kbauskar/percona-server", "path": "storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/DbImpl.java", "license": "gpl-2.0", "size": 15165 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,142,918
public GeometryMetadata createGeometryMetadata(Cursor cursor) { GeometryMetadata metadata = new GeometryMetadata(); metadata.setGeoPackageId(cursor.getLong(0)); metadata.setTableName(cursor.getString(1)); metadata.setId(cursor.getLong(2)); metadata.setMinX(cursor.getDouble(3)...
GeometryMetadata function(Cursor cursor) { GeometryMetadata metadata = new GeometryMetadata(); metadata.setGeoPackageId(cursor.getLong(0)); metadata.setTableName(cursor.getString(1)); metadata.setId(cursor.getLong(2)); metadata.setMinX(cursor.getDouble(3)); metadata.setMaxX(cursor.getDouble(4)); metadata.setMinY(cursor...
/** * Create a geometry metadata from the current cursor location * * @param cursor * @return */
Create a geometry metadata from the current cursor location
createGeometryMetadata
{ "repo_name": "boundlessgeo/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/db/metadata/GeometryMetadataDataSource.java", "license": "mit", "size": 16520 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,487,416
@Override public S hasAtLeastOneElementOfType(Class<?> expectedType) { // reuse code from object arrays as the logic is the same // (ok since this assertion don't rely on comparison strategy) ObjectArrays.instance().assertHasAtLeastOneElementOfType(info, toArray(actual), expectedType); return myself...
S function(Class<?> expectedType) { ObjectArrays.instance().assertHasAtLeastOneElementOfType(info, toArray(actual), expectedType); return myself; }
/** * Verifies that at least one element in the actual {@code Iterable} belong to the specified type (matching includes * subclasses of the given type). * <p/> * Example: * <pre><code class='java'> List&lt;Number&gt; numbers = new ArrayList&lt;Number&gt;(); * numbers.add(1); * numbers.add(2L); *...
Verifies that at least one element in the actual Iterable belong to the specified type (matching includes subclasses of the given type). Example: <code> List&lt;Number&gt; numbers = new ArrayList&lt;Number&gt;(); numbers.add(1); numbers.add(2L); successful assertion: assertThat(numbers).hasAtLeastOneElementOfType(Long....
hasAtLeastOneElementOfType
{ "repo_name": "lpandzic/assertj-core", "path": "src/main/java/org/assertj/core/api/AbstractIterableAssert.java", "license": "apache-2.0", "size": 64345 }
[ "org.assertj.core.internal.ObjectArrays", "org.assertj.core.util.IterableUtil" ]
import org.assertj.core.internal.ObjectArrays; import org.assertj.core.util.IterableUtil;
import org.assertj.core.internal.*; import org.assertj.core.util.*;
[ "org.assertj.core" ]
org.assertj.core;
1,458,521
EReference getHDEL_PhsCAHar();
EReference getHDEL_PhsCAHar();
/** * Returns the meta object for the reference '{@link gluemodel.substationStandard.Dataclasses.HDEL#getPhsCAHar <em>Phs CA Har</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Phs CA Har</em>'. * @see gluemodel.substationStandard.Dataclasses.HDEL#get...
Returns the meta object for the reference '<code>gluemodel.substationStandard.Dataclasses.HDEL#getPhsCAHar Phs CA Har</code>'.
getHDEL_PhsCAHar
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/Dataclasses/DataclassesPackage.java", "license": "mit", "size": 381891 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,297,773
public static void downloadIfExist(Integer iconKey, String iconName, HttpServletRequest request, HttpServletResponse reponse, boolean inline) { byte[] imageContent = null; if (iconKey!=null) { TBLOBBean blobBean = loadByPrimaryKey(iconKey); if (blobBean != null) { imageContent = blobBean.getBLOBV...
static void function(Integer iconKey, String iconName, HttpServletRequest request, HttpServletResponse reponse, boolean inline) { byte[] imageContent = null; if (iconKey!=null) { TBLOBBean blobBean = loadByPrimaryKey(iconKey); if (blobBean != null) { imageContent = blobBean.getBLOBValue(); } } if (imageContent != null)...
/** * Download the icon if exists * @param iconKey * @param iconName * @param request * @param reponse * @param inline */
Download the icon if exists
downloadIfExist
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/admin/customize/lists/BlobBL.java", "license": "gpl-3.0", "size": 11817 }
[ "com.aurel.track.beans.TBLOBBean", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import com.aurel.track.beans.TBLOBBean; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.aurel.track.beans.*; import javax.servlet.http.*;
[ "com.aurel.track", "javax.servlet" ]
com.aurel.track; javax.servlet;
1,726,697
Future<WebSiteOperationStatusResponse> beginSwappingSlotsAsync(String webSpaceName, String webSiteName, String sourceSlotName, String targetSlotName);
Future<WebSiteOperationStatusResponse> beginSwappingSlotsAsync(String webSpaceName, String webSiteName, String sourceSlotName, String targetSlotName);
/** * You can swap a web site from one slot to another slot. * * @param webSpaceName Required. The name of the web space. * @param webSiteName Required. The name of the web site. * @param sourceSlotName Required. The name of the first web site slot to * swap (source). * @param targetSlotName...
You can swap a web site from one slot to another slot
beginSwappingSlotsAsync
{ "repo_name": "manikandan-palaniappan/azure-sdk-for-java", "path": "management-websites/src/main/java/com/microsoft/windowsazure/management/websites/WebSiteOperations.java", "license": "apache-2.0", "size": 51140 }
[ "com.microsoft.windowsazure.management.websites.models.WebSiteOperationStatusResponse", "java.util.concurrent.Future" ]
import com.microsoft.windowsazure.management.websites.models.WebSiteOperationStatusResponse; import java.util.concurrent.Future;
import com.microsoft.windowsazure.management.websites.models.*; import java.util.concurrent.*;
[ "com.microsoft.windowsazure", "java.util" ]
com.microsoft.windowsazure; java.util;
795,012
@Test void testGetLong_pos8LE() throws CTFException { fixture.position(8); fixture.setByteOrder(ByteOrder.LITTLE_ENDIAN); long result = fixture.getLong(); assertEquals(0x0807060504030201L, result); }
void testGetLong_pos8LE() throws CTFException { fixture.position(8); fixture.setByteOrder(ByteOrder.LITTLE_ENDIAN); long result = fixture.getLong(); assertEquals(0x0807060504030201L, result); }
/** * Test {@link BitBuffer#getLong} with a little-endian buffer at pos 8. * * @throws CTFException * error */
Test <code>BitBuffer#getLong</code> with a little-endian buffer at pos 8
testGetLong_pos8LE
{ "repo_name": "lttng/lttng-scope", "path": "ctfreader/src/test/java/org/eclipse/tracecompass/ctf/core/tests/io/BitBufferIntTest.java", "license": "epl-1.0", "size": 15329 }
[ "java.nio.ByteOrder", "org.eclipse.tracecompass.ctf.core.CTFException", "org.junit.jupiter.api.Assertions" ]
import java.nio.ByteOrder; import org.eclipse.tracecompass.ctf.core.CTFException; import org.junit.jupiter.api.Assertions;
import java.nio.*; import org.eclipse.tracecompass.ctf.core.*; import org.junit.jupiter.api.*;
[ "java.nio", "org.eclipse.tracecompass", "org.junit.jupiter" ]
java.nio; org.eclipse.tracecompass; org.junit.jupiter;
143,144
@TargetApi(Build.VERSION_CODES.M) private Notification getBackgroundFetchNotification(String expectedTitle) { StatusBarNotification notifications[] = ((NotificationManager) mActivity.getApplicationContext().getSystemService( Context.NOTIFICATION_SERVICE)) ...
@TargetApi(Build.VERSION_CODES.M) Notification function(String expectedTitle) { StatusBarNotification notifications[] = ((NotificationManager) mActivity.getApplicationContext().getSystemService( Context.NOTIFICATION_SERVICE)) .getActiveNotifications(); for (StatusBarNotification statusBarNotification : notifications) {...
/** * Retrieves the first active background fetch notification it finds, or null if none exists. * * * {@link NotificationManager#getActiveNotifications()} is only available from M. * * @param expectedTitle The title of the notification in question, or null if any notification * ...
Retrieves the first active background fetch notification it finds, or null if none exists. <code>NotificationManager#getActiveNotifications()</code> is only available from M
getBackgroundFetchNotification
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/BackgroundFetchTest.java", "license": "bsd-3-clause", "size": 5646 }
[ "android.annotation.TargetApi", "android.app.Notification", "android.app.NotificationManager", "android.content.Context", "android.os.Build", "android.service.notification.StatusBarNotification" ]
import android.annotation.TargetApi; import android.app.Notification; import android.app.NotificationManager; import android.content.Context; import android.os.Build; import android.service.notification.StatusBarNotification;
import android.annotation.*; import android.app.*; import android.content.*; import android.os.*; import android.service.notification.*;
[ "android.annotation", "android.app", "android.content", "android.os", "android.service" ]
android.annotation; android.app; android.content; android.os; android.service;
1,021,519
public static <T> List<T> filter( Iterable<?> base, Class<T> type ) { List<T> r = new ArrayList<T>(); for (Object i : base) { if(type.isInstance(i)) r.add(type.cast(i)); } return r; }
static <T> List<T> function( Iterable<?> base, Class<T> type ) { List<T> r = new ArrayList<T>(); for (Object i : base) { if(type.isInstance(i)) r.add(type.cast(i)); } return r; }
/** * Creates a filtered sublist. * @since 1.176 */
Creates a filtered sublist
filter
{ "repo_name": "stefanbrausch/hudson-main", "path": "core/src/main/java/hudson/Util.java", "license": "mit", "size": 42243 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,593,425
private void convertImage(Path sourceImagePath, Path destImagePath, int size) throws IOException, InterruptedException { String geometry = null; if (Files.exists(destImagePath)) { FileTime modtime1 = Files.getLastModifiedTime(sourceImagePath); FileTime modtime2 ...
void function(Path sourceImagePath, Path destImagePath, int size) throws IOException, InterruptedException { String geometry = null; if (Files.exists(destImagePath)) { FileTime modtime1 = Files.getLastModifiedTime(sourceImagePath); FileTime modtime2 = Files.getLastModifiedTime(destImagePath); if (modtime1.compareTo(mod...
/** * Uses a Runtime.exec()to use imagemagick to perform the given conversion * operation. Returns true on success, false on failure. Does not check if * either file exists. */
Uses a Runtime.exec()to use imagemagick to perform the given conversion operation. Returns true on success, false on failure. Does not check if either file exists
convertImage
{ "repo_name": "am0e/suonos", "path": "src/main/suonos/imagems/Imagems.java", "license": "apache-2.0", "size": 3998 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "java.nio.file.attribute.FileTime" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.FileTime;
import java.io.*; import java.nio.file.*; import java.nio.file.attribute.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,514,928
@Test @SmallTest @MinAndroidSdkLevel(Build.VERSION_CODES.O) @TargetApi(Build.VERSION_CODES.O) public void testNodeInfo_extraDataAdded_characterLocations() { setupTestWithHTML("<h1>Simple test page</h1><section><p>Text</p></section>"); // Wait until we find a node in the accessibilit...
@MinAndroidSdkLevel(Build.VERSION_CODES.O) @TargetApi(Build.VERSION_CODES.O) void function() { setupTestWithHTML(STR); int textNodeVirtualViewId = waitForNodeMatching(sTextMatcher, "Text"); mNodeInfo = createAccessibilityNodeInfo(textNodeVirtualViewId); Assert.assertNotNull(NODE_TIMEOUT_ERROR, mNodeInfo); final Bundle ...
/** * Test |AccessibilityNodeInfo| object for character bounds for a node in Android O. */
Test |AccessibilityNodeInfo| object for character bounds for a node in Android O
testNodeInfo_extraDataAdded_characterLocations
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/content/public/android/javatests/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityTest.java", "license": "bsd-3-clause", "size": 108058 }
[ "android.annotation.TargetApi", "android.graphics.RectF", "android.os.Build", "android.os.Bundle", "android.view.accessibility.AccessibilityNodeInfo", "org.chromium.base.test.util.Criteria", "org.chromium.base.test.util.CriteriaHelper", "org.chromium.base.test.util.MinAndroidSdkLevel", "org.chromium...
import android.annotation.TargetApi; import android.graphics.RectF; import android.os.Build; import android.os.Bundle; import android.view.accessibility.AccessibilityNodeInfo; import org.chromium.base.test.util.Criteria; import org.chromium.base.test.util.CriteriaHelper; import org.chromium.base.test.util.MinAndroidSdk...
import android.annotation.*; import android.graphics.*; import android.os.*; import android.view.accessibility.*; import org.chromium.base.test.util.*; import org.chromium.content_public.browser.test.util.*; import org.hamcrest.*; import org.junit.*;
[ "android.annotation", "android.graphics", "android.os", "android.view", "org.chromium.base", "org.chromium.content_public", "org.hamcrest", "org.junit" ]
android.annotation; android.graphics; android.os; android.view; org.chromium.base; org.chromium.content_public; org.hamcrest; org.junit;
346,143
protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata) { super.initState(state, portlet, rundata); // // setup the observer to notify our main panel // if (state.getAttribute(STATE_OBSERVER) == null) // { // // the delivery location for this tool // String delive...
void function(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata) { super.initState(state, portlet, rundata); }
/** * Populate the state object, if needed. */
Populate the state object, if needed
initState
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "authz/authz-tool/tool/src/java/org/sakaiproject/authz/tool/RealmsAction.java", "license": "apache-2.0", "size": 44395 }
[ "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.VelocityPortlet", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
1,418,482
@Override public synchronized void truncateBpulseRQByTableIndex(int tableIndex) throws Exception{ String deleteQuery = "TRUNCATE TABLE BPULSE_PULSESRQ_" + tableIndex; Connection conn; long initTime = Calendar.getInstance().getTimeInMillis(); try { conn = connectionPool.getConnection(); PreparedStateme...
synchronized void function(int tableIndex) throws Exception{ String deleteQuery = STR + tableIndex; Connection conn; long initTime = Calendar.getInstance().getTimeInMillis(); try { conn = connectionPool.getConnection(); PreparedStatement deletePreparedStatement = null; deletePreparedStatement = conn.prepareStatement(de...
/** * Method that performs the deletion of the associated pulsesRQ to the selected key. * @param pKey The pulses key. */
Method that performs the deletion of the associated pulsesRQ to the selected key
truncateBpulseRQByTableIndex
{ "repo_name": "bpulse/bpulse-sdk-java", "path": "src/main/java/me/bpulse/java/client/pulsesrepository/H2PulsesRepository.java", "license": "apache-2.0", "size": 22218 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.Calendar" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Calendar;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,291,083
public SnapshotRequest masterNodeTimeout(TimeValue masterNodeTimeout) { this.masterNodeTimeout = masterNodeTimeout; return this; }
SnapshotRequest function(TimeValue masterNodeTimeout) { this.masterNodeTimeout = masterNodeTimeout; return this; }
/** * Sets master node timeout * * @param masterNodeTimeout master node timeout * @return this request */
Sets master node timeout
masterNodeTimeout
{ "repo_name": "wangtuo/elasticsearch", "path": "core/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java", "license": "apache-2.0", "size": 86285 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
112,370
private void removeUnauthorizedData(List aList, Boolean isAuthorisedUser, Boolean hasPrivilegeOnIdentifiedData, List identifiedColumnIdentifiers, List objectColumnIdentifiers, boolean isSimpleSearch) { if (isAuthorisedUser) { //If user is not authorized to see identified data //then replace i...
void function(List aList, Boolean isAuthorisedUser, Boolean hasPrivilegeOnIdentifiedData, List identifiedColumnIdentifiers, List objectColumnIdentifiers, boolean isSimpleSearch) { if (isAuthorisedUser) { if (!hasPrivilegeOnIdentifiedData) { removeUnauthorizedFieldsData(aList, identifiedColumnIdentifiers, objectColumnId...
/** * This method will internally call removeUnauthorizedFieldsData * depending on the value of isAuthorisedUser and hasPrivilegeOnIdentifiedData. * @param aList List of records * @param isAuthorisedUser to specify if the user is authorized to view the results * @param hasPrivilegeOnIdentifiedData to spe...
This method will internally call removeUnauthorizedFieldsData depending on the value of isAuthorisedUser and hasPrivilegeOnIdentifiedData
removeUnauthorizedData
{ "repo_name": "NCIP/catissue-advanced-query", "path": "software/AdvancedQuery/src/main/java/edu/wustl/query/security/QueryCsmCacheManager.java", "license": "bsd-3-clause", "size": 45241 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,328,387
public DateTime getTimestamp() { return timestamp; }
DateTime function() { return timestamp; }
/** * The timestamp that the event was published from the client to sidecar * * @return yyyy-MM-ddThh:mm:ssZ -- A date-time with a time-zone in the ISO-8601 calendar format */
The timestamp that the event was published from the client to sidecar
getTimestamp
{ "repo_name": "sidecar-io/sidecar-java-sdk", "path": "model/src/main/java/io/sidecar/event/Event.java", "license": "apache-2.0", "size": 10634 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,509,341
public ServiceFuture<Void> updateSecretAsync(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateSecretWithServiceResponseAsync(accountName, datab...
ServiceFuture<Void> function(String accountName, String databaseName, String secretName, DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateSecretWithServiceResponseAsync(accountName, databaseName, secretName, paramet...
/** * Modifies the specified secret for use with external data sources in the specified database. This is deprecated and will be removed in the next release. Please use UpdateCredential instead. * * @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations. * ...
Modifies the specified secret for use with external data sources in the specified database. This is deprecated and will be removed in the next release. Please use UpdateCredential instead
updateSecretAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java", "license": "mit", "size": 474209 }
[ "com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsCatalogSecretCreateOrUpdateParameters; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,914,504
public List<Aoi> fetchByCode(String... values) { return fetch(AoiTable.AOI.CODE, values); }
List<Aoi> function(String... values) { return fetch(AoiTable.AOI.CODE, values); }
/** * Fetch records that have <code>code IN (values)</code> */
Fetch records that have <code>code IN (values)</code>
fetchByCode
{ "repo_name": "openforis/calc", "path": "calc-core/src/generated/java/org/openforis/calc/persistence/jooq/tables/daos/AoiDao.java", "license": "mit", "size": 2804 }
[ "java.util.List", "org.openforis.calc.metadata.Aoi", "org.openforis.calc.persistence.jooq.tables.AoiTable" ]
import java.util.List; import org.openforis.calc.metadata.Aoi; import org.openforis.calc.persistence.jooq.tables.AoiTable;
import java.util.*; import org.openforis.calc.metadata.*; import org.openforis.calc.persistence.jooq.tables.*;
[ "java.util", "org.openforis.calc" ]
java.util; org.openforis.calc;
383,503