method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected void createKeelDirectServer() throws Exception { String configPath = System.getProperty("keel.config.dir"); //String contextPath = configPath + System.getProperty("file.separator") + ".."; String libPath = configPath + System.getProperty("file.separator") + ".." + System.getProperty("file.sep...
void function() throws Exception { String configPath = System.getProperty(STR); String libPath = configPath + System.getProperty(STR) + ".." + System.getProperty(STR) + "lib"; File libDir = new File(libPath); if (! libDir.isDirectory()) { throw new Exception(STR + libDir.getCanonicalPath() + STR); } libPath = libDir.ge...
/** * Create a KeelDirectServer and return to server/ui bridge * @throws Exception */
Create a KeelDirectServer and return to server/ui bridge
createKeelDirectServer
{ "repo_name": "iritgo/iritgo-aktera", "path": "aktera-client/src/main/java/de/iritgo/aktera/clients/KeelStarter.java", "license": "apache-2.0", "size": 12167 }
[ "de.iritgo.aktera.util.thread.ThreadUtil", "java.io.File" ]
import de.iritgo.aktera.util.thread.ThreadUtil; import java.io.File;
import de.iritgo.aktera.util.thread.*; import java.io.*;
[ "de.iritgo.aktera", "java.io" ]
de.iritgo.aktera; java.io;
26,206
protected void addValueDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ParamType_valueDate_feature"), getString("_UI_PropertyDescriptor_...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), DbchangelogPackage.eINSTANCE.getParamType_ValueDate(), true, false, false, ItemPropertyDescriptor...
/** * This adds a property descriptor for the Value Date feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Value Date feature.
addValueDatePropertyDescriptor
{ "repo_name": "dzonekl/LiquibaseEditor", "path": "plugins/org.liquidbase.model.edit/src/org/liquibase/xml/ns/dbchangelog/provider/ParamTypeItemProvider.java", "license": "mit", "size": 10371 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.liquibase.xml.ns.dbchangelog.DbchangelogPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.liquibase.xml.ns.dbchangelog.DbchangelogPackage;
import org.eclipse.emf.edit.provider.*; import org.liquibase.xml.ns.dbchangelog.*;
[ "org.eclipse.emf", "org.liquibase.xml" ]
org.eclipse.emf; org.liquibase.xml;
2,819,751
@Override public void onBindViewHolder(final RecyclerView.ViewHolder holder, int positions) { super.onBindViewHolder(holder, positions); int viewType = holder.getItemViewType(); if (mItemTouchHelper != null && itemDragEnabled && viewType != LOADING_VIEW && viewType != HEADER_VIEW ...
void function(final RecyclerView.ViewHolder holder, int positions) { super.onBindViewHolder(holder, positions); int viewType = holder.getItemViewType(); if (mItemTouchHelper != null && itemDragEnabled && viewType != LOADING_VIEW && viewType != HEADER_VIEW && viewType != EMPTY_VIEW && viewType != FOOTER_VIEW) { if (mTog...
/** * To bind different types of holder and solve different the bind events * * @param holder * @param positions * @see #getDefItemViewType(int) */
To bind different types of holder and solve different the bind events
onBindViewHolder
{ "repo_name": "MorningGu/Concentration-Camp", "path": "ConcentrationCamp/library/src/main/java/com/chad/library/adapter/base/BaseItemDraggableAdapter.java", "license": "apache-2.0", "size": 9438 }
[ "android.support.v7.widget.RecyclerView", "android.view.View" ]
import android.support.v7.widget.RecyclerView; import android.view.View;
import android.support.v7.widget.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
158,060
Collection<Message> messagesCollection = messages.findAll(); String result = new String(); for(Message m : messagesCollection) { if(m.getReceiverId() == u.getId() || m.getSenderId() == u.getId()) { result += m.toString() + "\n"; } } return save.write() + "\n" + "<message>" + "\n" + result + "</mes...
Collection<Message> messagesCollection = messages.findAll(); String result = new String(); for(Message m : messagesCollection) { if(m.getReceiverId() == u.getId() m.getSenderId() == u.getId()) { result += m.toString() + "\n"; } } return save.write() + "\n" + STR + "\n" + result + STR; }
/** * Get all messages from <code>message</code> and transforms them into a string * @return String representing all messages in the MessageSyncManager <code>messages</code> */
Get all messages from <code>message</code> and transforms them into a string
write
{ "repo_name": "SturgisRaphael/ResilientSXP", "path": "src/main/java/resilience/impl/MessagesDecorator.java", "license": "lgpl-3.0", "size": 5361 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,912,176
@NotNull public Builder<T> withTask(@NotNull final Callable<T> task) { this.task = Objects.requireNonNull(task); return this; }
Builder<T> function(@NotNull final Callable<T> task) { this.task = Objects.requireNonNull(task); return this; }
/** * The task to perform, which will be retried with backoff if it * encounters any unhandled exceptions. */
The task to perform, which will be retried with backoff if it encounters any unhandled exceptions
withTask
{ "repo_name": "ccampo133/exponential-backoff", "path": "src/main/java/me/ccampo/backoff/ExponentialBackOff.java", "license": "mit", "size": 8467 }
[ "java.util.Objects", "java.util.concurrent.Callable", "org.jetbrains.annotations.NotNull" ]
import java.util.Objects; import java.util.concurrent.Callable; import org.jetbrains.annotations.NotNull;
import java.util.*; import java.util.concurrent.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
1,667,845
public void incrementResendCount() { if (++resendCount >= 3) { this.nodeStage = NodeStage.DEAD; this.deadCount++; this.deadTime = Calendar.getInstance().getTime(); this.queryStageTimeStamp = Calendar.getInstance().getTime(); logger.debug("NODE {}: Retry count exceeded. Node is DEAD.", this.nodeId); ...
void function() { if (++resendCount >= 3) { this.nodeStage = NodeStage.DEAD; this.deadCount++; this.deadTime = Calendar.getInstance().getTime(); this.queryStageTimeStamp = Calendar.getInstance().getTime(); logger.debug(STR, this.nodeId); if(nodeStageAdvancer.isInitializationComplete() == true) { ZWaveEvent zEvent = new...
/** * Increments the resend counter. * On three increments the node stage is set to DEAD and no * more messages will be sent. */
Increments the resend counter. On three increments the node stage is set to DEAD and no more messages will be sent
incrementResendCount
{ "repo_name": "clanko8285/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveNode.java", "license": "epl-1.0", "size": 20410 }
[ "java.util.Calendar", "org.openhab.binding.zwave.internal.protocol.event.ZWaveEvent", "org.openhab.binding.zwave.internal.protocol.event.ZWaveNodeStatusEvent" ]
import java.util.Calendar; import org.openhab.binding.zwave.internal.protocol.event.ZWaveEvent; import org.openhab.binding.zwave.internal.protocol.event.ZWaveNodeStatusEvent;
import java.util.*; import org.openhab.binding.zwave.internal.protocol.event.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
1,227,436
protected boolean canScroll(View v, boolean checkV, int dx, int dy, int x, int y) { if (v instanceof ViewGroup) { final ViewGroup group = (ViewGroup) v; final int scrollX = v.getScrollX(); final int scrollY = v.getScrollY(); final int count = group.getChildCount(); // Count backwards - let topmos...
boolean function(View v, boolean checkV, int dx, int dy, int x, int y) { if (v instanceof ViewGroup) { final ViewGroup group = (ViewGroup) v; final int scrollX = v.getScrollX(); final int scrollY = v.getScrollY(); final int count = group.getChildCount(); for (int i = count - 1; i >= 0; i--) { final View child = group.g...
/** * Tests scrollability within child views of v given a delta of dx. * * @param v * View to test for horizontal scrollability * @param checkV * Whether the view v passed should itself be checked for * scrollability (true), or just its children (false). * @param dx *...
Tests scrollability within child views of v given a delta of dx
canScroll
{ "repo_name": "Consoar/zhangshangwuda", "path": "src/imid/swipebacklayout/lib/ViewDragHelper.java", "license": "apache-2.0", "size": 53630 }
[ "android.support.v4.view.ViewCompat", "android.view.View", "android.view.ViewGroup" ]
import android.support.v4.view.ViewCompat; import android.view.View; import android.view.ViewGroup;
import android.support.v4.view.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
1,179,225
@Override public void removeView(View view) { super.removeView(view); }
void function(View view) { super.removeView(view); }
/** * Removes a view from the layout. * <p> * Consider using removeButton(). * * @param view the view to remove */
Removes a view from the layout. Consider using removeButton()
removeView
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit/src/main/java/com/didichuxing/doraemonkit/widget/MultiLineRadioGroup.java", "license": "apache-2.0", "size": 32258 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,160,642
Connection answer() throws SQLException;
Connection answer() throws SQLException;
/** Unit test helper. * @return Connection handle. * @throws SQLException */
Unit test helper
answer
{ "repo_name": "liuxing521a/itas-core", "path": "core/src/test/java/org/itas/core/dbpool/MockJDBCAnswer.java", "license": "apache-2.0", "size": 1011 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,198,921
public final void setAlternativeRemoteHostAttribute(@NotNull final String alternativeRemoteHostAttribute) { this.alternativeRemoteHostAttribute = alternativeRemoteHostAttribute; }
final void function(@NotNull final String alternativeRemoteHostAttribute) { this.alternativeRemoteHostAttribute = alternativeRemoteHostAttribute; }
/** * Alternative header to be used for retrieving the remote system IP address. * @param alternativeRemoteHostAttribute the alternative remote host attribute */
Alternative header to be used for retrieving the remote system IP address
setAlternativeRemoteHostAttribute
{ "repo_name": "y1011/cas-server", "path": "cas-server-support-spnego/src/main/java/org/jasig/cas/support/spnego/web/flow/client/BaseSpnegoKnownClientSystemsFilterAction.java", "license": "apache-2.0", "size": 8834 }
[ "javax.validation.constraints.NotNull" ]
import javax.validation.constraints.NotNull;
import javax.validation.constraints.*;
[ "javax.validation" ]
javax.validation;
562,343
public void setAttributeId(Identifier identifier) { this.attributeId = identifier; }
void function(Identifier identifier) { this.attributeId = identifier; }
/** * Sets the {@link org.apache.openaz.xacml.api.Identifier} representing the XACML AttributeId of the * MissingAttributeDetail. * * @param identifier the <code>Identifier</code> representing the XACML AttributeId of the * MissingAttributeDetail. */
Sets the <code>org.apache.openaz.xacml.api.Identifier</code> representing the XACML AttributeId of the MissingAttributeDetail
setAttributeId
{ "repo_name": "phrinx/incubator-openaz", "path": "openaz-xacml/src/main/java/org/apache/openaz/xacml/std/StdMutableMissingAttributeDetail.java", "license": "apache-2.0", "size": 14222 }
[ "org.apache.openaz.xacml.api.Identifier" ]
import org.apache.openaz.xacml.api.Identifier;
import org.apache.openaz.xacml.api.*;
[ "org.apache.openaz" ]
org.apache.openaz;
1,476,544
public List<Tuple3<FieldsDiagram, FieldsOverlaps, FieldsScenario>> getRelationshipIncludesPartOf(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); arg...
List<Tuple3<FieldsDiagram, FieldsOverlaps, FieldsScenario>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(relFields); args.add(toField...
/** * <p>Original spec-file function name: get_relationship_IncludesPartOf</p> * <pre> * </pre> * @param ids instance of list of String * @param fromFields instance of list of String * @param relFields instance of list of String * @param toFields instance of list of St...
Original spec-file function name: get_relationship_IncludesPartOf <code> </code>
getRelationshipIncludesPartOf
{ "repo_name": "kbase/trees", "path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java", "license": "mit", "size": 869221 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.Tuple3" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
1,967,728
public String getText() { return text; } } private static class BreakableStringHandler extends StringHandler { private Date fromDate; private Date lastModifiedDate; public BreakableStringHandler(Date fromDate) { this.fromDate = fromDate; }
String function() { return text; } } private static class BreakableStringHandler extends StringHandler { private Date fromDate; private Date lastModifiedDate; public BreakableStringHandler(Date fromDate) { this.fromDate = fromDate; }
/** * Gets text. * @return text */
Gets text
getText
{ "repo_name": "treejames/GeoprocessingAppstore", "path": "src/com/esri/gpt/control/webharvest/client/thredds/TProxy.java", "license": "apache-2.0", "size": 5205 }
[ "com.esri.gpt.framework.http.StringHandler", "java.util.Date" ]
import com.esri.gpt.framework.http.StringHandler; import java.util.Date;
import com.esri.gpt.framework.http.*; import java.util.*;
[ "com.esri.gpt", "java.util" ]
com.esri.gpt; java.util;
2,913,481
protected Logger getLogger() { return Logger.getLogger(Calendar.class.getName()); } public Calendar() { this(null, new BasicEventProvider()); } public Calendar(String caption) { this(caption, new BasicEventProvider()); } public Calendar(CalendarEvent...
Logger function() { return Logger.getLogger(Calendar.class.getName()); } public Calendar() { this(null, new BasicEventProvider()); } public Calendar(String caption) { this(caption, new BasicEventProvider()); } public Calendar(CalendarEventProvider eventProvider) { this(null, eventProvider); } public Calendar(String cap...
/** * Returns the logger for the calendar */
Returns the logger for the calendar
getLogger
{ "repo_name": "peterl1084/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/ui/Calendar.java", "license": "apache-2.0", "size": 72487 }
[ "com.vaadin.v7.ui.components.calendar.event.BasicEventProvider", "com.vaadin.v7.ui.components.calendar.event.CalendarEventProvider", "java.util.Date", "java.util.EventListener", "java.util.HashMap", "java.util.logging.Logger" ]
import com.vaadin.v7.ui.components.calendar.event.BasicEventProvider; import com.vaadin.v7.ui.components.calendar.event.CalendarEventProvider; import java.util.Date; import java.util.EventListener; import java.util.HashMap; import java.util.logging.Logger;
import com.vaadin.v7.ui.components.calendar.event.*; import java.util.*; import java.util.logging.*;
[ "com.vaadin.v7", "java.util" ]
com.vaadin.v7; java.util;
653,143
private void assertDistributionManagerType() { // Assert that dmType is one of the three DM types... int theDmType = getDMType(); switch (theDmType) { case NORMAL_DM_TYPE: case LONER_DM_TYPE: case ADMIN_ONLY_DM_TYPE: case LOCATOR_DM_TYPE: break; default: Assert.assertTrue(f...
void function() { int theDmType = getDMType(); switch (theDmType) { case NORMAL_DM_TYPE: case LONER_DM_TYPE: case ADMIN_ONLY_DM_TYPE: case LOCATOR_DM_TYPE: break; default: Assert.assertTrue(false, STR); } final InternalDistributedMember theId = getDistributionManagerId(); final int vmKind = theId.getVmKind(); if (theDm...
/** * Asserts that distributionManagerType is LOCAL, GEMFIRE, or * ADMIN_ONLY. Also asserts that the distributionManagerId * (jgroups DistributedMember) has a VmKind that matches. */
Asserts that distributionManagerType is LOCAL, GEMFIRE, or ADMIN_ONLY. Also asserts that the distributionManagerId (jgroups DistributedMember) has a VmKind that matches
assertDistributionManagerType
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java", "license": "apache-2.0", "size": 176592 }
[ "com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember", "com.gemstone.gemfire.internal.Assert" ]
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.distributed.internal.membership.*; import com.gemstone.gemfire.internal.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
2,767,288
// set plugin plugin = this; // Plugin manager //PluginManager pluginmanager = this.getServer().getPluginManager(); // get plugin.yml file contents PluginDescriptionFile description = this.getDescription(); configManager = new YAMLConfigManager(this); String[] head...
plugin = this; PluginDescriptionFile description = this.getDescription(); configManager = new YAMLConfigManager(this); String[] header = { pluginPrefix, STR}; defaultoptions = new DefaultOptions(this); try { mainConfig = configManager.getNewConfig(STR, header); defaultoptions.setDefaultValues(mainConfig); } catch (Exce...
/************************************************************************************************ * ON PLUGIN :: ENABLE / RELOAD ***********************************************************************************************/
ON PLUGIN :: ENABLE / RELOAD
onEnable
{ "repo_name": "Dipolix/cnSaveRestart", "path": "src/si/craft/cnSaveRestart/main.java", "license": "gpl-3.0", "size": 5191 }
[ "org.bukkit.plugin.PluginDescriptionFile", "si.craft.cnSaveRestart.components.AutoRestart", "si.craft.cnSaveRestart.components.AutoSave", "si.craft.cnSaveRestart.components.ClearLagg", "si.craft.cnSaveRestart.helpers.DefaultOptions", "si.craft.cnSaveRestart.helpers.Helper", "si.craft.cnSaveRestart.helpe...
import org.bukkit.plugin.PluginDescriptionFile; import si.craft.cnSaveRestart.components.AutoRestart; import si.craft.cnSaveRestart.components.AutoSave; import si.craft.cnSaveRestart.components.ClearLagg; import si.craft.cnSaveRestart.helpers.DefaultOptions; import si.craft.cnSaveRestart.helpers.Helper; import si.craft...
import org.bukkit.plugin.*; import si.craft.*;
[ "org.bukkit.plugin", "si.craft" ]
org.bukkit.plugin; si.craft;
37,552
private void failSessionDuringDeployment( YarnClient yarnClient, YarnClientApplication yarnApplication) { LOG.info("Killing YARN application"); try { yarnClient.killApplication( yarnApplication.getNewApplicationResponse().getApplicationId()); } ca...
void function( YarnClient yarnClient, YarnClientApplication yarnApplication) { LOG.info(STR); try { yarnClient.killApplication( yarnApplication.getNewApplicationResponse().getApplicationId()); } catch (Exception e) { LOG.debug(STR, e); } } private static class ClusterResourceDescription { public final int totalFreeMemo...
/** * Kills YARN application and stops YARN client. * * <p>Use this method to kill the App before it has been properly deployed */
Kills YARN application and stops YARN client. Use this method to kill the App before it has been properly deployed
failSessionDuringDeployment
{ "repo_name": "aljoscha/flink", "path": "flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java", "license": "apache-2.0", "size": 80303 }
[ "org.apache.hadoop.yarn.client.api.YarnClient", "org.apache.hadoop.yarn.client.api.YarnClientApplication" ]
import org.apache.hadoop.yarn.client.api.YarnClient; import org.apache.hadoop.yarn.client.api.YarnClientApplication;
import org.apache.hadoop.yarn.client.api.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,207,611
public static HighlightBuilder highlight() { return new HighlightBuilder(); } private QueryBuilder queryBuilder; private BytesReference queryBinary; private FilterBuilder postFilterBuilder; private BytesReference filterBinary; private int from = -1; private int size = -1; ...
static HighlightBuilder function() { return new HighlightBuilder(); } QueryBuilder queryBuilder; private BytesReference queryBinary; private FilterBuilder postFilterBuilder; private BytesReference filterBinary; private int from = -1; private int size = -1; private Boolean explain; private Boolean version; private List<...
/** * A static factory method to construct new search highlights. */
A static factory method to construct new search highlights
highlight
{ "repo_name": "0359xiaodong/elasticsearch", "path": "src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java", "license": "apache-2.0", "size": 29314 }
[ "com.carrotsearch.hppc.ObjectFloatOpenHashMap", "java.util.List", "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.index.query.FilterBuilder", "org.elasticsearch.index.query.QueryBuilder", "org.elasticsearch.search.aggregations.AbstractAggregationBuilder", "org.elasticsearch.search.fe...
import com.carrotsearch.hppc.ObjectFloatOpenHashMap; import java.util.List; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.index.query.FilterBuilder; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.aggregations.AbstractAggregationBuilder; import org.ela...
import com.carrotsearch.hppc.*; import java.util.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.index.query.*; import org.elasticsearch.search.aggregations.*; import org.elasticsearch.search.fetch.source.*; import org.elasticsearch.search.highlight.*; import org.elasticsearch.search.internal.*; im...
[ "com.carrotsearch.hppc", "java.util", "org.elasticsearch.common", "org.elasticsearch.index", "org.elasticsearch.search" ]
com.carrotsearch.hppc; java.util; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.search;
1,324,735
public static MachineTypeFilter notEquals(MachineTypeField field, String value) { return new MachineTypeFilter(checkNotNull(field), ComparisonOperator.NE, checkNotNull(value)); }
static MachineTypeFilter function(MachineTypeField field, String value) { return new MachineTypeFilter(checkNotNull(field), ComparisonOperator.NE, checkNotNull(value)); }
/** * Returns a not-equals filter for the given field and string value. For string fields, * {@code value} is interpreted as a regular expression using RE2 syntax. {@code value} must * match the entire field. * * @see <a href="https://github.com/google/re2/wiki/Syntax">RE2</a> */
Returns a not-equals filter for the given field and string value. For string fields, value is interpreted as a regular expression using RE2 syntax. value must match the entire field
notEquals
{ "repo_name": "jabubake/google-cloud-java", "path": "google-cloud-compute/src/main/java/com/google/cloud/compute/Compute.java", "license": "apache-2.0", "size": 93984 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,569,128
protected void acceptDrag(int dragOperation) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.acceptDrag(dragOperation); } }
void function(int dragOperation) { DropTargetContextPeer peer = getDropTargetContextPeer(); if (peer != null) { peer.acceptDrag(dragOperation); } }
/** * accept the Drag. * * @param dragOperation the supported action(s) */
accept the Drag
acceptDrag
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java", "license": "gpl-2.0", "size": 13888 }
[ "java.awt.dnd.peer.DropTargetContextPeer" ]
import java.awt.dnd.peer.DropTargetContextPeer;
import java.awt.dnd.peer.*;
[ "java.awt" ]
java.awt;
1,152,544
@Override public void exitLparenRule(@NotNull PJParser.LparenRuleContext ctx) { }
@Override public void exitLparenRule(@NotNull PJParser.LparenRuleContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterLparenRule
{ "repo_name": "Diolor/PJ", "path": "src/main/java/com/lorentzos/pj/PJBaseListener.java", "license": "mit", "size": 73292 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
782,405
private List<OpenEngSBModel> convertSimpleModelWrapperList(List<AdvancedModelWrapper> wrappers) { List<OpenEngSBModel> models = new ArrayList<OpenEngSBModel>(); for (AdvancedModelWrapper wrapper : wrappers) { models.add(wrapper.getUnderlyingModel()); } return models; ...
List<OpenEngSBModel> function(List<AdvancedModelWrapper> wrappers) { List<OpenEngSBModel> models = new ArrayList<OpenEngSBModel>(); for (AdvancedModelWrapper wrapper : wrappers) { models.add(wrapper.getUnderlyingModel()); } return models; }
/** * Converts a list of SimpleModelWrapper objects to a list of OpenEngSBModel objects */
Converts a list of SimpleModelWrapper objects to a list of OpenEngSBModel objects
convertSimpleModelWrapperList
{ "repo_name": "openengsb/openengsb", "path": "components/ekb/persistence-persist-edb/src/main/java/org/openengsb/core/ekb/persistence/persist/edb/internal/EngineeringObjectEnhancer.java", "license": "apache-2.0", "size": 13650 }
[ "java.util.ArrayList", "java.util.List", "org.openengsb.core.api.model.OpenEngSBModel", "org.openengsb.core.ekb.common.AdvancedModelWrapper" ]
import java.util.ArrayList; import java.util.List; import org.openengsb.core.api.model.OpenEngSBModel; import org.openengsb.core.ekb.common.AdvancedModelWrapper;
import java.util.*; import org.openengsb.core.api.model.*; import org.openengsb.core.ekb.common.*;
[ "java.util", "org.openengsb.core" ]
java.util; org.openengsb.core;
193,481
public static Context createProcessorContext(Map<Key<?>, Object> seededObjects) { return new Context(PROCESSOR_CONTEXT, checkForInvalidSeedsAndCopy(seededObjects)); }
static Context function(Map<Key<?>, Object> seededObjects) { return new Context(PROCESSOR_CONTEXT, checkForInvalidSeedsAndCopy(seededObjects)); }
/** * Creates and returns a processor context that can be used to re-enter a processor scope multiple * times. * * @param seededObjects the original objects to seed into the context. * @return a context object that can be used to run code in a processor scope. */
Creates and returns a processor context that can be used to re-enter a processor scope multiple times
createProcessorContext
{ "repo_name": "NLPIE/BioMedICUS", "path": "biomedicus-core/src/main/java/edu/umn/biomedicus/framework/BiomedicusScopes.java", "license": "apache-2.0", "size": 6555 }
[ "com.google.inject.Key", "java.util.Map" ]
import com.google.inject.Key; import java.util.Map;
import com.google.inject.*; import java.util.*;
[ "com.google.inject", "java.util" ]
com.google.inject; java.util;
1,968,720
private void sendMessageToLzQueue(String filePathname) { // Create a new process to invoke the ruby script to send the message. try { ProducerTemplate template = new DefaultProducerTemplate(camelContext); template.start(); template.sendBodyAndHeader(l...
void function(String filePathname) { try { ProducerTemplate template = new DefaultProducerTemplate(camelContext); template.start(); template.sendBodyAndHeader(landingZoneQueueUri, STR, STR, filePathname); template.stop(); } catch (Exception e) { LOG.error(STR + filePathname + STR, e); } }
/** * Send a message to the landing zone queue for the given file. * * @param filePathname * the file to be ingested * * @return true if the message was successfully sent to the landing zone queue * * @throws IOException */
Send a message to the landing zone queue for the given file
sendMessageToLzQueue
{ "repo_name": "inbloom/secure-data-service", "path": "sli/ingestion/ingestion-core/src/main/java/org/slc/sli/ingestion/processors/TenantProcessor.java", "license": "apache-2.0", "size": 9423 }
[ "org.apache.camel.ProducerTemplate", "org.apache.camel.impl.DefaultProducerTemplate" ]
import org.apache.camel.ProducerTemplate; import org.apache.camel.impl.DefaultProducerTemplate;
import org.apache.camel.*; import org.apache.camel.impl.*;
[ "org.apache.camel" ]
org.apache.camel;
1,400,375
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) { byte b0 = 4; int j1 = b0 + 1; if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1)) { for (int k1 = -b0; k1 <= b0; ++k1) ...
void function(World par1World, int par2, int par3, int par4, int par5, int par6) { byte b0 = 4; int j1 = b0 + 1; if (par1World.checkChunksExist(par2 - j1, par3 - j1, par4 - j1, par2 + j1, par3 + j1, par4 + j1)) { for (int k1 = -b0; k1 <= b0; ++k1) { for (int l1 = -b0; l1 <= b0; ++l1) { for (int i2 = -b0; i2 <= b0; ++i2...
/** * Called on server worlds only when the block has been replaced by a different block ID, or the same block with a * different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old * metadata */
Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old metadata
breakBlock
{ "repo_name": "Stormister/Rediscovered-Mod-1.7.10", "path": "src/main/java/com/stormister/rediscovered/BlockCherryLog.java", "license": "gpl-3.0", "size": 3580 }
[ "net.minecraft.block.Block", "net.minecraft.world.World" ]
import net.minecraft.block.Block; import net.minecraft.world.World;
import net.minecraft.block.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.world;
2,598,311
public ClassifierResult run(String instanceStr, String resultMetric, float timeout, String mSeed, List<String> args) { java.io.PrintStream stderr = System.err; System.setErr(System.out); RunnerThread runner = new RunnerThread(instanceStr, resultMetric, timeout, mSeed, args); flo...
ClassifierResult function(String instanceStr, String resultMetric, float timeout, String mSeed, List<String> args) { java.io.PrintStream stderr = System.err; System.setErr(System.out); RunnerThread runner = new RunnerThread(instanceStr, resultMetric, timeout, mSeed, args); float time = runner.runWorker(timeout * 2.05f)...
/** * Public interface to running a classifier specified in the Auto-WEKA format of arguments to generate a classifier result */
Public interface to running a classifier specified in the Auto-WEKA format of arguments to generate a classifier result
run
{ "repo_name": "dsibournemouth/autoweka", "path": "src/java/autoweka/ClassifierRunner.java", "license": "gpl-3.0", "size": 19715 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
734,563
public MetaProperty<FraDiscountingMethod> discounting() { return discounting; }
MetaProperty<FraDiscountingMethod> function() { return discounting; }
/** * The meta-property for the {@code discounting} property. * @return the meta-property, not null */
The meta-property for the discounting property
discounting
{ "repo_name": "jmptrader/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/fra/ResolvedFra.java", "license": "apache-2.0", "size": 30862 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,692,696
public AbstractPolicy copyWithNewPolicyIssuer(PolicyIssuer issuer) { AbstractPolicy newPolicy = (AbstractPolicy)clone(); newPolicy.policyIssuer = issuer; return newPolicy; }
AbstractPolicy function(PolicyIssuer issuer) { AbstractPolicy newPolicy = (AbstractPolicy)clone(); newPolicy.policyIssuer = issuer; return newPolicy; }
/** * Returns a copy of this abstract policy with a new isser. * This is useful when policies are rewritten, for instance after * a digital signature is verified, in which case the issuer * is generated based on the signature of the policy. * Also useful for implementing some models of rev...
Returns a copy of this abstract policy with a new isser. This is useful when policies are rewritten, for instance after a digital signature is verified, in which case the issuer is generated based on the signature of the policy. Also useful for implementing some models of revocation
copyWithNewPolicyIssuer
{ "repo_name": "GenericBreakGlass/GenericBreakGlass-XACML", "path": "src/com.sun.xacml/src/main/java/com/sun/xacml/AbstractPolicy.java", "license": "apache-2.0", "size": 30149 }
[ "com.sun.xacml.ctx.PolicyIssuer" ]
import com.sun.xacml.ctx.PolicyIssuer;
import com.sun.xacml.ctx.*;
[ "com.sun.xacml" ]
com.sun.xacml;
855,504
@SuppressWarnings("unchecked") public static Set<DistributedMember> getAllMembers(InternalCache cache) { return new HashSet<DistributedMember>( cache.getInternalDistributedSystem().getDistributionManager().getDistributionManagerIds()); }
@SuppressWarnings(STR) static Set<DistributedMember> function(InternalCache cache) { return new HashSet<DistributedMember>( cache.getInternalDistributedSystem().getDistributionManager().getDistributionManagerIds()); }
/** * Returns a set of all the members of the distributed system including locators. * * @param cache */
Returns a set of all the members of the distributed system including locators
getAllMembers
{ "repo_name": "shankarh/geode", "path": "geode-core/src/main/java/org/apache/geode/management/internal/cli/CliUtil.java", "license": "apache-2.0", "size": 27842 }
[ "java.util.HashSet", "java.util.Set", "org.apache.geode.distributed.DistributedMember", "org.apache.geode.internal.cache.InternalCache" ]
import java.util.HashSet; import java.util.Set; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.internal.cache.InternalCache;
import java.util.*; import org.apache.geode.distributed.*; import org.apache.geode.internal.cache.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
2,081,243
public void setZibase(Zibase pZibase) { this.zibase = pZibase; }
void function(Zibase pZibase) { this.zibase = pZibase; }
/** * set zibase to listen to * * @param pZibase */
set zibase to listen to
setZibase
{ "repo_name": "paolodenti/openhab", "path": "bundles/binding/org.openhab.binding.zibase/src/main/java/org/openhab/binding/zibase/internal/ZibaseListener.java", "license": "epl-1.0", "size": 6952 }
[ "fr.zapi.Zibase" ]
import fr.zapi.Zibase;
import fr.zapi.*;
[ "fr.zapi" ]
fr.zapi;
1,649,248
public boolean canCompileNode(Node sourceNode);
boolean function(Node sourceNode);
/** * * Evaluates whether a compiler can compile a given extension * * @param extention * @return */
Evaluates whether a compiler can compile a given extension
canCompileNode
{ "repo_name": "bobpaulin/sling-web-resource", "path": "src/main/java/org/apache/sling/webresource/WebResourceScriptCompiler.java", "license": "apache-2.0", "size": 1399 }
[ "javax.jcr.Node" ]
import javax.jcr.Node;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
893,559
private void handleCandidateProvideDefinition( NodeTraversal t, Node n, Node parent) { if (t.inGlobalHoistScope()) { String name = null; if (n.isName() && NodeUtil.isNameDeclaration(parent)) { name = n.getString(); } else if (n.isAssign() && parent.isExprResult()) { ...
void function( NodeTraversal t, Node n, Node parent) { if (t.inGlobalHoistScope()) { String name = null; if (n.isName() && NodeUtil.isNameDeclaration(parent)) { name = n.getString(); } else if (n.isAssign() && parent.isExprResult()) { name = n.getFirstChild().getQualifiedName(); } if (name != null) { if (parent.getBool...
/** * Handles a candidate definition for a goog.provided name. */
Handles a candidate definition for a goog.provided name
handleCandidateProvideDefinition
{ "repo_name": "superkonduktr/closure-compiler", "path": "src/com/google/javascript/jscomp/ProcessClosurePrimitives.java", "license": "apache-2.0", "size": 54718 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
249,223
private static ExprNodeConstantDesc typeCast(ExprNodeDesc desc, TypeInfo ti, boolean performSafeTypeCast) { if (desc instanceof ExprNodeConstantDesc && null == ((ExprNodeConstantDesc)desc).getValue()) { return null; } if (!(ti instanceof PrimitiveTypeInfo) || !(desc.getTypeInfo() instanceof Primitiv...
static ExprNodeConstantDesc function(ExprNodeDesc desc, TypeInfo ti, boolean performSafeTypeCast) { if (desc instanceof ExprNodeConstantDesc && null == ((ExprNodeConstantDesc)desc).getValue()) { return null; } if (!(ti instanceof PrimitiveTypeInfo) !(desc.getTypeInfo() instanceof PrimitiveTypeInfo)) { return null; } Pr...
/** * Cast type from expression type to expected type ti. * * @param desc constant expression * @param ti expected type info * @param performSafeTypeCast when true then don't perform typecast because it could be unsafe (loosing leading zeroes etc.) * @return cast constant, or null if the type cast fai...
Cast type from expression type to expected type ti
typeCast
{ "repo_name": "vineetgarg02/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java", "license": "apache-2.0", "size": 64058 }
[ "org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc", "org.apache.hadoop.hive.ql.plan.ExprNodeDesc", "org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector", "org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters", "org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInsp...
import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters; import org.apache.hadoop.hive.serde2.objectinspector.Primi...
import org.apache.hadoop.hive.ql.plan.*; import org.apache.hadoop.hive.serde2.objectinspector.*; import org.apache.hadoop.hive.serde2.typeinfo.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,683,207
@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": "kikora/fronter2", "path": "src/kikora/fronter2/servlet/FronterEntry.java", "license": "gpl-3.0", "size": 4470 }
[ "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;
649,404
ISubjectProxy newConcept(String conceptLocator, String topicLocator, String userLocator);
ISubjectProxy newConcept(String conceptLocator, String topicLocator, String userLocator);
/** * Create a new {@link ICGConcept} pivoted to <code>topicLocator</code> * @param conceptLocator can be <code>null</code> * @param topicLocator * @param userLocator * @return */
Create a new <code>ICGConcept</code> pivoted to <code>topicLocator</code>
newConcept
{ "repo_name": "topicquests/tq-elastic-ks", "path": "src/main/java/org/topicquests/ks/cg/api/IConceptualGraphModel.java", "license": "apache-2.0", "size": 468 }
[ "org.topicquests.ks.tm.api.ISubjectProxy" ]
import org.topicquests.ks.tm.api.ISubjectProxy;
import org.topicquests.ks.tm.api.*;
[ "org.topicquests.ks" ]
org.topicquests.ks;
1,130,701
public static boolean isStandardRGBImage(BufferedImage bImage) { return bImage.getColorModel().getColorSpace().isCS_sRGB(); }
static boolean function(BufferedImage bImage) { return bImage.getColorModel().getColorSpace().isCS_sRGB(); }
/** * <p> * Tests whether an image uses the standard RGB color space.</p> */
Tests whether an image uses the standard RGB color space
isStandardRGBImage
{ "repo_name": "OSUCartography/PyramidShader", "path": "src/edu/oregonstate/cartography/gui/NavigableImagePanel.java", "license": "gpl-3.0", "size": 36824 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,688,934
public final void changeStartDate(LocalDate date, boolean keepDuration) { requireNonNull(date); Interval interval = getInterval(); LocalDateTime newStartDateTime = getStartAsLocalDateTime().with(date); LocalDateTime endDateTime = getEndAsLocalDateTime(); if (keepDuration) ...
final void function(LocalDate date, boolean keepDuration) { requireNonNull(date); Interval interval = getInterval(); LocalDateTime newStartDateTime = getStartAsLocalDateTime().with(date); LocalDateTime endDateTime = getEndAsLocalDateTime(); if (keepDuration) { endDateTime = newStartDateTime.plus(getDuration()); setInte...
/** * Changes the start date of the entry interval. * * @param date the new start date * @param keepDuration if true then this method will also change the end date and time in such a way that the total duration * of the entry will not change. If false then this metho...
Changes the start date of the entry interval
changeStartDate
{ "repo_name": "TeHenua/Atea", "path": "src/com/calendarfx/model/Entry.java", "license": "gpl-3.0", "size": 65659 }
[ "java.time.LocalDate", "java.time.LocalDateTime", "java.util.Objects" ]
import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Objects;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
1,121,297
protected void removeResourceProperty(DavPropertyName name) throws CosmoDavException { if (name.equals(SUPPORTEDREPORTSET)) { throw new ProtectedPropertyModificationException(name); } if (isLiveProperty(name)) { removeLiveProperty(name); } els...
void function(DavPropertyName name) throws CosmoDavException { if (name.equals(SUPPORTEDREPORTSET)) { throw new ProtectedPropertyModificationException(name); } if (isLiveProperty(name)) { removeLiveProperty(name); } else { removeDeadProperty(name); } properties.remove(name); }
/** * Calls {@link #removeLiveProperty(DavPropertyName)} or * {@link removeDeadProperty(DavPropertyName)}. */
Calls <code>#removeLiveProperty(DavPropertyName)</code> or <code>removeDeadProperty(DavPropertyName)</code>
removeResourceProperty
{ "repo_name": "Eisler/cosmo", "path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/dav/impl/DavResourceBase.java", "license": "apache-2.0", "size": 18822 }
[ "org.apache.jackrabbit.webdav.property.DavPropertyName", "org.unitedinternet.cosmo.dav.CosmoDavException", "org.unitedinternet.cosmo.dav.ProtectedPropertyModificationException" ]
import org.apache.jackrabbit.webdav.property.DavPropertyName; import org.unitedinternet.cosmo.dav.CosmoDavException; import org.unitedinternet.cosmo.dav.ProtectedPropertyModificationException;
import org.apache.jackrabbit.webdav.property.*; import org.unitedinternet.cosmo.dav.*;
[ "org.apache.jackrabbit", "org.unitedinternet.cosmo" ]
org.apache.jackrabbit; org.unitedinternet.cosmo;
387,460
public static Reader getResourceAsReader(ClassLoader loader, String resource) throws IOException { return new InputStreamReader(getResourceAsStream(loader, resource)); }
static Reader function(ClassLoader loader, String resource) throws IOException { return new InputStreamReader(getResourceAsStream(loader, resource)); }
/** * Returns a resource on the classpath as a Reader object * * @param loader * The classloader used to load the resource * @param resource * The resource to find * @throws IOException * If the resource cannot be found or read * @return The resource */
Returns a resource on the classpath as a Reader object
getResourceAsReader
{ "repo_name": "killme2008/hs4j", "path": "src/main/java/com/google/code/hs4j/network/util/ResourcesUtils.java", "license": "apache-2.0", "size": 6774 }
[ "java.io.IOException", "java.io.InputStreamReader", "java.io.Reader" ]
import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
2,498,106
public void testEqualOperator() { final Session s = openSession(); s.getTransaction().begin(); final Transaction txn = new Transaction(); txn.setDescription( "foo" ); txn.setValue( new MonetoryAmount( new BigDecimal( 42 ), Currency.getInstance( "AUD" ) ) ); txn.setTimestamp( new CompositeDateTime( 2014,...
void function() { final Session s = openSession(); s.getTransaction().begin(); final Transaction txn = new Transaction(); txn.setDescription( "foo" ); txn.setValue( new MonetoryAmount( new BigDecimal( 42 ), Currency.getInstance( "AUD" ) ) ); txn.setTimestamp( new CompositeDateTime( 2014, 8, 23, 14, 35, 0 ) ); s.persist...
/** * Tests the {@code =} operator on composite types. */
Tests the = operator on composite types
testEqualOperator
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/test/java/org/hibernate/test/cut/CompositeUserTypeTest.java", "license": "lgpl-2.1", "size": 11025 }
[ "java.math.BigDecimal", "java.util.Currency", "org.hibernate.Query", "org.hibernate.Session", "org.junit.Assert" ]
import java.math.BigDecimal; import java.util.Currency; import org.hibernate.Query; import org.hibernate.Session; import org.junit.Assert;
import java.math.*; import java.util.*; import org.hibernate.*; import org.junit.*;
[ "java.math", "java.util", "org.hibernate", "org.junit" ]
java.math; java.util; org.hibernate; org.junit;
1,912,637
BigDecimal getBigDecimal(int parameterIndex) throws SQLException;
BigDecimal getBigDecimal(int parameterIndex) throws SQLException;
/** * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter as a * <code>java.math.BigDecimal</code> object with as many digits to the * right of the decimal point as the value contains. * @param parameterIndex the first parameter is 1, the second is 2, * and so on * @r...
Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter as a <code>java.math.BigDecimal</code> object with as many digits to the right of the decimal point as the value contains
getBigDecimal
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/java/sql/CallableStatement.java", "license": "gpl-2.0", "size": 135189 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,223,303
public CallHandle renderOverLays(long pixelsID, PlaneDef pd, long tableID, Map<Long, Integer> overlays, boolean asTexture, AgentEventListener observer);
CallHandle function(long pixelsID, PlaneDef pd, long tableID, Map<Long, Integer> overlays, boolean asTexture, AgentEventListener observer);
/** * Renders the image with the overlays if the passed map is not * <code>null</code>, renders the image without the overlays if * <code>null</code>. * * @param pixelsID The id of the pixels set. * @param pd The plane to render. * @param tableID The id of the table hosting the mask. * @param overl...
Renders the image with the overlays if the passed map is not <code>null</code>, renders the image without the overlays if <code>null</code>
renderOverLays
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/views/ImageDataView.java", "license": "gpl-2.0", "size": 15233 }
[ "java.util.Map", "org.openmicroscopy.shoola.env.event.AgentEventListener" ]
import java.util.Map; import org.openmicroscopy.shoola.env.event.AgentEventListener;
import java.util.*; import org.openmicroscopy.shoola.env.event.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,931,037
public RevCommit parseCommit(final AnyObjectId id) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = parseAny(id); while (c instanceof RevTag) { c = ((RevTag) c).getObject(); parseHeaders(c); } if (!(c instanceof RevCommit)) throw new IncorrectObjectTypeE...
RevCommit function(final AnyObjectId id) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = parseAny(id); while (c instanceof RevTag) { c = ((RevTag) c).getObject(); parseHeaders(c); } if (!(c instanceof RevCommit)) throw new IncorrectObjectTypeException(id.toObjectId(), Constants....
/** * Locate a reference to a commit and immediately parse its content. * <p> * Unlike {@link #lookupCommit(AnyObjectId)} this method only returns * successfully if the commit object exists, is verified to be a commit, and * was parsed without error. * * @param id * name of the commit object...
Locate a reference to a commit and immediately parse its content. Unlike <code>#lookupCommit(AnyObjectId)</code> this method only returns successfully if the commit object exists, is verified to be a commit, and was parsed without error
parseCommit
{ "repo_name": "imyousuf/jgit", "path": "org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java", "license": "bsd-3-clause", "size": 35358 }
[ "java.io.IOException", "org.eclipse.jgit.errors.IncorrectObjectTypeException", "org.eclipse.jgit.errors.MissingObjectException", "org.eclipse.jgit.lib.AnyObjectId", "org.eclipse.jgit.lib.Constants" ]
import java.io.IOException; import org.eclipse.jgit.errors.IncorrectObjectTypeException; import org.eclipse.jgit.errors.MissingObjectException; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.Constants;
import java.io.*; import org.eclipse.jgit.errors.*; import org.eclipse.jgit.lib.*;
[ "java.io", "org.eclipse.jgit" ]
java.io; org.eclipse.jgit;
813,233
@SimpleProperty(description = "Path to the file containing the image that was selected.", category = PropertyCategory.BEHAVIOR) public String Selection() { return selectionSavedImage; }
@SimpleProperty(description = STR, category = PropertyCategory.BEHAVIOR) String function() { return selectionSavedImage; }
/** * Path to the file containing the image that was selected. */
Path to the file containing the image that was selected
Selection
{ "repo_name": "warren922/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/ImagePicker.java", "license": "apache-2.0", "size": 8646 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
913,275
@Override public Date getFinalStart(int prevRawOffset, int prevDSTSavings) { // No start time available return null; }
Date function(int prevRawOffset, int prevDSTSavings) { return null; }
/** * {@inheritDoc}<br><br> * Note: This method in <code>InitialTimeZoneRule</code> always returns null. */
Note: This method in <code>InitialTimeZoneRule</code> always returns null
getFinalStart
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/InitialTimeZoneRule.java", "license": "apache-2.0", "size": 3168 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,733,011
Credentials userPassword = getCredentials(); try { document = new OpenCMISRepositoryClientFacade(userPassword.getUser(), userPassword.getPassword()).getDocument(node); } catch (UnauthorizedException e) { return "unauthorized"; } catch (ConnectionFailedException e) { return "connection-failed...
Credentials userPassword = getCredentials(); try { document = new OpenCMISRepositoryClientFacade(userPassword.getUser(), userPassword.getPassword()).getDocument(node); } catch (UnauthorizedException e) { return STR; } catch (ConnectionFailedException e) { return STR; } return SUCCESS; }
/** * Struts2 execution. */
Struts2 execution
execute
{ "repo_name": "nicolas-raoul/Struts2CmisExplorer", "path": "src/jp/aegif/struts2cmisexplorer/struts2actions/SendFileAction.java", "license": "gpl-3.0", "size": 3061 }
[ "jp.aegif.struts2cmisexplorer.domain.Credentials", "jp.aegif.struts2cmisexplorer.domain.exceptions.ConnectionFailedException", "jp.aegif.struts2cmisexplorer.domain.exceptions.UnauthorizedException", "jp.aegif.struts2cmisexplorer.opencmisbinding.OpenCMISRepositoryClientFacade" ]
import jp.aegif.struts2cmisexplorer.domain.Credentials; import jp.aegif.struts2cmisexplorer.domain.exceptions.ConnectionFailedException; import jp.aegif.struts2cmisexplorer.domain.exceptions.UnauthorizedException; import jp.aegif.struts2cmisexplorer.opencmisbinding.OpenCMISRepositoryClientFacade;
import jp.aegif.struts2cmisexplorer.domain.*; import jp.aegif.struts2cmisexplorer.domain.exceptions.*; import jp.aegif.struts2cmisexplorer.opencmisbinding.*;
[ "jp.aegif.struts2cmisexplorer" ]
jp.aegif.struts2cmisexplorer;
1,958,330
private double evalExpJS(double x) { String expression = functionJS.replaceAll("x", x + ""); Double result = null; // Result of evaluation try { result = (Double) sEngine.eval(expression); } catch (ScriptException e) { } return result; }
double function(double x) { String expression = functionJS.replaceAll("x", x + ""); Double result = null; try { result = (Double) sEngine.eval(expression); } catch (ScriptException e) { } return result; }
/** * Evaluates the function using the Javascript engine. * * @param x x value to evaluate for * @return y value at x of function */
Evaluates the function using the Javascript engine
evalExpJS
{ "repo_name": "CongeeCafe/oriel-graph", "path": "src/expressionEvaluator/MathEngine.java", "license": "gpl-2.0", "size": 7197 }
[ "javax.script.ScriptException" ]
import javax.script.ScriptException;
import javax.script.*;
[ "javax.script" ]
javax.script;
1,731,504
protected void createAccounts(final Parameter _parameter, final Instance _basePeriodInst, final Instance _periodInst, final BidiMap<Instance, Instance> _existing2new) throws EFapsException { final QueryBuilder queryBldr = new QueryBuilder(CIAccounting.AccountAbs...
void function(final Parameter _parameter, final Instance _basePeriodInst, final Instance _periodInst, final BidiMap<Instance, Instance> _existing2new) throws EFapsException { final QueryBuilder queryBldr = new QueryBuilder(CIAccounting.AccountAbstract); queryBldr.addWhereAttrEqValue(CIAccounting.AccountAbstract.PeriodA...
/** * Creates the accounts. * * @param _parameter the parameter * @param _basePeriodInst the base period inst * @param _periodInst the period inst * @param _existing2new the existing 2 new * @throws EFapsException the eFaps exception */
Creates the accounts
createAccounts
{ "repo_name": "eFaps/eFapsApp-Accounting", "path": "src/main/efaps/ESJP/org/efaps/esjp/accounting/util/PeriodCarryOver_Base.java", "license": "apache-2.0", "size": 22063 }
[ "java.util.HashMap", "java.util.Map", "org.apache.commons.collections4.BidiMap", "org.efaps.admin.event.Parameter", "org.efaps.db.Insert", "org.efaps.db.Instance", "org.efaps.db.MultiPrintQuery", "org.efaps.db.QueryBuilder", "org.efaps.db.SelectBuilder", "org.efaps.db.Update", "org.efaps.esjp.ci...
import java.util.HashMap; import java.util.Map; import org.apache.commons.collections4.BidiMap; import org.efaps.admin.event.Parameter; import org.efaps.db.Insert; import org.efaps.db.Instance; import org.efaps.db.MultiPrintQuery; import org.efaps.db.QueryBuilder; import org.efaps.db.SelectBuilder; import org.efaps.db....
import java.util.*; import org.apache.commons.collections4.*; import org.efaps.admin.event.*; import org.efaps.db.*; import org.efaps.esjp.ci.*; import org.efaps.esjp.db.*; import org.efaps.util.*;
[ "java.util", "org.apache.commons", "org.efaps.admin", "org.efaps.db", "org.efaps.esjp", "org.efaps.util" ]
java.util; org.apache.commons; org.efaps.admin; org.efaps.db; org.efaps.esjp; org.efaps.util;
2,688,448
public void captureChildView(View childView, int activePointerId) { if (childView.getParent() != mParentView) { throw new IllegalArgumentException("captureChildView: parameter must be a descendant " + "of the ViewDragHelper's tracked parent view (" + mParentView + ")"); ...
void function(View childView, int activePointerId) { if (childView.getParent() != mParentView) { throw new IllegalArgumentException(STR + STR + mParentView + ")"); } mCapturedView = childView; mActivePointerId = activePointerId; mCallback.onViewCaptured(childView, activePointerId); setDragState(STATE_DRAGGING); }
/** * Capture a specific child view for dragging within the parent. The callback will be notified * but {@link Callback#tryCaptureView(android.view.View, int)} will not be asked permission to * capture this view. * * @param childView Child view to capture * @param activePointerId ID ...
Capture a specific child view for dragging within the parent. The callback will be notified but <code>Callback#tryCaptureView(android.view.View, int)</code> will not be asked permission to capture this view
captureChildView
{ "repo_name": "Vinetos/Hello-Music-droid", "path": "app/src/main/java/com/naman14/timber/slidinguppanel/ViewDragHelper.java", "license": "gpl-3.0", "size": 59814 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
701,820
static Integer convertToInt(SessionInterface session, Object a, int type) { int value; if (a instanceof Integer) { if (type == Types.SQL_INTEGER) { return (Integer) a; } value = ((Integer) a).intValue(); } else if (a instanceof Long...
static Integer convertToInt(SessionInterface session, Object a, int type) { int value; if (a instanceof Integer) { if (type == Types.SQL_INTEGER) { return (Integer) a; } value = ((Integer) a).intValue(); } else if (a instanceof Long) { long temp = ((Long) a).longValue(); if (Integer.MAX_VALUE < temp temp < Integer.MIN_...
/** * Converter from a numeric object to Integer. Input is checked to be * within range represented by the given number type. */
Converter from a numeric object to Integer. Input is checked to be within range represented by the given number type
convertToInt
{ "repo_name": "ggorsontanguy/pocHSQLDB", "path": "hsqldb-2.2.9/hsqldb/src/org/hsqldb/types/NumberType.java", "license": "gpl-3.0", "size": 60441 }
[ "java.math.BigDecimal", "org.hsqldb.Session", "org.hsqldb.SessionInterface", "org.hsqldb.error.Error", "org.hsqldb.error.ErrorCode" ]
import java.math.BigDecimal; import org.hsqldb.Session; import org.hsqldb.SessionInterface; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode;
import java.math.*; import org.hsqldb.*; import org.hsqldb.error.*;
[ "java.math", "org.hsqldb", "org.hsqldb.error" ]
java.math; org.hsqldb; org.hsqldb.error;
2,334,097
@Override public void close() throws IOException { mCsnA2.write(CsnA2.commandEnablePrinter(false)); // Disable connection to printer. mCsnA2.close(); } public abstract static class JobStateListener { void onJobEnqueued(Job job) {}
void function() throws IOException { mCsnA2.write(CsnA2.commandEnablePrinter(false)); mCsnA2.close(); } public abstract static class JobStateListener { void onJobEnqueued(Job job) {}
/** * Closes the connection to the printer and disables connection to the printer. */
Closes the connection to the printer and disables connection to the printer
close
{ "repo_name": "androidthings/contrib-drivers", "path": "thermalprinter/src/main/java/com/google/android/things/contrib/driver/thermalprinter/ThermalPrinter.java", "license": "apache-2.0", "size": 31327 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,779,269
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); cbFormaPagamento = new javax.swing.JComboBox(); jL...
@SuppressWarnings(STR) void function() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); cbFormaPagamento = new javax.swing.JComboBox(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); cbSituacao = new javax.swing.JCheckBox(); btSalvar = new javax.swing.JButton(); btAdici...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "thalesfp/exemplo_app_biblioteca_java_swing", "path": "src/livraria/interfaces/InterfacePedidoFormulario.java", "license": "mit", "size": 24404 }
[ "javax.swing.DefaultComboBoxModel" ]
import javax.swing.DefaultComboBoxModel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
733,205
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == zero) { // continue backwards (kills current activity calling onDestroy) finish(); return true; } return super.onKeyDown(keyCode, event); }
boolean function(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == zero) { finish(); return true; } return super.onKeyDown(keyCode, event); }
/** * onKeyDown overrides onKeyDown and allows code to be executed when the * back button is pushed in the simulator / on the mobile phone Since * pushing "back" won't necessarily call the destroy method as far as I * understand it. * * @param keyCode * : code of the key p...
onKeyDown overrides onKeyDown and allows code to be executed when the back button is pushed in the simulator / on the mobile phone Since pushing "back" won't necessarily call the destroy method as far as I understand it
onKeyDown
{ "repo_name": "robinos/Handalfabet", "path": "Android/src/com/example/android/ProfileSettingsActivity.java", "license": "gpl-3.0", "size": 5378 }
[ "android.view.KeyEvent" ]
import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
270,459
private void reduce_x(int instIdx, int t, Partition T, Input input) { // Update the prior probability of the cluster ArrayList<Integer> indices = T.find(t); double sum = 0.0; for (int i = 0; i < indices.size(); i++) { if (indices.get(i) == instIdx) continue; sum += input.Px[indices....
void function(int instIdx, int t, Partition T, Input input) { ArrayList<Integer> indices = T.find(t); double sum = 0.0; for (int i = 0; i < indices.size(); i++) { if (indices.get(i) == instIdx) continue; sum += input.Px[indices.get(i)]; } T.Pt[t] = sum; if (T.Pt[t] < 0) { System.out.format(STR, T.Pt[t]); T.Pt[t] = 0; }...
/** * Draw a instance out from a cluster. * @param instIdx index of the instance to be drawn out * @param t index of the cluster which the instance previously belong to * @param T the current working partition * @param input the input statistics */
Draw a instance out from a cluster
reduce_x
{ "repo_name": "goddesss/DataModeling", "path": "src/weka/clusterers/sIB.java", "license": "gpl-2.0", "size": 36044 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
505,970
public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setByte("SkullType", (byte)(this.skullType & 255)); par1NBTTagCompound.setByte("Rot", (byte)(this.skullRotation & 255)); par1NBTTagCompound.setString("ExtraType", ...
void function(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); par1NBTTagCompound.setByte(STR, (byte)(this.skullType & 255)); par1NBTTagCompound.setByte("Rot", (byte)(this.skullRotation & 255)); par1NBTTagCompound.setString(STR, this.extraType); }
/** * Writes a tile entity to NBT. */
Writes a tile entity to NBT
writeToNBT
{ "repo_name": "wildex999/stjerncraft_mcpc", "path": "src/minecraft/net/minecraft/tileentity/TileEntitySkull.java", "license": "gpl-3.0", "size": 2410 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
532,385
public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info) throws IOException { // defer argument checking... ImageMapUtilities.writeImageMap(writer, name, info, new StandardToolTipTagFragmentGenerato...
static void function(PrintWriter writer, String name, ChartRenderingInfo info) throws IOException { ImageMapUtilities.writeImageMap(writer, name, info, new StandardToolTipTagFragmentGenerator(), new StandardURLTagFragmentGenerator()); }
/** * Writes an image map to an output stream. * * @param writer the writer (<code>null</code> not permitted). * @param name the map name (<code>null</code> not permitted). * @param info the chart rendering info (<code>null</code> not permitted). * * @throws java.io.IOExcept...
Writes an image map to an output stream
writeImageMap
{ "repo_name": "integrated/jfreechart", "path": "source/org/jfree/chart/imagemap/ImageMapUtilities.java", "license": "lgpl-2.1", "size": 9618 }
[ "java.io.IOException", "java.io.PrintWriter", "org.jfree.chart.ChartRenderingInfo" ]
import java.io.IOException; import java.io.PrintWriter; import org.jfree.chart.ChartRenderingInfo;
import java.io.*; import org.jfree.chart.*;
[ "java.io", "org.jfree.chart" ]
java.io; org.jfree.chart;
982,191
@Test public void testTestAndSetList2b() throws ConnectionException, TimeoutException, UnknownException, NotFoundException, AbortException { final String key = "_TestAndSetList2b"; final TransactionSingleOp conn = new TransactionSingleOp(); try { // first write a...
void function() throws ConnectionException, TimeoutException, UnknownException, NotFoundException, AbortException { final String key = STR; final TransactionSingleOp conn = new TransactionSingleOp(); try { final ArrayList<String> list = new ArrayList<String>(); list.add(testData[0]); list.add(testData[1]); conn.write(t...
/** * Test method for * {@link TransactionSingleOp#testAndSet(String, Object, List)}, * {@link TransactionSingleOp#read(String)} and * {@link TransactionSingleOp#write(String, List)}. * Writes a list and tries to overwrite it using test_and_set knowing the * wrong old value and using a sin...
Test method for <code>TransactionSingleOp#testAndSet(String, Object, List)</code>, <code>TransactionSingleOp#read(String)</code> and <code>TransactionSingleOp#write(String, List)</code>. Writes a list and tries to overwrite it using test_and_set knowing the wrong old value and using a single key for all the values. Tri...
testTestAndSetList2b
{ "repo_name": "fredrikelinder/scalaris", "path": "java-api/test/de/zib/scalaris/TransactionSingleOpTest.java", "license": "apache-2.0", "size": 39622 }
[ "java.util.ArrayList", "java.util.List", "org.junit.Assert", "org.junit.Test" ]
import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.junit.Test;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,079,585
Scan scan = null; if ( ( endRow != null ) && ( endRow.length > 0 ) ) { if ( trrRowFilter != null ) { scan = new Scan( firstRow, endRow ); configureScanWithInputColumns( scan, trrInputColumns ); scan.setFilter( trrRowFilter ); scan.setCacheBlocks( false ); } else { ...
Scan scan = null; if ( ( endRow != null ) && ( endRow.length > 0 ) ) { if ( trrRowFilter != null ) { scan = new Scan( firstRow, endRow ); configureScanWithInputColumns( scan, trrInputColumns ); scan.setFilter( trrRowFilter ); scan.setCacheBlocks( false ); } else { LOG.debug( STR + Bytes.toStringBinary( firstRow ) + STR...
/** * Restart from survivable exceptions by creating a new scanner. * * @param firstRow * @throws IOException */
Restart from survivable exceptions by creating a new scanner
restart
{ "repo_name": "pentaho/pentaho-hadoop-shims", "path": "common-fragment-V1/src/main/java/org/pentaho/hbase/mapred/PentahoTableRecordReaderImpl.java", "license": "apache-2.0", "size": 8453 }
[ "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,170,463
private static Fragment createCanteenListFragment() { Fragment fragment = new CanteenListFragment(); Bundle args = new Bundle(); args.putString(EntityListFragment.ARG_ENTITIES_URL, propProvider.getProperty(PROP_KEY_CANTEEN_URL)); fragment.setArguments(args); return fragment; }
static Fragment function() { Fragment fragment = new CanteenListFragment(); Bundle args = new Bundle(); args.putString(EntityListFragment.ARG_ENTITIES_URL, propProvider.getProperty(PROP_KEY_CANTEEN_URL)); fragment.setArguments(args); return fragment; }
/** * Creates a fragment object for the canteen list fragment, with the * correct canteen URL as argument. * * @return the canteen list fragment */
Creates a fragment object for the canteen list fragment, with the correct canteen URL as argument
createCanteenListFragment
{ "repo_name": "QULab/MoCCha-Android", "path": "Moccha-Android/src/de/tel/moccha/activities/MoCChaMainNavigationActivity.java", "license": "apache-2.0", "size": 7664 }
[ "android.os.Bundle", "android.support.v4.app.Fragment", "de.tel.moccha.activities.fragments.canteen.CanteenListFragment", "de.zell.android.util.fragments.EntityListFragment" ]
import android.os.Bundle; import android.support.v4.app.Fragment; import de.tel.moccha.activities.fragments.canteen.CanteenListFragment; import de.zell.android.util.fragments.EntityListFragment;
import android.os.*; import android.support.v4.app.*; import de.tel.moccha.activities.fragments.canteen.*; import de.zell.android.util.fragments.*;
[ "android.os", "android.support", "de.tel.moccha", "de.zell.android" ]
android.os; android.support; de.tel.moccha; de.zell.android;
1,505,319
TestItem<ExampleTestInput, ExampleTestExpectation> item = super.createTestItem(inputFile, expectedFile); ExampleWorkerTask task = getTaskTemplate(); // if the task is null, put in default values if(task==null){ task=new ExampleWorkerTask(); task.action = ExampleWorkerAct...
TestItem<ExampleTestInput, ExampleTestExpectation> item = super.createTestItem(inputFile, expectedFile); ExampleWorkerTask task = getTaskTemplate(); if(task==null){ task=new ExampleWorkerTask(); task.action = ExampleWorkerAction.VERBATIM; } item.getInputData().setTask(task); return item; }
/** * Method for generating test items from the yaml testcases. * Creates ExampleTestInput and ExampleTestExpectation objects (which contain ExampleWorkerTask and ExampleWorkerResult). * The ExampleWorkerTask found in ExampleTestInput is fed into the worker for the integration test, and the result is ...
Method for generating test items from the yaml testcases. Creates ExampleTestInput and ExampleTestExpectation objects (which contain ExampleWorkerTask and ExampleWorkerResult). The ExampleWorkerTask found in ExampleTestInput is fed into the worker for the integration test, and the result is compared with the ExampleWor...
createTestItem
{ "repo_name": "tonymcveigh/worker-fw", "path": "worker-example/worker-example-container/src/test/java/com/hpe/caf/worker/example/ExampleResultPreparationProvider.java", "license": "apache-2.0", "size": 2397 }
[ "com.hpe.caf.worker.testing.TestItem" ]
import com.hpe.caf.worker.testing.TestItem;
import com.hpe.caf.worker.testing.*;
[ "com.hpe.caf" ]
com.hpe.caf;
2,003,988
@Override public V waitForValue() throws ExecutionException { if (computedReference == UNSET) { boolean interrupted = false; try { synchronized (this) { while (computedReference == UNSET) { try { wait(); } catch (Interrupted...
V function() throws ExecutionException { if (computedReference == UNSET) { boolean interrupted = false; try { synchronized (this) { while (computedReference == UNSET) { try { wait(); } catch (InterruptedException ie) { interrupted = true; } } } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } re...
/** * Waits for a computation to complete. Returns the result of the computation. */
Waits for a computation to complete. Returns the result of the computation
waitForValue
{ "repo_name": "hambroperks/j2objc", "path": "guava/sources/com/google/common/collect/ComputingConcurrentHashMap.java", "license": "apache-2.0", "size": 13585 }
[ "java.util.concurrent.ExecutionException" ]
import java.util.concurrent.ExecutionException;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,737,510
private static int getNextAlarm(Calendar c, int mDays) { if (mDays == 0) return -1; int today = (c.get(Calendar.DAY_OF_WEEK) + 5) % 7; int day, dayCount; for (dayCount = 0; dayCount < 7; dayCount++) { day = (today + dayCount) % 7; if ((mDays & (1 << day)) > 0...
static int function(Calendar c, int mDays) { if (mDays == 0) return -1; int today = (c.get(Calendar.DAY_OF_WEEK) + 5) % 7; int day, dayCount; for (dayCount = 0; dayCount < 7; dayCount++) { day = (today + dayCount) % 7; if ((mDays & (1 << day)) > 0) { break; } } return dayCount; }
/** * returns number of days from today until next alarmclock * * @param c must be set to today * @param mDays alarmclock-clock internal days representation * @return days count */
returns number of days from today until next alarmclock
getNextAlarm
{ "repo_name": "soarcn/COCO-Accessory", "path": "utils/src/main/java/com/cocosw/accessory/utils/AlarmDatabase.java", "license": "apache-2.0", "size": 11737 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
343,435
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws Exception { PreparedStatement p = null; ResultSet rs = null; OutputStream blobWriter = null; try { p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); ...
static void function(String query, int idForQuery, String value) throws Exception { PreparedStatement p = null; ResultSet rs = null; OutputStream blobWriter = null; try { p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); rs = p.executeQuery(); rs.next(); Blob text = rs.getBlob...
/** * The query should look like: * * SELECT blob_field from any_table WHERE id = ? FOR UPDATE * * BUT KEEP IN MIND: * * When you insert record in previous step, it should go with empty_blob() like: * * INSERT INTO jforum_posts_text ( post_text ) VALUES (EMPTY_BLOB()) * * @param qu...
The query should look like: SELECT blob_field from any_table WHERE id = ? FOR UPDATE When you insert record in previous step, it should go with empty_blob() like: INSERT INTO jforum_posts_text ( post_text ) VALUES (EMPTY_BLOB())
writeBlobUTF16BinaryStream
{ "repo_name": "dalinhuang/suduforum", "path": "src/net/jforum/dao/oracle/OracleUtils.java", "license": "bsd-3-clause", "size": 4200 }
[ "java.io.IOException", "java.io.OutputStream", "java.sql.Blob", "java.sql.PreparedStatement", "java.sql.ResultSet", "net.jforum.JForumExecutionContext", "net.jforum.exceptions.DatabaseException", "net.jforum.util.DbUtils" ]
import java.io.IOException; import java.io.OutputStream; import java.sql.Blob; import java.sql.PreparedStatement; import java.sql.ResultSet; import net.jforum.JForumExecutionContext; import net.jforum.exceptions.DatabaseException; import net.jforum.util.DbUtils;
import java.io.*; import java.sql.*; import net.jforum.*; import net.jforum.exceptions.*; import net.jforum.util.*;
[ "java.io", "java.sql", "net.jforum", "net.jforum.exceptions", "net.jforum.util" ]
java.io; java.sql; net.jforum; net.jforum.exceptions; net.jforum.util;
2,179,266
protected void addRtlPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Presentation_rtl_feature"), getString("_UI_PropertyDescriptor_descripti...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RevealPackage.Literals.PRESENTATION__RTL, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALU...
/** * This adds a property descriptor for the Rtl feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Rtl feature.
addRtlPropertyDescriptor
{ "repo_name": "CohesionForce/reveal", "path": "plugins/com.cohesionforce.reveal.model.edit/src/com/cohesionforce/reveal/provider/PresentationItemProvider.java", "license": "epl-1.0", "size": 31411 }
[ "com.cohesionforce.reveal.RevealPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import com.cohesionforce.reveal.RevealPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import com.cohesionforce.reveal.*; import org.eclipse.emf.edit.provider.*;
[ "com.cohesionforce.reveal", "org.eclipse.emf" ]
com.cohesionforce.reveal; org.eclipse.emf;
2,110,217
private Way singularAreaToWay(Area area, long wayId) { List<Coord> points = Java2DConverter.singularAreaToPoints(area); if (points == null || points.isEmpty()) { if (log.isDebugEnabled()) { log.debug("Empty area", wayId + ".", toBrowseURL()); } return null; } return new Way(wayId, points); }
Way function(Area area, long wayId) { List<Coord> points = Java2DConverter.singularAreaToPoints(area); if (points == null points.isEmpty()) { if (log.isDebugEnabled()) { log.debug(STR, wayId + ".", toBrowseURL()); } return null; } return new Way(wayId, points); }
/** * Convert an area to an mkgmap way. The caller must ensure that the area is singular. * Otherwise only the first part of the area is converted. * * @param area * the area * @param wayId * the wayid for the new way * @return a new mkgmap way */
Convert an area to an mkgmap way. The caller must ensure that the area is singular. Otherwise only the first part of the area is converted
singularAreaToWay
{ "repo_name": "balp/mkgmap", "path": "src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java", "license": "gpl-2.0", "size": 83289 }
[ "java.awt.geom.Area", "java.util.List", "uk.me.parabola.imgfmt.app.Coord", "uk.me.parabola.util.Java2DConverter" ]
import java.awt.geom.Area; import java.util.List; import uk.me.parabola.imgfmt.app.Coord; import uk.me.parabola.util.Java2DConverter;
import java.awt.geom.*; import java.util.*; import uk.me.parabola.imgfmt.app.*; import uk.me.parabola.util.*;
[ "java.awt", "java.util", "uk.me.parabola" ]
java.awt; java.util; uk.me.parabola;
2,743,603
public Configurable withHttpClient(HttpClient httpClient) { this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); return this; }
Configurable function(HttpClient httpClient) { this.httpClient = Objects.requireNonNull(httpClient, STR); return this; }
/** * Sets the http client. * * @param httpClient the HTTP client. * @return the configurable object itself. */
Sets the http client
withHttpClient
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/HybridComputeManager.java", "license": "mit", "size": 11870 }
[ "com.azure.core.http.HttpClient", "java.util.Objects" ]
import com.azure.core.http.HttpClient; import java.util.Objects;
import com.azure.core.http.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
2,388,089
public void setResource(Resource resource) { this.resource = resource; }
void function(Resource resource) { this.resource = resource; }
/** * Set the resource that this bean definition came from * (for the purpose of showing context in case of errors). */
Set the resource that this bean definition came from (for the purpose of showing context in case of errors)
setResource
{ "repo_name": "deathspeeder/class-guard", "path": "spring-framework-3.2.x/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java", "license": "gpl-2.0", "size": 35603 }
[ "org.springframework.core.io.Resource" ]
import org.springframework.core.io.Resource;
import org.springframework.core.io.*;
[ "org.springframework.core" ]
org.springframework.core;
722,166
return new Builder(); } protected final SSLContext context; protected final String[] cipherSuites; protected JdkSSLOptions(SSLContext context, String[] cipherSuites) { this.context = (context == null) ? makeDefaultContext() : context; this.cipherSuites = cipherSuites; }
return new Builder(); } protected final SSLContext context; protected final String[] cipherSuites; protected JdkSSLOptions(SSLContext context, String[] cipherSuites) { this.context = (context == null) ? makeDefaultContext() : context; this.cipherSuites = cipherSuites; }
/** * Creates a builder to create a new instance. * * @return the builder. */
Creates a builder to create a new instance
builder
{ "repo_name": "tolbertam/java-driver", "path": "driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java", "license": "apache-2.0", "size": 4558 }
[ "javax.net.ssl.SSLContext" ]
import javax.net.ssl.SSLContext;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
2,601,057
public static File findWorkDir() { return findWorkDir(new File(System.getProperty("user.dir"))); }
static File function() { return findWorkDir(new File(System.getProperty(STR))); }
/** * Find the {@code work} directory, starting at the {@code user.dir} directory. Search * is performed by walking the parent directories. * @return the {@link File} pointing to the {@code work} directory * @throws IllegalStateException If the {@code work} directory cannot be found. */
Find the work directory, starting at the user.dir directory. Search is performed by walking the parent directories
findWorkDir
{ "repo_name": "spencergibb/spring-cloud-vault-config", "path": "spring-cloud-vault-config/src/test/java/org/springframework/cloud/vault/util/Settings.java", "license": "apache-2.0", "size": 3120 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,956,698
public static Throwable unwrapCause( Throwable ex ) { return Iterables.find( causes( ex ), FilterCauses.INSTANCE, ex ); }
static Throwable function( Throwable ex ) { return Iterables.find( causes( ex ), FilterCauses.INSTANCE, ex ); }
/** * Unwrap generic exceptions to find the underlying cause. A new instance of Exception is returned * which contains a subset of the exception and its causes which excludes each of RuntimeException * and UndeclaredThrowableException while preserving any messages. */
Unwrap generic exceptions to find the underlying cause. A new instance of Exception is returned which contains a subset of the exception and its causes which excludes each of RuntimeException and UndeclaredThrowableException while preserving any messages
unwrapCause
{ "repo_name": "grze/parentheses", "path": "clc/modules/msgs/src/main/java/com/eucalyptus/util/Exceptions.java", "license": "gpl-3.0", "size": 17541 }
[ "com.google.common.collect.Iterables" ]
import com.google.common.collect.Iterables;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
2,617,046
void close(ListenerSessionManager sessionManager);
void close(ListenerSessionManager sessionManager);
/** * Close all ServerSessions for the given session manager. * @param sessionManager the session manager used for * creating and executing new listener sessions * (implicitly indicating the target listener) */
Close all ServerSessions for the given session manager
close
{ "repo_name": "mattxia/spring-2.5-analysis", "path": "src/org/springframework/jms/listener/serversession/ServerSessionFactory.java", "license": "apache-2.0", "size": 2371 }
[ "org.springframework.jms.listener.serversession.ListenerSessionManager" ]
import org.springframework.jms.listener.serversession.ListenerSessionManager;
import org.springframework.jms.listener.serversession.*;
[ "org.springframework.jms" ]
org.springframework.jms;
1,948,011
public List<StudentEntity> get(Map<String, String> queryParams) { log.info("The method get by filters was called"); Query<StudentEntity> query = ofy().load().type(StudentEntity.class); for (String key : queryParams.keySet()) { query = query.filter(key, queryParams.get(key)); } List<StudentEntity> studen...
List<StudentEntity> function(Map<String, String> queryParams) { log.info(STR); Query<StudentEntity> query = ofy().load().type(StudentEntity.class); for (String key : queryParams.keySet()) { query = query.filter(key, queryParams.get(key)); } List<StudentEntity> students = query.list(); return students; }
/** * Method that load the students that match the filter parameter from the * datastore. * * @param queryParams * map that contains the filter parameter, the key represent the * field and the value the value to filter. * @return List of students entities that match the filter param...
Method that load the students that match the filter parameter from the datastore
get
{ "repo_name": "fabian-perez-sanjines/SuperSimpleSchedulingSystem", "path": "src/main/java/com/s4/data/access/layer/StudentManager.java", "license": "apache-2.0", "size": 5724 }
[ "com.googlecode.objectify.ObjectifyService", "com.googlecode.objectify.cmd.Query", "com.s4.entity.StudentEntity", "java.util.List", "java.util.Map" ]
import com.googlecode.objectify.ObjectifyService; import com.googlecode.objectify.cmd.Query; import com.s4.entity.StudentEntity; import java.util.List; import java.util.Map;
import com.googlecode.objectify.*; import com.googlecode.objectify.cmd.*; import com.s4.entity.*; import java.util.*;
[ "com.googlecode.objectify", "com.s4.entity", "java.util" ]
com.googlecode.objectify; com.s4.entity; java.util;
2,734,252
public static void eachObject(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException { try { while (true) { try { Object obj = ois.readObject(); // we allow null objects in the object stream c...
static void function(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException { try { while (true) { try { Object obj = ois.readObject(); closure.call(obj); } catch (EOFException e) { break; } } InputStream temp = ois; ois = null; temp.close(); } finally { closeWithWarning(ois); } }
/** * Iterates through the given object stream object by object. The * ObjectInputStream is closed afterwards. * * @param ois an ObjectInputStream, closed after the operation * @param closure a closure * @throws IOException if an IOException occurs. * @throws ClassNotFo...
Iterates through the given object stream object by object. The ObjectInputStream is closed afterwards
eachObject
{ "repo_name": "graemerocher/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/IOGroovyMethods.java", "license": "apache-2.0", "size": 64289 }
[ "groovy.lang.Closure", "java.io.EOFException", "java.io.IOException", "java.io.InputStream", "java.io.ObjectInputStream" ]
import groovy.lang.Closure; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream;
import groovy.lang.*; import java.io.*;
[ "groovy.lang", "java.io" ]
groovy.lang; java.io;
2,618,830
public void setStartDate(Date v) { filter.setStartDate(v); }
void function(Date v) { filter.setStartDate(v); }
/** * Set the start date of the filter * @param v the new start date */
Set the start date of the filter
setStartDate
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/monitoring/ModifyFilterCommand.java", "license": "gpl-2.0", "size": 12581 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,535,700
@DoesServiceRequest public void uploadRange(final InputStream sourceStream, final long offset, final long length, final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException, IOException { if (opContext == null) { ...
void function(final InputStream sourceStream, final long offset, final long length, final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException, IOException { if (opContext == null) { opContext = new OperationContext(); } options = FileRequestOptions.applyDefau...
/** * Uploads a range to a file using the specified lease ID, request options, and operation context. * * @param sourceStream * An {@link IntputStream} object which represents the input stream to write to the file. * @param offset * A <code>long</code> which represen...
Uploads a range to a file using the specified lease ID, request options, and operation context
uploadRange
{ "repo_name": "peterhoeltschi/AzureStorage", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java", "license": "apache-2.0", "size": 119971 }
[ "com.microsoft.azure.storage.AccessCondition", "com.microsoft.azure.storage.OperationContext", "com.microsoft.azure.storage.StorageException", "com.microsoft.azure.storage.core.Base64", "com.microsoft.azure.storage.core.Utility", "java.io.IOException", "java.io.InputStream", "java.security.MessageDige...
import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.Base64; import com.microsoft.azure.storage.core.Utility; import java.io.IOException; import java.io.InputStream; import ja...
import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; import java.io.*; import java.security.*;
[ "com.microsoft.azure", "java.io", "java.security" ]
com.microsoft.azure; java.io; java.security;
2,774,549
public boolean repairColumnFamilies(String keyspace,String[] columnFamilies) throws ClusterDataAdminException { return ClusterMBeanProxy.getClusterStorageMBeanService().repair(keyspace, columnFamilies); }
boolean function(String keyspace,String[] columnFamilies) throws ClusterDataAdminException { return ClusterMBeanProxy.getClusterStorageMBeanService().repair(keyspace, columnFamilies); }
/** * Repair a column family * @param keyspace Name of the keyspace where column family located * @param columnFamilies Name of the column families * @return return true if operation success and else false * @throws org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException for u...
Repair a column family
repairColumnFamilies
{ "repo_name": "lankavitharana/carbon-storage-management", "path": "components/cassandra/org.wso2.carbon.cassandra.cluster.mgt/src/main/java/org/wso2/carbon/cassandra/cluster/mgt/service/ClusterOperationAdmin.java", "license": "apache-2.0", "size": 23939 }
[ "org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException", "org.wso2.carbon.cassandra.cluster.mgt.mbean.ClusterMBeanProxy" ]
import org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException; import org.wso2.carbon.cassandra.cluster.mgt.mbean.ClusterMBeanProxy;
import org.wso2.carbon.cassandra.cluster.mgt.exception.*; import org.wso2.carbon.cassandra.cluster.mgt.mbean.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
857,898
public void testSecretKeyFactory06() throws NoSuchProviderException, NoSuchAlgorithmException { if (!DEFSupported) { fail(NotSupportMsg); return; } for (int i = 0; i < validValues.length; i++) { SecretKeyFactory secKF = SecretKeyFactory.getInst...
void function() throws NoSuchProviderException, NoSuchAlgorithmException { if (!DEFSupported) { fail(NotSupportMsg); return; } for (int i = 0; i < validValues.length; i++) { SecretKeyFactory secKF = SecretKeyFactory.getInstance( validValues[i], defaultProviderName); assertEquals(STR, secKF.getAlgorithm(), validValues[i...
/** * Test for <code>getInstance(String algorithm, String provider)</code> * method * Assertion: returns SecretKeyFactory object */
Test for <code>getInstance(String algorithm, String provider)</code> method Assertion: returns SecretKeyFactory object
testSecretKeyFactory06
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactoryTest.java", "license": "gpl-3.0", "size": 16414 }
[ "java.security.NoSuchAlgorithmException", "java.security.NoSuchProviderException", "javax.crypto.SecretKeyFactory" ]
import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import javax.crypto.SecretKeyFactory;
import java.security.*; import javax.crypto.*;
[ "java.security", "javax.crypto" ]
java.security; javax.crypto;
2,856,597
public static List<Image> describeAllImages() { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); // the mock endpoint for ec2 ...
static List<Image> function() { AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); String ec2Endpoint = "http: amazonEC2Client.setEndpoint(ec2Endpoint); DescribeImagesResult result = amazonEC2Client.describeImages(); return result.getI...
/** * Describe all available AMIs within aws-mock. * * @return a list of AMIs */
Describe all available AMIs within aws-mock
describeAllImages
{ "repo_name": "treelogic-swe/aws-mock", "path": "example/java/full/client-usage/DescribeImagesExample.java", "license": "mit", "size": 1692 }
[ "com.amazonaws.auth.AWSCredentials", "com.amazonaws.auth.BasicAWSCredentials", "com.amazonaws.services.ec2.AmazonEC2Client", "com.amazonaws.services.ec2.model.DescribeImagesResult", "com.amazonaws.services.ec2.model.Image", "java.util.List" ]
import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.services.ec2.AmazonEC2Client; import com.amazonaws.services.ec2.model.DescribeImagesResult; import com.amazonaws.services.ec2.model.Image; import java.util.List;
import com.amazonaws.auth.*; import com.amazonaws.services.ec2.*; import com.amazonaws.services.ec2.model.*; import java.util.*;
[ "com.amazonaws.auth", "com.amazonaws.services", "java.util" ]
com.amazonaws.auth; com.amazonaws.services; java.util;
2,265,226
List<SemestreCurso> semestreCursoList = semestreCursoDAO.getSemestreCursoList(); for (SemestreCurso semestreCurso : semestreCursoList) { System.out.println("idn: " + semestreCurso.getIdn()+ " Curso:" + semestreCurso.getCursoIDN() + " Modalidad:" + semestreCurso.getModalidadCursoIDN()); } } /** * ...
List<SemestreCurso> semestreCursoList = semestreCursoDAO.getSemestreCursoList(); for (SemestreCurso semestreCurso : semestreCursoList) { System.out.println(STR + semestreCurso.getIdn()+ STR + semestreCurso.getCursoIDN() + STR + semestreCurso.getModalidadCursoIDN()); } } /** * Test para crear una {@link SemestreCurso}
/** * Test que consulta todas modalidades de cursos */
Test que consulta todas modalidades de cursos
getSemestreCursoList
{ "repo_name": "zerstoren1234567/PruebaDesarrollo", "path": "PI1Web/test/com/proint1/udea/administracion/entidades/academico/SemestreCursoTest.java", "license": "gpl-2.0", "size": 1595 }
[ "com.proint1.udea.administracion.entidades.academico.SemestreCurso", "java.util.List", "org.junit.Test" ]
import com.proint1.udea.administracion.entidades.academico.SemestreCurso; import java.util.List; import org.junit.Test;
import com.proint1.udea.administracion.entidades.academico.*; import java.util.*; import org.junit.*;
[ "com.proint1.udea", "java.util", "org.junit" ]
com.proint1.udea; java.util; org.junit;
510,756
EClass getCustomProperty();
EClass getCustomProperty();
/** * Returns the meta object for class '{@link ch.hilbri.assist.model.CustomProperty <em>Custom Property</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Custom Property</em>'. * @see ch.hilbri.assist.model.CustomProperty * @generated ...
Returns the meta object for class '<code>ch.hilbri.assist.model.CustomProperty Custom Property</code>'.
getCustomProperty
{ "repo_name": "RobertHilbrich/assist", "path": "ch.hilbri.assist.model/src-gen/ch/hilbri/assist/model/ModelPackage.java", "license": "gpl-2.0", "size": 419306 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
304,068
public KeyDiscriminatorParser getKeyDiscriminatorParser(Map<String, INodeParser<?>> parsersByKey, INodeParser<?> fallbackParser) { return applicationContext.getBean(KeyDiscriminatorParser.class, parsersByKey, fallbackParser); }
KeyDiscriminatorParser function(Map<String, INodeParser<?>> parsersByKey, INodeParser<?> fallbackParser) { return applicationContext.getBean(KeyDiscriminatorParser.class, parsersByKey, fallbackParser); }
/** * Get a new instance of a KeyDiscriminatorParser with the given parameters for key discrimined parsers and fallback. * * @param parsersByKey The parsers to associate based on key found in the parsed node. * @param fallbackParser The fallback parser in case no key matches. * @return a new i...
Get a new instance of a KeyDiscriminatorParser with the given parameters for key discrimined parsers and fallback
getKeyDiscriminatorParser
{ "repo_name": "broly-git/alien4cloud", "path": "alien4cloud-tosca/src/main/java/alien4cloud/tosca/parser/impl/base/BaseParserFactory.java", "license": "apache-2.0", "size": 6044 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,162,011
protected void assertOperationRequiresReload(CLIOpResult opResult) { final ModelNode responseNode = opResult.getResponseNode(); final String[] names = new String[] { "response-headers", "operation-requires-reload" }; assertTrue("Operation should require reload", responseNode ...
void function(CLIOpResult opResult) { final ModelNode responseNode = opResult.getResponseNode(); final String[] names = new String[] { STR, STR }; assertTrue(STR, responseNode != null && responseNode.hasDefined(names) && responseNode.get(names).asBoolean()); }
/** * Asserts that given operation result contains requirement for server reload. * * @param opResult */
Asserts that given operation result contains requirement for server reload
assertOperationRequiresReload
{ "repo_name": "xasx/wildfly", "path": "testsuite/integration/secman/src/test/java/org/jboss/as/testsuite/integration/secman/subsystem/ReloadableCliTestBase.java", "license": "lgpl-2.1", "size": 3888 }
[ "org.jboss.as.test.integration.management.util.CLIOpResult", "org.jboss.dmr.ModelNode", "org.junit.Assert" ]
import org.jboss.as.test.integration.management.util.CLIOpResult; import org.jboss.dmr.ModelNode; import org.junit.Assert;
import org.jboss.as.test.integration.management.util.*; import org.jboss.dmr.*; import org.junit.*;
[ "org.jboss.as", "org.jboss.dmr", "org.junit" ]
org.jboss.as; org.jboss.dmr; org.junit;
1,497,135
public void setProcessedOn (BigDecimal ProcessedOn);
void function (BigDecimal ProcessedOn);
/** Set Processed On. * The date+time (expressed in decimal format) when the document has been processed */
Set Processed On. The date+time (expressed in decimal format) when the document has been processed
setProcessedOn
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_C_Cash.java", "license": "gpl-2.0", "size": 11025 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,382,697
@Test public void testAddToOne2ManyMapCollection_ValidInput() { Map<Integer, Collection<String>> expectedCollection = new HashMap<Integer, Collection<String>>(); expectedCollection.put(1, CollectionsUtil.createList("a", "b", "c")); expectedCollection.put(2, CollectionsUtil.createList("d", "e", "f")); Map<...
void function() { Map<Integer, Collection<String>> expectedCollection = new HashMap<Integer, Collection<String>>(); expectedCollection.put(1, CollectionsUtil.createList("a", "b", "c")); expectedCollection.put(2, CollectionsUtil.createList("d", "e", "f")); Map<Integer, Collection<String>> map = new HashMap<Integer, Coll...
/** * Tests the normal operation of the addToOne2ManyMap() method */
Tests the normal operation of the addToOne2ManyMap() method
testAddToOne2ManyMapCollection_ValidInput
{ "repo_name": "UCDenver-ccp/common", "path": "src/test/java/edu/ucdenver/ccp/common/collections/CollectionsUtilTest.java", "license": "bsd-3-clause", "size": 27803 }
[ "java.util.Collection", "java.util.HashMap", "java.util.Map", "org.junit.Assert" ]
import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,278,997
public static void UploadFileLogs(UIListener uiListener) throws AgencyLogException { TraceLog.d("UploadFileLogs"); if (ctx == null) throw new AgencyLogException("Context is not initialized"); if (logMan == null) throw new AgencyLogException("ClientLogger is not initialized"); LogonCoreContext lgCtx...
static void function(UIListener uiListener) throws AgencyLogException { TraceLog.d(STR); if (ctx == null) throw new AgencyLogException(STR); if (logMan == null) throw new AgencyLogException(STR); LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext(); String appCID = null; try { appCID = lgCtx.getConnId(); ...
/** * Upload client logs to server * @param uiListener * @throws AgencyLogException */
Upload client logs to server
UploadFileLogs
{ "repo_name": "SAP/sap_mobile_native_android", "path": "ClientLogs/src/com/sap/dcode/agency/services/logs/AgencyLogManager.java", "license": "apache-2.0", "size": 6124 }
[ "com.sap.dcode.agency.services.UIListener", "com.sap.dcode.util.TraceLog", "com.sap.maf.tools.logon.core.LogonCore", "com.sap.maf.tools.logon.core.LogonCoreContext", "com.sap.maf.tools.logon.core.LogonCoreException" ]
import com.sap.dcode.agency.services.UIListener; import com.sap.dcode.util.TraceLog; import com.sap.maf.tools.logon.core.LogonCore; import com.sap.maf.tools.logon.core.LogonCoreContext; import com.sap.maf.tools.logon.core.LogonCoreException;
import com.sap.dcode.agency.services.*; import com.sap.dcode.util.*; import com.sap.maf.tools.logon.core.*;
[ "com.sap.dcode", "com.sap.maf" ]
com.sap.dcode; com.sap.maf;
2,729,694
public static void main(String[] args) throws Exception { if (args.length != 1) { throw new IllegalArgumentException("Usage: java {cp} " + ClassPathScanner.class.getName() + " path/to/scan"); } String basePath = args[0]; System.out.println("Scanning: " + basePath); File registryFile = new Fi...
static void function(String[] args) throws Exception { if (args.length != 1) { throw new IllegalArgumentException(STR + ClassPathScanner.class.getName() + STR); } String basePath = args[0]; System.out.println(STR + basePath); File registryFile = new File(basePath, REGISTRY_FILE); File dir = registryFile.getParentFile()...
/** * to generate the prescan file during build * @param args the root path for the classes where {@link BuildTimeScan#REGISTRY_FILE} is generated * @throws Exception */
to generate the prescan file during build
main
{ "repo_name": "mehant/drill", "path": "common/src/main/java/org/apache/drill/common/scanner/BuildTimeScan.java", "license": "apache-2.0", "size": 5353 }
[ "java.io.File", "java.util.Arrays", "java.util.List", "java.util.Set", "org.apache.drill.common.config.DrillConfig", "org.apache.drill.common.scanner.persistence.ScanResult" ]
import java.io.File; import java.util.Arrays; import java.util.List; import java.util.Set; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.common.scanner.persistence.ScanResult;
import java.io.*; import java.util.*; import org.apache.drill.common.config.*; import org.apache.drill.common.scanner.persistence.*;
[ "java.io", "java.util", "org.apache.drill" ]
java.io; java.util; org.apache.drill;
1,473,993
public static final SemanticNodeProcessor getFieldProcessor() { return new FieldExprProcessor(); }
static final SemanticNodeProcessor function() { return new FieldExprProcessor(); }
/** * Instantiate field processor. * * @return */
Instantiate field processor
getFieldProcessor
{ "repo_name": "sankarh/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/PrunerExpressionOperatorFactory.java", "license": "apache-2.0", "size": 7090 }
[ "org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor" ]
import org.apache.hadoop.hive.ql.lib.SemanticNodeProcessor;
import org.apache.hadoop.hive.ql.lib.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,159,401
@FIXVersion(introduced="4.2", retired="4.3") @TagNumRef(tagNum=TagNum.UnderlyingOptAttribute) public Character getUnderlyingOptAttribute() { return getSafeUnderlyingInstrument().getUnderlyingOptAttribute(); }
@FIXVersion(introduced="4.2", retired="4.3") @TagNumRef(tagNum=TagNum.UnderlyingOptAttribute) Character function() { return getSafeUnderlyingInstrument().getUnderlyingOptAttribute(); }
/** * Message field getter. * @return field value */
Message field getter
getUnderlyingOptAttribute
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/QuoteSetGroup.java", "license": "gpl-3.0", "size": 37469 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,620,310
public void success(String message) throws IOException { if(message!=null) flashInfo(message); redirectToReferrer(); }
void function(String message) throws IOException { if(message!=null) flashInfo(message); redirectToReferrer(); }
/** * TODO Allow url overriding * * @param message * @throws IOException */
TODO Allow url overriding
success
{ "repo_name": "0x006EA1E5/oo6", "path": "src/main/java/org/otherobjects/cms/util/ActionUtils.java", "license": "gpl-3.0", "size": 3816 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
69,694
public void initGui() { this.buttonList.clear(); Keyboard.enableRepeatEvents(true); this.presetsTitle = I18n.format("createWorld.customize.presets.title", new Object[0]); this.presetsShare = I18n.format("createWorld.customize.presets.share", new Object[0]); this.field_146...
void function() { this.buttonList.clear(); Keyboard.enableRepeatEvents(true); this.presetsTitle = I18n.format(STR, new Object[0]); this.presetsShare = I18n.format(STR, new Object[0]); this.field_146436_r = I18n.format(STR, new Object[0]); this.field_146433_u = new GuiTextField(2, this.fontRendererObj, 50, 40, this.widt...
/** * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the * window resizes, the buttonList is cleared beforehand. */
Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the window resizes, the buttonList is cleared beforehand
initGui
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiFlatPresets.java", "license": "gpl-3.0", "size": 14736 }
[ "net.minecraft.client.resources.I18n", "org.lwjgl.input.Keyboard" ]
import net.minecraft.client.resources.I18n; import org.lwjgl.input.Keyboard;
import net.minecraft.client.resources.*; import org.lwjgl.input.*;
[ "net.minecraft.client", "org.lwjgl.input" ]
net.minecraft.client; org.lwjgl.input;
1,685,882
@Override protected ArrayList<HostData> orderTargetHosts(ArrayList<HostData> partiallyUtilized, ArrayList<HostData> underUtilized, ArrayList<HostData> empty) { ArrayList<HostData> targets = new ArrayList<HostData>(); // Sort Partially-Utilized hosts in increasing order by <CPU utilization, power efficiency>....
ArrayList<HostData> function(ArrayList<HostData> partiallyUtilized, ArrayList<HostData> underUtilized, ArrayList<HostData> empty) { ArrayList<HostData> targets = new ArrayList<HostData>(); Collections.sort(partiallyUtilized, HostDataComparator.getComparator(HostDataComparator.CPU_UTIL, HostDataComparator.EFFICIENCY)); ...
/** * Sorts Partially-Utilized hosts in increasing order by <CPU utilization, * power efficiency>, Underutilized hosts in decreasing order by * <CPU utilization, power efficiency>, and Empty hosts in decreasing * order by <power efficiency, power state>. * * Returns Partially-utilized, Underutilized, an...
Sorts Partially-Utilized hosts in increasing order by , Underutilized hosts in decreasing order by , and Empty hosts in decreasing order by . Returns Partially-utilized, Underutilized, and Empty hosts, in that order
orderTargetHosts
{ "repo_name": "digs-uwo/dcsim-projects", "path": "src/edu/uwo/csd/dcsim/projects/centralized/policies/VmRelocationPolicyFFIMDHybrid.java", "license": "gpl-3.0", "size": 4714 }
[ "edu.uwo.csd.dcsim.management.HostData", "edu.uwo.csd.dcsim.management.HostDataComparator", "java.util.ArrayList", "java.util.Collections" ]
import edu.uwo.csd.dcsim.management.HostData; import edu.uwo.csd.dcsim.management.HostDataComparator; import java.util.ArrayList; import java.util.Collections;
import edu.uwo.csd.dcsim.management.*; import java.util.*;
[ "edu.uwo.csd", "java.util" ]
edu.uwo.csd; java.util;
1,497,676
public void bindModel(Element baseElement, FrameContext frameContext) { bindModel(getModelFromElement(baseElement), baseElement, frameContext); }
void function(Element baseElement, FrameContext frameContext) { bindModel(getModelFromElement(baseElement), baseElement, frameContext); }
/** * Binds data from a Model to the Adapter, without changing child views or styles. Do not * override; override {@link #onBindModel} instead. Binds to an Element, allowing the subclass * to pick out the relevant model from the oneof. */
Binds data from a Model to the Adapter, without changing child views or styles. Do not override; override <code>#onBindModel</code> instead. Binds to an Element, allowing the subclass to pick out the relevant model from the oneof
bindModel
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/library/piet/ElementAdapter.java", "license": "bsd-3-clause", "size": 23356 }
[ "org.chromium.components.feed.core.proto.ui.piet.ElementsProto" ]
import org.chromium.components.feed.core.proto.ui.piet.ElementsProto;
import org.chromium.components.feed.core.proto.ui.piet.*;
[ "org.chromium.components" ]
org.chromium.components;
732,312
public String toString() { JSONObject dict = options.getDict(); JSONObject json = new JSONObject(); try { json = new JSONObject(dict.toString()); } catch (JSONException e) { e.printStackTrace(); } json.remove("firstAt"); json.remove("...
String function() { JSONObject dict = options.getDict(); JSONObject json = new JSONObject(); try { json = new JSONObject(dict.toString()); } catch (JSONException e) { e.printStackTrace(); } json.remove(STR); json.remove(STR); json.remove(STR); json.remove(STR); return json.toString(); }
/** * Encode options to JSON. */
Encode options to JSON
toString
{ "repo_name": "weolopez/BraveHackersSpring2016", "path": "plugins/cordova-plugin-local-notifications-mm/src/android/notification/Notification.java", "license": "gpl-3.0", "size": 9354 }
[ "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,936,220
@ReportableProperty(order = 52, value = "Java library path.") public String getLibraryPath() { return this.libraryPath; }
@ReportableProperty(order = 52, value = STR) String function() { return this.libraryPath; }
/** * Get Java library path. * * @return Java library path */
Get Java library path
getLibraryPath
{ "repo_name": "opf-labs/jhove2", "path": "src/main/java/org/jhove2/core/Installation.java", "license": "bsd-2-clause", "size": 7590 }
[ "org.jhove2.annotation.ReportableProperty" ]
import org.jhove2.annotation.ReportableProperty;
import org.jhove2.annotation.*;
[ "org.jhove2.annotation" ]
org.jhove2.annotation;
2,260,173
public void setLiveMarketDataProviderFactory(MarketDataProviderFactory liveMarketDataProviderFactory) { this._liveMarketDataProviderFactory = liveMarketDataProviderFactory; }
void function(MarketDataProviderFactory liveMarketDataProviderFactory) { this._liveMarketDataProviderFactory = liveMarketDataProviderFactory; }
/** * Sets the live market data provider factory. * @param liveMarketDataProviderFactory the new value of the property */
Sets the live market data provider factory
setLiveMarketDataProviderFactory
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/factory/engine/MinimalMarketDataProviderResolverComponentFactory.java", "license": "apache-2.0", "size": 20460 }
[ "com.opengamma.engine.marketdata.MarketDataProviderFactory" ]
import com.opengamma.engine.marketdata.MarketDataProviderFactory;
import com.opengamma.engine.marketdata.*;
[ "com.opengamma.engine" ]
com.opengamma.engine;
182,122
public void testForeignKeyInsert() throws Exception { try { startVMs(1, 1); clientSQLExecute(1, "drop hdfsstore if exists "+getName()); clientSQLExecute(1, "create schema hdfs"); clientSQLExecute(1, "create hdfsstore "+getName()+" namenode 'localhost' homedir './"+getName()+"' batchtimein...
void function() throws Exception { try { startVMs(1, 1); clientSQLExecute(1, STR+getName()); clientSQLExecute(1, STR); clientSQLExecute(1, STR+getName()+STR+getName()+STR); clientSQLExecute(1, STR+persistent()+STR+getName() + ')'); clientSQLExecute(1, STR + STR); clientSQLExecute(1, STR); clientSQLExecute(1, STR); clie...
/** * Test inserts an invalid foreign key. */
Test inserts an invalid foreign key
testForeignKeyInsert
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/tools/src/dunit/java/com/pivotal/gemfirexd/insert/InsertUpdateHDFSDUnit.java", "license": "apache-2.0", "size": 31662 }
[ "com.pivotal.gemfirexd.TestUtil", "com.pivotal.gemfirexd.internal.engine.distributed.FunctionExecutionException" ]
import com.pivotal.gemfirexd.TestUtil; import com.pivotal.gemfirexd.internal.engine.distributed.FunctionExecutionException;
import com.pivotal.gemfirexd.*; import com.pivotal.gemfirexd.internal.engine.distributed.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
2,725,504
private void initialize() { frame = new JFrame(); frame.setIconImage(Toolkit .getDefaultToolkit() .getImage( Personaje6.class .getResource("/images/Historias de Zagas, logo.png"))); frame.setTitle("Historias de Zagas"); frame.setBounds(100, 100, 380, 301); frame.setLocationRe...
void function() { frame = new JFrame(); frame.setIconImage(Toolkit .getDefaultToolkit() .getImage( Personaje6.class .getResource(STR))); frame.setTitle(STR); frame.setBounds(100, 100, 380, 301); frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.setResizable(false); fra...
/** * Initialize the contents of the frame. */
Initialize the contents of the frame
initialize
{ "repo_name": "ZagasTales/HistoriasdeZagas", "path": "src Graf/es/thesinsprods/zagastales/juegozagas/jugar/master/jugador6/InfoAcc3Jugadores.java", "license": "cc0-1.0", "size": 7866 }
[ "java.awt.Color", "java.awt.Toolkit", "javax.swing.JFrame", "javax.swing.JScrollPane", "javax.swing.JTextArea", "javax.swing.JTextField" ]
import java.awt.Color; import java.awt.Toolkit; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
789,117
public static Test suite() { return new CleanDatabaseTestSetup( TestConfiguration.embeddedSuite(TriggerTest.class)); }
static Test function() { return new CleanDatabaseTestSetup( TestConfiguration.embeddedSuite(TriggerTest.class)); }
/** * Run only in embedded as TRIGGERs are server side logic. * Also the use of a ThreadLocal to check state requires * embedded. */
Run only in embedded as TRIGGERs are server side logic. Also the use of a ThreadLocal to check state requires embedded
suite
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java", "license": "apache-2.0", "size": 85154 }
[ "junit.framework.Test", "org.apache.derbyTesting.junit.CleanDatabaseTestSetup", "org.apache.derbyTesting.junit.TestConfiguration" ]
import junit.framework.Test; import org.apache.derbyTesting.junit.CleanDatabaseTestSetup; import org.apache.derbyTesting.junit.TestConfiguration;
import junit.framework.*; import org.apache.*;
[ "junit.framework", "org.apache" ]
junit.framework; org.apache;
1,993,174
public JavaAstTypeReferenceExtractor getJavaAstTypeReferenceExtractor() { return JavaAstTypeReferenceExtractorImpl.getInstance(); }
JavaAstTypeReferenceExtractor function() { return JavaAstTypeReferenceExtractorImpl.getInstance(); }
/** * Returns a {@link JavaAstTypeReferenceExtractor} implementation instance. * * @return a {@link JavaAstTypeReferenceExtractor} implementation instance. */
Returns a <code>JavaAstTypeReferenceExtractor</code> implementation instance
getJavaAstTypeReferenceExtractor
{ "repo_name": "NABUCCO/org.nabucco.framework.mda", "path": "org.nabucco.framework.mda.template.java/src/main/org/nabucco/framework/mda/template/java/extract/type/reference/JavaAstTypeReferenceExtractorFactory.java", "license": "epl-1.0", "size": 1768 }
[ "org.nabucco.framework.mda.template.java.extract.JavaAstTypeReferenceExtractor" ]
import org.nabucco.framework.mda.template.java.extract.JavaAstTypeReferenceExtractor;
import org.nabucco.framework.mda.template.java.extract.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
2,824,299
public File createKeytab(String user, String password, String principal) throws IOException { File keytabFile = new File(confDir, user + ".keytab"); Keytab keytab = Keytab.getInstance(); KerberosTime timeStamp = new KerberosTime(System.currentTimeMillis()); Map<EncryptionType, EncryptionKey> keys = ...
File function(String user, String password, String principal) throws IOException { File keytabFile = new File(confDir, user + STR); Keytab keytab = Keytab.getInstance(); KerberosTime timeStamp = new KerberosTime(System.currentTimeMillis()); Map<EncryptionType, EncryptionKey> keys = KerberosKeyFactory.getKerberosKeys(pr...
/** * Creates a keytab file for authenticating with a given principal. * * @param user Username to login with (i.e. cassandra). * @param password Password to authenticate with. * @param principal Principal representing the server (i.e. cassandra@DATASTAX.COM). * @return Generated keytab file for this ...
Creates a keytab file for authenticating with a given principal
createKeytab
{ "repo_name": "datastax/java-driver", "path": "integration-tests/src/test/java/com/datastax/dse/driver/api/core/auth/EmbeddedAds.java", "license": "apache-2.0", "size": 22126 }
[ "java.io.File", "java.io.IOException", "java.util.Collections", "java.util.Map", "org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory", "org.apache.directory.server.kerberos.shared.keytab.Keytab", "org.apache.directory.server.kerberos.shared.keytab.KeytabEntry", "org.apach...
import java.io.File; import java.io.IOException; import java.util.Collections; import java.util.Map; import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory; import org.apache.directory.server.kerberos.shared.keytab.Keytab; import org.apache.directory.server.kerberos.shared.keytab.Keytab...
import java.io.*; import java.util.*; import org.apache.directory.server.kerberos.shared.crypto.encryption.*; import org.apache.directory.server.kerberos.shared.keytab.*; import org.apache.directory.shared.kerberos.*; import org.apache.directory.shared.kerberos.codec.types.*; import org.apache.directory.shared.kerberos...
[ "java.io", "java.util", "org.apache.directory" ]
java.io; java.util; org.apache.directory;
1,599,890