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
@BetaApi("This surface is stable yet it might be removed in the future.") public <RowT> ServerStreamingCallable<ReadRowsRequest, RowT> createReadRowsRawCallable( RowAdapter<RowT> rowAdapter) { return createReadRowsBaseCallable(settings.readRowsSettings(), rowAdapter) .withDefaultCallContext(client...
@BetaApi(STR) <RowT> ServerStreamingCallable<ReadRowsRequest, RowT> function( RowAdapter<RowT> rowAdapter) { return createReadRowsBaseCallable(settings.readRowsSettings(), rowAdapter) .withDefaultCallContext(clientContext.getDefaultCallContext()); }
/** * Creates a callable chain to handle ReadRows RPCs. The chain will: * * <ul> * <li>Dispatch the RPC with {@link ReadRowsRequest}. * <li>Upon receiving the response stream, it will merge the {@link * com.google.bigtable.v2.ReadRowsResponse.CellChunk}s in logical rows. The actual row * ...
Creates a callable chain to handle ReadRows RPCs. The chain will: Dispatch the RPC with <code>ReadRowsRequest</code>. Upon receiving the response stream, it will merge the <code>com.google.bigtable.v2.ReadRowsResponse.CellChunk</code>s in logical rows. The actual row implementation can be configured by the rowAdapter p...
createReadRowsRawCallable
{ "repo_name": "googleapis/java-bigtable", "path": "google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java", "license": "apache-2.0", "size": 39680 }
[ "com.google.api.core.BetaApi", "com.google.api.gax.rpc.ServerStreamingCallable", "com.google.bigtable.v2.ReadRowsRequest", "com.google.cloud.bigtable.data.v2.models.RowAdapter" ]
import com.google.api.core.BetaApi; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.bigtable.v2.ReadRowsRequest; import com.google.cloud.bigtable.data.v2.models.RowAdapter;
import com.google.api.core.*; import com.google.api.gax.rpc.*; import com.google.bigtable.v2.*; import com.google.cloud.bigtable.data.v2.models.*;
[ "com.google.api", "com.google.bigtable", "com.google.cloud" ]
com.google.api; com.google.bigtable; com.google.cloud;
595,188
Map<String,DataFlavor> getFlavorsForNatives(String[] natives);
Map<String,DataFlavor> getFlavorsForNatives(String[] natives);
/** * Returns a <code>Map</code> of the specified <code>String</code> natives * to their corresponding <code>DataFlavor</code>. The returned * <code>Map</code> is a modifiable copy of this <code>FlavorMap</code>'s * internal data. Client code is free to modify the <code>Map</code> * without aff...
Returns a <code>Map</code> of the specified <code>String</code> natives to their corresponding <code>DataFlavor</code>. The returned <code>Map</code> is a modifiable copy of this <code>FlavorMap</code>'s internal data. Client code is free to modify the <code>Map</code> without affecting this object
getFlavorsForNatives
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/java/awt/datatransfer/FlavorMap.java", "license": "mit", "size": 3397 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
628,128
@Override public PushType getPushType() { return this.pushType; }
PushType function() { return this.pushType; }
/** * Returns the display type this push notification. Note that push notification display types are required in iOS 13 * and later and watchOS 6 and later, but are ignored under earlier versions of either operating system. May be * {@code null}. * * @return the display type this push notificat...
Returns the display type this push notification. Note that push notification display types are required in iOS 13 and later and watchOS 6 and later, but are ignored under earlier versions of either operating system. May be null
getPushType
{ "repo_name": "relayrides/pushy", "path": "pushy/src/main/java/com/eatthepath/pushy/apns/util/SimpleApnsPushNotification.java", "license": "mit", "size": 16591 }
[ "com.eatthepath.pushy.apns.PushType" ]
import com.eatthepath.pushy.apns.PushType;
import com.eatthepath.pushy.apns.*;
[ "com.eatthepath.pushy" ]
com.eatthepath.pushy;
2,288,952
@Override public OWLProfileReport checkOntology(OWLOntology ontology) { //OWL2DLProfile profile = new OWL2DLProfile(); //OWLProfileReport report = profile.checkOntology(ontology); Set<OWLProfileViolation> violations = new HashSet<>(); //violations.addAll(report.getViolations())...
OWLProfileReport function(OWLOntology ontology) { Set<OWLProfileViolation> violations = new HashSet<>(); OWLOntologyWalker walker = new OWLOntologyWalker(ontology.getImportsClosure()); LDLPProfileChecker visitor = new LDLPProfileChecker(walker); walker.walkStructure(visitor); violations.addAll(visitor.getProfileViolati...
/** * Checks an ontology and its import closure to see if it is within * this profile. * @param ontology The ontology to be checked. * @return An <code>OWLProfileReport</code> that describes whether or not the * ontology is within this profile. */
Checks an ontology and its import closure to see if it is within this profile
checkOntology
{ "repo_name": "ghxiao/drew", "path": "src/main/java/org/semanticweb/drew/ldlp/profile/LDLPProfile.java", "license": "apache-2.0", "size": 1772 }
[ "java.util.HashSet", "java.util.Set", "org.semanticweb.owlapi.model.OWLOntology", "org.semanticweb.owlapi.profiles.OWLProfileReport", "org.semanticweb.owlapi.profiles.OWLProfileViolation", "org.semanticweb.owlapi.util.OWLOntologyWalker" ]
import java.util.HashSet; import java.util.Set; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.profiles.OWLProfileReport; import org.semanticweb.owlapi.profiles.OWLProfileViolation; import org.semanticweb.owlapi.util.OWLOntologyWalker;
import java.util.*; import org.semanticweb.owlapi.model.*; import org.semanticweb.owlapi.profiles.*; import org.semanticweb.owlapi.util.*;
[ "java.util", "org.semanticweb.owlapi" ]
java.util; org.semanticweb.owlapi;
282,180
@Test public void getUserSecurityName() throws Exception { servlet.setExpectedMethodName("getUserSecurityName"); servlet.setFakeResponse("user1"); assertEquals("user1", servlet.getUserSecurityName("user1")); }
void function() throws Exception { servlet.setExpectedMethodName(STR); servlet.setFakeResponse("user1"); assertEquals("user1", servlet.getUserSecurityName("user1")); }
/** * Test method for {@link com.ibm.ws.security.registry.test.UserRegistryServletConnection#getUserSecurityName(java.lang.String)}. */
Test method for <code>com.ibm.ws.security.registry.test.UserRegistryServletConnection#getUserSecurityName(java.lang.String)</code>
getUserSecurityName
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.registry_test.servlet/test/com/ibm/ws/security/registry/test/UserRegistryServletConnectionTest.java", "license": "epl-1.0", "size": 29746 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,253,019
@Override public void close() throws IOException { unregister(); if (mPeripheralDevice != null) { mPeripheralDevice.setOnCapTouchListener(null); try { mPeripheralDevice.close(); } finally { mPeripheralDevice = null; ...
void function() throws IOException { unregister(); if (mPeripheralDevice != null) { mPeripheralDevice.setOnCapTouchListener(null); try { mPeripheralDevice.close(); } finally { mPeripheralDevice = null; } } }
/** * Close this driver and any underlying resources associated with the connection. */
Close this driver and any underlying resources associated with the connection
close
{ "repo_name": "Ic-ks/contrib-drivers", "path": "cap12xx/src/main/java/com/google/android/things/contrib/driver/cap12xx/Cap12xxInputDriver.java", "license": "apache-2.0", "size": 9438 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,103,355
public static PropertiesConfiguration loadServletContextPropFile(String propFile, ServletContext servletContext) throws ServletException { PropertiesConfiguration pc = null; InputStream in = null; URL propFileURL = null; try { if (pc==null && servletContext!=null) { propFileURL = servletContext.getRes...
static PropertiesConfiguration function(String propFile, ServletContext servletContext) throws ServletException { PropertiesConfiguration pc = null; InputStream in = null; URL propFileURL = null; try { if (pc==null && servletContext!=null) { propFileURL = servletContext.getResource(STR+propFile); in = propFileURL.openS...
/** * Gets the PropertiesConfiguration for a property file from servlet context * @param propFile * @param servletContext * @return * @throws ServletException */
Gets the PropertiesConfiguration for a property file from servlet context
loadServletContextPropFile
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/dbase/HandleHome.java", "license": "gpl-3.0", "size": 45027 }
[ "java.io.InputStream", "javax.servlet.ServletContext", "javax.servlet.ServletException", "org.apache.commons.configuration.PropertiesConfiguration" ]
import java.io.InputStream; import javax.servlet.ServletContext; import javax.servlet.ServletException; import org.apache.commons.configuration.PropertiesConfiguration;
import java.io.*; import javax.servlet.*; import org.apache.commons.configuration.*;
[ "java.io", "javax.servlet", "org.apache.commons" ]
java.io; javax.servlet; org.apache.commons;
722,355
public static SAXParserFactory enableNamespaceAware(SAXParserFactory factory) { factory.setNamespaceAware(true); return factory; }
static SAXParserFactory function(SAXParserFactory factory) { factory.setNamespaceAware(true); return factory; }
/** * fluent method to enable namespace awareness * * @param factory * @return */
fluent method to enable namespace awareness
enableNamespaceAware
{ "repo_name": "businesscode/BCD-UI", "path": "Server/src/main/java/de/businesscode/util/xml/SecureXmlFactory.java", "license": "apache-2.0", "size": 6172 }
[ "javax.xml.parsers.SAXParserFactory" ]
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.*;
[ "javax.xml" ]
javax.xml;
2,481,309
@Nonnull List<CardInfo> search(String cardName);
List<CardInfo> search(String cardName);
/** * Searches for Hearthstone's card by its name. * * @param cardName CardInfo name. * @return List of cards that matches provided card name or an empty list if no card was found. */
Searches for Hearthstone's card by its name
search
{ "repo_name": "MartinPesek/Taejo", "path": "hearthstone/src/main/java/net/taejo/hearthstone/service/HearthstoneService.java", "license": "mit", "size": 455 }
[ "java.util.List", "net.taejo.hearthstone.model.CardInfo" ]
import java.util.List; import net.taejo.hearthstone.model.CardInfo;
import java.util.*; import net.taejo.hearthstone.model.*;
[ "java.util", "net.taejo.hearthstone" ]
java.util; net.taejo.hearthstone;
420,994
public void testMustRewrite() throws IOException { SearchExecutionContext context = createSearchExecutionContext(); context.setAllowUnmappedFields(true); QB queryBuilder = createTestQueryBuilder(); queryBuilder.toQuery(context); }
void function() throws IOException { SearchExecutionContext context = createSearchExecutionContext(); context.setAllowUnmappedFields(true); QB queryBuilder = createTestQueryBuilder(); queryBuilder.toQuery(context); }
/** * This test ensures that queries that need to be rewritten have dedicated tests. * These queries must override this method accordingly. */
This test ensures that queries that need to be rewritten have dedicated tests. These queries must override this method accordingly
testMustRewrite
{ "repo_name": "robin13/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java", "license": "apache-2.0", "size": 37682 }
[ "java.io.IOException", "org.elasticsearch.index.query.SearchExecutionContext" ]
import java.io.IOException; import org.elasticsearch.index.query.SearchExecutionContext;
import java.io.*; import org.elasticsearch.index.query.*;
[ "java.io", "org.elasticsearch.index" ]
java.io; org.elasticsearch.index;
2,355,930
OptionalLong tryLock(K key);
OptionalLong tryLock(K key);
/** * Attempts to acquire a lock on the given key. * * @param key the key for which to acquire the lock * @return an optional long containing the version of the key at the time it was locked */
Attempts to acquire a lock on the given key
tryLock
{ "repo_name": "atomix/atomix", "path": "core/src/main/java/io/atomix/core/map/AtomicMap.java", "license": "apache-2.0", "size": 16612 }
[ "java.util.OptionalLong" ]
import java.util.OptionalLong;
import java.util.*;
[ "java.util" ]
java.util;
219,481
Message readMessage() throws IOException;
Message readMessage() throws IOException;
/** * Attempts to reads a message from the socket, and returns it. * Note: The message will not be read if an exception occurs. * @return Message * @throws IOException Thrown if an IO error occurs while reading */
Attempts to reads a message from the socket, and returns it. Note: The message will not be read if an exception occurs
readMessage
{ "repo_name": "aaruff/LabManager", "path": "src/main/java/edu/nyu/cess/remote/common/message/MessageSocket.java", "license": "gpl-3.0", "size": 1448 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,147,928
public Set<FileArtifact> selectByKind(Class<?> type, boolean negate) { List<FileArtifact> result = new ArrayList<FileArtifact>(); selectByType(null, type, result, true, negate); return new ListSet<FileArtifact>(result, type); }
Set<FileArtifact> function(Class<?> type, boolean negate) { List<FileArtifact> result = new ArrayList<FileArtifact>(); selectByType(null, type, result, true, negate); return new ListSet<FileArtifact>(result, type); }
/** * Does type selection of artifacts by subtyping. * * @param type the target type * @param negate negate the selection * @return the selected artifacts (the type will be adjusted to the actual * type of <code>type</code>) */
Does type selection of artifacts by subtyping
selectByKind
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/de.uni_hildesheim.sse.easy.instantiatorCore/src/net/ssehub/easy/instantiation/core/model/artifactModel/ArtifactModel.java", "license": "apache-2.0", "size": 21106 }
[ "java.util.ArrayList", "java.util.List", "net.ssehub.easy.instantiation.core.model.vilTypes.ListSet", "net.ssehub.easy.instantiation.core.model.vilTypes.Set" ]
import java.util.ArrayList; import java.util.List; import net.ssehub.easy.instantiation.core.model.vilTypes.ListSet; import net.ssehub.easy.instantiation.core.model.vilTypes.Set;
import java.util.*; import net.ssehub.easy.instantiation.core.model.*;
[ "java.util", "net.ssehub.easy" ]
java.util; net.ssehub.easy;
1,068,412
public FloatSample loadFloatSample(InputStream inputStream) throws IOException;
FloatSample function(InputStream inputStream) throws IOException;
/** * Load a FloatSample from an InputStream. This is handy when loading Resources from a JAR file. */
Load a FloatSample from an InputStream. This is handy when loading Resources from a JAR file
loadFloatSample
{ "repo_name": "philburk/jsyn", "path": "src/main/java/com/jsyn/util/AudioSampleLoader.java", "license": "apache-2.0", "size": 1321 }
[ "com.jsyn.data.FloatSample", "java.io.IOException", "java.io.InputStream" ]
import com.jsyn.data.FloatSample; import java.io.IOException; import java.io.InputStream;
import com.jsyn.data.*; import java.io.*;
[ "com.jsyn.data", "java.io" ]
com.jsyn.data; java.io;
1,188,187
public SingleOutputStreamOperator<Tuple2<String, Double>> getPredictedReactionTimeByAVGs( DataStream<Tuple7<String, String, Integer, String, Date, String, List<Double>>> data, double avg) { return data .timeWindowAll(TIME_WINDOW) .apply(new AverageWindowFunction()) .flatMap(new Pedic...
SingleOutputStreamOperator<Tuple2<String, Double>> function( DataStream<Tuple7<String, String, Integer, String, Date, String, List<Double>>> data, double avg) { return data .timeWindowAll(TIME_WINDOW) .apply(new AverageWindowFunction()) .flatMap(new PedictionByAVGFlatMap(avg)); }
/** * Make prediction * @param data * @param avg * @return */
Make prediction
getPredictedReactionTimeByAVGs
{ "repo_name": "lidox/big-data-fun", "path": "com.artursworld/src/main/java/reactiontest/online/OnlineMetrics.java", "license": "mit", "size": 10019 }
[ "java.util.Date", "java.util.List", "org.apache.flink.api.java.tuple.Tuple2", "org.apache.flink.api.java.tuple.Tuple7", "org.apache.flink.streaming.api.datastream.DataStream", "org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator" ]
import java.util.Date; import java.util.List; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.api.java.tuple.Tuple7; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;
import java.util.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.streaming.api.datastream.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
247,576
tryGcSoftlyReachableObjects(); WeakReference<Object> weakReference = new WeakReference<Object>(new Object()); do { System.gc(); } while (weakReference.get() != null); }
tryGcSoftlyReachableObjects(); WeakReference<Object> weakReference = new WeakReference<Object>(new Object()); do { System.gc(); } while (weakReference.get() != null); }
/** * Try to force VM to collect all the garbage along with soft- and weak-references. * Method doesn't guarantee to succeed, and should not be used in the production code. */
Try to force VM to collect all the garbage along with soft- and weak-references. Method doesn't guarantee to succeed, and should not be used in the production code
tryForceGC
{ "repo_name": "apixandru/intellij-community", "path": "platform/util/src/com/intellij/util/ref/GCUtil.java", "license": "apache-2.0", "size": 3466 }
[ "java.lang.ref.WeakReference" ]
import java.lang.ref.WeakReference;
import java.lang.ref.*;
[ "java.lang" ]
java.lang;
744,134
public EffectsChangedTrigger.Instance deserializeInstance(JsonObject json, JsonDeserializationContext context) { MobEffectsPredicate mobeffectspredicate = MobEffectsPredicate.deserialize(json.get("effects")); return new EffectsChangedTrigger.Instance(mobeffectspredicate); }
EffectsChangedTrigger.Instance function(JsonObject json, JsonDeserializationContext context) { MobEffectsPredicate mobeffectspredicate = MobEffectsPredicate.deserialize(json.get(STR)); return new EffectsChangedTrigger.Instance(mobeffectspredicate); }
/** * Deserialize a ICriterionInstance of this trigger from the data in the JSON. */
Deserialize a ICriterionInstance of this trigger from the data in the JSON
deserializeInstance
{ "repo_name": "Severed-Infinity/technium", "path": "build/tmp/recompileMc/sources/net/minecraft/advancements/critereon/EffectsChangedTrigger.java", "license": "gpl-3.0", "size": 5331 }
[ "com.google.gson.JsonDeserializationContext", "com.google.gson.JsonObject" ]
import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,244,145
public void windowGainedFocus(WindowEvent e) { } public void windowLostFocus(WindowEvent e) {}
void function(WindowEvent e) { } public void windowLostFocus(WindowEvent e) {}
/** * Posts an event to bring the related window to the front. * @see WindowFocusListener#windowGainedFocus(WindowEvent) */
Posts an event to bring the related window to the front
windowGainedFocus
{ "repo_name": "knabar/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerControl.java", "license": "gpl-2.0", "size": 25989 }
[ "java.awt.event.WindowEvent" ]
import java.awt.event.WindowEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,786,935
public List<ColumnName> getColumnList() { return columnList; }
List<ColumnName> function() { return columnList; }
/** * Get the list of columns to be retrieved. * * @return A list of {@link com.stratio.crossdata.common.data.ColumnName}. */
Get the list of columns to be retrieved
getColumnList
{ "repo_name": "ccaballe/crossdata", "path": "crossdata-common/src/main/java/com/stratio/crossdata/common/logicalplan/Project.java", "license": "apache-2.0", "size": 4171 }
[ "com.stratio.crossdata.common.data.ColumnName", "java.util.List" ]
import com.stratio.crossdata.common.data.ColumnName; import java.util.List;
import com.stratio.crossdata.common.data.*; import java.util.*;
[ "com.stratio.crossdata", "java.util" ]
com.stratio.crossdata; java.util;
1,090,155
public ImmutableList<Artifact> getBuiltinIncludeFiles(CppConfiguration cppConfiguration) { if (cppConfiguration.equals(getCppConfigurationEvenThoughItCanBeDifferentThanWhatTargetHas())) { return builtinIncludeFiles; } else { return targetBuiltinIncludeFiles; } }
ImmutableList<Artifact> function(CppConfiguration cppConfiguration) { if (cppConfiguration.equals(getCppConfigurationEvenThoughItCanBeDifferentThanWhatTargetHas())) { return builtinIncludeFiles; } else { return targetBuiltinIncludeFiles; } }
/** * Return the set of include files that may be included even if they are not mentioned in the * source file or any of the headers included by it. * * @param cppConfiguration */
Return the set of include files that may be included even if they are not mentioned in the source file or any of the headers included by it
getBuiltinIncludeFiles
{ "repo_name": "perezd/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java", "license": "apache-2.0", "size": 35072 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,769,432
public RangeDistributionBuilder add(String data) { Map<Double, Double> map = KeyValueFormat.parse(data, KeyValueFormat.newDoubleConverter(), KeyValueFormat.newDoubleConverter()); Number[] limits = map.keySet().toArray(new Number[map.size()]); if (bottomLimits == null) { init(limits); } else if ...
RangeDistributionBuilder function(String data) { Map<Double, Double> map = KeyValueFormat.parse(data, KeyValueFormat.newDoubleConverter(), KeyValueFormat.newDoubleConverter()); Number[] limits = map.keySet().toArray(new Number[map.size()]); if (bottomLimits == null) { init(limits); } else if (!areSameLimits(bottomLimit...
/** * Adds an existing Distribution to the current one. * It will create the entries if they don't exist. * Can be used to add the values of children resources for example * <p/> * The returned distribution will be invalidated in case the given value does not use the same bottom limits * * @param d...
Adds an existing Distribution to the current one. It will create the entries if they don't exist. Can be used to add the values of children resources for example The returned distribution will be invalidated in case the given value does not use the same bottom limits
add
{ "repo_name": "joansmith/sonarqube", "path": "sonar-plugin-api/src/main/java/org/sonar/api/ce/measure/RangeDistributionBuilder.java", "license": "lgpl-3.0", "size": 6228 }
[ "java.util.Map", "org.sonar.api.utils.KeyValueFormat" ]
import java.util.Map; import org.sonar.api.utils.KeyValueFormat;
import java.util.*; import org.sonar.api.utils.*;
[ "java.util", "org.sonar.api" ]
java.util; org.sonar.api;
2,122,785
@Exported(name="builtOn") public String getBuiltOnStr() { return builtOn; }
@Exported(name=STR) String function() { return builtOn; }
/** * Returns the name of the slave it was built on; null or "" if built by the master. * (null happens when we read old record that didn't have this information.) */
Returns the name of the slave it was built on; null or "" if built by the master. (null happens when we read old record that didn't have this information.)
getBuiltOnStr
{ "repo_name": "sumitk1/jenkins", "path": "core/src/main/java/hudson/model/AbstractBuild.java", "license": "mit", "size": 45066 }
[ "org.kohsuke.stapler.export.Exported" ]
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.*;
[ "org.kohsuke.stapler" ]
org.kohsuke.stapler;
2,039,639
public TaskTrackerInfo[] getBlacklistedTrackers() throws IOException, InterruptedException { return new TaskTrackerInfo[0]; }
TaskTrackerInfo[] function() throws IOException, InterruptedException { return new TaskTrackerInfo[0]; }
/** * Get all blacklisted trackers in cluster. * @return array of TaskTrackerInfo */
Get all blacklisted trackers in cluster
getBlacklistedTrackers
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapred/LocalJobRunner.java", "license": "apache-2.0", "size": 36910 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.TaskTrackerInfo" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.TaskTrackerInfo;
import java.io.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,190,257
DateFormat getTimestampFormat() throws StandardException;
DateFormat getTimestampFormat() throws StandardException;
/** * Get a formatter for formatting timestamps. The implementation may cache * this value, since it never changes for a given Locale. * * @exception StandardException Thrown on error */
Get a formatter for formatting timestamps. The implementation may cache this value, since it never changes for a given Locale
getTimestampFormat
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/iapi/services/i18n/LocaleFinder.java", "license": "apache-2.0", "size": 2004 }
[ "java.text.DateFormat", "org.apache.derby.iapi.error.StandardException" ]
import java.text.DateFormat; import org.apache.derby.iapi.error.StandardException;
import java.text.*; import org.apache.derby.iapi.error.*;
[ "java.text", "org.apache.derby" ]
java.text; org.apache.derby;
1,219,982
public boolean runInit( int threadId, int curIter, DiskSession sess) { // Create the test file, if this is the first test thread boolean initOK = false; if ( threadId == 1) { try { // Check if the test file exists String testFileName = getPerTestFileName( threadId, curIter); ...
boolean function( int threadId, int curIter, DiskSession sess) { boolean initOK = false; if ( threadId == 1) { try { String testFileName = getPerTestFileName( threadId, curIter); if ( isVerbose()) Debug.println( STR + testFileName + STR + sess.getServer()); CIFSDiskSession cifsSess = (CIFSDiskSession) sess; CIFSFile te...
/** * Initialize the test setup * * @param threadId int * @param curIter int * @param sess DiskSession * @return boolean */
Initialize the test setup
runInit
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/test-java/org/alfresco/jlan/test/cluster/ByteRangeLockingTest.java", "license": "lgpl-3.0", "size": 7435 }
[ "org.alfresco.jlan.client.CIFSDiskSession", "org.alfresco.jlan.client.CIFSFile", "org.alfresco.jlan.client.DiskSession", "org.alfresco.jlan.client.info.FileInfo", "org.alfresco.jlan.debug.Debug", "org.alfresco.jlan.server.filesys.AccessMode", "org.alfresco.jlan.server.filesys.FileAction", "org.alfresc...
import org.alfresco.jlan.client.CIFSDiskSession; import org.alfresco.jlan.client.CIFSFile; import org.alfresco.jlan.client.DiskSession; import org.alfresco.jlan.client.info.FileInfo; import org.alfresco.jlan.debug.Debug; import org.alfresco.jlan.server.filesys.AccessMode; import org.alfresco.jlan.server.filesys.FileAct...
import org.alfresco.jlan.client.*; import org.alfresco.jlan.client.info.*; import org.alfresco.jlan.debug.*; import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.smb.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
1,406,562
public void run() { long timeOfLastEvent = 0; long reserve = 0; final Map<String, Object> buffer = new HashMap<>(); String line; if (socket == null) { throw new IllegalStateException("Unable to run: socket is null."); } this.die = fal...
void function() { long timeOfLastEvent = 0; long reserve = 0; final Map<String, Object> buffer = new HashMap<>(); String line; if (socket == null) { throw new IllegalStateException(STR); } this.die = false; this.dead = false; AsyncEventPump dispatcher = new AsyncEventPump(this, rawDispatcher, Thread.currentThread().get...
/** * Reads line by line from the asterisk server, sets the protocol identifier * (using a generated * {@link org.asteriskjava.manager.event.ProtocolIdentifierReceivedEvent}) * as soon as it is received and dispatches the received events and * responses via the associated dispatcher. * ...
Reads line by line from the asterisk server, sets the protocol identifier (using a generated <code>org.asteriskjava.manager.event.ProtocolIdentifierReceivedEvent</code>) as soon as it is received and dispatches the received events and responses via the associated dispatcher
run
{ "repo_name": "asterisk-java/asterisk-java", "path": "src/main/java/org/asteriskjava/manager/internal/ManagerReaderImpl.java", "license": "apache-2.0", "size": 15927 }
[ "com.google.common.util.concurrent.RateLimiter", "java.io.IOException", "java.util.HashMap", "java.util.Locale", "java.util.Map", "org.asteriskjava.manager.event.DisconnectEvent", "org.asteriskjava.manager.event.ManagerEvent", "org.asteriskjava.manager.event.ProtocolIdentifierReceivedEvent", "org.as...
import com.google.common.util.concurrent.RateLimiter; import java.io.IOException; import java.util.HashMap; import java.util.Locale; import java.util.Map; import org.asteriskjava.manager.event.DisconnectEvent; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.manager.event.ProtocolIdentifierRe...
import com.google.common.util.concurrent.*; import java.io.*; import java.util.*; import org.asteriskjava.manager.event.*; import org.asteriskjava.manager.response.*; import org.asteriskjava.pbx.util.*; import org.asteriskjava.util.*;
[ "com.google.common", "java.io", "java.util", "org.asteriskjava.manager", "org.asteriskjava.pbx", "org.asteriskjava.util" ]
com.google.common; java.io; java.util; org.asteriskjava.manager; org.asteriskjava.pbx; org.asteriskjava.util;
2,192,026
public void setSipUri(SipURI sipUri) { this.sipUri = sipUri; }
void function(SipURI sipUri) { this.sipUri = sipUri; }
/** * To use a custom SipURI. If none configured, then the SipUri fallback to use the options toUser toHost:toPort */
To use a custom SipURI. If none configured, then the SipUri fallback to use the options toUser toHost:toPort
setSipUri
{ "repo_name": "DariusX/camel", "path": "components/camel-sip/src/main/java/org/apache/camel/component/sip/SipConfiguration.java", "license": "apache-2.0", "size": 30227 }
[ "javax.sip.address.SipURI" ]
import javax.sip.address.SipURI;
import javax.sip.address.*;
[ "javax.sip" ]
javax.sip;
2,500,016
private static List<ErrorInfo> getChildrenErrorsForCycle( SkyKey parent, Iterable<SkyKey> children, int childrenSize, NodeEntry entryForDebugging, ParallelEvaluatorContext evaluatorContext) throws InterruptedException { List<ErrorInfo> allErrors = new ArrayList<>(); boolean...
static List<ErrorInfo> function( SkyKey parent, Iterable<SkyKey> children, int childrenSize, NodeEntry entryForDebugging, ParallelEvaluatorContext evaluatorContext) throws InterruptedException { List<ErrorInfo> allErrors = new ArrayList<>(); boolean foundCycle = false; Map<SkyKey, ? extends NodeEntry> childMap = getAnd...
/** * Get all the errors of child nodes. There must be at least one cycle amongst them. * * @param children child nodes to query for errors. * @return List of ErrorInfos from all children that had errors. */
Get all the errors of child nodes. There must be at least one cycle amongst them
getChildrenErrorsForCycle
{ "repo_name": "meteorcloudy/bazel", "path": "src/main/java/com/google/devtools/build/skyframe/SimpleCycleDetector.java", "license": "apache-2.0", "size": 25255 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableSet", "com.google.common.collect.Iterables", "com.google.common.collect.Sets", "com.google.devtools.build.skyframe.proto.GraphInconsistency", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.Set" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.google.devtools.build.skyframe.proto.GraphInconsistency; import java.util.ArrayList; import java.util.List; import java.util.Map; impo...
import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.skyframe.proto.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,426,124
public static String makeMetaTag(String instance, String owner, Date lastDetachTime) { StringBuilder meta = new StringBuilder(); meta.append(String.format("%s=%s;", JanitorMonkey.INSTANCE_TAG_KEY, instance == null ? "" : instance)); meta.append(String.format("%s=%s;", BasicSi...
static String function(String instance, String owner, Date lastDetachTime) { StringBuilder meta = new StringBuilder(); meta.append(String.format(STR, JanitorMonkey.INSTANCE_TAG_KEY, instance == null ? "" : instance)); meta.append(String.format(STR, BasicSimianArmyContext.GLOBAL_OWNER_TAGKEY, owner == null ? "STR%s=%sST...
/** * Makes the Janitor meta tag for volumes to track the last attachment/detachment information. * The method is intentionally made public for testing. * @param instance the last attached instance * @param owner the last owner * @param lastDetachTime the detach time * @return the meta tag...
Makes the Janitor meta tag for volumes to track the last attachment/detachment information. The method is intentionally made public for testing
makeMetaTag
{ "repo_name": "jgabrielfreitas/SimianArmy", "path": "src/main/java/com/netflix/simianarmy/aws/janitor/VolumeTaggingMonkey.java", "license": "apache-2.0", "size": 13435 }
[ "com.netflix.simianarmy.aws.AWSResource", "com.netflix.simianarmy.basic.BasicSimianArmyContext", "com.netflix.simianarmy.janitor.JanitorMonkey", "java.util.Date" ]
import com.netflix.simianarmy.aws.AWSResource; import com.netflix.simianarmy.basic.BasicSimianArmyContext; import com.netflix.simianarmy.janitor.JanitorMonkey; import java.util.Date;
import com.netflix.simianarmy.aws.*; import com.netflix.simianarmy.basic.*; import com.netflix.simianarmy.janitor.*; import java.util.*;
[ "com.netflix.simianarmy", "java.util" ]
com.netflix.simianarmy; java.util;
415,747
@Test public void testMoveInvalidItemId() throws Exception { when(contentManagerMock.read(Mockito.any(Context.class), Mockito.anyString(), Mockito.anyString())).thenReturn(createItemMock()); doThrow(ErrorManager.createError(StudioImplErrorCode.ITEM_NOT_FOUND)).when(contentManagerMock...
void function() throws Exception { when(contentManagerMock.read(Mockito.any(Context.class), Mockito.anyString(), Mockito.anyString())).thenReturn(createItemMock()); doThrow(ErrorManager.createError(StudioImplErrorCode.ITEM_NOT_FOUND)).when(contentManagerMock).move(Mockito .any(Context.class), Mockito.any(Item.class), M...
/** * Use case 22: * Test move method using invalid item id. * * @throws Exception */
Use case 22: Test move method using invalid item id
testMoveInvalidItemId
{ "repo_name": "craftercms/studio3", "path": "impl/src/test/java/org/craftercms/studio/impl/content/DescriptorServiceImplTest.java", "license": "gpl-3.0", "size": 87171 }
[ "java.util.UUID", "junit.framework.Assert", "org.apache.commons.lang.RandomStringUtils", "org.craftercms.studio.commons.dto.Context", "org.craftercms.studio.commons.dto.Item", "org.craftercms.studio.commons.dto.ItemId", "org.craftercms.studio.commons.dto.Tenant", "org.craftercms.studio.commons.excepti...
import java.util.UUID; import junit.framework.Assert; import org.apache.commons.lang.RandomStringUtils; import org.craftercms.studio.commons.dto.Context; import org.craftercms.studio.commons.dto.Item; import org.craftercms.studio.commons.dto.ItemId; import org.craftercms.studio.commons.dto.Tenant; import org.craftercms...
import java.util.*; import junit.framework.*; import org.apache.commons.lang.*; import org.craftercms.studio.commons.dto.*; import org.craftercms.studio.commons.exception.*; import org.craftercms.studio.impl.exception.*; import org.junit.*; import org.mockito.*;
[ "java.util", "junit.framework", "org.apache.commons", "org.craftercms.studio", "org.junit", "org.mockito" ]
java.util; junit.framework; org.apache.commons; org.craftercms.studio; org.junit; org.mockito;
2,177,954
public final void changePassword(AdminPolicy policy, String user, String password) throws AerospikeException { if (cluster.getUser() == null) { throw new AerospikeException("Invalid user"); } String hash = AdminCommand.hashPassword(password); AdminCommand command = new AdminCommand(); byte[] userBytes ...
final void function(AdminPolicy policy, String user, String password) throws AerospikeException { if (cluster.getUser() == null) { throw new AerospikeException(STR); } String hash = AdminCommand.hashPassword(password); AdminCommand command = new AdminCommand(); byte[] userBytes = Buffer.stringToUtf8(user); if (Arrays.e...
/** * Change user's password. Clear-text password will be hashed using bcrypt before sending to server. * * @param policy admin configuration parameters, pass in null for defaults * @param user user name * @param password user password in clear-text format * @throws AerospikeException if command...
Change user's password. Clear-text password will be hashed using bcrypt before sending to server
changePassword
{ "repo_name": "wgpshashank/aerospike-client-java", "path": "client/src/com/aerospike/client/AerospikeClient.java", "license": "apache-2.0", "size": 64575 }
[ "com.aerospike.client.admin.AdminCommand", "com.aerospike.client.command.Buffer", "com.aerospike.client.policy.AdminPolicy", "java.util.Arrays" ]
import com.aerospike.client.admin.AdminCommand; import com.aerospike.client.command.Buffer; import com.aerospike.client.policy.AdminPolicy; import java.util.Arrays;
import com.aerospike.client.admin.*; import com.aerospike.client.command.*; import com.aerospike.client.policy.*; import java.util.*;
[ "com.aerospike.client", "java.util" ]
com.aerospike.client; java.util;
1,441,719
public Methods annotatedWithAny(final Class<? extends Annotation>... annotations) { if(annotations == null || annotations.length == 0) { return this; } return new Methods(filter(new Criterion() {
Methods function(final Class<? extends Annotation>... annotations) { if(annotations == null annotations.length == 0) { return this; } return new Methods(filter(new Criterion() {
/** * <p>Filters the {@link Method}s which are annotated with <b>any</b> of the given annotations and * returns a new instance of {@link Methods} that wrap the filtered collection.</p> * * @param annotation * the {@link Method}s annotated with <b>any</b> of these types will be filtered * <br><br> * @...
Filters the <code>Method</code>s which are annotated with any of the given annotations and returns a new instance of <code>Methods</code> that wrap the filtered collection
annotatedWithAny
{ "repo_name": "sahan/Sneeze", "path": "src/main/java/com/lonepulse/sneeze/reflection/Methods.java", "license": "apache-2.0", "size": 14080 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
2,757,516
void includeLogin(PortalRenderContext rcontext, HttpServletRequest req, Session session);
void includeLogin(PortalRenderContext rcontext, HttpServletRequest req, Session session);
/** * include the part od the view tree needed to render login * * @param rcontext * @param req * @param session */
include the part od the view tree needed to render login
includeLogin
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "portal/portal-api/api/src/java/org/sakaiproject/portal/api/Portal.java", "license": "apache-2.0", "size": 12307 }
[ "javax.servlet.http.HttpServletRequest", "org.sakaiproject.tool.api.Session" ]
import javax.servlet.http.HttpServletRequest; import org.sakaiproject.tool.api.Session;
import javax.servlet.http.*; import org.sakaiproject.tool.api.*;
[ "javax.servlet", "org.sakaiproject.tool" ]
javax.servlet; org.sakaiproject.tool;
2,195,309
public Task ant(Closure<?> block) { return (Task) getAnt().invokeMethod("sequential", block); }
Task function(Closure<?> block) { return (Task) getAnt().invokeMethod(STR, block); }
/** * Invoke an Ant block. */
Invoke an Ant block
ant
{ "repo_name": "blankazucenalg/lenskit", "path": "lenskit-eval/src/main/java/org/grouplens/lenskit/eval/script/TargetDelegate.java", "license": "lgpl-2.1", "size": 2362 }
[ "groovy.lang.Closure", "org.apache.tools.ant.Task" ]
import groovy.lang.Closure; import org.apache.tools.ant.Task;
import groovy.lang.*; import org.apache.tools.ant.*;
[ "groovy.lang", "org.apache.tools" ]
groovy.lang; org.apache.tools;
1,118,764
private CompileInfo firstRoundProcess(String line) throws TTK91CompileException { String[] lineTemp; boolean nothingFound = true; String comment = ""; String[] commentParameters; int intValue = 0; String[] symbolTableEntry = new String[2]; boolean labelFound = false; boolean variableUsed = false; compileD...
CompileInfo function(String line) throws TTK91CompileException { String[] lineTemp; boolean nothingFound = true; String comment = STRFirst round of compilation.STRdefSTRstdinSTRstdoutSTRInvalid label.STRInvalid label.STRdsSTRInvalid size for a STRDS.STRInvalid size for a STRDS.STRdcSTRInvalid value for a STRDC.STRInval...
/** This function gathers new symbol information from the given line and checks its syntax. If a data reservation is detected, the dataAreaSize is incremented accordingly. If the line contains an actual command, commandLineCount is incremented. @param line The line of code to process. @return A CompileInfo ob...
This function gathers new symbol information from the given line
firstRoundProcess
{ "repo_name": "titokone/koski", "path": "fi/hu/cs/titokone/Compiler.java", "license": "lgpl-2.1", "size": 39376 }
[ "fi.hu.cs.ttk91.TTK91CompileException" ]
import fi.hu.cs.ttk91.TTK91CompileException;
import fi.hu.cs.ttk91.*;
[ "fi.hu.cs" ]
fi.hu.cs;
2,432,644
Collection<Capability> getProviderCapabilities(String scheme) throws FileSystemException;
Collection<Capability> getProviderCapabilities(String scheme) throws FileSystemException;
/** * Gets the capabilities for a given scheme. * * @param scheme The scheme to use to locate the provider's capabilities. * @return A Collection of the various capabilities. * @throws FileSystemException if the given scheme is not konwn. */
Gets the capabilities for a given scheme
getProviderCapabilities
{ "repo_name": "apache/commons-vfs", "path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemManager.java", "license": "apache-2.0", "size": 13908 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,237,231
public RowExpression rewriteExpressionAllowNonDeterministic(RowExpression expression, Predicate<VariableReferenceExpression> variableScope) { return rewriteExpression(expression, variableScope, true); }
RowExpression function(RowExpression expression, Predicate<VariableReferenceExpression> variableScope) { return rewriteExpression(expression, variableScope, true); }
/** * Attempts to rewrite an Expression in terms of the symbols allowed by the symbol scope * given the known equalities. Returns null if unsuccessful. * This method allows rewriting non-deterministic expressions. */
Attempts to rewrite an Expression in terms of the symbols allowed by the symbol scope given the known equalities. Returns null if unsuccessful. This method allows rewriting non-deterministic expressions
rewriteExpressionAllowNonDeterministic
{ "repo_name": "ptkool/presto", "path": "presto-main/src/main/java/com/facebook/presto/sql/planner/RowExpressionEqualityInference.java", "license": "apache-2.0", "size": 23999 }
[ "com.facebook.presto.spi.relation.RowExpression", "com.facebook.presto.spi.relation.VariableReferenceExpression", "com.google.common.base.Predicate" ]
import com.facebook.presto.spi.relation.RowExpression; import com.facebook.presto.spi.relation.VariableReferenceExpression; import com.google.common.base.Predicate;
import com.facebook.presto.spi.relation.*; import com.google.common.base.*;
[ "com.facebook.presto", "com.google.common" ]
com.facebook.presto; com.google.common;
676,187
public static List<SessionData> getLiveSessions() { return new ArrayList<>(Arrays.asList(getRequestLogger().getLiveSessions())); }
static List<SessionData> function() { return new ArrayList<>(Arrays.asList(getRequestLogger().getLiveSessions())); }
/** * Gets the live sessions. * * @return the live sessions */
Gets the live sessions
getLiveSessions
{ "repo_name": "astrapi69/jaulp.wicket", "path": "jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/SessionExtensions.java", "license": "apache-2.0", "size": 3452 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.apache.wicket.protocol.http.IRequestLogger" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.wicket.protocol.http.IRequestLogger;
import java.util.*; import org.apache.wicket.protocol.http.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
1,368,803
public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc);
IgniteCache<K, V> function(ExpiryPolicy plc);
/** * Returns cache with the specified expired policy set. This policy will be used for each operation * invoked on the returned cache. * <p> * This method does not modify existing cache instance. * * @param plc Expire policy to use. * @return Cache instance with the specified expiry ...
Returns cache with the specified expired policy set. This policy will be used for each operation invoked on the returned cache. This method does not modify existing cache instance
withExpiryPolicy
{ "repo_name": "wmz7year/ignite", "path": "modules/core/src/main/java/org/apache/ignite/IgniteCache.java", "license": "apache-2.0", "size": 72037 }
[ "javax.cache.expiry.ExpiryPolicy" ]
import javax.cache.expiry.ExpiryPolicy;
import javax.cache.expiry.*;
[ "javax.cache" ]
javax.cache;
2,326,596
public static List<String> getUiRunningIssues( AddOn.BaseRunRequirements requirements, AddOnSearcher addOnSearcher) { List<String> issues = new ArrayList<>(3); if (requirements.hasMissingLibs()) { if (requirements.getAddOn() != requirements.getAddOnMissingLibs()) { ...
static List<String> function( AddOn.BaseRunRequirements requirements, AddOnSearcher addOnSearcher) { List<String> issues = new ArrayList<>(3); if (requirements.hasMissingLibs()) { if (requirements.getAddOn() != requirements.getAddOnMissingLibs()) { issues.add( Constant.messages.getString( STR, requirements.getAddOnMiss...
/** * Returns the textual representations of the running issues (e.g. Java version, dependency), if * any. * * <p>The messages are internationalised thus suitable for UI components. * * @param requirements the run requirements of the add-on * @param addOnSearcher the class responsible...
Returns the textual representations of the running issues (e.g. Java version, dependency), if any. The messages are internationalised thus suitable for UI components
getUiRunningIssues
{ "repo_name": "psiinon/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/control/AddOnRunIssuesUtils.java", "license": "apache-2.0", "size": 19334 }
[ "java.util.ArrayList", "java.util.List", "org.apache.commons.lang.SystemUtils", "org.parosproxy.paros.Constant" ]
import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.SystemUtils; import org.parosproxy.paros.Constant;
import java.util.*; import org.apache.commons.lang.*; import org.parosproxy.paros.*;
[ "java.util", "org.apache.commons", "org.parosproxy.paros" ]
java.util; org.apache.commons; org.parosproxy.paros;
1,136,133
Observable<ServiceResponse<Page<USqlTableType>>> listTableTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count);
Observable<ServiceResponse<Page<USqlTableType>>> listTableTypesWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count);
/** * Retrieves the list of table types from the Data Lake Analytics catalog. * * @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations. * @param databaseName The name of the database containing the table types. * @param schemaName The name of the sch...
Retrieves the list of table types from the Data Lake Analytics catalog
listTableTypesWithServiceResponseAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java", "license": "mit", "size": 188313 }
[ "com.microsoft.azure.Page", "com.microsoft.azure.management.datalake.analytics.models.USqlTableType", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.azure.management.datalake.analytics.models.USqlTableType; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
41,341
QueryTile tile = null; for (int index : indices) { List<QueryTile> tiles = tile == null ? mTiles : tile.children; assert index >= 0 && index < tiles.size(); tile = tiles.get(index); } return tile; }
QueryTile tile = null; for (int index : indices) { List<QueryTile> tiles = tile == null ? mTiles : tile.children; assert index >= 0 && index < tiles.size(); tile = tiles.get(index); } return tile; }
/** * Finds a tile by traversing the tree. * @param indices The indices for each child to select as the tree is traversed. * @return The matching {@link QueryTile} node. */
Finds a tile by traversing the tree
getTileAt
{ "repo_name": "endlessm/chromium-browser", "path": "components/query_tiles/android/java/src/org/chromium/components/query_tiles/TestTileProvider.java", "license": "bsd-3-clause", "size": 2700 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,473,577
public final void replace(String itemTag, Collection<T> items) { throwIfNull("itemTag",itemTag); throwIfNull("items",items); SQLiteDatabase database = crateSQLiteOpenHelper.getWritableDatabase(); int itemsRemoved = database.delete(tableName, TAG + "=?", new String[]{itemTag}); ...
final void function(String itemTag, Collection<T> items) { throwIfNull(STR,itemTag); throwIfNull("items",items); SQLiteDatabase database = crateSQLiteOpenHelper.getWritableDatabase(); int itemsRemoved = database.delete(tableName, TAG + "=?", new String[]{itemTag}); log(STR + itemsRemoved + STR + itemTag,null); database...
/** * Replaces all items with the given tag with new items with the same tag * @param itemTag Tag to replace * @param items Replacement items to store in the crate */
Replaces all items with the given tag with new items with the same tag
replace
{ "repo_name": "apringle/crate", "path": "src/main/java/uk/co/alexpringle/crate/Crate.java", "license": "apache-2.0", "size": 13656 }
[ "android.database.sqlite.SQLiteDatabase", "java.util.Collection" ]
import android.database.sqlite.SQLiteDatabase; import java.util.Collection;
import android.database.sqlite.*; import java.util.*;
[ "android.database", "java.util" ]
android.database; java.util;
634,083
@POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) public Response onPost(@FormParam("namespace") String namespace, @FormParam("name") String name, String ignored) { ResourceCreationResult res = this.onPost(namespace, name); return res.getResponse(); }
@Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(MediaType.TEXT_PLAIN) Response function(@FormParam(STR) String namespace, @FormParam("name") String name, String ignored) { ResourceCreationResult res = this.onPost(namespace, name); return res.getResponse(); }
/** * Creates a new component instance in the given namespace * * @param namespace plain namespace * @param name plain id * @param ignored this parameter is ignored, but necessary for {@link ArtifactTemplatesResource} to be able to * accept the artifact type at a post */
Creates a new component instance in the given namespace
onPost
{ "repo_name": "YannicSowoidnich/winery", "path": "org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/resources/AbstractComponentsWithoutTypeReferenceResource.java", "license": "apache-2.0", "size": 2276 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.FormParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.eclipse.winery.repository.backend.ResourceCreationResult" ]
import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.eclipse.winery.repository.backend.ResourceCreationResult;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.eclipse.winery.repository.backend.*;
[ "javax.ws", "org.eclipse.winery" ]
javax.ws; org.eclipse.winery;
1,332,913
@VisibleForTesting protected void copyFromHost(MapHost host) throws IOException { // reset retryStartTime for a new host retryStartTime = 0; // Get completed maps on 'host' List<InputAttemptIdentifier> srcAttempts = scheduler.getMapsForHost(host); // Sanity check to catch hosts with only 'OBSOLE...
void function(MapHost host) throws IOException { retryStartTime = 0; List<InputAttemptIdentifier> srcAttempts = scheduler.getMapsForHost(host); if (srcAttempts.size() == 0) { return; } if(LOG.isDebugEnabled()) { LOG.debug(STR + id + STR + host + STR + srcAttempts + STR + currentPartition); } populateRemainingMap(srcAtt...
/** * The crux of the matter... * * @param host {@link MapHost} from which we need to * shuffle available map-outputs. */
The crux of the matter..
copyFromHost
{ "repo_name": "guiling/tez", "path": "tez-runtime-library/src/main/java/org/apache/tez/runtime/library/common/shuffle/orderedgrouped/FetcherOrderedGrouped.java", "license": "apache-2.0", "size": 27093 }
[ "java.io.IOException", "java.util.Arrays", "java.util.List", "org.apache.tez.runtime.library.common.InputAttemptIdentifier", "org.apache.tez.runtime.library.exceptions.FetcherReadTimeoutException" ]
import java.io.IOException; import java.util.Arrays; import java.util.List; import org.apache.tez.runtime.library.common.InputAttemptIdentifier; import org.apache.tez.runtime.library.exceptions.FetcherReadTimeoutException;
import java.io.*; import java.util.*; import org.apache.tez.runtime.library.common.*; import org.apache.tez.runtime.library.exceptions.*;
[ "java.io", "java.util", "org.apache.tez" ]
java.io; java.util; org.apache.tez;
2,819,146
AssetImpl obtainAsset(String id);
AssetImpl obtainAsset(String id);
/** * Convenience method for obtainsById(AssetImpl.class, id) * * @param id * - ID of asset to be read * @return - the asset or null if not found */
Convenience method for obtainsById(AssetImpl.class, id)
obtainAsset
{ "repo_name": "bdaum/zoraPD", "path": "com.bdaum.zoom.core/src/com/bdaum/zoom/core/db/IDbManager.java", "license": "gpl-2.0", "size": 21435 }
[ "com.bdaum.zoom.cat.model.asset.AssetImpl" ]
import com.bdaum.zoom.cat.model.asset.AssetImpl;
import com.bdaum.zoom.cat.model.asset.*;
[ "com.bdaum.zoom" ]
com.bdaum.zoom;
425,796
public static APIProductSearchResultDTO fromAPIProductToAPIResultDTO(APIProduct apiProduct) { APIProductSearchResultDTO apiProductResultDTO = new APIProductSearchResultDTO(); apiProductResultDTO.setId(apiProduct.getUuid()); APIProductIdentifier apiproductId = apiProduct.getId(); api...
static APIProductSearchResultDTO function(APIProduct apiProduct) { APIProductSearchResultDTO apiProductResultDTO = new APIProductSearchResultDTO(); apiProductResultDTO.setId(apiProduct.getUuid()); APIProductIdentifier apiproductId = apiProduct.getId(); apiProductResultDTO.setName(apiproductId.getName()); apiProductResu...
/** * Get API result representation for content search * * @param apiProduct APIProduct * @return APIProductSearchResultDTO */
Get API result representation for content search
fromAPIProductToAPIResultDTO
{ "repo_name": "harsha89/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/utils/mappings/SearchResultMappingUtil.java", "license": "apache-2.0", "size": 8583 }
[ "org.wso2.carbon.apimgt.api.model.APIProduct", "org.wso2.carbon.apimgt.api.model.APIProductIdentifier", "org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.APIProductSearchResultDTO", "org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.SearchResultDTO", "org.wso2.carbon.apimgt.rest.api.util.RestApiConstants" ]
import org.wso2.carbon.apimgt.api.model.APIProduct; import org.wso2.carbon.apimgt.api.model.APIProductIdentifier; import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.APIProductSearchResultDTO; import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.SearchResultDTO; import org.wso2.carbon.apimgt.rest.api.util.RestAp...
import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.*; import org.wso2.carbon.apimgt.rest.api.util.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,430,326
public static <T> Subject<T, T> replayWindowed(long time, TimeUnit unit, int bufferSize, final Scheduler scheduler) { final long ms = unit.toMillis(time); if (ms <= 0) { throw new IllegalArgumentException("The time window is less than 1 millisecond!"); }
static <T> Subject<T, T> function(long time, TimeUnit unit, int bufferSize, final Scheduler scheduler) { final long ms = unit.toMillis(time); if (ms <= 0) { throw new IllegalArgumentException(STR); }
/** * Create a CustomReplaySubject with the given time window length * and optional buffer size. * * @param <T> * the source and return type * @param time * the length of the time window * @param unit * the unit of the time window length ...
Create a CustomReplaySubject with the given time window length and optional buffer size
replayWindowed
{ "repo_name": "devisnik/RxJava", "path": "rxjava-core/src/main/java/rx/operators/OperationReplay.java", "license": "apache-2.0", "size": 25928 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
736,681
public ServiceCall<UserInner> createAsync(UserCreateParametersInner parameters, final ServiceCallback<UserInner> serviceCallback) { return ServiceCall.fromResponse(createWithServiceResponseAsync(parameters), serviceCallback); }
ServiceCall<UserInner> function(UserCreateParametersInner parameters, final ServiceCallback<UserInner> serviceCallback) { return ServiceCall.fromResponse(createWithServiceResponseAsync(parameters), serviceCallback); }
/** * Create a new user. * * @param parameters Parameters to create a user. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Create a new user
createAsync
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersInner.java", "license": "mit", "size": 38896 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
59,394
public Observable<ServiceResponse<EndpointInner>> updateWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, EndpointUpdateParametersInner endpointUpdateProperties) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGro...
Observable<ServiceResponse<EndpointInner>> function(String resourceGroupName, String profileName, String endpointName, EndpointUpdateParametersInner endpointUpdateProperties) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (profileName == null) { throw new IllegalArgumentException(STR);...
/** * Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags and Origin HostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain...
Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags and Origin HostHeader can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update custom domains, use the Update Custom Domain operation
updateWithServiceResponseAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-cdn/src/main/java/com/microsoft/azure/management/cdn/implementation/EndpointsInner.java", "license": "mit", "size": 136317 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
1,333,803
public static Test suite() { //NetworkServerTestSetup.setWaitTime( 10000L ); TestSuite suite = new TestSuite("SecureServerTest"); // Server booting requires that we run from the jar files if ( !TestConfiguration.loadingFromJars() ) { return suite; } ...
static Test function() { TestSuite suite = new TestSuite(STR); if ( !TestConfiguration.loadingFromJars() ) { return suite; } if (!Derby.hasServer()) return suite; suite.addTest( decorateTest( false, false, null, null, RUNNING_SECURITY_BOOTED ) ); suite.addTest( decorateTest( false, false, BASIC, null, RUNNING_SECURITY_...
/** * Tests to run. */
Tests to run
suite
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java", "license": "apache-2.0", "size": 17821 }
[ "junit.framework.Test", "junit.framework.TestSuite", "org.apache.derbyTesting.junit.Derby", "org.apache.derbyTesting.junit.TestConfiguration" ]
import junit.framework.Test; import junit.framework.TestSuite; import org.apache.derbyTesting.junit.Derby; import org.apache.derbyTesting.junit.TestConfiguration;
import junit.framework.*; import org.apache.*;
[ "junit.framework", "org.apache" ]
junit.framework; org.apache;
1,706,557
public static String cleanPath(String path) { if (path == null) { return null; } String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); // Strip prefix from path to analyze, to not treat it as part of the // first path element. This is nece...
static String function(String path) { if (path == null) { return null; } String pathToUse = replace(path, WINDOWS_FOLDER_SEPARATOR, FOLDER_SEPARATOR); int prefixIndex = pathToUse.indexOf(":"); String prefix = ""; if (prefixIndex != -1) { prefix = pathToUse.substring(0, prefixIndex + 1); pathToUse = pathToUse.substring(...
/** * Normalize the path by suppressing sequences like "path/.." and * inner simple dots. * <p>The result is convenient for path comparison. For other uses, * notice that Windows separators ("\") are replaced by simple slashes. * @param path the original path * @return the normalized path ...
Normalize the path by suppressing sequences like "path/.." and inner simple dots. The result is convenient for path comparison. For other uses, notice that Windows separators ("\") are replaced by simple slashes
cleanPath
{ "repo_name": "lanceleverich/drools", "path": "drools-core/src/main/java/org/drools/core/util/StringUtils.java", "license": "apache-2.0", "size": 47859 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,913,923
public StorageAccountCreateParameters withSku(SkuInner sku) { this.sku = sku; return this; }
StorageAccountCreateParameters function(SkuInner sku) { this.sku = sku; return this; }
/** * Set required. Gets or sets the sku name. * * @param sku the sku value to set * @return the StorageAccountCreateParameters object itself. */
Set required. Gets or sets the sku name
withSku
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/storage/mgmt-v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/StorageAccountCreateParameters.java", "license": "mit", "size": 11282 }
[ "com.microsoft.azure.management.storage.v2018_03_01_preview.implementation.SkuInner" ]
import com.microsoft.azure.management.storage.v2018_03_01_preview.implementation.SkuInner;
import com.microsoft.azure.management.storage.v2018_03_01_preview.implementation.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,927,808
public static Date addMinutesToDate(Date date, int minutes) { Calendar calendarDate = Calendar.getInstance(); calendarDate.setTime(date); calendarDate.add(Calendar.MINUTE, minutes); return calendarDate.getTime(); }
static Date function(Date date, int minutes) { Calendar calendarDate = Calendar.getInstance(); calendarDate.setTime(date); calendarDate.add(Calendar.MINUTE, minutes); return calendarDate.getTime(); }
/** * Agrega o quita minutos a una fecha dada. Para quitar minutos hay que * sumarle valores negativos. * * @param date * @param minutes * @return */
Agrega o quita minutos a una fecha dada. Para quitar minutos hay que sumarle valores negativos
addMinutesToDate
{ "repo_name": "alfonsodou/javaLeague2", "path": "src/org/javahispano/javaleague/server/servlets/AuthenticateUserServlet.java", "license": "gpl-2.0", "size": 2146 }
[ "java.util.Calendar", "java.util.Date" ]
import java.util.Calendar; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,299,109
public void optimize() throws OperatorException;
void function() throws OperatorException;
/** * Should be invoked to start optimization. Since the optimization can use * other (inner) operators to support fitness evaluation this method is * allowed to throw OperatorExceptions. */
Should be invoked to start optimization. Since the optimization can use other (inner) operators to support fitness evaluation this method is allowed to throw OperatorExceptions
optimize
{ "repo_name": "ntj/ComplexRapidMiner", "path": "src/com/rapidminer/tools/math/optimization/Optimization.java", "license": "gpl-2.0", "size": 2293 }
[ "com.rapidminer.operator.OperatorException" ]
import com.rapidminer.operator.OperatorException;
import com.rapidminer.operator.*;
[ "com.rapidminer.operator" ]
com.rapidminer.operator;
1,994,359
Set<IVariable<?>> getAlwaysBound();
Set<IVariable<?>> getAlwaysBound();
/** * Return the subset of the variables which are bound in all solutions. */
Return the subset of the variables which are bound in all solutions
getAlwaysBound
{ "repo_name": "wikimedia/wikidata-query-blazegraph", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/ISolutionSetStats.java", "license": "gpl-2.0", "size": 2433 }
[ "com.bigdata.bop.IVariable", "java.util.Set" ]
import com.bigdata.bop.IVariable; import java.util.Set;
import com.bigdata.bop.*; import java.util.*;
[ "com.bigdata.bop", "java.util" ]
com.bigdata.bop; java.util;
108,686
protected void addInput__iResetOrderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CtrlUnit94_Input__iResetOrder_feature"), getString...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.eINSTANCE.getCtrlUnit94_Input__iResetOrder(), true, false, true, null, null, null))...
/** * This adds a property descriptor for the Input iReset Order feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Input iReset Order feature.
addInput__iResetOrderPropertyDescriptor
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/ikerlanEMF.edit/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/provider/CtrlUnit94ItemProvider.java", "license": "epl-1.0", "size": 4983 }
[ "eu.mondo.collaboration.operationtracemodel.example.WTSpec", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import eu.mondo.collaboration.operationtracemodel.example.WTSpec; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import eu.mondo.collaboration.operationtracemodel.example.*; import org.eclipse.emf.edit.provider.*;
[ "eu.mondo.collaboration", "org.eclipse.emf" ]
eu.mondo.collaboration; org.eclipse.emf;
541,566
public static degreesLongitudeType fromPerAligned(byte[] encodedBytes) { degreesLongitudeType result = new degreesLongitudeType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static degreesLongitudeType function(byte[] encodedBytes) { degreesLongitudeType result = new degreesLongitudeType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new degreesLongitudeType from encoded stream. */
Creates a new degreesLongitudeType from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/lpp/PolygonPoints.java", "license": "apache-2.0", "size": 17597 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
1,625,445
public void setStartDate(Date newStartDate) { startDate = newStartDate; startDateESet = true; }
void function(Date newStartDate) { startDate = newStartDate; startDateESet = true; }
/** * Sets the value of the '{@link CIM15.IEC61970.LoadModel.Season#getStartDate <em>Start Date</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Start Date</em>' attribute. * @see #isSetStartDate() * @see #unsetStartDate() * @see #getStartDate() ...
Sets the value of the '<code>CIM15.IEC61970.LoadModel.Season#getStartDate Start Date</code>' attribute.
setStartDate
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61970/LoadModel/Season.java", "license": "apache-2.0", "size": 13652 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
305,249
private void setClassPath() { // Validate our current state information if (!(container instanceof Context)) return; ServletContext servletContext = ((Context) container).getServletContext(); if (servletContext == null) return; if (contai...
void function() { if (!(container instanceof Context)) return; ServletContext servletContext = ((Context) container).getServletContext(); if (servletContext == null) return; if (container instanceof StandardContext) { String baseClasspath = ((StandardContext) container).getCompilerClasspath(); if (baseClasspath != null...
/** * Set the appropriate context attribute for our class path. This * is required only because Jasper depends on it. */
Set the appropriate context attribute for our class path. This is required only because Jasper depends on it
setClassPath
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/loader/WebappLoader.java", "license": "apache-2.0", "size": 38135 }
[ "java.io.File", "java.net.URLClassLoader", "javax.servlet.ServletContext", "org.apache.catalina.Context", "org.apache.catalina.Globals", "org.apache.catalina.core.StandardContext" ]
import java.io.File; import java.net.URLClassLoader; import javax.servlet.ServletContext; import org.apache.catalina.Context; import org.apache.catalina.Globals; import org.apache.catalina.core.StandardContext;
import java.io.*; import java.net.*; import javax.servlet.*; import org.apache.catalina.*; import org.apache.catalina.core.*;
[ "java.io", "java.net", "javax.servlet", "org.apache.catalina" ]
java.io; java.net; javax.servlet; org.apache.catalina;
2,118,643
public PathSubject isSameFileAs(Path path) throws IOException { if (!Files.isSameFile(getSubject(), path)) { fail("is same file as", path); } return this; }
PathSubject function(Path path) throws IOException { if (!Files.isSameFile(getSubject(), path)) { fail(STR, path); } return this; }
/** * Asserts that the path resolves to the same file as the given path. */
Asserts that the path resolves to the same file as the given path
isSameFileAs
{ "repo_name": "rasheedamir/jimfs", "path": "jimfs/src/test/java/com/google/common/jimfs/PathSubject.java", "license": "apache-2.0", "size": 13458 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,370,455
@Test(timeout=360000) public void testDecommissionWithNamenodeRestart()throws IOException, InterruptedException { LOG.info("Starting test testDecommissionWithNamenodeRestart"); int numNamenodes = 1; int numDatanodes = 1; int replicas = 1; conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_...
@Test(timeout=360000) void function()throws IOException, InterruptedException { LOG.info(STR); int numNamenodes = 1; int numDatanodes = 1; int replicas = 1; conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_DEFAULT); conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INIT...
/** * Tests restart of namenode while datanode hosts are added to exclude file **/
Tests restart of namenode while datanode hosts are added to exclude file
testDecommissionWithNamenodeRestart
{ "repo_name": "Authorlove/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java", "license": "apache-2.0", "size": 48971 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Arrays", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.protocol.DatanodeID", "org.apache.hadoop.hdfs.protocol.DatanodeInfo", "org.apache.hadoop.hdfs.protocol.HdfsConstants", "org.apache.hadoop.hdfs.ser...
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import ...
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.junit" ]
java.io; java.util; org.apache.hadoop; org.junit;
1,429,212
@Override public void unsetOrganizationUsers( long organizationId, final long[] userIds) throws PortalException, SystemException { Organization organization = organizationPersistence.findByPrimaryKey( organizationId); final Group group = organization.getGroup(); userGroupRoleLocalService.deleteUser...
void function( long organizationId, final long[] userIds) throws PortalException, SystemException { Organization organization = organizationPersistence.findByPrimaryKey( organizationId); final Group group = organization.getGroup(); userGroupRoleLocalService.deleteUserGroupRoles( userIds, group.getGroupId()); organizati...
/** * Removes the users from the organization. * * @param organizationId the primary key of the organization * @param userIds the primary keys of the users * @throws PortalException if a portal exception occurred * @throws SystemException if a system exception occurred */
Removes the users from the organization
unsetOrganizationUsers
{ "repo_name": "jtydhr88/blade.tools", "path": "blade.migrate.liferay70/projects/filetests/ContactNameExceptionImport.java", "license": "apache-2.0", "size": 193517 }
[ "com.liferay.portal.kernel.exception.PortalException", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.search.Indexer", "com.liferay.portal.kernel.search.IndexerRegistryUtil", "com.liferay.portal.model.Group", "com.liferay.portal.model.Organization", "com.liferay.portal...
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.search.Indexer; import com.liferay.portal.kernel.search.IndexerRegistryUtil; import com.liferay.portal.model.Group; import com.liferay.portal.model.Organization; impor...
import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.search.*; import com.liferay.portal.model.*; import com.liferay.portal.security.permission.*; import java.util.concurrent.*;
[ "com.liferay.portal", "java.util" ]
com.liferay.portal; java.util;
1,568,594
@Override public String getMessage() { // Get this exception's message. String msg = super.getMessage(); Throwable parent = this; Throwable child; // Look for nested exceptions. while ((child = getNestedException(parent)) != null) { // Get the child's message. String msg2 = child.getM...
String function() { String msg = super.getMessage(); Throwable parent = this; Throwable child; while ((child = getNestedException(parent)) != null) { String msg2 = child.getMessage(); if (child instanceof SAXException) { final Throwable grandchild = ((SAXException) child) .getException(); if (grandchild != null && msg2...
/** * This returns the message for the <code>Exception</code>. If there are * one or more nested exceptions, their messages are appended. * * @return <code>String</code> - message for <code>Exception</code>. */
This returns the message for the <code>Exception</code>. If there are one or more nested exceptions, their messages are appended
getMessage
{ "repo_name": "autermann/geosoftware", "path": "src/test/java/jdom/JDOMException.java", "license": "gpl-3.0", "size": 11802 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,841,918
public NetworkInterfaceIPConfigurationInner withVirtualNetworkTaps(List<VirtualNetworkTapInner> virtualNetworkTaps) { this.virtualNetworkTaps = virtualNetworkTaps; return this; }
NetworkInterfaceIPConfigurationInner function(List<VirtualNetworkTapInner> virtualNetworkTaps) { this.virtualNetworkTaps = virtualNetworkTaps; return this; }
/** * Set the reference to Virtual Network Taps. * * @param virtualNetworkTaps the virtualNetworkTaps value to set * @return the NetworkInterfaceIPConfigurationInner object itself. */
Set the reference to Virtual Network Taps
withVirtualNetworkTaps
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/NetworkInterfaceIPConfigurationInner.java", "license": "mit", "size": 13524 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,244,830
@Test public void testAbstractFileSystemImplementationForWasbsScheme() throws Exception { try { testAccount = AzureBlobStorageTestAccount.createMock(); Configuration conf = testAccount.getFileSystem().getConf(); String authority = testAccount.getFileSystem().getUri().getAuthority(); URI ...
void function() throws Exception { try { testAccount = AzureBlobStorageTestAccount.createMock(); Configuration conf = testAccount.getFileSystem().getConf(); String authority = testAccount.getFileSystem().getUri().getAuthority(); URI defaultUri = new URI("wasbs", authority, null, null, null); conf.set(FS_DEFAULT_NAME_KE...
/** * Tests the cases when the scheme specified is 'wasbs'. */
Tests the cases when the scheme specified is 'wasbs'
testAbstractFileSystemImplementationForWasbsScheme
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/ITestWasbUriAndConfiguration.java", "license": "apache-2.0", "size": 25086 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.AbstractFileSystem", "org.apache.hadoop.fs.FileContext", "org.apache.hadoop.fs.FileSystem" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.AbstractFileSystem; import org.apache.hadoop.fs.FileContext; import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,728,768
public int setBytes(long pos, byte[] bytes) throws SQLException { try { if (isDebugEnabled()) { debugCode("setBytes("+pos+", "+quoteBytes(bytes)+");"); } checkClosed(); if (pos != 1) { throw DbException.getInvalidValueException(...
int function(long pos, byte[] bytes) throws SQLException { try { if (isDebugEnabled()) { debugCode(STR+pos+STR+quoteBytes(bytes)+");"); } checkClosed(); if (pos != 1) { throw DbException.getInvalidValueException("pos", pos); } value = conn.createBlob(new ByteArrayInputStream(bytes), -1); return bytes.length; } catch (E...
/** * Fills the Blob. This is only supported for new, empty Blob objects that * were created with Connection.createBlob(). The position * must be 1, meaning the whole Blob data is set. * * @param pos where to start writing (the first byte is at position 1) * @param bytes the bytes to set ...
Fills the Blob. This is only supported for new, empty Blob objects that were created with Connection.createBlob(). The position must be 1, meaning the whole Blob data is set
setBytes
{ "repo_name": "titus08/frostwire-desktop", "path": "lib/jars-src/h2-1.3.164/org/h2/jdbc/JdbcBlob.java", "license": "gpl-3.0", "size": 10509 }
[ "java.io.ByteArrayInputStream", "java.sql.SQLException", "org.h2.message.DbException" ]
import java.io.ByteArrayInputStream; import java.sql.SQLException; import org.h2.message.DbException;
import java.io.*; import java.sql.*; import org.h2.message.*;
[ "java.io", "java.sql", "org.h2.message" ]
java.io; java.sql; org.h2.message;
2,247,249
EAttribute getHYWE_EvalTm();
EAttribute getHYWE_EvalTm();
/** * Returns the meta object for the attribute '{@link gluemodel.substationStandard.Dataclasses.HYWE#getEvalTm <em>Eval Tm</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Eval Tm</em>'. * @see gluemodel.substationStandard.Dataclasses.HYWE#getEvalTm()...
Returns the meta object for the attribute '<code>gluemodel.substationStandard.Dataclasses.HYWE#getEvalTm Eval Tm</code>'.
getHYWE_EvalTm
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/Dataclasses/DataclassesPackage.java", "license": "mit", "size": 381891 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,297,761
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.switch_account: mProcessingFragment.signInAndSubscribe(true); return true; default: return super.onOptionsItemSelected(item); ...
boolean function(MenuItem item) { switch (item.getItemId()) { case R.id.switch_account: mProcessingFragment.signInAndSubscribe(true); return true; default: return super.onOptionsItemSelected(item); } }
/** * Override Activity lifecycle method. * <p> * To add more option menu items in your client, add the item to menu/activity_main.xml, * and provide additional case statements in this method. */
Override Activity lifecycle method. To add more option menu items in your client, add the item to menu/activity_main.xml, and provide additional case statements in this method
onOptionsItemSelected
{ "repo_name": "isattil4/solutions-mobile-backend-starter-android-client", "path": "src/com/google/cloud/backend/sample/guestbook/GuestbookActivity.java", "license": "apache-2.0", "size": 12377 }
[ "android.view.MenuItem" ]
import android.view.MenuItem;
import android.view.*;
[ "android.view" ]
android.view;
137,609
@Test public void testNNClearsCommandsOnFailoverAfterStartup() throws Exception { // Make lots of blocks to increase chances of triggering a bug. DFSTestUtil.createFile(fs, TEST_FILE_PATH, 30*SMALL_BLOCK, (short)3, 1L); banner("Shutting down NN2"); cluster.shutdownNameNode(1); banner("Se...
void function() throws Exception { DFSTestUtil.createFile(fs, TEST_FILE_PATH, 30*SMALL_BLOCK, (short)3, 1L); banner(STR); cluster.shutdownNameNode(1); banner(STR); nn1.getRpcServer().setReplication(TEST_FILE, (short) 1); nn1.getRpcServer().rollEditLog(); banner(STR); cluster.restartNameNode(1); nn2 = cluster.getNameNod...
/** * Test case which restarts the standby node in such a way that, * when it exits safemode, it will want to invalidate a bunch * of over-replicated block replicas. Ensures that if we failover * at this point it won't lose data. */
Test case which restarts the standby node in such a way that, when it exits safemode, it will want to invalidate a bunch of over-replicated block replicas. Ensures that if we failover at this point it won't lose data
testNNClearsCommandsOnFailoverAfterStartup
{ "repo_name": "bysslord/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestDNFencing.java", "license": "apache-2.0", "size": 24766 }
[ "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.hdfs.DFSTestUtil", "org.apache.hadoop.hdfs.server.blockmanagement.BlockManager", "org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerTestUtil", "org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter", "org.junit.Assert" ]
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.server.blockmanagement.BlockManager; import org.apache.hadoop.hdfs.server.blockmanagement.BlockManagerTestUtil; import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter; import org.junit.Assert;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
515,615
private PartitionedIndex createIndexOnPRBuckets() throws IndexNameConflictException, IndexExistsException, IndexCreationException { Set localBuckets = getDataStore().getAllLocalBuckets(); Iterator it = localBuckets.iterator(); QCompiler compiler = new QCompiler(); if (imports != nul...
PartitionedIndex function() throws IndexNameConflictException, IndexExistsException, IndexCreationException { Set localBuckets = getDataStore().getAllLocalBuckets(); Iterator it = localBuckets.iterator(); QCompiler compiler = new QCompiler(); if (imports != null) { compiler.compileImports(imports); } PartitionedIndex p...
/** * This creates indexes on PR buckets. */
This creates indexes on PR buckets
createIndexOnPRBuckets
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 381189 }
[ "java.util.Iterator", "java.util.Map", "java.util.Set", "org.apache.geode.cache.Region", "org.apache.geode.cache.query.Index", "org.apache.geode.cache.query.IndexCreationException", "org.apache.geode.cache.query.IndexExistsException", "org.apache.geode.cache.query.IndexNameConflictException", "org.a...
import java.util.Iterator; import java.util.Map; import java.util.Set; import org.apache.geode.cache.Region; import org.apache.geode.cache.query.Index; import org.apache.geode.cache.query.IndexCreationException; import org.apache.geode.cache.query.IndexExistsException; import org.apache.geode.cache.query.IndexNameConfl...
import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.*; import org.apache.geode.cache.query.internal.index.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
1,247,791
public interface JmxSampleProcessor { void process(JmxAttributeSample attributeSample, ObjectName objectName);
interface JmxSampleProcessor { void function(JmxAttributeSample attributeSample, ObjectName objectName);
/** * Callback method for each collected MBean Attribute. * * @param attributeSample The collected sample. */
Callback method for each collected MBean Attribute
process
{ "repo_name": "aihua/opennms", "path": "core/jmx/api/src/main/java/org/opennms/netmgt/jmx/JmxSampleProcessor.java", "license": "agpl-3.0", "size": 1897 }
[ "javax.management.ObjectName", "org.opennms.netmgt.jmx.samples.JmxAttributeSample" ]
import javax.management.ObjectName; import org.opennms.netmgt.jmx.samples.JmxAttributeSample;
import javax.management.*; import org.opennms.netmgt.jmx.samples.*;
[ "javax.management", "org.opennms.netmgt" ]
javax.management; org.opennms.netmgt;
1,088,403
public Name createName(String localName, String prefix, String uri) throws SOAPException { if (sf != null) { return sf.createName(localName, prefix, uri); } else { return env.createName(localName, prefix, uri); } } ...
Name function(String localName, String prefix, String uri) throws SOAPException { if (sf != null) { return sf.createName(localName, prefix, uri); } else { return env.createName(localName, prefix, uri); } } }
/** * Creates a Name * * @param localName * @param prefix * @param uri * @return Name */
Creates a Name
createName
{ "repo_name": "apache/axis2-java", "path": "modules/jaxws/src/org/apache/axis2/jaxws/message/util/impl/SAAJConverterImpl.java", "license": "apache-2.0", "size": 31185 }
[ "javax.xml.soap.Name", "javax.xml.soap.SOAPException" ]
import javax.xml.soap.Name; import javax.xml.soap.SOAPException;
import javax.xml.soap.*;
[ "javax.xml" ]
javax.xml;
1,342,735
@Override public Object create(final ConfigurableFactoryContext ctx) { CreatureProtectionArea area; area = new CreatureProtectionArea(getWidth(ctx), getHeight(ctx), getBlockedDefault(ctx)); defineCreatures(area, ctx); return area; }
Object function(final ConfigurableFactoryContext ctx) { CreatureProtectionArea area; area = new CreatureProtectionArea(getWidth(ctx), getHeight(ctx), getBlockedDefault(ctx)); defineCreatures(area, ctx); return area; }
/** * Create a damaging area. * * @param ctx * Configuration context. * * @return A CreatureProtectionArea. * * @throws IllegalArgumentException * If there is a problem with the attributes. The exception * message should be a value suitable for meaningful user ...
Create a damaging area
create
{ "repo_name": "acsid/stendhal", "path": "src/games/stendhal/server/entity/mapstuff/area/CreatureProtectionAreaFactory.java", "license": "gpl-2.0", "size": 3785 }
[ "games.stendhal.server.core.config.factory.ConfigurableFactoryContext" ]
import games.stendhal.server.core.config.factory.ConfigurableFactoryContext;
import games.stendhal.server.core.config.factory.*;
[ "games.stendhal.server" ]
games.stendhal.server;
1,116,387
protected boolean allowPublicMethodsOnly() { return false; } private static class DefaultCacheKey { private final Method method; private final Class<?> targetClass; public DefaultCacheKey(Method method, Class<?> targetClass) { this.method = method; this.targetClass = targetClass; }
boolean function() { return false; } private static class DefaultCacheKey { private final Method method; private final Class<?> targetClass; public DefaultCacheKey(Method method, Class<?> targetClass) { this.method = method; this.targetClass = targetClass; }
/** * Should only public methods be allowed to have caching semantics? * <p>The default implementation returns {@code false}. */
Should only public methods be allowed to have caching semantics? The default implementation returns false
allowPublicMethodsOnly
{ "repo_name": "Gitpiece/spring-cache-project", "path": "spring-cache/src/main/java/com/icfcc/cache/interceptor/AbstractFallbackCacheOperationSource.java", "license": "apache-2.0", "size": 7816 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
789,723
@SuppressWarnings("unchecked") public static <R extends CalculationTarget> FunctionConfig.Meta<R> metaFunctionConfig(Class<R> cls) { return FunctionConfig.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(FunctionConfig.Meta.INSTANCE); } private static final long serialVersionUID = 1L; ...
@SuppressWarnings(STR) static <R extends CalculationTarget> FunctionConfig.Meta<R> function(Class<R> cls) { return FunctionConfig.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(FunctionConfig.Meta.INSTANCE); } private static final long serialVersionUID = 1L; FunctionConfig( Class<? extends CalculationSingleFu...
/** * The meta-bean for {@code FunctionConfig}. * @param <R> the bean's generic type * @param cls the bean's generic type * @return the meta-bean, not null */
The meta-bean for FunctionConfig
metaFunctionConfig
{ "repo_name": "nssales/Strata", "path": "modules/engine/src/main/java/com/opengamma/strata/engine/config/FunctionConfig.java", "license": "apache-2.0", "size": 20194 }
[ "com.google.common.collect.ImmutableMap", "com.opengamma.strata.basics.CalculationTarget", "com.opengamma.strata.engine.calculation.function.CalculationSingleFunction", "java.util.Map", "org.joda.beans.JodaBeanUtils" ]
import com.google.common.collect.ImmutableMap; import com.opengamma.strata.basics.CalculationTarget; import com.opengamma.strata.engine.calculation.function.CalculationSingleFunction; import java.util.Map; import org.joda.beans.JodaBeanUtils;
import com.google.common.collect.*; import com.opengamma.strata.basics.*; import com.opengamma.strata.engine.calculation.function.*; import java.util.*; import org.joda.beans.*;
[ "com.google.common", "com.opengamma.strata", "java.util", "org.joda.beans" ]
com.google.common; com.opengamma.strata; java.util; org.joda.beans;
1,883,266
public SortedSet<PeerAddress> getRoutingPath() { synchronized (lock) { return routingPath; } }
SortedSet<PeerAddress> function() { synchronized (lock) { return routingPath; } }
/** * Returns the peers that have been asked to provide neighbor information. * The order is sorted by peers that were close to the target. * * @return A set of peers that took part in the routing process. */
Returns the peers that have been asked to provide neighbor information. The order is sorted by peers that were close to the target
getRoutingPath
{ "repo_name": "maxatp/tomp2p_5", "path": "core/src/main/java/net/tomp2p/futures/FutureRouting.java", "license": "apache-2.0", "size": 8018 }
[ "java.util.SortedSet", "net.tomp2p.peers.PeerAddress" ]
import java.util.SortedSet; import net.tomp2p.peers.PeerAddress;
import java.util.*; import net.tomp2p.peers.*;
[ "java.util", "net.tomp2p.peers" ]
java.util; net.tomp2p.peers;
627,144
public UpdateValuesOverrider set(AliasedFieldBuilder updateExpression) { expressions.add(updateExpression.build()); return this; }
UpdateValuesOverrider function(AliasedFieldBuilder updateExpression) { expressions.add(updateExpression.build()); return this; }
/** * Adds a merge expression to be used when updating existing records. * * @param updateExpression the merge expressions, aliased as target field name. * @return this, for method chaining. */
Adds a merge expression to be used when updating existing records
set
{ "repo_name": "alfasoftware/morf", "path": "morf-core/src/main/java/org/alfasoftware/morf/sql/MergeStatementBuilder.java", "license": "apache-2.0", "size": 9843 }
[ "org.alfasoftware.morf.sql.element.AliasedFieldBuilder" ]
import org.alfasoftware.morf.sql.element.AliasedFieldBuilder;
import org.alfasoftware.morf.sql.element.*;
[ "org.alfasoftware.morf" ]
org.alfasoftware.morf;
2,423,900
private KiWiResource getEXIFProperty(int tag_id, String tag_name) { String query = "SELECT P FROM {P} <" + Constants.NS_EXIF + "exifNumber> {\"" + tag_id + "\"} "; Iterator<KiWiResource> results = sparqlService.queryResource(query, KiWiQueryLanguage.SERQL).iterator(); KiWiResource result = null; ...
KiWiResource function(int tag_id, String tag_name) { String query = STR + Constants.NS_EXIF + STRSTR\STR; Iterator<KiWiResource> results = sparqlService.queryResource(query, KiWiQueryLanguage.SERQL).iterator(); KiWiResource result = null; while (results.hasNext()) { result = results.next(); if( result.getLabel().toLowe...
/** * Retrieve the EXIF property associated with the given tag id * * @param tag_id * @return */
Retrieve the EXIF property associated with the given tag id
getEXIFProperty
{ "repo_name": "StexX/KiWi-OSE", "path": "src/action/kiwi/service/multimedia/MultimediaServiceImpl.java", "license": "bsd-3-clause", "size": 14993 }
[ "java.util.Iterator", "kiwi.model.Constants", "kiwi.model.kbase.KiWiQueryLanguage", "kiwi.model.kbase.KiWiResource" ]
import java.util.Iterator; import kiwi.model.Constants; import kiwi.model.kbase.KiWiQueryLanguage; import kiwi.model.kbase.KiWiResource;
import java.util.*; import kiwi.model.*; import kiwi.model.kbase.*;
[ "java.util", "kiwi.model", "kiwi.model.kbase" ]
java.util; kiwi.model; kiwi.model.kbase;
2,844,094
private void configureToggleCommentAction() { IAction action= getAction(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT); if (action instanceof ToggleCommentAction) { ISourceViewer sourceViewer= getSourceViewer(); SourceViewerConfiguration configuration= getSourceViewerConfiguration(); ((ToggleCommentActi...
void function() { IAction action= getAction(IJavaEditorActionDefinitionIds.TOGGLE_COMMENT); if (action instanceof ToggleCommentAction) { ISourceViewer sourceViewer= getSourceViewer(); SourceViewerConfiguration configuration= getSourceViewerConfiguration(); ((ToggleCommentAction)action).configure(sourceViewer, configura...
/** * Configures the toggle comment action. * * @since 3.4 */
Configures the toggle comment action
configureToggleCommentAction
{ "repo_name": "kumattau/JDTPatch", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java", "license": "epl-1.0", "size": 11361 }
[ "org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction", "org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds", "org.eclipse.jface.action.IAction", "org.eclipse.jface.text.source.ISourceViewer", "org.eclipse.jface.text.source.SourceViewerConfiguration" ]
import org.eclipse.jdt.internal.ui.javaeditor.ToggleCommentAction; import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds; import org.eclipse.jface.action.IAction; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.jdt.internal.ui.javaeditor.*; import org.eclipse.jdt.ui.actions.*; import org.eclipse.jface.action.*; import org.eclipse.jface.text.source.*;
[ "org.eclipse.jdt", "org.eclipse.jface" ]
org.eclipse.jdt; org.eclipse.jface;
2,525,124
public void setLastname(String lastname) { OpenCms.getValidationHandler().checkLastname(lastname); if (lastname != null) { lastname = lastname.trim(); } m_lastname = lastname; }
void function(String lastname) { OpenCms.getValidationHandler().checkLastname(lastname); if (lastname != null) { lastname = lastname.trim(); } m_lastname = lastname; }
/** * Sets the last name of this user.<p> * * @param lastname the name to set */
Sets the last name of this user
setLastname
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/file/CmsUser.java", "license": "lgpl-2.1", "size": 20594 }
[ "org.opencms.main.OpenCms" ]
import org.opencms.main.OpenCms;
import org.opencms.main.*;
[ "org.opencms.main" ]
org.opencms.main;
72,205
public void setContentView(View root) { mRootView = root; mWindow.setContentView(root); }
void function(View root) { mRootView = root; mWindow.setContentView(root); }
/** * Set content view. * * @param root Root view */
Set content view
setContentView
{ "repo_name": "kushsharma/minimalnoter", "path": "src/com/softnuke/noter/PopupWindows.java", "license": "mit", "size": 2793 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,672,334
public boolean loadValue(byte [] family, byte [] qualifier, ByteBuffer dst) throws BufferOverflowException { return loadValue(family, 0, family.length, qualifier, 0, qualifier.length, dst); }
boolean function(byte [] family, byte [] qualifier, ByteBuffer dst) throws BufferOverflowException { return loadValue(family, 0, family.length, qualifier, 0, qualifier.length, dst); }
/** * Loads the latest version of the specified column into the provided <code>ByteBuffer</code>. * <p> * Does not clear or flip the buffer. * * @param family family name * @param qualifier column qualifier * @param dst the buffer where to write the value * * @return <code>true</code> if a va...
Loads the latest version of the specified column into the provided <code>ByteBuffer</code>. Does not clear or flip the buffer
loadValue
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java", "license": "apache-2.0", "size": 26962 }
[ "java.nio.BufferOverflowException", "java.nio.ByteBuffer" ]
import java.nio.BufferOverflowException; import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,115,954
ArrowType createArrowType(Node parametersNode) { return new ArrowType(this, parametersNode, null); }
ArrowType createArrowType(Node parametersNode) { return new ArrowType(this, parametersNode, null); }
/** * Creates an arrow type with an unknown return type. * * @param parametersNode the parameters' types, formatted as a Node with * param names and optionality info. */
Creates an arrow type with an unknown return type
createArrowType
{ "repo_name": "zombiezen/cardcpx", "path": "third_party/closure-compiler/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java", "license": "apache-2.0", "size": 68343 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,665,574
public void createCalculatedElementaryFlows() throws AlreadyExistsException { for (int i = 0; i < processes.size(); i++) { for (int j = 0; j < elementaryFlowTypes.size(); j++) { double value = cumulativeEcologicalMatrix.get(i, j); if (value != 0.0) { ...
void function() throws AlreadyExistsException { for (int i = 0; i < processes.size(); i++) { for (int j = 0; j < elementaryFlowTypes.size(); j++) { double value = cumulativeEcologicalMatrix.get(i, j); if (value != 0.0) { value *= processes.get(i).getUnit().getConversionFactor(); ElementaryFlow flow = new ElementaryFlow...
/** * Creates the cumulative elementary flows for every process. * * @throws AlreadyExistsException */
Creates the cumulative elementary flows for every process
createCalculatedElementaryFlows
{ "repo_name": "myclabs/CarbonDB-reasoner", "path": "src/main/java/com/mycsense/carbondb/domain/Calculation.java", "license": "gpl-3.0", "size": 16548 }
[ "com.mycsense.carbondb.AlreadyExistsException", "com.mycsense.carbondb.domain.elementaryFlow.DataSource" ]
import com.mycsense.carbondb.AlreadyExistsException; import com.mycsense.carbondb.domain.elementaryFlow.DataSource;
import com.mycsense.carbondb.*; import com.mycsense.carbondb.domain.*;
[ "com.mycsense.carbondb" ]
com.mycsense.carbondb;
2,061,623
public DateTimeFormatterBuilder appendFixedSignedDecimal( DateTimeFieldType fieldType, int numDigits) { if (fieldType == null) { throw new IllegalArgumentException("Field type must not be null"); } if (numDigits <= 0) { throw new IllegalArgumentException("...
DateTimeFormatterBuilder function( DateTimeFieldType fieldType, int numDigits) { if (fieldType == null) { throw new IllegalArgumentException(STR); } if (numDigits <= 0) { throw new IllegalArgumentException(STR + numDigits); } return append0(new FixedNumber(fieldType, numDigits, true)); }
/** * Instructs the printer to emit a field value as a fixed-width decimal * number (smaller numbers will be left-padded with zeros), and the parser * to expect an signed decimal number with the same fixed width. * * @param fieldType type of field to append * @param numDigits the exact ...
Instructs the printer to emit a field value as a fixed-width decimal number (smaller numbers will be left-padded with zeros), and the parser to expect an signed decimal number with the same fixed width
appendFixedSignedDecimal
{ "repo_name": "maqarg/joda-time", "path": "src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java", "license": "apache-2.0", "size": 104430 }
[ "org.joda.time.DateTimeFieldType" ]
import org.joda.time.DateTimeFieldType;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,077,671
@Test public void testHashIndexWithNestedQueryWithShortVsIntegerCompareForLocalRegion() throws Exception { createLocalRegion("portfolios"); int numEntries = 200; int numIds = 100; for (int i = 0; i < numEntries; i++) { Portfolio p = new Portfolio(i % (numIds)); p.shortID = (short) ...
void function() throws Exception { createLocalRegion(STR); int numEntries = 200; int numIds = 100; for (int i = 0; i < numEntries; i++) { Portfolio p = new Portfolio(i % (numIds)); p.shortID = (short) i; region.put(STRSELECT * FROM STRportfolios p WHERE p.shortID in (SELECT p2.ID FROM STRportfolios p2 WHERE p2.shortID ...
/** * Tests that hash index with Short vs Integer comparison */
Tests that hash index with Short vs Integer comparison
testHashIndexWithNestedQueryWithShortVsIntegerCompareForLocalRegion
{ "repo_name": "davinash/geode", "path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java", "license": "apache-2.0", "size": 51186 }
[ "org.apache.geode.cache.query.data.Portfolio" ]
import org.apache.geode.cache.query.data.Portfolio;
import org.apache.geode.cache.query.data.*;
[ "org.apache.geode" ]
org.apache.geode;
1,838,347
public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; }
Builder function(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; }
/** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Alipay#extraParams} for the * field documentation...
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>PaymentIntentUpdateParams.PaymentMethodData.Alipay#extraParams</code> for the field documentation
putExtraParam
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/PaymentIntentUpdateParams.java", "license": "mit", "size": 323121 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
495,701
@SuppressWarnings({"unchecked"}) private int getLastTabIndex() { List<? extends ITab> tabs = getTabs(); String defaultSelectionTabTitle = getDefaultSelectionTabTitle(); int indexToReturn = getTabIndexByTitle(defaultSelectionTabTitle, tabs); if (indexToReturn != -1) { ...
@SuppressWarnings({STR}) int function() { List<? extends ITab> tabs = getTabs(); String defaultSelectionTabTitle = getDefaultSelectionTabTitle(); int indexToReturn = getTabIndexByTitle(defaultSelectionTabTitle, tabs); if (indexToReturn != -1) { CookieUtils.setCookie(COOKIE_NAME, defaultSelectionTabTitle); return indexT...
/** * Return last tab index as stored in cookie. */
Return last tab index as stored in cookie
getLastTabIndex
{ "repo_name": "alancnet/artifactory", "path": "web/application/src/main/java/org/artifactory/webapp/wicket/panel/tabbed/PersistentTabbedPanel.java", "license": "apache-2.0", "size": 4016 }
[ "java.util.List", "org.apache.wicket.extensions.markup.html.tabs.ITab", "org.artifactory.common.wicket.util.CookieUtils" ]
import java.util.List; import org.apache.wicket.extensions.markup.html.tabs.ITab; import org.artifactory.common.wicket.util.CookieUtils;
import java.util.*; import org.apache.wicket.extensions.markup.html.tabs.*; import org.artifactory.common.wicket.util.*;
[ "java.util", "org.apache.wicket", "org.artifactory.common" ]
java.util; org.apache.wicket; org.artifactory.common;
1,549,380
public static String getExtendedSqlTypeName(MajorType type) { String typeName = getBaseSqlTypeName(type); switch (type.getMinorType()) { case LIST: typeName = "ARRAY"; break; case DECIMAL9: case DECIMAL18: case DECIMAL28SPARSE: case DECIMAL28DENSE: case DECIMAL38SPARSE: ...
static String function(MajorType type) { String typeName = getBaseSqlTypeName(type); switch (type.getMinorType()) { case LIST: typeName = "ARRAY"; break; case DECIMAL9: case DECIMAL18: case DECIMAL28SPARSE: case DECIMAL28DENSE: case DECIMAL38SPARSE: case DECIMAL38DENSE: case VARDECIMAL: if (type.getPrecision() > 0) { t...
/** * Extend decimal type with precision and scale. * * @param type major type * @return type name augmented with precision and scale, * if type is a decimal */
Extend decimal type with precision and scale
getExtendedSqlTypeName
{ "repo_name": "apache/drill", "path": "common/src/main/java/org/apache/drill/common/types/Types.java", "license": "apache-2.0", "size": 29874 }
[ "org.apache.drill.common.types.TypeProtos" ]
import org.apache.drill.common.types.TypeProtos;
import org.apache.drill.common.types.*;
[ "org.apache.drill" ]
org.apache.drill;
402,389
private boolean isFacingLocation(Location from, Location at, float degreeLimit) { double currentYaw = normalizeYaw(from.getYaw()); double requiredYaw = normalizeYaw(getYaw(at.toVector().subtract( from.toVector()).normalize())); return (Math.abs(requiredYaw - currentYaw) < ...
boolean function(Location from, Location at, float degreeLimit) { double currentYaw = normalizeYaw(from.getYaw()); double requiredYaw = normalizeYaw(getYaw(at.toVector().subtract( from.toVector()).normalize())); return (Math.abs(requiredYaw - currentYaw) < degreeLimit Math.abs(requiredYaw + 360 - currentYaw) < degreeLi...
/** * Checks if a Location's yaw is facing another Location. * * Note: do not use a player's location as the first argument, * because player yaws need to modified. Use the method * below this one instead. * * @param from The Location we check. * @param at The Loc...
Checks if a Location's yaw is facing another Location. Note: do not use a player's location as the first argument, because player yaws need to modified. Use the method below this one instead
isFacingLocation
{ "repo_name": "MagicMau/Tess", "path": "src/main/java/nl/magicmau/Tess/events/ChatEventHandler.java", "license": "mit", "size": 4590 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
2,518,466
public void setHttpAuth(String username, String password) { UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(username, password); BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, credentials); ...
void function(String username, String password) { UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(username, password); BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, credentials); httpClient.setCredentialsProvide...
/** * Set Credentials for HTTPAuth */
Set Credentials for HTTPAuth
setHttpAuth
{ "repo_name": "pocmo/Graylog-Android", "path": "src/com/jimdo/graylog/net/Request.java", "license": "gpl-3.0", "size": 3410 }
[ "org.apache.http.auth.AuthScope", "org.apache.http.auth.UsernamePasswordCredentials", "org.apache.http.impl.client.BasicCredentialsProvider" ]
import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.auth.*; import org.apache.http.impl.client.*;
[ "org.apache.http" ]
org.apache.http;
2,838,349
public void insertRecord(long recordPointer, int partitionId) { if (!hasSpaceForAnotherRecord()) { throw new IllegalStateException("There is no space for new record"); } array.set(pos, PackedRecordPointer.packPointer(recordPointer, partitionId)); pos++; } public static final class Shuffl...
void function(long recordPointer, int partitionId) { if (!hasSpaceForAnotherRecord()) { throw new IllegalStateException(STR); } array.set(pos, PackedRecordPointer.packPointer(recordPointer, partitionId)); pos++; } public static final class ShuffleSorterIterator { private final LongArray pointerArray; private final int ...
/** * Inserts a record to be sorted. * * @param recordPointer a pointer to the record, encoded by the task memory manager. Due to * certain pointer compression techniques used by the sorter, the sort can * only operate on pointers that point to locations in the f...
Inserts a record to be sorted
insertRecord
{ "repo_name": "maropu/spark", "path": "core/src/main/java/org/apache/spark/shuffle/sort/ShuffleInMemorySorter.java", "license": "apache-2.0", "size": 6987 }
[ "org.apache.spark.unsafe.array.LongArray" ]
import org.apache.spark.unsafe.array.LongArray;
import org.apache.spark.unsafe.array.*;
[ "org.apache.spark" ]
org.apache.spark;
217,308
@Transactional public List<Room> listRooms(final int lim) { return this.query().from(room).limit(lim).list(room); }
List<Room> function(final int lim) { return this.query().from(room).limit(lim).list(room); }
/** * Obtain all the rooms from the database limited to lim. * * @param lim * The number of rooms to return. * @return The list of lim rooms. */
Obtain all the rooms from the database limited to lim
listRooms
{ "repo_name": "MoodCat/MoodCat.me-Core", "path": "src/main/java/me/moodcat/database/controllers/RoomDAO.java", "license": "mit", "size": 1873 }
[ "java.util.List", "me.moodcat.database.entities.Room" ]
import java.util.List; import me.moodcat.database.entities.Room;
import java.util.*; import me.moodcat.database.entities.*;
[ "java.util", "me.moodcat.database" ]
java.util; me.moodcat.database;
2,303,551
@Test() public void testEmptyFile() throws Exception { final File emptyFile = createTempFile(); runTool(false, false, true, "--schema-path", emptyFile.getAbsolutePath()); }
@Test() void function() throws Exception { final File emptyFile = createTempFile(); runTool(false, false, true, STR, emptyFile.getAbsolutePath()); }
/** * Tests with an empty file. * * @throws Exception If an unexpected problem occurs. */
Tests with an empty file
testEmptyFile
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/schema/ValidateLDAPSchemaTestCase.java", "license": "gpl-2.0", "size": 33944 }
[ "java.io.File", "org.testng.annotations.Test" ]
import java.io.File; import org.testng.annotations.Test;
import java.io.*; import org.testng.annotations.*;
[ "java.io", "org.testng.annotations" ]
java.io; org.testng.annotations;
2,635,574
public SnapshotType snapshotType() { return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); }
SnapshotType function() { return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); }
/** * Get the snapshotType property: The type of a snapshot. The default is NodePool. * * @return the snapshotType value. */
Get the snapshotType property: The type of a snapshot. The default is NodePool
snapshotType
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java", "license": "mit", "size": 5465 }
[ "com.azure.resourcemanager.containerservice.models.SnapshotType" ]
import com.azure.resourcemanager.containerservice.models.SnapshotType;
import com.azure.resourcemanager.containerservice.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,524,491
@SuppressWarnings("rawtypes") public DAO getDAO( String daoType ) throws IllegalArgumentException{ Supplier<DAO> dao = map.get( daoType ); if( null != dao ){ return dao.get(); }else{ throw new IllegalArgumentException("No such dao type \"" + daoType + "\" found"); } }
@SuppressWarnings(STR) DAO function( String daoType ) throws IllegalArgumentException{ Supplier<DAO> dao = map.get( daoType ); if( null != dao ){ return dao.get(); }else{ throw new IllegalArgumentException(STRSTR\STR); } }
/** * get Mongo DAO * @param daoType * @return DAO<"Type"> * @throws IllegalArgumentException */
get Mongo DAO
getDAO
{ "repo_name": "MarceStarlet/mongodb-basics", "path": "mongodb-basics-webapp/src/main/java/com/marcestarlet/booksearcher/rest/model/dao/MongoDAOFactory.java", "license": "mit", "size": 2017 }
[ "java.util.function.Supplier" ]
import java.util.function.Supplier;
import java.util.function.*;
[ "java.util" ]
java.util;
1,029,389
@EventHandler(uei = EventConstants.RELOAD_DAEMON_CONFIG_UEI) public void handleReloadConfigEvent(final Event event) { if (isReloadConfigEventTarget(event)) { EventBuilder ebldr = null; LOG.debug("Reloading the Hardware Inventory adapter configuration"); try { ...
@EventHandler(uei = EventConstants.RELOAD_DAEMON_CONFIG_UEI) void function(final Event event) { if (isReloadConfigEventTarget(event)) { EventBuilder ebldr = null; LOG.debug(STR); try { m_hwInventoryAdapterConfigDao.reload(); initializeVendorAttributes(); ebldr = new EventBuilder(EventConstants.RELOAD_DAEMON_CONFIG_SUCC...
/** * Handle reload configuration event. * * @param event the event */
Handle reload configuration event
handleReloadConfigEvent
{ "repo_name": "rdkgit/opennms", "path": "integrations/opennms-snmp-hardware-inventory-provisioning-adapter/src/main/java/org/opennms/netmgt/provision/SnmpHardwareInventoryProvisioningAdapter.java", "license": "agpl-3.0", "size": 16906 }
[ "org.opennms.netmgt.events.api.EventConstants", "org.opennms.netmgt.events.api.annotations.EventHandler", "org.opennms.netmgt.model.events.EventBuilder", "org.opennms.netmgt.xml.event.Event" ]
import org.opennms.netmgt.events.api.EventConstants; import org.opennms.netmgt.events.api.annotations.EventHandler; import org.opennms.netmgt.model.events.EventBuilder; import org.opennms.netmgt.xml.event.Event;
import org.opennms.netmgt.events.api.*; import org.opennms.netmgt.events.api.annotations.*; import org.opennms.netmgt.model.events.*; import org.opennms.netmgt.xml.event.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
1,177,538
public void testParseExceptionFromMacroInvoke () throws Exception { VelocityEngine ve = new VelocityEngine(); ve.init(); VelocityContext context = new VelocityContext(); Writer writer = new StringWriter(); try { ve.evaluate(context,write...
void function () throws Exception { VelocityEngine ve = new VelocityEngine(); ve.init(); VelocityContext context = new VelocityContext(); Writer writer = new StringWriter(); try { ve.evaluate(context,writer,STR, STR); fail(STR); } catch (org.apache.velocity.exception.TemplateInitException e) { assertEquals(STR,e.getTem...
/** * Tests that parseException has useful info when thrown in VelocityEngine.evaluate() * and the problem comes from a macro invocation * @throws Exception */
Tests that parseException has useful info when thrown in VelocityEngine.evaluate() and the problem comes from a macro invocation
testParseExceptionFromMacroInvoke
{ "repo_name": "fbrier/velocity", "path": "src/test/java/org/apache/velocity/test/ParseExceptionTestCase.java", "license": "apache-2.0", "size": 8888 }
[ "java.io.StringWriter", "java.io.Writer", "org.apache.velocity.VelocityContext", "org.apache.velocity.app.VelocityEngine" ]
import java.io.StringWriter; import java.io.Writer; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine;
import java.io.*; import org.apache.velocity.*; import org.apache.velocity.app.*;
[ "java.io", "org.apache.velocity" ]
java.io; org.apache.velocity;
1,694,666
public void setParameter (String name, Object value) throws DOMException { // set features if(value instanceof Boolean){ boolean state = ((Boolean)value).booleanValue (); try { if (name.equalsIgnoreCase (Constants.DOM_COMMENTS)) { fConfigu...
void function (String name, Object value) throws DOMException { if(value instanceof Boolean){ boolean state = ((Boolean)value).booleanValue (); try { if (name.equalsIgnoreCase (Constants.DOM_COMMENTS)) { fConfiguration.setFeature (INCLUDE_COMMENTS_FEATURE, state); } else if (name.equalsIgnoreCase (Constants.DOM_DATATYP...
/** * Set parameters and properties */
Set parameters and properties
setParameter
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java", "license": "apache-2.0", "size": 57977 }
[ "com.sun.org.apache.xerces.internal.dom.DOMMessageFormatter", "com.sun.org.apache.xerces.internal.impl.Constants", "com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper", "com.sun.org.apache.xerces.internal.util.DOMErrorHandlerWrapper", "com.sun.org.apache.xerces.internal.xni.parser.XMLConfigura...
import com.sun.org.apache.xerces.internal.dom.DOMMessageFormatter; import com.sun.org.apache.xerces.internal.impl.Constants; import com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper; import com.sun.org.apache.xerces.internal.util.DOMErrorHandlerWrapper; import com.sun.org.apache.xerces.internal.xni.parse...
import com.sun.org.apache.xerces.internal.dom.*; import com.sun.org.apache.xerces.internal.impl.*; import com.sun.org.apache.xerces.internal.util.*; import com.sun.org.apache.xerces.internal.xni.parser.*; import java.util.*; import org.w3c.dom.*; import org.w3c.dom.ls.*;
[ "com.sun.org", "java.util", "org.w3c.dom" ]
com.sun.org; java.util; org.w3c.dom;
1,648,636