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
@RDF(Constants.NS_SIOC+"has_reply") public LinkedList<ContentItem> getComments();
@RDF(Constants.NS_SIOC+STR) LinkedList<ContentItem> function();
/** * The content items that are comments for this point of interest. Maps to sioc:has_reply * of the SIOC ontology in the triple store. * * @return */
The content items that are comments for this point of interest. Maps to sioc:has_reply of the SIOC ontology in the triple store
getComments
{ "repo_name": "fregaham/KiWi", "path": "src/action/kiwi/service/importexport/importer/rss/POI.java", "license": "bsd-3-clause", "size": 4138 }
[ "java.util.LinkedList", "kiwi.model.Constants", "kiwi.model.content.ContentItem" ]
import java.util.LinkedList; import kiwi.model.Constants; import kiwi.model.content.ContentItem;
import java.util.*; import kiwi.model.*; import kiwi.model.content.*;
[ "java.util", "kiwi.model", "kiwi.model.content" ]
java.util; kiwi.model; kiwi.model.content;
1,635,190
Promise<GitHubRepositoryList> getForks(String user, String repository); /** * Fork the given repository for the authorized user. * * @param user * the owner of the repository to fork. * @param repository * the repository name. * @param callback * ...
Promise<GitHubRepositoryList> getForks(String user, String repository); /** * Fork the given repository for the authorized user. * * @param user * the owner of the repository to fork. * @param repository * the repository name. * @param callback * callback called when operation is done. * @deprecated use {@link #fork(St...
/** * Get list of forks for given repository * * @param user * the owner of the repository. * @param repository * the repository name. */
Get list of forks for given repository
getForks
{ "repo_name": "gazarenkov/che-sketch", "path": "plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubClientService.java", "license": "epl-1.0", "size": 10589 }
[ "org.eclipse.che.api.promises.client.Promise", "org.eclipse.che.plugin.github.shared.GitHubRepositoryList" ]
import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.plugin.github.shared.GitHubRepositoryList;
import org.eclipse.che.api.promises.client.*; import org.eclipse.che.plugin.github.shared.*;
[ "org.eclipse.che" ]
org.eclipse.che;
2,047,112
@Override public void invalidateInputs(Iterable<RuleKeyInput> inputs) { List<Iterable<Object>> nodes = new ArrayList<>(); for (RuleKeyInput input : inputs) { LOG.verbose("invalidating input %s", input); Iterable<Object> inputNodes = inputsIndex.remove(input); if (inputNodes != null) { ...
void function(Iterable<RuleKeyInput> inputs) { List<Iterable<Object>> nodes = new ArrayList<>(); for (RuleKeyInput input : inputs) { LOG.verbose(STR, input); Iterable<Object> inputNodes = inputsIndex.remove(input); if (inputNodes != null) { nodes.add(inputNodes); } } if (!nodes.isEmpty()) { invalidateNodes(Iterables.co...
/** * Invalidate the given inputs and all their transitive dependents. */
Invalidate the given inputs and all their transitive dependents
invalidateInputs
{ "repo_name": "vschs007/buck", "path": "src/com/facebook/buck/rules/keys/DefaultRuleKeyCache.java", "license": "apache-2.0", "size": 10271 }
[ "com.google.common.collect.Iterables", "java.util.ArrayList", "java.util.List" ]
import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
52,590
private void testDeleteTransientAlreadyDeleted(@Nullable final JobID jobId) throws IOException { final Configuration config = new Configuration(); config.setString(BlobServerOptions.STORAGE_DIRECTORY, temporaryFolder.newFolder().getAbsolutePath()); try (BlobServer server = new BlobServer(config, new VoidBlob...
void function(@Nullable final JobID jobId) throws IOException { final Configuration config = new Configuration(); config.setString(BlobServerOptions.STORAGE_DIRECTORY, temporaryFolder.newFolder().getAbsolutePath()); try (BlobServer server = new BlobServer(config, new VoidBlobStore())) { server.start(); byte[] data = ne...
/** * Uploads a byte array for the given job and verifies that deleting it (via the {@link * BlobServer}) does not fail independent of whether the file exists. * * @param jobId * job id */
Uploads a byte array for the given job and verifies that deleting it (via the <code>BlobServer</code>) does not fail independent of whether the file exists
testDeleteTransientAlreadyDeleted
{ "repo_name": "haohui/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerDeleteTest.java", "license": "apache-2.0", "size": 13292 }
[ "java.io.File", "java.io.IOException", "javax.annotation.Nullable", "org.apache.flink.api.common.JobID", "org.apache.flink.configuration.BlobServerOptions", "org.apache.flink.configuration.Configuration", "org.apache.flink.runtime.blob.BlobServerGetTest", "org.apache.flink.runtime.blob.BlobServerPutTe...
import java.io.File; import java.io.IOException; import javax.annotation.Nullable; import org.apache.flink.api.common.JobID; import org.apache.flink.configuration.BlobServerOptions; import org.apache.flink.configuration.Configuration; import org.apache.flink.runtime.blob.BlobServerGetTest; import org.apache.flink.runti...
import java.io.*; import javax.annotation.*; import org.apache.flink.api.common.*; import org.apache.flink.configuration.*; import org.apache.flink.runtime.blob.*; import org.junit.*;
[ "java.io", "javax.annotation", "org.apache.flink", "org.junit" ]
java.io; javax.annotation; org.apache.flink; org.junit;
718,577
private void writeFile(String filename, List<RegionInfo> movedRegions) throws IOException { try (DataOutputStream dos = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(filename)))) { dos.writeInt(movedRegions.size()); for (RegionInfo region : movedRegions) { Bytes.w...
void function(String filename, List<RegionInfo> movedRegions) throws IOException { try (DataOutputStream dos = new DataOutputStream( new BufferedOutputStream(new FileOutputStream(filename)))) { dos.writeInt(movedRegions.size()); for (RegionInfo region : movedRegions) { Bytes.writeByteArray(dos, RegionInfo.toByteArray(r...
/** * Write the number of regions moved in the first line followed by regions moved in subsequent * lines */
Write the number of regions moved in the first line followed by regions moved in subsequent lines
writeFile
{ "repo_name": "ultratendency/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java", "license": "apache-2.0", "size": 30194 }
[ "java.io.BufferedOutputStream", "java.io.DataOutputStream", "java.io.FileOutputStream", "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.client.RegionInfo" ]
import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.client.RegionInfo;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,031,729
@RequestMapping(value = "/events/read", method = RequestMethod.POST) @ResponseBody public ResultData readEvent(@RequestParam(value = "id") Long id) { ResultData result = new ResultData(); Event event = eventSrv.getById(id); event.setUnread(false); eventSrv.save(event); ...
@RequestMapping(value = STR, method = RequestMethod.POST) ResultData function(@RequestParam(value = "id") Long id) { ResultData result = new ResultData(); Event event = eventSrv.getById(id); event.setUnread(false); eventSrv.save(event); result.code = ResultData.Code.OK; return result; }
/** * Sets event with id as read * * @param id * @return */
Sets event with id as read
readEvent
{ "repo_name": "q-programming/tasq", "path": "src/main/java/com/qprogramming/tasq/events/EventsController.java", "license": "gpl-2.0", "size": 4211 }
[ "com.qprogramming.tasq.support.ResultData", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.bind.annotation.RequestParam" ]
import com.qprogramming.tasq.support.ResultData; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam;
import com.qprogramming.tasq.support.*; import org.springframework.web.bind.annotation.*;
[ "com.qprogramming.tasq", "org.springframework.web" ]
com.qprogramming.tasq; org.springframework.web;
1,169,624
public JdbcType getJdbcType() { return jdbcType; }
JdbcType function() { return jdbcType; }
/** * Used in the UnknownTypeHandler in case there is no handler for the property type * @return */
Used in the UnknownTypeHandler in case there is no handler for the property type
getJdbcType
{ "repo_name": "ht5678/framework_personal", "path": "mybatis/src/main/java/org/apache/ibatis/mapping/ParameterMapping.java", "license": "apache-2.0", "size": 6938 }
[ "org.apache.ibatis.type.JdbcType" ]
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.*;
[ "org.apache.ibatis" ]
org.apache.ibatis;
888,566
public static void setConnectionLocal(IConnection connection) { if (log.isDebugEnabled()) { log.debug("Set connection: {} with thread: {}", (connection != null ? connection.getSessionId() : null), Thread.currentThread().getName()); try { StackTraceElement[] stackTrace...
static void function(IConnection connection) { if (log.isDebugEnabled()) { log.debug(STR, (connection != null ? connection.getSessionId() : null), Thread.currentThread().getName()); try { StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); StackTraceElement stackTraceElement = stackTraceEle...
/** * Setter for connection * * @param connection * Thread local connection */
Setter for connection
setConnectionLocal
{ "repo_name": "Red5/red5-server-common", "path": "src/main/java/org/red5/server/api/Red5.java", "license": "apache-2.0", "size": 8107 }
[ "java.lang.ref.WeakReference", "org.red5.server.api.scope.IScope" ]
import java.lang.ref.WeakReference; import org.red5.server.api.scope.IScope;
import java.lang.ref.*; import org.red5.server.api.scope.*;
[ "java.lang", "org.red5.server" ]
java.lang; org.red5.server;
1,557,734
Object objLogin = request.getSession().getAttribute(Context.USUARIO_LOGADO); Usuario login = null; if(objLogin != null){ login = (Usuario)objLogin; } if(login != null){ try { String fileName = request.getParameter("fileName"); ...
Object objLogin = request.getSession().getAttribute(Context.USUARIO_LOGADO); Usuario login = null; if(objLogin != null){ login = (Usuario)objLogin; } if(login != null){ try { String fileName = request.getParameter(STR); String contentType = request.getParameter(STR); File file = null; if(!StringHelper.isEmpty(fileName)...
/** * Processes requests for both HTTP * <code>GET</code> and * <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "dsalinux/web-ifad", "path": "src/main/java/br/edu/ifnmg/ifad/view/FileServlet.java", "license": "apache-2.0", "size": 4293 }
[ "br.edu.ifnmg.ifad.entity.Usuario", "br.edu.ifnmg.ifad.util.Context", "br.edu.ifnmg.ifad.util.FileUtil", "br.edu.ifnmg.ifad.util.StringHelper", "java.io.File", "java.io.IOException", "java.text.SimpleDateFormat", "java.util.Calendar", "java.util.logging.Level", "java.util.logging.Logger" ]
import br.edu.ifnmg.ifad.entity.Usuario; import br.edu.ifnmg.ifad.util.Context; import br.edu.ifnmg.ifad.util.FileUtil; import br.edu.ifnmg.ifad.util.StringHelper; import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.logging.Level; import java.u...
import br.edu.ifnmg.ifad.entity.*; import br.edu.ifnmg.ifad.util.*; import java.io.*; import java.text.*; import java.util.*; import java.util.logging.*;
[ "br.edu.ifnmg", "java.io", "java.text", "java.util" ]
br.edu.ifnmg; java.io; java.text; java.util;
757,270
public Collection ejbFindAllUsers() throws FinderException { // use where not because DELETED = NULL means also not deleted // select * from ic_user where deleted != 'Y' SelectQuery query = idoSelectQuery(); MatchCriteria c1 = new MatchCriteria(idoQueryTable(),getColumnNameDeleted(),MatchCriteria.EQUALS,Ge...
Collection function() throws FinderException { SelectQuery query = idoSelectQuery(); MatchCriteria c1 = new MatchCriteria(idoQueryTable(),getColumnNameDeleted(),MatchCriteria.EQUALS,GenericEntity.COLUMN_VALUE_FALSE,true); MatchCriteria c2 = new MatchCriteria(new Column(idoQueryTable(),getColumnNameDeleted()), false); q...
/** Gets all users that are not marked as deleted * * @return Collection * @throws FinderException */
Gets all users that are not marked as deleted
ejbFindAllUsers
{ "repo_name": "grimurjonsson/com.idega.core", "path": "src/java/com/idega/user/data/UserBMPBean.java", "license": "gpl-3.0", "size": 102071 }
[ "com.idega.data.GenericEntity", "com.idega.data.query.Column", "com.idega.data.query.MatchCriteria", "com.idega.data.query.SelectQuery", "java.util.Collection", "javax.ejb.FinderException" ]
import com.idega.data.GenericEntity; import com.idega.data.query.Column; import com.idega.data.query.MatchCriteria; import com.idega.data.query.SelectQuery; import java.util.Collection; import javax.ejb.FinderException;
import com.idega.data.*; import com.idega.data.query.*; import java.util.*; import javax.ejb.*;
[ "com.idega.data", "java.util", "javax.ejb" ]
com.idega.data; java.util; javax.ejb;
704,111
public @Nullable WindowAndMediaPeriodId getLoadingMediaPeriod() { return activeMediaPeriods.isEmpty() ? null : activeMediaPeriods.get(activeMediaPeriods.size() - 1); }
@Nullable WindowAndMediaPeriodId function() { return activeMediaPeriods.isEmpty() ? null : activeMediaPeriods.get(activeMediaPeriods.size() - 1); }
/** * Returns the {@link MediaPeriodId} of the media period at the end of the queue which is * currently loading or will be the next one loading. May be null, if no media period is active * yet. */
Returns the <code>MediaPeriodId</code> of the media period at the end of the queue which is currently loading or will be the next one loading. May be null, if no media period is active yet
getLoadingMediaPeriod
{ "repo_name": "tntcrowd/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java", "license": "apache-2.0", "size": 30145 }
[ "android.support.annotation.Nullable" ]
import android.support.annotation.Nullable;
import android.support.annotation.*;
[ "android.support" ]
android.support;
2,798,369
public static void writeMp3(Score score, OutputStream stream) throws IOException { //look if LAME is installed try { Runtime.getRuntime().exec("lame"); } catch (Exception ex) { handle(Companion.warning(Lang.get(Voc.CouldNotFindLAME, Zong.INSTANCE.getWebsite() + "/lame"))); } //save temporary WAVE f...
static void function(Score score, OutputStream stream) throws IOException { try { Runtime.getRuntime().exec("lame"); } catch (Exception ex) { handle(Companion.warning(Lang.get(Voc.CouldNotFindLAME, Zong.INSTANCE.getWebsite() + "/lame"))); } File tempWAVFile = File.createTempFile(Mp3ScoreFileOutput.class.getName(), ".wa...
/** * Writes the given score as a MP3 into the given stream. */
Writes the given score as a MP3 into the given stream
writeMp3
{ "repo_name": "Xenoage/Zong", "path": "desktop/src/com/xenoage/zong/desktop/io/mp3/out/Mp3ScoreFileOutput.java", "license": "agpl-3.0", "size": 2746 }
[ "com.xenoage.utils.error.Err", "com.xenoage.utils.io.OutputStream", "com.xenoage.utils.jse.io.JseFileUtils", "com.xenoage.utils.jse.io.JseOutputStream", "com.xenoage.utils.lang.Lang", "com.xenoage.utils.log.Report", "com.xenoage.zong.Voc", "com.xenoage.zong.Zong", "com.xenoage.zong.core.Score", "c...
import com.xenoage.utils.error.Err; import com.xenoage.utils.io.OutputStream; import com.xenoage.utils.jse.io.JseFileUtils; import com.xenoage.utils.jse.io.JseOutputStream; import com.xenoage.utils.lang.Lang; import com.xenoage.utils.log.Report; import com.xenoage.zong.Voc; import com.xenoage.zong.Zong; import com.xeno...
import com.xenoage.utils.error.*; import com.xenoage.utils.io.*; import com.xenoage.utils.jse.io.*; import com.xenoage.utils.lang.*; import com.xenoage.utils.log.*; import com.xenoage.zong.*; import com.xenoage.zong.core.*; import com.xenoage.zong.desktop.io.wav.out.*; import java.io.*;
[ "com.xenoage.utils", "com.xenoage.zong", "java.io" ]
com.xenoage.utils; com.xenoage.zong; java.io;
1,412,179
protected String build_instructor_view_assignment_context(VelocityPortlet portlet, Context context, RunData data, SessionState state) { context.put("tlang", rb); String assignmentId = (String) state.getAttribute(VIEW_ASSIGNMENT_ID); Assignment assignment = getAssignment(assignmentId, "build_instructor_v...
String function(VelocityPortlet portlet, Context context, RunData data, SessionState state) { context.put("tlang", rb); String assignmentId = (String) state.getAttribute(VIEW_ASSIGNMENT_ID); Assignment assignment = getAssignment(assignmentId, STR, state); if (assignment != null) { context.put(STR, assignment); assignme...
/** * build the instructor view of an assignment */
build the instructor view of an assignment
build_instructor_view_assignment_context
{ "repo_name": "tl-its-umich-edu/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 671846 }
[ "java.util.ArrayList", "java.util.List", "org.sakaiproject.assignment.api.Assignment", "org.sakaiproject.assignment.taggable.api.AssignmentActivityProducer", "org.sakaiproject.assignment.taggable.tool.DecoratedTaggingProvider", "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.RunData", ...
import java.util.ArrayList; import java.util.List; import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.assignment.taggable.api.AssignmentActivityProducer; import org.sakaiproject.assignment.taggable.tool.DecoratedTaggingProvider; import org.sakaiproject.cheftool.Context; import org.sakaiproject.c...
import java.util.*; import org.sakaiproject.assignment.api.*; import org.sakaiproject.assignment.taggable.api.*; import org.sakaiproject.assignment.taggable.tool.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.taggable.api.*;...
[ "java.util", "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.component", "org.sakaiproject.event", "org.sakaiproject.taggable", "org.sakaiproject.time", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.taggable; org.sakaiproject.time; org.sakaiproject.tool;
908,987
private static ArrayList<IsomorphicGraphMapping<Integer, DefaultEdge>> getMatchings(Graph<Integer, DefaultEdge> g1, Graph<Integer, DefaultEdge> g2) { int n1 = g1.vertexSet().size(), n2 = g2.vertexSet().size(); GraphOrdering<Integer, Default...
static ArrayList<IsomorphicGraphMapping<Integer, DefaultEdge>> function(Graph<Integer, DefaultEdge> g1, Graph<Integer, DefaultEdge> g2) { int n1 = g1.vertexSet().size(), n2 = g2.vertexSet().size(); GraphOrdering<Integer, DefaultEdge> g1o = new GraphOrdering<Integer, DefaultEdge>(g1), g2o = new GraphOrdering<Integer, De...
/** * Assuming g1 and g2 have vertexes labeled with 0, 1, ... * No semantic check is done. * * @param g1 first Graph * @param g2 second Graph, smaller or equal to g1 * @return */
Assuming g1 and g2 have vertexes labeled with 0, 1, ... No semantic check is done
getMatchings
{ "repo_name": "arcanefoam/jgrapht", "path": "jgrapht-core/src/test/java/org/jgrapht/alg/isomorphism/SubgraphIsomorphismTestUtils.java", "license": "epl-1.0", "size": 10726 }
[ "java.util.ArrayList", "java.util.Arrays", "org.jgrapht.Graph", "org.jgrapht.graph.DefaultEdge" ]
import java.util.ArrayList; import java.util.Arrays; import org.jgrapht.Graph; import org.jgrapht.graph.DefaultEdge;
import java.util.*; import org.jgrapht.*; import org.jgrapht.graph.*;
[ "java.util", "org.jgrapht", "org.jgrapht.graph" ]
java.util; org.jgrapht; org.jgrapht.graph;
405,078
public void testUpload() { setScriptingEnabled(false); beginAt("/org.melati.test.ConfigServletTest"); assertTextPresent("FormDataAdaptorFactory"); assertTextPresent("org.melati.servlet.MemoryFormDataAdaptorFactory"); assertTrue("Cannot find file src/main/java/org/melati/admin/static/file.gif", ...
void function() { setScriptingEnabled(false); beginAt(STR); assertTextPresent(STR); assertTextPresent(STR); assertTrue(STR, new File(STR).exists()); setTextField("file",STR); submit(); assertWindowPresent(STR); assertTrue(STR, new File(STR).exists()); setTextField("file",STR); submit(); gotoWindow(STR); assertTextPrese...
/** * Fill and click upload. */
Fill and click upload
testUpload
{ "repo_name": "timp21337/Melati", "path": "melati/src/test/java/org/melati/test/test/ConfigServletTestTest.java", "license": "gpl-2.0", "size": 3924 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,532,925
@Test public void test4PutaMultipleAndListen() throws Exception { // SETUP MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); RemoteCacheAttributes attributes = new RemoteCacheAttributes(); attributes.setRemoteHost("localho...
void function() throws Exception { MockCompositeCacheManager compositeCacheManager = new MockCompositeCacheManager(); RemoteCacheAttributes attributes = new RemoteCacheAttributes(); attributes.setRemoteHost(STR); attributes.setLocalPort(1202); attributes.setRemotePort(remotePort); RemoteCacheManager remoteCacheManager ...
/** * Register a listener with the server. Send an update. Verify that the listener received it. * * @throws Exception */
Register a listener with the server. Send an update. Verify that the listener received it
test4PutaMultipleAndListen
{ "repo_name": "mohanaraosv/commons-jcs", "path": "commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java", "license": "apache-2.0", "size": 13273 }
[ "org.apache.commons.jcs.auxiliary.AuxiliaryCache", "org.apache.commons.jcs.auxiliary.MockCacheEventLogger", "org.apache.commons.jcs.auxiliary.remote.MockRemoteCacheListener", "org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes", "org.apache.commons.jcs.auxiliary.remote.RemoteCacheManager", "org...
import org.apache.commons.jcs.auxiliary.AuxiliaryCache; import org.apache.commons.jcs.auxiliary.MockCacheEventLogger; import org.apache.commons.jcs.auxiliary.remote.MockRemoteCacheListener; import org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes; import org.apache.commons.jcs.auxiliary.remote.RemoteCacheMa...
import org.apache.commons.jcs.auxiliary.*; import org.apache.commons.jcs.auxiliary.remote.*; import org.apache.commons.jcs.engine.*; import org.apache.commons.jcs.engine.behavior.*; import org.apache.commons.jcs.engine.control.*; import org.apache.commons.jcs.utils.timing.*;
[ "org.apache.commons" ]
org.apache.commons;
1,307,054
private static CompilerAdapter resolveClassName(String className, ClassLoader loader) throws BuildException { return (CompilerAdapter) ClasspathUtils.newInstance(className, loader != null ? loader : CompilerAdapterFa...
static CompilerAdapter function(String className, ClassLoader loader) throws BuildException { return (CompilerAdapter) ClasspathUtils.newInstance(className, loader != null ? loader : CompilerAdapterFactory.class.getClassLoader(), CompilerAdapter.class); }
/** * Tries to resolve the given classname into a compiler adapter. * Throws a fit if it can't. * * @param className The fully qualified classname to be created. * @param loader the classloader to use * @throws BuildException This is the fit that is thrown if className * isn't an inst...
Tries to resolve the given classname into a compiler adapter. Throws a fit if it can't
resolveClassName
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java", "license": "mit", "size": 8265 }
[ "org.apache.tools.ant.BuildException", "org.apache.tools.ant.util.ClasspathUtils" ]
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.util.ClasspathUtils;
import org.apache.tools.ant.*; import org.apache.tools.ant.util.*;
[ "org.apache.tools" ]
org.apache.tools;
121,049
Map<String, Object> getAttributes();
Map<String, Object> getAttributes();
/** * Return a map that holds session attributes. */
Return a map that holds session attributes
getAttributes
{ "repo_name": "spring-projects/spring-framework", "path": "spring-web/src/main/java/org/springframework/web/server/WebSession.java", "license": "apache-2.0", "size": 5551 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,806,495
public void beforeSend(Representation entity) { // Do nothing by default. }
void function(Representation entity) { }
/** * Call-back method invoked by the client or server connectors just before * sending the response to the target component. The default implementation * does nothing. * * @param entity * The optional entity about to be committed. */
Call-back method invoked by the client or server connectors just before sending the response to the target component. The default implementation does nothing
beforeSend
{ "repo_name": "zhangjunfang/eclipse-dir", "path": "restlet/src/org/restlet/service/ConnectorService.java", "license": "bsd-2-clause", "size": 5400 }
[ "org.restlet.representation.Representation" ]
import org.restlet.representation.Representation;
import org.restlet.representation.*;
[ "org.restlet.representation" ]
org.restlet.representation;
267,003
public Set<Long> nextKill() { return m_strategy.accept(killPicker, m_selfHsid); } protected ArbitrationStrategy.Visitor<Set<Long>, Long> killPicker = new ArbitrationStrategy.Visitor<Set<Long>, Long>() {
Set<Long> function() { return m_strategy.accept(killPicker, m_selfHsid); } protected ArbitrationStrategy.Visitor<Set<Long>, Long> killPicker = new ArbitrationStrategy.Visitor<Set<Long>, Long>() {
/** * Determine the set of nodes to kill to accomplish a fully connected * mesh with the remaining sites * @return a set of nodes to kill */
Determine the set of nodes to kill to accomplish a fully connected mesh with the remaining sites
nextKill
{ "repo_name": "zheguang/voltdb", "path": "src/frontend/org/voltcore/agreement/AgreementSeeker.java", "license": "agpl-3.0", "size": 20458 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
577,288
@Test public void testShowPrivilegesByRole() throws Exception { Connection connection = context.createConnection(ADMIN1); Statement statement = context.createStatement(connection); statement.execute("CREATE ROLE role1"); ResultSet resultSet = statement.executeQuery("SHOW GRANT ROLE role1"); asse...
void function() throws Exception { Connection connection = context.createConnection(ADMIN1); Statement statement = context.createStatement(connection); statement.execute(STR); ResultSet resultSet = statement.executeQuery(STR); assertResultSize(resultSet, 0); statement.execute(STR); statement.execute(STR); statement.exe...
/** * SHOW GRANT ROLE roleName * @throws Exception 5.1. When there are no privileges granted to a role, returns an empty list 5.2. When there are privileges, returns correct list with correct schema. 5.3. Given privileges on table, show grant on table should return table privilege. 5.4. Privileges...
SHOW GRANT ROLE roleName
testShowPrivilegesByRole
{ "repo_name": "apache/incubator-sentry", "path": "sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java", "license": "apache-2.0", "size": 91506 }
[ "java.sql.Connection", "java.sql.ResultSet", "java.sql.ResultSetMetaData", "java.sql.Statement", "org.apache.sentry.provider.db.SentryAccessDeniedException", "org.hamcrest.Matchers", "org.junit.Assert" ]
import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import org.apache.sentry.provider.db.SentryAccessDeniedException; import org.hamcrest.Matchers; import org.junit.Assert;
import java.sql.*; import org.apache.sentry.provider.db.*; import org.hamcrest.*; import org.junit.*;
[ "java.sql", "org.apache.sentry", "org.hamcrest", "org.junit" ]
java.sql; org.apache.sentry; org.hamcrest; org.junit;
486,268
@DataProvider(name = "testInvalidRDNStrings") public Object[][] getInvalidRDNStrings() { return new Object[][] { new Object[] { "" }, new Object[] { "uid" }, new Object[] { "=test" }, new Object[] { "uid=test+=user" }, new Object[] { "uid=+sn" }, new Object[] { "cn=foo+...
@DataProvider(name = STR) Object[][] function() { return new Object[][] { new Object[] { STRuidSTR=testSTRuid=test+=userSTRuid=+snSTRcn=foo+sn=bar+STRcn=foo+sn=bar+ STRcn=foo+sn=bar+givenNameSTRcn=foo+sn=bar+givenName=+STRcn=foo+sn=bar+givenName=,STRuid=test.user+STRuid=test.user,STRuid=test.user;STRuid=#746qSTRuid=#00...
/** * Retrieves a set of invalid RDN string representations. * * @return A set of invalid RDN string representations. */
Retrieves a set of invalid RDN string representations
getInvalidRDNStrings
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/RDNTestCase.java", "license": "gpl-2.0", "size": 70033 }
[ "org.testng.annotations.DataProvider" ]
import org.testng.annotations.DataProvider;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,223,233
public void setSpawnForPlayer(final UUID playerUUID, final Location spawn) { spawnPoints.put(playerUUID, spawn); }
void function(final UUID playerUUID, final Location spawn) { spawnPoints.put(playerUUID, spawn); }
/** * Saves the spawn point of a player. * * @param playerUUID The player's UUID. * @param spawn The spawn location. */
Saves the spawn point of a player
setSpawnForPlayer
{ "repo_name": "AmauryCarrade/UHPlugin", "path": "src/main/java/eu/carrade/amaury/UHCReloaded/game/Teleporter.java", "license": "gpl-3.0", "size": 9419 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
679,891
private static String zeroPadInternal(String string, int length) { char[] a = new char[length]; int stringLength = string.length(); int padLength = length - stringLength; string.getChars(0, stringLength, a, padLength); Arrays.fill(a, 0, padLength, '0'); return new Str...
static String function(String string, int length) { char[] a = new char[length]; int stringLength = string.length(); int padLength = length - stringLength; string.getChars(0, stringLength, a, padLength); Arrays.fill(a, 0, padLength, '0'); return new String(a); }
/** * Zero-pad the specified string without validating the parms. */
Zero-pad the specified string without validating the parms
zeroPadInternal
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/string/StringTools.java", "license": "epl-1.0", "size": 66828 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
125,727
public void sendMessage(ReplicationMessage message) throws IOException { checkSocketConnection(); socketConn.writeMessage(message); }
void function(ReplicationMessage message) throws IOException { checkSocketConnection(); socketConn.writeMessage(message); }
/** * Used to send a replication message to the slave. * * @param message a <code>ReplicationMessage</code> object that contains * the message to be transmitted. * * @throws IOException 1) if an exception occurs while transmitting * the message. ...
Used to send a replication message to the slave
sendMessage
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/impl/store/replication/net/ReplicationMessageTransmit.java", "license": "apache-2.0", "size": 15847 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,232,153
@Override public Dao<SearchRecordRecentInfo, Integer> getCustInfoReqDao() throws SQLException { if (favoriteArticleDao == null) { favoriteArticleDao = getDao(SearchRecordRecentInfo.class); } return favoriteArticleDao; }
Dao<SearchRecordRecentInfo, Integer> function() throws SQLException { if (favoriteArticleDao == null) { favoriteArticleDao = getDao(SearchRecordRecentInfo.class); } return favoriteArticleDao; }
/** * Returns the Database Access Object (DAO) for our FavoriteArticle class. It * will create it or just give the cached value. */
Returns the Database Access Object (DAO) for our FavoriteArticle class. It will create it or just give the cached value
getCustInfoReqDao
{ "repo_name": "simplelifetian/GomeOnline", "path": "jrj-TouGu/src/com/gome/haoyuangong/db/DatabaseHelper.java", "license": "apache-2.0", "size": 3481 }
[ "com.gome.haoyuangong.bean.SearchRecordRecentInfo", "com.j256.ormlite.dao.Dao", "java.sql.SQLException" ]
import com.gome.haoyuangong.bean.SearchRecordRecentInfo; import com.j256.ormlite.dao.Dao; import java.sql.SQLException;
import com.gome.haoyuangong.bean.*; import com.j256.ormlite.dao.*; import java.sql.*;
[ "com.gome.haoyuangong", "com.j256.ormlite", "java.sql" ]
com.gome.haoyuangong; com.j256.ormlite; java.sql;
346,027
public void compile() throws FileNotFoundException, JasperException, Exception { compile(true); }
void function() throws FileNotFoundException, JasperException, Exception { compile(true); }
/** * Compile the jsp file from the current engine context */
Compile the jsp file from the current engine context
compile
{ "repo_name": "barreiro/jastow", "path": "src/main/java/org/apache/jasper/compiler/Compiler.java", "license": "apache-2.0", "size": 21785 }
[ "java.io.FileNotFoundException", "org.apache.jasper.JasperException" ]
import java.io.FileNotFoundException; import org.apache.jasper.JasperException;
import java.io.*; import org.apache.jasper.*;
[ "java.io", "org.apache.jasper" ]
java.io; org.apache.jasper;
199,987
@Override @Nonnull protected ClassHandler createClassHandler(ShadowMap shadowMap, Sandbox sandbox) { return new ShadowWrangler(shadowMap, ((SdkEnvironment) sandbox).getSdk().getApiLevel(), getInterceptors()); }
ClassHandler function(ShadowMap shadowMap, Sandbox sandbox) { return new ShadowWrangler(shadowMap, ((SdkEnvironment) sandbox).getSdk().getApiLevel(), getInterceptors()); }
/** * Create a {@link ClassHandler} appropriate for the given arguments. * * Robolectric may chose to cache the returned instance, keyed by <tt>shadowMap</tt> and <tt>sdk</tt>. * * Custom TestRunner subclasses may wish to override this method to provide alternate configuration. * * @param shadowMap...
Create a <code>ClassHandler</code> appropriate for the given arguments. Robolectric may chose to cache the returned instance, keyed by shadowMap and sdk. Custom TestRunner subclasses may wish to override this method to provide alternate configuration
createClassHandler
{ "repo_name": "spotify/robolectric", "path": "robolectric/src/main/java/org/robolectric/RobolectricTestRunner.java", "license": "mit", "size": 25858 }
[ "org.robolectric.internal.SdkEnvironment", "org.robolectric.internal.bytecode.ClassHandler", "org.robolectric.internal.bytecode.Sandbox", "org.robolectric.internal.bytecode.ShadowMap", "org.robolectric.internal.bytecode.ShadowWrangler" ]
import org.robolectric.internal.SdkEnvironment; import org.robolectric.internal.bytecode.ClassHandler; import org.robolectric.internal.bytecode.Sandbox; import org.robolectric.internal.bytecode.ShadowMap; import org.robolectric.internal.bytecode.ShadowWrangler;
import org.robolectric.internal.*; import org.robolectric.internal.bytecode.*;
[ "org.robolectric.internal" ]
org.robolectric.internal;
2,059,074
public String ingestImage(InputStream input, String output, String protectionLevel, Properties providerProperties) throws Exception { try { String pyramidOutput = HadoopUtils.getDefaultImageBaseDirectory() + output; byte[] bytes = IOUtils.toByteArray(input); ...
String function(InputStream input, String output, String protectionLevel, Properties providerProperties) throws Exception { try { String pyramidOutput = HadoopUtils.getDefaultImageBaseDirectory() + output; byte[] bytes = IOUtils.toByteArray(input); ByteArraySeekableStream seekableInput = new ByteArraySeekableStream(byt...
/** * Ingest raster stream in-memory * * @param input stream containing the raster to ingest * @param output pyramid name ingest raster to * @return Boolean success status of ingest * @throws IOException */
Ingest raster stream in-memory
ingestImage
{ "repo_name": "tjkrell/MrGEO", "path": "mrgeo-services/mrgeo-services-core/src/main/java/org/mrgeo/services/mrspyramid/MrsPyramidService.java", "license": "apache-2.0", "size": 12250 }
[ "com.sun.media.jai.codec.ByteArraySeekableStream", "java.io.InputStream", "java.util.Properties", "org.apache.commons.io.IOUtils", "org.mrgeo.aggregators.MeanAggregator", "org.mrgeo.buildpyramid.BuildPyramidDriver", "org.mrgeo.ingest.IngestImageDriver", "org.mrgeo.utils.HadoopUtils" ]
import com.sun.media.jai.codec.ByteArraySeekableStream; import java.io.InputStream; import java.util.Properties; import org.apache.commons.io.IOUtils; import org.mrgeo.aggregators.MeanAggregator; import org.mrgeo.buildpyramid.BuildPyramidDriver; import org.mrgeo.ingest.IngestImageDriver; import org.mrgeo.utils.HadoopUt...
import com.sun.media.jai.codec.*; import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.mrgeo.aggregators.*; import org.mrgeo.buildpyramid.*; import org.mrgeo.ingest.*; import org.mrgeo.utils.*;
[ "com.sun.media", "java.io", "java.util", "org.apache.commons", "org.mrgeo.aggregators", "org.mrgeo.buildpyramid", "org.mrgeo.ingest", "org.mrgeo.utils" ]
com.sun.media; java.io; java.util; org.apache.commons; org.mrgeo.aggregators; org.mrgeo.buildpyramid; org.mrgeo.ingest; org.mrgeo.utils;
1,621,159
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(TermsPackage.Literals.LIST_TERM__ELEMENTS); } return childrenFeatures; }
Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(TermsPackage.Literals.LIST_TERM__ELEMENTS); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf.edit/src-gen/org/tud/inf/st/mbt/terms/provider/ListTermItemProvider.java", "license": "apache-2.0", "size": 6380 }
[ "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature", "org.tud.inf.st.mbt.terms.TermsPackage" ]
import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.tud.inf.st.mbt.terms.TermsPackage;
import java.util.*; import org.eclipse.emf.ecore.*; import org.tud.inf.st.mbt.terms.*;
[ "java.util", "org.eclipse.emf", "org.tud.inf" ]
java.util; org.eclipse.emf; org.tud.inf;
151,011
public static Texture getTexture(String name) { return textures.get(name); }
static Texture function(String name) { return textures.get(name); }
/** * Obtiene un recurso textura de memoria * @param name * @return */
Obtiene un recurso textura de memoria
getTexture
{ "repo_name": "sfaci/libgdx", "path": "bombermanx/bombermanx/bombermanx/src/org/sfaci/bombermanx/managers/ResourceManager.java", "license": "gpl-2.0", "size": 1787 }
[ "com.badlogic.gdx.graphics.Texture" ]
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
2,270,435
public static List<Node> parseXmlFragment(String fragmentXml, String baseUri) { XmlTreeBuilder treeBuilder = new XmlTreeBuilder(); return treeBuilder.parseFragment(fragmentXml, baseUri, ParseErrorList.noTracking()); }
static List<Node> function(String fragmentXml, String baseUri) { XmlTreeBuilder treeBuilder = new XmlTreeBuilder(); return treeBuilder.parseFragment(fragmentXml, baseUri, ParseErrorList.noTracking()); }
/** * Parse a fragment of XML into a list of nodes. * * @param fragmentXml the fragment of XML to parse * @param baseUri base URI of document (i.e. original fetch location), for resolving relative URLs. * @return list of nodes parsed from the input XML. */
Parse a fragment of XML into a list of nodes
parseXmlFragment
{ "repo_name": "kawasima/moshas", "path": "moshas/src/main/java/net/unit8/moshas/parser/Parser.java", "license": "apache-2.0", "size": 5506 }
[ "java.util.List", "net.unit8.moshas.dom.Node" ]
import java.util.List; import net.unit8.moshas.dom.Node;
import java.util.*; import net.unit8.moshas.dom.*;
[ "java.util", "net.unit8.moshas" ]
java.util; net.unit8.moshas;
2,555,329
public CloseableIterator<InternalDataStatistics<?, ?, ?>> getDataStatistics( StatisticsType<?, ?> statisticsType, String... authorizations);
CloseableIterator<InternalDataStatistics<?, ?, ?>> function( StatisticsType<?, ?> statisticsType, String... authorizations);
/** * Get all data statistics from the store by statistics type * * @return the list of statistics for the given adapter, empty if it doesn't exist */
Get all data statistics from the store by statistics type
getDataStatistics
{ "repo_name": "spohnan/geowave", "path": "core/store/src/main/java/org/locationtech/geowave/core/store/adapter/statistics/DataStatisticsStore.java", "license": "apache-2.0", "size": 4646 }
[ "org.locationtech.geowave.core.store.CloseableIterator" ]
import org.locationtech.geowave.core.store.CloseableIterator;
import org.locationtech.geowave.core.store.*;
[ "org.locationtech.geowave" ]
org.locationtech.geowave;
2,818,701
@Override protected void findRegionsForElement(ITextElement element, RegionSet resultRegions) { try { // determine all matching regions String content = element.getTextContent(); for (Pattern pattern : regexRegionParams.patterns) { findRegionsForPattern(content, pattern, resultRegions); } ...
void function(ITextElement element, RegionSet resultRegions) { try { String content = element.getTextContent(); for (Pattern pattern : regexRegionParams.patterns) { findRegionsForPattern(content, pattern, resultRegions); } if (regexRegionParams.startRegionAtElementBegin && !resultRegions.isEmpty()) { mergeRegions(resul...
/** * Determine the regions that are matched by the list of regular expressions * of this processor. */
Determine the regions that are matched by the list of regular expressions of this processor
findRegionsForElement
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.resource/src/org/conqat/engine/resource/regions/RegexRegionMarkerStrategy.java", "license": "apache-2.0", "size": 4944 }
[ "java.util.regex.Pattern", "org.conqat.engine.core.core.ConQATException", "org.conqat.engine.resource.text.ITextElement", "org.conqat.lib.commons.region.RegionSet" ]
import java.util.regex.Pattern; import org.conqat.engine.core.core.ConQATException; import org.conqat.engine.resource.text.ITextElement; import org.conqat.lib.commons.region.RegionSet;
import java.util.regex.*; import org.conqat.engine.core.core.*; import org.conqat.engine.resource.text.*; import org.conqat.lib.commons.region.*;
[ "java.util", "org.conqat.engine", "org.conqat.lib" ]
java.util; org.conqat.engine; org.conqat.lib;
2,315,995
public void setEngineName(@Nullable String engineName) { this.engineName = engineName; }
void function(@Nullable String engineName) { this.engineName = engineName; }
/** * Set the engine name that will be used to instantiate the {@link ScriptEngine}. * If {@code renderFunction} is specified, the script engine must implement {@code Invocable}. * You must define {@code engine} or {@code engineName}, not both. * @see #setEngine(ScriptEngine) * @see #setEngineSupplier(Supplie...
Set the engine name that will be used to instantiate the <code>ScriptEngine</code>. If renderFunction is specified, the script engine must implement Invocable. You must define engine or engineName, not both
setEngineName
{ "repo_name": "spring-projects/spring-framework", "path": "spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateConfigurer.java", "license": "apache-2.0", "size": 8608 }
[ "org.springframework.lang.Nullable" ]
import org.springframework.lang.Nullable;
import org.springframework.lang.*;
[ "org.springframework.lang" ]
org.springframework.lang;
2,092,844
public static void sendTempFile(File file, HttpServletResponse response, String mimeType) throws IOException { if (file.exists()) { BufferedInputStream bis = new BufferedInputStream( new FileInputStream(file)); // Set ...
static void function(File file, HttpServletResponse response, String mimeType) throws IOException { if (file.exists()) { BufferedInputStream bis = new BufferedInputStream( new FileInputStream(file)); if (mimeType != null) { response.setHeader(STR, mimeType); } response.setHeader(STR, String.valueOf(file.length())); Sim...
/** * Binary streams the specified file to the HTTP response in 1KB chunks. * * @param file the file to be streamed. * @param response the HTTP response object. * @param mimeType the mime type of the file, null allowed. * * @throws IOException if there is an I/O problem. ...
Binary streams the specified file to the HTTP response in 1KB chunks
sendTempFile
{ "repo_name": "fluidware/Eastwood-Charts", "path": "source/org/jfree/chart/servlet/ServletUtilities.java", "license": "lgpl-2.1", "size": 17372 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.text.SimpleDateFormat", "java.util.Date", "java.util.Locale", "java.util.TimeZone", "javax.servlet.http.HttpServletResponse" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import javax.servl...
import java.io.*; import java.text.*; import java.util.*; import javax.servlet.http.*;
[ "java.io", "java.text", "java.util", "javax.servlet" ]
java.io; java.text; java.util; javax.servlet;
867,543
EAttribute getCursorTerm_Hold();
EAttribute getCursorTerm_Hold();
/** * Returns the meta object for the attribute '{@link org.asup.il.esql.QCursorTerm#isHold <em>Hold</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Hold</em>'. * @see org.asup.il.esql.QCursorTerm#isHold() * @see #getCursorTerm() * @generated */
Returns the meta object for the attribute '<code>org.asup.il.esql.QCursorTerm#isHold Hold</code>'.
getCursorTerm_Hold
{ "repo_name": "asupdev/asup", "path": "org.asup.il.esql/src/org/asup/il/esql/QIntegratedLanguageEmbeddedSQLPackage.java", "license": "epl-1.0", "size": 22540 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
628,485
private List<HandleMeta> createHandleMetasFromMethodAnnotations(Class cls) throws EasyDispatchReflectionException { // Prepare collection to return List<HandleMeta> toReturn = new LinkedList<>(); // Read in all the appropriate methodss List<Method> methods = Arrays.stream(cls.ge...
List<HandleMeta> function(Class cls) throws EasyDispatchReflectionException { List<HandleMeta> toReturn = new LinkedList<>(); List<Method> methods = Arrays.stream(cls.getMethods()) .filter(method -> !method.isBridge()) .filter(method -> method.isAnnotationPresent(Handles.class) method.isAnnotationPresent(HandlesContain...
/** * Creates a collection of handle meta objects from the method annotations * on the specified class. * * @param cls The class to read annotation information from. * @return The collection of handle meta objects. * @throws EasyDispatchReflectionException If there is an annotation error ...
Creates a collection of handle meta objects from the method annotations on the specified class
createHandleMetasFromMethodAnnotations
{ "repo_name": "lrezek/EasyDispatch", "path": "src/main/java/com/lrezek/easydispatch/handle/meta/HandleMetaFactory.java", "license": "mit", "size": 9177 }
[ "com.lrezek.easydispatch.annotation.Handles", "com.lrezek.easydispatch.annotation.HandlesContainer", "com.lrezek.easydispatch.exception.EasyDispatchReflectionException", "java.lang.reflect.Method", "java.util.Arrays", "java.util.LinkedList", "java.util.List", "java.util.stream.Collectors" ]
import com.lrezek.easydispatch.annotation.Handles; import com.lrezek.easydispatch.annotation.HandlesContainer; import com.lrezek.easydispatch.exception.EasyDispatchReflectionException; import java.lang.reflect.Method; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.stream.C...
import com.lrezek.easydispatch.annotation.*; import com.lrezek.easydispatch.exception.*; import java.lang.reflect.*; import java.util.*; import java.util.stream.*;
[ "com.lrezek.easydispatch", "java.lang", "java.util" ]
com.lrezek.easydispatch; java.lang; java.util;
1,896,129
static void checkSnapshot( INode target, List<INodeDirectory> snapshottableDirs) throws SnapshotException { if (target.isDirectory()) { INodeDirectory targetDir = target.asDirectory(); DirectorySnapshottableFeature sf = targetDir .getDirectorySnapshottableFeature(); if (sf ...
static void checkSnapshot( INode target, List<INodeDirectory> snapshottableDirs) throws SnapshotException { if (target.isDirectory()) { INodeDirectory targetDir = target.asDirectory(); DirectorySnapshottableFeature sf = targetDir .getDirectorySnapshottableFeature(); if (sf != null) { if (sf.getNumSnapshots() > 0) { Str...
/** * Check if the given INode (or one of its descendants) is snapshottable and * already has snapshots. * * @param target The given INode * @param snapshottableDirs The list of directories that are snapshottable * but do not have snapshots yet */
Check if the given INode (or one of its descendants) is snapshottable and already has snapshots
checkSnapshot
{ "repo_name": "xuchenCN/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java", "license": "apache-2.0", "size": 8692 }
[ "java.util.List", "org.apache.hadoop.hdfs.protocol.SnapshotException", "org.apache.hadoop.hdfs.server.namenode.snapshot.DirectorySnapshottableFeature", "org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot" ]
import java.util.List; import org.apache.hadoop.hdfs.protocol.SnapshotException; import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectorySnapshottableFeature; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot;
import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,654,154
protected static String contentsOfFile(Context context, String filename) { StringBuilder contents = new StringBuilder(); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader(context.openFileInput(filename))); String line = null; String lineSeparator = Sys...
static String function(Context context, String filename) { StringBuilder contents = new StringBuilder(); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader(context.openFileInput(filename))); String line = null; String lineSeparator = System.getProperty(STR); while ((line = reader.read...
/** * Returns the content of a file as a string. */
Returns the content of a file as a string
contentsOfFile
{ "repo_name": "math4youbyusgroupillinois/apigee-android-sdk", "path": "source/src/main/java/com/apigee/sdk/apm/android/crashlogging/CrashManager.java", "license": "apache-2.0", "size": 14522 }
[ "android.content.Context", "java.io.BufferedReader", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStreamReader" ]
import android.content.Context; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader;
import android.content.*; import java.io.*;
[ "android.content", "java.io" ]
android.content; java.io;
469,098
public void markAsRead() throws IOException { markAsRead(-1); }
void function() throws IOException { markAsRead(-1); }
/** * Mark as read. * * @throws IOException * the io exception */
Mark as read
markAsRead
{ "repo_name": "kohsuke/github-api", "path": "src/main/java/org/kohsuke/github/GHNotificationStream.java", "license": "mit", "size": 7903 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
192,141
@Test(groups = "short") public void should_reprepare_on_up_by_default() { valideReprepareOnUp(true); }
@Test(groups = "short") void function() { valideReprepareOnUp(true); }
/** * <p> * Validates that statements are reprepared when a node comes back up with * the default configuration. * </p> * * @test_category prepared_statements:prepared * @expected_result reprepare query on the restarted node. * @jira_ticket JAVA-658 * @since 2.0.11, 2.1.8, 2...
Validates that statements are reprepared when a node comes back up with the default configuration.
should_reprepare_on_up_by_default
{ "repo_name": "mike-tr-adamson/java-driver", "path": "driver-core/src/test/java/com/datastax/driver/core/QueryOptionsTest.java", "license": "apache-2.0", "size": 8083 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
970,927
public static URL newURL( final String spec ) throws MalformedURLException { URL piTmp0 = null; try { piTmp0 = AccessController.doPrivileged( new PrivilegedExceptionAction<URL>( ) {
static URL function( final String spec ) throws MalformedURLException { URL piTmp0 = null; try { piTmp0 = AccessController.doPrivileged( new PrivilegedExceptionAction<URL>( ) {
/** * Instantiate a new URL * * @param spec * @return * @throws MalformedURLException */
Instantiate a new URL
newURL
{ "repo_name": "Charling-Huang/birt", "path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/util/SecurityUtil.java", "license": "epl-1.0", "size": 23839 }
[ "java.net.MalformedURLException", "java.security.AccessController", "java.security.PrivilegedExceptionAction" ]
import java.net.MalformedURLException; import java.security.AccessController; import java.security.PrivilegedExceptionAction;
import java.net.*; import java.security.*;
[ "java.net", "java.security" ]
java.net; java.security;
1,865,584
protected void regenerateMetrics() { // Set up the metrics that are enabled regardless of instrumentation this.recordsIn = this.metricContext.meter(MetricNames.DataWriterMetrics.RECORDS_IN_METER); this.recordsAttempted = this.metricContext.meter(MetricNames.DataWriterMetrics.RECORDS_ATTEMPTED_METER); ...
void function() { this.recordsIn = this.metricContext.meter(MetricNames.DataWriterMetrics.RECORDS_IN_METER); this.recordsAttempted = this.metricContext.meter(MetricNames.DataWriterMetrics.RECORDS_ATTEMPTED_METER); this.recordsSuccess = this.metricContext.meter(MetricNames.DataWriterMetrics.SUCCESSFUL_WRITES_METER); thi...
/** * Generates metrics for the instrumentation of this class. */
Generates metrics for the instrumentation of this class
regenerateMetrics
{ "repo_name": "sahilTakiar/gobblin", "path": "gobblin-core-base/src/main/java/gobblin/writer/AsyncWriterManager.java", "license": "apache-2.0", "size": 21185 }
[ "com.codahale.metrics.Timer", "com.google.common.base.Optional", "com.google.common.base.Preconditions", "com.google.common.io.Closer", "com.typesafe.config.Config", "java.util.concurrent.LinkedBlockingQueue", "java.util.concurrent.ScheduledThreadPoolExecutor", "java.util.concurrent.Semaphore", "org...
import com.codahale.metrics.Timer; import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.io.Closer; import com.typesafe.config.Config; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concur...
import com.codahale.metrics.*; import com.google.common.base.*; import com.google.common.io.*; import com.typesafe.config.*; import java.util.concurrent.*; import org.slf4j.*;
[ "com.codahale.metrics", "com.google.common", "com.typesafe.config", "java.util", "org.slf4j" ]
com.codahale.metrics; com.google.common; com.typesafe.config; java.util; org.slf4j;
1,043,042
//---------------------------------------------------------------------- public boolean load(ReportDTO reportDTO) throws SQLException;
boolean function(ReportDTO reportDTO) throws SQLException;
/** * Loads the given bean, it is supposed to contains the primary key value(s) in its attribute(s)<br> * If found, the given instance is populated with the values retrieved from the database<br> * If not found, the given instance remains unchanged * @param report * @return true if found, false if not fo...
Loads the given bean, it is supposed to contains the primary key value(s) in its attribute(s) If found, the given instance is populated with the values retrieved from the database If not found, the given instance remains unchanged
load
{ "repo_name": "vasttrafik/wso2-community-api", "path": "java/src/main/java/org/vasttrafik/wso2/carbon/community/api/dao/ReportDAO.java", "license": "mit", "size": 2715 }
[ "java.sql.SQLException", "org.vasttrafik.wso2.carbon.community.api.model.ReportDTO" ]
import java.sql.SQLException; import org.vasttrafik.wso2.carbon.community.api.model.ReportDTO;
import java.sql.*; import org.vasttrafik.wso2.carbon.community.api.model.*;
[ "java.sql", "org.vasttrafik.wso2" ]
java.sql; org.vasttrafik.wso2;
596,395
public Set<String> getSensitiveBuildVariables() { Set<String> s = new HashSet<String>(); ParametersAction parameters = getAction(ParametersAction.class); if (parameters != null) { for (ParameterValue p : parameters) { if (p.isSensitive()) { s....
Set<String> function() { Set<String> s = new HashSet<String>(); ParametersAction parameters = getAction(ParametersAction.class); if (parameters != null) { for (ParameterValue p : parameters) { if (p.isSensitive()) { s.add(p.getName()); } } } if (project instanceof BuildableItemWithBuildWrappers) { for (BuildWrapper bw ...
/** * Builds up a set of variable names that contain sensitive values that * should not be exposed. The expectation is that this set is populated with * keys returned by {@link #getBuildVariables()} that should have their * values masked for display purposes. * * @since 1.378 */
Builds up a set of variable names that contain sensitive values that should not be exposed. The expectation is that this set is populated with keys returned by <code>#getBuildVariables()</code> that should have their values masked for display purposes
getSensitiveBuildVariables
{ "repo_name": "rwaldron/jenkins", "path": "core/src/main/java/hudson/model/AbstractBuild.java", "license": "mit", "size": 46957 }
[ "hudson.tasks.BuildWrapper", "java.util.HashSet", "java.util.Set" ]
import hudson.tasks.BuildWrapper; import java.util.HashSet; import java.util.Set;
import hudson.tasks.*; import java.util.*;
[ "hudson.tasks", "java.util" ]
hudson.tasks; java.util;
648,082
public DatanodeDescriptor[] chooseTarget(final String src, final int numOfReplicas, final DatanodeDescriptor client, final HashMap<Node, Node> excludedNodes, final long blocksize, List<String> favoredNodes) throws IOException { List<DatanodeDescriptor> favoredDatanodeDescriptors = getDa...
DatanodeDescriptor[] function(final String src, final int numOfReplicas, final DatanodeDescriptor client, final HashMap<Node, Node> excludedNodes, final long blocksize, List<String> favoredNodes) throws IOException { List<DatanodeDescriptor> favoredDatanodeDescriptors = getDatanodeDescriptors(favoredNodes); final Datan...
/** * Choose target datanodes according to the replication policy. * * @throws IOException * if the number of targets < minimum replication. * @see BlockPlacementPolicy#chooseTarget(String, int, DatanodeDescriptor, * List, boolean, HashMap, long) */
Choose target datanodes according to the replication policy
chooseTarget
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 123764 }
[ "java.io.IOException", "java.util.HashMap", "java.util.List", "org.apache.hadoop.net.Node" ]
import java.io.IOException; import java.util.HashMap; import java.util.List; import org.apache.hadoop.net.Node;
import java.io.*; import java.util.*; import org.apache.hadoop.net.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,295,964
protected void handleSloPostProfileRequest(final HttpServletResponse response, final HttpServletRequest request, final BaseHttpServletRequestXMLMessageDecoder decoder) throws Exception { if (singleLogoutCallbacksDi...
void function(final HttpServletResponse response, final HttpServletRequest request, final BaseHttpServletRequestXMLMessageDecoder decoder) throws Exception { if (singleLogoutCallbacksDisabled) { logger.info(STR); return; } final LogoutRequest logoutRequest = decodeRequest(request, decoder, LogoutRequest.class); if (thi...
/** * Handle profile request. * * @param response the response * @param request the request * @param decoder the decoder * @throws Exception the exception */
Handle profile request
handleSloPostProfileRequest
{ "repo_name": "PetrGasparik/cas", "path": "cas-server-support-saml-idp/src/main/java/org/jasig/cas/support/saml/web/idp/profile/SLOPostProfileHandlerController.java", "license": "apache-2.0", "size": 3437 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.jasig.cas.support.saml.SamlIdPUtils", "org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder", "org.opensaml.saml.common.SAMLException", "org.opensaml.saml.metadata.resolver.MetadataResolver", ...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jasig.cas.support.saml.SamlIdPUtils; import org.opensaml.messaging.decoder.servlet.BaseHttpServletRequestXMLMessageDecoder; import org.opensaml.saml.common.SAMLException; import org.opensaml.saml.metadata.resolver.Me...
import javax.servlet.http.*; import org.jasig.cas.support.saml.*; import org.opensaml.messaging.decoder.servlet.*; import org.opensaml.saml.common.*; import org.opensaml.saml.metadata.resolver.*; import org.opensaml.saml.saml2.core.*;
[ "javax.servlet", "org.jasig.cas", "org.opensaml.messaging", "org.opensaml.saml" ]
javax.servlet; org.jasig.cas; org.opensaml.messaging; org.opensaml.saml;
924,204
public Patient getPatient() { return this.patient; }
Patient function() { return this.patient; }
/** * Get Patient * * @return a Patient */
Get Patient
getPatient
{ "repo_name": "E-Health/openmrs-module-patientportaltoolkit-pcchr", "path": "api/src/main/java/org/openmrs/module/patientportaltoolkit/PatientPortalRelation.java", "license": "mpl-2.0", "size": 5399 }
[ "org.openmrs.Patient" ]
import org.openmrs.Patient;
import org.openmrs.*;
[ "org.openmrs" ]
org.openmrs;
273,017
public static boolean testProtocol(String protocol, List<String> protocolSet) { int index = protocol.lastIndexOf(":"); if (index <= 0) { LOGGER.debug("Protocol {} not valid", protocol); return false; } String p = protocol.toLowerCase().substring(0, index); ...
static boolean function(String protocol, List<String> protocolSet) { int index = protocol.lastIndexOf(":"); if (index <= 0) { LOGGER.debug(STR, protocol); return false; } String p = protocol.toLowerCase().substring(0, index); List<String> pSet = new ArrayList<>(); protocolSet.forEach(f -> { int i = f.lastIndexOf(":"); ...
/** * Test if a UPnP protocol is in a set of protocols. * Ignore vendor specific additionalInfo part in UPnP protocol string. * Do all comparisons in lower case. * * @param protocol format: <protocol>:<network>:<contentFormat>:<additionalInfo> * @param protocolSet * @return true if pr...
Test if a UPnP protocol is in a set of protocols. Ignore vendor specific additionalInfo part in UPnP protocol string. Do all comparisons in lower case
testProtocol
{ "repo_name": "openhab/openhab2", "path": "bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/util/UpnpProtocolMatcher.java", "license": "epl-1.0", "size": 4227 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,173,086
@SuppressWarnings("deprecation") public static ByteBuf setShortBE(ByteBuf buf, int index, int shortValue) { return buf.order() == ByteOrder.BIG_ENDIAN? buf.setShort(index, shortValue) : buf.setShortLE(index, shortValue); }
@SuppressWarnings(STR) static ByteBuf function(ByteBuf buf, int index, int shortValue) { return buf.order() == ByteOrder.BIG_ENDIAN? buf.setShort(index, shortValue) : buf.setShortLE(index, shortValue); }
/** * Sets a big-endian 16-bit short integer to the buffer. */
Sets a big-endian 16-bit short integer to the buffer
setShortBE
{ "repo_name": "louxiu/netty", "path": "buffer/src/main/java/io/netty/buffer/ByteBufUtil.java", "license": "apache-2.0", "size": 52381 }
[ "java.nio.ByteOrder" ]
import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,300,675
private static void addTableDescIfPropsChanged(TableDescriptor origTableDesc, ColumnFamilyDescriptor defaultColFam, Map<String, Object> syncedProps, Set<TableDescriptor> tableDescsToSync) throws SQLException { TableDescriptorBuilder tableDescBuilder = syncColFamProperties(origTableDesc, defaultC...
static void function(TableDescriptor origTableDesc, ColumnFamilyDescriptor defaultColFam, Map<String, Object> syncedProps, Set<TableDescriptor> tableDescsToSync) throws SQLException { TableDescriptorBuilder tableDescBuilder = syncColFamProperties(origTableDesc, defaultColFam, syncedProps); if (!origTableDesc.equals(tab...
/** * Add the table descriptor to the set of table descriptors to keep in sync, if it has been changed * @param origTableDesc original table descriptor of the table in question * @param defaultColFam column family to be used for synchronizing properties * @param syncedProps Map of properties to be k...
Add the table descriptor to the set of table descriptors to keep in sync, if it has been changed
addTableDescIfPropsChanged
{ "repo_name": "ohadshacham/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java", "license": "apache-2.0", "size": 131049 }
[ "java.sql.SQLException", "java.util.Map", "java.util.Set", "org.apache.hadoop.hbase.client.ColumnFamilyDescriptor", "org.apache.hadoop.hbase.client.TableDescriptor", "org.apache.hadoop.hbase.client.TableDescriptorBuilder" ]
import java.sql.SQLException; import java.util.Map; import java.util.Set; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.TableDescriptor; import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import java.sql.*; import java.util.*; import org.apache.hadoop.hbase.client.*;
[ "java.sql", "java.util", "org.apache.hadoop" ]
java.sql; java.util; org.apache.hadoop;
2,838,598
protected void paintSafely(Graphics g) { if (PreferenceManager.getBoolean("general.appearance.antialiasing", false)) { ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); ...
void function(Graphics g) { if (PreferenceManager.getBoolean(STR, false)) { ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); } super.paintSafely(g); } }
/** * DOCUMENT ME! * * @param g DOCUMENT ME! */
DOCUMENT ME
paintSafely
{ "repo_name": "tonivade/tedit", "path": "src/tk/tomby/tedit/core/ColourTextArea.java", "license": "gpl-2.0", "size": 4363 }
[ "java.awt.Graphics", "java.awt.Graphics2D", "java.awt.RenderingHints", "tk.tomby.tedit.services.PreferenceManager" ]
import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import tk.tomby.tedit.services.PreferenceManager;
import java.awt.*; import tk.tomby.tedit.services.*;
[ "java.awt", "tk.tomby.tedit" ]
java.awt; tk.tomby.tedit;
1,686,426
public static boolean contains(Bbox bbox, Coordinate coordinate) { if (bbox.getX() >= coordinate.getX()) { return false; } if (bbox.getY() >= coordinate.getY()) { return false; } if (bbox.getMaxX() <= coordinate.getX()) { return false; } if (bbox.getMaxY() <= coordinate.getY()) { return fal...
static boolean function(Bbox bbox, Coordinate coordinate) { if (bbox.getX() >= coordinate.getX()) { return false; } if (bbox.getY() >= coordinate.getY()) { return false; } if (bbox.getMaxX() <= coordinate.getX()) { return false; } if (bbox.getMaxY() <= coordinate.getY()) { return false; } return true; }
/** * Is the given coordinate contained within the bounding box or not? If the coordinate is on the bounding box * border, it is considered outside. * * @param bbox * The bounding box. * @param coordinate * The coordinate to check. * @return True if the coordinate is within the bo...
Is the given coordinate contained within the bounding box or not? If the coordinate is on the bounding box border, it is considered outside
contains
{ "repo_name": "olivermay/geomajas", "path": "project/geomajas-project-geometry/core/src/main/java/org/geomajas/geometry/service/BboxService.java", "license": "agpl-3.0", "size": 9392 }
[ "org.geomajas.geometry.Bbox", "org.geomajas.geometry.Coordinate" ]
import org.geomajas.geometry.Bbox; import org.geomajas.geometry.Coordinate;
import org.geomajas.geometry.*;
[ "org.geomajas.geometry" ]
org.geomajas.geometry;
880,240
Map<String, Attachment> getAttachmentObjects();
Map<String, Attachment> getAttachmentObjects();
/** * Returns all attachments of the message * * @return the attachments in a map or <tt>null</tt> */
Returns all attachments of the message
getAttachmentObjects
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-attachments/src/main/java/org/apache/camel/attachment/AttachmentMessage.java", "license": "apache-2.0", "size": 3304 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,057,902
@Override public FilterName getFilterConfiguration() { FilterName filterName = new FilterName("MetBy", Boolean.class); filterName.addParameter( new FilterNameParameter("property", ExpressionTypeEnum.PROPERTY, Date.class)); filterName.addParameter( new Filt...
FilterName function() { FilterName filterName = new FilterName("MetBy", Boolean.class); filterName.addParameter( new FilterNameParameter(STR, ExpressionTypeEnum.PROPERTY, Date.class)); filterName.addParameter( new FilterNameParameter(STR, ExpressionTypeEnum.LITERAL, Date.class)); return filterName; }
/** * Gets the filter configuration. * * @return the filter configuration */
Gets the filter configuration
getFilterConfiguration
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/application/src/main/java/com/sldeditor/filter/v2/function/temporal/MetBy.java", "license": "gpl-3.0", "size": 4262 }
[ "com.sldeditor.filter.v2.expression.ExpressionTypeEnum", "com.sldeditor.filter.v2.function.FilterName", "com.sldeditor.filter.v2.function.FilterNameParameter", "java.util.Date" ]
import com.sldeditor.filter.v2.expression.ExpressionTypeEnum; import com.sldeditor.filter.v2.function.FilterName; import com.sldeditor.filter.v2.function.FilterNameParameter; import java.util.Date;
import com.sldeditor.filter.v2.expression.*; import com.sldeditor.filter.v2.function.*; import java.util.*;
[ "com.sldeditor.filter", "java.util" ]
com.sldeditor.filter; java.util;
1,288,287
@SuppressWarnings("rawtypes") public static JobConf createValueAggregatorJob(String args[], Class<?> caller) throws IOException { Configuration conf = new Configuration(); GenericOptionsParser genericParser = new GenericOptionsParser(conf, args); args = genericParser.getRemainingArgs();...
@SuppressWarnings(STR) static JobConf function(String args[], Class<?> caller) throws IOException { Configuration conf = new Configuration(); GenericOptionsParser genericParser = new GenericOptionsParser(conf, args); args = genericParser.getRemainingArgs(); if (args.length < 2) { System.out.println(STR + STR); GenericO...
/** * Create an Aggregate based map/reduce job. * * @param args the arguments used for job creation. Generic hadoop * arguments are accepted. * @param caller the the caller class. * @return a JobConf object ready for submission. * * @throws IOException * @see GenericOptionsParser */
Create an Aggregate based map/reduce job
createValueAggregatorJob
{ "repo_name": "intel-hadoop/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/aggregate/ValueAggregatorJob.java", "license": "apache-2.0", "size": 8876 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.Path", "org.apache.hadoop.io.Text", "org.apache.hadoop.mapred.FileInputFormat", "org.apache.hadoop.mapred.FileOutputFormat", "org.apache.hadoop.mapred.InputFormat", "org.apache.hadoop.mapred.JobConf", "org.apache.ha...
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.FileInputFormat; import org.apache.hadoop.mapred.FileOutputFormat; import org.apache.hadoop.mapred.InputFormat; import org.apache.hadoop.mapred.Job...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,373,895
public Observable<ServiceResponse<Void>> beginDeleteSqlUserDefinedFunctionWithServiceResponseAsync(String resourceGroupName, String accountName, String databaseName, String containerName, String userDefinedFunctionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentExcep...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String accountName, String databaseName, String containerName, String userDefinedFunctionName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException...
/** * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos D...
Deletes an existing Azure Cosmos DB SQL userDefinedFunction
beginDeleteSqlUserDefinedFunctionWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/SqlResourcesInner.java", "license": "mit", "size": 310922 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,449,263
public void flipXAxis( float z ) { float dx = 2 * DrawingUtil.CENTER_X; float offx = dx - 2 * cx; // OK for non-orientable points cx = dx - cx; x1 = dx - x1; x2 = dx - x2; float r1 = dx - left; left = dx - right; right = r1; boolean flip_path = false; if ( mType == DRAWING_PA...
void function( float z ) { float dx = 2 * DrawingUtil.CENTER_X; float offx = dx - 2 * cx; cx = dx - cx; x1 = dx - x1; x2 = dx - x2; float r1 = dx - left; left = dx - right; right = r1; boolean flip_path = false; if ( mType == DRAWING_PATH_POINT ) { DrawingPointPath dpp = (DrawingPointPath)this; if ( dpp.mOrientation !=...
/** flip horizontally * @param z unused * @note from ICanvasCommand */
flip horizontally
flipXAxis
{ "repo_name": "marcocorvi/topodroid", "path": "src/com/topodroid/DistoX/DrawingPath.java", "license": "gpl-3.0", "size": 22719 }
[ "android.graphics.Matrix" ]
import android.graphics.Matrix;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
596,697
public LiborMarketModelDisplacedDiffusionProvider getLMMProvider() { return _lmmProvider; }
LiborMarketModelDisplacedDiffusionProvider function() { return _lmmProvider; }
/** * Sets the LMM. * @return The LMM. */
Sets the LMM
getLMMProvider
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/method/SuccessiveRootFinderLMMDDCalibrationObjective.java", "license": "apache-2.0", "size": 5211 }
[ "com.opengamma.analytics.financial.provider.description.interestrate.LiborMarketModelDisplacedDiffusionProvider" ]
import com.opengamma.analytics.financial.provider.description.interestrate.LiborMarketModelDisplacedDiffusionProvider;
import com.opengamma.analytics.financial.provider.description.interestrate.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
2,707,279
TestSuite suite = new TestSuite("org.jfree.chart.labels"); suite.addTestSuite(BoxAndWhiskerToolTipGeneratorTests.class); suite.addTestSuite(BoxAndWhiskerXYToolTipGeneratorTests.class); suite.addTestSuite(BubbleXYItemLabelGeneratorTests.class); suite.addTestSuite(CustomXYItemLabelGenerato...
TestSuite suite = new TestSuite(STR); suite.addTestSuite(BoxAndWhiskerToolTipGeneratorTests.class); suite.addTestSuite(BoxAndWhiskerXYToolTipGeneratorTests.class); suite.addTestSuite(BubbleXYItemLabelGeneratorTests.class); suite.addTestSuite(CustomXYItemLabelGeneratorTests.class); suite.addTestSuite(HighLowItemLabelGen...
/** * Returns a test suite to the JUnit test runner. * * @return The test suite. */
Returns a test suite to the JUnit test runner
suite
{ "repo_name": "integrated/jfreechart", "path": "tests/org/jfree/chart/labels/junit/LabelsPackageTests.java", "license": "lgpl-2.1", "size": 4099 }
[ "junit.framework.TestSuite" ]
import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,943,408
@Override public void setHeightLocal(float height){ Vertex[] v = this.getVerticesLocal(); switch (this.mode) { case MODE_EXPAND: this.setVertices(new Vertex[]{ new Vertex(v[0].x, 0, v[0].z, v[0].getTexCoordU(), v[0].getTexCoordV(), v[0].getR(), v[0].getG(), v[0].getB(), v[0].getA()), ...
void function(float height){ Vertex[] v = this.getVerticesLocal(); switch (this.mode) { case MODE_EXPAND: this.setVertices(new Vertex[]{ new Vertex(v[0].x, 0, v[0].z, v[0].getTexCoordU(), v[0].getTexCoordV(), v[0].getR(), v[0].getG(), v[0].getB(), v[0].getA()), new Vertex(v[1].x, 0, v[1].z, v[1].getTexCoordU(), v[1].ge...
/** * Sets the height local. * * @param height the new height local */
Sets the height local
setHeightLocal
{ "repo_name": "Twelve-60/mt4j", "path": "src/org/mt4j/components/visibleComponents/widgets/MTTextArea.java", "license": "gpl-2.0", "size": 42156 }
[ "org.mt4j.components.visibleComponents.shapes.MTRectangle", "org.mt4j.util.MT4jSettings", "org.mt4j.util.math.Vertex" ]
import org.mt4j.components.visibleComponents.shapes.MTRectangle; import org.mt4j.util.MT4jSettings; import org.mt4j.util.math.Vertex;
import org.mt4j.components.*; import org.mt4j.util.*; import org.mt4j.util.math.*;
[ "org.mt4j.components", "org.mt4j.util" ]
org.mt4j.components; org.mt4j.util;
2,218,064
private List<Method> setters(Class<T> mappedClass, List<Field> fields) throws NoSuchMethodException { List<Method> methods = new ArrayList<>(fields.size()); for (Field field : fields) { methods.add(mappedClass.getMethod(setter(field), field.getType())); } return methods; }
List<Method> function(Class<T> mappedClass, List<Field> fields) throws NoSuchMethodException { List<Method> methods = new ArrayList<>(fields.size()); for (Field field : fields) { methods.add(mappedClass.getMethod(setter(field), field.getType())); } return methods; }
/** * Returns all set methods from the class. This method uses list of fields * which is used for retrieving set methods from the class. * * @param mappedClass A Class, which is used for retrieving information about constructors, set methods etc. * @param fields Fields of the class. * @return Set...
Returns all set methods from the class. This method uses list of fields which is used for retrieving set methods from the class
setters
{ "repo_name": "maseev/narwhal", "path": "src/main/java/org/narwhal/util/MappedClassInformation.java", "license": "mit", "size": 10627 }
[ "java.lang.reflect.Field", "java.lang.reflect.Method", "java.util.ArrayList", "java.util.List" ]
import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
603,423
public void setTrusted(Set<UUID> uuids) { if (uuids.size() == 0) { return; } if (trusted != null && trusted.size() > 0) { trusted.removeAll(uuids); for (UUID uuid : trusted) { DBFunc.removeTrusted(this, uuid); } trus...
void function(Set<UUID> uuids) { if (uuids.size() == 0) { return; } if (trusted != null && trusted.size() > 0) { trusted.removeAll(uuids); for (UUID uuid : trusted) { DBFunc.removeTrusted(this, uuid); } trusted.clear(); } for (UUID uuid : uuids) { addTrusted(uuid); } }
/** * Set the trusted users for this plot * @param uuids */
Set the trusted users for this plot
setTrusted
{ "repo_name": "PiLogic/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/object/Plot.java", "license": "gpl-3.0", "size": 28745 }
[ "com.intellectualcrafters.plot.database.DBFunc", "java.util.Set" ]
import com.intellectualcrafters.plot.database.DBFunc; import java.util.Set;
import com.intellectualcrafters.plot.database.*; import java.util.*;
[ "com.intellectualcrafters.plot", "java.util" ]
com.intellectualcrafters.plot; java.util;
2,797,844
public void setUser(User userParam) { this.user = userParam; }
void function(User userParam) { this.user = userParam; }
/** * Sets {@code User} responsible for historic entry. * * @param userParam Person or User responsible for historic data. */
Sets User responsible for historic entry
setUser
{ "repo_name": "Koekiebox-PTY-LTD/Fluid", "path": "fluid-api/src/main/java/com/fluidbpm/program/api/vo/historic/FormFlowHistoricData.java", "license": "gpl-3.0", "size": 9071 }
[ "com.fluidbpm.program.api.vo.user.User" ]
import com.fluidbpm.program.api.vo.user.User;
import com.fluidbpm.program.api.vo.user.*;
[ "com.fluidbpm.program" ]
com.fluidbpm.program;
1,908,264
@FIXVersion(introduced="4.2", retired="4.3") @TagNumRef(tagNum=TagNum.UnderlyingSecurityExchange) public void setUnderlyingSecurityExchange(String underlyingSecurityExchange) { getSafeUnderlyingInstrument().setUnderlyingSecurityExchange(underlyingSecurityExchange); }
@FIXVersion(introduced="4.2", retired="4.3") @TagNumRef(tagNum=TagNum.UnderlyingSecurityExchange) void function(String underlyingSecurityExchange) { getSafeUnderlyingInstrument().setUnderlyingSecurityExchange(underlyingSecurityExchange); }
/** * Message field setter. * @param underlyingSecurityExchange field value */
Message field setter
setUnderlyingSecurityExchange
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/QuoteSetGroup.java", "license": "gpl-3.0", "size": 37469 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,620,317
PagedIterable<Peering> list(String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context);
PagedIterable<Peering> list(String peeringLocation, LegacyPeeringsKind kind, Integer asn, Context context);
/** * Lists all of the legacy peerings under the given subscription matching the specified kind and location. * * @param peeringLocation The location of the peering. * @param kind The kind of the peering. * @param asn The ASN number associated with a legacy peering. * @param context The co...
Lists all of the legacy peerings under the given subscription matching the specified kind and location
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/models/LegacyPeerings.java", "license": "mit", "size": 1876 }
[ "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
2,667,918
public Object clone() throws CloneNotSupportedException { HighLowItemLabelGenerator clone = (HighLowItemLabelGenerator) super.clone(); if (this.dateFormatter != null) { clone.dateFormatter = (DateFormat) this.dateFormatter.clone(); } if (this.number...
Object function() throws CloneNotSupportedException { HighLowItemLabelGenerator clone = (HighLowItemLabelGenerator) super.clone(); if (this.dateFormatter != null) { clone.dateFormatter = (DateFormat) this.dateFormatter.clone(); } if (this.numberFormatter != null) { clone.numberFormatter = (NumberFormat) this.numberForm...
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */
Returns an independent copy of the generator
clone
{ "repo_name": "djun100/afreechart", "path": "src/org/afree/chart/labels/HighLowItemLabelGenerator.java", "license": "lgpl-3.0", "size": 8539 }
[ "java.text.DateFormat", "java.text.NumberFormat" ]
import java.text.DateFormat; import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
2,091,394
@Override public List<Writable> next() { if(!hasNext()){ //Also triggers prefetch throw new NoSuchElementException("No next element"); } List<Writable> out = next.getRecord(); next = null; return out; }
List<Writable> function() { if(!hasNext()){ throw new NoSuchElementException(STR); } List<Writable> out = next.getRecord(); next = null; return out; }
/** * Get the next record * * @return */
Get the next record
next
{ "repo_name": "deeplearning4j/DataVec", "path": "datavec-api/src/main/java/org/datavec/api/records/reader/impl/transform/TransformProcessRecordReader.java", "license": "apache-2.0", "size": 7941 }
[ "java.util.List", "java.util.NoSuchElementException", "org.datavec.api.writable.Writable" ]
import java.util.List; import java.util.NoSuchElementException; import org.datavec.api.writable.Writable;
import java.util.*; import org.datavec.api.writable.*;
[ "java.util", "org.datavec.api" ]
java.util; org.datavec.api;
2,644,229
public String bytesToCharArray(byte[] b) throws IOException;
String function(byte[] b) throws IOException;
/** * Cast data from bytearray to chararray value. * @param b bytearray to be cast. * @return String value. * @throws IOException if the value cannot be cast. */
Cast data from bytearray to chararray value
bytesToCharArray
{ "repo_name": "dmeister/pig-cll-gz", "path": "src/org/apache/pig/LoadCaster.java", "license": "apache-2.0", "size": 4270 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
378,248
public static <V> UninterruptibleFuture<V> makeUninterruptible( final Future<V> future) { checkNotNull(future); if (future instanceof UninterruptibleFuture) { return (UninterruptibleFuture<V>) future; }
static <V> UninterruptibleFuture<V> function( final Future<V> future) { checkNotNull(future); if (future instanceof UninterruptibleFuture) { return (UninterruptibleFuture<V>) future; }
/** * Returns an uninterruptible view of a {@code Future}. If a thread is * interrupted during an attempt to {@code get()} from the returned future, it * continues to wait on the result until it is available or the timeout * elapses, and only then re-interrupts the thread. */
Returns an uninterruptible view of a Future. If a thread is interrupted during an attempt to get() from the returned future, it continues to wait on the result until it is available or the timeout elapses, and only then re-interrupts the thread
makeUninterruptible
{ "repo_name": "rowboat/external-guava", "path": "src/com/google/common/util/concurrent/Futures.java", "license": "apache-2.0", "size": 21767 }
[ "com.google.common.base.Preconditions", "java.util.concurrent.Future" ]
import com.google.common.base.Preconditions; import java.util.concurrent.Future;
import com.google.common.base.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
475,336
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<NetworkFunctionInner>> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<NetworkFunctionInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR;...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked excepti...
Get the next page of items
listByResourceGroupNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/NetworkFunctionsClientImpl.java", "license": "mit", "size": 73783 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.hybridnetwork.fluent.models.NetworkFunctionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.hybridnetwork.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,836,500
@Test public void testTruncateNotCalledIfSizeIsBiggerThanTargetSize() throws IOException { FileChannel channelMock = mock(FileChannel.class); when(channelMock.size()).thenReturn(42L); FileRecords fileRecords = new FileRecords(tempFile(), channelMock, 0, Integer.MAX_VALUE, false); ...
void function() throws IOException { FileChannel channelMock = mock(FileChannel.class); when(channelMock.size()).thenReturn(42L); FileRecords fileRecords = new FileRecords(tempFile(), channelMock, 0, Integer.MAX_VALUE, false); try { fileRecords.truncateTo(43); fail(STR); } catch (KafkaException e) { } verify(channelMoc...
/** * Expect a KafkaException if targetSize is bigger than the size of * the FileRecords. */
Expect a KafkaException if targetSize is bigger than the size of the FileRecords
testTruncateNotCalledIfSizeIsBiggerThanTargetSize
{ "repo_name": "sslavic/kafka", "path": "clients/src/test/java/org/apache/kafka/common/record/FileRecordsTest.java", "license": "apache-2.0", "size": 31808 }
[ "java.io.IOException", "java.nio.channels.FileChannel", "org.apache.kafka.common.KafkaException", "org.junit.Assert", "org.mockito.Mockito" ]
import java.io.IOException; import java.nio.channels.FileChannel; import org.apache.kafka.common.KafkaException; import org.junit.Assert; import org.mockito.Mockito;
import java.io.*; import java.nio.channels.*; import org.apache.kafka.common.*; import org.junit.*; import org.mockito.*;
[ "java.io", "java.nio", "org.apache.kafka", "org.junit", "org.mockito" ]
java.io; java.nio; org.apache.kafka; org.junit; org.mockito;
2,703,914
Project project = projectService.read(projectId); Page<Join<Project, User>> usersForProject = userService.searchUsersForProject(project, tableRequest.getSearch(), tableRequest.getCurrent(), tableRequest.getPageSize(), tableRequest.getSort()); List<ProjectMemberTableModel> members = usersForProject.get() ....
Project project = projectService.read(projectId); Page<Join<Project, User>> usersForProject = userService.searchUsersForProject(project, tableRequest.getSearch(), tableRequest.getCurrent(), tableRequest.getPageSize(), tableRequest.getSort()); List<ProjectMemberTableModel> members = usersForProject.get() .map(join -> { ...
/** * Get a paged listing of project members passed on parameters set in the table request. * * @param projectId - identifier for the current project * @param tableRequest - details about the current page of the table * @return sorted and filtered list of project members */
Get a paged listing of project members passed on parameters set in the table request
getProjectMembers
{ "repo_name": "phac-nml/irida", "path": "src/main/java/ca/corefacility/bioinformatics/irida/ria/web/services/UIProjectMembersService.java", "license": "apache-2.0", "size": 6459 }
[ "ca.corefacility.bioinformatics.irida.model.joins.Join", "ca.corefacility.bioinformatics.irida.model.joins.impl.ProjectUserJoin", "ca.corefacility.bioinformatics.irida.model.project.Project", "ca.corefacility.bioinformatics.irida.model.user.User", "ca.corefacility.bioinformatics.irida.ria.web.models.tables....
import ca.corefacility.bioinformatics.irida.model.joins.Join; import ca.corefacility.bioinformatics.irida.model.joins.impl.ProjectUserJoin; import ca.corefacility.bioinformatics.irida.model.project.Project; import ca.corefacility.bioinformatics.irida.model.user.User; import ca.corefacility.bioinformatics.irida.ria.web....
import ca.corefacility.bioinformatics.irida.model.joins.*; import ca.corefacility.bioinformatics.irida.model.joins.impl.*; import ca.corefacility.bioinformatics.irida.model.project.*; import ca.corefacility.bioinformatics.irida.model.user.*; import ca.corefacility.bioinformatics.irida.ria.web.models.tables.*; import ca...
[ "ca.corefacility.bioinformatics", "java.util", "org.springframework.data" ]
ca.corefacility.bioinformatics; java.util; org.springframework.data;
282,647
public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException { throw Util.notImplemented(); }
void function(String parameterName, InputStream x, int length) throws SQLException { throw Util.notImplemented(); }
/** * JDBC 3.0 * * Sets the designated parameter to the given input stream, which will have the * specified number of bytes. * * @param parameterName - the name of the parameter * @param x - the Java input stream that contains the ASCII parameter value * @param length - the number of byt...
JDBC 3.0 Sets the designated parameter to the given input stream, which will have the specified number of bytes
setAsciiStream
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement20.java", "license": "apache-2.0", "size": 39293 }
[ "java.io.InputStream", "java.sql.SQLException", "org.apache.derby.impl.jdbc.Util" ]
import java.io.InputStream; import java.sql.SQLException; import org.apache.derby.impl.jdbc.Util;
import java.io.*; import java.sql.*; import org.apache.derby.impl.jdbc.*;
[ "java.io", "java.sql", "org.apache.derby" ]
java.io; java.sql; org.apache.derby;
1,564,370
Map<K, V> entriesInCommon();
Map<K, V> entriesInCommon();
/** * Returns an unmodifiable map containing the entries that appear in both * maps; that is, the intersection of the two maps. */
Returns an unmodifiable map containing the entries that appear in both maps; that is, the intersection of the two maps
entriesInCommon
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/externals/guava/src/main/java/com/google/common/collect/MapDifference.java", "license": "apache-2.0", "size": 3459 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,769,574
EntityCacheUtil.putResult(threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED, threat_subcategories_lkpImpl.class, threat_subcategories_lkp.getPrimaryKey(), threat_subcategories_lkp); threat_subcategories_lkp.resetOriginalValues(); }
EntityCacheUtil.putResult(threat_subcategories_lkpModelImpl.ENTITY_CACHE_ENABLED, threat_subcategories_lkpImpl.class, threat_subcategories_lkp.getPrimaryKey(), threat_subcategories_lkp); threat_subcategories_lkp.resetOriginalValues(); }
/** * Caches the threat_subcategories_lkp in the entity cache if it is enabled. * * @param threat_subcategories_lkp the threat_subcategories_lkp */
Caches the threat_subcategories_lkp in the entity cache if it is enabled
cacheResult
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/threat_subcategories_lkpPersistenceImpl.java", "license": "gpl-2.0", "size": 36809 }
[ "com.liferay.portal.kernel.dao.orm.EntityCacheUtil" ]
import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
import com.liferay.portal.kernel.dao.orm.*;
[ "com.liferay.portal" ]
com.liferay.portal;
795,899
return new Predicate<T>() {
return new Predicate<T>() {
/** * Just for the Collections. * * @param <T> The input. * @return true if the input collection is not empty. * @throws ClassCastException If the input is not an instance of Collection. */
Just for the Collections
notEmpty
{ "repo_name": "drakeet/rebase-android", "path": "app/src/main/java/com/drakeet/rebase/tool/RxFilters.java", "license": "gpl-3.0", "size": 1933 }
[ "io.reactivex.functions.Predicate" ]
import io.reactivex.functions.Predicate;
import io.reactivex.functions.*;
[ "io.reactivex.functions" ]
io.reactivex.functions;
329,153
private void updateFakeMenuButtonsVisibility(boolean visible) { // Note: Landscape mode does not have the fake menu and search buttons. if (DEBUG) { Log.d(TAG, "updateFakeMenuButtonVisibility(" + visible + ")"); } if (mSearchButton != null) { if (visible) { ...
void function(boolean visible) { if (DEBUG) { Log.d(TAG, STR + visible + ")"); } if (mSearchButton != null) { if (visible) { mSearchButton.setVisibility(View.VISIBLE); } else { mSearchButton.setVisibility(View.INVISIBLE); } } if (mMenuButton != null) { if (visible && !ViewConfiguration.get(this).hasPermanentMenuKey()) ...
/** * Update visibility of the search button and menu button at the bottom. * They should be invisible when bottom ActionBar's real items are available, and be visible * otherwise. * * @param visible True when visible. */
Update visibility of the search button and menu button at the bottom. They should be invisible when bottom ActionBar's real items are available, and be visible otherwise
updateFakeMenuButtonsVisibility
{ "repo_name": "antoniobustorff/coursera-android-examples", "path": "week2/AppFundamentalsVideoSourceExamples/src/main/java/DialtactsActivity.java", "license": "mit", "size": 52958 }
[ "android.util.Log", "android.view.View", "android.view.ViewConfiguration" ]
import android.util.Log; import android.view.View; import android.view.ViewConfiguration;
import android.util.*; import android.view.*;
[ "android.util", "android.view" ]
android.util; android.view;
2,182,240
protected Fieldable createFulltextField( InternalValue value, Metadata metadata, boolean withNorms) { return new LazyTextExtractorField(parser, value, metadata, executor, supportHighlighting, getMaxExtractLength(), withNorms); }
Fieldable function( InternalValue value, Metadata metadata, boolean withNorms) { return new LazyTextExtractorField(parser, value, metadata, executor, supportHighlighting, getMaxExtractLength(), withNorms); }
/** * Creates a fulltext field for the reader <code>value</code>. * * @param value the binary value * @param metadata document metatadata * @param withNorms if norm information should be added for this value * @return a lucene field. */
Creates a fulltext field for the reader <code>value</code>
createFulltextField
{ "repo_name": "sdmcraft/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java", "license": "apache-2.0", "size": 41332 }
[ "org.apache.jackrabbit.core.value.InternalValue", "org.apache.lucene.document.Fieldable", "org.apache.tika.metadata.Metadata" ]
import org.apache.jackrabbit.core.value.InternalValue; import org.apache.lucene.document.Fieldable; import org.apache.tika.metadata.Metadata;
import org.apache.jackrabbit.core.value.*; import org.apache.lucene.document.*; import org.apache.tika.metadata.*;
[ "org.apache.jackrabbit", "org.apache.lucene", "org.apache.tika" ]
org.apache.jackrabbit; org.apache.lucene; org.apache.tika;
303,397
private int amountToScroll(int direction, int nextSelectedPosition) { forceValidFocusDirection(direction); final int numChildren = getChildCount(); if (direction == View.FOCUS_DOWN || direction == View.FOCUS_RIGHT) { final int end = getEndEdge(); int indexToMakeVis...
int function(int direction, int nextSelectedPosition) { forceValidFocusDirection(direction); final int numChildren = getChildCount(); if (direction == View.FOCUS_DOWN direction == View.FOCUS_RIGHT) { final int end = getEndEdge(); int indexToMakeVisible = numChildren - 1; if (nextSelectedPosition != INVALID_POSITION) { ...
/** * Determine how much we need to scroll in order to get the next selected view * visible. The amount is capped at {@link #getMaxScrollAmount()}. * * @param direction either {@link View#FOCUS_UP} or {@link View#FOCUS_DOWN} or * {@link View#FOCUS_LEFT} or {@link View#FOCUS_RIGHT} depend...
Determine how much we need to scroll in order to get the next selected view visible. The amount is capped at <code>#getMaxScrollAmount()</code>
amountToScroll
{ "repo_name": "mkodekar/Fennece-Browser", "path": "base/widget/TwoWayView.java", "license": "mpl-2.0", "size": 249909 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,669,432
private static void alterTable(Table t, Hive db, boolean isMM) throws HiveException, InvalidOperationException { org.apache.hadoop.hive.ql.metadata.Table metaTable = //clone to make sure new prop doesn't leak new org.apache.hadoop.hive.ql.metadata.Table(t.deepCopy()); metaTable.getParame...
static void function(Table t, Hive db, boolean isMM) throws HiveException, InvalidOperationException { org.apache.hadoop.hive.ql.metadata.Table metaTable = new org.apache.hadoop.hive.ql.metadata.Table(t.deepCopy()); metaTable.getParameters().put(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, "true"); if(isMM) { metaTa...
/** * Actually makes the table transactional */
Actually makes the table transactional
alterTable
{ "repo_name": "alanfgates/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/util/UpgradeTool.java", "license": "apache-2.0", "size": 28588 }
[ "org.apache.hadoop.hive.common.StatsSetupConst", "org.apache.hadoop.hive.metastore.Warehouse", "org.apache.hadoop.hive.metastore.api.EnvironmentContext", "org.apache.hadoop.hive.metastore.api.InvalidOperationException", "org.apache.hadoop.hive.metastore.api.Table", "org.apache.hadoop.hive.ql.metadata.Hive...
import org.apache.hadoop.hive.common.StatsSetupConst; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.EnvironmentContext; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive...
import org.apache.hadoop.hive.common.*; import org.apache.hadoop.hive.metastore.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.ql.metadata.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,403,612
void setProofRef(ProofEntry value);
void setProofRef(ProofEntry value);
/** * Sets the value of the '{@link org.ai4fm.proofprocess.log.ProofActivity#getProofRef <em>Proof Ref</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Proof Ref</em>' reference. * @see #getProofRef() * @generated */
Sets the value of the '<code>org.ai4fm.proofprocess.log.ProofActivity#getProofRef Proof Ref</code>' reference.
setProofRef
{ "repo_name": "andriusvelykis/proofprocess", "path": "org.ai4fm.proofprocess.project/src/org/ai4fm/proofprocess/log/ProofActivity.java", "license": "epl-1.0", "size": 1449 }
[ "org.ai4fm.proofprocess.ProofEntry" ]
import org.ai4fm.proofprocess.ProofEntry;
import org.ai4fm.proofprocess.*;
[ "org.ai4fm.proofprocess" ]
org.ai4fm.proofprocess;
94,361
@Test public void testLoadConfigurationWithoutHomeFolderRaisesException(){ try { new ConfLoader(); Assert.fail("An Exception was expected"); } catch (Exception e) { Assert.assertEquals("The reports.home env variable should be specified at start up", e.getMessa...
void function(){ try { new ConfLoader(); Assert.fail(STR); } catch (Exception e) { Assert.assertEquals(STR, e.getMessage()); } }
/** * Validates the situation when the class is loaded without * a report home folder be specified. */
Validates the situation when the class is loaded without a report home folder be specified
testLoadConfigurationWithoutHomeFolderRaisesException
{ "repo_name": "Ohtar10/jrepman", "path": "src/test/java/org/jrepman/unit/confloader/ConfLoaderTest.java", "license": "mit", "size": 2134 }
[ "org.jrepman.confloader.ConfLoader", "org.junit.Assert" ]
import org.jrepman.confloader.ConfLoader; import org.junit.Assert;
import org.jrepman.confloader.*; import org.junit.*;
[ "org.jrepman.confloader", "org.junit" ]
org.jrepman.confloader; org.junit;
2,657,030
@Override public synchronized void terminate(IOException e) { super.terminate(e); ProcessTree pt = ProcessTree.get(); try { pt.killAll(proc,cookie); } catch (InterruptedException x) { ...
synchronized void function(IOException e) { super.terminate(e); ProcessTree pt = ProcessTree.get(); try { pt.killAll(proc,cookie); } catch (InterruptedException x) { LOGGER.log(Level.INFO, STR, x); } }
/** * Kill the process when the channel is severed. */
Kill the process when the channel is severed
terminate
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/Launcher.java", "license": "mit", "size": 54430 }
[ "hudson.util.ProcessTree", "java.io.IOException", "java.util.logging.Level" ]
import hudson.util.ProcessTree; import java.io.IOException; import java.util.logging.Level;
import hudson.util.*; import java.io.*; import java.util.logging.*;
[ "hudson.util", "java.io", "java.util" ]
hudson.util; java.io; java.util;
838,138
Connection conn = null; try { Class.forName("oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "system", "admin123"); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.p...
Connection conn = null; try { Class.forName(STR); conn = DriverManager.getConnection(STR, STR, STR); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } return conn; }
/** * Gets database connection * @return */
Gets database connection
getConn
{ "repo_name": "MNLBC/Group2Projects", "path": "6. Ziegfreid Morissey Flameno/W2D2_Homework/Codes/HomeworkW2D2/src/com/oocl/mnlbc/JDBCOperations.java", "license": "gpl-3.0", "size": 4133 }
[ "java.sql.Connection", "java.sql.DriverManager", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,054,697
private static void loadPlugins() { String[] apksInDirectory = PLUGIN_DIRECTORY_PATH .list(PLUGIN_FILENAME_FILTER); if (apksInDirectory == null || apksInDirectory.length == 0){ IntroController.startIntro(!mInstalledPlugins.isEmpty()); return; } // Map to store all plugins with their...
static void function() { String[] apksInDirectory = PLUGIN_DIRECTORY_PATH .list(PLUGIN_FILENAME_FILTER); if (apksInDirectory == null apksInDirectory.length == 0){ IntroController.startIntro(!mInstalledPlugins.isEmpty()); return; } HashMap<String, PluginInfo> pluginVersionMap = new HashMap<String, PluginInfo>(); for (St...
/** * Loads all plugins from SD card, compares version strings for plugins with * same names and loads the most recent plugin. * * The plugin name is the filename without its ending and without optional * version string. A version string is introduced by a hyphen, following * dot-separated numbers, e...
Loads all plugins from SD card, compares version strings for plugins with same names and loads the most recent plugin. The plugin name is the filename without its ending and without optional version string. A version string is introduced by a hyphen, following dot-separated numbers, e.g. "-1.2.3"
loadPlugins
{ "repo_name": "52North/geoar-app", "path": "src/main/java/org/n52/geoar/newdata/PluginLoader.java", "license": "apache-2.0", "size": 16971 }
[ "java.io.File", "java.util.HashMap", "org.n52.geoar.ar.view.IntroController" ]
import java.io.File; import java.util.HashMap; import org.n52.geoar.ar.view.IntroController;
import java.io.*; import java.util.*; import org.n52.geoar.ar.view.*;
[ "java.io", "java.util", "org.n52.geoar" ]
java.io; java.util; org.n52.geoar;
1,590,919
public static com.azure.search.documents.indexes.implementation.models.SearchIndex map(SearchIndex obj) { if (obj == null) { return null; } Objects.requireNonNull(obj.getName(), "The SearchIndex name cannot be null"); List<com.azure.search.documents.indexes.implementation...
static com.azure.search.documents.indexes.implementation.models.SearchIndex function(SearchIndex obj) { if (obj == null) { return null; } Objects.requireNonNull(obj.getName(), STR); List<com.azure.search.documents.indexes.implementation.models.SearchField> fields = obj.getFields() == null ? null : obj.getFields().strea...
/** * Maps from {@link SearchIndex} to {@link com.azure.search.documents.indexes.implementation.models.SearchIndex}. */
Maps from <code>SearchIndex</code> to <code>com.azure.search.documents.indexes.implementation.models.SearchIndex</code>
map
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/converters/SearchIndexConverter.java", "license": "mit", "size": 7825 }
[ "com.azure.search.documents.indexes.models.CharFilter", "com.azure.search.documents.indexes.models.LexicalAnalyzer", "com.azure.search.documents.indexes.models.LexicalTokenizer", "com.azure.search.documents.indexes.models.ScoringProfile", "com.azure.search.documents.indexes.models.SearchField", "com.azure...
import com.azure.search.documents.indexes.models.CharFilter; import com.azure.search.documents.indexes.models.LexicalAnalyzer; import com.azure.search.documents.indexes.models.LexicalTokenizer; import com.azure.search.documents.indexes.models.ScoringProfile; import com.azure.search.documents.indexes.models.SearchField;...
import com.azure.search.documents.indexes.models.*; import java.util.*; import java.util.stream.*;
[ "com.azure.search", "java.util" ]
com.azure.search; java.util;
169,991
public static void alterChannel(int channelIndex, byte bits) { MidiChannel channel = midiSynthesizer.getChannels()[channelIndex]; channel.setSolo((bits & 0b0001) == 0b0001); channel.setOmni((bits & 0b0010) == 0b0010); channel.setMute((bits & 0b0100) == 0b0100); channel.setMono((bits & 0b1000) == 0b1000); ...
static void function(int channelIndex, byte bits) { MidiChannel channel = midiSynthesizer.getChannels()[channelIndex]; channel.setSolo((bits & 0b0001) == 0b0001); channel.setOmni((bits & 0b0010) == 0b0010); channel.setMute((bits & 0b0100) == 0b0100); channel.setMono((bits & 0b1000) == 0b1000); }
/** * Alters the channels characteristics according to the bits in the bitmask * passed. Note that you must change all of the characteristics at once. * * @param channelIndex * - The channel to target. * @param bits * - The characteristics to enable/disable. */
Alters the channels characteristics according to the bits in the bitmask passed. Note that you must change all of the characteristics at once
alterChannel
{ "repo_name": "TheBrenny/JUMG", "path": "JUMG/src/com/brennytizer/jumg/sound/SoundSynthesizer.java", "license": "gpl-3.0", "size": 5569 }
[ "javax.sound.midi.MidiChannel" ]
import javax.sound.midi.MidiChannel;
import javax.sound.midi.*;
[ "javax.sound" ]
javax.sound;
130,932
@SuppressWarnings("unchecked") public Element getChild(String name, Namespace ns) { List elements = content.getView(new ElementFilter(name, ns)); Iterator i = elements.iterator(); if (i.hasNext()) { return (Element) i.next(); } return null; }
@SuppressWarnings(STR) Element function(String name, Namespace ns) { List elements = content.getView(new ElementFilter(name, ns)); Iterator i = elements.iterator(); if (i.hasNext()) { return (Element) i.next(); } return null; }
/** * This returns the first child element within this element with the * given local name and belonging to the given namespace. * If no elements exist for the specified name and namespace, null is * returned. * * @param name local name of child element to match * @param ns <code>Name...
This returns the first child element within this element with the given local name and belonging to the given namespace. If no elements exist for the specified name and namespace, null is returned
getChild
{ "repo_name": "roboidstudio/embedded", "path": "org.jdom/src/org/jdom/Element.java", "license": "lgpl-2.1", "size": 58137 }
[ "java.util.Iterator", "java.util.List", "org.jdom.filter.ElementFilter" ]
import java.util.Iterator; import java.util.List; import org.jdom.filter.ElementFilter;
import java.util.*; import org.jdom.filter.*;
[ "java.util", "org.jdom.filter" ]
java.util; org.jdom.filter;
2,189,840
public BigDataPoolResourceInfoInner withCustomLibraries(List<LibraryInfo> customLibraries) { if (this.innerProperties() == null) { this.innerProperties = new BigDataPoolResourceProperties(); } this.innerProperties().withCustomLibraries(customLibraries); return this; }
BigDataPoolResourceInfoInner function(List<LibraryInfo> customLibraries) { if (this.innerProperties() == null) { this.innerProperties = new BigDataPoolResourceProperties(); } this.innerProperties().withCustomLibraries(customLibraries); return this; }
/** * Set the customLibraries property: List of custom libraries/packages associated with the spark pool. * * @param customLibraries the customLibraries value to set. * @return the BigDataPoolResourceInfoInner object itself. */
Set the customLibraries property: List of custom libraries/packages associated with the spark pool
withCustomLibraries
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java", "license": "mit", "size": 16850 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,489,072
public void setRequiredParameterDescriptions(Map<String, String> requiredParameterDescriptions) { m_requiredParameterDescriptions = requiredParameterDescriptions; }
void function(Map<String, String> requiredParameterDescriptions) { m_requiredParameterDescriptions = requiredParameterDescriptions; }
/** * This method sets the required parameter descriptions {@link Map}. * * @param requiredParameterDescriptions the parameter description {@link Map} to be set */
This method sets the required parameter descriptions <code>Map</code>
setRequiredParameterDescriptions
{ "repo_name": "rfdrake/opennms", "path": "features/vaadin-dashboard/src/main/java/org/opennms/features/vaadin/dashboard/model/AbstractDashletFactory.java", "license": "gpl-2.0", "size": 7685 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,687,769
public void deleteLogEntries(CmsRequestContext context, CmsLogFilter filter) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkRole(dbc, CmsRole.WORKPLACE_MANAGER); m_driverManager.deleteLogEntries(dbc, filter); } catch (Ex...
void function(CmsRequestContext context, CmsLogFilter filter) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkRole(dbc, CmsRole.WORKPLACE_MANAGER); m_driverManager.deleteLogEntries(dbc, filter); } catch (Exception e) { dbc.report(null, Messages.get().container(Messages.ERR_...
/** * Deletes all log entries matching the given filter.<p> * * @param context the current user context * @param filter the filter to use for deletion * * @throws CmsException if something goes wrong * * @see #getLogEntries(CmsRequestContext, CmsLogFilter) * @see CmsObject#d...
Deletes all log entries matching the given filter
deleteLogEntries
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/db/CmsSecurityManager.java", "license": "lgpl-2.1", "size": 287876 }
[ "org.opencms.db.log.CmsLogFilter", "org.opencms.file.CmsRequestContext", "org.opencms.main.CmsException", "org.opencms.security.CmsRole" ]
import org.opencms.db.log.CmsLogFilter; import org.opencms.file.CmsRequestContext; import org.opencms.main.CmsException; import org.opencms.security.CmsRole;
import org.opencms.db.log.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*;
[ "org.opencms.db", "org.opencms.file", "org.opencms.main", "org.opencms.security" ]
org.opencms.db; org.opencms.file; org.opencms.main; org.opencms.security;
2,580,039
protected boolean processValidation(EquipmentLoanOrReturnDocument equipmentLoanOrReturnDocument) { boolean valid = true; if (equipmentLoanOrReturnDocument.getBorrowerPerson() == null) { valid &= false; GlobalVariables.getMessageMap().putError(KFSConstants.DOCUMENT_PROPERTY_NA...
boolean function(EquipmentLoanOrReturnDocument equipmentLoanOrReturnDocument) { boolean valid = true; if (equipmentLoanOrReturnDocument.getBorrowerPerson() == null) { valid &= false; GlobalVariables.getMessageMap().putError(KFSConstants.DOCUMENT_PROPERTY_NAME + "." + CamsPropertyConstants.EquipmentLoanOrReturnDocument....
/** * This method applies business rules * * @param document equipmentLoanOrReturnDocument Document * @return true if all rules are pass */
This method applies business rules
processValidation
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/validation/impl/EquipmentLoanOrReturnDocumentRule.java", "license": "agpl-3.0", "size": 12293 }
[ "org.kuali.kfs.module.cam.CamsKeyConstants", "org.kuali.kfs.module.cam.CamsPropertyConstants", "org.kuali.kfs.module.cam.document.EquipmentLoanOrReturnDocument", "org.kuali.kfs.sys.KFSConstants", "org.kuali.rice.krad.util.GlobalVariables" ]
import org.kuali.kfs.module.cam.CamsKeyConstants; import org.kuali.kfs.module.cam.CamsPropertyConstants; import org.kuali.kfs.module.cam.document.EquipmentLoanOrReturnDocument; import org.kuali.kfs.sys.KFSConstants; import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.kfs.module.cam.*; import org.kuali.kfs.module.cam.document.*; import org.kuali.kfs.sys.*; import org.kuali.rice.krad.util.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
763,317
public void addTo(User u) throws IOException { FederatedLoginServiceUserProperty p = u.getProperty(getUserPropertyClass()); if (p==null) { p = (FederatedLoginServiceUserProperty) UserProperty.all().find(getUserPropertyClass()).newInstance(u); u.addProperty...
void function(User u) throws IOException { FederatedLoginServiceUserProperty p = u.getProperty(getUserPropertyClass()); if (p==null) { p = (FederatedLoginServiceUserProperty) UserProperty.all().find(getUserPropertyClass()).newInstance(u); u.addProperty(p); } p.addIdentifier(getIdentifier()); }
/** * Adds this identity to the specified user. */
Adds this identity to the specified user
addTo
{ "repo_name": "oleg-nenashev/jenkins", "path": "core/src/main/java/hudson/security/FederatedLoginService.java", "license": "mit", "size": 10580 }
[ "hudson.model.User", "hudson.model.UserProperty", "java.io.IOException" ]
import hudson.model.User; import hudson.model.UserProperty; import java.io.IOException;
import hudson.model.*; import java.io.*;
[ "hudson.model", "java.io" ]
hudson.model; java.io;
1,219,607
public Folder getParent() throws MessagingException { return store.getFolder(maildir.getParent()); }
Folder function() throws MessagingException { return store.getFolder(maildir.getParent()); }
/** * Returns the parent folder. */
Returns the parent folder
getParent
{ "repo_name": "imoseyon/leanKernel-d2usc-deprecated", "path": "vendor/samsung/common/packages/apps/Email/lib_Src/mail-1.1.2/source/gnu/mail/providers/maildir/MaildirFolder.java", "license": "gpl-2.0", "size": 21707 }
[ "javax.mail.Folder", "javax.mail.MessagingException" ]
import javax.mail.Folder; import javax.mail.MessagingException;
import javax.mail.*;
[ "javax.mail" ]
javax.mail;
1,049,999
public void setEmbeddedStyle(boolean embedded) { if (embedded) { addStyleName(style.embedded()); addStyleName(FontSizer.getNormalFontSizeClass()); chunkOutputSize_ = ChunkOutputSize.Natural; } else { removeStyleName(style.embedded()); remo...
void function(boolean embedded) { if (embedded) { addStyleName(style.embedded()); addStyleName(FontSizer.getNormalFontSizeClass()); chunkOutputSize_ = ChunkOutputSize.Natural; } else { removeStyleName(style.embedded()); removeStyleName(FontSizer.getNormalFontSizeClass()); } }
/** * Enable or disable the embedded style (for embedded editor instances) * * @param embedded Whether to enable the embedded style. */
Enable or disable the embedded style (for embedded editor instances)
setEmbeddedStyle
{ "repo_name": "JanMarvin/rstudio", "path": "src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/text/ChunkOutputWidget.java", "license": "agpl-3.0", "size": 31530 }
[ "org.rstudio.core.client.widget.FontSizer" ]
import org.rstudio.core.client.widget.FontSizer;
import org.rstudio.core.client.widget.*;
[ "org.rstudio.core" ]
org.rstudio.core;
868,247
public void openDiskAtRoot(final CatalogDisk disk) { Objects.requireNonNull(disk, "disk"); this.openDiskAtDirectory(disk, disk.getFilesystemRoot()); }
void function(final CatalogDisk disk) { Objects.requireNonNull(disk, "disk"); this.openDiskAtDirectory(disk, disk.getFilesystemRoot()); }
/** * Load the entries of the root directory of the given disk into the table model. * * @param disk The disk */
Load the entries of the root directory of the given disk into the table model
openDiskAtRoot
{ "repo_name": "io7m/jwhere", "path": "com.io7m.jwhere.gui/src/main/java/com/io7m/jwhere/gui/model/CatalogDiskTableModel.java", "license": "isc", "size": 10320 }
[ "com.io7m.jwhere.core.CatalogDisk", "java.util.Objects" ]
import com.io7m.jwhere.core.CatalogDisk; import java.util.Objects;
import com.io7m.jwhere.core.*; import java.util.*;
[ "com.io7m.jwhere", "java.util" ]
com.io7m.jwhere; java.util;
2,667,897
private void resolveStaticMethodsUsingImports(Expression expression) { if (expression instanceof MethodCallExpr) { MethodCallExpr methodCall = ((MethodCallExpr) expression); String methodName = methodCall.getName().getIdentifier(); if (!methodCall.getScope().isPresent() && context.hasStaticMetho...
void function(Expression expression) { if (expression instanceof MethodCallExpr) { MethodCallExpr methodCall = ((MethodCallExpr) expression); String methodName = methodCall.getName().getIdentifier(); if (!methodCall.getScope().isPresent() && context.hasStaticMethod(methodName)) { methodCall.setName(context.getFullyQual...
/** * Resolve static method calls using static imports * * @param expression The expression to resolve */
Resolve static method calls using static imports
resolveStaticMethodsUsingImports
{ "repo_name": "Axellience/vue-gwt", "path": "processors/src/main/java/com/axellience/vuegwt/processors/component/template/parser/TemplateParser.java", "license": "mit", "size": 32821 }
[ "com.github.javaparser.ast.expr.Expression", "com.github.javaparser.ast.expr.MethodCallExpr" ]
import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.expr.MethodCallExpr;
import com.github.javaparser.ast.expr.*;
[ "com.github.javaparser" ]
com.github.javaparser;
2,363,139
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<DiagnosticContractInner> listByServiceAsync( String resourceGroupName, String serviceName, String apiId) { final String filter = null; final Integer top = null; final Integer skip = null; return new PagedFl...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<DiagnosticContractInner> function( String resourceGroupName, String serviceName, String apiId) { final String filter = null; final Integer top = null; final Integer skip = null; return new PagedFlux<>( () -> listByServiceSinglePageAsync(resourceGroupName, servic...
/** * Lists all diagnostics of an API. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param apiId API identifier. Must be unique in the current API Management service instance. * @throws IllegalArgumentException ...
Lists all diagnostics of an API
listByServiceAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/ApiDiagnosticsClientImpl.java", "license": "mit", "size": 78960 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.apimanagement.fluent.models.DiagnosticContractInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.apimanagement.fluent.models.DiagnosticContractInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,698,707