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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@ClientOnly
public void removeFromCache(Plugin plugin, String file); | void function(Plugin plugin, String file); | /**
* Removes the given filename from the cache, if it exists.
* @param plugin that the file is cached for
* @param file name to remove
*/ | Removes the given filename from the cache, if it exists | removeFromCache | {
"repo_name": "Spoutcraft/SpoutcraftPlugin",
"path": "src/main/java/org/getspout/spoutapi/player/FileManager.java",
"license": "lgpl-3.0",
"size": 7395
} | [
"org.bukkit.plugin.Plugin"
] | import org.bukkit.plugin.Plugin; | import org.bukkit.plugin.*; | [
"org.bukkit.plugin"
] | org.bukkit.plugin; | 2,885,351 |
@Test public void testAliasProjectProject() {
final RelBuilder builder = RelBuilder.create(config().build());
RelNode root =
builder.scan("EMP")
.as("EMP_alias")
.project(builder.field("DEPTNO"),
builder.literal(20))
.project(builder.field(1),
... | @Test void function() { final RelBuilder builder = RelBuilder.create(config().build()); RelNode root = builder.scan("EMP") .as(STR) .project(builder.field(STR), builder.literal(20)) .project(builder.field(1), builder.literal(10), builder.field(0)) .project(builder.alias(builder.field(1), "sum"), builder.field(STR, STR)... | /** Tests that table aliases are propagated even when there is a project on
* top of a project. (Aliases tend to get lost when projects are merged). */ | Tests that table aliases are propagated even when there is a project on | testAliasProjectProject | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelBuilderTest.java",
"license": "apache-2.0",
"size": 116680
} | [
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.test.Matchers",
"org.apache.calcite.tools.RelBuilder",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.calcite.rel.RelNode; import org.apache.calcite.test.Matchers; import org.apache.calcite.tools.RelBuilder; import org.junit.Assert; import org.junit.Test; | import org.apache.calcite.rel.*; import org.apache.calcite.test.*; import org.apache.calcite.tools.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 1,156,121 |
public String[] getRsCoprocessors() {
// Need a set to remove duplicates, but since generated Coprocessor class
// is not Comparable, make it a Set<String> instead of Set<Coprocessor>
TreeSet<String> coprocessSet = new TreeSet<String>();
for (Coprocessor coprocessor : obtainServerLoadPB().getCoprocess... | String[] function() { TreeSet<String> coprocessSet = new TreeSet<String>(); for (Coprocessor coprocessor : obtainServerLoadPB().getCoprocessorsList()) { coprocessSet.add(coprocessor.getName()); } return coprocessSet.toArray(new String[coprocessSet.size()]); } | /**
* Return the RegionServer-level and Region-level coprocessors
* @return string array of loaded RegionServer-level and
* Region-level coprocessors
*/ | Return the RegionServer-level and Region-level coprocessors | getRsCoprocessors | {
"repo_name": "drewpope/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java",
"license": "apache-2.0",
"size": 10484
} | [
"java.util.TreeSet",
"org.apache.hadoop.hbase.protobuf.generated.HBaseProtos"
] | import java.util.TreeSet; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; | import java.util.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,314,512 |
public Length getIntrinsicAlignmentAdjust() {
return null;
} | Length function() { return null; } | /**
* Retrieve the intrinsic alignment-adjust of the child element.
*
* @return the intrinsic alignment-adjust.
*/ | Retrieve the intrinsic alignment-adjust of the child element | getIntrinsicAlignmentAdjust | {
"repo_name": "pellcorp/fop",
"path": "src/java/org/apache/fop/fo/XMLObj.java",
"license": "apache-2.0",
"size": 7055
} | [
"org.apache.fop.datatypes.Length"
] | import org.apache.fop.datatypes.Length; | import org.apache.fop.datatypes.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,106,295 |
public Date getCheckDate();
| Date function(); | /**
* Gets the checkDate attribute.
*
* @return Returns the checkDate.
*/ | Gets the checkDate attribute | getCheckDate | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/businessobject/Check.java",
"license": "agpl-3.0",
"size": 4671
} | [
"java.sql.Date"
] | import java.sql.Date; | import java.sql.*; | [
"java.sql"
] | java.sql; | 456,537 |
@Override public void enterFunClauses(@NotNull ErlangParser.FunClausesContext ctx) { } | @Override public void enterFunClauses(@NotNull ErlangParser.FunClausesContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitType300 | {
"repo_name": "lyskouski/erlang-netbeans",
"path": "src/by/creativity/erlang/lexer/ErlangBaseListener.java",
"license": "gpl-2.0",
"size": 35296
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,291,898 |
private void setStartPeriod(int periodLength) {
int refMonth = MyPreferences.getReferenceMonth(this.getActivity());
Calendar now = Calendar.getInstance();
startPeriod = new GregorianCalendar(now.get(Calendar.YEAR), now.get(Calendar.MONTH), 1);
if (refMonth!=0) {
startPeriod.add(Calendar.MONTH, refMonth);
... | void function(int periodLength) { int refMonth = MyPreferences.getReferenceMonth(this.getActivity()); Calendar now = Calendar.getInstance(); startPeriod = new GregorianCalendar(now.get(Calendar.YEAR), now.get(Calendar.MONTH), 1); if (refMonth!=0) { startPeriod.add(Calendar.MONTH, refMonth); } startPeriod.add(Calendar.M... | /**
* Set the start period based on given period length and reference month registered in report preferences.
* Start period = Reference Month - periodLength months
* @param periodLength The number of months to be represented in the 2D report.
*/ | Set the start period based on given period length and reference month registered in report preferences. Start period = Reference Month - periodLength months | setStartPeriod | {
"repo_name": "emmanuel-florent/flowzr-android-black",
"path": "src/main/java/com/flowzr/activity/Report2DChartFragment.java",
"license": "gpl-2.0",
"size": 19267
} | [
"com.flowzr.utils.MyPreferences",
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import com.flowzr.utils.MyPreferences; import java.util.Calendar; import java.util.GregorianCalendar; | import com.flowzr.utils.*; import java.util.*; | [
"com.flowzr.utils",
"java.util"
] | com.flowzr.utils; java.util; | 2,710,148 |
File f = new File(path);
if (f.exists() && f.canRead()) {
return getComponentName(f);
}
return "";
} | File f = new File(path); if (f.exists() && f.canRead()) { return getComponentName(f); } return ""; } | /**
* Evaluates the NABUCCO component name for any given NBC file.
*
* @param path
* a path to a File
*
* @return the NABUCCO component name
*/ | Evaluates the NABUCCO component name for any given NBC file | getComponentName | {
"repo_name": "NABUCCO/org.nabucco.framework.generator",
"path": "org.nabucco.framework.generator.parser/src/main/org/nabucco/framework/generator/parser/model/ComponentFinder.java",
"license": "epl-1.0",
"size": 3054
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,476,961 |
@Override
public TemplateDruidQuery withGranularity(Granularity granularity) {
if (granularity instanceof ZonelessTimeGrain) {
return withGranularity((ZonelessTimeGrain) granularity);
}
throw new UnsupportedOperationException("Template Druid Query only supports Zoneless Time ... | TemplateDruidQuery function(Granularity granularity) { if (granularity instanceof ZonelessTimeGrain) { return withGranularity((ZonelessTimeGrain) granularity); } throw new UnsupportedOperationException(STR); } | /**
* With granularity is partially implemented because TemplateDruidQuery supports only ZonelessTimeGrains.
*
* @param granularity a zoneless time grain
*
* @return a new TemplateDruidQuery based in the new granularity
* @throws UnsupportedOperationException if the granularity is not a Z... | With granularity is partially implemented because TemplateDruidQuery supports only ZonelessTimeGrains | withGranularity | {
"repo_name": "yahoo/fili",
"path": "fili-core/src/main/java/com/yahoo/bard/webservice/data/metric/TemplateDruidQuery.java",
"license": "apache-2.0",
"size": 33052
} | [
"com.yahoo.bard.webservice.data.time.Granularity",
"com.yahoo.bard.webservice.data.time.ZonelessTimeGrain"
] | import com.yahoo.bard.webservice.data.time.Granularity; import com.yahoo.bard.webservice.data.time.ZonelessTimeGrain; | import com.yahoo.bard.webservice.data.time.*; | [
"com.yahoo.bard"
] | com.yahoo.bard; | 2,757,374 |
public String postProcess( MsgObject msg, String currentName )
{
isActive = false;
return currentName;
} | String function( MsgObject msg, String currentName ) { isActive = false; return currentName; } | /**
* Set this item inactive - don't want to add it to the qeList in
* MraldParser since we are storing them separately in the main MsgObject
*
*@param msg Description of the Parameter
*@param currentName Description of the Parameter
*@return Description of the R... | Set this item inactive - don't want to add it to the qeList in MraldParser since we are storing them separately in the main MsgObject | postProcess | {
"repo_name": "jchoyt/mrald-lite",
"path": "src/org/mitre/mrald/query/LinkElement.java",
"license": "apache-2.0",
"size": 15083
} | [
"org.mitre.mrald.control.MsgObject"
] | import org.mitre.mrald.control.MsgObject; | import org.mitre.mrald.control.*; | [
"org.mitre.mrald"
] | org.mitre.mrald; | 2,876,748 |
void updateStyle()
{
// Invalidate all style
actualStyle_ = new GStyle();
// Update with owner style
if (owner_ != null)
actualStyle_.update (owner_.getActualStyle());
// Update (and possibly override) with present style
if (style_ != null)
actualStyle_.update (style_);
//... | void updateStyle() { actualStyle_ = new GStyle(); if (owner_ != null) actualStyle_.update (owner_.getActualStyle()); if (style_ != null) actualStyle_.update (style_); if (texts_ != null) { for (Iterator i = texts_.iterator(); i.hasNext(); ) { GText text = (GText) i.next(); text.updateStyle(); } } computeRectangle(); up... | /**
* Resolve unset values in segment style.
*/ | Resolve unset values in segment style | updateStyle | {
"repo_name": "immo/clojure-conexp",
"path": "stuff/libs/no/geosoft/cc/graphics/GSegment.java",
"license": "epl-1.0",
"size": 25734
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,348,402 |
public int getTransactionCount(final int type)
{
SQLiteDatabase db = getReadableDatabase();
Cursor data = db.rawQuery("SELECT Count(*) FROM " + TransactionDbIds.TABLE +
" where " + TransactionDbIds.TYPE + "=?", new String[]{Integer.toString(type)});
int numItems = 0;
... | int function(final int type) { SQLiteDatabase db = getReadableDatabase(); Cursor data = db.rawQuery(STR + TransactionDbIds.TABLE + STR + TransactionDbIds.TYPE + "=?", new String[]{Integer.toString(type)}); int numItems = 0; if(data.getCount() == 1) { data.moveToFirst(); numItems = data.getInt(0); } data.close(); db.clo... | /**
* Returns the number of transactions in the database
* of the provided type.
*
* @param type
* transaction type to query, either EXPENSE or
* REVENUE
* @return the number of transactions in the database
* of the given type
*/ | Returns the number of transactions in the database of the provided type | getTransactionCount | {
"repo_name": "brarcher/budget-watch",
"path": "app/src/main/java/protect/budgetwatch/DBHelper.java",
"license": "gpl-3.0",
"size": 25146
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; | import android.database.*; import android.database.sqlite.*; | [
"android.database"
] | android.database; | 1,748,354 |
public static void addSolutionElement(final Element root, final String solutionText) {
final Element el_solution = root.addElement("itemfeedback");
el_solution.addAttribute("ident", "Solution");
el_solution.addAttribute("view", "All");
el_solution.addElement("solution").addElement("s... | static void function(final Element root, final String solutionText) { final Element el_solution = root.addElement(STR); el_solution.addAttribute("ident", STR); el_solution.addAttribute("view", "All"); el_solution.addElement(STR).addElement(STR).addElement(STR).addElement(STR).addCDATA(solutionText); } | /**
* Add solution
*
* @param root
* @param solutionText
*/ | Add solution | addSolutionElement | {
"repo_name": "huihoo/olat",
"path": "OLAT-LMS/src/main/java/org/olat/lms/ims/qti/editor/QTIEditHelperEBL.java",
"license": "apache-2.0",
"size": 35428
} | [
"org.dom4j.Element"
] | import org.dom4j.Element; | import org.dom4j.*; | [
"org.dom4j"
] | org.dom4j; | 1,654,953 |
private static Icon getIcon(
final int countAll, final int selected, final int unselected, final int invisible) {
if (countAll == 0) {
return ICON_EMPTY_FOLDER;
} else if (invisible == countAll) {
return ICON_ALL_INVISIBLE_GRAPHNODES;
} else if (selected == countAll) {
return ICON_... | static Icon function( final int countAll, final int selected, final int unselected, final int invisible) { if (countAll == 0) { return ICON_EMPTY_FOLDER; } else if (invisible == countAll) { return ICON_ALL_INVISIBLE_GRAPHNODES; } else if (selected == countAll) { return ICON_ALL_SELECTED_GRAPHNODES; } else if (unselecte... | /**
* Returns an icon depending on the selection and visibility state of the nodes in a selection.
*
* @param countAll Number of nodes.
* @param selected Number of selected nodes.
* @param unselected Number of unselected nodes.
* @param invisible Number of invisible nodes.
*
* @return The approp... | Returns an icon depending on the selection and visibility state of the nodes in a selection | getIcon | {
"repo_name": "juneJuly/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Gui/GraphWindows/Undo/CSelectionHistoryTreeNode.java",
"license": "apache-2.0",
"size": 6474
} | [
"javax.swing.Icon"
] | import javax.swing.Icon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 101,531 |
public StepDataInterface getStepDataInterface(String stepname, int stepcopy)
{
if (steps==null) return null;
for (int i=0;i<steps.size();i++)
{
StepMetaDataCombi sid = steps.get(i);
if (sid.stepname.equals(stepname) && sid.copy==stepcopy) return sid.data;
... | StepDataInterface function(String stepname, int stepcopy) { if (steps==null) return null; for (int i=0;i<steps.size();i++) { StepMetaDataCombi sid = steps.get(i); if (sid.stepname.equals(stepname) && sid.copy==stepcopy) return sid.data; } return null; } | /**
* Finds the StepDataInterface (currently) associated with the specified step
* @param stepname The name of the step to look for
* @param stepcopy The copy number (0 based) of the step
* @return The StepDataInterface or null if non found.
*/ | Finds the StepDataInterface (currently) associated with the specified step | getStepDataInterface | {
"repo_name": "dianhu/Kettle-Research",
"path": "src/org/pentaho/di/trans/Trans.java",
"license": "lgpl-2.1",
"size": 128383
} | [
"org.pentaho.di.trans.step.StepDataInterface",
"org.pentaho.di.trans.step.StepMetaDataCombi"
] | import org.pentaho.di.trans.step.StepDataInterface; import org.pentaho.di.trans.step.StepMetaDataCombi; | import org.pentaho.di.trans.step.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 812,002 |
public static String getInitialName(String fullTaskName) {
String taskName = null;
Matcher matcher = null;
for (Pattern pat : namePatterns) {
matcher = pat.matcher(fullTaskName);
if (matcher.find()) {
taskName = matcher.group(1);
retur... | static String function(String fullTaskName) { String taskName = null; Matcher matcher = null; for (Pattern pat : namePatterns) { matcher = pat.matcher(fullTaskName); if (matcher.find()) { taskName = matcher.group(1); return taskName; } } throw new RuntimeException(STR + fullTaskName); } | /**
* Extracts the original task name if it was added a suffix to
* make it unique among replicated tasks
* <p>
* <b>This methods returns an ambiguous name: several tasks can share this name;
* it cannot be used as an identifier.
* </b>
* @param fullTaskName name with the iteration an... | Extracts the original task name if it was added a suffix to make it unique among replicated tasks This methods returns an ambiguous name: several tasks can share this name; it cannot be used as an identifier. | getInitialName | {
"repo_name": "lpellegr/scheduling",
"path": "scheduler/scheduler-server/src/main/java/org/ow2/proactive/scheduler/task/internal/InternalTask.java",
"license": "agpl-3.0",
"size": 48496
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,020,608 |
public static PropertyKey fromString(String input) {
// First try to parse it as default key
PropertyKey key = DEFAULT_KEYS_MAP.get(input);
if (key != null) {
return key;
}
// Try different templates and see if any template matches
for (Template template : Template.values()) {
Matc... | static PropertyKey function(String input) { PropertyKey key = DEFAULT_KEYS_MAP.get(input); if (key != null) { return key; } for (Template template : Template.values()) { Matcher matcher = template.mPattern.matcher(input); if (matcher.matches()) { return new PropertyKey(input); } } throw new IllegalArgumentException( Ex... | /**
* Parses a string and return its corresponding {@link PropertyKey}, throwing exception if no such
* a property can be found.
*
* @param input string of property key
* @return corresponding property
*/ | Parses a string and return its corresponding <code>PropertyKey</code>, throwing exception if no such a property can be found | fromString | {
"repo_name": "ShailShah/alluxio",
"path": "core/common/src/main/java/alluxio/PropertyKey.java",
"license": "apache-2.0",
"size": 76498
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 105,426 |
public final void setClockRate(int hz) {
SPIJNI.spiSetSpeed(m_port, hz);
} | final void function(int hz) { SPIJNI.spiSetSpeed(m_port, hz); } | /**
* Configure the rate of the generated clock signal. The default value is 500,000 Hz. The maximum
* value is 4,000,000 Hz.
*
* @param hz The clock rate in Hertz.
*/ | Configure the rate of the generated clock signal. The default value is 500,000 Hz. The maximum value is 4,000,000 Hz | setClockRate | {
"repo_name": "PeterMitrano/allwpilib",
"path": "wpilibj/src/athena/java/edu/wpi/first/wpilibj/SPI.java",
"license": "bsd-3-clause",
"size": 12752
} | [
"edu.wpi.first.wpilibj.hal.SPIJNI"
] | import edu.wpi.first.wpilibj.hal.SPIJNI; | import edu.wpi.first.wpilibj.hal.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 1,198,791 |
public Object get(String key) throws RemoteException
{
try
{
JServerRmiAdapter.logMethodCall(adaptee.getFullName() + ".VectorPropertyRmiAdapter", "get(" +key + ")");
return adaptee.get(key);
}
catch(Throwable t)
{
JServerUtilities.logError(adaptee.getFullName(), "Error occurred d... | Object function(String key) throws RemoteException { try { JServerRmiAdapter.logMethodCall(adaptee.getFullName() + STR, "get(" +key + ")"); return adaptee.get(key); } catch(Throwable t) { JServerUtilities.logError(adaptee.getFullName(), STR, t); if(t instanceof Error) throw (Error)t; else throw new RemoteException(STR ... | /**
* Returns the item with the specified key.
*
* @param key a key uniquely identifying an item in this VectorProperty.
*
* @return the item with the specified key.
*/ | Returns the item with the specified key | get | {
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jserver/rmi/adapter/VectorPropertyRmiAdapter.java",
"license": "apache-2.0",
"size": 9392
} | [
"com.teletalk.jserver.JServerUtilities",
"java.rmi.RemoteException"
] | import com.teletalk.jserver.JServerUtilities; import java.rmi.RemoteException; | import com.teletalk.jserver.*; import java.rmi.*; | [
"com.teletalk.jserver",
"java.rmi"
] | com.teletalk.jserver; java.rmi; | 1,639,040 |
private org.switchyard.Exchange createSwitchYardExchange() {
org.switchyard.Exchange switchYardExchange = mock(org.switchyard.Exchange.class);
Message message = mock(org.switchyard.Message.class);
Context context = new CompositeContext();
when(message.getContext()).thenReturn(context... | org.switchyard.Exchange function() { org.switchyard.Exchange switchYardExchange = mock(org.switchyard.Exchange.class); Message message = mock(org.switchyard.Message.class); Context context = new CompositeContext(); when(message.getContext()).thenReturn(context); when(message.getContent(Integer.class)).thenReturn(10); w... | /**
* Create a mocked SwitchYard exchange
* @return exchange
*/ | Create a mocked SwitchYard exchange | createSwitchYardExchange | {
"repo_name": "bfitzpat/switchyard",
"path": "components/camel/camel-switchyard/src/test/java/org/switchyard/component/camel/switchyard/ExchangeMapperTests.java",
"license": "apache-2.0",
"size": 3458
} | [
"org.apache.camel.Exchange",
"org.mockito.Mockito",
"org.switchyard.Context",
"org.switchyard.Message",
"org.switchyard.internal.CompositeContext"
] | import org.apache.camel.Exchange; import org.mockito.Mockito; import org.switchyard.Context; import org.switchyard.Message; import org.switchyard.internal.CompositeContext; | import org.apache.camel.*; import org.mockito.*; import org.switchyard.*; import org.switchyard.internal.*; | [
"org.apache.camel",
"org.mockito",
"org.switchyard",
"org.switchyard.internal"
] | org.apache.camel; org.mockito; org.switchyard; org.switchyard.internal; | 1,448,659 |
List<User> getUsersBySpecificUser(PerunSession sess, User specificUser) throws UserNotExistsException, PrivilegeException, SpecificUserExpectedException; | List<User> getUsersBySpecificUser(PerunSession sess, User specificUser) throws UserNotExistsException, PrivilegeException, SpecificUserExpectedException; | /**
* Return all users who owns the specific one
*
* @param sess
* @param specificUser the specific user
* @return list of user who owns the specificUser
* @throws InternalErrorException
* @throws UserNotExistsException
* @throws PrivilegeException
* @throws SpecificUserExpectedException when the serv... | Return all users who owns the specific one | getUsersBySpecificUser | {
"repo_name": "zoraseb/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 54525
} | [
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.SpecificUserExpectedException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.SpecificUserExpectedException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; import java.util.List; | import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,342,877 |
public static <E, L extends List<E>> SynchronizedMutableList<E> of(L list)
{
MutableList<E> mutableList =
list instanceof MutableList ? (MutableList<E>) list : ListAdapter.adapt(list);
return new SynchronizedMutableList<>(mutableList);
} | static <E, L extends List<E>> SynchronizedMutableList<E> function(L list) { MutableList<E> mutableList = list instanceof MutableList ? (MutableList<E>) list : ListAdapter.adapt(list); return new SynchronizedMutableList<>(mutableList); } | /**
* This method will take a MutableList and wrap it directly in a SynchronizedMutableList. It will
* take any other non-GS-collection and first adapt it will a ListAdapter, and then return a
* SynchronizedMutableList that wraps the adapter.
*/ | This method will take a MutableList and wrap it directly in a SynchronizedMutableList. It will take any other non-GS-collection and first adapt it will a ListAdapter, and then return a SynchronizedMutableList that wraps the adapter | of | {
"repo_name": "g-votte/eclipse-collections",
"path": "eclipse-collections/src/main/java/org/eclipse/collections/impl/list/mutable/SynchronizedMutableList.java",
"license": "bsd-3-clause",
"size": 21538
} | [
"java.util.List",
"org.eclipse.collections.api.list.MutableList"
] | import java.util.List; import org.eclipse.collections.api.list.MutableList; | import java.util.*; import org.eclipse.collections.api.list.*; | [
"java.util",
"org.eclipse.collections"
] | java.util; org.eclipse.collections; | 1,816,093 |
T evaluate(Identifier identifier); | T evaluate(Identifier identifier); | /**
* Evaluate an {@link Identifier} node.
*
* @param identifier the node to evaluate
* @return the evaluation result
*/ | Evaluate an <code>Identifier</code> node | evaluate | {
"repo_name": "Nimco/sling",
"path": "bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/expression/NodeVisitor.java",
"license": "apache-2.0",
"size": 4740
} | [
"org.apache.sling.scripting.sightly.compiler.expression.nodes.Identifier"
] | import org.apache.sling.scripting.sightly.compiler.expression.nodes.Identifier; | import org.apache.sling.scripting.sightly.compiler.expression.nodes.*; | [
"org.apache.sling"
] | org.apache.sling; | 25,370 |
@Test
public void retrievesAndCachesCloudWatchStats() {
final long sum = 10;
final CloudWatch cloudwatch = this.cloudWatch();
final GetMetricStatisticsResult result = new GetMetricStatisticsResult()
.withDatapoints(new Datapoint().withSum(Double.valueOf(sum)));
Mockit... | void function() { final long sum = 10; final CloudWatch cloudwatch = this.cloudWatch(); final GetMetricStatisticsResult result = new GetMetricStatisticsResult() .withDatapoints(new Datapoint().withSum(Double.valueOf(sum))); Mockito.doReturn(result).when(cloudwatch.get()) .getMetricStatistics(Mockito.any(GetMetricStatis... | /**
* DefaultHost can retrieve Cloudwatch stats and cache the results.
*/ | DefaultHost can retrieve Cloudwatch stats and cache the results | retrievesAndCachesCloudWatchStats | {
"repo_name": "jpetazzo/s3auth",
"path": "s3auth-hosts/src/test/java/com/s3auth/hosts/DefaultHostTest.java",
"license": "bsd-3-clause",
"size": 16418
} | [
"com.amazonaws.services.cloudwatch.model.Datapoint",
"com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest",
"com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult",
"com.s3auth.hosts.Host",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.mockito.Mockito"
] | import com.amazonaws.services.cloudwatch.model.Datapoint; import com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest; import com.amazonaws.services.cloudwatch.model.GetMetricStatisticsResult; import com.s3auth.hosts.Host; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.mockito... | import com.amazonaws.services.cloudwatch.model.*; import com.s3auth.hosts.*; import org.hamcrest.*; import org.mockito.*; | [
"com.amazonaws.services",
"com.s3auth.hosts",
"org.hamcrest",
"org.mockito"
] | com.amazonaws.services; com.s3auth.hosts; org.hamcrest; org.mockito; | 1,035,968 |
public RSocketConnector setupPayload(Payload payload) {
if (payload instanceof DefaultPayload) {
this.setupPayloadMono = Mono.just(payload);
} else {
this.setupPayloadMono = Mono.just(DefaultPayload.create(Objects.requireNonNull(payload)));
payload.release();
}
return this;
} | RSocketConnector function(Payload payload) { if (payload instanceof DefaultPayload) { this.setupPayloadMono = Mono.just(payload); } else { this.setupPayloadMono = Mono.just(DefaultPayload.create(Objects.requireNonNull(payload))); payload.release(); } return this; } | /**
* Variant of {@link #setupPayload(Mono)} that accepts a {@code Payload} instance.
*
* <p>Note: if the given payload is {@link io.rsocket.util.ByteBufPayload}, it is copied to a
* {@link DefaultPayload} and released immediately. This ensures it can re-used to obtain a
* connection more than once.
*... | Variant of <code>#setupPayload(Mono)</code> that accepts a Payload instance. Note: if the given payload is <code>io.rsocket.util.ByteBufPayload</code>, it is copied to a <code>DefaultPayload</code> and released immediately. This ensures it can re-used to obtain a connection more than once | setupPayload | {
"repo_name": "rsocket/rsocket-java",
"path": "rsocket-core/src/main/java/io/rsocket/core/RSocketConnector.java",
"license": "apache-2.0",
"size": 32272
} | [
"io.rsocket.Payload",
"io.rsocket.util.DefaultPayload",
"java.util.Objects"
] | import io.rsocket.Payload; import io.rsocket.util.DefaultPayload; import java.util.Objects; | import io.rsocket.*; import io.rsocket.util.*; import java.util.*; | [
"io.rsocket",
"io.rsocket.util",
"java.util"
] | io.rsocket; io.rsocket.util; java.util; | 1,655,122 |
public void notifyListeners(List<StorageSourceNotification> notifications); | void function(List<StorageSourceNotification> notifications); | /** This is logically a private method and should not be called by
* clients of this interface.
* @param notifications the notifications to dispatch
*/ | This is logically a private method and should not be called by clients of this interface | notifyListeners | {
"repo_name": "zhenshengcai/floodlight-hardware",
"path": "src/main/java/net/floodlightcontroller/storage/IStorageSourceService.java",
"license": "apache-2.0",
"size": 12885
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,455,426 |
public static String getDayName(Context context, long dateInMillis) {
// If the date is today, return the localized version of "Today" instead the actual
// day name.
Time t = new Time();
t.setToNow();
int julianDay = Time.getJulianDay(dateInMillis, t.gmtoff);
int cu... | static String function(Context context, long dateInMillis) { Time t = new Time(); t.setToNow(); int julianDay = Time.getJulianDay(dateInMillis, t.gmtoff); int currentJulianDay = Time.getJulianDay(System.currentTimeMillis(), t.gmtoff); if (julianDay == currentJulianDay) { return context.getString(R.string.today); } else... | /**
* Given a day, returns just the name to use for that day.
* E.g "today", "tomorrow", "wednesday".
*
* @param context Context to use for resource localization.
* @param dateInMillis The date in milliseconds.
* @return
*/ | Given a day, returns just the name to use for that day. E.g "today", "tomorrow", "wednesday" | getDayName | {
"repo_name": "francisrod01/udacity-android-sunshine-app",
"path": "app/src/main/java/com/example/android/sunshine/app/Utility.java",
"license": "apache-2.0",
"size": 10261
} | [
"android.content.Context",
"android.text.format.Time",
"java.text.SimpleDateFormat"
] | import android.content.Context; import android.text.format.Time; import java.text.SimpleDateFormat; | import android.content.*; import android.text.format.*; import java.text.*; | [
"android.content",
"android.text",
"java.text"
] | android.content; android.text; java.text; | 74,994 |
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case MENU_ITEM_CLEAR_MAP:
if (mMyLocationOverlay != null) {
stopMyLocation();
mOverlayManager.removeOverlay(mMyLocationOverlay);
... | boolean function(MenuItem item) { switch (item.getItemId()) { case MENU_ITEM_CLEAR_MAP: if (mMyLocationOverlay != null) { stopMyLocation(); mOverlayManager.removeOverlay(mMyLocationOverlay); } mMapController.setMapViewMode(NMapView.VIEW_MODE_VECTOR); mMapController.setMapViewTrafficMode(false); mMapController.setMapVie... | /**
* Invoked when the user selects an item from the Menu.
*
* @param item the Menu entry which was selected
* @return true if the Menu item was legit (and we consumed it), false
* otherwise
*/ | Invoked when the user selects an item from the Menu | onOptionsItemSelected | {
"repo_name": "SongJongMun/OSS_PBVelo",
"path": "Application(Android)/Velo/app/src/main/java/com/tekinarslan/material/sample/NMapViewer.java",
"license": "mit",
"size": 28962
} | [
"android.content.Context",
"android.view.MenuItem",
"android.view.ViewGroup",
"com.nhn.android.maps.NMapView"
] | import android.content.Context; import android.view.MenuItem; import android.view.ViewGroup; import com.nhn.android.maps.NMapView; | import android.content.*; import android.view.*; import com.nhn.android.maps.*; | [
"android.content",
"android.view",
"com.nhn.android"
] | android.content; android.view; com.nhn.android; | 1,628,703 |
public void assertErrorsOnLines(String file,
List<Diagnostic<? extends JavaFileObject>> diagnostics, long... lines) {
ListMultimap<String, Long> actualErrors = ArrayListMultimap.create();
for (Diagnostic<? extends JavaFileObject> diagnostic : diagnostics) {
String message = diagnostic.getMessage(L... | void function(String file, List<Diagnostic<? extends JavaFileObject>> diagnostics, long... lines) { ListMultimap<String, Long> actualErrors = ArrayListMultimap.create(); for (Diagnostic<? extends JavaFileObject> diagnostic : diagnostics) { String message = diagnostic.getMessage(Locale.US); assertNotNull(message, diagno... | /**
* Asserts that the given diagnostics contain errors with a message containing "[CheckerName]"
* on the given lines of the given file. If there should be multiple errors on a line, the line
* number must appear multiple times. There may not be any errors in any other file.
*/ | Asserts that the given diagnostics contain errors with a message containing "[CheckerName]" on the given lines of the given file. If there should be multiple errors on a line, the line number must appear multiple times. There may not be any errors in any other file | assertErrorsOnLines | {
"repo_name": "google/guava-beta-checker",
"path": "src/test/java/com/google/common/annotations/checkers/TestCompiler.java",
"license": "apache-2.0",
"size": 4657
} | [
"com.google.common.collect.ArrayListMultimap",
"com.google.common.collect.ImmutableMultiset",
"com.google.common.collect.ListMultimap",
"com.google.common.primitives.Longs",
"com.google.common.truth.Truth",
"com.google.errorprone.BugCheckerInfo",
"java.util.List",
"java.util.Locale",
"javax.tools.Di... | import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableMultiset; import com.google.common.collect.ListMultimap; import com.google.common.primitives.Longs; import com.google.common.truth.Truth; import com.google.errorprone.BugCheckerInfo; import java.util.List; import java.util.Loc... | import com.google.common.collect.*; import com.google.common.primitives.*; import com.google.common.truth.*; import com.google.errorprone.*; import java.util.*; import javax.tools.*; import org.junit.*; | [
"com.google.common",
"com.google.errorprone",
"java.util",
"javax.tools",
"org.junit"
] | com.google.common; com.google.errorprone; java.util; javax.tools; org.junit; | 1,103,510 |
private void computeSuperior( ObjectClass objectClass ) throws LdapException
{
List<ObjectClass> ocSuperiors = new ArrayList<>();
superiors.put( objectClass.getOid(), ocSuperiors );
computeOCSuperiors( objectClass, ocSuperiors, new HashSet<String>() );
Set<String> atSeen = new... | void function( ObjectClass objectClass ) throws LdapException { List<ObjectClass> ocSuperiors = new ArrayList<>(); superiors.put( objectClass.getOid(), ocSuperiors ); computeOCSuperiors( objectClass, ocSuperiors, new HashSet<String>() ); Set<String> atSeen = new HashSet<>(); computeMustAttributes( objectClass, atSeen )... | /**
* Compute the superiors and MUST/MAY attributes for a specific
* ObjectClass
*/ | Compute the superiors and MUST/MAY attributes for a specific ObjectClass | computeSuperior | {
"repo_name": "TremoloSecurity/MyVirtualDirectory",
"path": "src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java",
"license": "apache-2.0",
"size": 70193
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.directory.api.ldap.model.exception.LdapException",
"org.apache.directory.api.ldap.model.schema.ObjectClass"
] | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.schema.ObjectClass; | import java.util.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.schema.*; | [
"java.util",
"org.apache.directory"
] | java.util; org.apache.directory; | 609,139 |
private void isFinished(ServletOutputStream stream) throws IOException {
stream.print("<html>\n\t<head>\n\t\t<title>Finished!</title>\n\t</head>\n\t<body>");
stream.print("The document is finished:<form method=\"POST\"><input type=\"Submit\" value=\"Get PDF\"></form>\n\t</body>\n</html>");
} | void function(ServletOutputStream stream) throws IOException { stream.print(STR); stream.print(STRPOST\STRSubmit\STRGet PDF\STR); } | /**
* Sends an HTML form to the browser to get the PDF
* @param stream the outputstream of the servlet
* @throws IOException
*/ | Sends an HTML form to the browser to get the PDF | isFinished | {
"repo_name": "yogthos/itext",
"path": "www/examples/com/lowagie/examples/general/webapp/ProgressServlet.java",
"license": "lgpl-3.0",
"size": 6429
} | [
"java.io.IOException",
"javax.servlet.ServletOutputStream"
] | import java.io.IOException; import javax.servlet.ServletOutputStream; | import java.io.*; import javax.servlet.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 501,610 |
protected void assertLabelsVisitedWithErrors(
Set<String> expectedLabels, Set<String> startingLabels) throws Exception {
assertLabelsVisited(expectedLabels, startingLabels, EXPECT_ERROR, KEEP_GOING);
} | void function( Set<String> expectedLabels, Set<String> startingLabels) throws Exception { assertLabelsVisited(expectedLabels, startingLabels, EXPECT_ERROR, KEEP_GOING); } | /**
* Asserts all labels in expectedLabels are visited by walking
* the dependency trees starting at startingLabels, and no other labels are visited.
*
* <p>Errors are expected. We keep going after errors are encountered.
*/ | Asserts all labels in expectedLabels are visited by walking the dependency trees starting at startingLabels, and no other labels are visited. Errors are expected. We keep going after errors are encountered | assertLabelsVisitedWithErrors | {
"repo_name": "anupcshan/bazel",
"path": "src/test/java/com/google/devtools/build/lib/skyframe/SkyframeLabelVisitorTestCase.java",
"license": "apache-2.0",
"size": 12469
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,374,894 |
List<String> buildArguments(); | List<String> buildArguments(); | /**
* Build a list of command line arguments for this input.
*
* @return list of command line arguments
*/ | Build a list of command line arguments for this input | buildArguments | {
"repo_name": "kokorin/Jaffree",
"path": "src/main/java/com/github/kokorin/jaffree/ffmpeg/Input.java",
"license": "apache-2.0",
"size": 1336
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,167,593 |
@Override
protected int compareRowKey(final Cell l, final Cell r) {
byte[] left = l.getRowArray();
int loffset = l.getRowOffset();
int llength = l.getRowLength();
byte[] right = r.getRowArray();
int roffset = r.getRowOffset();
int rlength = r.getRowLength();
return comp... | int function(final Cell l, final Cell r) { byte[] left = l.getRowArray(); int loffset = l.getRowOffset(); int llength = l.getRowLength(); byte[] right = r.getRowArray(); int roffset = r.getRowOffset(); int rlength = r.getRowLength(); return compareRows(left, loffset, llength, right, roffset, rlength); } } public static... | /**
* Override the row key comparison to parse and compare the meta row key parts.
*/ | Override the row key comparison to parse and compare the meta row key parts | compareRowKey | {
"repo_name": "narendragoyal/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java",
"license": "apache-2.0",
"size": 98078
} | [
"org.apache.hadoop.io.RawComparator"
] | import org.apache.hadoop.io.RawComparator; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 731,762 |
public Rectangle2D getPrimitiveBounds() {
if (image == null)
return null;
return image.getBounds2D();
} | Rectangle2D function() { if (image == null) return null; return image.getBounds2D(); } | /**
* Returns the bounds of the area covered by this node's primitive paint.
*/ | Returns the bounds of the area covered by this node's primitive paint | getPrimitiveBounds | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/gvt/RasterImageNode.java",
"license": "apache-2.0",
"size": 4228
} | [
"java.awt.geom.Rectangle2D"
] | import java.awt.geom.Rectangle2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,385,107 |
public MarkerField[] getAllFields() {
return allFields;
} | MarkerField[] function() { return allFields; } | /**
* Get the all of the fields that this content generator is using.
*
* @return {@link MarkerField}[]
*/ | Get the all of the fields that this content generator is using | getAllFields | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ContentGeneratorDescriptor.java",
"license": "epl-1.0",
"size": 9271
} | [
"org.eclipse.ui.views.markers.MarkerField"
] | import org.eclipse.ui.views.markers.MarkerField; | import org.eclipse.ui.views.markers.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 2,484,879 |
@Idempotent
Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
throws IOException; | Token<DelegationTokenIdentifier> getDelegationToken(Text renewer) throws IOException; | /**
* Get a valid Delegation Token.
*
* @param renewer the designated renewer for the token
* @return Token<DelegationTokenIdentifier>
* @throws IOException
*/ | Get a valid Delegation Token | getDelegationToken | {
"repo_name": "Ethanlm/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 63582
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.security.token.Token"
] | import java.io.IOException; import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; import org.apache.hadoop.io.Text; import org.apache.hadoop.security.token.Token; | import java.io.*; import org.apache.hadoop.hdfs.security.token.delegation.*; import org.apache.hadoop.io.*; import org.apache.hadoop.security.token.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,460,643 |
TestBase.createCaller().init().test();
} | TestBase.createCaller().init().test(); } | /**
* Run just this test.
*
* @param a ignored
*/ | Run just this test | main | {
"repo_name": "paulnguyen/data",
"path": "sqldbs/h2java/src/test/org/h2/test/db/TestMemoryUsage.java",
"license": "apache-2.0",
"size": 9346
} | [
"org.h2.test.TestBase"
] | import org.h2.test.TestBase; | import org.h2.test.*; | [
"org.h2.test"
] | org.h2.test; | 2,198,891 |
public static void runOpenTriggers(Locker locker,
DatabaseImpl dbImpl,
final boolean isNew) {
runTriggers(dbImpl, locker, new TriggerInvoker(isNew) { | static void function(Locker locker, DatabaseImpl dbImpl, final boolean isNew) { runTriggers(dbImpl, locker, new TriggerInvoker(isNew) { | /**
* Invokes the trigger methods associated with the opening of a database.
*/ | Invokes the trigger methods associated with the opening of a database | runOpenTriggers | {
"repo_name": "prat0318/dbms",
"path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/dbi/TriggerManager.java",
"license": "mit",
"size": 15438
} | [
"com.sleepycat.je.txn.Locker"
] | import com.sleepycat.je.txn.Locker; | import com.sleepycat.je.txn.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 2,281,975 |
public void updatePredictions(List<IpcPrediction> oldPredictionsForVehicle,
List<IpcPrediction> newPredictionsForVehicle) {
// Handle null being passed in for newPredictionsForVehicle
if (newPredictionsForVehicle == null)
newPredictionsForVehicle = new ArrayList<IpcPrediction>();
// Can have several p... | void function(List<IpcPrediction> oldPredictionsForVehicle, List<IpcPrediction> newPredictionsForVehicle) { if (newPredictionsForVehicle == null) newPredictionsForVehicle = new ArrayList<IpcPrediction>(); Map<MapKey, List<IpcPrediction>> newPredsForVehicleByRouteStopDestMap = new HashMap<MapKey, List<IpcPrediction>>();... | /**
* Updates predictions in the cache that are associated with a vehicle.
* Removes any that are in oldPredictionsForVehicle and adds all the ones in
* newPredictionsForVehicle.
*
* @param oldPredictionsForVehicle
* The old predictions to be removed.
* @param newPredictionsForVehicle
* ... | Updates predictions in the cache that are associated with a vehicle. Removes any that are in oldPredictionsForVehicle and adds all the ones in newPredictionsForVehicle | updatePredictions | {
"repo_name": "TheTransitClock/transitime",
"path": "transitclock/src/main/java/org/transitclock/core/dataCache/PredictionDataCache.java",
"license": "gpl-3.0",
"size": 30827
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.transitclock.ipc.data.IpcPrediction",
"org.transitclock.utils.MapKey"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.transitclock.ipc.data.IpcPrediction; import org.transitclock.utils.MapKey; | import java.util.*; import org.transitclock.ipc.data.*; import org.transitclock.utils.*; | [
"java.util",
"org.transitclock.ipc",
"org.transitclock.utils"
] | java.util; org.transitclock.ipc; org.transitclock.utils; | 2,516,502 |
private void require(String delim) throws SAXException, IOException {
int length = delim.length();
char[] ch;
if (length < dataBuffer.length) {
ch = dataBuffer;
delim.getChars(0, length, ch, 0);
} else {
ch = delim.toCharArray();
}
... | void function(String delim) throws SAXException, IOException { int length = delim.length(); char[] ch; if (length < dataBuffer.length) { ch = dataBuffer; delim.getChars(0, length, ch, 0); } else { ch = delim.toCharArray(); } for (int i = 0; i < length; i++) { require(ch[i]); } } | /**
* Require a string to appear, or throw an exception.
* <p>
* <em>Precondition:</em> Entity expansion is not required.
* <p>
* <em>Precondition:</em> data buffer has no characters that will get sent
* to the application.
*/ | Require a string to appear, or throw an exception. Precondition: Entity expansion is not required. Precondition: data buffer has no characters that will get sent to the application | require | {
"repo_name": "takenspc/validator",
"path": "src/nu/validator/gnu/xml/aelfred2/XmlParser.java",
"license": "mit",
"size": 156412
} | [
"java.io.IOException",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 1,175,275 |
public static <T> void assertSimilars(T[] expectedObjects, T[] actual, Supplier<String> message) {
if (expectedObjects == actual) {
return;
}
if ((arrayContainsAll(expectedObjects, actual)) && (arrayContainsAll(actual, expectedObjects))) {
return;
}
fail(formatFailMessage(message, expectedObjects, ac... | static <T> void function(T[] expectedObjects, T[] actual, Supplier<String> message) { if (expectedObjects == actual) { return; } if ((arrayContainsAll(expectedObjects, actual)) && (arrayContainsAll(actual, expectedObjects))) { return; } fail(formatFailMessage(message, expectedObjects, actual)); } | /** Asserts that the actual similar is equal to one of the expected objects. If not
* an AssertionFailedError is thrown.
*
* @param <T> is the type of the values
* @param expectedObjects are the expected values during the unit test.
* @param actual are the actual values of the objects during the unit test.
... | Asserts that the actual similar is equal to one of the expected objects. If not an AssertionFailedError is thrown | assertSimilars | {
"repo_name": "gallandarakhneorg/afc",
"path": "core/testtools/src/main/java/org/arakhne/afc/testtools/AbstractTestCase.java",
"license": "apache-2.0",
"size": 63962
} | [
"java.util.function.Supplier",
"org.junit.jupiter.api.Assertions"
] | import java.util.function.Supplier; import org.junit.jupiter.api.Assertions; | import java.util.function.*; import org.junit.jupiter.api.*; | [
"java.util",
"org.junit.jupiter"
] | java.util; org.junit.jupiter; | 1,255,291 |
protected Logger getLogger() {
return log;
} | Logger function() { return log; } | /**
* Get the Logger for the derived class so log messages
* show up on the correct class
*/ | Get the Logger for the derived class so log messages show up on the correct class | getLogger | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/monitoring/satcluster/SatClusterFactory.java",
"license": "gpl-2.0",
"size": 7958
} | [
"org.apache.log4j.Logger"
] | import org.apache.log4j.Logger; | import org.apache.log4j.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 2,204,185 |
public void testGetCriteriaReader() {
String st = "test string";
byte[] criteriaFile = st.getBytes();
simpleStudy.setCriteriaFile(criteriaFile);
assertNotNull("criteriaReader found", simpleStudy.getCriteriaReader());
assertEquals("criteriaReader instance of Reader", true, simpleStudy
.getCriteria... | void function() { String st = STR; byte[] criteriaFile = st.getBytes(); simpleStudy.setCriteriaFile(criteriaFile); assertNotNull(STR, simpleStudy.getCriteriaReader()); assertEquals(STR, true, simpleStudy .getCriteriaReader() instanceof Reader); } | /**
* test get criteria reader
*/ | test get criteria reader | testGetCriteriaReader | {
"repo_name": "NCIP/c3pr",
"path": "codebase/projects/core/test/src/java/edu/duke/cabig/c3pr/domain/StudyTestCase.java",
"license": "bsd-3-clause",
"size": 75546
} | [
"java.io.Reader"
] | import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 36,065 |
public @Nonnegative int strictCountBuildableItemsFor(@CheckForNull Label l) {
Snapshot _snapshot = this.snapshot;
int r = 0;
for (BuildableItem bi : _snapshot.buildables)
for (SubTask st : bi.task.getSubTasks())
if (bi.getAssignedLabelFor(st) == l)
... | @Nonnegative int function(@CheckForNull Label l) { Snapshot _snapshot = this.snapshot; int r = 0; for (BuildableItem bi : _snapshot.buildables) for (SubTask st : bi.task.getSubTasks()) if (bi.getAssignedLabelFor(st) == l) r++; for (BuildableItem bi : _snapshot.pendings) for (SubTask st : bi.task.getSubTasks()) if (bi.g... | /**
* How many {@link BuildableItem}s are assigned for the given label?
* <p/>
* The implementation is quite similar to {@link #countBuildableItemsFor(hudson.model.Label)},
* but it has another behavior for null parameters.
* @param l Label to be checked. If null, only jobs without assigned lab... | How many <code>BuildableItem</code>s are assigned for the given label? The implementation is quite similar to <code>#countBuildableItemsFor(hudson.model.Label)</code>, but it has another behavior for null parameters | strictCountBuildableItemsFor | {
"repo_name": "1and1/jenkins",
"path": "core/src/main/java/hudson/model/Queue.java",
"license": "mit",
"size": 97663
} | [
"hudson.model.queue.SubTask",
"javax.annotation.CheckForNull",
"javax.annotation.Nonnegative"
] | import hudson.model.queue.SubTask; import javax.annotation.CheckForNull; import javax.annotation.Nonnegative; | import hudson.model.queue.*; import javax.annotation.*; | [
"hudson.model.queue",
"javax.annotation"
] | hudson.model.queue; javax.annotation; | 758,524 |
private static boolean constructListOfConstraintSetsFromGeometry(
final Geometry geometry,
final List<ConstraintSet> destinationListOfSets,
final boolean checkTopoEquality) {
// Get the envelope of the geometry being held
final int n = geometry.getNumGeometries();
boolean retVal = true;... | static boolean function( final Geometry geometry, final List<ConstraintSet> destinationListOfSets, final boolean checkTopoEquality) { final int n = geometry.getNumGeometries(); boolean retVal = true; if (n > 1) { retVal = false; for (int gi = 0; gi < n; gi++) { constructListOfConstraintSetsFromGeometry( geometry.getGeo... | /**
* Recursively decompose geometry into a set of envelopes to create a single set.
*
* @param geometry
* @param destinationListOfSets
* @param checkTopoEquality
*/ | Recursively decompose geometry into a set of envelopes to create a single set | constructListOfConstraintSetsFromGeometry | {
"repo_name": "spohnan/geowave",
"path": "core/geotime/src/main/java/org/locationtech/geowave/core/geotime/util/GeometryUtils.java",
"license": "apache-2.0",
"size": 33870
} | [
"java.util.List",
"org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass",
"org.locationtech.jts.geom.Envelope",
"org.locationtech.jts.geom.Geometry",
"org.locationtech.jts.geom.GeometryFactory"
] | import java.util.List; import org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass; import org.locationtech.jts.geom.Envelope; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; | import java.util.*; import org.locationtech.geowave.core.store.query.constraints.*; import org.locationtech.jts.geom.*; | [
"java.util",
"org.locationtech.geowave",
"org.locationtech.jts"
] | java.util; org.locationtech.geowave; org.locationtech.jts; | 1,804,118 |
public final void parse( Reader reader ) throws IOException, ParsingException
{
if ( reader instanceof BufferedReader )
parseImpl( (BufferedReader)reader );
else
parseImpl( new BufferedReader ( reader ) );
}
| final void function( Reader reader ) throws IOException, ParsingException { if ( reader instanceof BufferedReader ) parseImpl( (BufferedReader)reader ); else parseImpl( new BufferedReader ( reader ) ); } | /**
* Parses the given file.
*
* @param reader
*
* @throws IOException
* @throws ParsingException
*/ | Parses the given file | parse | {
"repo_name": "CTDP/TGM-Utils",
"path": "src/net/ctdp/tgmutils/io/AbstractIniParser.java",
"license": "mit",
"size": 9493
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.Reader"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 486,787 |
public void testNullTag(){
getParameterTableFor("INPUT type=");
assertEquals("Name of Tag","INPUT",((Attribute)(attributes.elementAt (0))).getName ());
assertNull("Type",((Attribute)(attributes.elementAt (2))).getValue ());
}
| void function(){ getParameterTableFor(STR); assertEquals(STR,"INPUT",((Attribute)(attributes.elementAt (0))).getName ()); assertNull("Type",((Attribute)(attributes.elementAt (2))).getValue ()); } | /**
* Test empty attribute.
*/ | Test empty attribute | testNullTag | {
"repo_name": "socialwareinc/html-parser",
"path": "parser/src/test/java/org/htmlparser/tests/lexerTests/AttributeTests.java",
"license": "lgpl-3.0",
"size": 37178
} | [
"org.htmlparser.Attribute"
] | import org.htmlparser.Attribute; | import org.htmlparser.*; | [
"org.htmlparser"
] | org.htmlparser; | 2,466,361 |
CamelEvent createServiceStartupFailureEvent(CamelContext context, Object service, Throwable cause); | CamelEvent createServiceStartupFailureEvent(CamelContext context, Object service, Throwable cause); | /**
* Creates an {@link CamelEvent} for a Service failed to start cleanly
*
* @param context camel context
* @param service the service
* @param cause the cause exception
* @return the created event
*/ | Creates an <code>CamelEvent</code> for a Service failed to start cleanly | createServiceStartupFailureEvent | {
"repo_name": "adessaigne/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/spi/EventFactory.java",
"license": "apache-2.0",
"size": 11875
} | [
"org.apache.camel.CamelContext"
] | import org.apache.camel.CamelContext; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,653,523 |
public Builder add(final String acceptLanguageList) {
final String[] items = languageSplitter.split(acceptLanguageList.trim());
final Matcher itemMatcher = weightSplitter.matcher("");
for (final String item : items) {
if (itemMatcher.reset(item).matches()) {
... | Builder function(final String acceptLanguageList) { final String[] items = languageSplitter.split(acceptLanguageList.trim()); final Matcher itemMatcher = weightSplitter.matcher(STRIllegal weight, must be 0..1: " + weight); } add(language, weight); } else if (item.length() != 0) { add(new ULocale(item)); } } return this... | /**
* Adds rfc2616 list.
*
* @param acceptLanguageList in rfc2616 format
* @return this, for chaining.
*/ | Adds rfc2616 list | add | {
"repo_name": "mirego/j2objc",
"path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocalePriorityList.java",
"license": "apache-2.0",
"size": 12336
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,010,563 |
static String replaceSubstitution(String base, Pattern from, String to,
boolean repeat) {
Matcher match = from.matcher(base);
if (repeat) {
return match.replaceAll(to);
} else {
return match.replaceFirst(to);
}
}
... | static String replaceSubstitution(String base, Pattern from, String to, boolean repeat) { Matcher match = from.matcher(base); if (repeat) { return match.replaceAll(to); } else { return match.replaceFirst(to); } } /** * Try to apply this rule to the given name represented as a parameter * array. * @param params first el... | /**
* Replace the matches of the from pattern in the base string with the value
* of the to string.
* @param base the string to transform
* @param from the pattern to look for in the base string
* @param to the string to replace matches of the pattern with
* @param repeat whether the subst... | Replace the matches of the from pattern in the base string with the value of the to string | replaceSubstitution | {
"repo_name": "lemonJun/Jkafka",
"path": "jkafka-core/src/main/java/org/apache/kafka/common/security/kerberos/KerberosRule.java",
"license": "apache-2.0",
"size": 6882
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,050,346 |
public void testModifyBannerWrongTypeError() throws MalformedURLException {
Map<String, Object> struct = new HashMap<String, Object>();
struct.put(BANNER_ID, bannerId);
Object[] params = new Object[] { sessionId, struct };
struct.put(CAMPAIGN_ID, TextUtils.NOT_INTEGER);
executeModifyBannerWithError(params... | void function() throws MalformedURLException { Map<String, Object> struct = new HashMap<String, Object>(); struct.put(BANNER_ID, bannerId); Object[] params = new Object[] { sessionId, struct }; struct.put(CAMPAIGN_ID, TextUtils.NOT_INTEGER); executeModifyBannerWithError(params, ErrorMessage.getMessage( ErrorMessage.FIE... | /**
* Test method with fields that has value of wrong type (error).
*
* @throws MalformedURLException
*/ | Test method with fields that has value of wrong type (error) | testModifyBannerWrongTypeError | {
"repo_name": "adqio/revive-adserver",
"path": "www/api/v2/xmlrpc/tests/unit/src/test/java/org/openx/banner/TestModifyBanner.java",
"license": "gpl-2.0",
"size": 8272
} | [
"java.net.MalformedURLException",
"java.util.HashMap",
"java.util.Map",
"org.openx.utils.ErrorMessage",
"org.openx.utils.TextUtils"
] | import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import org.openx.utils.ErrorMessage; import org.openx.utils.TextUtils; | import java.net.*; import java.util.*; import org.openx.utils.*; | [
"java.net",
"java.util",
"org.openx.utils"
] | java.net; java.util; org.openx.utils; | 1,811,119 |
public static double sumAbs(Long2DoubleMap v) {
double sum = 0;
DoubleIterator iter = v.values().iterator();
while (iter.hasNext()) {
sum += Math.abs(iter.nextDouble());
}
return sum;
} | static double function(Long2DoubleMap v) { double sum = 0; DoubleIterator iter = v.values().iterator(); while (iter.hasNext()) { sum += Math.abs(iter.nextDouble()); } return sum; } | /**
* Compute the sum of the elements of a map.
* @param v The vector
* @return The sum of the values of {@code v}.
*/ | Compute the sum of the elements of a map | sumAbs | {
"repo_name": "blankazucenalg/lenskit",
"path": "lenskit-core/src/main/java/org/lenskit/util/math/Vectors.java",
"license": "lgpl-2.1",
"size": 7725
} | [
"it.unimi.dsi.fastutil.doubles.DoubleIterator",
"it.unimi.dsi.fastutil.longs.Long2DoubleMap"
] | import it.unimi.dsi.fastutil.doubles.DoubleIterator; import it.unimi.dsi.fastutil.longs.Long2DoubleMap; | import it.unimi.dsi.fastutil.doubles.*; import it.unimi.dsi.fastutil.longs.*; | [
"it.unimi.dsi"
] | it.unimi.dsi; | 1,270,649 |
void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException; | void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException; | /**
* Check for validity of the output-specification for the job.
*
* <p>This is to validate the output specification for the job when it is
* a job is submitted. Typically checks that it does not already exist,
* throwing an exception when it already exists, so that output is not
* overwritten.</... | Check for validity of the output-specification for the job. This is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten | checkOutputSpecs | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/OutputFormat.java",
"license": "apache-2.0",
"size": 2834
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,660,835 |
public Rule getRule()
{
return rule;
}
| Rule function() { return rule; } | /**
* Return the rule
*
* @return rule
*/ | Return the rule | getRule | {
"repo_name": "Tybion/community-edition",
"path": "projects/remote-api/source/java/org/alfresco/repo/web/scripts/rule/ruleset/RuleRef.java",
"license": "lgpl-3.0",
"size": 2127
} | [
"org.alfresco.service.cmr.rule.Rule"
] | import org.alfresco.service.cmr.rule.Rule; | import org.alfresco.service.cmr.rule.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 721,648 |
public void testConstructor_InetAddressIInetAddressI() throws Exception {
int sport = startServer("Cons InetAddress,I,InetAddress,I");
SSLSocket ssl = getSSLSocket(InetAddress.getLocalHost(), sport,
InetAddress.getLocalHost(), 0);
assertNotNull(ssl);
... | void function() throws Exception { int sport = startServer(STR); SSLSocket ssl = getSSLSocket(InetAddress.getLocalHost(), sport, InetAddress.getLocalHost(), 0); assertNotNull(ssl); assertEquals(sport, ssl.getPort()); ssl.close(); try { getSSLSocket(InetAddress.getLocalHost(), 8081, InetAddress.getLocalHost(), 8082); fa... | /**
* javax.net.ssl.SSLSocket#SSLSocket(InetAddress address, int port,
* InetAddress clientAddress, int clientPort)
*/ | javax.net.ssl.SSLSocket#SSLSocket(InetAddress address, int port, InetAddress clientAddress, int clientPort) | testConstructor_InetAddressIInetAddressI | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "libcore/luni/src/test/java/tests/api/javax/net/ssl/SSLSocketTest.java",
"license": "gpl-2.0",
"size": 24839
} | [
"java.io.IOException",
"java.net.InetAddress",
"javax.net.ssl.SSLSocket"
] | import java.io.IOException; import java.net.InetAddress; import javax.net.ssl.SSLSocket; | import java.io.*; import java.net.*; import javax.net.ssl.*; | [
"java.io",
"java.net",
"javax.net"
] | java.io; java.net; javax.net; | 2,781,965 |
public static MozuClient deleteExtraValueLocalizedDeltaPriceClient(com.mozu.api.DataViewMode dataViewMode, String productCode, String attributeFQN, String value, String currencyCode) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductExtraUrl.deleteExtraValueLocalizedDeltaPr... | static MozuClient function(com.mozu.api.DataViewMode dataViewMode, String productCode, String attributeFQN, String value, String currencyCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductExtraUrl.deleteExtraValueLocalizedDeltaPriceUrl(attributeFQN, currencyCode, productCode... | /**
* Deletes the localized delta price value for a product extra. Localized delta prices are deltas between two differing monetary conversion amounts between countries, such as US Dollar vs Euro.
* <p><pre><code>
* MozuClient mozuClient=DeleteExtraValueLocalizedDeltaPriceClient(dataViewMode, productCode, attri... | Deletes the localized delta price value for a product extra. Localized delta prices are deltas between two differing monetary conversion amounts between countries, such as US Dollar vs Euro. <code><code> MozuClient mozuClient=DeleteExtraValueLocalizedDeltaPriceClient(dataViewMode, productCode, attributeFQN, value, curr... | deleteExtraValueLocalizedDeltaPriceClient | {
"repo_name": "bhewett/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/products/ProductExtraClient.java",
"license": "mit",
"size": 30711
} | [
"com.mozu.api.DataViewMode",
"com.mozu.api.Headers",
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 98,827 |
public ServiceFuture<RemediationInner> cancelAtManagementGroupAsync(String managementGroupId, String remediationName, final ServiceCallback<RemediationInner> serviceCallback) {
return ServiceFuture.fromResponse(cancelAtManagementGroupWithServiceResponseAsync(managementGroupId, remediationName), serviceCallb... | ServiceFuture<RemediationInner> function(String managementGroupId, String remediationName, final ServiceCallback<RemediationInner> serviceCallback) { return ServiceFuture.fromResponse(cancelAtManagementGroupWithServiceResponseAsync(managementGroupId, remediationName), serviceCallback); } | /**
* Cancels a remediation at management group scope.
*
* @param managementGroupId Management group ID.
* @param remediationName The name of the remediation.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException th... | Cancels a remediation at management group scope | cancelAtManagementGroupAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/policyinsights/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/policyinsights/v2018_07_01_preview/implementation/RemediationsInner.java",
"license": "mit",
"size": 261004
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,336,686 |
private XPage messageBox( HttpServletRequest request )
{
_messageBox.localize( getLocale( request ) );
Map<String, Object> model = getModel( );
model.put( MARK_MESSAGE_BOX, _messageBox );
return getXPage( _messageBox.getTemplate( ), getLocale( request ), model );
} | XPage function( HttpServletRequest request ) { _messageBox.localize( getLocale( request ) ); Map<String, Object> model = getModel( ); model.put( MARK_MESSAGE_BOX, _messageBox ); return getXPage( _messageBox.getTemplate( ), getLocale( request ), model ); } | /**
* Display the Message BOX
*
* @param request
* The HTTP request
* @return The message box
*/ | Display the Message BOX | messageBox | {
"repo_name": "lutece-platform/lutece-core",
"path": "src/java/fr/paris/lutece/portal/util/mvc/xpage/MVCApplication.java",
"license": "bsd-3-clause",
"size": 28327
} | [
"fr.paris.lutece.portal.web.xpages.XPage",
"java.util.Map",
"javax.servlet.http.HttpServletRequest"
] | import fr.paris.lutece.portal.web.xpages.XPage; import java.util.Map; import javax.servlet.http.HttpServletRequest; | import fr.paris.lutece.portal.web.xpages.*; import java.util.*; import javax.servlet.http.*; | [
"fr.paris.lutece",
"java.util",
"javax.servlet"
] | fr.paris.lutece; java.util; javax.servlet; | 552,488 |
EReference getLocation_PermObjLoc(); | EReference getLocation_PermObjLoc(); | /**
* Returns the meta object for the reference list '{@link LRBAC.Location#getPermObjLoc <em>Perm Obj Loc</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Perm Obj Loc</em>'.
* @see LRBAC.Location#getPermObjLoc()
* @see #getLocation()
* @gene... | Returns the meta object for the reference list '<code>LRBAC.Location#getPermObjLoc Perm Obj Loc</code>'. | getLocation_PermObjLoc | {
"repo_name": "arnobl/kompren",
"path": "kompren-examples/LRBAC.model/src/LRBAC/LRBACPackage.java",
"license": "epl-1.0",
"size": 47810
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,761,863 |
public static boolean isValidJson(String redirectURL) {
try {
new JSONObject(redirectURL);
} catch (JSONException ex) {
return false;
}
return true;
} | static boolean function(String redirectURL) { try { new JSONObject(redirectURL); } catch (JSONException ex) { return false; } return true; } | /**
* Validates the json provided.
*
* @param redirectURL redirect url
* @return true if a valid json
*/ | Validates the json provided | isValidJson | {
"repo_name": "darshanasbg/identity-inbound-auth-oauth",
"path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/util/OAuth2Util.java",
"license": "apache-2.0",
"size": 193919
} | [
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,718,027 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<VirtualMachineInstanceViewInner>> instanceViewWithResponseAsync(
String resourceGroupName, String vmName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<VirtualMachineInstanceViewInner>> function( String resourceGroupName, String vmName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new Il... | /**
* Retrieves information about the run-time state of a virtual machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown ... | Retrieves information about the run-time state of a virtual machine | instanceViewWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java",
"license": "mit",
"size": 333925
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.compute.fluent.models.VirtualMachineInstanceViewInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineInstanceViewInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 902,610 |
protected void setFilter(String filter) {
if (!Objects.equals(filter, getWidget().lastFilter)) {
getDataReceivedHandler().clearPendingNavigation();
rpc.setFilter(filter);
}
}
/**
* Send a message to the server to request a page of items with the current
* ... | void function(String filter) { if (!Objects.equals(filter, getWidget().lastFilter)) { getDataReceivedHandler().clearPendingNavigation(); rpc.setFilter(filter); } } /** * Send a message to the server to request a page of items with the current * filter. * * This method is for internal use only and may be removed in futu... | /**
* Send a message to the server set the current filter.
*
* This method is for internal use only and may be removed in future
* versions.
*
* @since 8.0
* @param filter
* the current filter string
*/ | Send a message to the server set the current filter. This method is for internal use only and may be removed in future versions | setFilter | {
"repo_name": "peterl1084/framework",
"path": "client/src/main/java/com/vaadin/client/ui/combobox/ComboBoxConnector.java",
"license": "apache-2.0",
"size": 14917
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 177,012 |
private void snoozeAlarm() {
Log.i(TAG, "Snoozing alarm");
mAlarmsService.snoozeAlarm(mCurrentAlarm.getId(), mAlarmDay);
finish();
} | void function() { Log.i(TAG, STR); mAlarmsService.snoozeAlarm(mCurrentAlarm.getId(), mAlarmDay); finish(); } | /**
* This method snoozes the current alarm
*/ | This method snoozes the current alarm | snoozeAlarm | {
"repo_name": "aajn88/wakemeapp",
"path": "app/src/main/java/com/doers/wakemeapp/controllers/alarms/LaunchAlarmActivity.java",
"license": "gpl-3.0",
"size": 8199
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,092,511 |
public boolean innermostDelegateEquals(final Connection c) {
final Connection innerCon = getInnermostDelegateInternal();
if (innerCon == null) {
return c == null;
}
return innerCon.equals(c);
} | boolean function(final Connection c) { final Connection innerCon = getInnermostDelegateInternal(); if (innerCon == null) { return c == null; } return innerCon.equals(c); } | /**
* Compares innermost delegate to the given connection.
*
* @param c
* connection to compare innermost delegate with
* @return true if innermost delegate equals <code>c</code>
*/ | Compares innermost delegate to the given connection | innermostDelegateEquals | {
"repo_name": "apache/tomcat",
"path": "java/org/apache/tomcat/dbcp/dbcp2/DelegatingConnection.java",
"license": "apache-2.0",
"size": 33020
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,352,156 |
void releaseTask(Instance taskInstance); | void releaseTask(Instance taskInstance); | /**
* Removes an assignee of task.
*
* @param taskInstance
* the current task instance
*/ | Removes an assignee of task | releaseTask | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/processes/processes-camunda/processes-camunda-api/src/main/java/com/sirmaenterprise/sep/bpm/camunda/bpmn/CamundaBPMNService.java",
"license": "lgpl-3.0",
"size": 5923
} | [
"com.sirma.itt.seip.domain.instance.Instance"
] | import com.sirma.itt.seip.domain.instance.Instance; | import com.sirma.itt.seip.domain.instance.*; | [
"com.sirma.itt"
] | com.sirma.itt; | 1,636,366 |
@After
public void tearDown() {
batchSchemaService.setLocalFolderLocation(localFolderLocation);
FileUtils.deleteAllXMLs(actualOutputFolder + File.separator + batchInstanceIdSuccess);
FileUtils.copyAllXMLFiles(samplesFolder + File.separator + batchInstanceIdSuccess, actualOutputFolder + File.separator
+ ba... | void function() { batchSchemaService.setLocalFolderLocation(localFolderLocation); FileUtils.deleteAllXMLs(actualOutputFolder + File.separator + batchInstanceIdSuccess); FileUtils.copyAllXMLFiles(samplesFolder + File.separator + batchInstanceIdSuccess, actualOutputFolder + File.separator + batchInstanceIdSuccess); FileU... | /**
* This methos does the clean-up operation : deleting the newly modified xml in inputOutput folder and replacing them with
* corresponding xml in samples folder.
*/ | This methos does the clean-up operation : deleting the newly modified xml in inputOutput folder and replacing them with corresponding xml in samples folder | tearDown | {
"repo_name": "ungerik/ephesoft",
"path": "Ephesoft_Community_Release_4.0.2.0/source/dcma-regex-validation/src/test/java/com/ephesoft/dcma/regexvalidtaion/RegexValidatonTest.java",
"license": "agpl-3.0",
"size": 10221
} | [
"com.ephesoft.dcma.util.FileUtils",
"java.io.File"
] | import com.ephesoft.dcma.util.FileUtils; import java.io.File; | import com.ephesoft.dcma.util.*; import java.io.*; | [
"com.ephesoft.dcma",
"java.io"
] | com.ephesoft.dcma; java.io; | 2,754,710 |
Mono<Void> send(Message message); | Mono<Void> send(Message message); | /**
* Sends a single message to the remote endpoint.
*
* @param message Message to send.
* @return A Mono that completes when the message has been sent.
* @throws AmqpException if the serialized {@code message} exceed the links capacity for a single message.
*/ | Sends a single message to the remote endpoint | send | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpSendLink.java",
"license": "mit",
"size": 1679
} | [
"org.apache.qpid.proton.message.Message"
] | import org.apache.qpid.proton.message.Message; | import org.apache.qpid.proton.message.*; | [
"org.apache.qpid"
] | org.apache.qpid; | 1,947,037 |
private List<Partition> getPartitionsFromHms(
org.apache.hadoop.hive.metastore.api.Table msTbl, MetaStoreClient msClient,
TableName tableName, List<Partition> hmsPartitions)
throws ImpalaException {
List<String> partitionCols = Lists.newArrayList();
for (FieldSchema fs: msTbl.getPartitionKey... | List<Partition> function( org.apache.hadoop.hive.metastore.api.Table msTbl, MetaStoreClient msClient, TableName tableName, List<Partition> hmsPartitions) throws ImpalaException { List<String> partitionCols = Lists.newArrayList(); for (FieldSchema fs: msTbl.getPartitionKeys()) partitionCols.add(fs.getName()); List<Strin... | /**
* Returns a list of partitions retrieved from HMS for each 'hmsPartitions' element.
*/ | Returns a list of partitions retrieved from HMS for each 'hmsPartitions' element | getPartitionsFromHms | {
"repo_name": "cloudera/Impala",
"path": "fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java",
"license": "apache-2.0",
"size": 192620
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.apache.hadoop.hive.metastore.api.FieldSchema",
"org.apache.hadoop.hive.metastore.api.Partition",
"org.apache.impala.analysis.TableName",
"org.apache.impala.catalog.MetaStoreClientPool",
"org.apache.impala.catalog.Table",
"org.apache.impala.comm... | import com.google.common.collect.Lists; import java.util.List; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.impala.analysis.TableName; import org.apache.impala.catalog.MetaStoreClientPool; import org.apache.impala.catalog.Table; import... | import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.impala.analysis.*; import org.apache.impala.catalog.*; import org.apache.impala.common.*; import org.apache.thrift.*; | [
"com.google.common",
"java.util",
"org.apache.hadoop",
"org.apache.impala",
"org.apache.thrift"
] | com.google.common; java.util; org.apache.hadoop; org.apache.impala; org.apache.thrift; | 1,395,366 |
public ApplicationGatewayBackendHealthOnDemandInner withBackendAddressPool(ApplicationGatewayBackendAddressPool backendAddressPool) {
this.backendAddressPool = backendAddressPool;
return this;
} | ApplicationGatewayBackendHealthOnDemandInner function(ApplicationGatewayBackendAddressPool backendAddressPool) { this.backendAddressPool = backendAddressPool; return this; } | /**
* Set reference of an ApplicationGatewayBackendAddressPool resource.
*
* @param backendAddressPool the backendAddressPool value to set
* @return the ApplicationGatewayBackendHealthOnDemandInner object itself.
*/ | Set reference of an ApplicationGatewayBackendAddressPool resource | withBackendAddressPool | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ApplicationGatewayBackendHealthOnDemandInner.java",
"license": "mit",
"size": 2576
} | [
"com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool"
] | import com.microsoft.azure.management.network.v2019_09_01.ApplicationGatewayBackendAddressPool; | import com.microsoft.azure.management.network.v2019_09_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,562,547 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<AppServicePlanInner> listAppServicePlans(String resourceGroupName, String name) {
return new PagedIterable<>(listAppServicePlansAsync(resourceGroupName, name));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<AppServicePlanInner> function(String resourceGroupName, String name) { return new PagedIterable<>(listAppServicePlansAsync(resourceGroupName, name)); } | /**
* Get all App Service plans in an App Service Environment.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the App Service Environment.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws De... | Get all App Service plans in an App Service Environment | listAppServicePlans | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java",
"license": "mit",
"size": 563770
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.appservice.fluent.models.AppServicePlanInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.appservice.fluent.models.AppServicePlanInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,642,988 |
public static InputTypeStrategy varyingSequence(
String[] argumentNames, ArgumentTypeStrategy[] strategies) {
return new VaryingSequenceInputTypeStrategy(
Arrays.asList(strategies), Arrays.asList(argumentNames));
} | static InputTypeStrategy function( String[] argumentNames, ArgumentTypeStrategy[] strategies) { return new VaryingSequenceInputTypeStrategy( Arrays.asList(strategies), Arrays.asList(argumentNames)); } | /**
* Strategy for a varying named function signature like {@code f(i INT, str STRING, num
* NUMERIC...)} using a sequence of {@link ArgumentTypeStrategy}s. The first n - 1 arguments
* must be constant. The n-th argument can occur 0, 1, or more times.
*/ | Strategy for a varying named function signature like f(i INT, str STRING, num NUMERIC...) using a sequence of <code>ArgumentTypeStrategy</code>s. The first n - 1 arguments must be constant. The n-th argument can occur 0, 1, or more times | varyingSequence | {
"repo_name": "apache/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/InputTypeStrategies.java",
"license": "apache-2.0",
"size": 15060
} | [
"java.util.Arrays",
"org.apache.flink.table.types.inference.strategies.VaryingSequenceInputTypeStrategy"
] | import java.util.Arrays; import org.apache.flink.table.types.inference.strategies.VaryingSequenceInputTypeStrategy; | import java.util.*; import org.apache.flink.table.types.inference.strategies.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,807,630 |
@Test
public void testHasPersonRightInNonPrivateProject_1()
throws Exception {
Integer personID = new Integer(1);
int[] arrRights = new int[] {};
PowerMockito.mockStatic(LookupContainer.class);
| void function() throws Exception { Integer personID = new Integer(1); int[] arrRights = new int[] {}; PowerMockito.mockStatic(LookupContainer.class); | /**
* Run the boolean hasPersonRightInNonPrivateProject(Integer,int[]) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 18.04.15 08:40
*/ | Run the boolean hasPersonRightInNonPrivateProject(Integer,int[]) method test | testHasPersonRightInNonPrivateProject_1 | {
"repo_name": "trackplus/Genji",
"path": "src/test/java/com/aurel/track/accessControl/AccessControlBLTest.java",
"license": "gpl-3.0",
"size": 15950
} | [
"com.aurel.track.fieldType.runtime.base.LookupContainer",
"org.powermock.api.mockito.PowerMockito"
] | import com.aurel.track.fieldType.runtime.base.LookupContainer; import org.powermock.api.mockito.PowerMockito; | import com.aurel.track.*; import org.powermock.api.mockito.*; | [
"com.aurel.track",
"org.powermock.api"
] | com.aurel.track; org.powermock.api; | 152,505 |
@Test(expected = BgpParseException.class)
public void bgpUpdateMessageTest14() throws BgpParseException {
byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0... | @Test(expected = BgpParseException.class) void function() throws BgpParseException { byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x... | /**
* In this test case, Invalid MP reach flags is given as input and expecting
* an exception.
*/ | In this test case, Invalid MP reach flags is given as input and expecting an exception | bgpUpdateMessageTest14 | {
"repo_name": "wuwenbin2/onos_bgp_evpn",
"path": "protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java",
"license": "apache-2.0",
"size": 100185
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.junit.Test",
"org.onosproject.bgpio.exceptions.BgpParseException",
"org.onosproject.bgpio.types.BgpHeader"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Test; import org.onosproject.bgpio.exceptions.BgpParseException; import org.onosproject.bgpio.types.BgpHeader; | import org.hamcrest.*; import org.jboss.netty.buffer.*; import org.junit.*; import org.onosproject.bgpio.exceptions.*; import org.onosproject.bgpio.types.*; | [
"org.hamcrest",
"org.jboss.netty",
"org.junit",
"org.onosproject.bgpio"
] | org.hamcrest; org.jboss.netty; org.junit; org.onosproject.bgpio; | 1,666,573 |
public static Object decrypt(CryptedObject co, String password) throws DecryptionFailedException {
try {
ByteArrayInputStream bis = new ByteArrayInputStream(decrypt(co.getBytes(), password));
ObjectInput in = new ObjectInputStream(bis);
return in.readObject();
} catch (Exception e) {
t... | static Object function(CryptedObject co, String password) throws DecryptionFailedException { try { ByteArrayInputStream bis = new ByteArrayInputStream(decrypt(co.getBytes(), password)); ObjectInput in = new ObjectInputStream(bis); return in.readObject(); } catch (Exception e) { throw new DecryptionFailedException(); } ... | /**
* Decrypts a CryptedObject using a password and returns its decrypted equivalent Object
*
* @param co The CryptedObject to decrypt
* @param password The password to use for decryption
* @return The decrypted object
* @throws DecryptionFailedException If decryption fails. A wrong password will cau... | Decrypts a CryptedObject using a password and returns its decrypted equivalent Object | decrypt | {
"repo_name": "DeBukkIt/SimpleFileStorage",
"path": "src/com/blogspot/debukkitsblog/crypt/Crypter.java",
"license": "gpl-3.0",
"size": 4597
} | [
"java.io.ByteArrayInputStream",
"java.io.ObjectInput",
"java.io.ObjectInputStream"
] | import java.io.ByteArrayInputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,392,639 |
protected void listChanged(ListChangeEvent e) {
this.transformedList.clear();
this.transformedList.addAll(this.transformItems(this.listHolder));
this.fireListChanged(VALUE);
} | void function(ListChangeEvent e) { this.transformedList.clear(); this.transformedList.addAll(this.transformItems(this.listHolder)); this.fireListChanged(VALUE); } | /**
* The wrapped list holder has changed in some dramatic fashion.
* Reconfigure our listeners and forward the event.
*/ | The wrapped list holder has changed in some dramatic fashion. Reconfigure our listeners and forward the event | listChanged | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "utils/eclipselink.utils.workbench/uitools/source/org/eclipse/persistence/tools/workbench/uitools/app/TransformationListValueModelAdapter.java",
"license": "epl-1.0",
"size": 8134
} | [
"org.eclipse.persistence.tools.workbench.utility.events.ListChangeEvent"
] | import org.eclipse.persistence.tools.workbench.utility.events.ListChangeEvent; | import org.eclipse.persistence.tools.workbench.utility.events.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,179,479 |
protected TaskAttemptContext getContext() {
return context;
}
} | TaskAttemptContext function() { return context; } } | /**
* Get the context.
*
* @return Context passed to initialize.
*/ | Get the context | getContext | {
"repo_name": "basio/graph",
"path": "giraph-core/src/main/java/org/apache/giraph/io/formats/TextVertexValueInputFormat.java",
"license": "apache-2.0",
"size": 8044
} | [
"org.apache.hadoop.mapreduce.TaskAttemptContext"
] | import org.apache.hadoop.mapreduce.TaskAttemptContext; | import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,438,327 |
@SuppressWarnings("IOResourceOpenedButNotSafelyClosed")
private void partUpload(boolean closingUpload) throws IOException {
if (backupStream != null) {
backupStream.close();
}
if (closingUpload && partUpload && backupFile.length() == 0) {
//skipping the upload if
// - it is close time... | @SuppressWarnings(STR) void function(boolean closingUpload) throws IOException { if (backupStream != null) { backupStream.close(); } if (closingUpload && partUpload && backupFile.length() == 0) { SwiftUtils.debug(LOG, STR); delete(backupFile); } else { partUpload = true; boolean uploadSuccess = false; int attempt = 0; ... | /**
* Upload a single partition. This deletes the local backing-file,
* and re-opens it to create a new one.
* @param closingUpload is this the final upload of an upload
* @throws IOException on IO problems
*/ | Upload a single partition. This deletes the local backing-file, and re-opens it to create a new one | partUpload | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java",
"license": "apache-2.0",
"size": 12536
} | [
"java.io.BufferedOutputStream",
"java.io.FileOutputStream",
"java.io.IOException",
"org.apache.hadoop.fs.swift.util.SwiftUtils"
] | import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import org.apache.hadoop.fs.swift.util.SwiftUtils; | import java.io.*; import org.apache.hadoop.fs.swift.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,892,837 |
private void setDataForBreadcrumbTitleComposite() {
// repository
breadcrumbTitleComposite.setRepositoryDefinition(repositoryDefinition);
// agent
PlatformIdent platformIdent = repositoryDefinition.getCachedDataService().getPlatformIdentForId(defaultData.getPlatformIdent());
breadcrumbTitleComposite.setAg... | void function() { breadcrumbTitleComposite.setRepositoryDefinition(repositoryDefinition); PlatformIdent platformIdent = repositoryDefinition.getCachedDataService().getPlatformIdentForId(defaultData.getPlatformIdent()); breadcrumbTitleComposite.setAgent(TextFormatter.getAgentDescription(platformIdent), InspectIT.getDefa... | /**
* Sets data for the {@link BreadcrumbTitleComposite}.
*/ | Sets data for the <code>BreadcrumbTitleComposite</code> | setDataForBreadcrumbTitleComposite | {
"repo_name": "stefansiegl/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/dialog/DetailsDialog.java",
"license": "agpl-3.0",
"size": 11962
} | [
"info.novatec.inspectit.cmr.model.PlatformIdent",
"info.novatec.inspectit.cmr.model.SensorTypeIdent",
"info.novatec.inspectit.rcp.InspectIT",
"info.novatec.inspectit.rcp.InspectITImages",
"info.novatec.inspectit.rcp.formatter.TextFormatter",
"info.novatec.inspectit.rcp.model.SensorTypeEnum"
] | import info.novatec.inspectit.cmr.model.PlatformIdent; import info.novatec.inspectit.cmr.model.SensorTypeIdent; import info.novatec.inspectit.rcp.InspectIT; import info.novatec.inspectit.rcp.InspectITImages; import info.novatec.inspectit.rcp.formatter.TextFormatter; import info.novatec.inspectit.rcp.model.SensorTypeEnu... | import info.novatec.inspectit.cmr.model.*; import info.novatec.inspectit.rcp.*; import info.novatec.inspectit.rcp.formatter.*; import info.novatec.inspectit.rcp.model.*; | [
"info.novatec.inspectit"
] | info.novatec.inspectit; | 2,892,332 |
private List<String> findAllNames(List<Operator> operators) {
return operators.stream().flatMap(op-> op instanceof OperatorChain ?
((OperatorChain) op).getAllInnerOperatorsAndMe().stream().map(Operator::getName)
: Stream.of(op.getName())).collect(Collectors.toList());
}
/**
* Creates the operator to i... | List<String> function(List<Operator> operators) { return operators.stream().flatMap(op-> op instanceof OperatorChain ? ((OperatorChain) op).getAllInnerOperatorsAndMe().stream().map(Operator::getName) : Stream.of(op.getName())).collect(Collectors.toList()); } /** * Creates the operator to import from the given repositor... | /**
* Finds the names of all operators, including inner operators
*
* @since 9.3
*/ | Finds the names of all operators, including inner operators | findAllNames | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/dnd/ReceivingOperatorTransferHandler.java",
"license": "agpl-3.0",
"size": 19485
} | [
"com.rapidminer.operator.Operator",
"com.rapidminer.operator.OperatorChain",
"java.util.List",
"java.util.stream.Collectors",
"java.util.stream.Stream"
] | import com.rapidminer.operator.Operator; import com.rapidminer.operator.OperatorChain; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; | import com.rapidminer.operator.*; import java.util.*; import java.util.stream.*; | [
"com.rapidminer.operator",
"java.util"
] | com.rapidminer.operator; java.util; | 1,434,207 |
public static StreamEvent getMinEventBatchProcessor(StreamEvent currentEvent, StreamEvent oldEvent,
ExpressionExecutor minByAttribute) {
StreamEvent minEvent = oldEvent;
if (minEvent != null) {
Object minEventValue = minByAttribute.execute(minEvent);
Object curren... | static StreamEvent function(StreamEvent currentEvent, StreamEvent oldEvent, ExpressionExecutor minByAttribute) { StreamEvent minEvent = oldEvent; if (minEvent != null) { Object minEventValue = minByAttribute.execute(minEvent); Object currentEventValue = minByAttribute.execute(currentEvent); if (minEventValue instanceof... | /**
* Return the minimum event comparing two events
*
* @param currentEvent new event
* @param oldEvent the previous event that is stored as the minimun event
* @param minByAttribute the attribute which the comparison is done.
* @return minEvent
*/ | Return the minimum event comparing two events | getMinEventBatchProcessor | {
"repo_name": "dilini-muthumala/siddhi-execution-extrema",
"path": "component/src/main/java/org/wso2/extension/siddhi/execution/extrema/util/MaxByMinByExecutor.java",
"license": "apache-2.0",
"size": 4914
} | [
"org.wso2.siddhi.core.event.stream.StreamEvent",
"org.wso2.siddhi.core.executor.ExpressionExecutor"
] | import org.wso2.siddhi.core.event.stream.StreamEvent; import org.wso2.siddhi.core.executor.ExpressionExecutor; | import org.wso2.siddhi.core.event.stream.*; import org.wso2.siddhi.core.executor.*; | [
"org.wso2.siddhi"
] | org.wso2.siddhi; | 979,673 |
private void killOverflowingTasks() throws IOException {
long localMinSpaceKill;
synchronized(this){
localMinSpaceKill = minSpaceKill;
}
if (!enoughFreeSpace(localMinSpaceKill)) {
acceptNewTasks=false;
//we give up! do not accept new tasks until
//all the ones running have f... | void function() throws IOException { long localMinSpaceKill; synchronized(this){ localMinSpaceKill = minSpaceKill; } if (!enoughFreeSpace(localMinSpaceKill)) { acceptNewTasks=false; synchronized (this) { TaskInProgress killMe = findTaskToKill(null); if (killMe!=null) { String msg = STR + STR; LOG.info(killMe.getTask().... | /** Check if we're dangerously low on disk space
* If so, kill jobs to free up space and make sure
* we don't accept any new tasks
* Try killing the reduce jobs first, since I believe they
* use up most space
* Then pick the one with least progress
*/ | Check if we're dangerously low on disk space If so, kill jobs to free up space and make sure we don't accept any new tasks Try killing the reduce jobs first, since I believe they use up most space Then pick the one with least progress | killOverflowingTasks | {
"repo_name": "jayantgolhar/Hadoop-0.21.0",
"path": "mapred/src/java/org/apache/hadoop/mapred/TaskTracker.java",
"license": "apache-2.0",
"size": 139600
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,502,860 |
@SuppressWarnings("unchecked")
public static <T extends AsynchronousRequestBody> T extractRequestBody(
AsynchronousJobStatus status, Class<T> clazz) {
ValidateArgument.required(status, "status");
ValidateArgument.required(clazz, "class");
ValidateArgument.required(status.getRequestBody(), "status.requ... | @SuppressWarnings(STR) static <T extends AsynchronousRequestBody> T function( AsynchronousJobStatus status, Class<T> clazz) { ValidateArgument.required(status, STR); ValidateArgument.required(clazz, "class"); ValidateArgument.required(status.getRequestBody(), STR); if(!clazz.isInstance(status.getRequestBody())){ throw ... | /**
* Helper to extract a job body from a request with all of the error checking.
*
* @param status
* @param clazz
* @return
*/ | Helper to extract a job body from a request with all of the error checking | extractRequestBody | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/asynch/AsynchJobUtils.java",
"license": "apache-2.0",
"size": 1024
} | [
"org.sagebionetworks.repo.model.asynch.AsynchronousJobStatus",
"org.sagebionetworks.repo.model.asynch.AsynchronousRequestBody",
"org.sagebionetworks.util.ValidateArgument"
] | import org.sagebionetworks.repo.model.asynch.AsynchronousJobStatus; import org.sagebionetworks.repo.model.asynch.AsynchronousRequestBody; import org.sagebionetworks.util.ValidateArgument; | import org.sagebionetworks.repo.model.asynch.*; import org.sagebionetworks.util.*; | [
"org.sagebionetworks.repo",
"org.sagebionetworks.util"
] | org.sagebionetworks.repo; org.sagebionetworks.util; | 2,198,908 |
@SuppressWarnings("unchecked")
public <K1 extends K, V1 extends V> Builder<K1, V1> expirationListeners(
List<ExpirationListener<? super K1, ? super V1>> listeners) {
Assert.notNull(listeners, "listeners");
if (expirationListeners == null)
expirationListeners = new ArrayList<Expi... | @SuppressWarnings(STR) <K1 extends K, V1 extends V> Builder<K1, V1> function( List<ExpirationListener<? super K1, ? super V1>> listeners) { Assert.notNull(listeners, STR); if (expirationListeners == null) expirationListeners = new ArrayList<ExpirationListener<K, V>>(listeners.size()); for (ExpirationListener<? super K1... | /**
* Configures the expiration listeners which will receive notifications upon each map entry's expiration.
* Notifications are delivered synchronously and block map write operations.
*
* @param listeners to set
* @throws NullPointerException if {@code listener} is null
*/ | Configures the expiration listeners which will receive notifications upon each map entry's expiration. Notifications are delivered synchronously and block map write operations | expirationListeners | {
"repo_name": "jhalterman/expiringmap",
"path": "src/main/java/net/jodah/expiringmap/ExpiringMap.java",
"license": "apache-2.0",
"size": 45668
} | [
"java.util.ArrayList",
"java.util.List",
"net.jodah.expiringmap.internal.Assert"
] | import java.util.ArrayList; import java.util.List; import net.jodah.expiringmap.internal.Assert; | import java.util.*; import net.jodah.expiringmap.internal.*; | [
"java.util",
"net.jodah.expiringmap"
] | java.util; net.jodah.expiringmap; | 1,985,651 |
private Message processRawMessage(String raw) {
if (raw.startsWith("H:")) {
return new H_Message(raw);
} else if (raw.startsWith("M:")) {
return new M_Message(raw);
} else if (raw.startsWith("C:")) {
return new C_Message(raw);
} else if (raw.startsWith("L:")) {
return new L_Message(raw);
} els... | Message function(String raw) { if (raw.startsWith("H:")) { return new H_Message(raw); } else if (raw.startsWith("M:")) { return new M_Message(raw); } else if (raw.startsWith("C:")) { return new C_Message(raw); } else if (raw.startsWith("L:")) { return new L_Message(raw); } else if (raw.startsWith("S:")) { return new S_... | /**
* Processes the raw TCP data read from the MAX protocol, returning the
* corresponding Message.
*
* @param raw
* the raw data line read from the MAX protocol
* @return message the @Message for the given raw data
*/ | Processes the raw TCP data read from the MAX protocol, returning the corresponding Message | processRawMessage | {
"repo_name": "kaikreuzer/openhab2",
"path": "addons/binding/org.openhab.binding.max/src/main/java/org/openhab/binding/max/internal/handler/MaxCubeBridgeHandler.java",
"license": "epl-1.0",
"size": 23004
} | [
"org.openhab.binding.max.internal.message.Message"
] | import org.openhab.binding.max.internal.message.Message; | import org.openhab.binding.max.internal.message.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,753,365 |
public boolean loadXML( Node valnode ) {
valueMeta = null;
try {
String valname = XMLHandler.getTagValue( valnode, "name" );
int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) );
String text = XMLHandler.getTagValue( valnode, "text" );
boolean isnull = "Y".... | boolean function( Node valnode ) { valueMeta = null; try { String valname = XMLHandler.getTagValue( valnode, "name" ); int valtype = ValueMetaBase.getType( XMLHandler.getTagValue( valnode, "type" ) ); String text = XMLHandler.getTagValue( valnode, "text" ); boolean isnull = "Y".equalsIgnoreCase( XMLHandler.getTagValue(... | /**
* Read the data for this Value from an XML Node
*
* @param valnode
* The XML Node to read from
* @return true if all went well, false if something went wrong.
*/ | Read the data for this Value from an XML Node | loadXML | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "core/src/org/pentaho/di/core/row/ValueMetaAndData.java",
"license": "apache-2.0",
"size": 8025
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.core.row.value.ValueMetaBase",
"org.pentaho.di.core.row.value.ValueMetaString",
"org.pentaho.di.core.xml.XMLHandler",
"org.w3c.dom.Node"
] | import org.pentaho.di.core.Const; import org.pentaho.di.core.row.value.ValueMetaBase; import org.pentaho.di.core.row.value.ValueMetaString; import org.pentaho.di.core.xml.XMLHandler; import org.w3c.dom.Node; | import org.pentaho.di.core.*; import org.pentaho.di.core.row.value.*; import org.pentaho.di.core.xml.*; import org.w3c.dom.*; | [
"org.pentaho.di",
"org.w3c.dom"
] | org.pentaho.di; org.w3c.dom; | 2,209,451 |
protected int getReferencePosition() {
return (mList.getFirstVisiblePosition() + mList.getLastVisiblePosition()) / 2;
}
/**
* Sets the visible part of the list from the reference position.
*
* @param position Reference position previously returned by {@link LocalFileListFr... | int function() { return (mList.getFirstVisiblePosition() + mList.getLastVisiblePosition()) / 2; } /** * Sets the visible part of the list from the reference position. * * @param position Reference position previously returned by {@link LocalFileListFragment#getReferencePosition()} | /**
* Calculates the position of the item that will be used as a reference to reposition the visible items in the list when
* the device is turned to other position.
*
* THe current policy is take as a reference the visible item in the center of the screen.
*
* @return The positi... | Calculates the position of the item that will be used as a reference to reposition the visible items in the list when the device is turned to other position. THe current policy is take as a reference the visible item in the center of the screen | getReferencePosition | {
"repo_name": "SmruthiManjunath/owncloud_friends",
"path": "src/com/owncloud/android/ui/FragmentListView.java",
"license": "gpl-2.0",
"size": 3577
} | [
"com.owncloud.android.ui.fragment.LocalFileListFragment"
] | import com.owncloud.android.ui.fragment.LocalFileListFragment; | import com.owncloud.android.ui.fragment.*; | [
"com.owncloud.android"
] | com.owncloud.android; | 1,407,245 |
void setTooltipActiveElements(ActiveDatasetElement... elements);
| void setTooltipActiveElements(ActiveDatasetElement... elements); | /**
* Sets the active tooltip elements for the chart.
*
* @param elements array of active tooltip elements
*/ | Sets the active tooltip elements for the chart | setTooltipActiveElements | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/IsChart.java",
"license": "apache-2.0",
"size": 23529
} | [
"org.pepstock.charba.client.items.ActiveDatasetElement"
] | import org.pepstock.charba.client.items.ActiveDatasetElement; | import org.pepstock.charba.client.items.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 2,306,956 |
public static void unregisterActivityEventCallback(IActivityEventCallback ...callbacks){
ActivityController.get().getEventListenerGroup().unregisterActivityEventListener(callbacks);
} | static void function(IActivityEventCallback ...callbacks){ ActivityController.get().getEventListenerGroup().unregisterActivityEventListener(callbacks); } | /**
* unregister the event callback of activity.
* @param callbacks
* @see #registerActivityEventCallback(IActivityEventCallback...)
*/ | unregister the event callback of activity | unregisterActivityEventCallback | {
"repo_name": "generalzou/android-scrap",
"path": "Android-Scrap/android-scrap/src/main/java/org/heaven7/scrap/util/ScrapHelper.java",
"license": "apache-2.0",
"size": 7849
} | [
"org.heaven7.scrap.core.ActivityController",
"org.heaven7.scrap.core.event.IActivityEventCallback"
] | import org.heaven7.scrap.core.ActivityController; import org.heaven7.scrap.core.event.IActivityEventCallback; | import org.heaven7.scrap.core.*; import org.heaven7.scrap.core.event.*; | [
"org.heaven7.scrap"
] | org.heaven7.scrap; | 459,162 |
@Deprecated
@Delegate
NetworkApi getNetworkApiForZone(@EndpointParam(parser = ZoneToEndpoint.class) String zone); | NetworkApi getNetworkApiForZone(@EndpointParam(parser = ZoneToEndpoint.class) String zone); | /**
* Provides access to Network features.
* @deprecated Please use {@link #getNetworkApi(String)} as this method will be removed in jclouds 3.0.
*/ | Provides access to Network features | getNetworkApiForZone | {
"repo_name": "agentmilindu/stratos",
"path": "dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2_0/NeutronApi.java",
"license": "apache-2.0",
"size": 4495
} | [
"org.jclouds.location.functions.ZoneToEndpoint",
"org.jclouds.openstack.neutron.v2_0.features.NetworkApi",
"org.jclouds.rest.annotations.EndpointParam"
] | import org.jclouds.location.functions.ZoneToEndpoint; import org.jclouds.openstack.neutron.v2_0.features.NetworkApi; import org.jclouds.rest.annotations.EndpointParam; | import org.jclouds.location.functions.*; import org.jclouds.openstack.neutron.v2_0.features.*; import org.jclouds.rest.annotations.*; | [
"org.jclouds.location",
"org.jclouds.openstack",
"org.jclouds.rest"
] | org.jclouds.location; org.jclouds.openstack; org.jclouds.rest; | 1,057,626 |
public void setTimeProcessed() {
timeProcessed = new Date(Core.getInstance().getSystemTime());
}
| void function() { timeProcessed = new Date(Core.getInstance().getSystemTime()); } | /**
* Updates the object to record the current time as the time that
* the data was actually processed.
*/ | Updates the object to record the current time as the time that the data was actually processed | setTimeProcessed | {
"repo_name": "goeuropa/transitime",
"path": "transitime/src/main/java/org/transitime/db/structs/AvlReport.java",
"license": "gpl-3.0",
"size": 34880
} | [
"java.util.Date",
"org.transitime.applications.Core"
] | import java.util.Date; import org.transitime.applications.Core; | import java.util.*; import org.transitime.applications.*; | [
"java.util",
"org.transitime.applications"
] | java.util; org.transitime.applications; | 2,523,250 |
@Nonnull
public PrimitiveRequestBuilder<Long> count() {
return new PrimitiveRequestBuilder<Long>(getRequestUrlWithAdditionalSegment("$count"), getClient(), null, Long.class);
} | PrimitiveRequestBuilder<Long> function() { return new PrimitiveRequestBuilder<Long>(getRequestUrlWithAdditionalSegment(STR), getClient(), null, Long.class); } | /**
* Gets the raw count request for the collection
* @return The raw count request for the collection
*/ | Gets the raw count request for the collection | count | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TargetedManagedAppConfigurationCollectionRequestBuilder.java",
"license": "mit",
"size": 3102
} | [
"com.microsoft.graph.http.PrimitiveRequestBuilder"
] | import com.microsoft.graph.http.PrimitiveRequestBuilder; | import com.microsoft.graph.http.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 2,126,840 |
public static boolean isNativeLzoLoaded() {
return nativeLzoLoaded;
}
public LzoDecompressor(CompressionStrategy strategy, int directBufferSize) {
this.directBufferSize = directBufferSize;
this.strategy = strategy;
compressedDirectBuf = ByteBuffer.allocateDirect(directBufferSize);
unc... | static boolean function() { return nativeLzoLoaded; } public LzoDecompressor(CompressionStrategy strategy, int directBufferSize) { this.directBufferSize = directBufferSize; this.strategy = strategy; compressedDirectBuf = ByteBuffer.allocateDirect(directBufferSize); uncompressedDirectBuf = ByteBuffer.allocateDirect(dire... | /**
* Check if lzo decompressors are loaded and initialized.
*
* @return <code>true</code> if lzo decompressors are loaded & initialized,
* else <code>false</code>
*/ | Check if lzo decompressors are loaded and initialized | isNativeLzoLoaded | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.11.2/src/java/org/apache/hadoop/io/compress/lzo/LzoDecompressor.java",
"license": "apache-2.0",
"size": 7903
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 93,831 |
public static List<OrderLineDTO> collect(OrderDTO order, Integer itemId) {
List<OrderLineDTO> lines = new ArrayList<OrderLineDTO>();
for (OrderLineDTO line : order.getLines()) {
if (line.getItemId().equals(itemId) && line.getDeleted() == 0) {
lines.add(line);
... | static List<OrderLineDTO> function(OrderDTO order, Integer itemId) { List<OrderLineDTO> lines = new ArrayList<OrderLineDTO>(); for (OrderLineDTO line : order.getLines()) { if (line.getItemId().equals(itemId) && line.getDeleted() == 0) { lines.add(line); } } return lines; } | /**
* Returns all order lines from the given order where the item ID matches.
*
* @param order order
* @param itemId item id of lines to collect
* @return list of collected order lines, empty list if none found.
*/ | Returns all order lines from the given order where the item ID matches | collect | {
"repo_name": "liquidJbilling/LT-Jbilling-MsgQ-3.1",
"path": "src/java/com/sapienter/jbilling/server/order/OrderHelper.java",
"license": "agpl-3.0",
"size": 14728
} | [
"com.sapienter.jbilling.server.order.db.OrderDTO",
"com.sapienter.jbilling.server.order.db.OrderLineDTO",
"java.util.ArrayList",
"java.util.List"
] | import com.sapienter.jbilling.server.order.db.OrderDTO; import com.sapienter.jbilling.server.order.db.OrderLineDTO; import java.util.ArrayList; import java.util.List; | import com.sapienter.jbilling.server.order.db.*; import java.util.*; | [
"com.sapienter.jbilling",
"java.util"
] | com.sapienter.jbilling; java.util; | 1,115,272 |
void resolveArtifact(ComponentArtifactMetadata artifact, ModuleSources moduleSources, BuildableArtifactResolveResult result); | void resolveArtifact(ComponentArtifactMetadata artifact, ModuleSources moduleSources, BuildableArtifactResolveResult result); | /**
* Resolves the given artifact. Any failures are packaged up in the result.
*/ | Resolves the given artifact. Any failures are packaged up in the result | resolveArtifact | {
"repo_name": "gradle/gradle",
"path": "subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/ModuleComponentRepositoryAccess.java",
"license": "apache-2.0",
"size": 3410
} | [
"org.gradle.internal.component.model.ComponentArtifactMetadata",
"org.gradle.internal.component.model.ModuleSources",
"org.gradle.internal.resolve.result.BuildableArtifactResolveResult"
] | import org.gradle.internal.component.model.ComponentArtifactMetadata; import org.gradle.internal.component.model.ModuleSources; import org.gradle.internal.resolve.result.BuildableArtifactResolveResult; | import org.gradle.internal.component.model.*; import org.gradle.internal.resolve.result.*; | [
"org.gradle.internal"
] | org.gradle.internal; | 2,843,696 |
return new DefaultAWSCredentialsProviderChain();
} | return new DefaultAWSCredentialsProviderChain(); } | /**
* Returns an {@link AWSCredentialsProvider} with the permissions necessary to accomplish all specified
* tasks. At the minimum it will require read permissions for Amazon Kinesis. Additional read permissions
* and write permissions may be required based on the Pipeline used.
*
* @return
*/ | Returns an <code>AWSCredentialsProvider</code> with the permissions necessary to accomplish all specified tasks. At the minimum it will require read permissions for Amazon Kinesis. Additional read permissions and write permissions may be required based on the Pipeline used | getAWSCredentialsProvider | {
"repo_name": "asafaducky/aws-big-data-blog",
"path": "aws-blog-hbase-on-emr/hbase-connector/src/main/java/com/amazonaws/hbase/kinesis/KinesisConnectorExecutor.java",
"license": "apache-2.0",
"size": 8691
} | [
"com.amazonaws.auth.DefaultAWSCredentialsProviderChain"
] | import com.amazonaws.auth.DefaultAWSCredentialsProviderChain; | import com.amazonaws.auth.*; | [
"com.amazonaws.auth"
] | com.amazonaws.auth; | 2,422,814 |
public void setDate(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException {
if (x == null) {
setNull(parameterIndex, java.sql.Types.DATE);
} else {
if (!this.useLegacyDatetimeCode) {
newSetDateInternal(parameterIndex, x, cal);
} el... | void function(int parameterIndex, java.sql.Date x, Calendar cal) throws SQLException { if (x == null) { setNull(parameterIndex, java.sql.Types.DATE); } else { if (!this.useLegacyDatetimeCode) { newSetDateInternal(parameterIndex, x, cal); } else { synchronized (checkClosed().getConnectionMutex()) { if (this.ddf == null)... | /**
* Set a parameter to a java.sql.Date value. The driver converts this to a
* SQL DATE value when it sends it to the database.
*
* @param parameterIndex
* the first parameter is 1, the second is 2, ...
* @param x
* the parameter value
* @param cal
* ... | Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database | setDate | {
"repo_name": "mwaylabs/mysql-connector-j",
"path": "src/com/mysql/jdbc/PreparedStatement.java",
"license": "gpl-2.0",
"size": 199515
} | [
"java.sql.Date",
"java.sql.SQLException",
"java.sql.Types",
"java.text.SimpleDateFormat",
"java.util.Calendar",
"java.util.Locale"
] | import java.sql.Date; import java.sql.SQLException; import java.sql.Types; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; | import java.sql.*; import java.text.*; import java.util.*; | [
"java.sql",
"java.text",
"java.util"
] | java.sql; java.text; java.util; | 2,860,000 |
public Rect getFramingRectInPreview() {
// if (framingRectInPreview == null) {
Rect rect = new Rect(getFramingRect());
Point cameraResolution = configManager.getCameraResolution();
Point screenResolution = configManager.getScreenResolution();
rect.left = rect.left * cameraResolution.y / screenResolution... | Rect function() { Rect rect = new Rect(getFramingRect()); Point cameraResolution = configManager.getCameraResolution(); Point screenResolution = configManager.getScreenResolution(); rect.left = rect.left * cameraResolution.y / screenResolution.x; rect.right = rect.right * cameraResolution.y / screenResolution.x; rect.t... | /**
* Like {@link #getFramingRect} but coordinates are in terms of the preview
* frame, not UI / screen.
*/ | Like <code>#getFramingRect</code> but coordinates are in terms of the preview frame, not UI / screen | getFramingRectInPreview | {
"repo_name": "do-android/do_BarcodeView",
"path": "doExt_do_BarcodeView/src/doext/zxing/barcodeview/camera/CameraManager.java",
"license": "gpl-3.0",
"size": 11741
} | [
"android.graphics.Point",
"android.graphics.Rect"
] | import android.graphics.Point; import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,202,254 |
public InputStream getFileInputStream() throws IOException
{
return KettleVFS.getInputStream(fileAppender.getFile());
}
| InputStream function() throws IOException { return KettleVFS.getInputStream(fileAppender.getFile()); } | /**
* This is not thread safe: please try to get the file appender yourself using the static constructor and work from there
*/ | This is not thread safe: please try to get the file appender yourself using the static constructor and work from there | getFileInputStream | {
"repo_name": "dianhu/Kettle-Research",
"path": "src-core/org/pentaho/di/core/logging/LogWriter.java",
"license": "lgpl-2.1",
"size": 13635
} | [
"java.io.IOException",
"java.io.InputStream",
"org.pentaho.di.core.vfs.KettleVFS"
] | import java.io.IOException; import java.io.InputStream; import org.pentaho.di.core.vfs.KettleVFS; | import java.io.*; import org.pentaho.di.core.vfs.*; | [
"java.io",
"org.pentaho.di"
] | java.io; org.pentaho.di; | 1,232,126 |
AlertCriteria before(DateTime time); | AlertCriteria before(DateTime time); | /**
* Filters alerts to retrieve only those older than the specified time.
*
* @param time the minimum time
* @return the updated criteria
*/ | Filters alerts to retrieve only those older than the specified time | before | {
"repo_name": "peter-gergely-horvath/kylo",
"path": "core/alerts/alerts-api/src/main/java/com/thinkbiganalytics/alerts/api/AlertCriteria.java",
"license": "apache-2.0",
"size": 2355
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,747,481 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.