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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected void createFile(IProject project, String filename,
String content, boolean force) throws CoreException {
IFile file;
file = project.getFile(filename);
if(file.exists() && force) {
// file.delete(true,true,null);
// YT - deleting files produce inconsistency in SVN working copies
file.setCon... | void function(IProject project, String filename, String content, boolean force) throws CoreException { IFile file; file = project.getFile(filename); if(file.exists() && force) { file.setContents(new ByteArrayInputStream(content.getBytes()), true, true, null); } else if(file.exists() && !(force)) { } else { file.create(... | /**
* Creates a <em>text</em> file in an eclipse project. If this file
* already exists it is replaced.
*
* @param project
* The project that will contain the file.
* @param filename
* The name of the file to create.
* @param content
* Te text content of the file.
* @throws Cor... | Creates a text file in an eclipse project. If this file already exists it is replaced | createFile | {
"repo_name": "RobotML/RobotML-SDK-Juno",
"path": "plugins/robotml/com.cea.papyrus.gen.cpp.core/src/com/cea/papyrus/gen/cpp/core/transformation/ModelElementsCreator.java",
"license": "epl-1.0",
"size": 15010
} | [
"java.io.ByteArrayInputStream",
"org.eclipse.core.resources.IFile",
"org.eclipse.core.resources.IProject",
"org.eclipse.core.runtime.CoreException"
] | import java.io.ByteArrayInputStream; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; | import java.io.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; | [
"java.io",
"org.eclipse.core"
] | java.io; org.eclipse.core; | 2,218,549 |
@Override
public String toString()
{
return string;
}
/**
* Convert this {@code LocaleCode} instance to a {@link Locale} instance.
*
* <p>
* In most cases, this method creates a new {@code Locale} instance
* every time it is called, but some {@code LocaleCode} inst... | String function() { return string; } /** * Convert this {@code LocaleCode} instance to a {@link Locale} instance. * * <p> * In most cases, this method creates a new {@code Locale} instance * every time it is called, but some {@code LocaleCode} instances * return their corresponding entries in {@code Locale} class. * Fo... | /**
* Get the string representation of this locale code. Its format is
* either of the following:
*
* <ul>
* <li><i>language</i></li>
* <li><i>language</i><code>-</code><i>country</i>
* </ul>
*
* <p>
* where <i>language</i> is an <a
* href="http://en.wikipedia.org/... | Get the string representation of this locale code. Its format is either of the following: language language<code>-</code>country where language is an ISO 639-1 code and country is an ISO 3166-1 alpha-2 code. | toString | {
"repo_name": "derekmahar/nv-i18n",
"path": "src/main/java/com/neovisionaries/i18n/LocaleCode.java",
"license": "apache-2.0",
"size": 47765
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,215,983 |
private Collection<IProblem> validateDoctype()
{
String source = doc.get();
Collection<IProblem> problems = new ArrayList<IProblem>(2);
try
{
int doctypeIndex = source.indexOf("<!DOCTYPE"); //$NON-NLS-1$
if (doctypeIndex == -1)
{
doctypeIndex = source.indexOf("<!doctype"); //$NON-NLS-1$
}
... | Collection<IProblem> function() { String source = doc.get(); Collection<IProblem> problems = new ArrayList<IProblem>(2); try { int doctypeIndex = source.indexOf(STR); if (doctypeIndex == -1) { doctypeIndex = source.indexOf(STR); } if (doctypeIndex == -1) { return CollectionsUtil.newList(createProblem(ProblemType.Missin... | /**
* Validates the DOCTYPE declaration.
*
* @return
*/ | Validates the DOCTYPE declaration | validateDoctype | {
"repo_name": "HossainKhademian/Studio3",
"path": "plugins/com.aptana.editor.html/src/com/aptana/editor/html/validator/HTMLTidyValidator.java",
"license": "gpl-3.0",
"size": 28986
} | [
"com.aptana.core.build.IProblem",
"com.aptana.core.logging.IdeLog",
"com.aptana.core.util.CollectionsUtil",
"com.aptana.core.util.StringUtil",
"com.aptana.editor.html.HTMLPlugin",
"java.util.ArrayList",
"java.util.Collection",
"java.util.regex.Matcher",
"org.eclipse.jface.text.BadLocationException"
... | import com.aptana.core.build.IProblem; import com.aptana.core.logging.IdeLog; import com.aptana.core.util.CollectionsUtil; import com.aptana.core.util.StringUtil; import com.aptana.editor.html.HTMLPlugin; import java.util.ArrayList; import java.util.Collection; import java.util.regex.Matcher; import org.eclipse.jface.t... | import com.aptana.core.build.*; import com.aptana.core.logging.*; import com.aptana.core.util.*; import com.aptana.editor.html.*; import java.util.*; import java.util.regex.*; import org.eclipse.jface.text.*; | [
"com.aptana.core",
"com.aptana.editor",
"java.util",
"org.eclipse.jface"
] | com.aptana.core; com.aptana.editor; java.util; org.eclipse.jface; | 50,556 |
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
// Get Session attributes
WebSessionCtx wsc = WebSessionCtx.get(request);
if (wsc == null)
{
WebUtil.createTimeoutPage(request, response, this, null);
return;
}
int AD... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { WebSessionCtx wsc = WebSessionCtx.get(request); if (wsc == null) { WebUtil.createTimeoutPage(request, response, this, null); return; } int AD_Process_ID = WebUtil.getParameterAsInt(request, STR); int AD_Window... | /**
* Process the HTTP Post request.
* Get Parameters and Process
* @param request
* @param response
* @throws ServletException
* @throws IOException
*/ | Process the HTTP Post request. Get Parameters and Process | doPost | {
"repo_name": "armenrz/adempiere",
"path": "serverApps/src/main/servlet/org/compiere/www/WProcess.java",
"license": "gpl-2.0",
"size": 34566
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.compiere.util.WebSessionCtx",
"org.compiere.util.WebUtil"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.compiere.util.WebSessionCtx; import org.compiere.util.WebUtil; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.compiere.util.*; | [
"java.io",
"javax.servlet",
"org.compiere.util"
] | java.io; javax.servlet; org.compiere.util; | 1,408,632 |
public DateEncoder.Builder formatter(DateTimeFormatter formatter) {
this.customFormatter = formatter;
return this;
}
} | DateEncoder.Builder function(DateTimeFormatter formatter) { this.customFormatter = formatter; return this; } } | /**
* Sets the {@link DateTimeFormatte} on this builder.
* @param formatter
* @return
*/ | Sets the <code>DateTimeFormatte</code> on this builder | formatter | {
"repo_name": "hgulcan/badr_htm",
"path": "src/main/java/org/numenta/nupic/encoders/DateEncoder.java",
"license": "agpl-3.0",
"size": 27644
} | [
"org.joda.time.format.DateTimeFormatter"
] | import org.joda.time.format.DateTimeFormatter; | import org.joda.time.format.*; | [
"org.joda.time"
] | org.joda.time; | 2,908,532 |
File getGradleUserHomeDirectory(); | File getGradleUserHomeDirectory(); | /**
* Returns the user home directory for the current build.
*/ | Returns the user home directory for the current build | getGradleUserHomeDirectory | {
"repo_name": "gstevey/gradle",
"path": "subprojects/core/src/main/java/org/gradle/initialization/GradleUserHomeDirProvider.java",
"license": "apache-2.0",
"size": 839
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,765,975 |
private boolean isSameSelection(List<Object> oldSelection,
List<Object> newSelection)
{
if (oldSelection == null || newSelection == null) return false;
int s1 = oldSelection.size();
int s2 = newSelection.size();
if (s1 != s2 || (s1 == 0 && s2 > 0) || (s1 > 0 && s2 == 0)) {
retu... | boolean function(List<Object> oldSelection, List<Object> newSelection) { if (oldSelection == null newSelection == null) return false; int s1 = oldSelection.size(); int s2 = newSelection.size(); if (s1 != s2 (s1 == 0 && s2 > 0) (s1 > 0 && s2 == 0)) { return false; } List<Long> ids = new ArrayList<Long>(); Class<?> klass... | /**
* Checks if the specified lists contained the same elements.
* Returns <code>true</code> if it is the same selection,
* <code>false</code> otherwise.
*
* @param oldSelection The selection prior to change.
* @param newSelection The new selection
* @return See above.
*/ | Checks if the specified lists contained the same elements. Returns <code>true</code> if it is the same selection, <code>false</code> otherwise | isSameSelection | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java",
"license": "gpl-2.0",
"size": 162310
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 310,672 |
public Date getZipFileLastModifiedTime() {
return zipFileLastModifiedTime;
}
| Date function() { return zipFileLastModifiedTime; } | /**
* Last modified time of zip file if GTFS data comes directly from zip file
* instead of from a directory.
*
* @return
*/ | Last modified time of zip file if GTFS data comes directly from zip file instead of from a directory | getZipFileLastModifiedTime | {
"repo_name": "edsfocci/Transitime_core",
"path": "transitime/src/main/java/org/transitime/db/structs/ConfigRevision.java",
"license": "gpl-3.0",
"size": 3888
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,327,286 |
protected void keyTyped(char typedChar, int keyCode) throws IOException
{
if (!this.export.textboxKeyTyped(typedChar, keyCode))
{
super.keyTyped(typedChar, keyCode);
}
}
| void function(char typedChar, int keyCode) throws IOException { if (!this.export.textboxKeyTyped(typedChar, keyCode)) { super.keyTyped(typedChar, keyCode); } } | /**
* Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of
* KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
*/ | Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code) | keyTyped | {
"repo_name": "lucemans/ShapeClient-SRC",
"path": "net/minecraft/client/gui/GuiScreenCustomizePresets.java",
"license": "mpl-2.0",
"size": 16356
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,082,043 |
public static void paintShapeAtLocation(Location location, Shape s,
Color borderColor, Color fillColor, Graphics2D g, VisualCanvas panel) {
Point2D.Double point = PainterHelper.locationToTransformedPoint(
location, panel);
Rectangle2D bounds = s.getBounds2D();
poi... | static void function(Location location, Shape s, Color borderColor, Color fillColor, Graphics2D g, VisualCanvas panel) { Point2D.Double point = PainterHelper.locationToTransformedPoint( location, panel); Rectangle2D bounds = s.getBounds2D(); point.x = point.x - bounds.getWidth() / 2; point.y = point.y - bounds.getHeigh... | /**
* Paints a shape at a certain location. The shape will be positioned with
* its center at the location.
*
* This shape is intended to be a label, thus it does not follow the zooming
*
* @param location
* @param s
* @param drawBorder
* @param borderColor
* @param d... | Paints a shape at a certain location. The shape will be positioned with its center at the location. This shape is intended to be a label, thus it does not follow the zooming | paintShapeAtLocation | {
"repo_name": "NetMoc/Yaes",
"path": "src/main/java/yaes/ui/visualization/painters/PainterHelper.java",
"license": "apache-2.0",
"size": 13401
} | [
"java.awt.BasicStroke",
"java.awt.Color",
"java.awt.Graphics2D",
"java.awt.Shape",
"java.awt.geom.AffineTransform",
"java.awt.geom.Point2D",
"java.awt.geom.Rectangle2D"
] | import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,885,522 |
public static BookMeta getBookMeta(String json) {
try {
return getBookMeta(new JSONObject(json));
} catch (JSONException e) {
e.printStackTrace();
return null;
}
} | static BookMeta function(String json) { try { return getBookMeta(new JSONObject(json)); } catch (JSONException e) { e.printStackTrace(); return null; } } | /**
* Get BookMeta from a JSON string
*
* @param json The JSON string that a JSONObject will be constructed from
* @return The BookMeta constructed, or null if an error occurs
*/ | Get BookMeta from a JSON string | getBookMeta | {
"repo_name": "TekkitCommando/NexusInventory",
"path": "src/main/java/org/ExtendedAlpha/Nexus/TacoSerialization/BookSerialization.java",
"license": "gpl-3.0",
"size": 8385
} | [
"org.bukkit.inventory.meta.BookMeta",
"org.json.JSONException",
"org.json.JSONObject"
] | import org.bukkit.inventory.meta.BookMeta; import org.json.JSONException; import org.json.JSONObject; | import org.bukkit.inventory.meta.*; import org.json.*; | [
"org.bukkit.inventory",
"org.json"
] | org.bukkit.inventory; org.json; | 1,262,060 |
public void processGalaxy(final ResourceLocator rl,
final String data, ExecutorService exec,
final WipPort wip, Labels labels) {
wip.inc();
try {
XElement galaxy = rl.getXML(data);
XElement background = galaxy.childElement("background");
... | void function(final ResourceLocator rl, final String data, ExecutorService exec, final WipPort wip, Labels labels) { wip.inc(); try { XElement galaxy = rl.getXML(data); XElement background = galaxy.childElement(STR); map = rl.getImage(background.get("image")); | /**
* Process the contents of the galaxy data.
* @param rl the resource locator
* @param data the galaxy data file
* @param exec the executor for parallel processing
* @param wip the wip counter
* @param labels the labels
*/ | Process the contents of the galaxy data | processGalaxy | {
"repo_name": "akarnokd/open-ig",
"path": "src/hu/openig/model/GalaxyModel.java",
"license": "lgpl-3.0",
"size": 9557
} | [
"hu.openig.utils.WipPort",
"hu.openig.utils.XElement",
"java.util.concurrent.ExecutorService"
] | import hu.openig.utils.WipPort; import hu.openig.utils.XElement; import java.util.concurrent.ExecutorService; | import hu.openig.utils.*; import java.util.concurrent.*; | [
"hu.openig.utils",
"java.util"
] | hu.openig.utils; java.util; | 1,720,037 |
public CacheWriteSynchronizationMode getWriteSynchronizationMode() {
return writeSync;
} | CacheWriteSynchronizationMode function() { return writeSync; } | /**
* Gets write synchronization mode. This mode controls whether the main
* caller should wait for update on other nodes to complete or not.
*
* @return Write synchronization mode.
*/ | Gets write synchronization mode. This mode controls whether the main caller should wait for update on other nodes to complete or not | getWriteSynchronizationMode | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java",
"license": "apache-2.0",
"size": 86724
} | [
"org.apache.ignite.cache.CacheWriteSynchronizationMode"
] | import org.apache.ignite.cache.CacheWriteSynchronizationMode; | import org.apache.ignite.cache.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,321,941 |
private void initialise (TemplateStringBinding binding) {
if (binding != null) {
template = binding.getTemplate ();
argumentBindings.addAll(binding.getArgumentBindings());
}
createControls ();
}
| void function (TemplateStringBinding binding) { if (binding != null) { template = binding.getTemplate (); argumentBindings.addAll(binding.getArgumentBindings()); } createControls (); } | /**
* Method initialize
*
* @param binding
*/ | Method initialize | initialise | {
"repo_name": "levans/Open-Quark",
"path": "src/BAM_Sample/org/openquark/samples/bam/ui/TemplateStringDialog.java",
"license": "bsd-3-clause",
"size": 16082
} | [
"org.openquark.samples.bam.model.TemplateStringBinding"
] | import org.openquark.samples.bam.model.TemplateStringBinding; | import org.openquark.samples.bam.model.*; | [
"org.openquark.samples"
] | org.openquark.samples; | 2,340,947 |
public void setCustomerAddressEndDate(Date customerAddressEndDate) {
this.customerAddressEndDate = customerAddressEndDate;
} | void function(Date customerAddressEndDate) { this.customerAddressEndDate = customerAddressEndDate; } | /**
* Sets the customerAddressEndDate attribute.
*
* @param customerAddressEndDate The customerAddressEndDate to set.
*/ | Sets the customerAddressEndDate attribute | setCustomerAddressEndDate | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/businessobject/CustomerAddress.java",
"license": "agpl-3.0",
"size": 20755
} | [
"java.sql.Date"
] | import java.sql.Date; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,652,125 |
TextArea getNameField(); | TextArea getNameField(); | /**
* Gets the name field.
*
* @return the name field
*/ | Gets the name field | getNameField | {
"repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release",
"path": "mat/src/main/java/mat/client/CqlLibraryPresenter.java",
"license": "cc0-1.0",
"size": 49257
} | [
"org.gwtbootstrap3.client.ui.TextArea"
] | import org.gwtbootstrap3.client.ui.TextArea; | import org.gwtbootstrap3.client.ui.*; | [
"org.gwtbootstrap3.client"
] | org.gwtbootstrap3.client; | 1,650,667 |
@Override
public Area getArea() {
return area;
} | Area function() { return area; } | /**
* Get the Area controlled by this intersection manager.
*
* @return the Area controlled by this intersection manager
*/ | Get the Area controlled by this intersection manager | getArea | {
"repo_name": "bowzheng/AIM4_delay",
"path": "src/main/java/aim4/im/RoadBasedIntersection.java",
"license": "gpl-3.0",
"size": 21165
} | [
"java.awt.geom.Area"
] | import java.awt.geom.Area; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 808,952 |
public void setOnOptionClickListener(OnOptionClickListener listener) {
mOnOptionClickListener = listener;
}
public RadioOptions(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.getTheme().obtainStyledAttributes(
attrs,
... | void function(OnOptionClickListener listener) { mOnOptionClickListener = listener; } public RadioOptions(Context context, AttributeSet attrs) { super(context, attrs); TypedArray a = context.getTheme().obtainStyledAttributes( attrs, R.styleable.RadioOptions, 0, 0); int drawableId = a.getResourceId(R.styleable.RadioOptio... | /**
* Set the OnOptionClickListener.
* @params listener The listener to set.
*/ | Set the OnOptionClickListener | setOnOptionClickListener | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/Camera2/src/com/android/camera/ui/RadioOptions.java",
"license": "gpl-3.0",
"size": 4369
} | [
"android.content.Context",
"android.content.res.TypedArray",
"android.util.AttributeSet"
] | import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; | import android.content.*; import android.content.res.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 194,217 |
public void endElement (String uri, String localName, String qName)
throws SAXException
{
// no op
} | void function (String uri, String localName, String qName) throws SAXException { } | /**
* Receive notification of the end of an element.
*
* <p>By default, do nothing. Application writers may override this
* method in a subclass to take specific actions at the end of
* each element (such as finalising a tree node or writing
* output to a file).</p>
*
* @param u... | Receive notification of the end of an element. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file) | endElement | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/org/xml/sax/helpers/DefaultHandler.java",
"license": "apache-2.0",
"size": 16654
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,406,107 |
public static void showLong(Context context, String string) {
if (isShow) {
showToast(context, string, Toast.LENGTH_LONG);
}
} | static void function(Context context, String string) { if (isShow) { showToast(context, string, Toast.LENGTH_LONG); } } | /**
* Long Toast
*
* @param context
* @param string
*/ | Long Toast | showLong | {
"repo_name": "solaris0403/SeleneDemo",
"path": "common_lib/src/main/java/com/tony/selene/common/trinea/android/common/util/ToastUtils.java",
"license": "gpl-2.0",
"size": 6482
} | [
"android.content.Context",
"android.widget.Toast"
] | import android.content.Context; import android.widget.Toast; | import android.content.*; import android.widget.*; | [
"android.content",
"android.widget"
] | android.content; android.widget; | 2,862,542 |
public ServiceCall putEmptyAsync(String stringBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
}
if (stringBody == null) {
... | ServiceCall function(String stringBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } if (stringBody == null) { serviceCallback.failure(new IllegalArgumentException(STR)); return null; } | /**
* Set string value empty ''.
*
* @param stringBody Possible values include: ''
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/ | Set string value empty '' | putEmptyAsync | {
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodystring/implementation/StringsImpl.java",
"license": "mit",
"size": 36590
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,013,418 |
private static long fromXml( InputStream in ) throws IllegalArgumentException {
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = builder.parse( in );
Node node = doc.getFirstChild();
if ( XML_TAG.equals( node.getNodeName() ) == false )
throw new Ille... | static long function( InputStream in ) throws IllegalArgumentException { try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse( in ); Node node = doc.getFirstChild(); if ( XML_TAG.equals( node.getNodeName() ) == false ) throw new IllegalArgumentException... | /**
* load ID counter from XML
* @param in XML representation of ID counter
* @return long next unique ID
* @throws IllegalArgumentException
*/ | load ID counter from XML | fromXml | {
"repo_name": "rossfoley/mqp_neat",
"path": "src/org/jgap/IdFactory.java",
"license": "gpl-2.0",
"size": 3672
} | [
"java.io.InputStream",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"org.w3c.dom.Document",
"org.w3c.dom.Node"
] | import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; | import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; | [
"java.io",
"javax.xml",
"org.w3c.dom"
] | java.io; javax.xml; org.w3c.dom; | 648,794 |
@Bean
InjectionService createInjectionService(){return new InjectionService();} | InjectionService createInjectionService(){return new InjectionService();} | /**
*
* register InitialDisposeService bean with the Spring container
* InitialDisposeService implements two bean lifecycle interfaces.
* See InitialDisposeService's comment for more details.
*
* */ | register InitialDisposeService bean with the Spring container InitialDisposeService implements two bean lifecycle interfaces. See InitialDisposeService's comment for more details | createInitlialDisposeService | {
"repo_name": "entrepidea/projects",
"path": "java/framework.spring.core/src/test/java/com/entrepidea/ioc/supports/annotation/SpringConfig.java",
"license": "gpl-3.0",
"size": 2231
} | [
"com.entrepidea.ioc.InjectionService"
] | import com.entrepidea.ioc.InjectionService; | import com.entrepidea.ioc.*; | [
"com.entrepidea.ioc"
] | com.entrepidea.ioc; | 1,908,311 |
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc,
Map<String, Object> defaultsMap) {
super.createPropertyDescriptors(desc, defaultsMap);
columnPositionD = new JSSEnumPropertyDescriptor(
JRDesignCrosstabRowGroup.PROPERTY_POSITION,
Messages.MRowGroup_row_position, Crossta... | void function(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) { super.createPropertyDescriptors(desc, defaultsMap); columnPositionD = new JSSEnumPropertyDescriptor( JRDesignCrosstabRowGroup.PROPERTY_POSITION, Messages.MRowGroup_row_position, CrosstabRowPositionEnum.class, NullEnum.NOTNULL); columnPosit... | /**
* Creates the property descriptors.
*
* @param desc
* the desc
*/ | Creates the property descriptors | createPropertyDescriptors | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio.components/src/com/jaspersoft/studio/components/crosstab/model/rowgroup/MRowGroup.java",
"license": "lgpl-3.0",
"size": 8014
} | [
"com.jaspersoft.studio.components.crosstab.messages.Messages",
"com.jaspersoft.studio.property.descriptor.NullEnum",
"com.jaspersoft.studio.property.descriptors.JSSEnumPropertyDescriptor",
"com.jaspersoft.studio.property.descriptors.PixelPropertyDescriptor",
"java.util.List",
"java.util.Map",
"net.sf.ja... | import com.jaspersoft.studio.components.crosstab.messages.Messages; import com.jaspersoft.studio.property.descriptor.NullEnum; import com.jaspersoft.studio.property.descriptors.JSSEnumPropertyDescriptor; import com.jaspersoft.studio.property.descriptors.PixelPropertyDescriptor; import java.util.List; import java.util.M... | import com.jaspersoft.studio.components.crosstab.messages.*; import com.jaspersoft.studio.property.descriptor.*; import com.jaspersoft.studio.property.descriptors.*; import java.util.*; import net.sf.jasperreports.crosstabs.design.*; import net.sf.jasperreports.crosstabs.type.*; import org.eclipse.ui.views.properties.*... | [
"com.jaspersoft.studio",
"java.util",
"net.sf.jasperreports",
"org.eclipse.ui"
] | com.jaspersoft.studio; java.util; net.sf.jasperreports; org.eclipse.ui; | 638,378 |
private void continueLoop(boolean ignoreCntr) {
if (isDone() || (!ignoreCntr && (SKIP_UPD.getAndIncrement(this) != 0)))
return;
GridDhtCacheAdapter cache = cctx.dhtCache();
EnlistOperation op = it.operation();
AffinityTopologyVersion topVer = tx.topologyVersionSnapshot()... | void function(boolean ignoreCntr) { if (isDone() (!ignoreCntr && (SKIP_UPD.getAndIncrement(this) != 0))) return; GridDhtCacheAdapter cache = cctx.dhtCache(); EnlistOperation op = it.operation(); AffinityTopologyVersion topVer = tx.topologyVersionSnapshot(); try { while (true) { int curPart = -1; List<ClusterNode> backu... | /**
* Iterates over iterator, applies changes locally and sends it on backups.
*
* @param ignoreCntr {@code True} if need to ignore skip counter.
*/ | Iterates over iterator, applies changes locally and sends it on backups | continueLoop | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxAbstractEnlistFuture.java",
"license": "apache-2.0",
"size": 38486
} | [
"java.util.List",
"javax.cache.processor.EntryProcessor",
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion",
"org.apache.ignite.internal.processors.cache.CacheObject",
"org.apache.ignite.in... | import java.util.List; import javax.cache.processor.EntryProcessor; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheObject; import ... | import java.util.*; import javax.cache.processor.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite... | [
"java.util",
"javax.cache",
"org.apache.ignite"
] | java.util; javax.cache; org.apache.ignite; | 1,325,972 |
@Test
public void testBrokerPublishMessageThrottlingInit() throws Exception {
log.info("-- Starting {} test --", methodName);
final String namespace = "my-property/throttling_publish_init";
final String topicName = "persistent://" + namespace + "/brokerThrottlingMessageBlock";
... | void function() throws Exception { log.info(STR, methodName); final String namespace = STR; final String topicName = STRtestSTRGet broker configuration: brokerTick {}, MaxMessageRate {}, MaxByteRate {}STR1-st rate in: {}, total: {} STRbrokerPublisherThrottlingMaxMessageRateSTR2-nd rate in: {}, total: {} ", rateIn, tota... | /**
* Verifies Broker publish rate limiting enabled by broker conf.
* Broker publish throttle enabled / topic publish throttle disabled
* @throws Exception
*/ | Verifies Broker publish rate limiting enabled by broker conf. Broker publish throttle enabled / topic publish throttle disabled | testBrokerPublishMessageThrottlingInit | {
"repo_name": "merlimat/pulsar",
"path": "pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TopicPublishThrottlingInitTest.java",
"license": "apache-2.0",
"size": 5055
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 657,215 |
@Override
public void register(Monitor<?> monitor) {
Preconditions.checkNotNull(monitor, "monitor cannot be null");
try {
monitors.add(monitor);
} catch (Exception e) {
throw new IllegalArgumentException("invalid object", e);
}
} | void function(Monitor<?> monitor) { Preconditions.checkNotNull(monitor, STR); try { monitors.add(monitor); } catch (Exception e) { throw new IllegalArgumentException(STR, e); } } | /**
* Register a new monitor in the registry.
*/ | Register a new monitor in the registry | register | {
"repo_name": "samhendley/servo",
"path": "servo-core/src/main/java/com/netflix/servo/BasicMonitorRegistry.java",
"license": "apache-2.0",
"size": 2269
} | [
"com.google.common.base.Preconditions",
"com.netflix.servo.monitor.Monitor"
] | import com.google.common.base.Preconditions; import com.netflix.servo.monitor.Monitor; | import com.google.common.base.*; import com.netflix.servo.monitor.*; | [
"com.google.common",
"com.netflix.servo"
] | com.google.common; com.netflix.servo; | 2,234,621 |
private void processSegmentTransmitStarted(java.sql.Connection con, LtpLink link, Segment segment)
throws InterruptedException {
if (GeneralManagement.isDebugLogging()) {
_logger.fine("processSegmentTransmitStarted(SegmentType=" +
segment.getSegmentType() + ")");
if (_logger.isLoggable(Level.FINEST)) ... | void function(java.sql.Connection con, LtpLink link, Segment segment) throws InterruptedException { if (GeneralManagement.isDebugLogging()) { _logger.fine(STR + segment.getSegmentType() + ")"); if (_logger.isLoggable(Level.FINEST)) { _logger.finest(segment.dump(" ", true)); } } if (segment instanceof DataSegment) { Dat... | /**
* Called when a Segment is 'on the wire'. We advance the Ltp Sender State
* Machine where appropriate and necessary
* @param link Link on which Segment was transmitted
* @param segment Segment transmitted
* @throws InterruptedException if interrupted while waiting for queue space
*/ | Called when a Segment is 'on the wire'. We advance the Ltp Sender State Machine where appropriate and necessary | processSegmentTransmitStarted | {
"repo_name": "KritikalFabric/corefabric.io",
"path": "src/contrib/java/com/cisco/qte/jdtn/ltp/LtpOutbound.java",
"license": "apache-2.0",
"size": 60156
} | [
"com.cisco.qte.jdtn.general.GeneralManagement",
"com.cisco.qte.jdtn.ltp.Segment",
"java.util.logging.Level"
] | import com.cisco.qte.jdtn.general.GeneralManagement; import com.cisco.qte.jdtn.ltp.Segment; import java.util.logging.Level; | import com.cisco.qte.jdtn.general.*; import com.cisco.qte.jdtn.ltp.*; import java.util.logging.*; | [
"com.cisco.qte",
"java.util"
] | com.cisco.qte; java.util; | 1,179,371 |
private static synchronized void releaseBuilder(DocumentBuilder builder)
{
builder.reset();
builderPool.addLast(new SoftReference<DocumentBuilder>(builder));
}
private XmlUtils() {} | static synchronized void function(DocumentBuilder builder) { builder.reset(); builderPool.addLast(new SoftReference<DocumentBuilder>(builder)); } private XmlUtils() {} | /**
* Release the given document builder
* @param builder document builder
*/ | Release the given document builder | releaseBuilder | {
"repo_name": "apache/velocity-tools",
"path": "velocity-tools-generic/src/main/java/org/apache/velocity/tools/XmlUtils.java",
"license": "apache-2.0",
"size": 19697
} | [
"java.lang.ref.SoftReference",
"javax.xml.parsers.DocumentBuilder"
] | import java.lang.ref.SoftReference; import javax.xml.parsers.DocumentBuilder; | import java.lang.ref.*; import javax.xml.parsers.*; | [
"java.lang",
"javax.xml"
] | java.lang; javax.xml; | 1,191,901 |
protected void uploadFile(String bundleUrl, Parser parser, File fileToUpload) {
String user = fabricService.get().getZooKeeperUser();
String password = fabricService.get().getZookeeperPassword();
URI uploadUri = fabricService.get().getMavenRepoUploadURI();
URI artifactUri = uploadUri... | void function(String bundleUrl, Parser parser, File fileToUpload) { String user = fabricService.get().getZooKeeperUser(); String password = fabricService.get().getZookeeperPassword(); URI uploadUri = fabricService.get().getMavenRepoUploadURI(); URI artifactUri = uploadUri.resolve(parser.getArtifactPath()); URL url; try... | /**
* Uploads the given file to the fabric maven proxy
*/ | Uploads the given file to the fabric maven proxy | uploadFile | {
"repo_name": "hekonsek/fabric8",
"path": "sandbox/fabric/fabric-agent-commands/src/main/java/io/fabric8/agent/commands/support/ProfileWatcherImpl.java",
"license": "apache-2.0",
"size": 22699
} | [
"io.fabric8.agent.mvn.Parser",
"io.fabric8.utils.Base64Encoder",
"java.io.File",
"java.io.FileInputStream",
"java.net.HttpURLConnection",
"java.net.MalformedURLException",
"java.net.URLConnection",
"java.nio.channels.Channels",
"java.nio.channels.FileChannel",
"java.nio.channels.WritableByteChanne... | import io.fabric8.agent.mvn.Parser; import io.fabric8.utils.Base64Encoder; import java.io.File; import java.io.FileInputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URLConnection; import java.nio.channels.Channels; import java.nio.channels.FileChannel; import java.ni... | import io.fabric8.agent.mvn.*; import io.fabric8.utils.*; import java.io.*; import java.net.*; import java.nio.channels.*; | [
"io.fabric8.agent",
"io.fabric8.utils",
"java.io",
"java.net",
"java.nio"
] | io.fabric8.agent; io.fabric8.utils; java.io; java.net; java.nio; | 283,195 |
private void createCameraPreviewSession() {
try {
SurfaceTexture texture = mTexture.getSurfaceTexture();
assert texture != null;
// We configure the size of default buffer to be the size of camera preview we want.
texture.setDefaultBufferSize(mCameraInfo.getPreviewSize().getWidth(), mCame... | void function() { try { SurfaceTexture texture = mTexture.getSurfaceTexture(); assert texture != null; texture.setDefaultBufferSize(mCameraInfo.getPreviewSize().getWidth(), mCameraInfo.getPreviewSize().getHeight()); surface = new Surface(texture); mPreviewRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice... | /**
* Creates a new {@link CameraCaptureSession} for camera preview.
*/ | Creates a new <code>CameraCaptureSession</code> for camera preview | createCameraPreviewSession | {
"repo_name": "bnsantos/android-camera",
"path": "camera/src/main/java/com/bnsantos/camera/view/camera/Camera2Fragment.java",
"license": "apache-2.0",
"size": 41560
} | [
"android.graphics.SurfaceTexture",
"android.hardware.camera2.CameraCaptureSession",
"android.hardware.camera2.CameraDevice",
"android.view.Surface",
"java.util.Arrays"
] | import android.graphics.SurfaceTexture; import android.hardware.camera2.CameraCaptureSession; import android.hardware.camera2.CameraDevice; import android.view.Surface; import java.util.Arrays; | import android.graphics.*; import android.hardware.camera2.*; import android.view.*; import java.util.*; | [
"android.graphics",
"android.hardware",
"android.view",
"java.util"
] | android.graphics; android.hardware; android.view; java.util; | 157,981 |
public void parsePapyrusXMI(Document doc) {
NodeList edgeList = doc.getElementsByTagName("edge");
NodeList nodeList = doc.getElementsByTagName("node");
// We set the correctXMI flag to true,
// to indicate that we are setting up this ActivityParser using correct
// XMI as input e.g. XMI from a papyrus mode... | void function(Document doc) { NodeList edgeList = doc.getElementsByTagName("edge"); NodeList nodeList = doc.getElementsByTagName("node"); correctXMI = true; buildNodesAndEdges(nodeList, edgeList); for (XMIActivityNode n : nodes) { ArrayList<String> incomingEdgeIds = n.getIncoming(); ArrayList<String> outgoingEdgeIds = ... | /**
* Parses the given xmi document to fill the edges and nodes lists of this
* ActivityParser object.
*
* @param doc
* The xmi document to be parsed.
*/ | Parses the given xmi document to fill the edges and nodes lists of this ActivityParser object | parsePapyrusXMI | {
"repo_name": "s-case/uml-extraction",
"path": "eu.scasefp7.eclipse.umlrec/src/eu/scasefp7/eclipse/umlrec/parser/ActivityParser.java",
"license": "apache-2.0",
"size": 21711
} | [
"java.util.ArrayList",
"org.w3c.dom.Document",
"org.w3c.dom.NodeList"
] | import java.util.ArrayList; import org.w3c.dom.Document; import org.w3c.dom.NodeList; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 1,044,879 |
public static void enableRUM(Activity activity) {
enableRUM(activity, true);
} | static void function(Activity activity) { enableRUM(activity, true); } | /**
* Enables the Raygun RUM feature which will automatically report session and view events. Network logging will be enabled for RUM by default.
*
* @param activity The main/entry activity of the Android app.
*/ | Enables the Raygun RUM feature which will automatically report session and view events. Network logging will be enabled for RUM by default | enableRUM | {
"repo_name": "MindscapeHQ/raygun4android",
"path": "provider/src/main/java/com/raygun/raygun4android/RaygunClient.java",
"license": "mit",
"size": 17159
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 2,007,535 |
public GuestUserLocalService getGuestUserLocalService() {
return guestUserLocalService;
} | GuestUserLocalService function() { return guestUserLocalService; } | /**
* Returns the GuestUser local service.
*
* @return the GuestUser local service
*/ | Returns the GuestUser local service | getGuestUserLocalService | {
"repo_name": "p-gebhard/QuickAnswer",
"path": "docroot/WEB-INF/src/it/gebhard/qa/service/base/NotificationLocalServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 24421
} | [
"it.gebhard.qa.service.GuestUserLocalService"
] | import it.gebhard.qa.service.GuestUserLocalService; | import it.gebhard.qa.service.*; | [
"it.gebhard.qa"
] | it.gebhard.qa; | 1,711,005 |
public FormValidation doCheckName(@QueryParameter String value)
throws IOException, ServletException {
if (value.length() == 0)
return FormValidation.error("Please set a name");
if (value.length() < 4)
return FormValidation.warning("Isn't t... | FormValidation function(@QueryParameter String value) throws IOException, ServletException { if (value.length() == 0) return FormValidation.error(STR); if (value.length() < 4) return FormValidation.warning(STR); return FormValidation.ok(); } | /**
* Performs on-the-fly validation of the form field 'name'.
*
* @param value
* This parameter receives the value that the user has typed.
* @return
* Indicates the outcome of the validation. This is sent to the browser.
* @throws java.io.IOExcept... | Performs on-the-fly validation of the form field 'name' | doCheckName | {
"repo_name": "rs-services/jenkins_selfservice",
"path": "selfservice/src/main/java/com/rightscale/selfservice/Main.java",
"license": "apache-2.0",
"size": 8720
} | [
"hudson.util.FormValidation",
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.QueryParameter"
] | import hudson.util.FormValidation; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.QueryParameter; | import hudson.util.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"hudson.util",
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | hudson.util; java.io; javax.servlet; org.kohsuke.stapler; | 2,035,775 |
public void addFailToSendNoConnectRule(TransportService transportService) {
for (TransportAddress transportAddress : extractTransportAddresses(transportService)) {
addFailToSendNoConnectRule(transportAddress);
}
} | void function(TransportService transportService) { for (TransportAddress transportAddress : extractTransportAddresses(transportService)) { addFailToSendNoConnectRule(transportAddress); } } | /**
* Adds a rule that will cause every send request to fail, and each new connect since the rule
* is added to fail as well.
*/ | Adds a rule that will cause every send request to fail, and each new connect since the rule is added to fail as well | addFailToSendNoConnectRule | {
"repo_name": "mapr/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java",
"license": "apache-2.0",
"size": 25824
} | [
"org.elasticsearch.common.transport.TransportAddress",
"org.elasticsearch.transport.TransportService"
] | import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.transport.TransportService; | import org.elasticsearch.common.transport.*; import org.elasticsearch.transport.*; | [
"org.elasticsearch.common",
"org.elasticsearch.transport"
] | org.elasticsearch.common; org.elasticsearch.transport; | 289,742 |
public Set<IndexFieldTypesDTO> poll(final IndexSet indexSet, final Set<IndexFieldTypesDTO> existingIndexTypes) {
final String activeWriteIndex = indexSet.getActiveWriteIndex();
final Set<String> existingIndexNames = existingIndexTypes.stream()
.map(IndexFieldTypesDTO::indexName)
... | Set<IndexFieldTypesDTO> function(final IndexSet indexSet, final Set<IndexFieldTypesDTO> existingIndexTypes) { final String activeWriteIndex = indexSet.getActiveWriteIndex(); final Set<String> existingIndexNames = existingIndexTypes.stream() .map(IndexFieldTypesDTO::indexName) .collect(Collectors.toSet()); return indice... | /**
* Returns the index field types for the given index set.
* <p>
* Indices present in <code>existingIndexTypes</code> (except for the current write index) will not be polled
* again to avoid Elasticsearch requests.
*
* @param indexSet index set to poll
* @param existingIndexTypes ex... | Returns the index field types for the given index set. Indices present in <code>existingIndexTypes</code> (except for the current write index) will not be polled again to avoid Elasticsearch requests | poll | {
"repo_name": "Graylog2/graylog2-server",
"path": "graylog2-server/src/main/java/org/graylog2/indexer/fieldtypes/IndexFieldTypePoller.java",
"license": "gpl-3.0",
"size": 3661
} | [
"java.util.Optional",
"java.util.Set",
"java.util.stream.Collectors",
"org.graylog2.indexer.IndexSet"
] | import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; import org.graylog2.indexer.IndexSet; | import java.util.*; import java.util.stream.*; import org.graylog2.indexer.*; | [
"java.util",
"org.graylog2.indexer"
] | java.util; org.graylog2.indexer; | 649,479 |
protected void setItemAssetUnitCost(PurchasingAccountsPayableItemAsset item, KualiDecimal totalCost) {
// set unit cost
KualiDecimal quantity = item.getAccountsPayableItemQuantity();
if (quantity != null && quantity.isNonZero()) {
item.setUnitCost(totalCost.divide(quantity));... | void function(PurchasingAccountsPayableItemAsset item, KualiDecimal totalCost) { KualiDecimal quantity = item.getAccountsPayableItemQuantity(); if (quantity != null && quantity.isNonZero()) { item.setUnitCost(totalCost.divide(quantity)); } } | /**
* Set item asset unit cost.
*
* @param item line item
* @param totalCost total cost for this line item.
*/ | Set item asset unit cost | setItemAssetUnitCost | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/cab/document/service/impl/PurApLineServiceImpl.java",
"license": "agpl-3.0",
"size": 69120
} | [
"org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset",
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset; import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.kfs.module.cab.businessobject.*; import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 46,487 |
public SearchRequestBuilder addScriptField(String name, Script script) {
sourceBuilder().scriptField(name, script);
return this;
} | SearchRequestBuilder function(String name, Script script) { sourceBuilder().scriptField(name, script); return this; } | /**
* Adds a script based field to load and return. The field does not have to be stored,
* but its recommended to use non analyzed or numeric fields.
*
* @param name The name that will represent this value in the return hit
* @param script The script to use
*/ | Adds a script based field to load and return. The field does not have to be stored, but its recommended to use non analyzed or numeric fields | addScriptField | {
"repo_name": "baishuo/elasticsearch_v2.1.0-baishuo",
"path": "core/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java",
"license": "apache-2.0",
"size": 34250
} | [
"org.elasticsearch.script.Script"
] | import org.elasticsearch.script.Script; | import org.elasticsearch.script.*; | [
"org.elasticsearch.script"
] | org.elasticsearch.script; | 2,374,950 |
NewsActivityFragment fragment = new NewsActivityFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
} | NewsActivityFragment fragment = new NewsActivityFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } | /**
* Returns a new instance of this fragment for the given section
* number.
*/ | Returns a new instance of this fragment for the given section number | newInstance | {
"repo_name": "emik7794/Android-FinalAssignment",
"path": "app/src/main/java/ar/edu/unc/famaf/redditreader/ui/NewsActivityFragment.java",
"license": "apache-2.0",
"size": 4624
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,461,344 |
public String toString(int indentFactor) throws JSONException {
StringWriter w = new StringWriter();
synchronized (w.getBuffer()) {
return this.write(w, indentFactor, 0).toString();
}
} | String function(int indentFactor) throws JSONException { StringWriter w = new StringWriter(); synchronized (w.getBuffer()) { return this.write(w, indentFactor, 0).toString(); } } | /**
* Make a prettyprinted JSON text of this JSONObject.
* <p/>
* Warning: This method assumes that the data structure is acyclical.
*
* @param indentFactor The number of spaces to add to each level of indentation.
* @return a printable, displayable, portable, transmittable representation
... | Make a prettyprinted JSON text of this JSONObject. Warning: This method assumes that the data structure is acyclical | toString | {
"repo_name": "miken22/COSC310_TravelBot",
"path": "ChatBot/src/org/json/JSONObject.java",
"license": "gpl-2.0",
"size": 54455
} | [
"java.io.StringWriter"
] | import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,091,210 |
PagedIterable<PrivateEndpointConnection> listByServer(String resourceGroupName, String serverName, Context context); | PagedIterable<PrivateEndpointConnection> listByServer(String resourceGroupName, String serverName, Context context); | /**
* Gets all private endpoint connections on a server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException ... | Gets all private endpoint connections on a server | listByServer | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/models/PrivateEndpointConnections.java",
"license": "mit",
"size": 7546
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 169,906 |
EAttribute getING_MinVal(); | EAttribute getING_MinVal(); | /**
* Returns the meta object for the attribute '{@link gluemodel.substationStandard.Dataclasses.ING#getMinVal <em>Min Val</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Min Val</em>'.
* @see gluemodel.substationStandard.Dataclasses.ING#getMinVal()
... | Returns the meta object for the attribute '<code>gluemodel.substationStandard.Dataclasses.ING#getMinVal Min Val</code>'. | getING_MinVal | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/Dataclasses/DataclassesPackage.java",
"license": "mit",
"size": 381891
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,297,859 |
public void disconnect() {
// Say goodbye to Napster server
sendCommond("QUIT");
worker.shutdownGracefully();
LOGGER.info("Disconnected from server.");
}
class clientHandler extends ChannelInitializer<SocketChannel> { | void function() { sendCommond("QUIT"); worker.shutdownGracefully(); LOGGER.info(STR); } class clientHandler extends ChannelInitializer<SocketChannel> { | /**
* Close socket for client.
*/ | Close socket for client | disconnect | {
"repo_name": "selfzhang/gitworkplace",
"path": "client/src/main/java/netty/napsters/client/NettyClient.java",
"license": "apache-2.0",
"size": 4054
} | [
"io.netty.channel.ChannelInitializer",
"io.netty.channel.socket.SocketChannel"
] | import io.netty.channel.ChannelInitializer; import io.netty.channel.socket.SocketChannel; | import io.netty.channel.*; import io.netty.channel.socket.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,035,551 |
@Nonnull
default IMicroCDATA appendCDATA (@Nonnull final char [] aChars, @Nonnegative final int nOfs, @Nonnegative final int nLen)
{
return appendChild (new MicroCDATA (aChars, nOfs, nLen));
} | default IMicroCDATA appendCDATA (@Nonnull final char [] aChars, @Nonnegative final int nOfs, @Nonnegative final int nLen) { return appendChild (new MicroCDATA (aChars, nOfs, nLen)); } | /**
* Append a CDATA node to this node.
*
* @param aChars
* Characters to append. May not be <code>null</code>
* @param nOfs
* Offset into the array where to start copying data. May not be <
* 0.
* @param nLen
* Number of bytes to take from the array. May not be... | Append a CDATA node to this node | appendCDATA | {
"repo_name": "phax/ph-commons",
"path": "ph-xml/src/main/java/com/helger/xml/microdom/IMicroNode.java",
"license": "apache-2.0",
"size": 23809
} | [
"javax.annotation.Nonnegative",
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnegative; import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,299,909 |
public List<ScalingTrigger> describeTriggers(String autoScalingGroupName) throws AutoScalingException {
Map<String, String> params = new HashMap<String, String>();
params.put("AutoScalingGroupName", autoScalingGroupName);
GetMethod method = new GetMethod();
try {
DescribeTriggersResponse response =
m... | List<ScalingTrigger> function(String autoScalingGroupName) throws AutoScalingException { Map<String, String> params = new HashMap<String, String>(); params.put(STR, autoScalingGroupName); GetMethod method = new GetMethod(); try { DescribeTriggersResponse response = makeRequestInt(method, STR, params, DescribeTriggersRe... | /**
* Describes the scaling triggers for a given group.
*
* @param autoScalingGroupName a autoScaling group name
* @return activity descriptions
* @throws AutoScalingException wraps checked exceptions
*/ | Describes the scaling triggers for a given group | describeTriggers | {
"repo_name": "jonnyzzz/maragogype",
"path": "tags/v1.6/java/com/xerox/amazonws/ec2/AutoScaling.java",
"license": "apache-2.0",
"size": 24888
} | [
"com.xerox.amazonws.monitoring.StandardUnit",
"com.xerox.amazonws.monitoring.Statistics",
"com.xerox.amazonws.typica.autoscale.jaxb.DescribeTriggersResponse",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.commons.httpclient.methods.GetMethod"
] | import com.xerox.amazonws.monitoring.StandardUnit; import com.xerox.amazonws.monitoring.Statistics; import com.xerox.amazonws.typica.autoscale.jaxb.DescribeTriggersResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.httpclient.methods.Ge... | import com.xerox.amazonws.monitoring.*; import com.xerox.amazonws.typica.autoscale.jaxb.*; import java.util.*; import org.apache.commons.httpclient.methods.*; | [
"com.xerox.amazonws",
"java.util",
"org.apache.commons"
] | com.xerox.amazonws; java.util; org.apache.commons; | 2,720,832 |
public void init() throws MessagingException {
isDebug = Boolean.valueOf(getInitParameter("debug", "false"));
isStatic = Boolean.valueOf(getInitParameter("static", "false"));
if (isDebug) {
log("Initializing");
}
// check that all init parameters have been decl... | void function() throws MessagingException { isDebug = Boolean.valueOf(getInitParameter("debug", "false")); isStatic = Boolean.valueOf(getInitParameter(STR, "false")); if (isDebug) { log(STR); } checkInitParameters(getAllowedInitParameters()); if (isStatic()) { passThrough = getPassThrough(); fakeDomainCheck = getFakeDo... | /**
* Mailet initialization routine. Will setup static values for each "x"
* initialization parameter in config.xml, using getX(), if
* {@link #isStatic()} returns true.
*/ | Mailet initialization routine. Will setup static values for each "x" initialization parameter in config.xml, using getX(), if <code>#isStatic()</code> returns true | init | {
"repo_name": "imatin/James",
"path": "mailets/src/main/java/org/apache/james/transport/mailets/AbstractRedirect.java",
"license": "apache-2.0",
"size": 67386
} | [
"javax.mail.MessagingException"
] | import javax.mail.MessagingException; | import javax.mail.*; | [
"javax.mail"
] | javax.mail; | 1,728,255 |
if (pattern.size() != getNeuronCount()) {
throw new NeuralNetworkError("Network with " + getNeuronCount()
+ " neurons, cannot learn a pattern of size "
+ pattern.size());
}
// Create a row matrix from the input, convert boolean to bipolar
final Matrix m2 = Matrix.createRowMatrix(pattern.getData())... | if (pattern.size() != getNeuronCount()) { throw new NeuralNetworkError(STR + getNeuronCount() + STR + pattern.size()); } final Matrix m2 = Matrix.createRowMatrix(pattern.getData()); final Matrix m1 = MatrixMath.transpose(m2); final Matrix m3 = MatrixMath.multiply(m1, m2); final Matrix identity = MatrixMath.identity(m3.... | /**
* Train the neural network for the specified pattern. The neural network
* can be trained for more than one pattern. To do this simply call the
* train method more than once.
*
* @param pattern
* The pattern to train for.
*/ | Train the neural network for the specified pattern. The neural network can be trained for more than one pattern. To do this simply call the train method more than once | addPattern | {
"repo_name": "krzysztof-magosa/encog-java-core",
"path": "src/main/java/org/encog/neural/thermal/HopfieldNetwork.java",
"license": "apache-2.0",
"size": 5423
} | [
"org.encog.mathutil.matrices.Matrix",
"org.encog.mathutil.matrices.MatrixMath",
"org.encog.neural.NeuralNetworkError"
] | import org.encog.mathutil.matrices.Matrix; import org.encog.mathutil.matrices.MatrixMath; import org.encog.neural.NeuralNetworkError; | import org.encog.mathutil.matrices.*; import org.encog.neural.*; | [
"org.encog.mathutil",
"org.encog.neural"
] | org.encog.mathutil; org.encog.neural; | 1,886,836 |
private void handleIntent(Intent intent) {
// Log.d(TAG,
// "Service: handleIntent was called. Will put intent in queue and start workerthread");
SD.log("SmsTimeFixService: handleIntent was called.");
try {
SD.log("SmsTimeFixService: adding intent to work queue.");
queue.put(intent);
} catch (Interr... | void function(Intent intent) { SD.log(STR); try { SD.log(STR); queue.put(intent); } catch (InterruptedException e) { Log.w(TAG, STR, e); SD.log(STR + e + STR + e.getMessage()); } if (workerThread == null !workerThread.isAlive()) { workerThread = new WorkerThread(); SD.log(STR); workerThread.start(); } else { SD.log(STR... | /**
* Performs the work in a separate thread, we change the sms time stamp
* here.
*
* @see android.app.IntentService#onHandleIntent(android.content.Intent)
*/ | Performs the work in a separate thread, we change the sms time stamp here | handleIntent | {
"repo_name": "johnzweng/SMSSentTime",
"path": "src/at/zweng/smssenttimefix/SmsTimeFixService.java",
"license": "gpl-3.0",
"size": 19424
} | [
"android.content.Intent",
"android.util.Log"
] | import android.content.Intent; import android.util.Log; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 1,611,096 |
private static CompareOp getHBaseCompareOp(
TimelineCompareOp op) {
switch (op) {
case LESS_THAN:
return CompareOp.LESS;
case LESS_OR_EQUAL:
return CompareOp.LESS_OR_EQUAL;
case EQUAL:
return CompareOp.EQUAL;
case NOT_EQUAL:
return CompareOp.NOT_EQUAL;
case GREATE... | static CompareOp function( TimelineCompareOp op) { switch (op) { case LESS_THAN: return CompareOp.LESS; case LESS_OR_EQUAL: return CompareOp.LESS_OR_EQUAL; case EQUAL: return CompareOp.EQUAL; case NOT_EQUAL: return CompareOp.NOT_EQUAL; case GREATER_OR_EQUAL: return CompareOp.GREATER_OR_EQUAL; case GREATER_THAN: return ... | /**
* Returns the equivalent HBase compare filter's {@link CompareOp}.
*
* @param op timeline compare op.
* @return HBase compare filter's CompareOp.
*/ | Returns the equivalent HBase compare filter's <code>CompareOp</code> | getHBaseCompareOp | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/filter/TimelineFilterUtils.java",
"license": "gpl-3.0",
"size": 11212
} | [
"org.apache.hadoop.hbase.filter.CompareFilter"
] | import org.apache.hadoop.hbase.filter.CompareFilter; | import org.apache.hadoop.hbase.filter.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,010,725 |
public static Bitmap decodeSampledBitmapFromResource(Resources res, int resId, int reqWidth, int reqHeight)
{
// First decode with inJustDecodeBounds=true to check dimensions
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
Bi... | static Bitmap function(Resources res, int resId, int reqWidth, int reqHeight) { final BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(res, resId, options); options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight); options.inJ... | /**
* Decode and sample down a bitmap from resources to the requested width and
* height.
*
* @param res
* The resources object containing the image data
* @param resId
* The resource id of the image data
* @param reqWidth
* The requested wi... | Decode and sample down a bitmap from resources to the requested width and height | decodeSampledBitmapFromResource | {
"repo_name": "ROKOLabs/ROKO.Stickers.Android-Demo-APP",
"path": "RokoStickersDemo/app/src/main/java/com/rokolabs/app/common/image/ImageResizer.java",
"license": "apache-2.0",
"size": 11622
} | [
"android.content.res.Resources",
"android.graphics.Bitmap",
"android.graphics.BitmapFactory"
] | import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; | import android.content.res.*; import android.graphics.*; | [
"android.content",
"android.graphics"
] | android.content; android.graphics; | 2,605,134 |
public synchronized ArrayList<Cache_Reply> sendQueryBack(){
ArrayList<Cache_Reply> returnList = new ArrayList<>(returnQueue.size());
returnList.addAll(returnQueue);
return returnList;
} | synchronized ArrayList<Cache_Reply> function(){ ArrayList<Cache_Reply> returnList = new ArrayList<>(returnQueue.size()); returnList.addAll(returnQueue); return returnList; } | /**
* to send the querylist back
* @return
*/ | to send the querylist back | sendQueryBack | {
"repo_name": "KuppiliVenkataS/Coordination",
"path": "CacheFramework/src/main/java/project/MiddlewareEnvironment/QueryIndexFiles/QueryIndex.java",
"license": "gpl-3.0",
"size": 19648
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,195,718 |
Map<StorageType, StorageTypeStats> getStorageTypeStats(); | Map<StorageType, StorageTypeStats> getStorageTypeStats(); | /**
* Indicates the storage statistics per storage type.
* @return storage statistics per storage type.
*/ | Indicates the storage statistics per storage type | getStorageTypeStats | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/FSClusterStats.java",
"license": "apache-2.0",
"size": 2358
} | [
"java.util.Map",
"org.apache.hadoop.fs.StorageType"
] | import java.util.Map; import org.apache.hadoop.fs.StorageType; | import java.util.*; import org.apache.hadoop.fs.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,775,268 |
public RestoreSnapshotRequest source(XContentBuilder source) {
try {
return source(source.bytes());
} catch (Exception e) {
throw new ElasticsearchIllegalArgumentException("Failed to build json for repository request", e);
}
} | RestoreSnapshotRequest function(XContentBuilder source) { try { return source(source.bytes()); } catch (Exception e) { throw new ElasticsearchIllegalArgumentException(STR, e); } } | /**
* Parses restore definition
*
* @param source restore definition
* @return this request
*/ | Parses restore definition | source | {
"repo_name": "dantuffery/elasticsearch",
"path": "src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java",
"license": "apache-2.0",
"size": 20462
} | [
"org.elasticsearch.ElasticsearchIllegalArgumentException",
"org.elasticsearch.common.xcontent.XContentBuilder"
] | import org.elasticsearch.ElasticsearchIllegalArgumentException; import org.elasticsearch.common.xcontent.XContentBuilder; | import org.elasticsearch.*; import org.elasticsearch.common.xcontent.*; | [
"org.elasticsearch",
"org.elasticsearch.common"
] | org.elasticsearch; org.elasticsearch.common; | 178,558 |
public AnnotatedTypeBuilder<X> overrideParameterType(AnnotatedParameter<? super X> parameter, Type type)
{
if (parameter.getDeclaringCallable().getJavaMember() instanceof Method)
{
Method method = (Method) parameter.getDeclaringCallable().getJavaMember();
return overrideM... | AnnotatedTypeBuilder<X> function(AnnotatedParameter<? super X> parameter, Type type) { if (parameter.getDeclaringCallable().getJavaMember() instanceof Method) { Method method = (Method) parameter.getDeclaringCallable().getJavaMember(); return overrideMethodParameterType(method, parameter.getPosition(), type); } if (par... | /**
* Override the declared type of a parameter.
*
* @param parameter the parameter to override the type on
* @param type the new type of the parameter
* @throws IllegalArgumentException if parameter or type is null
*/ | Override the declared type of a parameter | overrideParameterType | {
"repo_name": "os890/DS_Discuss_old",
"path": "deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/metadata/builder/AnnotatedTypeBuilder.java",
"license": "apache-2.0",
"size": 39708
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.Method",
"java.lang.reflect.Type",
"javax.enterprise.inject.spi.AnnotatedParameter"
] | import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Type; import javax.enterprise.inject.spi.AnnotatedParameter; | import java.lang.reflect.*; import javax.enterprise.inject.spi.*; | [
"java.lang",
"javax.enterprise"
] | java.lang; javax.enterprise; | 447,134 |
@Override
public void close() throws IOException {
if (propagateClose) {
in.close();
}
} | void function() throws IOException { if (propagateClose) { in.close(); } } | /**
* Invokes the delegate's <code>close()</code> method
* if {@link #isPropagateClose()} is {@code true}.
* @throws IOException if an I/O error occurs
*/ | Invokes the delegate's <code>close()</code> method if <code>#isPropagateClose()</code> is true | close | {
"repo_name": "JTechMe/AppHub",
"path": "f-droid/src/org/apache/commons/io/input/BoundedInputStream.java",
"license": "gpl-2.0",
"size": 7099
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,335,645 |
private void listJobs() throws IOException {
JobStatus[] jobs = jobsToComplete();
if (jobs == null)
jobs = new JobStatus[0];
System.out.printf("%d jobs currently running\n", jobs.length);
displayJobList(jobs);
} | void function() throws IOException { JobStatus[] jobs = jobsToComplete(); if (jobs == null) jobs = new JobStatus[0]; System.out.printf(STR, jobs.length); displayJobList(jobs); } | /**
* Dump a list of currently running jobs
* @throws IOException
*/ | Dump a list of currently running jobs | listJobs | {
"repo_name": "Ayear0608/myhadoop",
"path": "src/mapred/org/apache/hadoop/mapred/JobClient.java",
"license": "apache-2.0",
"size": 63874
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,619,795 |
private void validateTaskLimits(ITaskConfig task, int instances)
throws ScheduleException {
// TODO(maximk): This is a short-term hack to stop the bleeding from
// https://issues.apache.org/jira/browse/MESOS-691
if (taskIdGenerator.generate(task, instances).length() > MAX_TASK_ID_LENG... | void function(ITaskConfig task, int instances) throws ScheduleException { if (taskIdGenerator.generate(task, instances).length() > MAX_TASK_ID_LENGTH) { throw new ScheduleException( STR); } if (instances > MAX_TASKS_PER_JOB.get()) { throw new ScheduleException(STR + MAX_TASKS_PER_JOB.get()); } QuotaCheckResult quotaChe... | /**
* Validates task specific requirements including name, count and quota checks.
* Must be performed inside of a write storage transaction along with state mutation change
* to avoid any data race conditions.
*
* @param task Task configuration.
* @param instances Number of task instances
* @throw... | Validates task specific requirements including name, count and quota checks. Must be performed inside of a write storage transaction along with state mutation change to avoid any data race conditions | validateTaskLimits | {
"repo_name": "mkhutornenko/incubator-aurora",
"path": "src/main/java/org/apache/aurora/scheduler/state/SchedulerCoreImpl.java",
"license": "apache-2.0",
"size": 9523
} | [
"org.apache.aurora.scheduler.base.ScheduleException",
"org.apache.aurora.scheduler.quota.QuotaCheckResult",
"org.apache.aurora.scheduler.storage.entities.ITaskConfig"
] | import org.apache.aurora.scheduler.base.ScheduleException; import org.apache.aurora.scheduler.quota.QuotaCheckResult; import org.apache.aurora.scheduler.storage.entities.ITaskConfig; | import org.apache.aurora.scheduler.base.*; import org.apache.aurora.scheduler.quota.*; import org.apache.aurora.scheduler.storage.entities.*; | [
"org.apache.aurora"
] | org.apache.aurora; | 1,257,959 |
Set<ShardMetadata> getNodeShards(String nodeIdentifier); | Set<ShardMetadata> getNodeShards(String nodeIdentifier); | /**
* Get shard metadata for shards on a given node.
*/ | Get shard metadata for shards on a given node | getNodeShards | {
"repo_name": "DanielTing/presto",
"path": "presto-raptor/src/main/java/com/facebook/presto/raptor/metadata/ShardManager.java",
"license": "apache-2.0",
"size": 2271
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 72,349 |
public void scheduleWork(Work work,
long startTimeout,
ExecutionContext context,
WorkListener listener)
throws WorkException
{
startWork(work, startTimeout, context, listener, false);
} | void function(Work work, long startTimeout, ExecutionContext context, WorkListener listener) throws WorkException { startWork(work, startTimeout, context, listener, false); } | /**
* Schedules a work instance.
*/ | Schedules a work instance | scheduleWork | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/jca/ra/WorkManagerImpl.java",
"license": "gpl-2.0",
"size": 7333
} | [
"javax.resource.spi.work.ExecutionContext",
"javax.resource.spi.work.Work",
"javax.resource.spi.work.WorkException",
"javax.resource.spi.work.WorkListener"
] | import javax.resource.spi.work.ExecutionContext; import javax.resource.spi.work.Work; import javax.resource.spi.work.WorkException; import javax.resource.spi.work.WorkListener; | import javax.resource.spi.work.*; | [
"javax.resource"
] | javax.resource; | 2,838,229 |
public StreamImpl openReadImpl() throws IOException
{
if (_isWindows && isAux())
throw new FileNotFoundException(_file.toString());
return new FileReadStream(new FileInputStream(getFile()), this);
} | StreamImpl function() throws IOException { if (_isWindows && isAux()) throw new FileNotFoundException(_file.toString()); return new FileReadStream(new FileInputStream(getFile()), this); } | /**
* Returns the stream implementation for a read stream.
*/ | Returns the stream implementation for a read stream | openReadImpl | {
"repo_name": "baratine/baratine",
"path": "framework/src/main/java/com/caucho/v5/vfs/FilePath.java",
"license": "gpl-2.0",
"size": 15628
} | [
"com.caucho.v5.io.StreamImpl",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException"
] | import com.caucho.v5.io.StreamImpl; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; | import com.caucho.v5.io.*; import java.io.*; | [
"com.caucho.v5",
"java.io"
] | com.caucho.v5; java.io; | 2,640,443 |
static protected void printTransformedSql(String originalSql, String modifiedSql) {
if (transformedSqlFileWriter != null && !originalSql.equals(modifiedSql)) {
try {
transformedSqlFileWriter.write("original SQL: " + originalSql + "\n");
transformedSqlFileWriter.wr... | static void function(String originalSql, String modifiedSql) { if (transformedSqlFileWriter != null && !originalSql.equals(modifiedSql)) { try { transformedSqlFileWriter.write(STR + originalSql + "\n"); transformedSqlFileWriter.write(STR + modifiedSql + "\n"); } catch (IOException e) { printCaughtException(STR + e + ST... | /** Prints the original and modified SQL statements, to the "Transformed
* SQL" output file, assuming that that file is defined; and only if
* the original and modified SQL are not the same, i.e., only if some
* transformation has indeed taken place. */ | Prints the original and modified SQL statements, to the "Transformed SQL" output file, assuming that that file is defined; and only if the original and modified SQL are not the same, i.e., only if some | printTransformedSql | {
"repo_name": "deerwalk/voltdb",
"path": "src/frontend/org/voltdb/NonVoltDBBackend.java",
"license": "agpl-3.0",
"size": 49004
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,708,675 |
@Test
public void canFindEquality() {
final Command.Builder builder
= new Command.Builder(NAME, USER, VERSION, CommandStatus.ACTIVE, EXECUTABLE, CHECK_DELAY);
builder.withSetupFile(null);
builder.withConfigs(null);
builder.withDependencies(null);
builder.withC... | void function() { final Command.Builder builder = new Command.Builder(NAME, USER, VERSION, CommandStatus.ACTIVE, EXECUTABLE, CHECK_DELAY); builder.withSetupFile(null); builder.withConfigs(null); builder.withDependencies(null); builder.withCreated(null); builder.withDescription(null); builder.withId(UUID.randomUUID().to... | /**
* Test equals.
*/ | Test equals | canFindEquality | {
"repo_name": "irontable/genie",
"path": "genie-common/src/test/java/com/netflix/genie/common/dto/CommandUnitTests.java",
"license": "apache-2.0",
"size": 8827
} | [
"java.util.UUID",
"org.junit.Assert"
] | import java.util.UUID; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,673,409 |
List<String> getSqlResourceNames(final String dirName) throws SqlResourceFactoryException {
final List<String> resNames = new ArrayList<String>();
getSqlResourceNames(resNames, dirName, "");
if (resNames.size() == 0) {
Config.logger.warn("No SQL Resource definitions found in " + dirName);
}
return resNa... | List<String> getSqlResourceNames(final String dirName) throws SqlResourceFactoryException { final List<String> resNames = new ArrayList<String>(); getSqlResourceNames(resNames, dirName, STRNo SQL Resource definitions found in " + dirName); } return resNames; } | /**
* Returns available SQL Resource names using the provided directory. Used by testing infrastructure.
*
* @throws SqlResourceFactoryException if the provided directory does not exist
*/ | Returns available SQL Resource names using the provided directory. Used by testing infrastructure | getSqlResourceNames | {
"repo_name": "restsql/restsql",
"path": "src/org/restsql/core/impl/SqlResourceFactoryImpl.java",
"license": "mit",
"size": 6760
} | [
"java.util.ArrayList",
"java.util.List",
"org.restsql.core.Factory"
] | import java.util.ArrayList; import java.util.List; import org.restsql.core.Factory; | import java.util.*; import org.restsql.core.*; | [
"java.util",
"org.restsql.core"
] | java.util; org.restsql.core; | 2,424,269 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<NetworkInterfaceInner> listVirtualMachineScaleSetNetworkInterfaces(
String resourceGroupName, String virtualMachineScaleSetName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<NetworkInterfaceInner> listVirtualMachineScaleSetNetworkInterfaces( String resourceGroupName, String virtualMachineScaleSetName); | /**
* Gets all network interfaces in a virtual machine scale set.
*
* @param resourceGroupName The name of the resource group.
* @param virtualMachineScaleSetName The name of the virtual machine scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @thro... | Gets all network interfaces in a virtual machine scale set | listVirtualMachineScaleSetNetworkInterfaces | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java",
"license": "mit",
"size": 71039
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.network.fluent.models.NetworkInterfaceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,861,993 |
public List<TriggerFiredResult> triggersFired(List<OperableTrigger> triggers) {
synchronized (lock) {
List<TriggerFiredResult> results = new ArrayList<TriggerFiredResult>();
for (OperableTrigger trigger : triggers) {
TriggerWrapper tw = (TriggerWrapper) triggersByKe... | List<TriggerFiredResult> function(List<OperableTrigger> triggers) { synchronized (lock) { List<TriggerFiredResult> results = new ArrayList<TriggerFiredResult>(); for (OperableTrigger trigger : triggers) { TriggerWrapper tw = (TriggerWrapper) triggersByKey.get(trigger.getKey()); if (tw == null tw.trigger == null) { cont... | /**
* <p>
* Inform the <code>JobStore</code> that the scheduler is now firing the
* given <code>Trigger</code> (executing its associated <code>Job</code>),
* that it had previously acquired (reserved).
* </p>
*/ | Inform the <code>JobStore</code> that the scheduler is now firing the given <code>Trigger</code> (executing its associated <code>Job</code>), that it had previously acquired (reserved). | triggersFired | {
"repo_name": "dumptruckman/MC-Server-GUI--multi-",
"path": "lib/quartz-2.0.1/quartz/src/main/java/org/quartz/simpl/RAMJobStore.java",
"license": "gpl-2.0",
"size": 58913
} | [
"java.util.ArrayList",
"java.util.Date",
"java.util.Iterator",
"java.util.List",
"org.quartz.Calendar",
"org.quartz.JobDetail",
"org.quartz.spi.OperableTrigger",
"org.quartz.spi.TriggerFiredBundle",
"org.quartz.spi.TriggerFiredResult"
] | import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; import org.quartz.Calendar; import org.quartz.JobDetail; import org.quartz.spi.OperableTrigger; import org.quartz.spi.TriggerFiredBundle; import org.quartz.spi.TriggerFiredResult; | import java.util.*; import org.quartz.*; import org.quartz.spi.*; | [
"java.util",
"org.quartz",
"org.quartz.spi"
] | java.util; org.quartz; org.quartz.spi; | 2,599,297 |
public void outputGraph(final String filename) throws IOException {
FileOutputStream fos = new FileOutputStream(filename);
outputGraph(fos);
fos.close();
} | void function(final String filename) throws IOException { FileOutputStream fos = new FileOutputStream(filename); outputGraph(fos); fos.close(); } | /**
* Write the data in a Graph to a GML OutputStream.
*
* @param filename the GML file to write the Graph data to
* @throws IOException thrown if there is an error generating the GML data
*/ | Write the data in a Graph to a GML OutputStream | outputGraph | {
"repo_name": "echinopsii/net.echinopsii.3rdparty.blueprints",
"path": "blueprints-core/src/main/java/com/tinkerpop/blueprints/util/io/gml/GMLWriter.java",
"license": "bsd-3-clause",
"size": 11646
} | [
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,230,370 |
public DataTypeDO updateDataType(DataTypeDO dataType) {
EntityManager manager = EntityManagerFactoryInstance.getInstance()
.createEntityManager();
manager.getTransaction().begin();
dataType = manager.merge(dataType);
manager.getTransaction().commit();
manager.close();
notifyListeners();
... | DataTypeDO function(DataTypeDO dataType) { EntityManager manager = EntityManagerFactoryInstance.getInstance() .createEntityManager(); manager.getTransaction().begin(); dataType = manager.merge(dataType); manager.getTransaction().commit(); manager.close(); notifyListeners(); return dataType; } | /**
* Update a data type.
* @param DataType
*/ | Update a data type | updateDataType | {
"repo_name": "epri-dev/PT2",
"path": "src/main/java/org/epri/pt2/controller/DataTypeController.java",
"license": "bsd-3-clause",
"size": 8925
} | [
"javax.persistence.EntityManager",
"org.epri.pt2.DO"
] | import javax.persistence.EntityManager; import org.epri.pt2.DO; | import javax.persistence.*; import org.epri.pt2.*; | [
"javax.persistence",
"org.epri.pt2"
] | javax.persistence; org.epri.pt2; | 1,047,913 |
private String readDefaultConfigFile(String path)
throws org.dbwiki.exception.WikiException {
try {
String value = null;
File file = new File(directory().getAbsolutePath() + path);
if ((file.exists()) && (!file.isDirectory())) {
BufferedReader in = new BufferedReader(new FileReader(file));
Str... | String function(String path) throws org.dbwiki.exception.WikiException { try { String value = null; File file = new File(directory().getAbsolutePath() + path); if ((file.exists()) && (!file.isDirectory())) { BufferedReader in = new BufferedReader(new FileReader(file)); String line; while ((line = in.readLine()) != null... | /**
* Finds a default configuration file (layout, template, css) at a given
* path from the server home directory
*
* @param path
* @return
* @throws org.dbwiki.exception.WikiException
*/ | Finds a default configuration file (layout, template, css) at a given path from the server home directory | readDefaultConfigFile | {
"repo_name": "jamescheney/database-wiki",
"path": "src/org/dbwiki/web/server/WikiServer.java",
"license": "gpl-3.0",
"size": 56766
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException",
"org.dbwiki.exception.WikiException",
"org.dbwiki.exception.WikiFatalException"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import org.dbwiki.exception.WikiException; import org.dbwiki.exception.WikiFatalException; | import java.io.*; import org.dbwiki.exception.*; | [
"java.io",
"org.dbwiki.exception"
] | java.io; org.dbwiki.exception; | 359,775 |
@Override
public List<InstanceInfo> getInstancesByVipAddressAndAppName(
String vipAddress, String appName, boolean secure) {
List<InstanceInfo> result = new ArrayList<InstanceInfo>();
if (vipAddress == null && appName == null) {
throw new IllegalArgumentException(
... | List<InstanceInfo> function( String vipAddress, String appName, boolean secure) { List<InstanceInfo> result = new ArrayList<InstanceInfo>(); if (vipAddress == null && appName == null) { throw new IllegalArgumentException( STR); } else if (vipAddress != null && appName == null) { return getInstancesByVipAddress(vipAddre... | /**
* Gets the list of instances matching the given VIP Address and the given
* application name if both of them are not null. If one of them is null,
* then that criterion is completely ignored for matching instances.
*
* @param vipAddress
* - The VIP address to match the insta... | Gets the list of instances matching the given VIP Address and the given application name if both of them are not null. If one of them is null, then that criterion is completely ignored for matching instances | getInstancesByVipAddressAndAppName | {
"repo_name": "ccortezb/eureka",
"path": "eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java",
"license": "apache-2.0",
"size": 89455
} | [
"com.netflix.appinfo.InstanceInfo",
"com.netflix.discovery.shared.Application",
"java.util.ArrayList",
"java.util.List"
] | import com.netflix.appinfo.InstanceInfo; import com.netflix.discovery.shared.Application; import java.util.ArrayList; import java.util.List; | import com.netflix.appinfo.*; import com.netflix.discovery.shared.*; import java.util.*; | [
"com.netflix.appinfo",
"com.netflix.discovery",
"java.util"
] | com.netflix.appinfo; com.netflix.discovery; java.util; | 62,990 |
@Test
public void testRandom() {
System.out.println("random");
ParameterSpec instance = new ParameterSpec("D:10..20");
long min = Long.MAX_VALUE;
long max = Long.MIN_VALUE;
for (int i = 0; i < 100; i++) {
long p = instance.random();
min = Math.min(... | void function() { System.out.println(STR); ParameterSpec instance = new ParameterSpec(STR); long min = Long.MAX_VALUE; long max = Long.MIN_VALUE; for (int i = 0; i < 100; i++) { long p = instance.random(); min = Math.min(min, p); max = Math.max(max, p); } assertEquals(min, 10); assertEquals(max, 20); instance = new Par... | /**
* Test of random method, of class ParameterSpec.
*/ | Test of random method, of class ParameterSpec | testRandom | {
"repo_name": "bengtmartensson/IrpTransmogrifier",
"path": "src/test/java/org/harctoolbox/irp/ParameterSpecNGTest.java",
"license": "gpl-3.0",
"size": 6726
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 1,367,770 |
// 1. Write assemblies.
PlatformUtils.writeNullableCollection(writer, cfg.getAssemblies());
PlatformDotNetBinaryConfiguration binaryCfg = cfg.getBinaryConfiguration();
if (binaryCfg != null) {
writer.writeBoolean(true); | PlatformUtils.writeNullableCollection(writer, cfg.getAssemblies()); PlatformDotNetBinaryConfiguration binaryCfg = cfg.getBinaryConfiguration(); if (binaryCfg != null) { writer.writeBoolean(true); | /**
* Write .Net configuration to the stream.
*
* @param writer Writer.
* @param cfg Configuration.
*/ | Write .Net configuration to the stream | writeDotNetConfiguration | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java",
"license": "apache-2.0",
"size": 87032
} | [
"org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration"
] | import org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration; | import org.apache.ignite.platform.dotnet.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,923,246 |
public synchronized void removeUndoableEditListener(UndoableEditListener val)
{
listeners.removeElement(val);
} | synchronized void function(UndoableEditListener val) { listeners.removeElement(val); } | /**
* Unregisters a listener.
* @param val the listener to be removed.
*/ | Unregisters a listener | removeUndoableEditListener | {
"repo_name": "aosm/gcc_40",
"path": "libjava/javax/swing/undo/UndoableEditSupport.java",
"license": "gpl-2.0",
"size": 8008
} | [
"javax.swing.event.UndoableEditListener"
] | import javax.swing.event.UndoableEditListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 927,872 |
public static synchronized void setTask(CheckableTask task) {
mTask = task;
Intent intent = new Intent(App.context, ServiceAssist.class);
intent.putExtra(TASK_EXTRA_NAME, TASK_ADD);
App.context.startService(intent);
} | static synchronized void function(CheckableTask task) { mTask = task; Intent intent = new Intent(App.context, ServiceAssist.class); intent.putExtra(TASK_EXTRA_NAME, TASK_ADD); App.context.startService(intent); } | /**
* Set task as candidate for adding. Note: if the method called fast repeatedly(in cycle for example), only last task will be added.
*
* @param task
*/ | Set task as candidate for adding. Note: if the method called fast repeatedly(in cycle for example), only last task will be added | setTask | {
"repo_name": "alexandersjn/btc-e-assist",
"path": "app/src/main/java/com/btc_e_assist/ServiceAssist.java",
"license": "apache-2.0",
"size": 4883
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 49,094 |
public static boolean matchesWholeInput(RegExpTree t, String flags) {
if (flags.indexOf('m') >= 0) { return false; }
if (!(t instanceof Concatenation)) {
return false;
}
Concatenation c = (Concatenation) t;
if (c.elements.isEmpty()) { return false; }
RegExpTree first = c.elements.get(0... | static boolean function(RegExpTree t, String flags) { if (flags.indexOf('m') >= 0) { return false; } if (!(t instanceof Concatenation)) { return false; } Concatenation c = (Concatenation) t; if (c.elements.isEmpty()) { return false; } RegExpTree first = c.elements.get(0), last = Iterables.getLast(c.elements); if (!(fir... | /**
* True if, but not necessarily always when the, given regular expression
* must match the whole input or none of it.
*/ | True if, but not necessarily always when the, given regular expression must match the whole input or none of it | matchesWholeInput | {
"repo_name": "ralic/closure-compiler",
"path": "src/com/google/javascript/jscomp/regex/RegExpTree.java",
"license": "apache-2.0",
"size": 55984
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 22,857 |
public List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades() {
return this.innerProperties() == null ? null : this.innerProperties().upgrades();
} | List<AgentPoolUpgradeProfilePropertiesUpgradesItem> function() { return this.innerProperties() == null ? null : this.innerProperties().upgrades(); } | /**
* Get the upgrades property: List of orchestrator types and versions available for upgrade.
*
* @return the upgrades value.
*/ | Get the upgrades property: List of orchestrator types and versions available for upgrade | upgrades | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java",
"license": "mit",
"size": 6400
} | [
"com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem",
"java.util.List"
] | import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; import java.util.List; | import com.azure.resourcemanager.containerservice.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 663,074 |
@Test
public void testGetResourceBaseUrl() throws RMapApiException {
String baseURL = underTest.getResourceBaseUrl();
assertFalse(baseURL.endsWith("/resource/"));
assertTrue(baseURL.startsWith("http"));
}
| void function() throws RMapApiException { String baseURL = underTest.getResourceBaseUrl(); assertFalse(baseURL.endsWith(STR)); assertTrue(baseURL.startsWith("http")); } | /**
* Test retrieval of Resource base URL
*
* @throws RMapApiException the RMap API exception
*/ | Test retrieval of Resource base URL | testGetResourceBaseUrl | {
"repo_name": "rmap-project/rmap",
"path": "api/src/test/java/info/rmapproject/api/utils/PathUtilsTestIT.java",
"license": "apache-2.0",
"size": 4172
} | [
"info.rmapproject.api.exception.RMapApiException",
"org.junit.Assert"
] | import info.rmapproject.api.exception.RMapApiException; import org.junit.Assert; | import info.rmapproject.api.exception.*; import org.junit.*; | [
"info.rmapproject.api",
"org.junit"
] | info.rmapproject.api; org.junit; | 2,460,409 |
public boolean isDownloadArtifactSourcesChecked() {
return new CheckBox(this, MavenPreferencePage.DOWNLOAD_ARTIFACT_SOURCES).isChecked();
}
| boolean function() { return new CheckBox(this, MavenPreferencePage.DOWNLOAD_ARTIFACT_SOURCES).isChecked(); } | /**
* Returns true when Download Artifact Sources checkbox is checked .
*
* @return true, if is download artifact sources checked
*/ | Returns true when Download Artifact Sources checkbox is checked | isDownloadArtifactSourcesChecked | {
"repo_name": "djelinek/reddeer",
"path": "plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/m2e/core/ui/preferences/MavenPreferencePage.java",
"license": "epl-1.0",
"size": 6503
} | [
"org.eclipse.reddeer.swt.impl.button.CheckBox"
] | import org.eclipse.reddeer.swt.impl.button.CheckBox; | import org.eclipse.reddeer.swt.impl.button.*; | [
"org.eclipse.reddeer"
] | org.eclipse.reddeer; | 1,251,913 |
public PropertyConversionStrategyBuilder<S, P, E, T, Q, F> targetProperty(final PropertyDescriptor<Q, F> targetProperty) {
this.targetPropertyBuilder = targetProperty;
return this;
} | PropertyConversionStrategyBuilder<S, P, E, T, Q, F> function(final PropertyDescriptor<Q, F> targetProperty) { this.targetPropertyBuilder = targetProperty; return this; } | /**
* Sets a new value for the targetProperty field.
*
* @param targetProperty
* The new value for the targetProperty field. Must be set.
* @return The builder.
*/ | Sets a new value for the targetProperty field | targetProperty | {
"repo_name": "lunarray-org/model-descriptor",
"path": "src/main/java/org/lunarray/model/descriptor/mapping/impl/properties/impl/PropertyConversionStrategyBuilder.java",
"license": "lgpl-3.0",
"size": 7725
} | [
"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; | 1,971,120 |
HandlerRegistration addZoomChangeHandler( final ChangeHandler handler ); | HandlerRegistration addZoomChangeHandler( final ChangeHandler handler ); | /**
* Adds a handler for when the Zoom level in the View is changed.
* @param handler
* @return
*/ | Adds a handler for when the Zoom level in the View is changed | addZoomChangeHandler | {
"repo_name": "Salaboy/uberfire",
"path": "uberfire-extensions/uberfire-wires/uberfire-wires-core/uberfire-wires-core-grids/src/main/java/org/uberfire/ext/wires/core/grids/client/demo/WiresGridsDemoView.java",
"license": "apache-2.0",
"size": 3754
} | [
"com.google.gwt.event.dom.client.ChangeHandler",
"com.google.gwt.event.shared.HandlerRegistration"
] | import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.shared.HandlerRegistration; | import com.google.gwt.event.dom.client.*; import com.google.gwt.event.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,823,382 |
public void setGenres(List<String> genres){
this.genres = genres;
}
| void function(List<String> genres){ this.genres = genres; } | /**
* Set genres for this artist.
*
* @param genres A {@link List} of genres.
*/ | Set genres for this artist | setGenres | {
"repo_name": "Tho85/jotify",
"path": "src/de/felixbruns/jotify/media/Artist.java",
"license": "bsd-2-clause",
"size": 7039
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,613,315 |
private Form getForm(HttpServletRequest request) {
Form form = null;
if (Context.isAuthenticated()) {
FormService fs = Context.getFormService();
String formId = request.getParameter("formId");
if (formId != null) {
try {
form = fs.getForm(Integer.valueOf(formId));
}
catch (NumberForm... | Form function(HttpServletRequest request) { Form form = null; if (Context.isAuthenticated()) { FormService fs = Context.getFormService(); String formId = request.getParameter(STR); if (formId != null) { try { form = fs.getForm(Integer.valueOf(formId)); } catch (NumberFormatException e) { } } } if (form == null) { form ... | /**
* Gets the form for a given http request.
*
* @param request the http request.
* @return the form.
*/ | Gets the form for a given http request | getForm | {
"repo_name": "shiangree/openmrs-core",
"path": "web/src/main/java/org/openmrs/web/controller/form/FormFormController.java",
"license": "mpl-2.0",
"size": 8665
} | [
"javax.servlet.http.HttpServletRequest",
"org.openmrs.Form",
"org.openmrs.api.FormService",
"org.openmrs.api.context.Context"
] | import javax.servlet.http.HttpServletRequest; import org.openmrs.Form; import org.openmrs.api.FormService; import org.openmrs.api.context.Context; | import javax.servlet.http.*; import org.openmrs.*; import org.openmrs.api.*; import org.openmrs.api.context.*; | [
"javax.servlet",
"org.openmrs",
"org.openmrs.api"
] | javax.servlet; org.openmrs; org.openmrs.api; | 344,876 |
public void createNewCaptcha()
{
this.destroyCaptcha();
this.imageCaptcha = Captcha.getInstance().getNextImageCaptcha();
} | void function() { this.destroyCaptcha(); this.imageCaptcha = Captcha.getInstance().getNextImageCaptcha(); } | /**
* create a new image captcha
*
*/ | create a new image captcha | createNewCaptcha | {
"repo_name": "linda1890/jforum2",
"path": "src/main/java/net/jforum/entities/UserSession.java",
"license": "bsd-3-clause",
"size": 11955
} | [
"net.jforum.util.Captcha"
] | import net.jforum.util.Captcha; | import net.jforum.util.*; | [
"net.jforum.util"
] | net.jforum.util; | 1,889,304 |
@VisibleForTesting
public void evictLazyPersistBlocks(long bytesNeeded) {
try {
((LazyWriter) lazyWriter.getRunnable()).evictBlocks(bytesNeeded);
} catch(IOException ioe) {
LOG.info("Ignoring exception ", ioe);
}
} | void function(long bytesNeeded) { try { ((LazyWriter) lazyWriter.getRunnable()).evictBlocks(bytesNeeded); } catch(IOException ioe) { LOG.info(STR, ioe); } } | /**
* Attempt to evict blocks from cache Manager to free the requested
* bytes.
*
* @param bytesNeeded
*/ | Attempt to evict blocks from cache Manager to free the requested bytes | evictLazyPersistBlocks | {
"repo_name": "f7753/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java",
"license": "apache-2.0",
"size": 113025
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 767,853 |
public Image getImage( GraphicsConfiguration config, int w, int h, Object... args ) {
lock.readLock().lock();
try {
PixelCountSoftReference ref = map.get( hash( config, w, h, args ) );
// check reference has not been lost and the key truly matches, in case of false positive hash match
if( ref != null &&... | Image function( GraphicsConfiguration config, int w, int h, Object... args ) { lock.readLock().lock(); try { PixelCountSoftReference ref = map.get( hash( config, w, h, args ) ); if( ref != null && ref.equals( config, w, h, args ) ) { return ref.get(); } else { return null; } } finally { lock.readLock().unlock(); } } | /**
* Get the cached image for given keys
*
* @param config The graphics configuration, needed if cached image is a
* Volatile Image. Used as part of cache key
* @param w The image width, used as part of cache key
* @param h The image height, used as part of cache key
* @param args Other argument... | Get the cached image for given keys | getImage | {
"repo_name": "parallelsymmetry/cirrus",
"path": "source/main/java/com/parallelsymmetry/cirrus/ImageCache.java",
"license": "apache-2.0",
"size": 7579
} | [
"java.awt.GraphicsConfiguration",
"java.awt.Image"
] | import java.awt.GraphicsConfiguration; import java.awt.Image; | import java.awt.*; | [
"java.awt"
] | java.awt; | 685,763 |
@Override
public Adapter createAccountsAdapter() {
if (accountsItemProvider == null) {
accountsItemProvider = new AccountsItemProvider(this);
}
return accountsItemProvider;
}
protected ControllersItemProvider controllersItemProvider; | Adapter function() { if (accountsItemProvider == null) { accountsItemProvider = new AccountsItemProvider(this); } return accountsItemProvider; } protected ControllersItemProvider controllersItemProvider; | /**
* This creates an adapter for a {@link io.opensemantics.semiotics.model.assessment.Accounts}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>io.opensemantics.semiotics.model.assessment.Accounts</code>. | createAccountsAdapter | {
"repo_name": "OpenSemanticsIO/semiotics-main",
"path": "bundles/io.opensemantics.semiotics.model.assessment.edit/src-gen/io/opensemantics/semiotics/model/assessment/provider/AssessmentItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 24848
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,865,493 |
public static String buildAddr822Full(final Name name) {
try {
if (null == name) {
throw new IllegalArgumentException("Name is null");
}
return RFC822name.buildAddr822Full(name.getAddr822Phrase(), name.getAddr821(), name.getAddr822Comment1(),
name.getAddr822Comment2(), name.getAddr822Comm... | static String function(final Name name) { try { if (null == name) { throw new IllegalArgumentException(STR); } return RFC822name.buildAddr822Full(name.getAddr822Phrase(), name.getAddr821(), name.getAddr822Comment1(), name.getAddr822Comment2(), name.getAddr822Comment3()); } catch (Exception e) { DominoUtils.handleExcept... | /**
* Generates an RFC822 Addr822 Full Address String from the specified Name.
*
* @param name
* Name from which to construct the result.
* @return properly formatted RFC822 Addr822Full string generated from the specified Name. Empty string on error or no value for
* name.getAddr821... | Generates an RFC822 Addr822 Full Address String from the specified Name | buildAddr822Full | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/utils/Names.java",
"license": "apache-2.0",
"size": 35655
} | [
"org.openntf.arpa.RFC822name",
"org.openntf.domino.Name"
] | import org.openntf.arpa.RFC822name; import org.openntf.domino.Name; | import org.openntf.arpa.*; import org.openntf.domino.*; | [
"org.openntf.arpa",
"org.openntf.domino"
] | org.openntf.arpa; org.openntf.domino; | 2,662,717 |
public void writeAll(List allLines) {
for (Iterator iter = allLines.iterator(); iter.hasNext(); ) {
String[] nextLine = (String[]) iter.next();
writeNext(nextLine);
}
}
| void function(List allLines) { for (Iterator iter = allLines.iterator(); iter.hasNext(); ) { String[] nextLine = (String[]) iter.next(); writeNext(nextLine); } } | /**
* Writes the entire list to a CSV file. The list is assumed to be a
* String[]
*
* @param allLines a List of String[], with each String[] representing a line of
* the file.
*/ | Writes the entire list to a CSV file. The list is assumed to be a String[] | writeAll | {
"repo_name": "pburlov/ultracipher",
"path": "core/src/main/java/au/com/bytecode/opencsv/CSVWriter.java",
"license": "gpl-2.0",
"size": 12129
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,212,030 |
public void addGroup(String identifier) {
IdentExpression expression = ExpressionUtilities.getIdentifierExpression(identifier);
if (this.groupByList == null) {
this.groupByList = new GroupByList();
}
this.groupByList.addGroup(expression);
}
| void function(String identifier) { IdentExpression expression = ExpressionUtilities.getIdentifierExpression(identifier); if (this.groupByList == null) { this.groupByList = new GroupByList(); } this.groupByList.addGroup(expression); } | /**
* Adds this identifier to the group list.
*
* @param identifier
*/ | Adds this identifier to the group list | addGroup | {
"repo_name": "Esleelkartea/aonGTA",
"path": "aongta_v1.0.0_src/Fuentes y JavaDoc/aon-ql/src/com/code/aon/ql/Criteria.java",
"license": "gpl-2.0",
"size": 7582
} | [
"com.code.aon.ql.ast.IdentExpression",
"com.code.aon.ql.util.ExpressionUtilities"
] | import com.code.aon.ql.ast.IdentExpression; import com.code.aon.ql.util.ExpressionUtilities; | import com.code.aon.ql.ast.*; import com.code.aon.ql.util.*; | [
"com.code.aon"
] | com.code.aon; | 2,593,645 |
public BufferedImage getTopMipMap() {
return this.mipMaps.getMipMap(TOP_MOST_MIP_MAP);
}
/**
* Returns the topmost MipMap
* @return {@link BufferedImage} | BufferedImage function() { return this.mipMaps.getMipMap(TOP_MOST_MIP_MAP); } /** * Returns the topmost MipMap * @return {@link BufferedImage} | /**
* Returns the top-most MipMap.
* @return
*/ | Returns the top-most MipMap | getTopMipMap | {
"repo_name": "Dahie/DDS-Utils",
"path": "DDSUtils/src/model/AbstractTextureImage.java",
"license": "gpl-3.0",
"size": 4764
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,023,783 |
private void showModelInformations(String modelID)
{
// get knowledge of process
fillKnowledgeObjectTree(modelID);
RoleArray roleArray = MainController.getInstance().getProcessRoles(modelID);
fillPersonTree(roleArray);
// init browser functions
reInitBr... | void function(String modelID) { fillKnowledgeObjectTree(modelID); RoleArray roleArray = MainController.getInstance().getProcessRoles(modelID); fillPersonTree(roleArray); reInitBrowserFunctions(); modelEditor.setModelName(MainController.getInstance().getName(modelID)); modelEditor.setViewerMode(modelID); modelEditor.set... | /**
*
* Shows the model and get the knowledge objects and persons of model and shows these in trees
*
* @param modelID id of model
*/ | Shows the model and get the knowledge objects and persons of model and shows these in trees | showModelInformations | {
"repo_name": "prowim/prowim",
"path": "prowim-portal/src/org/prowim/portal/view/process/ProcessBrowserView.java",
"license": "gpl-3.0",
"size": 31942
} | [
"org.prowim.datamodel.collections.RoleArray",
"org.prowim.portal.MainController"
] | import org.prowim.datamodel.collections.RoleArray; import org.prowim.portal.MainController; | import org.prowim.datamodel.collections.*; import org.prowim.portal.*; | [
"org.prowim.datamodel",
"org.prowim.portal"
] | org.prowim.datamodel; org.prowim.portal; | 953,644 |
@Override
public IPath getGDBWorkingDirectory() throws CoreException {
IPath path;
try {
path = super.getGDBWorkingDirectory();
} catch (CoreException e) {
path = null;
}
if (path == null) {
path = DebugUtils.getProjectOsPath(fLaunchConfiguration);
}
if (Activator.getInstance().isDebugging... | IPath function() throws CoreException { IPath path; try { path = super.getGDBWorkingDirectory(); } catch (CoreException e) { path = null; } if (path == null) { path = DebugUtils.getProjectOsPath(fLaunchConfiguration); } if (Activator.getInstance().isDebugging()) { System.out.println(STR + path); } return path; } | /**
* Overridden to also try getProjectOsPath(), if getGDBWorkingDirectory() is
* not defined.
*
* May return null.
*/ | Overridden to also try getProjectOsPath(), if getGDBWorkingDirectory() is not defined. May return null | getGDBWorkingDirectory | {
"repo_name": "gnuarmeclipse/plug-ins",
"path": "plugins/ilg.gnumcueclipse.debug.gdbjtag.jumper/src/ilg/gnumcueclipse/debug/gdbjtag/jumper/dsf/GdbBackend.java",
"license": "epl-1.0",
"size": 4047
} | [
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IPath"
] | import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 950,818 |
public static Iterator<ImageTranscoder>
getImageTranscoders(ImageReader reader, ImageWriter writer)
{
if (reader == null) {
throw new IllegalArgumentException("reader == null!");
}
if (writer == null) {
throw new IllegalArgumentException("writer == null!")... | static Iterator<ImageTranscoder> function(ImageReader reader, ImageWriter writer) { if (reader == null) { throw new IllegalArgumentException(STR); } if (writer == null) { throw new IllegalArgumentException(STR); } ImageReaderSpi readerSpi = reader.getOriginatingProvider(); ImageWriterSpi writerSpi = writer.getOriginati... | /**
* Returns an <code>Iterator</code> containing all currently
* registered <code>ImageTranscoder</code>s that claim to be
* able to transcode between the metadata of the given
* <code>ImageReader</code> and <code>ImageWriter</code>.
*
* @param reader an <code>ImageReader</code>.
* @... | Returns an <code>Iterator</code> containing all currently registered <code>ImageTranscoder</code>s that claim to be able to transcode between the metadata of the given <code>ImageReader</code> and <code>ImageWriter</code> | getImageTranscoders | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/javax/imageio/ImageIO.java",
"license": "apache-2.0",
"size": 57777
} | [
"java.util.Collections",
"java.util.Iterator",
"javax.imageio.spi.ImageReaderSpi",
"javax.imageio.spi.ImageTranscoderSpi",
"javax.imageio.spi.ImageWriterSpi",
"javax.imageio.spi.ServiceRegistry"
] | import java.util.Collections; import java.util.Iterator; import javax.imageio.spi.ImageReaderSpi; import javax.imageio.spi.ImageTranscoderSpi; import javax.imageio.spi.ImageWriterSpi; import javax.imageio.spi.ServiceRegistry; | import java.util.*; import javax.imageio.spi.*; | [
"java.util",
"javax.imageio"
] | java.util; javax.imageio; | 2,340,725 |
@Override
public void finishLibraryLoad() {
if (DEBUG) {
Log.i(TAG, "finishLibraryLoad() called");
}
synchronized (mLock) {
ensureInitializedLocked();
if (DEBUG) {
Log.i(TAG, String.format(
Locale.US,
... | void function() { if (DEBUG) { Log.i(TAG, STR); } synchronized (mLock) { ensureInitializedLocked(); if (DEBUG) { Log.i(TAG, String.format( Locale.US, STR, mInBrowserProcess, mBrowserUsesSharedRelro, mWaitForSharedRelros)); } if (mLoadedLibraries == null) { if (DEBUG) { Log.i(TAG, STR); } } else { if (mInBrowserProcess)... | /**
* Call this method just after loading all native shared libraries in this process.
* Note that when in a service process, this will block until the RELRO bundle is
* received, i.e. when another thread calls useSharedRelros().
*/ | Call this method just after loading all native shared libraries in this process. Note that when in a service process, this will block until the RELRO bundle is received, i.e. when another thread calls useSharedRelros() | finishLibraryLoad | {
"repo_name": "js0701/chromium-crosswalk",
"path": "base/android/java/src/org/chromium/base/library_loader/LegacyLinker.java",
"license": "bsd-3-clause",
"size": 24905
} | [
"java.util.Locale",
"org.chromium.base.Log"
] | import java.util.Locale; import org.chromium.base.Log; | import java.util.*; import org.chromium.base.*; | [
"java.util",
"org.chromium.base"
] | java.util; org.chromium.base; | 815,696 |
public int update() {
throw DbException.get(ErrorCode.METHOD_NOT_ALLOWED_FOR_QUERY);
} | int function() { throw DbException.get(ErrorCode.METHOD_NOT_ALLOWED_FOR_QUERY); } | /**
* Execute the statement.
*
* @return the update count
* @throws DbException if it is a query
*/ | Execute the statement | update | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/command/Prepared.java",
"license": "gpl-3.0",
"size": 10168
} | [
"org.h2.constant.ErrorCode",
"org.h2.message.DbException"
] | import org.h2.constant.ErrorCode; import org.h2.message.DbException; | import org.h2.constant.*; import org.h2.message.*; | [
"org.h2.constant",
"org.h2.message"
] | org.h2.constant; org.h2.message; | 900,472 |
protected void changeLedgerPendingEntriesApprovedStatusCode() {
for (LaborLedgerPendingEntry pendingEntry : laborLedgerPendingEntries) {
pendingEntry.setFinancialDocumentApprovedCode(KFSConstants.DocumentStatusCodes.APPROVED);
}
}
| void function() { for (LaborLedgerPendingEntry pendingEntry : laborLedgerPendingEntries) { pendingEntry.setFinancialDocumentApprovedCode(KFSConstants.DocumentStatusCodes.APPROVED); } } | /**
* This method iterates over all of the pending entries for a document and sets their approved status code to APPROVED "A".
*/ | This method iterates over all of the pending entries for a document and sets their approved status code to APPROVED "A" | changeLedgerPendingEntriesApprovedStatusCode | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ld/document/LaborLedgerPostingDocumentBase.java",
"license": "agpl-3.0",
"size": 6957
} | [
"org.kuali.kfs.module.ld.businessobject.LaborLedgerPendingEntry",
"org.kuali.kfs.sys.KFSConstants"
] | import org.kuali.kfs.module.ld.businessobject.LaborLedgerPendingEntry; import org.kuali.kfs.sys.KFSConstants; | import org.kuali.kfs.module.ld.businessobject.*; import org.kuali.kfs.sys.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 845,346 |
@Nonnull
default Optional<URL> getIcon() {
return Optional.empty();
} | default Optional<URL> getIcon() { return Optional.empty(); } | /**
* Retrieves an icon URL which is used to reference this game definition within the application
* UI or an empty optional, if no icon is provided for this definition.
*
* The URL returned by this method may also relate to a module resource (e.g. within the jar of
* a module).
*/ | Retrieves an icon URL which is used to reference this game definition within the application UI or an empty optional, if no icon is provided for this definition. The URL returned by this method may also relate to a module resource (e.g. within the jar of a module) | getIcon | {
"repo_name": "dotStart/Pandemonium",
"path": "game/src/main/java/tv/dotstart/pandemonium/game/Game.java",
"license": "apache-2.0",
"size": 5685
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 883,998 |
@ServiceMethod(returns = ReturnType.SINGLE)
public WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition) {
return createOrUpdateAsync(resourceGroupName, webTestName, webTestDefinition).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) WebTestInner function(String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { return createOrUpdateAsync(resourceGroupName, webTestName, webTestDefinition).block(); } | /**
* Creates or updates an Application Insights web test definition.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param webTestName The name of the Application Insights webtest resource.
* @param webTestDefinition Properties that need to be spec... | Creates or updates an Application Insights web test definition | createOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java",
"license": "mit",
"size": 76603
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.applicationinsights.fluent.models.WebTestInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.applicationinsights.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,726,263 |
@Override
public void putIndexedScript(final PutIndexedScriptRequest request, ActionListener<PutIndexedScriptResponse> listener){
execute(PutIndexedScriptAction.INSTANCE, request, listener);
} | void function(final PutIndexedScriptRequest request, ActionListener<PutIndexedScriptResponse> listener){ execute(PutIndexedScriptAction.INSTANCE, request, listener); } | /**
* Put an indexed script
*/ | Put an indexed script | putIndexedScript | {
"repo_name": "mapr/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/support/AbstractClient.java",
"license": "apache-2.0",
"size": 80152
} | [
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.action.indexedscripts.put.PutIndexedScriptAction",
"org.elasticsearch.action.indexedscripts.put.PutIndexedScriptRequest",
"org.elasticsearch.action.indexedscripts.put.PutIndexedScriptResponse"
] | import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptAction; import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptRequest; import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptResponse; | import org.elasticsearch.action.*; import org.elasticsearch.action.indexedscripts.put.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 1,680,233 |
public List<SearchResultItem> getResultItems() {
return Collections.unmodifiableList(this.resultItems);
} | List<SearchResultItem> function() { return Collections.unmodifiableList(this.resultItems); } | /**
* Returns an immutable view of the result items list.
*
* @return Immutable list view
*/ | Returns an immutable view of the result items list | getResultItems | {
"repo_name": "decoit/cbor-if-map-tnc-base",
"path": "src/main/java/de/decoit/simu/cbor/ifmap/response/model/search/SearchResult.java",
"license": "apache-2.0",
"size": 4009
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,203,120 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.