method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private SVGElement makeUnitUse(final Unit u, final Province province,
final boolean isDislodged) {
// determine symbol ID
String symbolID;
if (u.getType() == Type.FLEET) {
symbolID = isDislodged ? SYMBOL_DISLODGED_FLEET : SYMBOL_FLEET;
}... | SVGElement function(final Unit u, final Province province, final boolean isDislodged) { String symbolID; if (u.getType() == Type.FLEET) { symbolID = isDislodged ? SYMBOL_DISLODGED_FLEET : SYMBOL_FLEET; } else if (u.getType() == Type.ARMY) { symbolID = isDislodged ? SYMBOL_DISLODGED_ARMY : SYMBOL_ARMY; } else if (u.getT... | /**
* Creates a Unit of the given type / owner color, via a <use> symbol, in the right place
*/ | Creates a Unit of the given type / owner color, via a symbol, in the right place | makeUnitUse | {
"repo_name": "takaki/jdip",
"path": "src/main/java/dip/gui/map/DefaultMapRenderer2.java",
"license": "gpl-2.0",
"size": 57087
} | [
"java.awt.geom.Point2D",
"org.w3c.dom.svg.SVGElement"
] | import java.awt.geom.Point2D; import org.w3c.dom.svg.SVGElement; | import java.awt.geom.*; import org.w3c.dom.svg.*; | [
"java.awt",
"org.w3c.dom"
] | java.awt; org.w3c.dom; | 2,063,911 |
// SYSTEM
public static String database(Connection conn) throws HsqlException {
return null;
} | static String function(Connection conn) throws HsqlException { return null; } | /**
* Returns the name of the database corresponding to this connection.
*
* @param conn the connection for which to retrieve the database name
* @return the name of the database for the given connection
* @throws HsqlException if a database access error occurs
*/ | Returns the name of the database corresponding to this connection | database | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/hsqldb_1_8_1_2/src/org/hsqldb/Library.java",
"license": "lgpl-3.0",
"size": 79684
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,916,203 |
private boolean fileChanged(File element) {
Map<File, Long> bsm = BundleInitThread.getBundleSizeMap();
if (!bsm.containsKey(element))
return true;
if (bsm.get(element) != element.length())
return true;
return false;
} | boolean function(File element) { Map<File, Long> bsm = BundleInitThread.getBundleSizeMap(); if (!bsm.containsKey(element)) return true; if (bsm.get(element) != element.length()) return true; return false; } | /**
* Compares file on filesystem to internal state of file to determine if they are different.
*
* @param element
* @return
*/ | Compares file on filesystem to internal state of file to determine if they are different | fileChanged | {
"repo_name": "kgilmer/knapsack",
"path": "org/knapsack/init/InstallBundleFunction.java",
"license": "apache-2.0",
"size": 4057
} | [
"java.io.File",
"java.util.Map"
] | import java.io.File; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 514,399 |
public SpdyStream newStream(List<Header> requestHeaders, boolean out, boolean in)
throws IOException {
return newStream(0, requestHeaders, out, in);
} | SpdyStream function(List<Header> requestHeaders, boolean out, boolean in) throws IOException { return newStream(0, requestHeaders, out, in); } | /**
* Returns a new locally-initiated stream.
*
* @param out true to create an output stream that we can use to send data to the remote peer.
* Corresponds to {@code FLAG_FIN}.
* @param in true to create an input stream that the remote peer can use to send data to us.
* Corresponds to {@code F... | Returns a new locally-initiated stream | newStream | {
"repo_name": "10045125/okhttp",
"path": "okhttp/src/main/java/com/squareup/okhttp/internal/spdy/SpdyConnection.java",
"license": "apache-2.0",
"size": 29987
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,035,662 |
private static boolean isXLargeTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
} | static boolean function(Context context) { return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE; } | /**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/ | Helper method to determine if the device has an extra-large screen. For example, 10" tablets are extra-large | isXLargeTablet | {
"repo_name": "Ruaaaaaaaaaaaaaaaaaa/newZhiHu",
"path": "app/src/main/java/com/wmj/newzhihu/activity/SettingsActivity.java",
"license": "apache-2.0",
"size": 11892
} | [
"android.content.Context",
"android.content.res.Configuration"
] | import android.content.Context; import android.content.res.Configuration; | import android.content.*; import android.content.res.*; | [
"android.content"
] | android.content; | 588,615 |
if (this.coreConfigDao.findOneByPropertyClass(UserWelcomeNotificationsEnabled.class).getProperty().getRawValue().equalsIgnoreCase("true")) {
final String applicationName = this.applicationKernel.getConfig("application.name", "My Application");
final String webServiceUrl = this.coreConfigDao.findOneByPropertyC... | if (this.coreConfigDao.findOneByPropertyClass(UserWelcomeNotificationsEnabled.class).getProperty().getRawValue().equalsIgnoreCase("true")) { final String applicationName = this.applicationKernel.getConfig(STR, STR); final String webServiceUrl = this.coreConfigDao.findOneByPropertyClass(WebServiceUrl.class).getProperty(... | /**
* Sends a welcome email to the specified user. This method is usually invoked after
* a new user account has been created.
*
* @param user AuthUser JPA Entity instance
* @see de.dml.application.persistence.core.entity.AuthUser
*/ | Sends a welcome email to the specified user. This method is usually invoked after a new user account has been created | sendWelcomeEmail | {
"repo_name": "ssmits/DML",
"path": "src/main/java/de/dml/application/mail/EmailNotificationService.java",
"license": "gpl-2.0",
"size": 3017
} | [
"de.dml.application.kernel.configSettings.WebServiceUrl",
"de.dml.application.mail.configSettings.UserWelcomeNotificationsEnabled"
] | import de.dml.application.kernel.configSettings.WebServiceUrl; import de.dml.application.mail.configSettings.UserWelcomeNotificationsEnabled; | import de.dml.application.kernel.*; import de.dml.application.mail.*; | [
"de.dml.application"
] | de.dml.application; | 446,107 |
private JPanel getReportSetupPanel() {
if (reportSetupPanel == null) {
reportSetupPanel = new JPanel();
reportSetupPanel.setBorder(new LineBorder(new Color(0, 0, 0)));
GridBagLayout layout = new GridBagLayout();
layout.columnWidths = new int[] { 0, 0, 0 };
... | JPanel function() { if (reportSetupPanel == null) { reportSetupPanel = new JPanel(); reportSetupPanel.setBorder(new LineBorder(new Color(0, 0, 0))); GridBagLayout layout = new GridBagLayout(); layout.columnWidths = new int[] { 0, 0, 0 }; layout.rowHeights = new int[] { 0, 0 }; layout.columnWeights = new double[] { 0.0,... | /**
* Creates, caches and returns the Panel that contains the controls to setup
* the report
*
* @return JPanel
*/ | Creates, caches and returns the Panel that contains the controls to setup the report | getReportSetupPanel | {
"repo_name": "battjt/iumpr",
"path": "src/net/soliddesign/iumpr/ui/UserInterfaceView.java",
"license": "mit",
"size": 31088
} | [
"java.awt.Color",
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"javax.swing.JPanel",
"javax.swing.border.LineBorder"
] | import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JPanel; import javax.swing.border.LineBorder; | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 376,753 |
@Idempotent
DatanodeInfo[] getDatanodeReport(HdfsConstants.DatanodeReportType type)
throws IOException; | DatanodeInfo[] getDatanodeReport(HdfsConstants.DatanodeReportType type) throws IOException; | /**
* Get a report on the system's current datanodes.
* One DatanodeInfo object is returned for each DataNode.
* Return live datanodes if type is LIVE; dead datanodes if type is DEAD;
* otherwise all datanodes if type is ALL.
*/ | Get a report on the system's current datanodes. One DatanodeInfo object is returned for each DataNode. Return live datanodes if type is LIVE; dead datanodes if type is DEAD; otherwise all datanodes if type is ALL | getDatanodeReport | {
"repo_name": "IBYoung/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 57388
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,982,459 |
public boolean isAnnotationEnabled(AnnotationKey key)
{
return forbiddenAnnotations == null ||
!forbiddenAnnotations.contains(key);
} | boolean function(AnnotationKey key) { return forbiddenAnnotations == null !forbiddenAnnotations.contains(key); } | /**
* Is the annotation with key allowed.
* @param key see above.
* @return see above.
*/ | Is the annotation with key allowed | isAnnotationEnabled | {
"repo_name": "knabar/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/roi/model/ROIShape.java",
"license": "gpl-2.0",
"size": 10802
} | [
"org.openmicroscopy.shoola.util.roi.model.annotation.AnnotationKey"
] | import org.openmicroscopy.shoola.util.roi.model.annotation.AnnotationKey; | import org.openmicroscopy.shoola.util.roi.model.annotation.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,916,065 |
public static boolean isBindingConfigToCreate(Item pvItem, String pvBindingConfig) {
return ((pvItem instanceof SwitchItem) && (pvBindingConfig.contains("pushbutton")));
} | static boolean function(Item pvItem, String pvBindingConfig) { return ((pvItem instanceof SwitchItem) && (pvBindingConfig.contains(STR))); } | /**
* Checks, if this special binding-type matches to the given pvBindingConfig
*
* @param pvItem
* @param pvBindingConfig
* @return boolean
*/ | Checks, if this special binding-type matches to the given pvBindingConfig | isBindingConfigToCreate | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.onewire/src/main/java/org/openhab/binding/onewire/internal/deviceproperties/OneWireDevicePropertyPushButtonBindingConfig.java",
"license": "epl-1.0",
"size": 4210
} | [
"org.openhab.core.items.Item",
"org.openhab.core.library.items.SwitchItem"
] | import org.openhab.core.items.Item; import org.openhab.core.library.items.SwitchItem; | import org.openhab.core.items.*; import org.openhab.core.library.items.*; | [
"org.openhab.core"
] | org.openhab.core; | 529,348 |
@Deprecated
int apt_stream_push(AptLibrary.apt_stream stream, Pointer buf, int len); | int apt_stream_push(AptLibrary.apt_stream stream, Pointer buf, int len); | /**
* push more buffer to handle<br>
* Original signature : <code>int apt_stream_push(apt_stream*, const char*, int)</code><br>
* <i>native declaration : line 95</i><br>
* @deprecated use the safer methods {@link #apt_stream_push(apt.AptLibrary.apt_stream, java.lang.String, int)} and {@link #apt_stream_push(apt... | push more buffer to handle Original signature : <code>int apt_stream_push(apt_stream*, const char*, int)</code> native declaration : line 95 | apt_stream_push | {
"repo_name": "xwjxwj30abc/apt",
"path": "src/main/java/zx/soft/apt/j2c/AptLibrary.java",
"license": "apache-2.0",
"size": 9912
} | [
"com.sun.jna.Pointer"
] | import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 1,414,627 |
@Override
public MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
throws IOException {
final List<SegmentCommitInfo> segments = segmentInfos.asList();
final int numSegments = segments.size();
if (verbose()) {
message("findForcedDeleteMerges: " + numSegments + " segments... | MergeSpecification function(SegmentInfos segmentInfos) throws IOException { final List<SegmentCommitInfo> segments = segmentInfos.asList(); final int numSegments = segments.size(); if (verbose()) { message(STR + numSegments + STR); } MergeSpecification spec = new MergeSpecification(); int firstSegmentWithDeletions = -1... | /**
* Finds merges necessary to force-merge all deletes from the
* index. We simply merge adjacent segments that have
* deletes, up to mergeFactor at a time.
*/ | Finds merges necessary to force-merge all deletes from the index. We simply merge adjacent segments that have deletes, up to mergeFactor at a time | findForcedDeletesMerges | {
"repo_name": "yintaoxue/read-open-source-code",
"path": "solr-4.7.2/src/org/apache/lucene/index/LogMergePolicy.java",
"license": "apache-2.0",
"size": 23547
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,804,762 |
static OutputStream wrapPredictor(OutputStream out, COSDictionary decodeParams)
{
int predictor = decodeParams.getInt(COSName.PREDICTOR);
if (predictor > 1)
{
int colors = Math.min(decodeParams.getInt(COSName.COLORS, 1), 32);
int bitsPerPixel = decodeParams.getInt... | static OutputStream wrapPredictor(OutputStream out, COSDictionary decodeParams) { int predictor = decodeParams.getInt(COSName.PREDICTOR); if (predictor > 1) { int colors = Math.min(decodeParams.getInt(COSName.COLORS, 1), 32); int bitsPerPixel = decodeParams.getInt(COSName.BITS_PER_COMPONENT, 8); int columns = decodePar... | /**
* Wraps and <code>OutputStream</code> in a predictor decoding stream as necessary.
* If no predictor is specified by the parameters, the original stream is returned as is.
*
* @param out The stream to which decoded data should be written
* @param decodeParams Decode parameters for the strea... | Wraps and <code>OutputStream</code> in a predictor decoding stream as necessary. If no predictor is specified by the parameters, the original stream is returned as is | wrapPredictor | {
"repo_name": "kalaspuffar/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/filter/Predictor.java",
"license": "apache-2.0",
"size": 14431
} | [
"java.io.FilterOutputStream",
"java.io.OutputStream",
"org.apache.pdfbox.cos.COSDictionary",
"org.apache.pdfbox.cos.COSName"
] | import java.io.FilterOutputStream; import java.io.OutputStream; import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; | import java.io.*; import org.apache.pdfbox.cos.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 338,945 |
public synchronized void login(CharSequence username, String password) throws XMPPException, SmackException,
IOException {
login(username, password, config.getResource());
} | synchronized void function(CharSequence username, String password) throws XMPPException, SmackException, IOException { login(username, password, config.getResource()); } | /**
* Same as {@link #login(CharSequence, String, String)}, but takes the resource from the connection
* configuration.
*
* @param username
* @param password
* @throws XMPPException
* @throws SmackException
* @throws IOException
* @see #login
*/ | Same as <code>#login(CharSequence, String, String)</code>, but takes the resource from the connection configuration | login | {
"repo_name": "TTalkIM/Smack",
"path": "smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java",
"license": "apache-2.0",
"size": 63099
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 53,961 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(XALPackage.eINSTANCE.getLargeMailUserType_AddressLine(),
XALFactory.eINSTANCE.cr... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (XALPackage.eINSTANCE.getLargeMailUserType_AddressLine(), XALFactory.eINSTANCE.createAddressLineType())); newChildDescriptors.add (createChi... | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/org/oasis/xAL/provider/LargeMailUserTypeItemProvider.java",
"license": "apache-2.0",
"size": 228440
} | [
"java.util.Collection",
"net.opengis.citygml.CitygmlFactory",
"net.opengis.citygml.CitygmlPackage",
"net.opengis.citygml.appearance.AppearanceFactory",
"net.opengis.citygml.appearance.AppearancePackage",
"net.opengis.citygml.building.BuildingFactory",
"net.opengis.citygml.building.BuildingPackage",
"n... | import java.util.Collection; import net.opengis.citygml.CitygmlFactory; import net.opengis.citygml.CitygmlPackage; import net.opengis.citygml.appearance.AppearanceFactory; import net.opengis.citygml.appearance.AppearancePackage; import net.opengis.citygml.building.BuildingFactory; import net.opengis.citygml.building.Bu... | import java.util.*; import net.opengis.citygml.*; import net.opengis.citygml.appearance.*; import net.opengis.citygml.building.*; import net.opengis.citygml.cityfurniture.*; import net.opengis.citygml.cityobjectgroup.*; import net.opengis.citygml.generics.*; import net.opengis.citygml.landuse.*; import net.opengis.city... | [
"java.util",
"net.opengis.citygml",
"net.opengis.gml",
"org.eclipse.emf",
"org.oasis",
"org.w3"
] | java.util; net.opengis.citygml; net.opengis.gml; org.eclipse.emf; org.oasis; org.w3; | 2,238,686 |
@Test
public void testScopeConfig() {
Configuration config = new Configuration();
config.setString(MetricOptions.SCOPE_NAMING_TM, "A");
config.setString(MetricOptions.SCOPE_NAMING_TM_JOB, "B");
config.setString(MetricOptions.SCOPE_NAMING_TASK, "C");
config.setString(MetricOptions.SCOPE_NAMING_OPERATOR, "... | void function() { Configuration config = new Configuration(); config.setString(MetricOptions.SCOPE_NAMING_TM, "A"); config.setString(MetricOptions.SCOPE_NAMING_TM_JOB, "B"); config.setString(MetricOptions.SCOPE_NAMING_TASK, "C"); config.setString(MetricOptions.SCOPE_NAMING_OPERATOR, "D"); ScopeFormats scopeConfig = Sco... | /**
* Verifies that the scope configuration is properly extracted.
*/ | Verifies that the scope configuration is properly extracted | testScopeConfig | {
"repo_name": "gyfora/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/metrics/MetricRegistryImplTest.java",
"license": "apache-2.0",
"size": 17415
} | [
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.MetricOptions",
"org.apache.flink.runtime.metrics.scope.ScopeFormats",
"org.junit.Assert"
] | import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.MetricOptions; import org.apache.flink.runtime.metrics.scope.ScopeFormats; import org.junit.Assert; | import org.apache.flink.configuration.*; import org.apache.flink.runtime.metrics.scope.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 387,416 |
protected void addOnStoppingDurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SimulationConfiguration_onStoppingDuration_feature"),
ge... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ComponentPackage.Literals.SIMULATION_CONFIGURATION__ON_STOPPING_DURATION, true, false, false, Ite... | /**
* This adds a property descriptor for the On Stopping Duration feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the On Stopping Duration feature. | addOnStoppingDurationPropertyDescriptor | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.runtime.edit/src/de/dfki/iui/basys/model/runtime/component/provider/SimulationConfigurationItemProvider.java",
"license": "epl-1.0",
"size": 17784
} | [
"de.dfki.iui.basys.model.runtime.component.ComponentPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import de.dfki.iui.basys.model.runtime.component.ComponentPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import de.dfki.iui.basys.model.runtime.component.*; import org.eclipse.emf.edit.provider.*; | [
"de.dfki.iui",
"org.eclipse.emf"
] | de.dfki.iui; org.eclipse.emf; | 2,156,409 |
@Restricted(Beta.class)
public void setChannel(@Nonnull ChannelBuilder cb,
@Nonnull CommandTransport commandTransport,
@CheckForNull Channel.Listener listener) throws IOException, InterruptedException {
for (ChannelConfigurator cc : ChannelConfigurat... | @Restricted(Beta.class) void function(@Nonnull ChannelBuilder cb, @Nonnull CommandTransport commandTransport, @CheckForNull Channel.Listener listener) throws IOException, InterruptedException { for (ChannelConfigurator cc : ChannelConfigurator.all()) { cc.onChannelBuilding(cb,this); } OutputStream headerStream = cb.get... | /**
* Creates a {@link Channel} from the given Channel Builder and Command Transport.
* This method can be used to allow {@link ComputerLauncher}s to create channels not based on I/O streams.
*
* @param cb
* Channel Builder.
* To print launch logs this channel builder should have... | Creates a <code>Channel</code> from the given Channel Builder and Command Transport. This method can be used to allow <code>ComputerLauncher</code>s to create channels not based on I/O streams | setChannel | {
"repo_name": "andresrc/jenkins",
"path": "core/src/main/java/hudson/slaves/SlaveComputer.java",
"license": "mit",
"size": 38862
} | [
"hudson.remoting.Channel",
"hudson.remoting.ChannelBuilder",
"hudson.remoting.CommandTransport",
"java.io.IOException",
"java.io.OutputStream",
"java.util.logging.Level",
"javax.annotation.CheckForNull",
"javax.annotation.Nonnull",
"org.kohsuke.accmod.Restricted",
"org.kohsuke.accmod.restrictions.... | import hudson.remoting.Channel; import hudson.remoting.ChannelBuilder; import hudson.remoting.CommandTransport; import java.io.IOException; import java.io.OutputStream; import java.util.logging.Level; import javax.annotation.CheckForNull; import javax.annotation.Nonnull; import org.kohsuke.accmod.Restricted; import org... | import hudson.remoting.*; import java.io.*; import java.util.logging.*; import javax.annotation.*; import org.kohsuke.accmod.*; import org.kohsuke.accmod.restrictions.*; | [
"hudson.remoting",
"java.io",
"java.util",
"javax.annotation",
"org.kohsuke.accmod"
] | hudson.remoting; java.io; java.util; javax.annotation; org.kohsuke.accmod; | 674,981 |
public boolean isFalsePositive(HttpMessage msg) {
return false;
} | boolean function(HttpMessage msg) { return false; } | /**
* Always returns false - override to add functionality to detect FPs
*
* @param msg the message being scanned (after being sent).
* @return true if its a false positive
*/ | Always returns false - override to add functionality to detect FPs | isFalsePositive | {
"repo_name": "kingthorin/zap-extensions",
"path": "addOns/commonlib/src/main/java/org/zaproxy/addon/commonlib/AbstractHostFilePlugin.java",
"license": "apache-2.0",
"size": 7164
} | [
"org.parosproxy.paros.network.HttpMessage"
] | import org.parosproxy.paros.network.HttpMessage; | import org.parosproxy.paros.network.*; | [
"org.parosproxy.paros"
] | org.parosproxy.paros; | 840,011 |
public static Collection<SelectorOptions<GetOperationOptions>> createNoFetchCollection() {
return SelectorOptions.createCollection(createNoFetch());
} | static Collection<SelectorOptions<GetOperationOptions>> function() { return SelectorOptions.createCollection(createNoFetch()); } | /**
* No not fetch any information from external sources, e.g. do not fetch account data from resource,
* do not fetch resource schema, etc.
* Such operation returns only the data stored in midPoint repository.
*/ | No not fetch any information from external sources, e.g. do not fetch account data from resource, do not fetch resource schema, etc. Such operation returns only the data stored in midPoint repository | createNoFetchCollection | {
"repo_name": "bshp/midPoint",
"path": "infra/schema/src/main/java/com/evolveum/midpoint/schema/GetOperationOptions.java",
"license": "apache-2.0",
"size": 43853
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 260,403 |
public static String getFileLogs() throws AgencyLogException{
return getFileLogs(ClientLogLevel.ALL);
}
| static String function() throws AgencyLogException{ return getFileLogs(ClientLogLevel.ALL); } | /**
* Read entry logs from the file logs
* @return
* @throws AgencyLogException
*/ | Read entry logs from the file logs | getFileLogs | {
"repo_name": "SAP/sap_mobile_native_android",
"path": "ClientLogs/src/com/sap/dcode/agency/services/logs/AgencyLogManager.java",
"license": "apache-2.0",
"size": 6124
} | [
"com.sap.smp.client.supportability.ClientLogLevel"
] | import com.sap.smp.client.supportability.ClientLogLevel; | import com.sap.smp.client.supportability.*; | [
"com.sap.smp"
] | com.sap.smp; | 2,729,691 |
long getDocumentCount() {
try (MongoClient mongoClient =
new MongoClient(
new MongoClientURI(
spec.uri(),
getOptions(
spec.maxConnectionIdleTime(),
spec.sslEnabled(),
spec.sslInvalidHo... | long getDocumentCount() { try (MongoClient mongoClient = new MongoClient( new MongoClientURI( spec.uri(), getOptions( spec.maxConnectionIdleTime(), spec.sslEnabled(), spec.sslInvalidHostNameAllowed(), spec.ignoreSSLCertificate())))) { return getDocumentCount(mongoClient, spec.database(), spec.collection()); } catch (Ex... | /**
* Returns number of Documents in a collection.
*
* @return Positive number of Documents in a collection or -1 on error.
*/ | Returns number of Documents in a collection | getDocumentCount | {
"repo_name": "iemejia/incubator-beam",
"path": "sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java",
"license": "apache-2.0",
"size": 37430
} | [
"com.mongodb.MongoClient",
"com.mongodb.MongoClientURI"
] | import com.mongodb.MongoClient; import com.mongodb.MongoClientURI; | import com.mongodb.*; | [
"com.mongodb"
] | com.mongodb; | 945,325 |
public Field getFieldById(Long fieldIdParam) {
Field field = new Field(fieldIdParam);
//Set for Payara server...
field.setFieldValue(new MultiChoice());
field.setServiceTicket(this.serviceTicket);
return new Field(this.postJson(
field, Version1.getById()));
} | Field function(Long fieldIdParam) { Field field = new Field(fieldIdParam); field.setFieldValue(new MultiChoice()); field.setServiceTicket(this.serviceTicket); return new Field(this.postJson( field, Version1.getById())); } | /**
* Retrieves field information by {@code fieldIdParam}.
*
* @param fieldIdParam The field Primary Key.
* @return Field Definition by primary key.
*/ | Retrieves field information by fieldIdParam | getFieldById | {
"repo_name": "Koekiebox-PTY-LTD/Fluid",
"path": "fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/flow/RouteFieldClient.java",
"license": "gpl-3.0",
"size": 17023
} | [
"com.fluidbpm.program.api.vo.field.Field",
"com.fluidbpm.program.api.vo.field.MultiChoice",
"com.fluidbpm.program.api.vo.ws.WS"
] | import com.fluidbpm.program.api.vo.field.Field; import com.fluidbpm.program.api.vo.field.MultiChoice; import com.fluidbpm.program.api.vo.ws.WS; | import com.fluidbpm.program.api.vo.field.*; import com.fluidbpm.program.api.vo.ws.*; | [
"com.fluidbpm.program"
] | com.fluidbpm.program; | 2,356,430 |
public String getLatestActiveRunID() throws APIException, IOException
{
APIClient client = initializeClient();
// Submit request
JSONArray getTestsRequest = (JSONArray) client.sendGet("get_runs/" + ServerStaticGlobals.testRailProjectID +
"&is_completed=0&created_by=" +
... | String function() throws APIException, IOException { APIClient client = initializeClient(); JSONArray getTestsRequest = (JSONArray) client.sendGet(STR + ServerStaticGlobals.testRailProjectID + STR + getUserIDByEmail(System.getProperty(STR, STR))); Integer count = getTestsRequest.size(); if (count > 0) { Object o = getT... | /**
* Get the latest active run ID
*
* @return String containing active run ID
* @throws APIException
* @throws IOException
*/ | Get the latest active run ID | getLatestActiveRunID | {
"repo_name": "crazycabo/testable-testsuite-ui",
"path": "src/main/java/com/crazycabo/drivers/testrail/APIMethods.java",
"license": "mit",
"size": 6011
} | [
"com.crazycabo.models.ServerStaticGlobals",
"java.io.IOException",
"org.json.simple.JSONArray",
"org.json.simple.JSONObject"
] | import com.crazycabo.models.ServerStaticGlobals; import java.io.IOException; import org.json.simple.JSONArray; import org.json.simple.JSONObject; | import com.crazycabo.models.*; import java.io.*; import org.json.simple.*; | [
"com.crazycabo.models",
"java.io",
"org.json.simple"
] | com.crazycabo.models; java.io; org.json.simple; | 2,734,753 |
public void reset() {
mPieces = new ArrayList<Piece>();
setText("");
} | void function() { mPieces = new ArrayList<Piece>(); setText(""); } | /**
* Resets the styling of this view and sets it's content to an empty String.
*/ | Resets the styling of this view and sets it's content to an empty String | reset | {
"repo_name": "tamzi/RxAndroidBootstrap",
"path": "commons/src/main/java/com/richardradics/commons/widget/BabushkaText.java",
"license": "apache-2.0",
"size": 13223
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,192,540 |
@GET
@Path("/")
public List<LessonDTO> findAll() throws DAOException {
List<Lesson> lessons = lessonDAO.findAll();
return lessonDtoMapper.toLessonsDTO(lessons);
} | @Path("/") List<LessonDTO> function() throws DAOException { List<Lesson> lessons = lessonDAO.findAll(); return lessonDtoMapper.toLessonsDTO(lessons); } | /**
* Find all endpoint.
*
* @return the list
* @throws DAOException the DAO exception
*/ | Find all endpoint | findAll | {
"repo_name": "yntelectual/nlighten",
"path": "nlighten-backend/src/main/java/me/nlighten/backend/rest/endpoints/LessonEndpoint.java",
"license": "apache-2.0",
"size": 3103
} | [
"java.util.List",
"javax.ws.rs.Path",
"me.nlighten.backend.db.dao.exception.DAOException",
"me.nlighten.backend.db.model.Lesson",
"me.nlighten.backend.rest.model.LessonDTO"
] | import java.util.List; import javax.ws.rs.Path; import me.nlighten.backend.db.dao.exception.DAOException; import me.nlighten.backend.db.model.Lesson; import me.nlighten.backend.rest.model.LessonDTO; | import java.util.*; import javax.ws.rs.*; import me.nlighten.backend.db.dao.exception.*; import me.nlighten.backend.db.model.*; import me.nlighten.backend.rest.model.*; | [
"java.util",
"javax.ws",
"me.nlighten.backend"
] | java.util; javax.ws; me.nlighten.backend; | 141,503 |
public Builder<T, R> withFlushInterval(Amount<Integer, Time> flushInterval) {
instance.flushInterval = flushInterval;
return this;
} | Builder<T, R> function(Amount<Integer, Time> flushInterval) { instance.flushInterval = flushInterval; return this; } | /**
* Specifies the maximum amount of time that a log entry may wait in the buffer before an
* attempt is made to flush the buffer.
*
* @param flushInterval Log flush interval.
* @return A reference to the builder.
*/ | Specifies the maximum amount of time that a log entry may wait in the buffer before an attempt is made to flush the buffer | withFlushInterval | {
"repo_name": "foursquare/commons-old",
"path": "src/java/com/twitter/common/logging/BufferedLog.java",
"license": "apache-2.0",
"size": 8818
} | [
"com.twitter.common.quantity.Amount",
"com.twitter.common.quantity.Time"
] | import com.twitter.common.quantity.Amount; import com.twitter.common.quantity.Time; | import com.twitter.common.quantity.*; | [
"com.twitter.common"
] | com.twitter.common; | 2,230,054 |
public void waitTheNth(int n) {
PAFuture.waitFor(this.memberList.get(n));
} | void function(int n) { PAFuture.waitFor(this.memberList.get(n)); } | /**
* Waits for the member at the specified rank is arrived.
*
* @param n
* - the rank of the awaited member.
*/ | Waits for the member at the specified rank is arrived | waitTheNth | {
"repo_name": "acontes/programming",
"path": "src/Core/org/objectweb/proactive/core/group/ProxyForGroup.java",
"license": "agpl-3.0",
"size": 57805
} | [
"org.objectweb.proactive.api.PAFuture"
] | import org.objectweb.proactive.api.PAFuture; | import org.objectweb.proactive.api.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 2,480,464 |
public void unregisterPropertyOnType(String propertyName, JSType type) {
// TODO(bashir): typesIndexedByProperty should also be updated!
Map<String, ObjectType> typeSet =
eachRefTypeIndexedByProperty.get(propertyName);
if (typeSet != null) {
typeSet.remove(type.toObjectType().getReferenceNam... | void function(String propertyName, JSType type) { Map<String, ObjectType> typeSet = eachRefTypeIndexedByProperty.get(propertyName); if (typeSet != null) { typeSet.remove(type.toObjectType().getReferenceName()); } } | /**
* Removes the index's reference to a property on the given type (if it is
* currently registered). If the property is not registered on the type yet,
* this method will not change internal state.
*
* @param propertyName the name of the property to unregister
* @param type the type to unregister th... | Removes the index's reference to a property on the given type (if it is currently registered). If the property is not registered on the type yet, this method will not change internal state | unregisterPropertyOnType | {
"repo_name": "abdullah38rcc/closure-compiler",
"path": "src/com/google/javascript/rhino/jstype/JSTypeRegistry.java",
"license": "apache-2.0",
"size": 63642
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 546,002 |
@Deployment(testable = false)
public static WebArchive deployment() {
return Deployments.contacts();
} | @Deployment(testable = false) static WebArchive function() { return Deployments.contacts(); } | /**
* Creates deployment which is sent to the container upon test's start.
*
* @return war file which is deployed while testing, the whole application in our case
*/ | Creates deployment which is sent to the container upon test's start | deployment | {
"repo_name": "talamer/talamer-quickstarts",
"path": "contacts-postgres/functional-tests/src/test/java/org/jboss/as/quickstarts/contacts/test/ContactsMobileBasicTest.java",
"license": "apache-2.0",
"size": 7440
} | [
"org.jboss.arquillian.container.test.api.Deployment",
"org.jboss.shrinkwrap.api.spec.WebArchive"
] | import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.shrinkwrap.api.spec.WebArchive; | import org.jboss.arquillian.container.test.api.*; import org.jboss.shrinkwrap.api.spec.*; | [
"org.jboss.arquillian",
"org.jboss.shrinkwrap"
] | org.jboss.arquillian; org.jboss.shrinkwrap; | 1,462,301 |
public void updateTime (String columnName, Time columnValue) throws SQLException
{
validateResultSet();
resultSet_.updateTime(columnName, columnValue);
eventSupport_.fireRowChanged(new RowSetEvent(this));
} | void function (String columnName, Time columnValue) throws SQLException { validateResultSet(); resultSet_.updateTime(columnName, columnValue); eventSupport_.fireRowChanged(new RowSetEvent(this)); } | /**
* Updates a column in the current row using a java.sql.Time value.
* The driver converts this to an SQL TIME value.
*
* <p>This does not update the database directly. Instead, it updates
* a copy of the data in memory. Call updateRow() or insertRow() to
* update the database.
*
... | Updates a column in the current row using a java.sql.Time value. The driver converts this to an SQL TIME value. This does not update the database directly. Instead, it updates a copy of the data in memory. Call updateRow() or insertRow() to update the database | updateTime | {
"repo_name": "piguangming/jt400",
"path": "cvsroot/src/com/ibm/as400/access/AS400JDBCRowSet.java",
"license": "epl-1.0",
"size": 311708
} | [
"java.sql.SQLException",
"java.sql.Time",
"javax.sql.RowSetEvent"
] | import java.sql.SQLException; import java.sql.Time; import javax.sql.RowSetEvent; | import java.sql.*; import javax.sql.*; | [
"java.sql",
"javax.sql"
] | java.sql; javax.sql; | 2,810,466 |
public void initializeBlockRecovery(BlockInfo blockInfo, long recoveryId) {
setBlockUCState(BlockUCState.UNDER_RECOVERY);
blockRecoveryId = recoveryId;
if (replicas == null || replicas.length == 0) {
NameNode.blockStateChangeLog.warn("BLOCK*" +
" BlockUnderConstructionFeature.initializeBlo... | void function(BlockInfo blockInfo, long recoveryId) { setBlockUCState(BlockUCState.UNDER_RECOVERY); blockRecoveryId = recoveryId; if (replicas == null replicas.length == 0) { NameNode.blockStateChangeLog.warn(STR + STR + STR); primaryNodeIndex = -1; return; } boolean allLiveReplicasTriedAsPrimary = true; for (ReplicaUn... | /**
* Initialize lease recovery for this block.
* Find the first alive data-node starting from the previous primary and
* make it primary.
*/ | Initialize lease recovery for this block. Find the first alive data-node starting from the previous primary and make it primary | initializeBlockRecovery | {
"repo_name": "anjuncc/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockUnderConstructionFeature.java",
"license": "apache-2.0",
"size": 9610
} | [
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants",
"org.apache.hadoop.hdfs.server.namenode.NameNode"
] | import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.namenode.NameNode; | import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 877,183 |
public final boolean hasListOfListOfStrings() {
return listOfListOfStrings != null && !(listOfListOfStrings instanceof SdkAutoConstructList);
} | final boolean function() { return listOfListOfStrings != null && !(listOfListOfStrings instanceof SdkAutoConstructList); } | /**
* Returns true if the ListOfListOfStrings property was specified by the sender (it may be empty), or false if the
* sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS
* service.
*/ | Returns true if the ListOfListOfStrings property was specified by the sender (it may be empty), or false if the sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service | hasListOfListOfStrings | {
"repo_name": "aws/aws-sdk-java-v2",
"path": "codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/nonautoconstructcontainers/nestedcontainersresponse.java",
"license": "apache-2.0",
"size": 23410
} | [
"software.amazon.awssdk.core.util.SdkAutoConstructList"
] | import software.amazon.awssdk.core.util.SdkAutoConstructList; | import software.amazon.awssdk.core.util.*; | [
"software.amazon.awssdk"
] | software.amazon.awssdk; | 35,806 |
public MongoDbLinkedService withUsername(Object username) {
if (this.innerTypeProperties() == null) {
this.innerTypeProperties = new MongoDbLinkedServiceTypeProperties();
}
this.innerTypeProperties().withUsername(username);
return this;
} | MongoDbLinkedService function(Object username) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new MongoDbLinkedServiceTypeProperties(); } this.innerTypeProperties().withUsername(username); return this; } | /**
* Set the username property: Username for authentication. Type: string (or Expression with resultType string).
*
* @param username the username value to set.
* @return the MongoDbLinkedService object itself.
*/ | Set the username property: Username for authentication. Type: string (or Expression with resultType string) | withUsername | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/MongoDbLinkedService.java",
"license": "mit",
"size": 12530
} | [
"com.azure.resourcemanager.datafactory.fluent.models.MongoDbLinkedServiceTypeProperties"
] | import com.azure.resourcemanager.datafactory.fluent.models.MongoDbLinkedServiceTypeProperties; | import com.azure.resourcemanager.datafactory.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 299,369 |
public void setFullWidthWithHeight() {
setFullWidthWithHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
} | void function() { setFullWidthWithHeight(ViewGroup.LayoutParams.WRAP_CONTENT); } | /**
* Set full span with {@link ViewGroup.LayoutParams#WRAP_CONTENT} height
*/ | Set full span with <code>ViewGroup.LayoutParams#WRAP_CONTENT</code> height | setFullWidthWithHeight | {
"repo_name": "Tenor-Inc/tenor-android-core",
"path": "src/main/java/com/tenor/android/core/widget/viewholder/StaggeredGridLayoutItemViewHolder.java",
"license": "apache-2.0",
"size": 4448
} | [
"android.view.ViewGroup"
] | import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 2,442,084 |
public static void openFolder(String folder) {
Desktop desktop = Desktop.getDesktop();
try {
desktop.open(new File(folder));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | static void function(String folder) { Desktop desktop = Desktop.getDesktop(); try { desktop.open(new File(folder)); } catch (IOException e) { e.printStackTrace(); } } | /**
* Open folder.
*
* @param folder
* the folder
*/ | Open folder | openFolder | {
"repo_name": "cmongis/psfj",
"path": "src/knop/psfj/utils/FileUtils.java",
"license": "gpl-3.0",
"size": 5676
} | [
"java.awt.Desktop",
"java.io.File",
"java.io.IOException"
] | import java.awt.Desktop; import java.io.File; import java.io.IOException; | import java.awt.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 48,734 |
public Condition newCondition() {
throw new UnsupportedOperationException();
}
public long getHoldCount() { return sync.getHoldCount(); } | Condition function() { throw new UnsupportedOperationException(); } public long getHoldCount() { return sync.getHoldCount(); } | /**
* Throws UnsupportedOperationException. SequenceLocks
* do not support Condition objects.
*
* @throws UnsupportedOperationException always
*/ | Throws UnsupportedOperationException. SequenceLocks do not support Condition objects | newCondition | {
"repo_name": "nickman/UnsafeAdapter",
"path": "unsafeadapter-core/src/main/java/jsr166e/extra/SequenceLock.java",
"license": "lgpl-2.1",
"size": 23775
} | [
"java.util.concurrent.locks.Condition"
] | import java.util.concurrent.locks.Condition; | import java.util.concurrent.locks.*; | [
"java.util"
] | java.util; | 2,645,005 |
public static OneResponse chmod(Client client, int id,
int owner_u, int owner_m, int owner_a,
int group_u, int group_m, int group_a,
int other_u, int other_m, int other_a)
{
return chmod(client, C... | static OneResponse function(Client client, int id, int owner_u, int owner_m, int owner_a, int group_u, int group_m, int group_a, int other_u, int other_m, int other_a) { return chmod(client, CHMOD, id, owner_u, owner_m, owner_a, group_u, group_m, group_a, other_u, other_m, other_a); } | /**
* Changes the VirtualNetwork permissions
*
* @param client XML-RPC Client.
* @param id The virtual network id (nid) of the target network.
* @param owner_u 1 to allow, 0 deny, -1 do not change
* @param owner_m 1 to allow, 0 deny, -1 do not change
* @param owner_a 1 to allow, 0 den... | Changes the VirtualNetwork permissions | chmod | {
"repo_name": "hsanjuan/one",
"path": "src/oca/java/src/org/opennebula/client/vnet/VirtualNetwork.java",
"license": "apache-2.0",
"size": 21150
} | [
"org.opennebula.client.Client",
"org.opennebula.client.OneResponse"
] | import org.opennebula.client.Client; import org.opennebula.client.OneResponse; | import org.opennebula.client.*; | [
"org.opennebula.client"
] | org.opennebula.client; | 1,292,128 |
public ByteString readBytes() throws IOException {
int count = readVarint32();
return readBytes(count);
} | ByteString function() throws IOException { int count = readVarint32(); return readBytes(count); } | /**
* Reads a {@code bytes} field value from the stream. The length is read from the
* stream prior to the actual data.
*/ | Reads a bytes field value from the stream. The length is read from the stream prior to the actual data | readBytes | {
"repo_name": "wakandan/wire",
"path": "wire-runtime/src/main/java/com/squareup/wire/WireInput.java",
"license": "apache-2.0",
"size": 11446
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 956,366 |
public boolean textboxKeyTyped(char p_146201_1_, int p_146201_2_)
{
if(!field_146213_o)
return false;
else
switch(p_146201_1_)
{
case 1:
func_146202_e();
func_146199_i(0);
return true;
case 3:
GuiScreen.setClipboardString(func_146207_c());
return true;
c... | boolean function(char p_146201_1_, int p_146201_2_) { if(!field_146213_o) return false; else switch(p_146201_1_) { case 1: func_146202_e(); func_146199_i(0); return true; case 3: GuiScreen.setClipboardString(func_146207_c()); return true; case 22: if(field_146226_p) func_146191_b(GuiScreen.getClipboardString()); return... | /**
* Call this method from your GuiScreen to process the keys into the textbox
*/ | Call this method from your GuiScreen to process the keys into the textbox | textboxKeyTyped | {
"repo_name": "nerdtron123/Wurst-Client",
"path": "Wurst Client/src/tk/wurst_client/alts/gui/GuiPasswordField.java",
"license": "mpl-2.0",
"size": 14511
} | [
"net.minecraft.client.gui.GuiScreen",
"net.minecraft.util.ChatAllowedCharacters"
] | import net.minecraft.client.gui.GuiScreen; import net.minecraft.util.ChatAllowedCharacters; | import net.minecraft.client.gui.*; import net.minecraft.util.*; | [
"net.minecraft.client",
"net.minecraft.util"
] | net.minecraft.client; net.minecraft.util; | 2,379,973 |
public CreateIndexRequest setAlias(String alias) {
return setAliases(Arrays.asList(alias));
}
| CreateIndexRequest function(String alias) { return setAliases(Arrays.asList(alias)); } | /**
* Also create an alias.
*
* What happens if the alias already exists?
* ES will happily let you create multiple indices with the same alias!
* BUT an index request (i.e. "put this doc into alias") will fail.
*
* See https://www.elastic.co/guide/en/elasticsearch/reference/5.5/indices-create-index.ht... | Also create an alias. What happens if the alias already exists? ES will happily let you create multiple indices with the same alias! BUT an index request (i.e. "put this doc into alias") will fail. See HREF | setAlias | {
"repo_name": "winterstein/elasticsearch-java-client",
"path": "src/com/winterwell/es/client/admin/CreateIndexRequest.java",
"license": "mit",
"size": 8141
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,164,722 |
public StorageRandomAccessFile getRandomAccessFile( String mode) throws FileNotFoundException
{
return new CorruptRandomAccessFile(realFile.getRandomAccessFile(mode), (File) realFile);
} | StorageRandomAccessFile function( String mode) throws FileNotFoundException { return new CorruptRandomAccessFile(realFile.getRandomAccessFile(mode), (File) realFile); } | /**
* Get a random access (read/write) file.
*
* @param mode "r", "rw", "rws", or "rwd". The "rws" and "rwd" modes specify
* that the data is to be written to persistent store,
* consistent with the java.io.RandomAccessFile class
* ("synchronized" with... | Get a random access (read/write) file | getRandomAccessFile | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/tools/src/testing/java/org/apache/derbyTesting/functionTests/util/corruptio/CorruptFile.java",
"license": "apache-2.0",
"size": 12740
} | [
"com.pivotal.gemfirexd.internal.io.StorageRandomAccessFile",
"java.io.File",
"java.io.FileNotFoundException"
] | import com.pivotal.gemfirexd.internal.io.StorageRandomAccessFile; import java.io.File; import java.io.FileNotFoundException; | import com.pivotal.gemfirexd.internal.io.*; import java.io.*; | [
"com.pivotal.gemfirexd",
"java.io"
] | com.pivotal.gemfirexd; java.io; | 1,845,863 |
RowReport reportOnEndOfLine(); | RowReport reportOnEndOfLine(); | /**
* Generates a report on the Row with focus on the end of the row. This is internally used when there is
* a syntax error in the line. It could also be used when there is an error that can not be traced back
* to a single cell.
* @return report on the row with focus on the end of the row
*/ | Generates a report on the Row with focus on the end of the row. This is internally used when there is a syntax error in the line. It could also be used when there is an error that can not be traced back to a single cell | reportOnEndOfLine | {
"repo_name": "robert-bor/CSVeed",
"path": "src/main/java/org/csveed/api/Row.java",
"license": "apache-2.0",
"size": 2560
} | [
"org.csveed.report.RowReport"
] | import org.csveed.report.RowReport; | import org.csveed.report.*; | [
"org.csveed.report"
] | org.csveed.report; | 2,402,829 |
public void testGetResultSizeFromMap() throws Exception {
SpringContext.getBean(BusinessObjectService.class).save(buildAccountBalanceFixture());
Map propertyMap = new HashMap();
propertyMap.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, TestUtils.getFiscalYearForTesting().toString());
... | void function() throws Exception { SpringContext.getBean(BusinessObjectService.class).save(buildAccountBalanceFixture()); Map propertyMap = new HashMap(); propertyMap.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, TestUtils.getFiscalYearForTesting().toString()); Long resultSize = OJBUtility.getResultSizeFromMap(prope... | /**
* Tests the OJBUtility.getResultSizeFromMap method
*
* @throws Exception thrown if any exception is encountered for any reason
*/ | Tests the OJBUtility.getResultSizeFromMap method | testGetResultSizeFromMap | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/test/java/org/kuali/kfs/gl/OJBUtilityTest.java",
"license": "agpl-3.0",
"size": 5568
} | [
"java.util.HashMap",
"java.util.Map",
"org.kuali.kfs.gl.businessobject.AccountBalance",
"org.kuali.kfs.krad.service.BusinessObjectService",
"org.kuali.kfs.sys.KFSPropertyConstants",
"org.kuali.kfs.sys.context.SpringContext",
"org.kuali.kfs.sys.context.TestUtils"
] | import java.util.HashMap; import java.util.Map; import org.kuali.kfs.gl.businessobject.AccountBalance; import org.kuali.kfs.krad.service.BusinessObjectService; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.kfs.sys.context.TestUtils; | import java.util.*; import org.kuali.kfs.gl.businessobject.*; import org.kuali.kfs.krad.service.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 155,143 |
private static void close(Closeable resource) {
if (resource != null) {
try {
resource.close();
} catch (IOException ignore) {
// Ignore IOException. If you want to handle this anyway, it might be useful to know
// that this will generally only be thrown when the client aborted the request.
}
... | static void function(Closeable resource) { if (resource != null) { try { resource.close(); } catch (IOException ignore) { } } } protected class Range { long start; long end; long length; long total; public Range(long start, long end, long total) { this.start = start; this.end = end; this.length = end - start + 1; this.... | /**
* Close the given resource.
* @param resource The resource to be closed.
*/ | Close the given resource | close | {
"repo_name": "intirix/openmm-server",
"path": "src/main/java/com/intirix/openmm/server/vfs/FileServlet.java",
"license": "mit",
"size": 18219
} | [
"java.io.Closeable",
"java.io.IOException"
] | import java.io.Closeable; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,587,557 |
public void restoreSnapshot(final RestoreRequest request, final ActionListener<RestoreInfo> listener) {
try {
// Read snapshot info and metadata from the repository
Repository repository = repositoriesService.repository(request.repository());
final SnapshotId snapshotId =... | void function(final RestoreRequest request, final ActionListener<RestoreInfo> listener) { try { Repository repository = repositoriesService.repository(request.repository()); final SnapshotId snapshotId = new SnapshotId(request.repository(), request.name()); final Snapshot snapshot = repository.readSnapshot(snapshotId);... | /**
* Restores snapshot specified in the restore request.
*
* @param request restore request
* @param listener restore listener
*/ | Restores snapshot specified in the restore request | restoreSnapshot | {
"repo_name": "xingguang2013/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/snapshots/RestoreService.java",
"license": "apache-2.0",
"size": 54628
} | [
"java.util.List",
"java.util.Map",
"org.elasticsearch.Version",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.cluster.ClusterStateUpdateTask",
"org.elasticsearch.cluster.metadata.MetaData",
"org.elasticsearch.cluster.metadata.SnapshotId",
"org.elasticsearch.repositories.Repository"
] | import java.util.List; import java.util.Map; import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; import org.elasticsearch.cluster.ClusterStateUpdateTask; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.metadata.SnapshotId; import org.elasticsearch.repos... | import java.util.*; import org.elasticsearch.*; import org.elasticsearch.action.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.repositories.*; | [
"java.util",
"org.elasticsearch",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.repositories"
] | java.util; org.elasticsearch; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.repositories; | 1,097,482 |
public void addRequestAccepted(Player target)
{
player.sendMessage(ChatColor.AQUA + target.getDisplayName() +
" added to troupe.");
ActorAPI.getAuthor(player).getTroupeMembers().add(target);
}
| void function(Player target) { player.sendMessage(ChatColor.AQUA + target.getDisplayName() + STR); ActorAPI.getAuthor(player).getTroupeMembers().add(target); } | /**
* Once the player confirms they are in the troupe, add them to the troupe set.
* @param target
* @return
*/ | Once the player confirms they are in the troupe, add them to the troupe set | addRequestAccepted | {
"repo_name": "weinberg/Actor",
"path": "src/com/insofar/actor/commands/author/Troupe.java",
"license": "gpl-3.0",
"size": 6442
} | [
"com.insofar.actor.ActorAPI",
"org.bukkit.ChatColor",
"org.bukkit.entity.Player"
] | import com.insofar.actor.ActorAPI; import org.bukkit.ChatColor; import org.bukkit.entity.Player; | import com.insofar.actor.*; import org.bukkit.*; import org.bukkit.entity.*; | [
"com.insofar.actor",
"org.bukkit",
"org.bukkit.entity"
] | com.insofar.actor; org.bukkit; org.bukkit.entity; | 1,978,555 |
ServiceResponse<A> get200ModelA202Valid() throws ServiceException, IOException; | ServiceResponse<A> get200ModelA202Valid() throws ServiceException, IOException; | /**
* Send a 202 response with payload {'statusCode': '202'}.
*
* @throws ServiceException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the A object wrapped in {@link ServiceResponse} if successful.
*/ | Send a 202 response with payload {'statusCode': '202'} | get200ModelA202Valid | {
"repo_name": "brodyberg/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/MultipleResponsesOperations.java",
"license": "mit",
"size": 29440
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 2,102,805 |
String issuerName = certificate.getIssuerX500Principal().getName();
BigInteger serialNumber = certificate.getSerialNumber();
addEndEntity(issuerName, serialNumber);
} | String issuerName = certificate.getIssuerX500Principal().getName(); BigInteger serialNumber = certificate.getSerialNumber(); addEndEntity(issuerName, serialNumber); } | /**
* Adds an end-entity certificate to the set of allowed certificates.
*
* @param certificate
* the X509 end-entity certificate.
*/ | Adds an end-entity certificate to the set of allowed certificates | addEndEntity | {
"repo_name": "tectronics/jtrust",
"path": "jtrust-lib/src/main/java/be/fedict/trust/constraints/EndEntityCertificateConstraint.java",
"license": "gpl-3.0",
"size": 3275
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,080,620 |
public void notifyNodeFailures(Collection<String> deadNodes) {
try {
jobRun.getPartitionMatchMaker().notifyNodeFailures(deadNodes);
jobRun.getParticipatingNodeIds().removeAll(deadNodes);
jobRun.getCleanupPendingNodeIds().removeAll(deadNodes);
if (jobRun.getPen... | void function(Collection<String> deadNodes) { try { jobRun.getPartitionMatchMaker().notifyNodeFailures(deadNodes); jobRun.getParticipatingNodeIds().removeAll(deadNodes); jobRun.getCleanupPendingNodeIds().removeAll(deadNodes); if (jobRun.getPendingStatus() != null && jobRun.getCleanupPendingNodeIds().isEmpty()) { IJobMa... | /**
* Indicates that the provided set of nodes have left the cluster.
*
* @param deadNodes
* - Set of failed nodes
*/ | Indicates that the provided set of nodes have left the cluster | notifyNodeFailures | {
"repo_name": "heriram/incubator-asterixdb",
"path": "hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/executor/JobExecutor.java",
"license": "apache-2.0",
"size": 36295
} | [
"java.util.Collection",
"java.util.Collections",
"org.apache.hyracks.api.exceptions.ErrorCode",
"org.apache.hyracks.api.exceptions.HyracksException",
"org.apache.hyracks.control.cc.job.IJobManager"
] | import java.util.Collection; import java.util.Collections; import org.apache.hyracks.api.exceptions.ErrorCode; import org.apache.hyracks.api.exceptions.HyracksException; import org.apache.hyracks.control.cc.job.IJobManager; | import java.util.*; import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.control.cc.job.*; | [
"java.util",
"org.apache.hyracks"
] | java.util; org.apache.hyracks; | 2,673,744 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
PollerFlux<PollResult<NetworkInterfaceInner>, NetworkInterfaceInner> beginCreateOrUpdateAsync(
String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<NetworkInterfaceInner>, NetworkInterfaceInner> beginCreateOrUpdateAsync( String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters); | /**
* Creates or updates a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param parameters Parameters supplied to the create or update network interface operation.
* @throws IllegalArgument... | Creates or updates a network interface | beginCreateOrUpdateAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java",
"license": "mit",
"size": 71039
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.PollerFlux",
"com.azure.resourcemanager.network.fluent.models.NetworkInterfaceInner"
] | 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.PollerFlux; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,861,959 |
private void checkIndexCounter(List<AbstractPlanNode> pn, boolean isReplaceable) {
assertTrue(pn.size() > 0);
for ( AbstractPlanNode nd : pn) {
System.out.println("PlanNode Explain string:\n" + nd.toExplainPlanString());
}
AbstractPlanNode p = pn.get(0).getChild(0);
... | void function(List<AbstractPlanNode> pn, boolean isReplaceable) { assertTrue(pn.size() > 0); for ( AbstractPlanNode nd : pn) { System.out.println(STR + nd.toExplainPlanString()); } AbstractPlanNode p = pn.get(0).getChild(0); if (isReplaceable) assertTrue(p instanceof IndexCountPlanNode); else assertTrue((p instanceof I... | /**
* Check Whether or not the original plan is replaced with CountingIndexPlanNode.
*
* @param pn
* The generated plan
* @param isReplaceable
* Whether or not the original plan is replaced with CountingIndexPlanNode
*/ | Check Whether or not the original plan is replaced with CountingIndexPlanNode | checkIndexCounter | {
"repo_name": "zheguang/voltdb",
"path": "tests/frontend/org/voltdb/planner/TestReplaceWithIndexCounter.java",
"license": "agpl-3.0",
"size": 12582
} | [
"java.util.List",
"org.voltdb.plannodes.AbstractPlanNode",
"org.voltdb.plannodes.IndexCountPlanNode"
] | import java.util.List; import org.voltdb.plannodes.AbstractPlanNode; import org.voltdb.plannodes.IndexCountPlanNode; | import java.util.*; import org.voltdb.plannodes.*; | [
"java.util",
"org.voltdb.plannodes"
] | java.util; org.voltdb.plannodes; | 2,834,940 |
synchronized void incrementSafeBlockCount(int storageNum,
BlockInfo storedBlock) {
assert namesystem.hasWriteLock();
if (status == BMSafeModeStatus.OFF) {
return;
}
final int safe = storedBlock.isStriped() ?
((BlockInfoStriped)storedBlock).getRealDataBlockNum() : safeReplication;
... | synchronized void incrementSafeBlockCount(int storageNum, BlockInfo storedBlock) { assert namesystem.hasWriteLock(); if (status == BMSafeModeStatus.OFF) { return; } final int safe = storedBlock.isStriped() ? ((BlockInfoStriped)storedBlock).getRealDataBlockNum() : safeReplication; if (storageNum == safe) { this.blockSaf... | /**
* Increment number of safe blocks if current block has reached minimal
* replication.
* If safe mode is not currently on, this is a no-op.
* @param storageNum current number of replicas or number of internal blocks
* of a striped block group
* @param storedBlock current storedB... | Increment number of safe blocks if current block has reached minimal replication. If safe mode is not currently on, this is a no-op | incrementSafeBlockCount | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java",
"license": "apache-2.0",
"size": 24122
} | [
"org.apache.hadoop.hdfs.server.namenode.NameNode",
"org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase",
"org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress",
"org.apache.hadoop.hdfs.server.namenode.startupprogress.Status"
] | import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase; import org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress; import org.apache.hadoop.hdfs.server.namenode.startupprogress.Status; | import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.server.namenode.startupprogress.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 477,631 |
@Test
public void testLoadData() {
String sep = System.getProperty("line.separator");
String fileName = "Address.txt";
String result = instance.loadData(fileName);
String expResult = String.format("%s%s%s%s%s%s", "moscow", sep, "Peter", sep, "Bryansk", sep);
assertEquals(... | void function() { String sep = System.getProperty(STR); String fileName = STR; String result = instance.loadData(fileName); String expResult = String.format(STR, STR, sep, "Peter", sep, STR, sep); assertEquals(expResult, result); } | /**
* Test of loadData method, of class AbstractCache.
*/ | Test of loadData method, of class AbstractCache | testLoadData | {
"repo_name": "CkimiHoK/JavaFromZeroToJunior",
"path": "javalearning/Chapter6/src/test/java/ru/aveselov/lesson4/AbstractCacheTest.java",
"license": "apache-2.0",
"size": 2224
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 597,743 |
protected void addMessages(String bundleName) {
addMessages(new CmsMessages(bundleName, getLocale()));
} | void function(String bundleName) { addMessages(new CmsMessages(bundleName, getLocale())); } | /**
* Auxiliary method for initialization of messages.<p>
*
* @param bundleName the resource bundle name to add
*/ | Auxiliary method for initialization of messages | addMessages | {
"repo_name": "victos/opencms-core",
"path": "src/org/opencms/workplace/CmsWorkplace.java",
"license": "lgpl-2.1",
"size": 80916
} | [
"org.opencms.i18n.CmsMessages"
] | import org.opencms.i18n.CmsMessages; | import org.opencms.i18n.*; | [
"org.opencms.i18n"
] | org.opencms.i18n; | 2,365,474 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
| void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "upohl/eloquent",
"path": "examples/seminar/plugins/de.fraunhofer.iem.seminar.edit/src/de/fraunhofer/iem/seminar/provider/AssignmentItemProvider.java",
"license": "epl-1.0",
"size": 4903
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,355,654 |
public static boolean validateContinuityOfCareDocumentOneOrTwoRecordTarget(ContinuityOfCareDocument continuityOfCareDocument, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (VALIDATE_CONTINUITY_OF_CARE_DOCUMENT_ONE_OR_TWO_RECORD_TARGET__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
OCL.Helper hel... | static boolean function(ContinuityOfCareDocument continuityOfCareDocument, DiagnosticChain diagnostics, Map<Object, Object> context) { if (VALIDATE_CONTINUITY_OF_CARE_DOCUMENT_ONE_OR_TWO_RECORD_TARGET__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setContext(CCDPackage... | /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* self.recordTarget->size() = 1 or self.recordTarget->size() =2
* @param continuityOfCareDocument The receiving '<em><b>Continuity Of Care Document</b></em>' model object.
* @param diagnostics The chain of diagnostics to ... | self.recordTarget->size() = 1 or self.recordTarget->size() =2 | validateContinuityOfCareDocumentOneOrTwoRecordTarget | {
"repo_name": "drbgfc/mdht",
"path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ccd/src/org/openhealthtools/mdht/uml/cda/ccd/operations/ContinuityOfCareDocumentOperations.java",
"license": "epl-1.0",
"size": 135771
} | [
"java.util.Map",
"org.eclipse.emf.common.util.BasicDiagnostic",
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.common.util.DiagnosticChain",
"org.eclipse.ocl.ParserException",
"org.eclipse.ocl.ecore.Constraint",
"org.openhealthtools.mdht.uml.cda.ccd.CCDPackage",
"org.openhealthtools.mdht.u... | import java.util.Map; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain; import org.eclipse.ocl.ParserException; import org.eclipse.ocl.ecore.Constraint; import org.openhealthtools.mdht.uml.cda.ccd.CCDPackage; import org... | import java.util.*; import org.eclipse.emf.common.util.*; import org.eclipse.ocl.*; import org.eclipse.ocl.ecore.*; import org.openhealthtools.mdht.uml.cda.ccd.*; import org.openhealthtools.mdht.uml.cda.ccd.util.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.ocl",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.eclipse.ocl; org.openhealthtools.mdht; | 154,230 |
@Override
public MappableBlock load(long length, FileInputStream blockIn,
FileInputStream metaIn, String blockFileName,
ExtendedBlockId key)
throws IOException {
NativePmemMappedBlock mappableBlock = null;
POSIX.PmemMappedRegion region = null;
String filePath = null;
try (FileChan... | MappableBlock function(long length, FileInputStream blockIn, FileInputStream metaIn, String blockFileName, ExtendedBlockId key) throws IOException { NativePmemMappedBlock mappableBlock = null; POSIX.PmemMappedRegion region = null; String filePath = null; try (FileChannel blockChannel = blockIn.getChannel()) { if (block... | /**
* Load the block.
*
* Map the block and verify its checksum.
*
* The block will be mapped to PmemDir/BlockPoolId/subdir#/subdir#/BlockId,
* in which PmemDir is a persistent memory volume chosen by PmemVolumeManager.
*
* @param length The current length of the block.
* @param block... | Load the block. Map the block and verify its checksum. The block will be mapped to PmemDir/BlockPoolId/subdir#/subdir#/BlockId, in which PmemDir is a persistent memory volume chosen by PmemVolumeManager | load | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/NativePmemMappableBlockLoader.java",
"license": "apache-2.0",
"size": 8260
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.nio.channels.FileChannel",
"org.apache.hadoop.hdfs.ExtendedBlockId",
"org.apache.hadoop.io.nativeio.NativeIO"
] | import java.io.FileInputStream; import java.io.IOException; import java.nio.channels.FileChannel; import org.apache.hadoop.hdfs.ExtendedBlockId; import org.apache.hadoop.io.nativeio.NativeIO; | import java.io.*; import java.nio.channels.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.io.nativeio.*; | [
"java.io",
"java.nio",
"org.apache.hadoop"
] | java.io; java.nio; org.apache.hadoop; | 1,151,997 |
@Test(expected = ParseException.class)
public void testDayOfYearNull() {
Object result = run("DAY_OF_YEAR(nada)");
} | @Test(expected = ParseException.class) void function() { Object result = run(STR); } | /**
* If refer to variable that does not exist, expect ParseException.
*/ | If refer to variable that does not exist, expect ParseException | testDayOfYearNull | {
"repo_name": "cestella/incubator-metron",
"path": "metron-stellar/stellar-common/src/test/java/org/apache/metron/stellar/dsl/functions/DateFunctionsTest.java",
"license": "apache-2.0",
"size": 6058
} | [
"org.apache.metron.stellar.dsl.ParseException",
"org.junit.Test"
] | import org.apache.metron.stellar.dsl.ParseException; import org.junit.Test; | import org.apache.metron.stellar.dsl.*; import org.junit.*; | [
"org.apache.metron",
"org.junit"
] | org.apache.metron; org.junit; | 2,661,085 |
public static Expectations getCsvExportParameterExpectations(
final HttpServletResponse response,
final RhnMockServletOutputStream out) throws IOException {
return new Expectations() { {
atLeast(1).of(response).getCharacterEncoding();
will(returnValue("UTF-8")... | static Expectations function( final HttpServletResponse response, final RhnMockServletOutputStream out) throws IOException { return new Expectations() { { atLeast(1).of(response).getCharacterEncoding(); will(returnValue("UTF-8")); atLeast(1).of(response).setContentType(STR); atLeast(1).of(response).setHeader(STR, STR);... | /**
* Returns the expectations of {@link HttpServletResponse} when CSV Export is performed.
* @param response the response
* @param out - the output stream
* @return the expectations
* @throws IOException if something goes wrong
*/ | Returns the expectations of <code>HttpServletResponse</code> when CSV Export is performed | getCsvExportParameterExpectations | {
"repo_name": "jhutar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/taglibs/test/CSVMockTestHelper.java",
"license": "gpl-2.0",
"size": 1820
} | [
"com.redhat.rhn.testing.RhnMockServletOutputStream",
"java.io.IOException",
"javax.servlet.http.HttpServletResponse",
"org.jmock.Expectations"
] | import com.redhat.rhn.testing.RhnMockServletOutputStream; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.jmock.Expectations; | import com.redhat.rhn.testing.*; import java.io.*; import javax.servlet.http.*; import org.jmock.*; | [
"com.redhat.rhn",
"java.io",
"javax.servlet",
"org.jmock"
] | com.redhat.rhn; java.io; javax.servlet; org.jmock; | 11,831 |
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
String userName = null;
if (authentication != null) {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails spr... | SecurityContext securityContext = SecurityContextHolder.getContext(); Authentication authentication = securityContext.getAuthentication(); String userName = null; if (authentication != null) { if (authentication.getPrincipal() instanceof UserDetails) { UserDetails springSecurityUser = (UserDetails) authentication.getPr... | /**
* Get the login of the current user.
*
* @return the login of the current user
*/ | Get the login of the current user | getCurrentUserLogin | {
"repo_name": "jlopezjuy/ClothesHipster",
"path": "anelclothesapp/src/main/java/com/anelsoftware/clothes/security/SecurityUtils.java",
"license": "gpl-3.0",
"size": 2593
} | [
"org.springframework.security.core.Authentication",
"org.springframework.security.core.context.SecurityContext",
"org.springframework.security.core.context.SecurityContextHolder",
"org.springframework.security.core.userdetails.UserDetails"
] | import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; | import org.springframework.security.core.*; import org.springframework.security.core.context.*; import org.springframework.security.core.userdetails.*; | [
"org.springframework.security"
] | org.springframework.security; | 1,758,422 |
@ApiModelProperty(example = "null", value = "")
public LocalDate getActiveUntil() {
return activeUntil;
} | @ApiModelProperty(example = "null", value = "") LocalDate function() { return activeUntil; } | /**
* Get activeUntil
* @return activeUntil
**/ | Get activeUntil | getActiveUntil | {
"repo_name": "leanix/leanix-sdk-java",
"path": "src/main/java/net/leanix/api/models/FactSheetRelation.java",
"license": "mit",
"size": 14604
} | [
"io.swagger.annotations.ApiModelProperty",
"java.time.LocalDate"
] | import io.swagger.annotations.ApiModelProperty; import java.time.LocalDate; | import io.swagger.annotations.*; import java.time.*; | [
"io.swagger.annotations",
"java.time"
] | io.swagger.annotations; java.time; | 2,467,810 |
protected SqlValidatorScope getScope() {
return requireNonNull(scopes.peek(), "scopes.peek()");
} | SqlValidatorScope function() { return requireNonNull(scopes.peek(), STR); } | /**
* Returns the current scope.
*/ | Returns the current scope | getScope | {
"repo_name": "datametica/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/SqlScopedShuttle.java",
"license": "apache-2.0",
"size": 2511
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,073,572 |
public static MozuClient<com.mozu.api.contracts.productadmin.AttributeInProductType> getPropertyClient(com.mozu.api.DataViewMode dataViewMode, Integer productTypeId, String attributeFQN, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.attributedefinition.productt... | static MozuClient<com.mozu.api.contracts.productadmin.AttributeInProductType> function(com.mozu.api.DataViewMode dataViewMode, Integer productTypeId, String attributeFQN, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.attributedefinition.producttypes.ProductTypeProperty... | /**
*
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.productadmin.AttributeInProductType> mozuClient=GetPropertyClient(dataViewMode, productTypeId, attributeFQN, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* AttributeInProductType attributeInProductType = client... | <code><code> MozuClient mozuClient=GetPropertyClient(dataViewMode, productTypeId, attributeFQN, responseFields); client.setBaseAddress(url); client.executeRequest(); AttributeInProductType attributeInProductType = client.Result(); </code></code> | getPropertyClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/attributedefinition/producttypes/ProductTypePropertyClient.java",
"license": "mit",
"size": 13292
} | [
"com.mozu.api.DataViewMode",
"com.mozu.api.Headers",
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 878,561 |
@WebMethod(operationName = "deleteAgendaItem")
@CacheEvict(value={AgendaTreeDefinition.Cache.NAME, AgendaDefinition.Cache.NAME, AgendaItemDefinition.Cache.NAME, ContextDefinition.Cache.NAME}, allEntries = true)
public void deleteAgendaItem(@WebParam(name = "id") String id) throws RiceIllegalArgumentExceptio... | @WebMethod(operationName = STR) @CacheEvict(value={AgendaTreeDefinition.Cache.NAME, AgendaDefinition.Cache.NAME, AgendaItemDefinition.Cache.NAME, ContextDefinition.Cache.NAME}, allEntries = true) void function(@WebParam(name = "id") String id) throws RiceIllegalArgumentException; | /**
* Delete the specified AgendaItem
*
* @param id identifier of the AgendaItem to be deleted
* @throws RiceIllegalArgumentException if the given id is null or invalid
*/ | Delete the specified AgendaItem | deleteAgendaItem | {
"repo_name": "mztaylor/rice-git",
"path": "rice-middleware/krms/api/src/main/java/org/kuali/rice/krms/api/repository/RuleManagementService.java",
"license": "apache-2.0",
"size": 61035
} | [
"javax.jws.WebMethod",
"javax.jws.WebParam",
"org.kuali.rice.core.api.exception.RiceIllegalArgumentException",
"org.kuali.rice.krms.api.repository.agenda.AgendaDefinition",
"org.kuali.rice.krms.api.repository.agenda.AgendaItemDefinition",
"org.kuali.rice.krms.api.repository.agenda.AgendaTreeDefinition",
... | import javax.jws.WebMethod; import javax.jws.WebParam; import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; import org.kuali.rice.krms.api.repository.agenda.AgendaDefinition; import org.kuali.rice.krms.api.repository.agenda.AgendaItemDefinition; import org.kuali.rice.krms.api.repository.agenda.AgendaT... | import javax.jws.*; import org.kuali.rice.core.api.exception.*; import org.kuali.rice.krms.api.repository.agenda.*; import org.kuali.rice.krms.api.repository.context.*; import org.springframework.cache.annotation.*; | [
"javax.jws",
"org.kuali.rice",
"org.springframework.cache"
] | javax.jws; org.kuali.rice; org.springframework.cache; | 1,494,417 |
public LicenseBean getLicense()
{
try
{
if(license != null) return license;
license = gpUtil.getGPServerService().license();
}
catch (GreenPepperServerException e)
{
license = new LicenseBean();
}
return license;
... | LicenseBean function() { try { if(license != null) return license; license = gpUtil.getGPServerService().license(); } catch (GreenPepperServerException e) { license = new LicenseBean(); } return license; } | /**
* <p>Getter for the field <code>license</code>.</p>
*
* @return a {@link com.greenpepper.server.license.LicenseBean} object.
*/ | Getter for the field <code>license</code> | getLicense | {
"repo_name": "strator-dev/greenpepper-open",
"path": "confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/actions/server/ConfigurationAction.java",
"license": "apache-2.0",
"size": 15996
} | [
"com.greenpepper.server.GreenPepperServerException",
"com.greenpepper.server.license.LicenseBean"
] | import com.greenpepper.server.GreenPepperServerException; import com.greenpepper.server.license.LicenseBean; | import com.greenpepper.server.*; import com.greenpepper.server.license.*; | [
"com.greenpepper.server"
] | com.greenpepper.server; | 1,454,280 |
private void initCard() {
ArrayList<Card> cards = new ArrayList<Card>();
for (int i = 0; i < 200; i++) {
GplayGridCard card = new GplayGridCard(getActivity());
card.headerTitle = "App example " + i;
card.secondaryTitle = "Some text here " + i;
card.... | void function() { ArrayList<Card> cards = new ArrayList<Card>(); for (int i = 0; i < 200; i++) { GplayGridCard card = new GplayGridCard(getActivity()); card.headerTitle = STR + i; card.secondaryTitle = STR + i; card.rating = (float) (Math.random() * (5.0)); if ((i % 6 == 0)) { card.resourceIdThumbnail = R.drawable.ic_i... | /**
* This method builds a simple card
*/ | This method builds a simple card | initCard | {
"repo_name": "tajchert/CEEHack",
"path": "cardslib/demo/extras/src/main/java/it/gmariotti/cardslib/demo/extras/fragment/ListViewGridAnimationsFragment.java",
"license": "apache-2.0",
"size": 10724
} | [
"it.gmariotti.cardslib.library.internal.Card",
"it.gmariotti.cardslib.library.internal.CardGridArrayAdapter",
"it.gmariotti.cardslib.library.view.CardGridView",
"java.util.ArrayList"
] | import it.gmariotti.cardslib.library.internal.Card; import it.gmariotti.cardslib.library.internal.CardGridArrayAdapter; import it.gmariotti.cardslib.library.view.CardGridView; import java.util.ArrayList; | import it.gmariotti.cardslib.library.internal.*; import it.gmariotti.cardslib.library.view.*; import java.util.*; | [
"it.gmariotti.cardslib",
"java.util"
] | it.gmariotti.cardslib; java.util; | 583,453 |
@Transactional (readOnly=false, propagation=Propagation.REQUIRED)
public void createTmpUser (User user) throws RequiredFieldMissingException,
RootNotModifiableException, EmailNotSentException
{
checkRequiredFields (user);
checkRoot (user);
userDao.createTmpUser (user);
} | @Transactional (readOnly=false, propagation=Propagation.REQUIRED) void function (User user) throws RequiredFieldMissingException, RootNotModifiableException, EmailNotSentException { checkRequiredFields (user); checkRoot (user); userDao.createTmpUser (user); } | /**
* Create given User as temporary User, after checking required fields.
*
* @param user
* @throws RequiredFieldMissingException
* @throws RootNotModifiableException
*/ | Create given User as temporary User, after checking required fields | createTmpUser | {
"repo_name": "calogera/DataHubSystem",
"path": "core/src/main/java/fr/gael/dhus/service/UserService.java",
"license": "agpl-3.0",
"size": 30509
} | [
"fr.gael.dhus.database.object.User",
"fr.gael.dhus.service.exception.EmailNotSentException",
"fr.gael.dhus.service.exception.RequiredFieldMissingException",
"fr.gael.dhus.service.exception.RootNotModifiableException",
"org.springframework.transaction.annotation.Propagation",
"org.springframework.transacti... | import fr.gael.dhus.database.object.User; import fr.gael.dhus.service.exception.EmailNotSentException; import fr.gael.dhus.service.exception.RequiredFieldMissingException; import fr.gael.dhus.service.exception.RootNotModifiableException; import org.springframework.transaction.annotation.Propagation; import org.springfr... | import fr.gael.dhus.database.object.*; import fr.gael.dhus.service.exception.*; import org.springframework.transaction.annotation.*; | [
"fr.gael.dhus",
"org.springframework.transaction"
] | fr.gael.dhus; org.springframework.transaction; | 1,825,062 |
public static ims.clinical.configuration.domain.objects.InternalReferralSettings extractInternalReferralSettings(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.InternalReferralSettingsForBookingWorklistVo valueObject)
{
return extractInternalReferralSettings(domainFactory, valueObjec... | static ims.clinical.configuration.domain.objects.InternalReferralSettings function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.InternalReferralSettingsForBookingWorklistVo valueObject) { return extractInternalReferralSettings(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractInternalReferralSettings | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/clinicaladmin/vo/domain/InternalReferralSettingsForBookingWorklistVoAssembler.java",
"license": "agpl-3.0",
"size": 18827
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 289,460 |
CancelamentoMatriculaDTO save(CancelamentoMatriculaDTO cancelamentoMatriculaDTO); | CancelamentoMatriculaDTO save(CancelamentoMatriculaDTO cancelamentoMatriculaDTO); | /**
* Save a cancelamentoMatricula.
*
* @param cancelamentoMatriculaDTO the entity to save
* @return the persisted entity
*/ | Save a cancelamentoMatricula | save | {
"repo_name": "DamascenoRafael/cos482-qualidade-de-software",
"path": "www/src/main/java/br/ufrj/g2matricula/service/CancelamentoMatriculaService.java",
"license": "mit",
"size": 1195
} | [
"br.ufrj.g2matricula.service.dto.CancelamentoMatriculaDTO"
] | import br.ufrj.g2matricula.service.dto.CancelamentoMatriculaDTO; | import br.ufrj.g2matricula.service.dto.*; | [
"br.ufrj.g2matricula"
] | br.ufrj.g2matricula; | 2,790,259 |
@Override
public List<IAcceleoTextGenerationListener> getGenerationListeners() {
List<IAcceleoTextGenerationListener> listeners = super.getGenerationListeners();
return listeners;
} | List<IAcceleoTextGenerationListener> function() { List<IAcceleoTextGenerationListener> listeners = super.getGenerationListeners(); return listeners; } | /**
* If this generator needs to listen to text generation events, listeners can be returned from here.
*
* @return List of listeners that are to be notified when text is generated through this launch.
* @generated
*/ | If this generator needs to listen to text generation events, listeners can be returned from here | getGenerationListeners | {
"repo_name": "Obeo/Game-Designer",
"path": "plugins/fr.obeo.generator.game/src/fr/obeo/generator/game/module/Main.java",
"license": "epl-1.0",
"size": 18158
} | [
"java.util.List",
"org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener"
] | import java.util.List; import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener; | import java.util.*; import org.eclipse.acceleo.engine.event.*; | [
"java.util",
"org.eclipse.acceleo"
] | java.util; org.eclipse.acceleo; | 338,312 |
public CookieConfigType<T> secure(Boolean secure)
{
childNode.getOrCreate("secure").text(secure);
return this;
} | CookieConfigType<T> function(Boolean secure) { childNode.getOrCreate(STR).text(secure); return this; } | /**
* Sets the <code>secure</code> element
* @param secure the value for the element <code>secure</code>
* @return the current instance of <code>CookieConfigType<T></code>
*/ | Sets the <code>secure</code> element | secure | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/webcommon31/CookieConfigTypeImpl.java",
"license": "epl-1.0",
"size": 11267
} | [
"org.jboss.shrinkwrap.descriptor.api.webcommon31.CookieConfigType"
] | import org.jboss.shrinkwrap.descriptor.api.webcommon31.CookieConfigType; | import org.jboss.shrinkwrap.descriptor.api.webcommon31.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 449,023 |
public void setArguments(String s) {
bundleProperties.setArguments(s);
} | void function(String s) { bundleProperties.setArguments(s); } | /**
* Arguments to the
*
* @param s
* The arguments to pass to the application being launched.
*/ | Arguments to the | setArguments | {
"repo_name": "humandoing/JarIndexer",
"path": "resources/jarbundler-1.9/src/net/sourceforge/jarbundler/JarBundler.java",
"license": "bsd-3-clause",
"size": 44012
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 79,952 |
EClass getStringProperty(); | EClass getStringProperty(); | /**
* Returns the meta object for class '{@link ch.hilbri.assist.model.StringProperty <em>String Property</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>String Property</em>'.
* @see ch.hilbri.assist.model.StringProperty
* @generated
... | Returns the meta object for class '<code>ch.hilbri.assist.model.StringProperty String Property</code>'. | getStringProperty | {
"repo_name": "RobertHilbrich/assist",
"path": "ch.hilbri.assist.model/src-gen/ch/hilbri/assist/model/ModelPackage.java",
"license": "gpl-2.0",
"size": 419306
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 304,030 |
@POST
@Path("/{id}/configs")
@Consumes(MediaType.APPLICATION_JSON)
@ApiOperation(
value = "Add new configuration files to a cluster",
notes = "Add the supplied configuration files to the cluster with the supplied id.",
response = String.class,
responseCont... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) @ApiOperation( value = STR, notes = STR, response = String.class, responseContainer = "List" ) @ApiResponses(value = { @ApiResponse( code = HttpURLConnection.HTTP_NOT_FOUND, message = STR ), @ApiResponse( code = HttpURLConnection.HTTP_PRECON_FAILED, message = STR ), @Api... | /**
* Add new configuration files to a given cluster.
*
* @param id The id of the cluster to add the configuration file to. Not
* null/empty/blank.
* @param configs The configuration files to add. Not null/empty/blank.
* @return The active configurations for this cluste... | Add new configuration files to a given cluster | addConfigsForCluster | {
"repo_name": "gorcz/genie",
"path": "genie-server/src/main/java/com/netflix/genie/server/resources/ClusterConfigResource.java",
"license": "apache-2.0",
"size": 36828
} | [
"com.netflix.genie.common.exceptions.GenieException",
"com.wordnik.swagger.annotations.ApiOperation",
"com.wordnik.swagger.annotations.ApiParam",
"com.wordnik.swagger.annotations.ApiResponse",
"com.wordnik.swagger.annotations.ApiResponses",
"java.net.HttpURLConnection",
"java.util.List",
"java.util.Se... | import com.netflix.genie.common.exceptions.GenieException; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiResponse; import com.wordnik.swagger.annotations.ApiResponses; import java.net.HttpURLConnection; import java.util.Li... | import com.netflix.genie.common.exceptions.*; import com.wordnik.swagger.annotations.*; import java.net.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.netflix.genie",
"com.wordnik.swagger",
"java.net",
"java.util",
"javax.ws"
] | com.netflix.genie; com.wordnik.swagger; java.net; java.util; javax.ws; | 986,351 |
private ContentPanel getMonitoredPointsPanel() {
// Store filters.
final StoreFilter<MonitoredPointDTO> notCompletedFilter = new StoreFilter<MonitoredPointDTO>() {
| ContentPanel function() { final StoreFilter<MonitoredPointDTO> notCompletedFilter = new StoreFilter<MonitoredPointDTO>() { | /**
* Gets the panel which displays the monitored points.
*
* @return The panel which displays the monitored points.
*/ | Gets the panel which displays the monitored points | getMonitoredPointsPanel | {
"repo_name": "spMohanty/sigmah_svn_to_git_migration_test",
"path": "sigmah/src/main/java/org/sigmah/client/page/project/dashboard/ProjectDashboardView.java",
"license": "gpl-3.0",
"size": 50126
} | [
"com.extjs.gxt.ui.client.store.StoreFilter",
"com.extjs.gxt.ui.client.widget.ContentPanel",
"org.sigmah.shared.dto.reminder.MonitoredPointDTO"
] | import com.extjs.gxt.ui.client.store.StoreFilter; import com.extjs.gxt.ui.client.widget.ContentPanel; import org.sigmah.shared.dto.reminder.MonitoredPointDTO; | import com.extjs.gxt.ui.client.store.*; import com.extjs.gxt.ui.client.widget.*; import org.sigmah.shared.dto.reminder.*; | [
"com.extjs.gxt",
"org.sigmah.shared"
] | com.extjs.gxt; org.sigmah.shared; | 997,118 |
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)
{
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
} | void function(ModelRenderer modelRenderer, float x, float y, float z) { modelRenderer.rotateAngleX = x; modelRenderer.rotateAngleY = y; modelRenderer.rotateAngleZ = z; } | /**
* This is a helper function from Tabula to set the rotation of model parts
*/ | This is a helper function from Tabula to set the rotation of model parts | setRotateAngle | {
"repo_name": "Wehavecookies56/Kingdom-Keys-Re-Coded",
"path": "src/main/java/uk/co/wehavecookies56/kk/client/model/mobs/ModelCreeper.java",
"license": "lgpl-3.0",
"size": 20551
} | [
"net.minecraft.client.model.ModelRenderer"
] | import net.minecraft.client.model.ModelRenderer; | import net.minecraft.client.model.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 2,655,716 |
EReference getWork_Customers(); | EReference getWork_Customers(); | /**
* Returns the meta object for the reference list '{@link CIM.IEC61968.Work.Work#getCustomers <em>Customers</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Customers</em>'.
* @see CIM.IEC61968.Work.Work#getCustomers()
* @see #getWork()
* @... | Returns the meta object for the reference list '<code>CIM.IEC61968.Work.Work#getCustomers Customers</code>'. | getWork_Customers | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Work/WorkPackage.java",
"license": "mit",
"size": 22621
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 71,593 |
public static String validateLocale(String localeId, String name, boolean nullable) throws JSONException {
localeId = StringUtils.strip(localeId);
if (StringUtils.isEmpty(localeId)) {
if (!nullable) {
throw new ClientException("ValidationError", MessageFormat.format("{0} ... | static String function(String localeId, String name, boolean nullable) throws JSONException { localeId = StringUtils.strip(localeId); if (StringUtils.isEmpty(localeId)) { if (!nullable) { throw new ClientException(STR, MessageFormat.format(STR, name)); } else { return null; } } LocaleDao localeDao = new LocaleDao(); Lo... | /**
* Validates a locale.
*
* @param localeId String to validate
* @param name Name of the parameter
* @return String without white spaces
* @param nullable True if the string can be empty or null
*/ | Validates a locale | validateLocale | {
"repo_name": "sismics/reader",
"path": "reader-web/src/main/java/com/sismics/reader/rest/util/ValidationUtil.java",
"license": "gpl-2.0",
"size": 2461
} | [
"com.sismics.reader.core.dao.jpa.LocaleDao",
"com.sismics.reader.core.model.jpa.Locale",
"com.sismics.rest.exception.ClientException",
"java.text.MessageFormat",
"org.apache.commons.lang.StringUtils",
"org.codehaus.jettison.json.JSONException"
] | import com.sismics.reader.core.dao.jpa.LocaleDao; import com.sismics.reader.core.model.jpa.Locale; import com.sismics.rest.exception.ClientException; import java.text.MessageFormat; import org.apache.commons.lang.StringUtils; import org.codehaus.jettison.json.JSONException; | import com.sismics.reader.core.dao.jpa.*; import com.sismics.reader.core.model.jpa.*; import com.sismics.rest.exception.*; import java.text.*; import org.apache.commons.lang.*; import org.codehaus.jettison.json.*; | [
"com.sismics.reader",
"com.sismics.rest",
"java.text",
"org.apache.commons",
"org.codehaus.jettison"
] | com.sismics.reader; com.sismics.rest; java.text; org.apache.commons; org.codehaus.jettison; | 2,404,321 |
if(collection == null){
out.write("null");
return;
}
boolean first = true;
Iterator iter=collection.iterator();
out.write('[');
while(iter.hasNext()){
if(first)
first = false;
else
out.write(',');
Object value=iter.nex... | if(collection == null){ out.write("null"); return; } boolean first = true; Iterator iter=collection.iterator(); out.write('['); while(iter.hasNext()){ if(first) first = false; else out.write(','); Object value=iter.next(); if(value == null){ out.write("null"); continue; } JSONValue.writeJSONString(value, out); } out.wr... | /**
* Encode a list into JSON text and write it to out.
* If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level.
*
* @see org.json.simple.JSONValue#writeJSONString(Object, Writer)
*
* @param collection
... | Encode a list into JSON text and write it to out. If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level | writeJSONString | {
"repo_name": "jeo/jeo",
"path": "core/src/main/java/io/jeo/json/JSONArray.java",
"license": "apache-2.0",
"size": 9624
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,530,560 |
public String getParityString() {
switch (m_Parity) {
case SerialPort.PARITY_NONE:
return "none";
case SerialPort.PARITY_EVEN:
return "even";
case SerialPort.PARITY_ODD:
return "odd";
default:
ret... | String function() { switch (m_Parity) { case SerialPort.PARITY_NONE: return "none"; case SerialPort.PARITY_EVEN: return "even"; case SerialPort.PARITY_ODD: return "odd"; default: return "none"; } } | /**
* Returns the parity schema as <tt>String</tt>.
*
* @return the parity schema as <tt>String</tt>.
*/ | Returns the parity schema as String | getParityString | {
"repo_name": "paolodenti/openhab",
"path": "bundles/binding/org.openhab.binding.modbus/src/main/java/net/wimpi/modbus/util/SerialParameters.java",
"license": "epl-1.0",
"size": 20403
} | [
"gnu.io.SerialPort"
] | import gnu.io.SerialPort; | import gnu.io.*; | [
"gnu.io"
] | gnu.io; | 2,179,681 |
@Generated
@CVariable()
@MappedReturn(ObjCStringMapper.class)
public static native String NSProgressFileOperationKindDownloading(); | @CVariable() @MappedReturn(ObjCStringMapper.class) static native String function(); | /**
* Possible values for NSProgressFileOperationKindKey entries.
*/ | Possible values for NSProgressFileOperationKindKey entries | NSProgressFileOperationKindDownloading | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/c/Foundation.java",
"license": "apache-2.0",
"size": 156135
} | [
"org.moe.natj.c.ann.CVariable",
"org.moe.natj.general.ann.MappedReturn",
"org.moe.natj.objc.map.ObjCStringMapper"
] | import org.moe.natj.c.ann.CVariable; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.map.ObjCStringMapper; | import org.moe.natj.c.ann.*; import org.moe.natj.general.ann.*; import org.moe.natj.objc.map.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,657,928 |
public String getSerial();
/**
* Opens and initializes the port. Upon success, caller must ensure that
* {@link #close()} is eventually called.
*
* @param connection an open device connection, acquired with
* {@link UsbManager#openDevice(android.hardware.usb.UsbDevice)} | String function(); /** * Opens and initializes the port. Upon success, caller must ensure that * {@link #close()} is eventually called. * * @param connection an open device connection, acquired with * {@link UsbManager#openDevice(android.hardware.usb.UsbDevice)} | /**
* The serial number of the underlying UsbDeviceConnection, or {@code null}.
*/ | The serial number of the underlying UsbDeviceConnection, or null | getSerial | {
"repo_name": "MichaelMGonzalez/MagneticFieldLocalization",
"path": "MagneticFieldLocalizer/app/src/main/java/usbserial/driver/UsbSerialPort.java",
"license": "gpl-3.0",
"size": 7536
} | [
"android.hardware.usb.UsbManager"
] | import android.hardware.usb.UsbManager; | import android.hardware.usb.*; | [
"android.hardware"
] | android.hardware; | 2,242,741 |
@Override
public boolean areEqual(Object actual, Object other) {
return Objects.areEqual(actual, other);
}
/**
* Returns true if given {@link Iterable} contains given value based on {@link Objects#areEqual(Object, Object)},
* false otherwise.<br>
* If given {@link Iterable} is null, return false.
... | boolean function(Object actual, Object other) { return Objects.areEqual(actual, other); } /** * Returns true if given {@link Iterable} contains given value based on {@link Objects#areEqual(Object, Object)}, * false otherwise.<br> * If given {@link Iterable} is null, return false. * * @param iterable the {@link Iterable... | /**
* Returns true if actual and other are equal based on {@link Objects#areEqual(Object, Object)}, false otherwise.
*
* @param actual the object to compare to other
* @param other the object to compare to actual
* @return true if actual and other are equal based on {@link Objects#areEqual(Object, Objec... | Returns true if actual and other are equal based on <code>Objects#areEqual(Object, Object)</code>, false otherwise | areEqual | {
"repo_name": "dorzey/assertj-core",
"path": "src/main/java/org/assertj/core/internal/StandardComparisonStrategy.java",
"license": "apache-2.0",
"size": 6473
} | [
"org.assertj.core.util.Objects"
] | import org.assertj.core.util.Objects; | import org.assertj.core.util.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,971,307 |
private static MethodHandle createSAMTransform(Object arg, Class parameter) {
Method method = CachedSAMClass.getSAMMethod(parameter);
if (method == null) return null;
// TODO: have to think about how to optimize this!
if (parameter.isInterface()) {
if (Traits.isTrait(para... | static MethodHandle function(Object arg, Class parameter) { Method method = CachedSAMClass.getSAMMethod(parameter); if (method == null) return null; if (parameter.isInterface()) { if (Traits.isTrait(parameter)) { MethodHandle ret = TO_SAMTRAIT_PROXY; ret = MethodHandles.insertArguments(ret, 2, ProxyGenerator.INSTANCE, ... | /**
* creates a method handle able to transform the given Closure into a SAM type
* if the given parameter is a SAM type
*/ | creates a method handle able to transform the given Closure into a SAM type if the given parameter is a SAM type | createSAMTransform | {
"repo_name": "antoaravinth/incubator-groovy",
"path": "src/main/org/codehaus/groovy/vmplugin/v7/TypeTransformers.java",
"license": "apache-2.0",
"size": 12297
} | [
"groovy.util.ProxyGenerator",
"java.lang.invoke.MethodHandle",
"java.lang.invoke.MethodHandles",
"java.lang.invoke.MethodType",
"java.lang.reflect.Method",
"java.util.Collections",
"org.codehaus.groovy.reflection.stdclasses.CachedSAMClass",
"org.codehaus.groovy.transform.trait.Traits"
] | import groovy.util.ProxyGenerator; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.lang.reflect.Method; import java.util.Collections; import org.codehaus.groovy.reflection.stdclasses.CachedSAMClass; import org.codehaus.groovy.transform.trait.T... | import groovy.util.*; import java.lang.invoke.*; import java.lang.reflect.*; import java.util.*; import org.codehaus.groovy.reflection.stdclasses.*; import org.codehaus.groovy.transform.trait.*; | [
"groovy.util",
"java.lang",
"java.util",
"org.codehaus.groovy"
] | groovy.util; java.lang; java.util; org.codehaus.groovy; | 1,700,670 |
public static GroupKeyManagementFragment newInstance(long preselectId) {
GroupKeyManagementFragment fragment = new GroupKeyManagementFragment();
Bundle args = new Bundle(1);
args.putLong(ARGNAME_PRESELECT, preselectId);
fragment.setArguments(args);
return fragment;
... | static GroupKeyManagementFragment function(long preselectId) { GroupKeyManagementFragment fragment = new GroupKeyManagementFragment(); Bundle args = new Bundle(1); args.putLong(ARGNAME_PRESELECT, preselectId); fragment.setArguments(args); return fragment; } private KeyManagementFragmentHelper helper; | /**
* Creates a new GroupKeyManagementFragment which automatically scrolls to the specified key ID
* when it is shown.
*
* @param preselectId The ID to preselect when the fragment is shown.
* @return A new GroupKeyManagementFragment.
*/ | Creates a new GroupKeyManagementFragment which automatically scrolls to the specified key ID when it is shown | newInstance | {
"repo_name": "timberdoodle/TimberdoodleApp",
"path": "project/app/src/main/java/de/tu_darmstadt/adtn/ui/groupmanager/GroupKeyManagementFragment.java",
"license": "gpl-2.0",
"size": 6606
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,540,787 |
public void sendRequest(String path, RequestOptions options) throws IOException, JSONException {
String rootUrl;
if (path == null) {
throw new IllegalArgumentException("'path' parameter can't be null.");
}
if (path.indexOf(BMSClient.HTTP_SCHEME) == 0 && path.contains(":... | void function(String path, RequestOptions options) throws IOException, JSONException { String rootUrl; if (path == null) { throw new IllegalArgumentException(STR); } if (path.indexOf(BMSClient.HTTP_SCHEME) == 0 && path.contains(":")) { URL url = new URL(path); path = url.getPath(); rootUrl = url.toString().replace(path... | /**
* Assembles the request path from root and path to authorization endpoint and sends the request.
*
* @param path Path to authorization endpoint
* @param options BaseRequest options
* @throws IOException
* @throws JSONException
*/ | Assembles the request path from root and path to authorization endpoint and sends the request | sendRequest | {
"repo_name": "ibm-bluemix-mobile-services/bms-clientsdk-android-core",
"path": "lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java",
"license": "apache-2.0",
"size": 20259
} | [
"com.ibm.mobilefirstplatform.clientsdk.android.core.api.BMSClient",
"java.io.IOException",
"org.json.JSONException"
] | import com.ibm.mobilefirstplatform.clientsdk.android.core.api.BMSClient; import java.io.IOException; import org.json.JSONException; | import com.ibm.mobilefirstplatform.clientsdk.android.core.api.*; import java.io.*; import org.json.*; | [
"com.ibm.mobilefirstplatform",
"java.io",
"org.json"
] | com.ibm.mobilefirstplatform; java.io; org.json; | 2,653,637 |
public static void deleteRegionFromFileSystem(final Configuration conf,
final FileSystem fs, final Path tableDir, final HRegionInfo regionInfo) throws IOException {
HRegionFileSystem regionFs = new HRegionFileSystem(conf, fs, tableDir, regionInfo);
Path regionDir = regionFs.getRegionDir();
if (!fs.... | static void function(final Configuration conf, final FileSystem fs, final Path tableDir, final HRegionInfo regionInfo) throws IOException { HRegionFileSystem regionFs = new HRegionFileSystem(conf, fs, tableDir, regionInfo); Path regionDir = regionFs.getRegionDir(); if (!fs.exists(regionDir)) { LOG.warn(STR + regionDir)... | /**
* Remove the region from the table directory, archiving the region's hfiles.
* @param conf the {@link Configuration} to use
* @param fs {@link FileSystem} from which to remove the region
* @param tableDir {@link Path} to where the table is being stored
* @param regionInfo {@link HRegionInfo} for regi... | Remove the region from the table directory, archiving the region's hfiles | deleteRegionFromFileSystem | {
"repo_name": "narendragoyal/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java",
"license": "apache-2.0",
"size": 42354
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.backup.HFileArchiver",
"org.apache.hadoop.hbase.util.FSUtils"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.backup.HFileArchiver; import org.apache.hadoop.hbase.util.FSUtils; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.backup.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 119,403 |
public Timestamp getValidFrom ()
{
return (Timestamp)get_Value(COLUMNNAME_ValidFrom);
} | Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_ValidFrom); } | /** Get Valid from.
@return Valid from including this date (first day)
*/ | Get Valid from | getValidFrom | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/model/X_A_Asset_Acct.java",
"license": "gpl-2.0",
"size": 33498
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,384,971 |
public void publish(final PlanetName planetName) {
final Planet planet = context.getPlanet(planetName);
new ItemIterator().iterate(new ItemIteratorCallback() { | void function(final PlanetName planetName) { final Planet planet = context.getPlanet(planetName); new ItemIterator().iterate(new ItemIteratorCallback() { | /**
* Iterates through all items and publishes the states.
*/ | Iterates through all items and publishes the states | publish | {
"repo_name": "MCherifiOSS/openhab",
"path": "bundles/binding/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/bus/PlanetPublisher.java",
"license": "epl-1.0",
"size": 6514
} | [
"org.openhab.binding.astro.internal.model.Planet",
"org.openhab.binding.astro.internal.model.PlanetName",
"org.openhab.binding.astro.internal.util.ItemIterator"
] | import org.openhab.binding.astro.internal.model.Planet; import org.openhab.binding.astro.internal.model.PlanetName; import org.openhab.binding.astro.internal.util.ItemIterator; | import org.openhab.binding.astro.internal.model.*; import org.openhab.binding.astro.internal.util.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,380,620 |
public Map<String, Resource> getLanguageResources() {
return Collections.unmodifiableMap(resources);
} | Map<String, Resource> function() { return Collections.unmodifiableMap(resources); } | /**
* Returns a map of all languages currently associated with this service,
* where the key of each map entry is the language key. The returned map
* cannot be modified.
*
* @return
* A map of all languages currently associated with this service.
*/ | Returns a map of all languages currently associated with this service, where the key of each map entry is the language key. The returned map cannot be modified | getLanguageResources | {
"repo_name": "TribeMedia/guacamole-client",
"path": "guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/LanguageResourceService.java",
"license": "mit",
"size": 13508
} | [
"java.util.Collections",
"java.util.Map",
"org.glyptodon.guacamole.net.basic.resource.Resource"
] | import java.util.Collections; import java.util.Map; import org.glyptodon.guacamole.net.basic.resource.Resource; | import java.util.*; import org.glyptodon.guacamole.net.basic.resource.*; | [
"java.util",
"org.glyptodon.guacamole"
] | java.util; org.glyptodon.guacamole; | 2,350,963 |
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof XYPlot)) {
return false;
}
XYPlot that = (XYPlot) obj;
if (this.weight != that.weight) {
return false;
}
if (th... | boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof XYPlot)) { return false; } XYPlot that = (XYPlot) obj; if (this.weight != that.weight) { return false; } if (this.orientation != that.orientation) { return false; } if (!this.domainAxes.equals(that.domainAxes)) { return false; } if (!... | /**
* Tests this plot for equality with another object.
*
* @param obj the object (<code>null</code> permitted).
*
* @return <code>true</code> or <code>false</code>.
*/ | Tests this plot for equality with another object | equals | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/plot/XYPlot.java",
"license": "mit",
"size": 199979
} | [
"org.jfree.util.ObjectUtilities",
"org.jfree.util.PaintUtilities"
] | import org.jfree.util.ObjectUtilities; import org.jfree.util.PaintUtilities; | import org.jfree.util.*; | [
"org.jfree.util"
] | org.jfree.util; | 2,198,189 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<VirtualHubInner>, VirtualHubInner> beginCreateOrUpdate(
String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<VirtualHubInner>, VirtualHubInner> beginCreateOrUpdate( String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters); | /**
* Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub.
*
* @param resourceGroupName The resource group name of the VirtualHub.
* @param virtualHubName The name of the VirtualHub.
* @param virtualHubParameters VirtualHub Resource.
* @throws IllegalArgu... | Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub | beginCreateOrUpdate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java",
"license": "mit",
"size": 30840
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.network.fluent.models.VirtualHubInner"
] | 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.resourcemanager.network.fluent.models.VirtualHubInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,573,394 |
protected void enterNullType(Production node)
throws ParseException {
} | void function(Production node) throws ParseException { } | /**
* Called when entering a parse tree node.
*
* @param node the node being entered
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when entering a parse tree node | enterNullType | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java",
"license": "gpl-2.0",
"size": 275483
} | [
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,576 |
@Test
public void testFatalErrorIfRecoveredJobsCannotBeStarted() throws Exception {
final FlinkException testException = new FlinkException("Test exception");
final JobGraph failingJobGraph = createFailingJobGraph(testException);
dispatcher = new TestingDispatcherBuilder()
.setDispatcherBootstrap(new Def... | void function() throws Exception { final FlinkException testException = new FlinkException(STR); final JobGraph failingJobGraph = createFailingJobGraph(testException); dispatcher = new TestingDispatcherBuilder() .setDispatcherBootstrap(new DefaultDispatcherBootstrap(Collections.singleton(failingJobGraph))) .build(); di... | /**
* Tests that the {@link Dispatcher} fails fatally if the recovered jobs cannot be started.
* See FLINK-9097.
*/ | Tests that the <code>Dispatcher</code> fails fatally if the recovered jobs cannot be started. See FLINK-9097 | testFatalErrorIfRecoveredJobsCannotBeStarted | {
"repo_name": "darionyaphet/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java",
"license": "apache-2.0",
"size": 34410
} | [
"java.util.Collections",
"java.util.concurrent.TimeUnit",
"org.apache.flink.runtime.jobgraph.JobGraph",
"org.apache.flink.runtime.util.TestingFatalErrorHandler",
"org.apache.flink.util.ExceptionUtils",
"org.apache.flink.util.FlinkException",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.util.Collections; import java.util.concurrent.TimeUnit; import org.apache.flink.runtime.jobgraph.JobGraph; import org.apache.flink.runtime.util.TestingFatalErrorHandler; import org.apache.flink.util.ExceptionUtils; import org.apache.flink.util.FlinkException; import org.hamcrest.core.Is; import org.junit.As... | import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.util.*; import org.apache.flink.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.util",
"org.apache.flink",
"org.hamcrest.core",
"org.junit"
] | java.util; org.apache.flink; org.hamcrest.core; org.junit; | 1,498,126 |
public boolean isDateAroundHalloween(Calendar calendarIn)
{
return calendarIn.get(2) + 1 == 10 && calendarIn.get(5) >= 20 || calendarIn.get(2) + 1 == 11 && calendarIn.get(5) <= 3;
}
| boolean function(Calendar calendarIn) { return calendarIn.get(2) + 1 == 10 && calendarIn.get(5) >= 20 calendarIn.get(2) + 1 == 11 && calendarIn.get(5) <= 3; } | /**
* Check if October 31st is within 20 days before and 3 days after.
*/ | Check if October 31st is within 20 days before and 3 days after | isDateAroundHalloween | {
"repo_name": "Weisses/Ebonheart-Mods",
"path": "ViesCraft/1.10.2 - 2185/src/main/java/com/viesis/viescraft/api/References.java",
"license": "mit",
"size": 7186
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,030,103 |
default CompletableFuture<OperationResult<String>> getTriggeredSavepointStatus(
AsynchronousJobOperationKey operationKey) {
throw new UnsupportedOperationException();
} | default CompletableFuture<OperationResult<String>> getTriggeredSavepointStatus( AsynchronousJobOperationKey operationKey) { throw new UnsupportedOperationException(); } | /**
* Get the status of of savepoint triggered under the specified operation key.
*
* @param operationKey key of the operation
* @return Future which completes immediately with the status, or fails if no operation is
* registered for the key
*/ | Get the status of of savepoint triggered under the specified operation key | getTriggeredSavepointStatus | {
"repo_name": "godfreyhe/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/RestfulGateway.java",
"license": "apache-2.0",
"size": 10566
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.flink.runtime.rest.handler.async.OperationResult",
"org.apache.flink.runtime.rest.handler.job.AsynchronousJobOperationKey"
] | import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.rest.handler.async.OperationResult; import org.apache.flink.runtime.rest.handler.job.AsynchronousJobOperationKey; | import java.util.concurrent.*; import org.apache.flink.runtime.rest.handler.async.*; import org.apache.flink.runtime.rest.handler.job.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,838,513 |
public void close()
throws IOException
{
// Nothing to do here.
super.close();
} | void function() throws IOException { super.close(); } | /**
* Closes the input stream.
*
* @throws IOException if an error occurs during an I/O operation.
*/ | Closes the input stream | close | {
"repo_name": "arcao/handygeocaching",
"path": "src/gnu/classpath/util/zip/GZIPInputStream.java",
"license": "gpl-2.0",
"size": 10109
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,344,913 |
public static JmsComponent jmsComponentAutoAcknowledge(ConnectionFactory connectionFactory) {
JmsConfiguration template = new JmsConfiguration(connectionFactory);
template.setAcknowledgementMode(Session.AUTO_ACKNOWLEDGE);
return jmsComponent(template);
} | static JmsComponent function(ConnectionFactory connectionFactory) { JmsConfiguration template = new JmsConfiguration(connectionFactory); template.setAcknowledgementMode(Session.AUTO_ACKNOWLEDGE); return jmsComponent(template); } | /**
* Static builder method
*/ | Static builder method | jmsComponentAutoAcknowledge | {
"repo_name": "veithen/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java",
"license": "apache-2.0",
"size": 74797
} | [
"javax.jms.ConnectionFactory",
"javax.jms.Session"
] | import javax.jms.ConnectionFactory; import javax.jms.Session; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 1,574,796 |
public Object clone() throws CloneNotSupportedException {
DefaultXYDataset clone = (DefaultXYDataset) super.clone();
clone.seriesKeys = new java.util.ArrayList(this.seriesKeys);
clone.seriesList = new ArrayList(this.seriesList.size());
for (int i = 0; i < this.seriesList.size(); i++)... | Object function() throws CloneNotSupportedException { DefaultXYDataset clone = (DefaultXYDataset) super.clone(); clone.seriesKeys = new java.util.ArrayList(this.seriesKeys); clone.seriesList = new ArrayList(this.seriesList.size()); for (int i = 0; i < this.seriesList.size(); i++) { double[][] data = (double[][]) this.s... | /**
* Creates an independent copy of this dataset.
*
* @return The cloned dataset.
*
* @throws CloneNotSupportedException if there is a problem cloning the
* dataset (for instance, if a non-cloneable object is used for a
* series key).
*/ | Creates an independent copy of this dataset | clone | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/data/xy/DefaultXYDataset.java",
"license": "lgpl-3.0",
"size": 13490
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 20,185 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.