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 static String validate(File file) throws ClientProtocolException, IOException, InterruptedException { DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient .getParams() .setParameter("User-Agent", "Mozilla/4.0 (...
static String function(File file) throws ClientProtocolException, IOException, InterruptedException { DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient .getParams() .setParameter(STR, STR); try { HttpPost httppost = new HttpPost( STRFilename: STRapipv1p0_EntryTest_VE_IP_01.zipSTRbinSTRcommentSTRhttp: r...
/** * Method used to upload a static APIP package from the classpath and verify * it through the IMS validation service. * * @param pkg * PLACE HOLDER NOT USED * @return Results HTML from the IMS global validator site after the package * is uploaded * @throws ...
Method used to upload a static APIP package from the classpath and verify it through the IMS validation service
validate
{ "repo_name": "SmarterApp/ItemAuthoring", "path": "sbac-iaip/java/src/main/java/com/pacificmetrics/orca/service/ItemExportService.java", "license": "apache-2.0", "size": 54073 }
[ "java.io.File", "java.io.IOException", "org.apache.http.client.ClientProtocolException", "org.apache.http.client.methods.HttpGet", "org.apache.http.client.methods.HttpPost", "org.apache.http.impl.client.BasicResponseHandler", "org.apache.http.impl.client.DefaultHttpClient" ]
import java.io.File; import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.DefaultHttpClient;
import java.io.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
1,243,944
@RemotableViewMethod public void setBackgroundColor(int color) { setBackgroundDrawable(new ColorDrawable(color)); }
void function(int color) { setBackgroundDrawable(new ColorDrawable(color)); }
/** * Sets the background color for this view. * @param color the color of the background */
Sets the background color for this view
setBackgroundColor
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/view/View.java", "license": "gpl-3.0", "size": 347830 }
[ "android.graphics.drawable.ColorDrawable" ]
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
251,981
@Nullable ItemHolderInfo popFromPreLayout(ViewHolder vh) { int index = mLayoutHolderMap.indexOfKey(vh); if (index < 0) { return null; } final InfoRecord record = mLayoutHolderMap.valueAt(index); if (record != null && (record.flags & FLAG_PRE) != 0) { ...
ItemHolderInfo popFromPreLayout(ViewHolder vh) { int index = mLayoutHolderMap.indexOfKey(vh); if (index < 0) { return null; } final InfoRecord record = mLayoutHolderMap.valueAt(index); if (record != null && (record.flags & FLAG_PRE) != 0) { record.flags &= ~FLAG_PRE; final ItemHolderInfo info = record.preInfo; if (reco...
/** * Finds the ItemHolderInfo for the given ViewHolder in preLayout list and removes it. * @param vh The ViewHolder whose information is being queried * @return The ItemHolderInfo for the given ViewHolder or null if it does not exist */
Finds the ItemHolderInfo for the given ViewHolder in preLayout list and removes it
popFromPreLayout
{ "repo_name": "zhaolewei/Chuang", "path": "AndroidSupportLibrary/src/android/support/v7/widget/ViewInfoStore.java", "license": "apache-2.0", "size": 11382 }
[ "android.support.v7.widget.RecyclerView" ]
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.*;
[ "android.support" ]
android.support;
1,806,563
public void writeBoolean(boolean v) throws IOException { out.writeBoolean(v); }
void function(boolean v) throws IOException { out.writeBoolean(v); }
/** * Writes boolean. * @param v boolean to write. */
Writes boolean
writeBoolean
{ "repo_name": "imr/Electric8", "path": "com/sun/electric/database/id/IdWriter.java", "license": "gpl-3.0", "size": 14541 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,121,167
public void setWillQos(QoS willQos) { this.willQos = willQos; }
void function(QoS willQos) { this.willQos = willQos; }
/** * Sets the will qos * * @param willQos the will qos */
Sets the will qos
setWillQos
{ "repo_name": "ananthc/apex-malhar", "path": "contrib/src/main/java/org/apache/apex/malhar/contrib/mqtt/MqttClientConfig.java", "license": "apache-2.0", "size": 5562 }
[ "org.fusesource.mqtt.client.QoS" ]
import org.fusesource.mqtt.client.QoS;
import org.fusesource.mqtt.client.*;
[ "org.fusesource.mqtt" ]
org.fusesource.mqtt;
448,502
@Override public String toString() { final String TAB = " "; StringBuilder retValue = new StringBuilder(); retValue.append("IntegerIdArrayDto ( ").append(super.toString()) .append(TAB).append("id = ").append(Arrays.toString(this.id)) .append(TAB).append(" )"); return retValue.toString(); }
String function() { final String TAB = " "; StringBuilder retValue = new StringBuilder(); retValue.append(STR).append(super.toString()) .append(TAB).append(STR).append(Arrays.toString(this.id)) .append(TAB).append(STR); return retValue.toString(); }
/** * Constructs a <code>String</code> with all attributes in name = value * format. * * @return a <code>String</code> representation of this object. */
Constructs a <code>String</code> with all attributes in name = value format
toString
{ "repo_name": "codelabor/codelabor-system-core", "path": "src/main/java/org/codelabor/system/dto/IntegerIdArrayDto.java", "license": "apache-2.0", "size": 1900 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
967,822
public void preMethodInvocation(Method method,Object[] arguments);
void function(Method method,Object[] arguments);
/** * This function is invoked by the fax client SPI proxy before invoking * the method in the fax client SPI itself. * * @param method * The method invoked * @param arguments * The method arguments */
This function is invoked by the fax client SPI proxy before invoking the method in the fax client SPI itself
preMethodInvocation
{ "repo_name": "ZhernakovMikhail/fax4j", "path": "src/main/java/org/fax4j/spi/FaxClientSpiInterceptor.java", "license": "apache-2.0", "size": 3405 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,854,725
JComboBox<?> getDirComboBox();
JComboBox<?> getDirComboBox();
/** * Returns a reference to the direction combo box. * * @return a reference to the dirComboBox * * @requires true * @ensures the value returned is a combo box containing the choices of * directions for the ships for the player's input board. */
Returns a reference to the direction combo box
getDirComboBox
{ "repo_name": "daniyar-artykov/battleship", "path": "src/main/java/kz/kbtu/battleship/BattleshipViewInterface.java", "license": "apache-2.0", "size": 5325 }
[ "javax.swing.JComboBox" ]
import javax.swing.JComboBox;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,830,969
Member setStatus(PerunSession sess, Member member, Status status) throws PrivilegeException, MemberNotExistsException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberNotValidYetException;
Member setStatus(PerunSession sess, Member member, Status status) throws PrivilegeException, MemberNotExistsException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberNotValidYetException;
/** * Set status of the member to specified status. * * @param sess * @param member * @param status new status * @return member with status set * @throws InternalErrorException * @throws MemberNotExistsException * @throws MemberNotValidYetException * @throws WrongReferenceAttributeValueException ...
Set status of the member to specified status
setStatus
{ "repo_name": "zwejra/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/MembersManager.java", "license": "bsd-2-clause", "size": 67303 }
[ "cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException", "cz.metacentrum.perun.core.api.exceptions.MemberNotValidYetException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException", "cz.metacentrum.perun.core.api.e...
import cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException; import cz.metacentrum.perun.core.api.exceptions.MemberNotValidYetException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException; import cz.metacentrum.pe...
import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
300,802
public void truncateFile(long size) throws IOException { logger.debug("truncate file"); try { // If the content data channel has not been opened yet and the requested size is zero // then this is an open for overwrite so the existing content data is not copied...
void function(long size) throws IOException { logger.debug(STR); try { if ( hasContent() == false && size == 0L) { openContent(true, true); } else { openContent(true, false); channel.truncate(size); } } catch ( ContentIOException ex) { if ( logger.isDebugEnabled()) logger.debug(STR + getFullName() + STR, ex); throw new...
/** * Truncate or extend the file to the specified length * * @param size long * @exception IOException */
Truncate or extend the file to the specified length
truncateFile
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/filesys/repo/ContentNetworkFile.java", "license": "lgpl-3.0", "size": 27663 }
[ "java.io.IOException", "org.alfresco.jlan.server.filesys.DiskFullException", "org.alfresco.service.cmr.repository.ContentIOException" ]
import java.io.IOException; import org.alfresco.jlan.server.filesys.DiskFullException; import org.alfresco.service.cmr.repository.ContentIOException;
import java.io.*; import org.alfresco.jlan.server.filesys.*; import org.alfresco.service.cmr.repository.*;
[ "java.io", "org.alfresco.jlan", "org.alfresco.service" ]
java.io; org.alfresco.jlan; org.alfresco.service;
1,192,530
public static String getDbDateTimeString(Date date) { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); return sdf.format(date); } public static final class MovieEntry implements BaseColumns { public static final String TABLE_NAME ="movie"; public static...
static String function(Date date) { SimpleDateFormat sdf = new SimpleDateFormat(STR); return sdf.format(date); } public static final class MovieEntry implements BaseColumns { public static final String TABLE_NAME ="movie"; public static final String COLUMN_MOVIE_ID="id"; public static final String COLUMN_TITLE="title";...
/** * Converts Date class to a string representation, used for easy comparison and database lookup. * @param date The input date * @return a DB-friendly TEXT representation of the timestamp, format: yyyyMMddHHmmss. */
Converts Date class to a string representation, used for easy comparison and database lookup
getDbDateTimeString
{ "repo_name": "puntopepe/SfogliaFilm", "path": "app/src/main/java/com/example/fab/android/sfogliafilm/data/SfogliaFilmContract.java", "license": "mit", "size": 5959 }
[ "android.net.Uri", "android.provider.BaseColumns", "java.text.SimpleDateFormat", "java.util.Date" ]
import android.net.Uri; import android.provider.BaseColumns; import java.text.SimpleDateFormat; import java.util.Date;
import android.net.*; import android.provider.*; import java.text.*; import java.util.*;
[ "android.net", "android.provider", "java.text", "java.util" ]
android.net; android.provider; java.text; java.util;
1,155,160
public AutoPopulatingList<ErrorMessage> putError(String propertyName, String errorKey, String... errorParameters) { return GlobalVariables.getMessageMap().putError(CamsConstants.DOCUMENT_PATH + "." + propertyName, errorKey, errorParameters); }
AutoPopulatingList<ErrorMessage> function(String propertyName, String errorKey, String... errorParameters) { return GlobalVariables.getMessageMap().putError(CamsConstants.DOCUMENT_PATH + "." + propertyName, errorKey, errorParameters); }
/** * Convenience method to append the path prefix */
Convenience method to append the path prefix
putError
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/validation/impl/AssetRule.java", "license": "agpl-3.0", "size": 35887 }
[ "org.kuali.kfs.krad.util.ErrorMessage", "org.kuali.kfs.krad.util.GlobalVariables", "org.kuali.kfs.module.cam.CamsConstants", "org.springframework.util.AutoPopulatingList" ]
import org.kuali.kfs.krad.util.ErrorMessage; import org.kuali.kfs.krad.util.GlobalVariables; import org.kuali.kfs.module.cam.CamsConstants; import org.springframework.util.AutoPopulatingList;
import org.kuali.kfs.krad.util.*; import org.kuali.kfs.module.cam.*; import org.springframework.util.*;
[ "org.kuali.kfs", "org.springframework.util" ]
org.kuali.kfs; org.springframework.util;
773,970
public Http1HeaderNaming http1HeaderNaming() { return get(HTTP1_HEADER_NAMING); }
Http1HeaderNaming function() { return get(HTTP1_HEADER_NAMING); }
/** * Returns the {@link Http1HeaderNaming} which converts a lower-cased HTTP/2 header name into * another header name. This is useful when communicating with a legacy system that only supports * case sensitive HTTP/1 headers. */
Returns the <code>Http1HeaderNaming</code> which converts a lower-cased HTTP/2 header name into another header name. This is useful when communicating with a legacy system that only supports case sensitive HTTP/1 headers
http1HeaderNaming
{ "repo_name": "trustin/armeria", "path": "core/src/main/java/com/linecorp/armeria/client/ClientFactoryOptions.java", "license": "apache-2.0", "size": 22118 }
[ "com.linecorp.armeria.common.Http1HeaderNaming" ]
import com.linecorp.armeria.common.Http1HeaderNaming;
import com.linecorp.armeria.common.*;
[ "com.linecorp.armeria" ]
com.linecorp.armeria;
391,845
public T get(EOEditingContext editingContext);
T function(EOEditingContext editingContext);
/** * Provides an instance of {@code T} in the given editing context. Must * never return {@code null}. * * @param editingContext * the editing context used to obtain the enterprise object. * * @return Returns an instance of {@code T} in the specified editing * ...
Provides an instance of T in the given editing context. Must never return null
get
{ "repo_name": "hprange/woinject", "path": "src/main/java/com/woinject/EOProvider.java", "license": "apache-2.0", "size": 2798 }
[ "com.webobjects.eocontrol.EOEditingContext" ]
import com.webobjects.eocontrol.EOEditingContext;
import com.webobjects.eocontrol.*;
[ "com.webobjects.eocontrol" ]
com.webobjects.eocontrol;
341,459
public String getTitle( String strPageId, Locale locale ) { Page page = PageHome.findByPrimaryKey( Integer.parseInt( strPageId ) ); return page.getName( ); }
String function( String strPageId, Locale locale ) { Page page = PageHome.findByPrimaryKey( Integer.parseInt( strPageId ) ); return page.getName( ); }
/** * Returns the Title of a given resource * * @param strPageId * The Id of the resource * @param locale * the Locale * @return The Title of a given resource */
Returns the Title of a given resource
getTitle
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/page/PageResourceIdService.java", "license": "bsd-3-clause", "size": 4010 }
[ "fr.paris.lutece.portal.business.page.Page", "fr.paris.lutece.portal.business.page.PageHome", "java.util.Locale" ]
import fr.paris.lutece.portal.business.page.Page; import fr.paris.lutece.portal.business.page.PageHome; import java.util.Locale;
import fr.paris.lutece.portal.business.page.*; import java.util.*;
[ "fr.paris.lutece", "java.util" ]
fr.paris.lutece; java.util;
2,667,032
public void setDefaultProperties(Map<String, Object> defaultProperties) { this.defaultProperties = defaultProperties; } /** * Convenient alternative to {@link #setDefaultProperties(Map)}. * @param defaultProperties some {@link Properties}
void function(Map<String, Object> defaultProperties) { this.defaultProperties = defaultProperties; } /** * Convenient alternative to {@link #setDefaultProperties(Map)}. * @param defaultProperties some {@link Properties}
/** * Set default environment properties which will be used in addition to those in the * existing {@link Environment}. * @param defaultProperties the additional properties to set */
Set default environment properties which will be used in addition to those in the existing <code>Environment</code>
setDefaultProperties
{ "repo_name": "Nephilim84/contestparser", "path": "spring-boot/src/main/java/org/springframework/boot/SpringApplication.java", "license": "apache-2.0", "size": 41841 }
[ "java.util.Map", "java.util.Properties" ]
import java.util.Map; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,613,220
public SCXMLExecutor getEngine() { return engine; }
SCXMLExecutor function() { return engine; }
/** * Get the SCXML engine driving the &quot;lifecycle&quot; of the * instances of this class. * * @return Returns the engine. */
Get the SCXML engine driving the &quot;lifecycle&quot; of the instances of this class
getEngine
{ "repo_name": "apache/commons-scxml", "path": "src/main/java/org/apache/commons/scxml2/env/AbstractStateMachine.java", "license": "apache-2.0", "size": 10735 }
[ "org.apache.commons.scxml2.SCXMLExecutor" ]
import org.apache.commons.scxml2.SCXMLExecutor;
import org.apache.commons.scxml2.*;
[ "org.apache.commons" ]
org.apache.commons;
450,591
RT _doCompile(final ArrayList<CCT> data) { throw new UnsupportedOperationException(); }
RT _doCompile(final ArrayList<CCT> data) { throw new UnsupportedOperationException(); }
/** * process the collection * * @param data * the data * @return the result of processing the collection */
process the collection
_doCompile
{ "repo_name": "optimizationBenchmarking/evaluator-base", "path": "src/main/java/org/optimizationBenchmarking/evaluator/data/impl/ref/_HierarchicalCollection.java", "license": "gpl-3.0", "size": 3639 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,073,667
public boolean verify() throws ReferenceNotInitializedException, XMLSecurityException { byte[] elemDig = this.getDigestValue(); byte[] calcDig = this.calculateDigest(true); boolean equal = MessageDigestAlgorithm.isEqual(elemDig, calcDig); if (!equal) { log.log(ja...
boolean function() throws ReferenceNotInitializedException, XMLSecurityException { byte[] elemDig = this.getDigestValue(); byte[] calcDig = this.calculateDigest(true); boolean equal = MessageDigestAlgorithm.isEqual(elemDig, calcDig); if (!equal) { log.log(java.util.logging.Level.WARNING, STRSTR\STRExpected Digest: STRA...
/** * Tests reference validation is success or false * * @return true if reference validation is success, otherwise false * @throws ReferenceNotInitializedException * @throws XMLSecurityException */
Tests reference validation is success or false
verify
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xml/internal/security/signature/Reference.java", "license": "apache-2.0", "size": 30953 }
[ "com.sun.org.apache.xml.internal.security.algorithms.MessageDigestAlgorithm", "com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException" ]
import com.sun.org.apache.xml.internal.security.algorithms.MessageDigestAlgorithm; import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import com.sun.org.apache.xml.internal.security.algorithms.*; import com.sun.org.apache.xml.internal.security.exceptions.*;
[ "com.sun.org" ]
com.sun.org;
2,722,403
public boolean isFileSpecified() { if (!(fileInputPort.isConnected() || fileInputPort.getPorts().getOwner().getOperator().getProcess() == null && fileInputPort.getAnyDataOrNull() != null)) { return operator.isParameterSet(fileParameterName); } else { try { return fileInputPort.getData(IOObjec...
boolean function() { if (!(fileInputPort.isConnected() fileInputPort.getPorts().getOwner().getOperator().getProcess() == null && fileInputPort.getAnyDataOrNull() != null)) { return operator.isParameterSet(fileParameterName); } else { try { return fileInputPort.getData(IOObject.class) != null; } catch (OperatorException...
/** * Same as {@link #getSelectedFile()}, but returns true if file is specified (in the respective * way). * */
Same as <code>#getSelectedFile()</code>, but returns true if file is specified (in the respective way)
isFileSpecified
{ "repo_name": "transwarpio/rapidminer", "path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/operator/nio/file/FileInputPortHandler.java", "license": "gpl-3.0", "size": 9933 }
[ "com.rapidminer.operator.IOObject", "com.rapidminer.operator.OperatorException" ]
import com.rapidminer.operator.IOObject; import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.*;
[ "com.rapidminer.operator" ]
com.rapidminer.operator;
816,380
public static Data create(final File file, final char delimiter, final char quote, final char escape, final char[] linebreak) throws IOException { return new IterableData(new CSVDataInput(file, delimiter, quote, escape, linebreak).iterator()); }
static Data function(final File file, final char delimiter, final char quote, final char escape, final char[] linebreak) throws IOException { return new IterableData(new CSVDataInput(file, delimiter, quote, escape, linebreak).iterator()); }
/** * Creates a new data object from a CSV file. * * @param file the file * @param delimiter the delimiter * @param quote the quote * @param escape the escape * @param linebreak the linebreak * @return the data * @throws IOException Signals that an I/O exception has occurred...
Creates a new data object from a CSV file
create
{ "repo_name": "TheRealRasu/arx", "path": "src/main/org/deidentifier/arx/Data.java", "license": "apache-2.0", "size": 16198 }
[ "java.io.File", "java.io.IOException", "org.deidentifier.arx.io.CSVDataInput" ]
import java.io.File; import java.io.IOException; import org.deidentifier.arx.io.CSVDataInput;
import java.io.*; import org.deidentifier.arx.io.*;
[ "java.io", "org.deidentifier.arx" ]
java.io; org.deidentifier.arx;
531,456
private static void removeFromAccessList( String listProperty, String userName) throws SQLException, StandardException { String removeList = SYSCS_GET_DATABASE_PROPERTY(listProperty); if (removeList != null) { SYSCS_SET_DATABASE_PROPERTY(listProperty, ...
static void function( String listProperty, String userName) throws SQLException, StandardException { String removeList = SYSCS_GET_DATABASE_PROPERTY(listProperty); if (removeList != null) { SYSCS_SET_DATABASE_PROPERTY(listProperty, IdUtil.deleteId(userName, removeList)); } } /** * Get the connection level authorization...
/** * Utility method for SYSCS_SET_USER_ACCESS removes a user from * one of the access lists, driven by the property name. */
Utility method for SYSCS_SET_USER_ACCESS removes a user from one of the access lists, driven by the property name
removeFromAccessList
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/catalog/SystemProcedures.java", "license": "apache-2.0", "size": 85864 }
[ "java.sql.SQLException", "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.util.IdUtil" ]
import java.sql.SQLException; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.util.IdUtil;
import java.sql.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.util.*;
[ "java.sql", "org.apache.derby" ]
java.sql; org.apache.derby;
2,376,950
@Format public void formatHeader(List<JField> fields) { }
void function(List<JField> fields) { }
/** * Format header. * * @param fields * the fields */
Format header
formatHeader
{ "repo_name": "pvenne/jgoose", "path": "libs/JNetPcap_1_4/src/java1.5/org/jnetpcap/protocol/lan/Ethernet.java", "license": "gpl-3.0", "size": 9860 }
[ "java.util.List", "org.jnetpcap.packet.structure.JField" ]
import java.util.List; import org.jnetpcap.packet.structure.JField;
import java.util.*; import org.jnetpcap.packet.structure.*;
[ "java.util", "org.jnetpcap.packet" ]
java.util; org.jnetpcap.packet;
89,889
private static File getCachedListFile(Context context) { return new File(context.getCacheDir(), "serverlist.properties"); }
static File function(Context context) { return new File(context.getCacheDir(), STR); }
/** * The path to the locally cached downloaded server list. */
The path to the locally cached downloaded server list
getCachedListFile
{ "repo_name": "kontalk/androidclient", "path": "app/src/main/java/org/kontalk/service/ServerListUpdater.java", "license": "gpl-3.0", "size": 8229 }
[ "android.content.Context", "java.io.File" ]
import android.content.Context; import java.io.File;
import android.content.*; import java.io.*;
[ "android.content", "java.io" ]
android.content; java.io;
2,836,185
private String getSearchUrl() { String searchText = ((TextView)getView().findViewById(R.id.searchText)).getText().toString().replace(" ", "%20"); String searchUrl = searchText; int selectedType = (int)((Spinner)getView().findViewById(R.id.searchTypeSpinner)).getSelectedItemPosition(); // App...
String function() { String searchText = ((TextView)getView().findViewById(R.id.searchText)).getText().toString().replace(" ", "%20"); String searchUrl = searchText; int selectedType = (int)((Spinner)getView().findViewById(R.id.searchTypeSpinner)).getSelectedItemPosition(); switch(selectedType) { case 0: break; case 1: ...
/** * Construct a search url from the selected gui options * @return A search string based on gui selections */
Construct a search url from the selected gui options
getSearchUrl
{ "repo_name": "paimonsoror/RX8Club.com-Forum-Application", "path": "src/com/normalexception/app/rx8club/fragment/SearchFragment.java", "license": "mit", "size": 4662 }
[ "android.widget.Spinner", "android.widget.TextView" ]
import android.widget.Spinner; import android.widget.TextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,071,912
if (reader.peek() == JsonToken.NULL) { reader.nextNull(); return null; } Duration duration = new Duration(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("text")) { duration.humanReadable = reader.nextString(); ...
if (reader.peek() == JsonToken.NULL) { reader.nextNull(); return null; } Duration duration = new Duration(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("text")) { duration.humanReadable = reader.nextString(); } else if (name.equals("value")) { duration.inSeconds = ...
/** * Read a distance object from a Directions API result and convert it to a {@link Distance}. * * <p>We are expecting to receive something akin to the following: * <pre> * { * "value": 207, "text": "0.1 mi" * } * </pre> */
Read a distance object from a Directions API result and convert it to a <code>Distance</code>. We are expecting to receive something akin to the following: <code> { "value": 207, } </code>
read
{ "repo_name": "GabrielApG/google-maps-services-java", "path": "src/main/java/com/google/maps/internal/DurationAdapter.java", "license": "apache-2.0", "size": 2185 }
[ "com.google.gson.stream.JsonToken", "com.google.maps.model.Duration" ]
import com.google.gson.stream.JsonToken; import com.google.maps.model.Duration;
import com.google.gson.stream.*; import com.google.maps.model.*;
[ "com.google.gson", "com.google.maps" ]
com.google.gson; com.google.maps;
1,502,085
public void asynchLog(int logLevel, Date occurrence, String conversationId, String context, String instanceId, String correlationId, String transactionId, String _message, String messageType, final AuditTrailCallback cb) { this.asynchLog(new AuditTrailEvent(logLevel, occurrence, conversationId, context, ins...
void function(int logLevel, Date occurrence, String conversationId, String context, String instanceId, String correlationId, String transactionId, String _message, String messageType, final AuditTrailCallback cb) { this.asynchLog(new AuditTrailEvent(logLevel, occurrence, conversationId, context, instanceId, correlation...
/** * returns immediately after queueing the log message * * @param logLevel * the level on that the audit trail event is recorded (might be used for filtering) * @param occurrence * timestamp of the audit trail event * @param conversationId * con...
returns immediately after queueing the log message
asynchLog
{ "repo_name": "copper-engine/copper-engine", "path": "projects/copper-coreengine/src/main/java/org/copperengine/core/audit/BatchingAuditTrail.java", "license": "apache-2.0", "size": 7381 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,290,922
public static void broadcastPluginTag(CommandSender sender, Plugin plugin) { broadcastCenteredMessage("&4&l[ &6" + plugin.getDescription().getName() + " &4&l]"); }
static void function(CommandSender sender, Plugin plugin) { broadcastCenteredMessage(STR + plugin.getDescription().getName() + STR); }
/** * Broadcasts the plugin name formatted to a player (or another sender), for example as a headline. * * @param sender the sender * @param plugin the plugin */
Broadcasts the plugin name formatted to a player (or another sender), for example as a headline
broadcastPluginTag
{ "repo_name": "DRE2N/BRCommons", "path": "core/src/main/java/de/erethon/commons/chat/MessageUtil.java", "license": "unlicense", "size": 13538 }
[ "org.bukkit.command.CommandSender", "org.bukkit.plugin.Plugin" ]
import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin;
import org.bukkit.command.*; import org.bukkit.plugin.*;
[ "org.bukkit.command", "org.bukkit.plugin" ]
org.bukkit.command; org.bukkit.plugin;
1,019,748
@Override @JsonIgnore public Date getExpires() { return expires; }
Date function() { return expires; }
/** * Retrieve the expiry date/time for this lock, or null if it never expires. * * @return the expires */
Retrieve the expiry date/time for this lock, or null if it never expires
getExpires
{ "repo_name": "Alfresco/community-edition", "path": "projects/remote-api/source/java/org/alfresco/repo/webdav/LockInfoImpl.java", "license": "lgpl-3.0", "size": 10780 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,599,710
public void setMiddlePoint(final WgsPoint wgs) { moveMap(wgs); }
void function(final WgsPoint wgs) { moveMap(wgs); }
/** * Define middle point in WGS84, without changing zoom level * * @param wgs * coordinates in WGS84 */
Define middle point in WGS84, without changing zoom level
setMiddlePoint
{ "repo_name": "camptocamp/maps-lib-nutiteq", "path": "src/com/nutiteq/BasicMapComponent.java", "license": "gpl-2.0", "size": 79702 }
[ "com.nutiteq.components.WgsPoint" ]
import com.nutiteq.components.WgsPoint;
import com.nutiteq.components.*;
[ "com.nutiteq.components" ]
com.nutiteq.components;
2,441,312
public void setAuthenticationDetailsSource( AuthenticationDetailsSource<HttpServletRequest, ?> authenticationDetailsSource) { this.authenticationDetailsSource = authenticationDetailsSource; }
void function( AuthenticationDetailsSource<HttpServletRequest, ?> authenticationDetailsSource) { this.authenticationDetailsSource = authenticationDetailsSource; }
/** * A source of authentication details for requests that result in authentication. * * @param authenticationDetailsSource the authenticationDetailsSource to set */
A source of authentication details for requests that result in authentication
setAuthenticationDetailsSource
{ "repo_name": "ssxxue/spring-security-oauth", "path": "spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/endpoint/TokenEndpointAuthenticationFilter.java", "license": "apache-2.0", "size": 9044 }
[ "javax.servlet.http.HttpServletRequest", "org.springframework.security.authentication.AuthenticationDetailsSource" ]
import javax.servlet.http.HttpServletRequest; import org.springframework.security.authentication.AuthenticationDetailsSource;
import javax.servlet.http.*; import org.springframework.security.authentication.*;
[ "javax.servlet", "org.springframework.security" ]
javax.servlet; org.springframework.security;
1,506,596
public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); ...
void function(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChang...
/** * Sets a dataset for the plot, replacing the existing dataset at the same * index if there is one, and sends a {@code link PlotChangeEvent} to all * registered listeners. * * @param index the dataset index. * @param dataset the dataset ({@code null} permitted). * * @see #ge...
Sets a dataset for the plot, replacing the existing dataset at the same index if there is one, and sends a link PlotChangeEvent to all registered listeners
setDataset
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/plot/PolarPlot.java", "license": "lgpl-2.1", "size": 65051 }
[ "org.jfree.data.general.DatasetChangeEvent", "org.jfree.data.xy.XYDataset" ]
import org.jfree.data.general.DatasetChangeEvent; import org.jfree.data.xy.XYDataset;
import org.jfree.data.general.*; import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
1,817,774
public boolean isSupported(DateTimeFieldType type) { return (indexOf(type) != -1); }
boolean function(DateTimeFieldType type) { return (indexOf(type) != -1); }
/** * Checks whether the field specified is supported by this partial. * * @param type the type to check, may be null which returns false * @return true if the field is supported */
Checks whether the field specified is supported by this partial
isSupported
{ "repo_name": "0359xiaodong/joda-time-android", "path": "library/src/org/joda/time/base/AbstractPartial.java", "license": "apache-2.0", "size": 15034 }
[ "org.joda.time.DateTimeFieldType" ]
import org.joda.time.DateTimeFieldType;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
855,200
public @Nullable(Nullable.Prevalence.NEVER) Iterator<BluetoothGattCharacteristic> getNativeCharacteristics(UUID serviceUuid) { return m_serviceMngr.getCharacteristics(serviceUuid); }
@Nullable(Nullable.Prevalence.NEVER) Iterator<BluetoothGattCharacteristic> function(UUID serviceUuid) { return m_serviceMngr.getCharacteristics(serviceUuid); }
/** * Same as {@link #getNativeCharacteristics()} but you can filter on the service {@link UUID}. */
Same as <code>#getNativeCharacteristics()</code> but you can filter on the service <code>UUID</code>
getNativeCharacteristics
{ "repo_name": "iDevicesInc/SweetBlue", "path": "library/src/main/java/com/idevicesinc/sweetblue/BleNode.java", "license": "gpl-3.0", "size": 37318 }
[ "android.bluetooth.BluetoothGattCharacteristic", "com.idevicesinc.sweetblue.annotations.Nullable", "java.util.Iterator" ]
import android.bluetooth.BluetoothGattCharacteristic; import com.idevicesinc.sweetblue.annotations.Nullable; import java.util.Iterator;
import android.bluetooth.*; import com.idevicesinc.sweetblue.annotations.*; import java.util.*;
[ "android.bluetooth", "com.idevicesinc.sweetblue", "java.util" ]
android.bluetooth; com.idevicesinc.sweetblue; java.util;
1,896,853
public T jaxb() { return dataFormat(new JaxbDataFormat()); }
T function() { return dataFormat(new JaxbDataFormat()); }
/** * Uses the JAXB data format */
Uses the JAXB data format
jaxb
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 46443 }
[ "org.apache.camel.model.dataformat.JaxbDataFormat" ]
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,128,441
public StepMeta newStep( TransMeta transMeta, String name, String description, boolean openit, boolean rename ) { return newStep( transMeta, null, name, description, openit, rename ); }
StepMeta function( TransMeta transMeta, String name, String description, boolean openit, boolean rename ) { return newStep( transMeta, null, name, description, openit, rename ); }
/** * Allocate new step, optionally open and rename it. * * @param name * Name of the new step * @param description * Description of the type of step * @param openit * Open the dialog for this step? * @param rename * Rename this step? * * @return T...
Allocate new step, optionally open and rename it
newStep
{ "repo_name": "wseyler/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/spoon/Spoon.java", "license": "apache-2.0", "size": 352020 }
[ "org.pentaho.di.trans.TransMeta", "org.pentaho.di.trans.step.StepMeta" ]
import org.pentaho.di.trans.TransMeta; import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.*; import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,606,539
public int min() { return Util.min(bitwidth); }
int function() { return Util.min(bitwidth); }
/** * Returns the smallest allowed integer, or 0 if no integers are allowed */
Returns the smallest allowed integer, or 0 if no integers are allowed
min
{ "repo_name": "AlloyTools/org.alloytools.alloy", "path": "org.alloytools.alloy.core/src/main/java/edu/mit/csail/sdg/translator/A4Solution.java", "license": "apache-2.0", "size": 84767 }
[ "edu.mit.csail.sdg.alloy4.Util" ]
import edu.mit.csail.sdg.alloy4.Util;
import edu.mit.csail.sdg.alloy4.*;
[ "edu.mit.csail" ]
edu.mit.csail;
928,403
List<KeyValue> getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family) { List<KeyValue> kvList = new ArrayList<>(); for (int i=1;i<=numRows;i++) { byte[] b = Bytes.toBytes(i) ; LOG.info(Bytes.toString(b)); LOG.info(Bytes.toString(b)); for (long timestamp: ...
List<KeyValue> getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family) { List<KeyValue> kvList = new ArrayList<>(); for (int i=1;i<=numRows;i++) { byte[] b = Bytes.toBytes(i) ; LOG.info(Bytes.toString(b)); LOG.info(Bytes.toString(b)); for (long timestamp: timestamps) { kvList.add(new KeyValue(b,...
/** * Generate a list of KeyValues for testing based on given parameters * @param timestamps * @param numRows * @param qualifier * @param family * @return */
Generate a list of KeyValues for testing based on given parameters
getKeyValueSet
{ "repo_name": "JingchengDu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHStoreFile.java", "license": "apache-2.0", "size": 45105 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.util.Bytes" ]
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.util.Bytes;
import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,553,240
@Message(id = 79, value = "Failed to deploy datasource %s because driver is not specified") DeploymentUnitProcessingException FailedDeployDriverNotSpecified(String dsName);
@Message(id = 79, value = STR) DeploymentUnitProcessingException FailedDeployDriverNotSpecified(String dsName);
/** * Creates an exception indicating a failure to deploy the datasource because driver is not specified * * @param dsName the datasource to be deployed. * @return a {@link DeploymentUnitProcessingException} for the error. */
Creates an exception indicating a failure to deploy the datasource because driver is not specified
FailedDeployDriverNotSpecified
{ "repo_name": "jstourac/wildfly", "path": "connector/src/main/java/org/jboss/as/connector/logging/ConnectorLogger.java", "license": "lgpl-2.1", "size": 40830 }
[ "org.jboss.as.server.deployment.DeploymentUnitProcessingException", "org.jboss.logging.annotations.Message" ]
import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.logging.annotations.Message;
import org.jboss.as.server.deployment.*; import org.jboss.logging.annotations.*;
[ "org.jboss.as", "org.jboss.logging" ]
org.jboss.as; org.jboss.logging;
2,691,750
@Override public void preExecute() throws ComponentNotReadyException { super.preExecute(); if (firstRun()) {//a phase-dependent part of initialization //all necessary elements have been initialized in init() } else { sorter.reset(); } }
void function() throws ComponentNotReadyException { super.preExecute(); if (firstRun()) { } else { sorter.reset(); } }
/** * Constructor for the Sort object * * @param id * Description of the Parameter * @param sortKeysNames * Description of the Parameter */
Constructor for the Sort object
preExecute
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.component/src/org/jetel/component/ExtSort.java", "license": "lgpl-2.1", "size": 15072 }
[ "org.jetel.exception.ComponentNotReadyException" ]
import org.jetel.exception.ComponentNotReadyException;
import org.jetel.exception.*;
[ "org.jetel.exception" ]
org.jetel.exception;
1,794,431
private Result pVariableDeclaration(final int yyStart) throws IOException { Result yyResult; int yyBase; Node yyValue; ParseError yyError = ParseError.DUMMY; // Alternative <Declaration>. yyResult = pVariableModifiers(yyStart); yyError = yyResult.select(yyError); if...
Result function(final int yyStart) throws IOException { Result yyResult; int yyBase; Node yyValue; ParseError yyError = ParseError.DUMMY; yyResult = pVariableModifiers(yyStart); yyError = yyResult.select(yyError); if (yyResult.hasValue()) { final Node v$g$1 = yyResult.semanticValue(); yyResult = pType(yyResult.index); ...
/** * Parse nonterminal xtc.lang.JavaFive.VariableDeclaration. * * @param yyStart The index. * @return The result. * @throws IOException Signals an I/O error. */
Parse nonterminal xtc.lang.JavaFive.VariableDeclaration
pVariableDeclaration
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/JavaFiveParser.java", "license": "lgpl-2.1", "size": 313913 }
[ "java.io.IOException", "xtc.parser.ParseError", "xtc.parser.Result", "xtc.tree.GNode", "xtc.tree.Node" ]
import java.io.IOException; import xtc.parser.ParseError; import xtc.parser.Result; import xtc.tree.GNode; import xtc.tree.Node;
import java.io.*; import xtc.parser.*; import xtc.tree.*;
[ "java.io", "xtc.parser", "xtc.tree" ]
java.io; xtc.parser; xtc.tree;
2,746,246
public void stopSpeechRecognition() { if (mService == null) return; try { Message msg = Message.obtain(null, VoiceService.STOP_SPEECH); msg.replyTo = mMessenger; mService.send(msg); showSpeechIcon(false); } catch (RemoteException e) { ...
void function() { if (mService == null) return; try { Message msg = Message.obtain(null, VoiceService.STOP_SPEECH); msg.replyTo = mMessenger; mService.send(msg); showSpeechIcon(false); } catch (RemoteException e) { e.printStackTrace(); } }
/** * Stops the current speech recognition object */
Stops the current speech recognition object
stopSpeechRecognition
{ "repo_name": "klinster/School-Work", "path": "490/smartmirror/app/src/main/java/org/main/smartmirror/smartmirror/MainActivity.java", "license": "mit", "size": 51084 }
[ "android.os.Message", "android.os.RemoteException" ]
import android.os.Message; import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
1,831,614
@Test(expected = StateConstraintException.class) public void constraint6_fail() { FreeMutableState state = new FreeMutableState(false, true, true, false); state.setRegions(Collections.singletonList(new MutableRegion())); StandardValidator.validate(state); }
@Test(expected = StateConstraintException.class) void function() { FreeMutableState state = new FreeMutableState(false, true, true, false); state.setRegions(Collections.singletonList(new MutableRegion())); StandardValidator.validate(state); }
/** * [6] An orthogonal state is a composite state with at least 2 regions. */
[6] An orthogonal state is a composite state with at least 2 regions
constraint6_fail
{ "repo_name": "lympid/lympid-core", "path": "src/test/java/com/lympid/core/behaviorstatemachines/validation/StateConstraintsTest.java", "license": "apache-2.0", "size": 13196 }
[ "com.lympid.core.behaviorstatemachines.impl.MutableRegion", "java.util.Collections", "org.junit.Test" ]
import com.lympid.core.behaviorstatemachines.impl.MutableRegion; import java.util.Collections; import org.junit.Test;
import com.lympid.core.behaviorstatemachines.impl.*; import java.util.*; import org.junit.*;
[ "com.lympid.core", "java.util", "org.junit" ]
com.lympid.core; java.util; org.junit;
2,127,517
public final LocalDate getDate(){ return dateProperty().get(); } private final ObjectProperty<DateControl.Layout> layout = new SimpleObjectProperty<>( this, "layout", DateControl.Layout.STANDARD); //$NON-NLS-1$ /** * Stores the strategy used by the view to layout the entrie...
final LocalDate function(){ return dateProperty().get(); } private final ObjectProperty<DateControl.Layout> layout = new SimpleObjectProperty<>( this, STR, DateControl.Layout.STANDARD); /** * Stores the strategy used by the view to layout the entries of several * calendars at once. The standard layout ignores the sourc...
/** * Returns the value of {@link #dateProperty()}. * * @return the date representing "Calendar date" */
Returns the value of <code>#dateProperty()</code>
getDate
{ "repo_name": "dlemmermann/CalendarFX", "path": "CalendarFXView/src/main/java/com/calendarfx/view/print/PrintView.java", "license": "apache-2.0", "size": 20604 }
[ "com.calendarfx.view.DateControl", "java.time.LocalDate" ]
import com.calendarfx.view.DateControl; import java.time.LocalDate;
import com.calendarfx.view.*; import java.time.*;
[ "com.calendarfx.view", "java.time" ]
com.calendarfx.view; java.time;
2,746,595
public static boolean isPortFree(int port) { if (port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER) { throw new IllegalArgumentException("Invalid start port: " + port); } ServerSocket ss = null; DatagramSocket ds = null; try { ss = new ServerSocket(por...
static boolean function(int port) { if (port < MIN_PORT_NUMBER port > MAX_PORT_NUMBER) { throw new IllegalArgumentException(STR + port); } ServerSocket ss = null; DatagramSocket ds = null; try { ss = new ServerSocket(port); ss.setReuseAddress(true); ds = new DatagramSocket(port); ds.setReuseAddress(true); return true; ...
/** * Checks if a local port is free. * * @param port * @return */
Checks if a local port is free
isPortFree
{ "repo_name": "alexeev/jboss-fuse-mirror", "path": "fabric/fabric-utils/src/main/java/io/fabric8/utils/Ports.java", "license": "apache-2.0", "size": 6243 }
[ "java.io.IOException", "java.net.DatagramSocket", "java.net.ServerSocket" ]
import java.io.IOException; import java.net.DatagramSocket; import java.net.ServerSocket;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,334,670
File[] getFsImageNameCheckpoint() { ArrayList<File> list = new ArrayList<File>(); for (Iterator<StorageDirectory> it = dirIterator(NameNodeDirType.IMAGE); it.hasNext();) { list.add(getImageFile(it.next(), NameNodeFile.IMAGE_NEW)); } return list.toArray(new File[list.size()]); ...
File[] getFsImageNameCheckpoint() { ArrayList<File> list = new ArrayList<File>(); for (Iterator<StorageDirectory> it = dirIterator(NameNodeDirType.IMAGE); it.hasNext();) { list.add(getImageFile(it.next(), NameNodeFile.IMAGE_NEW)); } return list.toArray(new File[list.size()]); } static class DatanodeImage implements Wri...
/** * Return the name of the image file that is uploaded by periodic * checkpointing. */
Return the name of the image file that is uploaded by periodic checkpointing
getFsImageNameCheckpoint
{ "repo_name": "thisisvoa/hadoop-0.20", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java", "license": "apache-2.0", "size": 62398 }
[ "java.io.File", "java.util.ArrayList", "java.util.Iterator", "org.apache.hadoop.io.Writable" ]
import java.io.File; import java.util.ArrayList; import java.util.Iterator; import org.apache.hadoop.io.Writable;
import java.io.*; import java.util.*; import org.apache.hadoop.io.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
346,621
public void endEntity(String name, Augmentations augs) throws IOException, XNIException;
void function(String name, Augmentations augs) throws IOException, XNIException;
/** * This method notifies the end of an entity. The DTD has the pseudo-name * of "[dtd]" parameter entity names start with '%'; and general entities * are just specified by their name. * * @param name The name of the entity. * @param augs Additional information that may include infoset au...
This method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name
endEntity
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xerces/internal/impl/XMLEntityHandler.java", "license": "apache-2.0", "size": 5106 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XNIException", "java.io.IOException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XNIException; import java.io.IOException;
import com.sun.org.apache.xerces.internal.xni.*; import java.io.*;
[ "com.sun.org", "java.io" ]
com.sun.org; java.io;
789,740
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayLi...
void function() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table nfjd502.dbo.BRepairLog * * @mbggenerated Thu Mar 02 11:23:21 CST 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table nfjd502.dbo.BRepairLog
clear
{ "repo_name": "xtwxy/cassandra-tests", "path": "mstar-server-dao/src/main/java/com/wincom/mstar/domain/BRepairLogExample.java", "license": "apache-2.0", "size": 38465 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
298,026
public double getCategorySeriesMiddle(int categoryIndex, int categoryCount, int seriesIndex, int seriesCount, double itemMargin, Rectangle2D area, RectangleEdge edge) { double start = getCategoryStart(categoryIndex, categoryCount, area, edge); double en...
double function(int categoryIndex, int categoryCount, int seriesIndex, int seriesCount, double itemMargin, Rectangle2D area, RectangleEdge edge) { double start = getCategoryStart(categoryIndex, categoryCount, area, edge); double end = getCategoryEnd(categoryIndex, categoryCount, area, edge); double width = end - start;...
/** * Returns the middle coordinate (in Java2D space) for a series within a * category. * * @param categoryIndex the category index. * @param categoryCount the category count. * @param seriesIndex the series index. * @param seriesCount the series count. * @param itemMar...
Returns the middle coordinate (in Java2D space) for a series within a category
getCategorySeriesMiddle
{ "repo_name": "ilyessou/jfreechart", "path": "source/org/jfree/chart/axis/CategoryAxis.java", "license": "lgpl-2.1", "size": 55031 }
[ "java.awt.geom.Rectangle2D", "org.jfree.chart.util.RectangleEdge" ]
import java.awt.geom.Rectangle2D; import org.jfree.chart.util.RectangleEdge;
import java.awt.geom.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,153,531
private boolean isStreamed(ParameterMap parameters, HttpServletRequest servletRequest) { if ( STREAM_UPLOAD.equals(servletRequest.getHeader(SLING_UPLOADMODE_HEADER)) ) { return true; } RequestParameter[] rp = parameters.get(UPLOADMODE_PARAM); return ( rp != null && rp.len...
boolean function(ParameterMap parameters, HttpServletRequest servletRequest) { if ( STREAM_UPLOAD.equals(servletRequest.getHeader(SLING_UPLOADMODE_HEADER)) ) { return true; } RequestParameter[] rp = parameters.get(UPLOADMODE_PARAM); return ( rp != null && rp.length == 1 && STREAM_UPLOAD.equals(rp[0].getString())); }
/** * Checks to see if there is an upload mode header or uploadmode parameter indicating the request is * to be streamed from the client to the server. * @param parameters parameters processed from the query string only. * @param servletRequest the servlet request, where the body has not been proces...
Checks to see if there is an upload mode header or uploadmode parameter indicating the request is to be streamed from the client to the server
isStreamed
{ "repo_name": "roele/sling", "path": "bundles/engine/src/main/java/org/apache/sling/engine/impl/parameters/ParameterSupport.java", "license": "apache-2.0", "size": 17608 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.sling.api.request.RequestParameter" ]
import javax.servlet.http.HttpServletRequest; import org.apache.sling.api.request.RequestParameter;
import javax.servlet.http.*; import org.apache.sling.api.request.*;
[ "javax.servlet", "org.apache.sling" ]
javax.servlet; org.apache.sling;
323,831
public static List<ConfigDescriptionParameterDTO> mapParameters(List<ConfigDescriptionParameter> parameters) { List<ConfigDescriptionParameterDTO> configDescriptionParameterBeans = new ArrayList<>(parameters.size()); for (ConfigDescriptionParameter configDescriptionParameter : parameters) { ...
static List<ConfigDescriptionParameterDTO> function(List<ConfigDescriptionParameter> parameters) { List<ConfigDescriptionParameterDTO> configDescriptionParameterBeans = new ArrayList<>(parameters.size()); for (ConfigDescriptionParameter configDescriptionParameter : parameters) { ConfigDescriptionParameterDTO configDesc...
/** * Maps config description parameters into DTO objects. * * @param parameters the config description parameters (not null) * * @return the parameter DTO objects (not null) */
Maps config description parameters into DTO objects
mapParameters
{ "repo_name": "philomatic/smarthome", "path": "bundles/config/org.eclipse.smarthome.config.core/src/main/java/org/eclipse/smarthome/config/core/dto/ConfigDescriptionDTOMapper.java", "license": "epl-1.0", "size": 5317 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.smarthome.config.core.ConfigDescriptionParameter" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.smarthome.config.core.ConfigDescriptionParameter;
import java.util.*; import org.eclipse.smarthome.config.core.*;
[ "java.util", "org.eclipse.smarthome" ]
java.util; org.eclipse.smarthome;
701,176
public static Cuboid load(Map<String, Object> root) throws IllegalArgumentException { if (root == null) { throw new IllegalArgumentException("Invalid root map!"); } @SuppressWarnings("unused") final String owner = (String) root.get("Owner"); final World world = Bukkit.getServer().getWorld((String) r...
static Cuboid function(Map<String, Object> root) throws IllegalArgumentException { if (root == null) { throw new IllegalArgumentException(STR); } @SuppressWarnings(STR) final String owner = (String) root.get("Owner"); final World world = Bukkit.getServer().getWorld((String) root.get("World")); final int x1 = (Integer) ...
/** * Loads the cuboid from a Map. * * @param root * the Map * @param world * the world it should be in * @return the cuboid * @throws IllegalArgumentException */
Loads the cuboid from a Map
load
{ "repo_name": "SestoElementoZ/SkyWars", "path": "Cuboid.java", "license": "apache-2.0", "size": 6989 }
[ "java.util.Map", "org.bukkit.Bukkit", "org.bukkit.Location", "org.bukkit.World" ]
import java.util.Map; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World;
import java.util.*; import org.bukkit.*;
[ "java.util", "org.bukkit" ]
java.util; org.bukkit;
1,990,774
private NoteItem getLaterFromRecurringNote(NoteItem note, TriageStatusQueryContext context) { EventStamp eventStamp = StampUtils.getEventStamp(note); Date currentDate = context.getPointInTime(); Date futureDate = new TemporalAmountAdapter(getDurToUse...
NoteItem function(NoteItem note, TriageStatusQueryContext context) { EventStamp eventStamp = StampUtils.getEventStamp(note); Date currentDate = context.getPointInTime(); Date futureDate = new TemporalAmountAdapter(getDurToUseForExpanding(eventStamp, true)).getTime(currentDate); NoteItem first = getFirstInstanceOrModifi...
/** * Get the next occurrence or modification for a recurring event, whichever * occurrs sooner relative to a point in time. * @param note NoteItem * @param context TriageStatusQueryContext * @return Set<NoteItem> */
Get the next occurrence or modification for a recurring event, whichever occurrs sooner relative to a point in time
getLaterFromRecurringNote
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/service/impl/StandardTriageStatusQueryProcessor.java", "license": "apache-2.0", "size": 31235 }
[ "java.util.Date", "net.fortuna.ical4j.model.TemporalAmountAdapter", "org.unitedinternet.cosmo.model.EventStamp", "org.unitedinternet.cosmo.model.NoteItem", "org.unitedinternet.cosmo.model.StampUtils", "org.unitedinternet.cosmo.service.triage.TriageStatusQueryContext" ]
import java.util.Date; import net.fortuna.ical4j.model.TemporalAmountAdapter; import org.unitedinternet.cosmo.model.EventStamp; import org.unitedinternet.cosmo.model.NoteItem; import org.unitedinternet.cosmo.model.StampUtils; import org.unitedinternet.cosmo.service.triage.TriageStatusQueryContext;
import java.util.*; import net.fortuna.ical4j.model.*; import org.unitedinternet.cosmo.model.*; import org.unitedinternet.cosmo.service.triage.*;
[ "java.util", "net.fortuna.ical4j", "org.unitedinternet.cosmo" ]
java.util; net.fortuna.ical4j; org.unitedinternet.cosmo;
857,309
@Secured({"ROLE_ADMIN"}) @RequestMapping(value = "/search/n", produces = "text/html") public String search_byName(Principal principal, Model uiModel) { try { uiModel.addAttribute("newSearch",true); uiModel.addAttribute("searchType" , "name"); uiModel.addAttribute("user" , new User()); ret...
@Secured({STR}) @RequestMapping(value = STR, produces = STR) String function(Principal principal, Model uiModel) { try { uiModel.addAttribute(STR,true); uiModel.addAttribute(STR , "name"); uiModel.addAttribute("user" , new User()); return STR; } catch (Exception e) { log.error(e.getMessage(),e); throw (new RuntimeExcep...
/** * Prepares the form to search users by first and last name * @param principal * @param uiModel * @return */
Prepares the form to search users by first and last name
search_byName
{ "repo_name": "designreuse/JDeSurvey", "path": "jdsurvey-intcont/src/main/java/com/jd/survey/web/security/UserController.java", "license": "agpl-3.0", "size": 25805 }
[ "com.jd.survey.domain.security.User", "java.security.Principal", "org.springframework.security.access.annotation.Secured", "org.springframework.ui.Model", "org.springframework.web.bind.annotation.RequestMapping" ]
import com.jd.survey.domain.security.User; import java.security.Principal; import org.springframework.security.access.annotation.Secured; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping;
import com.jd.survey.domain.security.*; import java.security.*; import org.springframework.security.access.annotation.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*;
[ "com.jd.survey", "java.security", "org.springframework.security", "org.springframework.ui", "org.springframework.web" ]
com.jd.survey; java.security; org.springframework.security; org.springframework.ui; org.springframework.web;
233,428
public static ManagedZone getZoneForTopic(String topic) { for (ManagedZone zone : EnumSet.allOf(ManagedZone.class)) { if (topic.startsWith(zone.getTopicPrefix())) { return zone; } } return null; }
static ManagedZone function(String topic) { for (ManagedZone zone : EnumSet.allOf(ManagedZone.class)) { if (topic.startsWith(zone.getTopicPrefix())) { return zone; } } return null; }
/** * Returns the ManagedZone for a topic identifier. * * @param topic String * @return ManagedZone for topic identifier */
Returns the ManagedZone for a topic identifier
getZoneForTopic
{ "repo_name": "lants1/moquette", "path": "fce/src/main/java/io/moquette/fce/common/util/ManagedZoneUtil.java", "license": "apache-2.0", "size": 3897 }
[ "io.moquette.fce.model.common.ManagedZone", "java.util.EnumSet" ]
import io.moquette.fce.model.common.ManagedZone; import java.util.EnumSet;
import io.moquette.fce.model.common.*; import java.util.*;
[ "io.moquette.fce", "java.util" ]
io.moquette.fce; java.util;
2,127,681
public void setName(String s) { bundleProperties.setApplicationName(s); }
void function(String s) { bundleProperties.setApplicationName(s); }
/** * Setter for the "name" attribute (required) This attribute names the * output application bundle and asks as the CFBundleName if 'bundlename' is * not specified */
Setter for the "name" attribute (required) This attribute names the output application bundle and asks as the CFBundleName if 'bundlename' is not specified
setName
{ "repo_name": "tofi86/Jarbundler", "path": "src/net/sourceforge/jarbundler/JarBundler.java", "license": "apache-2.0", "size": 44706 }
[ "java.lang.String" ]
import java.lang.String;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,081,600
public void extractAttachmentsFromMail(Message message, Map<String, Attachment> map) throws MessagingException, IOException { LOG.trace("Extracting attachments +++ start +++"); Object content = message.getContent(); if (content instanceof Multipart) { extractAttachments...
void function(Message message, Map<String, Attachment> map) throws MessagingException, IOException { LOG.trace(STR); Object content = message.getContent(); if (content instanceof Multipart) { extractAttachmentsFromMultipart((Multipart) content, map); } else if (content != null) { LOG.trace(STR, content.getClass().getNa...
/** * Parses the attachments of the given mail message and adds them to the map * * @param message the mail message with attachments * @param map the map to add found attachments (attachmentFilename is the key) */
Parses the attachments of the given mail message and adds them to the map
extractAttachmentsFromMail
{ "repo_name": "onders86/camel", "path": "components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java", "license": "apache-2.0", "size": 35377 }
[ "java.io.IOException", "java.util.Map", "javax.mail.Message", "javax.mail.MessagingException", "javax.mail.Multipart", "org.apache.camel.Attachment" ]
import java.io.IOException; import java.util.Map; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Multipart; import org.apache.camel.Attachment;
import java.io.*; import java.util.*; import javax.mail.*; import org.apache.camel.*;
[ "java.io", "java.util", "javax.mail", "org.apache.camel" ]
java.io; java.util; javax.mail; org.apache.camel;
254,045
public void renderParticle(BufferBuilder buffer, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) { float f = (float)this.particleTextureIndexX / 16.0F; float f1 = f + 0.0624375F; float f2 = (float)this.particleT...
void function(BufferBuilder buffer, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) { float f = (float)this.particleTextureIndexX / 16.0F; float f1 = f + 0.0624375F; float f2 = (float)this.particleTextureIndexY / 16.0F; float f3 = f2 + 0.06243...
/** * Renders the particle */
Renders the particle
renderParticle
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/client/particle/Particle.java", "license": "gpl-3.0", "size": 14640 }
[ "net.minecraft.client.renderer.BufferBuilder", "net.minecraft.entity.Entity", "net.minecraft.util.math.MathHelper", "net.minecraft.util.math.Vec3d" ]
import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.entity.Entity; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d;
import net.minecraft.client.renderer.*; import net.minecraft.entity.*; import net.minecraft.util.math.*;
[ "net.minecraft.client", "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.client; net.minecraft.entity; net.minecraft.util;
1,822,476
@Test public void testProgrammaticSecurityNone(@Mocked final IWindowsIdentity identity) throws ServletException { this.authenticator.setAuth(new MockWindowsAuthProvider()); final SimpleHttpRequest request = new SimpleHttpRequest(); request.setContext((Context) this.authenticator.getConta...
void function(@Mocked final IWindowsIdentity identity) throws ServletException { this.authenticator.setAuth(new MockWindowsAuthProvider()); final SimpleHttpRequest request = new SimpleHttpRequest(); request.setContext((Context) this.authenticator.getContainer()); request.login(WindowsAccountImpl.getCurrentUsername(), "...
/** * Test programmatic security NONE. * * @param identity * the identity * @throws ServletException * the servlet exception */
Test programmatic security NONE
testProgrammaticSecurityNone
{ "repo_name": "AriSuutariST/waffle", "path": "Source/JNA/waffle-tomcat7/src/test/java/waffle/apache/MixedAuthenticatorTests.java", "license": "epl-1.0", "size": 14649 }
[ "javax.servlet.ServletException", "org.apache.catalina.Context", "org.junit.Assert" ]
import javax.servlet.ServletException; import org.apache.catalina.Context; import org.junit.Assert;
import javax.servlet.*; import org.apache.catalina.*; import org.junit.*;
[ "javax.servlet", "org.apache.catalina", "org.junit" ]
javax.servlet; org.apache.catalina; org.junit;
1,528,787
public DestroyableSecretKey getMacKey() { return new DestroyableSecretKey(getEncoded(), SUBKEY_LEN_BYTES, SUBKEY_LEN_BYTES, MAC_ALG); }
DestroyableSecretKey function() { return new DestroyableSecretKey(getEncoded(), SUBKEY_LEN_BYTES, SUBKEY_LEN_BYTES, MAC_ALG); }
/** * Get the MAC subkey. * * @return A new copy of the subkey used for message authentication */
Get the MAC subkey
getMacKey
{ "repo_name": "cryptomator/cryptolib", "path": "src/main/java/org/cryptomator/cryptolib/api/Masterkey.java", "license": "agpl-3.0", "size": 2164 }
[ "org.cryptomator.cryptolib.common.DestroyableSecretKey" ]
import org.cryptomator.cryptolib.common.DestroyableSecretKey;
import org.cryptomator.cryptolib.common.*;
[ "org.cryptomator.cryptolib" ]
org.cryptomator.cryptolib;
915,250
@RestrictTo(LIBRARY_GROUP) @Nullable public RouteController onCreateRouteController(@NonNull String routeId, @NonNull String routeGroupId) { if (routeId == null) { throw new IllegalArgumentException("routeId cannot be null"); } if (routeGroupId == null) { ...
@RestrictTo(LIBRARY_GROUP) RouteController function(@NonNull String routeId, @NonNull String routeGroupId) { if (routeId == null) { throw new IllegalArgumentException(STR); } if (routeGroupId == null) { throw new IllegalArgumentException(STR); } return onCreateRouteController(routeId); } public static final class Provi...
/** * Called by the media router to obtain a route controller for a particular route which is a * member of {@link MediaRouter.RouteGroup}. * <p> * The media router will invoke the {@link RouteController#onRelease} method of the route * controller when it is no longer needed to allow it to free...
Called by the media router to obtain a route controller for a particular route which is a member of <code>MediaRouter.RouteGroup</code>. The media router will invoke the <code>RouteController#onRelease</code> method of the route controller when it is no longer needed to allow it to free its resources.
onCreateRouteController
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "mediarouter/src/main/java/androidx/mediarouter/media/MediaRouteProvider.java", "license": "apache-2.0", "size": 16377 }
[ "android.content.ComponentName", "androidx.annotation.NonNull", "androidx.annotation.RestrictTo" ]
import android.content.ComponentName; import androidx.annotation.NonNull; import androidx.annotation.RestrictTo;
import android.content.*; import androidx.annotation.*;
[ "android.content", "androidx.annotation" ]
android.content; androidx.annotation;
1,772,331
EAttribute getNavSatFix_Position_covariance_type();
EAttribute getNavSatFix_Position_covariance_type();
/** * Returns the meta object for the attribute '{@link org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.NavSatFix#getPosition_covariance_type <em>Position covariance type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attr...
Returns the meta object for the attribute '<code>org.eclipse.papyrus.RobotMLLibraries.RobotML_ModelLibrary.RobotML_DataTypes.sensor_datatypes.NavSatFix#getPosition_covariance_type Position covariance type</code>'.
getNavSatFix_Position_covariance_type
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotMLLibraries/RobotML_ModelLibrary/RobotML_DataTypes/sensor_datatypes/Sensor_datatypesPackage.java", "license": "epl-1.0", "size": 152447 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
640,664
// Note: This operation may make persisted changes to the set of reserved and inactive nodes, // but it may not change the set of active nodes, as the active nodes must stay in sync with the // active config model which is changed on activate public PrepareResult prepare(ApplicationId application, Clust...
PrepareResult function(ApplicationId application, ClusterSpec cluster, NodeSpec requestedNodes, List<Node> surplusActiveNodes, NodeIndices indices, int wantedGroups, NodesAndHosts<LockedNodeList> allNodesAndHosts) { NodeAllocation probeAllocation = prepareAllocation(application, cluster, requestedNodes, surplusActiveNo...
/** * Ensure sufficient nodes are reserved or active for the given application, group and cluster * * @param application the application we are allocating to * @param cluster the cluster and group we are allocating to * @param requestedNodes a specification of the requeste...
Ensure sufficient nodes are reserved or active for the given application, group and cluster
prepare
{ "repo_name": "vespa-engine/vespa", "path": "node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/GroupPreparer.java", "license": "apache-2.0", "size": 10990 }
[ "com.yahoo.config.provision.ApplicationId", "com.yahoo.config.provision.ClusterSpec", "com.yahoo.vespa.hosted.provision.LockedNodeList", "com.yahoo.vespa.hosted.provision.Node", "com.yahoo.vespa.hosted.provision.NodesAndHosts", "java.util.List" ]
import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.ClusterSpec; import com.yahoo.vespa.hosted.provision.LockedNodeList; import com.yahoo.vespa.hosted.provision.Node; import com.yahoo.vespa.hosted.provision.NodesAndHosts; import java.util.List;
import com.yahoo.config.provision.*; import com.yahoo.vespa.hosted.provision.*; import java.util.*;
[ "com.yahoo.config", "com.yahoo.vespa", "java.util" ]
com.yahoo.config; com.yahoo.vespa; java.util;
642,884
public void render(Graphics g, Camera c){ for(Entity e : entities){ g.translate(e.getX(),e.getY()); e.render(g); g.translate(-e.getX(),-e.getY()); } }
void function(Graphics g, Camera c){ for(Entity e : entities){ g.translate(e.getX(),e.getY()); e.render(g); g.translate(-e.getX(),-e.getY()); } }
/** * Render all the entities. * @param g * @param c */
Render all the entities
render
{ "repo_name": "GeoYS/rEvolution", "path": "revolution/src/revolution/client/game/entity/EntityManager.java", "license": "gpl-3.0", "size": 1916 }
[ "org.newdawn.slick.Graphics" ]
import org.newdawn.slick.Graphics;
import org.newdawn.slick.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
198,678
private TryPolicyPortTypeProxy createPort(String endpointAddress) { return configurePort(() -> createPortProxy(endpointAddress)); }
TryPolicyPortTypeProxy function(String endpointAddress) { return configurePort(() -> createPortProxy(endpointAddress)); }
/** * Creates the port. * * @param endpointAddress * the endpoint address * @return the try policy port type proxy */
Creates the port
createPort
{ "repo_name": "OBHITA/Consent2Share", "path": "DS4P/access-control-service/pep-try-policy-client/src/main/java/gov/samhsa/acs/trypolicy/wsclient/TryPolicyWebServiceClient.java", "license": "bsd-3-clause", "size": 5439 }
[ "gov.samhsa.acs.pep.ws.contract.TryPolicyService" ]
import gov.samhsa.acs.pep.ws.contract.TryPolicyService;
import gov.samhsa.acs.pep.ws.contract.*;
[ "gov.samhsa.acs" ]
gov.samhsa.acs;
2,323,979
ServiceCall arrayStringCsvValidAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
ServiceCall arrayStringCsvValidAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
/** * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the csv-array format. * * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the csv-array format * @param serviceCallback the async ServiceCallback ...
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the csv-array format
arrayStringCsvValidAsync
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/url/QueriesOperations.java", "license": "mit", "size": 45468 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback", "java.util.List" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.List;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
2,899,677
public void setParameterService(ParameterService parameterService) { this.parameterService = parameterService; }
void function(ParameterService parameterService) { this.parameterService = parameterService; }
/** * Sets the parameterService attribute value. * @param parameterService The parameterService to set. */
Sets the parameterService attribute value
setParameterService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/ld/batch/service/impl/LaborScrubberServiceImpl.java", "license": "agpl-3.0", "size": 14002 }
[ "org.kuali.rice.coreservice.framework.parameter.ParameterService" ]
import org.kuali.rice.coreservice.framework.parameter.ParameterService;
import org.kuali.rice.coreservice.framework.parameter.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,093,005
public static String browseRangeMessagesAsXml(BrowsableEndpoint endpoint, Integer fromIndex, Integer toIndex, Boolean includeBody) { if (fromIndex == null) { fromIndex = 0; } if (toIndex == null) { toIndex = Integer.MAX_VALUE; } if (fromIndex > toIndex...
static String function(BrowsableEndpoint endpoint, Integer fromIndex, Integer toIndex, Boolean includeBody) { if (fromIndex == null) { fromIndex = 0; } if (toIndex == null) { toIndex = Integer.MAX_VALUE; } if (fromIndex > toIndex) { throw new IllegalArgumentException(STR + fromIndex + STR + toIndex); } List<Exchange> e...
/** * Browses the {@link BrowsableEndpoint} within the given range, and returns the messages as a XML payload. * * @param endpoint the browsable endpoint * @param fromIndex from range * @param toIndex to range * @param includeBody whether to include the message body in the XML payload ...
Browses the <code>BrowsableEndpoint</code> within the given range, and returns the messages as a XML payload
browseRangeMessagesAsXml
{ "repo_name": "royopa/camel", "path": "camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java", "license": "apache-2.0", "size": 19462 }
[ "java.util.List", "org.apache.camel.Exchange", "org.apache.camel.Message", "org.apache.camel.spi.BrowsableEndpoint" ]
import java.util.List; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.spi.BrowsableEndpoint;
import java.util.*; import org.apache.camel.*; import org.apache.camel.spi.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
2,372,967
@Test public void testGetInstanceClassNotFoundException() throws Exception { JsDefaultLogger logger = mock(JsDefaultLogger.class); LoggerInstanceFactory instanceFactory = mock(LoggerInstanceFactory.class); PowerMockito.whenNew(LoggerInstanceFactory.class).withNoArguments().thenReturn(instanceFactory); wh...
void function() throws Exception { JsDefaultLogger logger = mock(JsDefaultLogger.class); LoggerInstanceFactory instanceFactory = mock(LoggerInstanceFactory.class); PowerMockito.whenNew(LoggerInstanceFactory.class).withNoArguments().thenReturn(instanceFactory); when(instanceFactory.createLogger(any(Properties.class), eq...
/** * Test Functions * * @throws Exception */
Test Functions
testGetInstanceClassNotFoundException
{ "repo_name": "schnawel007/DefaultProject", "path": "src/test/java/de/joshuaschnabel/defaultproject/logger/LoggerFactoryTest.java", "license": "apache-2.0", "size": 3420 }
[ "de.joshuaschnabel.defaultproject.jsLogger.JsDefaultLogger", "java.util.Properties", "org.mockito.Matchers", "org.mockito.Mockito", "org.powermock.api.mockito.PowerMockito", "org.powermock.core.MockRepository" ]
import de.joshuaschnabel.defaultproject.jsLogger.JsDefaultLogger; import java.util.Properties; import org.mockito.Matchers; import org.mockito.Mockito; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.MockRepository;
import de.joshuaschnabel.defaultproject.*; import java.util.*; import org.mockito.*; import org.powermock.api.mockito.*; import org.powermock.core.*;
[ "de.joshuaschnabel.defaultproject", "java.util", "org.mockito", "org.powermock.api", "org.powermock.core" ]
de.joshuaschnabel.defaultproject; java.util; org.mockito; org.powermock.api; org.powermock.core;
2,127,791
public boolean wantsComments() throws SAXException;
boolean function() throws SAXException;
/** * If this handler implementation cares about comments, return * <code>true</code>. If not, return <code>false</code>. * * @return whether this handler wants comments * @throws SAXException * if something went wrong */
If this handler implementation cares about comments, return <code>true</code>. If not, return <code>false</code>
wantsComments
{ "repo_name": "anarcheuz/Funny-school-projects", "path": "WebSemantic/src/htmlparser-1.4/src/nu/validator/htmlparser/common/TokenHandler.java", "license": "mit", "size": 5635 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,344,597
CompletableFuture<List<RedisNodeDescription>> future = topologyProvider.getNodesAsync(); Mono<List<RedisNodeDescription>> initialNodes = Mono.fromFuture(future).doOnNext(nodes -> { applyAuthenticationCredentials(nodes, seed); }); return initialNodes.map(this::getConnections...
CompletableFuture<List<RedisNodeDescription>> future = topologyProvider.getNodesAsync(); Mono<List<RedisNodeDescription>> initialNodes = Mono.fromFuture(future).doOnNext(nodes -> { applyAuthenticationCredentials(nodes, seed); }); return initialNodes.map(this::getConnections) .flatMap(asyncConnections -> asyncConnection...
/** * Load master replica nodes. Result contains an ordered list of {@link RedisNodeDescription}s. The sort key is the latency. * Nodes with lower latency come first. * * @param seed collection of {@link RedisURI}s * @return mapping between {@link RedisURI} and {@link Partitions} */
Load master replica nodes. Result contains an ordered list of <code>RedisNodeDescription</code>s. The sort key is the latency. Nodes with lower latency come first
getNodes
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/java/io/lettuce/core/masterreplica/MasterReplicaTopologyRefresh.java", "license": "apache-2.0", "size": 5829 }
[ "io.lettuce.core.models.role.RedisNodeDescription", "java.util.List", "java.util.concurrent.CompletableFuture", "java.util.concurrent.CompletionStage" ]
import io.lettuce.core.models.role.RedisNodeDescription; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage;
import io.lettuce.core.models.role.*; import java.util.*; import java.util.concurrent.*;
[ "io.lettuce.core", "java.util" ]
io.lettuce.core; java.util;
759,385
@Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addProviderIDPropertyDescriptor(object); addNetworkInfrastructureServiceDescriptorPropertyDescriptor(object); } return itemPropertyDescrip...
List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addProviderIDPropertyDescriptor(object); addNetworkInfrastructureServiceDescriptorPropertyDescriptor(object); } return itemPropertyDescriptors; }
/** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the property descriptors for the adapted class.
getPropertyDescriptors
{ "repo_name": "CloudScale-Project/Environment", "path": "plugins/org.scaledl.overview.edit/src/org/scaledl/overview/specification/provider/AvailabilityZoneDescriptorItemProvider.java", "license": "epl-1.0", "size": 5396 }
[ "java.util.List", "org.eclipse.emf.edit.provider.IItemPropertyDescriptor" ]
import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import java.util.*; import org.eclipse.emf.edit.provider.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
245,283
public void setLink(Link link) { this.link = link; }
void function(Link link) { this.link = link; }
/** * Setter for the <code>Link</code> component. * * @param link */
Setter for the <code>Link</code> component
setLink
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/field/LinkField.java", "license": "apache-2.0", "size": 7014 }
[ "org.kuali.rice.krad.uif.element.Link" ]
import org.kuali.rice.krad.uif.element.Link;
import org.kuali.rice.krad.uif.element.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,734,964
public byte[] encrypt( byte message[], Random prng) throws ObjectClosedException, PlaintextBadLengthException { if (prng == null) throw new NullPointerException("NtruEncrypt input PRNG is NULL"); return encrypt(message, RandomExtractor.extractRNG(prng)); ...
byte[] function( byte message[], Random prng) throws ObjectClosedException, PlaintextBadLengthException { if (prng == null) throw new NullPointerException(STR); return encrypt(message, RandomExtractor.extractRNG(prng)); }
/** * Encrypt message and return the ciphertext. * * @param message the plaintext * @param prng the PRNG to use as a source of randomness during encryption. */
Encrypt message and return the ciphertext
encrypt
{ "repo_name": "cptwin/NTRUEncryptExample", "path": "src/com/securityinnovation/jNeo/ntruencrypt/NtruEncryptKey.java", "license": "gpl-2.0", "size": 26608 }
[ "com.securityinnovation.jNeo.ObjectClosedException", "com.securityinnovation.jNeo.PlaintextBadLengthException", "com.securityinnovation.jNeo.Random", "com.securityinnovation.jNeo.RandomExtractor" ]
import com.securityinnovation.jNeo.ObjectClosedException; import com.securityinnovation.jNeo.PlaintextBadLengthException; import com.securityinnovation.jNeo.Random; import com.securityinnovation.jNeo.RandomExtractor;
import com.securityinnovation.*;
[ "com.securityinnovation" ]
com.securityinnovation;
675,331
@Test public void testPreInvoke_isAuthorized() throws EJBAccessDeniedException { createEJBSecurityExpecations(); createAuthzServiceExpectations(); createComponentContextExpectations(); subjectManager.setCallerSubject(callerSubject); subjectManager.setInvocationSubject(in...
void function() throws EJBAccessDeniedException { createEJBSecurityExpecations(); createAuthzServiceExpectations(); createComponentContextExpectations(); subjectManager.setCallerSubject(callerSubject); subjectManager.setInvocationSubject(invocationSubject); rolesAllowed.add(STR); mock.checking(new Expectations() { { al...
/** * Test method for {@link com.ibm.ws.ejbcontainer.security.internal.EJBSecurityCollaborator#preInvoke(com.ibm.ws.ejbcontainer.EJBRequestData)}. * * @throws EJBAccessDeniedException */
Test method for <code>com.ibm.ws.ejbcontainer.security.internal.EJBSecurityCollaborator#preInvoke(com.ibm.ws.ejbcontainer.EJBRequestData)</code>
testPreInvoke_isAuthorized
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.security/test/com/ibm/ws/ejbcontainer/security/internal/EJBSecurityCollaboratorImplTest.java", "license": "epl-1.0", "size": 48241 }
[ "com.ibm.ws.ejbcontainer.EJBMethodInterface", "com.ibm.ws.ejbcontainer.InternalConstants", "org.jmock.Expectations", "org.junit.Assert" ]
import com.ibm.ws.ejbcontainer.EJBMethodInterface; import com.ibm.ws.ejbcontainer.InternalConstants; import org.jmock.Expectations; import org.junit.Assert;
import com.ibm.ws.ejbcontainer.*; import org.jmock.*; import org.junit.*;
[ "com.ibm.ws", "org.jmock", "org.junit" ]
com.ibm.ws; org.jmock; org.junit;
551,393
public void flush(FlushRequest request) { final boolean waitIfOngoing = request.waitIfOngoing(); final boolean force = request.force(); logger.trace("flush with {}", request); verifyNotClosed(); final long time = System.nanoTime(); getEngine().flush(force, wa...
void function(FlushRequest request) { final boolean waitIfOngoing = request.waitIfOngoing(); final boolean force = request.force(); logger.trace(STR, request); verifyNotClosed(); final long time = System.nanoTime(); getEngine().flush(force, waitIfOngoing); flushMetric.inc(System.nanoTime() - time); }
/** * Executes the given flush request against the engine. * * @param request the flush request */
Executes the given flush request against the engine
flush
{ "repo_name": "scorpionvicky/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 175161 }
[ "org.elasticsearch.action.admin.indices.flush.FlushRequest" ]
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
import org.elasticsearch.action.admin.indices.flush.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
720,779
public static @Nullable AccessibilityNodeInfoCompat getSelfOrMatchingDescendant( AccessibilityNodeInfoCompat node, Filter<AccessibilityNodeInfoCompat> filter) { if (node == null) { return null; } if (filter.accept(node)) { return AccessibilityNodeInfoCompat.obtain(node); } retu...
static @Nullable AccessibilityNodeInfoCompat function( AccessibilityNodeInfoCompat node, Filter<AccessibilityNodeInfoCompat> filter) { if (node == null) { return null; } if (filter.accept(node)) { return AccessibilityNodeInfoCompat.obtain(node); } return getMatchingDescendant(node, filter); }
/** * Returns the {@code node} if it matches the {@code filter}, or the first matching descendant. * Returns {@code null} if no nodes match. */
Returns the node if it matches the filter, or the first matching descendant. Returns null if no nodes match
getSelfOrMatchingDescendant
{ "repo_name": "google/talkback", "path": "utils/src/main/java/com/google/android/accessibility/utils/AccessibilityNodeInfoUtils.java", "license": "apache-2.0", "size": 105305 }
[ "androidx.core.view.accessibility.AccessibilityNodeInfoCompat", "org.checkerframework.checker.nullness.qual.Nullable" ]
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; import org.checkerframework.checker.nullness.qual.Nullable;
import androidx.core.view.accessibility.*; import org.checkerframework.checker.nullness.qual.*;
[ "androidx.core", "org.checkerframework.checker" ]
androidx.core; org.checkerframework.checker;
1,400,562
@Test public void testGetInfo() { Assertions.assertThat(this.authenticator.getInfo().length()).isGreaterThan(0); }
void function() { Assertions.assertThat(this.authenticator.getInfo().length()).isGreaterThan(0); }
/** * Test get info. */
Test get info
testGetInfo
{ "repo_name": "boyley/waffle", "path": "Source/JNA/waffle-tomcat8/src/test/java/waffle/apache/MixedAuthenticatorTests.java", "license": "epl-1.0", "size": 12421 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
709,918
public void addBase64Element(byte[] bytes, String localname) { if (bytes != null) { Element el = XMLUtils.createElementInSignatureSpace(getDocument(), localname); Text text = getDocument().createTextNode(XMLUtils.encodeToString(bytes)); el.appendChild(text); ...
void function(byte[] bytes, String localname) { if (bytes != null) { Element el = XMLUtils.createElementInSignatureSpace(getDocument(), localname); Text text = getDocument().createTextNode(XMLUtils.encodeToString(bytes)); el.appendChild(text); appendSelf(el); if (!XMLUtils.ignoreLineBreaks()) { appendSelf(createText("\...
/** * Method addBase64Element * * @param bytes * @param localname */
Method addBase64Element
addBase64Element
{ "repo_name": "md-5/jdk10", "path": "src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java", "license": "gpl-2.0", "size": 17777 }
[ "org.w3c.dom.Element", "org.w3c.dom.Text" ]
import org.w3c.dom.Element; import org.w3c.dom.Text;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,674,175
public static String getURI() { return NS; } public static final Resource NAMESPACE = m_model.createResource( NS ); public static final OntClass Document = m_model.createClass( NS + "Document" ); public static final OntClass Container = m_model.createClass( NS + "Containe...
static String function() { return NS; } public static final Resource NAMESPACE = m_model.createResource( NS ); public static final OntClass Document = m_model.createClass( NS + STR ); public static final OntClass Container = m_model.createClass( NS + STR ); public static final OntClass Item = m_model.createClass( NS + ...
/** <p>The namespace of the vocabulary as a string</p> * @see #NS */
The namespace of the vocabulary as a string
getURI
{ "repo_name": "AtomGraph/Processor", "path": "src/main/java/com/atomgraph/processor/vocabulary/DH.java", "license": "apache-2.0", "size": 2161 }
[ "org.apache.jena.ontology.DatatypeProperty", "org.apache.jena.ontology.ObjectProperty", "org.apache.jena.ontology.OntClass", "org.apache.jena.rdf.model.Resource" ]
import org.apache.jena.ontology.DatatypeProperty; import org.apache.jena.ontology.ObjectProperty; import org.apache.jena.ontology.OntClass; import org.apache.jena.rdf.model.Resource;
import org.apache.jena.ontology.*; import org.apache.jena.rdf.model.*;
[ "org.apache.jena" ]
org.apache.jena;
592,443
public OutboundRequest next() throws IOException { logger.entering(getClass().getName(),"next"); if (nextException != null) { if (nextException instanceof IOException) { throw (IOException) nextException; } else if (nextException instanceof RuntimeException) ...
OutboundRequest function() throws IOException { logger.entering(getClass().getName(),"next"); if (nextException != null) { if (nextException instanceof IOException) { throw (IOException) nextException; } else if (nextException instanceof RuntimeException) { throw (RuntimeException) nextException; } else if (nextExcepti...
/** * Implementation of interface method. * * @return next <code>nextReturn</code> array element if nextExc is null * @throws nextException if non-null * @throws AssertionError if <code>nextReturn</code> is null or * @throws NoSuchElementException if all elements have been returned *...
Implementation of interface method
next
{ "repo_name": "pfirmstone/JGDMS", "path": "qa/src/org/apache/river/test/spec/jeri/util/FakeOutboundRequestIterator.java", "license": "apache-2.0", "size": 5674 }
[ "java.io.IOException", "java.util.NoSuchElementException", "net.jini.jeri.OutboundRequest" ]
import java.io.IOException; import java.util.NoSuchElementException; import net.jini.jeri.OutboundRequest;
import java.io.*; import java.util.*; import net.jini.jeri.*;
[ "java.io", "java.util", "net.jini.jeri" ]
java.io; java.util; net.jini.jeri;
296,151
@Nullable protected Object handleGetObject(@NotNull final String key, @NotNull final ResourceBundle bundle) { return bundle.getObject(key); }
Object function(@NotNull final String key, @NotNull final ResourceBundle bundle) { return bundle.getObject(key); }
/** * Gets an object for the given key from this resource bundle. * @param key the key. * @param bundle the bundle. * @return the object. */
Gets an object for the given key from this resource bundle
handleGetObject
{ "repo_name": "rydnr/java-commons", "path": "src/main/java/org/acmsl/commons/CachingBundleI14able.java", "license": "gpl-2.0", "size": 16572 }
[ "java.util.ResourceBundle", "org.jetbrains.annotations.NotNull" ]
import java.util.ResourceBundle; import org.jetbrains.annotations.NotNull;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
372,234
EAttribute getQuestionBase_Description();
EAttribute getQuestionBase_Description();
/** * Returns the meta object for the attribute '{@link questionairemodel.QuestionBase#getDescription <em>Description</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Description</em>'. * @see questionairemodel.QuestionBase#getDescription() * @see #g...
Returns the meta object for the attribute '<code>questionairemodel.QuestionBase#getDescription Description</code>'.
getQuestionBase_Description
{ "repo_name": "rasmusgreve/questionaire", "path": "Questionaire/src/questionairemodel/QuestionairemodelPackage.java", "license": "mit", "size": 46108 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,360,556
private ApplicationReport monitorApplication(ApplicationId appId, Set<YarnApplicationState> finalState) throws YarnException, IOException { long foundAMCompletedTime = 0; final int timeToWaitMS = 10000; StringBuilder expectedFinalState = new StringBuilder(); boolean first = true; for ...
ApplicationReport function(ApplicationId appId, Set<YarnApplicationState> finalState) throws YarnException, IOException { long foundAMCompletedTime = 0; final int timeToWaitMS = 10000; StringBuilder expectedFinalState = new StringBuilder(); boolean first = true; for (YarnApplicationState state : finalState) { if (first...
/** * Monitor the submitted application for completion. Kill application if time * expires. * * @param appId * Application Id of application to be monitored * @return true if application completed successfully * @throws YarnException * @throws IOException */
Monitor the submitted application for completion. Kill application if time expires
monitorApplication
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-unmanaged-am-launcher/src/main/java/org/apache/hadoop/yarn/applications/unmanagedamlauncher/UnmanagedAMLauncher.java", "license": "apache-2.0", "size": 16835 }
[ "java.io.IOException", "java.util.Set", "org.apache.hadoop.yarn.api.records.ApplicationId", "org.apache.hadoop.yarn.api.records.ApplicationReport", "org.apache.hadoop.yarn.api.records.YarnApplicationState", "org.apache.hadoop.yarn.exceptions.YarnException" ]
import java.io.IOException; import java.util.Set; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ApplicationReport; import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.exceptions.YarnException;
import java.io.*; import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.exceptions.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,581,843
private String decodeAndEscapeSelectors(FacesContext context, UIComponent component, String selector) { selector = ExpressionResolver.getComponentIDs(context, component, selector); selector = BsfUtils.escapeJQuerySpecialCharsInSelector(selector); return selector; }
String function(FacesContext context, UIComponent component, String selector) { selector = ExpressionResolver.getComponentIDs(context, component, selector); selector = BsfUtils.escapeJQuerySpecialCharsInSelector(selector); return selector; }
/** * Decode and escape selectors if necessary * @param context * @param component * @param selector * @return */
Decode and escape selectors if necessary
decodeAndEscapeSelectors
{ "repo_name": "chongma/BootsFaces-OSP", "path": "src/main/java/net/bootsfaces/component/scrollSpy/ScrollSpyRenderer.java", "license": "apache-2.0", "size": 5888 }
[ "javax.faces.component.UIComponent", "javax.faces.context.FacesContext", "net.bootsfaces.expressions.ExpressionResolver", "net.bootsfaces.utils.BsfUtils" ]
import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import net.bootsfaces.expressions.ExpressionResolver; import net.bootsfaces.utils.BsfUtils;
import javax.faces.component.*; import javax.faces.context.*; import net.bootsfaces.expressions.*; import net.bootsfaces.utils.*;
[ "javax.faces", "net.bootsfaces.expressions", "net.bootsfaces.utils" ]
javax.faces; net.bootsfaces.expressions; net.bootsfaces.utils;
1,279,024
public static void configure(final Element element) { final DOMConfigurator configurator = new DOMConfigurator(); configurator.doConfigure(element, LogManager.getLoggerRepository()); }
static void function(final Element element) { final DOMConfigurator configurator = new DOMConfigurator(); configurator.doConfigure(element, LogManager.getLoggerRepository()); }
/** * Configure log4j using a <code>configuration</code> element as defined in the log4j.dtd. */
Configure log4j using a <code>configuration</code> element as defined in the log4j.dtd
configure
{ "repo_name": "cacheonix/cacheonix-core", "path": "src/org/cacheonix/impl/util/logging/xml/DOMConfigurator.java", "license": "lgpl-2.1", "size": 38684 }
[ "org.cacheonix.impl.util.logging.LogManager", "org.w3c.dom.Element" ]
import org.cacheonix.impl.util.logging.LogManager; import org.w3c.dom.Element;
import org.cacheonix.impl.util.logging.*; import org.w3c.dom.*;
[ "org.cacheonix.impl", "org.w3c.dom" ]
org.cacheonix.impl; org.w3c.dom;
430,805
boolean onDoubleTap(MotionEvent e);
boolean onDoubleTap(MotionEvent e);
/** * Notified when a double-tap occurs. * * @param e The down motion event of the first tap of the double-tap. * @return true if the event is consumed, else false */
Notified when a double-tap occurs
onDoubleTap
{ "repo_name": "VeeamSoftware/FreeRDP", "path": "client/Android/FreeRDPCore/src/com/freerdp/freerdpcore/utils/GestureDetector.java", "license": "apache-2.0", "size": 21119 }
[ "android.view.MotionEvent" ]
import android.view.MotionEvent;
import android.view.*;
[ "android.view" ]
android.view;
371,446
public USqlTableValuedFunction getTableValuedFunction(String accountName, String databaseName, String schemaName, String tableValuedFunctionName) { return getTableValuedFunctionWithServiceResponseAsync(accountName, databaseName, schemaName, tableValuedFunctionName).toBlocking().single().body(); }
USqlTableValuedFunction function(String accountName, String databaseName, String schemaName, String tableValuedFunctionName) { return getTableValuedFunctionWithServiceResponseAsync(accountName, databaseName, schemaName, tableValuedFunctionName).toBlocking().single().body(); }
/** * Retrieves the specified table valued function from the Data Lake Analytics catalog. * * @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations. * @param databaseName The name of the database containing the table valued function. * @param schemaNa...
Retrieves the specified table valued function from the Data Lake Analytics catalog
getTableValuedFunction
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java", "license": "mit", "size": 687714 }
[ "com.microsoft.azure.management.datalake.analytics.models.USqlTableValuedFunction" ]
import com.microsoft.azure.management.datalake.analytics.models.USqlTableValuedFunction;
import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
396,725
public boolean isOnDataProperty(String cons) { if(inputConfig.contains( ResourceFactory.createResource(cons), ResourceFactory.createProperty(ConstraintsManagerConfig.onDataProperty) )) return true; else return false; }
boolean function(String cons) { if(inputConfig.contains( ResourceFactory.createResource(cons), ResourceFactory.createProperty(ConstraintsManagerConfig.onDataProperty) )) return true; else return false; }
/** * returns true if the constraint applies to a data property * @param cons * @return */
returns true if the constraint applies to a data property
isOnDataProperty
{ "repo_name": "metarelate/terminology-server", "path": "moduleTmCore/src/main/java/net/metarelate/terminology/management/ConstraintsManager.java", "license": "gpl-3.0", "size": 20624 }
[ "com.hp.hpl.jena.rdf.model.ResourceFactory" ]
import com.hp.hpl.jena.rdf.model.ResourceFactory;
import com.hp.hpl.jena.rdf.model.*;
[ "com.hp.hpl" ]
com.hp.hpl;
2,432,459
public Adapter createBoolAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link fr.lip6.move.pnml.symmetricnet.booleans.Bool <em>Bool</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <...
Creates a new adapter for an object of class '<code>fr.lip6.move.pnml.symmetricnet.booleans.Bool Bool</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createBoolAdapter
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/booleans/util/BooleansAdapterFactory.java", "license": "epl-1.0", "size": 13922 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
321,952
private void startAndesBroker() throws ConfigurationException, AndesException { brokerShouldBeStarted = false; String dSetupValue = System.getProperty("setup"); if (dSetupValue != null) { // Source MB rdbms database if data source configurations and supported sql exist ...
void function() throws ConfigurationException, AndesException { brokerShouldBeStarted = false; String dSetupValue = System.getProperty("setup"); if (dSetupValue != null) { MessageBrokerDBUtil messageBrokerDBUtil = new MessageBrokerDBUtil(); messageBrokerDBUtil.initialize(); } log.info(STR); System.setProperty(BrokerOpt...
/** * Start Andes Broker and related components with given configurations. * * @throws ConfigurationException * @throws AndesException */
Start Andes Broker and related components with given configurations
startAndesBroker
{ "repo_name": "sdkottegoda/carbon-business-messaging", "path": "components/andes/org.wso2.carbon.andes/src/main/java/org/wso2/carbon/andes/internal/QpidServiceComponent.java", "license": "apache-2.0", "size": 24216 }
[ "org.wso2.andes.kernel.AndesException", "org.wso2.andes.server.BrokerOptions", "org.wso2.andes.server.Main", "org.wso2.andes.server.registry.ApplicationRegistry", "org.wso2.carbon.andes.event.core.qpid.QpidServerDetails", "org.wso2.carbon.andes.service.QpidService", "org.wso2.carbon.andes.service.except...
import org.wso2.andes.kernel.AndesException; import org.wso2.andes.server.BrokerOptions; import org.wso2.andes.server.Main; import org.wso2.andes.server.registry.ApplicationRegistry; import org.wso2.carbon.andes.event.core.qpid.QpidServerDetails; import org.wso2.carbon.andes.service.QpidService; import org.wso2.carbon....
import org.wso2.andes.kernel.*; import org.wso2.andes.server.*; import org.wso2.andes.server.registry.*; import org.wso2.carbon.andes.event.core.qpid.*; import org.wso2.carbon.andes.service.*; import org.wso2.carbon.andes.service.exception.*; import org.wso2.carbon.andes.utils.*;
[ "org.wso2.andes", "org.wso2.carbon" ]
org.wso2.andes; org.wso2.carbon;
2,806,692
@Override public List<? extends Shape> getDebugShapes() { List<Shape> dbg = getACZDebugShapes(); dbg.addAll(reservationGridManager.getDebugShapes()); return dbg; }
List<? extends Shape> function() { List<Shape> dbg = getACZDebugShapes(); dbg.addAll(reservationGridManager.getDebugShapes()); return dbg; }
/** * Get any shapes to display for debugging purposes. * * @return any shapes to display for debugging purposes */
Get any shapes to display for debugging purposes
getDebugShapes
{ "repo_name": "shunzh/aim5", "path": "src/main/java/aim4/im/v2i/V2IManager.java", "license": "gpl-3.0", "size": 14200 }
[ "java.awt.Shape", "java.util.List" ]
import java.awt.Shape; import java.util.List;
import java.awt.*; import java.util.*;
[ "java.awt", "java.util" ]
java.awt; java.util;
1,502,588
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> reissueWithResponseAsync( String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest) { if (this.client.getEndpoint() == null) { return Mo...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String resourceGroupName, String certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == ...
/** * Reissue an existing certificate order. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param certificateOrderName Name of the certificate order. * @param reissueCertificateOrderRequest Parameters for the reissue. * @throws IllegalArgumentExce...
Reissue an existing certificate order
reissueWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceCertificateOrdersClientImpl.java", "license": "mit", "size": 205075 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.appservice.models.ReissueCertificateOrderRequest" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.appservice.models.ReissueCertificateOrderRequest;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,360,433
public static CashBookBean getCashBook(Properties ctx, int cashBookId, String trxName) throws OperationException { MCashBook cashBook = new MCashBook(ctx, cashBookId, trxName); if (cashBook.get_ID() <= 0) { throw new OperationException("Could not load Cash Book with id: " + c...
static CashBookBean function(Properties ctx, int cashBookId, String trxName) throws OperationException { MCashBook cashBook = new MCashBook(ctx, cashBookId, trxName); if (cashBook.get_ID() <= 0) { throw new OperationException(STR + cashBookId); } return getBean(cashBook); }
/** * Returns the data model of the Cash Book PO * @param ctx Context * @param cashBookId Cash Book ID * @param trxName Transaction * @return Cash Book data model * @throws OperationException If Cash book PO could not be loaded */
Returns the data model of the Cash Book PO
getCashBook
{ "repo_name": "erpcya/adempierePOS", "path": "posterita/posterita/src/main/org/posterita/businesslogic/CashManager.java", "license": "gpl-2.0", "size": 51813 }
[ "java.util.Properties", "org.compiere.model.MCashBook", "org.posterita.beans.CashBookBean", "org.posterita.exceptions.OperationException" ]
import java.util.Properties; import org.compiere.model.MCashBook; import org.posterita.beans.CashBookBean; import org.posterita.exceptions.OperationException;
import java.util.*; import org.compiere.model.*; import org.posterita.beans.*; import org.posterita.exceptions.*;
[ "java.util", "org.compiere.model", "org.posterita.beans", "org.posterita.exceptions" ]
java.util; org.compiere.model; org.posterita.beans; org.posterita.exceptions;
563,189
public void authUrlValidRedirect() throws UnsupportedEncodingException { // set up connnection and server BellaDatiConnection connection = BellaDati.connect(server.getHttpURL()); final String key = "key"; final String requestToken = "abc123"; final String redirectUrl = "http://www.example.com"; server.r...
void function() throws UnsupportedEncodingException { BellaDatiConnection connection = BellaDati.connect(server.getHttpURL()); final String key = "key"; final String requestToken = STR; final String redirectUrl = STR/oauth/requestToken", new TestRequestHandler() {
/** * Valid redirect URL is appended. */
Valid redirect URL is appended
authUrlValidRedirect
{ "repo_name": "BellaDati/belladati-sdk-android", "path": "test/com/belladati/sdk/impl/AuthenticationTest.java", "license": "apache-2.0", "size": 7088 }
[ "com.belladati.sdk.BellaDati", "com.belladati.sdk.BellaDatiConnection", "com.belladati.sdk.test.TestRequestHandler", "java.io.UnsupportedEncodingException" ]
import com.belladati.sdk.BellaDati; import com.belladati.sdk.BellaDatiConnection; import com.belladati.sdk.test.TestRequestHandler; import java.io.UnsupportedEncodingException;
import com.belladati.sdk.*; import com.belladati.sdk.test.*; import java.io.*;
[ "com.belladati.sdk", "java.io" ]
com.belladati.sdk; java.io;
133,637
@JsonProperty( "fast_network_discovery" ) public void setFastNetworkDiscovery( String fastNetworkDiscovery ) { this.fastNetworkDiscovery = fastNetworkDiscovery; }
@JsonProperty( STR ) void function( String fastNetworkDiscovery ) { this.fastNetworkDiscovery = fastNetworkDiscovery; }
/** * Sets fast network discovery. * * @param fastNetworkDiscovery the fast network discovery */
Sets fast network discovery
setFastNetworkDiscovery
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/policies/models/PolicySettings.java", "license": "mit", "size": 90382 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,164,817
void unbindFromContext(Context context) throws NamingException;
void unbindFromContext(Context context) throws NamingException;
/** * Unbinds a naming context from the current thread's classloader. * * @param context the catalina context * @throws NamingException if unbinding the classloader fails */
Unbinds a naming context from the current thread's classloader
unbindFromContext
{ "repo_name": "dougwm/psi-probe", "path": "core/src/main/java/psiprobe/TomcatContainer.java", "license": "gpl-2.0", "size": 8047 }
[ "javax.naming.NamingException", "org.apache.catalina.Context" ]
import javax.naming.NamingException; import org.apache.catalina.Context;
import javax.naming.*; import org.apache.catalina.*;
[ "javax.naming", "org.apache.catalina" ]
javax.naming; org.apache.catalina;
1,556,948
@Override public List<E> subList(final int fromIndex, final int toIndex) { return Collections.checkedList(super.subList(fromIndex, toIndex), type); }
List<E> function(final int fromIndex, final int toIndex) { return Collections.checkedList(super.subList(fromIndex, toIndex), type); }
/** * Returns a checked sublist. * * <p><b>Limitation:</b> current implementation checks only the type. * It does not prevent the insertion of {@code null} values.</p> * * @param fromIndex Index of the first element. * @param toIndex Index after the last element. * @return Th...
Returns a checked sublist. Limitation: current implementation checks only the type. It does not prevent the insertion of null values
subList
{ "repo_name": "desruisseaux/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java", "license": "apache-2.0", "size": 13816 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,466,588
public PurpleProtocolPlugin getProtocol() { return getManager().getPluginManager().getProtocolPlugin( getProtocol_native()); }
PurpleProtocolPlugin function() { return getManager().getPluginManager().getProtocolPlugin( getProtocol_native()); }
/** * Gets the protocol this account uses. * * @return The protocol plugin. */
Gets the protocol this account uses
getProtocol
{ "repo_name": "42ShadowsofAMan/libpurple-android", "path": "jpurple/src/im/pidgin/jpurple/account/PurpleAccount.java", "license": "gpl-2.0", "size": 8356 }
[ "im.pidgin.jpurple.plugin.PurpleProtocolPlugin" ]
import im.pidgin.jpurple.plugin.PurpleProtocolPlugin;
import im.pidgin.jpurple.plugin.*;
[ "im.pidgin.jpurple" ]
im.pidgin.jpurple;
1,449,513
public Varargs yield(Varargs args) { if (running == null || running.isMainThread()) throw new LuaError("cannot yield main thread"); final LuaThread.State s = running.state; return s.lua_yield(args); } static class StrReader extends Reader { final String s; int i = 0, n; StrReader(String s) { t...
Varargs function(Varargs args) { if (running == null running.isMainThread()) throw new LuaError(STR); final LuaThread.State s = running.state; return s.lua_yield(args); } static class StrReader extends Reader { final String s; int i = 0, n; StrReader(String s) { this.s = s; n = s.length(); }
/** Function which yields the current thread. * @param args Arguments to supply as return values in the resume function of the resuming thread. * @return Values supplied as arguments to the resume() call that reactivates this thread. */
Function which yields the current thread
yield
{ "repo_name": "SkyNetAB/MercuryRifts", "path": "src/main/java/org/luaj/vm3/Globals.java", "license": "lgpl-3.0", "size": 12898 }
[ "java.io.Reader" ]
import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
680,192