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 Properties postToClientLogin() throws Exception { HttpURLConnection connection = null; try { // Aim the connection at the client login service. log.info("postToClientLogin()......CLIENT_LOGIN_URL:"+CLIENT_LOGIN_URL); URL url = new URL(CLIENT_LOGIN_URL); connection = (HttpURLCon...
Properties function() throws Exception { HttpURLConnection connection = null; try { log.info(STR+CLIENT_LOGIN_URL); URL url = new URL(CLIENT_LOGIN_URL); connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestMethod("POST"); connection.setCh...
/** * Performs the POST to the client login API. * * @return Properties object containing information about the client login API * call. * @throws Exception */
Performs the POST to the client login API
postToClientLogin
{ "repo_name": "nareshPokhriyal86/testing", "path": "src/main/java/com/lin/web/util/ClientLoginAuth.java", "license": "apache-2.0", "size": 10590 }
[ "java.net.HttpURLConnection", "java.util.Properties" ]
import java.net.HttpURLConnection; import java.util.Properties;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,314,230
public EditorHandler<T> getHandler() { return handler; }
EditorHandler<T> function() { return handler; }
/** * Returns the handler responsible for binding data and editor widgets * to this editor. * * @return the editor handler or null if not set */
Returns the handler responsible for binding data and editor widgets to this editor
getHandler
{ "repo_name": "Peppe/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 306271 }
[ "com.vaadin.client.widget.grid.EditorHandler" ]
import com.vaadin.client.widget.grid.EditorHandler;
import com.vaadin.client.widget.grid.*;
[ "com.vaadin.client" ]
com.vaadin.client;
1,832,264
@Test public void testContents() { assertThat(intent1.appId(), equalTo(APP_ID)); assertThat(intent1.one(), Matchers.equalTo(connectPoint("one", 1))); assertThat(intent1.two(), Matchers.equalTo(connectPoint("two", 2))); assertThat(intent1.priority(), is(PRIORITY)); assertT...
void function() { assertThat(intent1.appId(), equalTo(APP_ID)); assertThat(intent1.one(), Matchers.equalTo(connectPoint("one", 1))); assertThat(intent1.two(), Matchers.equalTo(connectPoint("two", 2))); assertThat(intent1.priority(), is(PRIORITY)); assertThat(intent1.selector(), is(selector)); assertThat(intent1.treatme...
/** * Checks that the optical path ntent objects are created correctly. */
Checks that the optical path ntent objects are created correctly
testContents
{ "repo_name": "sdnwiselab/onos", "path": "core/api/src/test/java/org/onosproject/net/intent/TwoWayP2PIntentTest.java", "license": "apache-2.0", "size": 3262 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.IsEqual" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.IsEqual;
import org.hamcrest.*; import org.hamcrest.core.*;
[ "org.hamcrest", "org.hamcrest.core" ]
org.hamcrest; org.hamcrest.core;
269,834
@NonNull public FilePath[] list(final String includes) throws IOException, InterruptedException { return list(includes, null); }
FilePath[] function(final String includes) throws IOException, InterruptedException { return list(includes, null); }
/** * List up files in this directory that matches the given Ant-style filter. * * @param includes * See {@link FileSet} for the syntax. String like "foo/*.zip" or "foo/*&#42;/*.xml" * @return * can be empty but always non-null. */
List up files in this directory that matches the given Ant-style filter
list
{ "repo_name": "pjanouse/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 148331 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,868,103
@Override public DataBuffer create(Pointer pointer, DataBuffer.Type type, long length, Indexer indexer) { switch (type) { case INT: return new IntBuffer(pointer, indexer, length); case DOUBLE: return new DoubleBuffer(pointer, indexer, length); ...
DataBuffer function(Pointer pointer, DataBuffer.Type type, long length, Indexer indexer) { switch (type) { case INT: return new IntBuffer(pointer, indexer, length); case DOUBLE: return new DoubleBuffer(pointer, indexer, length); case FLOAT: return new FloatBuffer(pointer, indexer, length); } throw new IllegalArgumentEx...
/** * Create a data buffer based on the * given pointer, data buffer type, * and length of the buffer * * @param pointer the pointer to use * @param type the type of buffer * @param length the length of the buffer * @param indexer the indexer for the pointer * @return th...
Create a data buffer based on the given pointer, data buffer type, and length of the buffer
create
{ "repo_name": "huitseeker/nd4j", "path": "nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/factory/DefaultDataBufferFactory.java", "license": "apache-2.0", "size": 22752 }
[ "org.bytedeco.javacpp.Pointer", "org.bytedeco.javacpp.indexer.Indexer", "org.nd4j.linalg.api.buffer.DataBuffer", "org.nd4j.linalg.api.buffer.DoubleBuffer", "org.nd4j.linalg.api.buffer.FloatBuffer", "org.nd4j.linalg.api.buffer.IntBuffer" ]
import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.indexer.Indexer; import org.nd4j.linalg.api.buffer.DataBuffer; import org.nd4j.linalg.api.buffer.DoubleBuffer; import org.nd4j.linalg.api.buffer.FloatBuffer; import org.nd4j.linalg.api.buffer.IntBuffer;
import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.indexer.*; import org.nd4j.linalg.api.buffer.*;
[ "org.bytedeco.javacpp", "org.nd4j.linalg" ]
org.bytedeco.javacpp; org.nd4j.linalg;
1,189,072
@Nullable public DATATYPE getIfChanged (@Nullable final DATATYPE aUnchangedValue) { return m_eChange.isChanged () ? m_aObj : aUnchangedValue; }
DATATYPE function (@Nullable final DATATYPE aUnchangedValue) { return m_eChange.isChanged () ? m_aObj : aUnchangedValue; }
/** * Get the store value if this is a change. Otherwise the passed unchanged * value is returned. * * @param aUnchangedValue * The unchanged value to be used. May be <code>null</code>. * @return Either the stored value or the unchanged value. May be * <code>null</code>. */
Get the store value if this is a change. Otherwise the passed unchanged value is returned
getIfChanged
{ "repo_name": "lsimons/phloc-schematron-standalone", "path": "phloc-commons/src/main/java/com/phloc/commons/state/impl/ChangeWithValue.java", "license": "apache-2.0", "size": 5138 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,243,564
protected void extractPayments(boolean immediateOnly, Date processRunDate) { LOG.debug("extractPayments() started"); Person uuser = getPersonService().getPersonByPrincipalName(KFSConstants.SYSTEM_USER); if (uuser == null) { LOG.error("extractPayments() Unable to find user " + KF...
void function(boolean immediateOnly, Date processRunDate) { LOG.debug(STR); Person uuser = getPersonService().getPersonByPrincipalName(KFSConstants.SYSTEM_USER); if (uuser == null) { LOG.error(STR + KFSConstants.SYSTEM_USER); throw new IllegalArgumentException(STR + KFSConstants.SYSTEM_USER); } LOG.debug(STR); List<Str...
/** * Extracts payments from the database * * @param immediateOnly whether to pick up immediate payments only * @param processRunDate time/date to use to put on the {@link Batch} that's created; and when immediateOnly is false, is also * used as the maximum allowed PREQ pay date when sea...
Extracts payments from the database
extractPayments
{ "repo_name": "ua-eas/kfs", "path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/service/impl/PdpExtractServiceImpl.java", "license": "agpl-3.0", "size": 54309 }
[ "java.util.Date", "java.util.List", "org.kuali.kfs.sys.KFSConstants", "org.kuali.rice.kim.api.identity.Person" ]
import java.util.Date; import java.util.List; import org.kuali.kfs.sys.KFSConstants; import org.kuali.rice.kim.api.identity.Person;
import java.util.*; import org.kuali.kfs.sys.*; import org.kuali.rice.kim.api.identity.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
564,015
public PaintScale getScale() { return this.scale; }
PaintScale function() { return this.scale; }
/** * Returns the scale used to convert values to colors. * * @return The scale (never <code>null</code>). * * @see #setScale(PaintScale) */
Returns the scale used to convert values to colors
getScale
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/chart/title/PaintScaleLegend.java", "license": "gpl-3.0", "size": 25816 }
[ "org.jfree.chart.renderer.PaintScale" ]
import org.jfree.chart.renderer.PaintScale;
import org.jfree.chart.renderer.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,851,066
protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ScaleLiteral_value_feature"), getString("_UI_PropertyDescriptor_descr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), QMLContractPackage.Literals.SCALE_LITERAL__VALUE, true, false, false, ItemPropertyDescriptor.GENE...
/** * This adds a property descriptor for the Value feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Value feature.
addValuePropertyDescriptor
{ "repo_name": "KAMP-Research/KAMP", "path": "bundles/Toometa/de.uka.ipd.sdq.dsexplore.qml.contract.edit/src/de/uka/ipd/sdq/dsexplore/qml/contract/provider/ScaleLiteralItemProvider.java", "license": "apache-2.0", "size": 5909 }
[ "de.uka.ipd.sdq.dsexplore.qml.contract.QMLContractPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import de.uka.ipd.sdq.dsexplore.qml.contract.QMLContractPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import de.uka.ipd.sdq.dsexplore.qml.contract.*; import org.eclipse.emf.edit.provider.*;
[ "de.uka.ipd", "org.eclipse.emf" ]
de.uka.ipd; org.eclipse.emf;
1,098,969
private PieData getEmptyData() { PieDataSet dataSet = new PieDataSet(null, getResources().getString(R.string.label_chart_no_data)); dataSet.addEntry(new Entry(1, 0)); dataSet.setColor(NO_DATA_COLOR); dataSet.setDrawValues(false); return new PieData(Collections.singletonList("...
PieData function() { PieDataSet dataSet = new PieDataSet(null, getResources().getString(R.string.label_chart_no_data)); dataSet.addEntry(new Entry(1, 0)); dataSet.setColor(NO_DATA_COLOR); dataSet.setDrawValues(false); return new PieData(Collections.singletonList(""), dataSet); }
/** * Returns a data object that represents situation when no user data available * @return a {@code PieData} instance for situation when no user data available */
Returns a data object that represents situation when no user data available
getEmptyData
{ "repo_name": "codinguser/gnucash-android", "path": "app/src/main/java/org/gnucash/android/ui/report/piechart/PieChartFragment.java", "license": "apache-2.0", "size": 11915 }
[ "com.github.mikephil.charting.data.Entry", "com.github.mikephil.charting.data.PieData", "com.github.mikephil.charting.data.PieDataSet", "java.util.Collections" ]
import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.PieData; import com.github.mikephil.charting.data.PieDataSet; import java.util.Collections;
import com.github.mikephil.charting.data.*; import java.util.*;
[ "com.github.mikephil", "java.util" ]
com.github.mikephil; java.util;
609,967
protected static boolean configEqualKubernetesDTO(@NotNull Object entity1, @NotNull Object entity2, @NotNull Class<?> clazz) { // lets iterate through the objects making sure we've not BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (In...
static boolean function(@NotNull Object entity1, @NotNull Object entity2, @NotNull Class<?> clazz) { BeanInfo beanInfo = null; try { beanInfo = Introspector.getBeanInfo(clazz); } catch (IntrospectionException e) { LOG.warn(STR + clazz.getName() + STR + e, e); return false; } try { PropertyDescriptor[] propertyDescripto...
/** * Compares 2 instances of the given Kubernetes DTO class to see if the user has changed their configuration. * <p/> * This method will ignore properties {@link #ignoredProperties} such as status or timestamp properties */
Compares 2 instances of the given Kubernetes DTO class to see if the user has changed their configuration. This method will ignore properties <code>#ignoredProperties</code> such as status or timestamp properties
configEqualKubernetesDTO
{ "repo_name": "hekonsek/fabric8", "path": "components/kubernetes-api/src/main/java/io/fabric8/kubernetes/api/UserConfigurationCompare.java", "license": "apache-2.0", "size": 7554 }
[ "java.beans.BeanInfo", "java.beans.IntrospectionException", "java.beans.Introspector", "java.beans.PropertyDescriptor", "java.lang.reflect.Method", "javax.validation.constraints.NotNull" ]
import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import javax.validation.constraints.NotNull;
import java.beans.*; import java.lang.reflect.*; import javax.validation.constraints.*;
[ "java.beans", "java.lang", "javax.validation" ]
java.beans; java.lang; javax.validation;
1,102,301
public BigDecimal getCommission(); public static final String COLUMNNAME_CostPerTrx = "CostPerTrx";
BigDecimal function(); public static final String COLUMNNAME_CostPerTrx = STR;
/** Get Commission %. * Commission stated as a percentage */
Get Commission %. Commission stated as a percentage
getCommission
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_C_PaymentProcessor.java", "license": "gpl-2.0", "size": 13910 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,070,475
protected void notifyRemoved(Item item) throws AccessControlException { log.debug("Item was removed: [" + item + "]"); List clone = new ArrayList(itemManagerListeners); for (Iterator i = clone.iterator(); i.hasNext();) { ItemManagerListener listener = (ItemManagerListener) i.next...
void function(Item item) throws AccessControlException { log.debug(STR + item + "]"); List clone = new ArrayList(itemManagerListeners); for (Iterator i = clone.iterator(); i.hasNext();) { ItemManagerListener listener = (ItemManagerListener) i.next(); log.debug(STR + listener + "]"); listener.itemRemoved(item); } } publ...
/** * Notifies the listeners that an item was removed. * @param item The item that was removed. * @throws AccessControlException if an error occurs. */
Notifies the listeners that an item was removed
notifyRemoved
{ "repo_name": "apache/lenya", "path": "src/java/org/apache/lenya/ac/file/FileItemManager.java", "license": "apache-2.0", "size": 16520 }
[ "java.io.File", "java.io.FileFilter", "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.lenya.ac.AccessControlException", "org.apache.lenya.ac.Item", "org.apache.lenya.ac.ItemManagerListener", ...
import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.lenya.ac.AccessControlException; import org.apache.lenya.ac.Item; import org.apa...
import java.io.*; import java.util.*; import org.apache.lenya.ac.*; import org.apache.log4j.*;
[ "java.io", "java.util", "org.apache.lenya", "org.apache.log4j" ]
java.io; java.util; org.apache.lenya; org.apache.log4j;
1,496,028
private void drawUnion(MetaUnion field, String indent, MetaType type){ String typedefName = type.getFieldTypedefName(field); if(typedefName != null){ writer.write(indent + typedefName + " " + field.getName() + ";" + newLine + separator); } else{ writer.write(i...
void function(MetaUnion field, String indent, MetaType type){ String typedefName = type.getFieldTypedefName(field); if(typedefName != null){ writer.write(indent + typedefName + " STR;" + newLine + separator); } else{ writer.write(indent + STR + field.getTypeName() + STR + field.getDiscriminator().getTypeName() + STR + ...
/** * Creates a plain text representation of a union. * * @param field The union to create the plain text representation of. * @param indent The indentation to draw. * @param type The complete type. */
Creates a plain text representation of a union
drawUnion
{ "repo_name": "SanderMertens/opensplice", "path": "src/tools/cm/common/code/org/opensplice/common/view/entity/EntityInfoFormatterText.java", "license": "gpl-3.0", "size": 15697 }
[ "java.util.ArrayList", "org.opensplice.cm.meta.MetaType", "org.opensplice.cm.meta.MetaUnion", "org.opensplice.cm.meta.MetaUnionCase" ]
import java.util.ArrayList; import org.opensplice.cm.meta.MetaType; import org.opensplice.cm.meta.MetaUnion; import org.opensplice.cm.meta.MetaUnionCase;
import java.util.*; import org.opensplice.cm.meta.*;
[ "java.util", "org.opensplice.cm" ]
java.util; org.opensplice.cm;
2,462,056
@Override protected void startLoading( Properties props ) throws RepositoryException { createRc( props ); super.startLoading( props ); }
void function( Properties props ) throws RepositoryException { createRc( props ); super.startLoading( props ); }
/** * Initiates the loading process with the given properties. Subclasses will * usually use this function to open their repositories before the rest of the * loading process occurs. If overridden, subclasses should be sure to call * their superclass's version of this function in addition to whatever other * ...
Initiates the loading process with the given properties. Subclasses will usually use this function to open their repositories before the rest of the loading process occurs. If overridden, subclasses should be sure to call their superclass's version of this function in addition to whatever other processing they do
startLoading
{ "repo_name": "Ostrich-Emulators/semtool", "path": "common/src/main/java/com/ostrichemulators/semtool/rdf/engine/impl/AbstractSesameEngine.java", "license": "gpl-3.0", "size": 16366 }
[ "java.util.Properties", "org.eclipse.rdf4j.repository.RepositoryException" ]
import java.util.Properties; import org.eclipse.rdf4j.repository.RepositoryException;
import java.util.*; import org.eclipse.rdf4j.repository.*;
[ "java.util", "org.eclipse.rdf4j" ]
java.util; org.eclipse.rdf4j;
742,476
@Override public AmortizedDeque<T> popFront() throws NoSuchElementException { if (isEmpty()) { throw new NoSuchElementException(); } return new AmortizedDeque<>(head.popFront(), tail); }
AmortizedDeque<T> function() throws NoSuchElementException { if (isEmpty()) { throw new NoSuchElementException(); } return new AmortizedDeque<>(head.popFront(), tail); }
/** * Pop element from the head of the queue. O(1). */
Pop element from the head of the queue. O(1)
popFront
{ "repo_name": "mikea/concrete", "path": "src/main/java/com/mikea/concrete/impl/AmortizedDeque.java", "license": "apache-2.0", "size": 2586 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,576,689
public void testFailDelete() { try { MyDAOImpl.isTestForFail=true; DefaultBizLogic defaultBizLogic = new DefaultBizLogic(); defaultBizLogic.delete(""); fail("Negative test case: Should not delete the object."); } catch (BizLogicException exception) { assertTrue(true); logger....
void function() { try { MyDAOImpl.isTestForFail=true; DefaultBizLogic defaultBizLogic = new DefaultBizLogic(); defaultBizLogic.delete(STRNegative test case: Should not delete the object."); } catch (BizLogicException exception) { assertTrue(true); logger.fatal(exception.getMessage(),exception); } }
/** * Negative test case for delete. */
Negative test case for delete
testFailDelete
{ "repo_name": "NCIP/commons-module", "path": "software/washu-commons/src/test/java/edu/wustl/common/bizlogic/DefaultBizLogicTestCase.java", "license": "bsd-3-clause", "size": 31367 }
[ "edu.wustl.common.exception.BizLogicException", "edu.wustl.dao.MyDAOImpl" ]
import edu.wustl.common.exception.BizLogicException; import edu.wustl.dao.MyDAOImpl;
import edu.wustl.common.exception.*; import edu.wustl.dao.*;
[ "edu.wustl.common", "edu.wustl.dao" ]
edu.wustl.common; edu.wustl.dao;
792,504
public static void activateCommons( String strKey ) { IFreeMarkerTemplateService serviceFMT = FreeMarkerTemplateService.getInstance( ); CommonsInclude ciNew = getCommonsInclude( strKey ); if ( ciNew == null ) { return; } CommonsInclude ci...
static void function( String strKey ) { IFreeMarkerTemplateService serviceFMT = FreeMarkerTemplateService.getInstance( ); CommonsInclude ciNew = getCommonsInclude( strKey ); if ( ciNew == null ) { return; } CommonsInclude ciCurrent = getCurrentCommonsInclude( ); List<String> listAutoIncludes = serviceFMT.getAutoInclude...
/** * Activate a commons library * * @param strKey The commons key */
Activate a commons library
activateCommons
{ "repo_name": "rzara/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/template/CommonsService.java", "license": "bsd-3-clause", "size": 6915 }
[ "fr.paris.lutece.portal.business.template.CommonsInclude", "fr.paris.lutece.portal.service.util.AppLogService", "java.util.List" ]
import fr.paris.lutece.portal.business.template.CommonsInclude; import fr.paris.lutece.portal.service.util.AppLogService; import java.util.List;
import fr.paris.lutece.portal.business.template.*; import fr.paris.lutece.portal.service.util.*; import java.util.*;
[ "fr.paris.lutece", "java.util" ]
fr.paris.lutece; java.util;
481,391
// type parameter <S> lets us avoid the extra <String> in statements like: // Ordering<String> o = Ordering.<String>natural().reverse(); @GwtCompatible(serializable = true) public <S extends T> Ordering<S> reverse() { return new ReverseOrdering<S>(this); }
@GwtCompatible(serializable = true) <S extends T> Ordering<S> function() { return new ReverseOrdering<S>(this); }
/** * Returns the reverse of this ordering; the {@code Ordering} equivalent to {@link * Collections#reverseOrder(Comparator)}. * * <p><b>Java 8 users:</b> Use {@code thisComparator.reversed()} instead. */
Returns the reverse of this ordering; the Ordering equivalent to <code>Collections#reverseOrder(Comparator)</code>. Java 8 users: Use thisComparator.reversed() instead
reverse
{ "repo_name": "migue/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/collect/Ordering.java", "license": "agpl-3.0", "size": 40399 }
[ "com.google_voltpatches.common.annotations.GwtCompatible" ]
import com.google_voltpatches.common.annotations.GwtCompatible;
import com.google_voltpatches.common.annotations.*;
[ "com.google_voltpatches.common" ]
com.google_voltpatches.common;
2,126,613
public static void closeAndDispose() { for (JFrame vent : listaVentanas) { vent.dispose(); } listaVentanas.clear(); }
static void function() { for (JFrame vent : listaVentanas) { vent.dispose(); } listaVentanas.clear(); }
/** Libera y cierra todas las ventanas del gestor */
Libera y cierra todas las ventanas del gestor
closeAndDispose
{ "repo_name": "andoni-eguiluz/UD-Prog3-ant", "path": "src/tests/GestorVentanas.java", "license": "mit", "size": 5462 }
[ "javax.swing.JFrame" ]
import javax.swing.JFrame;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
448,719
private void formatFile(File file, int bytesCntToFormat) throws StorageException { if (log.isDebugEnabled()) log.debug("Formatting file [exists=" + file.exists() + ", file=" + file.getAbsolutePath() + ']'); try (FileIO fileIO = ioFactory.create(file, CREATE, READ, WRITE)) { ...
void function(File file, int bytesCntToFormat) throws StorageException { if (log.isDebugEnabled()) log.debug(STR + file.exists() + STR + file.getAbsolutePath() + ']'); try (FileIO fileIO = ioFactory.create(file, CREATE, READ, WRITE)) { int left = bytesCntToFormat; if (mode == WALMode.FSYNC mmap) { while ((left -= fileI...
/** * Clears the file, fills with zeros for Default mode. * * @param file File to format. * @param bytesCntToFormat Count of first bytes to format. * @throws StorageException if formatting failed */
Clears the file, fills with zeros for Default mode
formatFile
{ "repo_name": "daradurvs/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java", "license": "apache-2.0", "size": 115983 }
[ "java.io.File", "java.io.IOException", "org.apache.ignite.configuration.WALMode", "org.apache.ignite.failure.FailureContext", "org.apache.ignite.failure.FailureType", "org.apache.ignite.internal.processors.cache.persistence.StorageException", "org.apache.ignite.internal.processors.cache.persistence.file...
import java.io.File; import java.io.IOException; import org.apache.ignite.configuration.WALMode; import org.apache.ignite.failure.FailureContext; import org.apache.ignite.failure.FailureType; import org.apache.ignite.internal.processors.cache.persistence.StorageException; import org.apache.ignite.internal.processors.ca...
import java.io.*; import org.apache.ignite.configuration.*; import org.apache.ignite.failure.*; import org.apache.ignite.internal.processors.cache.persistence.*; import org.apache.ignite.internal.processors.cache.persistence.file.*;
[ "java.io", "org.apache.ignite" ]
java.io; org.apache.ignite;
647,451
@NonNull public Set<File> getPackagedJars() { Set<File> jars = Sets.newHashSetWithExpectedSize( mExternalJars.size() + mLocalJars.size() + mFlatLibraries.size()); for (JarDependency jar : mExternalJars) { File jarFile = jar.getJarFile(); if (jar.isPackage...
Set<File> function() { Set<File> jars = Sets.newHashSetWithExpectedSize( mExternalJars.size() + mLocalJars.size() + mFlatLibraries.size()); for (JarDependency jar : mExternalJars) { File jarFile = jar.getJarFile(); if (jar.isPackaged() && jarFile.exists()) { jars.add(jarFile); } } for (JarDependency jar : mLocalJars) {...
/** * Returns the list of packaged jars for this config. If the config tests a library, this * will include the jars of the tested config * * @return a non null, but possibly empty list. */
Returns the list of packaged jars for this config. If the config tests a library, this will include the jars of the tested config
getPackagedJars
{ "repo_name": "tranleduy2000/javaide", "path": "aosp/builder/src/main/java/com/android/builder/core/VariantConfiguration.java", "license": "gpl-3.0", "size": 54231 }
[ "com.android.builder.dependency.JarDependency", "com.android.builder.dependency.LibraryDependency", "com.google.common.collect.Sets", "java.io.File", "java.util.Set" ]
import com.android.builder.dependency.JarDependency; import com.android.builder.dependency.LibraryDependency; import com.google.common.collect.Sets; import java.io.File; import java.util.Set;
import com.android.builder.dependency.*; import com.google.common.collect.*; import java.io.*; import java.util.*;
[ "com.android.builder", "com.google.common", "java.io", "java.util" ]
com.android.builder; com.google.common; java.io; java.util;
383,938
public RemoteIterator<CachePoolEntry> listCachePools() throws IOException { return dfs.listCachePools(); } /** * {@inheritDoc}
RemoteIterator<CachePoolEntry> function() throws IOException { return dfs.listCachePools(); } /** * {@inheritDoc}
/** * List all cache pools. * * @return A remote iterator from which you can get CachePoolEntry objects. * Requests will be made as needed. * @throws IOException * If there was an error listing cache pools. */
List all cache pools
listCachePools
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java", "license": "apache-2.0", "size": 113565 }
[ "java.io.IOException", "org.apache.hadoop.fs.RemoteIterator", "org.apache.hadoop.hdfs.protocol.CachePoolEntry" ]
import java.io.IOException; import org.apache.hadoop.fs.RemoteIterator; import org.apache.hadoop.hdfs.protocol.CachePoolEntry;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
133,802
@Override public void exitAlphanumericnonus(@NotNull ECLParser.AlphanumericnonusContext ctx) { }
@Override public void exitAlphanumericnonus(@NotNull ECLParser.AlphanumericnonusContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterAlphanumericnonus
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-services/src/main/resources/ECLBaseListener.java", "license": "apache-2.0", "size": 18157 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,506,582
public static ClusterState stateWithAssignedPrimariesAndOneReplica(String index, int numberOfShards) { int numberOfNodes = 2; // we need a non-local master to test shard failures DiscoveryNodes.Builder discoBuilder = DiscoveryNodes.builder(); for (int i = 0; i < numberOfNodes + 1; i++) { ...
static ClusterState function(String index, int numberOfShards) { int numberOfNodes = 2; DiscoveryNodes.Builder discoBuilder = DiscoveryNodes.builder(); for (int i = 0; i < numberOfNodes + 1; i++) { final DiscoveryNode node = newNode(i); discoBuilder = discoBuilder.add(node); } discoBuilder.localNodeId(newNode(0).getId(...
/** * Creates cluster state with several shards and one replica and all shards STARTED. */
Creates cluster state with several shards and one replica and all shards STARTED
stateWithAssignedPrimariesAndOneReplica
{ "repo_name": "coding0011/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/action/support/replication/ClusterStateCreationUtils.java", "license": "apache-2.0", "size": 22171 }
[ "org.elasticsearch.Version", "org.elasticsearch.cluster.ClusterName", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.metadata.IndexMetaData", "org.elasticsearch.cluster.metadata.MetaData", "org.elasticsearch.cluster.node.DiscoveryNode", "org.elasticsearch.cluster.node.DiscoveryNode...
import org.elasticsearch.Version; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluste...
import org.elasticsearch.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.index.shard.*;
[ "org.elasticsearch", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.index" ]
org.elasticsearch; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index;
948,048
@Override public void cleanup() { try { if (reader != null) { reader.close(); reader = null; } } catch (IOException e) { logger.warn("Exception while closing stream.", e); } }
void function() { try { if (reader != null) { reader.close(); reader = null; } } catch (IOException e) { logger.warn(STR, e); } }
/** * Cleanup state once we are finished processing all the records. * This would internally close the input stream we are reading from. */
Cleanup state once we are finished processing all the records. This would internally close the input stream we are reading from
cleanup
{ "repo_name": "yssharma/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/CompliantTextRecordReader.java", "license": "apache-2.0", "size": 5545 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,371,052
public void testBudgetAdjustmentServiceSave() { List<BudgetAdjustmentParametersDTO> budgetAdjustmentParametersDTOs = getBudgetAdjustmentParameters(); // set the ACCOUNT_AUTO_CREATE_ROUTE as "save" TestUtils.setSystemParameter(BudgetAdjustmentDocument.class, KcConstants.BudgetAdjustmentServic...
void function() { List<BudgetAdjustmentParametersDTO> budgetAdjustmentParametersDTOs = getBudgetAdjustmentParameters(); TestUtils.setSystemParameter(BudgetAdjustmentDocument.class, KcConstants.BudgetAdjustmentService.PARAMETER_KC_ADMIN_AUTO_BA_DOCUMENT_WORKFLOW_ROUTE, KFSConstants.WORKFLOW_DOCUMENT_SAVE); BudgetAdjustm...
/** * This method tests the service locally */
This method tests the service locally
testBudgetAdjustmentServiceSave
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-kc/src/test/java/org/kuali/kfs/module/external/kc/service/impl/BudgetAdjustmentServiceImplTest.java", "license": "agpl-3.0", "size": 13476 }
[ "java.util.List", "org.kuali.kfs.fp.document.BudgetAdjustmentDocument", "org.kuali.kfs.integration.cg.dto.BudgetAdjustmentCreationStatusDTO", "org.kuali.kfs.integration.cg.dto.BudgetAdjustmentParametersDTO", "org.kuali.kfs.module.external.kc.KcConstants", "org.kuali.kfs.module.external.kc.service.BudgetAd...
import java.util.List; import org.kuali.kfs.fp.document.BudgetAdjustmentDocument; import org.kuali.kfs.integration.cg.dto.BudgetAdjustmentCreationStatusDTO; import org.kuali.kfs.integration.cg.dto.BudgetAdjustmentParametersDTO; import org.kuali.kfs.module.external.kc.KcConstants; import org.kuali.kfs.module.external.kc...
import java.util.*; import org.kuali.kfs.fp.document.*; import org.kuali.kfs.integration.cg.dto.*; import org.kuali.kfs.module.external.kc.*; import org.kuali.kfs.module.external.kc.service.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
914,535
private void readSAPProperties(final String path, final boolean readDefault) throws IOException { final String filePath = path + ConnectionPropertiesManager.SAP_PROPERTIES_FILENAME; final InputStream inputStream = readDefault ? getClass().getResourceAsStream(filePath) : new FileInputStream( filePath); ...
void function(final String path, final boolean readDefault) throws IOException { final String filePath = path + ConnectionPropertiesManager.SAP_PROPERTIES_FILENAME; final InputStream inputStream = readDefault ? getClass().getResourceAsStream(filePath) : new FileInputStream( filePath); this.sapConnection.clear(); this.s...
/** * Reads the SAP connection properties from the given path * * @param path - the path to the properties file without filename * @param readDefault - indicator whether to read default properties or not * @throws IOException */
Reads the SAP connection properties from the given path
readSAPProperties
{ "repo_name": "forge/plugin-hibersap", "path": "src/main/java/org/hibersap/forge/manager/ConnectionPropertiesManager.java", "license": "gpl-3.0", "size": 5528 }
[ "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
811,121
public void serializeTo128(IntBuffer buf) { assert (this.mag.getV3() >= 0); buf.put(this.mag.getV0()); buf.put(this.mag.getV1()); buf.put(this.mag.getV2()); buf.put(this.mag.getV3() | (this.negative ? SqlMathUtil.NEGATIVE_INT_MASK : 0)); }
void function(IntBuffer buf) { assert (this.mag.getV3() >= 0); buf.put(this.mag.getV0()); buf.put(this.mag.getV1()); buf.put(this.mag.getV2()); buf.put(this.mag.getV3() (this.negative ? SqlMathUtil.NEGATIVE_INT_MASK : 0)); }
/** * Serializes the value of this object to ByteBuffer, putting 128 bits data * (full ranges). * * @param buf * ByteBuffer to use */
Serializes the value of this object to ByteBuffer, putting 128 bits data (full ranges)
serializeTo128
{ "repo_name": "WANdisco/amplab-hive", "path": "common/src/java/org/apache/hadoop/hive/common/type/SignedInt128.java", "license": "apache-2.0", "size": 28932 }
[ "java.nio.IntBuffer" ]
import java.nio.IntBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,489,622
public String getPrintArea() { return prefs.getNameAsString( COSName.PRINT_AREA, BOUNDARY.CropBox.toString()); }
String function() { return prefs.getNameAsString( COSName.PRINT_AREA, BOUNDARY.CropBox.toString()); }
/** * Get the PrintArea preference. See BOUNDARY enumeration. * * @return the PrintArea preference. */
Get the PrintArea preference. See BOUNDARY enumeration
getPrintArea
{ "repo_name": "torakiki/sambox", "path": "src/main/java/org/sejda/sambox/pdmodel/interactive/viewerpreferences/PDViewerPreferences.java", "license": "apache-2.0", "size": 14358 }
[ "org.sejda.sambox.cos.COSName" ]
import org.sejda.sambox.cos.COSName;
import org.sejda.sambox.cos.*;
[ "org.sejda.sambox" ]
org.sejda.sambox;
1,063,827
public boolean shouldExecute() { if (!this.theEntity.isTamed()) { return false; } else if (this.theEntity.isInWater()) { return false; } else if (!this.theEntity.onGround) { return false; } else ...
boolean function() { if (!this.theEntity.isTamed()) { return false; } else if (this.theEntity.isInWater()) { return false; } else if (!this.theEntity.onGround) { return false; } else { EntityLivingBase entitylivingbase = this.theEntity.getOwnerEntity(); return entitylivingbase == null ? true : (this.theEntity.getDistan...
/** * Returns whether the EntityAIBase should begin execution. */
Returns whether the EntityAIBase should begin execution
shouldExecute
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/ai/EntityAISit.java", "license": "lgpl-2.1", "size": 1660 }
[ "net.minecraft.entity.EntityLivingBase" ]
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
853,440
public ImaServerSideAdInsertionUriBuilder setFormat(@ContentType int format) { checkArgument(format == C.TYPE_DASH || format == C.TYPE_HLS); this.format = format; return this; }
ImaServerSideAdInsertionUriBuilder function(@ContentType int format) { checkArgument(format == C.TYPE_DASH format == C.TYPE_HLS); this.format = format; return this; }
/** * Sets the format of the stream request. * * @param format VOD or live stream type. * @return This instance, for convenience. */
Sets the format of the stream request
setFormat
{ "repo_name": "androidx/media", "path": "libraries/exoplayer_ima/src/main/java/androidx/media3/exoplayer/ima/ImaServerSideAdInsertionUriBuilder.java", "license": "apache-2.0", "size": 14983 }
[ "androidx.media3.common.C", "androidx.media3.common.util.Assertions" ]
import androidx.media3.common.C; import androidx.media3.common.util.Assertions;
import androidx.media3.common.*; import androidx.media3.common.util.*;
[ "androidx.media3" ]
androidx.media3;
1,634,494
@Nullable public static DataReaderWriterProvider getProvider(@NotNull final String providerName) { ServiceLoader<DataReaderWriterProvider> serviceLoader = ServiceLoader.load(DataReaderWriterProvider.class); if (!serviceLoader.iterator().hasNext()) { serviceLoader = ServiceLoader.load...
static DataReaderWriterProvider function(@NotNull final String providerName) { ServiceLoader<DataReaderWriterProvider> serviceLoader = ServiceLoader.load(DataReaderWriterProvider.class); if (!serviceLoader.iterator().hasNext()) { serviceLoader = ServiceLoader.load(DataReaderWriterProvider.class, DataReaderWriterProvide...
/** * Gets a {@code DataReaderWriterProvider} implementation by specified provider name. * * @param providerName fully-qualified name of {@code DataReaderWriterProvider} implementation * @return {@code DataReaderWriterProvider} implementation or {@code null} if the service could not be loaded *...
Gets a DataReaderWriterProvider implementation by specified provider name
getProvider
{ "repo_name": "JetBrains/xodus", "path": "openAPI/src/main/java/jetbrains/exodus/io/DataReaderWriterProvider.java", "license": "apache-2.0", "size": 5499 }
[ "java.util.ServiceLoader", "org.jetbrains.annotations.NotNull" ]
import java.util.ServiceLoader; import org.jetbrains.annotations.NotNull;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
1,284,742
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.visualizer_menu, menu); return true; }
boolean function(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.visualizer_menu, menu); return true; }
/** * Methods for setting up the menu **/
Methods for setting up the menu
onCreateOptionsMenu
{ "repo_name": "cfung/Android_App_ud851-Exercises", "path": "Lesson06-Visualizer-Preferences/T06.09-Exercise-EditTextPreference/app/src/main/java/android/example/com/visualizerpreferences/VisualizerActivity.java", "license": "apache-2.0", "size": 8351 }
[ "android.view.Menu", "android.view.MenuInflater" ]
import android.view.Menu; import android.view.MenuInflater;
import android.view.*;
[ "android.view" ]
android.view;
1,988,609
public void beforeExchange(GridDhtPartitionsExchangeFuture fut) { Set<Integer> cacheIds = rebuildIndexCacheIds(fut); Set<Integer> rejected = idxRebuildFutStorage.prepareRebuildIndexes(cacheIds, fut.initialVersion()); if (log.isDebugEnabled()) { log.debug("Preparing features of ...
void function(GridDhtPartitionsExchangeFuture fut) { Set<Integer> cacheIds = rebuildIndexCacheIds(fut); Set<Integer> rejected = idxRebuildFutStorage.prepareRebuildIndexes(cacheIds, fut.initialVersion()); if (log.isDebugEnabled()) { log.debug(STR + cacheIds + STR + rejected + ']'); } }
/** * Prepare index rebuild futures if needed before exchange. * * @param fut Exchange future. */
Prepare index rebuild futures if needed before exchange
beforeExchange
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java", "license": "apache-2.0", "size": 147807 }
[ "java.util.Set", "org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture" ]
import java.util.Set; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
import java.util.*; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
831,810
public static Graph<Integer> graphFromStdin() throws IOException { // read the graph BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); Graph<Integer> G = graphFromBufferedReaderGR(in); in.close(); // done return G; }
static Graph<Integer> function() throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); Graph<Integer> G = graphFromBufferedReaderGR(in); in.close(); return G; }
/** * Construct a graph from the content of a .gr file read from stdin * * This method can also be used to parse .dgf files. * * @return A graph object with the graph (vertices are integer) * @throws IOException if the file was not found or is not correct encoded */
Construct a graph from the content of a .gr file read from stdin This method can also be used to parse .dgf files
graphFromStdin
{ "repo_name": "yannponty/RNARedPrint", "path": "lib/Jdrasil-master/subprojects/core/src/main/java/jdrasil/graph/GraphFactory.java", "license": "gpl-3.0", "size": 6096 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;
import java.io.*;
[ "java.io" ]
java.io;
51,181
public void drawDashedLine(int x, int y1, int y2, Graphics2D g) { Stroke oldStroke = g.getStroke(); g.setStroke(DASHEDSTROKE); g.drawLine(x, y1, x, y2); g.setStroke(oldStroke); }
void function(int x, int y1, int y2, Graphics2D g) { Stroke oldStroke = g.getStroke(); g.setStroke(DASHEDSTROKE); g.drawLine(x, y1, x, y2); g.setStroke(oldStroke); }
/** * Draws the lifeline as a dashed line. * * @param x * the x-value of the line * @param y1 * the start-y-value of the line * @param y2 * the end-y-value of the line * @param g * the ...
Draws the lifeline as a dashed line
drawDashedLine
{ "repo_name": "vnu-dse/rtl", "path": "src/gui/org/tzi/use/gui/views/seqDiag/SequenceDiagram.java", "license": "gpl-2.0", "size": 156112 }
[ "java.awt.Graphics2D", "java.awt.Stroke" ]
import java.awt.Graphics2D; import java.awt.Stroke;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,672,476
public void channelGroupListChannels(String group, Callback callback) { final Callback cb = getWrappedCallback(callback); ChannelGroup channelGroup; String[] url; try { channelGroup = new ChannelGroup(group); } catch (PubnubException e) { cb.errorCal...
void function(String group, Callback callback) { final Callback cb = getWrappedCallback(callback); ChannelGroup channelGroup; String[] url; try { channelGroup = new ChannelGroup(group); } catch (PubnubException e) { cb.errorCallback(null, PubnubError.PNERROBJ_CHANNEL_GROUP_PARSING_ERROR); return; } if (channelGroup.nam...
/** * Get the list of channels in the namespaced group * * @param group name * @param callback to invoke */
Get the list of channels in the namespaced group
channelGroupListChannels
{ "repo_name": "NizarBoussarsar/java", "path": "java/srcPubnubApi/com/pubnub/api/PubnubCore.java", "license": "mit", "size": 93411 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,652,449
@Deprecated public void setInstanceEnabledForPartition(String partitionName, boolean enabled) { List<String> list = _record.getListField(InstanceConfigProperty.HELIX_DISABLED_PARTITION.toString()); Set<String> disabledPartitions = new HashSet<String>(); if (list != null) { disabledPartitio...
void function(String partitionName, boolean enabled) { List<String> list = _record.getListField(InstanceConfigProperty.HELIX_DISABLED_PARTITION.toString()); Set<String> disabledPartitions = new HashSet<String>(); if (list != null) { disabledPartitions.addAll(list); } if (enabled) { disabledPartitions.remove(partitionNa...
/** * Set the enabled state for a partition on this instance across all the resources * * @param partitionName the partition to set * @param enabled true to enable, false to disable */
Set the enabled state for a partition on this instance across all the resources
setInstanceEnabledForPartition
{ "repo_name": "apache/helix", "path": "helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java", "license": "apache-2.0", "size": 23389 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
106,238
@Override public Point2D getCentroid() { return centroid; }
Point2D function() { return centroid; }
/** * Get the centroid of the intersection manager. * * @return the centroid of the intersection manager */
Get the centroid of the intersection manager
getCentroid
{ "repo_name": "bowzheng/AIM4_delay", "path": "src/main/java/aim4/im/RoadBasedIntersection.java", "license": "gpl-3.0", "size": 21165 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
808,954
public String getText() { if (type != GridStaticCellType.TEXT) { throw new IllegalStateException( "Cannot fetch Text from a cell with type " + type); } return (String) content; }
String function() { if (type != GridStaticCellType.TEXT) { throw new IllegalStateException( STR + type); } return (String) content; }
/** * Returns the text displayed in this cell. * * @return the plain text caption */
Returns the text displayed in this cell
getText
{ "repo_name": "Peppe/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 306271 }
[ "com.vaadin.shared.ui.grid.GridStaticCellType" ]
import com.vaadin.shared.ui.grid.GridStaticCellType;
import com.vaadin.shared.ui.grid.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
1,832,242
public Object[] hydrate( final Map<String,Object> resultset, final Serializable id, final Object object, final Loadable rootLoadable, //We probably don't need suffixedColumns, use column names instead //final String[][] suffixedPropertyColumns, final boolean allProp...
Object[] function( final Map<String,Object> resultset, final Serializable id, final Object object, final Loadable rootLoadable, final boolean allProperties, final SessionImplementor session) throws HibernateException { if ( log.isTraceEnabled() ) { log.trace( STR + MessageHelper.infoString( this, id, getFactory() ) ); ...
/** * Unmarshall the fields of a persistent instance from a result set, * without resolving associations or collections. Question: should * this really be here, or should it be sent back to Loader? */
Unmarshall the fields of a persistent instance from a result set, without resolving associations or collections. Question: should this really be here, or should it be sent back to Loader
hydrate
{ "repo_name": "emmanuelbernard/hibernate-ogm-old", "path": "hibernate-ogm-core/src/main/java/org/hibernate/ogm/persister/OgmEntityPersister.java", "license": "lgpl-2.1", "size": 38805 }
[ "java.io.Serializable", "java.util.Map", "org.hibernate.HibernateException", "org.hibernate.engine.SessionImplementor", "org.hibernate.persister.entity.Loadable", "org.hibernate.pretty.MessageHelper", "org.hibernate.type.Type" ]
import java.io.Serializable; import java.util.Map; import org.hibernate.HibernateException; import org.hibernate.engine.SessionImplementor; import org.hibernate.persister.entity.Loadable; import org.hibernate.pretty.MessageHelper; import org.hibernate.type.Type;
import java.io.*; import java.util.*; import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.persister.entity.*; import org.hibernate.pretty.*; import org.hibernate.type.*;
[ "java.io", "java.util", "org.hibernate", "org.hibernate.engine", "org.hibernate.persister", "org.hibernate.pretty", "org.hibernate.type" ]
java.io; java.util; org.hibernate; org.hibernate.engine; org.hibernate.persister; org.hibernate.pretty; org.hibernate.type;
2,388,552
public void close() throws IOException { Closeables.close(autoscaleApi, true); }
void function() throws IOException { Closeables.close(autoscaleApi, true); }
/** * Always close your service when you're done with it. * * Note that closing quietly like this is not necessary in Java 7. * You would use try-with-resources in the main method instead. */
Always close your service when you're done with it. Note that closing quietly like this is not necessary in Java 7. You would use try-with-resources in the main method instead
close
{ "repo_name": "rackerlabs/jclouds-examples", "path": "rackspace/src/main/java/org/jclouds/examples/rackspace/autoscale/UpdatePolicy.java", "license": "apache-2.0", "size": 3620 }
[ "com.google.common.io.Closeables", "java.io.IOException" ]
import com.google.common.io.Closeables; import java.io.IOException;
import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
971,320
private static int grayScaleToARGB(float grayScale, Color maskColor) { if (maskColor != null) { float r = col(maskColor.getRed(), grayScale); float g = col(maskColor.getGreen(), grayScale); float b = col(maskColor.getBlue(), grayScale); float t = grayScale * 0.7f; return new Color(r, g, b, t).getRGB...
static int function(float grayScale, Color maskColor) { if (maskColor != null) { float r = col(maskColor.getRed(), grayScale); float g = col(maskColor.getGreen(), grayScale); float b = col(maskColor.getBlue(), grayScale); float t = grayScale * 0.7f; return new Color(r, g, b, t).getRGB(); } return new Color(grayScale, g...
/** * Converts an gray scale (e.g. value between 0 to 1) into ARGB. * * @param grayScale - value between 0 and 1 * @param maskColor - desired mask color * @return Returns a ARGB color based on the grayscale and the mask colors */
Converts an gray scale (e.g. value between 0 to 1) into ARGB
grayScaleToARGB
{ "repo_name": "spring-cloud-stream-app-starters/tensorflow", "path": "spring-cloud-starter-stream-processor-object-detection/src/main/java/org/springframework/cloud/stream/app/object/detection/processor/GraphicsUtils.java", "license": "apache-2.0", "size": 17719 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
803,677
@ApiModelProperty(value = "") public List<AggregateCountResource> getContent() { return content; }
@ApiModelProperty(value = "") List<AggregateCountResource> function() { return content; }
/** * Get content * @return content **/
Get content
getContent
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/PageResourceAggregateCountResource.java", "license": "apache-2.0", "size": 7743 }
[ "com.knetikcloud.model.AggregateCountResource", "io.swagger.annotations.ApiModelProperty", "java.util.List" ]
import com.knetikcloud.model.AggregateCountResource; import io.swagger.annotations.ApiModelProperty; import java.util.List;
import com.knetikcloud.model.*; import io.swagger.annotations.*; import java.util.*;
[ "com.knetikcloud.model", "io.swagger.annotations", "java.util" ]
com.knetikcloud.model; io.swagger.annotations; java.util;
738,619
public Connection getConnection(String user, String password) throws SQLException { String managedPassword = getPassword(); String managedUser = getUsername(); if (((user == null && managedUser != null) || (user != null && managedUser...
Connection function(String user, String password) throws SQLException { String managedPassword = getPassword(); String managedUser = getUsername(); if (((user == null && managedUser != null) (user != null && managedUser == null)) (user != null && !user.equals(managedUser)) ((password == null && managedPassword != null)...
/** * Performs a getConnection() after validating the given username * and password. * * @param user String which must match the 'user' configured for this * ManagedPoolDataSource. * @param password String which must match the 'password' configured * for ...
Performs a getConnection() after validating the given username and password
getConnection
{ "repo_name": "simonzhangsm/voltdb", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/ManagedPoolDataSource.java", "license": "agpl-3.0", "size": 43927 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,594,412
public void write(final String content, final String encoding) throws IOException, InterruptedException { act(new Write(encoding, content)); } private class Write extends SecureFileCallable<Void> { private static final long serialVersionUID = 1L; private final String encoding; ...
void function(final String content, final String encoding) throws IOException, InterruptedException { act(new Write(encoding, content)); } private class Write extends SecureFileCallable<Void> { private static final long serialVersionUID = 1L; private final String encoding; private final String content; Write(String enc...
/** * Overwrites this file by placing the given String as the content. * * @param encoding * Null to use the platform default encoding on the remote machine. * @since 1.105 */
Overwrites this file by placing the given String as the content
write
{ "repo_name": "pjanouse/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 148331 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,868,111
public ReceiveCommand.Type getChangeType(String ref) { ReceiveCommand.Type type = refUpdates.get(ref); return type; }
ReceiveCommand.Type function(String ref) { ReceiveCommand.Type type = refUpdates.get(ref); return type; }
/** * Returns the change type of the ref change. * * @param ref * @return the change type for the ref */
Returns the change type of the ref change
getChangeType
{ "repo_name": "gitblit/gitblit", "path": "src/main/java/com/gitblit/models/RefLogEntry.java", "license": "apache-2.0", "size": 9236 }
[ "org.eclipse.jgit.transport.ReceiveCommand" ]
import org.eclipse.jgit.transport.ReceiveCommand;
import org.eclipse.jgit.transport.*;
[ "org.eclipse.jgit" ]
org.eclipse.jgit;
453,646
public List<ColumnValueCount> getTopNValueAt(int rowIndex) { return resultList.get(rowIndex).getValueCount(); }
List<ColumnValueCount> function(int rowIndex) { return resultList.get(rowIndex).getValueCount(); }
/** * Get top N value at table cell(row), on column "TOP_VALUE" * @param rowIndex * @return List of top N Value */
Get top N value at table cell(row), on column "TOP_VALUE"
getTopNValueAt
{ "repo_name": "amitkr/power-architect", "path": "src/main/java/ca/sqlpower/architect/swingui/table/ProfileTableModel.java", "license": "gpl-3.0", "size": 10499 }
[ "ca.sqlpower.architect.profile.ColumnValueCount", "java.util.List" ]
import ca.sqlpower.architect.profile.ColumnValueCount; import java.util.List;
import ca.sqlpower.architect.profile.*; import java.util.*;
[ "ca.sqlpower.architect", "java.util" ]
ca.sqlpower.architect; java.util;
925,180
public PortletInfoType<T> keywords(String keywords) { childNode.getOrCreate("keywords").text(keywords); return this; }
PortletInfoType<T> function(String keywords) { childNode.getOrCreate(STR).text(keywords); return this; }
/** * Sets the <code>keywords</code> element * @param keywords the value for the element <code>keywords</code> * @return the current instance of <code>PortletInfoType<T></code> */
Sets the <code>keywords</code> element
keywords
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/portletapp20/PortletInfoTypeImpl.java", "license": "epl-1.0", "size": 6132 }
[ "org.jboss.shrinkwrap.descriptor.api.portletapp20.PortletInfoType" ]
import org.jboss.shrinkwrap.descriptor.api.portletapp20.PortletInfoType;
import org.jboss.shrinkwrap.descriptor.api.portletapp20.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,603,857
public static RelRoot adjustInvalidRowType(RelRoot expandedRoot, ViewTable viewTable) { InvalidViewRel invalid = new InvalidViewRel(viewTable, expandedRoot.rel); return RelRoot.of(invalid, invalid.getRowType(), expandedRoot.kind); }
static RelRoot function(RelRoot expandedRoot, ViewTable viewTable) { InvalidViewRel invalid = new InvalidViewRel(viewTable, expandedRoot.rel); return RelRoot.of(invalid, invalid.getRowType(), expandedRoot.kind); }
/** * Adjust the original RelRoot to have a new row type matching what the ViewTable expected so we can complete expansion. * @param expandedRoot The original expanded root. * @param viewTable The inconsistent view table. * @return A new RelRoot that has a InvalidVDSRel node that contains the expanded tree....
Adjust the original RelRoot to have a new row type matching what the ViewTable expected so we can complete expansion
adjustInvalidRowType
{ "repo_name": "dremio/dremio-oss", "path": "sabot/kernel/src/main/java/com/dremio/exec/planner/logical/InvalidViewRel.java", "license": "apache-2.0", "size": 8337 }
[ "org.apache.calcite.rel.RelRoot" ]
import org.apache.calcite.rel.RelRoot;
import org.apache.calcite.rel.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,855,957
public InitialContextFactory createInitialContextFactory(Hashtable environment) { if (activated == null && environment != null) { Object icf = environment.get(Context.INITIAL_CONTEXT_FACTORY); if (icf != null) { Class icfClass = null; if (icf instanceof Class) { icfClass = (Class) icf; } ...
InitialContextFactory function(Hashtable environment) { if (activated == null && environment != null) { Object icf = environment.get(Context.INITIAL_CONTEXT_FACTORY); if (icf != null) { Class icfClass = null; if (icf instanceof Class) { icfClass = (Class) icf; } else if (icf instanceof String) { icfClass = ClassUtils.r...
/** * Simple InitialContextFactoryBuilder implementation, * creating a new SimpleNamingContext instance. * @see SimpleNamingContext */
Simple InitialContextFactoryBuilder implementation, creating a new SimpleNamingContext instance
createInitialContextFactory
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "mock/org/springframework/mock/jndi/SimpleNamingContextBuilder.java", "license": "apache-2.0", "size": 8699 }
[ "java.util.Hashtable", "javax.naming.Context", "javax.naming.spi.InitialContextFactory", "org.springframework.util.ClassUtils" ]
import java.util.Hashtable; import javax.naming.Context; import javax.naming.spi.InitialContextFactory; import org.springframework.util.ClassUtils;
import java.util.*; import javax.naming.*; import javax.naming.spi.*; import org.springframework.util.*;
[ "java.util", "javax.naming", "org.springframework.util" ]
java.util; javax.naming; org.springframework.util;
223,427
@Override public void stop(BundleContext bc) throws Exception { context = null; logger.debug("Voice I/O bundle has been stopped."); }
void function(BundleContext bc) throws Exception { context = null; logger.debug(STR); }
/** * Called whenever the OSGi framework stops our bundle */
Called whenever the OSGi framework stops our bundle
stop
{ "repo_name": "fatihboy/smarthome", "path": "bundles/io/org.eclipse.smarthome.io.voice/src/main/java/org/eclipse/smarthome/io/voice/internal/VoiceActivator.java", "license": "epl-1.0", "size": 1529 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
117,950
Stream<Icd9Procedure> getIcd9Procedures();
Stream<Icd9Procedure> getIcd9Procedures();
/** * Get a stream of ICD9 Procedure codes from the data. * * @return A stream of {@link Icd9Procedure} objects. */
Get a stream of ICD9 Procedure codes from the data
getIcd9Procedures
{ "repo_name": "eurekaclinical/protempa", "path": "protempa-test-suite/src/test/java/org/protempa/test/DataProvider.java", "license": "apache-2.0", "size": 2218 }
[ "java.util.stream.Stream" ]
import java.util.stream.Stream;
import java.util.stream.*;
[ "java.util" ]
java.util;
841,933
private Map<Metrics, List<ManagedLedgerImpl>> groupLedgersByDimension() { ledgersByDimensionMap.clear(); // get the current topics statistics from StatsBrokerFilter // Map : topic-name->dest-stat for (Entry<String, ManagedLedgerImpl> e : getManagedLedgers().entrySet()) { ...
Map<Metrics, List<ManagedLedgerImpl>> function() { ledgersByDimensionMap.clear(); for (Entry<String, ManagedLedgerImpl> e : getManagedLedgers().entrySet()) { String ledgerName = e.getKey(); ManagedLedgerImpl ledger = e.getValue(); String namespace = parseNamespaceFromLedgerName(ledgerName); Metrics metrics = createMetr...
/** * Build a map of dimensions key to list of topic stats (not thread-safe). * <p> * * @return */
Build a map of dimensions key to list of topic stats (not thread-safe).
groupLedgersByDimension
{ "repo_name": "massakam/pulsar", "path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/metrics/ManagedLedgerMetrics.java", "license": "apache-2.0", "size": 7588 }
[ "java.util.List", "java.util.Map", "org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl", "org.apache.pulsar.common.stats.Metrics" ]
import java.util.List; import java.util.Map; import org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl; import org.apache.pulsar.common.stats.Metrics;
import java.util.*; import org.apache.bookkeeper.mledger.impl.*; import org.apache.pulsar.common.stats.*;
[ "java.util", "org.apache.bookkeeper", "org.apache.pulsar" ]
java.util; org.apache.bookkeeper; org.apache.pulsar;
2,208,833
public float mapProgress() throws IOException { ensureState(JobState.RUNNING); ensureFreshStatus(); return status.getMapProgress(); }
float function() throws IOException { ensureState(JobState.RUNNING); ensureFreshStatus(); return status.getMapProgress(); }
/** * Get the <i>progress</i> of the job's map-tasks, as a float between 0.0 * and 1.0. When all map tasks have completed, the function returns 1.0. * * @return the progress of the job's map-tasks. * @throws IOException */
Get the progress of the job's map-tasks, as a float between 0.0 and 1.0. When all map tasks have completed, the function returns 1.0
mapProgress
{ "repo_name": "tecknowledgeable/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java", "license": "apache-2.0", "size": 50272 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,543,722
public Optional<ClassLoader> getClassloaderFromAllDependencies(String prjPath, String localRepo) { AFCompiler compiler = MavenCompilerFactory.getCompiler(Decorator.NONE); WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(P...
Optional<ClassLoader> function(String prjPath, String localRepo) { AFCompiler compiler = MavenCompilerFactory.getCompiler(Decorator.NONE); WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(Paths.get(prjPath)); StringBuilder sb = new StringBuilder(MavenConfig.MAVEN_DEP_PLUGING_OUTPUT_FILE).append(MavenConfig....
/** * Execute a maven run to create the classloaders with the dependencies in the Poms, transitive inclueded */
Execute a maven run to create the classloaders with the dependencies in the Poms, transitive inclueded
getClassloaderFromAllDependencies
{ "repo_name": "etirelli/kie-wb-common", "path": "kie-wb-common-services/kie-wb-common-services-backend/src/main/java/org/kie/workbench/common/services/backend/compiler/nio/impl/ClassLoaderProviderImpl.java", "license": "apache-2.0", "size": 15163 }
[ "java.util.HashMap", "java.util.Optional", "org.kie.workbench.common.services.backend.compiler.CompilationResponse", "org.kie.workbench.common.services.backend.compiler.configuration.Decorator", "org.kie.workbench.common.services.backend.compiler.configuration.MavenConfig", "org.kie.workbench.common.servi...
import java.util.HashMap; import java.util.Optional; import org.kie.workbench.common.services.backend.compiler.CompilationResponse; import org.kie.workbench.common.services.backend.compiler.configuration.Decorator; import org.kie.workbench.common.services.backend.compiler.configuration.MavenConfig; import org.kie.workb...
import java.util.*; import org.kie.workbench.common.services.backend.compiler.*; import org.kie.workbench.common.services.backend.compiler.configuration.*; import org.kie.workbench.common.services.backend.compiler.nio.*; import org.uberfire.java.nio.file.*;
[ "java.util", "org.kie.workbench", "org.uberfire.java" ]
java.util; org.kie.workbench; org.uberfire.java;
2,075,105
Single<Boolean> compareAndSet(V expect, V update);
Single<Boolean> compareAndSet(V expect, V update);
/** * Atomically sets the value to the given updated value * only if serialized state of the current value equals * to serialized state of the expected value. * * @param expect the expected value * @param update the new value * @return {@code true} if successful; or {@code false} if ...
Atomically sets the value to the given updated value only if serialized state of the current value equals to serialized state of the expected value
compareAndSet
{ "repo_name": "mrniko/redisson", "path": "redisson/src/main/java/org/redisson/api/RBucketRx.java", "license": "apache-2.0", "size": 4279 }
[ "io.reactivex.rxjava3.core.Single" ]
import io.reactivex.rxjava3.core.Single;
import io.reactivex.rxjava3.core.*;
[ "io.reactivex.rxjava3" ]
io.reactivex.rxjava3;
766,576
public TableMode getTableMode() { return tableMode; }
TableMode function() { return tableMode; }
/** * Return the table style. The default style is {@link com.smartgwt.mobile.client.types.TableMode#PLAIN}. * * @return the table style */
Return the table style. The default style is <code>com.smartgwt.mobile.client.types.TableMode#PLAIN</code>
getTableMode
{ "repo_name": "will-gilbert/SmartGWT-Mobile", "path": "mobile/src/main/java/com/smartgwt/mobile/client/widgets/tableview/TableView.java", "license": "unlicense", "size": 110536 }
[ "com.smartgwt.mobile.client.types.TableMode" ]
import com.smartgwt.mobile.client.types.TableMode;
import com.smartgwt.mobile.client.types.*;
[ "com.smartgwt.mobile" ]
com.smartgwt.mobile;
2,722,376
NodeAddress getLocalAddress();
NodeAddress getLocalAddress();
/** * Gets the current node address in the cluster. * * @return the current node address */
Gets the current node address in the cluster
getLocalAddress
{ "repo_name": "DanielSperry/orbit", "path": "actors/core/src/main/java/com/ea/orbit/actors/runtime/ActorRuntime.java", "license": "bsd-3-clause", "size": 5716 }
[ "com.ea.orbit.actors.cluster.NodeAddress" ]
import com.ea.orbit.actors.cluster.NodeAddress;
import com.ea.orbit.actors.cluster.*;
[ "com.ea.orbit" ]
com.ea.orbit;
2,143,942
boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, PartitionDropOptions options) throws TException;
boolean dropPartition(String db_name, String tbl_name, List<String> part_vals, PartitionDropOptions options) throws TException;
/** * Method to dropPartitions() with the option to purge the partition data directly, * rather than to move data to trash. * @param db_name Name of the database. * @param tbl_name Name of the table. * @param part_vals Specification of the partitions being dropped. * @param options PartitionDropOption...
Method to dropPartitions() with the option to purge the partition data directly, rather than to move data to trash
dropPartition
{ "repo_name": "scalingdata/Impala", "path": "thirdparty/hive-1.2.1.2.3.0.0-2557/src/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java", "license": "apache-2.0", "size": 55997 }
[ "java.util.List", "org.apache.thrift.TException" ]
import java.util.List; import org.apache.thrift.TException;
import java.util.*; import org.apache.thrift.*;
[ "java.util", "org.apache.thrift" ]
java.util; org.apache.thrift;
530,906
private void expandTree(JTree currentTree, TreePath parent, boolean expand) { TreeNode node = (TreeNode) parent.getLastPathComponent(); if (node.getChildCount() >= 0) { for (Enumeration<TreeNode> e = node.children(); e.hasMoreElements();) { TreePath path = parent.pathByAd...
void function(JTree currentTree, TreePath parent, boolean expand) { TreeNode node = (TreeNode) parent.getLastPathComponent(); if (node.getChildCount() >= 0) { for (Enumeration<TreeNode> e = node.children(); e.hasMoreElements();) { TreePath path = parent.pathByAddingChild(e.nextElement()); expandTree(currentTree, path, ...
/** * Expands or collapses the specified tree according to the * <code>expand</code>-parameter. */
Expands or collapses the specified tree according to the <code>expand</code>-parameter
expandTree
{ "repo_name": "grimes2/jabref", "path": "src/main/java/net/sf/jabref/gui/FindUnlinkedFilesDialog.java", "license": "mit", "size": 46078 }
[ "java.util.Enumeration", "javax.swing.JTree", "javax.swing.tree.TreeNode", "javax.swing.tree.TreePath" ]
import java.util.Enumeration; import javax.swing.JTree; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath;
import java.util.*; import javax.swing.*; import javax.swing.tree.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
2,129,018
private String doParse(String input, Set<String> replacedPropertyKeys) { if (input == null) { return null; } String answer = input; Property property; while ((property = readProperty(answer)) != null) { // Check for circ...
String function(String input, Set<String> replacedPropertyKeys) { if (input == null) { return null; } String answer = input; Property property; while ((property = readProperty(answer)) != null) { if (replacedPropertyKeys.contains(property.getKey())) { throw new IllegalArgumentException(STR + property.getKey() + STR + i...
/** * Recursively parses the given input string and replaces all properties * * @param input Input string * @param replacedPropertyKeys Already replaced property keys used for tracking circular references * @return Evaluated string */
Recursively parses the given input string and replaces all properties
doParse
{ "repo_name": "oscerd/camel", "path": "camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java", "license": "apache-2.0", "size": 14460 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,873,520
protected void newArray(Object o, String name, Class type, int[] dimensions) { Field f; try { f = o.getClass().getField(name); f.set(o, Array.newInstance(type, dimensions)); } catch (Exception e) { e.printStackTrace(); } }
void function(Object o, String name, Class type, int[] dimensions) { Field f; try { f = o.getClass().getField(name); f.set(o, Array.newInstance(type, dimensions)); } catch (Exception e) { e.printStackTrace(); } }
/** * sets a new array for the field. * * @param o the object to set the array for * @param name the name of the field * @param type the type of the array * @param dimensions the dimensions of the array */
sets a new array for the field
newArray
{ "repo_name": "triplekill/SADL", "path": "PDTTA-core/src/weka/classifiers/functions/LibSVM.java", "license": "gpl-2.0", "size": 50738 }
[ "java.lang.reflect.Array", "java.lang.reflect.Field" ]
import java.lang.reflect.Array; import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,168,522
private void doRequest(final WPartialDateField dateField, final String dateStr) { MockRequest request = new MockRequest(); request.setParameter(dateField.getId(), dateStr); // don't really care about the user text request.setParameter(dateField.getId() + "-date", dateStr); dateField.serviceRequest(request); ...
void function(final WPartialDateField dateField, final String dateStr) { MockRequest request = new MockRequest(); request.setParameter(dateField.getId(), dateStr); request.setParameter(dateField.getId() + "-date", dateStr); dateField.serviceRequest(request); }
/** * Emulates user interaction with the date field. * * @param dateField the date field to modify. * @param dateStr the parsed date string. */
Emulates user interaction with the date field
doRequest
{ "repo_name": "marksreeves/wcomponents", "path": "wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WPartialDateField_Test.java", "license": "gpl-3.0", "size": 40537 }
[ "com.github.bordertech.wcomponents.util.mock.MockRequest" ]
import com.github.bordertech.wcomponents.util.mock.MockRequest;
import com.github.bordertech.wcomponents.util.mock.*;
[ "com.github.bordertech" ]
com.github.bordertech;
1,400,986
@Override public void enterClassBody(@NotNull Java7Parser.ClassBodyContext ctx) { }
@Override public void enterClassBody(@NotNull Java7Parser.ClassBodyContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitIdentifierSuffix
{ "repo_name": "jsteenbeeke/antlr-java-parser", "path": "src/main/java/com/github/antlrjavaparser/Java7ParserBaseListener.java", "license": "lgpl-3.0", "size": 53492 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,899,379
@CheckResult public Limit<T, S, N> limit(int nrOfRows) { return new Limit<>(this, Integer.toString(nrOfRows)); } } public static final class Limit<T, S, N> extends SelectNode<T, S, N> { private final String limitClause; Limit(@NonNull SelectNode<T, S, N> parent, @NonNull String limitC...
Limit<T, S, N> function(int nrOfRows) { return new Limit<>(this, Integer.toString(nrOfRows)); } } static final class Limit<T, S, N> extends SelectNode<T, S, N> { private final String functionClause; Limit(@NonNull SelectNode<T, S, N> parent, @NonNull String limitClause) { super(parent); this.limitClause = limitClause; ...
/** * Add a LIMIT clause to the query. * * @param nrOfRows Upper bound on the number of rows returned by the * entire SELECT statement * @return SQL SELECT statement builder */
Add a LIMIT clause to the query
limit
{ "repo_name": "SiimKinks/sqlitemagic", "path": "runtime/src/main/java/com/siimkinks/sqlitemagic/Select.java", "license": "apache-2.0", "size": 61233 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
756,121
public AllEnumSet getFinal() { return m_final; }
AllEnumSet function() { return m_final; }
/** * Get 'final' attribute. * * @return final */
Get 'final' attribute
getFinal
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/src/org/jibx/schema/elements/ElementElement.java", "license": "bsd-3-clause", "size": 19573 }
[ "org.jibx.schema.types.AllEnumSet" ]
import org.jibx.schema.types.AllEnumSet;
import org.jibx.schema.types.*;
[ "org.jibx.schema" ]
org.jibx.schema;
2,082,611
public void buildSuppliedTimeSeries() { MarketDataFactory factory = MarketDataFactory.of( ObservableDataProvider.none(), new TestTimeSeriesProvider(ImmutableMap.of())); TestObservableId id1 = TestObservableId.of(StandardId.of("reqs", "a")); TestObservableId id2 = TestObservableId.of(Stand...
void function() { MarketDataFactory factory = MarketDataFactory.of( ObservableDataProvider.none(), new TestTimeSeriesProvider(ImmutableMap.of())); TestObservableId id1 = TestObservableId.of(StandardId.of("reqs", "a")); TestObservableId id2 = TestObservableId.of(StandardId.of("reqs", "b")); LocalDateDoubleTimeSeries tim...
/** * Test that time series from the supplied data are copied to the scenario data. */
Test that time series from the supplied data are copied to the scenario data
buildSuppliedTimeSeries
{ "repo_name": "jmptrader/Strata", "path": "modules/calc/src/test/java/com/opengamma/strata/calc/marketdata/DefaultMarketDataFactoryTest.java", "license": "apache-2.0", "size": 50250 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableMap", "com.opengamma.strata.basics.StandardId", "com.opengamma.strata.collect.timeseries.LocalDateDoubleTimeSeries", "org.assertj.core.api.Assertions" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.opengamma.strata.basics.StandardId; import com.opengamma.strata.collect.timeseries.LocalDateDoubleTimeSeries; import org.assertj.core.api.Assertions;
import com.google.common.collect.*; import com.opengamma.strata.basics.*; import com.opengamma.strata.collect.timeseries.*; import org.assertj.core.api.*;
[ "com.google.common", "com.opengamma.strata", "org.assertj.core" ]
com.google.common; com.opengamma.strata; org.assertj.core;
1,819,013
public ServiceCall<Void> beginDelete204SucceededAsync(final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(beginDelete204SucceededWithServiceResponseAsync(), serviceCallback); }
ServiceCall<Void> function(final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(beginDelete204SucceededWithServiceResponseAsync(), serviceCallback); }
/** * Long running delete request, service returns a 204 to the initial request, indicating success. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Long running delete request, service returns a 204 to the initial request, indicating success
beginDelete204SucceededAsync
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROSADsInner.java", "license": "mit", "size": 277083 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,217,977
public void setLabelFont(Font font) { ParamChecks.nullNotPermitted(font, "font"); this.labelFont = font; fireChangeEvent(); }
void function(Font font) { ParamChecks.nullNotPermitted(font, "font"); this.labelFont = font; fireChangeEvent(); }
/** * Sets the section label font and sends a {@link PlotChangeEvent} to all * registered listeners. * * @param font the font (<code>null</code> not permitted). * * @see #getLabelFont() */
Sets the section label font and sends a <code>PlotChangeEvent</code> to all registered listeners
setLabelFont
{ "repo_name": "ceabie/jfreechart", "path": "source/org/jfree/chart/plot/PiePlot.java", "license": "lgpl-2.1", "size": 130851 }
[ "java.awt.Font", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Font; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,667,732
@Test public void testCheckFileFailMagic() { try { reset(this.mockConfig); expect(this.mockConfig.getProperty("Batch_Test_Max_File_Size", "false")) .andReturn("true"); expect(this.mockConfig.getProperty("Batch_Max_File_Size")) ...
void function() { try { reset(this.mockConfig); expect(this.mockConfig.getProperty(STR, "false")) .andReturn("true"); expect(this.mockConfig.getProperty(STR)) .andReturn("100"); expect(this.mockConfig.getProperty(STR, "false")) .andReturn("true"); expect(this.mockConfig.getProperty(STR)) .andReturn(STR); expect(this.mo...
/** * Test method for {@link au.edu.uts.eng.remotelabs.rigclient.rig.control.ConfiguredBatchRunner#checkFile()}. */
Test method for <code>au.edu.uts.eng.remotelabs.rigclient.rig.control.ConfiguredBatchRunner#checkFile()</code>
testCheckFileFailMagic
{ "repo_name": "sahara-labs/rig-client", "path": "src/au/edu/uts/eng/remotelabs/rigclient/rig/control/tests/ConfiguredBatchRunnerTester.java", "license": "bsd-3-clause", "size": 26930 }
[ "au.edu.uts.eng.remotelabs.rigclient.rig.control.AbstractBatchRunner", "au.edu.uts.eng.remotelabs.rigclient.rig.control.ConfiguredBatchRunner", "java.lang.reflect.Field", "java.lang.reflect.Method", "org.easymock.EasyMock" ]
import au.edu.uts.eng.remotelabs.rigclient.rig.control.AbstractBatchRunner; import au.edu.uts.eng.remotelabs.rigclient.rig.control.ConfiguredBatchRunner; import java.lang.reflect.Field; import java.lang.reflect.Method; import org.easymock.EasyMock;
import au.edu.uts.eng.remotelabs.rigclient.rig.control.*; import java.lang.reflect.*; import org.easymock.*;
[ "au.edu.uts", "java.lang", "org.easymock" ]
au.edu.uts; java.lang; org.easymock;
2,532,839
public ServiceFuture<PrivateLinkServiceVisibilityInner> beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, final ServiceCallback<PrivateLinkServiceVisibilityInner> serviceCallback) { return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityBy...
ServiceFuture<PrivateLinkServiceVisibilityInner> function(String location, String resourceGroupName, final ServiceCallback<PrivateLinkServiceVisibilityInner> serviceCallback) { return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName), s...
/** * Checks whether the subscription is visible to private link service in the specified resource group. * * @param location The location of the domain name. * @param resourceGroupName The name of the resource group. * @param serviceCallback the async ServiceCallback to handle successful and f...
Checks whether the subscription is visible to private link service in the specified resource group
beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/PrivateLinkServicesInner.java", "license": "mit", "size": 181881 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,392,249
@XmlElement @FieldBridge(impl = LongBridge.class) @Field(index = Index.YES, analyze = Analyze.NO, store = Store.NO) public Long getProjectId() { return project == null ? null : project.getId(); }
@FieldBridge(impl = LongBridge.class) @Field(index = Index.YES, analyze = Analyze.NO, store = Store.NO) Long function() { return project == null ? null : project.getId(); }
/** * Returns the project id. * * @return the project id */
Returns the project id
getProjectId
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-model/src/main/java/com/wci/umls/server/jpa/workflow/AbstractChecklist.java", "license": "apache-2.0", "size": 7568 }
[ "org.hibernate.search.annotations.Analyze", "org.hibernate.search.annotations.Field", "org.hibernate.search.annotations.FieldBridge", "org.hibernate.search.annotations.Index", "org.hibernate.search.annotations.Store", "org.hibernate.search.bridge.builtin.LongBridge" ]
import org.hibernate.search.annotations.Analyze; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.FieldBridge; import org.hibernate.search.annotations.Index; import org.hibernate.search.annotations.Store; import org.hibernate.search.bridge.builtin.LongBridge;
import org.hibernate.search.annotations.*; import org.hibernate.search.bridge.builtin.*;
[ "org.hibernate.search" ]
org.hibernate.search;
8,465
public void setSaslProperties(Map<String, String> properties) { saslProperties = properties; } /** * Returns the <tt>AuthenticatorFactory</tt> to use for SASL authentication. * The default value is what is returned by calling * {@link AuthenticatorFactory#getDefault}
void function(Map<String, String> properties) { saslProperties = properties; } /** * Returns the <tt>AuthenticatorFactory</tt> to use for SASL authentication. * The default value is what is returned by calling * {@link AuthenticatorFactory#getDefault}
/** * Sets optional properties to use for SASL authentication. * * @param properties the SASL properties to use */
Sets optional properties to use for SASL authentication
setSaslProperties
{ "repo_name": "nico01f/z-pec", "path": "ZimbraServer/src/java/com/zimbra/cs/mailclient/MailConfig.java", "license": "mit", "size": 9863 }
[ "com.zimbra.cs.mailclient.auth.AuthenticatorFactory", "java.util.Map" ]
import com.zimbra.cs.mailclient.auth.AuthenticatorFactory; import java.util.Map;
import com.zimbra.cs.mailclient.auth.*; import java.util.*;
[ "com.zimbra.cs", "java.util" ]
com.zimbra.cs; java.util;
2,797,006
@Override protected void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws javax.servlet.ServletException if a servlet-specific error occurs * @throws java.io.IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "GluuFederation/oxAuth", "path": "Server/src/main/java/org/gluu/oxauth/servlet/WebFinger.java", "license": "mit", "size": 4557 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
22,925
void setScope(@NotNull DependencyScope scope);
void setScope(@NotNull DependencyScope scope);
/** * Updates scope for the entry. This method may be called only on a modifiable instance obtained from {@link ModifiableRootModel}. */
Updates scope for the entry. This method may be called only on a modifiable instance obtained from <code>ModifiableRootModel</code>
setScope
{ "repo_name": "siosio/intellij-community", "path": "platform/projectModel-api/src/com/intellij/openapi/roots/ExportableOrderEntry.java", "license": "apache-2.0", "size": 1263 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
84,974
public void setTab(int tab) { switch (tab) { case 0: tbtmParameter0.setControl(keyTab); previousTab = 0; break; case 1: if(keyTab.getUpdatedKey()) { resetTabs(); keyTab.setUpdatedKey(false); }...
void function(int tab) { switch (tab) { case 0: tbtmParameter0.setControl(keyTab); previousTab = 0; break; case 1: if(keyTab.getUpdatedKey()) { resetTabs(); keyTab.setUpdatedKey(false); } if (signatureTab == null mustCreateTab[1]) { signatureTab = new SphincsSignVerifyView(tabFolder, SWT.NONE, bcSphincs); mustCreateTab...
/** * Switches to the given tab * * @param tab */
Switches to the given tab
setTab
{ "repo_name": "jcryptool/crypto", "path": "org.jcryptool.visual.sphincs/src/org/jcryptool/visual/sphincs/SphincsView.java", "license": "epl-1.0", "size": 8596 }
[ "org.jcryptool.visual.sphincs.ui.SphincsSignVerifyView", "org.jcryptool.visual.sphincs.ui.SphincsTreeView" ]
import org.jcryptool.visual.sphincs.ui.SphincsSignVerifyView; import org.jcryptool.visual.sphincs.ui.SphincsTreeView;
import org.jcryptool.visual.sphincs.ui.*;
[ "org.jcryptool.visual" ]
org.jcryptool.visual;
1,391,230
public Description remove(Property p) { for (StmtIterator si = root.listProperties(p); si.hasNext();) { si.next(); si.remove(); } return this; }
Description function(Property p) { for (StmtIterator si = root.listProperties(p); si.hasNext();) { si.next(); si.remove(); } return this; }
/** * Remove all current values of the given property */
Remove all current values of the given property
remove
{ "repo_name": "UKGovLD/registry-core", "path": "src/main/java/com/epimorphics/registry/core/Description.java", "license": "apache-2.0", "size": 6457 }
[ "org.apache.jena.rdf.model.Property", "org.apache.jena.rdf.model.StmtIterator" ]
import org.apache.jena.rdf.model.Property; import org.apache.jena.rdf.model.StmtIterator;
import org.apache.jena.rdf.model.*;
[ "org.apache.jena" ]
org.apache.jena;
1,035,566
protected Subject getSubject() { return subject; }
Subject function() { return subject; }
/** * Get the underlying subject from this ugi. * @return the subject that represents this user. */
Get the underlying subject from this ugi
getSubject
{ "repo_name": "jayantgolhar/Hadoop-0.21.0", "path": "common/src/java/org/apache/hadoop/security/UserGroupInformation.java", "license": "apache-2.0", "size": 26415 }
[ "javax.security.auth.Subject" ]
import javax.security.auth.Subject;
import javax.security.auth.*;
[ "javax.security" ]
javax.security;
2,512,976
maybePopulateEncoderInfos(); ImmutableList.Builder<MediaCodecInfo> availableEncoders = new ImmutableList.Builder<>(); for (int i = 0; i < encoders.size(); i++) { MediaCodecInfo encoderInfo = encoders.get(i); String[] supportedMimeTypes = encoderInfo.getSupportedTypes(); for (String supportedM...
maybePopulateEncoderInfos(); ImmutableList.Builder<MediaCodecInfo> availableEncoders = new ImmutableList.Builder<>(); for (int i = 0; i < encoders.size(); i++) { MediaCodecInfo encoderInfo = encoders.get(i); String[] supportedMimeTypes = encoderInfo.getSupportedTypes(); for (String supportedMimeType : supportedMimeType...
/** * Returns a list of {@link MediaCodecInfo encoders} that support the given {@code mimeType}, or * an empty list if there is none. */
Returns a list of <code>MediaCodecInfo encoders</code> that support the given mimeType, or an empty list if there is none
getSupportedEncoders
{ "repo_name": "androidx/media", "path": "libraries/transformer/src/main/java/androidx/media3/transformer/EncoderUtil.java", "license": "apache-2.0", "size": 5881 }
[ "android.media.MediaCodecInfo", "com.google.common.base.Ascii", "com.google.common.collect.ImmutableList" ]
import android.media.MediaCodecInfo; import com.google.common.base.Ascii; import com.google.common.collect.ImmutableList;
import android.media.*; import com.google.common.base.*; import com.google.common.collect.*;
[ "android.media", "com.google.common" ]
android.media; com.google.common;
590,698
void enterRaise_statement(@NotNull PLSQLParser.Raise_statementContext ctx); void exitRaise_statement(@NotNull PLSQLParser.Raise_statementContext ctx);
void enterRaise_statement(@NotNull PLSQLParser.Raise_statementContext ctx); void exitRaise_statement(@NotNull PLSQLParser.Raise_statementContext ctx);
/** * Exit a parse tree produced by {@link PLSQLParser#raise_statement}. * @param ctx the parse tree */
Exit a parse tree produced by <code>PLSQLParser#raise_statement</code>
exitRaise_statement
{ "repo_name": "developeron29/PLSQLParser", "path": "PLSQLListener.java", "license": "mit", "size": 45486 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,662,931
Vector<TimeDurationPair> getUsedHolidaysForYear(int u_id, GregorianCalendar year) throws SQLException;
Vector<TimeDurationPair> getUsedHolidaysForYear(int u_id, GregorianCalendar year) throws SQLException;
/** * DOCUMENT ME! * * @param u_id DOCUMENT ME! * @param year DOCUMENT ME! * * @return DOCUMENT ME! * * @throws SQLException DOCUMENT ME! */
DOCUMENT ME
getUsedHolidaysForYear
{ "repo_name": "cismet/time-tracker", "path": "src/main/java/de/cismet/web/timetracker/DatabaseInterface.java", "license": "lgpl-3.0", "size": 8294 }
[ "de.cismet.web.timetracker.types.TimeDurationPair", "java.sql.SQLException", "java.util.GregorianCalendar", "java.util.Vector" ]
import de.cismet.web.timetracker.types.TimeDurationPair; import java.sql.SQLException; import java.util.GregorianCalendar; import java.util.Vector;
import de.cismet.web.timetracker.types.*; import java.sql.*; import java.util.*;
[ "de.cismet.web", "java.sql", "java.util" ]
de.cismet.web; java.sql; java.util;
2,740,686
@Test public void exists() throws IOException { LOG.info("Starting exists"); assertFalse(dataStore.exists(new DataIdentifier(ID_PREFIX + 0))); LOG.info("Finished exists"); }
void function() throws IOException { LOG.info(STR); assertFalse(dataStore.exists(new DataIdentifier(ID_PREFIX + 0))); LOG.info(STR); }
/** * {@link CompositeDataStoreCache#get(String)} when no cache. * @throws IOException */
<code>CompositeDataStoreCache#get(String)</code> when no cache
exists
{ "repo_name": "yesil/jackrabbit-oak", "path": "oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/CachingDataStoreTest.java", "license": "apache-2.0", "size": 16031 }
[ "java.io.IOException", "org.apache.jackrabbit.core.data.DataIdentifier", "org.junit.Assert" ]
import java.io.IOException; import org.apache.jackrabbit.core.data.DataIdentifier; import org.junit.Assert;
import java.io.*; import org.apache.jackrabbit.core.data.*; import org.junit.*;
[ "java.io", "org.apache.jackrabbit", "org.junit" ]
java.io; org.apache.jackrabbit; org.junit;
772,067
private SOAPMessage createSOAPMessagefromInputStream(InputStream inputStream) throws SOAPException, IOException { SOAPMessage soapMessage; MessageFactory messageFactory = MessageFactory.newInstance(); soapMessage = messageFactory.createMessage(new MimeHeaders(), inputStream); return ...
SOAPMessage function(InputStream inputStream) throws SOAPException, IOException { SOAPMessage soapMessage; MessageFactory messageFactory = MessageFactory.newInstance(); soapMessage = messageFactory.createMessage(new MimeHeaders(), inputStream); return soapMessage; }
/** * This method returns s SOAP message from the given Servlet Input Stream. * @param inputStream InputStream from the servlet Request * @return * @throws IOException * @throws SOAPException */
This method returns s SOAP message from the given Servlet Input Stream
createSOAPMessagefromInputStream
{ "repo_name": "wso2-extensions/identity-inbound-auth-saml", "path": "components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLECPProviderServlet.java", "license": "apache-2.0", "size": 6534 }
[ "java.io.IOException", "java.io.InputStream", "javax.xml.soap.MessageFactory", "javax.xml.soap.MimeHeaders", "javax.xml.soap.SOAPException", "javax.xml.soap.SOAPMessage" ]
import java.io.IOException; import java.io.InputStream; import javax.xml.soap.MessageFactory; import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage;
import java.io.*; import javax.xml.soap.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
2,155,040
static ArrayList<DbStats> getDbStats() { ArrayList<DbStats> dbStatsList = new ArrayList<DbStats>(); for (WeakReference<SQLiteDatabase> w : ActiveDatabases.getInstance().mActiveDatabases) { SQLiteDatabase db = w.get(); if (db == null || !db.isOpen()) { continu...
static ArrayList<DbStats> getDbStats() { ArrayList<DbStats> dbStatsList = new ArrayList<DbStats>(); for (WeakReference<SQLiteDatabase> w : ActiveDatabases.getInstance().mActiveDatabases) { SQLiteDatabase db = w.get(); if (db == null !db.isOpen()) { continue; } int lookasideUsed = db.native_getDbLookaside(); String path...
/** * this method is used to collect data about ALL open databases in the current process. * bugreport is a user of this data. */
this method is used to collect data about ALL open databases in the current process. bugreport is a user of this data
getDbStats
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/database/sqlite/SQLiteDatabase.java", "license": "gpl-3.0", "size": 94493 }
[ "android.database.sqlite.SQLiteDebug", "android.util.Pair", "java.lang.ref.WeakReference", "java.util.ArrayList" ]
import android.database.sqlite.SQLiteDebug; import android.util.Pair; import java.lang.ref.WeakReference; import java.util.ArrayList;
import android.database.sqlite.*; import android.util.*; import java.lang.ref.*; import java.util.*;
[ "android.database", "android.util", "java.lang", "java.util" ]
android.database; android.util; java.lang; java.util;
2,107,436
@SuppressWarnings("static-method") @Test public void testGetRecords() { final InvertedIndex<String> invertedIndex = new InvertedIndex<>(); final String key = "a"; final String anotherKey = "b"; invertedIndex.addRecord(key, 1); invertedIndex.addRecord(key, 2); Assert.assertFalse...
@SuppressWarnings(STR) void function() { final InvertedIndex<String> invertedIndex = new InvertedIndex<>(); final String key = "a"; final String anotherKey = "b"; invertedIndex.addRecord(key, 1); invertedIndex.addRecord(key, 2); Assert.assertFalse(invertedIndex.containsKey(anotherKey)); invertedIndex.addRecord(anotherK...
/** * Test method for {@link InvertedIndex#getRecords(Object)}. */
Test method for <code>InvertedIndex#getRecords(Object)</code>
testGetRecords
{ "repo_name": "ZabuzaW/LexiSearch", "path": "test/de/zabuza/lexisearch/indexing/InvertedIndexTest.java", "license": "gpl-3.0", "size": 5188 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,759,710
public Cookie login(String username, String password) { UserDTO user = new UserDTO(); user.setUserName(username); user.setPassword(password); user.setRememberMe(true); Response response = createWebTarget().path("users").path("login").request() .post(Enti...
Cookie function(String username, String password) { UserDTO user = new UserDTO(); user.setUserName(username); user.setPassword(password); user.setRememberMe(true); Response response = createWebTarget().path("users").path("login").request() .post(Entity.entity(user, MediaType.APPLICATION_JSON)); if (response.getStatus()...
/** * Login para poder consultar los diferentes servicios * * @param username Nombre de usuario * @param password Clave del usuario * @return Cookie con información de la sesión del usuario * @generated */
Login para poder consultar los diferentes servicios
login
{ "repo_name": "Uniandes-MISO4203/artwork-201620-1", "path": "artwork-api/src/test/java/co/edu/uniandes/csw/artwork/tests/rest/CommentTest.java", "license": "mit", "size": 8662 }
[ "co.edu.uniandes.csw.auth.model.UserDTO", "javax.ws.rs.client.Entity", "javax.ws.rs.core.Cookie", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response" ]
import co.edu.uniandes.csw.auth.model.UserDTO; import javax.ws.rs.client.Entity; import javax.ws.rs.core.Cookie; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response;
import co.edu.uniandes.csw.auth.model.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*;
[ "co.edu.uniandes", "javax.ws" ]
co.edu.uniandes; javax.ws;
2,135,706
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == REQUEST_CAMERA) { // BEGIN_INCLUDE(permission_result) // Received permission result for camera permission. L...
void function(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == REQUEST_CAMERA) { Log.i(TAG, STR); if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { Log.i(TAG, STR); Snackbar.make(mLayout, R.string.permision_available_camera, Snackbar...
/** * Callback received when a permissions request has been completed. */
Callback received when a permissions request has been completed
onRequestPermissionsResult
{ "repo_name": "googlearchive/android-RuntimePermissions", "path": "Application/src/main/java/com/example/android/system/runtimepermissions/MainActivity.java", "license": "apache-2.0", "size": 13635 }
[ "android.content.pm.PackageManager", "android.support.annotation.NonNull", "android.support.design.widget.Snackbar", "android.util.Log" ]
import android.content.pm.PackageManager; import android.support.annotation.NonNull; import android.support.design.widget.Snackbar; import android.util.Log;
import android.content.pm.*; import android.support.annotation.*; import android.support.design.widget.*; import android.util.*;
[ "android.content", "android.support", "android.util" ]
android.content; android.support; android.util;
323,039
private static Geometry parseWellKnownText(String wellKnownText) throws SADisplayParserException { Geometry geo = null; try { geo = reader.read(wellKnownText); } catch (Exception e) { log.info("<Error Parsing Well Known Text>" + e.getMessage()); throw new SADisp...
static Geometry function(String wellKnownText) throws SADisplayParserException { Geometry geo = null; try { geo = reader.read(wellKnownText); } catch (Exception e) { log.info(STR + e.getMessage()); throw new SADisplayParserException(e.getMessage()); } return geo; }
/** parseWellKnownText - translate string to geometry * @param String * @param Geometry */
parseWellKnownText - translate string to geometry
parseWellKnownText
{ "repo_name": "hadrsystems/nics-common", "path": "message-parser/src/main/java/edu/mit/ll/nics/common/messages/parser/PopulateEntityHelper.java", "license": "bsd-3-clause", "size": 13539 }
[ "com.vividsolutions.jts.geom.Geometry" ]
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.*;
[ "com.vividsolutions.jts" ]
com.vividsolutions.jts;
2,412,670
@Test public void testHandlingFinishedContainers() { EventHandler eventHandler = mock(EventHandler.class); AppContext context = mock(RunningAppContext.class); when(context.getClock()).thenReturn(new ControlledClock()); when(context.getClusterInfo()).thenReturn( new ClusterInfo(Resource.newI...
void function() { EventHandler eventHandler = mock(EventHandler.class); AppContext context = mock(RunningAppContext.class); when(context.getClock()).thenReturn(new ControlledClock()); when(context.getClusterInfo()).thenReturn( new ClusterInfo(Resource.newInstance(10240, 1))); when(context.getEventHandler()).thenReturn(...
/** * MAPREDUCE-6771. Test if RMContainerAllocator generates the events in the * right order while processing finished containers. */
MAPREDUCE-6771. Test if RMContainerAllocator generates the events in the right order while processing finished containers
testHandlingFinishedContainers
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/rm/TestRMContainerAllocator.java", "license": "apache-2.0", "size": 137847 }
[ "org.apache.hadoop.mapreduce.v2.app.AppContext", "org.apache.hadoop.mapreduce.v2.app.ClusterInfo", "org.apache.hadoop.mapreduce.v2.app.MRAppMaster", "org.apache.hadoop.mapreduce.v2.app.client.ClientService", "org.apache.hadoop.mapreduce.v2.app.job.event.TaskAttemptDiagnosticsUpdateEvent", "org.apache.hado...
import org.apache.hadoop.mapreduce.v2.app.AppContext; import org.apache.hadoop.mapreduce.v2.app.ClusterInfo; import org.apache.hadoop.mapreduce.v2.app.MRAppMaster; import org.apache.hadoop.mapreduce.v2.app.client.ClientService; import org.apache.hadoop.mapreduce.v2.app.job.event.TaskAttemptDiagnosticsUpdateEvent; impor...
import org.apache.hadoop.mapreduce.v2.app.*; import org.apache.hadoop.mapreduce.v2.app.client.*; import org.apache.hadoop.mapreduce.v2.app.job.event.*; import org.apache.hadoop.mapreduce.v2.app.rm.preemption.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.event.*; import org.apache.hadoop....
[ "org.apache.hadoop", "org.mockito" ]
org.apache.hadoop; org.mockito;
239,661
boolean deleteList(String name) { KeywordList delList = getList(name); if (delList != null && !delList.isEditable()) { theLists.remove(name); } try { changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name); } catch (Exception e)...
boolean deleteList(String name) { KeywordList delList = getList(name); if (delList != null && !delList.isEditable()) { theLists.remove(name); } try { changeSupport.firePropertyChange(ListsEvt.LIST_DELETED.toString(), null, name); } catch (Exception e) { LOGGER.log(Level.SEVERE, STR, e); MessageNotifyUtil.Notify.show( N...
/** * delete list if exists and save new list * * @param name of list to delete * * @return true if deleted */
delete list if exists and save new list
deleteList
{ "repo_name": "narfindustries/autopsy", "path": "KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchList.java", "license": "apache-2.0", "size": 18252 }
[ "java.util.logging.Level", "org.openide.util.NbBundle", "org.sleuthkit.autopsy.coreutils.MessageNotifyUtil" ]
import java.util.logging.Level; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import java.util.logging.*; import org.openide.util.*; import org.sleuthkit.autopsy.coreutils.*;
[ "java.util", "org.openide.util", "org.sleuthkit.autopsy" ]
java.util; org.openide.util; org.sleuthkit.autopsy;
2,038,264
public Integer asInt(JsonElement source, Integer defaultInt) { return isNumber(source) ? (Integer) source.getAsInt() : defaultInt; }
Integer function(JsonElement source, Integer defaultInt) { return isNumber(source) ? (Integer) source.getAsInt() : defaultInt; }
/** * Returns the source json as an Integer if possible. Else returns the default integer * * @param source the source json element * @param defaultInt the default integer * @return the source json as an integer */
Returns the source json as an Integer if possible. Else returns the default integer
asInt
{ "repo_name": "balajeetm/json-mystique", "path": "json-mystique-utils/gson-utils/src/main/java/com/balajeetm/mystique/util/gson/lever/JsonLever.java", "license": "apache-2.0", "size": 77289 }
[ "com.google.gson.JsonElement" ]
import com.google.gson.JsonElement;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,740,978
CommandLineConfig setModuleWrapper(List<String> moduleWrapper) { this.moduleWrapper.clear(); this.moduleWrapper.addAll(moduleWrapper); return this; } private String moduleOutputPathPrefix = "";
CommandLineConfig setModuleWrapper(List<String> moduleWrapper) { this.moduleWrapper.clear(); this.moduleWrapper.addAll(moduleWrapper); return this; } private String moduleOutputPathPrefix = "";
/** * An output wrapper for a JavaScript module (optional). See the flag * description for formatting requirements. */
An output wrapper for a JavaScript module (optional). See the flag description for formatting requirements
setModuleWrapper
{ "repo_name": "fvigotti/closure-compiler", "path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java", "license": "apache-2.0", "size": 69434 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,271,304
public static ZipSections findZipSections(DataSource apk) throws IOException, ZipFormatException { Pair<ByteBuffer, Long> eocdAndOffsetInFile = ZipUtils.findZipEndOfCentralDirectoryRecord(apk); if (eocdAndOffsetInFile == null) { throw new ZipFormatException("Z...
static ZipSections function(DataSource apk) throws IOException, ZipFormatException { Pair<ByteBuffer, Long> eocdAndOffsetInFile = ZipUtils.findZipEndOfCentralDirectoryRecord(apk); if (eocdAndOffsetInFile == null) { throw new ZipFormatException(STR); } ByteBuffer eocdBuf = eocdAndOffsetInFile.getFirst(); long eocdOffset...
/** * Finds the main ZIP sections of the provided APK. * * @throws IOException if an I/O error occurred while reading the APK * @throws ZipFormatException if the APK is malformed */
Finds the main ZIP sections of the provided APK
findZipSections
{ "repo_name": "debian-pkg-android-tools/android-platform-tools-apksig", "path": "src/main/java/com/android/apksig/apk/ApkUtils.java", "license": "apache-2.0", "size": 14958 }
[ "com.android.apksig.internal.util.Pair", "com.android.apksig.internal.zip.ZipUtils", "com.android.apksig.util.DataSource", "com.android.apksig.zip.ZipFormatException", "java.io.IOException", "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import com.android.apksig.internal.util.Pair; import com.android.apksig.internal.zip.ZipUtils; import com.android.apksig.util.DataSource; import com.android.apksig.zip.ZipFormatException; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder;
import com.android.apksig.internal.util.*; import com.android.apksig.internal.zip.*; import com.android.apksig.util.*; import com.android.apksig.zip.*; import java.io.*; import java.nio.*;
[ "com.android.apksig", "java.io", "java.nio" ]
com.android.apksig; java.io; java.nio;
8,179
void enterUpdateDetails(@NotNull EsperEPL2GrammarParser.UpdateDetailsContext ctx); void exitUpdateDetails(@NotNull EsperEPL2GrammarParser.UpdateDetailsContext ctx);
void enterUpdateDetails(@NotNull EsperEPL2GrammarParser.UpdateDetailsContext ctx); void exitUpdateDetails(@NotNull EsperEPL2GrammarParser.UpdateDetailsContext ctx);
/** * Exit a parse tree produced by {@link EsperEPL2GrammarParser#updateDetails}. * @param ctx the parse tree */
Exit a parse tree produced by <code>EsperEPL2GrammarParser#updateDetails</code>
exitUpdateDetails
{ "repo_name": "georgenicoll/esper", "path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java", "license": "gpl-2.0", "size": 114105 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,637,152
public byte read() throws IOException { if (pos + 8 > bits.length()) throw new IOException(); pos += 8; return (byte) (Integer.parseInt(bits.substring(pos - 8, pos), 2) & 0xff); }
byte function() throws IOException { if (pos + 8 > bits.length()) throw new IOException(); pos += 8; return (byte) (Integer.parseInt(bits.substring(pos - 8, pos), 2) & 0xff); }
/** * Read a byte. * * @return the byte * @throws IOException * if an I/O error occurs. */
Read a byte
read
{ "repo_name": "Dbof/bitstring", "path": "src/com/davidebove/bitstring/BitStream.java", "license": "mit", "size": 5639 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
319,305
public static boolean updateTag(Context context, Tag tag) { DataOpenHelper helper = new DataOpenHelper(context); SQLiteDatabase db = helper.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(DataOpenHelper.COLUMN_TAGS_NAME, tag.getName()); values.p...
static boolean function(Context context, Tag tag) { DataOpenHelper helper = new DataOpenHelper(context); SQLiteDatabase db = helper.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(DataOpenHelper.COLUMN_TAGS_NAME, tag.getName()); values.put(DataOpenHelper.COLUMN_TAGS_PASSWORD_LENGTH, tag.ge...
/** * Update a tag in the database * * @param context The application context * @param tag The tag * @return true if success, false in case of error */
Update a tag in the database
updateTag
{ "repo_name": "gustavomondron/twik", "path": "app/src/main/java/com/reddyetwo/hashmypass/app/data/TagSettings.java", "license": "gpl-3.0", "size": 13577 }
[ "android.content.ContentValues", "android.content.Context", "android.database.sqlite.SQLiteDatabase" ]
import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase;
import android.content.*; import android.database.sqlite.*;
[ "android.content", "android.database" ]
android.content; android.database;
2,869,407
public static Message buildAckEpoch(long epoch, Zxid lastZxid) { ZabMessage.Zxid zxid = toProtoZxid(lastZxid); AckEpoch ackEpoch = AckEpoch.newBuilder() .setAcknowledgedEpoch(epoch) .setLastZxid(zxid) .build(); return Message.newBui...
static Message function(long epoch, Zxid lastZxid) { ZabMessage.Zxid zxid = toProtoZxid(lastZxid); AckEpoch ackEpoch = AckEpoch.newBuilder() .setAcknowledgedEpoch(epoch) .setLastZxid(zxid) .build(); return Message.newBuilder().setType(MessageType.ACK_EPOCH) .setAckEpoch(ackEpoch) .build(); }
/** * Creates a ACK_EPOCH message. * * @param epoch the last leader proposal the follower has acknowledged. * @param lastZxid the last zxid of the follower. * @return the protobuf message. */
Creates a ACK_EPOCH message
buildAckEpoch
{ "repo_name": "fpj/jzab", "path": "src/main/java/com/github/zk1931/jzab/MessageBuilder.java", "license": "apache-2.0", "size": 23166 }
[ "com.github.zk1931.jzab.proto.ZabMessage" ]
import com.github.zk1931.jzab.proto.ZabMessage;
import com.github.zk1931.jzab.proto.*;
[ "com.github.zk1931" ]
com.github.zk1931;
1,950,854
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeShape(this.shape, stream); SerialUtilities.writePaint(this.fillPaint, stream); SerialUtilities.writePaint(this.outlinePaint, stream); SerialUtilitie...
void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeShape(this.shape, stream); SerialUtilities.writePaint(this.fillPaint, stream); SerialUtilities.writePaint(this.outlinePaint, stream); SerialUtilities.writeStroke(this.outlineStroke, stream); SerialUtilities.w...
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */
Provides serialization support
writeObject
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/title/LegendGraphic.java", "license": "lgpl-2.1", "size": 22996 }
[ "java.io.IOException", "java.io.ObjectOutputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
1,382,830