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
private Boolean hasPermission(String permissionMapKey, String identifier, IWApplicationContext iwac, String permissionKey, List groups) throws SQLException { if (identifier != null) { PermissionMap permissionMap = (PermissionMap) iwac.getApplicationAttribute( permissionMapKey); if (permissionMap == n...
Boolean function(String permissionMapKey, String identifier, IWApplicationContext iwac, String permissionKey, List groups) throws SQLException { if (identifier != null) { PermissionMap permissionMap = (PermissionMap) iwac.getApplicationAttribute( permissionMapKey); if (permissionMap == null) { updatePermissions(permiss...
/** * The permissionchecking ends in this method. * * @param permissionMapKey * @param identifier * @param iwac * @param permissionKey * @param groups * @return Boolean * @throws SQLException */
The permissionchecking ends in this method
hasPermission
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/accesscontrol/business/PermissionCacher.java", "license": "gpl-3.0", "size": 24830 }
[ "com.idega.idegaweb.IWApplicationContext", "java.sql.SQLException", "java.util.List" ]
import com.idega.idegaweb.IWApplicationContext; import java.sql.SQLException; import java.util.List;
import com.idega.idegaweb.*; import java.sql.*; import java.util.*;
[ "com.idega.idegaweb", "java.sql", "java.util" ]
com.idega.idegaweb; java.sql; java.util;
2,189,717
public void testDrainToNullN() { final BlockingQueue q = emptyCollection(); try { q.drainTo(null, 0); shouldThrow(); } catch (NullPointerException success) {} }
void function() { final BlockingQueue q = emptyCollection(); try { q.drainTo(null, 0); shouldThrow(); } catch (NullPointerException success) {} }
/** * drainTo(null, n) throws NullPointerException */
drainTo(null, n) throws NullPointerException
testDrainToNullN
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/BlockingQueueTest.java", "license": "gpl-2.0", "size": 13661 }
[ "java.util.concurrent.BlockingQueue" ]
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,172,687
private static ILogger createLogger(final Class<?> clazz) { return LoggerUtils.logger(clazz); }
static ILogger function(final Class<?> clazz) { return LoggerUtils.logger(clazz); }
/** * Creates the logger. * * @param clazz The class. * @return The created logger instance. */
Creates the logger
createLogger
{ "repo_name": "metaborg/spoofax-intellij", "path": "spoofax-common/src/main/java/org/metaborg/intellij/logging/MetaborgLoggerMembersInjector.java", "license": "apache-2.0", "size": 2149 }
[ "org.metaborg.util.log.ILogger", "org.metaborg.util.log.LoggerUtils" ]
import org.metaborg.util.log.ILogger; import org.metaborg.util.log.LoggerUtils;
import org.metaborg.util.log.*;
[ "org.metaborg.util" ]
org.metaborg.util;
1,543,556
private JScrollPane getActiveAggList() { if (ActiveAggList == null) { ActiveAggList = new JScrollPane(); ActiveAggList.setViewportView(getActiveAggTable()); } return ActiveAggList; }
JScrollPane function() { if (ActiveAggList == null) { ActiveAggList = new JScrollPane(); ActiveAggList.setViewportView(getActiveAggTable()); } return ActiveAggList; }
/** * This method initializes ActiveAggList * * @return javax.swing.JScrollPane */
This method initializes ActiveAggList
getActiveAggList
{ "repo_name": "dmcennis/jMir", "path": "jMIR_2_4_developer/jAudio/src/jAudioFeatureExtractor/AggregatorFrame.java", "license": "gpl-2.0", "size": 8953 }
[ "javax.swing.JScrollPane" ]
import javax.swing.JScrollPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,963,071
private void buildSparseInputStreams() throws IOException { final List<InputStream> streams = new ArrayList<>(); final List<TarArchiveStructSparse> sparseHeaders = currEntry.getOrderedSparseHeaders(); // Stream doesn't need to be closed at all as it doesn't use any resources final ...
void function() throws IOException { final List<InputStream> streams = new ArrayList<>(); final List<TarArchiveStructSparse> sparseHeaders = currEntry.getOrderedSparseHeaders(); final InputStream zeroInputStream = new TarArchiveSparseZeroInputStream(); long offset = 0; long numberOfZeroBytesInSparseEntry = 0; for (TarA...
/** * Build the input streams consisting of all-zero input streams and non-zero input streams. * When reading from the non-zero input streams, the data is actually read from the original input stream. * The size of each input stream is introduced by the sparse headers. * * @implNote Some all-ze...
Build the input streams consisting of all-zero input streams and non-zero input streams. When reading from the non-zero input streams, the data is actually read from the original input stream. The size of each input stream is introduced by the sparse headers
buildSparseInputStreams
{ "repo_name": "apache/commons-compress", "path": "src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java", "license": "apache-2.0", "size": 29365 }
[ "java.io.IOException", "java.io.InputStream", "java.util.ArrayList", "java.util.List", "org.apache.commons.compress.utils.BoundedInputStream", "org.apache.commons.compress.utils.BoundedSeekableByteChannelInputStream" ]
import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import org.apache.commons.compress.utils.BoundedInputStream; import org.apache.commons.compress.utils.BoundedSeekableByteChannelInputStream;
import java.io.*; import java.util.*; import org.apache.commons.compress.utils.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
1,267,779
@ApiModelProperty(value = "A size of the output file.") public Long getFileSize() { return fileSize; }
@ApiModelProperty(value = STR) Long function() { return fileSize; }
/** * A size of the output file. * @return fileSize **/
A size of the output file
getFileSize
{ "repo_name": "Telestream/telestream-cloud-java-sdk", "path": "telestream-cloud-flip-sdk/src/main/java/net/telestream/cloud/flip/Encoding.java", "license": "mit", "size": 21436 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
987,358
@Subscribe public void onGameAborted(final GameAbortedEvent gameAbortedEvent) { this.websocketHandler.gameAborted(gameAbortedEvent.getQueue()); }
void function(final GameAbortedEvent gameAbortedEvent) { this.websocketHandler.gameAborted(gameAbortedEvent.getQueue()); }
/** * Listen to {@link GameAbortedEvent} and sent it through websocket. * * @param gameAbortedEvent the event */
Listen to <code>GameAbortedEvent</code> and sent it through websocket
onGameAborted
{ "repo_name": "TeeFun/TeeFun", "path": "src/main/java/com/teefun/bean/websocket/WebSocketEventTunneler.java", "license": "gpl-2.0", "size": 2508 }
[ "com.teefun.events.event.GameAbortedEvent" ]
import com.teefun.events.event.GameAbortedEvent;
import com.teefun.events.event.*;
[ "com.teefun.events" ]
com.teefun.events;
1,684,090
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) @EntityProperty public void setState( State setter ) { curState = setter; } @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) @EntityProperty public State getState() { return curState; }
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) void function( State setter ) { curState = setter; } @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) public State getState() { return curState; }
/** * sets the state of the current job * @param setter state of the job */
sets the state of the current job
setState
{ "repo_name": "mdunker/usergrid", "path": "stack/core/src/main/java/org/apache/usergrid/persistence/entities/Import.java", "license": "apache-2.0", "size": 3109 }
[ "org.codehaus.jackson.map.annotate.JsonSerialize" ]
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.*;
[ "org.codehaus.jackson" ]
org.codehaus.jackson;
1,927,929
@SuppressWarnings("unused") private void writeQNameAttribute(final java.lang.String namespace, final java.lang.String attName, final javax.xml.namespace.QName qname, final javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { final java.lang.String attribut...
@SuppressWarnings(STR) void function(final java.lang.String namespace, final java.lang.String attName, final javax.xml.namespace.QName qname, final javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { final java.lang.String attributeNamespace = qname.getNamespaceURI(); java.lang.Stri...
/** * Util method to write an attribute without the ns prefix */
Util method to write an attribute without the ns prefix
writeQNameAttribute
{ "repo_name": "fincatto/nfe", "path": "src/main/java/com/fincatto/documentofiscal/mdfe3/webservices/statusservico/MDFeStatusServicoStub.java", "license": "apache-2.0", "size": 93683 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
1,292,074
@Override protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws IOException { response.setContentType( "text/plain" ); String word = getParameter( WORD_PARAMETER, request ); if (word != null) { writeDefinition(word, response); }...
void function( HttpServletRequest request, HttpServletResponse response ) throws IOException { response.setContentType( STR ); String word = getParameter( WORD_PARAMETER, request ); if (word != null) { writeDefinition(word, response); } else { writeAllDictionaryEntries(response); } }
/** * Handles an HTTP GET request from a client by writing the definition of the * word specified in the "word" HTTP parameter to the HTTP response. If the * "word" parameter is not specified, all of the entries in the dictionary * are written to the HTTP response. */
Handles an HTTP GET request from a client by writing the definition of the word specified in the "word" HTTP parameter to the HTTP response. If the "word" parameter is not specified, all of the entries in the dictionary are written to the HTTP response
doGet
{ "repo_name": "DavidWhitlock/PortlandStateJava", "path": "projects-parent/originals-parent/phonebill-web/src/main/java/edu/pdx/cs410J/phonebillweb/PhoneBillServlet.java", "license": "apache-2.0", "size": 5405 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
734,352
public static Episode fromBundle(Bundle bundle) { Builder builder = new Builder() .title(bundle.getString(KEY_TITLE)) .number(bundle.getInt(KEY_NUMBER)) .numberAbsolute(bundle.getInt(KEY_NUMBER_ABSOLUTE)) .season(bundle.getInt(KEY_SEASON)) ...
static Episode function(Bundle bundle) { Builder builder = new Builder() .title(bundle.getString(KEY_TITLE)) .number(bundle.getInt(KEY_NUMBER)) .numberAbsolute(bundle.getInt(KEY_NUMBER_ABSOLUTE)) .season(bundle.getInt(KEY_SEASON)) .tvdbId(bundle.getInt(KEY_TVDBID)) .imdbId(bundle.getString(KEY_IMDBID)) .showTitle(bundl...
/** * Deserializes an {@link Episode} into a {@link android.os.Bundle} object. */
Deserializes an <code>Episode</code> into a <code>android.os.Bundle</code> object
fromBundle
{ "repo_name": "TreyWiranta/ASV", "path": "api/src/main/java/com/battlelancer/seriesguide/api/Episode.java", "license": "unlicense", "size": 5129 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
725,552
PagedResult<T> search(MultiplePagedQuerySearch<T> searchRequest);
PagedResult<T> search(MultiplePagedQuerySearch<T> searchRequest);
/** * Method to search with offset and limit. * Method is used to handle pagination approach, * when you need to retrieve results by "parts". * @param searchRequest request. * @return PagedResult with "part" result. */
Method to search with offset and limit. Method is used to handle pagination approach, when you need to retrieve results by "parts"
search
{ "repo_name": "ifnul/ums-backend", "path": "is-lnu-persistence/src/main/java/org/lnu/is/dao/persistence/PersistenceManager.java", "license": "apache-2.0", "size": 1788 }
[ "org.lnu.is.pagination.MultiplePagedQuerySearch", "org.lnu.is.pagination.PagedResult" ]
import org.lnu.is.pagination.MultiplePagedQuerySearch; import org.lnu.is.pagination.PagedResult;
import org.lnu.is.pagination.*;
[ "org.lnu.is" ]
org.lnu.is;
2,423,701
@Override public void registerListener(TwilightListener listener, Handler handler) { synchronized (mLock) { mListeners.add(new TwilightListenerRecord(listener, handler)); if (mListeners.size() == 1) { mLocationHandler.enableLocationUpdates...
void function(TwilightListener listener, Handler handler) { synchronized (mLock) { mListeners.add(new TwilightListenerRecord(listener, handler)); if (mListeners.size() == 1) { mLocationHandler.enableLocationUpdates(); } } }
/** * Listens for twilight time. * * @param listener The listener. */
Listens for twilight time
registerListener
{ "repo_name": "xorware/android_frameworks_base", "path": "services/core/java/com/android/server/twilight/TwilightService.java", "license": "apache-2.0", "size": 25501 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
2,087,055
public float getTotalSizeIndexed() throws SQLException { PreparedStatement st = con.prepareStatement("Select" + " sum(size) from document"); ResultSet rs = st.executeQuery(); rs.next(); long aux = rs.getLong(1); rs.close(); if (!st.isClosed()) { ...
float function() throws SQLException { PreparedStatement st = con.prepareStatement(STR + STR); ResultSet rs = st.executeQuery(); rs.next(); long aux = rs.getLong(1); rs.close(); if (!st.isClosed()) { try { st.close(); } catch (Exception ex) { } } return ((float) aux) / 1024f / 1024f; }
/** * Get the total size of document indexed. * @return Size in Megabytes. */
Get the total size of document indexed
getTotalSizeIndexed
{ "repo_name": "marcelobusico/sabuesonix", "path": "SabuesonixPojoLib/src/sabuesonix/entities/persistence/ManagementDB.java", "license": "gpl-3.0", "size": 6412 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,552,344
public String getAuthenticationScheme() { if (SecurityUtil.isSslClientCertAuth(this.request)) { return SecurityContext.CLIENT_CERT_AUTH; } ChallengeResponse challengeResponse = request.getChallengeResponse(); if (challengeResponse == null) { return null; ...
String function() { if (SecurityUtil.isSslClientCertAuth(this.request)) { return SecurityContext.CLIENT_CERT_AUTH; } ChallengeResponse challengeResponse = request.getChallengeResponse(); if (challengeResponse == null) { return null; } if (!request.getClientInfo().isAuthenticated()) { return null; } final ChallengeSchem...
/** * Returns the string value of the authentication scheme used to protect the * resource. If the resource is not authenticated, null is returned. * * Values are the same as the CGI variable AUTH_TYPE * * @return one of the static members BASIC_AUTH, FORM_AUTH, * CLIENT_CER...
Returns the string value of the authentication scheme used to protect the resource. If the resource is not authenticated, null is returned. Values are the same as the CGI variable AUTH_TYPE
getAuthenticationScheme
{ "repo_name": "alastrina123/debrief", "path": "org.mwc.asset.comms/docs/restlet_src/org.restlet.ext.jaxrs/org/restlet/ext/jaxrs/internal/core/CallContext.java", "license": "epl-1.0", "size": 46359 }
[ "javax.ws.rs.core.SecurityContext", "org.restlet.data.ChallengeResponse", "org.restlet.data.ChallengeScheme", "org.restlet.ext.jaxrs.internal.util.SecurityUtil" ]
import javax.ws.rs.core.SecurityContext; import org.restlet.data.ChallengeResponse; import org.restlet.data.ChallengeScheme; import org.restlet.ext.jaxrs.internal.util.SecurityUtil;
import javax.ws.rs.core.*; import org.restlet.data.*; import org.restlet.ext.jaxrs.internal.util.*;
[ "javax.ws", "org.restlet.data", "org.restlet.ext" ]
javax.ws; org.restlet.data; org.restlet.ext;
2,832,984
private static void sleepImpl(long millis, Closure closure) { long start = System.currentTimeMillis(); long rest = millis; long current; boolean interrupted = false; try { while (rest > 0) { try { Thread.sleep(rest); ...
static void function(long millis, Closure closure) { long start = System.currentTimeMillis(); long rest = millis; long current; boolean interrupted = false; try { while (rest > 0) { try { Thread.sleep(rest); rest = 0; } catch (InterruptedException e) { interrupted = true; if (closure != null) { if (DefaultTypeTransform...
/** * This method is used by both sleep() methods to implement sleeping * for the given time even if interrupted * * @param millis the number of milliseconds to sleep * @param closure optional closure called when interrupted * as long as the closure returns false the sleep ...
This method is used by both sleep() methods to implement sleeping for the given time even if interrupted
sleepImpl
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java", "license": "apache-2.0", "size": 9741 }
[ "groovy.lang.Closure", "org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation" ]
import groovy.lang.Closure; import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
import groovy.lang.*; import org.codehaus.groovy.runtime.typehandling.*;
[ "groovy.lang", "org.codehaus.groovy" ]
groovy.lang; org.codehaus.groovy;
1,090,335
@Override protected TableModel createTableModel() { return new HashtableTableModel((Hashtable) m_Counts.clone(), new String[]{"Actor", "Timestamp"}); }
TableModel function() { return new HashtableTableModel((Hashtable) m_Counts.clone(), new String[]{"Actor", STR}); }
/** * Creates a new table model with the current data. * * @return the model with the current data */
Creates a new table model with the current data
createTableModel
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/flow/execution/CurrentlyExecuted.java", "license": "gpl-3.0", "size": 4677 }
[ "java.util.Hashtable", "javax.swing.table.TableModel" ]
import java.util.Hashtable; import javax.swing.table.TableModel;
import java.util.*; import javax.swing.table.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
1,238,273
public final void drawImage(Image image, Point p) { drawImage(image, p.x, p.y); }
final void function(Image image, Point p) { drawImage(image, p.x, p.y); }
/** * Draws the given image at a point. * * @param image * the image to draw * @param p * where to draw the image * @see #drawImage(Image, int, int) */
Draws the given image at a point
drawImage
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.draw2d/src/org/eclipse/draw2d/Graphics.java", "license": "lgpl-2.1", "size": 32691 }
[ "org.eclipse.draw2d.geometry.Point", "org.eclipse.swt.graphics.Image" ]
import org.eclipse.draw2d.geometry.Point; import org.eclipse.swt.graphics.Image;
import org.eclipse.draw2d.geometry.*; import org.eclipse.swt.graphics.*;
[ "org.eclipse.draw2d", "org.eclipse.swt" ]
org.eclipse.draw2d; org.eclipse.swt;
1,404,686
public void contextDestroyed(ServletContextEvent event) { // deregister database drivers try { for (Enumeration<Driver> e = DriverManager.getDrivers(); e .hasMoreElements();) { Driver driver = e.nextElement(); if (driver.getClass().getC...
void function(ServletContextEvent event) { try { for (Enumeration<Driver> e = DriverManager.getDrivers(); e .hasMoreElements();) { Driver driver = e.nextElement(); if (driver.getClass().getClassLoader() == getClass() .getClassLoader()) { DriverManager.deregisterDriver(driver); } } } catch (Throwable e) { } org.apache.a...
/** * Clean up resources used by the application when stopped * * @seejavax.servlet.ServletContextListener#contextDestroyed(javax.servlet * .ServletContextEvent) */
Clean up resources used by the application when stopped
contextDestroyed
{ "repo_name": "FLVC/fcrepo-src-3.4.2", "path": "fcrepo-server/src/main/java/org/fcrepo/server/utilities/CleanupContextListener.java", "license": "apache-2.0", "size": 2643 }
[ "java.sql.Driver", "java.sql.DriverManager", "java.util.Enumeration", "javax.servlet.ServletContextEvent" ]
import java.sql.Driver; import java.sql.DriverManager; import java.util.Enumeration; import javax.servlet.ServletContextEvent;
import java.sql.*; import java.util.*; import javax.servlet.*;
[ "java.sql", "java.util", "javax.servlet" ]
java.sql; java.util; javax.servlet;
226,550
public String getAuthenticationKey(String login, String domainId) throws AuthenticationException { // Random key generation long nStart = login.hashCode() * new Date().getTime() * (m_AutoInc++); Random rand = new Random(nStart); int key = rand.nextInt(); String sKey = String.valueOf(key); ...
String function(String login, String domainId) throws AuthenticationException { long nStart = login.hashCode() * new Date().getTime() * (m_AutoInc++); Random rand = new Random(nStart); int key = rand.nextInt(); String sKey = String.valueOf(key); storeAuthenticationKey(login, domainId, sKey); return sKey; }
/** * Build a random authentication key, store it in Silverpeas database and return it. * @param login user login * @param domainId user domain id * @return generated authentication key */
Build a random authentication key, store it in Silverpeas database and return it
getAuthenticationKey
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/silverpeas/authentication/LoginPasswordAuthentication.java", "license": "agpl-3.0", "size": 17948 }
[ "java.util.Date", "java.util.Random" ]
import java.util.Date; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
811,969
private List<String> getManualWordList(Locale locale, LinguisticServices linguServices) { List<String> words = new ArrayList<>(); String shortLangCode = locale.Language; String path; for (int i = 0; i < 4; i++) { if (i == 0) { path = "/" + shortLangCode + "/spelling.txt"; } else if...
List<String> function(Locale locale, LinguisticServices linguServices) { List<String> words = new ArrayList<>(); String shortLangCode = locale.Language; String path; for (int i = 0; i < 4; i++) { if (i == 0) { path = "/" + shortLangCode + STR; } else if (i == 1) { path = "/" + shortLangCode + STR; } else if (i == 2) { ...
/** * get the list of words out of spelling.txt files defined by LT */
get the list of words out of spelling.txt files defined by LT
getManualWordList
{ "repo_name": "languagetool-org/languagetool", "path": "languagetool-office-extension/src/main/java/org/languagetool/openoffice/LtDictionary.java", "license": "lgpl-2.1", "size": 8136 }
[ "com.sun.star.lang.Locale", "java.util.ArrayList", "java.util.List", "org.languagetool.JLanguageTool" ]
import com.sun.star.lang.Locale; import java.util.ArrayList; import java.util.List; import org.languagetool.JLanguageTool;
import com.sun.star.lang.*; import java.util.*; import org.languagetool.*;
[ "com.sun.star", "java.util", "org.languagetool" ]
com.sun.star; java.util; org.languagetool;
1,483,727
@AfterAll static void afterAll() { Medias.setLoadFromJar(null); Engine.terminate(); }
static void afterAll() { Medias.setLoadFromJar(null); Engine.terminate(); }
/** * Terminate engine. */
Terminate engine
afterAll
{ "repo_name": "b3dgs/lionengine", "path": "lionengine-core-awt/src/test/java/com/b3dgs/lionengine/awt/graphic/ToolsAwtTest.java", "license": "gpl-3.0", "size": 9171 }
[ "com.b3dgs.lionengine.Engine", "com.b3dgs.lionengine.Medias" ]
import com.b3dgs.lionengine.Engine; import com.b3dgs.lionengine.Medias;
import com.b3dgs.lionengine.*;
[ "com.b3dgs.lionengine" ]
com.b3dgs.lionengine;
1,502,517
Tag tagCreate(TagCreateParams params) throws GitException;
Tag tagCreate(TagCreateParams params) throws GitException;
/** * Create new tag. * * @param params tag create params * @throws GitException if any error occurs * @see TagCreateParams */
Create new tag
tagCreate
{ "repo_name": "sudaraka94/che", "path": "wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnection.java", "license": "epl-1.0", "size": 12601 }
[ "org.eclipse.che.api.git.exception.GitException", "org.eclipse.che.api.git.params.TagCreateParams", "org.eclipse.che.api.git.shared.Tag" ]
import org.eclipse.che.api.git.exception.GitException; import org.eclipse.che.api.git.params.TagCreateParams; import org.eclipse.che.api.git.shared.Tag;
import org.eclipse.che.api.git.exception.*; import org.eclipse.che.api.git.params.*; import org.eclipse.che.api.git.shared.*;
[ "org.eclipse.che" ]
org.eclipse.che;
2,249,355
static final Map classAssertionStatus() { return new HashMap(); }
static final Map classAssertionStatus() { return new HashMap(); }
/** * The system default for class assertion status. This is used for all * ClassLoader's classAssertionStatus defaults. It must be a map of * class names to Boolean.TRUE or Boolean.FALSE * * XXX - Not implemented yet; this requires native help. * * @return a (read-only) map for the default classAs...
The system default for class assertion status. This is used for all ClassLoader's classAssertionStatus defaults. It must be a map of class names to Boolean.TRUE or Boolean.FALSE XXX - Not implemented yet; this requires native help
classAssertionStatus
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/jamvm/jamvm-1.5.4/lib/java/lang/VMClassLoader.java", "license": "gpl-2.0", "size": 13181 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,387,381
UserTable resumeSimpleQuery(String appName, DbHandle dbHandleName, OrderedColumns columnDefns, ResumableQuery query) throws ServicesAvailabilityException;
UserTable resumeSimpleQuery(String appName, DbHandle dbHandleName, OrderedColumns columnDefns, ResumableQuery query) throws ServicesAvailabilityException;
/** * Get a {@link UserTable} that holds the results from the continued query. * * @param appName * @param dbHandleName * @param columnDefns * @param query The original query with the bounds adjusted * @return */
Get a <code>UserTable</code> that holds the results from the continued query
resumeSimpleQuery
{ "repo_name": "opendatakit/androidlibrary", "path": "androidlibrary_lib/src/main/java/org/opendatakit/database/service/UserDbInterface.java", "license": "apache-2.0", "size": 50250 }
[ "org.opendatakit.database.data.OrderedColumns", "org.opendatakit.database.data.UserTable", "org.opendatakit.database.queries.ResumableQuery", "org.opendatakit.exception.ServicesAvailabilityException" ]
import org.opendatakit.database.data.OrderedColumns; import org.opendatakit.database.data.UserTable; import org.opendatakit.database.queries.ResumableQuery; import org.opendatakit.exception.ServicesAvailabilityException;
import org.opendatakit.database.data.*; import org.opendatakit.database.queries.*; import org.opendatakit.exception.*;
[ "org.opendatakit.database", "org.opendatakit.exception" ]
org.opendatakit.database; org.opendatakit.exception;
2,673,346
public void realClose(boolean calledExplicitly) throws SQLException;
void function(boolean calledExplicitly) throws SQLException;
/** * Closes this ResultSet and releases resources. * * @param calledExplicitly was realClose called by the standard * ResultSet.close() method, or was it closed internally by the driver? */
Closes this ResultSet and releases resources
realClose
{ "repo_name": "suthat/signal", "path": "vendor/mysql-connector-java-5.1.26/src/com/mysql/jdbc/ResultSetInternalMethods.java", "license": "apache-2.0", "size": 6310 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,752,038
Map<Address, List<Integer>> getMemberPartitionsMap();
Map<Address, List<Integer>> getMemberPartitionsMap();
/** * Gets member partition IDs. * <p> * Blocks until partitions are assigned. * * @return map of member address to partition IDs */
Gets member partition IDs. Blocks until partitions are assigned
getMemberPartitionsMap
{ "repo_name": "tufangorel/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/spi/partition/IPartitionService.java", "license": "apache-2.0", "size": 6186 }
[ "com.hazelcast.nio.Address", "java.util.List", "java.util.Map" ]
import com.hazelcast.nio.Address; import java.util.List; import java.util.Map;
import com.hazelcast.nio.*; import java.util.*;
[ "com.hazelcast.nio", "java.util" ]
com.hazelcast.nio; java.util;
207,869
@Deprecated void moveResource(String resourcePath, String destinationPath, String newName) throws XMLDBException;
void moveResource(String resourcePath, String destinationPath, String newName) throws XMLDBException;
/** * Move a Resource. * * @param resourcePath the source resource. * @param destinationPath the destination collection. * @param newName the new name in the destination collection. * * @deprecated Use XmldbURI version instead. * * @throws XMLDBException if an error occurs w...
Move a Resource
moveResource
{ "repo_name": "windauer/exist", "path": "exist-core/src/main/java/org/exist/xmldb/EXistCollectionManagementService.java", "license": "lgpl-2.1", "size": 7226 }
[ "org.xmldb.api.base.XMLDBException" ]
import org.xmldb.api.base.XMLDBException;
import org.xmldb.api.base.*;
[ "org.xmldb.api" ]
org.xmldb.api;
2,178,113
public void testInvokeAny2() throws Throwable { ExecutorService e = new ForkJoinPool(1); PoolCleaner cleaner = null; try { cleaner = cleaner(e); try { e.invokeAny(new ArrayList<Callable<String>>()); shouldThrow(); } catch (I...
void function() throws Throwable { ExecutorService e = new ForkJoinPool(1); PoolCleaner cleaner = null; try { cleaner = cleaner(e); try { e.invokeAny(new ArrayList<Callable<String>>()); shouldThrow(); } catch (IllegalArgumentException success) {} } finally { if (cleaner != null) { cleaner.close(); } } }
/** * invokeAny(empty collection) throws IllegalArgumentException */
invokeAny(empty collection) throws IllegalArgumentException
testInvokeAny2
{ "repo_name": "streamsupport/streamsupport", "path": "src/tests/java/org/openjdk/tests/tck/ForkJoinPoolTest.java", "license": "gpl-2.0", "size": 41090 }
[ "java.util.ArrayList", "java.util.concurrent.Callable", "java.util.concurrent.ExecutorService" ]
import java.util.ArrayList; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,055,673
@Test public void justWorks() throws Exception { Assume.assumeNotNull(AppITCase.HOME); new JdkRequest(String.format("%s/f", AppITCase.HOME)) .through(VerboseWire.class) .fetch() .as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) ...
void function() throws Exception { Assume.assumeNotNull(AppITCase.HOME); new JdkRequest(String.format("%s/f", AppITCase.HOME)) .through(VerboseWire.class) .fetch() .as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .as(XmlResponse.class) .assertXPath(" }
/** * App can work. * @throws Exception If some problem inside * @checkstyle NonStaticMethodCheck (2 lines) */
App can work
justWorks
{ "repo_name": "simonjenga/takes", "path": "src/it/file-manager/src/test/java/org/takes/it/fm/AppITCase.java", "license": "mit", "size": 2176 }
[ "com.jcabi.http.request.JdkRequest", "com.jcabi.http.response.RestResponse", "com.jcabi.http.response.XmlResponse", "com.jcabi.http.wire.VerboseWire", "java.net.HttpURLConnection", "org.junit.Assume" ]
import com.jcabi.http.request.JdkRequest; import com.jcabi.http.response.RestResponse; import com.jcabi.http.response.XmlResponse; import com.jcabi.http.wire.VerboseWire; import java.net.HttpURLConnection; import org.junit.Assume;
import com.jcabi.http.request.*; import com.jcabi.http.response.*; import com.jcabi.http.wire.*; import java.net.*; import org.junit.*;
[ "com.jcabi.http", "java.net", "org.junit" ]
com.jcabi.http; java.net; org.junit;
1,363,983
public static float diff(final float[][] x, final float[][] y) { dimensionCheck(x, y); final int n = x.length; final int m = x[0].length; float amax = 0; for (int i = 0; i < n; i++) for (int j = 0; j < m; amax = max(amax, abs(x[i][j] - y[i][j])), j++) ; return amax; }
static float function(final float[][] x, final float[][] y) { dimensionCheck(x, y); final int n = x.length; final int m = x[0].length; float amax = 0; for (int i = 0; i < n; i++) for (int j = 0; j < m; amax = max(amax, abs(x[i][j] - y[i][j])), j++) ; return amax; }
/** * The maximum matrix norm of the difference of two matrixes x,y, e.g. the greatest difference * |x_ij - y_ij|. * * @param x float[][] matrix one * @param y float[][] matrix two * @return float ||x-y||; */
The maximum matrix norm of the difference of two matrixes x,y, e.g. the greatest difference |x_ij - y_ij|
diff
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/LinearAlgebra.java", "license": "gpl-3.0", "size": 103733 }
[ "java.lang.Math" ]
import java.lang.Math;
import java.lang.*;
[ "java.lang" ]
java.lang;
23,503
public ViewFactoryContext getViewFactoryContext() { return viewFactoryContext; }
ViewFactoryContext function() { return viewFactoryContext; }
/** * Returns the engine services context. * @return engine services context */
Returns the engine services context
getViewFactoryContext
{ "repo_name": "intelie/esper", "path": "esper/src/main/java/com/espertech/esper/client/hook/VirtualDataWindowContext.java", "license": "gpl-2.0", "size": 5692 }
[ "com.espertech.esper.view.ViewFactoryContext" ]
import com.espertech.esper.view.ViewFactoryContext;
import com.espertech.esper.view.*;
[ "com.espertech.esper" ]
com.espertech.esper;
451,502
public List<Rc> getMostRecentChanges(int days, int rcLimit) throws Exception { Date today = new Date(); Calendar cal = new GregorianCalendar(); cal.setTime(today); cal.add(Calendar.DAY_OF_MONTH, -days); Date date30daysbefore = cal.getTime(); String rcstart = dateToMWTimeStamp(today); Strin...
List<Rc> function(int days, int rcLimit) throws Exception { Date today = new Date(); Calendar cal = new GregorianCalendar(); cal.setTime(today); cal.add(Calendar.DAY_OF_MONTH, -days); Date date30daysbefore = cal.getTime(); String rcstart = dateToMWTimeStamp(today); String rcend = dateToMWTimeStamp(date30daysbefore); Li...
/** * get the most recent changes * * @param days * @param rcLimit * @return * @throws Exception */
get the most recent changes
getMostRecentChanges
{ "repo_name": "WolfgangFahl/Mediawiki-Japi", "path": "src/main/java/com/bitplan/mediawiki/japi/Mediawiki.java", "license": "apache-2.0", "size": 47270 }
[ "com.bitplan.mediawiki.japi.api.Rc", "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar", "java.util.List" ]
import com.bitplan.mediawiki.japi.api.Rc; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List;
import com.bitplan.mediawiki.japi.api.*; import java.util.*;
[ "com.bitplan.mediawiki", "java.util" ]
com.bitplan.mediawiki; java.util;
1,143,834
@POST( CONTROLLER + AES_CRYPTO_SERVICES_PATH ) Map<VersionedObjectKey, BlockCiphertext> getAesEncryptedCryptoServices( @Body VersionedObjectKeySet ids );
@POST( CONTROLLER + AES_CRYPTO_SERVICES_PATH ) Map<VersionedObjectKey, BlockCiphertext> getAesEncryptedCryptoServices( @Body VersionedObjectKeySet ids );
/** * Returns AES encrypted crypto services. * * @param ids * @return */
Returns AES encrypted crypto services
getAesEncryptedCryptoServices
{ "repo_name": "kryptnostic/kodex", "path": "src/main/java/com/kryptnostic/v2/storage/api/KeyStorageApi.java", "license": "apache-2.0", "size": 6385 }
[ "com.kryptnostic.kodex.v1.crypto.ciphers.BlockCiphertext", "com.kryptnostic.v2.storage.models.VersionedObjectKey", "com.kryptnostic.v2.storage.models.VersionedObjectKeySet", "java.util.Map" ]
import com.kryptnostic.kodex.v1.crypto.ciphers.BlockCiphertext; import com.kryptnostic.v2.storage.models.VersionedObjectKey; import com.kryptnostic.v2.storage.models.VersionedObjectKeySet; import java.util.Map;
import com.kryptnostic.kodex.v1.crypto.ciphers.*; import com.kryptnostic.v2.storage.models.*; import java.util.*;
[ "com.kryptnostic.kodex", "com.kryptnostic.v2", "java.util" ]
com.kryptnostic.kodex; com.kryptnostic.v2; java.util;
1,468,135
public String getCardName(Generator<Card> cards) { Card selected = null; try { selected = GeneratorFunctions.selectRandom(cards); } catch (NoSuchElementException ignored) { ; } if (selected == null) { // Previously, it was thought that this // Only sh...
String function(Generator<Card> cards) { Card selected = null; try { selected = GeneratorFunctions.selectRandom(cards); } catch (NoSuchElementException ignored) { ; } if (selected == null) { return null; } return selected.getName(); }
/** * Fetch a random card name from the given pool. * * This forces one evaluation of the cards Generator. * * @param cards the card pool from which to select * @return a card name from cards */
Fetch a random card name from the given pool. This forces one evaluation of the cards Generator
getCardName
{ "repo_name": "xitongzou/cardforge", "path": "src/forge/quest/data/QuestBoosterPack.java", "license": "gpl-3.0", "size": 7076 }
[ "com.google.code.jyield.Generator", "java.util.NoSuchElementException", "net.slightlymagic.braids.util.generator.GeneratorFunctions" ]
import com.google.code.jyield.Generator; import java.util.NoSuchElementException; import net.slightlymagic.braids.util.generator.GeneratorFunctions;
import com.google.code.jyield.*; import java.util.*; import net.slightlymagic.braids.util.generator.*;
[ "com.google.code", "java.util", "net.slightlymagic.braids" ]
com.google.code; java.util; net.slightlymagic.braids;
1,712,082
protected boolean fireEventWait(WebElement webElement, Eventable eventable) { switch (eventable.getEventType()) { case click: try { webElement.click(); } catch (ElementNotVisibleException e1) { LOGGER.info("Element not visible, so cannot be clicked: " + webElement.getTagNam...
boolean function(WebElement webElement, Eventable eventable) { switch (eventable.getEventType()) { case click: try { webElement.click(); } catch (ElementNotVisibleException e1) { LOGGER.info(STR + webElement.getTagName().toUpperCase() + " " + webElement.getText()); return false; } catch (WebDriverException e) { throwIf...
/** * Fires the event and waits for a specified time. * * @param webElement * the element to fire event on. * @param eventable * The HTML event type (onclick, onmouseover, ...). * @return true if firing event is successful. */
Fires the event and waits for a specified time
fireEventWait
{ "repo_name": "guifre/crawljax", "path": "src/main/java/com/crawljax/browser/WebDriverBackedEmbeddedBrowser.java", "license": "apache-2.0", "size": 27178 }
[ "com.crawljax.core.state.Eventable", "org.openqa.selenium.ElementNotVisibleException", "org.openqa.selenium.WebDriverException", "org.openqa.selenium.WebElement" ]
import com.crawljax.core.state.Eventable; import org.openqa.selenium.ElementNotVisibleException; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement;
import com.crawljax.core.state.*; import org.openqa.selenium.*;
[ "com.crawljax.core", "org.openqa.selenium" ]
com.crawljax.core; org.openqa.selenium;
2,411,990
public Insets getBorderInsets() { return computeInsets(new Insets(0,0,0,0)); }
Insets function() { return computeInsets(new Insets(0,0,0,0)); }
/** * Returns the insets of the border. * @since 1.3 */
Returns the insets of the border
getBorderInsets
{ "repo_name": "andreagenso/java2scala", "path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/javax/swing/border/MatteBorder.java", "license": "apache-2.0", "size": 9304 }
[ "java.awt.Insets" ]
import java.awt.Insets;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,710,214
public final AlertDialog initiateScan( Collection<String> desiredBarcodeFormats) { return initiateScan(desiredBarcodeFormats, -1); }
final AlertDialog function( Collection<String> desiredBarcodeFormats) { return initiateScan(desiredBarcodeFormats, -1); }
/** * Initiates a scan, using the default camera, only for a certain set of * barcode types, given as strings corresponding to their names in ZXing's * {@code BarcodeFormat} class like "UPC_A". You can supply constants like * {@link #PRODUCT_CODE_TYPES} for example. * * @param desiredBarcodeFormats * ...
Initiates a scan, using the default camera, only for a certain set of barcode types, given as strings corresponding to their names in ZXing's BarcodeFormat class like "UPC_A". You can supply constants like <code>#PRODUCT_CODE_TYPES</code> for example
initiateScan
{ "repo_name": "Kharatsa/tracking-app", "path": "SampleTracking/src/com/google/zxing/integration/android/IntentIntegrator.java", "license": "apache-2.0", "size": 15245 }
[ "android.app.AlertDialog", "java.util.Collection" ]
import android.app.AlertDialog; import java.util.Collection;
import android.app.*; import java.util.*;
[ "android.app", "java.util" ]
android.app; java.util;
2,847,563
@Test void createsRedirectResponseWithUrlAndStatus() throws Exception { final String url = "/"; MatcherAssert.assertThat( new RsPrint( new TkRedirect(url, HttpURLConnection.HTTP_MOVED_TEMP).act( new RqFake() ) ), ...
void createsRedirectResponseWithUrlAndStatus() throws Exception { final String url = "/"; MatcherAssert.assertThat( new RsPrint( new TkRedirect(url, HttpURLConnection.HTTP_MOVED_TEMP).act( new RqFake() ) ), new TextIs( new Joined( TkRedirectTest.NEWLINE, STR, String.format(TkRedirectTest.LOCATION, url), STR" ) ) ); }
/** * TkRedirect can create a response with HTTP status code and url string. * @throws Exception If some problem inside */
TkRedirect can create a response with HTTP status code and url string
createsRedirectResponseWithUrlAndStatus
{ "repo_name": "simonjenga/takes", "path": "src/test/java/org/takes/tk/TkRedirectTest.java", "license": "mit", "size": 3736 }
[ "java.net.HttpURLConnection", "org.cactoos.text.Joined", "org.hamcrest.MatcherAssert", "org.llorllale.cactoos.matchers.TextIs", "org.takes.rq.RqFake", "org.takes.rs.RsPrint" ]
import java.net.HttpURLConnection; import org.cactoos.text.Joined; import org.hamcrest.MatcherAssert; import org.llorllale.cactoos.matchers.TextIs; import org.takes.rq.RqFake; import org.takes.rs.RsPrint;
import java.net.*; import org.cactoos.text.*; import org.hamcrest.*; import org.llorllale.cactoos.matchers.*; import org.takes.rq.*; import org.takes.rs.*;
[ "java.net", "org.cactoos.text", "org.hamcrest", "org.llorllale.cactoos", "org.takes.rq", "org.takes.rs" ]
java.net; org.cactoos.text; org.hamcrest; org.llorllale.cactoos; org.takes.rq; org.takes.rs;
2,030,114
@Override public DomainType decode(final BsonReader reader, final DecoderContext decoderContext) { final DocumentDecoder decoder = new DocumentDecoder(this.targetClass, this.codecRegistry); // code adapted from "org.bson.codecs.BsonDocumentCodec" return decoder.decodeDocument(reader, decoderContext); ...
DomainType function(final BsonReader reader, final DecoderContext decoderContext) { final DocumentDecoder decoder = new DocumentDecoder(this.targetClass, this.codecRegistry); return decoder.decodeDocument(reader, decoderContext); }
/** * Converts the BSON Documentation provided by the given {@link BsonReader} into an instance of * user-domain class. */
Converts the BSON Documentation provided by the given <code>BsonReader</code> into an instance of user-domain class
decode
{ "repo_name": "xcoulon/lambdamatic-project", "path": "lambdamatic-mongodb/lambdamatic-mongodb-core/src/main/java/org/lambdamatic/mongodb/internal/codecs/DocumentCodec.java", "license": "epl-1.0", "size": 4311 }
[ "org.bson.BsonReader", "org.bson.codecs.DecoderContext" ]
import org.bson.BsonReader; import org.bson.codecs.DecoderContext;
import org.bson.*; import org.bson.codecs.*;
[ "org.bson", "org.bson.codecs" ]
org.bson; org.bson.codecs;
510,231
public static FunctionMapper getFunctionMapper() { return functionMapper; } protected static class Functions extends FunctionMapper { protected final Map<String, Method> functionMap = new HashMap<String, Method>(); public Functions() { try { this.function...
static FunctionMapper function() { return functionMapper; } protected static class Functions extends FunctionMapper { protected final Map<String, Method> functionMap = new HashMap<String, Method>(); public Functions() { try { this.functionMap.put(STR, UtilDateTime.class.getMethod(STR, Timestamp.class, TimeZone.class, L...
/** Returns a <code>FunctionMapper</code> instance. * @return <code>FunctionMapper</code> instance */
Returns a <code>FunctionMapper</code> instance
getFunctionMapper
{ "repo_name": "yuri0x7c1/ofbiz-explorer", "path": "src/test/resources/apache-ofbiz-16.11.03/framework/base/src/main/java/org/apache/ofbiz/base/util/string/UelFunctions.java", "license": "apache-2.0", "size": 37601 }
[ "java.lang.reflect.Method", "java.sql.Timestamp", "java.util.HashMap", "java.util.Locale", "java.util.Map", "java.util.TimeZone", "javax.el.FunctionMapper", "org.apache.ofbiz.base.util.Debug", "org.apache.ofbiz.base.util.UtilDateTime", "org.w3c.dom.Node" ]
import java.lang.reflect.Method; import java.sql.Timestamp; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.TimeZone; import javax.el.FunctionMapper; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilDateTime; import org.w3c.dom.Node;
import java.lang.reflect.*; import java.sql.*; import java.util.*; import javax.el.*; import org.apache.ofbiz.base.util.*; import org.w3c.dom.*;
[ "java.lang", "java.sql", "java.util", "javax.el", "org.apache.ofbiz", "org.w3c.dom" ]
java.lang; java.sql; java.util; javax.el; org.apache.ofbiz; org.w3c.dom;
1,943,481
public Patterns parseXMLObject(XMLObject xo) throws XMLParseException { PatternList patternList = (PatternList)xo.getChild(0); Patterns patterns = new Patterns(patternList); for (int i = 1; i < xo.getChildCount(); i++) { patterns.addPatterns((PatternList)xo.g...
Patterns function(XMLObject xo) throws XMLParseException { PatternList patternList = (PatternList)xo.getChild(0); Patterns patterns = new Patterns(patternList); for (int i = 1; i < xo.getChildCount(); i++) { patterns.addPatterns((PatternList)xo.getChild(i)); } if (xo.hasAttribute(XMLParser.ID)) { final Logger logger = ...
/** * Parses a patterns element and returns a patterns object. */
Parses a patterns element and returns a patterns object
parseXMLObject
{ "repo_name": "armanbilge/B3", "path": "src/beast/evolution/alignment/Patterns.java", "license": "gpl-3.0", "size": 23094 }
[ "java.util.logging.Logger" ]
import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,794,345
public Context read_Context() { throw new NO_IMPLEMENT(); }
Context function() { throw new NO_IMPLEMENT(); }
/** * This should read the CORBA context, but following the 1.4 API * specification, it must not be implemented. * * @throws NO_IMPLEMENT, always. */
This should read the CORBA context, but following the 1.4 API specification, it must not be implemented
read_Context
{ "repo_name": "selmentdev/selment-toolchain", "path": "source/gcc-latest/libjava/classpath/org/omg/CORBA/portable/InputStream.java", "license": "gpl-3.0", "size": 8354 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
328,608
void setMediaSource(MediaSource mediaSource);
void setMediaSource(MediaSource mediaSource);
/** * Clears the playlist, adds the specified {@link MediaSource} and resets the position to the * default position. * * @param mediaSource The new {@link MediaSource}. */
Clears the playlist, adds the specified <code>MediaSource</code> and resets the position to the default position
setMediaSource
{ "repo_name": "amzn/exoplayer-amazon-port", "path": "library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java", "license": "apache-2.0", "size": 30514 }
[ "com.google.android.exoplayer2.source.MediaSource" ]
import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.*;
[ "com.google.android" ]
com.google.android;
1,996,945
private void updateAxes(IDataset output, IDataset original, List<AxesMetadata> ometadata, int rankDif, int[] datadims, int[] odatadim) { if (ometadata != null && !ometadata.isEmpty() && ometadata.get(0) != null) { List<AxesMetadata> metaout = null; //update it all for new data; try { metaout = out...
void function(IDataset output, IDataset original, List<AxesMetadata> ometadata, int rankDif, int[] datadims, int[] odatadim) { if (ometadata != null && !ometadata.isEmpty() && ometadata.get(0) != null) { List<AxesMetadata> metaout = null; try { metaout = output.getMetadata(AxesMetadata.class); } catch (Exception e) { t...
/** * Add missing axes to the updated rank axes metadata * * @param output * @param original * @param ometadata * @param rankDif * @param datadims */
Add missing axes to the updated rank axes metadata
updateAxes
{ "repo_name": "belkassaby/dawnsci", "path": "org.eclipse.dawnsci.analysis.dataset/src/org/eclipse/dawnsci/analysis/dataset/operations/AbstractOperation.java", "license": "epl-1.0", "size": 9182 }
[ "java.util.Arrays", "java.util.List", "org.eclipse.dawnsci.analysis.api.processing.OperationException", "org.eclipse.january.MetadataException", "org.eclipse.january.dataset.IDataset", "org.eclipse.january.dataset.ILazyDataset", "org.eclipse.january.metadata.AxesMetadata", "org.eclipse.january.metadat...
import java.util.Arrays; import java.util.List; import org.eclipse.dawnsci.analysis.api.processing.OperationException; import org.eclipse.january.MetadataException; import org.eclipse.january.dataset.IDataset; import org.eclipse.january.dataset.ILazyDataset; import org.eclipse.january.metadata.AxesMetadata; import org....
import java.util.*; import org.eclipse.dawnsci.analysis.api.processing.*; import org.eclipse.january.*; import org.eclipse.january.dataset.*; import org.eclipse.january.metadata.*;
[ "java.util", "org.eclipse.dawnsci", "org.eclipse.january" ]
java.util; org.eclipse.dawnsci; org.eclipse.january;
1,840,811
public List<String> getChildList(CuratorFramework zk) { try { List<String> jobs = JobStateTracker.getTrackingJobs(appConf, zk); Collections.sort(jobs); return jobs; } catch (IOException e) { LOG.info("No jobs to check."); } return new ArrayList<String>(); }
List<String> function(CuratorFramework zk) { try { List<String> jobs = JobStateTracker.getTrackingJobs(appConf, zk); Collections.sort(jobs); return jobs; } catch (IOException e) { LOG.info(STR); } return new ArrayList<String>(); }
/** * Get the list of jobs from JobState */
Get the list of jobs from JobState
getChildList
{ "repo_name": "alanfgates/hive", "path": "hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/ZooKeeperCleanup.java", "license": "apache-2.0", "size": 5852 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.apache.curator.framework.CuratorFramework" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.curator.framework.CuratorFramework;
import java.io.*; import java.util.*; import org.apache.curator.framework.*;
[ "java.io", "java.util", "org.apache.curator" ]
java.io; java.util; org.apache.curator;
685,992
public ByteBuffer serializeToBuffer(Object value, ByteBuffer buffer) throws IOException { buffer = increaseBufferCapacityIfNeeded(buffer, EMPTY_HEADER.length); buffer.put(EMPTY_HEADER); buffer = appendRecursive(buffer, value, utf8Encoder); int encodedLength = buffer.position() - EMPTY_HEADER.length; ...
ByteBuffer function(Object value, ByteBuffer buffer) throws IOException { buffer = increaseBufferCapacityIfNeeded(buffer, EMPTY_HEADER.length); buffer.put(EMPTY_HEADER); buffer = appendRecursive(buffer, value, utf8Encoder); int encodedLength = buffer.position() - EMPTY_HEADER.length; buffer.putInt(3, encodedLength); re...
/** * Serializes an object using BSER encoding. If possible, writes the object to the provided byte * buffer and returns it. If the buffer is not big enough to hold the object, returns a new * buffer. * * <p>After returning, buffer.position() is advanced past the last encoded byte. */
Serializes an object using BSER encoding. If possible, writes the object to the provided byte buffer and returns it. If the buffer is not big enough to hold the object, returns a new buffer. After returning, buffer.position() is advanced past the last encoded byte
serializeToBuffer
{ "repo_name": "ilya-klyuchnikov/buck", "path": "src/com/facebook/buck/util/bser/BserSerializer.java", "license": "apache-2.0", "size": 9038 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,068,594
public void termNestIn(int nested, int nest) { Set<Integer> res = _termNested.get(nested); res = res == null ? new HashSet<Integer>() : res; res.add(nest); _termNested.put(nested, res); }
void function(int nested, int nest) { Set<Integer> res = _termNested.get(nested); res = res == null ? new HashSet<Integer>() : res; res.add(nest); _termNested.put(nested, res); }
/** * Index a term with id "nested" as nested in a term with id "nest" * * @param nested * @param nest */
Index a term with id "nested" as nested in a term with id "nest"
termNestIn
{ "repo_name": "scorpiovn/jate", "path": "src/main/java/uk/ac/shef/dcs/jate/core/feature/FeatureTermNest.java", "license": "lgpl-3.0", "size": 2649 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,069,130
public long getSize() throws IOException { if (physicalSize < 0L) { physicalSize = file.length(); } return physicalSize; }
long function() throws IOException { if (physicalSize < 0L) { physicalSize = file.length(); } return physicalSize; }
/** * Returns the file size in bytes. * @return the file size * @throws IOException if failed by I/O error */
Returns the file size in bytes
getSize
{ "repo_name": "akirakw/asakusafw", "path": "core-project/asakusa-runtime/src/main/java/com/asakusafw/runtime/io/util/BufferedFileInput.java", "license": "apache-2.0", "size": 6936 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,875,107
InputStream findConfiguration() throws IOException;
InputStream findConfiguration() throws IOException;
/** * Find the configuration file. * * @return the configuration file input stream */
Find the configuration file
findConfiguration
{ "repo_name": "olivergondza/jboss-logmanager", "path": "src/main/java/org/jboss/logmanager/ConfigurationLocator.java", "license": "apache-2.0", "size": 1055 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,457,757
public void choseActiveControllerAddress() { String zkAddress = conf.get(Constants.ZOOKEEPER_QUORUM) + ":" + conf.getInt(Constants.ZOOKEPER_CLIENT_PORT, Constants.DEFAULT_ZOOKEPER_CLIENT_PORT); try { this.bspzk = new BSPZookeeperImpl(zkAddress, Constants.SESSION_TIME_OUT, ...
void function() { String zkAddress = conf.get(Constants.ZOOKEEPER_QUORUM) + ":" + conf.getInt(Constants.ZOOKEPER_CLIENT_PORT, Constants.DEFAULT_ZOOKEPER_CLIENT_PORT); try { this.bspzk = new BSPZookeeperImpl(zkAddress, Constants.SESSION_TIME_OUT, this); if (bspzk != null) { if (bspzk.equaltoStat(Constants.BSPCONTROLLER_...
/** * Get the address of BspController whose role is Active */
Get the address of BspController whose role is Active
choseActiveControllerAddress
{ "repo_name": "LiuJianan/Graduate-Graph", "path": "src/java/com/chinamobile/bcbsp/workermanager/WorkerManager.java", "license": "apache-2.0", "size": 72981 }
[ "com.chinamobile.bcbsp.Constants", "com.chinamobile.bcbsp.thirdPartyInterface.Zookeeper", "org.apache.hadoop.net.NetUtils" ]
import com.chinamobile.bcbsp.Constants; import com.chinamobile.bcbsp.thirdPartyInterface.Zookeeper; import org.apache.hadoop.net.NetUtils;
import com.chinamobile.bcbsp.*; import org.apache.hadoop.net.*;
[ "com.chinamobile.bcbsp", "org.apache.hadoop" ]
com.chinamobile.bcbsp; org.apache.hadoop;
1,787,953
public Map<String, Object> params() { return params; }
Map<String, Object> function() { return params; }
/** * Get parameters that will be available in the {@code init}, * {@code map} and {@code combine} phases. */
Get parameters that will be available in the init, map and combine phases
params
{ "repo_name": "uschindler/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/aggregations/metrics/ScriptedMetricAggregationBuilder.java", "license": "apache-2.0", "size": 11423 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,612,738
@ExceptionHandler(BadRequestException.class) public ResponseEntity<?> badRequest(Exception ex, WebRequest webRequest) { return handleExceptionInternal(ex, ex.getLocalizedMessage(), new HttpHeaders(), HttpStatus.BAD_REQUEST, webRequest); }
@ExceptionHandler(BadRequestException.class) ResponseEntity<?> function(Exception ex, WebRequest webRequest) { return handleExceptionInternal(ex, ex.getLocalizedMessage(), new HttpHeaders(), HttpStatus.BAD_REQUEST, webRequest); }
/** * 400 Bad Request. */
400 Bad Request
badRequest
{ "repo_name": "raulcsj/CPF", "path": "plugin/src/main/java/core/plugin/spring/GlobalExceptionHandler.java", "license": "apache-2.0", "size": 9428 }
[ "org.springframework.http.HttpHeaders", "org.springframework.http.HttpStatus", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.ExceptionHandler", "org.springframework.web.context.request.WebRequest" ]
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.context.request.WebRequest;
import org.springframework.http.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.*;
[ "org.springframework.http", "org.springframework.web" ]
org.springframework.http; org.springframework.web;
1,654,590
@BeanProperty(description = "Whether or not the root node from the TreeModel is visible.") public void setRootVisible(boolean rootVisible) { if(isRootVisible() != rootVisible && root != null) { if(rootVisible) { root.updatePreferredSize(0); visible...
@BeanProperty(description = STR) void function(boolean rootVisible) { if(isRootVisible() != rootVisible && root != null) { if(rootVisible) { root.updatePreferredSize(0); visibleNodes.insertElementAt(root, 0); } else if(visibleNodes.size() > 0) { visibleNodes.removeElementAt(0); if(treeSelectionModel != null) treeSelect...
/** * Determines whether or not the root node from * the <code>TreeModel</code> is visible. * * @param rootVisible true if the root node of the tree is to be displayed * @see #rootVisible */
Determines whether or not the root node from the <code>TreeModel</code> is visible
setRootVisible
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/tree/VariableHeightLayoutCache.java", "license": "apache-2.0", "size": 61865 }
[ "java.beans.BeanProperty" ]
import java.beans.BeanProperty;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,991,356
private static void createContextFiles(Resource configDir, ServletConfig servletConfig, boolean doNew) throws IOException { // NICE dies muss dynamisch erstellt werden, da hier der admin hinkommt // und dieser sehr viele files haben wird Resource contextDir = configDir.getRealResource("context"); if (!contex...
static void function(Resource configDir, ServletConfig servletConfig, boolean doNew) throws IOException { Resource contextDir = configDir.getRealResource(STR); if (!contextDir.exists()) contextDir.mkdirs(); { Resource dir = configDir.getRealResource(STR); if (!dir.exists()) dir.mkdirs(); Resource file = dir.getRealReso...
/** * Creates all files for Lucee Context * * @param configDir * @throws IOException * @throws IOException */
Creates all files for Lucee Context
createContextFiles
{ "repo_name": "lucee/unoffical-Lucee-no-jre", "path": "source/java/core/src/lucee/runtime/config/XMLConfigWebFactory.java", "license": "lgpl-2.1", "size": 169381 }
[ "java.io.IOException", "javax.servlet.ServletConfig" ]
import java.io.IOException; import javax.servlet.ServletConfig;
import java.io.*; import javax.servlet.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
107,832
public static PackagePartName createPartName(URI partName, PackagePart relativePart) throws InvalidFormatException { URI newPartNameURI = resolvePartUri( relativePart.getPartName().getURI(), partName); return createPartName(newPartNameURI); }
static PackagePartName function(URI partName, PackagePart relativePart) throws InvalidFormatException { URI newPartNameURI = resolvePartUri( relativePart.getPartName().getURI(), partName); return createPartName(newPartNameURI); }
/** * Create an OPC compliant part name by resolving it using a base part. * * @param partName * The part name URI to validate. * @param relativePart * The relative base part. * @return The correspondant part name if valid, else <code>null</code>. * @throws InvalidFormatException ...
Create an OPC compliant part name by resolving it using a base part
createPartName
{ "repo_name": "tobyclemson/msci-project", "path": "vendor/poi-3.6/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java", "license": "mit", "size": 19242 }
[ "org.apache.poi.openxml4j.exceptions.InvalidFormatException" ]
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.*;
[ "org.apache.poi" ]
org.apache.poi;
929,965
public byte[] toBytes(Action.ActionResult result) { try { return IOUtils.toByteArray(result.getResult().getRenderable().render(result.getContext(), result.getResult())); } catch (Exception e) { throw new IllegalArgumentException("Cannot retrieve the byte[] form of result `" +...
byte[] function(Action.ActionResult result) { try { return IOUtils.toByteArray(result.getResult().getRenderable().render(result.getContext(), result.getResult())); } catch (Exception e) { throw new IllegalArgumentException(STR + result + "`", e); } }
/** * Helper method to get the content of the response as byte array. * * @param result the result object from which the content is extracted. Must not be {@literal null}. * @return the String form of the result. * @throws IllegalArgumentException if the byte array cannot be retrieved. */
Helper method to get the content of the response as byte array
toBytes
{ "repo_name": "evrignaud/wisdom", "path": "core/wisdom-test/src/main/java/org/wisdom/test/parents/WisdomUnitTest.java", "license": "apache-2.0", "size": 6082 }
[ "org.apache.commons.io.IOUtils" ]
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.*;
[ "org.apache.commons" ]
org.apache.commons;
2,243,206
public String playAndGetDigits(int min, int max, int tries, int timeout, String terminator, String file, String invalidFile, String regexp, int digitTimeout) throws ExecuteException { String id = UUID.randomUUID().toString(); CommandResponse resp = sendExeMesg("play_and_get...
String function(int min, int max, int tries, int timeout, String terminator, String file, String invalidFile, String regexp, int digitTimeout) throws ExecuteException { String id = UUID.randomUUID().toString(); CommandResponse resp = sendExeMesg(STR, String.valueOf(min) + " " + max + " " + tries + " " + timeout + " " +...
/** * Play a prompt and get digits. * * @return collected digits or null if none * * @see <a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_get_digits"> * http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_get_digits * </a> */
Play a prompt and get digits
playAndGetDigits
{ "repo_name": "mgodave/esl-client", "path": "src/main/java/org/freeswitch/esl/client/dptools/Execute.java", "license": "apache-2.0", "size": 65062 }
[ "java.util.UUID", "org.freeswitch.esl.client.transport.CommandResponse", "org.freeswitch.esl.client.transport.message.EslMessage" ]
import java.util.UUID; import org.freeswitch.esl.client.transport.CommandResponse; import org.freeswitch.esl.client.transport.message.EslMessage;
import java.util.*; import org.freeswitch.esl.client.transport.*; import org.freeswitch.esl.client.transport.message.*;
[ "java.util", "org.freeswitch.esl" ]
java.util; org.freeswitch.esl;
772,402
@Test public void testDeserializedFieldsMatchOriginalPacket() throws Exception { T original = getInitialisedPacket(); setCommonFields(original); T decodedPacket = getPacketType().newInstance(); ByteArrayOutputStream out = new ByteArrayOutputStream(); PacketEncoderImpl enc...
void function() throws Exception { T original = getInitialisedPacket(); setCommonFields(original); T decodedPacket = getPacketType().newInstance(); ByteArrayOutputStream out = new ByteArrayOutputStream(); PacketEncoderImpl encoder = new PacketEncoderImpl(out); original.writeTo(encoder); PacketDecoderImpl decoder = new ...
/** * Test that after serializing and deserializing a packet, the mandatory * parameters all match. * @throws Exception */
Test that after serializing and deserializing a packet, the mandatory parameters all match
testDeserializedFieldsMatchOriginalPacket
{ "repo_name": "Mobicents/smpp", "path": "src/test/java/org/mobicents/protocols/smpp/message/PacketTests.java", "license": "lgpl-3.0", "size": 6250 }
[ "java.io.ByteArrayOutputStream", "org.mobicents.protocols.smpp.util.PacketDecoderImpl", "org.mobicents.protocols.smpp.util.PacketEncoderImpl", "org.testng.Assert" ]
import java.io.ByteArrayOutputStream; import org.mobicents.protocols.smpp.util.PacketDecoderImpl; import org.mobicents.protocols.smpp.util.PacketEncoderImpl; import org.testng.Assert;
import java.io.*; import org.mobicents.protocols.smpp.util.*; import org.testng.*;
[ "java.io", "org.mobicents.protocols", "org.testng" ]
java.io; org.mobicents.protocols; org.testng;
2,152,802
public BukkitTask runTaskLater(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskLater(Plugin, long)}
BukkitTask function(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskLater(Plugin, long)}
/** * Returns a task that will run after the specified number of server * ticks. * * @param plugin the reference to the plugin scheduling task * @param task the task to be run * @param delay the ticks to wait before running the task * @return a BukkitTask that contains the id number ...
Returns a task that will run after the specified number of server ticks
runTaskLater
{ "repo_name": "Techcable/Bukkit", "path": "src/main/java/org/bukkit/scheduler/BukkitScheduler.java", "license": "gpl-3.0", "size": 12155 }
[ "org.bukkit.plugin.Plugin" ]
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.*;
[ "org.bukkit.plugin" ]
org.bukkit.plugin;
2,326,919
private void performTransitions(State msgProcessedState, Message msg) { State orgState = mStateStack[mStateStackTopIndex].state; boolean recordLogMsg = mSm.recordLogRec(mMsg) && (msg.obj != mSmHandlerObj); if (mLogRecords.logOnlyTransitions()) { ...
void function(State msgProcessedState, Message msg) { State orgState = mStateStack[mStateStackTopIndex].state; boolean recordLogMsg = mSm.recordLogRec(mMsg) && (msg.obj != mSmHandlerObj); if (mLogRecords.logOnlyTransitions()) { if (mDestState != null) { mLogRecords.add(mSm, mMsg, mSm.getLogRecString(mMsg), msgProcessed...
/** * Do any transitions * @param msgProcessedState is the state that processed the message */
Do any transitions
performTransitions
{ "repo_name": "OmniEvo/android_frameworks_base", "path": "core/java/com/android/internal/util/StateMachine.java", "license": "gpl-3.0", "size": 69732 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
370,050
@Test public void testSaslDigestMd5Bind() throws Exception { Dn userDn = new Dn( "uid=hnelson,ou=users,dc=example,dc=com" ); LdapNetworkConnection connection = new LdapNetworkConnection( InetAddress.getLocalHost().getHostName(), getLdapServer().getPort() ); SaslDigestMd5Request requ...
void function() throws Exception { Dn userDn = new Dn( STR ); LdapNetworkConnection connection = new LdapNetworkConnection( InetAddress.getLocalHost().getHostName(), getLdapServer().getPort() ); SaslDigestMd5Request request = new SaslDigestMd5Request(); request.setUsername( userDn.getRdn().getValue().getString() ); req...
/** * Tests to make sure DIGEST-MD5 binds below the RootDSE work. */
Tests to make sure DIGEST-MD5 binds below the RootDSE work
testSaslDigestMd5Bind
{ "repo_name": "drankye/directory-server", "path": "server-integ/src/test/java/org/apache/directory/server/operations/bind/SaslBindIT.java", "license": "apache-2.0", "size": 33230 }
[ "java.net.InetAddress", "org.apache.directory.api.ldap.model.entry.Entry", "org.apache.directory.api.ldap.model.message.BindResponse", "org.apache.directory.api.ldap.model.message.ResultCodeEnum", "org.apache.directory.api.ldap.model.name.Dn", "org.apache.directory.ldap.client.api.LdapNetworkConnection", ...
import java.net.InetAddress; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.message.BindResponse; import org.apache.directory.api.ldap.model.message.ResultCodeEnum; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.ldap.client.api.LdapNet...
import java.net.*; import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.ldap.client.api.*; import org.junit.*;
[ "java.net", "org.apache.directory", "org.junit" ]
java.net; org.apache.directory; org.junit;
17,565
public void performRecoveryRestart() throws IOException { synchronized (mutex) { if (state != IndexShardState.RECOVERING) { throw new IndexShardNotRecoveringException(shardId, state); } final Engine engine = this.currentEngineReference.getAndSet(null); ...
void function() throws IOException { synchronized (mutex) { if (state != IndexShardState.RECOVERING) { throw new IndexShardNotRecoveringException(shardId, state); } final Engine engine = this.currentEngineReference.getAndSet(null); IOUtils.close(engine); recoveryState().setStage(RecoveryState.Stage.INIT); } }
/** * called if recovery has to be restarted after network error / delay ** */
called if recovery has to be restarted after network error / delay
performRecoveryRestart
{ "repo_name": "sneivandt/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 117724 }
[ "java.io.IOException", "org.apache.lucene.util.IOUtils", "org.elasticsearch.index.engine.Engine", "org.elasticsearch.indices.recovery.RecoveryState" ]
import java.io.IOException; import org.apache.lucene.util.IOUtils; import org.elasticsearch.index.engine.Engine; import org.elasticsearch.indices.recovery.RecoveryState;
import java.io.*; import org.apache.lucene.util.*; import org.elasticsearch.index.engine.*; import org.elasticsearch.indices.recovery.*;
[ "java.io", "org.apache.lucene", "org.elasticsearch.index", "org.elasticsearch.indices" ]
java.io; org.apache.lucene; org.elasticsearch.index; org.elasticsearch.indices;
1,936,353
public static void archiveFamily(FileSystem fs, Configuration conf, HRegionInfo parent, Path tableDir, byte[] family) throws IOException { Path familyDir = new Path(tableDir, new Path(parent.getEncodedName(), Bytes.toString(family))); FileStatus[] storeFiles = FSUtils.listStatus(fs, familyDir); if (...
static void function(FileSystem fs, Configuration conf, HRegionInfo parent, Path tableDir, byte[] family) throws IOException { Path familyDir = new Path(tableDir, new Path(parent.getEncodedName(), Bytes.toString(family))); FileStatus[] storeFiles = FSUtils.listStatus(fs, familyDir); if (storeFiles == null) { LOG.debug(...
/** * Remove from the specified region the store files of the specified column family, * either by archiving them or outright deletion * @param fs the filesystem where the store files live * @param conf {@link Configuration} to examine to determine the archive directory * @param parent Parent region host...
Remove from the specified region the store files of the specified column family, either by archiving them or outright deletion
archiveFamily
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/backup/HFileArchiver.java", "license": "apache-2.0", "size": 26785 }
[ "com.google.common.collect.Lists", "java.io.IOException", "java.util.Arrays", "java.util.Collection", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop...
import com.google.common.collect.Lists; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HRegionI...
import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "com.google.common", "java.io", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.hadoop;
853,550
private static <T, A> T dispatchAny(Path.Any path, Visitor<T, A> visitor, A arg) { switch (path.getPathCase()) { case API: return visitor.visit(path.getApi(), arg); case ARRAY_INDEX: return visitor.visit(path.getArrayIndex(), arg); case AS: return visitor.visit(path.getAs...
static <T, A> T function(Path.Any path, Visitor<T, A> visitor, A arg) { switch (path.getPathCase()) { case API: return visitor.visit(path.getApi(), arg); case ARRAY_INDEX: return visitor.visit(path.getArrayIndex(), arg); case AS: return visitor.visit(path.getAs(), arg); case BLOB: return visitor.visit(path.getBlob(), a...
/** * Unboxes the path node from the {@link com.google.gapid.proto.service.path.Path.Any} and * dispatches the node to the visitor. Throws an exception if the path is not an expected type. */
Unboxes the path node from the <code>com.google.gapid.proto.service.path.Path.Any</code> and dispatches the node to the visitor. Throws an exception if the path is not an expected type
dispatchAny
{ "repo_name": "dsrbecky/gapid", "path": "gapic/src/main/com/google/gapid/util/Paths.java", "license": "apache-2.0", "size": 57795 }
[ "com.google.gapid.proto.service.path.Path" ]
import com.google.gapid.proto.service.path.Path;
import com.google.gapid.proto.service.path.*;
[ "com.google.gapid" ]
com.google.gapid;
1,847,104
@Override protected void fillDeployedNames(Set<String> names) { updateIfModified(); for (String key : _deployedKeys) { String name = keyToName(key); if (name != null) names.add(name); } }
void function(Set<String> names) { updateIfModified(); for (String key : _deployedKeys) { String name = keyToName(key); if (name != null) names.add(name); } }
/** * Returns the deployed keys. */
Returns the deployed keys
fillDeployedNames
{ "repo_name": "gruppo4/quercus-upstream", "path": "modules/resin/src/com/caucho/env/deploy/ExpandDeployGenerator.java", "license": "gpl-2.0", "size": 22467 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,708,248
public static SumoCommand setColor(String polygonID, SumoColor color){ return new SumoCommand(Constants.CMD_SET_POLYGON_VARIABLE, Constants.TYPE_COLOR, polygonID, color); }
static SumoCommand function(String polygonID, SumoColor color){ return new SumoCommand(Constants.CMD_SET_POLYGON_VARIABLE, Constants.TYPE_COLOR, polygonID, color); }
/** * Set the color of this polygon. * * @param polygonID * a string identifying the polygon * @param color * value (r,g,b,a) of color */
Set the color of this polygon
setColor
{ "repo_name": "baumfalk/TraaS", "path": "de/tudresden/sumo/cmd/Polygon.java", "license": "gpl-3.0", "size": 4966 }
[ "de.tudresden.sumo.config.Constants", "de.tudresden.sumo.util.SumoCommand", "de.tudresden.ws.container.SumoColor" ]
import de.tudresden.sumo.config.Constants; import de.tudresden.sumo.util.SumoCommand; import de.tudresden.ws.container.SumoColor;
import de.tudresden.sumo.config.*; import de.tudresden.sumo.util.*; import de.tudresden.ws.container.*;
[ "de.tudresden.sumo", "de.tudresden.ws" ]
de.tudresden.sumo; de.tudresden.ws;
577,251
public final void set(String name, Object value, DimensionValues dimensionValues, QueryProfileRegistry registry) { set(new CompoundName(name), value, DimensionBinding.createFrom(getDimensions(), dimensionValues), registry); } // ----------------- Misc
final void function(String name, Object value, DimensionValues dimensionValues, QueryProfileRegistry registry) { set(new CompoundName(name), value, DimensionBinding.createFrom(getDimensions(), dimensionValues), registry); }
/** * Sets a value in this or any nested profile. Any missing structure needed to set this will be created. * If this value is already set, this will overwrite the previous value. * * @param name the name of the field, possibly a dotted name which will cause setting of a variable in a subprofile ...
Sets a value in this or any nested profile. Any missing structure needed to set this will be created. If this value is already set, this will overwrite the previous value
set
{ "repo_name": "vespa-engine/vespa", "path": "container-search/src/main/java/com/yahoo/search/query/profile/QueryProfile.java", "license": "apache-2.0", "size": 39363 }
[ "com.yahoo.processing.request.CompoundName" ]
import com.yahoo.processing.request.CompoundName;
import com.yahoo.processing.request.*;
[ "com.yahoo.processing" ]
com.yahoo.processing;
1,666,662
public void writeExternal_v10_2(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeLong(baseConglomerateId); out.writeInt(rowLocationColumn); //write the columns ascend/descend information as bits FormatableBitSet ascDescBits = new FormatableBitS...
void function(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeLong(baseConglomerateId); out.writeInt(rowLocationColumn); FormatableBitSet ascDescBits = new FormatableBitSet(ascDescInfo.length); for (int i = 0; i < ascDescInfo.length; i++) { if (ascDescInfo[i]) ascDescBits.set(i); } ascDescBits...
/** * Store the stored representation of the column value in the * stream. * <p> * For more detailed description of the ACCESS_B2I_V3_ID format see * documentation at top of file. * * @see java.io.Externalizable#writeExternal **/
Store the stored representation of the column value in the stream. For more detailed description of the ACCESS_B2I_V3_ID format see documentation at top of file
writeExternal_v10_2
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/store/access/btree/index/B2I.java", "license": "apache-2.0", "size": 44193 }
[ "java.io.IOException", "java.io.ObjectOutput", "org.apache.derby.iapi.services.io.FormatableBitSet" ]
import java.io.IOException; import java.io.ObjectOutput; import org.apache.derby.iapi.services.io.FormatableBitSet;
import java.io.*; import org.apache.derby.iapi.services.io.*;
[ "java.io", "org.apache.derby" ]
java.io; org.apache.derby;
1,653,212
private boolean caseMapCheck(File f, String name) { if (fileSystemIsCaseSensitive) return true; // Note that getCanonicalPath() returns the case-sensitive // spelled file name. String path; try { path = f.getCanonicalPath(); } catch (IOException ex) { ...
boolean function(File f, String name) { if (fileSystemIsCaseSensitive) return true; String path; try { path = f.getCanonicalPath(); } catch (IOException ex) { return false; } char[] pcs = path.toCharArray(); char[] ncs = name.toCharArray(); int i = pcs.length - 1; int j = ncs.length - 1; while (i >= 0 && j >= 0) { whil...
/** Hack to make Windows case sensitive. Test whether given path * ends in a string of characters with the same case as given name. * Ignore file separators in both path and name. */
Hack to make Windows case sensitive. Test whether given path ends in a string of characters with the same case as given name. Ignore file separators in both path and name
caseMapCheck
{ "repo_name": "visage-lang/visage-compiler", "path": "src/share/classes/org/visage/tools/util/VisageFileManager.java", "license": "gpl-2.0", "size": 16183 }
[ "com.sun.tools.mjavac.util.BaseFileObject", "java.io.File", "java.io.IOException", "java.util.EnumSet", "java.util.Set", "javax.tools.JavaFileObject" ]
import com.sun.tools.mjavac.util.BaseFileObject; import java.io.File; import java.io.IOException; import java.util.EnumSet; import java.util.Set; import javax.tools.JavaFileObject;
import com.sun.tools.mjavac.util.*; import java.io.*; import java.util.*; import javax.tools.*;
[ "com.sun.tools", "java.io", "java.util", "javax.tools" ]
com.sun.tools; java.io; java.util; javax.tools;
2,407,695
private void dropColumnPermDescriptor( TransactionController tc, ExecIndexRow keyRow) throws StandardException { ExecRow curRow; PermissionsDescriptor perm; TabInfoImpl ti = getNonCoreTI(SYSCOLPERMS_CATALOG_NUM); SYSCOLPERMSRowFactory rf = (SYSCOLPERMSRowFactory) ti.getCatalogRowFactory(); w...
void function( TransactionController tc, ExecIndexRow keyRow) throws StandardException { ExecRow curRow; PermissionsDescriptor perm; TabInfoImpl ti = getNonCoreTI(SYSCOLPERMS_CATALOG_NUM); SYSCOLPERMSRowFactory rf = (SYSCOLPERMSRowFactory) ti.getCatalogRowFactory(); while ((curRow=ti.getRow(tc, keyRow, rf.TABLEID_INDEX...
/** * Delete the appropriate rows from syscolperms when * dropping a table * * @param tc The TransactionController * @param keyRow Start/stop position. * * @exception StandardException Thrown on failure */
Delete the appropriate rows from syscolperms when dropping a table
dropColumnPermDescriptor
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/catalog/DataDictionaryImpl.java", "license": "apache-2.0", "size": 403048 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.PermissionsDescriptor", "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.TupleDescriptor", "com.pivotal.gemfirexd.internal.iapi.sql.execute.ExecIndexRow", "com.pivotal.gemfirexd.internal.iap...
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.PermissionsDescriptor; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.TupleDescriptor; import com.pivotal.gemfirexd.internal.iapi.sql.execute.ExecIndexRow; import com.pivotal.gemfirex...
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.*; import com.pivotal.gemfirexd.internal.iapi.sql.execute.*; import com.pivotal.gemfirexd.internal.iapi.store.access.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
1,057,339
public static MessageResources getMessageResources( ServletContext application, HttpServletRequest request, String bundle) { if (bundle == null) { bundle = Globals.MESSAGES_KEY; } MessageResources resources = (MessageResources) request.getAttribute(bundle); ...
static MessageResources function( ServletContext application, HttpServletRequest request, String bundle) { if (bundle == null) { bundle = Globals.MESSAGES_KEY; } MessageResources resources = (MessageResources) request.getAttribute(bundle); if (resources == null) { ModuleConfig moduleConfig = ModuleUtils.getInstance().g...
/** * Retrieve <code>MessageResources</code> for the module and bundle. * * @param application the servlet context * @param request the servlet request * @param bundle the bundle key */
Retrieve <code>MessageResources</code> for the module and bundle
getMessageResources
{ "repo_name": "Builders-SonarSource/sonarqube-bis", "path": "tests/upgrade/projects/struts-1.3.9-diet/core/src/main/java/org/apache/struts/validator/Resources.java", "license": "lgpl-3.0", "size": 17977 }
[ "javax.servlet.ServletContext", "javax.servlet.http.HttpServletRequest", "org.apache.struts.Globals", "org.apache.struts.config.ModuleConfig", "org.apache.struts.util.MessageResources", "org.apache.struts.util.ModuleUtils" ]
import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import org.apache.struts.Globals; import org.apache.struts.config.ModuleConfig; import org.apache.struts.util.MessageResources; import org.apache.struts.util.ModuleUtils;
import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.*; import org.apache.struts.config.*; import org.apache.struts.util.*;
[ "javax.servlet", "org.apache.struts" ]
javax.servlet; org.apache.struts;
1,444,502
public OptionsDialog getOptionsDialog() throws JAXBException, IOException, SAXException { OptionsScriptProxy optionsScriptProxy = requestFactory.getOptionsScriptProxy(); final OptionsController optionsController = initOptionsController(optionsScriptProxy); UndoManager undoManager = new UndoMa...
OptionsDialog function() throws JAXBException, IOException, SAXException { OptionsScriptProxy optionsScriptProxy = requestFactory.getOptionsScriptProxy(); final OptionsController optionsController = initOptionsController(optionsScriptProxy); UndoManager undoManager = new UndoManager(); DirPath optionsPath = new DirPath...
/** * This method returns an OptionsDialog for a new Options script. * @return OptionsDialog * @throws SAXException * @throws IOException * @throws JAXBException */
This method returns an OptionsDialog for a new Options script
getOptionsDialog
{ "repo_name": "darmstrong1/filecopier", "path": "filecopier-gui/src/main/java/net/sf/fc/gui/factory/MVCRequestFactory.java", "license": "apache-2.0", "size": 18015 }
[ "java.io.IOException", "javax.swing.undo.UndoManager", "javax.xml.bind.JAXBException", "net.sf.fc.cfg.DirPath", "net.sf.fc.gui.c.options.OptionsController", "net.sf.fc.gui.v.options.OptionsDialog", "net.sf.fc.script.OptionsScriptProxy", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.swing.undo.UndoManager; import javax.xml.bind.JAXBException; import net.sf.fc.cfg.DirPath; import net.sf.fc.gui.c.options.OptionsController; import net.sf.fc.gui.v.options.OptionsDialog; import net.sf.fc.script.OptionsScriptProxy; import org.xml.sax.SAXException;
import java.io.*; import javax.swing.undo.*; import javax.xml.bind.*; import net.sf.fc.cfg.*; import net.sf.fc.gui.c.options.*; import net.sf.fc.gui.v.options.*; import net.sf.fc.script.*; import org.xml.sax.*;
[ "java.io", "javax.swing", "javax.xml", "net.sf.fc", "org.xml.sax" ]
java.io; javax.swing; javax.xml; net.sf.fc; org.xml.sax;
2,212,919
@Override public Path call() { String textFile = null; try { textFile = new String(Files.readAllBytes(path)); } catch (IOException e) { e.printStackTrace(); } if (textFile != null && textFile.contains(text) && !f...
Path function() { String textFile = null; try { textFile = new String(Files.readAllBytes(path)); } catch (IOException e) { e.printStackTrace(); } if (textFile != null && textFile.contains(text) && !fileIsFinding) { fileIsFinding = true; return path; } return null; } }
/** * Searching text in file. * * @return path of file if file contains text or null. */
Searching text in file
call
{ "repo_name": "YuzyakAV/ayuzyak", "path": "chapter_007_Multithreading/src/main/java/ru/job4j/monitore_synchronizy/TextSearch.java", "license": "apache-2.0", "size": 6405 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,276,294
public static Cursor getCursorForFormFile(File proposedPath, String[] projection) { String[] selectionArgs = { proposedPath.getAbsolutePath() }; String selection = FormsProviderAPI.FormsColumns.FORM_FILE_PATH + "=?"; return Collect.getInstance() .getApplicatio...
static Cursor function(File proposedPath, String[] projection) { String[] selectionArgs = { proposedPath.getAbsolutePath() }; String selection = FormsProviderAPI.FormsColumns.FORM_FILE_PATH + "=?"; return Collect.getInstance() .getApplication() .getContentResolver() .query(FormsProviderAPI.FormsColumns.CONTENT_URI, pro...
/** * Get a Cursor for the form from the filename. If there is more than one they are ordered * descending by id, so most recent is first. * @param proposedPath the path for the forms file * @param projection a projection of fields to get * @return the Cursor pointing to ideally one form. ...
Get a Cursor for the form from the filename. If there is more than one they are ordered descending by id, so most recent is first
getCursorForFormFile
{ "repo_name": "projectbuendia/client", "path": "app/src/main/java/org/projectbuendia/client/net/OdkXformSyncTask.java", "license": "apache-2.0", "size": 10279 }
[ "android.database.Cursor", "android.os.AsyncTask", "android.support.annotation.Nullable", "com.google.common.base.Preconditions", "java.io.File", "org.odk.collect.android.application.Collect", "org.odk.collect.android.provider.FormsProviderAPI" ]
import android.database.Cursor; import android.os.AsyncTask; import android.support.annotation.Nullable; import com.google.common.base.Preconditions; import java.io.File; import org.odk.collect.android.application.Collect; import org.odk.collect.android.provider.FormsProviderAPI;
import android.database.*; import android.os.*; import android.support.annotation.*; import com.google.common.base.*; import java.io.*; import org.odk.collect.android.application.*; import org.odk.collect.android.provider.*;
[ "android.database", "android.os", "android.support", "com.google.common", "java.io", "org.odk.collect" ]
android.database; android.os; android.support; com.google.common; java.io; org.odk.collect;
891,579
@Test public void createTest() { User user = new User(); user.setUsername("admin"); user = repository.save(user); User userResult = entityManager.find(User.class, user.getId()); assertThat(user, is(userResult)); }
void function() { User user = new User(); user.setUsername("admin"); user = repository.save(user); User userResult = entityManager.find(User.class, user.getId()); assertThat(user, is(userResult)); }
/** * Create test. */
Create test
createTest
{ "repo_name": "ephemeralin/java-training", "path": "chapter_009_carplace_boot/src/test/java/com/ephemeralin/carplace/repository/UserRepositoryTest.java", "license": "apache-2.0", "size": 2786 }
[ "com.ephemeralin.carplace.model.User", "org.hamcrest.core.Is", "org.junit.Assert" ]
import com.ephemeralin.carplace.model.User; import org.hamcrest.core.Is; import org.junit.Assert;
import com.ephemeralin.carplace.model.*; import org.hamcrest.core.*; import org.junit.*;
[ "com.ephemeralin.carplace", "org.hamcrest.core", "org.junit" ]
com.ephemeralin.carplace; org.hamcrest.core; org.junit;
118,972
public Cancellable deleteCalendarAsync(DeleteCalendarRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, MLRequestConverters::deleteCalendar,...
Cancellable function(DeleteCalendarRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, MLRequestConverters::deleteCalendar, options, AcknowledgedResponse::fromXContent, listener, Collections.emptySet()); }
/** * Deletes the given Machine Learning Job asynchronously and notifies the listener on completion * <p> * For additional info see * <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html"> * ML Delete calendar documentation</a> * * @para...
Deletes the given Machine Learning Job asynchronously and notifies the listener on completion For additional info see ML Delete calendar documentation
deleteCalendarAsync
{ "repo_name": "nknize/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java", "license": "apache-2.0", "size": 133260 }
[ "java.util.Collections", "org.elasticsearch.action.ActionListener", "org.elasticsearch.action.support.master.AcknowledgedResponse", "org.elasticsearch.client.ml.DeleteCalendarRequest" ]
import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.client.ml.DeleteCalendarRequest;
import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.action.support.master.*; import org.elasticsearch.client.ml.*;
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.client" ]
java.util; org.elasticsearch.action; org.elasticsearch.client;
1,179,321
@Test public void testAfterUseCursor() throws Exception { TJDBCInputProperties fixture = new TJDBCInputProperties("input"); fixture.init(); Form advanced = fixture.getForm(Form.ADVANCED); fixture.useCursor.setValue(true); fixture.afterUseCursor(); Asser...
void function() throws Exception { TJDBCInputProperties fixture = new TJDBCInputProperties("input"); fixture.init(); Form advanced = fixture.getForm(Form.ADVANCED); fixture.useCursor.setValue(true); fixture.afterUseCursor(); Assert.assertTrue(advanced.getWidget(fixture.cursor.getName()).isVisible()); fixture.useCursor....
/** * Run the void afterUseCursor() method test. * * @throws Exception * * @generatedBy CodePro at 17-6-20 PM3:13 */
Run the void afterUseCursor() method test
testAfterUseCursor
{ "repo_name": "Talend/components", "path": "components/components-jdbc/components-jdbc-definition/src/test/java/org/talend/components/jdbc/tjdbcinput/TJDBCInputPropertiesTest.java", "license": "apache-2.0", "size": 11537 }
[ "org.junit.Assert", "org.talend.daikon.properties.presentation.Form" ]
import org.junit.Assert; import org.talend.daikon.properties.presentation.Form;
import org.junit.*; import org.talend.daikon.properties.presentation.*;
[ "org.junit", "org.talend.daikon" ]
org.junit; org.talend.daikon;
24,273
public DiscoveryNode connectToNodeLightAndHandshake( final DiscoveryNode node, final long handshakeTimeout) throws ConnectTransportException { return connectToNodeLightAndHandshake(node, handshakeTimeout, true); }
DiscoveryNode function( final DiscoveryNode node, final long handshakeTimeout) throws ConnectTransportException { return connectToNodeLightAndHandshake(node, handshakeTimeout, true); }
/** * Lightly connect to the specified node, and handshake cluster * name and version * * @param node the node to connect to * @param handshakeTimeout handshake timeout * @return the connected node with version set * @throws ConnectTransportException if the connection or t...
Lightly connect to the specified node, and handshake cluster name and version
connectToNodeLightAndHandshake
{ "repo_name": "nomoa/elasticsearch", "path": "core/src/main/java/org/elasticsearch/transport/TransportService.java", "license": "apache-2.0", "size": 43521 }
[ "org.elasticsearch.cluster.node.DiscoveryNode" ]
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
1,908,477
DatumResponse<Document> saveDocument(final Document document);
DatumResponse<Document> saveDocument(final Document document);
/** * Saves the document. Requires ownership or WRITE over the associated * entity. */
Saves the document. Requires ownership or WRITE over the associated entity
saveDocument
{ "repo_name": "stori-es/stori_es", "path": "dashboard/src/main/java/org/consumersunion/stories/common/client/service/RpcDocumentService.java", "license": "apache-2.0", "size": 2405 }
[ "org.consumersunion.stories.common.client.service.response.DatumResponse", "org.consumersunion.stories.common.shared.model.document.Document" ]
import org.consumersunion.stories.common.client.service.response.DatumResponse; import org.consumersunion.stories.common.shared.model.document.Document;
import org.consumersunion.stories.common.client.service.response.*; import org.consumersunion.stories.common.shared.model.document.*;
[ "org.consumersunion.stories" ]
org.consumersunion.stories;
727,283
public FlexibleOffsetAccountService getFlexibleOffsetAccountService() { return flexibleOffsetAccountService; }
FlexibleOffsetAccountService function() { return flexibleOffsetAccountService; }
/** * Gets the flexibleOffsetAccountService attribute. * * @return Returns the flexibleOffsetAccountService. */
Gets the flexibleOffsetAccountService attribute
getFlexibleOffsetAccountService
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/service/impl/EncumbranceClosingOriginEntryGenerationServiceImpl.java", "license": "agpl-3.0", "size": 35661 }
[ "org.kuali.kfs.sys.service.FlexibleOffsetAccountService" ]
import org.kuali.kfs.sys.service.FlexibleOffsetAccountService;
import org.kuali.kfs.sys.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,557,109
Observable<ServiceResponse<Void>> head204WithServiceResponseAsync();
Observable<ServiceResponse<Void>> head204WithServiceResponseAsync();
/** * Return 204 status code if successful. * * @return the {@link ServiceResponse} object if successful. */
Return 204 status code if successful
head204WithServiceResponseAsync
{ "repo_name": "yugangw-msft/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpSuccess.java", "license": "mit", "size": 30999 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,624,144
public URI[] list(URI url) throws ProActiveException;
URI[] function(URI url) throws ProActiveException;
/** * list all the remote objects register into a registry located at the url * * @param url * the location of the registry * @throws ProActiveException */
list all the remote objects register into a registry located at the url
list
{ "repo_name": "acontes/programming", "path": "src/Core/org/objectweb/proactive/core/remoteobject/RemoteObjectFactory.java", "license": "agpl-3.0", "size": 5308 }
[ "org.objectweb.proactive.core.ProActiveException" ]
import org.objectweb.proactive.core.ProActiveException;
import org.objectweb.proactive.core.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
50,569
@Test public void pcepUpdateMsgTest28() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x80, 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, //SRP object 0x00, 0x11, 0x00, 0x02, ...
void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x80, 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x20, 0x10, 0x00, 0x2c, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x...
/** * This test case checks for SRP, LSP (SymbolicPathNameTlv, StatefulIPv4LspIdentidiersTlv, * SymbolicPathNameTlv, StatefulLspErrorCodeTlv), ERO (IPv4SubObject, IPv4SubObject), * LSPA, Bandwidth, Metric objects in PcUpd message. */
This test case checks for SRP, LSP (SymbolicPathNameTlv, StatefulIPv4LspIdentidiersTlv, SymbolicPathNameTlv, StatefulLspErrorCodeTlv), ERO (IPv4SubObject, IPv4SubObject), LSPA, Bandwidth, Metric objects in PcUpd message
pcepUpdateMsgTest28
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepUpdateMsgTest.java", "license": "apache-2.0", "size": 66899 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.Is", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException", "org.onosproject.pcepio.exceptions.PcepParseException" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException;
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcepio" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio;
2,576,841
public Map<String, Object> getUserData() { return userData; }
Map<String, Object> function() { return userData; }
/** * Returns a Map, representing any other key-value pairs that were send * to the RESTful Sender API. * * This map usually contains application specific payload, like: * <pre> * "sport-news-channel15" : "San Francisco 49er won last game" * </pre> */
Returns a Map, representing any other key-value pairs that were send to the RESTful Sender API. This map usually contains application specific payload, like: <code> "sport-news-channel15" : "San Francisco 49er won last game" </code>
getUserData
{ "repo_name": "C-B4/unifiedpush-server", "path": "model/push/src/main/java/org/jboss/aerogear/unifiedpush/message/Message.java", "license": "apache-2.0", "size": 5604 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
31,500
List<Member> getCalculatedMembers(Level level);
List<Member> getCalculatedMembers(Level level);
/** * Returns a list of calculated members in a given level. */
Returns a list of calculated members in a given level
getCalculatedMembers
{ "repo_name": "citycloud-bigdata/mondrian", "path": "src/main/mondrian/olap/SchemaReader.java", "license": "epl-1.0", "size": 16965 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,039,805
public EnrollDevicePage enrollNewDevice() throws IOException { driver.findElement(By.xpath("iot.home.page.uuf-menu.xpath")).click(); driver.findElement(By.xpath("iot.home.page.uuf-menu.devicemgt.xpath")).click(); driver.findElement(By.xpath("iot.home.enrollDevice.xpath")).click(); re...
EnrollDevicePage function() throws IOException { driver.findElement(By.xpath(STR)).click(); driver.findElement(By.xpath(STR)).click(); driver.findElement(By.xpath(STR)).click(); return new EnrollDevicePage(driver); }
/** * Navigates to the New device enrollment page. * @return : Enroll Device page. */
Navigates to the New device enrollment page
enrollNewDevice
{ "repo_name": "madhawap/product-iots", "path": "modules/integration/tests-common/web-ui-pages/src/main/java/org/wso2/iot/integration/ui/pages/home/IOTHomePage.java", "license": "apache-2.0", "size": 3713 }
[ "java.io.IOException", "org.openqa.selenium.By", "org.wso2.iot.integration.ui.pages.devices.EnrollDevicePage" ]
import java.io.IOException; import org.openqa.selenium.By; import org.wso2.iot.integration.ui.pages.devices.EnrollDevicePage;
import java.io.*; import org.openqa.selenium.*; import org.wso2.iot.integration.ui.pages.devices.*;
[ "java.io", "org.openqa.selenium", "org.wso2.iot" ]
java.io; org.openqa.selenium; org.wso2.iot;
409,287
private boolean sortBasicBlock(int maxtime) { boolean changed = false; InstructionBucket[] pool = new InstructionBucket[maxtime + 1]; int num = bb.firstInstruction().scratch; Instruction ins; while ((ins = bb.firstRealInstruction()) != null) { InstructionBucket.insert(pool, ins); ins.r...
boolean function(int maxtime) { boolean changed = false; InstructionBucket[] pool = new InstructionBucket[maxtime + 1]; int num = bb.firstInstruction().scratch; Instruction ins; while ((ins = bb.firstRealInstruction()) != null) { InstructionBucket.insert(pool, ins); ins.remove(); } for (int i = 0; i <= maxtime; i++) { ...
/** * Sort basic block by Scheduled Time. * Uses bucket sort on time, with equal times ordered by critical path. * @param maxtime the maximum scheduled time */
Sort basic block by Scheduled Time. Uses bucket sort on time, with equal times ordered by critical path
sortBasicBlock
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/instrsched/Scheduler.java", "license": "epl-1.0", "size": 13406 }
[ "org.jikesrvm.compilers.opt.ir.Instruction" ]
import org.jikesrvm.compilers.opt.ir.Instruction;
import org.jikesrvm.compilers.opt.ir.*;
[ "org.jikesrvm.compilers" ]
org.jikesrvm.compilers;
2,380,550
@Schema(example = "Folder", description = "Return results that are file actions related to files or folders inside this folder path.") public String getQueryFolder() { return queryFolder; }
@Schema(example = STR, description = STR) String function() { return queryFolder; }
/** * Return results that are file actions related to files or folders inside this folder path. * @return queryFolder **/
Return results that are file actions related to files or folders inside this folder path
getQueryFolder
{ "repo_name": "iterate-ch/cyberduck", "path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/model/HistoryExportsBody.java", "license": "gpl-3.0", "size": 21766 }
[ "io.swagger.v3.oas.annotations.media.Schema" ]
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.*;
[ "io.swagger.v3" ]
io.swagger.v3;
1,860,100
public static final Pattern getBasicPattern() { return basic; }
static final Pattern function() { return basic; }
/** * Provides a pattern which can be used by an outside resource to determine if * this class can provide credentials based on simple header information. It does * not calculate any information regarding realms or challenges. * * @return Returns a Pattern which will match a Basic WWW-Authenticate header. ...
Provides a pattern which can be used by an outside resource to determine if this class can provide credentials based on simple header information. It does not calculate any information regarding realms or challenges
getBasicPattern
{ "repo_name": "kkllwww007/anthelion", "path": "src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpBasicAuthentication.java", "license": "apache-2.0", "size": 6700 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
58,998
public Game getGame() { return game; }
Game function() { return game; }
/** * Return Game * * @return Game */
Return Game
getGame
{ "repo_name": "JonathanxD/wReport", "path": "src/main/java/io/github/jonathanxd/wreport/commands/wext/ArgumentSuggestionManager.java", "license": "mit", "size": 5706 }
[ "org.spongepowered.api.Game" ]
import org.spongepowered.api.Game;
import org.spongepowered.api.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,882,730
public Object execute(final Map<Object, Object> iArgs) { final StringBuilder result = new StringBuilder(); if (optimizeEdges) result.append(optimizeEdges()); return result.toString(); }
Object function(final Map<Object, Object> iArgs) { final StringBuilder result = new StringBuilder(); if (optimizeEdges) result.append(optimizeEdges()); return result.toString(); }
/** * Execute the ALTER DATABASE. */
Execute the ALTER DATABASE
execute
{ "repo_name": "alonsod86/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLOptimizeDatabase.java", "license": "apache-2.0", "size": 5691 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
477,578
boolean addObjectPropertyRangeClass(String modelName, String propertyName, String rangeClassName) throws SessionNotFoundException, InvalidNameException;
boolean addObjectPropertyRangeClass(String modelName, String propertyName, String rangeClassName) throws SessionNotFoundException, InvalidNameException;
/** * Call this method to add a class to the range of an object property in the named model. * * @param modelName Model name * @param propertyName Property name * @param rangeClassName Range class name * @return True if successful else false * @throws com.ge.research.sadl.server.SessionNotFoundException ...
Call this method to add a class to the range of an object property in the named model
addObjectPropertyRangeClass
{ "repo_name": "crapo/sadlos2", "path": "com.ge.research.sadl.server/com.ge.research.sadl.server.server-api/src/main/java/com/ge/research/sadl/server/ISadlServerPE.java", "license": "epl-1.0", "size": 23265 }
[ "com.ge.research.sadl.reasoner.InvalidNameException", "com.ge.research.sadl.server.SessionNotFoundException" ]
import com.ge.research.sadl.reasoner.InvalidNameException; import com.ge.research.sadl.server.SessionNotFoundException;
import com.ge.research.sadl.reasoner.*; import com.ge.research.sadl.server.*;
[ "com.ge.research" ]
com.ge.research;
162,547
@ApiModelProperty( value = "Sum of the amounts of all statement lines where both the reconciled flag is set to" + " TRUE, and the amount is positive.") public Double getReconciledAmountPos() { return reconciledAmountPos; }
@ApiModelProperty( value = STR + STR) Double function() { return reconciledAmountPos; }
/** * Sum of the amounts of all statement lines where both the reconciled flag is set to TRUE, and * the amount is positive. * * @return reconciledAmountPos */
Sum of the amounts of all statement lines where both the reconciled flag is set to TRUE, and the amount is positive
getReconciledAmountPos
{ "repo_name": "XeroAPI/Xero-Java", "path": "src/main/java/com/xero/models/finance/StatementLinesResponse.java", "license": "mit", "size": 30674 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
123,263
public List<SubServer> getSubServers() { return subServers; }
List<SubServer> function() { return subServers; }
/** * Returns a list of all available subservers of this style. * * @return All available subservers of this style. */
Returns a list of all available subservers of this style
getSubServers
{ "repo_name": "johb/GAIA", "path": "src/main/java/sep/gaia/resources/tiles2d/Style.java", "license": "apache-2.0", "size": 9162 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,454,529
List<ReproductionCustomNote> listAll();
List<ReproductionCustomNote> listAll();
/** * List all ReproductionCustomNotes by material type. * * @return A list of ReproductionCustomNotes. */
List all ReproductionCustomNotes by material type
listAll
{ "repo_name": "IISH/delivery", "path": "src/main/java/org/socialhistoryservices/delivery/reproduction/dao/ReproductionCustomNoteDAO.java", "license": "gpl-3.0", "size": 2078 }
[ "java.util.List", "org.socialhistoryservices.delivery.reproduction.entity.ReproductionCustomNote" ]
import java.util.List; import org.socialhistoryservices.delivery.reproduction.entity.ReproductionCustomNote;
import java.util.*; import org.socialhistoryservices.delivery.reproduction.entity.*;
[ "java.util", "org.socialhistoryservices.delivery" ]
java.util; org.socialhistoryservices.delivery;
197,410
public static Iterable<Object[]> createParameters() throws Exception { return createParameters(ExecutableSection.XCONTENT_REGISTRY); }
static Iterable<Object[]> function() throws Exception { return createParameters(ExecutableSection.XCONTENT_REGISTRY); }
/** * Create parameters for this parameterized test. Uses the * {@link ExecutableSection#XCONTENT_REGISTRY list} of executable sections * defined in {@link ExecutableSection}. */
Create parameters for this parameterized test. Uses the <code>ExecutableSection#XCONTENT_REGISTRY list</code> of executable sections defined in <code>ExecutableSection</code>
createParameters
{ "repo_name": "strapdata/elassandra", "path": "test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java", "license": "apache-2.0", "size": 20979 }
[ "org.elasticsearch.test.rest.yaml.section.ExecutableSection" ]
import org.elasticsearch.test.rest.yaml.section.ExecutableSection;
import org.elasticsearch.test.rest.yaml.section.*;
[ "org.elasticsearch.test" ]
org.elasticsearch.test;
688,447
String strIOR = (String) environment.get(Context.PROVIDER_URL); if (strIOR == null) throw new NamingException("There is no " + Context.PROVIDER_URL + " property set!"); // try to get the server // create and initialize the ORB String[] argv = {}; ORB orb = ORB.init(argv, null); DAL dal = DALHelper.narro...
String strIOR = (String) environment.get(Context.PROVIDER_URL); if (strIOR == null) throw new NamingException(STR + Context.PROVIDER_URL + STR); String[] argv = {}; ORB orb = ORB.init(argv, null); DAL dal = DALHelper.narrow(orb.string_to_object(strIOR)); BrowserJNDIContext.setOrb(orb); BrowserJNDIContext.setDal(dal); S...
/** * An initial context factory (JNDI_ContextFactory) must implement the InitialContextFactory interface, which * provides a method for creating instances of initial context that implement the Context interface */
An initial context factory (JNDI_ContextFactory) must implement the InitialContextFactory interface, which provides a method for creating instances of initial context that implement the Context interface
getInitialContext
{ "repo_name": "ACS-Community/ACS", "path": "LGPL/CommonSoftware/acsGUIs/cdbBrowser/src/com/cosylab/cdb/browser/BrowserJNDIContextFactory.java", "license": "lgpl-2.1", "size": 2821 }
[ "com.cosylab.CDB", "javax.naming.Context", "javax.naming.NamingException", "org.omg.CORBA" ]
import com.cosylab.CDB; import javax.naming.Context; import javax.naming.NamingException; import org.omg.CORBA;
import com.cosylab.*; import javax.naming.*; import org.omg.*;
[ "com.cosylab", "javax.naming", "org.omg" ]
com.cosylab; javax.naming; org.omg;
207,838
private void skipATrack( RandomAccessFile dos) throws IOException{ if(VERBOSE) System.out.println("Skipping the tempo track . . ."); dos.readInt(); dos.skipBytes(dos.readInt()); }
void function( RandomAccessFile dos) throws IOException{ if(VERBOSE) System.out.println(STR); dos.readInt(); dos.skipBytes(dos.readInt()); }
/** * Reads a MIDI track without doing anything to the data */
Reads a MIDI track without doing anything to the data
skipATrack
{ "repo_name": "Armaxis/jmg", "path": "src/main/java/jm/midi/SMF.java", "license": "gpl-2.0", "size": 10866 }
[ "java.io.IOException", "java.io.RandomAccessFile" ]
import java.io.IOException; import java.io.RandomAccessFile;
import java.io.*;
[ "java.io" ]
java.io;
1,848,782
public SubResource probe() { return this.probe; }
SubResource function() { return this.probe; }
/** * Get the reference of the load balancer probe used by the load balancing rule. * * @return the probe value */
Get the reference of the load balancer probe used by the load balancing rule
probe
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancingRuleInner.java", "license": "mit", "size": 14287 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,355,194