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
public void diff_cleanupSemantic(LinkedList<Diff> diffs) { if (diffs.isEmpty()) { return; } boolean changes = false; Stack<Diff> equalities = new Stack<Diff>(); // Stack of qualities. String lastequality = null; // Always equal to equalities.lastElement().text ListIterator<Diff> pointer...
void function(LinkedList<Diff> diffs) { if (diffs.isEmpty()) { return; } boolean changes = false; Stack<Diff> equalities = new Stack<Diff>(); String lastequality = null; ListIterator<Diff> pointer = diffs.listIterator(); int length_changes1 = 0; int length_changes2 = 0; Diff thisDiff = pointer.next(); while (thisDiff !...
/** * Reduce the number of edits by eliminating semantically trivial equalities. * @param diffs LinkedList of Diff objects. */
Reduce the number of edits by eliminating semantically trivial equalities
diff_cleanupSemantic
{ "repo_name": "ZsZs/ProcessPuzzleCommons", "path": "Implementation/DomainTier/Source/com/processpuzzle/commons/text/TextDifferencer.java", "license": "agpl-3.0", "size": 81623 }
[ "java.util.LinkedList", "java.util.ListIterator", "java.util.Stack" ]
import java.util.LinkedList; import java.util.ListIterator; import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
1,792,109
@Test public void testWriteV2ReadV1() throws Exception { final File outputFile = this.testFolder.newFile(); RainbowFishSerializer.writeV2(V2, outputFile.getPath()); final RainbowFish fish = RainbowFishSerializer.readV1(outputFile.getPath()); assertNotSame(V2, fish); assertEquals(V2.getName(), f...
void function() throws Exception { final File outputFile = this.testFolder.newFile(); RainbowFishSerializer.writeV2(V2, outputFile.getPath()); final RainbowFish fish = RainbowFishSerializer.readV1(outputFile.getPath()); assertNotSame(V2, fish); assertEquals(V2.getName(), fish.getName()); assertEquals(V2.getAge(), fish....
/** * Verify if a fish, written as version 2 can be read back as version 1 */
Verify if a fish, written as version 2 can be read back as version 1
testWriteV2ReadV1
{ "repo_name": "Crossy147/java-design-patterns", "path": "tolerant-reader/src/test/java/com/iluwatar/tolerantreader/RainbowFishSerializerTest.java", "license": "mit", "size": 3161 }
[ "java.io.File", "org.junit.Assert" ]
import java.io.File; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
612,341
@NonNull public static float[] sizeToVertices(@NonNull Size size) { return new float[]{0, 0, size.getWidth(), 0, size.getWidth(), size.getHeight(), 0, size.getHeight()}; }
static float[] function(@NonNull Size size) { return new float[]{0, 0, size.getWidth(), 0, size.getWidth(), size.getHeight(), 0, size.getHeight()}; }
/** * Converts a {@link Size} to a float array of vertices. */
Converts a <code>Size</code> to a float array of vertices
sizeToVertices
{ "repo_name": "AndroidX/androidx", "path": "camera/camera-view/src/main/java/androidx/camera/view/TransformUtils.java", "license": "apache-2.0", "size": 11403 }
[ "android.util.Size", "androidx.annotation.NonNull" ]
import android.util.Size; import androidx.annotation.NonNull;
import android.util.*; import androidx.annotation.*;
[ "android.util", "androidx.annotation" ]
android.util; androidx.annotation;
316,496
QueryBuilder queryBuilder();
QueryBuilder queryBuilder();
/** * Get the current query builder. * * @return */
Get the current query builder
queryBuilder
{ "repo_name": "alien4cloud/alien4cloud", "path": "alien4cloud-dao/src/main/java/alien4cloud/dao/IESQueryBuilderHelper.java", "license": "apache-2.0", "size": 2577 }
[ "org.elasticsearch.index.query.QueryBuilder" ]
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
457,159
void postModifyColumnHandler( final ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HColumnDescriptor descriptor) throws IOException;
void postModifyColumnHandler( final ObserverContext<MasterCoprocessorEnvironment> ctx, byte[] tableName, HColumnDescriptor descriptor) throws IOException;
/** * Called after the column family has been updated. Called as part of modify * column handler. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param descriptor the HColumnDescriptor */
Called after the column family has been updated. Called as part of modify column handler
postModifyColumnHandler
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java", "license": "apache-2.0", "size": 21042 }
[ "java.io.IOException", "org.apache.hadoop.hbase.HColumnDescriptor" ]
import java.io.IOException; import org.apache.hadoop.hbase.HColumnDescriptor;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
459,976
@Override public void compute(RandomAccessibleInterval<T> correction, RandomAccessibleInterval<T> estimate) { // TODO: delte these lines when problem in initialization is fixed if (mul == null) { mul = Hybrids.binaryCF(ops(), IIToIIOutputII.Multiply.class, estimate, correction, estimate); } mul...
void function(RandomAccessibleInterval<T> correction, RandomAccessibleInterval<T> estimate) { if (mul == null) { mul = Hybrids.binaryCF(ops(), IIToIIOutputII.Multiply.class, estimate, correction, estimate); } mul.compute(estimate, correction, estimate); }
/** * performs update step of the Richardson Lucy Algorithm */
performs update step of the Richardson Lucy Algorithm
compute
{ "repo_name": "gab1one/imagej-ops", "path": "src/main/java/net/imagej/ops/deconvolve/RichardsonLucyUpdate.java", "license": "bsd-2-clause", "size": 3454 }
[ "net.imagej.ops.math.IIToIIOutputII", "net.imagej.ops.special.hybrid.Hybrids", "net.imglib2.RandomAccessibleInterval" ]
import net.imagej.ops.math.IIToIIOutputII; import net.imagej.ops.special.hybrid.Hybrids; import net.imglib2.RandomAccessibleInterval;
import net.imagej.ops.math.*; import net.imagej.ops.special.hybrid.*; import net.imglib2.*;
[ "net.imagej.ops", "net.imglib2" ]
net.imagej.ops; net.imglib2;
997,420
@ApiModelProperty(value = "The file atributes") public Integer getAttributes() { return attributes; }
@ApiModelProperty(value = STR) Integer function() { return attributes; }
/** * The file atributes * @return attributes **/
The file atributes
getAttributes
{ "repo_name": "iterate-ch/cyberduck", "path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/FileMetadata.java", "license": "gpl-3.0", "size": 7733 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,654,302
public RefConstructor findConstructor(final int number) { final List<Constructor> constructors = new ArrayList<>(); Collections.addAll(constructors, clazz.getConstructors()); Collections.addAll(constructors, clazz.getDeclaredConstructors()); for (final Constructor...
RefConstructor function(final int number) { final List<Constructor> constructors = new ArrayList<>(); Collections.addAll(constructors, clazz.getConstructors()); Collections.addAll(constructors, clazz.getDeclaredConstructors()); for (final Constructor m : constructors) { if (m.getParameterTypes().length == number) { ret...
/** * find constructor by number of arguments * * @param number number of arguments * * @return RefConstructor * * @throws RuntimeException if constructor not found */
find constructor by number of arguments
findConstructor
{ "repo_name": "Litss/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/util/ReflectionUtils.java", "license": "gpl-3.0", "size": 23156 }
[ "java.lang.reflect.Constructor", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,351,014
ProcessInstance startProcessInstanceByMessage(String messageName, Map<String, Object> processVariables);
ProcessInstance startProcessInstanceByMessage(String messageName, Map<String, Object> processVariables);
/** * <p> * Signals the process engine that a message is received and starts a new {@link ProcessInstance}. * </p> * <p> * See {@link #startProcessInstanceByMessage(String)}. In addition, this method allows specifying a the payload of the message as a map of process variables. * * @pa...
Signals the process engine that a message is received and starts a new <code>ProcessInstance</code>. See <code>#startProcessInstanceByMessage(String)</code>. In addition, this method allows specifying a the payload of the message as a map of process variables
startProcessInstanceByMessage
{ "repo_name": "paulstapleton/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/RuntimeService.java", "license": "apache-2.0", "size": 63251 }
[ "java.util.Map", "org.flowable.engine.runtime.ProcessInstance" ]
import java.util.Map; import org.flowable.engine.runtime.ProcessInstance;
import java.util.*; import org.flowable.engine.runtime.*;
[ "java.util", "org.flowable.engine" ]
java.util; org.flowable.engine;
177,214
@Override public String getText(Object object) { String label = ((BTSText)object).getName(); return label == null || label.length() == 0 ? getString("_UI_BTSText_type") : label; }
String function(Object object) { String label = ((BTSText)object).getName(); return label == null label.length() == 0 ? getString(STR) : label; }
/** * This returns the label text for the adapted class. <!-- begin-user-doc * --> <!-- end-user-doc --> * * @generatedNOT */
This returns the label text for the adapted class.
getText
{ "repo_name": "JKatzwinkel/bts", "path": "org.bbaw.bts.model.corpus.edit/src/org/bbaw/bts/corpus/btsCorpusModel/provider/BTSTextItemProvider.java", "license": "lgpl-3.0", "size": 6573 }
[ "org.bbaw.bts.corpus.btsCorpusModel.BTSText" ]
import org.bbaw.bts.corpus.btsCorpusModel.BTSText;
import org.bbaw.bts.corpus.*;
[ "org.bbaw.bts" ]
org.bbaw.bts;
2,827,952
public static <T> List<T> readFirstSheetFrom( InputStream inputStream, Class<T> toClass ) throws UncheckedIOException { return getHandler().readFirstSheetFrom( inputStream, toClass ); }
static <T> List<T> function( InputStream inputStream, Class<T> toClass ) throws UncheckedIOException { return getHandler().readFirstSheetFrom( inputStream, toClass ); }
/** * Read sheet from input stream * * @param inputStream input stream to read data * @param toClass generic type of list's class * @param <T> expected class of return * @return grid data * @throws UncheckedIOException File I/O Exception */
Read sheet from input stream
readFirstSheetFrom
{ "repo_name": "NyBatis/NyBatisCore", "path": "src/main/java/org/nybatis/core/file/ExcelUtil.java", "license": "apache-2.0", "size": 15563 }
[ "java.io.InputStream", "java.util.List", "org.nybatis.core.exception.unchecked.UncheckedIOException" ]
import java.io.InputStream; import java.util.List; import org.nybatis.core.exception.unchecked.UncheckedIOException;
import java.io.*; import java.util.*; import org.nybatis.core.exception.unchecked.*;
[ "java.io", "java.util", "org.nybatis.core" ]
java.io; java.util; org.nybatis.core;
2,798,283
private StaffMemberEto privateFindStaffMemberByLogin(String login) { return getBeanMapper().map(getStaffMemberDao().findByLogin(login), StaffMemberEto.class); }
StaffMemberEto function(String login) { return getBeanMapper().map(getStaffMemberDao().findByLogin(login), StaffMemberEto.class); }
/** * Do not extract this method as a service, because of PermitAll. (only for login) */
Do not extract this method as a service, because of PermitAll. (only for login)
privateFindStaffMemberByLogin
{ "repo_name": "hendrik1287/tp-off-oasp4j", "path": "oasp4j-samples/oasp4j-sample-core/src/main/java/io/oasp/gastronomy/restaurant/staffmanagement/logic/impl/StaffmanagementImpl.java", "license": "apache-2.0", "size": 5317 }
[ "io.oasp.gastronomy.restaurant.staffmanagement.logic.api.to.StaffMemberEto" ]
import io.oasp.gastronomy.restaurant.staffmanagement.logic.api.to.StaffMemberEto;
import io.oasp.gastronomy.restaurant.staffmanagement.logic.api.to.*;
[ "io.oasp.gastronomy" ]
io.oasp.gastronomy;
1,962,004
@Override public String getLogicalDefinitionChronologyReport(StampFilter stampFilter, PremiseType premiseType, LogicCoordinate logicCoordinate) { int assemblageSequence; if (premiseType == Prem...
String function(StampFilter stampFilter, PremiseType premiseType, LogicCoordinate logicCoordinate) { int assemblageSequence; if (premiseType == PremiseType.INFERRED) { assemblageSequence = logicCoordinate.getInferredAssemblageNid(); } else { assemblageSequence = logicCoordinate.getStatedAssemblageNid(); } final Optiona...
/** * Gets the logical definition chronology report. * * @param stampFilter the stamp coordinate * @param premiseType the premise type * @param logicCoordinate the logic coordinate * @return the logical definition chronology report */
Gets the logical definition chronology report
getLogicalDefinitionChronologyReport
{ "repo_name": "OSEHRA/ISAAC", "path": "core/model/src/main/java/sh/isaac/model/concept/ConceptChronologyImpl.java", "license": "apache-2.0", "size": 15446 }
[ "java.util.List", "java.util.Optional", "sh.isaac.api.Get", "sh.isaac.api.component.semantic.SemanticChronology", "sh.isaac.api.coordinate.LogicCoordinate", "sh.isaac.api.coordinate.PremiseType", "sh.isaac.api.coordinate.StampFilter", "sh.isaac.api.logic.LogicalExpression", "sh.isaac.model.semantic....
import java.util.List; import java.util.Optional; import sh.isaac.api.Get; import sh.isaac.api.component.semantic.SemanticChronology; import sh.isaac.api.coordinate.LogicCoordinate; import sh.isaac.api.coordinate.PremiseType; import sh.isaac.api.coordinate.StampFilter; import sh.isaac.api.logic.LogicalExpression; impor...
import java.util.*; import sh.isaac.api.*; import sh.isaac.api.component.semantic.*; import sh.isaac.api.coordinate.*; import sh.isaac.api.logic.*; import sh.isaac.model.semantic.version.*;
[ "java.util", "sh.isaac.api", "sh.isaac.model" ]
java.util; sh.isaac.api; sh.isaac.model;
2,414,738
public void addCellListener(CellListener listener) { if (listener != null) myCellListeners.add(listener); }
void function(CellListener listener) { if (listener != null) myCellListeners.add(listener); }
/** * Registers the given <code>CellListener</code>. * @param listener A <code>CellListener</code>. */
Registers the given <code>CellListener</code>
addCellListener
{ "repo_name": "rmage/gnvc-ims", "path": "java/net/sf/jett/transform/ExcelTransformer.java", "license": "lgpl-3.0", "size": 27387 }
[ "net.sf.jett.event.CellListener" ]
import net.sf.jett.event.CellListener;
import net.sf.jett.event.*;
[ "net.sf.jett" ]
net.sf.jett;
1,374,719
public static String encodeForRFC5597(String text) { try { return "utf-8''" + URLEncoder.encode(text, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
static String function(String text) { try { return STR + URLEncoder.encode(text, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
/** * Encode the given text to conform to RFC 5597. * * @param text * @return */
Encode the given text to conform to RFC 5597
encodeForRFC5597
{ "repo_name": "gentics/mesh", "path": "api/src/main/java/com/gentics/mesh/util/EncodeUtil.java", "license": "apache-2.0", "size": 3556 }
[ "java.io.UnsupportedEncodingException", "java.net.URLEncoder" ]
import java.io.UnsupportedEncodingException; import java.net.URLEncoder;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
544,996
protected void doUser(final OutputStream output, final String args) throws IOException { println(output, "230 User logged in, proceed."); }
void function(final OutputStream output, final String args) throws IOException { println(output, STR); }
/** * Sends response to USER control command. * * @param output output to write response * @param args arguments, ignored * @throws IOException socket IO exception */
Sends response to USER control command
doUser
{ "repo_name": "kokorin/Jaffree", "path": "src/main/java/com/github/kokorin/jaffree/net/FtpServer.java", "license": "apache-2.0", "size": 14169 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,519,129
@Override public void onEnable() { messagingLib = this; messageRegistry = new MessageRegistry(); messageManager = new BungeeCordMessageManager(); messageReceiver = new MessageReceiver(); messageRegistry.registerMessage( new IPMessage() ); messageRegistry.register...
void function() { messagingLib = this; messageRegistry = new MessageRegistry(); messageManager = new BungeeCordMessageManager(); messageReceiver = new MessageReceiver(); messageRegistry.registerMessage( new IPMessage() ); messageRegistry.registerMessage( new PlayerCountMessage() ); messageRegistry.registerMessage( new ...
/** * Called when the plugin is enabling. */
Called when the plugin is enabling
onEnable
{ "repo_name": "devtmxx/MessagingLib", "path": "messaging-lib-bungeecord/src/main/java/net/tmxx/messaginglib/MessagingLib.java", "license": "gpl-3.0", "size": 3151 }
[ "net.tmxx.messaginglib.core.message.MessageRegistry", "net.tmxx.messaginglib.core.message.bungeecord.GetServersMessage", "net.tmxx.messaginglib.core.message.bungeecord.IPMessage", "net.tmxx.messaginglib.core.message.bungeecord.PlayerCountMessage", "net.tmxx.messaginglib.receiver.MessageReceiver" ]
import net.tmxx.messaginglib.core.message.MessageRegistry; import net.tmxx.messaginglib.core.message.bungeecord.GetServersMessage; import net.tmxx.messaginglib.core.message.bungeecord.IPMessage; import net.tmxx.messaginglib.core.message.bungeecord.PlayerCountMessage; import net.tmxx.messaginglib.receiver.MessageReceive...
import net.tmxx.messaginglib.core.message.*; import net.tmxx.messaginglib.core.message.bungeecord.*; import net.tmxx.messaginglib.receiver.*;
[ "net.tmxx.messaginglib" ]
net.tmxx.messaginglib;
897,952
protected XmlResourceType getXmlResourceType(CollectionAgent agent, String resourceType) { if (!m_resourceTypeList.containsKey(resourceType)) { ResourceType rt = DataCollectionConfigFactory.getInstance().getConfiguredResourceTypes().get(resourceType); if (rt == null) { ...
XmlResourceType function(CollectionAgent agent, String resourceType) { if (!m_resourceTypeList.containsKey(resourceType)) { ResourceType rt = DataCollectionConfigFactory.getInstance().getConfiguredResourceTypes().get(resourceType); if (rt == null) { log().debug(STR); rt = new ResourceType(); rt.setName(resourceType); r...
/** * Gets the XML resource type. * * @param agent the collection agent * @param resourceType the resource type * @return the XML resource type */
Gets the XML resource type
getXmlResourceType
{ "repo_name": "RangerRick/opennms", "path": "protocols/xml/src/main/java/org/opennms/protocols/xml/collector/AbstractXmlCollectionHandler.java", "license": "gpl-2.0", "size": 15062 }
[ "org.opennms.netmgt.collectd.CollectionAgent", "org.opennms.netmgt.collectd.PersistAllSelectorStrategy", "org.opennms.netmgt.config.DataCollectionConfigFactory", "org.opennms.netmgt.config.datacollection.PersistenceSelectorStrategy", "org.opennms.netmgt.config.datacollection.ResourceType", "org.opennms.ne...
import org.opennms.netmgt.collectd.CollectionAgent; import org.opennms.netmgt.collectd.PersistAllSelectorStrategy; import org.opennms.netmgt.config.DataCollectionConfigFactory; import org.opennms.netmgt.config.datacollection.PersistenceSelectorStrategy; import org.opennms.netmgt.config.datacollection.ResourceType; impo...
import org.opennms.netmgt.collectd.*; import org.opennms.netmgt.config.*; import org.opennms.netmgt.config.datacollection.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
2,680,473
public static String toString(Readable r) throws IOException { return toStringBuilder(r).toString(); }
static String function(Readable r) throws IOException { return toStringBuilder(r).toString(); }
/** * Reads all characters from a {@link Readable} object into a {@link String}. * Does not close the {@code Readable}. * * @param r the object to read from * @return a string containing all the characters * @throws IOException if an I/O error occurs */
Reads all characters from a <code>Readable</code> object into a <code>String</code>. Does not close the Readable
toString
{ "repo_name": "maxvetrenko/guava-libraries-17-0", "path": "guava/src/com/google/common/io/CharStreams.java", "license": "apache-2.0", "size": 19794 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,097,253
private void configureComponentsBeforeBuilding(final AnalysisJobBuilder jobBuilder, final int partitionNumber) { // update datastores and resource properties to point to node-specific // targets if possible. This way parallel writing to files on HDFS does // not cause any inconsistencies bec...
void function(final AnalysisJobBuilder jobBuilder, final int partitionNumber) { for (final ComponentBuilder cb : jobBuilder.getComponentBuilders()) { final Set<ConfiguredPropertyDescriptor> targetDatastoreProperties = cb.getDescriptor().getConfiguredPropertiesByType(UpdateableDatastore.class, false); for (final Configu...
/** * Applies any partition-specific configuration to the job builder before * building it. * * @param jobBuilder * @param partitionNumber */
Applies any partition-specific configuration to the job builder before building it
configureComponentsBeforeBuilding
{ "repo_name": "datacleaner/DataCleaner", "path": "engine/env/spark/src/main/java/org/datacleaner/spark/functions/RowProcessingFunction.java", "license": "lgpl-3.0", "size": 14661 }
[ "java.util.List", "java.util.Set", "org.apache.metamodel.util.Resource", "org.datacleaner.connection.ResourceDatastore", "org.datacleaner.connection.UpdateableDatastore", "org.datacleaner.descriptors.ConfiguredPropertyDescriptor", "org.datacleaner.extension.output.CreateCsvFileAnalyzer", "org.dataclea...
import java.util.List; import java.util.Set; import org.apache.metamodel.util.Resource; import org.datacleaner.connection.ResourceDatastore; import org.datacleaner.connection.UpdateableDatastore; import org.datacleaner.descriptors.ConfiguredPropertyDescriptor; import org.datacleaner.extension.output.CreateCsvFileAnalyz...
import java.util.*; import org.apache.metamodel.util.*; import org.datacleaner.connection.*; import org.datacleaner.descriptors.*; import org.datacleaner.extension.output.*; import org.datacleaner.job.builder.*;
[ "java.util", "org.apache.metamodel", "org.datacleaner.connection", "org.datacleaner.descriptors", "org.datacleaner.extension", "org.datacleaner.job" ]
java.util; org.apache.metamodel; org.datacleaner.connection; org.datacleaner.descriptors; org.datacleaner.extension; org.datacleaner.job;
771,332
public void removeAll2(final Collection<?> outCollection) { synchronized (models) { models.removeAll(outCollection); } } /** * Quits this queue after it sleeps for the {@link #modelSaveCheckTime}
void function(final Collection<?> outCollection) { synchronized (models) { models.removeAll(outCollection); } } /** * Quits this queue after it sleeps for the {@link #modelSaveCheckTime}
/** * Removes a {@link java.util.Collection} of DB objects from this queue * before it is processed. */
Removes a <code>java.util.Collection</code> of DB objects from this queue before it is processed
removeAll2
{ "repo_name": "mickele/DBFlow", "path": "dbflow/src/main/java/com/raizlabs/android/dbflow/runtime/DBBatchSaveQueue.java", "license": "mit", "size": 7740 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
589,550
public Location getFrom() { return this.from; }
Location function() { return this.from; }
/** * Get the from location * * @return Location */
Get the from location
getFrom
{ "repo_name": "Mayomi/PlotSquared-Chinese", "path": "src/main/java/com/intellectualcrafters/plot/events/PlayerTeleportToPlotEvent.java", "license": "gpl-3.0", "size": 3725 }
[ "com.intellectualcrafters.plot.object.Location" ]
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
1,977,173
List<String> listTaskIdsForSelectedItems( List<SelectedItem> selectedItems, TaskTimestamp timestamp) throws NotAuthorizedException, InvalidArgumentException;
List<String> listTaskIdsForSelectedItems( List<SelectedItem> selectedItems, TaskTimestamp timestamp) throws NotAuthorizedException, InvalidArgumentException;
/** * Returns a list of all taskIds of the report that are in the list of selected items. * * @param selectedItems a list of selectedItems * @param timestamp the task timestamp of interest * @return the list of all taskIds * @throws InvalidArgumentException if the column headers are not initialized ...
Returns a list of all taskIds of the report that are in the list of selected items
listTaskIdsForSelectedItems
{ "repo_name": "Taskana/taskana", "path": "lib/taskana-core/src/main/java/pro/taskana/monitor/api/reports/TimeIntervalReportBuilder.java", "license": "apache-2.0", "size": 7084 }
[ "java.util.List", "pro.taskana.common.api.exceptions.InvalidArgumentException", "pro.taskana.common.api.exceptions.NotAuthorizedException", "pro.taskana.monitor.api.SelectedItem", "pro.taskana.monitor.api.TaskTimestamp" ]
import java.util.List; import pro.taskana.common.api.exceptions.InvalidArgumentException; import pro.taskana.common.api.exceptions.NotAuthorizedException; import pro.taskana.monitor.api.SelectedItem; import pro.taskana.monitor.api.TaskTimestamp;
import java.util.*; import pro.taskana.common.api.exceptions.*; import pro.taskana.monitor.api.*;
[ "java.util", "pro.taskana.common", "pro.taskana.monitor" ]
java.util; pro.taskana.common; pro.taskana.monitor;
2,767,094
@Test() public void testObjectClassNotAllowed() { final SchemaValidator schemaValidator = new SchemaValidator(); assertEquals(schemaValidator.getAllowedSchemaElementTypes(), EnumSet.allOf(SchemaElementType.class)); final Set<SchemaElementType> allowedElementTypes = EnumSet.allOf(Sch...
@Test() void function() { final SchemaValidator schemaValidator = new SchemaValidator(); assertEquals(schemaValidator.getAllowedSchemaElementTypes(), EnumSet.allOf(SchemaElementType.class)); final Set<SchemaElementType> allowedElementTypes = EnumSet.allOf(SchemaElementType.class); allowedElementTypes.remove(SchemaEleme...
/** * Tests the behavior for a schema entry that has object class definitions * when they are not allowed. */
Tests the behavior for a schema entry that has object class definitions when they are not allowed
testObjectClassNotAllowed
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/schema/SchemaValidatorTestCase.java", "license": "gpl-2.0", "size": 262381 }
[ "java.util.ArrayList", "java.util.EnumSet", "java.util.List", "java.util.Set", "org.testng.annotations.Test" ]
import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import java.util.Set; import org.testng.annotations.Test;
import java.util.*; import org.testng.annotations.*;
[ "java.util", "org.testng.annotations" ]
java.util; org.testng.annotations;
932,304
public ExtensionDependenciesPane openDependenciesSection() { WebElement section = clickTab("Dependencies"); return section != null ? new ExtensionDependenciesPane(section) : null; }
ExtensionDependenciesPane function() { WebElement section = clickTab(STR); return section != null ? new ExtensionDependenciesPane(section) : null; }
/** * Selects the extension dependencies tab. * * @return the extension dependencies section */
Selects the extension dependencies tab
openDependenciesSection
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-test/xwiki-platform-extension-test-pageobjects/src/main/java/org/xwiki/extension/test/po/ExtensionPane.java", "license": "lgpl-2.1", "size": 14780 }
[ "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,341,949
public void removeAppService(AuthzSubject caller, Integer appId, Integer appServiceId) throws ApplicationException, ApplicationNotFoundException, PermissionException;
void function(AuthzSubject caller, Integer appId, Integer appServiceId) throws ApplicationException, ApplicationNotFoundException, PermissionException;
/** * Remove an application service. * @param caller - Valid spider subject of caller. * @param appId - The application identifier. * @param appServiceId - The service identifier * @throws ApplicationException when unable to perform remove * @throws ApplicationNotFoundException - when the ...
Remove an application service
removeAppService
{ "repo_name": "cc14514/hq6", "path": "hq-server/src/main/java/org/hyperic/hq/appdef/shared/ApplicationManager.java", "license": "unlicense", "size": 8029 }
[ "org.hyperic.hq.authz.server.session.AuthzSubject", "org.hyperic.hq.authz.shared.PermissionException", "org.hyperic.hq.common.ApplicationException" ]
import org.hyperic.hq.authz.server.session.AuthzSubject; import org.hyperic.hq.authz.shared.PermissionException; import org.hyperic.hq.common.ApplicationException;
import org.hyperic.hq.authz.server.session.*; import org.hyperic.hq.authz.shared.*; import org.hyperic.hq.common.*;
[ "org.hyperic.hq" ]
org.hyperic.hq;
2,586,696
public double getAverageRating() { double sum = 0; Collection<Rating> ratings = getRatings().values(); for (Rating rating : ratings) { sum += rating.getAverageRating(); } return (sum / ratings.size()); }
double function() { double sum = 0; Collection<Rating> ratings = getRatings().values(); for (Rating rating : ratings) { sum += rating.getAverageRating(); } return (sum / ratings.size()); }
/** * Get the average rating of the plot * @return average rating as double */
Get the average rating of the plot
getAverageRating
{ "repo_name": "PiLogic/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/object/Plot.java", "license": "gpl-3.0", "size": 28745 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,797,853
private int[] readArr(Scanner scr) { String line = scr.nextLine().trim(); String[] data = line.split(" "); int[] ret = new int[data.length]; for (int i = 0; i < ret.length; i++) { ret[i] = Integer.parseInt(data[i]); } return ret; }
int[] function(Scanner scr) { String line = scr.nextLine().trim(); String[] data = line.split(" "); int[] ret = new int[data.length]; for (int i = 0; i < ret.length; i++) { ret[i] = Integer.parseInt(data[i]); } return ret; }
/** * Read in an int array of coefficients * * @param scr - Scanner to read form * @return */
Read in an int array of coefficients
readArr
{ "repo_name": "midkiffj/knapsacks", "path": "src/Problems/Unconstrained.java", "license": "gpl-3.0", "size": 7789 }
[ "java.util.Scanner" ]
import java.util.Scanner;
import java.util.*;
[ "java.util" ]
java.util;
1,734,144
static ImmutableList<String> parseRequirecssAttr(@Nullable String requirecssAttr, SourceLocation srcLoc) { if (requirecssAttr == null) { return ImmutableList.of(); } String[] namespaces = requirecssAttr.trim().split("\\s*,\\s*"); for (String namespace : namespaces) { if (!BaseUtils...
static ImmutableList<String> parseRequirecssAttr(@Nullable String requirecssAttr, SourceLocation srcLoc) { if (requirecssAttr == null) { return ImmutableList.of(); } String[] namespaces = requirecssAttr.trim().split(STR); for (String namespace : namespaces) { if (!BaseUtils.isDottedIdentifier(namespace)) { throw Legacy...
/** * Parses a 'requirecss' attribute value (for a Soy file or a template). * * @param requirecssAttr The 'requirecss' attribute value to parse. * @return A list of required CSS namespaces parsed from the given attribute value. */
Parses a 'requirecss' attribute value (for a Soy file or a template)
parseRequirecssAttr
{ "repo_name": "nathancomstock/closure-templates", "path": "java/src/com/google/template/soy/soytree/RequirecssUtils.java", "license": "apache-2.0", "size": 1918 }
[ "com.google.common.collect.ImmutableList", "com.google.template.soy.base.SourceLocation", "com.google.template.soy.base.internal.BaseUtils", "com.google.template.soy.base.internal.LegacyInternalSyntaxException", "javax.annotation.Nullable" ]
import com.google.common.collect.ImmutableList; import com.google.template.soy.base.SourceLocation; import com.google.template.soy.base.internal.BaseUtils; import com.google.template.soy.base.internal.LegacyInternalSyntaxException; import javax.annotation.Nullable;
import com.google.common.collect.*; import com.google.template.soy.base.*; import com.google.template.soy.base.internal.*; import javax.annotation.*;
[ "com.google.common", "com.google.template", "javax.annotation" ]
com.google.common; com.google.template; javax.annotation;
251,303
public okhttp3.Call listNamespacedHorizontalPodAutoscalerAsync( String namespace, String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, In...
okhttp3.Call function( String namespace, String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Integer timeoutSeconds, Boolean watch, final ApiCallback<V2HorizontalPodAutoscalerList> _callback) throws...
/** * (asynchronously) list or watch objects of kind HorizontalPodAutoscaler * * @param namespace object name and auth scope, such as for teams and projects (required) * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional) * @param allowWatchBookmarks allowWatchBookmarks request...
(asynchronously) list or watch objects of kind HorizontalPodAutoscaler
listNamespacedHorizontalPodAutoscalerAsync
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/AutoscalingV2Api.java", "license": "apache-2.0", "size": 203946 }
[ "com.google.gson.reflect.TypeToken", "io.kubernetes.client.openapi.ApiCallback", "io.kubernetes.client.openapi.ApiException", "io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerList", "java.lang.reflect.Type" ]
import com.google.gson.reflect.TypeToken; import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.models.V2HorizontalPodAutoscalerList; import java.lang.reflect.Type;
import com.google.gson.reflect.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.lang.reflect.*;
[ "com.google.gson", "io.kubernetes.client", "java.lang" ]
com.google.gson; io.kubernetes.client; java.lang;
403,502
@Override public boolean isValid(AnnotatedTypeMirror type, Tree tree) { AnnotationMirror classVal = type.getAnnotation(ClassVal.class); classVal = classVal == null ? type.getAnnotation(ClassBound.class) : classVal; if (classVal != null) { List<String> classNam...
boolean function(AnnotatedTypeMirror type, Tree tree) { AnnotationMirror classVal = type.getAnnotation(ClassVal.class); classVal = classVal == null ? type.getAnnotation(ClassBound.class) : classVal; if (classVal != null) { List<String> classNames = getClassNamesFromAnnotation(classVal); for (String className : classNam...
/** * Reports an "illegal.classname" error if the type contains a classVal * annotation with classNames that cannot possibly be valid class * annotations. */
Reports an "illegal.classname" error if the type contains a classVal annotation with classNames that cannot possibly be valid class annotations
isValid
{ "repo_name": "biddyweb/checker-framework", "path": "framework/src/org/checkerframework/common/reflection/ClassValVisitor.java", "license": "gpl-2.0", "size": 3892 }
[ "com.sun.source.tree.Tree", "java.util.List", "javax.lang.model.element.AnnotationMirror", "org.checkerframework.common.reflection.ClassValAnnotatedTypeFactory", "org.checkerframework.common.reflection.qual.ClassBound", "org.checkerframework.common.reflection.qual.ClassVal", "org.checkerframework.framew...
import com.sun.source.tree.Tree; import java.util.List; import javax.lang.model.element.AnnotationMirror; import org.checkerframework.common.reflection.ClassValAnnotatedTypeFactory; import org.checkerframework.common.reflection.qual.ClassBound; import org.checkerframework.common.reflection.qual.ClassVal; import org.che...
import com.sun.source.tree.*; import java.util.*; import javax.lang.model.element.*; import org.checkerframework.common.reflection.*; import org.checkerframework.common.reflection.qual.*; import org.checkerframework.framework.source.*; import org.checkerframework.framework.type.*;
[ "com.sun.source", "java.util", "javax.lang", "org.checkerframework.common", "org.checkerframework.framework" ]
com.sun.source; java.util; javax.lang; org.checkerframework.common; org.checkerframework.framework;
1,912,351
List<TeamModel> getAllTeams();
List<TeamModel> getAllTeams();
/** * Returns the list of all teams available to the login service. * * @return list of all teams * @since 0.8.0 */
Returns the list of all teams available to the login service
getAllTeams
{ "repo_name": "heavenlyhash/gitblit", "path": "src/main/java/com/gitblit/IUserService.java", "license": "apache-2.0", "size": 7855 }
[ "com.gitblit.models.TeamModel", "java.util.List" ]
import com.gitblit.models.TeamModel; import java.util.List;
import com.gitblit.models.*; import java.util.*;
[ "com.gitblit.models", "java.util" ]
com.gitblit.models; java.util;
1,140,237
Logger getLogger();
Logger getLogger();
/** * Returns the logger for this script. You can use this in your script to write log messages. * * @return The logger. Never returns null. */
Returns the logger for this script. You can use this in your script to write log messages
getLogger
{ "repo_name": "tkmnet/RCRS-ADF", "path": "gradle/gradle-2.1/src/core/org/gradle/api/Script.java", "license": "bsd-2-clause", "size": 14585 }
[ "org.gradle.api.logging.Logger" ]
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.*;
[ "org.gradle.api" ]
org.gradle.api;
2,337,066
@Generated @Selector("topic") public native String topic();
@Selector("topic") native String function();
/** * Topic associated with this context. * <p> * See above for valid, predefined topics. */
Topic associated with this context. See above for valid, predefined topics
topic
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/classkit/CLSContext.java", "license": "apache-2.0", "size": 22699 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,466,452
@Test public void checkCopying() { // Local declarations LWReactor object; LWReactor copyObject = new LWReactor(0), clonedObject; int size = 5; // Setup root object object = new LWReactor(size); // Run the copy routine copyObject = new LWReactor(0); copyObject.copy(object); // Check content...
void function() { LWReactor object; LWReactor copyObject = new LWReactor(0), clonedObject; int size = 5; object = new LWReactor(size); copyObject = new LWReactor(0); copyObject.copy(object); assertTrue(object.equals(copyObject)); clonedObject = (LWReactor) object.clone(); assertTrue(object.equals(clonedObject)); copyOb...
/** * <p> * This operation checks the copy and clone routines. * </p> * */
This operation checks the copy and clone routines.
checkCopying
{ "repo_name": "SmithRWORNL/ice", "path": "tests/org.eclipse.ice.reactor.test/src/org/eclipse/ice/reactor/test/LWReactorTester.java", "license": "epl-1.0", "size": 16145 }
[ "org.eclipse.ice.reactor.LWReactor", "org.junit.Assert" ]
import org.eclipse.ice.reactor.LWReactor; import org.junit.Assert;
import org.eclipse.ice.reactor.*; import org.junit.*;
[ "org.eclipse.ice", "org.junit" ]
org.eclipse.ice; org.junit;
2,537,868
private JsonNode json(Collection<BgpSession> bgpSessions) { ObjectMapper mapper = new ObjectMapper(); ArrayNode result = mapper.createArrayNode(); for (BgpSession bgpSession : bgpSessions) { result.add(json(mapper, bgpSession)); } return result; }
JsonNode function(Collection<BgpSession> bgpSessions) { ObjectMapper mapper = new ObjectMapper(); ArrayNode result = mapper.createArrayNode(); for (BgpSession bgpSession : bgpSessions) { result.add(json(mapper, bgpSession)); } return result; }
/** * Produces a JSON array of BGP neighbors. * * @param bgpSessions the BGP sessions with the data * @return JSON array with the neighbors */
Produces a JSON array of BGP neighbors
json
{ "repo_name": "sdnwiselab/onos", "path": "apps/routing/common/src/main/java/org/onosproject/routing/cli/BgpNeighborsListCommand.java", "license": "apache-2.0", "size": 7864 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.databind.node.ArrayNode", "java.util.Collection", "org.onosproject.routing.bgp.BgpSession" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import java.util.Collection; import org.onosproject.routing.bgp.BgpSession;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import java.util.*; import org.onosproject.routing.bgp.*;
[ "com.fasterxml.jackson", "java.util", "org.onosproject.routing" ]
com.fasterxml.jackson; java.util; org.onosproject.routing;
1,881,609
public static Matchable asMatchable(Object toCoerce){ return As.asMatchable(toCoerce); } /** * Create a duck typed Monad wrapper. Using AnyM we focus only on the underlying type * e.g. instead of * <pre> * {@code * Monad<Stream<Integer>,Integer> stream; * * we can write * * AnyM<Inte...
static Matchable function(Object toCoerce){ return As.asMatchable(toCoerce); } /** * Create a duck typed Monad wrapper. Using AnyM we focus only on the underlying type * e.g. instead of * <pre> * {@code * Monad<Stream<Integer>,Integer> stream; * * we can write * * AnyM<Integer> stream; * }</pre> * * The wrapped Monaad ...
/** * Coerce / wrap an Object as a Matchable instance * This adds match / _match methods for pattern matching against the object * * @param toCoerce Object to convert into a Matchable * @return Matchable that adds functionality to the supplied object */
Coerce / wrap an Object as a Matchable instance This adds match / _match methods for pattern matching against the object
asMatchable
{ "repo_name": "sjfloat/cyclops", "path": "cyclops-core/src/main/java/com/aol/cyclops/core/Core.java", "license": "mit", "size": 29907 }
[ "com.aol.cyclops.dynamic.As", "com.aol.cyclops.lambda.monads.AnyM", "com.aol.cyclops.matcher.Matchable", "java.util.stream.Stream" ]
import com.aol.cyclops.dynamic.As; import com.aol.cyclops.lambda.monads.AnyM; import com.aol.cyclops.matcher.Matchable; import java.util.stream.Stream;
import com.aol.cyclops.dynamic.*; import com.aol.cyclops.lambda.monads.*; import com.aol.cyclops.matcher.*; import java.util.stream.*;
[ "com.aol.cyclops", "java.util" ]
com.aol.cyclops; java.util;
1,383,412
public void assertHasSize(AssertionInfo info, char[] actual, int expectedSize) { arrays.assertHasSize(info, failures, actual, expectedSize); }
void function(AssertionInfo info, char[] actual, int expectedSize) { arrays.assertHasSize(info, failures, actual, expectedSize); }
/** * Asserts that the number of elements in the given array is equal to the expected one. * * @param info contains information about the assertion. * @param actual the given array. * @param expectedSize the expected size of {@code actual}. * @throws AssertionError if the given array is {@code null}....
Asserts that the number of elements in the given array is equal to the expected one
assertHasSize
{ "repo_name": "ChrisCanCompute/assertj-core", "path": "src/main/java/org/assertj/core/internal/CharArrays.java", "license": "apache-2.0", "size": 14759 }
[ "org.assertj.core.api.AssertionInfo" ]
import org.assertj.core.api.AssertionInfo;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
127,390
@GameProperty(xmlProperty = true, gameProperty = true, adds = true) public void setDefenseRollsBonus(final String value) throws GameParseException { final String[] s = value.split(":"); if (s.length <= 0 || s.length > 2) throw new GameParseException("defenseRollsBonus can not be empty or have more than two ...
@GameProperty(xmlProperty = true, gameProperty = true, adds = true) void function(final String value) throws GameParseException { final String[] s = value.split(":"); if (s.length <= 0 s.length > 2) throw new GameParseException(STR + thisErrorMsg()); String unitType; unitType = s[1]; final UnitType ut = getData().getUn...
/** * Adds to, not sets. Anything that adds to instead of setting needs a clear function as well. */
Adds to, not sets. Anything that adds to instead of setting needs a clear function as well
setDefenseRollsBonus
{ "repo_name": "tea-dragon/triplea", "path": "src/main/java/games/strategy/triplea/attatchments/TechAbilityAttachment.java", "license": "gpl-2.0", "size": 50555 }
[ "games.strategy.engine.data.GameParseException", "games.strategy.engine.data.UnitType", "games.strategy.engine.data.annotations.GameProperty" ]
import games.strategy.engine.data.GameParseException; import games.strategy.engine.data.UnitType; import games.strategy.engine.data.annotations.GameProperty;
import games.strategy.engine.data.*; import games.strategy.engine.data.annotations.*;
[ "games.strategy.engine" ]
games.strategy.engine;
437,087
private AbstractTypeDeclaration getContainingTypeDeclarationNode() throws JavaModelException { AbstractTypeDeclaration result= (AbstractTypeDeclaration) ASTNodes.getParent(getSelectedExpression().getAssociatedNode(), AbstractTypeDeclaration.class); Assert.isNotNull(result); return result; }
AbstractTypeDeclaration function() throws JavaModelException { AbstractTypeDeclaration result= (AbstractTypeDeclaration) ASTNodes.getParent(getSelectedExpression().getAssociatedNode(), AbstractTypeDeclaration.class); Assert.isNotNull(result); return result; }
/** * Returns the type to which the new constant will be added to. It is the first non-anonymous parent. * @return the type to add the new constant to * * @throws JavaModelException shouldn't happen */
Returns the type to which the new constant will be added to. It is the first non-anonymous parent
getContainingTypeDeclarationNode
{ "repo_name": "brunyuriy/quick-fix-scout", "path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java", "license": "mit", "size": 39260 }
[ "org.eclipse.core.runtime.Assert", "org.eclipse.jdt.core.JavaModelException", "org.eclipse.jdt.core.dom.AbstractTypeDeclaration", "org.eclipse.jdt.internal.corext.dom.ASTNodes" ]
import org.eclipse.core.runtime.Assert; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.dom.AbstractTypeDeclaration; import org.eclipse.jdt.internal.corext.dom.ASTNodes;
import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.corext.dom.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
340,149
private int getSecMecValue(String s) { int secmec = INVALID_OR_NOTSET_SECURITYMECHANISM; if( StringUtil.SQLEqualsIgnoreCase(s,"USER_ONLY_SECURITY")) secmec = CodePoint.SECMEC_USRIDONL; else if( StringUtil.SQLEqualsIgnoreCase(s,"CLEAR_TEXT_PASSWORD_SECURITY")) ...
int function(String s) { int secmec = INVALID_OR_NOTSET_SECURITYMECHANISM; if( StringUtil.SQLEqualsIgnoreCase(s,STR)) secmec = CodePoint.SECMEC_USRIDONL; else if( StringUtil.SQLEqualsIgnoreCase(s,STR)) secmec = CodePoint.SECMEC_USRIDPWD; else if( StringUtil.SQLEqualsIgnoreCase(s,STR)) secmec = CodePoint.SECMEC_EUSRIDPW...
/** * Retrieve the SECMEC integer value from the * user friendly security mechanism name * @param s security mechanism name * @return integer value , return the SECMEC value for * the security mechanism as defined by DRDA spec * or INVALID_OR_NOTSET_SECURITYMECHANISM if 's' * passed...
Retrieve the SECMEC integer value from the user friendly security mechanism name
getSecMecValue
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/drda/java/com/pivotal/gemfirexd/internal/impl/drda/NetworkServerControlImpl.java", "license": "apache-2.0", "size": 138180 }
[ "com.pivotal.gemfirexd.internal.iapi.util.StringUtil" ]
import com.pivotal.gemfirexd.internal.iapi.util.StringUtil;
import com.pivotal.gemfirexd.internal.iapi.util.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
2,514,767
boolean startEnableIntent(AppCompatActivity activity, int requestCode);
boolean startEnableIntent(AppCompatActivity activity, int requestCode);
/** * Presents the user if the settings screen to enable the provider's protocol. When this is done, * 'activity' will have called * * @param activity The {@link AppCompatActivity} currently being displayed to the user * @param requestCode An arbitrary code that will be given to * * ...
Presents the user if the settings screen to enable the provider's protocol. When this is done, 'activity' will have called
startEnableIntent
{ "repo_name": "gerhardol/runnerup", "path": "hrdevice/src/org/runnerup/hr/HRProvider.java", "license": "gpl-3.0", "size": 5381 }
[ "androidx.appcompat.app.AppCompatActivity" ]
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.*;
[ "androidx.appcompat" ]
androidx.appcompat;
1,794,301
return stats.stream().filter(s -> isAssocType(s.getType()) && isAssocParams(s.getParameters(), assocs)) .collect(Collectors.toList()); }
return stats.stream().filter(s -> isAssocType(s.getType()) && isAssocParams(s.getParameters(), assocs)) .collect(Collectors.toList()); }
/** * Returns the {@link Statement}s defined on {@link LineAssociation}s. * * @param stats * the {@link Statement}s to check. * @param assocs * the {@link LineAssociation}s to check. * @return the {@link Statement}s defined on {@link LineAssociation}s. */
Returns the <code>Statement</code>s defined on <code>LineAssociation</code>s
splitAssocs
{ "repo_name": "ELTE-Soft/txtUML", "path": "dev/plugins/hu.elte.txtuml.layout.visualizer/src/hu/elte/txtuml/layout/visualizer/helpers/StatementHelper.java", "license": "epl-1.0", "size": 11938 }
[ "java.util.stream.Collectors" ]
import java.util.stream.Collectors;
import java.util.stream.*;
[ "java.util" ]
java.util;
272,720
public List<Observation> getAll(String activityId) { Log.i(TAG, activityId); List<Observation> observationsList = new ArrayList<Observation>(); try { // Query the Database to get all the records. Cursor c = db.query( EntityTable.ObservationsT...
List<Observation> function(String activityId) { Log.i(TAG, activityId); List<Observation> observationsList = new ArrayList<Observation>(); try { Cursor c = db.query( EntityTable.ObservationsTable.TABLENAME, observationEntryArray, EntityTable.ObservationsTable.COLUMN_FK_ACTIVITY_ID + "=?", new String[]{activityId}, null...
/** * Returns all the {@link Observation} for the ActivityId passed * * @return */
Returns all the <code>Observation</code> for the ActivityId passed
getAll
{ "repo_name": "pmk2429/investickation", "path": "app/src/main/java/com/sfsu/db/ObservationsDao.java", "license": "apache-2.0", "size": 12521 }
[ "android.database.Cursor", "android.database.sqlite.SQLiteException", "android.support.v7.appcompat.BuildConfig", "android.util.Log", "com.sfsu.entities.Observation", "java.util.ArrayList", "java.util.List" ]
import android.database.Cursor; import android.database.sqlite.SQLiteException; import android.support.v7.appcompat.BuildConfig; import android.util.Log; import com.sfsu.entities.Observation; import java.util.ArrayList; import java.util.List;
import android.database.*; import android.database.sqlite.*; import android.support.v7.appcompat.*; import android.util.*; import com.sfsu.entities.*; import java.util.*;
[ "android.database", "android.support", "android.util", "com.sfsu.entities", "java.util" ]
android.database; android.support; android.util; com.sfsu.entities; java.util;
1,297,590
public static NodesSpecification nonDedicated(int count, ConfigModelContext context) { return new NodesSpecification(new ClusterResources(count, 1, NodeResources.unspecified()), new ClusterResources(count, 1, NodeResources.unspecified()), ...
static NodesSpecification function(int count, ConfigModelContext context) { return new NodesSpecification(new ClusterResources(count, 1, NodeResources.unspecified()), new ClusterResources(count, 1, NodeResources.unspecified()), false, context.getDeployState().getWantedNodeVespaVersion(), false, ! context.getDeployState...
/** * Returns a requirement from <code>count</code> non-dedicated nodes in one group */
Returns a requirement from <code>count</code> non-dedicated nodes in one group
nonDedicated
{ "repo_name": "vespa-engine/vespa", "path": "config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java", "license": "apache-2.0", "size": 23813 }
[ "com.yahoo.config.model.ConfigModelContext", "com.yahoo.config.provision.ClusterResources", "com.yahoo.config.provision.NodeResources", "java.util.Optional" ]
import com.yahoo.config.model.ConfigModelContext; import com.yahoo.config.provision.ClusterResources; import com.yahoo.config.provision.NodeResources; import java.util.Optional;
import com.yahoo.config.model.*; import com.yahoo.config.provision.*; import java.util.*;
[ "com.yahoo.config", "java.util" ]
com.yahoo.config; java.util;
3,680
public void setAnnotationTypeColor(Object annotationType, Color color) { if (color != null) fAnnotationType2Color.put(annotationType, color); else fAnnotationType2Color.remove(annotationType); fCachedAnnotationType2Color.clear(); } /** * Adds the given annotation type to the list of annotation types...
void function(Object annotationType, Color color) { if (color != null) fAnnotationType2Color.put(annotationType, color); else fAnnotationType2Color.remove(annotationType); fCachedAnnotationType2Color.clear(); } /** * Adds the given annotation type to the list of annotation types whose annotations should be * painted by...
/** * Sets the color in which the squiggly for the given annotation type should be drawn. * * @param annotationType the annotation type * @param color the color */
Sets the color in which the squiggly for the given annotation type should be drawn
setAnnotationTypeColor
{ "repo_name": "brunyuriy/quick-fix-scout", "path": "org.eclipse.jface.text_3.8.1.v20120828-155502/src/org/eclipse/jface/text/source/AnnotationPainter.java", "license": "mit", "size": 54312 }
[ "org.eclipse.swt.graphics.Color" ]
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,338,134
public static <S, T> Aggregate<S, Map<String, T>> select( ImmutableSet<NamedAggregate<? super S, ? extends T>> aggregates ) { return new SelectAggregate<>(aggregates); }
static <S, T> Aggregate<S, Map<String, T>> function( ImmutableSet<NamedAggregate<? super S, ? extends T>> aggregates ) { return new SelectAggregate<>(aggregates); }
/** * An aggregate that combines several aggregates together into a map (where keys are the names of the aggregates) * @param <S> the type of the {@link Match} results * @param <T> the type of the aggregate results */
An aggregate that combines several aggregates together into a map (where keys are the names of the aggregates)
select
{ "repo_name": "pluraliseseverythings/grakn", "path": "grakn-graql/src/main/java/ai/grakn/graql/internal/query/aggregate/Aggregates.java", "license": "gpl-3.0", "size": 4158 }
[ "ai.grakn.graql.Aggregate", "ai.grakn.graql.NamedAggregate", "com.google.common.collect.ImmutableSet", "java.util.Map" ]
import ai.grakn.graql.Aggregate; import ai.grakn.graql.NamedAggregate; import com.google.common.collect.ImmutableSet; import java.util.Map;
import ai.grakn.graql.*; import com.google.common.collect.*; import java.util.*;
[ "ai.grakn.graql", "com.google.common", "java.util" ]
ai.grakn.graql; com.google.common; java.util;
224,071
public List<String> getFriendUsernames() { return friends; }
List<String> function() { return friends; }
/** * Gets the {@link List} of this player's friends. * * @return The list. */
Gets the <code>List</code> of this player's friends
getFriendUsernames
{ "repo_name": "Major-/apollo", "path": "game/src/main/org/apollo/game/model/entity/Player.java", "license": "isc", "size": 24470 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,986,308
private String getPhoneType(int type) { String stringType; switch (type) { case ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM: stringType = "custom"; break; case ContactsContract.CommonDataKinds.Phone.TYPE_FAX_HOME: stringType = "home fax"; ...
String function(int type) { String stringType; switch (type) { case ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM: stringType = STR; break; case ContactsContract.CommonDataKinds.Phone.TYPE_FAX_HOME: stringType = STR; break; case ContactsContract.CommonDataKinds.Phone.TYPE_FAX_WORK: stringType = STR; break; case Co...
/** * getPhoneType converts an Android phone type into a string * @param type * @return phone type as string. */
getPhoneType converts an Android phone type into a string
getPhoneType
{ "repo_name": "evernym/cordova-plugin-contacts", "path": "src/android/ContactAccessorSdk5.java", "license": "apache-2.0", "size": 109550 }
[ "android.provider.ContactsContract" ]
import android.provider.ContactsContract;
import android.provider.*;
[ "android.provider" ]
android.provider;
487,737
public static long fieldOffset(Class<?> cls, String fieldName) { try { return objectFieldOffset(cls.getDeclaredField(fieldName)); } catch (NoSuchFieldException e) { throw new IllegalStateException(e); } }
static long function(Class<?> cls, String fieldName) { try { return objectFieldOffset(cls.getDeclaredField(fieldName)); } catch (NoSuchFieldException e) { throw new IllegalStateException(e); } }
/** * Gets object field offset. * * @param cls Object class. * @param fieldName Field name. * @return Field offset. */
Gets object field offset
fieldOffset
{ "repo_name": "SomeFire/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 374177 }
[ "org.apache.ignite.internal.util.GridUnsafe" ]
import org.apache.ignite.internal.util.GridUnsafe;
import org.apache.ignite.internal.util.*;
[ "org.apache.ignite" ]
org.apache.ignite;
211,435
PackageContextType loadPackage(PackageNameQualified p) throws JPRAModelLoadingException;
PackageContextType loadPackage(PackageNameQualified p) throws JPRAModelLoadingException;
/** * Load and return a package into the context. * * @param p The name of the package * * @return The loaded package * * @throws JPRAModelLoadingException Iff the package cannot be loaded */
Load and return a package into the context
loadPackage
{ "repo_name": "io7m/jpra", "path": "com.io7m.jpra.model/src/main/java/com/io7m/jpra/model/contexts/GlobalContextType.java", "license": "isc", "size": 2254 }
[ "com.io7m.jpra.model.loading.JPRAModelLoadingException", "com.io7m.jpra.model.names.PackageNameQualified" ]
import com.io7m.jpra.model.loading.JPRAModelLoadingException; import com.io7m.jpra.model.names.PackageNameQualified;
import com.io7m.jpra.model.loading.*; import com.io7m.jpra.model.names.*;
[ "com.io7m.jpra" ]
com.io7m.jpra;
2,799,741
@Override public void onClose() { sttListener.sttEventReceived(new RecognitionStopEvent()); }
void function() { sttListener.sttEventReceived(new RecognitionStopEvent()); }
/** * Called when the WebSocket is closed */
Called when the WebSocket is closed
onClose
{ "repo_name": "actong/openhab2", "path": "addons/voice/org.openhab.voice.kaldi/src/main/java/org/openhab/voice/kaldi/internal/RecognitionEventListenerKaldi.java", "license": "epl-1.0", "size": 4576 }
[ "org.eclipse.smarthome.core.voice.RecognitionStopEvent" ]
import org.eclipse.smarthome.core.voice.RecognitionStopEvent;
import org.eclipse.smarthome.core.voice.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
2,260,729
public Optional<Integer> getMaxQueueLength() { return m_maxQueueLength; }
Optional<Integer> function() { return m_maxQueueLength; }
/** * Returns the maximum queue length.<p> * * @return the maximum queue length */
Returns the maximum queue length
getMaxQueueLength
{ "repo_name": "victos/opencms-core", "path": "src/org/opencms/ugc/CmsUgcConfiguration.java", "license": "lgpl-2.1", "size": 9029 }
[ "com.google.common.base.Optional" ]
import com.google.common.base.Optional;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,322,108
public static Date dateFromNumbers(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); // Month - 1 is used to get the // correct month. return calendar.getTime(); }
static Date function(int year, int month, int day) { Calendar calendar = Calendar.getInstance(); calendar.set(year, month - 1, day); return calendar.getTime(); }
/** * Create a Date object from numeric values. * * @param year * - The year * @param month * - The month [1:12] * @param day * - The day [1:31] * @return The created Date object */
Create a Date object from numeric values
dateFromNumbers
{ "repo_name": "javapathshala/WisdomCode", "path": "JP_KONCEPT/src/main/java/com/jp/koncept/date/DateUtil.java", "license": "gpl-2.0", "size": 9676 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,827,049
private int getCreateOrder() { switch(objectType) { case DbObject.SETTING: return 0; case DbObject.USER: return 1; case DbObject.SCHEMA: return 2; case DbObject.FUNCTION_ALIAS: return 3; case DbObject.USER_DATATYPE: ...
int function() { switch(objectType) { case DbObject.SETTING: return 0; case DbObject.USER: return 1; case DbObject.SCHEMA: return 2; case DbObject.FUNCTION_ALIAS: return 3; case DbObject.USER_DATATYPE: return 4; case DbObject.SEQUENCE: return 5; case DbObject.CONSTANT: return 6; case DbObject.TABLE_OR_VIEW: return 7; c...
/** * Get the sort order id for this object type. Objects are created in this * order when opening a database. * * @return the sort index */
Get the sort order id for this object type. Objects are created in this order when opening a database
getCreateOrder
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/main/org/h2/engine/MetaRecord.java", "license": "apache-2.0", "size": 3936 }
[ "org.h2.message.DbException" ]
import org.h2.message.DbException;
import org.h2.message.*;
[ "org.h2.message" ]
org.h2.message;
2,700,765
boolean canRecipeBeAdded(IToken<?> ignored);
boolean canRecipeBeAdded(IToken<?> ignored);
/** * Check if a recipe can be added. This is only important for 3x3 crafting. Workers shall override this if necessary. * * @param ignored the token of the recipe. * @return true if so. */
Check if a recipe can be added. This is only important for 3x3 crafting. Workers shall override this if necessary
canRecipeBeAdded
{ "repo_name": "Minecolonies/minecolonies", "path": "src/api/java/com/minecolonies/api/colony/buildings/IBuildingWorker.java", "license": "gpl-3.0", "size": 6375 }
[ "com.minecolonies.api.colony.requestsystem.token.IToken" ]
import com.minecolonies.api.colony.requestsystem.token.IToken;
import com.minecolonies.api.colony.requestsystem.token.*;
[ "com.minecolonies.api" ]
com.minecolonies.api;
919,537
private File getConfigurationFile() { try { // Attempt to get the CCML configuration file from the profile directory. File profileDirectory = new File(PMS.getConfiguration().getProfileDirectory()); File pluginConfigurationFile = new File(profileDirectory, CCML_CONFIGURATION_FILENAME); // Directo...
File function() { try { File profileDirectory = new File(PMS.getConfiguration().getProfileDirectory()); File pluginConfigurationFile = new File(profileDirectory, CCML_CONFIGURATION_FILENAME); if (pluginConfigurationFile.isDirectory() == true) { _logger.error(STR); return null; } return pluginConfigurationFile; } catch ...
/** * Return the CCML configuration file. * * @return The configuration file; null if the configuration file cannot be determined. */
Return the CCML configuration file
getConfigurationFile
{ "repo_name": "jdknight/ums.ccml", "path": "src/main/java/me/jdknight/ums/ccml/core/CcmlConfiguration.java", "license": "gpl-2.0", "size": 12353 }
[ "java.io.File", "net.pms.PMS" ]
import java.io.File; import net.pms.PMS;
import java.io.*; import net.pms.*;
[ "java.io", "net.pms" ]
java.io; net.pms;
2,160,002
protected void logRemove(ImagePanel panel, int x, int y, int w, int h, List<Map<String,Object>> removed) { InteractionEvent e; Map<String,Object> data; data = new HashMap<>(); data.put("x", x); data.put("y", y); data.put("width", w); data.put("height", h); data.put("removed", removed)...
void function(ImagePanel panel, int x, int y, int w, int h, List<Map<String,Object>> removed) { InteractionEvent e; Map<String,Object> data; data = new HashMap<>(); data.put("x", x); data.put("y", y); data.put("width", w); data.put(STR, h); data.put(STR, removed); e = new InteractionEvent(panel, new Date(), STR, data);...
/** * Logs the removal of the of objects. * * @param panel the panel to use for logging * @param x the x of the removal rectangle * @param y the y of the removal rectangle * @param w the width of the removal rectangle * @param h the height of the removal rectangle * @param removed the remove...
Logs the removal of the of objects
logRemove
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-imaging/src/main/java/adams/gui/visualization/image/selection/SelectObjects.java", "license": "gpl-3.0", "size": 12807 }
[ "java.util.Date", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,220,702
public void fireNotifyChanged(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } }
void function(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } }
/** * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This delegates to <code>#changeNotifier</code> and to <code>#parentAdapterFactory</code>.
fireNotifyChanged
{ "repo_name": "drbgfc/mdht", "path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.edit/src/org/openhealthtools/mdht/cts2/entity/provider/EntityItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 21447 }
[ "org.eclipse.emf.common.notify.Notification" ]
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,403,834
public void delete(Integer executorId) throws SessionInternalError { if (invoice == null) { throw new SessionInternalError("An invoice has to be set before delete"); } //prevent a delegated Invoice from being deleted if (invoice.getDelegatedInvoiceId() != null &&...
void function(Integer executorId) throws SessionInternalError { if (invoice == null) { throw new SessionInternalError(STR); } if (invoice.getDelegatedInvoiceId() != null && invoice.getDelegatedInvoiceId().intValue() > 0 ) { SessionInternalError sie= new SessionInternalError(STR); sie.setErrorMessages(new String[] { STR...
/** * This will remove all the records (sql delete, not just flag them). It * will also update the related orders if applicable */
This will remove all the records (sql delete, not just flag them). It will also update the related orders if applicable
delete
{ "repo_name": "psalaberria002/jbilling3", "path": "src/java/com/sapienter/jbilling/server/invoice/InvoiceBL.java", "license": "agpl-3.0", "size": 42869 }
[ "com.sapienter.jbilling.common.SessionInternalError", "com.sapienter.jbilling.server.invoice.db.InvoiceDTO", "com.sapienter.jbilling.server.invoice.db.InvoiceStatusDAS", "com.sapienter.jbilling.server.order.OrderBL", "com.sapienter.jbilling.server.order.db.OrderDTO", "com.sapienter.jbilling.server.order.d...
import com.sapienter.jbilling.common.SessionInternalError; import com.sapienter.jbilling.server.invoice.db.InvoiceDTO; import com.sapienter.jbilling.server.invoice.db.InvoiceStatusDAS; import com.sapienter.jbilling.server.order.OrderBL; import com.sapienter.jbilling.server.order.db.OrderDTO; import com.sapienter.jbilli...
import com.sapienter.jbilling.common.*; import com.sapienter.jbilling.server.invoice.db.*; import com.sapienter.jbilling.server.order.*; import com.sapienter.jbilling.server.order.db.*; import com.sapienter.jbilling.server.payment.*; import com.sapienter.jbilling.server.payment.db.*; import com.sapienter.jbilling.serve...
[ "com.sapienter.jbilling", "java.util" ]
com.sapienter.jbilling; java.util;
437,355
// TODO: on java8 make this a default method returning emptyList Collection<Accountable> getChildResources();
Collection<Accountable> getChildResources();
/** * Returns nested resources of this class. * The result should be a point-in-time snapshot (to avoid race conditions). * @see Accountables */
Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions)
getChildResources
{ "repo_name": "q474818917/solr-5.2.0", "path": "lucene/core/src/java/org/apache/lucene/util/Accountable.java", "license": "apache-2.0", "size": 1371 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
701,247
private void loadConnectorConfigurations( ) { ConnectorConfigurationManager connectorConfigurationManager = new ConnectorConfigurationManager(); if( getConfigurationManager( ).contains( ConfigurationConstants.HTTP_CONNECTORS ) ) { logger.info( "Preparing connectors for '{}'.", this.getCanonicalName( ) ); ...
void function( ) { ConnectorConfigurationManager connectorConfigurationManager = new ConnectorConfigurationManager(); if( getConfigurationManager( ).contains( ConfigurationConstants.HTTP_CONNECTORS ) ) { logger.info( STR, this.getCanonicalName( ) ); RegisteredCollection<ConnectorConfiguration> connectorCollection = thi...
/** * Private method, creating a set of connector configurations, for used by http interfaces. */
Private method, creating a set of connector configurations, for used by http interfaces
loadConnectorConfigurations
{ "repo_name": "Talvish/Tales", "path": "product/services/src/com/talvish/tales/services/Service.java", "license": "apache-2.0", "size": 43265 }
[ "com.talvish.tales.services.http.ConnectorConfiguration", "com.talvish.tales.services.http.ConnectorConfigurationManager", "com.talvish.tales.system.configuration.annotated.RegisteredCollection" ]
import com.talvish.tales.services.http.ConnectorConfiguration; import com.talvish.tales.services.http.ConnectorConfigurationManager; import com.talvish.tales.system.configuration.annotated.RegisteredCollection;
import com.talvish.tales.services.http.*; import com.talvish.tales.system.configuration.annotated.*;
[ "com.talvish.tales" ]
com.talvish.tales;
1,280,607
ObservableMutableDocument<N, E, T> getDocument();
ObservableMutableDocument<N, E, T> getDocument();
/** * Returns the document wrapped by this object. */
Returns the document wrapped by this object
getDocument
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/model/document/util/DocumentEventRouter.java", "license": "apache-2.0", "size": 2169 }
[ "org.waveprotocol.wave.model.document.ObservableMutableDocument" ]
import org.waveprotocol.wave.model.document.ObservableMutableDocument;
import org.waveprotocol.wave.model.document.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
1,893,653
@Override protected void appendTimestamp(java.sql.Timestamp timestamp, Writer writer) throws IOException { writer.write("TIMESTAMP'" + Helper.printTimestampWithoutNanos(timestamp) + "'" ); }
void function(java.sql.Timestamp timestamp, Writer writer) throws IOException { writer.write(STR + Helper.printTimestampWithoutNanos(timestamp) + "'" ); }
/** * Appends a TimeStamp in Symfoware specific format.<br> * Note that Symfoware does not support the milli- and nanoseconds.<br> * Symfoware: TIMESTAMP'YYYY-MM-DD hh:mm:ss' */
Appends a TimeStamp in Symfoware specific format. Note that Symfoware does not support the milli- and nanoseconds. Symfoware: TIMESTAMP'YYYY-MM-DD hh:mm:ss'
appendTimestamp
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/SymfowarePlatform.java", "license": "epl-1.0", "size": 51856 }
[ "java.io.IOException", "java.io.Writer", "org.eclipse.persistence.internal.helper.Helper" ]
import java.io.IOException; import java.io.Writer; import org.eclipse.persistence.internal.helper.Helper;
import java.io.*; import org.eclipse.persistence.internal.helper.*;
[ "java.io", "org.eclipse.persistence" ]
java.io; org.eclipse.persistence;
719,314
public void verifyConfigurationName() { for (Map.Entry<String, String> entry: configuration) { if (getDefaultOozieConfig(entry.getKey()) == null) { log.warn("Invalid configuration defined, [{0}] ", entry.getKey()); } } }
void function() { for (Map.Entry<String, String> entry: configuration) { if (getDefaultOozieConfig(entry.getKey()) == null) { log.warn(STR, entry.getKey()); } } }
/** * Verify the configuration is in oozie-default */
Verify the configuration is in oozie-default
verifyConfigurationName
{ "repo_name": "cbaenziger/oozie", "path": "core/src/main/java/org/apache/oozie/service/ConfigurationService.java", "license": "apache-2.0", "size": 24495 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,766,991
public void test_java_util_Arrays_sort_short_array_NPE() { short[] short_array_null = null; try { java.util.Arrays.sort(short_array_null); fail("Should throw java.lang.NullPointerException"); } catch (NullPointerException e) { // Expected } ...
void function() { short[] short_array_null = null; try { java.util.Arrays.sort(short_array_null); fail(STR); } catch (NullPointerException e) { } try { java.util.Arrays.sort(short_array_null, (int) -1, (int) 1); fail(STR); } catch (NullPointerException e) { } } private static final int[] LENGTHS = { 0, 1, 2, 3, 5, 8, 1...
/** * java.util.Arrays#sort(short[], int, int) */
java.util.Arrays#sort(short[], int, int)
test_java_util_Arrays_sort_short_array_NPE
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java", "license": "apache-2.0", "size": 207868 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,183,362
public static <A extends AbstractAssert> A isOfClass(A assertion, WritableAssertionInfo info, Value valueAtStartPoint, Value valueAtEndPoint, Class<?> expected, boolean lenient) { if (expected == null) {...
static <A extends AbstractAssert> A function(A assertion, WritableAssertionInfo info, Value valueAtStartPoint, Value valueAtEndPoint, Class<?> expected, boolean lenient) { if (expected == null) { throw new AssertJDBException(STR); } if (valueAtStartPoint.getValue() == null !expected.isAssignableFrom(valueAtStartPoint.g...
/** * Verifies that the class of the values of the column is equal to the class in parameter. * * @param <A> The type of the assertion which call this method. * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valueAtS...
Verifies that the class of the values of the column is equal to the class in parameter
isOfClass
{ "repo_name": "otoniel-isidoro/assertj-db", "path": "src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass.java", "license": "apache-2.0", "size": 3337 }
[ "org.assertj.core.api.WritableAssertionInfo", "org.assertj.db.api.AbstractAssert", "org.assertj.db.error.ShouldBeValueClassWithEndPoint", "org.assertj.db.error.ShouldBeValueClassWithStartPoint", "org.assertj.db.exception.AssertJDBException", "org.assertj.db.type.Value" ]
import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.AbstractAssert; import org.assertj.db.error.ShouldBeValueClassWithEndPoint; import org.assertj.db.error.ShouldBeValueClassWithStartPoint; import org.assertj.db.exception.AssertJDBException; import org.assertj.db.type.Value;
import org.assertj.core.api.*; import org.assertj.db.api.*; import org.assertj.db.error.*; import org.assertj.db.exception.*; import org.assertj.db.type.*;
[ "org.assertj.core", "org.assertj.db" ]
org.assertj.core; org.assertj.db;
2,020,681
public static Map<String, Object> updateCreditCard(DispatchContext ctx, Map<String, Object> context) { Map<String, Object> result = new HashMap<String, Object>(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) ...
static Map<String, Object> function(DispatchContext ctx, Map<String, Object> context) { Map<String, Object> result = new HashMap<String, Object>(); Delegator delegator = ctx.getDelegator(); Security security = ctx.getSecurity(); GenericValue userLogin = (GenericValue) context.get(STR); Locale locale = (Locale) context....
/** * Updates CreditCard and PaymentMethod entities according to the parameters passed in the context * <b>security check</b>: userLogin partyId must equal partyId, or must have PAY_INFO_UPDATE permission * @param ctx The DispatchContext that this service is operating in * @param context Map contain...
Updates CreditCard and PaymentMethod entities according to the parameters passed in the context security check: userLogin partyId must equal partyId, or must have PAY_INFO_UPDATE permission
updateCreditCard
{ "repo_name": "yuri0x7c1/ofbiz-explorer", "path": "src/test/resources/apache-ofbiz-16.11.03/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentMethodServices.java", "license": "apache-2.0", "size": 54558 }
[ "java.sql.Timestamp", "java.util.HashMap", "java.util.LinkedList", "java.util.List", "java.util.Locale", "java.util.Map", "org.apache.ofbiz.base.util.Debug", "org.apache.ofbiz.base.util.StringUtil", "org.apache.ofbiz.base.util.UtilDateTime", "org.apache.ofbiz.base.util.UtilMisc", "org.apache.ofb...
import java.sql.Timestamp; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.StringUtil; import org.apache.ofbiz.base.util.UtilDateTime; import org.apache.ofbiz.base.util...
import java.sql.*; import java.util.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.entity.util.*; import org.apache.ofbiz.security.*; import org.apache.ofbiz.service.*;
[ "java.sql", "java.util", "org.apache.ofbiz" ]
java.sql; java.util; org.apache.ofbiz;
1,272,871
public final void setCellDimensions(long cellWidth, long cellHeight) { if (cellWidth <= 0) { throw new RuntimeException("Attempted to give a SpaceState a non-positive cell width (about " + Frac.toDouble(cellWidth) + " fracunits)"); } if (cellHeight <= 0) ...
final void function(long cellWidth, long cellHeight) { if (cellWidth <= 0) { throw new RuntimeException(STR + Frac.toDouble(cellWidth) + STR); } if (cellHeight <= 0) { throw new RuntimeException(STR + Frac.toDouble(cellHeight) + STR); } cells.clear(); this.cellWidth = cellWidth; this.cellHeight = cellHeight; if (!space...
/** * Sets the dimensions of each of this SpaceState's cells to the specified * values. The more SpaceObjects are currently assigned to this SpaceState, * the longer this operation takes, as SpaceObjects need to be reorganized. * @param cellWidth The new width of each of this SpaceState's cells ...
Sets the dimensions of each of this SpaceState's cells to the specified values. The more SpaceObjects are currently assigned to this SpaceState, the longer this operation takes, as SpaceObjects need to be reorganized
setCellDimensions
{ "repo_name": "742mph/Ironclad2D", "path": "src/org/cell2d/space/SpaceState.java", "license": "gpl-3.0", "size": 167865 }
[ "org.cell2d.Frac" ]
import org.cell2d.Frac;
import org.cell2d.*;
[ "org.cell2d" ]
org.cell2d;
1,415,746
public synchronized boolean containsAll(Collection<?> c) { for(java.lang.Object loItem : c) { if (!this.contains(loItem)) { return false; } } return true; }
synchronized boolean function(Collection<?> c) { for(java.lang.Object loItem : c) { if (!this.contains(loItem)) { return false; } } return true; }
/** * Checks if all the items in the specified collection are contained * in this collection * * @param c the specified collection * @return true if all the items are contained */
Checks if all the items in the specified collection are contained in this collection
containsAll
{ "repo_name": "kmchugh/Goliath", "path": "src/Goliath/Collections/CommandQueue.java", "license": "mit", "size": 11671 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,331,758
public List<TableMetadataUnit> request(RequestMetadata requestMetadata) { return tables.read() .filter(requestMetadata.filter()) .columns(requestMetadata.columns()) .execute(); }
List<TableMetadataUnit> function(RequestMetadata requestMetadata) { return tables.read() .filter(requestMetadata.filter()) .columns(requestMetadata.columns()) .execute(); }
/** * Executes Metastore Tables read request based on given information in {@link RequestMetadata}. * * @param requestMetadata request metadata * @return list of metadata units */
Executes Metastore Tables read request based on given information in <code>RequestMetadata</code>
request
{ "repo_name": "kkhatua/drill", "path": "metastore/metastore-api/src/main/java/org/apache/drill/metastore/components/tables/BasicTablesRequests.java", "license": "apache-2.0", "size": 23771 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
398,579
public File getSolrSchemaFile() { return new File(getHome() + CONF_FOLDER + IndexSchema.DEFAULT_SCHEMA_FILE); }
File function() { return new File(getHome() + CONF_FOLDER + IndexSchema.DEFAULT_SCHEMA_FILE); }
/** * Returns the Solr index schema file.<p> * * @return the Solr index schema file */
Returns the Solr index schema file
getSolrSchemaFile
{ "repo_name": "mediaworx/opencms-core", "path": "src/org/opencms/search/solr/CmsSolrConfiguration.java", "license": "lgpl-2.1", "size": 9495 }
[ "java.io.File", "org.apache.solr.schema.IndexSchema" ]
import java.io.File; import org.apache.solr.schema.IndexSchema;
import java.io.*; import org.apache.solr.schema.*;
[ "java.io", "org.apache.solr" ]
java.io; org.apache.solr;
1,441,833
public void removeVertice(Location<World> location);
void function(Location<World> location);
/** * Removes a vertice in the shape * @param location */
Removes a vertice in the shape
removeVertice
{ "repo_name": "Jano1/RegionsAPI", "path": "src/main/java/de/jano1/sponge/regions_api/RegionShape.java", "license": "mit", "size": 690 }
[ "org.spongepowered.api.world.Location", "org.spongepowered.api.world.World" ]
import org.spongepowered.api.world.Location; import org.spongepowered.api.world.World;
import org.spongepowered.api.world.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
1,778,021
@Ensure({"count() == {old count()} + 1", "item(0) == {arg 1}", "generation() == {old generation()} + 1"}) public void addFirst(final G element) { if (count == items.length) { makeRoom(); } lower = (lower - 1 + items.length) % items.length; item...
@Ensure({STR, STR, STR}) void function(final G element) { if (count == items.length) { makeRoom(); } lower = (lower - 1 + items.length) % items.length; items[lower] = element; count++; generation++; }
/** * Add an element at the head of the array * * @param element * the element to insert */
Add an element at the head of the array
addFirst
{ "repo_name": "cadrian/incentive", "path": "src/main/java/net/cadrian/collection/RingArray.java", "license": "gpl-3.0", "size": 4094 }
[ "net.cadrian.incentive.Ensure" ]
import net.cadrian.incentive.Ensure;
import net.cadrian.incentive.*;
[ "net.cadrian.incentive" ]
net.cadrian.incentive;
781,151
IRequestContext onResult(IUpdateSubscriber<IRequestContext> subscriber);
IRequestContext onResult(IUpdateSubscriber<IRequestContext> subscriber);
/** * Register a subscriber for updates when the request receives any type of update. * * @param subscriber The subscriber. * * @return Self for chaining. */
Register a subscriber for updates when the request receives any type of update
onResult
{ "repo_name": "JCThePants/NucleusFramework", "path": "src/com/jcwhatever/nucleus/managed/commands/response/IRequestContext.java", "license": "mit", "size": 4548 }
[ "com.jcwhatever.nucleus.utils.observer.update.IUpdateSubscriber" ]
import com.jcwhatever.nucleus.utils.observer.update.IUpdateSubscriber;
import com.jcwhatever.nucleus.utils.observer.update.*;
[ "com.jcwhatever.nucleus" ]
com.jcwhatever.nucleus;
1,773,712
protected Collection<PermissionEntry> readPermissionEntries( StreamTokenizer st) throws IOException, InvalidFormatException { Collection<PermissionEntry> permissions = new HashSet<PermissionEntry>(); parsing: while (true) { switch (st.nextToken()) { case StreamTo...
Collection<PermissionEntry> function( StreamTokenizer st) throws IOException, InvalidFormatException { Collection<PermissionEntry> permissions = new HashSet<PermissionEntry>(); parsing: while (true) { switch (st.nextToken()) { case StreamTokenizer.TT_WORD: if (Util.equalsIgnoreCase(STR, st.sval)) { PermissionEntry pe =...
/** * Tries to read a list of <i>permission </i> entries. The expected syntax * is * * <pre> * * permission permission_class_name * [ &quot;target_name&quot; ] [, &quot;action_list&quot;] * [, signedby &quot;name1,name2,...&quot;]; * * </pre> ...
Tries to read a list of permission entries. The expected syntax is <code> permission permission_class_name [ &quot;target_name&quot; ] [, &quot;action_list&quot;] [, signedby &quot;name1,name2,...&quot;]; </code> List is terminated by '}' (closing curly brace) symbol
readPermissionEntries
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/org/apache/harmony/security/DefaultPolicyScanner.java", "license": "apache-2.0", "size": 17688 }
[ "java.io.IOException", "java.io.StreamTokenizer", "java.util.Collection", "java.util.HashSet" ]
import java.io.IOException; import java.io.StreamTokenizer; import java.util.Collection; import java.util.HashSet;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,524,270
List<String> getLanguageNames();
List<String> getLanguageNames();
/** * Gets a readonly list with the names of the languages currently registered. * * @return a readonly list with the names of the the languages */
Gets a readonly list with the names of the languages currently registered
getLanguageNames
{ "repo_name": "NickCis/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 74001 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,112,017
public OpenIndexRequest indicesOptions(IndicesOptions indicesOptions) { this.indicesOptions = indicesOptions; return this; }
OpenIndexRequest function(IndicesOptions indicesOptions) { this.indicesOptions = indicesOptions; return this; }
/** * Specifies what type of requested indices to ignore and how to deal with wildcard expressions. * For example indices that don't exist. * * @param indicesOptions the desired behaviour regarding indices to ignore and wildcard indices expressions * @return the request itself */
Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist
indicesOptions
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/indices/open/OpenIndexRequest.java", "license": "apache-2.0", "size": 5494 }
[ "org.elasticsearch.action.support.IndicesOptions" ]
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.action.support.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,520,607
public static boolean ping(String url, int timeout) { //url = url.replaceFirst("https", "http"); // Otherwise an exception may be thrown on invalid SSL certificates. try { HttpURLConnection connection = (HttpURLConnection) prepareURLConnection(url, timeout); connection.setRequestMethod("HEAD"); int res...
static boolean function(String url, int timeout) { try { HttpURLConnection connection = (HttpURLConnection) prepareURLConnection(url, timeout); connection.setRequestMethod("HEAD"); int responseCode = connection.getResponseCode(); return (200 <= responseCode && responseCode <= 399); } catch (IOException exception) { ret...
/** * Pings a HTTP URL. This effectively sends a HEAD request and returns * <code>true</code> if the response code is in the 200-399 range. * * @param url The HTTP URL to be pinged. * @param timeout The timeout in millis for both the connection timeout and * the response read timeout. Note that the total ti...
Pings a HTTP URL. This effectively sends a HEAD request and returns <code>true</code> if the response code is in the 200-399 range
ping
{ "repo_name": "lafita/biojava", "path": "biojava-core/src/main/java/org/biojava/nbio/core/util/FileDownloadUtils.java", "license": "lgpl-2.1", "size": 9094 }
[ "java.io.IOException", "java.net.HttpURLConnection" ]
import java.io.IOException; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,168,574
public synchronized void addPersistedDelegationToken( DelegationTokenIdentifier identifier, long expiryTime) throws IOException { if (running) { // a safety check throw new IOException( "Can't add persisted delegation token to a running SecretManager."); } int keyId = ide...
synchronized void function( DelegationTokenIdentifier identifier, long expiryTime) throws IOException { if (running) { throw new IOException( STR); } int keyId = identifier.getMasterKeyId(); DelegationKey dKey = allKeys.get(keyId); if (dKey == null) { LOG.warn( STR + identifier.toString()); return; } byte[] password = ...
/** * This method is intended to be used only while reading edit logs. * * @param identifier * DelegationTokenIdentifier read from the edit logs or * fsimage * @param expiryTime * token expiry time * @throws IOException */
This method is intended to be used only while reading edit logs
addPersistedDelegationToken
{ "repo_name": "srijeyanthan/hops", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/security/token/delegation/DelegationTokenSecretManager.java", "license": "apache-2.0", "size": 11121 }
[ "java.io.IOException", "org.apache.hadoop.security.token.delegation.DelegationKey" ]
import java.io.IOException; import org.apache.hadoop.security.token.delegation.DelegationKey;
import java.io.*; import org.apache.hadoop.security.token.delegation.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,617,086
public final void removeTeamRule(final TeamRule rule) { getTeamRulesModifiable().remove(rule); }
final void function(final TeamRule rule) { getTeamRulesModifiable().remove(rule); }
/** * Removes a team rule. * * @param rule * the team rule to remove */
Removes a team rule
removeTeamRule
{ "repo_name": "Bernardo-MG/dreadball-model-persistence", "path": "src/main/java/com/bernardomg/tabletop/dreadball/model/persistence/faction/PersistentTeamType.java", "license": "apache-2.0", "size": 6028 }
[ "com.bernardomg.tabletop.dreadball.model.faction.TeamRule" ]
import com.bernardomg.tabletop.dreadball.model.faction.TeamRule;
import com.bernardomg.tabletop.dreadball.model.faction.*;
[ "com.bernardomg.tabletop" ]
com.bernardomg.tabletop;
2,638,594
@Test(groups = { "setup", "database", "couchdb" }, dependsOnMethods = { "persistProjectTest" }) public void findNewProjectByIdTest() throws Exception { WifProject project = wifProjectDao.findProjectById(newProjectId); Assert.assertNotNull(project); Assert.assertNotNull(project.getCreationDate()); }
@Test(groups = { "setup", STR, STR }, dependsOnMethods = { STR }) void function() throws Exception { WifProject project = wifProjectDao.findProjectById(newProjectId); Assert.assertNotNull(project); Assert.assertNotNull(project.getCreationDate()); }
/** * Find new project by id test. * * @throws Exception * the exception */
Find new project by id test
findNewProjectByIdTest
{ "repo_name": "tosseto/online-whatif", "path": "src/test/java/au/org/aurin/wif/repo/impl/CouchWifProjectDaoIT.java", "license": "mit", "size": 3828 }
[ "au.org.aurin.wif.model.WifProject", "org.testng.Assert", "org.testng.annotations.Test" ]
import au.org.aurin.wif.model.WifProject; import org.testng.Assert; import org.testng.annotations.Test;
import au.org.aurin.wif.model.*; import org.testng.*; import org.testng.annotations.*;
[ "au.org.aurin", "org.testng", "org.testng.annotations" ]
au.org.aurin; org.testng; org.testng.annotations;
1,716,086
@Test public void thenAcceptAsyncExample() { StringBuilder result = new StringBuilder(); CompletableFuture<Void> cf = CompletableFuture.completedFuture("thenAcceptAsync message") .thenAcceptAsync(result::append); System.out.println("before cf.join() : " + result); ...
void function() { StringBuilder result = new StringBuilder(); CompletableFuture<Void> cf = CompletableFuture.completedFuture(STR) .thenAcceptAsync(result::append); System.out.println(STR + result); cf.join(); System.out.println(STR + result); assertTrue(STR, result.length() > 0); }
/** * 7. Asynchronously consuming result of previous stage * <p> * Again, using the async version of thenAccept, the chained CompletableFuture would execute asynchronously: */
7. Asynchronously consuming result of previous stage Again, using the async version of thenAccept, the chained CompletableFuture would execute asynchronously:
thenAcceptAsyncExample
{ "repo_name": "yuweijun/learning-programming", "path": "language-java/src/test/java/com/example/util/concurrent/CompletableFutureExamples.java", "license": "mit", "size": 23884 }
[ "java.util.concurrent.CompletableFuture", "org.junit.Assert" ]
import java.util.concurrent.CompletableFuture; import org.junit.Assert;
import java.util.concurrent.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,738,057
public static void main(final String[] args) throws RunnerException { BenchmarkSuiteRunner.runJmhBasicBenchmarkWithCommandLine(BenchmarkHashCollisions.class, args, 1000, 2000); }
static void function(final String[] args) throws RunnerException { BenchmarkSuiteRunner.runJmhBasicBenchmarkWithCommandLine(BenchmarkHashCollisions.class, args, 1000, 2000); }
/** * Running main * @param args * @throws RunnerException */
Running main
main
{ "repo_name": "vsonnier/hppcrt", "path": "hppcrt-benchmarks/src/main/java/com/carrotsearch/hppcrt/jmh/BenchmarkHashCollisions.java", "license": "apache-2.0", "size": 7129 }
[ "com.carrotsearch.hppcrt.BenchmarkSuiteRunner", "org.openjdk.jmh.runner.RunnerException" ]
import com.carrotsearch.hppcrt.BenchmarkSuiteRunner; import org.openjdk.jmh.runner.RunnerException;
import com.carrotsearch.hppcrt.*; import org.openjdk.jmh.runner.*;
[ "com.carrotsearch.hppcrt", "org.openjdk.jmh" ]
com.carrotsearch.hppcrt; org.openjdk.jmh;
604,497
private void appendHeaders(HttpHeaders headers, StringBuilder builder) { for (Entry<String, List<String>> headerEntry : headers.entrySet()) { builder.append(headerEntry.getKey()); builder.append(":"); builder.append(StringUtils.arrayToCommaDelimitedString(headerEntry.getV...
void function(HttpHeaders headers, StringBuilder builder) { for (Entry<String, List<String>> headerEntry : headers.entrySet()) { builder.append(headerEntry.getKey()); builder.append(":"); builder.append(StringUtils.arrayToCommaDelimitedString(headerEntry.getValue().toArray())); builder.append(NEWLINE); } } private stat...
/** * Append Http headers to string builder. * @param headers * @param builder */
Append Http headers to string builder
appendHeaders
{ "repo_name": "christophd/citrus", "path": "endpoints/citrus-http/src/main/java/com/consol/citrus/http/interceptor/LoggingClientInterceptor.java", "license": "apache-2.0", "size": 7376 }
[ "java.util.List", "java.util.Map", "org.springframework.http.HttpHeaders", "org.springframework.http.client.ClientHttpResponse", "org.springframework.util.StringUtils" ]
import java.util.List; import java.util.Map; import org.springframework.http.HttpHeaders; import org.springframework.http.client.ClientHttpResponse; import org.springframework.util.StringUtils;
import java.util.*; import org.springframework.http.*; import org.springframework.http.client.*; import org.springframework.util.*;
[ "java.util", "org.springframework.http", "org.springframework.util" ]
java.util; org.springframework.http; org.springframework.util;
1,054,225
public NavigableMap<byte[], byte[]> getFamilyMap(byte [] family) { if(this.familyMap == null) { getMap(); } if(isEmpty()) { return null; } NavigableMap<byte[], byte[]> returnMap = new TreeMap<>(Bytes.BYTES_COMPARATOR); NavigableMap<byte[], NavigableMap<Long, byte[]>> qualifierMap =...
NavigableMap<byte[], byte[]> function(byte [] family) { if(this.familyMap == null) { getMap(); } if(isEmpty()) { return null; } NavigableMap<byte[], byte[]> returnMap = new TreeMap<>(Bytes.BYTES_COMPARATOR); NavigableMap<byte[], NavigableMap<Long, byte[]>> qualifierMap = familyMap.get(family); if(qualifierMap == null) ...
/** * Map of qualifiers to values. * <p> * Returns a Map of the form: <code>Map&lt;qualifier,value&gt;</code> * @param family column family to get * @return map of qualifiers to values */
Map of qualifiers to values. Returns a Map of the form: <code>Map&lt;qualifier,value&gt;</code>
getFamilyMap
{ "repo_name": "ndimiduk/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java", "license": "apache-2.0", "size": 34271 }
[ "java.util.Map", "java.util.NavigableMap", "java.util.TreeMap", "org.apache.hadoop.hbase.util.Bytes" ]
import java.util.Map; import java.util.NavigableMap; import java.util.TreeMap; import org.apache.hadoop.hbase.util.Bytes;
import java.util.*; import org.apache.hadoop.hbase.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,102,414
// =================================================================== // =================================================================== public boolean isCommandAllowed(String classname, String cmd) throws DevFailed { return databaseDAO.isCommandAllowed(this, classname, cmd); }
boolean function(String classname, String cmd) throws DevFailed { return databaseDAO.isCommandAllowed(this, classname, cmd); }
/** * Check for specified class, the specified command is allowed. * * @param classname Specified class name. * @param cmd Specified command name. * @return true if specified command is allowed * @throws DevFailed in case of database access failed */
Check for specified class, the specified command is allowed
isCommandAllowed
{ "repo_name": "tango-controls/JTango", "path": "common/src/main/java/fr/esrf/TangoApi/Database.java", "license": "lgpl-3.0", "size": 86099 }
[ "fr.esrf.Tango" ]
import fr.esrf.Tango;
import fr.esrf.*;
[ "fr.esrf" ]
fr.esrf;
163,903
@Test void testToArray() { int[][] arrays = {{}, {0}, {0, 2}, {1, 65}, {100}}; for (int[] array : arrays) { assertThat(ImmutableBitSet.of(array).toArray(), equalTo(array)); } }
@Test void testToArray() { int[][] arrays = {{}, {0}, {0, 2}, {1, 65}, {100}}; for (int[] array : arrays) { assertThat(ImmutableBitSet.of(array).toArray(), equalTo(array)); } }
/** * Tests the method * {@link org.apache.calcite.util.ImmutableBitSet#toArray}. */
Tests the method <code>org.apache.calcite.util.ImmutableBitSet#toArray</code>
testToArray
{ "repo_name": "vlsi/calcite", "path": "core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java", "license": "apache-2.0", "size": 23545 }
[ "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert", "org.junit.jupiter.api.Test" ]
import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.junit.jupiter.api.Test;
import org.hamcrest.*; import org.junit.jupiter.api.*;
[ "org.hamcrest", "org.junit.jupiter" ]
org.hamcrest; org.junit.jupiter;
2,006,852
private void report(JSError error) throws JsonMLException { report(error, true); }
void function(JSError error) throws JsonMLException { report(error, true); }
/** * Reports a new parser error to the compiler and terminates the job. * @param error JSError instance to be passed to the compiler */
Reports a new parser error to the compiler and terminates the job
report
{ "repo_name": "wenzowski/closure-compiler", "path": "src/com/google/javascript/jscomp/jsonml/Reader.java", "license": "apache-2.0", "size": 44938 }
[ "com.google.javascript.jscomp.JSError" ]
import com.google.javascript.jscomp.JSError;
import com.google.javascript.jscomp.*;
[ "com.google.javascript" ]
com.google.javascript;
1,693,281
void presentModals(List<Dispatcher.Dispatch> modals, final Dispatcher.Callback callback) { Preconditions.checkNotNull(view, "Container view cannot be null"); Preconditions.checkArgument(view.hasCurrentView(), "Container view must have current view"); Preconditions.checkNull(dispatchingCallba...
void presentModals(List<Dispatcher.Dispatch> modals, final Dispatcher.Callback callback) { Preconditions.checkNotNull(view, STR); Preconditions.checkArgument(view.hasCurrentView(), STR); Preconditions.checkNull(dispatchingCallback, STR); Logger.d(STR, modals.size()); dispatchingCallback = callback; final List<Navigator...
/** * Present several modals that will all show/hide in parallel * Once all view transitions have been executed, the dispatcher callback will complete */
Present several modals that will all show/hide in parallel Once all view transitions have been executed, the dispatcher callback will complete
presentModals
{ "repo_name": "Wrywulf/Mortar-architect", "path": "architect/src/main/java/architect/Presenter.java", "license": "mit", "size": 11262 }
[ "android.view.View", "java.util.ArrayList", "java.util.List" ]
import android.view.View; import java.util.ArrayList; import java.util.List;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
2,610,875
void removeAttributes(PerunSession sess, Resource resource, Group group, List<? extends AttributeDefinition> attributes) throws PrivilegeException, ResourceNotExistsException, GroupNotExistsException, AttributeNotExistsException, WrongAttributeAssignmentException, GroupResourceMismatchException, WrongAttributeValueE...
void removeAttributes(PerunSession sess, Resource resource, Group group, List<? extends AttributeDefinition> attributes) throws PrivilegeException, ResourceNotExistsException, GroupNotExistsException, AttributeNotExistsException, WrongAttributeAssignmentException, GroupResourceMismatchException, WrongAttributeValueExce...
/** * PRIVILEGE: Remove attributes only when principal has access to write on them. * <p> * Batch version of removeAttribute * * @see AttributesManager#removeAttribute(PerunSession, Resource, Group, AttributeDefinition) */
Batch version of removeAttribute
removeAttributes
{ "repo_name": "zoraseb/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/AttributesManager.java", "license": "bsd-2-clause", "size": 265364 }
[ "cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException", "cz.metacentrum.perun.core.api.exceptions.GroupNotExistsException", "cz.metacentrum.perun.core.api.exceptions.GroupResourceMismatchException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api...
import cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException; import cz.metacentrum.perun.core.api.exceptions.GroupNotExistsException; import cz.metacentrum.perun.core.api.exceptions.GroupResourceMismatchException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum....
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,122,956
protected void addMappedRolePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AssocEndMapping_mappedRole_feature"), getString("_UI_Prope...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), MapperPackage.Literals.ASSOC_END_MAPPING__MAPPED_ROLE, true, false, false, ItemPropertyDescriptor...
/** * This adds a property descriptor for the Mapped Role feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Mapped Role feature.
addMappedRolePropertyDescriptor
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-edit/src/main/java/com/openMap1/mapper/provider/AssocEndMappingItemProvider.java", "license": "epl-1.0", "size": 7780 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
59,664
@Test public void lockWriteAndCheckNameAndParent() throws Exception { String name = "file"; InodeFile inode1 = createInodeFile(1); InodeDirectory dir1 = createInodeDirectory(); inode1.setName(name); inode1.setParentId(dir1.getId()); inode1.lockWriteAndCheckNameAndParent(dir1, name); Asse...
void function() throws Exception { String name = "file"; InodeFile inode1 = createInodeFile(1); InodeDirectory dir1 = createInodeDirectory(); inode1.setName(name); inode1.setParentId(dir1.getId()); inode1.lockWriteAndCheckNameAndParent(dir1, name); Assert.assertTrue(inode1.isWriteLocked()); inode1.unlockWrite(); }
/** * Tests the {@link Inode#lockWriteAndCheckNameAndParent(Inode, String)} method. */
Tests the <code>Inode#lockWriteAndCheckNameAndParent(Inode, String)</code> method
lockWriteAndCheckNameAndParent
{ "repo_name": "yuluo-ding/alluxio", "path": "core/server/master/src/test/java/alluxio/master/file/meta/InodeFileTest.java", "license": "apache-2.0", "size": 12808 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,724,814
public static List<String> readLines(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> answer = new ArrayList<String>(); try { while (true) { String line = reader.readLine(); if (line != ...
static List<String> function(File file) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(file)); List<String> answer = new ArrayList<String>(); try { while (true) { String line = reader.readLine(); if (line != null) { answer.add(line); } else { break; } } } finally { reader.close(); } retu...
/** * Reads a {@link File} and returns the list of lines */
Reads a <code>File</code> and returns the list of lines
readLines
{ "repo_name": "rajdavies/fabric8", "path": "components/fabric8-utils/src/main/java/io/fabric8/utils/Files.java", "license": "apache-2.0", "size": 19018 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileReader", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,522,554
public void setNotifiedUsers(List<QualifiedUsers> notifiedUsersList);
void function(List<QualifiedUsers> notifiedUsersList);
/** * Set all the users that have to be notified * @param QualifiedUsers object containing notified users */
Set all the users that have to be notified
setNotifiedUsers
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/api/model/Consequence.java", "license": "agpl-3.0", "size": 4702 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,731,627
@Transactional(readOnly = false) public boolean deleteType(final Long typeId) { try { Type t = this.typeDao.getTypeById(typeId); if (t.equals(typeDao.getTypeByName(NewsConstants.DEFAULT_TYPE))) { throw new IllegalArgumentException("This isn't authorized to...
@Transactional(readOnly = false) boolean function(final Long typeId) { try { Type t = this.typeDao.getTypeById(typeId); if (t.equals(typeDao.getTypeByName(NewsConstants.DEFAULT_TYPE))) { throw new IllegalArgumentException(STR); } return this.typeDao.deleteTypeById(typeId); } catch (DataAccessException e) { LOG.error(ST...
/** * Supprimer un type. * @param typeId * @return true si la suppression s'est bien passée, faux sinon. */
Supprimer un type
deleteType
{ "repo_name": "GIP-RECIA/esup-news", "path": "src/org/esco/portlets/news/services/TypeManagerImpl.java", "license": "gpl-3.0", "size": 7612 }
[ "org.esco.portlets.news.domain.Type", "org.springframework.dao.DataAccessException", "org.springframework.transaction.annotation.Transactional", "org.uhp.portlets.news.NewsConstants" ]
import org.esco.portlets.news.domain.Type; import org.springframework.dao.DataAccessException; import org.springframework.transaction.annotation.Transactional; import org.uhp.portlets.news.NewsConstants;
import org.esco.portlets.news.domain.*; import org.springframework.dao.*; import org.springframework.transaction.annotation.*; import org.uhp.portlets.news.*;
[ "org.esco.portlets", "org.springframework.dao", "org.springframework.transaction", "org.uhp.portlets" ]
org.esco.portlets; org.springframework.dao; org.springframework.transaction; org.uhp.portlets;
919,575
public String deadlineDateRule(DevelopmentProposal developmentProposal, String deadlineDate) { try { Date checkDeadLineDate = getDateTimeService().convertToSqlDate(deadlineDate); if(developmentProposal.getDeadlineDate().before(checkDeadLineDate)) { return TRUE; ...
String function(DevelopmentProposal developmentProposal, String deadlineDate) { try { Date checkDeadLineDate = getDateTimeService().convertToSqlDate(deadlineDate); if(developmentProposal.getDeadlineDate().before(checkDeadLineDate)) { return TRUE; } }catch(Exception ex) { LOG.error(ex.getMessage()); } return FALSE; }
/** * This method is to check if the proposal's deadline date is before a specified date. * @param developmentProposal * FN_DEADLINE_DATE */
This method is to check if the proposal's deadline date is before a specified date
deadlineDateRule
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/main/java/org/kuali/coeus/propdev/impl/krms/PropDevJavaFunctionKrmsTermServiceImpl.java", "license": "agpl-3.0", "size": 47019 }
[ "java.sql.Date", "org.kuali.coeus.propdev.impl.core.DevelopmentProposal" ]
import java.sql.Date; import org.kuali.coeus.propdev.impl.core.DevelopmentProposal;
import java.sql.*; import org.kuali.coeus.propdev.impl.core.*;
[ "java.sql", "org.kuali.coeus" ]
java.sql; org.kuali.coeus;
2,410,400
@Override public ImmutableSetMultimap<K, V> build() { if (keyComparator != null) { Multimap<K, V> sortedCopy = new BuilderMultimap<K, V>(); List<Map.Entry<K, Collection<V>>> entries = Lists.newArrayList( builderMultimap.asMap().entrySet()); Collections.sort( ...
@Override ImmutableSetMultimap<K, V> function() { if (keyComparator != null) { Multimap<K, V> sortedCopy = new BuilderMultimap<K, V>(); List<Map.Entry<K, Collection<V>>> entries = Lists.newArrayList( builderMultimap.asMap().entrySet()); Collections.sort( entries, Ordering.from(keyComparator).<K>onKeys()); for (Map.Entr...
/** * Returns a newly-created immutable set multimap. */
Returns a newly-created immutable set multimap
build
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/externals/guava/src/main/java/com/google/common/collect/ImmutableSetMultimap.java", "license": "apache-2.0", "size": 18824 }
[ "java.util.Collection", "java.util.Collections", "java.util.List", "java.util.Map" ]
import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,370,314
@LogMessage(level = Logger.Level.WARN) @Message(id = 212053, value = "CompletionListener/SendAcknowledgementHandler used with confirmationWindowSize=-1. Enable confirmationWindowSize to receive acks from server!", format = Message.Format.MESSAGE_FORMAT) void confirmationWindowDisabledWarning();
@LogMessage(level = Logger.Level.WARN) @Message(id = 212053, value = STR, format = Message.Format.MESSAGE_FORMAT) void confirmationWindowDisabledWarning();
/** * Warns about usage of {@link org.apache.activemq.artemis.api.core.client.SendAcknowledgementHandler} or JMS's {@code CompletionWindow} with * confirmations disabled (confirmationWindowSize=-1). */
Warns about usage of <code>org.apache.activemq.artemis.api.core.client.SendAcknowledgementHandler</code> or JMS's CompletionWindow with confirmations disabled (confirmationWindowSize=-1)
confirmationWindowDisabledWarning
{ "repo_name": "gtully/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java", "license": "apache-2.0", "size": 26946 }
[ "org.jboss.logging.Logger", "org.jboss.logging.annotations.LogMessage", "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.Logger; import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message;
import org.jboss.logging.*; import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
904,247
Utils.nonNull(m, "Cannot perform SVD on a null."); return createSVD(m, null); } /** * Create a SVD instance using a spark context. * * @param m matrix that is not {@code null} * @param ctx JavaSparkContext. {@code null} is allowed, but will fall back to Apache Commons Math implemen...
Utils.nonNull(m, STR); return createSVD(m, null); } /** * Create a SVD instance using a spark context. * * @param m matrix that is not {@code null} * @param ctx JavaSparkContext. {@code null} is allowed, but will fall back to Apache Commons Math implementation. * @return SVD instance that is never {@code null}
/** * Create a SVD instance using Apache Commons Math. * * @param m matrix that is not {@code null} * @return SVD instance that is never {@code null} */
Create a SVD instance using Apache Commons Math
createSVD
{ "repo_name": "broadinstitute/hellbender", "path": "src/main/java/org/broadinstitute/hellbender/utils/svd/SVDFactory.java", "license": "bsd-3-clause", "size": 1329 }
[ "org.apache.spark.api.java.JavaSparkContext", "org.broadinstitute.hellbender.utils.Utils" ]
import org.apache.spark.api.java.JavaSparkContext; import org.broadinstitute.hellbender.utils.Utils;
import org.apache.spark.api.java.*; import org.broadinstitute.hellbender.utils.*;
[ "org.apache.spark", "org.broadinstitute.hellbender" ]
org.apache.spark; org.broadinstitute.hellbender;
2,377,811