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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public StringBuilder processPage(String id, String sitemap, String label, EList<Widget> children, boolean async,String appMode,String profileId,HttpServletRequest req) throws RenderException {
String snippet = getSnippet(async ? "layer" : "main");
snippet = snippet.replaceAll("%id%", id);
// if the label c... | StringBuilder function(String id, String sitemap, String label, EList<Widget> children, boolean async,String appMode,String profileId,HttpServletRequest req) throws RenderException { String snippet = getSnippet(async ? "layerSTRmain"); snippet = snippet.replaceAll("%id%", id); if(label.contains("[") && label.endsWith("... | /**
* This is the main method, which is called to produce the HTML code for a servlet request.
*
* @param id the id of the parent widget whose children are about to appear on this page
* @param sitemap the sitemap to use
* @param label the title of this page
* @param children a list of widgets that should ... | This is the main method, which is called to produce the HTML code for a servlet request | processPage | {
"repo_name": "rahulopengts/myhome",
"path": "bundles/ui/org.openhab.ui.webappprofile/src/main/java/org/openhab/ui/webappprofile/internal/render/PageRenderer.java",
"license": "epl-1.0",
"size": 8564
} | [
"javax.servlet.http.HttpServletRequest",
"org.eclipse.emf.common.util.EList",
"org.openhab.model.sitemap.Widget",
"org.openhab.ui.webappprofile.internal.common.HubUtility",
"org.openhab.ui.webappprofile.render.RenderException"
] | import javax.servlet.http.HttpServletRequest; import org.eclipse.emf.common.util.EList; import org.openhab.model.sitemap.Widget; import org.openhab.ui.webappprofile.internal.common.HubUtility; import org.openhab.ui.webappprofile.render.RenderException; | import javax.servlet.http.*; import org.eclipse.emf.common.util.*; import org.openhab.model.sitemap.*; import org.openhab.ui.webappprofile.internal.common.*; import org.openhab.ui.webappprofile.render.*; | [
"javax.servlet",
"org.eclipse.emf",
"org.openhab.model",
"org.openhab.ui"
] | javax.servlet; org.eclipse.emf; org.openhab.model; org.openhab.ui; | 750,617 |
private void init() {
setLayout(new BorderLayout());
Box box = Box.createVerticalBox();
setBorder(makeBorder());
box.add(makeTitlePanel());
box.add(createScopePanel(true));
box.add(createFieldPanel());
box.add(createTypePanel());
add(box, BorderLayout... | void function() { setLayout(new BorderLayout()); Box box = Box.createVerticalBox(); setBorder(makeBorder()); box.add(makeTitlePanel()); box.add(createScopePanel(true)); box.add(createFieldPanel()); box.add(createTypePanel()); add(box, BorderLayout.NORTH); add(createStringPanel(), BorderLayout.CENTER); } | /**
* Initialize the GUI components and layout.
*/ | Initialize the GUI components and layout | init | {
"repo_name": "tuanhq/jmeter",
"path": "src/components/org/apache/jmeter/assertions/gui/AssertionGui.java",
"license": "apache-2.0",
"size": 15221
} | [
"java.awt.BorderLayout",
"javax.swing.Box"
] | import java.awt.BorderLayout; import javax.swing.Box; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 865,665 |
public boolean ends(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException {
ip1.getStart(s1);
ip1.getEnd(e1);
ip2.getStart(s2);
ip2.getEnd(e2);
return ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), s1, s2) >= 0
&& ch.compare(ip1.getTypeTa... | boolean function(AIntervalPointable ip1, AIntervalPointable ip2) throws HyracksDataException { ip1.getStart(s1); ip1.getEnd(e1); ip2.getStart(s2); ip2.getEnd(e2); return ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), s1, s2) >= 0 && ch.compare(ip1.getTypeTag(), ip2.getTypeTag(), e1, e2) == 0; } | /**
* Anything from interval 1 is from the ending part of interval 2.
*
* @param ip1
* @param ip2
* @return boolean
* @throws HyracksDataException
* @see #endedBy(AIntervalPointable, AIntervalPointable)
*/ | Anything from interval 1 is from the ending part of interval 2 | ends | {
"repo_name": "ecarm002/incubator-asterixdb",
"path": "asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/temporal/IntervalLogic.java",
"license": "apache-2.0",
"size": 7626
} | [
"org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable",
"org.apache.hyracks.api.exceptions.HyracksDataException"
] | import org.apache.asterix.om.pointables.nonvisitor.AIntervalPointable; import org.apache.hyracks.api.exceptions.HyracksDataException; | import org.apache.asterix.om.pointables.nonvisitor.*; import org.apache.hyracks.api.exceptions.*; | [
"org.apache.asterix",
"org.apache.hyracks"
] | org.apache.asterix; org.apache.hyracks; | 2,733,935 |
LocalDateTime getLastChangeDateTime(); | LocalDateTime getLastChangeDateTime(); | /**
* Gets the last change date time.
*
* @return the last change date time
*/ | Gets the last change date time | getLastChangeDateTime | {
"repo_name": "jspare-projects/jspare-framework",
"path": "jspare-server/src/main/java/org/jspare/server/transaction/Transaction.java",
"license": "apache-2.0",
"size": 1752
} | [
"java.time.LocalDateTime"
] | import java.time.LocalDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 669,632 |
final String name = mouseNameTextBox.getText().toUpperCase().trim();
mouseNameTextBox.setFocus(true);
// // Stock code must be between 1 and 10 chars that are numbers, letters,
// // or dots.
// if (!name.matches("^[0-9a-zA-Z\\.]{1,10}$")) {
// Window.alert("'" + name + "' is not a valid symbol.");
// mouse... | final String name = mouseNameTextBox.getText().toUpperCase().trim(); mouseNameTextBox.setFocus(true); mouseNameTextBox.setText(""); MouseServiceAsync mouseService = GWT.create(MouseService.class); | /**
* Add stock to FlexTable. Executed when the user clicks the addStockButton
* or presses enter in the newSymbolTextBox.
*/ | Add stock to FlexTable. Executed when the user clicks the addStockButton or presses enter in the newSymbolTextBox | addMouse | {
"repo_name": "smithcre/mouseroom",
"path": "src/main/java/net/mouseroom/client/MouseGridPage.java",
"license": "mit",
"size": 7062
} | [
"com.google.gwt.core.client.GWT"
] | import com.google.gwt.core.client.GWT; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,740,034 |
public void cancel() {
timer_.stop();
}
private Signal done_;
private int start_;
private int stop_;
private int current_;
private WTimer timer_; | void function() { timer_.stop(); } private Signal done_; private int start_; private int stop_; private int current_; private WTimer timer_; | /**
* brief Cancel the count down.
*/ | brief Cancel the count down | cancel | {
"repo_name": "kdeforche/jwt",
"path": "examples/mission/src/eu/webtoolkit/jwt/examples/mission/CountDownWidget.java",
"license": "gpl-2.0",
"size": 1877
} | [
"eu.webtoolkit.jwt.Signal",
"eu.webtoolkit.jwt.WTimer"
] | import eu.webtoolkit.jwt.Signal; import eu.webtoolkit.jwt.WTimer; | import eu.webtoolkit.jwt.*; | [
"eu.webtoolkit.jwt"
] | eu.webtoolkit.jwt; | 1,042,076 |
public final String path() {
return RestUtils.decodeComponent(rawPath());
} | final String function() { return RestUtils.decodeComponent(rawPath()); } | /**
* The path part of the URI (without the query string), decoded.
*/ | The path part of the URI (without the query string), decoded | path | {
"repo_name": "jw0201/elastic",
"path": "core/src/main/java/org/elasticsearch/rest/RestRequest.java",
"license": "apache-2.0",
"size": 5145
} | [
"org.elasticsearch.rest.support.RestUtils"
] | import org.elasticsearch.rest.support.RestUtils; | import org.elasticsearch.rest.support.*; | [
"org.elasticsearch.rest"
] | org.elasticsearch.rest; | 1,495,783 |
public final void changeBase(final double[][] matrix) {
if (matrix == null) {
throw new InvalidParameterException();
}
final Set<Point> set = new HashSet<>();
final Set<Triangle> mesh = new HashSet<>();
// Make a list of all the points, and base change t... | final void function(final double[][] matrix) { if (matrix == null) { throw new InvalidParameterException(); } final Set<Point> set = new HashSet<>(); final Set<Triangle> mesh = new HashSet<>(); for (final Triangle t : this) { set.addAll(t.getPoints()); MatrixMethod.changeBase(t.getNormal(), matrix); mesh.add(t); } for ... | /**
* Changes the base of all the points contained in the mesh.
* @param matrix
* the change base matrix
*/ | Changes the base of all the points contained in the mesh | changeBase | {
"repo_name": "Nantes1900/Nantes-1900",
"path": "src/fr/nantes1900/models/basis/Mesh.java",
"license": "gpl-3.0",
"size": 19942
} | [
"fr.nantes1900.utils.MatrixMethod",
"java.security.InvalidParameterException",
"java.util.HashSet",
"java.util.Set"
] | import fr.nantes1900.utils.MatrixMethod; import java.security.InvalidParameterException; import java.util.HashSet; import java.util.Set; | import fr.nantes1900.utils.*; import java.security.*; import java.util.*; | [
"fr.nantes1900.utils",
"java.security",
"java.util"
] | fr.nantes1900.utils; java.security; java.util; | 2,207,773 |
public LinkFilter getLinkFilter() {
return linkFilter;
} | LinkFilter function() { return linkFilter; } | /**
* Gets the link filter.
*
* @return the link filter
*/ | Gets the link filter | getLinkFilter | {
"repo_name": "marosmars/dhcp",
"path": "Jagornet-DHCP/src/com/jagornet/dhcp/server/request/binding/V4AddressBindingPool.java",
"license": "gpl-3.0",
"size": 8456
} | [
"com.jagornet.dhcp.xml.LinkFilter"
] | import com.jagornet.dhcp.xml.LinkFilter; | import com.jagornet.dhcp.xml.*; | [
"com.jagornet.dhcp"
] | com.jagornet.dhcp; | 2,525,365 |
String getString() throws IOException; | String getString() throws IOException; | /**
* Returns the contents of the file item as a String, using the default
* character encoding.
*
* @return the contents of the file item as a String, using the default
* character encoding.
* @exception IOException
*/ | Returns the contents of the file item as a String, using the default character encoding | getString | {
"repo_name": "Sandyarathi/Lab2gRPC",
"path": "lib/netty/codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java",
"license": "bsd-3-clause",
"size": 6186
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,665,145 |
public static String[] getNames(JSONObject jo) {
int length = jo.length();
if (length == 0) {
return null;
}
Iterator iterator = jo.keys();
String[] names = new String[length];
int i = 0;
while (iterator.hasNext()) {
names[i] = (String)... | static String[] function(JSONObject jo) { int length = jo.length(); if (length == 0) { return null; } Iterator iterator = jo.keys(); String[] names = new String[length]; int i = 0; while (iterator.hasNext()) { names[i] = (String) iterator.next(); i += 1; } return names; } | /**
* Get an array of field names from a JSONObject.
*
* @return An array of field names, or null if there are no names.
*/ | Get an array of field names from a JSONObject | getNames | {
"repo_name": "igorekpotworek/facebook4j",
"path": "facebook4j-core/src/main/java/facebook4j/internal/org/json/JSONObject.java",
"license": "apache-2.0",
"size": 56492
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,680,738 |
@Nullable
public ProcessStats getProcess() {
return process;
} | ProcessStats function() { return process; } | /**
* Process level statistics.
*/ | Process level statistics | getProcess | {
"repo_name": "jprante/elasticsearch-server",
"path": "server/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java",
"license": "apache-2.0",
"size": 10183
} | [
"org.elasticsearch.monitor.process.ProcessStats"
] | import org.elasticsearch.monitor.process.ProcessStats; | import org.elasticsearch.monitor.process.*; | [
"org.elasticsearch.monitor"
] | org.elasticsearch.monitor; | 2,607,736 |
public Set<TypeNode> getReferencing() {
return referencing;
} | Set<TypeNode> function() { return referencing; } | /**
* Type nodes used in all-of
* @return
*/ | Type nodes used in all-of | getReferencing | {
"repo_name": "UltimateDogg/yang2swagger-generator",
"path": "swagger-generator/src/main/java/com/mrv/yangtools/codegen/impl/postprocessor/TypeNode.java",
"license": "epl-1.0",
"size": 1776
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,614,390 |
public void testSetMinCRLNumberLjava_math_BigInteger() {
X509CRLSelector selector = new X509CRLSelector();
BigInteger minCRL = new BigInteger("10000");
CRL crl = new TestCRL(minCRL);
selector.setMinCRLNumber(null);
assertTrue("Any CRL should match in the case of null minCRLN... | void function() { X509CRLSelector selector = new X509CRLSelector(); BigInteger minCRL = new BigInteger("10000"); CRL crl = new TestCRL(minCRL); selector.setMinCRLNumber(null); assertTrue(STR, selector.match(crl)); selector.setMinCRLNumber(minCRL); assertTrue(STR, selector .match(crl)); selector.setMinCRLNumber(new BigI... | /**
* setMinCRLNumber(BigInteger minCRL) method testing. Tests if CRLs with any
* crl number value match the selector in the case of null crlNumber
* criteria, if specified minCRL value matches the selector, and if CRL with
* inappropriate crlNumber value does not match the selector.
*/ | setMinCRLNumber(BigInteger minCRL) method testing. Tests if CRLs with any crl number value match the selector in the case of null crlNumber criteria, if specified minCRL value matches the selector, and if CRL with inappropriate crlNumber value does not match the selector | testSetMinCRLNumberLjava_math_BigInteger | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "luni/src/test/java/tests/security/cert/X509CRLSelector2Test.java",
"license": "gpl-2.0",
"size": 23916
} | [
"java.math.BigInteger",
"java.security.cert.X509CRLSelector"
] | import java.math.BigInteger; import java.security.cert.X509CRLSelector; | import java.math.*; import java.security.cert.*; | [
"java.math",
"java.security"
] | java.math; java.security; | 868,054 |
public static Class<?> resolveType(Type type, boolean optional) {
if (type instanceof Class) {
return (Class<?>) type;
}
if (optional && type instanceof OptionalLazySymbol) {
return ((OptionalLazySymbol) type).resolve();
}
return resolveClass(type.getT... | static Class<?> function(Type type, boolean optional) { if (type instanceof Class) { return (Class<?>) type; } if (optional && type instanceof OptionalLazySymbol) { return ((OptionalLazySymbol) type).resolve(); } return resolveClass(type.getTypeName(), optional); } private static final Class<?>[] NO_CLASSES = {}; | /**
* Resolves a {@link Type} to a {@link Class}.
*
* @param type the type to resolve
* @param optional if true, resolution failure returns null
* @return the resolved class or null if resolution fails and {@code optional} is true
*/ | Resolves a <code>Type</code> to a <code>Class</code> | resolveType | {
"repo_name": "zapster/graal-core",
"path": "graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/graphbuilderconf/InvocationPlugins.java",
"license": "gpl-2.0",
"size": 37406
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 993,810 |
public BigDecimal getAppointmentRequestedFteQuantity() {
return appointmentRequestedFteQuantity;
} | BigDecimal function() { return appointmentRequestedFteQuantity; } | /**
* Gets the appointmentRequestedFteQuantity attribute.
*
* @return Returns the appointmentRequestedFteQuantity
*/ | Gets the appointmentRequestedFteQuantity attribute | getAppointmentRequestedFteQuantity | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionSalaryTotal.java",
"license": "agpl-3.0",
"size": 7347
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,190,536 |
public void setSimOperatorNameForPhone(int phoneId, String name) {
setTelephonyProperty(phoneId,
TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, name);
} | void function(int phoneId, String name) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, name); } | /**
* Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the given phone.
*
* @hide
*/ | Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the given phone | setSimOperatorNameForPhone | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/telephony/java/android/telephony/TelephonyManager.java",
"license": "gpl-3.0",
"size": 140948
} | [
"com.android.internal.telephony.TelephonyProperties"
] | import com.android.internal.telephony.TelephonyProperties; | import com.android.internal.telephony.*; | [
"com.android.internal"
] | com.android.internal; | 2,196,163 |
public Date getBalanceDate() {
return SpringContext.getBean(KEMService.class).getCurrentDate();
}
| Date function() { return SpringContext.getBean(KEMService.class).getCurrentDate(); } | /**
* Gets the Balance Date which is the Current System/Process date
*
* @return the Balance Date
*/ | Gets the Balance Date which is the Current System/Process date | getBalanceDate | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/businessobject/HoldingTaxLot.java",
"license": "apache-2.0",
"size": 10877
} | [
"java.sql.Date",
"org.kuali.kfs.module.endow.document.service.KEMService",
"org.kuali.kfs.sys.context.SpringContext"
] | import java.sql.Date; import org.kuali.kfs.module.endow.document.service.KEMService; import org.kuali.kfs.sys.context.SpringContext; | import java.sql.*; import org.kuali.kfs.module.endow.document.service.*; import org.kuali.kfs.sys.context.*; | [
"java.sql",
"org.kuali.kfs"
] | java.sql; org.kuali.kfs; | 2,460,086 |
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
| void function(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } | /**
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This removes a listener. | removeListener | {
"repo_name": "KAMP-Research/KAMP4APS",
"path": "edu.kit.ipd.sdq.kamp4aps.aps.edit/src/edu/kit/ipd/sdq/kamp4aps/model/aPS/MechanicalComponents/provider/MechanicalComponentsItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 9871
} | [
"org.eclipse.emf.edit.provider.INotifyChangedListener"
] | import org.eclipse.emf.edit.provider.INotifyChangedListener; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,384,396 |
public static void onWorldUnloaded(World world) {
if (registries.containsKey(world)) {
registries.get(world).onWorldUnloaded();
registries.remove(world);
}
} | static void function(World world) { if (registries.containsKey(world)) { registries.get(world).onWorldUnloaded(); registries.remove(world); } } | /**
* Called whenever a world is unloaded. Unload the relevant registry, if we
* have one.
*
* @param world {@link World} The world being unloaded.
*/ | Called whenever a world is unloaded. Unload the relevant registry, if we have one | onWorldUnloaded | {
"repo_name": "TechReborn/TechReborn",
"path": "RebornCore/src/main/java/reborncore/common/multiblock/MultiblockRegistry.java",
"license": "mit",
"size": 5783
} | [
"net.minecraft.world.World"
] | import net.minecraft.world.World; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 773,158 |
public Date getEndDate() {
return endDate;
} | Date function() { return endDate; } | /**
* Returns the date and time the activity ended, if applicable.
*
* @return
* The date and time the activity ended, or null if the activity is
* still in progress or if the end time is unknown.
*/ | Returns the date and time the activity ended, if applicable | getEndDate | {
"repo_name": "glyptodon/guacamole-client",
"path": "guacamole/src/main/java/org/apache/guacamole/rest/history/APIActivityRecord.java",
"license": "apache-2.0",
"size": 3807
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 889,812 |
public void test_5749() throws SQLException
{
Statement s = createStatement();
s.executeUpdate("create table t5749(v varchar(5))");
s.executeUpdate(
"create procedure p5749 (a varchar(5)) modifies sql data " +
"external name '" + RoutineTest.class.getName() + ".p5... | void function() throws SQLException { Statement s = createStatement(); s.executeUpdate(STR); s.executeUpdate( STR + STR + RoutineTest.class.getName() + STR + STR); CallableStatement cs = prepareCall(STR); cs.setString(1, STR); try { cs.execute(); fail(); } catch (SQLException e) { assertSQLState("22001", e); } try { s.... | /**
* DERBY-5749: Too long (non-blank) argument for VARCHAR parameter does not
* throw as expected.
*/ | DERBY-5749: Too long (non-blank) argument for VARCHAR parameter does not throw as expected | test_5749 | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/lang/RoutineTest.java",
"license": "apache-2.0",
"size": 28274
} | [
"java.sql.CallableStatement",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,015,386 |
HaWorkVO take(long serverId); | HaWorkVO take(long serverId); | /**
* Takes an available HA work item.
*
* @param serverId server that is taking this.
* @return WorkVO if there's one to work on; null if none.
*/ | Takes an available HA work item | take | {
"repo_name": "wido/cloudstack",
"path": "server/src/main/java/com/cloud/ha/dao/HighAvailabilityDao.java",
"license": "apache-2.0",
"size": 2850
} | [
"com.cloud.ha.HaWorkVO"
] | import com.cloud.ha.HaWorkVO; | import com.cloud.ha.*; | [
"com.cloud.ha"
] | com.cloud.ha; | 1,614,990 |
EAttribute getPMUVoltageMeter_VoltageCMag(); | EAttribute getPMUVoltageMeter_VoltageCMag(); | /**
* Returns the meta object for the attribute '{@link outagePreventionJointarget.PMUVoltageMeter#getVoltageCMag <em>Voltage CMag</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Voltage CMag</em>'.
* @see outagePreventionJointarget.PMUVoltageMeter#ge... | Returns the meta object for the attribute '<code>outagePreventionJointarget.PMUVoltageMeter#getVoltageCMag Voltage CMag</code>'. | getPMUVoltageMeter_VoltageCMag | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/outagePreventionJointarget/OutagePreventionJointargetPackage.java",
"license": "mit",
"size": 67109
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 823,875 |
public WalletCollection wallets() throws
IOException, Client.UnexpectedStatusCodeException {
return wallets(true);
} | WalletCollection function() throws IOException, Client.UnexpectedStatusCodeException { return wallets(true); } | /**
* Getter all the wallets belonging to a user. Returns populated WalletCollection object. To
* retrieve reference without fetching wallets use 'wallets(false)'
* @return WalletCollection
* @throws IOException
* @throws Client.UnexpectedStatusCodeException
* @see co.gem.round.WalletColle... | Getter all the wallets belonging to a user. Returns populated WalletCollection object. To retrieve reference without fetching wallets use 'wallets(false)' | wallets | {
"repo_name": "GemHQ/round-java",
"path": "src/main/java/co/gem/round/User.java",
"license": "mit",
"size": 3649
} | [
"co.gem.round.patchboard.Client",
"java.io.IOException"
] | import co.gem.round.patchboard.Client; import java.io.IOException; | import co.gem.round.patchboard.*; import java.io.*; | [
"co.gem.round",
"java.io"
] | co.gem.round; java.io; | 2,313,105 |
// Create the business group name input text element
if (bulkMode) {
businessGroupName = uifactory.addTextElement("create.form.title.bgnames", "create.form.title.bgnames", 10 * BusinessGroup.MAX_GROUP_NAME_LENGTH, "",
formLayout);
businessGroupName.setExampleKey("crea... | if (bulkMode) { businessGroupName = uifactory.addTextElement(STR, STR, 10 * BusinessGroup.MAX_GROUP_NAME_LENGTH, STRcreate.form.message.example.groupSTRcreate.form.title.bgnameSTRcreate.form.title.bgnameSTRSTRcreate.form.error.nameTooLongSTRcreate.form.error.illegalNameSTRcreate.form.title.descriptionSTRcreate.form.tit... | /**
* org.olat.presentation.framework.control.Controller, org.olat.presentation.framework.UserRequest)
*/ | org.olat.presentation.framework.control.Controller, org.olat.presentation.framework.UserRequest) | initForm | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/main/java/org/olat/presentation/group/BusinessGroupFormController.java",
"license": "apache-2.0",
"size": 19206
} | [
"org.olat.data.group.BusinessGroup"
] | import org.olat.data.group.BusinessGroup; | import org.olat.data.group.*; | [
"org.olat.data"
] | org.olat.data; | 1,255,423 |
@Nonnull
public TimeOffCollectionRequest orderBy(@Nonnull final String value) {
addOrderByOption(value);
return this;
} | TimeOffCollectionRequest function(@Nonnull final String value) { addOrderByOption(value); return this; } | /**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/ | Sets the order by clause for the request | orderBy | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TimeOffCollectionRequest.java",
"license": "mit",
"size": 5556
} | [
"com.microsoft.graph.requests.TimeOffCollectionRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.TimeOffCollectionRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,641,893 |
public String getOptionsCompletion() {
StringBuilder desc = new StringBuilder();
// List all options
List<Field> allFields = Lists.newArrayList();
for (Class<? extends OptionsBase> optionsClass : impl.getOptionsClasses()) {
allFields.addAll(impl.getAnnotatedFieldsFor(optionsClass));
} | String function() { StringBuilder desc = new StringBuilder(); List<Field> allFields = Lists.newArrayList(); for (Class<? extends OptionsBase> optionsClass : impl.getOptionsClasses()) { allFields.addAll(impl.getAnnotatedFieldsFor(optionsClass)); } | /**
* Returns a string listing the possible flag completion for this command along with the command
* completion if any. See {@link OptionsUsage#getCompletion(Field, StringBuilder)} for more
* details on the format for the flag completion.
*/ | Returns a string listing the possible flag completion for this command along with the command completion if any. See <code>OptionsUsage#getCompletion(Field, StringBuilder)</code> for more details on the format for the flag completion | getOptionsCompletion | {
"repo_name": "iamthearm/bazel",
"path": "src/main/java/com/google/devtools/common/options/OptionsParser.java",
"license": "apache-2.0",
"size": 23926
} | [
"com.google.common.collect.Lists",
"java.lang.reflect.Field",
"java.util.List"
] | import com.google.common.collect.Lists; import java.lang.reflect.Field; import java.util.List; | import com.google.common.collect.*; import java.lang.reflect.*; import java.util.*; | [
"com.google.common",
"java.lang",
"java.util"
] | com.google.common; java.lang; java.util; | 735,127 |
static boolean isValidURL(final String urlStr) {
boolean validURL = false;
if (urlStr != null && urlStr.length() > 0) {
try {
new URL(urlStr);
validURL = true;
}
catch (MalformedURLException e) {
validURL = false;
... | static boolean isValidURL(final String urlStr) { boolean validURL = false; if (urlStr != null && urlStr.length() > 0) { try { new URL(urlStr); validURL = true; } catch (MalformedURLException e) { validURL = false; } } return validURL; } | /**
* Utility method for testing validity of a URL.
*/ | Utility method for testing validity of a URL | isValidURL | {
"repo_name": "trinisofttechnologies/countly-sdk-js",
"path": "src/android/Countly.java",
"license": "mit",
"size": 55808
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 2,412,725 |
private static Set<TableRowkeyPair> getRegionStartKeys(String tableName , RegionLocator table) throws IOException {
byte[][] byteKeys = table.getStartKeys();
Set<TableRowkeyPair> ret = new TreeSet<TableRowkeyPair>();
for (byte[] byteKey : byteKeys) {
// phoenix-2216: start : passing the ... | static Set<TableRowkeyPair> function(String tableName , RegionLocator table) throws IOException { byte[][] byteKeys = table.getStartKeys(); Set<TableRowkeyPair> ret = new TreeSet<TableRowkeyPair>(); for (byte[] byteKey : byteKeys) { ret.add(new TableRowkeyPair(tableName, new ImmutableBytesWritable(byteKey))); } return ... | /**
* Return the start keys of all of the regions in this table,
* as a list of ImmutableBytesWritable.
*/ | Return the start keys of all of the regions in this table, as a list of ImmutableBytesWritable | getRegionStartKeys | {
"repo_name": "twdsilva/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java",
"license": "apache-2.0",
"size": 33353
} | [
"java.io.IOException",
"java.util.Set",
"java.util.TreeSet",
"org.apache.hadoop.hbase.client.RegionLocator",
"org.apache.hadoop.hbase.io.ImmutableBytesWritable",
"org.apache.phoenix.mapreduce.bulkload.TableRowkeyPair"
] | import java.io.IOException; import java.util.Set; import java.util.TreeSet; import org.apache.hadoop.hbase.client.RegionLocator; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.phoenix.mapreduce.bulkload.TableRowkeyPair; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.io.*; import org.apache.phoenix.mapreduce.bulkload.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.phoenix"
] | java.io; java.util; org.apache.hadoop; org.apache.phoenix; | 2,174,088 |
@XmlElements({ @XmlElement(name = "input", type = ModuleTypeInputConnector.class),
@XmlElement(name = "output", type = ModuleTypeOutputConnector.class),
@XmlElement(name = "variable", type = VariableDeclaration.class), @XmlElement(name = "code", type = String.class) })
protected void setContents(List<... | @XmlElements({ @XmlElement(name = "input", type = ModuleTypeInputConnector.class), @XmlElement(name = STR, type = ModuleTypeOutputConnector.class), @XmlElement(name = STR, type = VariableDeclaration.class), @XmlElement(name = "code", type = String.class) }) void function(List<Object> lst) { decls.clear(); for (Object o... | /**
* Set the contents of the object. This is a method that is meant for JAXB.
*
* @param lst - the contents
*/ | Set the contents of the object. This is a method that is meant for JAXB | setContents | {
"repo_name": "StefanTT/selfbus-sbhome",
"path": "selfbus-sbhome-service/src/main/java/org/selfbus/sbhome/service/model/module/ModuleType.java",
"license": "gpl-3.0",
"size": 3642
} | [
"java.util.List",
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.XmlElements",
"org.apache.commons.lang3.Validate",
"org.selfbus.sbhome.service.model.variable.VariableDeclaration"
] | import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import org.apache.commons.lang3.Validate; import org.selfbus.sbhome.service.model.variable.VariableDeclaration; | import java.util.*; import javax.xml.bind.annotation.*; import org.apache.commons.lang3.*; import org.selfbus.sbhome.service.model.variable.*; | [
"java.util",
"javax.xml",
"org.apache.commons",
"org.selfbus.sbhome"
] | java.util; javax.xml; org.apache.commons; org.selfbus.sbhome; | 2,779,263 |
private long purge(long lastPurgeTime) {
long now = System.currentTimeMillis();
if (now < lastPurgeTime + purgeTimeout) {
return lastPurgeTime;
}
ArrayList<Connection> conWithOldCalls = new ArrayList<Connection>();
// get the list of channels from list of keys.
synchroni... | long function(long lastPurgeTime) { long now = System.currentTimeMillis(); if (now < lastPurgeTime + purgeTimeout) { return lastPurgeTime; } ArrayList<Connection> conWithOldCalls = new ArrayList<Connection>(); synchronized (writeSelector.keys()) { for (SelectionKey key : writeSelector.keys()) { Connection connection = ... | /**
* If there were some calls that have not been sent out for a
* long time, we close the connection.
* @return the time of the purge.
*/ | If there were some calls that have not been sent out for a long time, we close the connection | purge | {
"repo_name": "Guavus/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java",
"license": "apache-2.0",
"size": 94477
} | [
"java.nio.channels.SelectionKey",
"java.util.ArrayList"
] | import java.nio.channels.SelectionKey; import java.util.ArrayList; | import java.nio.channels.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 487,984 |
void setBase(NamedElement value); | void setBase(NamedElement value); | /**
* Sets the value of the '{@link com.rockwellcollins.atc.resolute.resolute.NestedDotID#getBase <em>Base</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Base</em>' reference.
* @see #getBase()
* @generated
*/ | Sets the value of the '<code>com.rockwellcollins.atc.resolute.resolute.NestedDotID#getBase Base</code>' reference. | setBase | {
"repo_name": "smaccm/smaccm",
"path": "fm-workbench/resolute/com.rockwellcollins.atc.resolute/src-gen/com/rockwellcollins/atc/resolute/resolute/NestedDotID.java",
"license": "bsd-3-clause",
"size": 2463
} | [
"org.osate.aadl2.NamedElement"
] | import org.osate.aadl2.NamedElement; | import org.osate.aadl2.*; | [
"org.osate.aadl2"
] | org.osate.aadl2; | 438,062 |
public void testSummarize()
{
System.out.println("summarize");
Evaluator<? super InputType, ? extends TargetType> evaluator =
this.createEvaluator();
AbstractSupervisedCostFunction<InputType,TargetType> instance =
this.createInstance();
instance.setCostPar... | void function() { System.out.println(STR); Evaluator<? super InputType, ? extends TargetType> evaluator = this.createEvaluator(); AbstractSupervisedCostFunction<InputType,TargetType> instance = this.createInstance(); instance.setCostParameters( this.createRandomCostParameters() ); ArrayList<TargetEstimatePair<TargetTyp... | /**
* Test of summarize method, of class AbstractSupervisedCostFunction.
*/ | Test of summarize method, of class AbstractSupervisedCostFunction | testSummarize | {
"repo_name": "codeaudit/Foundry",
"path": "Components/LearningCore/Test/gov/sandia/cognition/learning/function/cost/SupervisedCostFunctionTestHarness.java",
"license": "bsd-3-clause",
"size": 10162
} | [
"gov.sandia.cognition.evaluator.Evaluator",
"gov.sandia.cognition.learning.data.TargetEstimatePair",
"java.util.ArrayList"
] | import gov.sandia.cognition.evaluator.Evaluator; import gov.sandia.cognition.learning.data.TargetEstimatePair; import java.util.ArrayList; | import gov.sandia.cognition.evaluator.*; import gov.sandia.cognition.learning.data.*; import java.util.*; | [
"gov.sandia.cognition",
"java.util"
] | gov.sandia.cognition; java.util; | 310,535 |
private void addAllOperationMappings() {
EList<OperationMapping> operationMappings = myClassifierMapping.getOperationMappings();
for (OperationMapping operationMapping : operationMappings) {
addOperationMappingView(operationMapping);
}
} | void function() { EList<OperationMapping> operationMappings = myClassifierMapping.getOperationMappings(); for (OperationMapping operationMapping : operationMappings) { addOperationMappingView(operationMapping); } } | /**
* Adds all the operation mappings which belongs to the classifier mapping.
*/ | Adds all the operation mappings which belongs to the classifier mapping | addAllOperationMappings | {
"repo_name": "mschoettle/ecse429-fall15-project",
"path": "ca.mcgill.sel.ram.gui/src/ca/mcgill/sel/ram/ui/views/structural/MappingContainerView.java",
"license": "gpl-2.0",
"size": 8754
} | [
"ca.mcgill.sel.ram.OperationMapping",
"org.eclipse.emf.common.util.EList"
] | import ca.mcgill.sel.ram.OperationMapping; import org.eclipse.emf.common.util.EList; | import ca.mcgill.sel.ram.*; import org.eclipse.emf.common.util.*; | [
"ca.mcgill.sel",
"org.eclipse.emf"
] | ca.mcgill.sel; org.eclipse.emf; | 1,168,507 |
static void generateBgpExportPolicy(
LeafBgpPeerGroup lpg, String vrfName, boolean ipv4, Configuration c, Warnings w) {
List<Statement> exportPolicyStatements = new ArrayList<>();
if (lpg.getNextHopSelf() != null && lpg.getNextHopSelf()) {
exportPolicyStatements.add(new SetNextHop(SelfNextHop.getI... | static void generateBgpExportPolicy( LeafBgpPeerGroup lpg, String vrfName, boolean ipv4, Configuration c, Warnings w) { List<Statement> exportPolicyStatements = new ArrayList<>(); if (lpg.getNextHopSelf() != null && lpg.getNextHopSelf()) { exportPolicyStatements.add(new SetNextHop(SelfNextHop.getInstance())); } if (lpg... | /**
* Creates a {@link RoutingPolicy} to be used as the BGP export policy for the given {@link
* LeafBgpPeerGroup}. The generated policy is added to the given configuration's routing policies.
*/ | Creates a <code>RoutingPolicy</code> to be used as the BGP export policy for the given <code>LeafBgpPeerGroup</code>. The generated policy is added to the given configuration's routing policies | generateBgpExportPolicy | {
"repo_name": "intentionet/batfish",
"path": "projects/batfish/src/main/java/org/batfish/representation/cisco/CiscoConversions.java",
"license": "apache-2.0",
"size": 94691
} | [
"com.google.common.collect.ImmutableList",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Objects",
"java.util.stream.Stream",
"org.batfish.common.Warnings",
"org.batfish.datamodel.Configuration",
"org.batfish.datamodel.routing_policy.RoutingPolicy",
"org.batfish.data... | import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Stream; import org.batfish.common.Warnings; import org.batfish.datamodel.Configuration; import org.batfish.datamodel.routing_policy.RoutingPo... | import com.google.common.collect.*; import java.util.*; import java.util.stream.*; import org.batfish.common.*; import org.batfish.datamodel.*; import org.batfish.datamodel.routing_policy.*; import org.batfish.datamodel.routing_policy.expr.*; import org.batfish.datamodel.routing_policy.statement.*; | [
"com.google.common",
"java.util",
"org.batfish.common",
"org.batfish.datamodel"
] | com.google.common; java.util; org.batfish.common; org.batfish.datamodel; | 1,423,624 |
@Test
public void generatedProjectConfigurationListIsUnionOfAllTargetConfigurations()
throws IOException {
BuildTarget buildTarget1 = BuildTarget.builder(rootPath, "//foo", "rule1").build();
TargetNode<?, ?> node1 = AppleLibraryBuilder
.createBuilder(buildTarget1)
.setConfigs(
... | void function() throws IOException { BuildTarget buildTarget1 = BuildTarget.builder(rootPath, STRConf1STRConf2STR TargetNode<?, ?> node2 = AppleLibraryBuilder .createBuilder(buildTarget2) .setConfigs( ImmutableSortedMap.of( "Conf2STRConf3", ImmutableMap.of())) .build(); ProjectGenerator projectGenerator = createProject... | /**
* The project configurations should have named entries corresponding to every existing target
* configuration for targets in the project.
*/ | The project configurations should have named entries corresponding to every existing target configuration for targets in the project | generatedProjectConfigurationListIsUnionOfAllTargetConfigurations | {
"repo_name": "daedric/buck",
"path": "test/com/facebook/buck/apple/project_generator/ProjectGeneratorTest.java",
"license": "apache-2.0",
"size": 195142
} | [
"com.facebook.buck.apple.AppleLibraryBuilder",
"com.facebook.buck.apple.xcode.xcodeproj.PBXProject",
"com.facebook.buck.apple.xcode.xcodeproj.XCBuildConfiguration",
"com.facebook.buck.model.BuildTarget",
"com.facebook.buck.rules.TargetNode",
"com.google.common.collect.ImmutableMap",
"com.google.common.c... | import com.facebook.buck.apple.AppleLibraryBuilder; import com.facebook.buck.apple.xcode.xcodeproj.PBXProject; import com.facebook.buck.apple.xcode.xcodeproj.XCBuildConfiguration; import com.facebook.buck.model.BuildTarget; import com.facebook.buck.rules.TargetNode; import com.google.common.collect.ImmutableMap; import... | import com.facebook.buck.apple.*; import com.facebook.buck.apple.xcode.xcodeproj.*; import com.facebook.buck.model.*; import com.facebook.buck.rules.*; import com.google.common.collect.*; import java.io.*; import java.util.*; import org.hamcrest.*; import org.junit.*; | [
"com.facebook.buck",
"com.google.common",
"java.io",
"java.util",
"org.hamcrest",
"org.junit"
] | com.facebook.buck; com.google.common; java.io; java.util; org.hamcrest; org.junit; | 1,904,621 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the property descriptors for the adapted class. | getPropertyDescriptors | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/citygml/texturedsurface/provider/AbstractAppearanceTypeItemProvider.java",
"license": "apache-2.0",
"size": 5173
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 2,532,203 |
@Override
public void sendRedirect(String location) throws IOException {
sendRedirect(location, SC_FOUND);
} | void function(String location) throws IOException { sendRedirect(location, SC_FOUND); } | /**
* Send a temporary redirect to the specified redirect location URL.
*
* @param location Location URL to redirect to
*
* @exception IllegalStateException if this response has
* already been committed
* @exception IOException if an input/output error occurs
*/ | Send a temporary redirect to the specified redirect location URL | sendRedirect | {
"repo_name": "thanple/tomcatsrc",
"path": "java/org/apache/catalina/connector/Response.java",
"license": "apache-2.0",
"size": 54096
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,571,638 |
public void removePropertyChangeListener(PropertyChangeListener l) {
AccessibleContext ac = getCurrentAccessibleContext();
if (ac != null) {
ac.removePropertyChangeListener(l);
} else {
super.removePropertyChangeListener... | void function(PropertyChangeListener l) { AccessibleContext ac = getCurrentAccessibleContext(); if (ac != null) { ac.removePropertyChangeListener(l); } else { super.removePropertyChangeListener(l); } } | /**
* Remove a PropertyChangeListener from the listener list.
* This removes a PropertyChangeListener that was registered
* for all properties.
*
* @param l The PropertyChangeListener to be removed
*/ | Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties | removePropertyChangeListener | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JTree.java",
"license": "apache-2.0",
"size": 215008
} | [
"java.beans.PropertyChangeListener",
"javax.accessibility.AccessibleContext"
] | import java.beans.PropertyChangeListener; import javax.accessibility.AccessibleContext; | import java.beans.*; import javax.accessibility.*; | [
"java.beans",
"javax.accessibility"
] | java.beans; javax.accessibility; | 1,403,512 |
@Override
public boolean retainAll(Collection<?> collection) {
boolean removed = false;
for (int i=mSize-1; i>=0; i--) {
if (!collection.contains(mArray[i])) {
removeAt(i);
removed = true;
}
}
return removed;
} | boolean function(Collection<?> collection) { boolean removed = false; for (int i=mSize-1; i>=0; i--) { if (!collection.contains(mArray[i])) { removeAt(i); removed = true; } } return removed; } | /**
* Remove all values in the array set that do <b>not</b> exist in the given collection.
* @param collection The collection whose contents are to be used to determine which
* values to keep.
* @return Returns true if any values were removed from the array set, else false.
*/ | Remove all values in the array set that do not exist in the given collection | retainAll | {
"repo_name": "codehz/container",
"path": "lib/src/main/java/com/lody/virtual/helper/utils/collection/ArraySet.java",
"license": "gpl-3.0",
"size": 24848
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,655,586 |
public Entry<K,V> reduceEntries(long parallelismThreshold,
BiFunction<Entry<K,V>, Entry<K,V>, ? extends Entry<K,V>> reducer) {
if (reducer == null) throw new NullPointerException();
return new ReduceEntriesTask<K,V>
(null, batchFor(parallelismThres... | Entry<K,V> function(long parallelismThreshold, BiFunction<Entry<K,V>, Entry<K,V>, ? extends Entry<K,V>> reducer) { if (reducer == null) throw new NullPointerException(); return new ReduceEntriesTask<K,V> (null, batchFor(parallelismThreshold), 0, 0, table, null, reducer).invoke(); } | /**
* Returns the result of accumulating all entries using the
* given reducer to combine values, or null if none.
*
* @param parallelismThreshold the (estimated) number of elements
* needed for this operation to be executed in parallel
* @param reducer a commutative associative combining ... | Returns the result of accumulating all entries using the given reducer to combine values, or null if none | reduceEntries | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/util/concurrent/ConcurrentHashMap.java",
"license": "apache-2.0",
"size": 262288
} | [
"java.util.function.BiFunction"
] | import java.util.function.BiFunction; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,699,655 |
@Message(id = 42, value = "No deployment with name %s found")
String noDeploymentContentWithName(String name); | @Message(id = 42, value = STR) String noDeploymentContentWithName(String name); | /**
* A message indicating no deployment content with the name was found.
*
* @param name the name of the deployment.
*
* @return the message.
*/ | A message indicating no deployment content with the name was found | noDeploymentContentWithName | {
"repo_name": "jamezp/wildfly-core",
"path": "host-controller/src/main/java/org/jboss/as/domain/controller/logging/DomainControllerLogger.java",
"license": "lgpl-2.1",
"size": 34982
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 468,285 |
public boolean supportsDataManipulationTransactionsOnly()
throws SQLException {
if (JdbcDebugCfg.entryActive)
debug[methodId_supportsDataManipulationTransactionsOnly]
.methodEntry();
try {
return false;
} finally {
if (JdbcDebugCfg.entryActive)
debug[methodId_supportsDataManipulationTransa... | boolean function() throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_supportsDataManipulationTransactionsOnly] .methodEntry(); try { return false; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_supportsDataManipulationTransactionsOnly] .methodExit(); } } | /**
* Retrieves whether this database supports only data manipulation
* statements within a transaction.
*
* @return false
* @throws SQLException
* - if a database access error occurs
**/ | Retrieves whether this database supports only data manipulation statements within a transaction | supportsDataManipulationTransactionsOnly | {
"repo_name": "mashengchen/incubator-trafodion",
"path": "core/conn/jdbc_type2/src/main/java/org/apache/trafodion/jdbc/t2/SQLMXDatabaseMetaData.java",
"license": "apache-2.0",
"size": 191582
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,236,291 |
Optional<BibEntry> performSearchById(String identifier) throws FetcherException; | Optional<BibEntry> performSearchById(String identifier) throws FetcherException; | /**
* Looks for bibliographic information associated to the given identifier.
*
* @param identifier a string which uniquely identifies the item
* @return a {@link BibEntry} containing the bibliographic information (or an empty optional if no data was found)
*/ | Looks for bibliographic information associated to the given identifier | performSearchById | {
"repo_name": "motokito/jabref",
"path": "src/main/java/net/sf/jabref/logic/importer/IdBasedFetcher.java",
"license": "mit",
"size": 1403
} | [
"java.util.Optional",
"net.sf.jabref.model.entry.BibEntry"
] | import java.util.Optional; import net.sf.jabref.model.entry.BibEntry; | import java.util.*; import net.sf.jabref.model.entry.*; | [
"java.util",
"net.sf.jabref"
] | java.util; net.sf.jabref; | 2,640,100 |
void start() throws IOException;
| void start() throws IOException; | /**
* Starts the selector.
* @throws IOException If the selector could not be opened.
*/ | Starts the selector | start | {
"repo_name": "adamfisk/littleshoot-client",
"path": "common/nio/src/main/java/org/lastbamboo/common/nio/SelectorManager.java",
"license": "gpl-2.0",
"size": 4934
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,701,507 |
public String[] getValues() {
return new String[]
{DestinationType.PNG_STR,
DestinationType.JPEG_STR,
DestinationType.TIFF_STR,
DestinationType.PDF_STR};
}
}
public static class ValidMediaTypes extends Enumerat... | String[] function() { return new String[] {DestinationType.PNG_STR, DestinationType.JPEG_STR, DestinationType.TIFF_STR, DestinationType.PDF_STR}; } } public static class ValidMediaTypes extends EnumeratedAttribute { | /**
* Defines valid image types.
*
* @return Array of valid values as strings.
*/ | Defines valid image types | getValues | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/contrib/rasterizertask/sources/org/apache/tools/ant/taskdefs/optional/RasterizerTask.java",
"license": "gpl-3.0",
"size": 25413
} | [
"org.apache.batik.apps.rasterizer.DestinationType",
"org.apache.tools.ant.types.EnumeratedAttribute"
] | import org.apache.batik.apps.rasterizer.DestinationType; import org.apache.tools.ant.types.EnumeratedAttribute; | import org.apache.batik.apps.rasterizer.*; import org.apache.tools.ant.types.*; | [
"org.apache.batik",
"org.apache.tools"
] | org.apache.batik; org.apache.tools; | 885,769 |
boolean verifyCredentials(String modelName, String smUsername) throws TwitterServiceException; | boolean verifyCredentials(String modelName, String smUsername) throws TwitterServiceException; | /**
* Verifies a user's Twitter credentials.
*
* @param modelName the name of the relevant object model; must be a type already declared for the current application
* @param smUsername the StackMob username
* @return true if successful; false otherwise
* @throws TwitterServiceException if an exception... | Verifies a user's Twitter credentials | verifyCredentials | {
"repo_name": "stackmob/stackmob-customcode-sdk",
"path": "src/main/java/com/stackmob/sdkapi/TwitterService.java",
"license": "apache-2.0",
"size": 5330
} | [
"com.stackmob.core.TwitterServiceException"
] | import com.stackmob.core.TwitterServiceException; | import com.stackmob.core.*; | [
"com.stackmob.core"
] | com.stackmob.core; | 1,197,028 |
public WMFRecordStore getRecordStore(){
return currentStore;
}
private transient BufferedInputStream bufStream = null; | WMFRecordStore function(){ return currentStore; } private transient BufferedInputStream bufStream = null; | /**
* Returns the WMFRecordStore this WMFPainter renders
*/ | Returns the WMFRecordStore this WMFPainter renders | getRecordStore | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/transcoder/wmf/tosvg/WMFPainter.java",
"license": "apache-2.0",
"size": 52810
} | [
"java.io.BufferedInputStream"
] | import java.io.BufferedInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,283,539 |
private boolean hasPendingAddMessage(UUID nodeId) {
if (pendingMsgs.msgs.isEmpty())
return false;
for (PendingMessage pendingMsg : pendingMsgs.msgs) {
if (pendingMsg.msg instanceof TcpDiscoveryNodeAddedMessage) {
TcpDiscoveryNodeAddedM... | boolean function(UUID nodeId) { if (pendingMsgs.msgs.isEmpty()) return false; for (PendingMessage pendingMsg : pendingMsgs.msgs) { if (pendingMsg.msg instanceof TcpDiscoveryNodeAddedMessage) { TcpDiscoveryNodeAddedMessage addMsg = (TcpDiscoveryNodeAddedMessage)pendingMsg.msg; if (addMsg.node().id().equals(nodeId) && ad... | /**
* Checks whether pending messages queue contains unprocessed {@link TcpDiscoveryNodeAddedMessage} for
* the node with {@code nodeId}.
*
* @param nodeId Node ID.
* @return {@code true} if contains, {@code false} otherwise.
*/ | Checks whether pending messages queue contains unprocessed <code>TcpDiscoveryNodeAddedMessage</code> for the node with nodeId | hasPendingAddMessage | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java",
"license": "apache-2.0",
"size": 337852
} | [
"org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage"
] | import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage; | import org.apache.ignite.spi.discovery.tcp.messages.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 718,440 |
@Test
public void test11() {
EntityManager em = emf.createEntityManager();
EntityTransaction txn = em.getTransaction();
txn.begin();
Query q = em.createQuery("select c from Car c where c.manufacturer.id = 7");
List<Car> list = q.getResultList();
for (Car c: list) {
System.out.println("Car " + c.getM... | void function() { EntityManager em = emf.createEntityManager(); EntityTransaction txn = em.getTransaction(); txn.begin(); Query q = em.createQuery(STR); List<Car> list = q.getResultList(); for (Car c: list) { System.out.println(STR + c.getModelname() + STR + c.getManufacturer().getId()); } assertEquals(2, list.size());... | /**
* Check bidirectional one-to-many
*/ | Check bidirectional one-to-many | test11 | {
"repo_name": "lunifera/lunifera-dsl",
"path": "org.lunifera.dsl.entity.xtext.tests/src/org/lunifera/dsl/entity/xtext/tests/model/testcarstore2/Carstore2Tests.java",
"license": "epl-1.0",
"size": 9828
} | [
"java.util.List",
"javax.persistence.EntityManager",
"javax.persistence.EntityTransaction",
"javax.persistence.Query",
"org.junit.Assert"
] | import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.Query; import org.junit.Assert; | import java.util.*; import javax.persistence.*; import org.junit.*; | [
"java.util",
"javax.persistence",
"org.junit"
] | java.util; javax.persistence; org.junit; | 321,923 |
public void setLocalCqInfo(HashMap cqInfo) {
if (this.localFilterInfo == null) {
this.localFilterInfo = new FilterInfo();
}
this.localFilterInfo.cqs = cqInfo;
this.localFilterInfo.filterProcessedLocally = true;
} | void function(HashMap cqInfo) { if (this.localFilterInfo == null) { this.localFilterInfo = new FilterInfo(); } this.localFilterInfo.cqs = cqInfo; this.localFilterInfo.filterProcessedLocally = true; } | /**
* Sets the local CQ filter information.
*
* @param cqInfo map of server side CQ Name to CQ event type.
*/ | Sets the local CQ filter information | setLocalCqInfo | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/FilterRoutingInfo.java",
"license": "apache-2.0",
"size": 19201
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 547,449 |
Attribute getGoogleGroupNameNamespaceAttributeWithNotNullValue(PerunSessionImpl sess, Resource resource) throws InternalErrorException, WrongReferenceAttributeValueException; | Attribute getGoogleGroupNameNamespaceAttributeWithNotNullValue(PerunSessionImpl sess, Resource resource) throws InternalErrorException, WrongReferenceAttributeValueException; | /**
* Get value of attribute A_F_Def_googleGroupName-Namespace
* If this value is null, throw WrongReferenceAttributeValueException
*
* @param sess
* @param resource
* @return namespace if is not null
* @throws InternalErrorException
* @throws WrongReferenceAttributeValueException if value of googleGrou... | Get value of attribute A_F_Def_googleGroupName-Namespace If this value is null, throw WrongReferenceAttributeValueException | getGoogleGroupNameNamespaceAttributeWithNotNullValue | {
"repo_name": "jirmauritz/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/ModulesUtilsBl.java",
"license": "bsd-2-clause",
"size": 19388
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.Resource",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.WrongReferenceAttributeValueException",
"cz.metacentrum.perun.core.impl.PerunSessionImpl"
] | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.WrongReferenceAttributeValueException; import cz.metacentrum.perun.core.impl.PerunSessionImpl; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import cz.metacentrum.perun.core.impl.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 2,763,166 |
@Test
public void testDdlSuccess() {
assertMetricsIncrementedOnlyOnReducer(
() -> cache.query(new SqlFieldsQuery("CREATE INDEX myidx ON TAB(ID)")).getAll(),
"success");
assertMetricsIncrementedOnlyOnReducer(() -> GridTestUtils.assertThrows(
log,
(... | void function() { assertMetricsIncrementedOnlyOnReducer( () -> cache.query(new SqlFieldsQuery(STR)).getAll(), STR); assertMetricsIncrementedOnlyOnReducer(() -> GridTestUtils.assertThrows( log, () -> cache.query(new SqlFieldsQuery(STR)).getAll(), CacheException.class, STR), STR); assertMetricsIncrementedOnlyOnReducer( (... | /**
* Check that metrics work for DDL statements.
*/ | Check that metrics work for DDL statements | testDdlSuccess | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/metric/SqlStatisticsUserQueriesFastTest.java",
"license": "apache-2.0",
"size": 10960
} | [
"javax.cache.CacheException",
"org.apache.ignite.cache.query.SqlFieldsQuery",
"org.apache.ignite.testframework.GridTestUtils"
] | import javax.cache.CacheException; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.testframework.GridTestUtils; | import javax.cache.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.testframework.*; | [
"javax.cache",
"org.apache.ignite"
] | javax.cache; org.apache.ignite; | 1,289,807 |
public ShardIterator shardsIt() {
return new PlainShardIterator(shardId, asList);
}
public ShardRouting(ShardId shardId, StreamInput in) throws IOException {
this.shardId = shardId;
currentNodeId = in.readOptionalString();
relocatingNodeId = in.readOptionalString();
... | ShardIterator function() { return new PlainShardIterator(shardId, asList); } public ShardRouting(ShardId shardId, StreamInput in) throws IOException { this.shardId = shardId; currentNodeId = in.readOptionalString(); relocatingNodeId = in.readOptionalString(); primary = in.readBoolean(); state = ShardRoutingState.fromVa... | /**
* A shard iterator with just this shard in it.
*/ | A shard iterator with just this shard in it | shardsIt | {
"repo_name": "strahanjen/strahanjen.github.io",
"path": "elasticsearch-master/core/src/main/java/org/elasticsearch/cluster/routing/ShardRouting.java",
"license": "bsd-3-clause",
"size": 26729
} | [
"java.io.IOException",
"java.util.Collections",
"org.elasticsearch.common.io.stream.StreamInput",
"org.elasticsearch.index.shard.ShardId"
] | import java.io.IOException; import java.util.Collections; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.index.shard.ShardId; | import java.io.*; import java.util.*; import org.elasticsearch.common.io.stream.*; import org.elasticsearch.index.shard.*; | [
"java.io",
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; java.util; org.elasticsearch.common; org.elasticsearch.index; | 1,099,848 |
public QName getType() {
return m_type;
} | QName function() { return m_type; } | /**
* Get 'type' attribute value.
*
* @return type (<code>null</code> if not set)
*/ | Get 'type' attribute value | getType | {
"repo_name": "vkorbut/jibx",
"path": "jibx/build/src/org/jibx/schema/elements/ElementElement.java",
"license": "bsd-3-clause",
"size": 19573
} | [
"org.jibx.runtime.QName"
] | import org.jibx.runtime.QName; | import org.jibx.runtime.*; | [
"org.jibx.runtime"
] | org.jibx.runtime; | 2,082,609 |
@Deprecated
protected IgniteOutClosure<Long> freeSpaceProvider(final DataRegionConfiguration dataRegCfg) {
final String dataRegName = dataRegCfg.getName();
return new IgniteOutClosure<Long>() {
private CacheFreeList freeList; | IgniteOutClosure<Long> function(final DataRegionConfiguration dataRegCfg) { final String dataRegName = dataRegCfg.getName(); return new IgniteOutClosure<Long>() { private CacheFreeList freeList; | /**
* Closure that can be used to compute fill factor for provided data region.
*
* @param dataRegCfg Data region configuration.
* @return Closure.
*
* @deprecated use {@link #dataRegionMetricsProvider(DataRegionConfiguration)} instead.
*/ | Closure that can be used to compute fill factor for provided data region | freeSpaceProvider | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java",
"license": "apache-2.0",
"size": 61718
} | [
"org.apache.ignite.configuration.DataRegionConfiguration",
"org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList",
"org.apache.ignite.lang.IgniteOutClosure"
] | import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeList; import org.apache.ignite.lang.IgniteOutClosure; | import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.cache.persistence.freelist.*; import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,259,814 |
Set<String> getUsers() {
return users;
} | Set<String> getUsers() { return users; } | /**
* Get the names of users allowed for this service.
* @return the set of user names. the set must not be modified.
*/ | Get the names of users allowed for this service | getUsers | {
"repo_name": "gndpig/hadoop",
"path": "src/core/org/apache/hadoop/security/authorize/AccessControlList.java",
"license": "apache-2.0",
"size": 7471
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,592,222 |
@Test
public void testDimmerAnimationMin() {
String message = " PKT:SID=13;PC=534;MT=10;MGID=60;MID=2;MD=0000000000000000000000000000000000;8e4c4091";
SHCMessage shcMessage = new SHCMessage(message, packet);
List<Type> values = shcMessage.getData().getOpenHABTypes();
assertE... | void function() { String message = STR; SHCMessage shcMessage = new SHCMessage(message, packet); List<Type> values = shcMessage.getData().getOpenHABTypes(); assertEquals(STR, 0, ((DecimalType) values.get(0)).intValue()); assertEquals(STR, 0, ((DecimalType) values.get(1)).intValue()); assertEquals(STR, 0, ((DecimalType)... | /**
* test data is: Dimmer Animation: 0 (min)
*/ | test data is: Dimmer Animation: 0 (min) | testDimmerAnimationMin | {
"repo_name": "sedstef/openhab",
"path": "bundles/binding/org.openhab.binding.smarthomatic/src/test/java/org/openhab/binding/smarthomatic/TestSHCMessage.java",
"license": "epl-1.0",
"size": 24815
} | [
"java.util.List",
"org.junit.Assert",
"org.openhab.binding.smarthomatic.internal.SHCMessage",
"org.openhab.core.library.types.DecimalType",
"org.openhab.core.types.Type"
] | import java.util.List; import org.junit.Assert; import org.openhab.binding.smarthomatic.internal.SHCMessage; import org.openhab.core.library.types.DecimalType; import org.openhab.core.types.Type; | import java.util.*; import org.junit.*; import org.openhab.binding.smarthomatic.internal.*; import org.openhab.core.library.types.*; import org.openhab.core.types.*; | [
"java.util",
"org.junit",
"org.openhab.binding",
"org.openhab.core"
] | java.util; org.junit; org.openhab.binding; org.openhab.core; | 1,819,933 |
@Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } | @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitPlus | {
"repo_name": "tcoenraad/compiler-construction",
"path": "block-3/pp/block3/cc/antlr/CC5/CC3BaseListener.java",
"license": "mit",
"size": 3410
} | [
"org.antlr.v4.runtime.ParserRuleContext",
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 815,827 |
void verifyUpdateControllerService(ControllerServiceDTO controllerServiceDTO); | void verifyUpdateControllerService(ControllerServiceDTO controllerServiceDTO); | /**
* Verifies the specified controller service can be updated.
*
* @param controllerServiceDTO service
*/ | Verifies the specified controller service can be updated | verifyUpdateControllerService | {
"repo_name": "mattyb149/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 87066
} | [
"org.apache.nifi.web.api.dto.ControllerServiceDTO"
] | import org.apache.nifi.web.api.dto.ControllerServiceDTO; | import org.apache.nifi.web.api.dto.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,231,575 |
public static void print(double x) {
long val = VM.doubleToLongBits(x);
int i1 = (int)(val >>> 32);
int i2 = (int)val;
execSyncIO(ChannelConstants.INTERNAL_PRINTDOUBLE, i1, i2);
} | static void function(double x) { long val = VM.doubleToLongBits(x); int i1 = (int)(val >>> 32); int i2 = (int)val; execSyncIO(ChannelConstants.INTERNAL_PRINTDOUBLE, i1, i2); } | /**
* Prints a double to the VM output stream.
*
* @param x the value
*/ | Prints a double to the VM output stream | print | {
"repo_name": "nejads/MqttMoped",
"path": "squawk/cldc/src/com/sun/squawk/VM.java",
"license": "gpl-2.0",
"size": 178144
} | [
"com.sun.squawk.vm.ChannelConstants"
] | import com.sun.squawk.vm.ChannelConstants; | import com.sun.squawk.vm.*; | [
"com.sun.squawk"
] | com.sun.squawk; | 2,517,895 |
public static void saveKickstartData(KickstartData ksdataIn,
KickstartSession ksession) {
log.debug("saveKickstartData: " + ksdataIn.getLabel());
singleton.saveObject(ksdataIn);
String fileData = null;
if (ksdataIn.isRawData()) {
log.debug("saveKickstartData i... | static void function(KickstartData ksdataIn, KickstartSession ksession) { log.debug(STR + ksdataIn.getLabel()); singleton.saveObject(ksdataIn); String fileData = null; if (ksdataIn.isRawData()) { log.debug(STR); KickstartRawData rawData = (KickstartRawData) ksdataIn; fileData = rawData.getData(); } else { log.debug(STR... | /**
* Save a KickstartData to the DB and associate
* the storage with the KickstartSession passed in. This is
* used if you want to save the KickstartData and associate the
*
* @param ksdataIn Kickstart Data to be stored in db
* @param ksession KickstartSession to associate with this save... | Save a KickstartData to the DB and associate the storage with the KickstartSession passed in. This is used if you want to save the KickstartData and associate the | saveKickstartData | {
"repo_name": "ogajduse/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/kickstart/KickstartFactory.java",
"license": "gpl-2.0",
"size": 43885
} | [
"com.redhat.rhn.common.util.FileUtils",
"com.redhat.rhn.manager.kickstart.KickstartFormatter",
"com.redhat.rhn.manager.kickstart.KickstartUrlHelper",
"com.redhat.rhn.manager.kickstart.cobbler.CobblerXMLRPCHelper",
"java.util.Iterator",
"java.util.Map",
"org.apache.commons.lang.StringUtils",
"org.cobbl... | import com.redhat.rhn.common.util.FileUtils; import com.redhat.rhn.manager.kickstart.KickstartFormatter; import com.redhat.rhn.manager.kickstart.KickstartUrlHelper; import com.redhat.rhn.manager.kickstart.cobbler.CobblerXMLRPCHelper; import java.util.Iterator; import java.util.Map; import org.apache.commons.lang.String... | import com.redhat.rhn.common.util.*; import com.redhat.rhn.manager.kickstart.*; import com.redhat.rhn.manager.kickstart.cobbler.*; import java.util.*; import org.apache.commons.lang.*; import org.cobbler.*; | [
"com.redhat.rhn",
"java.util",
"org.apache.commons",
"org.cobbler"
] | com.redhat.rhn; java.util; org.apache.commons; org.cobbler; | 2,142,758 |
public void testRetriveWithSixParam()
{
try
{
MyDAOImpl.isTestForFail=false;
String []selectColumnName={"selectColumnName"};
String []whereColumnName={"whereColumnName"};
String []whereColumnCondition={"="};
String []whereColumnValue={"whereColumnValue"};
String joinCondition="joinCon... | void function() { try { MyDAOImpl.isTestForFail=false; String []selectColumnName={STR}; String []whereColumnName={STR}; String []whereColumnCondition={"="}; String []whereColumnValue={STR}; String joinCondition=STR; DefaultBizLogic defaultBizLogic = new DefaultBizLogic(); List<Object> list=defaultBizLogic.retrieve(STR,... | /**
* Positive test for
* List retrieve(String sourceObjectName, String[] selectColumnName,
String[] whereColumnName, String[] whereColumnCondition, Object[] whereColumnValue,
String joinCondition).
*/ | Positive test for List retrieve(String sourceObjectName, String[] selectColumnName | testRetriveWithSixParam | {
"repo_name": "NCIP/commons-module",
"path": "software/washu-commons/src/test/java/edu/wustl/common/bizlogic/DefaultBizLogicTestCase.java",
"license": "bsd-3-clause",
"size": 31367
} | [
"edu.wustl.common.exception.BizLogicException",
"edu.wustl.dao.MyDAOImpl",
"java.util.List"
] | import edu.wustl.common.exception.BizLogicException; import edu.wustl.dao.MyDAOImpl; import java.util.List; | import edu.wustl.common.exception.*; import edu.wustl.dao.*; import java.util.*; | [
"edu.wustl.common",
"edu.wustl.dao",
"java.util"
] | edu.wustl.common; edu.wustl.dao; java.util; | 792,512 |
@Test
public void testCustomErrorPage() throws Exception {
File appDir = new File(getTemporaryDirectory(), "MyApp");
File webInf = new File(appDir, "WEB-INF");
addDeleteOnTearDown(appDir);
if (!webInf.mkdirs() && !webInf.isDirectory()) {
fail("Unable to create directo... | void function() throws Exception { File appDir = new File(getTemporaryDirectory(), "MyApp"); File webInf = new File(appDir, STR); addDeleteOnTearDown(appDir); if (!webInf.mkdirs() && !webInf.isDirectory()) { fail(STR + webInf + "]"); } Writer w = new OutputStreamWriter(new FileOutputStream(new File(appDir, STR)), "UTF-... | /**
* Test https://issues.apache.org/bugzilla/show_bug.cgi?id=50413 Serving a
* custom error page
*/ | Test HREF Serving a custom error page | testCustomErrorPage | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/test/org/apache/catalina/servlets/TestDefaultServlet.java",
"license": "apache-2.0",
"size": 11950
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.OutputStreamWriter",
"java.io.Writer",
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.Locale",
"java.util.TimeZone",
"org.apache.catalina.startup.Tomcat",
"org.junit.Assert"
] | import java.io.File; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import org.apache.catalina.startup.Tomcat; import org.junit.Assert; | import java.io.*; import java.text.*; import java.util.*; import org.apache.catalina.startup.*; import org.junit.*; | [
"java.io",
"java.text",
"java.util",
"org.apache.catalina",
"org.junit"
] | java.io; java.text; java.util; org.apache.catalina; org.junit; | 2,912,451 |
public void onEvent(ShowingLoadingEvent e) {
mSmoothProgressBar.setVisibility(e.isShow() ? View.VISIBLE : View.GONE);
} | void function(ShowingLoadingEvent e) { mSmoothProgressBar.setVisibility(e.isShow() ? View.VISIBLE : View.GONE); } | /**
* Handler for {@link com.osc.tweet.events.ShowingLoadingEvent}.
*
* @param e
* Event {@link com.osc.tweet.events.ShowingLoadingEvent}.
*/ | Handler for <code>com.osc.tweet.events.ShowingLoadingEvent</code> | onEvent | {
"repo_name": "XinyueZ/osc-tweet",
"path": "osc-tweet/app/src/main/java/com/osc/tweet/app/activities/MainActivity.java",
"license": "apache-2.0",
"size": 18341
} | [
"android.view.View",
"com.osc.tweet.events.ShowingLoadingEvent"
] | import android.view.View; import com.osc.tweet.events.ShowingLoadingEvent; | import android.view.*; import com.osc.tweet.events.*; | [
"android.view",
"com.osc.tweet"
] | android.view; com.osc.tweet; | 1,708,847 |
List<Cell> getCellList(byte[] family) {
List<Cell> list = this.familyMap.get(family);
if (list == null) {
list = new ArrayList<Cell>();
}
return list;
} | List<Cell> getCellList(byte[] family) { List<Cell> list = this.familyMap.get(family); if (list == null) { list = new ArrayList<Cell>(); } return list; } | /**
* Creates an empty list if one doesn't exist for the given column family
* or else it returns the associated list of Cell objects.
*
* @param family column family
* @return a list of Cell objects, returns an empty list if one doesn't exist.
*/ | Creates an empty list if one doesn't exist for the given column family or else it returns the associated list of Cell objects | getCellList | {
"repo_name": "toshimasa-nasu/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java",
"license": "apache-2.0",
"size": 16663
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hbase.Cell"
] | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.Cell; | import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 716,387 |
public MessageReader reader(UUID rmtNodeId, MessageFactory msgFactory) throws IgniteCheckedException; | MessageReader function(UUID rmtNodeId, MessageFactory msgFactory) throws IgniteCheckedException; | /**
* Creates new message reader instance.
*
* @param rmtNodeId Remote node ID.
* @param msgFactory Message factory.
* @return Message reader.
* @throws IgniteCheckedException In case of error.
*/ | Creates new message reader instance | reader | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/plugin/extensions/communication/MessageFormatter.java",
"license": "apache-2.0",
"size": 1994
} | [
"org.apache.ignite.IgniteCheckedException"
] | import org.apache.ignite.IgniteCheckedException; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 87,221 |
@FFDCIgnore(Exception.class)
long getPartitionId() throws Exception {
partitionIdLock.readLock().lock();
try {
if (partitionId != 0)
return partitionId;
} finally {
partitionIdLock.readLock().unlock();
}
PartitionRecord partitionEn... | @FFDCIgnore(Exception.class) long getPartitionId() throws Exception { partitionIdLock.readLock().lock(); try { if (partitionId != 0) return partitionId; } finally { partitionIdLock.readLock().unlock(); } PartitionRecord partitionEntry = new PartitionRecord(false); partitionEntry.setExecutor(name); partitionEntry.setLib... | /**
* Returns the partition id for this (persistent executor, Liberty server, host name) combination.
*
* @return the partition id.
* @throws Exception if unable to obtain a partition id.
*/ | Returns the partition id for this (persistent executor, Liberty server, host name) combination | getPartitionId | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java",
"license": "epl-1.0",
"size": 106994
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.ws.LocalTransaction",
"com.ibm.ws.ffdc.annotation.FFDCIgnore",
"com.ibm.ws.tx.embeddable.EmbeddableWebSphereTransactionManager",
"com.ibm.wsspi.concurrent.persistent.PartitionRecord",
"com.ibm.wsspi.kernel.service.location.Vari... | import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.LocalTransaction; import com.ibm.ws.ffdc.annotation.FFDCIgnore; import com.ibm.ws.tx.embeddable.EmbeddableWebSphereTransactionManager; import com.ibm.wsspi.concurrent.persistent.PartitionRecord; import com.ibm.wsspi.kernel.s... | import com.ibm.websphere.ras.*; import com.ibm.ws.*; import com.ibm.ws.ffdc.annotation.*; import com.ibm.ws.tx.embeddable.*; import com.ibm.wsspi.concurrent.persistent.*; import com.ibm.wsspi.kernel.service.location.*; import java.security.*; import javax.transaction.*; | [
"com.ibm.websphere",
"com.ibm.ws",
"com.ibm.wsspi",
"java.security",
"javax.transaction"
] | com.ibm.websphere; com.ibm.ws; com.ibm.wsspi; java.security; javax.transaction; | 495,841 |
List<HealthMapDisease> getAll(); | List<HealthMapDisease> getAll(); | /**
* Gets all diseases.
* @return All diseases.
*/ | Gets all diseases | getAll | {
"repo_name": "SEEG-Oxford/ABRAID-MP",
"path": "src/Common/src/uk/ac/ox/zoo/seeg/abraid/mp/common/dao/HealthMapDiseaseDao.java",
"license": "apache-2.0",
"size": 741
} | [
"java.util.List",
"uk.ac.ox.zoo.seeg.abraid.mp.common.domain.HealthMapDisease"
] | import java.util.List; import uk.ac.ox.zoo.seeg.abraid.mp.common.domain.HealthMapDisease; | import java.util.*; import uk.ac.ox.zoo.seeg.abraid.mp.common.domain.*; | [
"java.util",
"uk.ac.ox"
] | java.util; uk.ac.ox; | 1,297,559 |
public Sheet initExcel(String filename, String sheetname) {
Workbook wbk;
if (!new File(filename+".xls").exists()) {
wbk = createExcel(filename, sheetname);
} else {
wbk = loadExcel(filename);
}
Sheet sh;
sh = wbk.getSheet(sheetname);
... | Sheet function(String filename, String sheetname) { Workbook wbk; if (!new File(filename+".xls").exists()) { wbk = createExcel(filename, sheetname); } else { wbk = loadExcel(filename); } Sheet sh; sh = wbk.getSheet(sheetname); return sh; } | /**
* This method initializes an Excel Workbook and an Excel Sheet
*
* @param filename The output/input filename
* @param sheetname the name of the sheet
* @return Returns a Sheet
*/ | This method initializes an Excel Workbook and an Excel Sheet | initExcel | {
"repo_name": "oleke/Gender-Mining",
"path": "FacebookCrawler/src/main/java/com/oleke/facebookcrawler/ExcelAPI.java",
"license": "apache-2.0",
"size": 8462
} | [
"java.io.File",
"org.apache.poi.ss.usermodel.Sheet",
"org.apache.poi.ss.usermodel.Workbook"
] | import java.io.File; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; | import java.io.*; import org.apache.poi.ss.usermodel.*; | [
"java.io",
"org.apache.poi"
] | java.io; org.apache.poi; | 2,439,158 |
@Generated
@CFunction
public static native int MIDIPortConnectSource(int port, int source, VoidPtr connRefCon); | static native int function(int port, int source, VoidPtr connRefCon); | /**
* [@function] MIDIPortConnectSource
* <p>
* Establishes a connection from a source to a client's input port.
*
* @param port The port to which to create the connection. This port's
* readProc is called with incoming MIDI from the source.
* @param source The... | [@function] MIDIPortConnectSource Establishes a connection from a source to a client's input port | MIDIPortConnectSource | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/coremidi/c/CoreMIDI.java",
"license": "apache-2.0",
"size": 96911
} | [
"org.moe.natj.general.ptr.VoidPtr"
] | import org.moe.natj.general.ptr.VoidPtr; | import org.moe.natj.general.ptr.*; | [
"org.moe.natj"
] | org.moe.natj; | 114,746 |
public DefaultErrorHandlerBuilder onRedelivery(Processor processor) {
setOnRedelivery(processor);
return this;
}
| DefaultErrorHandlerBuilder function(Processor processor) { setOnRedelivery(processor); return this; } | /**
* Sets a processor that should be processed <b>before</b> a redelivery attempt.
* <p/>
* Can be used to change the {@link org.apache.camel.Exchange} <b>before</b> its being redelivered.
*
* @param processor the processor
* @return the builder
*/ | Sets a processor that should be processed before a redelivery attempt. Can be used to change the <code>org.apache.camel.Exchange</code> before its being redelivered | onRedelivery | {
"repo_name": "everttigchelaar/camel-svn",
"path": "camel-core/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java",
"license": "apache-2.0",
"size": 15616
} | [
"org.apache.camel.Processor"
] | import org.apache.camel.Processor; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,893,862 |
private static void sweepAllSwarms() {
if (System.currentTimeMillis() < lastSweepAllTime + SWEEP_ALL_INTERVAL) {
// Too soon.
return;
}
final boolean isDebugEnabled = logger.isTraceEnabled();
synchronized (allSwarms) {
Iterator it = allSwarms.entrySet().iterator();
while (it.ha... | static void function() { if (System.currentTimeMillis() < lastSweepAllTime + SWEEP_ALL_INTERVAL) { return; } final boolean isDebugEnabled = logger.isTraceEnabled(); synchronized (allSwarms) { Iterator it = allSwarms.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); ArrayList swarm =... | /**
* Manually garbage collect {@link #allSwarms}, if it hasn't happened in a while.
*
* @see #lastSweepAllTime
*/ | Manually garbage collect <code>#allSwarms</code>, if it hasn't happened in a while | sweepAllSwarms | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/SystemTimer.java",
"license": "apache-2.0",
"size": 14623
} | [
"java.lang.ref.WeakReference",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.Map"
] | import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; | import java.lang.ref.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 74,977 |
try {
GeneHandler.readGenes();
} catch (IOException e) {
return getRedText("Reading Gene.txt was unsuccessful\n");
}
genes.setItems(FXCollections.observableArrayList(GeneHandler.getGeneNamesAndOrganisms()));
return new Text();
} | try { GeneHandler.readGenes(); } catch (IOException e) { return getRedText(STR); } genes.setItems(FXCollections.observableArrayList(GeneHandler.getGeneNamesAndOrganisms())); return new Text(); } | /**
* This method initialize the choiceBox and adds all Gene which are stored locally in the
* Genes.txt
*
* @param genes the choiceBox to initialize
* @return a text with all needed informations about success.
* @author jannis blueml
*/ | This method initialize the choiceBox and adds all Gene which are stored locally in the Genes.txt | initializeGeneBox | {
"repo_name": "BluemlJ/GSAT",
"path": "p_GSAT/src/main/java/gui/GUIUtils.java",
"license": "lgpl-3.0",
"size": 20633
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,597,541 |
public SpectrumFile findMatchingSpectrumFile(MascotIdentifiedSpectrum aMis) {
int liSize = this.iSpectrumFiles.size();
MascotGenericFile result = null;
int nbrIDs = 0;
Vector idIndices = new Vector(5, 2);
for (int i = 0; i < liSize; i++) {
MascotGenericFile mgf = ... | SpectrumFile function(MascotIdentifiedSpectrum aMis) { int liSize = this.iSpectrumFiles.size(); MascotGenericFile result = null; int nbrIDs = 0; Vector idIndices = new Vector(5, 2); for (int i = 0; i < liSize; i++) { MascotGenericFile mgf = (MascotGenericFile) this.iSpectrumFiles.get(i); if (mgf.corresponds(aMis)) { re... | /**
* This method will return a matching PKL file for the given MascotIdentifiedSpectrum (if any), or 'null' if none
* found. It is based on the 'corresponds' method of the PKLFile class.
*
* @param aMis MascotIdentifiedSpectrum to compare to.
* @return PKLFile with the corresponding PKLFile or... | This method will return a matching PKL file for the given MascotIdentifiedSpectrum (if any), or 'null' if none found. It is based on the 'corresponds' method of the PKLFile class | findMatchingSpectrumFile | {
"repo_name": "compomics/ms-lims",
"path": "src/main/java/com/compomics/mslims/util/fileio/mergefiles/MascotGenericMergeFileReader.java",
"license": "apache-2.0",
"size": 17152
} | [
"com.compomics.mslims.util.fileio.MascotGenericFile",
"com.compomics.mslims.util.mascot.MascotIdentifiedSpectrum",
"com.compomics.util.interfaces.SpectrumFile",
"java.util.Vector"
] | import com.compomics.mslims.util.fileio.MascotGenericFile; import com.compomics.mslims.util.mascot.MascotIdentifiedSpectrum; import com.compomics.util.interfaces.SpectrumFile; import java.util.Vector; | import com.compomics.mslims.util.fileio.*; import com.compomics.mslims.util.mascot.*; import com.compomics.util.interfaces.*; import java.util.*; | [
"com.compomics.mslims",
"com.compomics.util",
"java.util"
] | com.compomics.mslims; com.compomics.util; java.util; | 2,811,058 |
public String[] getPartitionList(String category, String nonPublics) throws WordsDataSourceException {
String[] fullList = getPartitionList(category);
List<String> l = new LinkedList<String>(Arrays.asList(fullList));
String[] npa = nonPublics.split("\\s");
for (String element : npa) {
l.remove(element);
... | String[] function(String category, String nonPublics) throws WordsDataSourceException { String[] fullList = getPartitionList(category); List<String> l = new LinkedList<String>(Arrays.asList(fullList)); String[] npa = nonPublics.split("\\s"); for (String element : npa) { l.remove(element); } return l.toArray(new String[... | /**
* Produces an array listing of the public partition labels within the given category.
* Excludes the given non-public, i.e., reserved partition labels.
*
* @param category the partition to check
* @param nonPublics a space separated series of reserved partition labels.
* @return the array list of publi... | Produces an array listing of the public partition labels within the given category. Excludes the given non-public, i.e., reserved partition labels | getPartitionList | {
"repo_name": "GRosenberg/nBayes",
"path": "src/net/certiv/authmgr/task/section/core/classifier/PersistantWordsDataSource.java",
"license": "epl-1.0",
"size": 14518
} | [
"java.util.Arrays",
"java.util.LinkedList",
"java.util.List",
"net.sf.classifier4J.bayesian.WordsDataSourceException"
] | import java.util.Arrays; import java.util.LinkedList; import java.util.List; import net.sf.classifier4J.bayesian.WordsDataSourceException; | import java.util.*; import net.sf.*; | [
"java.util",
"net.sf"
] | java.util; net.sf; | 324,126 |
@Override
public void processPage(PDPage page) throws IOException
{
this.pageRotation = page.getRotation();
this.pageSize = page.getCropBox();
if (pageSize.getLowerLeftX() == 0 && pageSize.getLowerLeftY() == 0)
{
translateMatrix = null;
}
else
... | void function(PDPage page) throws IOException { this.pageRotation = page.getRotation(); this.pageSize = page.getCropBox(); if (pageSize.getLowerLeftX() == 0 && pageSize.getLowerLeftY() == 0) { translateMatrix = null; } else { translateMatrix = Matrix.getTranslateInstance(-pageSize.getLowerLeftX(), -pageSize.getLowerLef... | /**
* This will initialize and process the contents of the stream.
*
* @param page the page to process
* @throws java.io.IOException if there is an error accessing the stream.
*/ | This will initialize and process the contents of the stream | processPage | {
"repo_name": "TomRoush/PdfBox-Android",
"path": "library/src/main/java/com/tom_roush/pdfbox/text/LegacyPDFStreamEngine.java",
"license": "apache-2.0",
"size": 14651
} | [
"com.tom_roush.pdfbox.pdmodel.PDPage",
"com.tom_roush.pdfbox.util.Matrix",
"java.io.IOException"
] | import com.tom_roush.pdfbox.pdmodel.PDPage; import com.tom_roush.pdfbox.util.Matrix; import java.io.IOException; | import com.tom_roush.pdfbox.pdmodel.*; import com.tom_roush.pdfbox.util.*; import java.io.*; | [
"com.tom_roush.pdfbox",
"java.io"
] | com.tom_roush.pdfbox; java.io; | 1,007,270 |
private void scanReal() throws IOException {
boolean seenExponent = false;
boolean isSingleFloat = false;
char lastChar;
if (ch == '.') {
putc(ch);
ch = in.read();
}
numberLoop:
for ( ; ; ch = in.read()) {
switch (ch) {
... | void function() throws IOException { boolean seenExponent = false; boolean isSingleFloat = false; char lastChar; if (ch == '.') { putc(ch); ch = in.read(); } numberLoop: for ( ; ; ch = in.read()) { switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': putc(ch)... | /**
* Scan a float. We are either looking at the decimal, or we have already
* seen it and put it into the buffer. We haven't seen an exponent.
* Scan a float. Should be called with the current character is either
* the 'e', 'E' or '.'
*/ | Scan a float. We are either looking at the decimal, or we have already seen it and put it into the buffer. We haven't seen an exponent. Scan a float. Should be called with the current character is either the 'e', 'E' or '.' | scanReal | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/tools/java/Scanner.java",
"license": "gpl-2.0",
"size": 43313
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,599,572 |
public static boolean isEqual(Cookie c1, Cookie c2)
{
Args.notNull(c1, "c1");
Args.notNull(c2, "c2");
return new Key(c1).equals(new Key(c2));
} | static boolean function(Cookie c1, Cookie c2) { Args.notNull(c1, "c1"); Args.notNull(c2, "c2"); return new Key(c1).equals(new Key(c2)); } | /**
* Checks whether two cookies are equal.
* See http://www.ietf.org/rfc/rfc2109.txt, p.4.3.3
*
* @param c1
* the first cookie
* @param c2
* the second cookie
* @return {@code true} only if the cookies have the same name, path and domain
*/ | Checks whether two cookies are equal. See HREF p.4.3.3 | isEqual | {
"repo_name": "dashorst/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/Cookies.java",
"license": "apache-2.0",
"size": 3308
} | [
"javax.servlet.http.Cookie",
"org.apache.wicket.util.lang.Args"
] | import javax.servlet.http.Cookie; import org.apache.wicket.util.lang.Args; | import javax.servlet.http.*; import org.apache.wicket.util.lang.*; | [
"javax.servlet",
"org.apache.wicket"
] | javax.servlet; org.apache.wicket; | 448,505 |
public static int countRowsInScan(AsyncKuduScanner scanner) throws Exception {
return countRowsInScan(scanner, 60000);
} | static int function(AsyncKuduScanner scanner) throws Exception { return countRowsInScan(scanner, 60000); } | /**
* Same as {@link #countRowsInScan(AsyncKuduScanner, long)}, but defaults the timeout to 60
* seconds.
*/ | Same as <code>#countRowsInScan(AsyncKuduScanner, long)</code>, but defaults the timeout to 60 seconds | countRowsInScan | {
"repo_name": "helifu/kudu",
"path": "java/kudu-test-utils/src/main/java/org/apache/kudu/test/ClientTestUtil.java",
"license": "apache-2.0",
"size": 19696
} | [
"org.apache.kudu.client.AsyncKuduScanner"
] | import org.apache.kudu.client.AsyncKuduScanner; | import org.apache.kudu.client.*; | [
"org.apache.kudu"
] | org.apache.kudu; | 2,814,525 |
public static void writeListingEntry(BinaryRawWriter out, @Nullable IgfsListingEntry entry) {
if (entry != null) {
out.writeBoolean(true);
BinaryUtils.writeIgniteUuid(out, entry.fileId());
out.writeBoolean(entry.isDirectory());
}
else
out.wri... | static void function(BinaryRawWriter out, @Nullable IgfsListingEntry entry) { if (entry != null) { out.writeBoolean(true); BinaryUtils.writeIgniteUuid(out, entry.fileId()); out.writeBoolean(entry.isDirectory()); } else out.writeBoolean(false); } | /**
* Write listing entry.
*
* @param out Writer.
* @param entry Entry.
*/ | Write listing entry | writeListingEntry | {
"repo_name": "ryanzz/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java",
"license": "apache-2.0",
"size": 23100
} | [
"org.apache.ignite.binary.BinaryRawWriter",
"org.apache.ignite.internal.binary.BinaryUtils",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.binary.BinaryRawWriter; import org.apache.ignite.internal.binary.BinaryUtils; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.binary.*; import org.apache.ignite.internal.binary.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 510,543 |
@Override
protected List<Task> execute(final Operation operation, final Term[] args, final Memory memory, final Timable time) {
if(memory.emotion == null) {
return null;
}
return feeling(memory.emotion.happy(), memory, time);
} | List<Task> function(final Operation operation, final Term[] args, final Memory memory, final Timable time) { if(memory.emotion == null) { return null; } return feeling(memory.emotion.happy(), memory, time); } | /**
* To get the current value of an internal sensor
* @param args Arguments, a set and a variable
* @param memory The memory in which the operation is executed
* @return Immediate results as Tasks
*/ | To get the current value of an internal sensor | execute | {
"repo_name": "opennars/opennars",
"path": "src/main/java/org/opennars/operator/mental/FeelSatisfied.java",
"license": "mit",
"size": 2048
} | [
"java.util.List",
"org.opennars.entity.Task",
"org.opennars.interfaces.Timable",
"org.opennars.language.Term",
"org.opennars.operator.Operation",
"org.opennars.storage.Memory"
] | import java.util.List; import org.opennars.entity.Task; import org.opennars.interfaces.Timable; import org.opennars.language.Term; import org.opennars.operator.Operation; import org.opennars.storage.Memory; | import java.util.*; import org.opennars.entity.*; import org.opennars.interfaces.*; import org.opennars.language.*; import org.opennars.operator.*; import org.opennars.storage.*; | [
"java.util",
"org.opennars.entity",
"org.opennars.interfaces",
"org.opennars.language",
"org.opennars.operator",
"org.opennars.storage"
] | java.util; org.opennars.entity; org.opennars.interfaces; org.opennars.language; org.opennars.operator; org.opennars.storage; | 206,155 |
private void handlePongPost(HttpServletRequest request,
HttpServletResponse response, ArrayList<String> pongURI)
throws IOException {
if (pongURI.size() < 2) { // Safety check
defaultPost(request, response);
return;
}
// Setup
BufferedReader r = request.getReader();
PrintWriter w = response.ge... | void function(HttpServletRequest request, HttpServletResponse response, ArrayList<String> pongURI) throws IOException { if (pongURI.size() < 2) { defaultPost(request, response); return; } BufferedReader r = request.getReader(); PrintWriter w = response.getWriter(); response.addHeader(STR, STR); String json = STRloginST... | /**
* Requires that pongURI has a size greater than 1
*/ | Requires that pongURI has a size greater than 1 | handlePongPost | {
"repo_name": "MattLi96/MultiPong",
"path": "src/servlet/Servlet.java",
"license": "mit",
"size": 8266
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.PrintWriter",
"java.util.ArrayList",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import java.util.*; import javax.servlet.http.*; | [
"java.io",
"java.util",
"javax.servlet"
] | java.io; java.util; javax.servlet; | 2,122,155 |
Collection<CaseInstance> getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, QueryContext queryContext); | Collection<CaseInstance> getCaseInstancesOwnedBy(String owner, List<CaseStatus> statuses, QueryContext queryContext); | /**
* Returns all case instances owned by given user
* @param statuses list of statuses that case should be in to match
* @param queryContext control parameters for the result e.g. sorting, paging
*
*/ | Returns all case instances owned by given user | getCaseInstancesOwnedBy | {
"repo_name": "DuncanDoyle/jbpm",
"path": "jbpm-case-mgmt/jbpm-case-mgmt-api/src/main/java/org/jbpm/casemgmt/api/CaseRuntimeDataService.java",
"license": "apache-2.0",
"size": 14153
} | [
"java.util.Collection",
"java.util.List",
"org.jbpm.casemgmt.api.model.CaseStatus",
"org.jbpm.casemgmt.api.model.instance.CaseInstance",
"org.kie.api.runtime.query.QueryContext"
] | import java.util.Collection; import java.util.List; import org.jbpm.casemgmt.api.model.CaseStatus; import org.jbpm.casemgmt.api.model.instance.CaseInstance; import org.kie.api.runtime.query.QueryContext; | import java.util.*; import org.jbpm.casemgmt.api.model.*; import org.jbpm.casemgmt.api.model.instance.*; import org.kie.api.runtime.query.*; | [
"java.util",
"org.jbpm.casemgmt",
"org.kie.api"
] | java.util; org.jbpm.casemgmt; org.kie.api; | 1,031,453 |
public InputStream getErrorProcessOutputStream() throws FileNotFoundException;
| InputStream function() throws FileNotFoundException; | /**
* Returns errout as stream
* @return err output stream
* @throws FileNotFoundException ErrStream file doesn't exist
*/ | Returns errout as stream | getErrorProcessOutputStream | {
"repo_name": "moravianlibrary/kramerius",
"path": "common/src/main/java/cz/incad/kramerius/processes/LRProcess.java",
"license": "gpl-3.0",
"size": 7894
} | [
"java.io.FileNotFoundException",
"java.io.InputStream"
] | import java.io.FileNotFoundException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,613,457 |
@Test
public void toDerivativeBetweenSettleAndMaturity() {
final ZonedDateTime referenceDate = ScheduleCalculator.getAdjustedDate(SETTLE_DATE, SETTLEMENT_DAYS, CALENDAR);
final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate);
final BillSecurity purchased = BILL_SEC... | void function() { final ZonedDateTime referenceDate = ScheduleCalculator.getAdjustedDate(SETTLE_DATE, SETTLEMENT_DAYS, CALENDAR); final BillTransaction transactionConverted = BILL_TRA_DEFINITION.toDerivative(referenceDate); final BillSecurity purchased = BILL_SEC_DEFINITION.toDerivative(referenceDate, SETTLE_DATE); fin... | /**
* Tests the toDerivative methods.
*/ | Tests the toDerivative methods | toDerivativeBetweenSettleAndMaturity | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/test/java/com/opengamma/analytics/financial/instrument/bond/BillTransactionDefinitionTest.java",
"license": "apache-2.0",
"size": 11834
} | [
"com.opengamma.analytics.financial.interestrate.bond.definition.BillSecurity",
"com.opengamma.analytics.financial.interestrate.bond.definition.BillTransaction",
"com.opengamma.analytics.financial.schedule.ScheduleCalculator",
"org.testng.AssertJUnit",
"org.threeten.bp.ZonedDateTime"
] | import com.opengamma.analytics.financial.interestrate.bond.definition.BillSecurity; import com.opengamma.analytics.financial.interestrate.bond.definition.BillTransaction; import com.opengamma.analytics.financial.schedule.ScheduleCalculator; import org.testng.AssertJUnit; import org.threeten.bp.ZonedDateTime; | import com.opengamma.analytics.financial.interestrate.bond.definition.*; import com.opengamma.analytics.financial.schedule.*; import org.testng.*; import org.threeten.bp.*; | [
"com.opengamma.analytics",
"org.testng",
"org.threeten.bp"
] | com.opengamma.analytics; org.testng; org.threeten.bp; | 619,020 |
private void setupTabs() {
tabbedPane = new JTabbedPane((App.THEME.tabsOnRight() ? JTabbedPane.RIGHT : JTabbedPane.LEFT));
tabbedPane.setBackground(App.THEME.getBaseColor());
newsTab = new NewsTab();
App.settings.setNewsPanel(newsTab);
packsTab = new PacksTab();
App.... | void function() { tabbedPane = new JTabbedPane((App.THEME.tabsOnRight() ? JTabbedPane.RIGHT : JTabbedPane.LEFT)); tabbedPane.setBackground(App.THEME.getBaseColor()); newsTab = new NewsTab(); App.settings.setNewsPanel(newsTab); packsTab = new PacksTab(); App.settings.setPacksPanel(packsTab); instancesTab = new Instances... | /**
* Setup the individual tabs used in the Launcher sidebar
*/ | Setup the individual tabs used in the Launcher sidebar | setupTabs | {
"repo_name": "iarspider/JULauncher",
"path": "src/main/java/com/julauncher/gui/LauncherFrame.java",
"license": "gpl-3.0",
"size": 7882
} | [
"com.julauncher.App",
"com.julauncher.gui.tabs.AccountsTab",
"com.julauncher.gui.tabs.InstancesTab",
"com.julauncher.gui.tabs.NewsTab",
"com.julauncher.gui.tabs.PacksTab",
"com.julauncher.gui.tabs.SettingsTab",
"com.julauncher.gui.tabs.Tab",
"com.julauncher.gui.tabs.ToolsTab",
"java.util.Arrays",
... | import com.julauncher.App; import com.julauncher.gui.tabs.AccountsTab; import com.julauncher.gui.tabs.InstancesTab; import com.julauncher.gui.tabs.NewsTab; import com.julauncher.gui.tabs.PacksTab; import com.julauncher.gui.tabs.SettingsTab; import com.julauncher.gui.tabs.Tab; import com.julauncher.gui.tabs.ToolsTab; im... | import com.julauncher.*; import com.julauncher.gui.tabs.*; import java.util.*; import javax.swing.*; | [
"com.julauncher",
"com.julauncher.gui",
"java.util",
"javax.swing"
] | com.julauncher; com.julauncher.gui; java.util; javax.swing; | 39,630 |
public MonosaccharideExchangeObject convertMonosaccharide(Monosaccharide ms, GlycanNamescheme targetScheme) throws ResourcesDbException {
MonosaccharideExchangeObject msObjOutput = new MonosaccharideExchangeObject(this.getConfig(), this.getTemplateContainer());
/
Monosaccha... | MonosaccharideExchangeObject function(Monosaccharide ms, GlycanNamescheme targetScheme) throws ResourcesDbException { MonosaccharideExchangeObject msObjOutput = new MonosaccharideExchangeObject(this.getConfig(), this.getTemplateContainer()); / MonosaccharideValidation.checkMonosaccharideConsistency(ms, this.getTemplate... | /**
* Convert a ResourcesDB Monosaccharide object to a MonosaccharideExchangeObject
* @param ms the Monosaccharide to convert
* @param targetScheme the target name scheme for the exchange object
* @return
* @throws ResourcesDbException
*/ | Convert a ResourcesDB Monosaccharide object to a MonosaccharideExchangeObject | convertMonosaccharide | {
"repo_name": "glycoinfo/ResourcesDB",
"path": "src/main/java/org/eurocarbdb/resourcesdb/io/MonosaccharideConverter.java",
"license": "gpl-3.0",
"size": 22903
} | [
"org.eurocarbdb.resourcesdb.GlycanNamescheme",
"org.eurocarbdb.resourcesdb.ResourcesDbException",
"org.eurocarbdb.resourcesdb.monosaccharide.Monosaccharide",
"org.eurocarbdb.resourcesdb.monosaccharide.MonosaccharideValidation"
] | import org.eurocarbdb.resourcesdb.GlycanNamescheme; import org.eurocarbdb.resourcesdb.ResourcesDbException; import org.eurocarbdb.resourcesdb.monosaccharide.Monosaccharide; import org.eurocarbdb.resourcesdb.monosaccharide.MonosaccharideValidation; | import org.eurocarbdb.resourcesdb.*; import org.eurocarbdb.resourcesdb.monosaccharide.*; | [
"org.eurocarbdb.resourcesdb"
] | org.eurocarbdb.resourcesdb; | 1,698,731 |
public String getReplyString()
{
StringBuilder buffer;
if (!_newReplyString) {
return _replyString;
}
buffer = new StringBuilder(256);
for (String line : _replyLines) {
buffer.append(line);
buffer.append(SocketClient.NETASCII... | String function() { StringBuilder buffer; if (!_newReplyString) { return _replyString; } buffer = new StringBuilder(256); for (String line : _replyLines) { buffer.append(line); buffer.append(SocketClient.NETASCII_EOL); } _newReplyString = false; return (_replyString = buffer.toString()); } | /***
* Returns the entire text of the last FTP server response exactly
* as it was received, including all end of line markers in NETASCII
* format.
*
* @return The entire text from the last FTP response as a String.
***/ | Returns the entire text of the last FTP server response exactly as it was received, including all end of line markers in NETASCII format | getReplyString | {
"repo_name": "gcolin/syncfolders",
"path": "src/main/java/org/apache/commons/net/ftp/FTP.java",
"license": "apache-2.0",
"size": 76110
} | [
"org.apache.commons.net.SocketClient"
] | import org.apache.commons.net.SocketClient; | import org.apache.commons.net.*; | [
"org.apache.commons"
] | org.apache.commons; | 974,582 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Void> deleteAsync(
String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> deleteAsync( String resourceGroupName, String serverName, VulnerabilityAssessmentName vulnerabilityAssessmentName); | /**
* Removes the server's vulnerability assessment.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serverName The name of the server for which the vulnerability ... | Removes the server's vulnerability assessment | deleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ServerVulnerabilityAssessmentsClient.java",
"license": "mit",
"size": 16326
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.sql.models.VulnerabilityAssessmentName; | import com.azure.core.annotation.*; import com.azure.resourcemanager.sql.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,007,442 |
assertThat(lookupControlMetricType(ControlMessage.Type.INBOUND_PACKET),
is(ControlMetricType.INBOUND_PACKET));
assertThat(lookupControlMetricType(ControlMessage.Type.OUTBOUND_PACKET),
is(ControlMetricType.OUTBOUND_PACKET));
assertThat(lookupControlMetricType(Control... | assertThat(lookupControlMetricType(ControlMessage.Type.INBOUND_PACKET), is(ControlMetricType.INBOUND_PACKET)); assertThat(lookupControlMetricType(ControlMessage.Type.OUTBOUND_PACKET), is(ControlMetricType.OUTBOUND_PACKET)); assertThat(lookupControlMetricType(ControlMessage.Type.FLOW_MOD_PACKET), is(ControlMetricType.FL... | /**
* Tests whether control message metric mapper returns right control metric type.
*/ | Tests whether control message metric mapper returns right control metric type | testLookupControlMetricType | {
"repo_name": "donNewtonAlpha/onos",
"path": "apps/cpman/app/src/test/java/org/onosproject/cpman/impl/message/ControlMessageMetricMapperTest.java",
"license": "apache-2.0",
"size": 3161
} | [
"org.hamcrest.Matchers",
"org.junit.Assert",
"org.onosproject.cpman.ControlMessage",
"org.onosproject.cpman.ControlMetricType"
] | import org.hamcrest.Matchers; import org.junit.Assert; import org.onosproject.cpman.ControlMessage; import org.onosproject.cpman.ControlMetricType; | import org.hamcrest.*; import org.junit.*; import org.onosproject.cpman.*; | [
"org.hamcrest",
"org.junit",
"org.onosproject.cpman"
] | org.hamcrest; org.junit; org.onosproject.cpman; | 224,827 |
protected Command getReorientRelationshipCommand(
ReorientRelationshipRequest req) {
switch (getVisualID(req)) {
case DcaseLink001EditPart.VISUAL_ID:
return getGEFWrapper(new DcaseLink001ReorientCommand(req));
case DcaseLink002EditPart.VISUAL_ID:
... | Command function( ReorientRelationshipRequest req) { switch (getVisualID(req)) { case DcaseLink001EditPart.VISUAL_ID: return getGEFWrapper(new DcaseLink001ReorientCommand(req)); case DcaseLink002EditPart.VISUAL_ID: return getGEFWrapper(new DcaseLink002ReorientCommand(req)); case DcaseLink003EditPart.VISUAL_ID: return g... | /**
* Returns command to reorient EClass based link. New link target or source
* should be the domain model element associated with this node.
*
* @generated
*/ | Returns command to reorient EClass based link. New link target or source should be the domain model element associated with this node | getReorientRelationshipCommand | {
"repo_name": "kuriking/testdc2",
"path": "net.dependableos.dcase.diagram/src/net/dependableos/dcase/diagram/edit/policies/Userdef003ItemSemanticEditPolicy.java",
"license": "epl-1.0",
"size": 9951
} | [
"net.dependableos.dcase.diagram.edit.commands.DcaseLink001ReorientCommand",
"net.dependableos.dcase.diagram.edit.commands.DcaseLink002ReorientCommand",
"net.dependableos.dcase.diagram.edit.commands.DcaseLink003ReorientCommand",
"net.dependableos.dcase.diagram.edit.commands.DcaseLink004ReorientCommand",
"net... | import net.dependableos.dcase.diagram.edit.commands.DcaseLink001ReorientCommand; import net.dependableos.dcase.diagram.edit.commands.DcaseLink002ReorientCommand; import net.dependableos.dcase.diagram.edit.commands.DcaseLink003ReorientCommand; import net.dependableos.dcase.diagram.edit.commands.DcaseLink004ReorientComma... | import net.dependableos.dcase.diagram.edit.commands.*; import net.dependableos.dcase.diagram.edit.parts.*; import org.eclipse.gef.commands.*; import org.eclipse.gmf.runtime.emf.type.core.requests.*; | [
"net.dependableos.dcase",
"org.eclipse.gef",
"org.eclipse.gmf"
] | net.dependableos.dcase; org.eclipse.gef; org.eclipse.gmf; | 2,332,770 |
final int dimension = matrix.getNumRow()-1;
if (dimension == matrix.getNumCol()-1) {
if (matrix.isIdentity()) {
return IdentityTransform.create(dimension);
}
final GeneralMatrix m = toGMatrix(matrix);
if (m.isAffine()) {
switch (dim... | final int dimension = matrix.getNumRow()-1; if (dimension == matrix.getNumCol()-1) { if (matrix.isIdentity()) { return IdentityTransform.create(dimension); } final GeneralMatrix m = toGMatrix(matrix); if (m.isAffine()) { switch (dimension) { case 1: return LinearTransform1D.create(m.getElement(0,0), m.getElement(0,1));... | /**
* Creates a transform for the specified matrix.
* The matrix should be affine, but it is not be verified.
*/ | Creates a transform for the specified matrix. The matrix should be affine, but it is not be verified | create | {
"repo_name": "iCarto/siga",
"path": "libTopology/src/org/geotools/referencefork/referencing/operation/transform/ProjectiveTransform.java",
"license": "gpl-3.0",
"size": 27460
} | [
"org.geotools.referencefork.referencing.operation.matrix.GeneralMatrix"
] | import org.geotools.referencefork.referencing.operation.matrix.GeneralMatrix; | import org.geotools.referencefork.referencing.operation.matrix.*; | [
"org.geotools.referencefork"
] | org.geotools.referencefork; | 1,518,479 |
void replaceShardUuids(long tableId, List<ColumnInfo> columns, Set<UUID> oldShardUuids, Collection<ShardInfo> newShards); | void replaceShardUuids(long tableId, List<ColumnInfo> columns, Set<UUID> oldShardUuids, Collection<ShardInfo> newShards); | /**
* Replace oldShardsUuids with newShards.
*/ | Replace oldShardsUuids with newShards | replaceShardUuids | {
"repo_name": "rockerbox/presto",
"path": "presto-raptor/src/main/java/com/facebook/presto/raptor/metadata/ShardManager.java",
"license": "apache-2.0",
"size": 2287
} | [
"java.util.Collection",
"java.util.List",
"java.util.Set"
] | import java.util.Collection; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,244,457 |
public Period getMergeMinRegionAge() {
return normalizerConfiguration.getMergeMinRegionAge();
} | Period function() { return normalizerConfiguration.getMergeMinRegionAge(); } | /**
* Return this instance's configured value for {@value #MERGE_MIN_REGION_AGE_DAYS_KEY}.
*/ | Return this instance's configured value for #MERGE_MIN_REGION_AGE_DAYS_KEY | getMergeMinRegionAge | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java",
"license": "apache-2.0",
"size": 26008
} | [
"java.time.Period"
] | import java.time.Period; | import java.time.*; | [
"java.time"
] | java.time; | 2,150,350 |
private void retrieveSoupEntries(JSONArray args, CallbackContext callbackContext) throws JSONException {
// Parse args
JSONObject arg0 = args.getJSONObject(0);
String soupName = arg0.getString(SOUP_NAME);
JSONArray jsonSoupEntryIds = arg0.getJSONArray(ENTRY_IDS);
Long[] soupEntryIds = new Long[jsonSoupEntr... | void function(JSONArray args, CallbackContext callbackContext) throws JSONException { JSONObject arg0 = args.getJSONObject(0); String soupName = arg0.getString(SOUP_NAME); JSONArray jsonSoupEntryIds = arg0.getJSONArray(ENTRY_IDS); Long[] soupEntryIds = new Long[jsonSoupEntryIds.length()]; for (int i=0; i<jsonSoupEntryI... | /**
* Native implementation of pgRetrieveSoupEntries
* @param args
* @param callbackContext
* @return
* @throws JSONException
*/ | Native implementation of pgRetrieveSoupEntries | retrieveSoupEntries | {
"repo_name": "seethaa/force_analytics_example",
"path": "hybrid/SmartStore/src/com/salesforce/androidsdk/smartstore/phonegap/SmartStorePlugin.java",
"license": "apache-2.0",
"size": 15013
} | [
"com.salesforce.androidsdk.smartstore.store.SmartStore",
"org.apache.cordova.api.CallbackContext",
"org.apache.cordova.api.PluginResult",
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject"
] | import com.salesforce.androidsdk.smartstore.store.SmartStore; import org.apache.cordova.api.CallbackContext; import org.apache.cordova.api.PluginResult; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; | import com.salesforce.androidsdk.smartstore.store.*; import org.apache.cordova.api.*; import org.json.*; | [
"com.salesforce.androidsdk",
"org.apache.cordova",
"org.json"
] | com.salesforce.androidsdk; org.apache.cordova; org.json; | 1,170,992 |
public void disableMonitoring() throws Exception {
final Settings settings = Settings.builder()
.putNull("xpack.monitoring.collection.enabled")
.putNull("xpack.monitoring.exporters._local.enabled")
.putNull("cluster.metadata.display_name")
.bui... | void function() throws Exception { final Settings settings = Settings.builder() .putNull(STR) .putNull(STR) .putNull(STR) .build(); assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(settings)); assertBusy(() -> assertThat(STR, getMonitoringUsageExportersDefined(), is(false))); assertBu... | /**
* Disable the monitoring service and the Local exporter.
*/ | Disable the monitoring service and the Local exporter | disableMonitoring | {
"repo_name": "coding0011/elasticsearch",
"path": "x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/integration/MonitoringIT.java",
"license": "apache-2.0",
"size": 21467
} | [
"java.util.concurrent.TimeUnit",
"org.elasticsearch.ElasticsearchException",
"org.elasticsearch.action.admin.cluster.node.stats.NodeStats",
"org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.test.hamcrest.ElasticsearchAs... | import java.util.concurrent.TimeUnit; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.action.admin.cluster.node.stats.NodeStats; import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.test.hamcres... | import java.util.concurrent.*; import org.elasticsearch.*; import org.elasticsearch.action.admin.cluster.node.stats.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.test.hamcrest.*; import org.elasticsearch.threadpool.*; import org.hamcrest.*; | [
"java.util",
"org.elasticsearch",
"org.elasticsearch.action",
"org.elasticsearch.common",
"org.elasticsearch.test",
"org.elasticsearch.threadpool",
"org.hamcrest"
] | java.util; org.elasticsearch; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.test; org.elasticsearch.threadpool; org.hamcrest; | 928,731 |
private List<File> findFiles(String patternName, List<File> resultList, String node, StringBuilder resultPath) {
if (!resultList.isEmpty()) {
List<File> tmpResultList = new ArrayList<>();
tmpResultList.addAll(resultList);
resultList.clear();
for (File file : t... | List<File> function(String patternName, List<File> resultList, String node, StringBuilder resultPath) { if (!resultList.isEmpty()) { List<File> tmpResultList = new ArrayList<>(); tmpResultList.addAll(resultList); resultList.clear(); for (File file : tmpResultList) { StringBuilder absolutePath = new StringBuilder(file.g... | /**
* Finds files at the path specified by the current contents of {@code resultPath}, putting files matching
* the next level of the pattern into {@code resultList} for the next iteration.
*
* @param patternName either {@link #DOUBLED_ASTERISK} or {@link #REGEX}.
* @param resultList the list o... | Finds files at the path specified by the current contents of resultPath, putting files matching the next level of the pattern into resultList for the next iteration | findFiles | {
"repo_name": "crowdin/crowdin-cli-2",
"path": "src/main/java/com/crowdin/cli/properties/helper/FileHelper.java",
"license": "mit",
"size": 11595
} | [
"com.crowdin.cli.utils.Utils",
"java.io.File",
"java.io.FileFilter",
"java.nio.file.Files",
"java.nio.file.LinkOption",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.apache.commons.io.filefilter.RegexFileFilter"
] | import com.crowdin.cli.utils.Utils; import java.io.File; import java.io.FileFilter; import java.nio.file.Files; import java.nio.file.LinkOption; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.commons.io.filefilter.RegexFileFilter; | import com.crowdin.cli.utils.*; import java.io.*; import java.nio.file.*; import java.util.*; import org.apache.commons.io.filefilter.*; | [
"com.crowdin.cli",
"java.io",
"java.nio",
"java.util",
"org.apache.commons"
] | com.crowdin.cli; java.io; java.nio; java.util; org.apache.commons; | 2,835,683 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<SpatialAnchorsAccountInner> createWithResponse(
String resourceGroupName,
String accountName,
SpatialAnchorsAccountInner spatialAnchorsAccount,
Context context) {
return createWithResponseAsync(resourceGroupName,... | @ServiceMethod(returns = ReturnType.SINGLE) Response<SpatialAnchorsAccountInner> function( String resourceGroupName, String accountName, SpatialAnchorsAccountInner spatialAnchorsAccount, Context context) { return createWithResponseAsync(resourceGroupName, accountName, spatialAnchorsAccount, context).block(); } | /**
* Creating or Updating a Spatial Anchors Account.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Name of an Mixed Reality Account.
* @param spatialAnchorsAccount Spatial Anchors Account parameter.
* @param context The context to associate with this o... | Creating or Updating a Spatial Anchors Account | createWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mixedreality/azure-resourcemanager-mixedreality/src/main/java/com/azure/resourcemanager/mixedreality/implementation/SpatialAnchorsAccountsClientImpl.java",
"license": "mit",
"size": 75985
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.mixedreality.fluent.models.SpatialAnchorsAccountInner"
] | 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.mixedreality.fluent.models.SpatialAnchorsAccountInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mixedreality.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,404,151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.