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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@NonNull
RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType); | RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType); | /**
* Header is subtracted from the position
*
* @param parent
* @param viewType
* @return a view holder for a file or directory
*/ | Header is subtracted from the position | onCreateViewHolder | {
"repo_name": "stari4ek/NoNonsense-FilePicker",
"path": "library/src/main/java/com/nononsenseapps/filepicker/LogicHandler.java",
"license": "mpl-2.0",
"size": 2849
} | [
"android.support.annotation.NonNull",
"android.support.v7.widget.RecyclerView",
"android.view.ViewGroup"
] | import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.ViewGroup; | import android.support.annotation.*; import android.support.v7.widget.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 1,920,768 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<String> listRefMemberOfAsync(
String servicePrincipalId,
Integer top,
Integer skip,
String search,
String filter,
Boolean count,
List<ServicePrincipalsOrderby> orderby); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<String> listRefMemberOfAsync( String servicePrincipalId, Integer top, Integer skip, String search, String filter, Boolean count, List<ServicePrincipalsOrderby> orderby); | /**
* Get ref of memberOf from servicePrincipals.
*
* @param servicePrincipalId key: id of servicePrincipal.
* @param top Show only the first n items.
* @param skip Skip the first n items.
* @param search Search items by search phrases.
* @param filter Filter items by property values.... | Get ref of memberOf from servicePrincipals | listRefMemberOfAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java",
"license": "mit",
"size": 228379
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.authorization.fluent.models.ServicePrincipalsOrderby",
"java.util.List"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.authorization.fluent.models.ServicePrincipalsOrderby; import java.util.List; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.authorization.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 107,200 |
@Test
public void testCreateRenderingEngine() throws Exception {
File f = File.createTempFile("testCreateRenderingEngine", "."
+ OME_FORMAT);
XMLMockObjects xml = new XMLMockObjects();
XMLWriter writer = new XMLWriter();
writer.writeFile(f, xml.createImage(), true... | void function() throws Exception { File f = File.createTempFile(STR, "." + OME_FORMAT); XMLMockObjects xml = new XMLMockObjects(); XMLWriter writer = new XMLWriter(); writer.writeFile(f, xml.createImage(), true); List<Pixels> pixels = null; try { pixels = importFile(f, OME_FORMAT); } catch (Throwable e) { throw new Exc... | /**
* Tests the creation of the rendering engine for a given pixels set when
* looking up for rendering settings.
*
* @throws Exception
* Thrown if an error occurred.
*/ | Tests the creation of the rendering engine for a given pixels set when looking up for rendering settings | testCreateRenderingEngine | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/RenderingEngineTest.java",
"license": "gpl-2.0",
"size": 131845
} | [
"java.io.File",
"java.util.List"
] | import java.io.File; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,807,624 |
public static byte[] parseAsHexOrBase58(String data) {
try {
return Hex.decode(data);
} catch (Exception e) {
// Didn't decode as hex, try base58.
try {
return Base58.decodeChecked(data);
} catch (AddressFormatException e1) {
... | static byte[] function(String data) { try { return Hex.decode(data); } catch (Exception e) { try { return Base58.decodeChecked(data); } catch (AddressFormatException e1) { return null; } } } | /**
* Attempts to parse the given string as arbitrary-length hex or base58 and then return the results, or null if
* neither parse was successful.
*/ | Attempts to parse the given string as arbitrary-length hex or base58 and then return the results, or null if neither parse was successful | parseAsHexOrBase58 | {
"repo_name": "leafcoin/leafcoinj",
"path": "core/src/main/java/com/google/leafcoin/core/Utils.java",
"license": "apache-2.0",
"size": 22963
} | [
"org.spongycastle.util.encoders.Hex"
] | import org.spongycastle.util.encoders.Hex; | import org.spongycastle.util.encoders.*; | [
"org.spongycastle.util"
] | org.spongycastle.util; | 1,532,568 |
@Override
public void addActionListener(final ActionListener listener) {
super.addActionListener(listener);
timer.addActionListener(listener);
}
| void function(final ActionListener listener) { super.addActionListener(listener); timer.addActionListener(listener); } | /**
* Add an <code>ActionListener</code> to this component's list of listeners.
*
* @param listener The listener to add.
*/ | Add an <code>ActionListener</code> to this component's list of listeners | addActionListener | {
"repo_name": "debrief/debrief",
"path": "org.mwc.cmap.legacy/src/MWC/GUI/Tools/Swing/RepeaterButton.java",
"license": "epl-1.0",
"size": 5922
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 322,011 |
public void setOutputStream(OutputStream outputStream) {
this.outputStream = outputStream;
}
| void function(OutputStream outputStream) { this.outputStream = outputStream; } | /**
* Set the OutputStream that the object will be marshalled to.
* @param writer The marshal target.
*/ | Set the OutputStream that the object will be marshalled to | setOutputStream | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/record/OutputStreamRecord.java",
"license": "epl-1.0",
"size": 25106
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 366,626 |
private void runCheckpointDaemon(Configuration conf) throws IOException {
checkpointManager = new Checkpointer(conf, this);
checkpointManager.start();
} | void function(Configuration conf) throws IOException { checkpointManager = new Checkpointer(conf, this); checkpointManager.start(); } | /**
* Start a backup node daemon.
*/ | Start a backup node daemon | runCheckpointDaemon | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java",
"license": "apache-2.0",
"size": 18080
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; | import java.io.*; import org.apache.hadoop.conf.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 318,963 |
public SDVariable relu(String name, SDVariable x, double cutoff) {
SDValidation.validateNumerical("relu", "x", x);
SDVariable out = new org.nd4j.linalg.api.ops.impl.scalar.RectifiedLinear(sd,x, cutoff).outputVariable();
return sd.updateVariableNameAndReference(out, name);
} | SDVariable function(String name, SDVariable x, double cutoff) { SDValidation.validateNumerical("relu", "x", x); SDVariable out = new org.nd4j.linalg.api.ops.impl.scalar.RectifiedLinear(sd,x, cutoff).outputVariable(); return sd.updateVariableNameAndReference(out, name); } | /**
* Element-wise rectified linear function with specified cutoff:<br>
* out[i] = in[i] if in[i] >= cutoff<br>
* out[i] = 0 otherwise<br>
*
* @param name name May be null. Name for the output variable
* @param x Input (NUMERIC type)
* @param cutoff Cutoff value for ReLU operation - x > cutoff ? x ... | Element-wise rectified linear function with specified cutoff: out[i] = in[i] if in[i] >= cutoff out[i] = 0 otherwise | relu | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java",
"license": "apache-2.0",
"size": 59569
} | [
"java.lang.String",
"org.nd4j.autodiff.samediff.SDVariable"
] | import java.lang.String; import org.nd4j.autodiff.samediff.SDVariable; | import java.lang.*; import org.nd4j.autodiff.samediff.*; | [
"java.lang",
"org.nd4j.autodiff"
] | java.lang; org.nd4j.autodiff; | 2,157,012 |
private String buildEditGroupContext(SessionState state, Context context)
{
context.put("tlang", rb);
// name the html form for user edit fields
context.put("form-name", "group-form");
Site site = (Site) state.getAttribute("site");
Group group = (Group) state.getAttribute("group");
context.put("site",... | String function(SessionState state, Context context) { context.put("tlang", rb); context.put(STR, STR); Site site = (Site) state.getAttribute("site"); Group group = (Group) state.getAttribute("group"); context.put("site", site); context.put("group", group); Menu bar = new MenuImpl(); bar.add(new MenuEntry(rb.getString(... | /**
* Build the context for the edit group mode.
*/ | Build the context for the edit group mode | buildEditGroupContext | {
"repo_name": "kingmook/sakai",
"path": "site/site-tool/tool/src/java/org/sakaiproject/site/tool/AdminSitesAction.java",
"license": "apache-2.0",
"size": 77028
} | [
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.api.Menu",
"org.sakaiproject.cheftool.api.MenuItem",
"org.sakaiproject.cheftool.menu.MenuEntry",
"org.sakaiproject.cheftool.menu.MenuImpl",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.site.api.Group",
"org.sakaiproject.si... | import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.api.Menu; import org.sakaiproject.cheftool.api.MenuItem; import org.sakaiproject.cheftool.menu.MenuEntry; import org.sakaiproject.cheftool.menu.MenuImpl; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.site.api.Group; imp... | import org.sakaiproject.cheftool.*; import org.sakaiproject.cheftool.api.*; import org.sakaiproject.cheftool.menu.*; import org.sakaiproject.event.api.*; import org.sakaiproject.site.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event",
"org.sakaiproject.site"
] | org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.site; | 2,458,998 |
@Test(expected = IllegalStateException.class)
public void testGetNegotiatedProperty() {
new ScramSaslClient(null).unwrap(null, 0, 0);
} | @Test(expected = IllegalStateException.class) void function() { new ScramSaslClient(null).unwrap(null, 0, 0); } | /**
* Test method for {@link ScramSaslClient#getNegotiatedProperty(String)}.
*/ | Test method for <code>ScramSaslClient#getNegotiatedProperty(String)</code> | testGetNegotiatedProperty | {
"repo_name": "allanbank/mongodb-async-driver",
"path": "src/test/java/com/allanbank/mongodb/client/connection/auth/ScramSaslClientTest.java",
"license": "apache-2.0",
"size": 39992
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,447,013 |
private static void oregenNether(Random random, int x, int z, World world) {
int runtime = 0;
while(runtime < NetherList.size()){
addOreSpawn((Block) NetherList.get(runtime), world, random, x, z, 10, 15, 8, 0, 128, Blocks.NETHERRACK);
runtime++;
}
}
| static void function(Random random, int x, int z, World world) { int runtime = 0; while(runtime < NetherList.size()){ addOreSpawn((Block) NetherList.get(runtime), world, random, x, z, 10, 15, 8, 0, 128, Blocks.NETHERRACK); runtime++; } } | /**
* Nether ore gen method
*/ | Nether ore gen method | oregenNether | {
"repo_name": "AshIndigo/Alloycraft",
"path": "src/main/java/com/ashindigo/utils/UtilsWorldgen.java",
"license": "lgpl-2.1",
"size": 2930
} | [
"java.util.Random",
"net.minecraft.block.Block",
"net.minecraft.init.Blocks",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.*; import net.minecraft.init.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.init",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.init; net.minecraft.world; | 843,264 |
private MWLManager lookupMWLManager() throws HomeFactoryException, RemoteException, CreateException {
if ( mwlManager == null ) {
MWLManagerHome home = (MWLManagerHome) EJBHomeFactory
.getFactory().lookup(MWLManagerHome.class,
MWLManagerHome.JNDI_NAME);
mwlManager = home.creat... | MWLManager function() throws HomeFactoryException, RemoteException, CreateException { if ( mwlManager == null ) { MWLManagerHome home = (MWLManagerHome) EJBHomeFactory .getFactory().lookup(MWLManagerHome.class, MWLManagerHome.JNDI_NAME); mwlManager = home.create(); } return mwlManager; } | /**
* Returns the MWLManager session bean.
*
* @return The MWLManager.
*
* @throws HomeFactoryException
* @throws RemoteException
* @throws CreateException
*/ | Returns the MWLManager session bean | lookupMWLManager | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4JBOSS_2_5_3/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/mwlscu/MWLScuService.java",
"license": "apache-2.0",
"size": 10196
} | [
"java.rmi.RemoteException",
"javax.ejb.CreateException",
"org.dcm4chex.archive.ejb.interfaces.MWLManager",
"org.dcm4chex.archive.ejb.interfaces.MWLManagerHome",
"org.dcm4chex.archive.util.EJBHomeFactory",
"org.dcm4chex.archive.util.HomeFactoryException"
] | import java.rmi.RemoteException; import javax.ejb.CreateException; import org.dcm4chex.archive.ejb.interfaces.MWLManager; import org.dcm4chex.archive.ejb.interfaces.MWLManagerHome; import org.dcm4chex.archive.util.EJBHomeFactory; import org.dcm4chex.archive.util.HomeFactoryException; | import java.rmi.*; import javax.ejb.*; import org.dcm4chex.archive.ejb.interfaces.*; import org.dcm4chex.archive.util.*; | [
"java.rmi",
"javax.ejb",
"org.dcm4chex.archive"
] | java.rmi; javax.ejb; org.dcm4chex.archive; | 1,049,748 |
public List<Long> getBlockIds() {
return mBlockIds;
} | List<Long> function() { return mBlockIds; } | /**
* Gets BlockId List.
*
* @return the BlockId List in worker node
*/ | Gets BlockId List | getBlockIds | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/common/src/main/java/alluxio/util/webui/UIFileInfo.java",
"license": "apache-2.0",
"size": 11283
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,010,495 |
public void commit()
{
try {
TransactionImpl xa = getTransaction();
if (xa != null && xa.isRollbackOnly())
_ut.rollback();
else
_ut.commit();
} catch (RuntimeException e) {
throw e;
} catch (RollbackException e) {
throw new TransactionRolledbackLocalE... | void function() { try { TransactionImpl xa = getTransaction(); if (xa != null && xa.isRollbackOnly()) _ut.rollback(); else _ut.commit(); } catch (RuntimeException e) { throw e; } catch (RollbackException e) { throw new TransactionRolledbackLocalException(e.getMessage(), e); } catch (HeuristicMixedException e) { throw n... | /**
* Commits transaction.
*/ | Commits transaction | commit | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/ejb/util/XAManager.java",
"license": "gpl-2.0",
"size": 11693
} | [
"com.caucho.transaction.TransactionImpl",
"javax.ejb.EJBException",
"javax.ejb.TransactionRolledbackLocalException",
"javax.transaction.HeuristicMixedException",
"javax.transaction.HeuristicRollbackException",
"javax.transaction.RollbackException"
] | import com.caucho.transaction.TransactionImpl; import javax.ejb.EJBException; import javax.ejb.TransactionRolledbackLocalException; import javax.transaction.HeuristicMixedException; import javax.transaction.HeuristicRollbackException; import javax.transaction.RollbackException; | import com.caucho.transaction.*; import javax.ejb.*; import javax.transaction.*; | [
"com.caucho.transaction",
"javax.ejb",
"javax.transaction"
] | com.caucho.transaction; javax.ejb; javax.transaction; | 2,752,467 |
private static void setComplexTypeName(AxisMessage axisMessage) throws AxisFault {
if (axisMessage.getSchemaElement() != null){
XmlSchemaElement schemaElement = axisMessage.getSchemaElement();
XmlSchemaType schemaType = schemaElement.getSchemaType();
QName schemaTypeQna... | static void function(AxisMessage axisMessage) throws AxisFault { if (axisMessage.getSchemaElement() != null){ XmlSchemaElement schemaElement = axisMessage.getSchemaElement(); XmlSchemaType schemaType = schemaElement.getSchemaType(); QName schemaTypeQname = schemaElement.getSchemaTypeName(); if (schemaType == null) { if... | /**
* set the complext type class name as an message parameter if it exits
* @param axisMessage
*/ | set the complext type class name as an message parameter if it exits | setComplexTypeName | {
"repo_name": "sandamal/wso2-axis2",
"path": "modules/adb-codegen/src/org/apache/axis2/schema/ExtensionUtility.java",
"license": "apache-2.0",
"size": 28379
} | [
"java.util.Map",
"javax.xml.namespace.QName",
"org.apache.axis2.AxisFault",
"org.apache.axis2.description.AxisMessage",
"org.apache.axis2.description.AxisService",
"org.apache.axis2.description.Parameter",
"org.apache.axis2.wsdl.util.Constants",
"org.apache.ws.commons.schema.XmlSchema",
"org.apache.... | import java.util.Map; import javax.xml.namespace.QName; import org.apache.axis2.AxisFault; import org.apache.axis2.description.AxisMessage; import org.apache.axis2.description.AxisService; import org.apache.axis2.description.Parameter; import org.apache.axis2.wsdl.util.Constants; import org.apache.ws.commons.schema.Xml... | import java.util.*; import javax.xml.namespace.*; import org.apache.axis2.*; import org.apache.axis2.description.*; import org.apache.axis2.wsdl.util.*; import org.apache.ws.commons.schema.*; | [
"java.util",
"javax.xml",
"org.apache.axis2",
"org.apache.ws"
] | java.util; javax.xml; org.apache.axis2; org.apache.ws; | 477,696 |
@Override
public DatabaseMap getDatabaseMap()
{
return this.dbMap;
} | DatabaseMap function() { return this.dbMap; } | /**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/ | Gets the databasemap this map builder built | getDatabaseMap | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/map/TEscalationEntryMapBuilder.java",
"license": "gpl-3.0",
"size": 6447
} | [
"org.apache.torque.map.DatabaseMap"
] | import org.apache.torque.map.DatabaseMap; | import org.apache.torque.map.*; | [
"org.apache.torque"
] | org.apache.torque; | 1,829,539 |
public synchronized InMemoryNodeEntry cloneNodeEntry() {
// As this is temporary, for now lets limit to done nodes
Preconditions.checkState(isDone(), "Only done nodes can be copied");
InMemoryNodeEntry nodeEntry = new InMemoryNodeEntry();
nodeEntry.value = value;
nodeEntry.version = this.version;
... | synchronized InMemoryNodeEntry function() { Preconditions.checkState(isDone(), STR); InMemoryNodeEntry nodeEntry = new InMemoryNodeEntry(); nodeEntry.value = value; nodeEntry.version = this.version; REVERSE_DEPS_UTIL.addReverseDeps(nodeEntry, REVERSE_DEPS_UTIL.getReverseDeps(this)); nodeEntry.directDeps = directDeps; n... | /**
* Do not use except in custom evaluator implementations! Added only temporarily.
*
* <p>Clones a InMemoryMutableNodeEntry iff it is a done node. Otherwise it fails.
*/ | Do not use except in custom evaluator implementations! Added only temporarily. Clones a InMemoryMutableNodeEntry iff it is a done node. Otherwise it fails | cloneNodeEntry | {
"repo_name": "rzagabe/bazel",
"path": "src/main/java/com/google/devtools/build/skyframe/InMemoryNodeEntry.java",
"license": "apache-2.0",
"size": 16431
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,907,187 |
public static int parseColor(Object colorObj) throws InvalidParameterException
{
if(colorObj instanceof String)
{
String colorStr = (String) colorObj;
if(!colorStr.startsWith("#") || colorStr.length() != 7)
{
throw new InvalidParameterException("Unrecognised battery color parameter: " + colorObj);
... | static int function(Object colorObj) throws InvalidParameterException { if(colorObj instanceof String) { String colorStr = (String) colorObj; if(!colorStr.startsWith("#") colorStr.length() != 7) { throw new InvalidParameterException(STR + colorObj); } else { try { return Color.parseColor(colorStr); } catch(IllegalArgum... | /**
* Converts an String object containing a color string to a int formatted string
* @param colorObj the RGB string formatted as "#RRGGBB". Currently, alpha is not supported because of MSWindows.
* @return the int version of the RGB string
* @throws InvalidParameterException if the Object is not a String or it... | Converts an String object containing a color string to a int formatted string | parseColor | {
"repo_name": "tauplatform/tau",
"path": "lib/commonAPI/indicators/ext/platform/android/src/com/rho/indicators/IndicatorView.java",
"license": "mit",
"size": 10088
} | [
"android.graphics.Color",
"java.security.InvalidParameterException"
] | import android.graphics.Color; import java.security.InvalidParameterException; | import android.graphics.*; import java.security.*; | [
"android.graphics",
"java.security"
] | android.graphics; java.security; | 1,975,069 |
public static ClusterHealthRequest clusterHealthRequest(String... indices) {
return new ClusterHealthRequest(indices);
} | static ClusterHealthRequest function(String... indices) { return new ClusterHealthRequest(indices); } | /**
* Creates a cluster health request.
*
* @param indices The indices to provide additional cluster health information for. Use <tt>null</tt> or <tt>_all</tt> to execute against all indices
* @return The cluster health request
* @see org.elasticsearch.client.ClusterAdminClient#health(org.elast... | Creates a cluster health request | clusterHealthRequest | {
"repo_name": "markharwood/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 21376
} | [
"org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest"
] | import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; | import org.elasticsearch.action.admin.cluster.health.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,724,733 |
public Amount getAmount() {
return amount;
} | Amount function() { return amount; } | /**
* Get amount
*
* @return amount
**/ | Get amount | getAmount | {
"repo_name": "Adyen/adyen-java-api-library",
"path": "src/main/java/com/adyen/model/checkout/CreateCheckoutSessionResponse.java",
"license": "mit",
"size": 56849
} | [
"com.adyen.model.Amount"
] | import com.adyen.model.Amount; | import com.adyen.model.*; | [
"com.adyen.model"
] | com.adyen.model; | 2,246,848 |
public void sendS04Freezecam(EntityPlayerMP player) {
PacketBuffer payload = new PacketBuffer(Unpooled.buffer());
payload.writeByte(S04FREEZECAM);
this.channel.sendTo(new FMLProxyPacket(payload, Reference.CHANNEL), player);
}
| void function(EntityPlayerMP player) { PacketBuffer payload = new PacketBuffer(Unpooled.buffer()); payload.writeByte(S04FREEZECAM); this.channel.sendTo(new FMLProxyPacket(payload, Reference.CHANNEL), player); } | /**
* Sends a packet which toggles the player's freezecam mode
* @param player the player who receives the packet
*/ | Sends a packet which toggles the player's freezecam mode | sendS04Freezecam | {
"repo_name": "MrNobody98/morecommands",
"path": "src/main/java/com/mrnobody/morecommands/network/PacketDispatcher.java",
"license": "lgpl-3.0",
"size": 27915
} | [
"com.mrnobody.morecommands.util.Reference",
"io.netty.buffer.Unpooled",
"net.minecraft.entity.player.EntityPlayerMP",
"net.minecraft.network.PacketBuffer",
"net.minecraftforge.fml.common.network.internal.FMLProxyPacket"
] | import com.mrnobody.morecommands.util.Reference; import io.netty.buffer.Unpooled; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.PacketBuffer; import net.minecraftforge.fml.common.network.internal.FMLProxyPacket; | import com.mrnobody.morecommands.util.*; import io.netty.buffer.*; import net.minecraft.entity.player.*; import net.minecraft.network.*; import net.minecraftforge.fml.common.network.internal.*; | [
"com.mrnobody.morecommands",
"io.netty.buffer",
"net.minecraft.entity",
"net.minecraft.network",
"net.minecraftforge.fml"
] | com.mrnobody.morecommands; io.netty.buffer; net.minecraft.entity; net.minecraft.network; net.minecraftforge.fml; | 1,649,944 |
@NotAuditable
List<String> getTags(StoreRef storeRef, String filter);
| List<String> getTags(StoreRef storeRef, String filter); | /**
* Get all the tags currently available that match the provided filter.
*
* @param storeRef store reference
* @param filter tag filter
* @return List<String> list of tags
*/ | Get all the tags currently available that match the provided filter | getTags | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/service/cmr/tagging/TaggingService.java",
"license": "lgpl-3.0",
"size": 9658
} | [
"java.util.List",
"org.alfresco.service.cmr.repository.StoreRef"
] | import java.util.List; import org.alfresco.service.cmr.repository.StoreRef; | import java.util.*; import org.alfresco.service.cmr.repository.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 34,477 |
@Override
protected void onActivityResult(
int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch(requestCode) {
case GooglePlayServicesManager.REQUEST_GOOGLE_PLAY_SERVICES:
if (resultCode != RESULT_OK... | void function( int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch(requestCode) { case GooglePlayServicesManager.REQUEST_GOOGLE_PLAY_SERVICES: if (resultCode != RESULT_OK) { GooglePlayServicesManager.instance().isGooglePlayServicesAvailable(); } break; case Goog... | /**
* Called when an activity launched here (specifically, AccountPicker
* and authorization) exits, giving you the requestCode you started it with,
* the resultCode it returned, and any additional data from it.
* @param requestCode code indicating which activity result is incoming.
* @param re... | Called when an activity launched here (specifically, AccountPicker and authorization) exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it | onActivityResult | {
"repo_name": "the-mappinator-3000/groupon-maps-android",
"path": "app/src/main/java/com/themappinator/grouponcalandar/activities/RoomListActivity.java",
"license": "apache-2.0",
"size": 4137
} | [
"android.accounts.AccountManager",
"android.content.Context",
"android.content.Intent",
"android.content.SharedPreferences",
"com.themappinator.grouponcalandar.utils.GooglePlayServicesManager"
] | import android.accounts.AccountManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import com.themappinator.grouponcalandar.utils.GooglePlayServicesManager; | import android.accounts.*; import android.content.*; import com.themappinator.grouponcalandar.utils.*; | [
"android.accounts",
"android.content",
"com.themappinator.grouponcalandar"
] | android.accounts; android.content; com.themappinator.grouponcalandar; | 2,671,246 |
public void testSubmitRunnable() throws Exception {
ExecutorService e = new DirectExecutorService();
Future<?> future = e.submit(new NoOpRunnable());
future.get();
assertTrue(future.isDone());
} | void function() throws Exception { ExecutorService e = new DirectExecutorService(); Future<?> future = e.submit(new NoOpRunnable()); future.get(); assertTrue(future.isDone()); } | /**
* Completed submit(runnable) returns successfully
*/ | Completed submit(runnable) returns successfully | testSubmitRunnable | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/AbstractExecutorServiceTest.java",
"license": "gpl-2.0",
"size": 23173
} | [
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Future"
] | import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 806,414 |
public ManagedClusterWindowsProfile windowsProfile() {
return this.windowsProfile;
} | ManagedClusterWindowsProfile function() { return this.windowsProfile; } | /**
* Get profile for Windows VMs in the container service cluster.
*
* @return the windowsProfile value
*/ | Get profile for Windows VMs in the container service cluster | windowsProfile | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/containerservice/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_06_01/implementation/ManagedClusterInner.java",
"license": "mit",
"size": 13623
} | [
"com.microsoft.azure.management.containerservice.v2019_06_01.ManagedClusterWindowsProfile"
] | import com.microsoft.azure.management.containerservice.v2019_06_01.ManagedClusterWindowsProfile; | import com.microsoft.azure.management.containerservice.v2019_06_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,239,158 |
public Builder withPrimaryElection(PrimaryElection primaryElection) {
this.primaryElection = checkNotNull(primaryElection, "primaryElection cannot be null");
return this;
} | Builder function(PrimaryElection primaryElection) { this.primaryElection = checkNotNull(primaryElection, STR); return this; } | /**
* Sets the primary election.
*
* @param primaryElection the primary election
* @return the client builder
*/ | Sets the primary election | withPrimaryElection | {
"repo_name": "kuujo/copycat",
"path": "protocols/log/src/main/java/io/atomix/protocols/log/DistributedLogServer.java",
"license": "apache-2.0",
"size": 15337
} | [
"com.google.common.base.Preconditions",
"io.atomix.primitive.partition.PrimaryElection"
] | import com.google.common.base.Preconditions; import io.atomix.primitive.partition.PrimaryElection; | import com.google.common.base.*; import io.atomix.primitive.partition.*; | [
"com.google.common",
"io.atomix.primitive"
] | com.google.common; io.atomix.primitive; | 1,307,463 |
public List<JSONObject> getTimelines() {
return timelines;
} | List<JSONObject> function() { return timelines; } | /**
* Gets timelines.
*
* @return timelines
*/ | Gets timelines | getTimelines | {
"repo_name": "FangStarNet/symphonyx",
"path": "src/main/java/org/b3log/symphony/service/TimelineMgmtService.java",
"license": "apache-2.0",
"size": 1771
} | [
"java.util.List",
"org.json.JSONObject"
] | import java.util.List; import org.json.JSONObject; | import java.util.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 564,404 |
private List<INode> loadDeletedList(final List<INodeReference> refList,
InputStream in, INodeDirectory dir, List<Long> deletedNodes,
List<Integer> deletedRefNodes)
throws IOException {
List<INode> dlist = new ArrayList<INode>(deletedRefNodes.size()
+ deletedNodes.size());
... | List<INode> function(final List<INodeReference> refList, InputStream in, INodeDirectory dir, List<Long> deletedNodes, List<Integer> deletedRefNodes) throws IOException { List<INode> dlist = new ArrayList<INode>(deletedRefNodes.size() + deletedNodes.size()); for (long deletedId : deletedNodes) { INode deleted = fsDir.ge... | /**
* Load the deleted list in a DirectoryDiff
*/ | Load the deleted list in a DirectoryDiff | loadDeletedList | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FSImageFormatPBSnapshot.java",
"license": "apache-2.0",
"size": 22081
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hdfs.server.namenode.INode",
"org.apache.hadoop.hdfs.server.namenode.INodeDirectory",
"org.apache.hadoop.hdfs.server.namenode.INodeReference"
] | import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hdfs.server.namenode.INode; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; import org.apache.hadoop.hdfs.server.namenode.INodeReference; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,663,084 |
public List<Grammar> getAllImportedGrammars() {
if (importedGrammars == null) {
return null;
}
LinkedHashMap<String, Grammar> delegates = new LinkedHashMap<String, Grammar>();
for (Grammar d : importedGrammars) {
delegates.put(d.fileName, d);
List<Grammar> ds = d.getAllImportedGrammars();
if (ds !... | List<Grammar> function() { if (importedGrammars == null) { return null; } LinkedHashMap<String, Grammar> delegates = new LinkedHashMap<String, Grammar>(); for (Grammar d : importedGrammars) { delegates.put(d.fileName, d); List<Grammar> ds = d.getAllImportedGrammars(); if (ds != null) { for (Grammar imported : ds) { del... | /** Get list of all imports from all grammars in the delegate subtree of g.
* The grammars are in import tree preorder. Don't include ourselves
* in list as we're not a delegate of ourselves.
*/ | Get list of all imports from all grammars in the delegate subtree of g. The grammars are in import tree preorder. Don't include ourselves in list as we're not a delegate of ourselves | getAllImportedGrammars | {
"repo_name": "Pursuit92/antlr4",
"path": "tool/src/org/antlr/v4/tool/Grammar.java",
"license": "bsd-3-clause",
"size": 44518
} | [
"java.util.ArrayList",
"java.util.LinkedHashMap",
"java.util.List"
] | import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,015,050 |
@Override
public void onLoadStarted(Drawable placeholder) {
// Do nothing.
} | void function(Drawable placeholder) { } | /**
* A callback that should never be invoked directly.
*/ | A callback that should never be invoked directly | onLoadStarted | {
"repo_name": "weiwenqiang/GitHub",
"path": "SelectWidget/glide-master/library/src/main/java/com/bumptech/glide/request/RequestFutureTarget.java",
"license": "apache-2.0",
"size": 6698
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,028,861 |
public void setBuildInfo(final BuildInfo buildInfo) {
this.buildInfo = buildInfo;
} | void function(final BuildInfo buildInfo) { this.buildInfo = buildInfo; } | /**
* Server build info
*/ | Server build info | setBuildInfo | {
"repo_name": "pax95/camel",
"path": "components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerComponent.java",
"license": "apache-2.0",
"size": 25214
} | [
"org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo"
] | import org.eclipse.milo.opcua.stack.core.types.structured.BuildInfo; | import org.eclipse.milo.opcua.stack.core.types.structured.*; | [
"org.eclipse.milo"
] | org.eclipse.milo; | 2,911,233 |
private void checkThrowsTags(List<JavadocTag> tags,
List<ExceptionInfo> throwsList, boolean reportExpectedTags) {
// Loop over the tags, checking to see they exist in the throws.
// The foundThrows used for performance only
final Set<String> foundThrows = new HashSet<>();
... | void function(List<JavadocTag> tags, List<ExceptionInfo> throwsList, boolean reportExpectedTags) { final Set<String> foundThrows = new HashSet<>(); final ListIterator<JavadocTag> tagIt = tags.listIterator(); while (tagIt.hasNext()) { final JavadocTag tag = tagIt.next(); if (!tag.isThrowsTag()) { continue; } tagIt.remov... | /**
* Checks a set of tags for matching throws.
*
* @param tags the tags to check
* @param throwsList the throws to check
* @param reportExpectedTags whether we should report if do not find
* expected tag
*/ | Checks a set of tags for matching throws | checkThrowsTags | {
"repo_name": "liscju/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java",
"license": "lgpl-2.1",
"size": 37212
} | [
"java.util.HashSet",
"java.util.List",
"java.util.ListIterator",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.ListIterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 567,712 |
public void dispatchRoutePropertiesChanged(Route route)
{
for (Iterator<RouteOverlay> iter = overlayManager.routeOverlays.iterator(); iter.hasNext();)
{
RouteOverlay to = iter.next();
if (to.getRoute() == route)
{
to.onRoutePropertiesChanged();
}
}
} | void function(Route route) { for (Iterator<RouteOverlay> iter = overlayManager.routeOverlays.iterator(); iter.hasNext();) { RouteOverlay to = iter.next(); if (to.getRoute() == route) { to.onRoutePropertiesChanged(); } } } | /**
* Notify overlay that route properties have changed
* @param route Changed route
*/ | Notify overlay that route properties have changed | dispatchRoutePropertiesChanged | {
"repo_name": "andreynovikov/Androzic",
"path": "src/main/java/com/androzic/Androzic.java",
"license": "gpl-3.0",
"size": 77622
} | [
"com.androzic.data.Route",
"com.androzic.overlay.RouteOverlay",
"java.util.Iterator"
] | import com.androzic.data.Route; import com.androzic.overlay.RouteOverlay; import java.util.Iterator; | import com.androzic.data.*; import com.androzic.overlay.*; import java.util.*; | [
"com.androzic.data",
"com.androzic.overlay",
"java.util"
] | com.androzic.data; com.androzic.overlay; java.util; | 1,547,099 |
public static void writeTemplateFile(String relativeTemplatePath, JtwigModel model, File targetDir, String relativeTargetPath) throws IOException {
JtwigTemplate template = JtwigTemplate.classpathTemplate("/program_template/" + relativeTemplatePath + ".twig");
writeFile(new File(targetDir, relativeT... | static void function(String relativeTemplatePath, JtwigModel model, File targetDir, String relativeTargetPath) throws IOException { JtwigTemplate template = JtwigTemplate.classpathTemplate(STR + relativeTemplatePath + ".twig"); writeFile(new File(targetDir, relativeTargetPath), template.render(model)); } | /**
* Fill the template which is stored in the subdirectory of the program_template directory in the program resources
* according to the given template path with the given model and write it a subdirectory of the given target dir
* according to the given target path.
*
* @param relativeTemplat... | Fill the template which is stored in the subdirectory of the program_template directory in the program resources according to the given template path with the given model and write it a subdirectory of the given target dir according to the given target path | writeTemplateFile | {
"repo_name": "nnatter/aspguid-compiler",
"path": "src/main/java/aspguidc/helper/FileHelper.java",
"license": "mit",
"size": 3488
} | [
"java.io.File",
"java.io.IOException",
"org.jtwig.JtwigModel",
"org.jtwig.JtwigTemplate"
] | import java.io.File; import java.io.IOException; import org.jtwig.JtwigModel; import org.jtwig.JtwigTemplate; | import java.io.*; import org.jtwig.*; | [
"java.io",
"org.jtwig"
] | java.io; org.jtwig; | 2,193,622 |
protected final void sendNetworkPacket(final NetworkPacket packet) {
packet.setNxh(getSinkAddress());
for (AbstractAdapter adapter : getLower()) {
adapter.send(packet.toByteArray());
}
}
private class Worker implements Runnable { | final void function(final NetworkPacket packet) { packet.setNxh(getSinkAddress()); for (AbstractAdapter adapter : getLower()) { adapter.send(packet.toByteArray()); } } private class Worker implements Runnable { | /**
* This method sends a generic message to a node. The message is represented
* by a NetworkPacket.
*
* @param packet the packet to be sent.
*/ | This method sends a generic message to a node. The message is represented by a NetworkPacket | sendNetworkPacket | {
"repo_name": "sdnwiselab/sdn-wise-java",
"path": "ctrl/src/main/java/com/github/sdnwiselab/sdnwise/controller/AbstractController.java",
"license": "gpl-3.0",
"size": 24619
} | [
"com.github.sdnwiselab.sdnwise.adapter.AbstractAdapter",
"com.github.sdnwiselab.sdnwise.packet.NetworkPacket"
] | import com.github.sdnwiselab.sdnwise.adapter.AbstractAdapter; import com.github.sdnwiselab.sdnwise.packet.NetworkPacket; | import com.github.sdnwiselab.sdnwise.adapter.*; import com.github.sdnwiselab.sdnwise.packet.*; | [
"com.github.sdnwiselab"
] | com.github.sdnwiselab; | 83,239 |
public Element toXml(Document doc) {
Element e = DomUtil.createElement(doc, ELEMENT_TICKET_TICKETINFO,
NAMESPACE_TICKET);
Element timeout = DomUtil.createElement(doc, ELEMENT_TICKET_TIMEOUT,
NAMESPACE_TICKET);... | Element function(Document doc) { Element e = DomUtil.createElement(doc, ELEMENT_TICKET_TICKETINFO, NAMESPACE_TICKET); Element timeout = DomUtil.createElement(doc, ELEMENT_TICKET_TIMEOUT, NAMESPACE_TICKET); DomUtil.setText(timeout, ticket.getTimeout()); e.appendChild(timeout); DavPrivilegeSet privileges = new DavPrivile... | /**
* Converts the underlying ticket to an XML fragment suitable
* for use as request content (ignores any key, owner, created
* date).
* @param doc The document.
* @return The element.
*/ | Converts the underlying ticket to an XML fragment suitable for use as request content (ignores any key, owner, created date) | toXml | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/dav/TicketContent.java",
"license": "apache-2.0",
"size": 4917
} | [
"org.apache.jackrabbit.webdav.xml.DomUtil",
"org.unitedinternet.cosmo.dav.acl.DavPrivilegeSet",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.apache.jackrabbit.webdav.xml.DomUtil; import org.unitedinternet.cosmo.dav.acl.DavPrivilegeSet; import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.apache.jackrabbit.webdav.xml.*; import org.unitedinternet.cosmo.dav.acl.*; import org.w3c.dom.*; | [
"org.apache.jackrabbit",
"org.unitedinternet.cosmo",
"org.w3c.dom"
] | org.apache.jackrabbit; org.unitedinternet.cosmo; org.w3c.dom; | 760,498 |
public static JsonElement getLocal(URI uri) {
Logger.trace("HttpUtil.getLocal(): uri.getPath() == '%s', uri.getQuery() == '%s'", uri.getPath(), uri.getQuery());
Http.Request httpRequest =
Http.Request.createRequest("HttpUtil.getLocal()", "GET", uri.getPath(), Util.emptyIfNull( uri.getRawQuery() ),
"t... | static JsonElement function(URI uri) { Logger.trace(STR, uri.getPath(), uri.getQuery()); Http.Request httpRequest = Http.Request.createRequest(STR, "GET", uri.getPath(), Util.emptyIfNull( uri.getRawQuery() ), STR, new ByteArrayInputStream( STRAttempting to invoke internal action at uri %sSTRResponse status: STRUnable t... | /**
* Uses the play router to send request to appropriate local controller,
* rather than issuing a genuine HTTP request to localhost.
* @param url URL, including any query parameters, to send GET request to
*/ | Uses the play router to send request to appropriate local controller, rather than issuing a genuine HTTP request to localhost | getLocal | {
"repo_name": "psi-project/server",
"path": "app/util/HttpUtil.java",
"license": "mit",
"size": 8637
} | [
"com.google.gson.JsonElement",
"java.io.ByteArrayInputStream"
] | import com.google.gson.JsonElement; import java.io.ByteArrayInputStream; | import com.google.gson.*; import java.io.*; | [
"com.google.gson",
"java.io"
] | com.google.gson; java.io; | 2,089,880 |
@Test
public void testDeleteMarkerVersioning() throws Exception {
HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1,
HConstants.FOREVER, KeepDeletedCells.TRUE);
HRegion region = hbu.createLocalHRegion(htd, null, null);
long ts = EnvironmentEdgeManager.currentTime();
... | void function() throws Exception { HTableDescriptor htd = hbu.createTableDescriptor(name.getMethodName(), 0, 1, HConstants.FOREVER, KeepDeletedCells.TRUE); HRegion region = hbu.createLocalHRegion(htd, null, null); long ts = EnvironmentEdgeManager.currentTime(); Put p = new Put(T1, ts); p.add(c0, c0, T1); region.put(p);... | /**
* Verify that column/version delete makers are sorted
* with their respective puts and removed correctly by
* versioning (i.e. not relying on the store earliestPutTS).
*/ | Verify that column/version delete makers are sorted with their respective puts and removed correctly by versioning (i.e. not relying on the store earliestPutTS) | testDeleteMarkerVersioning | {
"repo_name": "grokcoder/pbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java",
"license": "apache-2.0",
"size": 28802
} | [
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.KeepDeletedCells",
"org.apache.hadoop.hbase.client.Delete",
"org.apache.hadoop.hbase.client.Put",
"org.apache.hadoop.hbase.util.EnvironmentEdgeManager",
"org.junit.Assert"
] | import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import org.junit.Assert; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,362,803 |
@Test()
public void testOnlyAttributeValues()
throws Exception
{
LinkedList<String> attrNames = new LinkedList<String>();
attrNames.add("cn");
attrNames.add("uid");
LinkedList<StreamProxyValuesBackendSet> backendSets =
new LinkedList<StreamProxyValuesBackendSet>();
backendSe... | @Test() void function() throws Exception { LinkedList<String> attrNames = new LinkedList<String>(); attrNames.add("cn"); attrNames.add("uid"); LinkedList<StreamProxyValuesBackendSet> backendSets = new LinkedList<StreamProxyValuesBackendSet>(); backendSets.add(new StreamProxyValuesBackendSet(new ASN1OctetString("1"), ne... | /**
* Provides test coverage for the case in which only information about a
* specified set of attribute values should be returned.
*
* @throws Exception If an unexpected problem occurs.
*/ | Provides test coverage for the case in which only information about a specified set of attribute values should be returned | testOnlyAttributeValues | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/StreamProxyValuesExtendedRequestTestCase.java",
"license": "gpl-2.0",
"size": 13966
} | [
"com.unboundid.asn1.ASN1OctetString",
"com.unboundid.ldap.sdk.Control",
"com.unboundid.ldap.sdk.ExtendedRequest",
"java.util.LinkedList",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.Control; import com.unboundid.ldap.sdk.ExtendedRequest; import java.util.LinkedList; import org.testng.annotations.Test; | import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import java.util.*; import org.testng.annotations.*; | [
"com.unboundid.asn1",
"com.unboundid.ldap",
"java.util",
"org.testng.annotations"
] | com.unboundid.asn1; com.unboundid.ldap; java.util; org.testng.annotations; | 695,908 |
public void setProperties(final Map<String, String> properties) {
this.properties = properties == null ? new HashMap<String, String>() : properties;
} | void function(final Map<String, String> properties) { this.properties = properties == null ? new HashMap<String, String>() : properties; } | /**
* Sets the properties of this entry.
*
* @param properties
* the properties.
*/ | Sets the properties of this entry | setProperties | {
"repo_name": "laccore/coretools",
"path": "coretools-model/src/main/java/org/andrill/coretools/model/scheme/SchemeEntry.java",
"license": "apache-2.0",
"size": 6362
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 419,421 |
@Override
public int getType() {
return SensorApiType.FOREGROUND_TRAFFIC;
} | int function() { return SensorApiType.FOREGROUND_TRAFFIC; } | /**
* set own sensor type for push manager
*
* @return sensor type of sensor
*/ | set own sensor type for push manager | getType | {
"repo_name": "Telecooperation/assistance-platform-client-sdk-android",
"path": "AssistanceSDK/app/src/main/java/de/tudarmstadt/informatik/tk/assistance/sdk/sensing/impl/triggered/ForegroundTrafficSensor.java",
"license": "apache-2.0",
"size": 13255
} | [
"de.tudarmstadt.informatik.tk.assistance.sdk.model.api.sensing.SensorApiType"
] | import de.tudarmstadt.informatik.tk.assistance.sdk.model.api.sensing.SensorApiType; | import de.tudarmstadt.informatik.tk.assistance.sdk.model.api.sensing.*; | [
"de.tudarmstadt.informatik"
] | de.tudarmstadt.informatik; | 2,857,152 |
public void notifyBlackBoardArtifactTagAdded(BlackboardArtifactTag newTag) {
notifyPropertyChangeEvent(new BlackBoardArtifactTagAddedEvent(newTag));
} | void function(BlackboardArtifactTag newTag) { notifyPropertyChangeEvent(new BlackBoardArtifactTagAddedEvent(newTag)); } | /**
* Notifies the UI that a new BlackboardArtifactTag has been added.
*
* @param newTag new BlackboardArtifactTag added
*/ | Notifies the UI that a new BlackboardArtifactTag has been added | notifyBlackBoardArtifactTagAdded | {
"repo_name": "eXcomm/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/casemodule/Case.java",
"license": "apache-2.0",
"size": 49685
} | [
"org.sleuthkit.autopsy.events.BlackBoardArtifactTagAddedEvent",
"org.sleuthkit.datamodel.BlackboardArtifactTag"
] | import org.sleuthkit.autopsy.events.BlackBoardArtifactTagAddedEvent; import org.sleuthkit.datamodel.BlackboardArtifactTag; | import org.sleuthkit.autopsy.events.*; import org.sleuthkit.datamodel.*; | [
"org.sleuthkit.autopsy",
"org.sleuthkit.datamodel"
] | org.sleuthkit.autopsy; org.sleuthkit.datamodel; | 586,740 |
public int getMetaFromState(IBlockState state)
{
return ((Integer)state.getValue(MOISTURE)).intValue();
}
| int function(IBlockState state) { return ((Integer)state.getValue(MOISTURE)).intValue(); } | /**
* Convert the BlockState into the correct metadata value
*/ | Convert the BlockState into the correct metadata value | getMetaFromState | {
"repo_name": "InverMN/MinecraftForgeReference",
"path": "MinecraftBlocks/BlockFarmland.java",
"license": "unlicense",
"size": 7157
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 2,127,474 |
private static Map<String, String> processAttributes(final Element element) {
final NamedNodeMap attributes = element.getAttributes();
final Map<String, String> attrmap = new HashMap<>();
for (int i = 0; i < attributes.getLength(); ++i) {
final org.w3c.dom.Node w3cNode = attribu... | static Map<String, String> function(final Element element) { final NamedNodeMap attributes = element.getAttributes(); final Map<String, String> attrmap = new HashMap<>(); for (int i = 0; i < attributes.getLength(); ++i) { final org.w3c.dom.Node w3cNode = attributes.item(i); if (w3cNode instanceof Attr) { final Attr att... | /**
* Helper method for initializing the attributes of a configuration node from the given XML element.
*
* @param element the current XML element
* @return a map with all attribute values extracted for the current node
*/ | Helper method for initializing the attributes of a configuration node from the given XML element | processAttributes | {
"repo_name": "apache/commons-configuration",
"path": "src/main/java/org/apache/commons/configuration2/XMLConfiguration.java",
"license": "apache-2.0",
"size": 48074
} | [
"java.util.HashMap",
"java.util.Map",
"org.w3c.dom.Attr",
"org.w3c.dom.Element",
"org.w3c.dom.NamedNodeMap",
"org.w3c.dom.Node"
] | import java.util.HashMap; import java.util.Map; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 2,658,914 |
public Builder parentFolder(File parentFolder) {
this.parentFolder = parentFolder;
return this;
} | Builder function(File parentFolder) { this.parentFolder = parentFolder; return this; } | /**
* Specifies which folder to use for creating temporary resources.
* If {@code null} then system default temporary-file directory is
* used.
*
* @return this
*/ | Specifies which folder to use for creating temporary resources. If null then system default temporary-file directory is used | parentFolder | {
"repo_name": "junit-team/junit",
"path": "src/main/java/org/junit/rules/TemporaryFolder.java",
"license": "epl-1.0",
"size": 9699
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,632,527 |
private Object convertBigDecimalToNum(BigDecimal value) {
Object convertedValue;
if (value.scale() == 0) {
logger.trace("found no fractional part");
convertedValue = value.toBigInteger();
} else {
logger.trace("found fractional part");
convertedValue = value.doubleValue();
}
... | Object function(BigDecimal value) { Object convertedValue; if (value.scale() == 0) { logger.trace(STR); convertedValue = value.toBigInteger(); } else { logger.trace(STR); convertedValue = value.doubleValue(); } return convertedValue; } | /**
* This method returns an integer if possible if not a double is returned. This is an optimization
* for influxdb because integers have less overhead.
*
* @param value the BigDecimal to be converted
* @return A double if possible else a double is returned.
*/ | This method returns an integer if possible if not a double is returned. This is an optimization for influxdb because integers have less overhead | convertBigDecimalToNum | {
"repo_name": "MCherifiOSS/openhab",
"path": "bundles/persistence/org.openhab.persistence.influxdb/java/org/openhab/persistence/influxdb/internal/InfluxDBPersistenceService.java",
"license": "epl-1.0",
"size": 17409
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,674,677 |
public List<Filter> getFilters() {
return filters;
} | List<Filter> function() { return filters; } | /**
* Get the list of filters in this spec.
*
* @return
*/ | Get the list of filters in this spec | getFilters | {
"repo_name": "etcgroup/aloe",
"path": "src/etc/aloe/data/FeatureSpecification.java",
"license": "gpl-3.0",
"size": 2651
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,037,242 |
@Test
@WithSystemProperty(key = IGNITE_SQL_PARSER_DISABLE_H2_FALLBACK, value = "true")
public void testCreateIndexWithInlineSizePartitionedAtomic() throws Exception {
checkCreateIndexWithInlineSize(PARTITIONED, ATOMIC, false);
} | @WithSystemProperty(key = IGNITE_SQL_PARSER_DISABLE_H2_FALLBACK, value = "true") void function() throws Exception { checkCreateIndexWithInlineSize(PARTITIONED, ATOMIC, false); } | /**
* Tests creating index with inline size for PARTITIONED ATOMIC cache.
*
* @throws Exception If failed.
*/ | Tests creating index with inline size for PARTITIONED ATOMIC cache | testCreateIndexWithInlineSizePartitionedAtomic | {
"repo_name": "samaitra/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractBasicSelfTest.java",
"license": "apache-2.0",
"size": 50590
} | [
"org.apache.ignite.testframework.junits.WithSystemProperty"
] | import org.apache.ignite.testframework.junits.WithSystemProperty; | import org.apache.ignite.testframework.junits.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,070,629 |
private void putInPRFromOneVm(VM vm0,
final int startIndexForKey, final int endIndexForKey, final String rName) throws Throwable
{
int AsyncInvocationArrSize = 2;
AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
async[0] = vm0.invokeAsync(putFromOneVm(startIndexForKey, endInd... | void function(VM vm0, final int startIndexForKey, final int endIndexForKey, final String rName) throws Throwable { int AsyncInvocationArrSize = 2; AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize]; async[0] = vm0.invokeAsync(putFromOneVm(startIndexForKey, endIndexForKey, rName)); async[1] = vm0.invo... | /**
* This function performs put() operation from the single vm in multiple
* partition regions.
*
* @param vm0
* @param startIndexForKey
* @param endIndexForKey
* @param rName region name
*/ | This function performs put() operation from the single vm in multiple partition regions | putInPRFromOneVm | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHARedundancyMgmtDUnitTest.java",
"license": "apache-2.0",
"size": 33205
} | [
"com.gemstone.gemfire.cache.PartitionedRegionStorageException"
] | import com.gemstone.gemfire.cache.PartitionedRegionStorageException; | import com.gemstone.gemfire.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,057,193 |
public static File soundsDir() {
lock.readLock().lock();
try {
return (sounds_dir != null) ? sounds_dir : new File(dataDir(),
DEFAULT_DIR_NAME_SOUNDS);
} finally {
lock.readLock().unlock();
}
} | static File function() { lock.readLock().lock(); try { return (sounds_dir != null) ? sounds_dir : new File(dataDir(), DEFAULT_DIR_NAME_SOUNDS); } finally { lock.readLock().unlock(); } } | /**
* Return the configured sounds directory, if set, otherwise return the
* default path, relative to the configured data directory.
*
* @return {@link File} containing the path to the sounds directory.
*/ | Return the configured sounds directory, if set, otherwise return the default path, relative to the configured data directory | soundsDir | {
"repo_name": "chvink/kilomek",
"path": "megamek/src/megamek/common/Configuration.java",
"license": "gpl-3.0",
"size": 16433
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,575,774 |
public FileSystem writeFileSync(Env env, StringValue path, Buffer buffer) {
fileSystem.writeFileSync(path.toString(), buffer.__toVertxBuffer());
return this;
} | FileSystem function(Env env, StringValue path, Buffer buffer) { fileSystem.writeFileSync(path.toString(), buffer.__toVertxBuffer()); return this; } | /**
* Executes a synchronous write file call.
*/ | Executes a synchronous write file call | writeFileSync | {
"repo_name": "khasinski/mod-lang-php",
"path": "src/main/java/io/vertx/lang/php/file/FileSystem.java",
"license": "mit",
"size": 20195
} | [
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.StringValue",
"io.vertx.lang.php.buffer.Buffer"
] | import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue; import io.vertx.lang.php.buffer.Buffer; | import com.caucho.quercus.env.*; import io.vertx.lang.php.buffer.*; | [
"com.caucho.quercus",
"io.vertx.lang"
] | com.caucho.quercus; io.vertx.lang; | 2,288,428 |
public Component getAWTComponent(); | Component function(); | /**
* Get the AWT component (if any) that contains the visuals of this graphics
* engine. If the underlying implementation does not use AWT then null
* should be returned.
* @return The AWT Component of this graphic engine. null if no such
* component exists.
*/ | Get the AWT component (if any) that contains the visuals of this graphics engine. If the underlying implementation does not use AWT then null should be returned | getAWTComponent | {
"repo_name": "jwfwessels/AFK",
"path": "src/afk/gfx/GraphicsEngine.java",
"license": "mit",
"size": 6110
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,556,349 |
public void loadFile() throws IOException {
if (!file.exists()) {
if (log.isDebugEnabled()) log.debug("File does not exist [" + file + "] Properties will be empty.");
return;
}
// #1. clear all existing content
clear();
// #2. read the file
Fi... | void function() throws IOException { if (!file.exists()) { if (log.isDebugEnabled()) log.debug(STR + file + STR); return; } clear(); FileInputStream fis = new FileInputStream(file); try { if (log.isDebugEnabled()) log.debug(STR + file); props.load(fis); } finally { fis.close(); } hierarchicalMap.put(null, null, new Cha... | /**
* Clear all existing content, read the file and parse each property. Simply logs a message and returns if the file does not exist.
*
* @throws IOException if the file is a Directory
*/ | Clear all existing content, read the file and parse each property. Simply logs a message and returns if the file does not exist | loadFile | {
"repo_name": "dinkelaker/hbs4ode",
"path": "utils/src/main/java/org/apache/ode/utils/HierarchicalProperties.java",
"license": "apache-2.0",
"size": 18394
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.util.Iterator",
"java.util.Map",
"javax.xml.namespace.QName"
] | import java.io.FileInputStream; import java.io.IOException; import java.util.Iterator; import java.util.Map; import javax.xml.namespace.QName; | import java.io.*; import java.util.*; import javax.xml.namespace.*; | [
"java.io",
"java.util",
"javax.xml"
] | java.io; java.util; javax.xml; | 1,378,069 |
private static final Logger LOG = Logger.getLogger(PaymentInfoNoValidateTask.class);
public PaymentDTOEx getPaymentInfo(Integer userId)
throws TaskException {
PaymentDTOEx retValue = null;
try {
Integer method = Constants.AUTO_PAYMENT_TYPE_CC; // def to cc
... | static final Logger LOG = Logger.getLogger(PaymentInfoNoValidateTask.class); public PaymentDTOEx function(Integer userId) throws TaskException { PaymentDTOEx retValue = null; try { Integer method = Constants.AUTO_PAYMENT_TYPE_CC; UserBL userBL = new UserBL(userId); CreditCardBL ccBL = new CreditCardBL(); if (userBL.get... | /**
* This will return an empty payment dto with only the credit card/ach set
* if a valid credit card is found for the user. Otherwise null.
* It will check the customer's preference for the automatic payment type.
*/ | This will return an empty payment dto with only the credit card/ach set if a valid credit card is found for the user. Otherwise null. It will check the customer's preference for the automatic payment type | getPaymentInfo | {
"repo_name": "maduhu/jBilling",
"path": "src/java/com/sapienter/jbilling/server/user/tasks/PaymentInfoNoValidateTask.java",
"license": "agpl-3.0",
"size": 5275
} | [
"com.sapienter.jbilling.server.payment.PaymentDTOEx",
"com.sapienter.jbilling.server.payment.db.PaymentMethodDAS",
"com.sapienter.jbilling.server.pluggableTask.TaskException",
"com.sapienter.jbilling.server.user.AchBL",
"com.sapienter.jbilling.server.user.CreditCardBL",
"com.sapienter.jbilling.server.user... | import com.sapienter.jbilling.server.payment.PaymentDTOEx; import com.sapienter.jbilling.server.payment.db.PaymentMethodDAS; import com.sapienter.jbilling.server.pluggableTask.TaskException; import com.sapienter.jbilling.server.user.AchBL; import com.sapienter.jbilling.server.user.CreditCardBL; import com.sapienter.jbi... | import com.sapienter.jbilling.server.*; import com.sapienter.jbilling.server.payment.*; import com.sapienter.jbilling.server.payment.db.*; import com.sapienter.jbilling.server.user.*; import com.sapienter.jbilling.server.user.db.*; import com.sapienter.jbilling.server.util.*; import java.util.*; import org.apache.log4j... | [
"com.sapienter.jbilling",
"java.util",
"org.apache.log4j"
] | com.sapienter.jbilling; java.util; org.apache.log4j; | 457,893 |
void addLeaf(@NotNull IElementType leafType, CharSequence leafText, @Nullable ASTNode anchorBefore); | void addLeaf(@NotNull IElementType leafType, CharSequence leafText, @Nullable ASTNode anchorBefore); | /**
* Add leaf element with specified type and text in the child list.
* @param leafType type of leaf element to add.
* @param leafText text of added leaf.
* @param anchorBefore the node before which the child node is inserted.
* @since 7.0
*/ | Add leaf element with specified type and text in the child list | addLeaf | {
"repo_name": "liveqmock/platform-tools-idea",
"path": "platform/core-api/src/com/intellij/lang/ASTNode.java",
"license": "apache-2.0",
"size": 8943
} | [
"com.intellij.psi.tree.IElementType",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import com.intellij.psi.tree.IElementType; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import com.intellij.psi.tree.*; import org.jetbrains.annotations.*; | [
"com.intellij.psi",
"org.jetbrains.annotations"
] | com.intellij.psi; org.jetbrains.annotations; | 453,369 |
@Deployment(order = 1)
private ResourceAdapterArchive createResourceAdapter() throws Throwable
{
return ResourceAdapterFactory.createUnifiedSecurityRar();
} | @Deployment(order = 1) ResourceAdapterArchive function() throws Throwable { return ResourceAdapterFactory.createUnifiedSecurityRar(); } | /**
* The resource adapter
*
* @throws Throwable In case of an error
*/ | The resource adapter | createResourceAdapter | {
"repo_name": "jandsu/ironjacamar",
"path": "testsuite/src/test/java/org/ironjacamar/core/connectionmanager/pool/dflt/FlushEntirePoolTestCase.java",
"license": "epl-1.0",
"size": 9603
} | [
"org.ironjacamar.embedded.Deployment",
"org.ironjacamar.rars.ResourceAdapterFactory",
"org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive"
] | import org.ironjacamar.embedded.Deployment; import org.ironjacamar.rars.ResourceAdapterFactory; import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; | import org.ironjacamar.embedded.*; import org.ironjacamar.rars.*; import org.jboss.shrinkwrap.api.spec.*; | [
"org.ironjacamar.embedded",
"org.ironjacamar.rars",
"org.jboss.shrinkwrap"
] | org.ironjacamar.embedded; org.ironjacamar.rars; org.jboss.shrinkwrap; | 2,642,239 |
public void deleteAllItems() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
PubSub request = createPubsubPacket(Type.set, new NodeExtension(PubSubElementType.PURGE_OWNER, getId()), PubSubElementType.PURGE_OWNER.getNamespace());
con.createPacketCollectorAndSend(req... | void function() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { PubSub request = createPubsubPacket(Type.set, new NodeExtension(PubSubElementType.PURGE_OWNER, getId()), PubSubElementType.PURGE_OWNER.getNamespace()); con.createPacketCollectorAndSend(request).nextResultOrThro... | /**
* Purges the node of all items.
*
* <p>Note: Some implementations may keep the last item
* sent.
* @throws XMPPErrorException
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
*/ | Purges the node of all items. Note: Some implementations may keep the last item sent | deleteAllItems | {
"repo_name": "opg7371/Smack",
"path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java",
"license": "apache-2.0",
"size": 15225
} | [
"org.jivesoftware.smack.SmackException",
"org.jivesoftware.smack.XMPPException",
"org.jivesoftware.smack.packet.IQ",
"org.jivesoftware.smackx.pubsub.packet.PubSub"
] | import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smackx.pubsub.packet.PubSub; | import org.jivesoftware.smack.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.smackx.pubsub.packet.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.smackx"
] | org.jivesoftware.smack; org.jivesoftware.smackx; | 1,133,063 |
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public OozieWorkflowJob getEmrOozieWorkflowJob(String namespace, String emrClusterDefinitionName, String emrClusterName, String oozieWorkflowJobId,
Boolean verbose) throws Exception
{
return getEmrOozieWorkflowJobImpl(names... | @Transactional(propagation = Propagation.REQUIRES_NEW) OozieWorkflowJob function(String namespace, String emrClusterDefinitionName, String emrClusterName, String oozieWorkflowJobId, Boolean verbose) throws Exception { return getEmrOozieWorkflowJobImpl(namespace, emrClusterDefinitionName, emrClusterName, oozieWorkflowJo... | /**
* Get the oozie workflow. Starts a new transaction.
*
* @param namespace the namespace
* @param emrClusterDefinitionName the EMR cluster definition name
* @param emrClusterName the EMR cluster name
* @param oozieWorkflowJobId the ooxie workflow Id.
* @param verbose the flag to ind... | Get the oozie workflow. Starts a new transaction | getEmrOozieWorkflowJob | {
"repo_name": "seoj/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/EmrServiceImpl.java",
"license": "apache-2.0",
"size": 55398
} | [
"org.finra.herd.model.api.xml.OozieWorkflowJob",
"org.springframework.transaction.annotation.Propagation",
"org.springframework.transaction.annotation.Transactional"
] | import org.finra.herd.model.api.xml.OozieWorkflowJob; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; | import org.finra.herd.model.api.xml.*; import org.springframework.transaction.annotation.*; | [
"org.finra.herd",
"org.springframework.transaction"
] | org.finra.herd; org.springframework.transaction; | 2,631,811 |
WfdLog.d(TAG, "Called init()");
initAndStartHandler();
try {
mPort = this.requestAvailablePortFromOs();
} catch (IOException e) {
mListener.onError();
return;
} | WfdLog.d(TAG, STR); initAndStartHandler(); try { mPort = this.requestAvailablePortFromOs(); } catch (IOException e) { mListener.onError(); return; } | /**
* Method called by {@link WFDMiddlewareAdapter#connect()}
*/ | Method called by <code>WFDMiddlewareAdapter#connect()</code> | init | {
"repo_name": "deib-polimi/SPF2",
"path": "sPFWFDMid/src/main/java/it/polimi/spf/wfd/WifiDirectMiddleware.java",
"license": "lgpl-3.0",
"size": 28337
} | [
"it.polimi.spf.wfd.util.WfdLog",
"java.io.IOException"
] | import it.polimi.spf.wfd.util.WfdLog; import java.io.IOException; | import it.polimi.spf.wfd.util.*; import java.io.*; | [
"it.polimi.spf",
"java.io"
] | it.polimi.spf; java.io; | 1,625,886 |
public Drawable getDrawableForType(Context context, final String accountType) {
Drawable icon = null;
if (mAccTypeIconCache.containsKey(accountType)) {
return mAccTypeIconCache.get(accountType);
}
if (mTypeToAuthDescription.containsKey(accountType)) {
try {
... | Drawable function(Context context, final String accountType) { Drawable icon = null; if (mAccTypeIconCache.containsKey(accountType)) { return mAccTypeIconCache.get(accountType); } if (mTypeToAuthDescription.containsKey(accountType)) { try { AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType); Contex... | /**
* Gets an icon associated with a particular account type. If none found, return null.
* @param accountType the type of account
* @return a drawable for the icon or null if one cannot be found.
*/ | Gets an icon associated with a particular account type. If none found, return null | getDrawableForType | {
"repo_name": "craigacgomez/flaming_monkey_packages_apps_Settings",
"path": "src/com/android/settings/accounts/AuthenticatorHelper.java",
"license": "apache-2.0",
"size": 5358
} | [
"android.accounts.AuthenticatorDescription",
"android.content.Context",
"android.content.pm.PackageManager",
"android.content.res.Resources",
"android.graphics.drawable.Drawable"
] | import android.accounts.AuthenticatorDescription; import android.content.Context; import android.content.pm.PackageManager; import android.content.res.Resources; import android.graphics.drawable.Drawable; | import android.accounts.*; import android.content.*; import android.content.pm.*; import android.content.res.*; import android.graphics.drawable.*; | [
"android.accounts",
"android.content",
"android.graphics"
] | android.accounts; android.content; android.graphics; | 760,325 |
public void setDefaultPositiveItemLabelPosition(ItemLabelPosition position,
boolean notify) {
if (position == null) {
throw new IllegalArgumentException("Null 'position' argument.");
}
this.defaultPositiveItemLabelPosition = p... | void function(ItemLabelPosition position, boolean notify) { if (position == null) { throw new IllegalArgumentException(STR); } this.defaultPositiveItemLabelPosition = position; if (notify) { fireChangeEvent(); } } | /**
* Sets the default positive item label position and, if requested, sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param position the position (<code>null</code> not permitted).
* @param notify notify registered listeners?
*
* @see #getDefaultPosit... | Sets the default positive item label position and, if requested, sends a <code>RendererChangeEvent</code> to all registered listeners | setDefaultPositiveItemLabelPosition | {
"repo_name": "greearb/jfreechart-fse-ct",
"path": "src/main/java/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-2.1",
"size": 108424
} | [
"org.jfree.chart.labels.ItemLabelPosition"
] | import org.jfree.chart.labels.ItemLabelPosition; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,973,783 |
protected FileSystem doCreateFileSystem( final FileName rootName,
final FileSystemOptions fileSystemOptions ) throws FileSystemException {
return new WebSolutionFileSystem( rootName, fileSystemOptions, new TestSolutionFileModel() );
} | FileSystem function( final FileName rootName, final FileSystemOptions fileSystemOptions ) throws FileSystemException { return new WebSolutionFileSystem( rootName, fileSystemOptions, new TestSolutionFileModel() ); } | /**
* Creates a {@link org.apache.commons.vfs2.FileSystem}. If the returned FileSystem implements
* {@link org.apache.commons.vfs2.provider.VfsComponent}, it will be initialised.
*
* @param rootName The name of the root file of the file system to create.
*/ | Creates a <code>org.apache.commons.vfs2.FileSystem</code>. If the returned FileSystem implements <code>org.apache.commons.vfs2.provider.VfsComponent</code>, it will be initialised | doCreateFileSystem | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "libraries/libpensol/src/test/java/org/pentaho/reporting/libraries/pensol/TestWebSolutionFileProvider.java",
"license": "lgpl-2.1",
"size": 1770
} | [
"org.apache.commons.vfs2.FileName",
"org.apache.commons.vfs2.FileSystem",
"org.apache.commons.vfs2.FileSystemException",
"org.apache.commons.vfs2.FileSystemOptions",
"org.pentaho.reporting.libraries.pensol.vfs.WebSolutionFileSystem"
] | import org.apache.commons.vfs2.FileName; import org.apache.commons.vfs2.FileSystem; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileSystemOptions; import org.pentaho.reporting.libraries.pensol.vfs.WebSolutionFileSystem; | import org.apache.commons.vfs2.*; import org.pentaho.reporting.libraries.pensol.vfs.*; | [
"org.apache.commons",
"org.pentaho.reporting"
] | org.apache.commons; org.pentaho.reporting; | 2,694,747 |
@Test
public void testGetItemAtkforsimpleweapon() {
final RPEntity entity = new MockRPEntity();
entity.addSlot(new PlayerSlot("lhand"));
entity.addSlot(new PlayerSlot("rhand"));
assertThat(entity.getItemAtk(), is(0f));
final Item item = SingletonRepository.getEntityManager().getItem("dagger");
entity.g... | void function() { final RPEntity entity = new MockRPEntity(); entity.addSlot(new PlayerSlot("lhand")); entity.addSlot(new PlayerSlot("rhand")); assertThat(entity.getItemAtk(), is(0f)); final Item item = SingletonRepository.getEntityManager().getItem(STR); entity.getSlot("lhand").add(item); assertThat(entity.getItemAtk(... | /**
* Tests for getItemAtkforsimpleweapon.
*/ | Tests for getItemAtkforsimpleweapon | testGetItemAtkforsimpleweapon | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "tests/games/stendhal/server/entity/RPEntityTest.java",
"license": "gpl-2.0",
"size": 21546
} | [
"games.stendhal.server.core.engine.SingletonRepository",
"games.stendhal.server.entity.item.Item",
"games.stendhal.server.entity.slot.PlayerSlot",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.slot.PlayerSlot; import org.hamcrest.Matchers; import org.junit.Assert; | import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.item.*; import games.stendhal.server.entity.slot.*; import org.hamcrest.*; import org.junit.*; | [
"games.stendhal.server",
"org.hamcrest",
"org.junit"
] | games.stendhal.server; org.hamcrest; org.junit; | 1,253,852 |
protected void succeeded(Description description) {
} | void function(Description description) { } | /**
* Invoked when a test succeeds
*/ | Invoked when a test succeeds | succeeded | {
"repo_name": "flowable/flowable-engine",
"path": "modules/flowable-form-engine/src/main/java/org/flowable/form/engine/test/FlowableFormRule.java",
"license": "apache-2.0",
"size": 7624
} | [
"org.junit.runner.Description"
] | import org.junit.runner.Description; | import org.junit.runner.*; | [
"org.junit.runner"
] | org.junit.runner; | 194,067 |
public PathFragment getParentRelativePath() {
return PathFragment.EMPTY_FRAGMENT;
} | PathFragment function() { return PathFragment.EMPTY_FRAGMENT; } | /**
* Returns the path of this Artifact relative to this containing Artifact. Since
* ordinary Artifacts correspond to only one Artifact -- itself -- for ordinary Artifacts,
* this just returns the empty path. For special Artifacts, throws
* {@link UnsupportedOperationException}. See also {@link Artifact#ge... | Returns the path of this Artifact relative to this containing Artifact. Since ordinary Artifacts correspond to only one Artifact -- itself -- for ordinary Artifacts, this just returns the empty path. For special Artifacts, throws <code>UnsupportedOperationException</code>. See also <code>Artifact#getParentRelativePath(... | getParentRelativePath | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java",
"license": "apache-2.0",
"size": 61163
} | [
"com.google.devtools.build.lib.vfs.PathFragment"
] | import com.google.devtools.build.lib.vfs.PathFragment; | import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,106,638 |
private JPanel getVehicleInfoPanel() {
if (vehicleInfoPanel == null) {
vehicleInfoPanel = new JPanel();
vehicleInfoPanel.setBorder(new LineBorder(new Color(0, 0, 0)));
GridBagLayout panelLayout = new GridBagLayout();
panelLayout.columnWidths = new int[] { 0, ... | JPanel function() { if (vehicleInfoPanel == null) { vehicleInfoPanel = new JPanel(); vehicleInfoPanel.setBorder(new LineBorder(new Color(0, 0, 0))); GridBagLayout panelLayout = new GridBagLayout(); panelLayout.columnWidths = new int[] { 0, 0, 0 }; panelLayout.rowHeights = new int[] { 0, 30 }; panelLayout.columnWeights ... | /**
* Creates, caches and returns the Panel that contains the information about
* the vehicle
*
* @return JPanel
*/ | Creates, caches and returns the Panel that contains the information about the vehicle | getVehicleInfoPanel | {
"repo_name": "battjt/iumpr",
"path": "src/net/soliddesign/iumpr/ui/UserInterfaceView.java",
"license": "mit",
"size": 31088
} | [
"java.awt.Color",
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"javax.swing.JPanel",
"javax.swing.border.LineBorder"
] | import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JPanel; import javax.swing.border.LineBorder; | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 376,758 |
private IWorkbenchWindow getWindow()
{
return window;
} | IWorkbenchWindow function() { return window; } | /**
* Returns the window to which this action builder is contributing.
*/ | Returns the window to which this action builder is contributing | getWindow | {
"repo_name": "debrief/limpet",
"path": "info.limpet.rcp/src/info/limpet/rcp/product/ApplicationActionBarAdvisor.java",
"license": "epl-1.0",
"size": 31323
} | [
"org.eclipse.ui.IWorkbenchWindow"
] | import org.eclipse.ui.IWorkbenchWindow; | import org.eclipse.ui.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 1,959,174 |
public Timestamp getCreated();
public static final String COLUMNNAME_CreatedBy = "CreatedBy"; | Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR; | /** Get Created.
* Date this record was created
*/ | Get Created. Date this record was created | getCreated | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_C_PaySchedule.java",
"license": "gpl-2.0",
"size": 6433
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 581,719 |
try {
Method m = cellEditor.getClass().getSuperclass()
.getDeclaredMethod("fireApplyEditorValue", (Class<?>[]) new Class[0]);
m.setAccessible(true);
m.invoke(cellEditor, (Object[]) null);
cellEditor.deactivate();
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | I... | try { Method m = cellEditor.getClass().getSuperclass() .getDeclaredMethod(STR, (Class<?>[]) new Class[0]); m.setAccessible(true); m.invoke(cellEditor, (Object[]) null); cellEditor.deactivate(); } catch (NoSuchMethodException SecurityException IllegalAccessException IllegalArgumentException InvocationTargetException e) ... | /**
* Performs the apply and deactivation mechanism of the cell editor.
*/ | Performs the apply and deactivation mechanism of the cell editor | performApplyAndDeactivate | {
"repo_name": "CloudScale-Project/DynamicSpotter",
"path": "org.spotter.eclipse.ui/src/org/spotter/eclipse/ui/editors/PropertiesEditingSupport.java",
"license": "apache-2.0",
"size": 11340
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,401,008 |
Map<String, Integer> countSymmetricKeysForMasterKeys();
| Map<String, Integer> countSymmetricKeysForMasterKeys(); | /**
* Count symmetric keys entities for symmetric keys for all master keys
*
* @since 5.0
*/ | Count symmetric keys entities for symmetric keys for all master keys | countSymmetricKeysForMasterKeys | {
"repo_name": "daniel-he/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/domain/contentdata/ContentDataDAO.java",
"license": "lgpl-3.0",
"size": 6657
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 423,705 |
String version() throws IOException;
@EqualsAndHashCode(callSuper = true)
final class Base extends RqWrap implements RqRequestLine {
private static final Pattern PATTERN = Pattern.compile(
"([!-~]+) ([^ ]+)( [^ ]+)?"
);
private enum Token {
... | String version() throws IOException; @EqualsAndHashCode(callSuper = true) final class Base extends RqWrap implements RqRequestLine { private static final Pattern PATTERN = Pattern.compile( STR ); private enum Token { METHOD(1), URI(2), HTTPVERSION(3); private final int value; Token(final int val) { this.value = val; } ... | /**
* Get Request-Line HTTP-Version token.
* @return HTTP Request-Line method token
* @throws IOException If fails
*/ | Get Request-Line HTTP-Version token | version | {
"repo_name": "essobedo/takes",
"path": "src/main/java/org/takes/rq/RqRequestLine.java",
"license": "mit",
"size": 7624
} | [
"java.io.IOException",
"java.util.regex.Pattern",
"org.takes.Request"
] | import java.io.IOException; import java.util.regex.Pattern; import org.takes.Request; | import java.io.*; import java.util.regex.*; import org.takes.*; | [
"java.io",
"java.util",
"org.takes"
] | java.io; java.util; org.takes; | 2,080,389 |
protected void attachBasicDocumentFields(Sku sku, SolrInputDocument document) {
boolean cacheOperationManaged = false;
Product product = sku.getProduct();
try {
CatalogStructure cache = SolrIndexCachedOperation.getCache();
if (cache != null) {
cacheOpe... | void function(Sku sku, SolrInputDocument document) { boolean cacheOperationManaged = false; Product product = sku.getProduct(); try { CatalogStructure cache = SolrIndexCachedOperation.getCache(); if (cache != null) { cacheOperationManaged = true; } else { cache = new CatalogStructure(); SolrIndexCachedOperation.setCach... | /**
* Adds the ID, category, and explicitCategory fields for the product or sku to the document
*
* @param product
* @param sku
* @param document
*/ | Adds the ID, category, and explicitCategory fields for the product or sku to the document | attachBasicDocumentFields | {
"repo_name": "takbani/blcdemo",
"path": "core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/search/service/solr/SolrIndexServiceImpl.java",
"license": "apache-2.0",
"size": 39983
} | [
"java.math.BigDecimal",
"java.util.Arrays",
"java.util.HashSet",
"org.apache.solr.common.SolrInputDocument",
"org.broadleafcommerce.core.catalog.domain.Product",
"org.broadleafcommerce.core.catalog.domain.Sku",
"org.broadleafcommerce.core.search.dao.CatalogStructure"
] | import java.math.BigDecimal; import java.util.Arrays; import java.util.HashSet; import org.apache.solr.common.SolrInputDocument; import org.broadleafcommerce.core.catalog.domain.Product; import org.broadleafcommerce.core.catalog.domain.Sku; import org.broadleafcommerce.core.search.dao.CatalogStructure; | import java.math.*; import java.util.*; import org.apache.solr.common.*; import org.broadleafcommerce.core.catalog.domain.*; import org.broadleafcommerce.core.search.dao.*; | [
"java.math",
"java.util",
"org.apache.solr",
"org.broadleafcommerce.core"
] | java.math; java.util; org.apache.solr; org.broadleafcommerce.core; | 660,234 |
private PackageHandle createOrUpdatePackage(BintrayUploadInfo info, RepositoryHandle repositoryHandle,
BasicStatusHolder status) throws Exception {
PackageDetails pkgDetails = info.getPackageDetails();
PackageHandle packageHandle;
packageHandle = repositoryHandle.pkg(pkgDetails.... | PackageHandle function(BintrayUploadInfo info, RepositoryHandle repositoryHandle, BasicStatusHolder status) throws Exception { PackageDetails pkgDetails = info.getPackageDetails(); PackageHandle packageHandle; packageHandle = repositoryHandle.pkg(pkgDetails.getName()); try { if (!packageHandle.exists()) { status.status... | /**
* Create or update an existing Bintray Package with the specified info
*
* @param info BintrayUploadInfo representing the supplied json file
* @param repositoryHandle RepositoryHandle retrieved by the Bintray Java Client
* @param status status holder of entire operatio... | Create or update an existing Bintray Package with the specified info | createOrUpdatePackage | {
"repo_name": "alancnet/artifactory",
"path": "backend/core/src/main/java/org/artifactory/bintray/BintrayServiceImpl.java",
"license": "apache-2.0",
"size": 73729
} | [
"com.jfrog.bintray.client.api.BintrayCallException",
"com.jfrog.bintray.client.api.details.PackageDetails",
"com.jfrog.bintray.client.api.handle.Bintray",
"com.jfrog.bintray.client.api.handle.PackageHandle",
"com.jfrog.bintray.client.api.handle.RepositoryHandle",
"java.io.IOException",
"org.artifactory.... | import com.jfrog.bintray.client.api.BintrayCallException; import com.jfrog.bintray.client.api.details.PackageDetails; import com.jfrog.bintray.client.api.handle.Bintray; import com.jfrog.bintray.client.api.handle.PackageHandle; import com.jfrog.bintray.client.api.handle.RepositoryHandle; import java.io.IOException; imp... | import com.jfrog.bintray.client.api.*; import com.jfrog.bintray.client.api.details.*; import com.jfrog.bintray.client.api.handle.*; import java.io.*; import org.artifactory.api.bintray.*; import org.artifactory.api.common.*; | [
"com.jfrog.bintray",
"java.io",
"org.artifactory.api"
] | com.jfrog.bintray; java.io; org.artifactory.api; | 977,170 |
@NotNull public static MvccQueryTracker mvccTracker(GridCacheContext cctx,
GridNearTxLocal tx) throws IgniteCheckedException {
MvccQueryTracker tracker;
if (tx == null)
tracker = new MvccQueryTrackerImpl(cctx);
else
tracker = new StaticMvccQueryTracker(cctx, ... | @NotNull static MvccQueryTracker function(GridCacheContext cctx, GridNearTxLocal tx) throws IgniteCheckedException { MvccQueryTracker tracker; if (tx == null) tracker = new MvccQueryTrackerImpl(cctx); else tracker = new StaticMvccQueryTracker(cctx, requestSnapshot(tx)); if (tracker.snapshot() == null) tracker.requestSn... | /**
* Initialises MVCC filter and returns MVCC query tracker if needed.
* @param cctx Cache context.
* @param tx Transaction.
* @return MVCC query tracker.
* @throws IgniteCheckedException If failed.
*/ | Initialises MVCC filter and returns MVCC query tracker if needed | mvccTracker | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUtils.java",
"license": "apache-2.0",
"size": 36919
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.GridCacheContext",
"org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal",
"org.jetbrains.annotations.NotNull"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal; import org.jetbrains.annotations.NotNull; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 405,864 |
protected JLabel createLabel(String txt, ConnectionEndpoint.ParamType type) {
JLabel label = new JLabel(txt);
label.setForeground(Color.BLACK);
label.setOpaque(false);
//label.setPreferredSize(new Dimension(50, 15));
label.setHorizontalAlignment(type == Connectio... | JLabel function(String txt, ConnectionEndpoint.ParamType type) { JLabel label = new JLabel(txt); label.setForeground(Color.BLACK); label.setOpaque(false); label.setHorizontalAlignment(type == ConnectionEndpoint.ParamType.Output ? SwingConstants.RIGHT : SwingConstants.LEFT); label.setFont(new Font(STR, 0, 10)); label.ad... | /**
* Create a Label used for TODO.
* @param txt The text on the label
* @param type The ParameterType (Input, Output, Both)
* @return
*/ | Create a Label used for TODO | createLabel | {
"repo_name": "jMonkeyEngine/sdk",
"path": "jme3-core/src/com/jme3/gde/core/editor/nodes/NodePanel.java",
"license": "bsd-3-clause",
"size": 16493
} | [
"java.awt.Color",
"java.awt.Font",
"javax.swing.JLabel",
"javax.swing.SwingConstants"
] | import java.awt.Color; import java.awt.Font; import javax.swing.JLabel; import javax.swing.SwingConstants; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,447,084 |
public List<String> getOptionsStartingWithName(String optionPrefix){
if(optionPrefix.startsWith("--")){
optionPrefix = optionPrefix.substring(2);
}
List<String> options = new ArrayList<String>();
for(String option : this.optionValue.keySet()){
if(option.startsWith(optionPrefix)){
options.add(opt... | List<String> function(String optionPrefix){ if(optionPrefix.startsWith("--")){ optionPrefix = optionPrefix.substring(2); } List<String> options = new ArrayList<String>(); for(String option : this.optionValue.keySet()){ if(option.startsWith(optionPrefix)){ options.add(option); } } return options; } | /**
* Returns the list of options whose name starts with the given option prefix.
* This method will automatically ignore a prefix "--" if it is included in the optionPrefix name.
* @param optionPrefix the option prefix that the returned options will contain
* @return the list of options that start with the spe... | Returns the list of options whose name starts with the given option prefix. This method will automatically ignore a prefix "--" if it is included in the optionPrefix name | getOptionsStartingWithName | {
"repo_name": "gauravpuri/MDP_Repp",
"path": "src/burlap/datastructures/CommandLineOptions.java",
"license": "lgpl-3.0",
"size": 2992
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,841,398 |
public void offerStoryUpdate(Story story) {
if (story == null) return;
if (! TextUtils.equals(story.storyHash, this.story.storyHash)) {
com.newsblur.util.Log.d(this, "prevented story list index offset shift");
return;
}
this.story = story;
//if (AppCon... | void function(Story story) { if (story == null) return; if (! TextUtils.equals(story.storyHash, this.story.storyHash)) { com.newsblur.util.Log.d(this, STR); return; } this.story = story; } | /**
* Lets the pager offer us an updated version of our story when a new cursor is
* cycled in. This class takes the responsibility of ensureing that the cursor
* index has not shifted, though, by checking story IDs.
*/ | Lets the pager offer us an updated version of our story when a new cursor is cycled in. This class takes the responsibility of ensureing that the cursor index has not shifted, though, by checking story IDs | offerStoryUpdate | {
"repo_name": "dosiecki/NewsBlur",
"path": "clients/android/NewsBlur/src/com/newsblur/fragment/ReadingItemFragment.java",
"license": "mit",
"size": 40339
} | [
"android.text.TextUtils",
"android.util.Log",
"com.newsblur.domain.Story"
] | import android.text.TextUtils; import android.util.Log; import com.newsblur.domain.Story; | import android.text.*; import android.util.*; import com.newsblur.domain.*; | [
"android.text",
"android.util",
"com.newsblur.domain"
] | android.text; android.util; com.newsblur.domain; | 2,815,240 |
void putToBreadCrumbStack(CrumbController crumbController) {
// re-enable last link
if (breadCrumbLinks.size() > 0)
breadCrumbLinks.get(breadCrumbLinks.size() - 1).setEnabled(true);
// create new link for this crumb and add it to data model
String cmd = "crumb-" + breadCr... | void putToBreadCrumbStack(CrumbController crumbController) { if (breadCrumbLinks.size() > 0) breadCrumbLinks.get(breadCrumbLinks.size() - 1).setEnabled(true); String cmd = STR + breadCrumbLinks.size(); Link link = LinkFactory.createCustomLink(cmd, cmd, cmd, Link.NONTRANSLATED, breadCrumbVC, this); link.setCustomDisplay... | /**
* Put a crumb controller with it's view to the bread crumb stack. Use the crumbController.activateAndListenToChildCrumbController() to put new crumbs to the stack in
* your code
*
* @param crumbController
*/ | Put a crumb controller with it's view to the bread crumb stack. Use the crumbController.activateAndListenToChildCrumbController() to put new crumbs to the stack in your code | putToBreadCrumbStack | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/main/java/org/olat/presentation/framework/core/control/generic/breadcrumb/BreadCrumbController.java",
"license": "apache-2.0",
"size": 7693
} | [
"org.olat.presentation.framework.core.components.link.Link",
"org.olat.presentation.framework.core.components.link.LinkFactory"
] | import org.olat.presentation.framework.core.components.link.Link; import org.olat.presentation.framework.core.components.link.LinkFactory; | import org.olat.presentation.framework.core.components.link.*; | [
"org.olat.presentation"
] | org.olat.presentation; | 732,552 |
T read(InputStream inputStream) throws IOException; | T read(InputStream inputStream) throws IOException; | /**
* Reads the object of the given type from the stream
*
* @param inputStream
* the stream to write from
* @return the object; this may be null
* @throws IOException
* if anything goes astray while writing the details
*/ | Reads the object of the given type from the stream | read | {
"repo_name": "pillingworthz/basics",
"path": "src/main/java/uk/co/threeonefour/basics/io/FileFormat.java",
"license": "apache-2.0",
"size": 1619
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,239,125 |
void init(Connection conn) throws SQLException;
/**
* This method must return the SQL type of the method, given the SQL type of
* the input data. The method should check here if the number of parameters
* passed is correct, and if not it should throw an exception.
*
* @param inputTypes... | void init(Connection conn) throws SQLException; /** * This method must return the SQL type of the method, given the SQL type of * the input data. The method should check here if the number of parameters * passed is correct, and if not it should throw an exception. * * @param inputTypes the SQL type of the parameters, {... | /**
* This method is called when the aggregate function is used.
* A new object is created for each invocation.
*
* @param conn a connection to the database
*/ | This method is called when the aggregate function is used. A new object is created for each invocation | init | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/api/AggregateFunction.java",
"license": "mpl-2.0",
"size": 1822
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 613,165 |
public Set<String> getProcessedVariables() {
return processedVars;
} | Set<String> function() { return processedVars; } | /**
* Returns the query variables that have been processed by this plan entry.
*
* @return processed vars
*/ | Returns the query variables that have been processed by this plan entry | getProcessedVariables | {
"repo_name": "niklasteichmann/gradoop",
"path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/single/cypher/planning/plantable/PlanTableEntry.java",
"license": "apache-2.0",
"size": 5325
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 411,072 |
public void handleEvent(SessionAboutToBeSavedEvent arg0, IDAREImageNodeApp app) {
LinkedList<File> LayoutList = new LinkedList<File>();
File LayoutFile = new File(System.getProperty("java.io.tmpdir") + File.separator + IMAGENODEPROPERTIES.LAYOUT_FILE_NAME);
LayoutList.add(LayoutFile);
try{
writeNodeLayo... | void function(SessionAboutToBeSavedEvent arg0, IDAREImageNodeApp app) { LinkedList<File> LayoutList = new LinkedList<File>(); File LayoutFile = new File(System.getProperty(STR) + File.separator + IMAGENODEPROPERTIES.LAYOUT_FILE_NAME); LayoutList.add(LayoutFile); try{ writeNodeLayouts(LayoutFile, app); } catch(IOExcepti... | /**
* Handle a {@link SessionAboutToBeSavedEvent}. Since the order in which the event is handles by the different components of the app is important,
* This Object does not itself implement the listener, but requires another function to call the handling operation.
* @param arg0 the event to handle
* @param app... | Handle a <code>SessionAboutToBeSavedEvent</code>. Since the order in which the event is handles by the different components of the app is important, This Object does not itself implement the listener, but requires another function to call the handling operation | handleEvent | {
"repo_name": "sysbiolux/IDARE",
"path": "METANODE-CREATOR/src/main/java/idare/imagenode/internal/DataManagement/NodeManager.java",
"license": "lgpl-3.0",
"size": 20797
} | [
"java.io.File",
"java.io.IOException",
"java.util.LinkedList",
"org.cytoscape.session.events.SessionAboutToBeSavedEvent"
] | import java.io.File; import java.io.IOException; import java.util.LinkedList; import org.cytoscape.session.events.SessionAboutToBeSavedEvent; | import java.io.*; import java.util.*; import org.cytoscape.session.events.*; | [
"java.io",
"java.util",
"org.cytoscape.session"
] | java.io; java.util; org.cytoscape.session; | 2,254,445 |
public PutMappingRequestBuilder setSource(XContentBuilder mappingBuilder) {
request.source(mappingBuilder);
return this;
} | PutMappingRequestBuilder function(XContentBuilder mappingBuilder) { request.source(mappingBuilder); return this; } | /**
* The mapping source definition.
*/ | The mapping source definition | setSource | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java",
"license": "apache-2.0",
"size": 3119
} | [
"org.elasticsearch.common.xcontent.XContentBuilder"
] | import org.elasticsearch.common.xcontent.XContentBuilder; | import org.elasticsearch.common.xcontent.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,391,943 |
int read ( byte[] b, int off, int len ) throws SmbException; | int read ( byte[] b, int off, int len ) throws SmbException; | /**
* Read into buffer from current position
*
* @param b
* buffer
* @param off
* offset into buffer
* @param len
* read up to <tt>len</tt> bytes
* @return number of bytes read
* @throws SmbException
*/ | Read into buffer from current position | read | {
"repo_name": "codelibs/jcifs",
"path": "src/main/java/jcifs/SmbRandomAccess.java",
"license": "lgpl-2.1",
"size": 2528
} | [
"jcifs.smb.SmbException"
] | import jcifs.smb.SmbException; | import jcifs.smb.*; | [
"jcifs.smb"
] | jcifs.smb; | 1,461,582 |
@DoesServiceRequest
public boolean createIfNotExists() throws StorageException {
return this.createIfNotExists(null , null );
} | boolean function() throws StorageException { return this.createIfNotExists(null , null ); } | /**
* Creates the container if it does not exist.
*
* @return <code>true</code> if the container did not already exist and was created; otherwise, <code>false</code>.
*
* @throws StorageException
* If a storage service error occurred.
*/ | Creates the container if it does not exist | createIfNotExists | {
"repo_name": "emgerner-msft/azure-storage-android",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/blob/CloudBlobContainer.java",
"license": "apache-2.0",
"size": 103657
} | [
"com.microsoft.azure.storage.StorageException"
] | import com.microsoft.azure.storage.StorageException; | import com.microsoft.azure.storage.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,661,740 |
public static BigDecimal byteToBigDecimal(byte[] raw) {
int scale = (raw[0] & 0xFF);
byte[] unscale = new byte[raw.length - 1];
System.arraycopy(raw, 1, unscale, 0, unscale.length);
BigInteger sig = new BigInteger(unscale);
return new BigDecimal(sig, scale);
} | static BigDecimal function(byte[] raw) { int scale = (raw[0] & 0xFF); byte[] unscale = new byte[raw.length - 1]; System.arraycopy(raw, 1, unscale, 0, unscale.length); BigInteger sig = new BigInteger(unscale); return new BigDecimal(sig, scale); } | /**
* This method will convert a byte value back to big decimal value
*
* @param raw
* @return
*/ | This method will convert a byte value back to big decimal value | byteToBigDecimal | {
"repo_name": "jatin9896/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/util/DataTypeUtil.java",
"license": "apache-2.0",
"size": 37029
} | [
"java.math.BigDecimal",
"java.math.BigInteger"
] | import java.math.BigDecimal; import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 805,344 |
public void showBottomSpace(ViewHolder vh, boolean show) {
vh.mBottomSpacer.setVisibility(show ? View.VISIBLE : View.GONE);
} | void function(ViewHolder vh, boolean show) { vh.mBottomSpacer.setVisibility(show ? View.VISIBLE : View.GONE); } | /**
* Shows or hides space at the bottom of the playback controls row.
* This allows the row to hug the bottom of the display when no
* other rows are present.
*/ | Shows or hides space at the bottom of the playback controls row. This allows the row to hug the bottom of the display when no other rows are present | showBottomSpace | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/support/v17/leanback/widget/PlaybackControlsRowPresenter.java",
"license": "gpl-3.0",
"size": 19759
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 651,646 |
private void putProperty(Properties props, String k, String v) {
if (null == v) {
props.remove(k);
} else {
props.setProperty(k, v);
}
} | void function(Properties props, String k, String v) { if (null == v) { props.remove(k); } else { props.setProperty(k, v); } } | /**
* A put() method for Properties that is tolerent of 'null' values.
* If a null value is specified, the property is unset.
*/ | A put() method for Properties that is tolerent of 'null' values. If a null value is specified, the property is unset | putProperty | {
"repo_name": "Tapad/sqoop",
"path": "src/java/org/apache/sqoop/SqoopOptions.java",
"license": "apache-2.0",
"size": 71739
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,615,131 |
public static <T> AllowedTransition<T> from(T state) {
return new AllowedTransition<T>(new Rule<T>(state));
}
}
public static class Builder<T> {
private final String name;
private T initialState;
private final Multimap<T, T> stateTransitions = HashMultimap.create();
private final L... | static <T> AllowedTransition<T> function(T state) { return new AllowedTransition<T>(new Rule<T>(state)); } } public static class Builder<T> { private final String name; private T initialState; private final Multimap<T, T> stateTransitions = HashMultimap.create(); private final List<Consumer<Transition<T>>> transitionCa... | /**
* Creates a new transition rule.
*
* @param state State to create and associate transitions with.
* @param <T> State type.
* @return A new transition rule builder.
*/ | Creates a new transition rule | from | {
"repo_name": "protochron/aurora",
"path": "commons/src/main/java/org/apache/aurora/common/util/StateMachine.java",
"license": "apache-2.0",
"size": 17139
} | [
"com.google.common.collect.HashMultimap",
"com.google.common.collect.Lists",
"com.google.common.collect.Multimap",
"java.util.List",
"java.util.function.Consumer",
"org.apache.aurora.common.base.MorePreconditions"
] | import com.google.common.collect.HashMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; import java.util.List; import java.util.function.Consumer; import org.apache.aurora.common.base.MorePreconditions; | import com.google.common.collect.*; import java.util.*; import java.util.function.*; import org.apache.aurora.common.base.*; | [
"com.google.common",
"java.util",
"org.apache.aurora"
] | com.google.common; java.util; org.apache.aurora; | 2,027,729 |
public Builder matchTernary(PiMatchFieldId fieldId, byte[] value, byte[] mask) {
fieldMatchMapBuilder.put(fieldId, new PiTernaryFieldMatch(fieldId, copyFrom(value), copyFrom(mask)));
return this;
} | Builder function(PiMatchFieldId fieldId, byte[] value, byte[] mask) { fieldMatchMapBuilder.put(fieldId, new PiTernaryFieldMatch(fieldId, copyFrom(value), copyFrom(mask))); return this; } | /**
* Adds a ternary field match for the given fieldId, value and mask.
*
* @param fieldId protocol-independent header field Id
* @param value ternary match value
* @param mask ternary match mask
* @return this
*/ | Adds a ternary field match for the given fieldId, value and mask | matchTernary | {
"repo_name": "kuujo/onos",
"path": "core/api/src/main/java/org/onosproject/net/flow/criteria/PiCriterion.java",
"license": "apache-2.0",
"size": 12239
} | [
"org.onlab.util.ImmutableByteSequence",
"org.onosproject.net.pi.model.PiMatchFieldId",
"org.onosproject.net.pi.runtime.PiTernaryFieldMatch"
] | import org.onlab.util.ImmutableByteSequence; import org.onosproject.net.pi.model.PiMatchFieldId; import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; | import org.onlab.util.*; import org.onosproject.net.pi.model.*; import org.onosproject.net.pi.runtime.*; | [
"org.onlab.util",
"org.onosproject.net"
] | org.onlab.util; org.onosproject.net; | 1,003,518 |
public static HashMap<String, Knot> getKnotMapFromFile(File f, int i, int max){
if(i<max){
try {
f.createNewFile();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try(FileInputStream inputFileStream = new FileInputStream(f);
ObjectInputStream o... | static HashMap<String, Knot> function(File f, int i, int max){ if(i<max){ try { f.createNewFile(); } catch (IOException e1) { e1.printStackTrace(); } try(FileInputStream inputFileStream = new FileInputStream(f); ObjectInputStream objectInputStream = new ObjectInputStream(inputFileStream);) { HashMap<String, Knot> map =... | /**
* Get RootMap from predefined File
* @param f File of RootMap
* @return
*/ | Get RootMap from predefined File | getKnotMapFromFile | {
"repo_name": "Jack5496/TreeSpirit",
"path": "src/main/java/com/jack/treespirit/filemanager/KnotMap.java",
"license": "gpl-3.0",
"size": 2230
} | [
"com.jack.treespirit.knots.Knot",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.ObjectInputStream",
"java.util.HashMap",
"org.bukkit.Bukkit"
] | import com.jack.treespirit.knots.Knot; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.util.HashMap; import org.bukkit.Bukkit; | import com.jack.treespirit.knots.*; import java.io.*; import java.util.*; import org.bukkit.*; | [
"com.jack.treespirit",
"java.io",
"java.util",
"org.bukkit"
] | com.jack.treespirit; java.io; java.util; org.bukkit; | 218,192 |
NewIssue overrideSeverity(@Nullable Severity severity); | NewIssue overrideSeverity(@Nullable Severity severity); | /**
* Override severity of the issue.
* Setting a null value or not calling this method means to use severity configured in quality profile.
*/ | Override severity of the issue. Setting a null value or not calling this method means to use severity configured in quality profile | overrideSeverity | {
"repo_name": "Builders-SonarSource/sonarqube-bis",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/issue/NewIssue.java",
"license": "lgpl-3.0",
"size": 2738
} | [
"javax.annotation.Nullable",
"org.sonar.api.batch.rule.Severity"
] | import javax.annotation.Nullable; import org.sonar.api.batch.rule.Severity; | import javax.annotation.*; import org.sonar.api.batch.rule.*; | [
"javax.annotation",
"org.sonar.api"
] | javax.annotation; org.sonar.api; | 1,275,934 |
@SuppressWarnings("unchecked")
public <T extends WindupVertexFrame> T findSingletonVariable(String name)
{
Iterable<? extends WindupVertexFrame> frames = findVariable(name);
if (null == frames)
{
throw new IllegalStateException("Variable not found: \"" + name + "\"");
... | @SuppressWarnings(STR) <T extends WindupVertexFrame> T function(String name) { Iterable<? extends WindupVertexFrame> frames = findVariable(name); if (null == frames) { throw new IllegalStateException(STRSTR\STRMore than one frame present STRunder presumed singleton variable: " + name); } return (T) obj; } | /**
* Wrapper around {@link #findVariable(String)} which gives only one framed vertex, and checks if there is 0 or 1;
* throws otherwise.
*/ | Wrapper around <code>#findVariable(String)</code> which gives only one framed vertex, and checks if there is 0 or 1; throws otherwise | findSingletonVariable | {
"repo_name": "bradsdavis/windup",
"path": "config/api/src/main/java/org/jboss/windup/config/Variables.java",
"license": "epl-1.0",
"size": 6486
} | [
"org.jboss.windup.graph.model.WindupVertexFrame"
] | import org.jboss.windup.graph.model.WindupVertexFrame; | import org.jboss.windup.graph.model.*; | [
"org.jboss.windup"
] | org.jboss.windup; | 768,286 |
public ModelAndView handleHelpFagBibPage05(HttpServletRequest request,
HttpServletResponse response) throws ServletException {
String viewName = "fagBibHelpScreenPage05View";
return new ModelAndView(viewName);
}
// ///////////////////////////////////////////////////////////////... | ModelAndView function(HttpServletRequest request, HttpServletResponse response) throws ServletException { String viewName = STR; return new ModelAndView(viewName); } | /**
* Custom handler handleHelpFagBibPage05.
*
* @param request current HTTP request
* @param response current HTTP response
* @return a ModelAndView to render the response
*/ | Custom handler handleHelpFagBibPage05 | handleHelpFagBibPage05 | {
"repo_name": "NationalLibraryOfNorway/Bibliotekstatistikk",
"path": "abmstatistikk-main/src/main/java/no/abmu/abmstatistikk/web/ABMStatistikkHelpController.java",
"license": "gpl-2.0",
"size": 61831
} | [
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.springframework.web.servlet.ModelAndView"
] | import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; | import javax.servlet.*; import javax.servlet.http.*; import org.springframework.web.servlet.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 2,866,925 |
public void removeDayActionListener(ActionListener l) {
mv.removeDayActionListener(l);
} | void function(ActionListener l) { mv.removeDayActionListener(l); } | /**
* Removes ActionListener from day buttons
*
* @param l listener to remove
*/ | Removes ActionListener from day buttons | removeDayActionListener | {
"repo_name": "diamonddevgroup/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/Calendar.java",
"license": "gpl-2.0",
"size": 49055
} | [
"com.codename1.ui.events.ActionListener"
] | import com.codename1.ui.events.ActionListener; | import com.codename1.ui.events.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 1,913,412 |
private Rule setUID(Vendor vendor, Rule rule) {
String uid = vendor.getVendorID() + vendor.count();
Rule r = new Rule(uid, rule.getTriggers(), rule.getConditions(), rule.getActions(),
rule.getConfigurationDescriptions(), rule.getConfiguration(), rule.getTemplateUID(),
... | Rule function(Vendor vendor, Rule rule) { String uid = vendor.getVendorID() + vendor.count(); Rule r = new Rule(uid, rule.getTriggers(), rule.getConditions(), rule.getActions(), rule.getConfigurationDescriptions(), rule.getConfiguration(), rule.getTemplateUID(), rule.getVisibility()); r.setName(rule.getName()); r.setDe... | /**
* This method gives UIDs on the rules that don't have one.
*
* @param vendor
* is the bundle providing the rules.
* @param rule
* is the provided rule.
*/ | This method gives UIDs on the rules that don't have one | setUID | {
"repo_name": "philomatic/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.providers/src/main/java/org/eclipse/smarthome/automation/internal/core/provider/RuleResourceBundleImporter.java",
"license": "epl-1.0",
"size": 7542
} | [
"org.eclipse.smarthome.automation.Rule"
] | import org.eclipse.smarthome.automation.Rule; | import org.eclipse.smarthome.automation.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 991,345 |
@Override
public void setParent(Refactoring emfRefactoring) {
this.parent = emfRefactoring;
}
| void function(Refactoring emfRefactoring) { this.parent = emfRefactoring; } | /**
* Sets the Refactoring supported by the controller.
* @param emfRefactoring Refactoring supported by the controller.
* @see org.eclipse.emf.refactor.refactoring.interfaces.IController#
* setParent(org.eclipse.emf.refactor.refactoring.core.Refactoring)
* @generated
*/ | Sets the Refactoring supported by the controller | setParent | {
"repo_name": "ArendtTh/FoPra1415AD",
"path": "de.unimarburg.swt.fopra.activity.refactorings/src/de/unimarburg/swt/fopra/activity/refactorings/de/pum/swt/uml/roa/RefactoringController.java",
"license": "epl-1.0",
"size": 5557
} | [
"org.eclipse.emf.refactor.refactoring.core.Refactoring"
] | import org.eclipse.emf.refactor.refactoring.core.Refactoring; | import org.eclipse.emf.refactor.refactoring.core.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 944,197 |
private SosProcedureDescription convert(String fromFormat, String toFormat,
SosProcedureDescription description)
throws OwsExceptionReport {
try {
Converter<SosProcedureDescription, Object> converter =
ConverterRepo... | SosProcedureDescription function(String fromFormat, String toFormat, SosProcedureDescription description) throws OwsExceptionReport { try { Converter<SosProcedureDescription, Object> converter = ConverterRepository.getInstance() .getConverter(fromFormat, toFormat); return converter.convert(description); } catch (Conver... | /**
* Convert the description to another procedure description format.
*
* @param fromFormat the source format
* @param toFormat the target format
* @param description the procedure description.
*
* @return the converted description
*
* @throws OwsExceptionRepor... | Convert the description to another procedure description format | convert | {
"repo_name": "sauloperez/sos",
"path": "src/hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/procedure/HibernateProcedureConverter.java",
"license": "apache-2.0",
"size": 12634
} | [
"org.n52.sos.convert.Converter",
"org.n52.sos.convert.ConverterException",
"org.n52.sos.convert.ConverterRepository",
"org.n52.sos.exception.ows.NoApplicableCodeException",
"org.n52.sos.ogc.ows.OwsExceptionReport",
"org.n52.sos.ogc.sos.SosProcedureDescription"
] | import org.n52.sos.convert.Converter; import org.n52.sos.convert.ConverterException; import org.n52.sos.convert.ConverterRepository; import org.n52.sos.exception.ows.NoApplicableCodeException; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.ogc.sos.SosProcedureDescription; | import org.n52.sos.convert.*; import org.n52.sos.exception.ows.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.ogc.sos.*; | [
"org.n52.sos"
] | org.n52.sos; | 444,375 |
StreamTrimLimitArgs<T> minId(StreamMessageId messageId); | StreamTrimLimitArgs<T> minId(StreamMessageId messageId); | /**
* Defines MINID strategy used for Stream trimming.
* Evicts entries with IDs lower than threshold, where threshold is a stream ID.
*
* @param messageId - stream Id
* @return arguments object
*/ | Defines MINID strategy used for Stream trimming. Evicts entries with IDs lower than threshold, where threshold is a stream ID | minId | {
"repo_name": "redisson/redisson",
"path": "redisson/src/main/java/org/redisson/api/stream/StreamTrimStrategyArgs.java",
"license": "apache-2.0",
"size": 1403
} | [
"org.redisson.api.StreamMessageId"
] | import org.redisson.api.StreamMessageId; | import org.redisson.api.*; | [
"org.redisson.api"
] | org.redisson.api; | 900,773 |
public void save(){
try {
props.storeToXML(new FileOutputStream(file), null);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} | void function(){ try { props.storeToXML(new FileOutputStream(file), null); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } | /**
* Stores propeties to XML propety file.
*/ | Stores propeties to XML propety file | save | {
"repo_name": "davidfoerster/synesketch",
"path": "src/synesketch/util/PropertiesManager.java",
"license": "gpl-2.0",
"size": 2809
} | [
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,916,305 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.