method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static void saveCourseNotify(Context context, List<CourseModel> modelList) {
Memory.setObject(context, Constant.PREF_COURSE_NOTIFY_DATA, modelList);
} | static void function(Context context, List<CourseModel> modelList) { Memory.setObject(context, Constant.PREF_COURSE_NOTIFY_DATA, modelList); } | /**
* Save Notify Data
*/ | Save Notify Data | saveCourseNotify | {
"repo_name": "kuastw/KUAS-AP-Material",
"path": "KUAS-AP-Material-Donate/app/src/main/java/silent/kuasapmaterial/libs/Utils.java",
"license": "mit",
"size": 14169
} | [
"android.content.Context",
"java.util.List"
] | import android.content.Context; import java.util.List; | import android.content.*; import java.util.*; | [
"android.content",
"java.util"
] | android.content; java.util; | 736,950 |
public void removeGroupAddressListener(String groupAddress, GroupAddressListener listener) {
checkGa(groupAddress);
synchronized (listeners) {
List<GroupAddressListener> listenerslist = listeners.get(groupAddress);
if (listenerslist != null) {
listenerslist.re... | void function(String groupAddress, GroupAddressListener listener) { checkGa(groupAddress); synchronized (listeners) { List<GroupAddressListener> listenerslist = listeners.get(groupAddress); if (listenerslist != null) { listenerslist.remove(listener); if (listenerslist.isEmpty()) { listeners.remove(groupAddress); } } } ... | /**
* Remove a listener from listening to specified group address
*
* @param groupAddress group address, format "x/y/z"
* @param listener
*/ | Remove a listener from listening to specified group address | removeGroupAddressListener | {
"repo_name": "tuxedo0801/slicKnx",
"path": "src/main/java/de/root1/slicknx/Knx.java",
"license": "gpl-3.0",
"size": 33332
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 603,706 |
@Override
public void setStep(final int step) {
// WWindows require a special case, as they keep track of their own separate step.
// We must check if the request is an AJAX or content target inside a WWindow,
// and if so set that WWindow's step. Otherwise, we set the step on the
// environment.
... | void function(final int step) { UIContextHolder.pushContext(window.getContext()); try { WWindow targetWindow = (WWindow) window.getComponent(); targetWindow.setStep(step); } finally { UIContextHolder.popContext(); } } } | /**
* Override setStep to store the step on a WWindow if the targeted component is a WWindow or a descendant of
* one.
*
* @param step the step count to set.
*/ | Override setStep to store the step on a WWindow if the targeted component is a WWindow or a descendant of one | setStep | {
"repo_name": "marksreeves/wcomponents",
"path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/container/WWindowInterceptor.java",
"license": "gpl-3.0",
"size": 9753
} | [
"com.github.bordertech.wcomponents.UIContextHolder",
"com.github.bordertech.wcomponents.WWindow"
] | import com.github.bordertech.wcomponents.UIContextHolder; import com.github.bordertech.wcomponents.WWindow; | import com.github.bordertech.wcomponents.*; | [
"com.github.bordertech"
] | com.github.bordertech; | 2,331,337 |
public HandlerRegistration addFooterClickHandler(FooterClickHandler handler) {
return addHandler(handler, clickEvent.getAssociatedType());
} | HandlerRegistration function(FooterClickHandler handler) { return addHandler(handler, clickEvent.getAssociatedType()); } | /**
* Register a FooterClickHandler to this Grid. The event for this handler is
* fired when a Click event occurs in the Footer of this Grid.
*
* @param handler
* the click handler to register
* @return the registration for the event
*/ | Register a FooterClickHandler to this Grid. The event for this handler is fired when a Click event occurs in the Footer of this Grid | addFooterClickHandler | {
"repo_name": "magi42/vaadin",
"path": "client/src/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 300856
} | [
"com.google.gwt.event.shared.HandlerRegistration",
"com.vaadin.client.widget.grid.events.FooterClickHandler"
] | import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.client.widget.grid.events.FooterClickHandler; | import com.google.gwt.event.shared.*; import com.vaadin.client.widget.grid.events.*; | [
"com.google.gwt",
"com.vaadin.client"
] | com.google.gwt; com.vaadin.client; | 1,377,337 |
public boolean isBounded(INetSystem<F,N,P,T,M> sys);
| boolean function(INetSystem<F,N,P,T,M> sys); | /**
* Check if a given net system is bounded.
*
* @param sys A net system.
*
* @return <code>true</code> if net system <code>sys</code> is bounded; <code>false</code> otherwise.
*/ | Check if a given net system is bounded | isBounded | {
"repo_name": "processquerying/PQL",
"path": "src/org/pql/mc/IModelChecker.java",
"license": "lgpl-3.0",
"size": 4403
} | [
"org.jbpt.petri.INetSystem"
] | import org.jbpt.petri.INetSystem; | import org.jbpt.petri.*; | [
"org.jbpt.petri"
] | org.jbpt.petri; | 405,601 |
public void setUp(int fragmentId, DrawerLayout drawerLayout) {
mFragmentContainerView = getActivity().findViewById(fragmentId);
mDrawerLayout = drawerLayout;
// set a custom shadow that overlays the main content when the drawer opens
mDrawerLayout.setDrawerShadow(R.drawable.drawer_s... | void function(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionB... | /**
* Users of this fragment must call this method to set up the navigation drawer interactions.
*
* @param fragmentId The android:id of this fragment in its activity's layout.
* @param drawerLayout The DrawerLayout containing this fragment's UI.
*/ | Users of this fragment must call this method to set up the navigation drawer interactions | setUp | {
"repo_name": "denkers/collector-app",
"path": "Collector-Mobile/app/src/main/java/com/kyleruss/collector/mobile/base/NavigationDrawerFragment.java",
"license": "mit",
"size": 10938
} | [
"android.app.ActionBar",
"android.support.v4.view.GravityCompat",
"android.support.v4.widget.DrawerLayout"
] | import android.app.ActionBar; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; | import android.app.*; import android.support.v4.view.*; import android.support.v4.widget.*; | [
"android.app",
"android.support"
] | android.app; android.support; | 1,029,435 |
public boolean removeListener(final Class<? extends EventListener> clazz, final EventListener listener) {
EventDispatcherList edl = dispatchers.getOrDefault(clazz, EventDispatcherList.PSEUDO_EMPTY_DISPATCHER_LIST);
boolean result = edl.removeListener(listener);
if (edl.isEmpty()) {
... | boolean function(final Class<? extends EventListener> clazz, final EventListener listener) { EventDispatcherList edl = dispatchers.getOrDefault(clazz, EventDispatcherList.PSEUDO_EMPTY_DISPATCHER_LIST); boolean result = edl.removeListener(listener); if (edl.isEmpty()) { removeListenerType(clazz); } return result; } | /**
* Removes a {@link java.util.EventListener} class instance from a specific {@link java.util.EventListener} class type.
* <br>
* If the {@link java.util.EventListener} class type has no more {@link java.util.EventListener} class instances it will also be removed.
*
* @param clazz Represen... | Removes a <code>java.util.EventListener</code> class instance from a specific <code>java.util.EventListener</code> class type. If the <code>java.util.EventListener</code> class type has no more <code>java.util.EventListener</code> class instances it will also be removed | removeListener | {
"repo_name": "schlegel11/EventDispatcher",
"path": "src/main/java/de/schlegel11/eventdispatcher/EventDispatcher.java",
"license": "mit",
"size": 11344
} | [
"java.util.EventListener"
] | import java.util.EventListener; | import java.util.*; | [
"java.util"
] | java.util; | 66,594 |
public void testPutAll() {
NavigableMap empty = map0();
NavigableMap map = map5();
empty.putAll(map);
assertEquals(5, empty.size());
assertTrue(empty.containsKey(one));
assertTrue(empty.containsKey(two));
assertTrue(empty.containsKey(three));
assertTru... | void function() { NavigableMap empty = map0(); NavigableMap map = map5(); empty.putAll(map); assertEquals(5, empty.size()); assertTrue(empty.containsKey(one)); assertTrue(empty.containsKey(two)); assertTrue(empty.containsKey(three)); assertTrue(empty.containsKey(four)); assertTrue(empty.containsKey(five)); } | /**
* putAll adds all key-value pairs from the given map
*/ | putAll adds all key-value pairs from the given map | testPutAll | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/TreeSubMapTest.java",
"license": "apache-2.0",
"size": 32611
} | [
"java.util.NavigableMap"
] | import java.util.NavigableMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,534,394 |
private static void validateGeneration(int generation) {
if (generation == CONTEXT_DEPTH_WARN_THRESH) {
log.log(
Level.SEVERE,
"Context ancestry chain length is abnormally long. "
+ "This suggests an error in application code. "
+ "Length exceeded: " + CONTEXT... | static void function(int generation) { if (generation == CONTEXT_DEPTH_WARN_THRESH) { log.log( Level.SEVERE, STR + STR + STR + CONTEXT_DEPTH_WARN_THRESH, new Exception()); } } @interface CheckReturnValue {} @interface CanIgnoreReturnValue {} | /**
* If the ancestry chain length is unreasonably long, then print an error to the log and record
* the stack trace.
*/ | If the ancestry chain length is unreasonably long, then print an error to the log and record the stack trace | validateGeneration | {
"repo_name": "ejona86/grpc-java",
"path": "context/src/main/java/io/grpc/Context.java",
"license": "apache-2.0",
"size": 40937
} | [
"io.grpc.Context",
"java.util.logging.Level"
] | import io.grpc.Context; import java.util.logging.Level; | import io.grpc.*; import java.util.logging.*; | [
"io.grpc",
"java.util"
] | io.grpc; java.util; | 435,371 |
private void writeFlags(DataOutputStream os, MLArray array) throws IOException
{
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream bufferDOS = new DataOutputStream(buffer);
bufferDOS.writeInt( array.getFlags() );
if ( array.isSparse() )
... | void function(DataOutputStream os, MLArray array) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); DataOutputStream bufferDOS = new DataOutputStream(buffer); bufferDOS.writeInt( array.getFlags() ); if ( array.isSparse() ) { bufferDOS.writeInt( ((MLSparse)array).getMaxNZ() ); } else { buf... | /**
* Writes MATRIX flags into <code>OutputStream</code>.
*
* @param os - <code>OutputStream</code>
* @param array - a <code>MLArray</code>
* @throws IOException
*/ | Writes MATRIX flags into <code>OutputStream</code> | writeFlags | {
"repo_name": "lovro-i/apro",
"path": "lib/JMatIO.Mod/src/com/jmatio/io/MatFileIncrementalWriter.java",
"license": "lgpl-3.0",
"size": 17482
} | [
"com.jmatio.common.MatDataTypes",
"com.jmatio.types.MLArray",
"com.jmatio.types.MLSparse",
"java.io.ByteArrayOutputStream",
"java.io.DataOutputStream",
"java.io.IOException"
] | import com.jmatio.common.MatDataTypes; import com.jmatio.types.MLArray; import com.jmatio.types.MLSparse; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; | import com.jmatio.common.*; import com.jmatio.types.*; import java.io.*; | [
"com.jmatio.common",
"com.jmatio.types",
"java.io"
] | com.jmatio.common; com.jmatio.types; java.io; | 1,713,395 |
public static <ColumnSelectorStrategyClass extends ColumnSelectorStrategy> ColumnSelectorPlus<ColumnSelectorStrategyClass> createColumnSelectorPlus(
ColumnSelectorStrategyFactory<ColumnSelectorStrategyClass> strategyFactory,
DimensionSpec dimensionSpec,
ColumnSelectorFactory cursor
)
{
retur... | static <ColumnSelectorStrategyClass extends ColumnSelectorStrategy> ColumnSelectorPlus<ColumnSelectorStrategyClass> function( ColumnSelectorStrategyFactory<ColumnSelectorStrategyClass> strategyFactory, DimensionSpec dimensionSpec, ColumnSelectorFactory cursor ) { return createColumnSelectorPluses(strategyFactory, Immut... | /**
* Convenience function equivalent to calling
* {@link #createColumnSelectorPluses(ColumnSelectorStrategyFactory, List, ColumnSelectorFactory)} with a singleton
* list of dimensionSpecs and then retrieving the only element in the returned array.
*
* @param <ColumnSelectorStrategyClass> The strategy ty... | Convenience function equivalent to calling <code>#createColumnSelectorPluses(ColumnSelectorStrategyFactory, List, ColumnSelectorFactory)</code> with a singleton list of dimensionSpecs and then retrieving the only element in the returned array | createColumnSelectorPlus | {
"repo_name": "b-slim/druid",
"path": "processing/src/main/java/io/druid/segment/DimensionHandlerUtils.java",
"license": "apache-2.0",
"size": 13745
} | [
"com.google.common.collect.ImmutableList",
"io.druid.query.ColumnSelectorPlus",
"io.druid.query.dimension.ColumnSelectorStrategy",
"io.druid.query.dimension.ColumnSelectorStrategyFactory",
"io.druid.query.dimension.DimensionSpec"
] | import com.google.common.collect.ImmutableList; import io.druid.query.ColumnSelectorPlus; import io.druid.query.dimension.ColumnSelectorStrategy; import io.druid.query.dimension.ColumnSelectorStrategyFactory; import io.druid.query.dimension.DimensionSpec; | import com.google.common.collect.*; import io.druid.query.*; import io.druid.query.dimension.*; | [
"com.google.common",
"io.druid.query"
] | com.google.common; io.druid.query; | 2,125,447 |
public static final int getHorizontalTextPosition(Map map) {
Integer intObj = (Integer) map.get(HORIZONTAL_TEXT_POSITION);
if (intObj != null)
return intObj.intValue();
return JLabel.CENTER;
} | static final int function(Map map) { Integer intObj = (Integer) map.get(HORIZONTAL_TEXT_POSITION); if (intObj != null) return intObj.intValue(); return JLabel.CENTER; } | /**
* Returns the horizontaltextposition attribute from the specified map.
*/ | Returns the horizontaltextposition attribute from the specified map | getHorizontalTextPosition | {
"repo_name": "Baltasarq/Gia",
"path": "src/JGraph/src/org/jgraph/graph/GraphConstants.java",
"license": "mit",
"size": 48823
} | [
"java.util.Map",
"javax.swing.JLabel"
] | import java.util.Map; import javax.swing.JLabel; | import java.util.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,183,798 |
public java.sql.Ref getRef(int i) throws SQLException {
checkColumnBounds(i);
throw SQLError.notImplemented();
} | java.sql.Ref function(int i) throws SQLException { checkColumnBounds(i); throw SQLError.notImplemented(); } | /**
* JDBC 2.0 Get a REF(<structured-type>) column.
*
* @param i
* the first column is 1, the second is 2, ...
*
* @return an object representing data of an SQL REF type
*
* @throws SQLException
* as this is not implemented
* @throws NotImplemented
* DOC... | JDBC 2.0 Get a REF(<structured-type>) column | getRef | {
"repo_name": "shubhanshu-gupta/Apache-Solr",
"path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "apache-2.0",
"size": 247329
} | [
"java.sql.Ref",
"java.sql.SQLException"
] | import java.sql.Ref; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 545,739 |
return new TestSuite(MonthDateFormatTests.class);
}
public MonthDateFormatTests(String name) {
super(name);
} | return new TestSuite(MonthDateFormatTests.class); } public MonthDateFormatTests(String name) { super(name); } | /**
* Returns the tests as a test suite.
*
* @return The test suite.
*/ | Returns the tests as a test suite | suite | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_11/tests/org/jfree/chart/axis/junit/MonthDateFormatTests.java",
"license": "gpl-2.0",
"size": 6308
} | [
"junit.framework.TestSuite"
] | import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,585,220 |
public UpdateResponse add(SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException {
UpdateRequest req = new UpdateRequest();
req.add(doc);
req.setCommitWithin(commitWithinMs);
return req.process(this);
} | UpdateResponse function(SolrInputDocument doc, int commitWithinMs) throws SolrServerException, IOException { UpdateRequest req = new UpdateRequest(); req.add(doc); req.setCommitWithin(commitWithinMs); return req.process(this); } | /**
* Adds a single document specifying max time before it becomes committed
* @param doc the input document
* @param commitWithinMs max time (in ms) before a commit will happen
* @throws SolrServerException
* @throws IOException
* @since solr 3.5
*/ | Adds a single document specifying max time before it becomes committed | add | {
"repo_name": "Lythimus/lptv",
"path": "apache-solr-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java",
"license": "gpl-2.0",
"size": 12363
} | [
"java.io.IOException",
"org.apache.solr.client.solrj.request.UpdateRequest",
"org.apache.solr.client.solrj.response.UpdateResponse",
"org.apache.solr.common.SolrInputDocument"
] | import java.io.IOException; import org.apache.solr.client.solrj.request.UpdateRequest; import org.apache.solr.client.solrj.response.UpdateResponse; import org.apache.solr.common.SolrInputDocument; | import java.io.*; import org.apache.solr.client.solrj.request.*; import org.apache.solr.client.solrj.response.*; import org.apache.solr.common.*; | [
"java.io",
"org.apache.solr"
] | java.io; org.apache.solr; | 698,025 |
EReference getGeneration_Options(); | EReference getGeneration_Options(); | /**
* Returns the meta object for the containment reference list '{@link org.obeonetwork.m2doc.genconf.Generation#getOptions
* <em>Options</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @return the meta object for the containment reference list '<em>Options</em>'.
* @s... | Returns the meta object for the containment reference list '<code>org.obeonetwork.m2doc.genconf.Generation#getOptions Options</code>'. | getGeneration_Options | {
"repo_name": "ObeoNetwork/M2Doc",
"path": "plugins/org.obeonetwork.m2doc.genconf/src-gen/org/obeonetwork/m2doc/genconf/GenconfPackage.java",
"license": "epl-1.0",
"size": 31401
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,360,660 |
LongSummaryStatistics summaryStatistics();
/**
* Returns whether any elements of this stream match the provided
* predicate. May not evaluate the predicate on all elements if not
* necessary for determining the result. If the stream is empty then
* {@code false} is returned and the predic... | LongSummaryStatistics summaryStatistics(); /** * Returns whether any elements of this stream match the provided * predicate. May not evaluate the predicate on all elements if not * necessary for determining the result. If the stream is empty then * {@code false} is returned and the predicate is not evaluated. * * <p>Th... | /**
* Returns a {@code LongSummaryStatistics} describing various summary data
* about the elements of this stream. This is a special case of a
* <a href="package-summary.html#Reduction">reduction</a>.
*
* <p>This is a <a href="package-summary.html#StreamOps">terminal
* operation</a>.
... | Returns a LongSummaryStatistics describing various summary data about the elements of this stream. This is a special case of a reduction. This is a terminal operation | summaryStatistics | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/util/stream/LongStream.java",
"license": "apache-2.0",
"size": 36708
} | [
"java.util.LongSummaryStatistics"
] | import java.util.LongSummaryStatistics; | import java.util.*; | [
"java.util"
] | java.util; | 593,527 |
public ByteString sendMessage(String path, com.google.protobuf.GeneratedMessageV3 proto) throws CothorityCommunicationException {
// TODO - fetch a random node.
return ByteString.copyFrom(nodes.get(0).SendMessage(path, proto.toByteArray()));
} | ByteString function(String path, com.google.protobuf.GeneratedMessageV3 proto) throws CothorityCommunicationException { return ByteString.copyFrom(nodes.get(0).SendMessage(path, proto.toByteArray())); } | /**
* Synchronously sends a message.
*
* @param path The API endpoint.
* @param proto The protobuf encoded request.
* @return the response
* @throws CothorityCommunicationException if something went wrong
*/ | Synchronously sends a message | sendMessage | {
"repo_name": "DeDiS/cothority",
"path": "external/java/src/main/java/ch/epfl/dedis/lib/network/Roster.java",
"license": "gpl-2.0",
"size": 5308
} | [
"ch.epfl.dedis.lib.exception.CothorityCommunicationException",
"com.google.protobuf.ByteString"
] | import ch.epfl.dedis.lib.exception.CothorityCommunicationException; import com.google.protobuf.ByteString; | import ch.epfl.dedis.lib.exception.*; import com.google.protobuf.*; | [
"ch.epfl.dedis",
"com.google.protobuf"
] | ch.epfl.dedis; com.google.protobuf; | 1,033,675 |
public ServiceCall getValidAsync(final ServiceCallback<ArrayWrapper> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<ArrayWrapper> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Get complex types with array property.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/ | Get complex types with array property | getValidAsync | {
"repo_name": "sharadagarwal/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodycomplex/ArrayOperationsImpl.java",
"license": "mit",
"size": 14797
} | [
"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; | 2,712,056 |
@Override
public List<String> getImports() throws CodeAnalyzerPluginException {
return Collections.emptyList();
} | List<String> function() throws CodeAnalyzerPluginException { return Collections.emptyList(); } | /**
* returns an empty list, since an XML file can't have any imports
* @return Collections.Empty_List
* @throws CodeAnalyzerPluginException can't really happen
*/ | returns an empty list, since an XML file can't have any imports | getImports | {
"repo_name": "codesearch-github/codesearch",
"path": "src/plugins/codeanalysis/XmlCodeAnalyzerPlugin/src/main/java/org/codesearch/commons/plugins/codeanalyzing/xml/XmlCodeAnalyzerPlugin.java",
"license": "gpl-3.0",
"size": 6003
} | [
"java.util.Collections",
"java.util.List",
"org.codesearch.commons.plugins.codeanalyzing.CodeAnalyzerPluginException"
] | import java.util.Collections; import java.util.List; import org.codesearch.commons.plugins.codeanalyzing.CodeAnalyzerPluginException; | import java.util.*; import org.codesearch.commons.plugins.codeanalyzing.*; | [
"java.util",
"org.codesearch.commons"
] | java.util; org.codesearch.commons; | 2,122,588 |
void showProgressDialogFragment(String message) {
Log.i(TAG,"showProgressDialogFragment");
if (mWaitDialog != null && mWaitDialog.isShowing()) {
hideProgressDialogFragment();
}
// No need to create dialog if this is finishing
if(isFinishing())
return;
... | void showProgressDialogFragment(String message) { Log.i(TAG,STR); if (mWaitDialog != null && mWaitDialog.isShowing()) { hideProgressDialogFragment(); } if(isFinishing()) return; mDialogString = message; mWaitDialog = new ProgressDialog(this); mWaitDialog.setMessage(mDialogString); mWaitDialog.setProgressStyle(ProgressD... | /**
* Displays a progress dialog fragment with the provided message.
* @param message
*/ | Displays a progress dialog fragment with the provided message | showProgressDialogFragment | {
"repo_name": "dimitamp/sana",
"path": "app/src/main/java/org/sana/android/activity/BaseActivity.java",
"license": "bsd-3-clause",
"size": 19501
} | [
"android.app.ProgressDialog",
"android.util.Log"
] | import android.app.ProgressDialog; import android.util.Log; | import android.app.*; import android.util.*; | [
"android.app",
"android.util"
] | android.app; android.util; | 1,775,030 |
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
SerialUtilities.writePaint(this.dialBackgroundPaint, stream);
SerialUtilities.writePaint(this.dialOutlinePaint, stream);
SerialUtilities.writePaint(this.needlePaint, stream);
... | void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(this.dialBackgroundPaint, stream); SerialUtilities.writePaint(this.dialOutlinePaint, stream); SerialUtilities.writePaint(this.needlePaint, stream); SerialUtilities.writePaint(this.valuePaint, stream); S... | /**
* Provides serialization support.
*
* @param stream the output stream.
*
* @throws IOException if there is an I/O error.
*/ | Provides serialization support | writeObject | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/main/java/org/jfree/chart/plot/MeterPlot.java",
"license": "gpl-3.0",
"size": 43482
} | [
"java.io.IOException",
"java.io.ObjectOutputStream",
"org.jfree.chart.util.SerialUtilities"
] | import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.chart.util.SerialUtilities; | import java.io.*; import org.jfree.chart.util.*; | [
"java.io",
"org.jfree.chart"
] | java.io; org.jfree.chart; | 544,444 |
private void assertMonitoringDocEquals(T expected, T actual) throws IOException {
assertEquals(expected, actual);
assertEquals(expected.hashCode(), actual.hashCode());
final boolean human = randomBoolean();
final XContentType xContentType = randomFrom(XContentType.values());
... | void function(T expected, T actual) throws IOException { assertEquals(expected, actual); assertEquals(expected.hashCode(), actual.hashCode()); final boolean human = randomBoolean(); final XContentType xContentType = randomFrom(XContentType.values()); assertToXContentEquivalent(toXContent(expected, xContentType, human),... | /**
* Assert that two {@link MonitoringDoc} are equal. By default, it
* uses {@link MonitoringDoc#equals(Object)} and {@link MonitoringDoc#hashCode()} methods
* and also checks XContent equality.
*/ | Assert that two <code>MonitoringDoc</code> are equal. By default, it uses <code>MonitoringDoc#equals(Object)</code> and <code>MonitoringDoc#hashCode()</code> methods and also checks XContent equality | assertMonitoringDocEquals | {
"repo_name": "jmluy/elasticsearch",
"path": "x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/BaseMonitoringDocTestCase.java",
"license": "apache-2.0",
"size": 12244
} | [
"java.io.IOException",
"org.elasticsearch.common.xcontent.XContentHelper",
"org.elasticsearch.test.hamcrest.ElasticsearchAssertions",
"org.elasticsearch.xcontent.XContentType"
] | import java.io.IOException; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; import org.elasticsearch.xcontent.XContentType; | import java.io.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.test.hamcrest.*; import org.elasticsearch.xcontent.*; | [
"java.io",
"org.elasticsearch.common",
"org.elasticsearch.test",
"org.elasticsearch.xcontent"
] | java.io; org.elasticsearch.common; org.elasticsearch.test; org.elasticsearch.xcontent; | 1,329,097 |
public Broadcast get(long id) {
String path = BROADCASTS_ITEM_PATH.replaceFirst(PLACEHOLDER, String.valueOf(id));
return client.get(path, resourceOf(Broadcast.class)).get();
} | Broadcast function(long id) { String path = BROADCASTS_ITEM_PATH.replaceFirst(PLACEHOLDER, String.valueOf(id)); return client.get(path, resourceOf(Broadcast.class)).get(); } | /**
* Get broadcast by id
*
* @param id broadcast id
* @return {@link Broadcast} object
* @throws BadRequestException in case HTTP response code is 400 - Bad request, the request was formatted improperly.
* @throws UnauthorizedException in case HTTP response code is 401 - U... | Get broadcast by id | get | {
"repo_name": "CallFire/callfire-api-1.1-client-java",
"path": "callfire-api-1.1-client-core/src/main/java/com/callfire/api11/client/api/broadcasts/BroadcastsApi.java",
"license": "mit",
"size": 26089
} | [
"com.callfire.api11.client.ModelType",
"com.callfire.api11.client.api.broadcasts.model.Broadcast"
] | import com.callfire.api11.client.ModelType; import com.callfire.api11.client.api.broadcasts.model.Broadcast; | import com.callfire.api11.client.*; import com.callfire.api11.client.api.broadcasts.model.*; | [
"com.callfire.api11"
] | com.callfire.api11; | 213,037 |
public static Map<String, Set<EntityCandidate>> toDomain(
final Set<? extends KnowledgeBaseEntityCandidateSetEntry> candidateValues) {
Preconditions.checkNotNull(candidateValues, "The candidateValues cannot be null!");
final ImmutableMap.Builder<String, Set<EntityCandidate>> candidatesBuilder =
... | static Map<String, Set<EntityCandidate>> function( final Set<? extends KnowledgeBaseEntityCandidateSetEntry> candidateValues) { Preconditions.checkNotNull(candidateValues, STR); final ImmutableMap.Builder<String, Set<EntityCandidate>> candidatesBuilder = ImmutableMap.builder(); for (final KnowledgeBaseEntityCandidateSe... | /**
* Converts from values to domain objects.
*
* @param candidateValues values
* @return domain objects
*/ | Converts from values to domain objects | toDomain | {
"repo_name": "odalic/sti",
"path": "odalic/src/main/java/cz/cuni/mff/xrg/odalic/api/rdf/values/util/Annotations.java",
"license": "apache-2.0",
"size": 8496
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.ImmutableSet",
"cz.cuni.mff.xrg.odalic.api.rdf.values.EntityCandidateValue",
"cz.cuni.mff.xrg.odalic.api.rdf.values.KnowledgeBaseEntityCandidateSetEntry",
"cz.cuni.mff.xrg.odalic.tasks.annotations.... | import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import cz.cuni.mff.xrg.odalic.api.rdf.values.EntityCandidateValue; import cz.cuni.mff.xrg.odalic.api.rdf.values.KnowledgeBaseEntityCandidateSetEntry; import cz.cuni.mff.xrg.odalic.t... | import com.google.common.base.*; import com.google.common.collect.*; import cz.cuni.mff.xrg.odalic.api.rdf.values.*; import cz.cuni.mff.xrg.odalic.tasks.annotations.*; import java.util.*; | [
"com.google.common",
"cz.cuni.mff",
"java.util"
] | com.google.common; cz.cuni.mff; java.util; | 452,248 |
private static void checkMessageType(JythonJob.TypeHolder msgTypeHolder,
GraphType graphType, JythonJob jythonJob) {
if (msgTypeHolder.getType() == null) {
Object msgValueType = jythonJob.getMessage_value().getType();
checkNotNull(msgValueType, graphType + ".type and " +
"message_value... | static void function(JythonJob.TypeHolder msgTypeHolder, GraphType graphType, JythonJob jythonJob) { if (msgTypeHolder.getType() == null) { Object msgValueType = jythonJob.getMessage_value().getType(); checkNotNull(msgValueType, graphType + STR + STR); msgTypeHolder.setType(msgValueType); } } | /**
* Check that given message value type is present.
*
* @param msgTypeHolder Incoming or outgoing message type holder
* @param graphType The graph type
* @param jythonJob JythonJob
*/ | Check that given message value type is present | checkMessageType | {
"repo_name": "korsvanloon/giraph",
"path": "giraph-hive/src/main/java/org/apache/giraph/hive/jython/HiveJythonUtils.java",
"license": "apache-2.0",
"size": 33834
} | [
"com.google.common.base.Preconditions",
"org.apache.giraph.graph.GraphType",
"org.apache.giraph.jython.JythonJob"
] | import com.google.common.base.Preconditions; import org.apache.giraph.graph.GraphType; import org.apache.giraph.jython.JythonJob; | import com.google.common.base.*; import org.apache.giraph.graph.*; import org.apache.giraph.jython.*; | [
"com.google.common",
"org.apache.giraph"
] | com.google.common; org.apache.giraph; | 1,541,179 |
public EAttribute getLoadResponseCharacteristic_QVoltageExponent() {
return (EAttribute)getLoadResponseCharacteristic().getEStructuralFeatures().get(10);
} | EAttribute function() { return (EAttribute)getLoadResponseCharacteristic().getEStructuralFeatures().get(10); } | /**
* Returns the meta object for the attribute '{@link CIM15.IEC61970.LoadModel.LoadResponseCharacteristic#getQVoltageExponent <em>QVoltage Exponent</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>QVoltage Exponent</em>'.
* @see CIM15.IEC61970.LoadMo... | Returns the meta object for the attribute '<code>CIM15.IEC61970.LoadModel.LoadResponseCharacteristic#getQVoltageExponent QVoltage Exponent</code>'. | getLoadResponseCharacteristic_QVoltageExponent | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/LoadModel/LoadModelPackage.java",
"license": "apache-2.0",
"size": 161452
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 407,993 |
// -----------------------------------------------------------------
public final List<DatabaseRegistryEntry> getAllEntries() {
return entries;
} | final List<DatabaseRegistryEntry> function() { return entries; } | /**
* Get a list of all of the DatabaseRegistryEntries stored in this DatabaseRegistry.
*
* @return The DatabaseRegistryEntries stored in this DatabaseRegistry.
*/ | Get a list of all of the DatabaseRegistryEntries stored in this DatabaseRegistry | getAllEntries | {
"repo_name": "Ensembl/ensj-healthcheck",
"path": "src/org/ensembl/healthcheck/DatabaseRegistry.java",
"license": "apache-2.0",
"size": 12319
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,554,953 |
public Object delegateEdit(String userName, Object domainObject) throws Exception
{
String appName = CommonServiceLocator.getInstance().getAppName();
IDAOFactory daoFactory = DAOConfigFactory.getInstance().getDAOFactory(appName);
DAO dao = null;
try
{
checkNullObject(domainObject, DOMAIN_OBJEC... | Object function(String userName, Object domainObject) throws Exception { String appName = CommonServiceLocator.getInstance().getAppName(); IDAOFactory daoFactory = DAOConfigFactory.getInstance().getDAOFactory(appName); DAO dao = null; try { checkNullObject(domainObject, DOMAIN_OBJECT); String objectName = domainObject.... | /**
* Passes caCore Like domain object to caTissue Core biz logic to perform Edit operation.
* @param domainObject the caCore Like object to edit using HTTP API
* @param userName user name
* @return returns the Edited caCore Like object/Exception object if exception occurs performing Edit operation
* @t... | Passes caCore Like domain object to caTissue Core biz logic to perform Edit operation | delegateEdit | {
"repo_name": "NCIP/catissue-tools",
"path": "WEB-INF/src/edu/wustl/clinportal/client/CaCoreAppServicesDelegator.java",
"license": "bsd-3-clause",
"size": 22997
} | [
"edu.wustl.clinportal.util.global.Constants",
"edu.wustl.common.bizlogic.IBizLogic",
"edu.wustl.common.domain.AbstractDomainObject",
"edu.wustl.common.util.global.CommonServiceLocator",
"edu.wustl.common.util.logger.Logger",
"edu.wustl.dao.daofactory.DAOConfigFactory",
"edu.wustl.dao.daofactory.IDAOFact... | import edu.wustl.clinportal.util.global.Constants; import edu.wustl.common.bizlogic.IBizLogic; import edu.wustl.common.domain.AbstractDomainObject; import edu.wustl.common.util.global.CommonServiceLocator; import edu.wustl.common.util.logger.Logger; import edu.wustl.dao.daofactory.DAOConfigFactory; import edu.wustl.dao... | import edu.wustl.clinportal.util.global.*; import edu.wustl.common.bizlogic.*; import edu.wustl.common.domain.*; import edu.wustl.common.util.global.*; import edu.wustl.common.util.logger.*; import edu.wustl.dao.daofactory.*; import java.util.*; | [
"edu.wustl.clinportal",
"edu.wustl.common",
"edu.wustl.dao",
"java.util"
] | edu.wustl.clinportal; edu.wustl.common; edu.wustl.dao; java.util; | 1,439,396 |
void update( CatalogTO catalogTO, Language language ); | void update( CatalogTO catalogTO, Language language ); | /**
* Updates a {@link mx.com.cinepolis.digital.booking.commons.to.CatalogTO} associated with record
*
* @param catalogTO The catalog
* @param language The language of the catalog
*/ | Updates a <code>mx.com.cinepolis.digital.booking.commons.to.CatalogTO</code> associated with record | update | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-persistence/src/main/java/mx/com/cinepolis/digital/booking/persistence/dao/CategoryDAO.java",
"license": "epl-1.0",
"size": 3380
} | [
"mx.com.cinepolis.digital.booking.commons.constants.Language",
"mx.com.cinepolis.digital.booking.commons.to.CatalogTO"
] | import mx.com.cinepolis.digital.booking.commons.constants.Language; import mx.com.cinepolis.digital.booking.commons.to.CatalogTO; | import mx.com.cinepolis.digital.booking.commons.constants.*; import mx.com.cinepolis.digital.booking.commons.to.*; | [
"mx.com.cinepolis"
] | mx.com.cinepolis; | 2,878,538 |
public Method matchingMethod(String methodName, Object[] params)
{
ProcedureDescription proc = serviceDescription.getProcedure(methodName, params.length);
return proc.internal_getMethod();
} | Method function(String methodName, Object[] params) { ProcedureDescription proc = serviceDescription.getProcedure(methodName, params.length); return proc.internal_getMethod(); } | /**
* Retrieves the best matching method for the given method name and parameters.
*
* Subclasses may override this if they have specialised
* dispatching requirements, so long as they continue to honour
* their ServiceDescription.
*/ | Retrieves the best matching method for the given method name and parameters. Subclasses may override this if they have specialised dispatching requirements, so long as they continue to honour their ServiceDescription | matchingMethod | {
"repo_name": "yanellyjm/rabbitmq-client-java",
"path": "src/main/java/com/rabbitmq/tools/jsonrpc/JsonRpcServer.java",
"license": "gpl-3.0",
"size": 7709
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,525,494 |
@Override
public void flushBuffer() throws IOException {
//PrintWriter.flush() does not throw exception
if (this.printWriter != null) {
this.printWriter.flush();
}
if (this.gzipOutputStream != null) {
this.gzipOutputStream.flush();
}
// ... | void function() throws IOException { if (this.printWriter != null) { this.printWriter.flush(); } if (this.gzipOutputStream != null) { this.gzipOutputStream.flush(); } if (!disableFlushBuffer) { super.flushBuffer(); } } | /**
* Flush OutputStream or PrintWriter
*
* @throws IOException
*/ | Flush OutputStream or PrintWriter | flushBuffer | {
"repo_name": "defus/jmaghreb2014",
"path": "src/main/java/com/octo/money/web/filter/gzip/GZipServletResponseWrapper.java",
"license": "apache-2.0",
"size": 3517
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,541,696 |
void showDetails(int index) {
mCurCheckPosition = index;
if (mDualPane) {
// We can display everything in-place with fragments, so update
// the list to highlight the selected item and show the data.
getListView().setItemChecked(index, tru... | void showDetails(int index) { mCurCheckPosition = index; if (mDualPane) { getListView().setItemChecked(index, true); DetailsFragment details = (DetailsFragment) getFragmentManager().findFragmentById(R.id.details); if (details == null details.getShownIndex() != index) { details = DetailsFragment.newInstance(index); getF... | /**
* Helper function to show the details of a selected item, either by
* displaying a fragment in-place in the current UI, or starting a
* whole new activity in which it is displayed.
*/ | Helper function to show the details of a selected item, either by displaying a fragment in-place in the current UI, or starting a whole new activity in which it is displayed | showDetails | {
"repo_name": "AndroidX/androidx",
"path": "samples/Support4Demos/src/main/java/com/example/android/supportv4/app/FragmentLayoutSupport.java",
"license": "apache-2.0",
"size": 8762
} | [
"android.content.Intent",
"androidx.fragment.app.FragmentTransaction"
] | import android.content.Intent; import androidx.fragment.app.FragmentTransaction; | import android.content.*; import androidx.fragment.app.*; | [
"android.content",
"androidx.fragment"
] | android.content; androidx.fragment; | 1,891,284 |
Asset getClasspathAsset(String path); | Asset getClasspathAsset(String path); | /**
* Obtains a classpath asset in the current locale (as defined by the {@link ThreadLocale} service).
*
* @param path
* relative to the classpath root
* @return the asset
* @throws RuntimeException
* if the asset can not be found
*/ | Obtains a classpath asset in the current locale (as defined by the <code>ThreadLocale</code> service) | getClasspathAsset | {
"repo_name": "apache/tapestry-5",
"path": "tapestry-core/src/main/java/org/apache/tapestry5/services/AssetSource.java",
"license": "apache-2.0",
"size": 6981
} | [
"org.apache.tapestry5.Asset"
] | import org.apache.tapestry5.Asset; | import org.apache.tapestry5.*; | [
"org.apache.tapestry5"
] | org.apache.tapestry5; | 519,465 |
public synchronized void createFile(String name, String user, String group,
String initialSlave) throws FileExistsException {
createFile(name, user, group, initialSlave, 0L, false, 0L);
} | synchronized void function(String name, String user, String group, String initialSlave) throws FileExistsException { createFile(name, user, group, initialSlave, 0L, false, 0L); } | /**
* Create a file inside the current directory.
*
* @param name
* @param user
* @param group
* @param initialSlave
* @throws FileExistsException if this file already exists.
*/ | Create a file inside the current directory | createFile | {
"repo_name": "drftpd-ng/drftpd3",
"path": "src/core/master/src/main/java/org/drftpd/master/vfs/VirtualFileSystemDirectory.java",
"license": "gpl-2.0",
"size": 18852
} | [
"org.drftpd.slave.exceptions.FileExistsException"
] | import org.drftpd.slave.exceptions.FileExistsException; | import org.drftpd.slave.exceptions.*; | [
"org.drftpd.slave"
] | org.drftpd.slave; | 603,520 |
public static SystemUiHider getInstance(Activity activity, View anchorView,
int flags) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
return new SystemUiHiderHoneycomb(activity, anchorView, flags);
} else {
return new SystemUiHiderBase(activity, anchorView, flags);
}
}
protected Sy... | static SystemUiHider function(Activity activity, View anchorView, int flags) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { return new SystemUiHiderHoneycomb(activity, anchorView, flags); } else { return new SystemUiHiderBase(activity, anchorView, flags); } } protected SystemUiHider(Activity activity, ... | /**
* Creates and returns an instance of {@link SystemUiHider} that is
* appropriate for this device. The object will be either a
* {@link SystemUiHiderBase} or {@link SystemUiHiderHoneycomb} depending on
* the device.
*
* @param activity
* The activity whose window's system UI should be contr... | Creates and returns an instance of <code>SystemUiHider</code> that is appropriate for this device. The object will be either a <code>SystemUiHiderBase</code> or <code>SystemUiHiderHoneycomb</code> depending on the device | getInstance | {
"repo_name": "stto/InfoSecProj",
"path": "GestureLock/src/com/infosec/gesturelock/util/SystemUiHider.java",
"license": "mit",
"size": 5407
} | [
"android.app.Activity",
"android.os.Build",
"android.view.View"
] | import android.app.Activity; import android.os.Build; import android.view.View; | import android.app.*; import android.os.*; import android.view.*; | [
"android.app",
"android.os",
"android.view"
] | android.app; android.os; android.view; | 43,651 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel5 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
jLab... | @SuppressWarnings(STR) void function() { jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel5 = new javax.swing.JPanel(); jPanel4 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); ProjectNamejTextField = new javax.swing.JTextField(); jScrollPane2 = new javax.swing.JScrollPane(); ProjectNotejTextArea = ne... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "armadilloUQAM/armadillo2",
"path": "src/workflows/WorkFlowPreferenceJDialog.java",
"license": "gpl-3.0",
"size": 58552
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,462,058 |
MealUpdateObject copyMeal(Meal meal); | MealUpdateObject copyMeal(Meal meal); | /**
* Creates copy of meal with all attributes except id. Created update object is not persisted.
* @param meal Meal to copy.
* @return MealUpdateObject with filled attributes.
*/ | Creates copy of meal with all attributes except id. Created update object is not persisted | copyMeal | {
"repo_name": "TomasRejent/WhatToEat",
"path": "src/main/java/cz/afrosoft/whattoeat/diet/list/logic/service/MealService.java",
"license": "mit",
"size": 803
} | [
"cz.afrosoft.whattoeat.diet.list.logic.model.Meal"
] | import cz.afrosoft.whattoeat.diet.list.logic.model.Meal; | import cz.afrosoft.whattoeat.diet.list.logic.model.*; | [
"cz.afrosoft.whattoeat"
] | cz.afrosoft.whattoeat; | 871,999 |
public static SFootnote footnote(
final SNonEmptyList<SFootnoteContent> content)
{
return new SFootnote(content);
}
private final SNonEmptyList<SFootnoteContent> content;
private SFootnote(
final SNonEmptyList<SFootnoteContent> in_content)
{
this.content = NullCheck.notNull(in_content, "Co... | static SFootnote function( final SNonEmptyList<SFootnoteContent> content) { return new SFootnote(content); } private final SNonEmptyList<SFootnoteContent> content; private SFootnote( final SNonEmptyList<SFootnoteContent> in_content) { this.content = NullCheck.notNull(in_content, STR); } | /**
* Construct a new footnote.
*
* @param content
* The footnote content.
* @return A new footnote
*/ | Construct a new footnote | footnote | {
"repo_name": "io7m/jstructural",
"path": "io7m-jstructural-core/src/main/java/com/io7m/jstructural/core/SFootnote.java",
"license": "isc",
"size": 2732
} | [
"com.io7m.jnull.NullCheck"
] | import com.io7m.jnull.NullCheck; | import com.io7m.jnull.*; | [
"com.io7m.jnull"
] | com.io7m.jnull; | 1,107,302 |
@Test
public void getClusterLinks() {
WebTarget wt = target();
String response = wt.path("topology/clusters/1/links").request().get(String.class);
JsonObject result = Json.parse(response).asObject();
assertThat(result, notNullValue());
JsonArray links = result.get("links... | void function() { WebTarget wt = target(); String response = wt.path(STR).request().get(String.class); JsonObject result = Json.parse(response).asObject(); assertThat(result, notNullValue()); JsonArray links = result.get("links").asArray(); assertThat(links.size(), is(3)); JsonObject link0 = links.get(0).asObject(); Js... | /**
* Tests an individual cluster's links list.
*/ | Tests an individual cluster's links list | getClusterLinks | {
"repo_name": "sdnwiselab/onos",
"path": "web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java",
"license": "apache-2.0",
"size": 10347
} | [
"com.eclipsesource.json.Json",
"com.eclipsesource.json.JsonArray",
"com.eclipsesource.json.JsonObject",
"javax.ws.rs.client.WebTarget",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import com.eclipsesource.json.Json; import com.eclipsesource.json.JsonArray; import com.eclipsesource.json.JsonObject; import javax.ws.rs.client.WebTarget; import org.hamcrest.Matchers; import org.junit.Assert; | import com.eclipsesource.json.*; import javax.ws.rs.client.*; import org.hamcrest.*; import org.junit.*; | [
"com.eclipsesource.json",
"javax.ws",
"org.hamcrest",
"org.junit"
] | com.eclipsesource.json; javax.ws; org.hamcrest; org.junit; | 702,944 |
public Set<DiscoverInfo.Identity> getIdentities() {
Set<Identity> res = new HashSet<Identity>(identities);
// Add the default identity that must exist
res.add(defaultIdentity);
return Collections.unmodifiableSet(res);
} | Set<DiscoverInfo.Identity> function() { Set<Identity> res = new HashSet<Identity>(identities); res.add(defaultIdentity); return Collections.unmodifiableSet(res); } | /**
* Returns all identities of this client as unmodifiable Collection
*
* @return all identies as set
*/ | Returns all identities of this client as unmodifiable Collection | getIdentities | {
"repo_name": "opg7371/Smack",
"path": "smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java",
"license": "apache-2.0",
"size": 33074
} | [
"java.util.Collections",
"java.util.HashSet",
"java.util.Set",
"org.jivesoftware.smackx.disco.packet.DiscoverInfo"
] | import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.jivesoftware.smackx.disco.packet.DiscoverInfo; | import java.util.*; import org.jivesoftware.smackx.disco.packet.*; | [
"java.util",
"org.jivesoftware.smackx"
] | java.util; org.jivesoftware.smackx; | 367,767 |
protected Long findFirstUnseenMessageUid(MailboxSession session) throws MailboxException {
MessageMapper<Id> messageMapper = mapperFactory.getMessageMapper(session);
return messageMapper.findFirstUnseenMessageUid(getMailboxEntity());
} | Long function(MailboxSession session) throws MailboxException { MessageMapper<Id> messageMapper = mapperFactory.getMessageMapper(session); return messageMapper.findFirstUnseenMessageUid(getMailboxEntity()); } | /**
* Return the uid of the first unseen message or null of none is found
*
* @param session
* @return uid
* @throws MailboxException
*/ | Return the uid of the first unseen message or null of none is found | findFirstUnseenMessageUid | {
"repo_name": "aduprat/james-mailbox",
"path": "store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java",
"license": "apache-2.0",
"size": 34015
} | [
"org.apache.james.mailbox.MailboxSession",
"org.apache.james.mailbox.exception.MailboxException",
"org.apache.james.mailbox.store.mail.MessageMapper"
] | import org.apache.james.mailbox.MailboxSession; import org.apache.james.mailbox.exception.MailboxException; import org.apache.james.mailbox.store.mail.MessageMapper; | import org.apache.james.mailbox.*; import org.apache.james.mailbox.exception.*; import org.apache.james.mailbox.store.mail.*; | [
"org.apache.james"
] | org.apache.james; | 241,449 |
public static IBlacklistProxy getBlacklistProxy()
{
if (blacklistProxy == null)
{
try
{
Class<?> clazz = Class.forName("moze_intel.projecte.impl.BlacklistProxyImpl");
blacklistProxy = (IBlacklistProxy) clazz.getField("instance").get(null);
} catch (ReflectiveOperationException ex)
{
FMLL... | static IBlacklistProxy function() { if (blacklistProxy == null) { try { Class<?> clazz = Class.forName(STR); blacklistProxy = (IBlacklistProxy) clazz.getField(STR).get(null); } catch (ReflectiveOperationException ex) { FMLLog.warning(STR); } } return blacklistProxy; } | /**
* Retrieves the proxy for black/whitelist-based API queries.
* @return The proxy for black/whitelist-based API queries
*/ | Retrieves the proxy for black/whitelist-based API queries | getBlacklistProxy | {
"repo_name": "mengy007/MrFusion-1.8.9",
"path": "src/main/java/moze_intel/projecte/api/ProjectEAPI.java",
"license": "lgpl-2.1",
"size": 2880
} | [
"net.minecraftforge.fml.common.FMLLog"
] | import net.minecraftforge.fml.common.FMLLog; | import net.minecraftforge.fml.common.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 2,357,663 |
public void setRightArrow(Shape arrow) {
ParamChecks.nullNotPermitted(arrow, "arrow");
this.rightArrow = arrow;
fireChangeEvent();
} | void function(Shape arrow) { ParamChecks.nullNotPermitted(arrow, "arrow"); this.rightArrow = arrow; fireChangeEvent(); } | /**
* Sets the shape that can be displayed as an arrow pointing rightwards at
* the end of an axis line and sends an {@link AxisChangeEvent} to all
* registered listeners.
*
* @param arrow the arrow shape (<code>null</code> not permitted).
*
* @see #getRightArrow()
*/ | Sets the shape that can be displayed as an arrow pointing rightwards at the end of an axis line and sends an <code>AxisChangeEvent</code> to all registered listeners | setRightArrow | {
"repo_name": "hongliangpan/manydesigns.cn",
"path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/axis/ValueAxis.java",
"license": "lgpl-3.0",
"size": 58355
} | [
"java.awt.Shape",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Shape; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,371,333 |
void postEvent(@NonNull EventBusEvent event); | void postEvent(@NonNull EventBusEvent event); | /**
* Broadcast the given event bus event to any subscribers who are listening for the event.
* @param event to broadcast.
*/ | Broadcast the given event bus event to any subscribers who are listening for the event | postEvent | {
"repo_name": "MarcelBraghetto/AndroidNanoDegreeProjectCapstone",
"path": "Phase2/app/src/main/java/io/github/marcelbraghetto/dailydeviations/framework/foundation/eventbus/contracts/EventBusProvider.java",
"license": "apache-2.0",
"size": 1375
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 507,050 |
public static List<File> readComponentDirectories(File componentGroupDir) {
List<File> componentDirs = new ArrayList<>();
for (File componentDir : componentGroupDir.listFiles()) {
if (componentDir.isDirectory()) { // TODO: check if directory contains ofbiz-component.xml file
log.info("component dir name ... | static List<File> function(File componentGroupDir) { List<File> componentDirs = new ArrayList<>(); for (File componentDir : componentGroupDir.listFiles()) { if (componentDir.isDirectory()) { log.info(STR, componentDir.getName()); componentDirs.add(componentDir); } } return componentDirs; } | /**
* Read OFBiz component directories
* @param componentGroupDir
* @return
*/ | Read OFBiz component directories | readComponentDirectories | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/main/java/com/github/yuri0x7c1/ofbiz/explorer/util/OfbizUtil.java",
"license": "apache-2.0",
"size": 12652
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List"
] | import java.io.File; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,767,461 |
@Override
public List<QoSPolicy> getPolicies() {
return this.policies;
}
| List<QoSPolicy> function() { return this.policies; } | /**
* Return a List of Quality of Service Policies
*/ | Return a List of Quality of Service Policies | getPolicies | {
"repo_name": "wallnerryan/FL_HAND",
"path": "src/main/java/net/floodlightcontroller/qos/QoS.java",
"license": "apache-2.0",
"size": 30820
} | [
"java.util.List",
"net.floodlightcontroller.qos.QoSPolicy"
] | import java.util.List; import net.floodlightcontroller.qos.QoSPolicy; | import java.util.*; import net.floodlightcontroller.qos.*; | [
"java.util",
"net.floodlightcontroller.qos"
] | java.util; net.floodlightcontroller.qos; | 590,455 |
typeRef_ = typeRef;
thriftToTuple_ = ThriftToPig.newInstance(typeRef);
} | typeRef_ = typeRef; thriftToTuple_ = ThriftToPig.newInstance(typeRef); } | /**
* Set the type parameter so it doesn't get erased by Java. Must be called by the constructor!
*
* @param typeRef
*/ | Set the type parameter so it doesn't get erased by Java. Must be called by the constructor | setTypeRef | {
"repo_name": "rubanm/elephant-bird",
"path": "pig/src/main/java/com/twitter/elephantbird/pig/piggybank/BytesToThriftTuple.java",
"license": "apache-2.0",
"size": 2027
} | [
"com.twitter.elephantbird.pig.util.ThriftToPig"
] | import com.twitter.elephantbird.pig.util.ThriftToPig; | import com.twitter.elephantbird.pig.util.*; | [
"com.twitter.elephantbird"
] | com.twitter.elephantbird; | 47,501 |
public static synchronized RandomGenerator getRandomGenerator() {
return randomGenerator;
}
/**
* Evolve the given population. Evolution stops when the stopping condition
* is satisfied. Updates the {@link #getGenerationsEvolved() generationsEvolved} | static synchronized RandomGenerator function() { return randomGenerator; } /** * Evolve the given population. Evolution stops when the stopping condition * is satisfied. Updates the {@link #getGenerationsEvolved() generationsEvolved} | /**
* Returns the (static) random generator.
*
* @return the static random generator shared by GA implementation classes
*/ | Returns the (static) random generator | getRandomGenerator | {
"repo_name": "tbepler/seq-svm",
"path": "src/org/apache/commons/math3/genetics/GeneticAlgorithm.java",
"license": "mit",
"size": 8665
} | [
"org.apache.commons.math3.random.RandomGenerator"
] | import org.apache.commons.math3.random.RandomGenerator; | import org.apache.commons.math3.random.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,957,677 |
public JobInner create(String resourceGroupName, String automationAccountName, UUID jobId, JobCreateParameters parameters) {
return createWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId, parameters).toBlocking().single().body();
} | JobInner function(String resourceGroupName, String automationAccountName, UUID jobId, JobCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId, parameters).toBlocking().single().body(); } | /**
* Create a job of the runbook.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @param jobId The job id.
* @param parameters The parameters supplied to the create job operation.
* @throws IllegalArgu... | Create a job of the runbook | create | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/automation/mgmt-v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java",
"license": "mit",
"size": 62325
} | [
"com.microsoft.azure.management.automation.v2015_10_31.JobCreateParameters"
] | import com.microsoft.azure.management.automation.v2015_10_31.JobCreateParameters; | import com.microsoft.azure.management.automation.v2015_10_31.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,161,803 |
@Override
public void readFrom(ByteBuffer data, int length) {
dataType = data.getInt();
} | void function(ByteBuffer data, int length) { dataType = data.getInt(); } | /**
* Read the vendor data from the ByteBuffer
* @param data the channel buffer from which we're deserializing
* @param length the length to the end of the enclosing message
*/ | Read the vendor data from the ByteBuffer | readFrom | {
"repo_name": "drinkwithwater/floodlightplus",
"path": "src/main/java/org/openflow/vendor/openflow/OFOpenFlowVendorData.java",
"license": "apache-2.0",
"size": 2940
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 93,782 |
public void print(final PrintWriter pw) {
printList(pw, text);
} | void function(final PrintWriter pw) { printList(pw, text); } | /**
* Prints the text constructed by this visitor.
*
* @param pw the print writer to be used.
*/ | Prints the text constructed by this visitor | print | {
"repo_name": "chrishumphreys/provocateur",
"path": "provocateur-thirdparty/src/main/java/org/targettest/org/objectweb/asm/util/AbstractVisitor.java",
"license": "apache-2.0",
"size": 7778
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,079,197 |
private void updateSetNameList() {
settings.updateSetNames(getSelectedSetNames());
settings.setAllSetsSelected(jAllSetsCheckBox.isSelected());
wizPanel.setFinish(settings.isValid());
}
private class SetNamesListModel implements ListModel<String> { | void function() { settings.updateSetNames(getSelectedSetNames()); settings.setAllSetsSelected(jAllSetsCheckBox.isSelected()); wizPanel.setFinish(settings.isValid()); } private class SetNamesListModel implements ListModel<String> { | /**
* Save the current selections and enabled/disable the finish button as needed.
*/ | Save the current selections and enabled/disable the finish button as needed | updateSetNameList | {
"repo_name": "eugene7646/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/infrastructure/PortableCaseInterestingItemsListPanel.java",
"license": "apache-2.0",
"size": 17075
} | [
"javax.swing.ListModel"
] | import javax.swing.ListModel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,365,917 |
public void setSeparatedPayments(List<AssetPayment> separatedPayments) {
this.separatedPayments = separatedPayments;
} | void function(List<AssetPayment> separatedPayments) { this.separatedPayments = separatedPayments; } | /**
* Sets the separatedPayments attribute value.
*
* @param separatedPayments The separatedPayments to set.
*/ | Sets the separatedPayments attribute value | setSeparatedPayments | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/util/AssetSeparatePaymentDistributor.java",
"license": "agpl-3.0",
"size": 22895
} | [
"java.util.List",
"org.kuali.kfs.module.cam.businessobject.AssetPayment"
] | import java.util.List; import org.kuali.kfs.module.cam.businessobject.AssetPayment; | import java.util.*; import org.kuali.kfs.module.cam.businessobject.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 468,988 |
public static BuckTargetPattern forCellName(@Nullable String cellName) {
return new BuckTargetPattern(cellName, "", "/...");
} | static BuckTargetPattern function(@Nullable String cellName) { return new BuckTargetPattern(cellName, STR/..."); } | /**
* Returns a base BuckTargetPattern for a cell with the given name, suitable for use in referring
* to all the targets in that cell or for resolving cell-relative targets.
*/ | Returns a base BuckTargetPattern for a cell with the given name, suitable for use in referring to all the targets in that cell or for resolving cell-relative targets | forCellName | {
"repo_name": "rmaz/buck",
"path": "tools/ideabuck/src/com/facebook/buck/intellij/ideabuck/api/BuckTargetPattern.java",
"license": "apache-2.0",
"size": 13234
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 66,056 |
public void doRelease_grade_submission(RunData data)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
readGradeForm(data, state, "release");
if (state.getAttribute(STATE_MESSAGE) == null)
{
grade_submission_option(data, "release");
}
} // ... | void function(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); readGradeForm(data, state, STR); if (state.getAttribute(STATE_MESSAGE) == null) { grade_submission_option(data, STR); } } | /**
* Action is to release the grade to submission
*/ | Action is to release the grade to submission | doRelease_grade_submission | {
"repo_name": "harfalm/Sakai-10.1",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 605178
} | [
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 1,498,536 |
public static boolean hasUniqueObject(Collection collection) {
if (isEmpty(collection)) {
return false;
}
boolean hasCandidate = false;
Object candidate = null;
for (Object elem : collection) {
if (!hasCandidate) {
hasCandidate = true;
candidate = elem;
}
else if (candidate != elem) {
... | static boolean function(Collection collection) { if (isEmpty(collection)) { return false; } boolean hasCandidate = false; Object candidate = null; for (Object elem : collection) { if (!hasCandidate) { hasCandidate = true; candidate = elem; } else if (candidate != elem) { return false; } } return true; } | /**
* Determine whether the given Collection only contains a single unique object.
* @param collection the Collection to check
* @return {@code true} if the collection contains a single reference or
* multiple references to the same instance, {@code false} else
*/ | Determine whether the given Collection only contains a single unique object | hasUniqueObject | {
"repo_name": "kingtang/spring-learn",
"path": "spring-core/src/main/java/org/springframework/util/CollectionUtils.java",
"license": "gpl-3.0",
"size": 14385
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 90,036 |
@Test
public void localDockerStrategyShouldUseInternalHostWhenContainerInfoIsUnavailable() throws Exception {
// given
strategy = new LocalDockerServerEvaluationStrategy(CHE_DOCKER_IP, null);
when(networkSettings.getGateway()).thenReturn("");
final Map<String, ServerImpl> expect... | void function() throws Exception { strategy = new LocalDockerServerEvaluationStrategy(CHE_DOCKER_IP, null); when(networkSettings.getGateway()).thenReturn(""); final Map<String, ServerImpl> expectedServers = getExpectedServers(DEFAULT_HOSTNAME, CONTAINERINFO_IP_ADDRESS, true); final Map<String, ServerImpl> servers = str... | /**
* Test: local docker strategy should use containerInfo for externalHost if property is null
* @throws Exception
*/ | Test: local docker strategy should use containerInfo for externalHost if property is null | localDockerStrategyShouldUseInternalHostWhenContainerInfoIsUnavailable | {
"repo_name": "snjeza/che",
"path": "plugins/plugin-docker/che-plugin-docker-machine/src/test/java/org/eclipse/che/plugin/docker/machine/LocalDockerServerEvaluationStrategyTest.java",
"license": "epl-1.0",
"size": 10841
} | [
"java.util.Map",
"org.eclipse.che.api.machine.server.model.impl.ServerImpl",
"org.mockito.Mockito",
"org.testng.Assert"
] | import java.util.Map; import org.eclipse.che.api.machine.server.model.impl.ServerImpl; import org.mockito.Mockito; import org.testng.Assert; | import java.util.*; import org.eclipse.che.api.machine.server.model.impl.*; import org.mockito.*; import org.testng.*; | [
"java.util",
"org.eclipse.che",
"org.mockito",
"org.testng"
] | java.util; org.eclipse.che; org.mockito; org.testng; | 1,161,671 |
protected Size2D arrangeRR(Graphics2D g2, Range widthRange,
Range heightRange) {
RectangleEdge position = getPosition();
if (position == RectangleEdge.TOP || position == RectangleEdge.BOTTOM) {
float maxWidth = (float) widthRange.getUpperBound();
g2.setFont(t... | Size2D function(Graphics2D g2, Range widthRange, Range heightRange) { RectangleEdge position = getPosition(); if (position == RectangleEdge.TOP position == RectangleEdge.BOTTOM) { float maxWidth = (float) widthRange.getUpperBound(); g2.setFont(this.font); this.content = TextUtilities.createTextBlock(this.text, this.fon... | /**
* Returns the content size for the title. This will reflect the fact that
* a text title positioned on the left or right of a chart will be rotated
* 90 degrees.
*
* @param g2 the graphics device.
* @param widthRange the width range.
* @param heightRange the height rang... | Returns the content size for the title. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated 90 degrees | arrangeRR | {
"repo_name": "simon04/jfreechart",
"path": "src/main/java/org/jfree/chart/title/TextTitle.java",
"license": "lgpl-2.1",
"size": 33377
} | [
"java.awt.Graphics2D",
"org.jfree.data.Range",
"org.jfree.text.G2TextMeasurer",
"org.jfree.text.TextUtilities",
"org.jfree.ui.RectangleEdge",
"org.jfree.ui.Size2D"
] | import java.awt.Graphics2D; import org.jfree.data.Range; import org.jfree.text.G2TextMeasurer; import org.jfree.text.TextUtilities; import org.jfree.ui.RectangleEdge; import org.jfree.ui.Size2D; | import java.awt.*; import org.jfree.data.*; import org.jfree.text.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.data",
"org.jfree.text",
"org.jfree.ui"
] | java.awt; org.jfree.data; org.jfree.text; org.jfree.ui; | 2,243,856 |
public String toString() {
StringBuilder sb = new StringBuilder("TrustAnchor: [\n"); //$NON-NLS-1$
if (trustedCert != null) {
sb.append("Trusted CA certificate: "); //$NON-NLS-1$
sb.append(trustedCert);
sb.append("\n"); //$NON-NLS-1$
}
if (c... | String function() { StringBuilder sb = new StringBuilder(STR); if (trustedCert != null) { sb.append(STR); sb.append(trustedCert); sb.append("\n"); } if (caPrincipal != null) { sb.append(STR); sb.append(caPrincipal); sb.append("\n"); } if (caPublicKey != null) { sb.append(STR); sb.append(caPublicKey); sb.append("\n"); }... | /**
* Returns a string representation of this {@code TrustAnchor} instance.
*
* @return a string representation of this {@code TrustAnchor} instance.
*/ | Returns a string representation of this TrustAnchor instance | toString | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/security/src/main/java/common/java/security/cert/TrustAnchor.java",
"license": "gpl-2.0",
"size": 10669
} | [
"org.apache.harmony.security.utils.Array"
] | import org.apache.harmony.security.utils.Array; | import org.apache.harmony.security.utils.*; | [
"org.apache.harmony"
] | org.apache.harmony; | 1,888,604 |
void enqueueLog(Path log);
/**
* Add hfile names to the queue to be replicated.
* @param tableName Name of the table these files belongs to
* @param family Name of the family these files belong to
* @param pairs list of pairs of { HFile location in staging dir, HFile path in region dir which
* ... | void enqueueLog(Path log); /** * Add hfile names to the queue to be replicated. * @param tableName Name of the table these files belongs to * @param family Name of the family these files belong to * @param pairs list of pairs of { HFile location in staging dir, HFile path in region dir which * will be added in the queu... | /**
* Add a log to the list of logs to replicate
* @param log path to the log to replicate
*/ | Add a log to the list of logs to replicate | enqueueLog | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceInterface.java",
"license": "apache-2.0",
"size": 5727
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,498,272 |
private void simplify(Set<Set<Identifier>> partition) {
for (Set<Identifier> x : partition) {
for (Set<Identifier> y : partition) {
if (y != x && (new HashSet<Identifier>(y)).removeAll(x)) {
y.addAll(x);
partition.remove(x);
}
}
}
}
/**
* {@inheritDoc} | void function(Set<Set<Identifier>> partition) { for (Set<Identifier> x : partition) { for (Set<Identifier> y : partition) { if (y != x && (new HashSet<Identifier>(y)).removeAll(x)) { y.addAll(x); partition.remove(x); } } } } /** * {@inheritDoc} | /**
* Unifies intersecting subsets.
*
* @param partition
* set of subsets
*/ | Unifies intersecting subsets | simplify | {
"repo_name": "kasperdokter/Reo",
"path": "reo-interpreter/src/main/java/nl/cwi/reo/interpret/sets/SetComposite.java",
"license": "mit",
"size": 5436
} | [
"java.util.HashSet",
"java.util.Set",
"nl.cwi.reo.interpret.variables.Identifier"
] | import java.util.HashSet; import java.util.Set; import nl.cwi.reo.interpret.variables.Identifier; | import java.util.*; import nl.cwi.reo.interpret.variables.*; | [
"java.util",
"nl.cwi.reo"
] | java.util; nl.cwi.reo; | 2,285,808 |
@Nonnull
public static Query<IndexPatternOccurrence> search(@Nonnull PsiFile file, @Nonnull IndexPatternProvider patternProvider, int startOffset, int endOffset) {
final SearchParameters parameters = new SearchParameters(file, patternProvider, new TextRange(startOffset, endOffset));
return getInstance().cre... | static Query<IndexPatternOccurrence> function(@Nonnull PsiFile file, @Nonnull IndexPatternProvider patternProvider, int startOffset, int endOffset) { final SearchParameters parameters = new SearchParameters(file, patternProvider, new TextRange(startOffset, endOffset)); return getInstance().createQuery(parameters); } | /**
* Returns a query which can be used to process occurrences of any pattern from the
* specified provider in the specified text range. The query is executed by parsing the
* contents of the file.
*
* @param file the file in which occurrences should be searched.
* @param patternProvider th... | Returns a query which can be used to process occurrences of any pattern from the specified provider in the specified text range. The query is executed by parsing the contents of the file | search | {
"repo_name": "consulo/consulo",
"path": "modules/base/indexing-api/src/main/java/com/intellij/psi/search/searches/IndexPatternSearch.java",
"license": "apache-2.0",
"size": 8320
} | [
"com.intellij.openapi.util.TextRange",
"com.intellij.psi.PsiFile",
"com.intellij.psi.search.IndexPatternOccurrence",
"com.intellij.psi.search.IndexPatternProvider",
"com.intellij.util.Query",
"javax.annotation.Nonnull"
] | import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiFile; import com.intellij.psi.search.IndexPatternOccurrence; import com.intellij.psi.search.IndexPatternProvider; import com.intellij.util.Query; import javax.annotation.Nonnull; | import com.intellij.openapi.util.*; import com.intellij.psi.*; import com.intellij.psi.search.*; import com.intellij.util.*; import javax.annotation.*; | [
"com.intellij.openapi",
"com.intellij.psi",
"com.intellij.util",
"javax.annotation"
] | com.intellij.openapi; com.intellij.psi; com.intellij.util; javax.annotation; | 204,813 |
private static IClasspathEntry[] computeClasspathEntries(
IVMInstallType vm, IJavaProject project, String environmentId) {
LibraryLocation[] libs = null; // vm.getLibraryLocations();
boolean overrideJavaDoc = false;
if (libs == null) {
libs = getLibraryLocations(vm);
overrideJavaDoc = tr... | static IClasspathEntry[] function( IVMInstallType vm, IJavaProject project, String environmentId) { LibraryLocation[] libs = null; boolean overrideJavaDoc = false; if (libs == null) { libs = getLibraryLocations(vm); overrideJavaDoc = true; } IAccessRule[][] rules = null; IExecutionEnvironment environment = JavaRuntime.... | /**
* Computes the classpath entries associated with a VM - one entry per library in the context of
* the given path and project.
*
* @param vm the VM
* @param project the project the resolution is for
* @param environmentId execution environment the resolution is for, or <code>null</code>
* @retur... | Computes the classpath entries associated with a VM - one entry per library in the context of the given path and project | computeClasspathEntries | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/core/launching/JREContainer.java",
"license": "epl-1.0",
"size": 16817
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.che.jdt.core.launching.environments.IExecutionEnvironment",
"org.eclipse.core.runtime.IPath",
"org.eclipse.jdt.core.IAccessRule",
"org.eclipse.jdt.core.IClasspathAttribute",
"org.eclipse.jdt.core.IClasspathEntry",
"org.eclipse.jdt.core.IJavaProject... | import java.util.ArrayList; import java.util.List; import org.eclipse.che.jdt.core.launching.environments.IExecutionEnvironment; import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.core.IAccessRule; import org.eclipse.jdt.core.IClasspathAttribute; import org.eclipse.jdt.core.IClasspathEntry; import org.eclips... | import java.util.*; import org.eclipse.che.jdt.core.launching.environments.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; | [
"java.util",
"org.eclipse.che",
"org.eclipse.core",
"org.eclipse.jdt"
] | java.util; org.eclipse.che; org.eclipse.core; org.eclipse.jdt; | 1,032,407 |
protected boolean validateParameters(ParameterBlock args,
StringBuffer message) {
if (!super.validateParameters(args, message)) {
return false;
}
int length = ((double[])args.getObjectParameter(0)).length;
if (length < 1) {
... | boolean function(ParameterBlock args, StringBuffer message) { if (!super.validateParameters(args, message)) { return false; } int length = ((double[])args.getObjectParameter(0)).length; if (length < 1) { message.append(getName() + " " + JaiI18N.getString(STR)); return false; } return true; } | /**
* Validates the input parameters.
*
* <p> In addition to the standard checks performed by the
* superclass method, this method checks that the length of the
* "constants" array is at least 1.
*/ | Validates the input parameters. In addition to the standard checks performed by the superclass method, this method checks that the length of the "constants" array is at least 1 | validateParameters | {
"repo_name": "MarinnaCole/LightZone",
"path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/operator/DivideByConstDescriptor.java",
"license": "bsd-3-clause",
"size": 8038
} | [
"java.awt.image.renderable.ParameterBlock"
] | import java.awt.image.renderable.ParameterBlock; | import java.awt.image.renderable.*; | [
"java.awt"
] | java.awt; | 716,841 |
public void runTestIt4( String dir, String targetFile )
throws Exception
{
TransformMojo mojo = (TransformMojo) newMojo( dir );
mojo.execute();
Document doc1 = parse( new File( dir, "xml/doc1.xml" ) );
doc1.normalize();
Document doc2 = parse( new File( dir, "targe... | void function( String dir, String targetFile ) throws Exception { TransformMojo mojo = (TransformMojo) newMojo( dir ); mojo.execute(); Document doc1 = parse( new File( dir, STR ) ); doc1.normalize(); Document doc2 = parse( new File( dir, STR + targetFile ) ); doc2.normalize(); Element doc1Element = doc1.getDocumentElem... | /**
* Common code for the it4, it6 and it10 test projects.
*/ | Common code for the it4, it6 and it10 test projects | runTestIt4 | {
"repo_name": "mohanaraosv/xml-maven-plugin",
"path": "src/test/java/org/codehaus/mojo/xml/test/TransformMojoTest.java",
"license": "apache-2.0",
"size": 9627
} | [
"java.io.File",
"org.codehaus.mojo.xml.TransformMojo",
"org.w3c.dom.Document",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import java.io.File; import org.codehaus.mojo.xml.TransformMojo; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; | import java.io.*; import org.codehaus.mojo.xml.*; import org.w3c.dom.*; | [
"java.io",
"org.codehaus.mojo",
"org.w3c.dom"
] | java.io; org.codehaus.mojo; org.w3c.dom; | 653,015 |
protected String getCanonicalMail(String name, String mail) {
if (this.mailToMailMap.containsKey(mail)) {
return this.mailToMailMap.get(mail);
}
if (this.mailToNameAndMailMap.containsKey(mail)) {
return this.mailToNameAndMailMap.get(mail).getValue();
}
... | String function(String name, String mail) { if (this.mailToMailMap.containsKey(mail)) { return this.mailToMailMap.get(mail); } if (this.mailToNameAndMailMap.containsKey(mail)) { return this.mailToNameAndMailMap.get(mail).getValue(); } Map.Entry<String, String> nameAndMail = new AbstractMap.SimpleEntry<String, String>(n... | /**
* Returns the canonical email address for the given name and email address
* pair
*
* @param name The actual name from a commit
* @param mail The actual email address from a commit
* @return The email address matching a mapping in the mail map or the
* initial email addres... | Returns the canonical email address for the given name and email address pair | getCanonicalMail | {
"repo_name": "efalive/mavanagaiata",
"path": "src/main/java/com/github/koraktor/mavanagaiata/git/MailMap.java",
"license": "bsd-3-clause",
"size": 9281
} | [
"java.util.AbstractMap",
"java.util.Map"
] | import java.util.AbstractMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,628,271 |
private static String generateDocumentFromReport(String reportName,
String id) {
if (reportName == null)
return null;
String documentFile = reportName;
if (reportName.indexOf('.') >= 0) {
documentFile = reportName.substring(0, reportName.lastIndexOf('.'));
}
// Get viewer id
if (id != null && ... | static String function(String reportName, String id) { if (reportName == null) return null; String documentFile = reportName; if (reportName.indexOf('.') >= 0) { documentFile = reportName.substring(0, reportName.lastIndexOf('.')); } if (id != null && id.length() > 0) { documentFile = documentFile + id + IBirtConstants.... | /**
* Generate document name according to report name.
*
* @param reportName
* @param id
* @return document name.
*/ | Generate document name according to report name | generateDocumentFromReport | {
"repo_name": "sguan-actuate/birt",
"path": "viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/session/ViewingCache.java",
"license": "epl-1.0",
"size": 7125
} | [
"org.eclipse.birt.report.IBirtConstants"
] | import org.eclipse.birt.report.IBirtConstants; | import org.eclipse.birt.report.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 508,427 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
nameTextField = new javax.swing.JTextField();
fontComboBox = new javax.swing.JComboBox();
nameLabel = new javax.swing.JLabel();
... | @SuppressWarnings(STR) void function() { nameTextField = new javax.swing.JTextField(); fontComboBox = new javax.swing.JComboBox(); nameLabel = new javax.swing.JLabel(); fontLabel = new javax.swing.JLabel(); typeComboBox = new javax.swing.JComboBox(); typeLabel = new javax.swing.JLabel(); fullCodeLengthTextField = new j... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "CRC-IRAN/CanReg5",
"path": "src/canreg/client/gui/management/systemeditor/DatabaseDictionaryEditorPanel.java",
"license": "gpl-3.0",
"size": 14766
} | [
"javax.swing.DefaultComboBoxModel"
] | import javax.swing.DefaultComboBoxModel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,273,108 |
public boolean existColumnMapping(AppCSVColumnName col) throws DataException {
boolean existMapping = false;
try {
Connection conn = Data.getInstance().getAppData().openConnection();
PreparedStatement ps = conn.prepareStatement(
"SELECT columnMapping FROM CSVColumnMappings " + "WHERE profileName=? A... | boolean function(AppCSVColumnName col) throws DataException { boolean existMapping = false; try { Connection conn = Data.getInstance().getAppData().openConnection(); PreparedStatement ps = conn.prepareStatement( STR + STR); ps.setString(1, this.name); ps.setString(2, col.toString()); ResultSet res = ps.executeQuery(); ... | /**
* Checks if a column mapping for the given column exists.
*
* @param col
* the col
*
* @return true, if exist column mapping
*
* @throws DataException
* the data exception
*/ | Checks if a column mapping for the given column exists | existColumnMapping | {
"repo_name": "googol42/revager",
"path": "src/org/revager/app/model/appdata/AppCSVProfile.java",
"license": "gpl-3.0",
"size": 23381
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"org.revager.app.model.Data",
"org.revager.app.model.DataException"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import org.revager.app.model.Data; import org.revager.app.model.DataException; | import java.sql.*; import org.revager.app.model.*; | [
"java.sql",
"org.revager.app"
] | java.sql; org.revager.app; | 348,057 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginReimage(String resourceGroupName, String vmName, Boolean tempDisk); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<Void>, Void> beginReimage(String resourceGroupName, String vmName, Boolean tempDisk); | /**
* Reimages the virtual machine which has an ephemeral OS disk back to its initial state.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param tempDisk Specifies whether to reimage temp disk. Default value: false. Note: This t... | Reimages the virtual machine which has an ephemeral OS disk back to its initial state | beginReimage | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java",
"license": "mit",
"size": 106942
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 2,054,146 |
public TreeImageDisplay getDefaultGroupNode()
{
SecurityContext ctx = model.getSecurityContext(null);
long id = ctx.getGroupID();
ExperimenterVisitor visitor = new ExperimenterVisitor(this, id);
accept(visitor, TreeImageDisplayVisitor.TREEIMAGE_SET_ONLY);
List<TreeImageDisplay> nodes = visitor.getNodes();... | TreeImageDisplay function() { SecurityContext ctx = model.getSecurityContext(null); long id = ctx.getGroupID(); ExperimenterVisitor visitor = new ExperimenterVisitor(this, id); accept(visitor, TreeImageDisplayVisitor.TREEIMAGE_SET_ONLY); List<TreeImageDisplay> nodes = visitor.getNodes(); if (nodes.size() != 1) return n... | /**
* Implemented as specified by the {@link Browser} interface.
* @see Browser#getLoggedExperimenterNode()
*/ | Implemented as specified by the <code>Browser</code> interface | getDefaultGroupNode | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78666
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.treeviewer.cmd.ExperimenterVisitor",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplayVisitor"
] | import java.util.List; import org.openmicroscopy.shoola.agents.treeviewer.cmd.ExperimenterVisitor; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplayVisitor; | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.cmd.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 1,749,678 |
Map<String, String> newArg = new HashMap<String, String>();
newArg.put("shortOption", shortOption);
newArg.put("longOption", longOption);
newArg.put("description", description);
for (Map<String, String> map : args) {
if (map.get("shortOption").equals(shortOption)) {
throw new IllegalArgumentException("... | Map<String, String> newArg = new HashMap<String, String>(); newArg.put(STR, shortOption); newArg.put(STR, longOption); newArg.put(STR, description); for (Map<String, String> map : args) { if (map.get(STR).equals(shortOption)) { throw new IllegalArgumentException(STR + shortOption + STR); } } args.add(newArg); } | /**
* Function to add a new option to the cli tool
* @param shortOption Short option (eg: 'e' or 'f')
* @param longOption Long option (eg: 'errors' or 'file)
* @param description Short description of the option (eg: Using f searches for the file)
* @throws java.lang.IllegalArgumentExceptio... | Function to add a new option to the cli tool | setOption | {
"repo_name": "rukmal/CommandMe",
"path": "src/me/rukmal/commandme/CommandSetter.java",
"license": "mit",
"size": 3586
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,497,485 |
public ValidationEngine create(Dataset dataset, URI shapesGraphURI, ShapesGraph shapesGraph, Resource report) {
return new ValidationEngine(dataset, shapesGraphURI, shapesGraph, report);
} | ValidationEngine function(Dataset dataset, URI shapesGraphURI, ShapesGraph shapesGraph, Resource report) { return new ValidationEngine(dataset, shapesGraphURI, shapesGraph, report); } | /**
* Constructs a new ValidationEngine.
* @param dataset the Dataset to operate on
* @param shapesGraphURI the URI of the shapes graph (must be in the dataset)
* @param shapesGraph the ShapesGraph with the shapes to validate against
* @param report the sh:ValidationReport object in the results Model, or ... | Constructs a new ValidationEngine | create | {
"repo_name": "TopQuadrant/shacl",
"path": "src/main/java/org/topbraid/shacl/validation/ValidationEngineFactory.java",
"license": "apache-2.0",
"size": 1985
} | [
"org.apache.jena.query.Dataset",
"org.apache.jena.rdf.model.Resource",
"org.topbraid.shacl.engine.ShapesGraph"
] | import org.apache.jena.query.Dataset; import org.apache.jena.rdf.model.Resource; import org.topbraid.shacl.engine.ShapesGraph; | import org.apache.jena.query.*; import org.apache.jena.rdf.model.*; import org.topbraid.shacl.engine.*; | [
"org.apache.jena",
"org.topbraid.shacl"
] | org.apache.jena; org.topbraid.shacl; | 601,610 |
public static void addToConfiguration(Configuration conf) {
Collection<String> serializations = conf.getStringCollection("io.serializations");
if (!serializations.contains(AvroSerialization.class.getName())) {
serializations.add(AvroSerialization.class.getName());
conf.setStrings("io.serialization... | static void function(Configuration conf) { Collection<String> serializations = conf.getStringCollection(STR); if (!serializations.contains(AvroSerialization.class.getName())) { serializations.add(AvroSerialization.class.getName()); conf.setStrings(STR, serializations.toArray(new String[serializations.size()])); } } | /**
* Adds the AvroSerialization scheme to the configuration, so SerializationFactory
* instances constructed from the given configuration will be aware of it.
*
* @param conf The configuration to add AvroSerialization to.
*/ | Adds the AvroSerialization scheme to the configuration, so SerializationFactory instances constructed from the given configuration will be aware of it | addToConfiguration | {
"repo_name": "DrAA/avro",
"path": "lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerialization.java",
"license": "apache-2.0",
"size": 10248
} | [
"java.util.Collection",
"org.apache.hadoop.conf.Configuration"
] | import java.util.Collection; import org.apache.hadoop.conf.Configuration; | import java.util.*; import org.apache.hadoop.conf.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 283,481 |
public void setFlows(Vector beans) {
m_beans = beans;
} | void function(Vector beans) { m_beans = beans; } | /**
* Set the vector holding the flows(s) to run
*
* @param beans the Vector holding the flows to run
*/ | Set the vector holding the flows(s) to run | setFlows | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/beans/FlowRunner.java",
"license": "gpl-3.0",
"size": 15828
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,179,293 |
public void setBeta(RealMatrix beta)
throws PowerException {
initialize(test, FEssence, FtFinverse, perGroupN, CFixedRand, U, thetaNull, beta,
sigmaError, sigmaG, exact);
} | void function(RealMatrix beta) throws PowerException { initialize(test, FEssence, FtFinverse, perGroupN, CFixedRand, U, thetaNull, beta, sigmaError, sigmaG, exact); } | /**
* Reset the beta matrix on an existing noncentrality distribution
* @param beta the new beta matrix
*/ | Reset the beta matrix on an existing noncentrality distribution | setBeta | {
"repo_name": "SampleSizeShop/JavaStatistics",
"path": "src/edu/cudenver/bios/power/glmm/NonCentralityDistribution.java",
"license": "gpl-2.0",
"size": 22297
} | [
"edu.cudenver.bios.power.PowerException",
"org.apache.commons.math3.linear.RealMatrix"
] | import edu.cudenver.bios.power.PowerException; import org.apache.commons.math3.linear.RealMatrix; | import edu.cudenver.bios.power.*; import org.apache.commons.math3.linear.*; | [
"edu.cudenver.bios",
"org.apache.commons"
] | edu.cudenver.bios; org.apache.commons; | 1,197,919 |
public int idDropped(int par1, Random par2Random, int par3)
{
return Item.silk.itemID;
} | int function(int par1, Random par2Random, int par3) { return Item.silk.itemID; } | /**
* Returns the ID of the items to drop on destruction.
*/ | Returns the ID of the items to drop on destruction | idDropped | {
"repo_name": "wildex999/stjerncraft_mcpc",
"path": "src/minecraft/net/minecraft/block/BlockTripWire.java",
"license": "gpl-3.0",
"size": 9680
} | [
"java.util.Random",
"net.minecraft.item.Item"
] | import java.util.Random; import net.minecraft.item.Item; | import java.util.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.item"
] | java.util; net.minecraft.item; | 539,426 |
public static org.opennms.reporting.availability.Report unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.opennms.reporting.availability.Report) Unmarshaller.unmarshal(org.opennms.reporting.availabil... | static org.opennms.reporting.availability.Report function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.reporting.availability.Report) Unmarshaller.unmarshal(org.opennms.reporting.availability.Report.class, reader); } | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*... | Method unmarshal | unmarshal | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "features/reporting/availability/target/generated-sources/castor/org/opennms/reporting/availability/Report.java",
"license": "gpl-2.0",
"size": 8345
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 2,531,576 |
synchronized Vector[] addObserver(TT_NodeCacheObserver obs, boolean needSnapshot) {
// snapshot the current data
// must be done before adding the observer to ensure correct data
// delivery to client
Vector[] cp = null;
if (needSnapshot) {
cp = new Vector[testLi... | synchronized Vector[] addObserver(TT_NodeCacheObserver obs, boolean needSnapshot) { Vector[] cp = null; if (needSnapshot) { cp = new Vector[testLists.length]; for (int i = 0; i < testLists.length; i++) { cp[i] = (Vector) (testLists[i].clone()); } } if (obs != null) { observers = (TT_NodeCacheObserver[]) DynamicArray.ap... | /**
* Snapshot the current data and add an observer.
* This is an atomic operation so that you can get completely up to date
* and monitor all changes going forward.
*
* @param obs The observer to attach. Must not be null.
* @param needSnapshot Does the caller want a snapshot of the curre... | Snapshot the current data and add an observer. This is an atomic operation so that you can get completely up to date and monitor all changes going forward | addObserver | {
"repo_name": "otmarjr/jtreg-fork",
"path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/exec/TT_NodeCache.java",
"license": "gpl-2.0",
"size": 29611
} | [
"com.sun.javatest.util.DynamicArray",
"java.util.Vector"
] | import com.sun.javatest.util.DynamicArray; import java.util.Vector; | import com.sun.javatest.util.*; import java.util.*; | [
"com.sun.javatest",
"java.util"
] | com.sun.javatest; java.util; | 165,659 |
public Map<String, T> getNames() throws IOException
{
COSArray namesArray = node.getCOSArray(COSName.NAMES);
if( namesArray != null )
{
Map<String, T> names = new LinkedHashMap<>();
if (namesArray.size() % 2 != 0)
{
LOG.warn("Names arra... | Map<String, T> function() throws IOException { COSArray namesArray = node.getCOSArray(COSName.NAMES); if( namesArray != null ) { Map<String, T> names = new LinkedHashMap<>(); if (namesArray.size() % 2 != 0) { LOG.warn(STR + namesArray.size()); } for (int i = 0; i + 1 < namesArray.size(); i += 2) { COSBase base = namesA... | /**
* This will return a map of names on this level. The key will be a string,
* and the value will depend on where this class is being used.
*
* @return ordered map of COS objects or <code>null</code> if the dictionary
* contains no 'Names' entry on this level.
*
* @throws IOExceptio... | This will return a map of names on this level. The key will be a string, and the value will depend on where this class is being used | getNames | {
"repo_name": "apache/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDNameTreeNode.java",
"license": "apache-2.0",
"size": 12130
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.LinkedHashMap",
"java.util.Map",
"org.apache.pdfbox.cos.COSArray",
"org.apache.pdfbox.cos.COSBase",
"org.apache.pdfbox.cos.COSName",
"org.apache.pdfbox.cos.COSString"
] | import java.io.IOException; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; import org.apache.pdfbox.cos.COSArray; import org.apache.pdfbox.cos.COSBase; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSString; | import java.io.*; import java.util.*; import org.apache.pdfbox.cos.*; | [
"java.io",
"java.util",
"org.apache.pdfbox"
] | java.io; java.util; org.apache.pdfbox; | 799,390 |
private Vector synchronize() throws Exception {
if (Log.isLoggable(Log.INFO)) {
Log.info(TAG_LOG, "synchronize");
}
Vector failedSources = new Vector();
for (int x = 0; x < appSources.size(); x++) {
if (listener != null && liste... | Vector function() throws Exception { if (Log.isLoggable(Log.INFO)) { Log.info(TAG_LOG, STR); } Vector failedSources = new Vector(); for (int x = 0; x < appSources.size(); x++) { if (listener != null && listener.isCancelled()) { break; } AppSyncSource appSource = (AppSyncSource)appSources.elementAt(x); SyncSource source... | /**
* The main procedure for the sync thread
*
* @throws Exception
*/ | The main procedure for the sync thread | synchronize | {
"repo_name": "zjujunge/funambol",
"path": "externals/java-sdk/client/src/main/java/com/funambol/client/engine/SyncEngine.java",
"license": "agpl-3.0",
"size": 20607
} | [
"com.funambol.client.source.AppSyncSource",
"com.funambol.sync.SyncException",
"com.funambol.sync.SyncSource",
"com.funambol.syncml.spds.CompressedSyncException",
"com.funambol.util.Log",
"java.util.Vector"
] | import com.funambol.client.source.AppSyncSource; import com.funambol.sync.SyncException; import com.funambol.sync.SyncSource; import com.funambol.syncml.spds.CompressedSyncException; import com.funambol.util.Log; import java.util.Vector; | import com.funambol.client.source.*; import com.funambol.sync.*; import com.funambol.syncml.spds.*; import com.funambol.util.*; import java.util.*; | [
"com.funambol.client",
"com.funambol.sync",
"com.funambol.syncml",
"com.funambol.util",
"java.util"
] | com.funambol.client; com.funambol.sync; com.funambol.syncml; com.funambol.util; java.util; | 1,042,363 |
public static double forceSide(final int maxEval, final UnivariateFunction f,
final BracketedUnivariateSolver<UnivariateFunction> bracketing,
final double baseRoot, final double min, final double max,
final Allo... | static double function(final int maxEval, final UnivariateFunction f, final BracketedUnivariateSolver<UnivariateFunction> bracketing, final double baseRoot, final double min, final double max, final AllowedSolution allowedSolution) throws NoBracketingException { if (allowedSolution == AllowedSolution.ANY_SIDE) { return... | /** Force a root found by a non-bracketing solver to lie on a specified side,
* as if the solver was a bracketing one.
* @param maxEval maximal number of new evaluations of the function
* (evaluations already done for finding the root should have already been subtracted
* from this number)
* @p... | Force a root found by a non-bracketing solver to lie on a specified side, as if the solver was a bracketing one | forceSide | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_20/src/main/java/org/apache/commons/math3/analysis/solvers/UnivariateSolverUtils.java",
"license": "gpl-2.0",
"size": 16283
} | [
"org.apache.commons.math3.analysis.UnivariateFunction",
"org.apache.commons.math3.exception.NoBracketingException",
"org.apache.commons.math3.exception.util.LocalizedFormats",
"org.apache.commons.math3.util.FastMath"
] | import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.exception.NoBracketingException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.util.FastMath; | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.exception.util.*; import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,168,297 |
void setProfileAppBar(View view, String title, View customView, int addCollapsedHeight, int
expandedHeight, View backdrop); | void setProfileAppBar(View view, String title, View customView, int addCollapsedHeight, int expandedHeight, View backdrop); | /**
* Transforms the app bar to fit in with the product screen. May include a custom view (i.e. product title
* and available actions) as well as a backdrop view (i.e. product image) to be scrolled off the screen.
*
* @param view
* the fragment's root view
* @param title
* ... | Transforms the app bar to fit in with the product screen. May include a custom view (i.e. product title and available actions) as well as a backdrop view (i.e. product image) to be scrolled off the screen | setProfileAppBar | {
"repo_name": "ProductLayer/ProductLayer-SDK-for-Android",
"path": "ply-android-common/src/main/java/com/productlayer/android/common/handler/AppBarHandler.java",
"license": "bsd-2-clause",
"size": 5113
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 512,713 |
public int sendMessages(OutboundMessage[] msgArray, String gatewayId)
throws TimeoutException, GatewayException, IOException,
InterruptedException {
int counter = 0;
for (int i = 0; i < msgArray.length; i++) {
msgArray[i].setGatewayId(gatewayId);
if (sendMessage(msgArray[i]))
counter++;
}
ret... | int function(OutboundMessage[] msgArray, String gatewayId) throws TimeoutException, GatewayException, IOException, InterruptedException { int counter = 0; for (int i = 0; i < msgArray.length; i++) { msgArray[i].setGatewayId(gatewayId); if (sendMessage(msgArray[i])) counter++; } return counter; } | /**
* .NET bridge method.
*/ | .NET bridge method | sendMessages | {
"repo_name": "blademainer/sms",
"path": "src/main/java/org/smslib/Service.java",
"license": "apache-2.0",
"size": 49260
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 949,944 |
public IteratorSetting[] getIterators() {
return iterators;
} | IteratorSetting[] function() { return iterators; } | /**
* Gets the iterators for this condition.
*
* @return iterators
*/ | Gets the iterators for this condition | getIterators | {
"repo_name": "milleruntime/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/data/Condition.java",
"license": "apache-2.0",
"size": 10111
} | [
"org.apache.accumulo.core.client.IteratorSetting"
] | import org.apache.accumulo.core.client.IteratorSetting; | import org.apache.accumulo.core.client.*; | [
"org.apache.accumulo"
] | org.apache.accumulo; | 96,288 |
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
{
int i1 = par1World.getBlockMetadata(par2, par3, par4);
boolean flag = false;
if (i1 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH))
{
flag = true;
... | void function(World par1World, int par2, int par3, int par4, int par5) { int i1 = par1World.getBlockMetadata(par2, par3, par4); boolean flag = false; if (i1 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) { flag = true; } if (i1 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)) { fla... | /**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
*/ | Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID | onNeighborBlockChange | {
"repo_name": "TheAwesomeGem/MineFantasy",
"path": "src/main/java/minefantasy/block/special/BlockWeaponRack.java",
"license": "lgpl-2.1",
"size": 12168
} | [
"net.minecraft.world.World"
] | import net.minecraft.world.World; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 286,263 |
protected String getTitle(Context context, Map<String, String> data) {
if (data.containsKey(TITLE)) {
return data.get(TITLE);
}
final Bundle metaData = MetaData.get(context);
if (metaData.containsKey(MetaData.NOTIFICATION_TITLE)) {
final Object value ... | String function(Context context, Map<String, String> data) { if (data.containsKey(TITLE)) { return data.get(TITLE); } final Bundle metaData = MetaData.get(context); if (metaData.containsKey(MetaData.NOTIFICATION_TITLE)) { final Object value = metaData.get(MetaData.NOTIFICATION_TITLE); if (value instanceof String) { ret... | /**
* Extracts the title from a push payload to be used for posting a
* notification, falls back to looking for the meta data in the manifest,
* finally using the application's title.
*
* @param context the context
* @param data the notification payload
*
* @return notifi... | Extracts the title from a push payload to be used for posting a notification, falls back to looking for the meta data in the manifest, finally using the application's title | getTitle | {
"repo_name": "deltaDNA/android-sdk",
"path": "library-notifications/src/main/java/com/deltadna/android/sdk/notifications/PushMessage.java",
"license": "apache-2.0",
"size": 8791
} | [
"android.content.Context",
"android.content.res.Resources",
"android.os.Bundle",
"android.util.Log",
"java.util.Locale",
"java.util.Map"
] | import android.content.Context; import android.content.res.Resources; import android.os.Bundle; import android.util.Log; import java.util.Locale; import java.util.Map; | import android.content.*; import android.content.res.*; import android.os.*; import android.util.*; import java.util.*; | [
"android.content",
"android.os",
"android.util",
"java.util"
] | android.content; android.os; android.util; java.util; | 14,530 |
@DoesServiceRequest
public boolean createIfNotExists(FileRequestOptions options, OperationContext opContext) throws StorageException {
options = FileRequestOptions.populateAndApplyDefaults(options, this.fileServiceClient);
boolean exists = this.exists(true , null , options, opContext);
... | boolean function(FileRequestOptions options, OperationContext opContext) throws StorageException { options = FileRequestOptions.populateAndApplyDefaults(options, this.fileServiceClient); boolean exists = this.exists(true , null , options, opContext); if (exists) { return false; } else { try { this.create(options, opCon... | /**
* Creates the share if it does not exist, using the specified request options and operation context.
*
* @param options
* A {@link FileRequestOptions} object that specifies any additional options for the request.
* Specifying <code>null</code> will use the default req... | Creates the share if it does not exist, using the specified request options and operation context | createIfNotExists | {
"repo_name": "Azure/azure-storage-android",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFileShare.java",
"license": "apache-2.0",
"size": 71230
} | [
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageErrorCodeStrings",
"com.microsoft.azure.storage.StorageException",
"java.net.HttpURLConnection"
] | import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageErrorCodeStrings; import com.microsoft.azure.storage.StorageException; import java.net.HttpURLConnection; | import com.microsoft.azure.storage.*; import java.net.*; | [
"com.microsoft.azure",
"java.net"
] | com.microsoft.azure; java.net; | 431,566 |
public PropertyLoader withDefaults(Properties defaults) {
setDefaults(defaults);
return this;
} | PropertyLoader function(Properties defaults) { setDefaults(defaults); return this; } | /**
* Fluent-api builder.
*
* @see #setDefaults(Properties)
*/ | Fluent-api builder | withDefaults | {
"repo_name": "qatools/properties",
"path": "src/main/java/ru/qatools/properties/PropertyLoader.java",
"license": "apache-2.0",
"size": 14388
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 736,553 |
@Test
public void findAll() {
Iterator<Product> iterator = repo.findAll().iterator();
printResult(iterator);
} | void function() { Iterator<Product> iterator = repo.findAll().iterator(); printResult(iterator); } | /**
* Finds all entries using a single request.
*/ | Finds all entries using a single request | findAll | {
"repo_name": "SpringOne2GX-2014/whats-new-in-spring-data",
"path": "solr/example/src/test/java/example/springdata/solr/SolrRepositoryTests.java",
"license": "apache-2.0",
"size": 1954
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,833,476 |
protected File[] getEnvironmentIncludePath() {
return new File[0];
} | File[] function() { return new File[0]; } | /**
* Gets standard include paths.
* @return File[] standard include paths
*/ | Gets standard include paths | getEnvironmentIncludePath | {
"repo_name": "1spatial/cpptasks-parallel",
"path": "src/main/java/net/sf/antcontrib/cpptasks/mozilla/XpidlCompiler.java",
"license": "apache-2.0",
"size": 11782
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,107,126 |
Date getLastAccessTime(); | Date getLastAccessTime(); | /**
* Get last access time.
* @return The last time the session performed any action
*/ | Get last access time | getLastAccessTime | {
"repo_name": "xuse/ef-others",
"path": "common-net/src/main/java/jef/net/ftpserver/ftplet/FtpSession.java",
"license": "apache-2.0",
"size": 6068
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,191,954 |
public void updateEventEntry(EventEntry aEventEntry, long aUserId, EventEntriesUpdationListener aListener);
| void function(EventEntry aEventEntry, long aUserId, EventEntriesUpdationListener aListener); | /**
* Implement this to update event entry
* @param aEventEntry
* @param aUserId
*/ | Implement this to update event entry | updateEventEntry | {
"repo_name": "varun-singh9786/fedClient",
"path": "FedAndroidLib/src/com/client/android/fedlib/interfaces/EventEntriesManager.java",
"license": "mit",
"size": 2114
} | [
"com.client.android.fedlib.listeners.EventEntriesUpdationListener",
"com.client.android.fedlib.models.EventEntry"
] | import com.client.android.fedlib.listeners.EventEntriesUpdationListener; import com.client.android.fedlib.models.EventEntry; | import com.client.android.fedlib.listeners.*; import com.client.android.fedlib.models.*; | [
"com.client.android"
] | com.client.android; | 1,624,421 |
public FirewallState firewallState() {
return this.firewallState;
} | FirewallState function() { return this.firewallState; } | /**
* Get the current state of the IP address firewall for this account. Possible values include: 'Enabled', 'Disabled'.
*
* @return the firewallState value
*/ | Get the current state of the IP address firewall for this account. Possible values include: 'Enabled', 'Disabled' | firewallState | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/datalakeanalytics/mgmt-v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/DataLakeAnalyticsAccountInner.java",
"license": "mit",
"size": 13498
} | [
"com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallState"
] | import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.FirewallState; | import com.microsoft.azure.management.datalakeanalytics.v2016_11_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,610,888 |
public FormStatus getStatus() {
// If the Item is disabled, do not do any further checks. Just report
// it.
if (!enabled) {
return FormStatus.Unacceptable;
} else if (status.equals(FormStatus.NeedsInfo)
|| status.equals(FormStatus.Processing) && action != null) {
// Determine if the status is cur... | FormStatus function() { if (!enabled) { return FormStatus.Unacceptable; } else if (status.equals(FormStatus.NeedsInfo) status.equals(FormStatus.Processing) && action != null) { status = action.getStatus(); } return status; } | /**
* This operation returns the status of the Item.
*
* @return The current status of the Item.
*/ | This operation returns the status of the Item | getStatus | {
"repo_name": "eclipse/ice",
"path": "org.eclipse.ice.item/src/org/eclipse/ice/item/Item.java",
"license": "epl-1.0",
"size": 72812
} | [
"org.eclipse.ice.datastructures.form.FormStatus"
] | import org.eclipse.ice.datastructures.form.FormStatus; | import org.eclipse.ice.datastructures.form.*; | [
"org.eclipse.ice"
] | org.eclipse.ice; | 1,721,866 |
public boolean render( InternalContextAdapter context, Writer writer)
throws IOException, MethodInvocationException
{
Object value = right.value(context);
if ( value == null && !strictRef)
{
String rightReference = null;
if (right instanceof ASTE... | boolean function( InternalContextAdapter context, Writer writer) throws IOException, MethodInvocationException { Object value = right.value(context); if ( value == null && !strictRef) { String rightReference = null; if (right instanceof ASTExpression) { rightReference = ((ASTExpression) right).getLastToken().image; } E... | /**
* puts the value of the RHS into the context under the key of the LHS
* @param context
* @param writer
* @return True if rendering was sucessful.
* @throws IOException
* @throws MethodInvocationException
*/ | puts the value of the RHS into the context under the key of the LHS | render | {
"repo_name": "diydyq/velocity-engine",
"path": "velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java",
"license": "apache-2.0",
"size": 5017
} | [
"java.io.IOException",
"java.io.Writer",
"org.apache.velocity.app.event.EventHandlerUtil",
"org.apache.velocity.context.InternalContextAdapter",
"org.apache.velocity.exception.MethodInvocationException"
] | import java.io.IOException; import java.io.Writer; import org.apache.velocity.app.event.EventHandlerUtil; import org.apache.velocity.context.InternalContextAdapter; import org.apache.velocity.exception.MethodInvocationException; | import java.io.*; import org.apache.velocity.app.event.*; import org.apache.velocity.context.*; import org.apache.velocity.exception.*; | [
"java.io",
"org.apache.velocity"
] | java.io; org.apache.velocity; | 636,763 |
public MongoDBCollectionGetProperties withOptions(MongoDBCollectionGetPropertiesOptions options) {
this.options = options;
return this;
} | MongoDBCollectionGetProperties function(MongoDBCollectionGetPropertiesOptions options) { this.options = options; return this; } | /**
* Set the options property: The options property.
*
* @param options the options value to set.
* @return the MongoDBCollectionGetProperties object itself.
*/ | Set the options property: The options property | withOptions | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/models/MongoDBCollectionGetProperties.java",
"license": "mit",
"size": 2568
} | [
"com.azure.resourcemanager.cosmos.models.MongoDBCollectionGetPropertiesOptions"
] | import com.azure.resourcemanager.cosmos.models.MongoDBCollectionGetPropertiesOptions; | import com.azure.resourcemanager.cosmos.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,681,689 |
public static Source functionSource(SourceKind kind, Realm realm, ExecutionContext caller) {
Source baseSource = realm.sourceInfo(caller);
String sourceName;
if (baseSource != null) {
sourceName = String.format("<%s> (%s)", kind.name(), baseSource.getName());
} else {
... | static Source function(SourceKind kind, Realm realm, ExecutionContext caller) { Source baseSource = realm.sourceInfo(caller); String sourceName; if (baseSource != null) { sourceName = String.format(STR, kind.name(), baseSource.getName()); } else { sourceName = String.format("<%s>", kind.name()); } return new Source(bas... | /**
* Creates a {@link Source} object for a dynamic function.
*
* @param kind
* the function kind
* @param realm
* the realm
* @param caller
* the caller execution context
* @return the function source object
*/ | Creates a <code>Source</code> object for a dynamic function | functionSource | {
"repo_name": "jugglinmike/es6draft",
"path": "src/main/java/com/github/anba/es6draft/runtime/objects/FunctionConstructor.java",
"license": "mit",
"size": 11954
} | [
"com.github.anba.es6draft.runtime.ExecutionContext",
"com.github.anba.es6draft.runtime.Realm",
"com.github.anba.es6draft.runtime.internal.Source"
] | import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.Realm; import com.github.anba.es6draft.runtime.internal.Source; | import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; | [
"com.github.anba"
] | com.github.anba; | 2,025,510 |
public static void copyResourceAsSibling(OpenCmsTestCase tc, CmsObject cms, String source, String target)
throws Exception {
// save the source in the store
tc.storeResources(cms, source);
// copy source to target as a sibling, the new sibling should not be locked
cms.copyResou... | static void function(OpenCmsTestCase tc, CmsObject cms, String source, String target) throws Exception { tc.storeResources(cms, source); cms.copyResource(source, target, CmsResource.COPY_AS_SIBLING); tc.assertFilter(cms, source, OpenCmsTestResourceFilter.FILTER_EXISTING_SIBLING); tc.assertProject(cms, source, cms.getRe... | /**
* Creates a copy of a resource as a new sibling.<p>
*
* @param tc the OpenCms test case
* @param cms the current user's Cms object
* @param source path/resource name of the existing resource
* @param target path/resource name of the new sibling
* @throws Exception if something goe... | Creates a copy of a resource as a new sibling | copyResourceAsSibling | {
"repo_name": "ggiudetti/opencms-core",
"path": "test/org/opencms/file/TestSiblings.java",
"license": "lgpl-2.1",
"size": 42644
} | [
"org.opencms.lock.CmsLockType",
"org.opencms.test.OpenCmsTestCase",
"org.opencms.test.OpenCmsTestResourceFilter"
] | import org.opencms.lock.CmsLockType; import org.opencms.test.OpenCmsTestCase; import org.opencms.test.OpenCmsTestResourceFilter; | import org.opencms.lock.*; import org.opencms.test.*; | [
"org.opencms.lock",
"org.opencms.test"
] | org.opencms.lock; org.opencms.test; | 801,534 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.