method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private void changeNullnessOfValue(ValueNumber valueNumber, Location location, DefinitelyNullSet fact, NullnessValue nullnessValue) throws DataflowAnalysisException { // fact.setValue(valueNumber, isNull); // if (isNull) { // fact.addAssignedNullLocation(valueNumber.getNumber(), compactLocationNumbering.getNumbe...
void function(ValueNumber valueNumber, Location location, DefinitelyNullSet fact, NullnessValue nullnessValue) throws DataflowAnalysisException { fact.setNullnessValue(valueNumber, nullnessValue); if (fact.getNulllessValue(valueNumber) != nullnessValue) { throw new IllegalStateException(); } }
/** * Change the nullness of a value number. * * @param valueNumber the ValueNumber * @param location Location where information is gained * @param fact the DefinitelyNullSet to modify * @param nullnessValue the nullness of the value number * @throws DataflowAnalysisException */
Change the nullness of a value number
changeNullnessOfValue
{ "repo_name": "optivo-org/fingbugs-1.3.9-optivo", "path": "src/java/edu/umd/cs/findbugs/ba/npe2/DefinitelyNullSetAnalysis.java", "license": "lgpl-2.1", "size": 10357 }
[ "edu.umd.cs.findbugs.ba.DataflowAnalysisException", "edu.umd.cs.findbugs.ba.Location", "edu.umd.cs.findbugs.ba.vna.ValueNumber" ]
import edu.umd.cs.findbugs.ba.DataflowAnalysisException; import edu.umd.cs.findbugs.ba.Location; import edu.umd.cs.findbugs.ba.vna.ValueNumber;
import edu.umd.cs.findbugs.ba.*; import edu.umd.cs.findbugs.ba.vna.*;
[ "edu.umd.cs" ]
edu.umd.cs;
2,394,630
public TypeValuePair convertTo( final Type targetType, final TypeValuePair valuePair ) throws EvaluationException { if ( targetType.isFlagSet( Type.ARRAY_TYPE ) ) { if ( valuePair.getType().isFlagSet( Type.ARRAY_TYPE ) ) { return valuePair; } else if ( targetT...
TypeValuePair function( final Type targetType, final TypeValuePair valuePair ) throws EvaluationException { if ( targetType.isFlagSet( Type.ARRAY_TYPE ) ) { if ( valuePair.getType().isFlagSet( Type.ARRAY_TYPE ) ) { return valuePair; } else if ( targetType.isFlagSet( Type.SEQUENCE_TYPE ) ) { return convertTo( targetType...
/** * Checks whether the target type would accept the specified value object and value type.<br/> This method is called * for auto conversion of fonction parameters using the conversion type declared by the function metadata. * * @param targetType * @param valuePair * @noinspection ObjectEquality is t...
Checks whether the target type would accept the specified value object and value type. This method is called for auto conversion of fonction parameters using the conversion type declared by the function metadata
convertTo
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "libraries/libformula/src/main/java/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java", "license": "lgpl-2.1", "size": 24034 }
[ "org.pentaho.reporting.libraries.formula.EvaluationException", "org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair", "org.pentaho.reporting.libraries.formula.typing.coretypes.AnyType" ]
import org.pentaho.reporting.libraries.formula.EvaluationException; import org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair; import org.pentaho.reporting.libraries.formula.typing.coretypes.AnyType;
import org.pentaho.reporting.libraries.formula.*; import org.pentaho.reporting.libraries.formula.lvalues.*; import org.pentaho.reporting.libraries.formula.typing.coretypes.*;
[ "org.pentaho.reporting" ]
org.pentaho.reporting;
1,051,079
public int serializableBytes() { if (m_signatureBytes == null) { try { m_signatureBytes = m_signature.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } return FIXED_PAYLOAD_LENGTH + (m_da...
int function() { if (m_signatureBytes == null) { try { m_signatureBytes = m_signature.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } return FIXED_PAYLOAD_LENGTH + (m_data != null ? m_data.remaining() : 0) + m_signatureBytes.length; }
/** * Total bytes that would be used if serialized in its current state. * Does not include 4 byte length prefix that flattenToBuffer adds * @return byte count. */
Total bytes that would be used if serialized in its current state. Does not include 4 byte length prefix that flattenToBuffer adds
serializableBytes
{ "repo_name": "kobronson/cs-voltdb", "path": "src/frontend/org/voltdb/export/ExportProtoMessage.java", "license": "agpl-3.0", "size": 13508 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
541,922
public static String nodeListToString(NodeList nodeList) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); sb.append(nodeToString(node)); } return sb.toString(); }
static String function(NodeList nodeList) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); sb.append(nodeToString(node)); } return sb.toString(); }
/** * Converts the given {@link NodeList} to a {@link String}. */
Converts the given <code>NodeList</code> to a <code>String</code>
nodeListToString
{ "repo_name": "sgilda/windup", "path": "utils/src/main/java/org/jboss/windup/util/xml/XmlUtil.java", "license": "epl-1.0", "size": 6952 }
[ "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,096,810
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == INTENT_REQUEST_GET_IMAGES && resultCode == Activity.RESULT_OK) { ArrayList<Uri> image_uris = data.getParcelableArrayListEx...
void function(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == INTENT_REQUEST_GET_IMAGES && resultCode == Activity.RESULT_OK) { ArrayList<Uri> image_uris = data.getParcelableArrayListExtra(ImagePickerActivity.EXTRA_IMAGE_URIS); for (int i = 0; i <...
/** * Called after ImagePickerActivity is called * * @param requestCode REQUEST Code for opening ImagePickerActivity * @param resultCode result code of the process * @param data Data of the image selected */
Called after ImagePickerActivity is called
onActivityResult
{ "repo_name": "Azooz2014/Images-to-PDF", "path": "app/src/main/java/swati4star/createpdf/Home.java", "license": "gpl-3.0", "size": 14853 }
[ "android.app.Activity", "android.content.Intent", "android.net.Uri", "android.widget.Toast", "com.gun0912.tedpicker.ImagePickerActivity", "java.util.ArrayList" ]
import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.widget.Toast; import com.gun0912.tedpicker.ImagePickerActivity; import java.util.ArrayList;
import android.app.*; import android.content.*; import android.net.*; import android.widget.*; import com.gun0912.tedpicker.*; import java.util.*;
[ "android.app", "android.content", "android.net", "android.widget", "com.gun0912.tedpicker", "java.util" ]
android.app; android.content; android.net; android.widget; com.gun0912.tedpicker; java.util;
2,705,829
public XBeeLocalInterface getDestinationInterface() { return localInterface; }
XBeeLocalInterface function() { return localInterface; }
/** * Retrieves the the destination XBee local interface. * * @return The the destination interface. * * @see #setDestinationInterface(XBeeLocalInterface) * @see XBeeLocalInterface */
Retrieves the the destination XBee local interface
getDestinationInterface
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/main/java/com/digi/xbee/api/packet/relay/UserDataRelayPacket.java", "license": "mpl-2.0", "size": 6871 }
[ "com.digi.xbee.api.models.XBeeLocalInterface" ]
import com.digi.xbee.api.models.XBeeLocalInterface;
import com.digi.xbee.api.models.*;
[ "com.digi.xbee" ]
com.digi.xbee;
599,156
private String makeHttpRequest(String token, String url, String item, String httpMethod, int expectedResponseCode) throws IOException { HttpURLConnection connection = (HttpURLConnection)(new URL(url)).openConnection() ; connection.setDoInput(true); connection.setDoOutput(true); // Set...
String function(String token, String url, String item, String httpMethod, int expectedResponseCode) throws IOException { HttpURLConnection connection = (HttpURLConnection)(new URL(url)).openConnection() ; connection.setDoInput(true); connection.setDoOutput(true); connection.setRequestMethod(httpMethod); connection.setR...
/** * Make an Http request to <code>url</code>, using <code>httpMethod</code>, * post <code>item</code> and return the response. * * @param token authentication token obtained using <code>authenticate</code> * @param url the identifier of the item to update, which has the form * <code>ITEMS_...
Make an Http request to <code>url</code>, using <code>httpMethod</code>, post <code>item</code> and return the response
makeHttpRequest
{ "repo_name": "simonrrr/gdata-java-client", "path": "java/sample/gbase/basic/UpdateExample.java", "license": "apache-2.0", "size": 11715 }
[ "java.io.IOException", "java.io.OutputStream", "java.net.HttpURLConnection" ]
import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,802,917
public long[] getWheelRecipeIds() throws CouldNotGetDataException { long[] ids; int i = 0; SQLiteDatabase db = mDatabaseHelper.getReadableDatabase(); Cursor cursor = db.query(ChefBuddyContract.WheelRecipeTable.TABLE_NAME, null, null, null, null, null, null); ids = new long[...
long[] function() throws CouldNotGetDataException { long[] ids; int i = 0; SQLiteDatabase db = mDatabaseHelper.getReadableDatabase(); Cursor cursor = db.query(ChefBuddyContract.WheelRecipeTable.TABLE_NAME, null, null, null, null, null, null); ids = new long[cursor.getCount()]; try { while (cursor.moveToNext()) { long r...
/** * Returns the complete list of recipe IDs in the wheel_recipe table * @return An array of recipe IDs */
Returns the complete list of recipe IDs in the wheel_recipe table
getWheelRecipeIds
{ "repo_name": "abicelis/ChefBuddy", "path": "app/src/main/java/ve/com/abicelis/chefbuddy/database/ChefBuddyDAO.java", "license": "mit", "size": 66206 }
[ "android.database.Cursor", "android.database.sqlite.SQLiteDatabase" ]
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase;
import android.database.*; import android.database.sqlite.*;
[ "android.database" ]
android.database;
700,240
super.validationTest(HibernateMod10CheckTestCases.getEmptyTestBean(), true, null); }
super.validationTest(HibernateMod10CheckTestCases.getEmptyTestBean(), true, null); }
/** * empty not blank is ok. */
empty not blank is ok
testEmptyMod10CheckIsWrong
{ "repo_name": "ManfredTremmel/gwt-bean-validators", "path": "gwt-bean-validators/src/test/java/de/knightsoftnet/validators/client/GwtTstHibernateMod10Check.java", "license": "apache-2.0", "size": 2045 }
[ "de.knightsoftnet.validators.shared.testcases.HibernateMod10CheckTestCases" ]
import de.knightsoftnet.validators.shared.testcases.HibernateMod10CheckTestCases;
import de.knightsoftnet.validators.shared.testcases.*;
[ "de.knightsoftnet.validators" ]
de.knightsoftnet.validators;
2,521,431
public void setMinDate(final Date minDate) { this.minDate = minDate; }
void function(final Date minDate) { this.minDate = minDate; }
/** * DOCUMENT ME! * * @param minDate DOCUMENT ME! */
DOCUMENT ME
setMinDate
{ "repo_name": "cismet/cids-custom-udm2020-di-server", "path": "src/main/java/de/cismet/cids/custom/udm2020di/types/AggregationValue.java", "license": "lgpl-3.0", "size": 8826 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,618,289
List<Group> getByNameContains(String name);
List<Group> getByNameContains(String name);
/** * Get the list of all groups which names contains the specified name. * * @param name group name * @return list of groups * @throws IllegalArgumentException if name is null */
Get the list of all groups which names contains the specified name
getByNameContains
{ "repo_name": "Noctrunal/jcommune", "path": "jcommune-model/src/main/java/org/jtalks/jcommune/model/dao/GroupDao.java", "license": "lgpl-2.1", "size": 2286 }
[ "java.util.List", "org.jtalks.common.model.entity.Group" ]
import java.util.List; import org.jtalks.common.model.entity.Group;
import java.util.*; import org.jtalks.common.model.entity.*;
[ "java.util", "org.jtalks.common" ]
java.util; org.jtalks.common;
1,674,270
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "cerberustesting/cerberus-source", "path": "source/src/main/java/org/cerberus/servlet/zzpublic/ResultCI.java", "license": "gpl-3.0", "size": 12007 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
362,018
public void testHolidayFromDateAgainstThruDateSucces() throws Exception { long fromDateMillis = new DateMidnight().getMillis(); Calendar fromDate = Calendar.getInstance(); fromDate.setTimeInMillis(fromDateMillis); fromDate.add(Calendar.DAY_OF_MONTH, 1); fromDateMillis = fromD...
void function() throws Exception { long fromDateMillis = new DateMidnight().getMillis(); Calendar fromDate = Calendar.getInstance(); fromDate.setTimeInMillis(fromDateMillis); fromDate.add(Calendar.DAY_OF_MONTH, 1); fromDateMillis = fromDate.getTimeInMillis(); HolidayPK holidayPK = new HolidayPK((short) 1, new Date(from...
/** * test Holiday From Date Against Thru Date Success. */
test Holiday From Date Against Thru Date Success
testHolidayFromDateAgainstThruDateSucces
{ "repo_name": "mifos/1.5.x", "path": "application/src/test/java/org/mifos/application/holiday/business/HolidayBOIntegrationTest.java", "license": "apache-2.0", "size": 8505 }
[ "java.util.Calendar", "java.util.Date", "junit.framework.Assert", "org.joda.time.DateMidnight", "org.mifos.application.holiday.persistence.HolidayPersistence", "org.mifos.framework.hibernate.helper.StaticHibernateUtil", "org.mifos.framework.util.helpers.TestObjectFactory" ]
import java.util.Calendar; import java.util.Date; import junit.framework.Assert; import org.joda.time.DateMidnight; import org.mifos.application.holiday.persistence.HolidayPersistence; import org.mifos.framework.hibernate.helper.StaticHibernateUtil; import org.mifos.framework.util.helpers.TestObjectFactory;
import java.util.*; import junit.framework.*; import org.joda.time.*; import org.mifos.application.holiday.persistence.*; import org.mifos.framework.hibernate.helper.*; import org.mifos.framework.util.helpers.*;
[ "java.util", "junit.framework", "org.joda.time", "org.mifos.application", "org.mifos.framework" ]
java.util; junit.framework; org.joda.time; org.mifos.application; org.mifos.framework;
2,221,761
public void xMinYMid() throws ParseException { align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID; }
void function() throws ParseException { align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID; }
/** * Invoked when 'xMinYMid' has been parsed. * @exception ParseException if an error occured while processing * the transform */
Invoked when 'xMinYMid' has been parsed
xMinYMid
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/ViewBox.java", "license": "apache-2.0", "size": 27227 }
[ "org.apache.batik.parser.ParseException", "org.w3c.dom.svg.SVGPreserveAspectRatio" ]
import org.apache.batik.parser.ParseException; import org.w3c.dom.svg.SVGPreserveAspectRatio;
import org.apache.batik.parser.*; import org.w3c.dom.svg.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
2,749,336
static void visitPostOrder(Node node, Visitor vistor, Predicate<Node> traverseChildrenPred) { if (traverseChildrenPred.apply(node)) { for (Node c = node.getFirstChild(); c != null; c = c.getNext()) { visitPostOrder(c, vistor, traverseChildrenPred); } ...
static void visitPostOrder(Node node, Visitor vistor, Predicate<Node> traverseChildrenPred) { if (traverseChildrenPred.apply(node)) { for (Node c = node.getFirstChild(); c != null; c = c.getNext()) { visitPostOrder(c, vistor, traverseChildrenPred); } } vistor.visit(node); }
/** * A post-order traversal, calling Vistor.visit for each child matching * the predicate. */
A post-order traversal, calling Vistor.visit for each child matching the predicate
visitPostOrder
{ "repo_name": "007slm/kissy", "path": "tools/module-compiler/src/com/google/javascript/jscomp/NodeUtil.java", "license": "mit", "size": 77263 }
[ "com.google.common.base.Predicate", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Predicate; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
2,186,569
private boolean updateImages(boolean forceImage) { ResourceManager parentResourceManager = JFaceResources.getResources(); if (widget instanceof ToolItem) { if (USE_COLOR_ICONS) { ImageDescriptor image = action.getHoverImageDescriptor(); if (image == null) { image = action.getImageDescriptor(); ...
boolean function(boolean forceImage) { ResourceManager parentResourceManager = JFaceResources.getResources(); if (widget instanceof ToolItem) { if (USE_COLOR_ICONS) { ImageDescriptor image = action.getHoverImageDescriptor(); if (image == null) { image = action.getImageDescriptor(); } ImageDescriptor disabledImage = act...
/** * Updates the images for this action. * * @param forceImage * <code>true</code> if some form of image is compulsory, and * <code>false</code> if it is acceptable for this item to have * no image * @return <code>true</code> if there are images for this action, * ...
Updates the images for this action
updateImages
{ "repo_name": "AntoineDelacroix/NewSuperProject-", "path": "org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java", "license": "gpl-2.0", "size": 39559 }
[ "org.eclipse.jface.resource.ImageDescriptor", "org.eclipse.jface.resource.JFaceResources", "org.eclipse.jface.resource.LocalResourceManager", "org.eclipse.jface.resource.ResourceManager", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Item", "org.eclipse.swt.widgets.ToolItem" ]
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.resource.LocalResourceManager; import org.eclipse.jface.resource.ResourceManager; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.ToolI...
import org.eclipse.jface.resource.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.jface", "org.eclipse.swt" ]
org.eclipse.jface; org.eclipse.swt;
2,800,081
return UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8)); }
return UUID.nameUUIDFromBytes((STR + name).getBytes(StandardCharsets.UTF_8)); }
/** * Returns offline mode uuid for name * @param name name * @return offline mode uuid */
Returns offline mode uuid for name
generateOfflineModeUUID
{ "repo_name": "ProtocolSupport/ProtocolSupport", "path": "src/protocolsupport/api/utils/Profile.java", "license": "agpl-3.0", "size": 2580 }
[ "java.nio.charset.StandardCharsets", "java.util.UUID" ]
import java.nio.charset.StandardCharsets; import java.util.UUID;
import java.nio.charset.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
1,706,171
protected ConversionExecutor convertClassToTargetType(final Class targetType) { return this.flowBuilderServices.getConversionService().getConversionExecutor(String.class, targetType); }
ConversionExecutor function(final Class targetType) { return this.flowBuilderServices.getConversionService().getConversionExecutor(String.class, targetType); }
/** * From string to class type, based on the flow conversion service. * * @param targetType the target type * @return the conversion executor */
From string to class type, based on the flow conversion service
convertClassToTargetType
{ "repo_name": "vydra/cas", "path": "core/cas-server-core-webflow/src/main/java/org/apereo/cas/web/flow/AbstractCasWebflowConfigurer.java", "license": "apache-2.0", "size": 27222 }
[ "org.springframework.binding.convert.ConversionExecutor" ]
import org.springframework.binding.convert.ConversionExecutor;
import org.springframework.binding.convert.*;
[ "org.springframework.binding" ]
org.springframework.binding;
2,732,080
PlayerGroup createGroup(Player leader, String name);
PlayerGroup createGroup(Player leader, String name);
/** * Creates a new group. * * @param leader the leader * @param name the group's name - must be unique * @return a new group or null if values are invalid */
Creates a new group
createGroup
{ "repo_name": "DRE2N/DungeonsXL", "path": "api/src/main/java/de/erethon/dungeonsxl/api/DungeonsAPI.java", "license": "gpl-3.0", "size": 10136 }
[ "de.erethon.dungeonsxl.api.player.PlayerGroup", "org.bukkit.entity.Player" ]
import de.erethon.dungeonsxl.api.player.PlayerGroup; import org.bukkit.entity.Player;
import de.erethon.dungeonsxl.api.player.*; import org.bukkit.entity.*;
[ "de.erethon.dungeonsxl", "org.bukkit.entity" ]
de.erethon.dungeonsxl; org.bukkit.entity;
175,582
public Set<String> keySet() { return this.map.keySet(); }
Set<String> function() { return this.map.keySet(); }
/** * Get a set of keys of the JSONObject. * * @return A keySet. */
Get a set of keys of the JSONObject
keySet
{ "repo_name": "shaunstanislaus/actor-platform", "path": "actor-apps/core/src/main/java/im/actor/model/droidkit/json/JSONObject.java", "license": "mit", "size": 36795 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,235,188
public List<Node<T>> getChildren() { if (this.children == null) { return new ArrayList<Node<T>>(); } return this.children; }
List<Node<T>> function() { if (this.children == null) { return new ArrayList<Node<T>>(); } return this.children; }
/** * Return the children of Node<T>. The Tree<T> is represented by a single root * Node<T> whose children are represented by a List<Node<T>>. Each of these * Node<T> elements in the List can have children. The getChildren() method * will return the children of a Node<T>. * * @return the children of ...
Return the children of Node. The Tree is represented by a single root Node whose children are represented by a List<Node>. Each of these Node elements in the List can have children. The getChildren() method will return the children of a Node
getChildren
{ "repo_name": "jmacauley/OpenDRAC", "path": "Server/Common/src/main/java/com/nortel/appcore/app/drac/common/datastructure/tree/Node.java", "license": "gpl-3.0", "size": 3457 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
238,791
EClass getTerminalConstraintTerm();
EClass getTerminalConstraintTerm();
/** * Returns the meta object for class '{@link CIM.IEC61970.Informative.MarketOperations.TerminalConstraintTerm <em>Terminal Constraint Term</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Terminal Constraint Term</em>'. * @see CIM.IEC61970.Informative.Marke...
Returns the meta object for class '<code>CIM.IEC61970.Informative.MarketOperations.TerminalConstraintTerm Terminal Constraint Term</code>'.
getTerminalConstraintTerm
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java", "license": "mit", "size": 688294 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,431,794
public static void build(@Nullable final BufferedSink sink, @Nullable final Iterator<?> iterator, final boolean indent) { buildWithIndent(sink, iterator, indent ? DEFAULT_INDENTATION : null); }
static void function(@Nullable final BufferedSink sink, @Nullable final Iterator<?> iterator, final boolean indent) { buildWithIndent(sink, iterator, indent ? DEFAULT_INDENTATION : null); }
/** * Writes the string representation of a given json array (represented by a list) to a * {@link okio.BufferedSource}. * @param sink the target buffer. * @param iterator the list (iterator) representation of the json array. * @param indent whether to indent (2 spaces) the result or not. */
Writes the string representation of a given json array (represented by a list) to a <code>okio.BufferedSource</code>
build
{ "repo_name": "programingjd/okjson", "path": "src/main/java/info/jdavid/ok/json/Builder.java", "license": "apache-2.0", "size": 25524 }
[ "java.util.Iterator", "javax.annotation.Nullable" ]
import java.util.Iterator; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
2,316,151
public static RepositoryDescriptor read(InputStream[] updateSiteDescriptorStreams, Logger log) throws IOException, JDOMException { UpdateSiteDescriptorReader reader = new UpdateSiteDescriptorReader(updateSiteDescriptorStreams, log); reader.doRead(); return reader.repositoryDescriptor; }
static RepositoryDescriptor function(InputStream[] updateSiteDescriptorStreams, Logger log) throws IOException, JDOMException { UpdateSiteDescriptorReader reader = new UpdateSiteDescriptorReader(updateSiteDescriptorStreams, log); reader.doRead(); return reader.repositoryDescriptor; }
/** * Reads the stream, standing for a content.xml file, and returns the repository descriptor associated with it. * * @param updateSiteDescriptorStream * @param log * @return * @throws IOException * @throws JDOMException */
Reads the stream, standing for a content.xml file, and returns the repository descriptor associated with it
read
{ "repo_name": "awltech/eclipse-p2repo-index", "path": "src/main/java/com/worldline/mojo/p2repoindex/locators/UpdateSiteDescriptorReader.java", "license": "lgpl-3.0", "size": 15046 }
[ "com.worldline.mojo.p2repoindex.descriptors.RepositoryDescriptor", "java.io.IOException", "java.io.InputStream", "org.jdom.JDOMException", "org.slf4j.Logger" ]
import com.worldline.mojo.p2repoindex.descriptors.RepositoryDescriptor; import java.io.IOException; import java.io.InputStream; import org.jdom.JDOMException; import org.slf4j.Logger;
import com.worldline.mojo.p2repoindex.descriptors.*; import java.io.*; import org.jdom.*; import org.slf4j.*;
[ "com.worldline.mojo", "java.io", "org.jdom", "org.slf4j" ]
com.worldline.mojo; java.io; org.jdom; org.slf4j;
476,275
T execute(SqlExecutor executor, Connection connection) throws SQLException; } static final class SelectSequenceValue implements SqlIntegrationCallback<Long> { @Nonnull private final SelectSequenceCommand _sequenceQuery; protected SelectSequenceValue(final SelectSequenceCommand s...
T execute(SqlExecutor executor, Connection connection) throws SQLException; } static final class SelectSequenceValue implements SqlIntegrationCallback<Long> { @Nonnull private final SelectSequenceCommand _sequenceQuery; protected SelectSequenceValue(final SelectSequenceCommand sequenceStatement) { super(); _sequenceQue...
/** * Execute on the given connection, using the provided sql builder object * for building your sql. */
Execute on the given connection, using the provided sql builder object for building your sql
execute
{ "repo_name": "freiheit-com/sqlapi4j", "path": "dao/src/main/java/com/freiheit/sqlapi4j/dao/IntegrationCallbacks.java", "license": "apache-2.0", "size": 13714 }
[ "com.freiheit.sqlapi4j.query.SelectSequenceCommand", "com.freiheit.sqlapi4j.query.SqlExecutor", "java.sql.Connection", "java.sql.SQLException", "javax.annotation.Nonnull" ]
import com.freiheit.sqlapi4j.query.SelectSequenceCommand; import com.freiheit.sqlapi4j.query.SqlExecutor; import java.sql.Connection; import java.sql.SQLException; import javax.annotation.Nonnull;
import com.freiheit.sqlapi4j.query.*; import java.sql.*; import javax.annotation.*;
[ "com.freiheit.sqlapi4j", "java.sql", "javax.annotation" ]
com.freiheit.sqlapi4j; java.sql; javax.annotation;
54,567
public static Integer getRequirementAsCountByPEAndIsScoped(Long portfolioEntryId, Boolean isScoped) { ExpressionList<Requirement> expr = RequirementDAO.findRequirement.where().eq("deleted", false).eq("portfolioEntry.id", portfolioEntryId); if (isScoped != null) { expr = expr.eq("isScop...
static Integer function(Long portfolioEntryId, Boolean isScoped) { ExpressionList<Requirement> expr = RequirementDAO.findRequirement.where().eq(STR, false).eq(STR, portfolioEntryId); if (isScoped != null) { expr = expr.eq(STR, isScoped); } return expr.findRowCount(); }
/** * Get the total number of direct requirements of a portfolio entry * according to the isScoped value. * * @param portfolioEntryId * the portfolio entry id * @param isScoped * if true: get only the scoped requirements, if false: get only * the...
Get the total number of direct requirements of a portfolio entry according to the isScoped value
getRequirementAsCountByPEAndIsScoped
{ "repo_name": "theAgileFactory/maf-desktop-app", "path": "app/dao/delivery/RequirementDAO.java", "license": "gpl-2.0", "size": 15784 }
[ "com.avaje.ebean.ExpressionList" ]
import com.avaje.ebean.ExpressionList;
import com.avaje.ebean.*;
[ "com.avaje.ebean" ]
com.avaje.ebean;
46,123
void execute(PartitionSpecificRunnable task);
void execute(PartitionSpecificRunnable task);
/** * Executes the given {@link PartitionSpecificRunnable} at some point in the future. * * @param task the task the execute. * @throws java.lang.NullPointerException if task is null. */
Executes the given <code>PartitionSpecificRunnable</code> at some point in the future
execute
{ "repo_name": "emrahkocaman/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/spi/impl/operationexecutor/OperationExecutor.java", "license": "apache-2.0", "size": 6204 }
[ "com.hazelcast.spi.impl.PartitionSpecificRunnable" ]
import com.hazelcast.spi.impl.PartitionSpecificRunnable;
import com.hazelcast.spi.impl.*;
[ "com.hazelcast.spi" ]
com.hazelcast.spi;
636,284
@Test public void testJobResultRetrieval() throws Exception { final MiniDispatcher miniDispatcher = createMiniDispatcher(ClusterEntrypoint.ExecutionMode.NORMAL); miniDispatcher.start(); try { // wait until we have submitted the job final TestingJ...
void function() throws Exception { final MiniDispatcher miniDispatcher = createMiniDispatcher(ClusterEntrypoint.ExecutionMode.NORMAL); miniDispatcher.start(); try { final TestingJobManagerRunner testingJobManagerRunner = testingJobManagerRunnerFactory.takeCreatedJobManagerRunner(); testingJobManagerRunner.completeResul...
/** * Tests that the {@link MiniDispatcher} only terminates in {@link * ClusterEntrypoint.ExecutionMode#NORMAL} after it has served the {@link * org.apache.flink.runtime.jobmaster.JobResult} once. */
Tests that the <code>MiniDispatcher</code> only terminates in <code>ClusterEntrypoint.ExecutionMode#NORMAL</code> after it has served the <code>org.apache.flink.runtime.jobmaster.JobResult</code> once
testJobResultRetrieval
{ "repo_name": "clarkyzl/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/MiniDispatcherTest.java", "license": "apache-2.0", "size": 10883 }
[ "java.util.concurrent.CompletableFuture", "org.apache.flink.runtime.entrypoint.ClusterEntrypoint", "org.apache.flink.runtime.jobmaster.JobResult", "org.apache.flink.runtime.jobmaster.TestingJobManagerRunner", "org.apache.flink.runtime.rpc.RpcUtils", "org.hamcrest.Matchers", "org.junit.Assert" ]
import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.entrypoint.ClusterEntrypoint; import org.apache.flink.runtime.jobmaster.JobResult; import org.apache.flink.runtime.jobmaster.TestingJobManagerRunner; import org.apache.flink.runtime.rpc.RpcUtils; import org.hamcrest.Matchers; import org.juni...
import java.util.concurrent.*; import org.apache.flink.runtime.entrypoint.*; import org.apache.flink.runtime.jobmaster.*; import org.apache.flink.runtime.rpc.*; import org.hamcrest.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.hamcrest", "org.junit" ]
java.util; org.apache.flink; org.hamcrest; org.junit;
1,045,912
public static gloTauType fromPerUnaligned(byte[] encodedBytes) { gloTauType result = new gloTauType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; }
static gloTauType function(byte[] encodedBytes) { gloTauType result = new gloTauType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new gloTauType from encoded stream. */
Creates a new gloTauType from encoded stream
fromPerUnaligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/GLONASSclockModel.java", "license": "apache-2.0", "size": 15575 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
244,047
public void setForwarder(MBeanServerForwarder forwarder) { this.forwarder = forwarder; } /** * Set the {@code ObjectName} used to register the {@code JMXConnectorServer}
void function(MBeanServerForwarder forwarder) { this.forwarder = forwarder; } /** * Set the {@code ObjectName} used to register the {@code JMXConnectorServer}
/** * Set an MBeanServerForwarder to be applied to the {@code JMXConnectorServer}. */
Set an MBeanServerForwarder to be applied to the JMXConnectorServer
setForwarder
{ "repo_name": "spring-projects/spring-framework", "path": "spring-context/src/main/java/org/springframework/jmx/support/ConnectorServerFactoryBean.java", "license": "apache-2.0", "size": 7484 }
[ "javax.management.ObjectName", "javax.management.remote.JMXConnectorServer", "javax.management.remote.MBeanServerForwarder" ]
import javax.management.ObjectName; import javax.management.remote.JMXConnectorServer; import javax.management.remote.MBeanServerForwarder;
import javax.management.*; import javax.management.remote.*;
[ "javax.management" ]
javax.management;
1,534,309
EAttribute getTExpression_ExpressionLanguage();
EAttribute getTExpression_ExpressionLanguage();
/** * Returns the meta object for the attribute '{@link org.wso2.developerstudio.eclipse.humantask.model.ht.TExpression#getExpressionLanguage <em>Expression Language</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Expression Language</em>'. * @see org...
Returns the meta object for the attribute '<code>org.wso2.developerstudio.eclipse.humantask.model.ht.TExpression#getExpressionLanguage Expression Language</code>'.
getTExpression_ExpressionLanguage
{ "repo_name": "chanakaudaya/developer-studio", "path": "humantask/org.wso2.tools.humantask.model/src/org/wso2/carbonstudio/eclipse/humantask/model/ht/HTPackage.java", "license": "apache-2.0", "size": 247810 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,563,399
Swarm restartContainer(SwarmId swarmId, ContainerId containerId);
Swarm restartContainer(SwarmId swarmId, ContainerId containerId);
/** * Restart a container inside the swarm. * * @param swarmId * the swarm identifier. * @param containerId * the container identifier. * @return TODO */
Restart a container inside the swarm
restartContainer
{ "repo_name": "quirinobrizi/adam", "path": "adam-rest/src/main/java/eu/codesketch/adam/rest/application/SwarmService.java", "license": "apache-2.0", "size": 2500 }
[ "eu.codesketch.adam.rest.domain.model.Swarm", "eu.codesketch.adam.rest.domain.model.SwarmId", "eu.codesketch.adam.rest.domain.model.container.ContainerId" ]
import eu.codesketch.adam.rest.domain.model.Swarm; import eu.codesketch.adam.rest.domain.model.SwarmId; import eu.codesketch.adam.rest.domain.model.container.ContainerId;
import eu.codesketch.adam.rest.domain.model.*; import eu.codesketch.adam.rest.domain.model.container.*;
[ "eu.codesketch.adam" ]
eu.codesketch.adam;
1,221,282
public static CircuitBreakerExports ofCircuitBreakerRegistry(String prefix, CircuitBreakerRegistry circuitBreakerRegistry) { requireNonNull(prefix); requireNonNull(circuitBreakerRegistry); return new CircuitBreakerExports(prefix, circuitBreakerRegistry); }
static CircuitBreakerExports function(String prefix, CircuitBreakerRegistry circuitBreakerRegistry) { requireNonNull(prefix); requireNonNull(circuitBreakerRegistry); return new CircuitBreakerExports(prefix, circuitBreakerRegistry); }
/** * Creates a new instance of {@link CircuitBreakerExports} with specified metrics names prefix and * {@link CircuitBreakerRegistry} as a source of circuit breakers. * * @param prefix the prefix of metrics names * @param circuitBreakerRegistry the registry of circuit breakers */
Creates a new instance of <code>CircuitBreakerExports</code> with specified metrics names prefix and <code>CircuitBreakerRegistry</code> as a source of circuit breakers
ofCircuitBreakerRegistry
{ "repo_name": "mehtabsinghmann/resilience4j", "path": "resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/CircuitBreakerExports.java", "license": "apache-2.0", "size": 10033 }
[ "io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry", "java.util.Objects" ]
import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry; import java.util.Objects;
import io.github.resilience4j.circuitbreaker.*; import java.util.*;
[ "io.github.resilience4j", "java.util" ]
io.github.resilience4j; java.util;
2,875,061
public Response getEventServiceHead() throws RMapApiException { boolean reqSuccessful = false; Response response = null; try { response = Response.status(Response.Status.OK) .allow(HttpMethod.HEAD,HttpMethod.OPTIONS,HttpMethod.GET) .link(pathUtils.getDocumentationPath(),LinkRels.DC_DESCRIPTION...
Response function() throws RMapApiException { boolean reqSuccessful = false; Response response = null; try { response = Response.status(Response.Status.OK) .allow(HttpMethod.HEAD,HttpMethod.OPTIONS,HttpMethod.GET) .link(pathUtils.getDocumentationPath(),LinkRels.DC_DESCRIPTION) .build(); reqSuccessful = true; } catch (E...
/** * Displays Event Service Options Header. * * @return HTTP Response * @throws RMapApiException the RMap API exception */
Displays Event Service Options Header
getEventServiceHead
{ "repo_name": "rmap-project/rmap", "path": "api/src/main/java/info/rmapproject/api/responsemgr/EventResponseManager.java", "license": "apache-2.0", "size": 9570 }
[ "info.rmapproject.api.exception.ErrorCode", "info.rmapproject.api.exception.RMapApiException", "info.rmapproject.api.utils.LinkRels", "javax.ws.rs.HttpMethod", "javax.ws.rs.core.Response" ]
import info.rmapproject.api.exception.ErrorCode; import info.rmapproject.api.exception.RMapApiException; import info.rmapproject.api.utils.LinkRels; import javax.ws.rs.HttpMethod; import javax.ws.rs.core.Response;
import info.rmapproject.api.exception.*; import info.rmapproject.api.utils.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "info.rmapproject.api", "javax.ws" ]
info.rmapproject.api; javax.ws;
2,064,305
Query getQuery(String queryStr, String ctxStr) throws QueryConstructionException;
Query getQuery(String queryStr, String ctxStr) throws QueryConstructionException;
/** * Returns a query object defined by queryStr asked in Microtheory ctxStr, with default inference * parameters. * * @param queryStr The query string * @param ctxStr The Microtheory where the query is asked * * @return * * @throws QueryConstructionException * */
Returns a query object defined by queryStr asked in Microtheory ctxStr, with default inference parameters
getQuery
{ "repo_name": "cycorp/CycCoreAPI", "path": "core-api/src/main/java/com/cyc/query/spi/QueryService.java", "license": "apache-2.0", "size": 7619 }
[ "com.cyc.query.Query", "com.cyc.query.exception.QueryConstructionException" ]
import com.cyc.query.Query; import com.cyc.query.exception.QueryConstructionException;
import com.cyc.query.*; import com.cyc.query.exception.*;
[ "com.cyc.query" ]
com.cyc.query;
752,106
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ObjectReplicationPolicyInner> createOrUpdateAsync( String resourceGroupName, String accountName, String objectReplicationPolicyId, ObjectReplicationPolicyInner properties);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ObjectReplicationPolicyInner> createOrUpdateAsync( String resourceGroupName, String accountName, String objectReplicationPolicyId, ObjectReplicationPolicyInner properties);
/** * Create or update the object replication policy of the storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage account within the specified resource group. ...
Create or update the object replication policy of the storage account
createOrUpdateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/ObjectReplicationPoliciesOperationsClient.java", "license": "mit", "size": 18352 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.storage.fluent.models.ObjectReplicationPolicyInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.storage.fluent.models.ObjectReplicationPolicyInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.storage.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,178,550
@Test public void readEntitiesAndCheckResponse() { LOGGER.info(" readEntitiesAndCheckResponse"); for (EntityType entityType : serverSettings.getEnabledEntityTypes()) { String response = getEntities(entityType); checkEntitiesAllAspectsForResponse(entityType, response); ...
void function() { LOGGER.info(STR); for (EntityType entityType : serverSettings.getEnabledEntityTypes()) { String response = getEntities(entityType); checkEntitiesAllAspectsForResponse(entityType, response); } }
/** * This method is testing GET entities. It should return 200. Then the * response entities are tested for control information, mandatory * properties, and mandatory related entities. */
This method is testing GET entities. It should return 200. Then the response entities are tested for control information, mandatory properties, and mandatory related entities
readEntitiesAndCheckResponse
{ "repo_name": "FraunhoferIOSB/SensorThingsServer", "path": "FROST-Server.Tests/src/test/java/de/fraunhofer/iosb/ilt/statests/c01sensingcore/Capability1Tests.java", "license": "lgpl-3.0", "size": 28458 }
[ "de.fraunhofer.iosb.ilt.statests.util.EntityType" ]
import de.fraunhofer.iosb.ilt.statests.util.EntityType;
import de.fraunhofer.iosb.ilt.statests.util.*;
[ "de.fraunhofer.iosb" ]
de.fraunhofer.iosb;
2,852,091
private static synchronized void registerProvider0(ZoneRulesProvider provider) { for (String zoneId : provider.provideZoneIds()) { Objects.requireNonNull(zoneId, "zoneId"); ZoneRulesProvider old = ZONES.putIfAbsent(zoneId, provider); if (old != null) { thr...
static synchronized void function(ZoneRulesProvider provider) { for (String zoneId : provider.provideZoneIds()) { Objects.requireNonNull(zoneId, STR); ZoneRulesProvider old = ZONES.putIfAbsent(zoneId, provider); if (old != null) { throw new ZoneRulesException( STR + zoneId + STR + provider); } } Set<String> combinedSet...
/** * Registers the provider. * * @param provider the provider to register, not null * @throws ZoneRulesException if unable to complete the registration */
Registers the provider
registerProvider0
{ "repo_name": "md-5/jdk10", "path": "src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java", "license": "gpl-2.0", "size": 20336 }
[ "java.time.ZonedDateTime", "java.util.Collections", "java.util.HashSet", "java.util.Objects", "java.util.Set" ]
import java.time.ZonedDateTime; import java.util.Collections; import java.util.HashSet; import java.util.Objects; import java.util.Set;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
137,087
@Override public Adapter createActivateFeatureActionAdapter() { if (activateFeatureActionItemProvider == null) { activateFeatureActionItemProvider = new ActivateFeatureActionItemProvider(this); } return activateFeatureActionItemProvider; } protected DeactivateFeatureActionItemProvider deactivateFeatu...
Adapter function() { if (activateFeatureActionItemProvider == null) { activateFeatureActionItemProvider = new ActivateFeatureActionItemProvider(this); } return activateFeatureActionItemProvider; } protected DeactivateFeatureActionItemProvider deactivateFeatureActionItemProvider;
/** * This creates an adapter for a {@link org.tud.inf.st.mbt.actions.ActivateFeatureAction}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.tud.inf.st.mbt.actions.ActivateFeatureAction</code>.
createActivateFeatureActionAdapter
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf.edit/src-gen/org/tud/inf/st/mbt/actions/provider/ActionsItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 18606 }
[ "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,468,405
public void addParty(Party party) { parties.put(party.getName(), party); FileConfiguration partyConfig = dropParty.getConfigManager().getConfig(ConfigType.PARTY); String path = "Parties." + party.getName(); partyConfig.createSection(path); party.save(partyConfig.getConfigurat...
void function(Party party) { parties.put(party.getName(), party); FileConfiguration partyConfig = dropParty.getConfigManager().getConfig(ConfigType.PARTY); String path = STR + party.getName(); partyConfig.createSection(path); party.save(partyConfig.getConfigurationSection(path)); dropParty.getConfigManager().getConfigA...
/** * Adds a party to the manager. * * @param party The party. */
Adds a party to the manager
addParty
{ "repo_name": "ampayne2/DropParty", "path": "src/main/java/ninja/amp/dropparty/PartyManager.java", "license": "lgpl-3.0", "size": 5227 }
[ "ninja.amp.dropparty.config.ConfigType", "ninja.amp.dropparty.parties.Party", "org.bukkit.configuration.file.FileConfiguration" ]
import ninja.amp.dropparty.config.ConfigType; import ninja.amp.dropparty.parties.Party; import org.bukkit.configuration.file.FileConfiguration;
import ninja.amp.dropparty.config.*; import ninja.amp.dropparty.parties.*; import org.bukkit.configuration.file.*;
[ "ninja.amp.dropparty", "org.bukkit.configuration" ]
ninja.amp.dropparty; org.bukkit.configuration;
1,087,078
@Test public void testAnonymousSelfRegistrationDisabled() throws IOException { String postUrl = HttpTest.HTTP_BASE_URL + "/system/userManager/user.create.html"; String userId = "testUser" + random.nextInt(); List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new NameValu...
@Test void function() throws IOException { String postUrl = HttpTest.HTTP_BASE_URL + STR; String userId = STR + random.nextInt(); List<NameValuePair> postParams = new ArrayList<NameValuePair>(); postParams.add(new NameValuePair(":name", userId)); postParams.add(new NameValuePair("pwd", STR)); postParams.add(new NameVal...
/** * Test for SLING-1642 to verify that user self-registration by the anonymous * user is not allowed by default. */
Test for SLING-1642 to verify that user self-registration by the anonymous user is not allowed by default
testAnonymousSelfRegistrationDisabled
{ "repo_name": "tmaret/sling", "path": "launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/userManager/CreateUserTest.java", "license": "apache-2.0", "size": 10889 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "javax.servlet.http.HttpServletResponse", "org.apache.commons.httpclient.NameValuePair", "org.apache.sling.commons.testing.integration.HttpTest", "org.junit.Test" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.apache.commons.httpclient.NameValuePair; import org.apache.sling.commons.testing.integration.HttpTest; import org.junit.Test;
import java.io.*; import java.util.*; import javax.servlet.http.*; import org.apache.commons.httpclient.*; import org.apache.sling.commons.testing.integration.*; import org.junit.*;
[ "java.io", "java.util", "javax.servlet", "org.apache.commons", "org.apache.sling", "org.junit" ]
java.io; java.util; javax.servlet; org.apache.commons; org.apache.sling; org.junit;
858,464
public void setFile(File file) { this.file = file; // update configuration as well getConfiguration().setDirectory(FileUtil.isAbsolute(file) ? file.getAbsolutePath() : file.getPath()); }
void function(File file) { this.file = file; getConfiguration().setDirectory(FileUtil.isAbsolute(file) ? file.getAbsolutePath() : file.getPath()); }
/** * The starting directory */
The starting directory
setFile
{ "repo_name": "logzio/camel", "path": "camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java", "license": "apache-2.0", "size": 7175 }
[ "java.io.File", "org.apache.camel.util.FileUtil" ]
import java.io.File; import org.apache.camel.util.FileUtil;
import java.io.*; import org.apache.camel.util.*;
[ "java.io", "org.apache.camel" ]
java.io; org.apache.camel;
351,845
@SuppressWarnings({"BusyWait"}) private static void test(C2<Integer, ConcurrentLinkedHashMap<Integer, Integer>, Integer> readOp, int threadCnt, double writeProportion) { assert writeProportion < 1; ConcurrentLinkedHashMap<Integer, Integer> map = new ConcurrentLinkedHashMap<>(); ...
@SuppressWarnings({STR}) static void function(C2<Integer, ConcurrentLinkedHashMap<Integer, Integer>, Integer> readOp, int threadCnt, double writeProportion) { assert writeProportion < 1; ConcurrentLinkedHashMap<Integer, Integer> map = new ConcurrentLinkedHashMap<>(); CyclicBarrier barrier = new CyclicBarrier(threadCnt ...
/** * Test a generic access method on map. * * @param readOp Access method to test. * @param threadCnt Number of threads to run. * @param writeProportion Amount of writes from total number of iterations. */
Test a generic access method on map
test
{ "repo_name": "vldpyatkov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/loadtests/lang/GridConcurrentLinkedHashMapBenchmark.java", "license": "apache-2.0", "size": 7582 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Random", "java.util.concurrent.BrokenBarrierException", "java.util.concurrent.CyclicBarrier", "org.jsr166.ConcurrentLinkedHashMap" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Random; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import org.jsr166.ConcurrentLinkedHashMap;
import java.util.*; import java.util.concurrent.*; import org.jsr166.*;
[ "java.util", "org.jsr166" ]
java.util; org.jsr166;
111,736
public Annotation getAnnotation() { return annotation; }
Annotation function() { return annotation; }
/** * Get the underlying annotation. * * @return {@code non-null;} the annotation */
Get the underlying annotation
getAnnotation
{ "repo_name": "nikita36078/J2ME-Loader", "path": "dexlib/src/main/java/com/android/dx/rop/cst/CstAnnotation.java", "license": "apache-2.0", "size": 2411 }
[ "com.android.dx.rop.annotation.Annotation" ]
import com.android.dx.rop.annotation.Annotation;
import com.android.dx.rop.annotation.*;
[ "com.android.dx" ]
com.android.dx;
2,115,899
private void cursorChange(String sqlState, String initialCursor, String positionedStatement, String changeToCursor) throws SQLException { // Since these tests delete rows we add a couple more to // ensure any cursor we open has at least one row. Statem...
void function(String sqlState, String initialCursor, String positionedStatement, String changeToCursor) throws SQLException { Statement s = createStatement(); s.executeUpdate(STR); s.executeUpdate(STR); s.close(); commit(); cursorChange(sqlState, STR, initialCursor, positionedStatement, changeToCursor); cursorChange(sq...
/** * Run cursorChange() with an application provided name * and a system provided name. * */
Run cursorChange() with an application provided name and a system provided name
cursorChange
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/CurrentOfTest.java", "license": "agpl-3.0", "size": 23325 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
755,521
public void lambda14() { int[] numbersA = {0, 2, 4, 5, 6, 8, 9}; int[] numbersB = {1, 3, 5, 7, 8}; System.out.println("Pairs where a < b:"); Arrays.stream(numbersA) .forEach(a -> Arrays.stream(numbersB) .filter(b -> a < b) ...
void function() { int[] numbersA = {0, 2, 4, 5, 6, 8, 9}; int[] numbersB = {1, 3, 5, 7, 8}; System.out.println(STR); Arrays.stream(numbersA) .forEach(a -> Arrays.stream(numbersB) .filter(b -> a < b) .forEach(b -> { System.out.println(String.format(STR, a, b)); }) ); } /** * A nested forEach to produce all customer/orde...
/** * Given two arrays we find all pairs where a is &lt; b. */
Given two arrays we find all pairs where a is &lt; b
lambda14
{ "repo_name": "brettryan/jdk8-lambda-samples", "path": "src/main/java/com/drunkendev/lambdas/ProjectionOperators.java", "license": "apache-2.0", "size": 10353 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,692,240
@EventHandler(value = "enter", target = "@txtPassword1") private void onEnter$txtPassword1() { txtPassword2.setFocus(true); txtPassword2.selectAll(); }
@EventHandler(value = "enter", target = STR) private void onEnter$txtPassword1() { txtPassword2.setFocus(true); txtPassword2.selectAll(); }
/** * Pressing return in the new password text box moves to the confirm password text box. */
Pressing return in the new password text box moves to the confirm password text box
onEnter$txtPassword1
{ "repo_name": "carewebframework/carewebframework-core", "path": "org.carewebframework.security-parent/org.carewebframework.security.core/src/main/java/org/carewebframework/security/controller/PasswordChangeController.java", "license": "apache-2.0", "size": 5402 }
[ "org.fujion.annotation.EventHandler" ]
import org.fujion.annotation.EventHandler;
import org.fujion.annotation.*;
[ "org.fujion.annotation" ]
org.fujion.annotation;
530,692
public void setContainerHLMarkingHLAPI( HLMarkingHLAPI elem){ if(elem!=null) item.setContainerHLMarking((HLMarking)elem.getContainedItem()); }
void function( HLMarkingHLAPI elem){ if(elem!=null) item.setContainerHLMarking((HLMarking)elem.getContainedItem()); }
/** * set ContainerHLMarking */
set ContainerHLMarking
setContainerHLMarkingHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/multisets/hlapi/EmptyHLAPI.java", "license": "epl-1.0", "size": 113920 }
[ "fr.lip6.move.pnml.hlpn.hlcorestructure.HLMarking", "fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLMarkingHLAPI" ]
import fr.lip6.move.pnml.hlpn.hlcorestructure.HLMarking; import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLMarkingHLAPI;
import fr.lip6.move.pnml.hlpn.hlcorestructure.*; import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,442,551
public boolean tryResetResponse() throws IOException { if (!super.tryResetResponse()) { try { if (!this.response.isCommitted()) { this.response.reset(); if (getLogger().isDebugEnabled()) { getLogger().debug("Response...
boolean function() throws IOException { if (!super.tryResetResponse()) { try { if (!this.response.isCommitted()) { this.response.reset(); if (getLogger().isDebugEnabled()) { getLogger().debug(STR); } return true; } } catch (Exception e) { getLogger().warn(STR, e); } if (getLogger().isDebugEnabled()) { getLogger().debug...
/** * Reset the response if possible. This allows error handlers to have * a higher chance to produce clean output if the pipeline that raised * the error has already output some data. * * @return true if the response was successfully reset */
Reset the response if possible. This allows error handlers to have a higher chance to produce clean output if the pipeline that raised the error has already output some data
tryResetResponse
{ "repo_name": "apache/cocoon", "path": "blocks/cocoon-portal/cocoon-portal-portlet-env/src/main/java/org/apache/cocoon/environment/portlet/PortletEnvironment.java", "license": "apache-2.0", "size": 9723 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
189,620
private Object[] buildCategoryNodes(Collection<ChildAssociationRef> cars) { Object[] categoryNodes = new Object[cars.size()]; int i = 0; for (ChildAssociationRef car : cars) { categoryNodes[i++] = new CategoryNode(car.getChildRef(), this.services, getScope()); ...
Object[] function(Collection<ChildAssociationRef> cars) { Object[] categoryNodes = new Object[cars.size()]; int i = 0; for (ChildAssociationRef car : cars) { categoryNodes[i++] = new CategoryNode(car.getChildRef(), this.services, getScope()); } return categoryNodes; }
/** * Build category nodes. * * @param cars list of associations to category nodes * @return {@link Object}[] array of category nodes */
Build category nodes
buildCategoryNodes
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/jscript/Classification.java", "license": "lgpl-3.0", "size": 7057 }
[ "java.util.Collection", "org.alfresco.service.cmr.repository.ChildAssociationRef" ]
import java.util.Collection; import org.alfresco.service.cmr.repository.ChildAssociationRef;
import java.util.*; import org.alfresco.service.cmr.repository.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
1,320,472
void responseCompleted() throws IOException, HttpException;
void responseCompleted() throws IOException, HttpException;
/** * Invoked to signal that the response has been fully processed. */
Invoked to signal that the response has been fully processed
responseCompleted
{ "repo_name": "viapp/httpasyncclient-android", "path": "src/main/java/org/apache/http/nio/protocol/HttpAsyncClientExchangeHandler.java", "license": "apache-2.0", "size": 6225 }
[ "java.io.IOException", "org.apache.http.HttpException" ]
import java.io.IOException; import org.apache.http.HttpException;
import java.io.*; import org.apache.http.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
2,396,740
protected void callVerifyObjectTrust(Object obj, ClassLoader loader, Collection context) throws RemoteException { logger.fine("Call 'Security.verifyObjectTrust(" + obj + ", " + loader + ", " + context + ")'."); Security.verifyObjectTrust(obj, loader, context); }
void function(Object obj, ClassLoader loader, Collection context) throws RemoteException { logger.fine(STR + obj + STR + loader + STR + context + ")'."); Security.verifyObjectTrust(obj, loader, context); }
/** * Invokes 'Security.verifyObjectTrust' method with given arguments. * Rethrows any exception thrown by 'verifyObjectTrust' method. * * @param obj Object for 'verifyObjectTrust' method * @param loader ClassLoader for 'verifyObjectTrust' method * @param context Collection for 'verifyObje...
Invokes 'Security.verifyObjectTrust' method with given arguments. Rethrows any exception thrown by 'verifyObjectTrust' method
callVerifyObjectTrust
{ "repo_name": "cdegroot/river", "path": "qa/src/com/sun/jini/test/spec/security/security/VerifyObjectTrustTest.java", "license": "apache-2.0", "size": 20564 }
[ "java.rmi.RemoteException", "java.util.Collection", "net.jini.security.Security" ]
import java.rmi.RemoteException; import java.util.Collection; import net.jini.security.Security;
import java.rmi.*; import java.util.*; import net.jini.security.*;
[ "java.rmi", "java.util", "net.jini.security" ]
java.rmi; java.util; net.jini.security;
712,210
public Report createReport(InputStream reportObjectiveAsXml) { accessChecker.checkIsLoggedInUserMemberOfGroup(ProjectForgeGroup.FINANCE_GROUP, ProjectForgeGroup.CONTROLLING_GROUP); ReportObjective reportObjective = deserializeFromXML(reportObjectiveAsXml); if (reportObjective == null) { ...
Report function(InputStream reportObjectiveAsXml) { accessChecker.checkIsLoggedInUserMemberOfGroup(ProjectForgeGroup.FINANCE_GROUP, ProjectForgeGroup.CONTROLLING_GROUP); ReportObjective reportObjective = deserializeFromXML(reportObjectiveAsXml); if (reportObjective == null) { return null; } Report report = new Report(r...
/** * Erzeugt einen Report ohne Zeitraumangabe. Es wird lediglich das ReportObjective als xml vom InputStream * deserialisiert und dem erzeugtem Report zugewiesen. * * @param reportObjectiveAsXml ReportObjective als XML. * @see #deserializeFromXML(InputStream) */
Erzeugt einen Report ohne Zeitraumangabe. Es wird lediglich das ReportObjective als xml vom InputStream deserialisiert und dem erzeugtem Report zugewiesen
createReport
{ "repo_name": "micromata/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/business/fibu/kost/reporting/ReportDao.java", "license": "gpl-3.0", "size": 4603 }
[ "java.io.InputStream", "org.projectforge.business.user.ProjectForgeGroup" ]
import java.io.InputStream; import org.projectforge.business.user.ProjectForgeGroup;
import java.io.*; import org.projectforge.business.user.*;
[ "java.io", "org.projectforge.business" ]
java.io; org.projectforge.business;
883,537
public static boolean validateBinding(String valueSelector, Class<? extends Item> itemClass) throws IllegalArgumentException, InvalidClassException { for (RFXComValueSelector c : RFXComValueSelector.values()) { if (c.text.equals(valueSelector)) { if (c.getItemClass(...
static boolean function(String valueSelector, Class<? extends Item> itemClass) throws IllegalArgumentException, InvalidClassException { for (RFXComValueSelector c : RFXComValueSelector.values()) { if (c.text.equals(valueSelector)) { if (c.getItemClass().equals(itemClass)) { return true; } else { throw new InvalidClassE...
/** * Procedure to validate selector string. * * @param valueSelector * selector string e.g. RawData, Command, Temperature * @return true if item is valid. * @throws IllegalArgumentException * Not valid value selector. * @throws InvalidClassException ...
Procedure to validate selector string
validateBinding
{ "repo_name": "beowulfe/openhab", "path": "bundles/binding/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/RFXComValueSelector.java", "license": "epl-1.0", "size": 4863 }
[ "java.io.InvalidClassException", "org.openhab.core.items.Item" ]
import java.io.InvalidClassException; import org.openhab.core.items.Item;
import java.io.*; import org.openhab.core.items.*;
[ "java.io", "org.openhab.core" ]
java.io; org.openhab.core;
2,676,133
private void addDevice(final FacesContext context) { device.setEnabled(Authorize.ENABLE); device.setPatient(patient); final DeviceManagerResult result = deviceFacade.add(device); final DeviceManagerStatus status = result.getStatus(); if (result.isSuccess()) { fina...
void function(final FacesContext context) { device.setEnabled(Authorize.ENABLE); device.setPatient(patient); final DeviceManagerResult result = deviceFacade.add(device); final DeviceManagerStatus status = result.getStatus(); if (result.isSuccess()) { final String detail = String.format(MSG_NEW_PATIENT_SAVED_PATTERN, pa...
/** * Sisteme yeni bir cihaz ekler * * @param context */
Sisteme yeni bir cihaz ekler
addDevice
{ "repo_name": "omerozkan/vipera", "path": "vipera-jsf/src/main/java/info/ozkan/vipera/views/device/DeviceAddBean.java", "license": "gpl-3.0", "size": 7061 }
[ "info.ozkan.vipera.business.device.DeviceManagerResult", "info.ozkan.vipera.business.device.DeviceManagerStatus", "info.ozkan.vipera.entities.Authorize", "info.ozkan.vipera.entities.Device", "javax.faces.context.FacesContext" ]
import info.ozkan.vipera.business.device.DeviceManagerResult; import info.ozkan.vipera.business.device.DeviceManagerStatus; import info.ozkan.vipera.entities.Authorize; import info.ozkan.vipera.entities.Device; import javax.faces.context.FacesContext;
import info.ozkan.vipera.business.device.*; import info.ozkan.vipera.entities.*; import javax.faces.context.*;
[ "info.ozkan.vipera", "javax.faces" ]
info.ozkan.vipera; javax.faces;
556,837
private void deleteBatch(List<String> messageIds) throws IOException { int retries = 0; List<String> errorMessages = new ArrayList<>(); Map<String, String> pendingReceipts = IntStream.range(0, messageIds.size()) .boxed() .filter(i -> inFlight.containsKey(messageIds.get(i)))...
void function(List<String> messageIds) throws IOException { int retries = 0; List<String> errorMessages = new ArrayList<>(); Map<String, String> pendingReceipts = IntStream.range(0, messageIds.size()) .boxed() .filter(i -> inFlight.containsKey(messageIds.get(i))) .collect(toMap(Object::toString, i -> inFlight.get(messa...
/** * delete the provided {@code messageIds} from SQS, blocking until all of the messages are * deleted. * * <p>CAUTION: May be invoked from a separate thread. * * <p>CAUTION: Retains {@code messageIds}. */
delete the provided messageIds from SQS, blocking until all of the messages are deleted
deleteBatch
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedReader.java", "license": "apache-2.0", "size": 36369 }
[ "com.amazonaws.services.sqs.model.BatchResultErrorEntry", "com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry", "com.amazonaws.services.sqs.model.DeleteMessageBatchResult", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.Set", "java.util.strea...
import com.amazonaws.services.sqs.model.BatchResultErrorEntry; import com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry; import com.amazonaws.services.sqs.model.DeleteMessageBatchResult; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.S...
import com.amazonaws.services.sqs.model.*; import java.io.*; import java.util.*; import java.util.stream.*;
[ "com.amazonaws.services", "java.io", "java.util" ]
com.amazonaws.services; java.io; java.util;
2,481,960
public void setUserPersistence(UserPersistence userPersistence) { this.userPersistence = userPersistence; }
void function(UserPersistence userPersistence) { this.userPersistence = userPersistence; }
/** * Sets the user persistence. * * @param userPersistence the user persistence */
Sets the user persistence
setUserPersistence
{ "repo_name": "RMarinDTI/CloubityRepo", "path": "Servicio-portlet/docroot/WEB-INF/src/es/davinciti/liferay/service/base/CurrencyServiceBaseImpl.java", "license": "unlicense", "size": 52888 }
[ "com.liferay.portal.service.persistence.UserPersistence" ]
import com.liferay.portal.service.persistence.UserPersistence;
import com.liferay.portal.service.persistence.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,247,464
private String computeRequestSubsettingLimits(GetCoverageRequest req, Metadata coverage) throws WCSException { int dims = coverage.getDimension(), i = 0; String[] limits = new String[dims]; Double[] high = new Double[dims]; Double[] low = new Double[dims]; String[...
String function(GetCoverageRequest req, Metadata coverage) throws WCSException { int dims = coverage.getDimension(), i = 0; String[] limits = new String[dims]; Double[] high = new Double[dims]; Double[] low = new Double[dims]; String[] axesLabels = new String[dims]; boolean[] sliced = new boolean[dims]; boolean[] trimm...
/** * Computes the domain of the new coverage, and returns a string that can be * used to do subsetting on the original coverage. Also computes the low, high * and the axis labels for the new coverage. * * @param coverage * @return * @throws WCSException */
Computes the domain of the new coverage, and returns a string that can be used to do subsetting on the original coverage. Also computes the low, high and the axis labels for the new coverage
computeRequestSubsettingLimits
{ "repo_name": "dioptre/rasdaman", "path": "applications/petascope/src/main/java/petascope/wcs2/legacy/GetCoverageOld2.java", "license": "gpl-3.0", "size": 9035 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
536,034
public void start(String tag, String[] names, String[] values, int nattr) throws IOException { tag(tag, names, values, nattr, false); }
void function(String tag, String[] names, String[] values, int nattr) throws IOException { tag(tag, names, values, nattr, false); }
/** * Write a start tag with attributes. The tag will be followed by a newline, and the indentation * level will be increased. * * @param tag the tag name * @param names the names of the attributes * @param values the values of the attributes * @param nattr the number of attributes * @throws IOE...
Write a start tag with attributes. The tag will be followed by a newline, and the indentation level will be increased
start
{ "repo_name": "hsanchez/demodetect", "path": "src/edu/ucsc/twitter/util/XmlWriter.java", "license": "apache-2.0", "size": 15362 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,432,309
public User getRequestingUser();
User function();
/** * Returns the user which requested a resource. * * @return The user which requested a resource, never <code>null</code>. */
Returns the user which requested a resource
getRequestingUser
{ "repo_name": "AludraTest/cloud-manager-api", "path": "src/main/java/org/aludratest/cloud/request/ResourceRequest.java", "license": "apache-2.0", "size": 2372 }
[ "org.aludratest.cloud.user.User" ]
import org.aludratest.cloud.user.User;
import org.aludratest.cloud.user.*;
[ "org.aludratest.cloud" ]
org.aludratest.cloud;
1,618,863
private String lockRandomNamespace(final boolean readOnly) { final int k = r.nextInt((int) namespaceExistCounter.get()); int i = -1; while (true) { for (Map.Entry<String, ReadWriteLock> e : namespaces.entrySet()) { if (namespaceExistCounter...
String function(final boolean readOnly) { final int k = r.nextInt((int) namespaceExistCounter.get()); int i = -1; while (true) { for (Map.Entry<String, ReadWriteLock> e : namespaces.entrySet()) { if (namespaceExistCounter.get() == 0) { throw new RuntimeException(STR + readOnly); } i++; if (i < k) { continue; } final St...
/** * Return a namespace at random from the set of known to exist * namespaces. The caller will hold the appropriate lock. */
Return a namespace at random from the set of known to exist namespaces. The caller will hold the appropriate lock
lockRandomNamespace
{ "repo_name": "blazegraph/database", "path": "bigdata-sails-test/src/test/java/com/bigdata/rdf/sail/webapp/StressTestConcurrentRestApiRequests.java", "license": "gpl-2.0", "size": 69678 }
[ "java.util.Map", "java.util.concurrent.locks.Lock", "java.util.concurrent.locks.ReadWriteLock" ]
import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock;
import java.util.*; import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
629,779
public final MetaProperty<Region> region() { return _region; }
final MetaProperty<Region> function() { return _region; }
/** * The meta-property for the {@code region} property. * @return the meta-property, not null */
The meta-property for the region property
region
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/legalentity/LegalEntity.java", "license": "apache-2.0", "size": 16071 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
349,627
public static String validateBagOperations(String bagName, String[] selectedBags, String operation) { try { ServletContext servletContext = WebContextFactory.get().getServletContext(); HttpSession session = WebContextFactory.get().getSes...
static String function(String bagName, String[] selectedBags, String operation) { try { ServletContext servletContext = WebContextFactory.get().getServletContext(); HttpSession session = WebContextFactory.get().getSession(); Profile profile = SessionMethods.getProfile(session); if (selectedBags.length == 0) { return ST...
/** * validation that happens before new bag is saved * @param bagName name of new list * @param selectedBags bags involved in operation * @param operation which operation is taking place - delete, union, intersect or subtract * @return error msg, if any */
validation that happens before new bag is saved
validateBagOperations
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/web/main/src/org/intermine/dwr/AjaxServices.java", "license": "lgpl-2.1", "size": 63770 }
[ "java.util.HashSet", "java.util.Properties", "java.util.Set", "javax.servlet.ServletContext", "javax.servlet.http.HttpSession", "org.directwebremoting.WebContextFactory", "org.intermine.api.profile.Profile", "org.intermine.api.util.NameUtil", "org.intermine.web.logic.session.SessionMethods" ]
import java.util.HashSet; import java.util.Properties; import java.util.Set; import javax.servlet.ServletContext; import javax.servlet.http.HttpSession; import org.directwebremoting.WebContextFactory; import org.intermine.api.profile.Profile; import org.intermine.api.util.NameUtil; import org.intermine.web.logic.sessio...
import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.directwebremoting.*; import org.intermine.api.profile.*; import org.intermine.api.util.*; import org.intermine.web.logic.session.*;
[ "java.util", "javax.servlet", "org.directwebremoting", "org.intermine.api", "org.intermine.web" ]
java.util; javax.servlet; org.directwebremoting; org.intermine.api; org.intermine.web;
2,101,289
protected void updateAccountAmount(KualiDecimal additionalAmount, PurchasingAccountsPayableLineAssetAccount targetAccount) { KualiDecimal baseAmount = targetAccount.getItemAccountTotalAmount(); targetAccount.setItemAccountTotalAmount(baseAmount != null ? baseAmount.add(additionalAmount) : additional...
void function(KualiDecimal additionalAmount, PurchasingAccountsPayableLineAssetAccount targetAccount) { KualiDecimal baseAmount = targetAccount.getItemAccountTotalAmount(); targetAccount.setItemAccountTotalAmount(baseAmount != null ? baseAmount.add(additionalAmount) : additionalAmount); }
/** * Update targetAccount by additionalAmount. * * @param additionalAmount * @param targetAccount */
Update targetAccount by additionalAmount
updateAccountAmount
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/cab/document/service/impl/PurApLineServiceImpl.java", "license": "apache-2.0", "size": 62162 }
[ "org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableLineAssetAccount", "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableLineAssetAccount; 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;
2,664,698
public void test_2515() throws Exception { Connection conn = getConnection(); PreparedStatement ps = conn.prepareStatement ( "create type price_2515 external name 'com.splicemachine.dbTesting.functionTests.tests.lang.Price' language java\n" )...
void function() throws Exception { Connection conn = getConnection(); PreparedStatement ps = conn.prepareStatement ( STR ); ps.execute(); ps.close(); ps = conn.prepareStatement ( STR + "(\n" + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + "...
/** * Test that INOUT args are preserved over procedure invocations. * See DERBY-2515. */
Test that INOUT args are preserved over procedure invocations. See DERBY-2515
test_2515
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbcapi/ProcedureTest.java", "license": "agpl-3.0", "size": 64568 }
[ "java.sql.CallableStatement", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.Types" ]
import java.sql.CallableStatement; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,054,853
public void resetConfig(boolean resetTrans) { String dir = Bundles.getDirectory(); Bundles.setDirectory(null); try { try { ConfigBundle config = new ConfigBundle(); config.updateFile(configDir); } catch (IOException e) { tracer.error(e); } try { UiConfigBundle uiconfig = new UiConfi...
void function(boolean resetTrans) { String dir = Bundles.getDirectory(); Bundles.setDirectory(null); try { try { ConfigBundle config = new ConfigBundle(); config.updateFile(configDir); } catch (IOException e) { tracer.error(e); } try { UiConfigBundle uiconfig = new UiConfigBundle(); uiconfig.updateFile(configDir); } ca...
/** * Reset the configuration. * * @param resetTrans * also reset the translation files */
Reset the configuration
resetConfig
{ "repo_name": "nikiroo/fanfix", "path": "src/be/nikiroo/fanfix/Instance.java", "license": "gpl-3.0", "size": 17731 }
[ "be.nikiroo.fanfix.bundles.ConfigBundle", "be.nikiroo.fanfix.bundles.StringIdBundle", "be.nikiroo.fanfix.bundles.UiConfigBundle", "be.nikiroo.utils.resources.Bundles", "java.io.IOException" ]
import be.nikiroo.fanfix.bundles.ConfigBundle; import be.nikiroo.fanfix.bundles.StringIdBundle; import be.nikiroo.fanfix.bundles.UiConfigBundle; import be.nikiroo.utils.resources.Bundles; import java.io.IOException;
import be.nikiroo.fanfix.bundles.*; import be.nikiroo.utils.resources.*; import java.io.*;
[ "be.nikiroo.fanfix", "be.nikiroo.utils", "java.io" ]
be.nikiroo.fanfix; be.nikiroo.utils; java.io;
2,810,645
public Builder withBulkhead(Bulkhead bulkhead) { addFeignDecorator(fn -> Bulkhead.decorateCheckedFunction(bulkhead, fn)); return this; }
Builder function(Bulkhead bulkhead) { addFeignDecorator(fn -> Bulkhead.decorateCheckedFunction(bulkhead, fn)); return this; }
/** * Adds a {@link Bulkhead} to the decorator chain. * * @param bulkhead a fully configured {@link Bulkhead}. * @return the builder */
Adds a <code>Bulkhead</code> to the decorator chain
withBulkhead
{ "repo_name": "RobWin/circuitbreaker-java8", "path": "resilience4j-feign/src/main/java/io/github/resilience4j/feign/FeignDecorators.java", "license": "apache-2.0", "size": 10209 }
[ "io.github.resilience4j.bulkhead.Bulkhead" ]
import io.github.resilience4j.bulkhead.Bulkhead;
import io.github.resilience4j.bulkhead.*;
[ "io.github.resilience4j" ]
io.github.resilience4j;
459,947
public Locale getMainLocale() { if (m_mainLocale != null) { return m_mainLocale; } try { CmsLocaleGroup localeGroup = m_cms.getLocaleGroupService().readLocaleGroup(this); m_mainLocale = localeGroup.getMainLocale(); return m_mainLocale; ...
Locale function() { if (m_mainLocale != null) { return m_mainLocale; } try { CmsLocaleGroup localeGroup = m_cms.getLocaleGroupService().readLocaleGroup(this); m_mainLocale = localeGroup.getMainLocale(); return m_mainLocale; } catch (CmsException e) { return null; } }
/** * Returns the main locale for this resource.<p> * * @return the main locale for this resource */
Returns the main locale for this resource
getMainLocale
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/jsp/CmsJspResourceWrapper.java", "license": "lgpl-2.1", "size": 34361 }
[ "java.util.Locale", "org.opencms.i18n.CmsLocaleGroup", "org.opencms.main.CmsException" ]
import java.util.Locale; import org.opencms.i18n.CmsLocaleGroup; import org.opencms.main.CmsException;
import java.util.*; import org.opencms.i18n.*; import org.opencms.main.*;
[ "java.util", "org.opencms.i18n", "org.opencms.main" ]
java.util; org.opencms.i18n; org.opencms.main;
1,592,891
private void createGeneratePane() { genPnl = paneEx(10, 10, 0, 10); genPnl.addColumn(); genPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS); genPnl.addColumn(35, 35, 35, Priority.NEVER); genPnl.addRow(100, 100, Double.MAX_VALUE, Priority.ALWAYS); genPnl.ad...
void function() { genPnl = paneEx(10, 10, 0, 10); genPnl.addColumn(); genPnl.addColumn(100, 100, Double.MAX_VALUE, Priority.ALWAYS); genPnl.addColumn(35, 35, 35, Priority.NEVER); genPnl.addRow(100, 100, Double.MAX_VALUE, Priority.ALWAYS); genPnl.addRows(7); TableColumn<PojoDescriptor, Boolean> useCol = customColumn(STR...
/** * Create generate pane with controls. */
Create generate pane with controls
createGeneratePane
{ "repo_name": "agura/incubator-ignite", "path": "modules/schema-import/src/main/java/org/apache/ignite/schema/ui/SchemaImportApp.java", "license": "apache-2.0", "size": 67649 }
[ "org.apache.ignite.schema.model.PojoDescriptor", "org.apache.ignite.schema.ui.Controls" ]
import org.apache.ignite.schema.model.PojoDescriptor; import org.apache.ignite.schema.ui.Controls;
import org.apache.ignite.schema.model.*; import org.apache.ignite.schema.ui.*;
[ "org.apache.ignite" ]
org.apache.ignite;
363,409
public int onMetric(ByteBuf buf);
int function(ByteBuf buf);
/** * Handles a buffer of messages * @param buf the buffer * @return the number of messages extracted and processed from the buffer */
Handles a buffer of messages
onMetric
{ "repo_name": "nickman/HeliosStreams", "path": "stream-common/src/main/java/com/heliosapm/streams/chronicle/MessageListener.java", "license": "apache-2.0", "size": 1247 }
[ "io.netty.buffer.ByteBuf" ]
import io.netty.buffer.ByteBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
1,153,827
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void createAnomalyAlertConfiguration(HttpClient httpClient, MetricsAdvisorServiceVersion serviceVersion) { // Arrange client = getMetricsAdvisorAdministratio...
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS) @MethodSource(STR) void function(HttpClient httpClient, MetricsAdvisorServiceVersion serviceVersion) { client = getMetricsAdvisorAdministrationBuilder(httpClient, serviceVersion).buildClient(); final AtomicReference<String> alertConfigurationId = new AtomicReferenc...
/** * Verifies valid anomaly alert configuration created for required anomaly alert configuration details. */
Verifies valid anomaly alert configuration created for required anomaly alert configuration details
createAnomalyAlertConfiguration
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/AnomalyAlertTest.java", "license": "mit", "size": 15897 }
[ "com.azure.ai.metricsadvisor.models.AnomalyAlertConfiguration", "com.azure.ai.metricsadvisor.models.MetricsAdvisorServiceVersion", "com.azure.core.http.HttpClient", "java.util.concurrent.atomic.AtomicReference", "org.junit.jupiter.params.ParameterizedTest", "org.junit.jupiter.params.provider.MethodSource"...
import com.azure.ai.metricsadvisor.models.AnomalyAlertConfiguration; import com.azure.ai.metricsadvisor.models.MetricsAdvisorServiceVersion; import com.azure.core.http.HttpClient; import java.util.concurrent.atomic.AtomicReference; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provi...
import com.azure.ai.metricsadvisor.models.*; import com.azure.core.http.*; import java.util.concurrent.atomic.*; import org.junit.jupiter.params.*; import org.junit.jupiter.params.provider.*;
[ "com.azure.ai", "com.azure.core", "java.util", "org.junit.jupiter" ]
com.azure.ai; com.azure.core; java.util; org.junit.jupiter;
1,494,826
public void removeThing(ThingUID thingUID, boolean force) { // Lookup the thing in the registry Thing thing = thingRegistry.get(thingUID); if (thing == null) { return; } // If this is a bridge, remove all child things, their items and links if (thing inst...
void function(ThingUID thingUID, boolean force) { Thing thing = thingRegistry.get(thingUID); if (thing == null) { return; } if (thing instanceof Bridge) { Bridge bridge = (Bridge) thing; for (Thing bridgeThing : bridge.getThings()) { ThingUID bridgeThingUID = bridgeThing.getUID(); removeThing(bridgeThingUID, force); } ...
/** * Remove a thing and all its links and items. * If this is a bridge, also remove child things by calling * removeThing recursively * * @param thingUID thing UID * @param force if the thing should be removed without asking the binding */
Remove a thing and all its links and items. If this is a bridge, also remove child things by calling removeThing recursively
removeThing
{ "repo_name": "WetwareLabs/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/setup/ThingSetupManager.java", "license": "epl-1.0", "size": 27488 }
[ "org.eclipse.smarthome.core.thing.Bridge", "org.eclipse.smarthome.core.thing.Thing", "org.eclipse.smarthome.core.thing.ThingUID" ]
import org.eclipse.smarthome.core.thing.Bridge; import org.eclipse.smarthome.core.thing.Thing; import org.eclipse.smarthome.core.thing.ThingUID;
import org.eclipse.smarthome.core.thing.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
2,434,519
private synchronized int invalidateWorkForOneNode(String nodeId) { // blocks should not be replicated or removed if safe mode is on if (isInSafeMode()) return 0; // get blocks to invalidate for the nodeId assert nodeId != null; DatanodeDescriptor dn = datanodeMap.get(nodeId); if (dn == n...
synchronized int function(String nodeId) { if (isInSafeMode()) return 0; assert nodeId != null; DatanodeDescriptor dn = datanodeMap.get(nodeId); if (dn == null) { recentInvalidateSets.remove(nodeId); return 0; } Collection<Block> invalidateSet = recentInvalidateSets.get(nodeId); if (invalidateSet == null) { return 0; }...
/** * Get blocks to invalidate for <i>nodeId</i> * in {@link #recentInvalidateSets}. * * @return number of blocks scheduled for removal during this iteration. */
Get blocks to invalidate for nodeId in <code>#recentInvalidateSets</code>
invalidateWorkForOneNode
{ "repo_name": "aseldawy/spatialhadoop", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 220549 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "org.apache.hadoop.hdfs.protocol.Block" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.apache.hadoop.hdfs.protocol.Block;
import java.util.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
398,669
public void removeItemDeleteListener(ItemDeleteListener listener) { PacketListener conListener = itemDeleteToListenerMap .remove(listener); if (conListener != null) con.removeSyncPacketListener(conListener); }
void function(ItemDeleteListener listener) { PacketListener conListener = itemDeleteToListenerMap .remove(listener); if (conListener != null) con.removeSyncPacketListener(conListener); }
/** * Unregister a listener for item delete events. * * @param listener The handler to unregister */
Unregister a listener for item delete events
removeItemDeleteListener
{ "repo_name": "magnetsystems/message-smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/Node.java", "license": "apache-2.0", "size": 24763 }
[ "org.jivesoftware.smack.PacketListener", "org.jivesoftware.smackx.pubsub.listener.ItemDeleteListener" ]
import org.jivesoftware.smack.PacketListener; import org.jivesoftware.smackx.pubsub.listener.ItemDeleteListener;
import org.jivesoftware.smack.*; import org.jivesoftware.smackx.pubsub.listener.*;
[ "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
org.jivesoftware.smack; org.jivesoftware.smackx;
1,488,651
// ========================================================================= // Multipart // ========================================================================= public static void flushMultiPartData(File file, OutputStream serverOutputStream, String boundary, boolean isGunzip) throws IOException { /...
static void function(File file, OutputStream serverOutputStream, String boundary, boolean isGunzip) throws IOException { PrintWriter writer = null; try { writer = new PrintWriter(new OutputStreamWriter(serverOutputStream, charsetForMultipartHeaders), true); appendBinary(file, boundary, writer, serverOutputStream, isGun...
/** * Sends a binary file as part of a multipart form data over a socket * connection and closes the output stream of the connection. * * @param file * the binary file to send * @param serverOutputStream * the server connection output stream - WILL BE CLOSED by this * m...
Sends a binary file as part of a multipart form data over a socket connection and closes the output stream of the connection
flushMultiPartData
{ "repo_name": "LittlePanpc/base-android-utils", "path": "src/me/pc/mobile/helper/v14/net/NetworkUtil.java", "license": "apache-2.0", "size": 7021 }
[ "java.io.File", "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.io.PrintWriter" ]
import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,379,273
private MatrixCursor doListFiles(Uri uri) { MatrixCursor matrixCursor = BaseFileProviderUtils.newBaseFileCursor(); File dir = extractFile(uri); if (Utils.doLog()) Log.d(CLASSNAME, "srcFile = " + dir); if (!dir.isDirectory() || !dir.canRead()) return null; ...
MatrixCursor function(Uri uri) { MatrixCursor matrixCursor = BaseFileProviderUtils.newBaseFileCursor(); File dir = extractFile(uri); if (Utils.doLog()) Log.d(CLASSNAME, STR + dir); if (!dir.isDirectory() !dir.canRead()) return null; int taskId = ProviderUtils.getIntQueryParam(uri, BaseFile.PARAM_TASK_ID, 0); boolean sh...
/** * Lists the content of a directory, if available. * * @param uri * the URI pointing to a directory. * @return the content of a directory, or {@code null} if not available. */
Lists the content of a directory, if available
doListFiles
{ "repo_name": "red13dotnet/keepass2android", "path": "src/java/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/providers/localfile/LocalFileProvider.java", "license": "gpl-3.0", "size": 28125 }
[ "android.database.MatrixCursor", "android.net.Uri", "android.util.Log", "group.pals.android.lib.ui.filechooser.providers.BaseFileProviderUtils", "group.pals.android.lib.ui.filechooser.providers.ProviderUtils", "group.pals.android.lib.ui.filechooser.providers.basefile.BaseFileContract", "group.pals.andro...
import android.database.MatrixCursor; import android.net.Uri; import android.util.Log; import group.pals.android.lib.ui.filechooser.providers.BaseFileProviderUtils; import group.pals.android.lib.ui.filechooser.providers.ProviderUtils; import group.pals.android.lib.ui.filechooser.providers.basefile.BaseFileContract; imp...
import android.database.*; import android.net.*; import android.util.*; import group.pals.android.lib.ui.filechooser.providers.*; import group.pals.android.lib.ui.filechooser.providers.basefile.*; import group.pals.android.lib.ui.filechooser.utils.*; import java.io.*; import java.util.*;
[ "android.database", "android.net", "android.util", "group.pals.android", "java.io", "java.util" ]
android.database; android.net; android.util; group.pals.android; java.io; java.util;
1,359,854
public void setJumpForce(Vector3f jumpForce) { this.jumpForce.set(jumpForce); }
void function(Vector3f jumpForce) { this.jumpForce.set(jumpForce); }
/** * Alter the jump force. The jump force is local to the character's * coordinate system, which normally is always z-forward (in world * coordinates, parent coordinates when set to applyLocalPhysics) * * @param jumpForce the desired jump force (not null, unaffected, * default=5*mass in +...
Alter the jump force. The jump force is local to the character's coordinate system, which normally is always z-forward (in world coordinates, parent coordinates when set to applyLocalPhysics)
setJumpForce
{ "repo_name": "zzuegg/jmonkeyengine", "path": "jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java", "license": "bsd-3-clause", "size": 26477 }
[ "com.jme3.math.Vector3f" ]
import com.jme3.math.Vector3f;
import com.jme3.math.*;
[ "com.jme3.math" ]
com.jme3.math;
1,505,691
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<RelationInner>> listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.g...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<RelationInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; return...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked excepti...
Get the next page of items
listNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntitiesRelationsClientImpl.java", "license": "mit", "size": 21684 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.securityinsights.fluent.models.RelationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.securityinsights.fluent.models.RelationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.securityinsights.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,147,319
public void testGetConnectedClients() throws Exception { final String name = this.getUniqueName(); final int[] ports = new int[1]; // create BridgeServer in controller vm... getLogWriter().info("[testGetConnectedClients] Create BridgeServer"); getSystem(); AttributesFactory factory = new Attr...
void function() throws Exception { final String name = this.getUniqueName(); final int[] ports = new int[1]; getLogWriter().info(STR); getSystem(); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); Region region = createRegion(name, factory.create()); assertNotNull(region); assertNotNu...
/** * Starts up server in controller vm and 4 clients, then calls and tests * BridgeMembership.getConnectedClients(). */
Starts up server in controller vm and 4 clients, then calls and tests BridgeMembership.getConnectedClients()
testGetConnectedClients
{ "repo_name": "nchandrappa/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java", "license": "apache-2.0", "size": 61755 }
[ "com.gemstone.gemfire.cache.AttributesFactory", "com.gemstone.gemfire.cache.Region", "com.gemstone.gemfire.cache.Scope" ]
import com.gemstone.gemfire.cache.AttributesFactory; import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
732,638
Connection conn = null; PreparedStatement statement = null; ResultSet rs = null; String fileName = getFileName(query); FileOutputStream fos = new FileOutputStream(fileName); try { conn = pUtil.getConnection(query.getTenantId()); statement = conn.prepareStatement(query.getStatement()); boolean isQue...
Connection conn = null; PreparedStatement statement = null; ResultSet rs = null; String fileName = getFileName(query); FileOutputStream fos = new FileOutputStream(fileName); try { conn = pUtil.getConnection(query.getTenantId()); statement = conn.prepareStatement(query.getStatement()); boolean isQuery = statement.execut...
/*** * Export query resultSet to CSV file * @param query * @throws Exception */
Export query resultSet to CSV file
exportCSV
{ "repo_name": "AakashPradeep/phoenix", "path": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/QueryVerifier.java", "license": "apache-2.0", "size": 6014 }
[ "java.io.FileOutputStream", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "org.apache.phoenix.pherf.PherfConstants" ]
import java.io.FileOutputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import org.apache.phoenix.pherf.PherfConstants;
import java.io.*; import java.sql.*; import org.apache.phoenix.pherf.*;
[ "java.io", "java.sql", "org.apache.phoenix" ]
java.io; java.sql; org.apache.phoenix;
1,086,062
public void complexMultipleJoinOfSameRelationship() { EntityManager em = createEntityManager(); String jpql = "SELECT p1, p2 FROM Employee emp JOIN emp.phoneNumbers p1 JOIN emp.phoneNumbers p2 " + "WHERE p1.type = 'Pager' AND p2.areaCode = '613'"; Query query = em.c...
void function() { EntityManager em = createEntityManager(); String jpql = STR + STR; Query query = em.createQuery(jpql); Object[] result = (Object[]) query.getSingleResult(); Assert.assertTrue(STR, (result[0] != result[1])); }
/** * glassfish issue 2867 */
glassfish issue 2867
complexMultipleJoinOfSameRelationship
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java", "license": "epl-1.0", "size": 208595 }
[ "javax.persistence.EntityManager", "javax.persistence.Query", "junit.framework.Assert" ]
import javax.persistence.EntityManager; import javax.persistence.Query; import junit.framework.Assert;
import javax.persistence.*; import junit.framework.*;
[ "javax.persistence", "junit.framework" ]
javax.persistence; junit.framework;
2,721,964
public Collection ejbFindAll() throws FinderException { IDOQuery sql = idoQuery(); sql.appendSelectAllFrom(this); sql.appendOrderBy(); String[] s = {COLUMN_PERIOD_FROM + " desc", COLUMN_PERIOD_TO + " desc", COLUMN_DESCRIPTION}; sql.appendCommaDelimited(s); return idoFindPKsBySQL(sql.toString()); }
Collection function() throws FinderException { IDOQuery sql = idoQuery(); sql.appendSelectAllFrom(this); sql.appendOrderBy(); String[] s = {COLUMN_PERIOD_FROM + STR, COLUMN_PERIOD_TO + STR, COLUMN_DESCRIPTION}; sql.appendCommaDelimited(s); return idoFindPKsBySQL(sql.toString()); }
/** * Finds all VAT regulations. * @return collection of all VAT regulation objects * @throws FinderException */
Finds all VAT regulations
ejbFindAll
{ "repo_name": "idega/platform2", "path": "src/se/idega/idegaweb/commune/accounting/regulations/data/VATRegulationBMPBean.java", "license": "gpl-3.0", "size": 6866 }
[ "com.idega.data.IDOQuery", "java.util.Collection", "javax.ejb.FinderException" ]
import com.idega.data.IDOQuery; import java.util.Collection; import javax.ejb.FinderException;
import com.idega.data.*; import java.util.*; import javax.ejb.*;
[ "com.idega.data", "java.util", "javax.ejb" ]
com.idega.data; java.util; javax.ejb;
586,517
@Override public int doRead(ByteChunk chunk, Request req ) throws IOException { if (pos >= lastValid) { if (!fill()) return -1; } int length = lastValid - pos; chunk.setBytes(buf, pos, length); ...
int function(ByteChunk chunk, Request req ) throws IOException { if (pos >= lastValid) { if (!fill()) return -1; } int length = lastValid - pos; chunk.setBytes(buf, pos, length); pos = lastValid; return (length); } }
/** * Read bytes into the specified chunk. */
Read bytes into the specified chunk
doRead
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/coyote/http11/InternalAprInputBuffer.java", "license": "apache-2.0", "size": 19689 }
[ "java.io.IOException", "org.apache.coyote.Request", "org.apache.tomcat.util.buf.ByteChunk" ]
import java.io.IOException; import org.apache.coyote.Request; import org.apache.tomcat.util.buf.ByteChunk;
import java.io.*; import org.apache.coyote.*; import org.apache.tomcat.util.buf.*;
[ "java.io", "org.apache.coyote", "org.apache.tomcat" ]
java.io; org.apache.coyote; org.apache.tomcat;
2,238,746
@Override public Adapter createProvidedArtefactsAdapter() { if (providedArtefactsItemProvider == null) { providedArtefactsItemProvider = new ProvidedArtefactsItemProvider(this); } return providedArtefactsItemProvider; } protected QuestionnaireInnerItemProvider questionnaireInnerItemProvider;
Adapter function() { if (providedArtefactsItemProvider == null) { providedArtefactsItemProvider = new ProvidedArtefactsItemProvider(this); } return providedArtefactsItemProvider; } protected QuestionnaireInnerItemProvider questionnaireInnerItemProvider;
/** * This creates an adapter for a {@link br.ufpe.ines.decode.decode.artifacts.ProvidedArtefacts}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>br.ufpe.ines.decode.decode.artifacts.ProvidedArtefacts</code>.
createProvidedArtefactsAdapter
{ "repo_name": "netuh/DecodePlatformPlugin", "path": "br.ufpe.ines.decode/bundles/br.ufpe.ines.decode.model.edit/src/br/ufpe/ines/decode/decode/artifacts/provider/ArtifactsItemProviderAdapterFactory.java", "license": "gpl-3.0", "size": 10194 }
[ "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;
280,682
public static UserBase getUser() { return threadLocal.get(); }
static UserBase function() { return threadLocal.get(); }
/** * Gets the user. * * @return the user */
Gets the user
getUser
{ "repo_name": "clstoulouse/motu", "path": "motu-library-cas/src/main/java/fr/cls/atoll/motu/library/cas/util/AuthenticationHolder.java", "license": "lgpl-3.0", "size": 4052 }
[ "fr.cls.atoll.motu.library.cas.UserBase" ]
import fr.cls.atoll.motu.library.cas.UserBase;
import fr.cls.atoll.motu.library.cas.*;
[ "fr.cls.atoll" ]
fr.cls.atoll;
504,981
default T load(@WillNotClose InputStream inputStream) { return this.load(new InputStreamReader(inputStream, this.getDefaultDecoder())); } // // default T load(Node node) // { // T implementation = this.create(); // implementation.load(node); // return implementation; ...
default T load(@WillNotClose InputStream inputStream) { return this.load(new InputStreamReader(inputStream, this.getDefaultDecoder())); }
/** * Load config from stream. * Stream isn't automatically closed here! * * @param inputStream * stream to use. * * @return loaded config file. */
Load config from stream. Stream isn't automatically closed here
load
{ "repo_name": "GotoFinal/diorite-configs-java8", "path": "src/main/java/org/diorite/config/ConfigTemplate.java", "license": "mit", "size": 7022 }
[ "java.io.InputStream", "java.io.InputStreamReader", "javax.annotation.WillNotClose" ]
import java.io.InputStream; import java.io.InputStreamReader; import javax.annotation.WillNotClose;
import java.io.*; import javax.annotation.*;
[ "java.io", "javax.annotation" ]
java.io; javax.annotation;
1,329,784
public void start(BundleContext bc) throws Exception { context = bc; logger.debug("XMPP action has been started."); }
void function(BundleContext bc) throws Exception { context = bc; logger.debug(STR); }
/** * Called whenever the OSGi framework starts our bundle */
Called whenever the OSGi framework starts our bundle
start
{ "repo_name": "Cougar/mirror-openhab", "path": "bundles/action/org.openhab.action.xmpp/src/main/java/org/openhab/action/xmpp/internal/XMPPActivator.java", "license": "gpl-3.0", "size": 2252 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
2,137,982
protected void validateOrderList(SqlSelect select) { // ORDER BY is validated in a scope where aliases in the SELECT clause // are visible. For example, "SELECT empno AS x FROM emp ORDER BY x" // is valid. SqlNodeList orderList = select.getOrderList(); if (orderList == null) { return; } ...
void function(SqlSelect select) { SqlNodeList orderList = select.getOrderList(); if (orderList == null) { return; } if (!shouldAllowIntermediateOrderBy()) { if (!cursorSet.contains(select)) { throw newValidationError(select, RESOURCE.invalidOrderByPos()); } } final SqlValidatorScope orderScope = getOrderScope(select); ...
/** * Validates the ORDER BY clause of a SELECT statement. * * @param select Select statement */
Validates the ORDER BY clause of a SELECT statement
validateOrderList
{ "repo_name": "jinfengni/optiq", "path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java", "license": "apache-2.0", "size": 143512 }
[ "org.apache.calcite.sql.SqlNode", "org.apache.calcite.sql.SqlNodeList", "org.apache.calcite.sql.SqlSelect", "org.apache.calcite.util.Static", "org.apache.calcite.util.Util" ]
import org.apache.calcite.sql.SqlNode; import org.apache.calcite.sql.SqlNodeList; import org.apache.calcite.sql.SqlSelect; import org.apache.calcite.util.Static; import org.apache.calcite.util.Util;
import org.apache.calcite.sql.*; import org.apache.calcite.util.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,228,788
public void commentRemoved(CommentEvent event) { Comment comment = event.getComment(); comment.getBlogEntry().getBlog().getResponseIndex().unindex(comment); }
void function(CommentEvent event) { Comment comment = event.getComment(); comment.getBlogEntry().getBlog().getResponseIndex().unindex(comment); }
/** * Called when a comment has been removed. * * @param event a CommentEvent instance */
Called when a comment has been removed
commentRemoved
{ "repo_name": "arshadalisoomro/pebble", "path": "src/main/java/net/sourceforge/pebble/index/ResponseIndexListener.java", "license": "bsd-3-clause", "size": 4760 }
[ "net.sourceforge.pebble.api.event.comment.CommentEvent", "net.sourceforge.pebble.domain.Comment" ]
import net.sourceforge.pebble.api.event.comment.CommentEvent; import net.sourceforge.pebble.domain.Comment;
import net.sourceforge.pebble.api.event.comment.*; import net.sourceforge.pebble.domain.*;
[ "net.sourceforge.pebble" ]
net.sourceforge.pebble;
971,365
private String generateUri(String uid) { try { MessageDigest digest = java.security.MessageDigest.getInstance("MD5"); digest.update(uid.getBytes()); byte hash[] = digest.digest(); char[] hex = Hex.encodeHex(hash); // create a hex value of the hash ...
String function(String uid) { try { MessageDigest digest = java.security.MessageDigest.getInstance("MD5"); digest.update(uid.getBytes()); byte hash[] = digest.digest(); char[] hex = Hex.encodeHex(hash); return personUriPrefix + new String(hex); } catch (NoSuchAlgorithmException ex) { throw new RuntimeException(ex); } }...
/** * In Bristol, policy dictates we can't advertise the UID externally. * I'd like a unique identifier, so hash the UID. Performance issues? * * @param uid the unique identifier of a person in the directory. * @return a URI to represented the person based in a hash of the URI. */
In Bristol, policy dictates we can't advertise the UID externally. I'd like a unique identifier, so hash the UID. Performance issues
generateUri
{ "repo_name": "MikeJ1971/mobile-campus-assistant", "path": "MobileWeb/mca-services-ldap/src/main/java/org/ilrt/mca/services/ldap/BasicLdapSearch.java", "license": "bsd-3-clause", "size": 7994 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException", "java.util.Hashtable", "org.apache.commons.codec.binary.Hex", "org.apache.log4j.Logger" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Hashtable; import org.apache.commons.codec.binary.Hex; import org.apache.log4j.Logger;
import java.security.*; import java.util.*; import org.apache.commons.codec.binary.*; import org.apache.log4j.*;
[ "java.security", "java.util", "org.apache.commons", "org.apache.log4j" ]
java.security; java.util; org.apache.commons; org.apache.log4j;
624,776
public static Element [] getElements(Element e, String name) { NodeList listNodes = e.getElementsByTagName(name); int l = listNodes.getLength(); Element r [] = new Element [l]; for(int i=0; i < l; i++) r[i] = (Element) listNodes.item(i); return r; }
static Element [] function(Element e, String name) { NodeList listNodes = e.getElementsByTagName(name); int l = listNodes.getLength(); Element r [] = new Element [l]; for(int i=0; i < l; i++) r[i] = (Element) listNodes.item(i); return r; }
/** * Extracts the set of XML elements having a given name in a given XML element * @param e the element to explore * @param name the name of the elements searched * @return an array of elements */
Extracts the set of XML elements having a given name in a given XML element
getElements
{ "repo_name": "Orange-OpenSource/matos-tool", "path": "matos/src/main/java/com/orange/matos/core/XMLParser.java", "license": "apache-2.0", "size": 5844 }
[ "org.w3c.dom.Element", "org.w3c.dom.NodeList" ]
import org.w3c.dom.Element; import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,260,083
public final MetaProperty<Long> securityId() { return _securityId; }
final MetaProperty<Long> function() { return _securityId; }
/** * The meta-property for the {@code securityId} property. * @return the meta-property, not null */
The meta-property for the securityId property
securityId
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/SecurityBean.java", "license": "apache-2.0", "size": 6966 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,889,234
BigInteger getNext();
BigInteger getNext();
/** * Returns pseudo-random number. * * @return the random number */
Returns pseudo-random number
getNext
{ "repo_name": "jamesewoo/hasu-crypto", "path": "src/main/java/org/hasu/prng/Prng.java", "license": "gpl-2.0", "size": 391 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,336,567
private boolean getTranslatedPoint(Point corner, Point p, int dx, int dy) { int diff = (int) corner.getDistance(p); if (diff < arcRadius) { Point t = corner.getTranslated(dx, dy); p.setLocation(t.x, t.y); return true; } return false; }
boolean function(Point corner, Point p, int dx, int dy) { int diff = (int) corner.getDistance(p); if (diff < arcRadius) { Point t = corner.getTranslated(dx, dy); p.setLocation(t.x, t.y); return true; } return false; }
/** * Calculates the distance from the corner to the Point p. * If it is less than the minimum then it translates it and returns the new Point. * @param corner The corner Point. * @param p The point to translate if close to the corner. * @param dx The amount to translate ...
Calculates the distance from the corner to the Point p. If it is less than the minimum then it translates it and returns the new Point
getTranslatedPoint
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.zest.core/src/org/eclipse/zest/core/widgets/internal/RoundedChopboxAnchor.java", "license": "mit", "size": 2807 }
[ "org.eclipse.draw2d.geometry.Point" ]
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
1,782,528
public IType getType(Expression expression) { return getResolver(expression).getType(); }
IType function(Expression expression) { return getResolver(expression).getType(); }
/** * Returns the {@link IType} of the given {@link Expression}. * * @param expression The {@link Expression} for which its type will be calculated * @return Either the {@link IType} that was resolved by this {@link Resolver} or the * {@link IType} for {@link IType#UNRESOLVABLE_TYPE} if it could not be r...
Returns the <code>IType</code> of the given <code>Expression</code>
getType
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "jpa/org.eclipse.persistence.jpa.jpql/src/org/eclipse/persistence/jpa/jpql/tools/JPQLQueryContext.java", "license": "epl-1.0", "size": 33626 }
[ "org.eclipse.persistence.jpa.jpql.parser.Expression", "org.eclipse.persistence.jpa.jpql.tools.spi.IType" ]
import org.eclipse.persistence.jpa.jpql.parser.Expression; import org.eclipse.persistence.jpa.jpql.tools.spi.IType;
import org.eclipse.persistence.jpa.jpql.parser.*; import org.eclipse.persistence.jpa.jpql.tools.spi.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,129,218
void removeTrustDomain(TrustDomainEntity trustDomain);
void removeTrustDomain(TrustDomainEntity trustDomain);
/** * Remove the specified {@link TrustDomainEntity}. * * @param trustDomain */
Remove the specified <code>TrustDomainEntity</code>
removeTrustDomain
{ "repo_name": "tectronics/eid-trust-service", "path": "eid-trust-service-model/src/main/java/be/fedict/trust/service/TrustDomainService.java", "license": "gpl-3.0", "size": 8776 }
[ "be.fedict.trust.service.entity.TrustDomainEntity" ]
import be.fedict.trust.service.entity.TrustDomainEntity;
import be.fedict.trust.service.entity.*;
[ "be.fedict.trust" ]
be.fedict.trust;
2,913,337
public void accumulate(Collection<ConfusionMatrix> cms) { if (cms.size() == 0) throw new IllegalArgumentException("Cannot accumulate empty collection."); Iterator<ConfusionMatrix> iter = cms.iterator(); while (iter.hasNext()) accumulate(iter.next()); }
void function(Collection<ConfusionMatrix> cms) { if (cms.size() == 0) throw new IllegalArgumentException(STR); Iterator<ConfusionMatrix> iter = cms.iterator(); while (iter.hasNext()) accumulate(iter.next()); }
/** * Accumulates the scores from a collection of confusion matrices. */
Accumulates the scores from a collection of confusion matrices
accumulate
{ "repo_name": "linqs/psl-utils", "path": "psl-evaluation-extended/src/main/java/org/linqs/psl/utils/evaluation/statistics/ConfusionMatrix.java", "license": "apache-2.0", "size": 4998 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,836,507
@Test(expected = InstantiationException.class) public void testConstructorIsAbstract() throws Exception { Constructor<AbstractDataEncoder> constructor = AbstractDataEncoder.class.getDeclaredConstructor(); // Try to create an instance constructor.newInstance(); }
@Test(expected = InstantiationException.class) void function() throws Exception { Constructor<AbstractDataEncoder> constructor = AbstractDataEncoder.class.getDeclaredConstructor(); constructor.newInstance(); }
/** * Ensure the constructor is abstract. * * @throws Exception Tests throw exceptions. */
Ensure the constructor is abstract
testConstructorIsAbstract
{ "repo_name": "krotscheck/data-file-reader", "path": "data-file-reader-base/src/test/java/net/krotscheck/dfr/stream/AbstractStreamEncoderTest.java", "license": "apache-2.0", "size": 3662 }
[ "java.lang.reflect.Constructor", "net.krotscheck.dfr.AbstractDataEncoder", "org.junit.Test" ]
import java.lang.reflect.Constructor; import net.krotscheck.dfr.AbstractDataEncoder; import org.junit.Test;
import java.lang.reflect.*; import net.krotscheck.dfr.*; import org.junit.*;
[ "java.lang", "net.krotscheck.dfr", "org.junit" ]
java.lang; net.krotscheck.dfr; org.junit;
1,475,533
public Builder rename(Node n, String name) { return rename(n, name, false); }
Builder function(Node n, String name) { return rename(n, name, false); }
/** * Renames a given node to the provided name. * @param n The node to rename. * @param name The new name for the node. */
Renames a given node to the provided name
rename
{ "repo_name": "phistuck/closure-compiler", "path": "src/com/google/javascript/refactoring/SuggestedFix.java", "license": "apache-2.0", "size": 15882 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,981,648
public Range getDomainBounds(boolean includeInterval) { // first get the range without the interval, then expand it for the // interval width Range range = DatasetUtilities.findDomainBounds(this.dataset, false); if (includeInterval && range != null) { double lowerAdj = ge...
Range function(boolean includeInterval) { Range range = DatasetUtilities.findDomainBounds(this.dataset, false); if (includeInterval && range != null) { double lowerAdj = getIntervalWidth() * getIntervalPositionFactor(); double upperAdj = getIntervalWidth() - lowerAdj; range = new Range(range.getLowerBound() - lowerAdj,...
/** * Returns the range of the values in the dataset's domain, including * or excluding the interval around each x-value as specified. * * @param includeInterval a flag that determines whether or not the * x-interval should be taken into account. * * @return T...
Returns the range of the values in the dataset's domain, including or excluding the interval around each x-value as specified
getDomainBounds
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/data/xy/IntervalXYDelegate.java", "license": "mit", "size": 16528 }
[ "org.jfree.data.Range", "org.jfree.data.general.DatasetUtilities" ]
import org.jfree.data.Range; import org.jfree.data.general.DatasetUtilities;
import org.jfree.data.*; import org.jfree.data.general.*;
[ "org.jfree.data" ]
org.jfree.data;
1,331,840