method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public StorageVol storageVolCreateXMLFrom(String xmlDesc, StorageVol cloneVolume, int flags) throws LibvirtException { StorageVolPointer sPtr = libvirt.virStorageVolCreateXMLFrom(VSPP, xmlDesc, cloneVolume.VSVP, flags); ErrorHandler.processError(libvirt, sPtr); return new Storage...
StorageVol function(String xmlDesc, StorageVol cloneVolume, int flags) throws LibvirtException { StorageVolPointer sPtr = libvirt.virStorageVolCreateXMLFrom(VSPP, xmlDesc, cloneVolume.VSVP, flags); ErrorHandler.processError(libvirt, sPtr); return new StorageVol(virConnect, sPtr); }
/** * Create a storage volume in the parent pool, using the 'clonevol' volume * as input. Information for the new volume (name, perms) are passed via a * typical volume XML description. * * @return * @throws LibvirtException */
Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description
storageVolCreateXMLFrom
{ "repo_name": "lstoll/libvirt-java", "path": "src/main/java/org/libvirt/StoragePool.java", "license": "lgpl-2.1", "size": 12135 }
[ "org.libvirt.jna.StorageVolPointer" ]
import org.libvirt.jna.StorageVolPointer;
import org.libvirt.jna.*;
[ "org.libvirt.jna" ]
org.libvirt.jna;
1,200,061
@Override public void prepare(final DefaultFileSystemManager manager) throws Exception { config.prepare(manager); }
void function(final DefaultFileSystemManager manager) throws Exception { config.prepare(manager); }
/** * Prepares the file system manager. */
Prepares the file system manager
prepare
{ "repo_name": "ecki/commons-vfs", "path": "commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/test/JunctionProviderConfig.java", "license": "apache-2.0", "size": 2632 }
[ "org.apache.commons.vfs2.impl.DefaultFileSystemManager" ]
import org.apache.commons.vfs2.impl.DefaultFileSystemManager;
import org.apache.commons.vfs2.impl.*;
[ "org.apache.commons" ]
org.apache.commons;
298,547
public void setDtStart(Calendar start) { int oldStart; if (dtStart != null) { oldStart = dtStart.getFirstDayOfWeek(); } else { oldStart = Calendar.MONDAY; } if (start == null) { dtStart = new GregorianCalendar(TimeZone.getTimeZone("GMT")); dtStart.setTime(new Date(0L)); } ...
void function(Calendar start) { int oldStart; if (dtStart != null) { oldStart = dtStart.getFirstDayOfWeek(); } else { oldStart = Calendar.MONDAY; } if (start == null) { dtStart = new GregorianCalendar(TimeZone.getTimeZone("GMT")); dtStart.setTime(new Date(0L)); } else { dtStart = (Calendar)start.clone(); dtStart.clear(...
/** * Method setDtStart * * * @param start * */
Method setDtStart
setDtStart
{ "repo_name": "zhiqinghuang/core", "path": "src/com/liferay/util/cal/Recurrence.java", "license": "gpl-3.0", "size": 25528 }
[ "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar", "java.util.TimeZone" ]
import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
2,408,489
public static void w(String tag, String msg) { if (logLevel <= WARN && showLog) { Log.w(tag, msg); } }
static void function(String tag, String msg) { if (logLevel <= WARN && showLog) { Log.w(tag, msg); } }
/** * Send a {@link #WARN} log message. * * @param tag Used to identify the source of a log message. It usually * identifies the class or activity where the log call occurs. * @param msg The message you would like logged. */
Send a <code>#WARN</code> log message
w
{ "repo_name": "ypochien/ReturnTrue", "path": "Android/app/src/main/java/com/returntrue/util/JLog.java", "license": "mit", "size": 7320 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,211,749
private JButton getBtnOk(ActionListener okAction) { if (btnOk == null) { btnOk = new JButton(); btnOk.setText(Messages.getText("ok" )); btnOk.setActionCommand("OK"); if (okAction != null) btnOk.addActionListener(okAction); } return btnOk; }
JButton function(ActionListener okAction) { if (btnOk == null) { btnOk = new JButton(); btnOk.setText(Messages.getText("ok" )); btnOk.setActionCommand("OK"); if (okAction != null) btnOk.addActionListener(okAction); } return btnOk; }
/** * This method initializes btnOk * * @return javax.swing.JButton */
This method initializes btnOk
getBtnOk
{ "repo_name": "iCarto/siga", "path": "libUIComponent/src/org/gvsig/gui/beans/AcceptCancelPanel.java", "license": "gpl-3.0", "size": 6128 }
[ "java.awt.event.ActionListener", "org.gvsig.gui.beans.swing.JButton" ]
import java.awt.event.ActionListener; import org.gvsig.gui.beans.swing.JButton;
import java.awt.event.*; import org.gvsig.gui.beans.swing.*;
[ "java.awt", "org.gvsig.gui" ]
java.awt; org.gvsig.gui;
2,270,682
void setLastMessageOn(Date lastMessageOn);
void setLastMessageOn(Date lastMessageOn);
/** * Set the timestamp of the last published message for this metric.<br> * <b>Transient data field (the last publish timestamp should get from the message table by the find service)</b> * * @param lastMessageOn * @since 1.0.0 */
Set the timestamp of the last published message for this metric. Transient data field (the last publish timestamp should get from the message table by the find service)
setLastMessageOn
{ "repo_name": "stzilli/kapua", "path": "service/datastore/api/src/main/java/org/eclipse/kapua/service/datastore/model/MetricInfo.java", "license": "epl-1.0", "size": 5753 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,834,875
public GrammarRule addRule(Function<TokenCache, Boolean> f, GrammarRule r) { terminal = false; routes.put(f, r); return this; }
GrammarRule function(Function<TokenCache, Boolean> f, GrammarRule r) { terminal = false; routes.put(f, r); return this; }
/** * Adds a new rule 'route', which is lower-priority than all previous rules. * @param f: A function which takes a ListIterator<TokenData> and determines if it follows r. * @param r: the GrammarRule to redirect to when 'route' is called. * @return this */
Adds a new rule 'route', which is lower-priority than all previous rules
addRule
{ "repo_name": "uniquegamer522/PrE2", "path": "src/uniQMG/parser/GrammarRule.java", "license": "apache-2.0", "size": 2914 }
[ "java.util.function.Function" ]
import java.util.function.Function;
import java.util.function.*;
[ "java.util" ]
java.util;
528,260
Integer readInt(String fieldName) throws IOException;
Integer readInt(String fieldName) throws IOException;
/** * Can't return an {@code int} here because the field might be declared optional and missing so we might need to * return a {@code null}. */
Can't return an int here because the field might be declared optional and missing so we might need to return a null
readInt
{ "repo_name": "jmarkos/protostream", "path": "core/src/main/java/org/infinispan/protostream/MessageMarshaller.java", "license": "apache-2.0", "size": 2978 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,824,910
protected final AuthenticationService getAuthenticationService() { return m_authenticationService; }
final AuthenticationService function() { return m_authenticationService; }
/** * Return the authentication service * * @return AuthenticationService */
Return the authentication service
getAuthenticationService
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/filesys/AbstractServerConfigurationBean.java", "license": "lgpl-3.0", "size": 25938 }
[ "org.alfresco.service.cmr.security.AuthenticationService" ]
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.*;
[ "org.alfresco.service" ]
org.alfresco.service;
312,477
public void truncate(int offset) throws IOException { if ((offset < 0) || (offset > _write_pos)) throw new IOException("bad truncate offset"); if (_read_pos > offset) _read_pos = offset; if (_mark_pos > offset) _mark_pos = offset; _write_pos = offset; if (_file_high > offset) _file_high = offse...
void function(int offset) throws IOException { if ((offset < 0) (offset > _write_pos)) throw new IOException(STR); if (_read_pos > offset) _read_pos = offset; if (_mark_pos > offset) _mark_pos = offset; _write_pos = offset; if (_file_high > offset) _file_high = offset; moveWindow(_write_pos); }
/** * Truncates buffered data to specified size. Can not be used to extend * data. Repositions OutputStream at the end of truncated data. If current * read offset or mark is past the new end of data, it is moved at the new * end. * * @param offset * the offset * @throws IOException * ...
Truncates buffered data to specified size. Can not be used to extend data. Repositions OutputStream at the end of truncated data. If current read offset or mark is past the new end of data, it is moved at the new end
truncate
{ "repo_name": "confluxtoo/finflux_automation_test", "path": "browsermob-proxy/src/main/java/org/browsermob/proxy/jetty/util/TempByteHolder.java", "license": "mpl-2.0", "size": 24021 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,440,308
@Override public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) { PlotOrientation orientation = plot.getOrientation(); RectangleEdge ...
void function(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) { PlotOrientation orientation = plot.getOrientation(); RectangleEdge domainEdge = Plot.resolveDomainAxisLocation( plot.getDomainAxisLocation(), orientation); RectangleEdg...
/** * Draws the annotation. * * @param g2 the graphics device. * @param plot the plot. * @param dataArea the data area. * @param domainAxis the domain axis. * @param rangeAxis the range axis. * @param rendererIndex the renderer index. * @param info an optional info ob...
Draws the annotation
draw
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/chart/annotations/XYTextAnnotation.java", "license": "lgpl-2.1", "size": 20796 }
[ "java.awt.Graphics2D", "java.awt.Shape", "java.awt.geom.Rectangle2D", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.plot.Plot", "org.jfree.chart.plot.PlotOrientation", "org.jfree.chart.plot.PlotRenderingInfo", "org.jfree.chart.plot.XYPlot", "org.jfree.chart.text.TextUtilities", "org.jfree.cha...
import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.PlotRenderingInfo; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.text.TextUt...
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.text.*; import org.jfree.chart.ui.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
683,674
public static void initializeSDK(@NonNull final Application application, String enviroment) { application.registerReceiver(mLoggedInBroadcastReceiver, new IntentFilter(PD_LOGGED_IN_RECEIVER_FILTER)); PDAPIConfig.PD_API_ENDPOINT = enviroment; sApplication = application; // Register...
static void function(@NonNull final Application application, String enviroment) { application.registerReceiver(mLoggedInBroadcastReceiver, new IntentFilter(PD_LOGGED_IN_RECEIVER_FILTER)); PDAPIConfig.PD_API_ENDPOINT = enviroment; sApplication = application; application.registerActivityLifecycleCallbacks(PD_ACTIVITY_LIF...
/** * Initialize Popdeem SDK * * @param application Application context * @param enviroment Popdeem enviroment PD_PROD_API_ENDPOINT, PD_STAGING_API_ENDPOINT */
Initialize Popdeem SDK
initializeSDK
{ "repo_name": "Popdeem/Popdeem-SDK-Android", "path": "sdk/src/main/java/com/popdeem/sdk/core/PopdeemSDK.java", "license": "mit", "size": 43393 }
[ "android.app.Application", "android.content.IntentFilter", "android.support.annotation.NonNull", "android.util.Log", "com.popdeem.sdk.core.api.PDAPIConfig", "com.popdeem.sdk.core.realm.PDRealmUtils", "com.popdeem.sdk.core.utils.PDSocialUtils", "com.twitter.sdk.android.core.DefaultLogger", "com.twitt...
import android.app.Application; import android.content.IntentFilter; import android.support.annotation.NonNull; import android.util.Log; import com.popdeem.sdk.core.api.PDAPIConfig; import com.popdeem.sdk.core.realm.PDRealmUtils; import com.popdeem.sdk.core.utils.PDSocialUtils; import com.twitter.sdk.android.core.Defau...
import android.app.*; import android.content.*; import android.support.annotation.*; import android.util.*; import com.popdeem.sdk.core.api.*; import com.popdeem.sdk.core.realm.*; import com.popdeem.sdk.core.utils.*; import com.twitter.sdk.android.core.*;
[ "android.app", "android.content", "android.support", "android.util", "com.popdeem.sdk", "com.twitter.sdk" ]
android.app; android.content; android.support; android.util; com.popdeem.sdk; com.twitter.sdk;
529,635
public Set<Conflict> allConflicts(Assignment<Request, Enrollment> assignment, Enrollment enrollment) { Set<Conflict> ret = new HashSet<Conflict>(); if (enrollment.getRequest() instanceof FreeTimeRequest) return ret; for (Request request : enrollment.getStudent().getRequests()...
Set<Conflict> function(Assignment<Request, Enrollment> assignment, Enrollment enrollment) { Set<Conflict> ret = new HashSet<Conflict>(); if (enrollment.getRequest() instanceof FreeTimeRequest) return ret; for (Request request : enrollment.getStudent().getRequests()) { if (request.equals(enrollment.getRequest())) contin...
/** * The set of all conflicts ({@link Conflict} objects) of the given * enrollment and other enrollments that are assigned to the same student. * @param assignment current assignment * @param enrollment given enrollment * @return set of all conflict of the given enrollment ...
The set of all conflicts (<code>Conflict</code> objects) of the given enrollment and other enrollments that are assigned to the same student
allConflicts
{ "repo_name": "UniTime/cpsolver", "path": "src/org/cpsolver/studentsct/extension/TimeOverlapsCounter.java", "license": "lgpl-3.0", "size": 30907 }
[ "java.util.HashSet", "java.util.Set", "org.cpsolver.ifs.assignment.Assignment", "org.cpsolver.studentsct.model.Enrollment", "org.cpsolver.studentsct.model.FreeTimeRequest", "org.cpsolver.studentsct.model.Request", "org.cpsolver.studentsct.model.SctAssignment", "org.cpsolver.studentsct.model.Unavailabi...
import java.util.HashSet; import java.util.Set; import org.cpsolver.ifs.assignment.Assignment; import org.cpsolver.studentsct.model.Enrollment; import org.cpsolver.studentsct.model.FreeTimeRequest; import org.cpsolver.studentsct.model.Request; import org.cpsolver.studentsct.model.SctAssignment; import org.cpsolver.stud...
import java.util.*; import org.cpsolver.ifs.assignment.*; import org.cpsolver.studentsct.model.*;
[ "java.util", "org.cpsolver.ifs", "org.cpsolver.studentsct" ]
java.util; org.cpsolver.ifs; org.cpsolver.studentsct;
2,523,573
protected static GenericBeanDefinition createModuleBeanDefinition(String className, Map<String,String> params, String role) throws IOException { ScannedGenericBeanDefinition result = getScannedBeanDefinition(className); result.setParentName(Module.class.getName()); result.setScope(Be...
static GenericBeanDefinition function(String className, Map<String,String> params, String role) throws IOException { ScannedGenericBeanDefinition result = getScannedBeanDefinition(className); result.setParentName(Module.class.getName()); result.setScope(BeanDefinition.SCOPE_SINGLETON); result.setAttribute("id", role); ...
/** * Generates Spring Bean definitions for Fedora Modules. * Server param should be unnecessary if autowired. * @param className * @param server * @param params * @param role * @return */
Generates Spring Bean definitions for Fedora Modules. Server param should be unnecessary if autowired
createModuleBeanDefinition
{ "repo_name": "andreasnef/fcrepo", "path": "fcrepo-server/src/main/java/org/fcrepo/server/Server.java", "license": "apache-2.0", "size": 70885 }
[ "java.io.IOException", "java.util.Map", "org.springframework.beans.factory.config.BeanDefinition", "org.springframework.beans.factory.config.BeanReference", "org.springframework.beans.factory.config.ConstructorArgumentValues", "org.springframework.beans.factory.config.RuntimeBeanReference", "org.springf...
import java.io.IOException; import java.util.Map; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanReference; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.config.RuntimeBeanReference...
import java.io.*; import java.util.*; import org.springframework.beans.factory.config.*; import org.springframework.beans.factory.support.*; import org.springframework.context.annotation.*;
[ "java.io", "java.util", "org.springframework.beans", "org.springframework.context" ]
java.io; java.util; org.springframework.beans; org.springframework.context;
1,503,175
interface WithStartTime { Update withStartTime(DateTime startTime); }
interface WithStartTime { Update withStartTime(DateTime startTime); }
/** * Specifies startTime. */
Specifies startTime
withStartTime
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/StreamingLocator.java", "license": "mit", "size": 7690 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
768,131
public static void printNode(Node n, OutputStream os) { PrintStream p = new PrintStream(os); printNode(n, p); }
static void function(Node n, OutputStream os) { PrintStream p = new PrintStream(os); printNode(n, p); }
/** * Print the given node and all its children. * @param n The Node to print. * @param os The Stream to print to. */
Print the given node and all its children
printNode
{ "repo_name": "cdealti/kura", "path": "kura/org.eclipse.kura.linux.usb/src/main/c/libmatthew-java/cx/ath/matthew/io/DOMPrinter.java", "license": "epl-1.0", "size": 2978 }
[ "java.io.OutputStream", "java.io.PrintStream", "org.w3c.dom.Node" ]
import java.io.OutputStream; import java.io.PrintStream; import org.w3c.dom.Node;
import java.io.*; import org.w3c.dom.*;
[ "java.io", "org.w3c.dom" ]
java.io; org.w3c.dom;
1,793,612
public IWorkbenchPart getView() { return this._view; }
IWorkbenchPart function() { return this._view; }
/** * Get the underlying view * * @return IWorkbenchPart */
Get the underlying view
getView
{ "repo_name": "adaussy/eclipse-monkey-revival", "path": "plugins/js/org.eclipse.eclipsemonkey.lang.javascript/src/org/eclipse/eclipsemonkey/lang/javascript/doms/views/View.java", "license": "epl-1.0", "size": 1509 }
[ "org.eclipse.ui.IWorkbenchPart" ]
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
842,838
PagedIterable<Peering> list(String peeringLocation, LegacyPeeringsKind kind);
PagedIterable<Peering> list(String peeringLocation, LegacyPeeringsKind kind);
/** * Lists all of the legacy peerings under the given subscription matching the specified kind and location. * * @param peeringLocation The location of the peering. * @param kind The kind of the peering. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throw...
Lists all of the legacy peerings under the given subscription matching the specified kind and location
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/peering/azure-resourcemanager-peering/src/main/java/com/azure/resourcemanager/peering/models/LegacyPeerings.java", "license": "mit", "size": 1876 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,667,917
private void handleSortEvent(SortEvent<JsonObject> event) { List<String> columnIds = new ArrayList<>(); List<SortDirection> sortDirections = new ArrayList<>(); for (SortOrder so : event.getOrder()) { if (columnToIdMap.containsKey(so.getColumn())) { columnIds.add(c...
void function(SortEvent<JsonObject> event) { List<String> columnIds = new ArrayList<>(); List<SortDirection> sortDirections = new ArrayList<>(); for (SortOrder so : event.getOrder()) { if (columnToIdMap.containsKey(so.getColumn())) { columnIds.add(columnToIdMap.get(so.getColumn())); sortDirections.add(so.getDirection()...
/** * Sends sort information from an event to the server-side of the Grid. * * @param event * the sort event */
Sends sort information from an event to the server-side of the Grid
handleSortEvent
{ "repo_name": "Legioth/vaadin", "path": "client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java", "license": "apache-2.0", "size": 16700 }
[ "com.vaadin.client.widget.grid.sort.SortEvent", "com.vaadin.client.widget.grid.sort.SortOrder", "com.vaadin.shared.data.sort.SortDirection", "com.vaadin.shared.ui.grid.GridServerRpc", "java.util.ArrayList", "java.util.List" ]
import com.vaadin.client.widget.grid.sort.SortEvent; import com.vaadin.client.widget.grid.sort.SortOrder; import com.vaadin.shared.data.sort.SortDirection; import com.vaadin.shared.ui.grid.GridServerRpc; import java.util.ArrayList; import java.util.List;
import com.vaadin.client.widget.grid.sort.*; import com.vaadin.shared.data.sort.*; import com.vaadin.shared.ui.grid.*; import java.util.*;
[ "com.vaadin.client", "com.vaadin.shared", "java.util" ]
com.vaadin.client; com.vaadin.shared; java.util;
459,175
public void setBackgroundDrawable(Drawable drawable) { mBackgroundDrawable = drawable; if (drawable != null) { final int opacity = drawable.getOpacity(); mIsBackgroundTranslucent = (opacity == PixelFormat.TRANSLUCENT || opacity == PixelFormat.TRANSPARENT);...
void function(Drawable drawable) { mBackgroundDrawable = drawable; if (drawable != null) { final int opacity = drawable.getOpacity(); mIsBackgroundTranslucent = (opacity == PixelFormat.TRANSLUCENT opacity == PixelFormat.TRANSPARENT); } updateBackground(); updateMessage(); }
/** * Sets a drawable for the fragment background. * * @param drawable The drawable used for the background. */
Sets a drawable for the fragment background
setBackgroundDrawable
{ "repo_name": "kingargyle/adt-leanback-support", "path": "leanback-v17/src/main/java/android/support/v17/leanback/app/ErrorSupportFragment.java", "license": "apache-2.0", "size": 8936 }
[ "android.graphics.PixelFormat", "android.graphics.drawable.Drawable" ]
import android.graphics.PixelFormat; import android.graphics.drawable.Drawable;
import android.graphics.*; import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,697,013
public PublicKey engineLookupAndResolvePublicKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { KeyResolverSpi tmp = cloneIfNeeded(); if (!tmp.engineCanResolve(element, baseURI, storage)) { return null; } return tmp.e...
PublicKey function( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException { KeyResolverSpi tmp = cloneIfNeeded(); if (!tmp.engineCanResolve(element, baseURI, storage)) { return null; } return tmp.engineResolvePublicKey(element, baseURI, storage); }
/** * Method engineLookupAndResolvePublicKey * * @param element * @param baseURI * @param storage * @return resolved public key from the registered from the element. * * @throws KeyResolverException */
Method engineLookupAndResolvePublicKey
engineLookupAndResolvePublicKey
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.java", "license": "mit", "size": 7902 }
[ "com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver", "java.security.PublicKey", "org.w3c.dom.Element" ]
import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver; import java.security.PublicKey; import org.w3c.dom.Element;
import com.sun.org.apache.xml.internal.security.keys.storage.*; import java.security.*; import org.w3c.dom.*;
[ "com.sun.org", "java.security", "org.w3c.dom" ]
com.sun.org; java.security; org.w3c.dom;
1,464,691
public Observable<ServiceResponse<SnapshotInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is require...
Observable<ServiceResponse<SnapshotInner>> function(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (snapshotName == null) { thro...
/** * Creates or updates a snapshot. * * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name len...
Creates or updates a snapshot
beginCreateOrUpdateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/compute/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/compute/v2019_11_01/implementation/SnapshotsInner.java", "license": "mit", "size": 90868 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,878,357
@Test public void testAddAttachmentNoContentNoLinkType() throws InvalidJsonAssetException, AssetPersistenceException, NonExistentArtefactException { thrown.expect(InvalidJsonAssetException.class); thrown.expectMessage("The link type for the attachment was not set."); String attachmentJSO...
void function() throws InvalidJsonAssetException, AssetPersistenceException, NonExistentArtefactException { thrown.expect(InvalidJsonAssetException.class); thrown.expectMessage(STR); String attachmentJSON = "{\"url\":\"http: Asset asset = Asset.deserializeAssetFromJson("{\"name\":\"Mr Asset\"}"); Asset returnedAsset = ...
/** * Verifies that an exception is thrown when we attachment to create an attachment with no * content and no linkType. */
Verifies that an exception is thrown when we attachment to create an attachment with no content and no linkType
testAddAttachmentNoContentNoLinkType
{ "repo_name": "Azquelt/tool.lars", "path": "server/src/test/java/com/ibm/ws/lars/rest/AssetServiceLayerTest.java", "license": "apache-2.0", "size": 17264 }
[ "com.ibm.ws.lars.rest.exceptions.AssetPersistenceException", "com.ibm.ws.lars.rest.exceptions.InvalidJsonAssetException", "com.ibm.ws.lars.rest.exceptions.NonExistentArtefactException", "com.ibm.ws.lars.rest.model.Asset", "com.ibm.ws.lars.rest.model.Attachment" ]
import com.ibm.ws.lars.rest.exceptions.AssetPersistenceException; import com.ibm.ws.lars.rest.exceptions.InvalidJsonAssetException; import com.ibm.ws.lars.rest.exceptions.NonExistentArtefactException; import com.ibm.ws.lars.rest.model.Asset; import com.ibm.ws.lars.rest.model.Attachment;
import com.ibm.ws.lars.rest.exceptions.*; import com.ibm.ws.lars.rest.model.*;
[ "com.ibm.ws" ]
com.ibm.ws;
1,185,378
public Vector3D getNadir() { return point.getNadir(); }
Vector3D function() { return point.getNadir(); }
/** Get the nadir direction of topocentric frame, expressed in parent shape frame. * <p>The nadir direction is the opposite of zenith direction.</p> * @return unit vector in the nadir direction * @see #getZenith() */
Get the nadir direction of topocentric frame, expressed in parent shape frame. The nadir direction is the opposite of zenith direction
getNadir
{ "repo_name": "attatrol/Orekit", "path": "src/main/java/org/orekit/frames/TopocentricFrame.java", "license": "apache-2.0", "size": 14380 }
[ "org.apache.commons.math3.geometry.euclidean.threed.Vector3D" ]
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.geometry.euclidean.threed.*;
[ "org.apache.commons" ]
org.apache.commons;
1,029,045
public static void writeString(DataOutput out, String s) throws IOException { // Write null flag. out.writeBoolean(s == null); if (s != null) out.writeUTF(s); }
static void function(DataOutput out, String s) throws IOException { out.writeBoolean(s == null); if (s != null) out.writeUTF(s); }
/** * Writes string to output stream accounting for {@code null} values. * * @param out Output stream to write to. * @param s String to write, possibly {@code null}. * @throws IOException If write failed. */
Writes string to output stream accounting for null values
writeString
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 325083 }
[ "java.io.DataOutput", "java.io.IOException" ]
import java.io.DataOutput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,202,680
public FilterPropAppender appendDate(final FilterKey key, final Date value) { if (value != null) { filterProps.put(key, value); } return this; }
FilterPropAppender function(final FilterKey key, final Date value) { if (value != null) { filterProps.put(key, value); } return this; }
/** * DOCUMENT ME! * * @param key DOCUMENT ME! * @param value DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
appendDate
{ "repo_name": "cismet/cids-custom-wuppertal", "path": "src/main/java/de/cismet/cids/custom/wunda_blau/search/TreppenWindowSearch.java", "license": "lgpl-3.0", "size": 42473 }
[ "de.cismet.cids.custom.wunda_blau.search.server.CidsTreppenSearchStatement", "java.util.Date" ]
import de.cismet.cids.custom.wunda_blau.search.server.CidsTreppenSearchStatement; import java.util.Date;
import de.cismet.cids.custom.wunda_blau.search.server.*; import java.util.*;
[ "de.cismet.cids", "java.util" ]
de.cismet.cids; java.util;
2,514,185
List<EntityLink> getEntityLinkChildrenForProcessInstance(String instanceId);
List<EntityLink> getEntityLinkChildrenForProcessInstance(String instanceId);
/** * Retrieves the {@link EntityLink}s associated with the given process instance. */
Retrieves the <code>EntityLink</code>s associated with the given process instance
getEntityLinkChildrenForProcessInstance
{ "repo_name": "paulstapleton/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/RuntimeService.java", "license": "apache-2.0", "size": 63251 }
[ "java.util.List", "org.flowable.entitylink.api.EntityLink" ]
import java.util.List; import org.flowable.entitylink.api.EntityLink;
import java.util.*; import org.flowable.entitylink.api.*;
[ "java.util", "org.flowable.entitylink" ]
java.util; org.flowable.entitylink;
177,226
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) { return Factory.writeRegistryServiceInfo(InspectorAddonImpl.class.getName(), InspectorAddonImpl.getServiceNames(), regKey); }
static boolean function(XRegistryKey regKey) { return Factory.writeRegistryServiceInfo(InspectorAddonImpl.class.getName(), InspectorAddonImpl.getServiceNames(), regKey); }
/** * Writes the service information into the given registry key. * This method is called by the <code>JavaLoader</code> * <p> * @return returns true if the operation succeeded * @param regKey the registryKey * @see com.sun.star.comp.loader.JavaLoader */
Writes the service information into the given registry key. This method is called by the <code>JavaLoader</code>
__writeRegistryServiceInfo
{ "repo_name": "jvanz/core", "path": "odk/examples/java/Inspector/InspectorAddon.java", "license": "gpl-3.0", "size": 9513 }
[ "com.sun.star.lib.uno.helper.Factory", "com.sun.star.registry.XRegistryKey" ]
import com.sun.star.lib.uno.helper.Factory; import com.sun.star.registry.XRegistryKey;
import com.sun.star.lib.uno.helper.*; import com.sun.star.registry.*;
[ "com.sun.star" ]
com.sun.star;
2,652,255
public static Locale parseLocaleString(String localeString) { String[] parts = tokenizeToStringArray(localeString, "_ ", false, false); String language = (parts.length > 0 ? parts[0] : ""); String country = (parts.length > 1 ? parts[1] : ""); validateLocalePart(language); val...
static Locale function(String localeString) { String[] parts = tokenizeToStringArray(localeString, STR, false, false); String language = (parts.length > 0 ? parts[0] : STRSTRSTR_")) { variant = trimLeadingCharacter(variant, '_'); } } return (language.length() > 0 ? new Locale(language, country, variant) : null); }
/** * Parse the given <code>localeString</code> value into a {@link Locale}. * <p/> * This is the inverse operation of {@link Locale#toString Locale's * readString}. * * @param localeString the locale string, following <code>Locale's</code> * <code>readString()</co...
Parse the given <code>localeString</code> value into a <code>Locale</code>. This is the inverse operation of <code>Locale#toString Locale's readString</code>
parseLocaleString
{ "repo_name": "flylzd/RelaxedReader", "path": "kocore/src/main/java/com/lemon/library/kocore/utils/StringUtils.java", "license": "apache-2.0", "size": 55163 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,793,244
public void resetLifecycleDisplay(View view) { mLifecycleDisplay.setText("Lifecycle callbacks:\n"); }
void function(View view) { mLifecycleDisplay.setText(STR); }
/** * This method resets the contents of the TextView to its default text of "Lifecycle callbacks" * * @param view The View that was clicked. In this case, it is the Button from our layout. */
This method resets the contents of the TextView to its default text of "Lifecycle callbacks"
resetLifecycleDisplay
{ "repo_name": "DhurimKelmendi/ud851-Exercises", "path": "Lesson05a-Android-Lifecycle/T05a.01-Exercise-LogLifecycle/app/src/main/java/com/example/android/lifecycle/MainActivity.java", "license": "apache-2.0", "size": 3383 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,433,452
public void cloneSnapshot(final byte[] snapshotName, final FullyQualifiedTableName fqtn) throws IOException, TableExistsException, RestoreSnapshotException, InterruptedException { cloneSnapshot(Bytes.toString(snapshotName), fqtn); }
void function(final byte[] snapshotName, final FullyQualifiedTableName fqtn) throws IOException, TableExistsException, RestoreSnapshotException, InterruptedException { cloneSnapshot(Bytes.toString(snapshotName), fqtn); }
/** * Create a new table by cloning the snapshot content. * * @param snapshotName name of the snapshot to be cloned * @param tableName name of the table where the snapshot will be restored * @throws IOException if a remote or network exception occurs * @throws TableExistsException if table to be creat...
Create a new table by cloning the snapshot content
cloneSnapshot
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java", "license": "apache-2.0", "size": 118566 }
[ "java.io.IOException", "org.apache.hadoop.hbase.FullyQualifiedTableName", "org.apache.hadoop.hbase.exceptions.RestoreSnapshotException", "org.apache.hadoop.hbase.exceptions.TableExistsException", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import org.apache.hadoop.hbase.FullyQualifiedTableName; import org.apache.hadoop.hbase.exceptions.RestoreSnapshotException; import org.apache.hadoop.hbase.exceptions.TableExistsException; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.exceptions.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
694,530
public void setKey(String key) { this.key = key; } @Column(name = "config_value") private String value;
void function(String key) { this.key = key; } @Column(name = STR) private String value;
/** * Configuration key setter. * * @param key */
Configuration key setter
setKey
{ "repo_name": "bbijelic/shopfoundry", "path": "shopfoundry-services/shopfoundry-services-registry/src/main/java/org/shopfoundry/services/registry/db/entity/ServiceGroupConfigurationKeyValuePair.java", "license": "gpl-2.0", "size": 2417 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
2,882,999
public ShotList getPlayerLikedShots(long playerID, int page) { return getPlayerLikedShots(playerID, page, DEFAULT_PER_PAGE); }
ShotList function(long playerID, int page) { return getPlayerLikedShots(playerID, page, DEFAULT_PER_PAGE); }
/** * Returns shots liked by the player specified by :id. * * @param playerID * @param page * @return */
Returns shots liked by the player specified by :id
getPlayerLikedShots
{ "repo_name": "sangupta/dribbble-java-client", "path": "src/main/java/com/sangupta/dribbble/api/DribbbleClient.java", "license": "apache-2.0", "size": 23551 }
[ "com.sangupta.dribbble.api.model.ShotList" ]
import com.sangupta.dribbble.api.model.ShotList;
import com.sangupta.dribbble.api.model.*;
[ "com.sangupta.dribbble" ]
com.sangupta.dribbble;
692,391
public RelationName resolveRelation(QualifiedName ident, SearchPath searchPath) { String identSchema = schemaName(ident); String relation = relationName(ident); ViewsMetadata views = clusterService.state().metadata().custom(ViewsMetadata.TYPE); if (identSchema == null) { ...
RelationName function(QualifiedName ident, SearchPath searchPath) { String identSchema = schemaName(ident); String relation = relationName(ident); ViewsMetadata views = clusterService.state().metadata().custom(ViewsMetadata.TYPE); if (identSchema == null) { for (String pathSchema : searchPath) { RelationName tableOrVie...
/** * Resolves the provided ident relation (table or view) against the search path. * @param ident * @param searchPath * @throws RelationUnknown in case a valid relation cannot be resolved in the search path. * @return the corresponding RelationName */
Resolves the provided ident relation (table or view) against the search path
resolveRelation
{ "repo_name": "crate/crate", "path": "server/src/main/java/io/crate/metadata/Schemas.java", "license": "apache-2.0", "size": 18771 }
[ "io.crate.exceptions.RelationUnknown", "io.crate.metadata.view.ViewsMetadata", "io.crate.sql.tree.QualifiedName" ]
import io.crate.exceptions.RelationUnknown; import io.crate.metadata.view.ViewsMetadata; import io.crate.sql.tree.QualifiedName;
import io.crate.exceptions.*; import io.crate.metadata.view.*; import io.crate.sql.tree.*;
[ "io.crate.exceptions", "io.crate.metadata", "io.crate.sql" ]
io.crate.exceptions; io.crate.metadata; io.crate.sql;
753,695
public HashSet<StoryEntry> getStoryEntries() { return storyEntries; }
HashSet<StoryEntry> function() { return storyEntries; }
/** * Get this site's list of story entries. * @return Story entry list. */
Get this site's list of story entries
getStoryEntries
{ "repo_name": "bkromhout/FictionDL", "path": "FictionDL/src/main/java/bkromhout/fdl/site/Site.java", "license": "mit", "size": 4473 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
1,980,389
public void ajustBarLevel( CustomRules rule, String category) { //define the layout LinearLayout area1=null; LinearLayout area2=null; LinearLayout area3=null; float weightArea1=0F; float weightArea2=0F; float weightArea3=0F; switch (ca...
void function( CustomRules rule, String category) { LinearLayout area1=null; LinearLayout area2=null; LinearLayout area3=null; float weightArea1=0F; float weightArea2=0F; float weightArea3=0F; switch (category) { case Const.CATEGORY_WEIGHT : area1=(LinearLayout) barWeight.findViewById(R.id.bar_level_area1); area2=(Line...
/** * This methode is used to set the diffent bar level (the size of the green and red area into the bar level) * it will be used when we initialize the fragment and when we add a new value * @param rule */
This methode is used to set the diffent bar level (the size of the green and red area into the bar level) it will be used when we initialize the fragment and when we add a new value
ajustBarLevel
{ "repo_name": "kflauri2312lffds/Android_watch_magpie", "path": "MAGPIE/watch/src/main/java/hevs/aislab/magpie/watch/gui/fragment/FragmentHome.java", "license": "bsd-3-clause", "size": 21040 }
[ "android.widget.LinearLayout" ]
import android.widget.LinearLayout;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,118,899
public Tuple<SimpleNode, Throwable> reparseDocument(Object... argsToReparse) { //get the document ast and error in object int version; try { version = grammarVersionProvider.getGrammarVersion(); } catch (MisconfigurationException e1) { //Ok, we cannot get it....
Tuple<SimpleNode, Throwable> function(Object... argsToReparse) { int version; try { version = grammarVersionProvider.getGrammarVersion(); } catch (MisconfigurationException e1) { version = IGrammarVersionProvider.LATEST_GRAMMAR_VERSION; } long documentTime = System.currentTimeMillis(); Tuple<SimpleNode, Throwable> obj ...
/** * Parses the document, generates error annotations * * @param argsToReparse: will be passed to fireParserError / fireParserChanged so that the IParserObserver2 * can check it. This is useful when the reparse was done with some specific thing in mind, so that its requestor * can pass some s...
Parses the document, generates error annotations
reparseDocument
{ "repo_name": "smkr/pyclipse", "path": "plugins/org.python.pydev.parser/src/org/python/pydev/parser/PyParser.java", "license": "epl-1.0", "size": 32388 }
[ "com.aptana.shared_core.structure.Tuple", "org.eclipse.core.internal.resources.ResourceException", "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IAdaptable", "org.eclipse.ui.IFileEditorInput", "org.python.pydev.core.IGrammarVersionProvider", "o...
import com.aptana.shared_core.structure.Tuple; import org.eclipse.core.internal.resources.ResourceException; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.ui.IFileEditorInput; import org.python.pydev.core.IGrammarVe...
import com.aptana.shared_core.structure.*; import org.eclipse.core.internal.resources.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.ui.*; import org.python.pydev.core.*; import org.python.pydev.core.log.*; import org.python.pydev.core.parser.*; import org.python.pydev.par...
[ "com.aptana.shared_core", "org.eclipse.core", "org.eclipse.ui", "org.python.pydev" ]
com.aptana.shared_core; org.eclipse.core; org.eclipse.ui; org.python.pydev;
2,844,633
public static Font getFont() { return font; }
static Font function() { return font; }
/** * Returns the current font. * * @return the current font */
Returns the current font
getFont
{ "repo_name": "zhouyulian17/Course", "path": "Java/AdvancedComputerProgramming/src/seqAnalysis/StdDraw.java", "license": "mit", "size": 74215 }
[ "java.awt.Font" ]
import java.awt.Font;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,508,241
public Group end() { if (this.groups.size() != 1) throw new IllegalStateException( "Must have exactly one group on the stack to use this method."); return this.groups.pop(); }
Group function() { if (this.groups.size() != 1) throw new IllegalStateException( STR); return this.groups.pop(); }
/** * pops and returns the last group which was on the stack * * @return */
pops and returns the last group which was on the stack
end
{ "repo_name": "ksmonkey123/WaDosUtil", "path": "judos/ch/judos/generic/swing/GroupLayoutUtils.java", "license": "gpl-3.0", "size": 2590 }
[ "javax.swing.GroupLayout" ]
import javax.swing.GroupLayout;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
829,104
private void addObjectToValidationErrors(Object object, int type, Map options) { boolean addObject = true; Map tempMap = new HashMap(); tempMap.put(ObjectMapKeys.OBJECT, object); tempMap.put(ObjectMapKeys.TYPE, new Integer(type)); tempMap.put(ObjectMapKeys.OPTIONS, options); ...
void function(Object object, int type, Map options) { boolean addObject = true; Map tempMap = new HashMap(); tempMap.put(ObjectMapKeys.OBJECT, object); tempMap.put(ObjectMapKeys.TYPE, new Integer(type)); tempMap.put(ObjectMapKeys.OPTIONS, options); for (int i = 0; i < validationErrors.size(); i++) { if (getObjectFromOb...
/** * Add object that didn't pass validation * @param object that didn't pass * @param type of validation * @param options map of different options for the validation */
Add object that didn't pass validation
addObjectToValidationErrors
{ "repo_name": "asaladino/foldermonitor", "path": "src/Utilities/Validation.java", "license": "mit", "size": 26258 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
873,971
protected void drawPrimaryLine(XYItemRendererState state, Graphics2D g2, XYPlot plot, XYDataset dataset, int pass, int series, ...
void function(XYItemRendererState state, Graphics2D g2, XYPlot plot, XYDataset dataset, int pass, int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis, Rectangle2D dataArea) { if (item == 0) { return; } double x1 = dataset.getXValue(series, item); double y1 = dataset.getYValue(series, item); if (Double.isNaN...
/** * Draws the item (first pass). This method draws the lines * connecting the items. * * @param g2 the graphics device. * @param state the renderer state. * @param dataArea the area within which the data is being drawn. * @param plot the plot (can be used to obtain standa...
Draws the item (first pass). This method draws the lines connecting the items
drawPrimaryLine
{ "repo_name": "GitoMat/jfreechart", "path": "src/main/java/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java", "license": "lgpl-2.1", "size": 47085 }
[ "java.awt.Graphics2D", "java.awt.geom.Rectangle2D", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.plot.PlotOrientation", "org.jfree.chart.plot.XYPlot", "org.jfree.chart.util.LineUtilities", "org.jfree.data.xy.XYDataset", "org.jfree.ui.RectangleEdge" ]
import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.util.LineUtilities; import org.jfree.data.xy.XYDataset; import org.jfree.ui.RectangleEdge;
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.util.*; import org.jfree.data.xy.*; import org.jfree.ui.*;
[ "java.awt", "org.jfree.chart", "org.jfree.data", "org.jfree.ui" ]
java.awt; org.jfree.chart; org.jfree.data; org.jfree.ui;
67,058
public static <X> X fromJsonString(String json, Type type) { return gson().fromJson(json, type); } /** * Reads a gson object from the specified url. * * @param url * @param type * @return the deserialized object * @throws {@link IOException}
static <X> X function(String json, Type type) { return gson().fromJson(json, type); } /** * Reads a gson object from the specified url. * * @param url * @param type * @return the deserialized object * @throws {@link IOException}
/** * Convert a json string to an object of the specified type. * * @param json * @param clazz * @return an object */
Convert a json string to an object of the specified type
fromJsonString
{ "repo_name": "cesarmarinhorj/gitblit", "path": "src/main/java/com/gitblit/utils/JsonUtils.java", "license": "apache-2.0", "size": 10750 }
[ "java.io.IOException", "java.lang.reflect.Type" ]
import java.io.IOException; import java.lang.reflect.Type;
import java.io.*; import java.lang.reflect.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
2,324,664
return BrokerId.DATA_STRUCTURE_TYPE; }
return BrokerId.DATA_STRUCTURE_TYPE; }
/** * Return the type of Data Structure we marshal * * @return short representation of the type data structure */
Return the type of Data Structure we marshal
getDataStructureType
{ "repo_name": "tabish121/OpenWire", "path": "openwire-legacy/src/main/java/io/openwire/codec/v5/BrokerIdMarshaller.java", "license": "apache-2.0", "size": 3961 }
[ "io.openwire.commands.BrokerId" ]
import io.openwire.commands.BrokerId;
import io.openwire.commands.*;
[ "io.openwire.commands" ]
io.openwire.commands;
1,874,469
@Override public void setKey(IndexKey key) { throw new UnsupportedOperationException("Operation not supported in case of leaf node"); }
@Override void function(IndexKey key) { throw new UnsupportedOperationException(STR); }
/** * below method to set the node entry * * @param key node entry */
below method to set the node entry
setKey
{ "repo_name": "jatin9896/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/datastore/impl/btree/AbstractBTreeLeafNode.java", "license": "apache-2.0", "size": 6904 }
[ "org.apache.carbondata.core.datastore.IndexKey" ]
import org.apache.carbondata.core.datastore.IndexKey;
import org.apache.carbondata.core.datastore.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
1,709,479
public static IMethod findMethod(IMethod method, IType type) throws JavaModelException { return findMethod(method.getElementName(), method.getParameterTypes().length, method.isConstructor(), type.getMethods()); }
static IMethod function(IMethod method, IType type) throws JavaModelException { return findMethod(method.getElementName(), method.getParameterTypes().length, method.isConstructor(), type.getMethods()); }
/** * Finds a method in a type. * Searches for a method with the same name and the same parameter count. * Parameter types are <b>not</b> compared. * @param method * @param type * @return The first found method or null, if nothing found * @throws JavaModelException */
Finds a method in a type. Searches for a method with the same name and the same parameter count. Parameter types are not compared
findMethod
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/Checks.java", "license": "epl-1.0", "size": 34153 }
[ "org.eclipse.jdt.core.IMethod", "org.eclipse.jdt.core.IType", "org.eclipse.jdt.core.JavaModelException" ]
import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,911,771
public CharacterFormatter getCharFormat() { return charFormat; }
CharacterFormatter function() { return charFormat; }
/** * Get the current CharacterEscaper. * * @return the current CharacterEscaper */
Get the current CharacterEscaper
getCharFormat
{ "repo_name": "PurePerfect/jetpack", "path": "src/main/java/com/pureperfect/jetpack/json/JSONOut.java", "license": "apache-2.0", "size": 7675 }
[ "com.pureperfect.jetpack.CharacterFormatter" ]
import com.pureperfect.jetpack.CharacterFormatter;
import com.pureperfect.jetpack.*;
[ "com.pureperfect.jetpack" ]
com.pureperfect.jetpack;
2,264,002
public OAuthConsumerAppDTO getOAuthApplicationDataByAppName(String appName) throws IdentityOAuthAdminException { try { return oAuthAdminServiceImpl.getOAuthApplicationDataByAppName(appName); } catch (IdentityOAuthAdminException ex) { throw handleError(ex); } }
OAuthConsumerAppDTO function(String appName) throws IdentityOAuthAdminException { try { return oAuthAdminServiceImpl.getOAuthApplicationDataByAppName(appName); } catch (IdentityOAuthAdminException ex) { throw handleError(ex); } }
/** * Get OAuth application data by the application name. * * @param appName OAuth application name. * @return <code>OAuthConsumerAppDTO</code> with application information. * @throws IdentityOAuthAdminException Error when reading application information from persistence store. */
Get OAuth application data by the application name
getOAuthApplicationDataByAppName
{ "repo_name": "wso2-extensions/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/OAuthAdminService.java", "license": "apache-2.0", "size": 16432 }
[ "org.wso2.carbon.identity.oauth.dto.OAuthConsumerAppDTO" ]
import org.wso2.carbon.identity.oauth.dto.OAuthConsumerAppDTO;
import org.wso2.carbon.identity.oauth.dto.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,209,645
private RefactoringStatus initializeSimilarElementsRenameProcessors(IProgressMonitor progressMonitor, CheckConditionsContext context) throws CoreException { Assert.isNotNull(fPreloadedElementToName); Assert.isNotNull(fPreloadedElementToSelection); final RefactoringStatus status= new RefactoringStatus(); fi...
RefactoringStatus function(IProgressMonitor progressMonitor, CheckConditionsContext context) throws CoreException { Assert.isNotNull(fPreloadedElementToName); Assert.isNotNull(fPreloadedElementToSelection); final RefactoringStatus status= new RefactoringStatus(); final Set<IMethod> handledTopLevelMethods= new HashSet<I...
/** * Creates and initializes the refactoring processors for similarly named elements * @param progressMonitor progress monitor * @param context context * @return status * @throws CoreException should not happen */
Creates and initializes the refactoring processors for similarly named elements
initializeSimilarElementsRenameProcessors
{ "repo_name": "kumattau/JDTPatch", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeProcessor.java", "license": "epl-1.0", "size": 72358 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Set", "org.eclipse.core.runtime.Assert", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.core.runtime.NullProgressMonitor", "org...
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime...
import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.corext.refactoring.*; import org.eclipse.jdt.internal.corext.refactoring.util.*; import org.eclipse.jdt.internal.corext.util.*; import org.eclipse.jdt.internal.ui.java...
[ "java.util", "org.eclipse.core", "org.eclipse.jdt", "org.eclipse.ltk" ]
java.util; org.eclipse.core; org.eclipse.jdt; org.eclipse.ltk;
880,031
SnsClient createSNSClient() { SnsClient client = null; SnsClientBuilder clientBuilder = SnsClient.builder(); ProxyConfiguration.Builder proxyConfig = null; ApacheHttpClient.Builder httpClientBuilder = null; boolean isClientConfigFound = false; if (ObjectHelper.isNotEm...
SnsClient createSNSClient() { SnsClient client = null; SnsClientBuilder clientBuilder = SnsClient.builder(); ProxyConfiguration.Builder proxyConfig = null; ApacheHttpClient.Builder httpClientBuilder = null; boolean isClientConfigFound = false; if (ObjectHelper.isNotEmpty(configuration.getProxyHost()) && ObjectHelper.is...
/** * Provide the possibility to override this method for an mock * implementation * * @return AmazonSNSClient */
Provide the possibility to override this method for an mock implementation
createSNSClient
{ "repo_name": "DariusX/camel", "path": "components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Endpoint.java", "license": "apache-2.0", "size": 10298 }
[ "java.net.URI", "org.apache.camel.util.ObjectHelper", "software.amazon.awssdk.auth.credentials.AwsBasicCredentials", "software.amazon.awssdk.auth.credentials.StaticCredentialsProvider", "software.amazon.awssdk.http.apache.ApacheHttpClient", "software.amazon.awssdk.http.apache.ProxyConfiguration", "softw...
import java.net.URI; import org.apache.camel.util.ObjectHelper; import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; import software.amazon.awssdk.http.apache.ApacheHttpClient; import software.amazon.awssdk.http.apache.ProxyConfigu...
import java.net.*; import org.apache.camel.util.*; import software.amazon.awssdk.auth.credentials.*; import software.amazon.awssdk.http.apache.*; import software.amazon.awssdk.regions.*; import software.amazon.awssdk.services.sns.*;
[ "java.net", "org.apache.camel", "software.amazon.awssdk" ]
java.net; org.apache.camel; software.amazon.awssdk;
702,149
List<DataSourceIngestJob.Snapshot> getDataSourceIngestJobSnapshots() { List<DataSourceIngestJob.Snapshot> snapshots = new ArrayList<>(); this.dataSourceJobs.values().stream().forEach((dataSourceJob) -> { snapshots.add(dataSourceJob.getSnapshot(true)); }); return snapshots...
List<DataSourceIngestJob.Snapshot> getDataSourceIngestJobSnapshots() { List<DataSourceIngestJob.Snapshot> snapshots = new ArrayList<>(); this.dataSourceJobs.values().stream().forEach((dataSourceJob) -> { snapshots.add(dataSourceJob.getSnapshot(true)); }); return snapshots; }
/** * Gets snapshots of the progress of each of this ingest job's child data * source ingest jobs. * * @return A list of data source ingest job progress snapshots. */
Gets snapshots of the progress of each of this ingest job's child data source ingest jobs
getDataSourceIngestJobSnapshots
{ "repo_name": "mhmdfy/autopsy", "path": "Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java", "license": "apache-2.0", "size": 17907 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,716,435
public DossierStepPersistence getDossierStepPersistence() { return dossierStepPersistence; }
DossierStepPersistence function() { return dossierStepPersistence; }
/** * Returns the dossier step persistence. * * @return the dossier step persistence */
Returns the dossier step persistence
getDossierStepPersistence
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-core-processmgt-portlet/docroot/WEB-INF/src/org/oep/core/processmgt/service/base/DossierStepServiceBaseImpl.java", "license": "apache-2.0", "size": 40827 }
[ "org.oep.core.processmgt.service.persistence.DossierStepPersistence" ]
import org.oep.core.processmgt.service.persistence.DossierStepPersistence;
import org.oep.core.processmgt.service.persistence.*;
[ "org.oep.core" ]
org.oep.core;
1,825,500
int n = starts.length; // 1. find range of 't' parameters while creating variables int min_t = MAX_VALUE, max_t = MIN_VALUE; for (int i = 0; i < n; i++) { min_t = min(min_t, starts[i].getLB()); max_t = max(max_t, starts[i].getUB() + durations[i]); } for (i...
int n = starts.length; int min_t = MAX_VALUE, max_t = MIN_VALUE; for (int i = 0; i < n; i++) { min_t = min(min_t, starts[i].getLB()); max_t = max(max_t, starts[i].getUB() + durations[i]); } for (int t = min_t; t <= max_t; t++) { BoolVar[] bit = ref().boolVarArray(format("b_%s_", t), n); for (int i = 0; i < n; i++) { re...
/** * Creates and <b>posts</b> a decomposition of a cumulative constraint: associates a boolean * variable to each task and each point of time sich that the scalar product of boolean * variables per heights for each time never exceed capacity. * * @param starts starting time of each task ...
Creates and posts a decomposition of a cumulative constraint: associates a boolean variable to each task and each point of time sich that the scalar product of boolean variables per heights for each time never exceed capacity
cumulativeTimeDec
{ "repo_name": "chocoteam/choco3", "path": "src/main/java/org/chocosolver/solver/constraints/IDecompositionFactory.java", "license": "bsd-3-clause", "size": 6105 }
[ "java.lang.Math", "java.util.Arrays", "org.chocosolver.solver.variables.BoolVar" ]
import java.lang.Math; import java.util.Arrays; import org.chocosolver.solver.variables.BoolVar;
import java.lang.*; import java.util.*; import org.chocosolver.solver.variables.*;
[ "java.lang", "java.util", "org.chocosolver.solver" ]
java.lang; java.util; org.chocosolver.solver;
591,360
private String parse(String line, int l) throws SignParserException { byte state = 0; StringBuilder parsed = new StringBuilder(); StringBuilder parameter = new StringBuilder(); for (int i = 0; i < line.length(); i++) { char c = line.charAt(i); switch (state) { case 0: if (c == '%') { ...
String function(String line, int l) throws SignParserException { byte state = 0; StringBuilder parsed = new StringBuilder(); StringBuilder parameter = new StringBuilder(); for (int i = 0; i < line.length(); i++) { char c = line.charAt(i); switch (state) { case 0: if (c == '%') { state = 1; } else { parsed.append(c); } ...
/** * Parse a sign's line. * * @param line The line to parse. * @param l The line number, used for errors. * @return The parsed line. * @throws SignParserException When a parse error occurs. */
Parse a sign's line
parse
{ "repo_name": "Coryf88/SignPrintf", "path": "src/main/java/com/coryf88/bukkit/signprintf/sign/Sign.java", "license": "gpl-3.0", "size": 14668 }
[ "com.coryf88.bukkit.signprintf.SignPrintf", "com.coryf88.bukkit.signprintf.util.TimeHelper", "java.util.Calendar", "java.util.TimeZone", "org.bukkit.Bukkit" ]
import com.coryf88.bukkit.signprintf.SignPrintf; import com.coryf88.bukkit.signprintf.util.TimeHelper; import java.util.Calendar; import java.util.TimeZone; import org.bukkit.Bukkit;
import com.coryf88.bukkit.signprintf.*; import com.coryf88.bukkit.signprintf.util.*; import java.util.*; import org.bukkit.*;
[ "com.coryf88.bukkit", "java.util", "org.bukkit" ]
com.coryf88.bukkit; java.util; org.bukkit;
1,397,440
public Set<JobDescriptor> getRootJobDescriptors(Map<String, JobDescriptor> jobDescriptors) { Set<JobDescriptor> s = new HashSet<JobDescriptor>(); s.addAll(jobDescriptors.values()); for(JobDescriptor desc: jobDescriptors.values()) for(JobDescriptor dep: desc.getDependencies()) ...
Set<JobDescriptor> function(Map<String, JobDescriptor> jobDescriptors) { Set<JobDescriptor> s = new HashSet<JobDescriptor>(); s.addAll(jobDescriptors.values()); for(JobDescriptor desc: jobDescriptors.values()) for(JobDescriptor dep: desc.getDependencies()) s.remove(dep); return s; }
/** * Get all the JobDescriptors that are not dependencies for any other job. * * @return The set of all root JobDescriptors */
Get all the JobDescriptors that are not dependencies for any other job
getRootJobDescriptors
{ "repo_name": "sukritmohan/qfAzkaban", "path": "azkaban/src/java/azkaban/app/JobManager.java", "license": "apache-2.0", "size": 23122 }
[ "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import java.util.HashSet; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,400,763
@Test public void testException() { // boolean array to calculate fitness funciton should be atleast 22 in // length Boolean[] bArray = { true, false }; try { fitnessFunction.evaluate(Arrays.asList(bArray)); Assert.fail("it should have thrown an exception"); } catch (RuntimeException e) { ...
void function() { Boolean[] bArray = { true, false }; try { fitnessFunction.evaluate(Arrays.asList(bArray)); Assert.fail(STR); } catch (RuntimeException e) { } }
/** * pass on an incomplete boolean array and check if it throws exception or * not * */
pass on an incomplete boolean array and check if it throws exception or not
testException
{ "repo_name": "litan/jiva-ng", "path": "usr/src/test/java/net/kogics/jiva/fitness/sample/TestFitnessFunction2.java", "license": "gpl-3.0", "size": 2796 }
[ "java.util.Arrays", "org.junit.Assert" ]
import java.util.Arrays; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,255,349
public boolean isOfTypeApplicationUser() throws IdentityOAuth2Exception;
boolean function() throws IdentityOAuth2Exception;
/** * Tells if the access tokens issued for this grant type go as APPLICATION tokens or APPLICATION_USER tokens. * * @return <Code>true</Code>|<Code>false</Code> if this grant type issues APPLICATION_USER tokens. * @throws org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception * ...
Tells if the access tokens issued for this grant type go as APPLICATION tokens or APPLICATION_USER tokens
isOfTypeApplicationUser
{ "repo_name": "maheshika/carbon-identity", "path": "components/identity/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/handlers/grant/AuthorizationGrantHandler.java", "license": "apache-2.0", "size": 4584 }
[ "org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception" ]
import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception;
import org.wso2.carbon.identity.oauth2.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
993,485
public List<StudentAttributes> getStudentsForCourse(String courseId) { assert courseId != null; return makeAttributes(getCourseStudentEntitiesForCourse(courseId)); }
List<StudentAttributes> function(String courseId) { assert courseId != null; return makeAttributes(getCourseStudentEntitiesForCourse(courseId)); }
/** * Gets all students of a course. */
Gets all students of a course
getStudentsForCourse
{ "repo_name": "wkurniawan07/repo", "path": "src/main/java/teammates/storage/api/StudentsDb.java", "license": "gpl-2.0", "size": 14689 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
325,463
public boolean isNewFinalVersionAvailable() { ServerVersion latest = getLatestFinalVersion(); ServerVersion local = getLocalVersion(); if (latest == null || local == null) { return false; } return local.compareTo(latest) < 0; }
boolean function() { ServerVersion latest = getLatestFinalVersion(); ServerVersion local = getLocalVersion(); if (latest == null local == null) { return false; } return local.compareTo(latest) < 0; }
/** * Returns whether a new final version of Madsonic is available. * * @return Whether a new final version of Madsonic is available. */
Returns whether a new final version of Madsonic is available
isNewFinalVersionAvailable
{ "repo_name": "Booksonic-Server/madsonic-main", "path": "src/main/java/org/madsonic/service/VersionService.java", "license": "gpl-3.0", "size": 11801 }
[ "org.madsonic.domain.ServerVersion" ]
import org.madsonic.domain.ServerVersion;
import org.madsonic.domain.*;
[ "org.madsonic.domain" ]
org.madsonic.domain;
2,187,577
public static <K, V> ConcurrentHashMap<K, V> concurrentHashMap() { return new ConcurrentHashMap<K, V>(); }
static <K, V> ConcurrentHashMap<K, V> function() { return new ConcurrentHashMap<K, V>(); }
/** * Create a new ConcurrentHashMap. * * @param <K> the key type * @param <V> the value type * @param initialCapacity the initial capacity * @return the object */
Create a new ConcurrentHashMap
concurrentHashMap
{ "repo_name": "tongbanjie/baymax", "path": "baymax-core/src/main/java/com/tongbanjie/baymax/utils/New.java", "license": "apache-2.0", "size": 6537 }
[ "java.util.concurrent.ConcurrentHashMap" ]
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
853,081
ScopedBindingBuilder to(TypeLiteral<? extends T> implementation);
ScopedBindingBuilder to(TypeLiteral<? extends T> implementation);
/** * See the EDSL examples at {@link com.google.inject.Binder}. */
See the EDSL examples at <code>com.google.inject.Binder</code>
to
{ "repo_name": "msf-ch/msf-malnutrition", "path": "msf-malnutrition/srcdoc/guice-3.0-sources/com/google/inject/binder/LinkedBindingBuilder.java", "license": "gpl-3.0", "size": 2696 }
[ "com.google.inject.TypeLiteral" ]
import com.google.inject.TypeLiteral;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
968,372
public Paint getItemFillPaint(int row, int column) { return lookupSeriesFillPaint(row); }
Paint function(int row, int column) { return lookupSeriesFillPaint(row); }
/** * Returns the paint used to fill data items as they are drawn. The * default implementation passes control to the * {@link #lookupSeriesFillPaint(int)} method - you can override this * method if you require different behaviour. * * @param row the row (or series) index (zero-bas...
Returns the paint used to fill data items as they are drawn. The default implementation passes control to the <code>#lookupSeriesFillPaint(int)</code> method - you can override this method if you require different behaviour
getItemFillPaint
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/main/java/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-2.1", "size": 108424 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,973,726
public boolean optBoolean(@Nullable String name, boolean fallback) { Object object = opt(name); Boolean result = JSON.toBoolean(object); return result != null ? result : fallback; }
boolean function(@Nullable String name, boolean fallback) { Object object = opt(name); Boolean result = JSON.toBoolean(object); return result != null ? result : fallback; }
/** * Returns the value mapped by {@code name} if it exists and is a boolean or * can be coerced to a boolean, or {@code fallback} otherwise. */
Returns the value mapped by name if it exists and is a boolean or can be coerced to a boolean, or fallback otherwise
optBoolean
{ "repo_name": "smartdevicelink/sdl_android", "path": "javaSE/javaSE/src/main/java/org/json/JSONObject.java", "license": "bsd-3-clause", "size": 30612 }
[ "androidx.annotation.Nullable" ]
import androidx.annotation.Nullable;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
457,294
public void createScheduler(String schedulerName, String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore, String rmiRegistryHost, int rmiRegistryPort, long idleWaitTime, long dbFailureRetryInterval) throws SchedulerException { createScheduler(schedul...
void function(String schedulerName, String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore, String rmiRegistryHost, int rmiRegistryPort, long idleWaitTime, long dbFailureRetryInterval) throws SchedulerException { createScheduler(schedulerName, schedulerInstanceId, threadPool, jobStore, null, rmiRegistryHo...
/** * Creates a scheduler using the specified thread pool and job store and * binds it to RMI. * * @param schedulerName * The name for the scheduler. * @param schedulerInstanceId * The instance ID for the scheduler. * @param threadPool * The thread...
Creates a scheduler using the specified thread pool and job store and binds it to RMI
createScheduler
{ "repo_name": "suthat/signal", "path": "vendor/quartz-2.2.0/src/org/quartz/impl/DirectSchedulerFactory.java", "license": "apache-2.0", "size": 21968 }
[ "org.quartz.SchedulerException", "org.quartz.spi.JobStore", "org.quartz.spi.ThreadPool" ]
import org.quartz.SchedulerException; import org.quartz.spi.JobStore; import org.quartz.spi.ThreadPool;
import org.quartz.*; import org.quartz.spi.*;
[ "org.quartz", "org.quartz.spi" ]
org.quartz; org.quartz.spi;
235,859
@Schema(description = "") public String getName() { return name; }
@Schema(description = "") String function() { return name; }
/** * Get name * @return name **/
Get name
getName
{ "repo_name": "bclemenzi/clever-java", "path": "src/main/java/io/swagger/client/model/Section.java", "license": "gpl-3.0", "size": 13647 }
[ "io.swagger.v3.oas.annotations.media.Schema" ]
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.*;
[ "io.swagger.v3" ]
io.swagger.v3;
1,594,943
public Map<String, String> getConfiguration() { // shallow pointer copy return Collections.unmodifiableMap(configuration); }
Map<String, String> function() { return Collections.unmodifiableMap(configuration); }
/** * Getter for fetching an unmodifiable {@link #configuration} map. */
Getter for fetching an unmodifiable <code>#configuration</code> map
getConfiguration
{ "repo_name": "ZhangXFeng/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java", "license": "apache-2.0", "size": 54577 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,578,731
public String[] getAlphabets() { AbstractAlphabet[] as = AlphabetsManager.getInstance().getAlphabets(); List<String> list = new ArrayList<String>(); for (AbstractAlphabet a : as) { list.add(a.getName()); } return list.toArray(new String[0]); }
String[] function() { AbstractAlphabet[] as = AlphabetsManager.getInstance().getAlphabets(); List<String> list = new ArrayList<String>(); for (AbstractAlphabet a : as) { list.add(a.getName()); } return list.toArray(new String[0]); }
/** * Requests list of all available alphabets from proper manager and compiles own formatted list afterwards. * * @return a collection of alphabet designators. */
Requests list of all available alphabets from proper manager and compiles own formatted list afterwards
getAlphabets
{ "repo_name": "jcryptool/crypto", "path": "org.jcryptool.analysis.vigenere/src/org/jcryptool/analysis/vigenere/interfaces/DataProvider.java", "license": "epl-1.0", "size": 23015 }
[ "java.util.ArrayList", "java.util.List", "org.jcryptool.core.operations.alphabets.AbstractAlphabet", "org.jcryptool.core.operations.alphabets.AlphabetsManager" ]
import java.util.ArrayList; import java.util.List; import org.jcryptool.core.operations.alphabets.AbstractAlphabet; import org.jcryptool.core.operations.alphabets.AlphabetsManager;
import java.util.*; import org.jcryptool.core.operations.alphabets.*;
[ "java.util", "org.jcryptool.core" ]
java.util; org.jcryptool.core;
834,498
protected void reload(final PrintWriter writer, String path) { if (debug >= 1) { log("restart: Reloading web application at '" + path + '\''); } if (path == null || !path.startsWith("/") && path.length() == 0) { writer.println(sm.getString("managerServlet.invalidPath", path)); return; ...
void function(final PrintWriter writer, String path) { if (debug >= 1) { log(STR + path + '\''); } if (path == null !path.startsWith("/") && path.length() == 0) { writer.println(sm.getString(STR, path)); return; } final String displayPath = path; if (path.equals("/")) { path = STRmanagerServlet.noContextSTRmanagerServl...
/** * Reload the web application at the specified context path. * * @param writer Writer to render to * @param path Context path of the application to be restarted */
Reload the web application at the specified context path
reload
{ "repo_name": "simeshev/parabuild-ci", "path": "src/org/parabuild/ci/manager/server/ManagerServlet.java", "license": "lgpl-3.0", "size": 45315 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
63,276
public int read() throws IOException { byte[] b = new byte[1]; if (read(b, 0, 1) <= 0) return -1; return b[0] & 0xff; }
int function() throws IOException { byte[] b = new byte[1]; if (read(b, 0, 1) <= 0) return -1; return b[0] & 0xff; }
/** * Reads a byte from the current zip entry. * @return the byte or -1 on EOF. * @exception IOException if a i/o error occured. * @exception ZipException if the deflated stream is corrupted. */
Reads a byte from the current zip entry
read
{ "repo_name": "aosm/gcc_40", "path": "libjava/java/util/zip/ZipInputStream.java", "license": "gpl-2.0", "size": 9402 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,320,209
public static java.util.List extractLocationServiceList(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.NewResultLocationServiceVoCollection voCollection) { return extractLocationServiceList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.NewResultLocationServiceVoCollection voCollection) { return extractLocationServiceList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.resource.place.domain.objects.LocationService list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.resource.place.domain.objects.LocationService list from the value object collection
extractLocationServiceList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/NewResultLocationServiceVoAssembler.java", "license": "agpl-3.0", "size": 17158 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,013,489
Method hasValueMethod() { String methodName = "has" + camelCaseName; try { return containingPrototype.getClass().getDeclaredMethod(methodName); } catch (NoSuchMethodException e) { throw new IllegalStateException("Could not find generated has method.", e); } }
Method hasValueMethod() { String methodName = "has" + camelCaseName; try { return containingPrototype.getClass().getDeclaredMethod(methodName); } catch (NoSuchMethodException e) { throw new IllegalStateException(STR, e); } }
/** * Returns the method to determine whether the message has a value for this field. Only valid for * message types for proto3 messages, valid for all fields otherwise. */
Returns the method to determine whether the message has a value for this field. Only valid for message types for proto3 messages, valid for all fields otherwise
hasValueMethod
{ "repo_name": "curioswitch/curiostack", "path": "common/grpc/protobuf-jackson/src/main/java/org/curioswitch/common/protobuf/json/ProtoFieldInfo.java", "license": "mit", "size": 14773 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,551,352
public Pair<String, Document> processing2(String pdfInput, boolean consolidate, BiblioItem resHeader, int startPage, int endPage) { DocumentSource documentSource = null; try { documentSource = DocumentSource.fromPdf(new File(pdfInput), startP...
Pair<String, Document> function(String pdfInput, boolean consolidate, BiblioItem resHeader, int startPage, int endPage) { DocumentSource documentSource = null; try { documentSource = DocumentSource.fromPdf(new File(pdfInput), startPage, endPage); Document doc = new Document(documentSource); doc.addTokenizedDocument(); ...
/** * Processing without application of the segmentation model, regex are used to identify the header * zone. */
Processing without application of the segmentation model, regex are used to identify the header zone
processing2
{ "repo_name": "k8si/grobid", "path": "grobid-core/src/main/java/org/grobid/core/engines/HeaderParser.java", "license": "apache-2.0", "size": 73955 }
[ "java.io.File", "org.apache.commons.lang3.tuple.Pair", "org.grobid.core.data.BiblioItem", "org.grobid.core.document.Document", "org.grobid.core.document.DocumentSource", "org.grobid.core.exceptions.GrobidException" ]
import java.io.File; import org.apache.commons.lang3.tuple.Pair; import org.grobid.core.data.BiblioItem; import org.grobid.core.document.Document; import org.grobid.core.document.DocumentSource; import org.grobid.core.exceptions.GrobidException;
import java.io.*; import org.apache.commons.lang3.tuple.*; import org.grobid.core.data.*; import org.grobid.core.document.*; import org.grobid.core.exceptions.*;
[ "java.io", "org.apache.commons", "org.grobid.core" ]
java.io; org.apache.commons; org.grobid.core;
433,265
@Override protected void readXML(final List<String> _tags, final Map<String, String> _attributes, final String _text) throws EFapsException { final String value = _tags.get(0); if ("attribute".equal...
void function(final List<String> _tags, final Map<String, String> _attributes, final String _text) throws EFapsException { final String value = _tags.get(0); if (STR.equals(value)) { if (_tags.size() == 1) { this.curAttr = new AttributeDefinition(); if (_attributes.containsKey(STR)) { this.curAttr.setAttributeUpdate(En...
/** * Read xml. * * @param _tags current path as list of single tags * @param _attributes attributes for current path * @param _text content for current path * @throws EFapsException on error */
Read xml
readXML
{ "repo_name": "eFaps/eFaps-Kernel", "path": "src/main/java/org/efaps/update/schema/common/SystemConfigurationUpdate.java", "license": "apache-2.0", "size": 10232 }
[ "java.util.List", "java.util.Map", "org.apache.commons.lang3.EnumUtils", "org.efaps.util.EFapsException" ]
import java.util.List; import java.util.Map; import org.apache.commons.lang3.EnumUtils; import org.efaps.util.EFapsException;
import java.util.*; import org.apache.commons.lang3.*; import org.efaps.util.*;
[ "java.util", "org.apache.commons", "org.efaps.util" ]
java.util; org.apache.commons; org.efaps.util;
332,229
private String getInstanceClass( final ResultSet rs, final int i, final Loadable persister, final Serializable id, final SessionImplementor session) throws HibernateException, SQLException { if ( persister.hasSubclasses() ) { // Code to handle subclasses of topCl...
String function( final ResultSet rs, final int i, final Loadable persister, final Serializable id, final SessionImplementor session) throws HibernateException, SQLException { if ( persister.hasSubclasses() ) { Object discriminatorValue = persister.getDiscriminatorType().nullSafeGet( rs, getEntityAliases()[i].getSuffixe...
/** * Determine the concrete class of an instance in the <tt>ResultSet</tt> */
Determine the concrete class of an instance in the ResultSet
getInstanceClass
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/loader/Loader.java", "license": "unlicense", "size": 86358 }
[ "java.io.Serializable", "java.sql.ResultSet", "java.sql.SQLException", "org.hibernate.HibernateException", "org.hibernate.WrongClassException", "org.hibernate.engine.SessionImplementor", "org.hibernate.persister.entity.Loadable" ]
import java.io.Serializable; import java.sql.ResultSet; import java.sql.SQLException; import org.hibernate.HibernateException; import org.hibernate.WrongClassException; import org.hibernate.engine.SessionImplementor; import org.hibernate.persister.entity.Loadable;
import java.io.*; import java.sql.*; import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.persister.entity.*;
[ "java.io", "java.sql", "org.hibernate", "org.hibernate.engine", "org.hibernate.persister" ]
java.io; java.sql; org.hibernate; org.hibernate.engine; org.hibernate.persister;
1,266,906
public Parser createParser() { return ParserSingletonHolder.parserInstance; }
Parser function() { return ParserSingletonHolder.parserInstance; }
/** * Returns the singleton instance of {@link Parser}. * * @return the Parser of Cami commands. */
Returns the singleton instance of <code>Parser</code>
createParser
{ "repo_name": "lhillah/camipnml", "path": "cpnami2-cpnami2/src/fr/lip6/move/pnml/cpnami/cami/impl/CamiFactoryImpl.java", "license": "epl-1.0", "size": 6574 }
[ "fr.lip6.move.pnml.cpnami.cami.Parser" ]
import fr.lip6.move.pnml.cpnami.cami.Parser;
import fr.lip6.move.pnml.cpnami.cami.*;
[ "fr.lip6.move" ]
fr.lip6.move;
700,274
void setScript(long aScriptId, IHDSDocument aSaveState, INKFRequestContext aContext) throws NKFException;
void setScript(long aScriptId, IHDSDocument aSaveState, INKFRequestContext aContext) throws NKFException;
/** Set the state of a single script * @param aScriptId the id of script * @param aSaveState a HDSDocument of type Script * @param aContext NetKernel context * @throws NKFException thrown if anything goes wrong */
Set the state of a single script
setScript
{ "repo_name": "tonbut/polestar", "path": "module/urn.io.polestar/src/io/polestar/data/db/IPolestarPersistence.java", "license": "apache-2.0", "size": 13330 }
[ "org.netkernel.layer0.nkf.INKFRequestContext", "org.netkernel.layer0.nkf.NKFException", "org.netkernel.mod.hds.IHDSDocument" ]
import org.netkernel.layer0.nkf.INKFRequestContext; import org.netkernel.layer0.nkf.NKFException; import org.netkernel.mod.hds.IHDSDocument;
import org.netkernel.layer0.nkf.*; import org.netkernel.mod.hds.*;
[ "org.netkernel.layer0", "org.netkernel.mod" ]
org.netkernel.layer0; org.netkernel.mod;
1,025,674
@Override protected Stream instantiate(final String responseBlock) { return new Stream(responseBlock); }
Stream function(final String responseBlock) { return new Stream(responseBlock); }
/** * This method instantiates the {@link Stream} object with a block from the MPD * server response. * * @param responseBlock The MPD server response to instantiate the Music entry with. * @return The Stream entry. */
This method instantiates the <code>Stream</code> object with a block from the MPD server response
instantiate
{ "repo_name": "hurzl/dmix", "path": "JMPDComm/src/main/java/com/anpmech/mpd/commandresponse/iterator/StreamIterator.java", "license": "apache-2.0", "size": 3257 }
[ "com.anpmech.mpd.item.Stream" ]
import com.anpmech.mpd.item.Stream;
import com.anpmech.mpd.item.*;
[ "com.anpmech.mpd" ]
com.anpmech.mpd;
2,187,825
@Test public void getReviewTest() { ReviewEntity entity = data.get(0); ReviewEntity newEntity = reviewPersistence.find(entity.getBook().getId(), entity.getId()); Assert.assertNotNull(newEntity); Assert.assertEquals(entity.getName(), newEntity.getName()); Assert.assertEqua...
void function() { ReviewEntity entity = data.get(0); ReviewEntity newEntity = reviewPersistence.find(entity.getBook().getId(), entity.getId()); Assert.assertNotNull(newEntity); Assert.assertEquals(entity.getName(), newEntity.getName()); Assert.assertEquals(entity.getSource(), newEntity.getSource()); Assert.assertEquals...
/** * Prueba para consultar un Review. * * @generated */
Prueba para consultar un Review
getReviewTest
{ "repo_name": "recursosCSWuniandes/research", "path": "book-store-logic/src/test/java/co/edu/uniandes/csw/bookstore/test/persistence/ReviewPersistenceTest.java", "license": "mit", "size": 7261 }
[ "co.edu.uniandes.csw.bookstore.entities.ReviewEntity", "org.junit.Assert" ]
import co.edu.uniandes.csw.bookstore.entities.ReviewEntity; import org.junit.Assert;
import co.edu.uniandes.csw.bookstore.entities.*; import org.junit.*;
[ "co.edu.uniandes", "org.junit" ]
co.edu.uniandes; org.junit;
2,683,471
List<User> findUsers(String username);
List<User> findUsers(String username);
/** * Find users by username. * * @param username * the username * @return the list of found users */
Find users by username
findUsers
{ "repo_name": "regueiro/collection-manager", "path": "src/main/java/es/regueiro/collectionManager/service/UserService.java", "license": "gpl-3.0", "size": 1184 }
[ "es.regueiro.collectionManager.model.user.User", "java.util.List" ]
import es.regueiro.collectionManager.model.user.User; import java.util.List;
import es.regueiro.*; import java.util.*;
[ "es.regueiro", "java.util" ]
es.regueiro; java.util;
218,188
public String getCdnSslUrl () { Header cdnHeader = getResponseHeader (FilesConstants.X_CDN_SSL_URI); if (cdnHeader != null ) return cdnHeader.getValue(); return null; }
String function () { Header cdnHeader = getResponseHeader (FilesConstants.X_CDN_SSL_URI); if (cdnHeader != null ) return cdnHeader.getValue(); return null; }
/** * Get the SSL URL For a shared container * * @return null if the header is not present or the correct value as defined by the header */
Get the SSL URL For a shared container
getCdnSslUrl
{ "repo_name": "dimm0/scidrive", "path": "src/com/rackspacecloud/client/cloudfiles/FilesResponse.java", "license": "apache-2.0", "size": 10031 }
[ "org.apache.http.Header" ]
import org.apache.http.Header;
import org.apache.http.*;
[ "org.apache.http" ]
org.apache.http;
2,444,136
public SequenceOwner<? extends SequenceOwner<?>> getSequenceOwner() { return sequenceOwner; }
SequenceOwner<? extends SequenceOwner<?>> function() { return sequenceOwner; }
/** * Gets the sequenceOwner attribute. * @return Returns the sequenceOwner. */
Gets the sequenceOwner attribute
getSequenceOwner
{ "repo_name": "blackcathacker/kc.preclean", "path": "coeus-code/src/main/java/org/kuali/coeus/common/framework/version/history/VersionHistorySearchBo.java", "license": "apache-2.0", "size": 7295 }
[ "org.kuali.coeus.common.framework.version.sequence.owner.SequenceOwner" ]
import org.kuali.coeus.common.framework.version.sequence.owner.SequenceOwner;
import org.kuali.coeus.common.framework.version.sequence.owner.*;
[ "org.kuali.coeus" ]
org.kuali.coeus;
2,154,559
public String getLoggingName() { UserCredentials uc = (UserCredentials) context.lookup(LookupNames.USER_CREDENTIALS); return uc.getUserName(); }
String function() { UserCredentials uc = (UserCredentials) context.lookup(LookupNames.USER_CREDENTIALS); return uc.getUserName(); }
/** * Implemented as specified by {@link AdminService}. * @see AdminService#getLoggingName() */
Implemented as specified by <code>AdminService</code>
getLoggingName
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/AdminServiceImpl.java", "license": "gpl-2.0", "size": 27724 }
[ "org.openmicroscopy.shoola.env.LookupNames", "org.openmicroscopy.shoola.env.data.login.UserCredentials" ]
import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.data.login.UserCredentials;
import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.data.login.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
577,204
@Test public void resolveSelfRelationship() { // @formatter:off // Initial relationships ComponentRelationships cable = ComponentRelationships.builder() .component(CABLE) .addConsumer(Consumer.by(CABLE)) .build(); // Resolv...
void function() { ComponentRelationships cable = ComponentRelationships.builder() .component(CABLE) .addConsumer(Consumer.by(CABLE)) .build(); ComponentRelationships cableResolved = ComponentRelationships.builder() .component(CABLE) .addConsumer(Consumer.by(CABLE)) .addDependency(Dependency.on(CABLE)) .build(); Snitch ...
/** * A component consuming itself should be resolved as both a dependency and * a consumer. */
A component consuming itself should be resolved as both a dependency and a consumer
resolveSelfRelationship
{ "repo_name": "cereebro/cereebro", "path": "cereebro-core/src/test/java/io/cereebro/core/SimpleSystemResolverTest.java", "license": "apache-2.0", "size": 8916 }
[ "java.net.URI", "org.assertj.core.api.Assertions" ]
import java.net.URI; import org.assertj.core.api.Assertions;
import java.net.*; import org.assertj.core.api.*;
[ "java.net", "org.assertj.core" ]
java.net; org.assertj.core;
680,299
@Test public void testNameAndTenantIdSetWhenFetchingVariables() { String tenantId = "testTenantId"; String processInstanceName = "myProcessInstance"; String deploymentId = repositoryService.createDeployment().addClasspathResource("org/flowable/engine/test/history/oneTaskProcess.bpmn20....
void function() { String tenantId = STR; String processInstanceName = STR; String deploymentId = repositoryService.createDeployment().addClasspathResource(STR).tenantId(tenantId).deploy().getId(); Map<String, Object> vars = new HashMap<>(); vars.put("name", STR); vars.put("age", 60); ProcessInstance processInstance = r...
/** * Validation for https://jira.codehaus.org/browse/ACT-2182 */
Validation for HREF
testNameAndTenantIdSetWhenFetchingVariables
{ "repo_name": "lsmall/flowable-engine", "path": "modules/flowable-engine/src/test/java/org/flowable/engine/test/history/HistoricProcessInstanceTest.java", "license": "apache-2.0", "size": 36829 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "org.flowable.engine.history.HistoricProcessInstance", "org.flowable.engine.runtime.ProcessInstance" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ProcessInstance;
import java.util.*; import org.flowable.engine.history.*; import org.flowable.engine.runtime.*;
[ "java.util", "org.flowable.engine" ]
java.util; org.flowable.engine;
2,615,098
public String getSeparator() throws DOMException { return computedValue.getSeparator(); }
String function() throws DOMException { return computedValue.getSeparator(); }
/** * Implements {@link Value#getSeparator()}. */
Implements <code>Value#getSeparator()</code>
getSeparator
{ "repo_name": "adufilie/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/value/ComputedValue.java", "license": "apache-2.0", "size": 4593 }
[ "org.w3c.dom.DOMException" ]
import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,863,807
public static boolean validateStartEnd(CFlags flags, String startFlag, String endFlag) { if (flags.isSet(startFlag)) { if ((Long) flags.getValue(startFlag) < 0) { flags.setParseMessage("--" + startFlag + " should be positive"); return false; } } if (flags.isSet(endFlag)) { ...
static boolean function(CFlags flags, String startFlag, String endFlag) { if (flags.isSet(startFlag)) { if ((Long) flags.getValue(startFlag) < 0) { flags.setParseMessage("--" + startFlag + STR); return false; } } if (flags.isSet(endFlag)) { if ((Long) flags.getValue(endFlag) < 1) { flags.setParseMessage("--" + endFlag ...
/** * Validate start and end flag for sequences * @param flags object containing flags * @param startFlag flag representing start sequence * @param endFlag flag representing end sequence * @return true if valid */
Validate start and end flag for sequences
validateStartEnd
{ "repo_name": "RealTimeGenomics/rtg-tools", "path": "src/com/rtg/launcher/CommonFlags.java", "license": "bsd-2-clause", "size": 30102 }
[ "com.rtg.util.cli.CFlags" ]
import com.rtg.util.cli.CFlags;
import com.rtg.util.cli.*;
[ "com.rtg.util" ]
com.rtg.util;
1,124,738
public void removeJobEntry( int i ) { JobEntryCopy deleted = jobcopies.remove( i ); if ( deleted != null ) { if ( deleted.getEntry() instanceof MissingEntry ) { removeMissingEntry( (MissingEntry) deleted.getEntry() ); } } setChanged(); }
void function( int i ) { JobEntryCopy deleted = jobcopies.remove( i ); if ( deleted != null ) { if ( deleted.getEntry() instanceof MissingEntry ) { removeMissingEntry( (MissingEntry) deleted.getEntry() ); } } setChanged(); }
/** * Removes the job entry. * * @param i the i */
Removes the job entry
removeJobEntry
{ "repo_name": "ViswesvarSekar/pentaho-kettle", "path": "engine/src/org/pentaho/di/job/JobMeta.java", "license": "apache-2.0", "size": 86688 }
[ "org.pentaho.di.job.entries.missing.MissingEntry", "org.pentaho.di.job.entry.JobEntryCopy" ]
import org.pentaho.di.job.entries.missing.MissingEntry; import org.pentaho.di.job.entry.JobEntryCopy;
import org.pentaho.di.job.entries.missing.*; import org.pentaho.di.job.entry.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,663,375
public HotRestartPersistenceConfig setValidationTimeoutSeconds(int validationTimeoutSeconds) { checkPositive(validationTimeoutSeconds, "Validation timeout should be positive!"); this.validationTimeoutSeconds = validationTimeoutSeconds; return this; }
HotRestartPersistenceConfig function(int validationTimeoutSeconds) { checkPositive(validationTimeoutSeconds, STR); this.validationTimeoutSeconds = validationTimeoutSeconds; return this; }
/** * Sets validation timeout for hot-restart process, includes validating * cluster members expected to join and partition table on all cluster. * * @param validationTimeoutSeconds validation timeout in seconds * @return HotRestartPersistenceConfig */
Sets validation timeout for hot-restart process, includes validating cluster members expected to join and partition table on all cluster
setValidationTimeoutSeconds
{ "repo_name": "emre-aydin/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/config/HotRestartPersistenceConfig.java", "license": "apache-2.0", "size": 11653 }
[ "com.hazelcast.internal.util.Preconditions" ]
import com.hazelcast.internal.util.Preconditions;
import com.hazelcast.internal.util.*;
[ "com.hazelcast.internal" ]
com.hazelcast.internal;
2,079,175
PropertyDescriptor<P, E> build();
PropertyDescriptor<P, E> build();
/** * Build the descriptor. * * @return The descriptor. */
Build the descriptor
build
{ "repo_name": "lunarray-org/model-descriptor", "path": "src/main/java/org/lunarray/model/descriptor/builder/annotation/base/build/property/AnnotationPropertyDescriptorBuilder.java", "license": "lgpl-3.0", "size": 5273 }
[ "org.lunarray.model.descriptor.model.property.PropertyDescriptor" ]
import org.lunarray.model.descriptor.model.property.PropertyDescriptor;
import org.lunarray.model.descriptor.model.property.*;
[ "org.lunarray.model" ]
org.lunarray.model;
2,604,918
public boolean isLocked() throws DotStateException, DotDataException, DotSecurityException { return APILocator.getVersionableAPI().isLocked(this); }
boolean function() throws DotStateException, DotDataException, DotSecurityException { return APILocator.getVersionableAPI().isLocked(this); }
/** * Returns the locked. * @return boolean * @throws DotSecurityException * @throws DotDataException * @throws DotStateException */
Returns the locked
isLocked
{ "repo_name": "zhiqinghuang/core", "path": "src/com/dotmarketing/portlets/fileassets/business/FileAsset.java", "license": "gpl-3.0", "size": 7221 }
[ "com.dotmarketing.business.APILocator", "com.dotmarketing.business.DotStateException", "com.dotmarketing.exception.DotDataException", "com.dotmarketing.exception.DotSecurityException" ]
import com.dotmarketing.business.APILocator; import com.dotmarketing.business.DotStateException; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException;
import com.dotmarketing.business.*; import com.dotmarketing.exception.*;
[ "com.dotmarketing.business", "com.dotmarketing.exception" ]
com.dotmarketing.business; com.dotmarketing.exception;
2,809,105
public DirectIoContext getContext() { Invariants.requireNonNull(context); return context; }
DirectIoContext function() { Invariants.requireNonNull(context); return context; }
/** * Returns the current Direct I/O context. * @return the current Direct I/O context */
Returns the current Direct I/O context
getContext
{ "repo_name": "asakusafw/asakusafw-compiler", "path": "dag/compiler/extension-directio/src/test/java/com/asakusafw/dag/compiler/extension/directio/testing/DirectIoTestHelper.java", "license": "apache-2.0", "size": 5293 }
[ "com.asakusafw.lang.compiler.mapreduce.testing.mock.DirectIoContext", "com.asakusafw.lang.utils.common.Invariants" ]
import com.asakusafw.lang.compiler.mapreduce.testing.mock.DirectIoContext; import com.asakusafw.lang.utils.common.Invariants;
import com.asakusafw.lang.compiler.mapreduce.testing.mock.*; import com.asakusafw.lang.utils.common.*;
[ "com.asakusafw.lang" ]
com.asakusafw.lang;
284,548
@ReservedStackAccess public long tryReadLock(long time, TimeUnit unit) throws InterruptedException { long s, m, next, deadline; long nanos = unit.toNanos(time); if (!Thread.interrupted()) { if ((m = (s = state) & ABITS) != WBIT) { if (m < RFULL) { ...
long function(long time, TimeUnit unit) throws InterruptedException { long s, m, next, deadline; long nanos = unit.toNanos(time); if (!Thread.interrupted()) { if ((m = (s = state) & ABITS) != WBIT) { if (m < RFULL) { if (casState(s, next = s + RUNIT)) return next; } else if ((next = tryIncReaderOverflow(s)) != 0L) retu...
/** * Non-exclusively acquires the lock if it is available within the * given time and the current thread has not been interrupted. * Behavior under timeout and interruption matches that specified * for method {@link Lock#tryLock(long,TimeUnit)}. * * @param time the maximum time to wait fo...
Non-exclusively acquires the lock if it is available within the given time and the current thread has not been interrupted. Behavior under timeout and interruption matches that specified for method <code>Lock#tryLock(long,TimeUnit)</code>
tryReadLock
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java", "license": "gpl-2.0", "size": 62452 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,814,261
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance(IGrid grid);
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance(IGrid grid);
/** * requests a new instance of a grid cache for use, used internally * * @param grid * * @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid. */
requests a new instance of a grid cache for use, used internally
createCacheInstance
{ "repo_name": "AgileMods/MateriaMuto", "path": "src/api/java/appeng/api/networking/IGridCacheRegistry.java", "license": "mit", "size": 811 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,756,363
public static final AlgorithmParameters getAlgParams(String algName) throws NoSuchAlgorithmException { return (AlgorithmParameters) getInstance(algParams, algName); }
static final AlgorithmParameters function(String algName) throws NoSuchAlgorithmException { return (AlgorithmParameters) getInstance(algParams, algName); }
/** * Return an instance of the specified algorithm parameters. * * @param algName * the name of the algorithm parameters * @return a new {@link AlgorithmParameters} object implementing the chosen * algorithm * @throws NoSuchAlgorithmException * if the algorithm parameter...
Return an instance of the specified algorithm parameters
getAlgParams
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_security/src/main/java/de/flexiprovider/api/Registry.java", "license": "apache-2.0", "size": 26066 }
[ "de.flexiprovider.api.exceptions.NoSuchAlgorithmException", "de.flexiprovider.api.parameters.AlgorithmParameters" ]
import de.flexiprovider.api.exceptions.NoSuchAlgorithmException; import de.flexiprovider.api.parameters.AlgorithmParameters;
import de.flexiprovider.api.exceptions.*; import de.flexiprovider.api.parameters.*;
[ "de.flexiprovider.api" ]
de.flexiprovider.api;
1,300,390
public HDInsightSparkActivity withSparkConfig(Map<String, Object> sparkConfig) { this.sparkConfig = sparkConfig; return this; }
HDInsightSparkActivity function(Map<String, Object> sparkConfig) { this.sparkConfig = sparkConfig; return this; }
/** * Set spark configuration property. * * @param sparkConfig the sparkConfig value to set * @return the HDInsightSparkActivity object itself. */
Set spark configuration property
withSparkConfig
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/datafactory/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/HDInsightSparkActivity.java", "license": "mit", "size": 7424 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
495,631
final public IFProbabilityVariable VariableDeclaration() throws ParseException { String s; IFProbabilityVariable pv; int type = NATURE_DEFINE; jj_consume_token(VARIABLE); switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) { case TYPE: type = TypeDeclaration(); break; default: ...
final IFProbabilityVariable function() throws ParseException { String s; IFProbabilityVariable pv; int type = NATURE_DEFINE; jj_consume_token(VARIABLE); switch ((this.jj_ntk == -1) ? jj_ntk() : this.jj_ntk) { case TYPE: type = TypeDeclaration(); break; default: this.jj_la1[3] = this.jj_gen; ; } jj_consume_token(CT); s ...
/** * Detect a variable declaration. */
Detect a variable declaration
VariableDeclaration
{ "repo_name": "MrSampson/javabayes", "path": "src/edu/cmu/cs/javabayes/parsers/XMLBIFv03/XMLBIFv03.java", "license": "gpl-2.0", "size": 20369 }
[ "edu.cmu.cs.javabayes.interchangeformat.IFProbabilityVariable" ]
import edu.cmu.cs.javabayes.interchangeformat.IFProbabilityVariable;
import edu.cmu.cs.javabayes.interchangeformat.*;
[ "edu.cmu.cs" ]
edu.cmu.cs;
682,393
public void addSessionListener(SessionListener listener) { listeners.add(listener); }
void function(SessionListener listener) { listeners.add(listener); }
/** * Add a session event listener to this component. */
Add a session event listener to this component
addSessionListener
{ "repo_name": "benothman/jboss-web-nio2", "path": "java/org/apache/catalina/session/StandardSession.java", "license": "lgpl-3.0", "size": 53099 }
[ "org.apache.catalina.SessionListener" ]
import org.apache.catalina.SessionListener;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,366,833
public void put( Document entryDocument ) { database.put(entryDocument); }
void function( Document entryDocument ) { database.put(entryDocument); }
/** * Store the supplied document in the local db * * @param entryDocument the document that contains the metadata document, content document, and key */
Store the supplied document in the local db
put
{ "repo_name": "stemig62/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/LocalDocumentStore.java", "license": "apache-2.0", "size": 16336 }
[ "org.infinispan.schematic.document.Document" ]
import org.infinispan.schematic.document.Document;
import org.infinispan.schematic.document.*;
[ "org.infinispan.schematic" ]
org.infinispan.schematic;
1,712,347
String sendToAdmins(EmailStrategy strategy, @Nullable List<String> receivedReasons);
String sendToAdmins(EmailStrategy strategy, @Nullable List<String> receivedReasons);
/** * sends emails to configured admin emails for server, or admin users if no * server emails are configured. * * @param strategy - Email template * @param receivedReasons * - Reasons of why users are receiving email as admin can * received via: 1) Direct email ...
sends emails to configured admin emails for server, or admin users if no server emails are configured
sendToAdmins
{ "repo_name": "itsazzad/zanata-server", "path": "zanata-war/src/main/java/org/zanata/service/EmailService.java", "license": "gpl-2.0", "size": 2963 }
[ "java.util.List", "javax.annotation.Nullable", "org.zanata.email.EmailStrategy" ]
import java.util.List; import javax.annotation.Nullable; import org.zanata.email.EmailStrategy;
import java.util.*; import javax.annotation.*; import org.zanata.email.*;
[ "java.util", "javax.annotation", "org.zanata.email" ]
java.util; javax.annotation; org.zanata.email;
1,975,771
public Object remove(int pos) { Object removed = list.remove(pos); if (removed instanceof Map) { return new JsonObject((Map) removed); } if (removed instanceof ArrayList) { return new JsonArray((List) removed); } return removed; }
Object function(int pos) { Object removed = list.remove(pos); if (removed instanceof Map) { return new JsonObject((Map) removed); } if (removed instanceof ArrayList) { return new JsonArray((List) removed); } return removed; }
/** * Removes the value at the specified position in the JSON array. */
Removes the value at the specified position in the JSON array
remove
{ "repo_name": "vilmospapp/jodd", "path": "jodd-json/src/main/java/jodd/json/JsonArray.java", "license": "bsd-2-clause", "size": 10376 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,095,759
@BeforeClass public static void deploy() throws Throwable { int i = 0; for (Embedded embedded : embeddedList) { embedded.deploy(createBootstrapContext(i)); embedded.deploy(createResourceAdapter()); embedded.deploy(createActivation()); i++; } }
static void function() throws Throwable { int i = 0; for (Embedded embedded : embeddedList) { embedded.deploy(createBootstrapContext(i)); embedded.deploy(createResourceAdapter()); embedded.deploy(createActivation()); i++; } }
/** * deploy an all instances and lookup wcf * @throws Throwable in case of error */
deploy an all instances and lookup wcf
deploy
{ "repo_name": "jandsu/ironjacamar", "path": "testsuite/src/test/java/org/ironjacamar/core/workmanager/dwm/DistributedWorkManagerSocketMITestCase.java", "license": "epl-1.0", "size": 3414 }
[ "org.ironjacamar.embedded.Embedded" ]
import org.ironjacamar.embedded.Embedded;
import org.ironjacamar.embedded.*;
[ "org.ironjacamar.embedded" ]
org.ironjacamar.embedded;
1,005,965