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 boolean isWarnEnabled() {
return isLoggable(Log.WARN);
}
| boolean function() { return isLoggable(Log.WARN); } | /**
* Is this logger instance enabled for the WARN level?
*
* @return True if this Logger is enabled for the WARN level, false
* otherwise.
*/ | Is this logger instance enabled for the WARN level | isWarnEnabled | {
"repo_name": "tjth/bitcoinj-lotterycoin",
"path": "slf4j-1.7.16/slf4j-android/src/main/java/org/slf4j/impl/AndroidLoggerAdapter.java",
"license": "apache-2.0",
"size": 16947
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,343,056 |
private static long getTotalPrice(PrivateStore store, TradeList tradeList) {
long totalprice = 0;
for (TradeItem tradeItem : tradeList.getTradeItems()) {
TradePSItem item = store.getTradeItemByObjId(tradeItem.getItemId());
if (item == null) {
continue;
... | static long function(PrivateStore store, TradeList tradeList) { long totalprice = 0; for (TradeItem tradeItem : tradeList.getTradeItems()) { TradePSItem item = store.getTradeItemByObjId(tradeItem.getItemId()); if (item == null) { continue; } totalprice += item.getPrice() * tradeItem.getCount(); } return totalprice; } | /**
* This method will return the total price of the tradelist
*
* @param store
* @param tradeList
* @return
*/ | This method will return the total price of the tradelist | getTotalPrice | {
"repo_name": "GiGatR00n/Aion-Core-v4.7.5",
"path": "AC-Game/src/com/aionemu/gameserver/services/PrivateStoreService.java",
"license": "gpl-2.0",
"size": 13129
} | [
"com.aionemu.gameserver.model.gameobjects.player.PrivateStore",
"com.aionemu.gameserver.model.trade.TradeItem",
"com.aionemu.gameserver.model.trade.TradeList",
"com.aionemu.gameserver.model.trade.TradePSItem"
] | import com.aionemu.gameserver.model.gameobjects.player.PrivateStore; import com.aionemu.gameserver.model.trade.TradeItem; import com.aionemu.gameserver.model.trade.TradeList; import com.aionemu.gameserver.model.trade.TradePSItem; | import com.aionemu.gameserver.model.gameobjects.player.*; import com.aionemu.gameserver.model.trade.*; | [
"com.aionemu.gameserver"
] | com.aionemu.gameserver; | 32,204 |
public static String getKeyId(String attributeName)
{
org.hibernate.mapping.Collection col1 = cfg.getCollectionMapping(attributeName);
Iterator keyIt = col1.getKey().getColumnIterator();
while (keyIt.hasNext())
{
Column col = (Column) keyIt.next();
return(col.getName());
}
return "";
... | static String function(String attributeName) { org.hibernate.mapping.Collection col1 = cfg.getCollectionMapping(attributeName); Iterator keyIt = col1.getKey().getColumnIterator(); while (keyIt.hasNext()) { Column col = (Column) keyIt.next(); return(col.getName()); } return ""; } | /**
* This function gets the key Id
* from hibernate mappings and returns the value
* @param attributeName
* @return key Id
*
*/ | This function gets the key Id from hibernate mappings and returns the value | getKeyId | {
"repo_name": "NCIP/cab2b",
"path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/util/dbManager/HibernateMetaData.java",
"license": "bsd-3-clause",
"size": 14639
} | [
"java.util.Iterator",
"org.hibernate.mapping.Collection",
"org.hibernate.mapping.Column"
] | import java.util.Iterator; import org.hibernate.mapping.Collection; import org.hibernate.mapping.Column; | import java.util.*; import org.hibernate.mapping.*; | [
"java.util",
"org.hibernate.mapping"
] | java.util; org.hibernate.mapping; | 325,363 |
@Override
public ResourceLocator getResourceLocator() {
return ScxmlEditPlugin.INSTANCE;
} | ResourceLocator function() { return ScxmlEditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "glefur/scxml-designer",
"path": "plugins/org.w3c.scxml.edit/src-gen/org/w3/_2005/_07/scxml/provider/ScxmlDatamodelTypeItemProvider.java",
"license": "epl-1.0",
"size": 5211
} | [
"org.eclipse.emf.common.util.ResourceLocator"
] | import org.eclipse.emf.common.util.ResourceLocator; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,269,026 |
@NonNull
@Override
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new LocationAdapter.LocationAdapterViewHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.location_row, parent, false));
} | RecyclerView.ViewHolder function(@NonNull ViewGroup parent, int viewType) { return new LocationAdapter.LocationAdapterViewHolder(LayoutInflater.from(parent.getContext()) .inflate(R.layout.location_row, parent, false)); } | /**
* Create the view holder but the header and list items have their own separate ones.
*
* @param parent To inflate the view
* @param viewType To differentiate between header vs. item
* @return The new ViewHolder
*/ | Create the view holder but the header and list items have their own separate ones | onCreateViewHolder | {
"repo_name": "Kiarasht/Space-Station-Tracker",
"path": "app/src/main/java/com/restart/spacestationtracker/adapter/LocationAdapter.java",
"license": "mpl-2.0",
"size": 6076
} | [
"android.view.LayoutInflater",
"android.view.ViewGroup",
"androidx.annotation.NonNull",
"androidx.recyclerview.widget.RecyclerView"
] | import android.view.LayoutInflater; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; | import android.view.*; import androidx.annotation.*; import androidx.recyclerview.widget.*; | [
"android.view",
"androidx.annotation",
"androidx.recyclerview"
] | android.view; androidx.annotation; androidx.recyclerview; | 197,414 |
List<String> removeSessionPresence(String sessionId);
| List<String> removeSessionPresence(String sessionId); | /**
* Remove presence for all locations for this session id.
*
* @param sessionId
* The session id.
* @param locationId
* The location id.
*/ | Remove presence for all locations for this session id | removeSessionPresence | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "presence/presence-impl/impl/src/java/org/sakaiproject/presence/impl/BasePresenceService.java",
"license": "apache-2.0",
"size": 21398
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 537,736 |
public static SpecPackage init()
{
if (isInited) return (SpecPackage)EPackage.Registry.INSTANCE.getEPackage(SpecPackage.eNS_URI);
// Obtain or create and register package
SpecPackageImpl theSpecPackage = (SpecPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SpecPackageImpl ? EPackage.Reg... | static SpecPackage function() { if (isInited) return (SpecPackage)EPackage.Registry.INSTANCE.getEPackage(SpecPackage.eNS_URI); SpecPackageImpl theSpecPackage = (SpecPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SpecPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SpecPackageImpl()); isInite... | /**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link SpecPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field t... | Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>SpecPackage#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | init | {
"repo_name": "getgauge/Gauge-Eclipse",
"path": "io.getgauge/src-gen/io/getgauge/spec/impl/SpecPackageImpl.java",
"license": "gpl-3.0",
"size": 18423
} | [
"io.getgauge.spec.SpecPackage",
"org.eclipse.emf.ecore.EPackage"
] | import io.getgauge.spec.SpecPackage; import org.eclipse.emf.ecore.EPackage; | import io.getgauge.spec.*; import org.eclipse.emf.ecore.*; | [
"io.getgauge.spec",
"org.eclipse.emf"
] | io.getgauge.spec; org.eclipse.emf; | 44,259 |
new Cyan();
}
private CyanUI ui;
private World world;
private GameDispatcher gameDispatcher;
private InputDispatcher inputDispatcher;
public Cyan() {
loadResources();
initWorld();
initUI();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generat... | new Cyan(); } private CyanUI ui; private World world; private GameDispatcher gameDispatcher; private InputDispatcher inputDispatcher; public Cyan() { loadResources(); initWorld(); initUI(); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } initDispatcher(); this.setName(STR); this.star... | /**
* Launch the application.
*/ | Launch the application | main | {
"repo_name": "Exevan/Project-Cyan",
"path": "Project Cyan 0.1/src/com/exevan/cyan/Cyan.java",
"license": "gpl-3.0",
"size": 2314
} | [
"com.exevan.cyan.domain.world.World",
"com.exevan.cyan.framework.dispatch.GameDispatcher",
"com.exevan.cyan.framework.dispatch.InputDispatcher",
"com.exevan.cyan.ui.CyanUI"
] | import com.exevan.cyan.domain.world.World; import com.exevan.cyan.framework.dispatch.GameDispatcher; import com.exevan.cyan.framework.dispatch.InputDispatcher; import com.exevan.cyan.ui.CyanUI; | import com.exevan.cyan.domain.world.*; import com.exevan.cyan.framework.dispatch.*; import com.exevan.cyan.ui.*; | [
"com.exevan.cyan"
] | com.exevan.cyan; | 2,525,404 |
protected void sendPatch (Patch p)
{
byte[] saveSysex = p.sysex; //Save the patch to a temp save area
//Convert to a edit buffer patch
int newSysexLength = p.sysex.length - 1;
byte newSysex[] = new byte[newSysexLength];
System.arraycopy(Constants.EDIT_DUMP_HDR_B... | void function (Patch p) { byte[] saveSysex = p.sysex; int newSysexLength = p.sysex.length - 1; byte newSysex[] = new byte[newSysexLength]; System.arraycopy(Constants.EDIT_DUMP_HDR_BYTES, 0, newSysex, 0, Constants.EDMP_HDR_SIZE); System.arraycopy(p.sysex, Constants.PDMP_HDR_SIZE, newSysex, Constants.EDMP_HDR_SIZE, newSy... | /** Converts a single program patch to an edit buffer patch and sends it to
* the edit buffer. Patch p is the patch to be sent.
*/ | Converts a single program patch to an edit buffer patch and sends it to the edit buffer. Patch p is the patch to be sent | sendPatch | {
"repo_name": "jpcaruana/jsynthlib",
"path": "src/main/java/org/jsynthlib/drivers/line6/pod20/Line6Pod20SingleDriver.java",
"license": "gpl-2.0",
"size": 7368
} | [
"org.jsynthlib.core.Patch"
] | import org.jsynthlib.core.Patch; | import org.jsynthlib.core.*; | [
"org.jsynthlib.core"
] | org.jsynthlib.core; | 866,078 |
public ColumnProperty setColumnRuleStyle(BorderStyle style)
{
this.clearAttribute("column-rule-style");
this.putAttribute("column-rule-style", style.toString());
this.clearAttribute("-moz-column-rule-style");
this.putAttribute("-moz-column-rule-style", style.toString());
this.clearAttribute("-web... | ColumnProperty function(BorderStyle style) { this.clearAttribute(STR); this.putAttribute(STR, style.toString()); this.clearAttribute(STR); this.putAttribute(STR, style.toString()); this.clearAttribute(STR); this.putAttribute(STR, style.toString()); return this; } | /**
* The column-rule-style property specifies the style of the rule between
* columns.<br>
*
* Default value: none<br>
* Inherited: no<br>
* Version: CSS3<br>
* JavaScript syntax: object.style.columnRuleStyle="dotted"<br>
*
* @param style
* Style of the column rule
* @return the Colu... | The column-rule-style property specifies the style of the rule between columns. Default value: none Inherited: no Version: CSS3 JavaScript syntax: object.style.columnRuleStyle="dotted" | setColumnRuleStyle | {
"repo_name": "Ccook/Stonewall",
"path": "src/main/java/edu/american/student/stonewall/display/css/property/ColumnProperty.java",
"license": "apache-2.0",
"size": 8308
} | [
"edu.american.student.stonewall.display.css.util.BorderStyle"
] | import edu.american.student.stonewall.display.css.util.BorderStyle; | import edu.american.student.stonewall.display.css.util.*; | [
"edu.american.student"
] | edu.american.student; | 915,501 |
void handlePress(MouseEvent e); | void handlePress(MouseEvent e); | /** handles the press event of the mouse
*
* @param e
*/ | handles the press event of the mouse | handlePress | {
"repo_name": "HOMlab/QN-ACTR-Release",
"path": "QN-ACTR Java/src/jmt/gui/jmodel/controller/UIState.java",
"license": "lgpl-3.0",
"size": 2048
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 299,916 |
private boolean isUselessThread(ThreadInfo tinfo) {
if (!ignoreUselessThreads) {
return false;
}
String threadName = tinfo.getThreadName();
if (tinfo.getThreadState() == State.TIMED_WAITING && tinfo.getLockInfo() != null) {
String lockClassName = tinfo.getLockInfo().getClassName();
/... | boolean function(ThreadInfo tinfo) { if (!ignoreUselessThreads) { return false; } String threadName = tinfo.getThreadName(); if (tinfo.getThreadState() == State.TIMED_WAITING && tinfo.getLockInfo() != null) { String lockClassName = tinfo.getLockInfo().getClassName(); if (threadName.startsWith(STR) && STR.equals(lockCla... | /**
* Identify useless threads, like idle worker pool threads.
*/ | Identify useless threads, like idle worker pool threads | isUselessThread | {
"repo_name": "GoogleCloudPlatform/google-cloud-eclipse",
"path": "plugins/com.google.cloud.tools.eclipse.test.util/src/com/google/cloud/tools/eclipse/test/util/ThreadDumpingWatchdog.java",
"license": "apache-2.0",
"size": 19097
} | [
"java.lang.Thread",
"java.lang.management.ThreadInfo"
] | import java.lang.Thread; import java.lang.management.ThreadInfo; | import java.lang.*; import java.lang.management.*; | [
"java.lang"
] | java.lang; | 891,685 |
public boolean mouseClickMove(int mx, int my, int btn, long dt) {
updateMouse(mx, my);
if(btn == 0) {
long time = GameTimer.getAbsTime();
if(draggingNode == null) {
lastStartTime = time;
draggingNode = getTopWidget(mx, my);
if(d... | boolean function(int mx, int my, int btn, long dt) { updateMouse(mx, my); if(btn == 0) { long time = GameTimer.getAbsTime(); if(draggingNode == null) { lastStartTime = time; draggingNode = getTopWidget(mx, my); if(draggingNode == null) return false; xOffset = mx - draggingNode.x; yOffset = my - draggingNode.y; } if(dra... | /**
* Standard GuiScreen class callback.
* @param mx
* @param my
* @param btn the mouse button ID.
* @param dt how long is this button being pressed(ms)
*/ | Standard GuiScreen class callback | mouseClickMove | {
"repo_name": "LambdaInnovation/LambdaLib",
"path": "src/main/java/cn/lambdalib/cgui/gui/CGui.java",
"license": "mit",
"size": 13506
} | [
"cn.lambdalib.cgui.gui.event.DragEvent",
"cn.lambdalib.util.helper.GameTimer"
] | import cn.lambdalib.cgui.gui.event.DragEvent; import cn.lambdalib.util.helper.GameTimer; | import cn.lambdalib.cgui.gui.event.*; import cn.lambdalib.util.helper.*; | [
"cn.lambdalib.cgui",
"cn.lambdalib.util"
] | cn.lambdalib.cgui; cn.lambdalib.util; | 2,368,275 |
public static HttpHeaders createHeaders(final UsernamePasswordCredential c) {
final HttpHeaders acceptHeaders = new HttpHeaders() {
private static final long serialVersionUID = -3529759978950667758L;
{
set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON.toString());
... | static HttpHeaders function(final UsernamePasswordCredential c) { final HttpHeaders acceptHeaders = new HttpHeaders() { private static final long serialVersionUID = -3529759978950667758L; { set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON.toString()); } }; final String authorization = c.getUsername() + ':' + c.getPas... | /**
* Create authorization http headers.
*
* @param c the credentials
* @return the http headers
*/ | Create authorization http headers | createHeaders | {
"repo_name": "vydra/cas",
"path": "support/cas-server-support-rest-authentication/src/main/java/org/apereo/cas/adaptors/rest/RestAuthenticationApi.java",
"license": "apache-2.0",
"size": 2351
} | [
"java.nio.charset.Charset",
"org.apereo.cas.authentication.UsernamePasswordCredential",
"org.apereo.cas.util.EncodingUtils",
"org.springframework.http.HttpHeaders",
"org.springframework.http.MediaType"
] | import java.nio.charset.Charset; import org.apereo.cas.authentication.UsernamePasswordCredential; import org.apereo.cas.util.EncodingUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; | import java.nio.charset.*; import org.apereo.cas.authentication.*; import org.apereo.cas.util.*; import org.springframework.http.*; | [
"java.nio",
"org.apereo.cas",
"org.springframework.http"
] | java.nio; org.apereo.cas; org.springframework.http; | 750,184 |
KyloVersion updateToLatestVersion(); | KyloVersion updateToLatestVersion(); | /**
* Routine to update the metadata storing the latest version of Kylo depoloyed.
*
* @return the updated version
*/ | Routine to update the metadata storing the latest version of Kylo depoloyed | updateToLatestVersion | {
"repo_name": "rashidaligee/kylo",
"path": "core/operational-metadata/operational-metadata-api/src/main/java/com/thinkbiganalytics/metadata/api/app/KyloVersionProvider.java",
"license": "apache-2.0",
"size": 1450
} | [
"com.thinkbiganalytics.KyloVersion"
] | import com.thinkbiganalytics.KyloVersion; | import com.thinkbiganalytics.*; | [
"com.thinkbiganalytics"
] | com.thinkbiganalytics; | 449,621 |
@GET
public String downloadFile() {
final String fullPath = getClass().getResource("/data/insee.csv").getFile();
final File localFile = new File(fullPath);
final VFile vFile = new FSFile("insee.csv", "text/csv", localFile);
return createVFileResponseBuilder().send(vFile);
} | String function() { final String fullPath = getClass().getResource(STR).getFile(); final File localFile = new File(fullPath); final VFile vFile = new FSFile(STR, STR, localFile); return createVFileResponseBuilder().send(vFile); } | /**
* Exporte l'annuaire utilisateur.
* @return redirection struts
*/ | Exporte l'annuaire utilisateur | downloadFile | {
"repo_name": "KleeGroup/vertigo-struts2",
"path": "src/test/java/io/vertigo/struts2/ui/controller/accueil/AccueilAction.java",
"license": "apache-2.0",
"size": 5009
} | [
"io.vertigo.dynamo.file.model.VFile",
"io.vertigo.dynamo.impl.file.model.FSFile",
"java.io.File"
] | import io.vertigo.dynamo.file.model.VFile; import io.vertigo.dynamo.impl.file.model.FSFile; import java.io.File; | import io.vertigo.dynamo.file.model.*; import io.vertigo.dynamo.impl.file.model.*; import java.io.*; | [
"io.vertigo.dynamo",
"java.io"
] | io.vertigo.dynamo; java.io; | 713,621 |
public ReferencedKeyConstraintDescriptor getPrimaryKey()
throws StandardException
{
ConstraintDescriptorList cdl = getDataDictionary().getConstraintDescriptors(this);
return cdl.getPrimaryKey();
} | ReferencedKeyConstraintDescriptor function() throws StandardException { ConstraintDescriptorList cdl = getDataDictionary().getConstraintDescriptors(this); return cdl.getPrimaryKey(); } | /**
* Gets the primary key, may return null if no primary key
*
* @return The priamry key or null
*
* @exception StandardException Thrown on failure
*/ | Gets the primary key, may return null if no primary key | getPrimaryKey | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/sql/dictionary/TableDescriptor.java",
"license": "apache-2.0",
"size": 45446
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; | import com.pivotal.gemfirexd.internal.iapi.error.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 305,272 |
@Nonnull
public TeamsAppDefinitionCollectionRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | TeamsAppDefinitionCollectionRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TeamsAppDefinitionCollectionRequest.java",
"license": "mit",
"size": 5986
} | [
"com.microsoft.graph.requests.TeamsAppDefinitionCollectionRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.TeamsAppDefinitionCollectionRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,548,690 |
public static JDBCService createFromXml(InputStream input) {
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(input);
XPathFactor... | static JDBCService function(InputStream input) { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(input); XPathFactory xpathFactory = XPathFactory.newInstance(); XPath xPath = xpathFactory.newXPath(); S... | /**
* Creates a JDBCService based on the description of an XML file.
*
* @param input a stream with an xml file
* @return the new service
*/ | Creates a JDBCService based on the description of an XML file | createFromXml | {
"repo_name": "richardfearn/diirt",
"path": "pvmanager/pvmanager-jdbc/src/main/java/org/diirt/service/jdbc/JDBCServices.java",
"license": "mit",
"size": 4945
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.logging.Level",
"java.util.logging.Logger",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.xpath.XPath",
"javax.xml.xpath.XPathConstants",
"javax.... | import java.io.IOException; import java.io.InputStream; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.... | import java.io.*; import java.util.logging.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.diirt.vtype.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"org.diirt.vtype",
"org.w3c.dom",
"org.xml.sax"
] | java.io; java.util; javax.xml; org.diirt.vtype; org.w3c.dom; org.xml.sax; | 493,621 |
public boolean saveJMXSettings() {
Log log = config.getLog();
// create and validate file
File settingsFile = getSettingsFile();
// create the jmx properties state
Properties properties = new Properties();
saveSetting(properties, "... | boolean function() { Log log = config.getLog(); File settingsFile = getSettingsFile(); Properties properties = new Properties(); saveSetting(properties, STR, edenSpace); saveSetting(properties, STR, survivorSpace); saveSetting(properties, STR, permGen); saveSetting(properties, STR, tenuredGen); saveSetting(properties, ... | /**
* Save the configured JMX settings for memory pools and collectors so that
* the customized settings will be persisted across restarts. The settings
* are stored in the temporary/working directory of the servlet.
*
* @return true if successfully saved, false otherwise
*/ | Save the configured JMX settings for memory pools and collectors so that the customized settings will be persisted across restarts. The settings are stored in the temporary/working directory of the servlet | saveJMXSettings | {
"repo_name": "teatrove/teatrove",
"path": "teaapps/src/main/java/org/teatrove/teaapps/contexts/JMXContext.java",
"license": "apache-2.0",
"size": 33092
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.Date",
"java.util.Properties",
"org.teatrove.trove.log.Log"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Date; import java.util.Properties; import org.teatrove.trove.log.Log; | import java.io.*; import java.util.*; import org.teatrove.trove.log.*; | [
"java.io",
"java.util",
"org.teatrove.trove"
] | java.io; java.util; org.teatrove.trove; | 1,892,562 |
interface UpdateStages {
interface WithTags {
Update withTags(Map<String, String> tags);
} | interface UpdateStages { interface WithTags { Update withTags(Map<String, String> tags); } | /**
* Specifies the tags property: Resource tags..
*
* @param tags Resource tags.
* @return the next definition stage.
*/ | Specifies the tags property: Resource tags. | withTags | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/models/Profile.java",
"license": "mit",
"size": 7723
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,080,322 |
public static CDFReader getCdfFile( String fileName ) {
CDFReader cdf;
if ( allocateDirect==-1 ) {
allocateDirect= BufferDataSet.shouldAllocateDirect();
}
try {
synchronized ( lock ) {
cdf= openFiles.get(fileName); logger.log(... | static CDFReader function( String fileName ) { CDFReader cdf; if ( allocateDirect==-1 ) { allocateDirect= BufferDataSet.shouldAllocateDirect(); } try { synchronized ( lock ) { cdf= openFiles.get(fileName); logger.log(Level.FINER, STR, cdf); } if ( cdf==null ) { synchronized (lock) { File cdfFile= new File(fileName); if... | /**
* get the abstract access object to the given CDF file. This provides read-only access to the file, and a cache
* is used to limit the number of references managed.
* See bug http://sourceforge.net/p/autoplot/bugs/922/
*
* The result returns a CDF object which contains a read-only memory-m... | get the abstract access object to the given CDF file. This provides read-only access to the file, and a cache is used to limit the number of references managed. See bug HREF The result returns a CDF object which contains a read-only memory-mapped byte buffer | getCdfFile | {
"repo_name": "autoplot/app",
"path": "CdfJavaDataSource/src/org/autoplot/cdf/CdfDataSource.java",
"license": "gpl-2.0",
"size": 70582
} | [
"gov.nasa.gsfc.spdf.cdfj.CDFReader",
"gov.nasa.gsfc.spdf.cdfj.ReaderFactory",
"java.io.File",
"java.util.logging.Level",
"org.das2.qds.buffer.BufferDataSet"
] | import gov.nasa.gsfc.spdf.cdfj.CDFReader; import gov.nasa.gsfc.spdf.cdfj.ReaderFactory; import java.io.File; import java.util.logging.Level; import org.das2.qds.buffer.BufferDataSet; | import gov.nasa.gsfc.spdf.cdfj.*; import java.io.*; import java.util.logging.*; import org.das2.qds.buffer.*; | [
"gov.nasa.gsfc",
"java.io",
"java.util",
"org.das2.qds"
] | gov.nasa.gsfc; java.io; java.util; org.das2.qds; | 309,077 |
public static synchronized boolean copyDirectory(File inDir, File outDir) {
outDir.mkdirs();
File[] files = inDir.listFiles();
for (File inFile : files) {
File outFile = new File(outDir, inFile.getName());
if (inFile.isFile()) {
if (!copy(inFile, outFile)) return false;
}
else {
if (!copyDi... | static synchronized boolean function(File inDir, File outDir) { outDir.mkdirs(); File[] files = inDir.listFiles(); for (File inFile : files) { File outFile = new File(outDir, inFile.getName()); if (inFile.isFile()) { if (!copy(inFile, outFile)) return false; } else { if (!copyDirectory(inFile, outFile)) return false; }... | /**
* Copy a complete directory tree from one directory to another.
* @param inDir the directory to copy.
* @param outDir the copy.
* @return true if the operation succeeded completely; false otherwise.
*/ | Copy a complete directory tree from one directory to another | copyDirectory | {
"repo_name": "blezek/Notion",
"path": "src/main/java/org/rsna/util/FileUtil.java",
"license": "bsd-3-clause",
"size": 30010
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 954,974 |
public static Supplier<Random> from(final Random rand) {
return Suppliers.ofInstance(rand);
} | static Supplier<Random> function(final Random rand) { return Suppliers.ofInstance(rand); } | /**
* Create a {@link Supplier} for the given {@link Random}. It will be
* equal to any other {@code Supplier} created via this method for the
* same {@code Random}.
*/ | Create a <code>Supplier</code> for the given <code>Random</code>. It will be equal to any other Supplier created via this method for the same Random | from | {
"repo_name": "rickbw/incubator",
"path": "src/main/java/rickbw/incubator/random/Randoms.java",
"license": "apache-2.0",
"size": 3235
} | [
"com.google.common.base.Supplier",
"com.google.common.base.Suppliers",
"java.util.Random"
] | import com.google.common.base.Supplier; import com.google.common.base.Suppliers; import java.util.Random; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 471,773 |
public ServiceFuture<VirtualMachineCaptureResultInner> captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback<VirtualMachineCaptureResultInner> serviceCallback) {
return ServiceFuture.fromResponse(captureWithServiceResponseAsync(resourceGroupN... | ServiceFuture<VirtualMachineCaptureResultInner> function(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback<VirtualMachineCaptureResultInner> serviceCallback) { return ServiceFuture.fromResponse(captureWithServiceResponseAsync(resourceGroupName, vmName, parameters... | /**
* Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param parameters Parameters supplied to the Capture Virtu... | Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs | captureAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java",
"license": "mit",
"size": 186385
} | [
"com.microsoft.azure.management.compute.v2017_03_30.VirtualMachineCaptureParameters",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.management.compute.v2017_03_30.VirtualMachineCaptureParameters; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.management.compute.v2017_03_30.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,307,546 |
public double valueToJava2D(double value, Rectangle2D area,
RectangleEdge edge) {
double result = Double.NaN;
double axisMin = this.first.getFirstMillisecond();
double axisMax = this.last.getLastMillisecond();
if (RectangleEdge.isTopOrBottom(edge)) {
double m... | double function(double value, Rectangle2D area, RectangleEdge edge) { double result = Double.NaN; double axisMin = this.first.getFirstMillisecond(); double axisMax = this.last.getLastMillisecond(); if (RectangleEdge.isTopOrBottom(edge)) { double minX = area.getX(); double maxX = area.getMaxX(); if (isInverted()) { resu... | /**
* Converts a data value to a coordinate in Java2D space, assuming that the
* axis runs along one edge of the specified dataArea.
* <p>
* Note that it is possible for the coordinate to fall outside the area.
*
* @param value the data value.
* @param area the area for plotting the... | Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified dataArea. Note that it is possible for the coordinate to fall outside the area | valueToJava2D | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/axis/PeriodAxis.java",
"license": "lgpl-2.1",
"size": 44491
} | [
"java.awt.geom.Rectangle2D",
"org.jfree.ui.RectangleEdge"
] | import java.awt.geom.Rectangle2D; import org.jfree.ui.RectangleEdge; | import java.awt.geom.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.ui"
] | java.awt; org.jfree.ui; | 2,613,789 |
public CircuitSection getCircuitSection() {
if (circuitSection != null && circuitSection.eIsProxy()) {
InternalEObject oldCircuitSection = (InternalEObject)circuitSection;
circuitSection = (CircuitSection)eResolveProxy(oldCircuitSection);
if (circuitSection != oldCircuitSection) {
}
}
return circui... | CircuitSection function() { if (circuitSection != null && circuitSection.eIsProxy()) { InternalEObject oldCircuitSection = (InternalEObject)circuitSection; circuitSection = (CircuitSection)eResolveProxy(oldCircuitSection); if (circuitSection != oldCircuitSection) { } } return circuitSection; } | /**
* Returns the value of the '<em><b>Circuit Section</b></em>' reference.
* It is bidirectional and its opposite is '{@link CIM15.IEC61970.Informative.InfOperations.CircuitSection#getConductorAssets <em>Conductor Assets</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Circuit Section</em... | Returns the value of the 'Circuit Section' reference. It is bidirectional and its opposite is '<code>CIM15.IEC61970.Informative.InfOperations.CircuitSection#getConductorAssets Conductor Assets</code>'. If the meaning of the 'Circuit Section' reference isn't clear, there really should be more of a description here... | getCircuitSection | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/Informative/InfAssets/ConductorAsset.java",
"license": "apache-2.0",
"size": 19827
} | [
"org.eclipse.emf.ecore.InternalEObject"
] | import org.eclipse.emf.ecore.InternalEObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 297,930 |
public WebhookCreateParametersInner withCustomHeaders(Map<String, String> customHeaders) {
this.customHeaders = customHeaders;
return this;
} | WebhookCreateParametersInner function(Map<String, String> customHeaders) { this.customHeaders = customHeaders; return this; } | /**
* Set the customHeaders value.
*
* @param customHeaders the customHeaders value to set
* @return the WebhookCreateParametersInner object itself.
*/ | Set the customHeaders value | withCustomHeaders | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/implementation/WebhookCreateParametersInner.java",
"license": "mit",
"size": 5419
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,170,715 |
try {
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
if (dso == null)
{
return "0"; // no item, something is wrong.
}
return HashUtil.hash(dso.getHandle() + "full:" + showFullItem(objectModel));
}
catch (SQLException... | try { DSpaceObject dso = HandleUtil.obtainHandle(objectModel); if (dso == null) { return "0"; } return HashUtil.hash(dso.getHandle() + "full:" + showFullItem(objectModel)); } catch (SQLException sqle) { return "0"; } } | /**
* Generate the unique caching key.
* This key must be unique inside the space of this component.
*/ | Generate the unique caching key. This key must be unique inside the space of this component | getKey | {
"repo_name": "mdiggory/dryad-repo",
"path": "dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/ItemViewer.java",
"license": "bsd-3-clause",
"size": 10960
} | [
"java.sql.SQLException",
"org.apache.cocoon.util.HashUtil",
"org.dspace.app.xmlui.utils.HandleUtil",
"org.dspace.content.DSpaceObject"
] | import java.sql.SQLException; import org.apache.cocoon.util.HashUtil; import org.dspace.app.xmlui.utils.HandleUtil; import org.dspace.content.DSpaceObject; | import java.sql.*; import org.apache.cocoon.util.*; import org.dspace.app.xmlui.utils.*; import org.dspace.content.*; | [
"java.sql",
"org.apache.cocoon",
"org.dspace.app",
"org.dspace.content"
] | java.sql; org.apache.cocoon; org.dspace.app; org.dspace.content; | 413,328 |
public static Map<String, String> convertExperimenter(ExperimenterData data)
{
LinkedHashMap<String, String> details =
new LinkedHashMap<String, String>(3);
if (data == null) {
details.put(FIRST_NAME, "");
details.put(MIDDLE_NAME, "");
details.... | static Map<String, String> function(ExperimenterData data) { LinkedHashMap<String, String> details = new LinkedHashMap<String, String>(3); if (data == null) { details.put(FIRST_NAME, STRSTRSTRSTRSTRSTRSTRSTRSTR"); } } return details; } | /**
* Transforms the specified {@link ExperimenterData} object into
* a visualization form.
*
* @param data The {@link ExperimenterData} object to transform.
* @return See above.
*/ | Transforms the specified <code>ExperimenterData</code> object into a visualization form | convertExperimenter | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/EditorUtil.java",
"license": "gpl-2.0",
"size": 91320
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 240,351 |
String newValue = "";
if (textToAppend != null) {
newValue = textToAppend;
}
NamedCompound compoundEdit = new NamedCompound(Localization.lang("Append field"));
for (BibEntry entry : entries) {
Optional<String> oldValue = entry.getField(field);
entry.... | String newValue = STRAppend fieldSTR") + newValue); compoundEdit.addEdit(new UndoableFieldChange(entry, field, oldValue.orElse(null), newValue)); } compoundEdit.end(); return compoundEdit; } | /**
* Append a given value to a given field for all entries in a Collection. This method DOES NOT update any UndoManager,
* but returns a relevant CompoundEdit that should be registered by the caller.
*
* @param entries The entries to process the operation for.
* @param field The na... | Append a given value to a given field for all entries in a Collection. This method DOES NOT update any UndoManager, but returns a relevant CompoundEdit that should be registered by the caller | massAppendField | {
"repo_name": "JabRef/jabref",
"path": "src/main/java/org/jabref/gui/edit/MassSetFieldsDialog.java",
"license": "mit",
"size": 11090
} | [
"org.jabref.gui.undo.UndoableFieldChange"
] | import org.jabref.gui.undo.UndoableFieldChange; | import org.jabref.gui.undo.*; | [
"org.jabref.gui"
] | org.jabref.gui; | 553,596 |
protected void finalize(List<SnapshotFiles> snapshots, int fileListGeneration, Map<String, BlobMetaData> blobs) {
BlobStoreIndexShardSnapshots newSnapshots = new BlobStoreIndexShardSnapshots(snapshots);
// delete old index files first
for (String blobName : blobs.keySet()) {
... | void function(List<SnapshotFiles> snapshots, int fileListGeneration, Map<String, BlobMetaData> blobs) { BlobStoreIndexShardSnapshots newSnapshots = new BlobStoreIndexShardSnapshots(snapshots); for (String blobName : blobs.keySet()) { if (indexShardSnapshotsFormat.isTempBlobName(blobName) blobName.startsWith(SNAPSHOT_IN... | /**
* Removes all unreferenced files from the repository and writes new index file
*
* We need to be really careful in handling index files in case of failures to make sure we have index file that
* points to files that were deleted.
*
*
* @param snapshots ... | Removes all unreferenced files from the repository and writes new index file We need to be really careful in handling index files in case of failures to make sure we have index file that points to files that were deleted | finalize | {
"repo_name": "rajanm/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java",
"license": "apache-2.0",
"size": 79218
} | [
"java.io.IOException",
"java.util.List",
"java.util.Map",
"org.apache.logging.log4j.message.ParameterizedMessage",
"org.elasticsearch.common.blobstore.BlobMetaData",
"org.elasticsearch.index.snapshots.IndexShardSnapshotFailedException",
"org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSna... | import java.io.IOException; import java.util.List; import java.util.Map; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.common.blobstore.BlobMetaData; import org.elasticsearch.index.snapshots.IndexShardSnapshotFailedException; import org.elasticsearch.index.snapshots.blobstore.Bl... | import java.io.*; import java.util.*; import org.apache.logging.log4j.message.*; import org.elasticsearch.common.blobstore.*; import org.elasticsearch.index.snapshots.*; import org.elasticsearch.index.snapshots.blobstore.*; | [
"java.io",
"java.util",
"org.apache.logging",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; java.util; org.apache.logging; org.elasticsearch.common; org.elasticsearch.index; | 906,202 |
public static String debugConfiguredLocations() {
Class<?> impl = getLocServiceImpl();
Object instance = getLocationInstance();
Method m;
String s;
try {
m = impl.getDeclaredMethod("printLocations", boolean.class);
s = (String) m.invoke(instance, tru... | static String function() { Class<?> impl = getLocServiceImpl(); Object instance = getLocationInstance(); Method m; String s; try { m = impl.getDeclaredMethod(STR, boolean.class); s = (String) m.invoke(instance, true); } catch (Exception e) { System.err.println(STR); e.printStackTrace(); throw new IllegalStateException(... | /**
* Print out configured locations
*
* @return Formatted string describing configured locations
*/ | Print out configured locations | debugConfiguredLocations | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.junit.extensions/src/test/common/SharedLocationManager.java",
"license": "epl-1.0",
"size": 19185
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 615,106 |
public TimeAlarm getTimeAlarm(ListObject listObject) {
SQLiteDatabase db = this.getReadableDatabase();
String raw = "SELECT b." + COLUMN_TIME_ALARMS_ID + ", b."
+ COLUMN_TIME_ALARMS_DATE + " FROM "
+ TABLE_LIST_OBJECTS_WITH_TIME_ALARM + " a" + " INNER JOIN "
+ TABLE_TIME_ALARMS + " b" + " ON a."
... | TimeAlarm function(ListObject listObject) { SQLiteDatabase db = this.getReadableDatabase(); String raw = STR + COLUMN_TIME_ALARMS_ID + STR + COLUMN_TIME_ALARMS_DATE + STR + TABLE_LIST_OBJECTS_WITH_TIME_ALARM + STR + STR + TABLE_TIME_ALARMS + STR + STR + COLUMN_LIST_OBJECTS_WITH_TIME_ALARM_TIME_ALARM + STR + COLUMN_TIME... | /**
* Returns the TimeAlarm for a ListObject
*
* @param listObject
* @return TimeAlarm for the listObject
*/ | Returns the TimeAlarm for a ListObject | getTimeAlarm | {
"repo_name": "simonjrp/ESCAPE",
"path": "ESCAPE/src/se/chalmers/dat255/group22/escape/database/DBHandler.java",
"license": "gpl-3.0",
"size": 53985
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"java.sql.Date",
"java.util.LinkedList",
"java.util.List",
"se.chalmers.dat255.group22.escape.objects.ListObject",
"se.chalmers.dat255.group22.escape.objects.TimeAlarm"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.sql.Date; import java.util.LinkedList; import java.util.List; import se.chalmers.dat255.group22.escape.objects.ListObject; import se.chalmers.dat255.group22.escape.objects.TimeAlarm; | import android.database.*; import android.database.sqlite.*; import java.sql.*; import java.util.*; import se.chalmers.dat255.group22.escape.objects.*; | [
"android.database",
"java.sql",
"java.util",
"se.chalmers.dat255"
] | android.database; java.sql; java.util; se.chalmers.dat255; | 165,841 |
public void setVolumeAbsolute(int volume) throws IOException {
final int newVolume = volume < 0 ? 0 : volume > 32 ? 32 : volume;
final String params = "value=" + newVolume;
conn.doRequest(REQUEST_SET_VOLUME, params);
currentVolume = volume;
} | void function(int volume) throws IOException { final int newVolume = volume < 0 ? 0 : volume > 32 ? 32 : volume; final String params = STR + newVolume; conn.doRequest(REQUEST_SET_VOLUME, params); currentVolume = volume; } | /**
* Set the radios volume
*
* @param volume
* Radio volume: 0=mute, 32=max. volume
* @throws IOException if communication with the radio failed, e.g. because the device is not reachable.
*/ | Set the radios volume | setVolumeAbsolute | {
"repo_name": "dvanherbergen/smarthome",
"path": "extensions/binding/org.eclipse.smarthome.binding.fsinternetradio/src/main/java/org/eclipse/smarthome/binding/fsinternetradio/internal/radio/FrontierSiliconRadio.java",
"license": "epl-1.0",
"size": 9463
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,632,386 |
public int addInfoFromRoutes(List<Route> additionalRoutes){
if(routes == null || routes.size()==0) {
this.routes = new ArrayList<>(additionalRoutes);
buildRoutesString();
return routes.size();
}
int count=0;
final Calendar c = Calendar.getInstance(... | int function(List<Route> additionalRoutes){ if(routes == null routes.size()==0) { this.routes = new ArrayList<>(additionalRoutes); buildRoutesString(); return routes.size(); } int count=0; final Calendar c = Calendar.getInstance(); final int todaysInt = c.get(Calendar.DAY_OF_WEEK); for(Route r:routes) { int j = 0; bool... | /**
* Add info about the routes already found from another source
* @param additionalRoutes ArrayList of routes to get the info from
* @return the number of routes modified
*/ | Add info about the routes already found from another source | addInfoFromRoutes | {
"repo_name": "valerio-bozzolan/bus-torino",
"path": "src/it/reyboz/bustorino/backend/Palina.java",
"license": "gpl-3.0",
"size": 12851
} | [
"android.util.Log",
"java.util.ArrayList",
"java.util.Calendar",
"java.util.List"
] | import android.util.Log; import java.util.ArrayList; import java.util.Calendar; import java.util.List; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 157,218 |
@SuppressWarnings("rawtypes")
@Override
public boolean equals(Object other)
{
if (!(other instanceof ArrayWrapper))
{
return false;
}
return Arrays.equals(_array, ((ArrayWrapper)other)._array);
} | @SuppressWarnings(STR) boolean function(Object other) { if (!(other instanceof ArrayWrapper)) { return false; } return Arrays.equals(_array, ((ArrayWrapper)other)._array); } | /**
* Determines if this object has a value equivalent to another object.
* @see Arrays#equals(Object[], Object[])
*/ | Determines if this object has a value equivalent to another object | equals | {
"repo_name": "JohnnPM/PartyLobby",
"path": "src/net/amoebaman/util/ArrayWrapper.java",
"license": "gpl-2.0",
"size": 2841
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 568,371 |
public int enableConfigManagement(User loggedInUser, String ksLabel) {
return setConfigFlag(loggedInUser, ksLabel, true);
}
/**
* Disables the configuration management flag in a kickstart profile
* so that a system created using this profile will be NOT be configuration capable.
* @p... | int function(User loggedInUser, String ksLabel) { return setConfigFlag(loggedInUser, ksLabel, true); } /** * Disables the configuration management flag in a kickstart profile * so that a system created using this profile will be NOT be configuration capable. * @param loggedInUser The current user * @param ksLabel the k... | /**
* Enables the configuration management flag in a kickstart profile
* so that a system created using this profile will be configuration capable.
* @param loggedInUser The current user
* @param ksLabel the ks profile label
* @return 1 on success
*
*
* @xmlrpc.doc Enables the co... | Enables the configuration management flag in a kickstart profile so that a system created using this profile will be configuration capable | enableConfigManagement | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/system/SystemDetailsHandler.java",
"license": "gpl-2.0",
"size": 30846
} | [
"com.redhat.rhn.domain.user.User"
] | import com.redhat.rhn.domain.user.User; | import com.redhat.rhn.domain.user.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,380,299 |
public Map < String, Set < String >> getAttributes() {
return this.attributes;
}
| Map < String, Set < String >> function() { return this.attributes; } | /**
* Get the attributes property.
*
* @return the attributes
*/ | Get the attributes property | getAttributes | {
"repo_name": "GIP-RECIA/esco-grouper-ui",
"path": "metier/esco-core/src/main/java/org/esco/grouperui/domaine/beans/Person.java",
"license": "apache-2.0",
"size": 5487
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 295,490 |
protected void callPrivateNotice(final LocalDateTime date, final String sMessage,
final String sHost) {
getCallbackManager().publish(new PrivateNoticeEvent(parser, date, sMessage, sHost));
} | void function(final LocalDateTime date, final String sMessage, final String sHost) { getCallbackManager().publish(new PrivateNoticeEvent(parser, date, sMessage, sHost)); } | /**
* Callback to all objects implementing the PrivateNotice Callback.
*
* @param date The date of this line
* @param sMessage Notice contents
* @param sHost Hostname of sender (or servername)
*/ | Callback to all objects implementing the PrivateNotice Callback | callPrivateNotice | {
"repo_name": "csmith/DMDirc-Parser",
"path": "irc/src/main/java/com/dmdirc/parser/irc/processors/ProcessMessage.java",
"license": "mit",
"size": 24713
} | [
"com.dmdirc.parser.events.PrivateNoticeEvent",
"java.time.LocalDateTime"
] | import com.dmdirc.parser.events.PrivateNoticeEvent; import java.time.LocalDateTime; | import com.dmdirc.parser.events.*; import java.time.*; | [
"com.dmdirc.parser",
"java.time"
] | com.dmdirc.parser; java.time; | 1,754,373 |
public static boolean hasUniqueObject(Collection collection) {
if (isEmpty(collection)) {
return false;
}
boolean hasCandidate = false;
Object candidate = null;
for (Object elem : collection) {
if (!hasCandidate) {
hasCandidate = true;
... | static boolean function(Collection collection) { if (isEmpty(collection)) { return false; } boolean hasCandidate = false; Object candidate = null; for (Object elem : collection) { if (!hasCandidate) { hasCandidate = true; candidate = elem; } else if (candidate != elem) { return false; } } return true; } | /**
* Determine whether the given Collection only contains a single unique object.
*
* @param collection the Collection to check
* @return <code>true</code> if the collection contains a single reference or
* multiple references to the same instance, <code>false</code> else
*/ | Determine whether the given Collection only contains a single unique object | hasUniqueObject | {
"repo_name": "baboune/compass",
"path": "src/main/src/org/compass/core/util/CollectionUtils.java",
"license": "apache-2.0",
"size": 10248
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 975,983 |
protected boolean isEmpty(String searchString) {
return (searchString == null) || searchString.length() == 0;
}
/**
* Matches the cell at row/lastFoundColumn against the pattern.
* Called if sameRowIndex && !hasEqualRegEx.
* PRE: lastFoundColumn valid.
*
* @param pattern ... | boolean function(String searchString) { return (searchString == null) searchString.length() == 0; } /** * Matches the cell at row/lastFoundColumn against the pattern. * Called if sameRowIndex && !hasEqualRegEx. * PRE: lastFoundColumn valid. * * @param pattern <code>Pattern</code> that we will try to match * @param row ... | /**
* Checks if the searchString should be interpreted as empty.
* <p>
* This implementation returns true if string is null or has zero length.
*
* @param searchString <code>String</code> that we should evaluate
* @return true if the provided <code>String</code> should be interpreted as e... | Checks if the searchString should be interpreted as empty. This implementation returns true if string is null or has zero length | isEmpty | {
"repo_name": "sing-group/aibench-project",
"path": "aibench-pluginmanager/src/main/java/org/jdesktop/swingx/search/AbstractSearchable.java",
"license": "lgpl-3.0",
"size": 24267
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,762,356 |
public BigDecimal platesAggregated(PlateBigInteger plate, int p, MathContext mc) {
Preconditions.checkNotNull(plate, "The plate cannot be null.");
List<BigDecimal> aggregated = new ArrayList<BigDecimal>();
for (WellBigInteger well : plate) {
aggregated.addA... | BigDecimal function(PlateBigInteger plate, int p, MathContext mc) { Preconditions.checkNotNull(plate, STR); List<BigDecimal> aggregated = new ArrayList<BigDecimal>(); for (WellBigInteger well : plate) { aggregated.addAll(well.toBigDecimal()); } return calculate(aggregated, p, mc); } | /**
* Returns the aggregated statistic for the plate.
* @param PlateBigInteger the plate
* @param int the integer value
* @param MathContext the math context
* @return the aggregated result
*/ | Returns the aggregated statistic for the plate | platesAggregated | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/bigintegerflex/stat/QuantileStatisticBigIntegerContext.java",
"license": "apache-2.0",
"size": 24763
} | [
"com.github.jessemull.microflex.bigintegerflex.plate.PlateBigInteger",
"com.github.jessemull.microflex.bigintegerflex.plate.WellBigInteger",
"com.google.common.base.Preconditions",
"java.math.BigDecimal",
"java.math.MathContext",
"java.util.ArrayList",
"java.util.List"
] | import com.github.jessemull.microflex.bigintegerflex.plate.PlateBigInteger; import com.github.jessemull.microflex.bigintegerflex.plate.WellBigInteger; import com.google.common.base.Preconditions; import java.math.BigDecimal; import java.math.MathContext; import java.util.ArrayList; import java.util.List; | import com.github.jessemull.microflex.bigintegerflex.plate.*; import com.google.common.base.*; import java.math.*; import java.util.*; | [
"com.github.jessemull",
"com.google.common",
"java.math",
"java.util"
] | com.github.jessemull; com.google.common; java.math; java.util; | 391,065 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
@RequestWrapper(localName = "createCreatives", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411", className = "com.google.api.ads.dfp.jaxws.v201411.CreativeServiceInterfacecreateCr... | @WebResult(name = "rval", targetNamespace = STRcreateCreativesSTRhttps: @ResponseWrapper(localName = "createCreativesResponseSTRhttps: List<Creative> function( @WebParam(name = "creativesSTRhttps: List<Creative> creatives) throws ApiException_Exception ; | /**
*
* Creates new {@link Creative} objects.
*
* @param creatives the creatives to create
* @return the created creatives with their IDs filled in
*
*
* @param creatives
* @return
* returns java.util.List<com.google.api.ads... | Creates new <code>Creative</code> objects | createCreatives | {
"repo_name": "nafae/developer",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201411/CreativeServiceInterface.java",
"license": "apache-2.0",
"size": 5683
} | [
"java.util.List",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.ResponseWrapper"
] | import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper; | import java.util.*; import javax.jws.*; import javax.xml.ws.*; | [
"java.util",
"javax.jws",
"javax.xml"
] | java.util; javax.jws; javax.xml; | 1,790,766 |
private void readObject(
ObjectInputStream in)
throws IOException, ClassNotFoundException
{
in.defaultReadObject();
double[] data = (double[]) in.readObject();
boolean deepCopy = false;
this.setInternalVector(
new no.uib.cipr.matrix.DenseVector( dat... | void function( ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); double[] data = (double[]) in.readObject(); boolean deepCopy = false; this.setInternalVector( new no.uib.cipr.matrix.DenseVector( data, deepCopy ) ); } | /**
* Reads in a serialized class from the specified stream
* @param in stream from which to read the DenseVector
* @throws java.io.IOException On bad read
* @throws java.lang.ClassNotFoundException if next object isn't DenseVector
*/ | Reads in a serialized class from the specified stream | readObject | {
"repo_name": "codeaudit/Foundry",
"path": "Components/CommonCore/Source/gov/sandia/cognition/math/matrix/mtj/DenseVector.java",
"license": "bsd-3-clause",
"size": 11479
} | [
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,459,056 |
public void insert(SysRoleMenuRel record) throws SQLException {
sqlMapClient.insert("sys_role_menu_rel.insert", record);
}
| void function(SysRoleMenuRel record) throws SQLException { sqlMapClient.insert(STR, record); } | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_role_menu_rel
*
* @mbggenerated Sun May 08 15:13:45 CST 2016
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table sys_role_menu_rel | insert | {
"repo_name": "ahwxl/ads",
"path": "ads/src/main/java/com/bplow/netconn/systemmng/dao/impl/SysRoleMenuRelDAOImpl.java",
"license": "apache-2.0",
"size": 6670
} | [
"com.bplow.netconn.systemmng.dao.entity.SysRoleMenuRel",
"java.sql.SQLException"
] | import com.bplow.netconn.systemmng.dao.entity.SysRoleMenuRel; import java.sql.SQLException; | import com.bplow.netconn.systemmng.dao.entity.*; import java.sql.*; | [
"com.bplow.netconn",
"java.sql"
] | com.bplow.netconn; java.sql; | 1,523,506 |
public interface AccessibilityDelegate {
void updateCustomAccessibilityActions(@NonNull ByteBuffer buffer, @NonNull String[] strings); | interface AccessibilityDelegate { void function(@NonNull ByteBuffer buffer, @NonNull String[] strings); | /**
* Sends new custom accessibility actions from Flutter to Android.
*
* <p>Implementers are expected to maintain an Android-side cache of custom accessibility
* actions. This method provides new actions to add to that cache.
*/ | Sends new custom accessibility actions from Flutter to Android. Implementers are expected to maintain an Android-side cache of custom accessibility actions. This method provides new actions to add to that cache | updateCustomAccessibilityActions | {
"repo_name": "flutter/engine",
"path": "shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java",
"license": "bsd-3-clause",
"size": 55031
} | [
"androidx.annotation.NonNull",
"java.nio.ByteBuffer"
] | import androidx.annotation.NonNull; import java.nio.ByteBuffer; | import androidx.annotation.*; import java.nio.*; | [
"androidx.annotation",
"java.nio"
] | androidx.annotation; java.nio; | 2,202,152 |
public Component getComponentFromLastRenderedPage(String path,
final boolean wantVisibleInHierarchy)
{
if (componentInPage != null && componentInPage.isInstantiated)
{
String componentIdPageId = componentInPage.component.getId() + ':';
if (path.startsWith(componentIdPageId) == false)
{
path = com... | Component function(String path, final boolean wantVisibleInHierarchy) { if (componentInPage != null && componentInPage.isInstantiated) { String componentIdPageId = componentInPage.component.getId() + ':'; if (path.startsWith(componentIdPageId) == false) { path = componentIdPageId + path; } } Component component = getLa... | /**
* Gets the component with the given path from last rendered page. This method fails in case the
* component couldn't be found.
*
* @param path
* Path to component
* @param wantVisibleInHierarchy
* if true component needs to be VisibleInHierarchy else null is returned
* @return... | Gets the component with the given path from last rendered page. This method fails in case the component couldn't be found | getComponentFromLastRenderedPage | {
"repo_name": "AlienQueen/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java",
"license": "apache-2.0",
"size": 83429
} | [
"org.apache.wicket.Component",
"org.apache.wicket.util.lang.Classes",
"org.junit.Assert"
] | import org.apache.wicket.Component; import org.apache.wicket.util.lang.Classes; import org.junit.Assert; | import org.apache.wicket.*; import org.apache.wicket.util.lang.*; import org.junit.*; | [
"org.apache.wicket",
"org.junit"
] | org.apache.wicket; org.junit; | 1,281,155 |
public static boolean authorize(String username, String principal) {
for (AuthorizationPolicy ap : authorizationPolicies) {
if (Log.isDebugEnabled()) {
Log.debug("AuthorizationManager: Trying "+ap.name()+".authorize("+username+" , "+principal+")");
}
if (... | static boolean function(String username, String principal) { for (AuthorizationPolicy ap : authorizationPolicies) { if (Log.isDebugEnabled()) { Log.debug(STR+ap.name()+STR+username+STR+principal+")"); } if (ap.authorize(username, principal)) { try { UserManager.getUserProvider().loadUser(username); } catch (UserNotFoun... | /**
* Authorize the authenticated used to the requested username. This uses the
* selected the selected AuthenticationProviders.
*
* @param username The requested username.
* @param principal The authenticated principal.
* @return true if the user is authorized.
*/ | Authorize the authenticated used to the requested username. This uses the selected the selected AuthenticationProviders | authorize | {
"repo_name": "zuoyebushiwo/openfire-my-study",
"path": "src/java/org/jivesoftware/openfire/auth/AuthorizationManager.java",
"license": "apache-2.0",
"size": 9681
} | [
"org.jivesoftware.openfire.user.UserAlreadyExistsException",
"org.jivesoftware.openfire.user.UserManager",
"org.jivesoftware.openfire.user.UserNotFoundException",
"org.jivesoftware.util.JiveGlobals",
"org.jivesoftware.util.StringUtils"
] | import org.jivesoftware.openfire.user.UserAlreadyExistsException; import org.jivesoftware.openfire.user.UserManager; import org.jivesoftware.openfire.user.UserNotFoundException; import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.StringUtils; | import org.jivesoftware.openfire.user.*; import org.jivesoftware.util.*; | [
"org.jivesoftware.openfire",
"org.jivesoftware.util"
] | org.jivesoftware.openfire; org.jivesoftware.util; | 1,446,691 |
public Properties getCustomProperties() {
return customProperties;
} | Properties function() { return customProperties; } | /**
* Return custom properties to be set on the stub or call.
*/ | Return custom properties to be set on the stub or call | getCustomProperties | {
"repo_name": "raedle/univis",
"path": "lib/springframework-1.2.8/src/org/springframework/remoting/jaxrpc/JaxRpcPortClientInterceptor.java",
"license": "lgpl-2.1",
"size": 20129
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 881,337 |
public void setToolInfoModelHLAPI(
AnyObjectHLAPI elem){
if(elem!=null)
item.setToolInfoModel((AnyObject)elem.getContainedItem());
}
| void function( AnyObjectHLAPI elem){ if(elem!=null) item.setToolInfoModel((AnyObject)elem.getContainedItem()); } | /**
* set ToolInfoModel
*/ | set ToolInfoModel | setToolInfoModelHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/hlapi/ToolInfoHLAPI.java",
"license": "epl-1.0",
"size": 15133
} | [
"fr.lip6.move.pnml.ptnet.AnyObject"
] | import fr.lip6.move.pnml.ptnet.AnyObject; | import fr.lip6.move.pnml.ptnet.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 2,633,418 |
public void pong(ByteBuffer data) throws IOException {
sendControlMessage(data, Constants.OPCODE_PONG);
} | void function(ByteBuffer data) throws IOException { sendControlMessage(data, Constants.OPCODE_PONG); } | /**
* Send a pong message to the client
*
* @param data Optional message.
*
* @throws IOException If an error occurs writing to the client
*/ | Send a pong message to the client | pong | {
"repo_name": "mayonghui2112/helloWorld",
"path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/catalina/websocket/WsOutbound.java",
"license": "apache-2.0",
"size": 19114
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,018,541 |
Map<Integer, Restriction> getActualRestrictions(); | Map<Integer, Restriction> getActualRestrictions(); | /**
* <p>Get filtered {@link Restriction}s to bind to specifics data API</p>
* <p>
* Based on {@link Restriction} added by {@link #where(List)} or
* {@link #where(Restriction...)}, this method only return
* {@link Restriction} that parsed by
* {@link RestrictionHandler#handleRestriction(Restriction)} whe... | Get filtered <code>Restriction</code>s to bind to specifics data API Based on <code>Restriction</code> added by <code>#where(List)</code> or <code>#where(Restriction...)</code>, this method only return <code>Restriction</code> that parsed by <code>RestrictionHandler#handleRestriction(Restriction)</code> when <code>Resu... | getActualRestrictions | {
"repo_name": "dynamicfinder/dynamicfinder",
"path": "src/main/java/org/dynamicfinder/QueryBuilder.java",
"license": "apache-2.0",
"size": 5496
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,566,615 |
@Kroll.method
public void add(Object args)
{
if (args == null) {
Log.e(TAG, "Add called with a null child");
return;
}
if (children == null) {
children = new ArrayList<TiViewProxy>();
}
if (args instanceof Object[]) {
for (Object arg : (Object[]) args) {
if (arg instanceof TiViewProxy) {
... | @Kroll.method void function(Object args) { if (args == null) { Log.e(TAG, STR); return; } if (children == null) { children = new ArrayList<TiViewProxy>(); } if (args instanceof Object[]) { for (Object arg : (Object[]) args) { if (arg instanceof TiViewProxy) { add((TiViewProxy) arg); } else { Log.w(TAG, STR + arg.getCla... | /**
* Adds a child to this view proxy.
* @param args The child view proxy/proxies to add.
* @module.api
*/ | Adds a child to this view proxy | add | {
"repo_name": "mano-mykingdom/titanium_mobile",
"path": "android/titanium/src/java/org/appcelerator/titanium/proxy/TiViewProxy.java",
"license": "apache-2.0",
"size": 36352
} | [
"java.lang.ref.WeakReference",
"java.util.ArrayList",
"org.appcelerator.kroll.annotations.Kroll",
"org.appcelerator.kroll.common.Log"
] | import java.lang.ref.WeakReference; import java.util.ArrayList; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.kroll.common.Log; | import java.lang.ref.*; import java.util.*; import org.appcelerator.kroll.annotations.*; import org.appcelerator.kroll.common.*; | [
"java.lang",
"java.util",
"org.appcelerator.kroll"
] | java.lang; java.util; org.appcelerator.kroll; | 1,653,289 |
static void addRemoteIP(StringBuilder b) {
InetAddress ip = Server.getRemoteIp();
// ip address can be null for testcases
if (ip != null) {
add(Keys.IP, ip.getHostAddress(), b);
}
} | static void addRemoteIP(StringBuilder b) { InetAddress ip = Server.getRemoteIp(); if (ip != null) { add(Keys.IP, ip.getHostAddress(), b); } } | /**
* A helper api to add remote IP address
*/ | A helper api to add remote IP address | addRemoteIP | {
"repo_name": "yelshater/hadoop-2.3.0",
"path": "hadoop-yarn-server-resourcemanager-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAuditLogger.java",
"license": "apache-2.0",
"size": 12020
} | [
"java.net.InetAddress",
"org.apache.hadoop.ipc.Server"
] | import java.net.InetAddress; import org.apache.hadoop.ipc.Server; | import java.net.*; import org.apache.hadoop.ipc.*; | [
"java.net",
"org.apache.hadoop"
] | java.net; org.apache.hadoop; | 1,616,798 |
public void testToQueryNonDateWithTimezone() throws QueryShardException, IOException {
RangeQueryBuilder query = new RangeQueryBuilder(INT_FIELD_NAME);
query.from(1).to(10).timeZone("UTC");
try {
query.toQuery(createShardContext());
fail("Expected QueryShardException"... | void function() throws QueryShardException, IOException { RangeQueryBuilder query = new RangeQueryBuilder(INT_FIELD_NAME); query.from(1).to(10).timeZone("UTC"); try { query.toQuery(createShardContext()); fail(STR); } catch (QueryShardException e) { assertThat(e.getMessage(), containsString(STR)); } } | /**
* Specifying a timezone together with a numeric range query should throw an exception.
*/ | Specifying a timezone together with a numeric range query should throw an exception | testToQueryNonDateWithTimezone | {
"repo_name": "mapr/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/index/query/RangeQueryBuilderTests.java",
"license": "apache-2.0",
"size": 42714
} | [
"java.io.IOException",
"org.hamcrest.Matchers"
] | import java.io.IOException; import org.hamcrest.Matchers; | import java.io.*; import org.hamcrest.*; | [
"java.io",
"org.hamcrest"
] | java.io; org.hamcrest; | 99,690 |
public static void sendResponse(InternalDistributedMember recipient, int processorId,
DistributionManager dm, InternalDistributedMember primary) {
Assert.assertTrue(recipient != null, "CreateBucketReplyMessage NULL reply message");
CreateBucketReplyMessage m = new CreateBucketReplyMessage(proces... | static void function(InternalDistributedMember recipient, int processorId, DistributionManager dm, InternalDistributedMember primary) { Assert.assertTrue(recipient != null, STR); CreateBucketReplyMessage m = new CreateBucketReplyMessage(processorId, primary); m.setRecipient(recipient); dm.putOutgoing(m); } | /**
* Accept the request to manage the bucket
*
* @param recipient the requesting node
* @param processorId the identity of the processor the requesting node is waiting on
* @param dm the distribution manager used to send the acceptance message
*/ | Accept the request to manage the bucket | sendResponse | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/CreateBucketMessage.java",
"license": "apache-2.0",
"size": 13474
} | [
"org.apache.geode.distributed.internal.DistributionManager",
"org.apache.geode.distributed.internal.membership.InternalDistributedMember",
"org.apache.geode.internal.Assert"
] | import org.apache.geode.distributed.internal.DistributionManager; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; import org.apache.geode.internal.Assert; | import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.membership.*; import org.apache.geode.internal.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,278,366 |
public HasClickHandlers getCancelButton();
| HasClickHandlers function(); | /**
* Gets the cancel button.
*
* @return the cancel button
*/ | Gets the cancel button | getCancelButton | {
"repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/mat/client/measure/MeasureNotesPresenter.java",
"license": "apache-2.0",
"size": 17122
} | [
"com.google.gwt.event.dom.client.HasClickHandlers"
] | import com.google.gwt.event.dom.client.HasClickHandlers; | import com.google.gwt.event.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,130,295 |
public boolean setCurrentTheme(int theme){
if (Looper.getMainLooper().getThread() != Thread.currentThread())
return false;
if(mCurrentTheme != theme){
mCurrentTheme = theme;
SharedPreferences pref = getSharedPreferences(mContext);
if(pref != null)
... | boolean function(int theme){ if (Looper.getMainLooper().getThread() != Thread.currentThread()) return false; if(mCurrentTheme != theme){ mCurrentTheme = theme; SharedPreferences pref = getSharedPreferences(mContext); if(pref != null) pref.edit().putInt(KEY_THEME, mCurrentTheme).apply(); dispatchThemeChanged(mCurrentThe... | /**
* Set the current theme. Should be called in main thread (UI thread).
* @param theme The current theme.
* @return True if set theme successfully, False if method's called on main thread or theme already set.
*/ | Set the current theme. Should be called in main thread (UI thread) | setCurrentTheme | {
"repo_name": "XhinLiang/MDPreference",
"path": "material/src/main/java/com/rey/material/util/ThemeManager.java",
"license": "apache-2.0",
"size": 8348
} | [
"android.content.SharedPreferences",
"android.os.Looper"
] | import android.content.SharedPreferences; import android.os.Looper; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 237,088 |
public List<MCState> getErrorTrace()
{
FileEditorInput logFileEditorInput = new FileEditorInput(getTraceSourceFile());
FileDocumentProvider logFileDocumentProvider = new FileDocumentProvider();
try
{
logFileDocumentProvider.connect(logFileEditorInput);
... | List<MCState> function() { FileEditorInput logFileEditorInput = new FileEditorInput(getTraceSourceFile()); FileDocumentProvider logFileDocumentProvider = new FileDocumentProvider(); try { logFileDocumentProvider.connect(logFileEditorInput); IDocument logFileDocument = logFileDocumentProvider.getDocument(logFileEditorIn... | /**
* Returns a possibly empty List of {@link SimpleTLCState} that represents
* the error trace produced by the most recent run of TLC on config, if an error
* trace was produced.
*/ | Returns a possibly empty List of <code>SimpleTLCState</code> that represents the error trace produced by the most recent run of TLC on config, if an error trace was produced | getErrorTrace | {
"repo_name": "tlaplus/tlaplus",
"path": "toolbox/org.lamport.tla.toolbox.tool.tlc/src/org/lamport/tla/toolbox/tool/tlc/model/Model.java",
"license": "mit",
"size": 52916
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Vector",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.FindReplaceDocumentAdapter",
"org.eclipse.jface.text.IDocument",
"org.eclipse.jface.text.IRegion",
"org.eclipse.ui.editors.tex... | import java.util.ArrayList; import java.util.List; import java.util.Vector; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.FindReplaceDocumentAdapter; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import ... | import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*; import org.eclipse.ui.editors.text.*; import org.eclipse.ui.part.*; import org.lamport.tla.toolbox.tool.tlc.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.jface",
"org.eclipse.ui",
"org.lamport.tla"
] | java.util; org.eclipse.core; org.eclipse.jface; org.eclipse.ui; org.lamport.tla; | 2,132,816 |
@SuppressWarnings("IfMayBeConditional")
public IgniteInternalFuture<Boolean> dynamicStartSqlCache(
CacheConfiguration ccfg
) {
A.notNull(ccfg, "ccfg");
return dynamicStartCache(ccfg,
ccfg.getName(),
ccfg.getNearConfiguration(),
CacheType.USER,
... | @SuppressWarnings(STR) IgniteInternalFuture<Boolean> function( CacheConfiguration ccfg ) { A.notNull(ccfg, "ccfg"); return dynamicStartCache(ccfg, ccfg.getName(), ccfg.getNearConfiguration(), CacheType.USER, true, false, true, true); } | /**
* Dynamically starts cache as a result of SQL {@code CREATE TABLE} command.
*
* @param ccfg Cache configuration.
*/ | Dynamically starts cache as a result of SQL CREATE TABLE command | dynamicStartSqlCache | {
"repo_name": "voipp/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java",
"license": "apache-2.0",
"size": 173961
} | [
"org.apache.ignite.configuration.CacheConfiguration",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.util.typedef.internal.A"
] | import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.internal.A; | import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,799,564 |
@SuppressWarnings({"CatchGenericClass"})
private void notifyLifecycleBeansEx(LifecycleEventType evt) {
try {
notifyLifecycleBeans(evt);
}
// Catch generic throwable to secure against user assertions.
catch (Throwable e) {
U.error(log, "Failed to notify lif... | @SuppressWarnings({STR}) void function(LifecycleEventType evt) { try { notifyLifecycleBeans(evt); } catch (Throwable e) { U.error(log, STR + evt + (igniteInstanceName == null ? STR, igniteInstanceName=" + igniteInstanceName) + ']', e); if (e instanceof Error) throw (Error)e; } } | /**
* Notifies life-cycle beans of grid event.
*
* @param evt Grid event.
*/ | Notifies life-cycle beans of grid event | notifyLifecycleBeansEx | {
"repo_name": "SharplEr/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java",
"license": "apache-2.0",
"size": 153416
} | [
"org.apache.ignite.internal.util.typedef.internal.U",
"org.apache.ignite.lifecycle.LifecycleEventType"
] | import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lifecycle.LifecycleEventType; | import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lifecycle.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,450,107 |
SchemaObject unregisterAttributeType( String attributeTypeOid ) throws LdapException; | SchemaObject unregisterAttributeType( String attributeTypeOid ) throws LdapException; | /**
* Removes the registered attributeType from the attributeTypeRegistry
*
* @param attributeTypeOid the attributeType OID to unregister
* @throws LdapException if the attributeType is invalid
*/ | Removes the registered attributeType from the attributeTypeRegistry | unregisterAttributeType | {
"repo_name": "darranl/directory-shared",
"path": "ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaManager.java",
"license": "apache-2.0",
"size": 27568
} | [
"org.apache.directory.api.ldap.model.exception.LdapException"
] | import org.apache.directory.api.ldap.model.exception.LdapException; | import org.apache.directory.api.ldap.model.exception.*; | [
"org.apache.directory"
] | org.apache.directory; | 731,916 |
private Entity persistInternal(Entity entity)
throws Exception
{
EntityState state = entity.__caucho_getEntityState();
if (state == null)
state = EntityState.TRANSIENT;
switch (state) {
case TRANSIENT:
{
Entity contextEntity = getEntity(entity.getClass(),
... | Entity function(Entity entity) throws Exception { EntityState state = entity.__caucho_getEntityState(); if (state == null) state = EntityState.TRANSIENT; switch (state) { case TRANSIENT: { Entity contextEntity = getEntity(entity.getClass(), entity.__caucho_getPrimaryKey()); if (contextEntity == null) { } else if (conte... | /**
* Persists the entity.
*/ | Persists the entity | persistInternal | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/amber/manager/AmberConnection.java",
"license": "gpl-2.0",
"size": 89822
} | [
"com.caucho.amber.entity.Entity",
"com.caucho.amber.entity.EntityState",
"com.caucho.amber.type.EntityType",
"javax.persistence.EntityExistsException"
] | import com.caucho.amber.entity.Entity; import com.caucho.amber.entity.EntityState; import com.caucho.amber.type.EntityType; import javax.persistence.EntityExistsException; | import com.caucho.amber.entity.*; import com.caucho.amber.type.*; import javax.persistence.*; | [
"com.caucho.amber",
"javax.persistence"
] | com.caucho.amber; javax.persistence; | 2,310,825 |
public static ObjectTypeAttributeDefinition.Builder getAttributeBuilder(String name, String xmlName, boolean allowNull) {
return getAttributeBuilder(name, xmlName, allowNull, false);
}
/**
* Get an attribute builder for a credential-reference attribute with the specified characteristics, optio... | static ObjectTypeAttributeDefinition.Builder function(String name, String xmlName, boolean allowNull) { return getAttributeBuilder(name, xmlName, allowNull, false); } /** * Get an attribute builder for a credential-reference attribute with the specified characteristics, optionally configured to * {@link org.jboss.as.co... | /**
* Get an attribute builder for a credential-reference attribute with the specified characteristics. The
* {@code store} field in the attribute does not register any requirement for a credential store capability.
*
* @param name name of attribute
* @param xmlName name of xml element
* @... | Get an attribute builder for a credential-reference attribute with the specified characteristics. The store field in the attribute does not register any requirement for a credential store capability | getAttributeBuilder | {
"repo_name": "bstansberry/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/security/CredentialReference.java",
"license": "lgpl-2.1",
"size": 45827
} | [
"org.jboss.as.controller.ObjectTypeAttributeDefinition"
] | import org.jboss.as.controller.ObjectTypeAttributeDefinition; | import org.jboss.as.controller.*; | [
"org.jboss.as"
] | org.jboss.as; | 1,628,488 |
public static boolean isStatusCodeOk(int statusCode, String okStatusCodeRange) {
String[] ranges = okStatusCodeRange.split(",");
for (String range : ranges) {
boolean ok;
if (range.contains("-")) {
int from = Integer.valueOf(StringHelper.before(range, "-"));
... | static boolean function(int statusCode, String okStatusCodeRange) { String[] ranges = okStatusCodeRange.split(","); for (String range : ranges) { boolean ok; if (range.contains("-")) { int from = Integer.valueOf(StringHelper.before(range, "-")); int to = Integer.valueOf(StringHelper.after(range, "-")); ok = statusCode ... | /**
* Checks whether the given http status code is within the ok range
*
* @param statusCode the status code
* @param okStatusCodeRange the ok range (inclusive)
* @return <tt>true</tt> if ok, <tt>false</tt> otherwise
*/ | Checks whether the given http status code is within the ok range | isStatusCodeOk | {
"repo_name": "onders86/camel",
"path": "components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpHelper.java",
"license": "apache-2.0",
"size": 11131
} | [
"org.apache.camel.util.StringHelper"
] | import org.apache.camel.util.StringHelper; | import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,911,307 |
private void iniciarComponentes() {
setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED,
new Color(102, 204, 255),
new Color(51, 153, 255),
new Color(0, 0, 102),
new Color(0, 0, 153)));
_panelPrinc... | void function() { setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED, new Color(102, 204, 255), new Color(51, 153, 255), new Color(0, 0, 102), new Color(0, 0, 153))); _panelPrincipal = new JPanel(); _lblNombre = new JLabel(STR); _lblTamanio = new JLabel(STR); _lblTipoArchivo = new JLabel("Tipo"); _lblHash = n... | /**
* Inicia los componentes de la cabecera.
*/ | Inicia los componentes de la cabecera | iniciarComponentes | {
"repo_name": "salcedonia/egorilla-software-engineering-2008-2009",
"path": "Cliente/src/gui/grafica/buscador/PanelBusqueda.java",
"license": "gpl-2.0",
"size": 17622
} | [
"java.awt.BorderLayout",
"java.awt.Color",
"java.awt.GridLayout",
"javax.swing.BorderFactory",
"javax.swing.JLabel",
"javax.swing.JMenuItem",
"javax.swing.JPanel",
"javax.swing.border.BevelBorder"
] | import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridLayout; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.border.BevelBorder; | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 491,652 |
private Label getLabelFromCursorAtCurrentPosition(Cursor cursor) {
if (cursor == null || cursor.isClosed() || cursor.isAfterLast()) {
LogUtils.w(TAG, "Failed to get label from cursor.");
return null;
}
final long labelId = cursor.getLong(LabelsTable.INDEX_ID);
final String packageName = c... | Label function(Cursor cursor) { if (cursor == null cursor.isClosed() cursor.isAfterLast()) { LogUtils.w(TAG, STR); return null; } final long labelId = cursor.getLong(LabelsTable.INDEX_ID); final String packageName = cursor.getString(LabelsTable.INDEX_PACKAGE_NAME); final String packageSignature = cursor.getString(Label... | /**
* Gets a {@link Label} object from the data in the given cursor at the current row position.
*
* @param cursor The cursor to use to get the label.
* @return The label at the current cursor position, or {@code null} if the current cursor
* position has no row.
*/ | Gets a <code>Label</code> object from the data in the given cursor at the current row position | getLabelFromCursorAtCurrentPosition | {
"repo_name": "google/talkback",
"path": "utils/src/main/java/com/google/android/accessibility/utils/labeling/LabelProviderClient.java",
"license": "apache-2.0",
"size": 22938
} | [
"android.database.Cursor",
"com.google.android.libraries.accessibility.utils.log.LogUtils"
] | import android.database.Cursor; import com.google.android.libraries.accessibility.utils.log.LogUtils; | import android.database.*; import com.google.android.libraries.accessibility.utils.log.*; | [
"android.database",
"com.google.android"
] | android.database; com.google.android; | 1,117,914 |
EEnum getBooleanUnaryOperator(); | EEnum getBooleanUnaryOperator(); | /**
* Returns the meta object for enum '{@link org.gemoc.activitydiagram.concurrent.xactivitydiagrammt.activitydiagram.BooleanUnaryOperator <em>Boolean Unary Operator</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Boolean Unary Operator</em>'.
* @see org.gemo... | Returns the meta object for enum '<code>org.gemoc.activitydiagram.concurrent.xactivitydiagrammt.activitydiagram.BooleanUnaryOperator Boolean Unary Operator</code>'. | getBooleanUnaryOperator | {
"repo_name": "gemoc/activitydiagram",
"path": "dev/gemoc_concurrent/language_workbench/org.gemoc.activitydiagram.concurrent/src-gen/org/gemoc/activitydiagram/concurrent/xactivitydiagrammt/activitydiagram/ActivitydiagramPackage.java",
"license": "epl-1.0",
"size": 147901
} | [
"org.eclipse.emf.ecore.EEnum"
] | import org.eclipse.emf.ecore.EEnum; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 544,079 |
@Test
public void testCoreInitializedBySpringIsConfiguredWithReportGenerator() throws Exception {
ResultListener[] listeners = coreComponent.getListeners();
// test
assertEquals(1, listeners.length);
assertThat(BasicHtmlReportGeneratorImpl.class.getName(),
StringContains.containsString(listeners... | void function() throws Exception { ResultListener[] listeners = coreComponent.getListeners(); assertEquals(1, listeners.length); assertThat(BasicHtmlReportGeneratorImpl.class.getName(), StringContains.containsString(listeners[FIRST_INDEX].getClass().getName())); } | /**
* Test that core component configured by web application core factory as part
* of the Spring configuration is configured with report generator.
*
* @throws Exception if test fails.
*/ | Test that core component configured by web application core factory as part of the Spring configuration is configured with report generator | testCoreInitializedBySpringIsConfiguredWithReportGenerator | {
"repo_name": "athrane/pineapple",
"path": "applications/pineapple-web-application/pineapple-web-application-war/src/test/java/com/alpha/pineapple/web/WebAppCoreFactoryIntegrationTest.java",
"license": "gpl-3.0",
"size": 16234
} | [
"com.alpha.pineapple.execution.ResultListener",
"com.alpha.pineapple.report.basichtml.BasicHtmlReportGeneratorImpl",
"org.hamcrest.core.StringContains",
"org.junit.Assert"
] | import com.alpha.pineapple.execution.ResultListener; import com.alpha.pineapple.report.basichtml.BasicHtmlReportGeneratorImpl; import org.hamcrest.core.StringContains; import org.junit.Assert; | import com.alpha.pineapple.execution.*; import com.alpha.pineapple.report.basichtml.*; import org.hamcrest.core.*; import org.junit.*; | [
"com.alpha.pineapple",
"org.hamcrest.core",
"org.junit"
] | com.alpha.pineapple; org.hamcrest.core; org.junit; | 74,136 |
@SuppressWarnings("unchecked")
public static List<Integer> getAt(int[] array, Collection indices) {
return primitiveArrayGet(array, indices);
} | @SuppressWarnings(STR) static List<Integer> function(int[] array, Collection indices) { return primitiveArrayGet(array, indices); } | /**
* Support the subscript operator with a collection for an int array
*
* @param array an int array
* @param indices a collection of indices for the items to retrieve
* @return list of the ints at the given indices
* @since 1.0
*/ | Support the subscript operator with a collection for an int array | getAt | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "lgpl-2.1",
"size": 704150
} | [
"java.util.Collection",
"java.util.List"
] | import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,415,919 |
public void setModified(DateTime modified) {
this.modified = modified;
}
| void function(DateTime modified) { this.modified = modified; } | /**
* Setter to set the modified
*
* @param modified
* the modified to set
*/ | Setter to set the modified | setModified | {
"repo_name": "pawlidim/aletheia",
"path": "src/main/java/de/pawlidi/openaletheia/base/model/License.java",
"license": "apache-2.0",
"size": 8668
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,860,895 |
private static String toHtmlString(final OptionWithMetaInfo optionWithMetaInfo) {
ConfigOption<?> option = optionWithMetaInfo.option;
String defaultValue = stringifyDefault(optionWithMetaInfo);
String type = typeToHtml(optionWithMetaInfo);
Documentation.TableOption tableOption =
... | static String function(final OptionWithMetaInfo optionWithMetaInfo) { ConfigOption<?> option = optionWithMetaInfo.option; String defaultValue = stringifyDefault(optionWithMetaInfo); String type = typeToHtml(optionWithMetaInfo); Documentation.TableOption tableOption = optionWithMetaInfo.field.getAnnotation(Documentation... | /**
* Transforms option to table row.
*
* @param optionWithMetaInfo option to transform
* @return row with the option description
*/ | Transforms option to table row | toHtmlString | {
"repo_name": "aljoscha/flink",
"path": "flink-docs/src/main/java/org/apache/flink/docs/configuration/ConfigOptionsDocGenerator.java",
"license": "apache-2.0",
"size": 28266
} | [
"org.apache.flink.annotation.docs.Documentation",
"org.apache.flink.configuration.ConfigOption"
] | import org.apache.flink.annotation.docs.Documentation; import org.apache.flink.configuration.ConfigOption; | import org.apache.flink.annotation.docs.*; import org.apache.flink.configuration.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,523,515 |
public Builder useParameterFile(ParameterFileType parameterFileType) {
return useParameterFile(parameterFileType, ISO_8859_1, "@");
} | Builder function(ParameterFileType parameterFileType) { return useParameterFile(parameterFileType, ISO_8859_1, "@"); } | /**
* Enable use of a parameter file and set the encoding to ISO-8859-1 (latin1).
*
* <p>In order to use parameter files, at least one output artifact must be specified.
*/ | Enable use of a parameter file and set the encoding to ISO-8859-1 (latin1). In order to use parameter files, at least one output artifact must be specified | useParameterFile | {
"repo_name": "dinowernli/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java",
"license": "apache-2.0",
"size": 35451
} | [
"com.google.devtools.build.lib.actions.ParameterFile"
] | import com.google.devtools.build.lib.actions.ParameterFile; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,814,486 |
EAttribute getUiColumn_Collapsed(); | EAttribute getUiColumn_Collapsed(); | /**
* Returns the meta object for the attribute '{@link org.lunifera.ecview.semantic.uimodel.UiColumn#isCollapsed <em>Collapsed</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Collapsed</em>'.
* @see org.lunifera.ecview.semantic.uimodel.UiColumn#isCol... | Returns the meta object for the attribute '<code>org.lunifera.ecview.semantic.uimodel.UiColumn#isCollapsed Collapsed</code>'. | getUiColumn_Collapsed | {
"repo_name": "lunifera/lunifera-ecview-addons",
"path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java",
"license": "epl-1.0",
"size": 498897
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,419,521 |
public static ITypeBinding[] getAllSuperTypes(ITypeBinding type) {
Set<ITypeBinding> result= new HashSet<ITypeBinding>();
collectSuperTypes(type, result);
result.remove(type);
return result.toArray(new ITypeBinding[result.size()]);
} | static ITypeBinding[] function(ITypeBinding type) { Set<ITypeBinding> result= new HashSet<ITypeBinding>(); collectSuperTypes(type, result); result.remove(type); return result.toArray(new ITypeBinding[result.size()]); } | /**
* Returns all super types (classes and interfaces) for the given type.
* @param type The type to get the supertypes of.
* @return all super types (excluding <code>type</code>)
*/ | Returns all super types (classes and interfaces) for the given type | getAllSuperTypes | {
"repo_name": "dhuebner/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/corext/dom/Bindings.java",
"license": "epl-1.0",
"size": 64635
} | [
"java.util.HashSet",
"java.util.Set",
"org.eclipse.jdt.core.dom.ITypeBinding"
] | import java.util.HashSet; import java.util.Set; import org.eclipse.jdt.core.dom.ITypeBinding; | import java.util.*; import org.eclipse.jdt.core.dom.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 2,833,356 |
@Test
public void testAcceptance_13() throws Exception {
String request;
String response;
String header;
String body;
request = "GET \\cgi_environment.jsx?parameter=HTTP_TEST_123 HTTP/1.0\r\n"
+ "Host: vHa\r\n"
... | void function() throws Exception { String request; String response; String header; String body; request = STR + STR + STR + "\r\n"; response = this.sendRequest(STR, request); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_STATUS_200)); Assert.assertFalse(response.matches(Pattern.HTTP_RESPONSE_CONTENT_TYPE_DIF... | /**
* Test case for acceptance.
* For the CGI all request-header-parameters will be passed with the prefix
* 'HTTP_...'. Duplicates are overwritten.
* @throws Exception
*/ | Test case for acceptance. For the CGI all request-header-parameters will be passed with the prefix 'HTTP_...'. Duplicates are overwritten | testAcceptance_13 | {
"repo_name": "seanox/devwex-test",
"path": "test/com/seanox/devwex/WorkerTest_Gateway.java",
"license": "gpl-2.0",
"size": 44659
} | [
"com.seanox.test.utils.Pattern",
"org.junit.Assert"
] | import com.seanox.test.utils.Pattern; import org.junit.Assert; | import com.seanox.test.utils.*; import org.junit.*; | [
"com.seanox.test",
"org.junit"
] | com.seanox.test; org.junit; | 1,193,134 |
@Override
public ForeignAccess getForeignAccess() {
return SLNullMessageResolutionForeign.createAccess();
} | ForeignAccess function() { return SLNullMessageResolutionForeign.createAccess(); } | /**
* In case you want some of your objects to co-operate with other languages, you need to make
* them implement {@link TruffleObject} and provide additional {@link SLNullMessageResolution
* foreign access implementation}.
*/ | In case you want some of your objects to co-operate with other languages, you need to make them implement <code>TruffleObject</code> and provide additional <code>SLNullMessageResolution foreign access implementation</code> | getForeignAccess | {
"repo_name": "azadmanesh/sl-tracer",
"path": "truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLNull.java",
"license": "gpl-2.0",
"size": 3666
} | [
"com.oracle.truffle.api.interop.ForeignAccess"
] | import com.oracle.truffle.api.interop.ForeignAccess; | import com.oracle.truffle.api.interop.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 2,046,954 |
public FacesConfigApplicationResourceLibraryContractsContractMappingType<T> id(String id)
{
childNode.attribute("id", id);
return this;
} | FacesConfigApplicationResourceLibraryContractsContractMappingType<T> function(String id) { childNode.attribute("id", id); return this; } | /**
* Sets the <code>id</code> attribute
* @param id the value for the attribute <code>id</code>
* @return the current instance of <code>FacesConfigApplicationResourceLibraryContractsContractMappingType<T></code>
*/ | Sets the <code>id</code> attribute | id | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig22/FacesConfigApplicationResourceLibraryContractsContractMappingTypeImpl.java",
"license": "epl-1.0",
"size": 13179
} | [
"org.jboss.shrinkwrap.descriptor.api.facesconfig22.FacesConfigApplicationResourceLibraryContractsContractMappingType"
] | import org.jboss.shrinkwrap.descriptor.api.facesconfig22.FacesConfigApplicationResourceLibraryContractsContractMappingType; | import org.jboss.shrinkwrap.descriptor.api.facesconfig22.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,320,025 |
@Test
public void whenSelectMenuItemsThenGetExpectedResult() {
final int firstElement = 0;
String[] answers = {"3", "666", "n", "3", "id", "n", "4", "y"};
final Long createOne = 111L;
final Long createTwo = 222L;
Item itemOne = new Item("name01", "desc01", createOne... | void function() { final int firstElement = 0; String[] answers = {"3", "666", "n", "3", "id", "n", "4", "y"}; final Long createOne = 111L; final Long createTwo = 222L; Item itemOne = new Item(STR, STR, createOne); Item itemTwo = new Item(STR, STR, createTwo); Tracker tracker = new Tracker(); tracker.add(itemOne); track... | /**
* Test method change Emulation several menu items that are suitable within the meaning of.
*/ | Test method change Emulation several menu items that are suitable within the meaning of | whenSelectMenuItemsThenGetExpectedResult | {
"repo_name": "forvvard09/job4j_CoursesJunior",
"path": "1_Trainee/02_OOP/02_OOP_Chapter/Tracker/src/test/java/ru/spoddubnyak/start/StartUITest.java",
"license": "apache-2.0",
"size": 9117
} | [
"org.hamcrest.core.Is",
"org.junit.Assert",
"ru.spoddubnyak.models.Item"
] | import org.hamcrest.core.Is; import org.junit.Assert; import ru.spoddubnyak.models.Item; | import org.hamcrest.core.*; import org.junit.*; import ru.spoddubnyak.models.*; | [
"org.hamcrest.core",
"org.junit",
"ru.spoddubnyak.models"
] | org.hamcrest.core; org.junit; ru.spoddubnyak.models; | 908,546 |
public void loadPropertiesForUserConfiguration(UserConfiguration userConfiguration,
UserConfigurationProperties properties) throws Exception {
EwsUtilities.ewsAssert(userConfiguration != null, "ExchangeService.LoadPropertiesForUserConfiguration",
"userConfiguration is null");
... | void function(UserConfiguration userConfiguration, UserConfigurationProperties properties) throws Exception { EwsUtilities.ewsAssert(userConfiguration != null, STR, STR); GetUserConfigurationRequest request = new GetUserConfigurationRequest( this); request.setUserConfiguration(userConfiguration); request.setProperties(... | /**
* Loads the property of the specified userConfiguration.
*
* @param userConfiguration the user configuration
* @param properties the property
* @throws Exception the exception
*/ | Loads the property of the specified userConfiguration | loadPropertiesForUserConfiguration | {
"repo_name": "xvronny/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/core/ExchangeService.java",
"license": "mit",
"size": 161280
} | [
"java.util.EnumSet"
] | import java.util.EnumSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,478,701 |
BackgroundReadStats backgroundRead(boolean dispatchChange) {
BackgroundReadStats stats = new BackgroundReadStats();
long time = clock.getTime();
String id = Utils.getIdFromPath("/");
NodeDocument doc = store.find(Collection.NODES, id, asyncDelay);
if (doc == null) {
... | BackgroundReadStats backgroundRead(boolean dispatchChange) { BackgroundReadStats stats = new BackgroundReadStats(); long time = clock.getTime(); String id = Utils.getIdFromPath("/"); NodeDocument doc = store.find(Collection.NODES, id, asyncDelay); if (doc == null) { return stats; } Map<Integer, Revision> lastRevMap = d... | /**
* Perform a background read and make external changes visible.
*
* @param dispatchChange whether to dispatch external changes
* to {@link #dispatcher}.
*/ | Perform a background read and make external changes visible | backgroundRead | {
"repo_name": "bdelacretaz/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStore.java",
"license": "apache-2.0",
"size": 100265
} | [
"com.google.common.collect.Maps",
"java.io.IOException",
"java.util.Map",
"org.apache.jackrabbit.oak.commons.sort.StringSort",
"org.apache.jackrabbit.oak.plugins.document.JournalEntry",
"org.apache.jackrabbit.oak.plugins.document.cache.CacheInvalidationStats",
"org.apache.jackrabbit.oak.plugins.document... | import com.google.common.collect.Maps; import java.io.IOException; import java.util.Map; import org.apache.jackrabbit.oak.commons.sort.StringSort; import org.apache.jackrabbit.oak.plugins.document.JournalEntry; import org.apache.jackrabbit.oak.plugins.document.cache.CacheInvalidationStats; import org.apache.jackrabbit.... | import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.jackrabbit.oak.commons.sort.*; import org.apache.jackrabbit.oak.plugins.document.*; import org.apache.jackrabbit.oak.plugins.document.cache.*; import org.apache.jackrabbit.oak.plugins.document.util.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.jackrabbit"
] | com.google.common; java.io; java.util; org.apache.jackrabbit; | 15,174 |
SeparatedFileBeanData readRow(Object readerId); | SeparatedFileBeanData readRow(Object readerId); | /** Reads a flat file cell and provides it as Java object.
* @param readerId the id of the reader
* @return the id of the new reader */ | Reads a flat file cell and provides it as Java object | readRow | {
"repo_name": "AludraTest/aludratest",
"path": "src/main/java/org/aludratest/content/separated/SeparatedContent.java",
"license": "apache-2.0",
"size": 2922
} | [
"org.aludratest.content.separated.data.SeparatedFileBeanData"
] | import org.aludratest.content.separated.data.SeparatedFileBeanData; | import org.aludratest.content.separated.data.*; | [
"org.aludratest.content"
] | org.aludratest.content; | 1,028,697 |
protected CmsResourceState internalReadResourceState(CmsDbContext dbc, CmsUUID projectId, CmsResource resource)
throws CmsDataAccessException {
CmsResourceState state = CmsResource.STATE_KEEP;
try {
Query q = m_sqlManager.createQuery(dbc, projectId, C_READ_RESOURCE_STATE);
... | CmsResourceState function(CmsDbContext dbc, CmsUUID projectId, CmsResource resource) throws CmsDataAccessException { CmsResourceState state = CmsResource.STATE_KEEP; try { Query q = m_sqlManager.createQuery(dbc, projectId, C_READ_RESOURCE_STATE); q.setParameter(1, resource.getResourceId().toString()); try { state = Cms... | /**
* Returns the resource state of the given resource.<p>
*
* @param dbc the database context
* @param projectId the id of the project
* @param resource the resource to read the resource state for
*
* @return the resource state of the given resource
*
* @throws CmsDataAcces... | Returns the resource state of the given resource | internalReadResourceState | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/db/jpa/CmsVfsDriver.java",
"license": "lgpl-2.1",
"size": 197444
} | [
"javax.persistence.NoResultException",
"javax.persistence.PersistenceException",
"javax.persistence.Query",
"org.opencms.db.CmsDbContext",
"org.opencms.db.CmsResourceState",
"org.opencms.db.generic.Messages",
"org.opencms.file.CmsDataAccessException",
"org.opencms.file.CmsResource",
"org.opencms.uti... | import javax.persistence.NoResultException; import javax.persistence.PersistenceException; import javax.persistence.Query; import org.opencms.db.CmsDbContext; import org.opencms.db.CmsResourceState; import org.opencms.db.generic.Messages; import org.opencms.file.CmsDataAccessException; import org.opencms.file.CmsResour... | import javax.persistence.*; import org.opencms.db.*; import org.opencms.db.generic.*; import org.opencms.file.*; import org.opencms.util.*; | [
"javax.persistence",
"org.opencms.db",
"org.opencms.file",
"org.opencms.util"
] | javax.persistence; org.opencms.db; org.opencms.file; org.opencms.util; | 947,636 |
private void generateFields(final ReadCSV csv) {
if (this.headers) {
generateFieldsFromHeaders(csv);
} else {
generateFieldsFromCount(csv);
}
} | void function(final ReadCSV csv) { if (this.headers) { generateFieldsFromHeaders(csv); } else { generateFieldsFromCount(csv); } } | /**
* Generate the header fields.
*
* @param csv
* The CSV file to use.
*/ | Generate the header fields | generateFields | {
"repo_name": "larhoy/SentimentProjectV2",
"path": "SentimentAnalysisV2/encog-core-3.1.0/src/main/java/org/encog/app/analyst/analyze/PerformAnalysis.java",
"license": "mit",
"size": 6888
} | [
"org.encog.util.csv.ReadCSV"
] | import org.encog.util.csv.ReadCSV; | import org.encog.util.csv.*; | [
"org.encog.util"
] | org.encog.util; | 2,164,756 |
@Nonnull public SqlConformance getConformance() {
switch (databaseProduct) {
case UNKNOWN:
case CALCITE:
return SqlConformanceEnum.DEFAULT;
case BIG_QUERY:
return SqlConformanceEnum.BIG_QUERY;
case MYSQL:
return SqlConformanceEnum.MYSQL_5;
case ORACLE:
return SqlConform... | @Nonnull SqlConformance function() { switch (databaseProduct) { case UNKNOWN: case CALCITE: return SqlConformanceEnum.DEFAULT; case BIG_QUERY: return SqlConformanceEnum.BIG_QUERY; case MYSQL: return SqlConformanceEnum.MYSQL_5; case ORACLE: return SqlConformanceEnum.ORACLE_10; case MSSQL: return SqlConformanceEnum.SQL_S... | /** Returns the {@link SqlConformance} that matches this dialect.
*
* <p>The base implementation returns its best guess, based upon
* {@link #databaseProduct}; sub-classes may override. */ | Returns the <code>SqlConformance</code> that matches this dialect. The base implementation returns its best guess, based upon | getConformance | {
"repo_name": "julianhyde/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/SqlDialect.java",
"license": "apache-2.0",
"size": 58286
} | [
"javax.annotation.Nonnull",
"org.apache.calcite.sql.validate.SqlConformance",
"org.apache.calcite.sql.validate.SqlConformanceEnum"
] | import javax.annotation.Nonnull; import org.apache.calcite.sql.validate.SqlConformance; import org.apache.calcite.sql.validate.SqlConformanceEnum; | import javax.annotation.*; import org.apache.calcite.sql.validate.*; | [
"javax.annotation",
"org.apache.calcite"
] | javax.annotation; org.apache.calcite; | 2,030,842 |
private Node createNamespaceLiteral() {
Node objlit = IR.objectlit();
objlit.setJSType(
compiler.getTypeRegistry().createAnonymousObjectType(null));
return objlit;
} | Node function() { Node objlit = IR.objectlit(); objlit.setJSType( compiler.getTypeRegistry().createAnonymousObjectType(null)); return objlit; } | /**
* There are some special cases where clients of the compiler
* do not run TypedScopeCreator after running this pass.
* So always give the namespace literal a type.
*/ | There are some special cases where clients of the compiler do not run TypedScopeCreator after running this pass. So always give the namespace literal a type | createNamespaceLiteral | {
"repo_name": "Medium/closure-compiler",
"path": "src/com/google/javascript/jscomp/ProcessClosurePrimitives.java",
"license": "apache-2.0",
"size": 54948
} | [
"com.google.javascript.rhino.IR",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 328,103 |
private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_applyButtonActionPerformed
this.applyConfig();
this.configMessageLabel.setForeground(Color.blue);
this.configMessageLabel.setText("Basic configuration options applied.");
}//GEN-LAST:event_applyBut... | void function(java.awt.event.ActionEvent evt) { this.applyConfig(); this.configMessageLabel.setForeground(Color.blue); this.configMessageLabel.setText(STR); } | /**
* Executes operations controled by 'applyButton' button.
*
* Apply basic configuration options.
*
* @param evt the pressing of the button.
*/ | Executes operations controled by 'applyButton' button. Apply basic configuration options | applyButtonActionPerformed | {
"repo_name": "amcajal/ermon",
"path": "project/dev/gui/MainWindow.java",
"license": "gpl-3.0",
"size": 65056
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 663,613 |
UserAccount authenticateUser(String username, String password, Long domainId, InetAddress loginIpAddress, Map<String, Object[]> requestParameters); | UserAccount authenticateUser(String username, String password, Long domainId, InetAddress loginIpAddress, Map<String, Object[]> requestParameters); | /**
* Authenticates a user when s/he logs in.
*
* @param username
* required username for authentication
* @param password
* password to use for authentication, can be null for single sign-on case
* @param domainId
* id of domain where user with u... | Authenticates a user when s/he logs in | authenticateUser | {
"repo_name": "GabrielBrascher/cloudstack",
"path": "server/src/main/java/com/cloud/user/AccountManager.java",
"license": "apache-2.0",
"size": 7478
} | [
"java.net.InetAddress",
"java.util.Map"
] | import java.net.InetAddress; import java.util.Map; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 860,328 |
private int deleteLoginHistoryProfiles() {
SessionProvider sProvider = SessionProvider.createSystemProvider();
Session session = null;
NodeIterator loginHistoryProfilesNodes;
Node loginHistoryProfileNode;
String userId = null;
long removed = 0;
int errors = 0;
try {
try {
... | int function() { SessionProvider sProvider = SessionProvider.createSystemProvider(); Session session = null; NodeIterator loginHistoryProfilesNodes; Node loginHistoryProfileNode; String userId = null; long removed = 0; int errors = 0; try { try { session = this.getSession(sProvider); } catch (Exception e) { LOG.error(S... | /**
* iterates on Login History Users Profiles right under the Login History Home
* Node by a given page size each time and removes them one by one and returns
* the number of errors occurred during the process
*/ | iterates on Login History Users Profiles right under the Login History Home Node by a given page size each time and removes them one by one and returns the number of errors occurred during the process | deleteLoginHistoryProfiles | {
"repo_name": "exodev/platform",
"path": "component/common/src/main/java/org/exoplatform/platform/gadget/services/LoginHistory/LoginHistoryUpgradePlugin.java",
"license": "lgpl-3.0",
"size": 21226
} | [
"javax.jcr.Node",
"javax.jcr.NodeIterator",
"javax.jcr.Session",
"org.exoplatform.services.jcr.ext.common.SessionProvider"
] | import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.Session; import org.exoplatform.services.jcr.ext.common.SessionProvider; | import javax.jcr.*; import org.exoplatform.services.jcr.ext.common.*; | [
"javax.jcr",
"org.exoplatform.services"
] | javax.jcr; org.exoplatform.services; | 647,159 |
public Output<T> output() {
return output;
} | Output<T> function() { return output; } | /**
* Gets output.
* The permuted input.
* @return output.
*/ | Gets output. The permuted input | output | {
"repo_name": "tensorflow/java",
"path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/CollectivePermute.java",
"license": "apache-2.0",
"size": 4031
} | [
"org.tensorflow.Output"
] | import org.tensorflow.Output; | import org.tensorflow.*; | [
"org.tensorflow"
] | org.tensorflow; | 2,781,443 |
protected StoreEngine<?, ?, ?, ?> createStoreEngine(HStore store, Configuration conf,
CellComparator kvComparator) throws IOException {
return StoreEngine.create(store, conf, comparator);
} | StoreEngine<?, ?, ?, ?> function(HStore store, Configuration conf, CellComparator kvComparator) throws IOException { return StoreEngine.create(store, conf, comparator); } | /**
* Creates the store engine configured for the given Store.
* @param store The store. An unfortunate dependency needed due to it
* being passed to coprocessors via the compactor.
* @param conf Store configuration.
* @param kvComparator KVComparator for storeFileManager.
* @return Store... | Creates the store engine configured for the given Store | createStoreEngine | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java",
"license": "apache-2.0",
"size": 98563
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.CellComparator"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.CellComparator; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,247,806 |
@Test
public void testLoginEventReporting() throws InterruptedException {
int nbLoginEvents = 0;
Keycloak keycloak = Keycloak.getInstance(KEYCLOAK_URL, "master", "admin", "admin", CLIENT);
// test login event
keycloak.realm("master").users().search(TEST_USER);
// wait fo... | void function() throws InterruptedException { int nbLoginEvents = 0; Keycloak keycloak = Keycloak.getInstance(KEYCLOAK_URL, STR, "admin", "admin", CLIENT); keycloak.realm(STR).users().search(TEST_USER); Thread.sleep(1000); String jsonAsString = handler.toString(); Gson g = new Gson(); Event e = g.fromJson(jsonAsString,... | /**
* Simulate login, and expect the event emitter to report this event
*/ | Simulate login, and expect the event emitter to report this event | testLoginEventReporting | {
"repo_name": "cloudtrust/event-emitter",
"path": "keycloak-event-emitter-tests/src/test/java/io/cloudtrust/keycloak/eventemitter/MessageGenerationItTest.java",
"license": "agpl-3.0",
"size": 4227
} | [
"com.google.gson.Gson",
"org.junit.Assert",
"org.keycloak.admin.client.Keycloak",
"org.keycloak.events.Event",
"org.keycloak.events.EventType"
] | import com.google.gson.Gson; import org.junit.Assert; import org.keycloak.admin.client.Keycloak; import org.keycloak.events.Event; import org.keycloak.events.EventType; | import com.google.gson.*; import org.junit.*; import org.keycloak.admin.client.*; import org.keycloak.events.*; | [
"com.google.gson",
"org.junit",
"org.keycloak.admin",
"org.keycloak.events"
] | com.google.gson; org.junit; org.keycloak.admin; org.keycloak.events; | 2,584,521 |
@Converter
public static InputStream toInputStream(Message message) throws IOException, MessagingException {
return message.getInputStream();
} | static InputStream function(Message message) throws IOException, MessagingException { return message.getInputStream(); } | /**
* Converts the given JavaMail message to an InputStream.
*/ | Converts the given JavaMail message to an InputStream | toInputStream | {
"repo_name": "nikhilvibhav/camel",
"path": "components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java",
"license": "apache-2.0",
"size": 10576
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.mail.Message",
"javax.mail.MessagingException"
] | import java.io.IOException; import java.io.InputStream; import javax.mail.Message; import javax.mail.MessagingException; | import java.io.*; import javax.mail.*; | [
"java.io",
"javax.mail"
] | java.io; javax.mail; | 258,939 |
public static void checkEnabled(Context context, AppWidgetManager manager)
{
sEnabled = manager.getAppWidgetIds(new ComponentName(context, WidgetD.class)).length != 0;
} | static void function(Context context, AppWidgetManager manager) { sEnabled = manager.getAppWidgetIds(new ComponentName(context, WidgetD.class)).length != 0; } | /**
* Check if there are any instances of this widget placed.
*/ | Check if there are any instances of this widget placed | checkEnabled | {
"repo_name": "ThaisaMirely/vanilla",
"path": "src/ch/blinkenlights/android/vanilla/WidgetD.java",
"license": "gpl-3.0",
"size": 5742
} | [
"android.appwidget.AppWidgetManager",
"android.content.ComponentName",
"android.content.Context"
] | import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Context; | import android.appwidget.*; import android.content.*; | [
"android.appwidget",
"android.content"
] | android.appwidget; android.content; | 538,738 |
public Timestamp getP_Date_To ()
{
return (Timestamp)get_Value(COLUMNNAME_P_Date_To);
} | Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_P_Date_To); } | /** Get Process Date To.
@return Process Parameter
*/ | Get Process Date To | getP_Date_To | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_AD_PInstance_Para.java",
"license": "gpl-2.0",
"size": 7045
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,457,468 |
public static Reader getResourceReader(String pResource) throws IOException {
return new InputStreamReader(getResourceStream(pResource), "UTF-8");
} | static Reader function(String pResource) throws IOException { return new InputStreamReader(getResourceStream(pResource), "UTF-8"); } | /**
* Locates a resource file in the class path and returns a {@link Reader}.
*/ | Locates a resource file in the class path and returns a <code>Reader</code> | getResourceReader | {
"repo_name": "eskatos/creadur-rat",
"path": "apache-rat-core/src/test/java/org/apache/rat/test/utils/Resources.java",
"license": "apache-2.0",
"size": 4922
} | [
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.Reader"
] | import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 446,539 |
public static Object[] getAllInstances(Model model, Class<?> javaClass) {
URI classURI = getClassURI(javaClass);
return getAllInstances(model, javaClass, classURI);
}
| static Object[] function(Model model, Class<?> javaClass) { URI classURI = getClassURI(javaClass); return getAllInstances(model, javaClass, classURI); } | /**
* Return all instances of the given class.
*
* @param model -
* underlying RDF2Go model
* @param javaClass -
* the java class representing the class the instances which
* should be returned
* @return array of all instances of the given java class in the mode... | Return all instances of the given class | getAllInstances | {
"repo_name": "semweb4j/semweb4j",
"path": "org.semweb4j.rdfreactor.runtime/src/main/java/org/ontoware/rdfreactor/runtime/ReactorBaseImpl.java",
"license": "bsd-2-clause",
"size": 20437
} | [
"org.ontoware.rdf2go.model.Model"
] | import org.ontoware.rdf2go.model.Model; | import org.ontoware.rdf2go.model.*; | [
"org.ontoware.rdf2go"
] | org.ontoware.rdf2go; | 2,667,439 |
private void setUseNewAPI() throws IOException {
int numReduces = conf.getNumReduceTasks();
String oldMapperClass = "mapred.mapper.class";
String oldReduceClass = "mapred.reducer.class";
conf.setBooleanIfUnset("mapred.mapper.new-api",
conf.get(oldMapperClass) == null);
i... | void function() throws IOException { int numReduces = conf.getNumReduceTasks(); String oldMapperClass = STR; String oldReduceClass = STR; conf.setBooleanIfUnset(STR, conf.get(oldMapperClass) == null); if (conf.getUseNewMapper()) { String mode = STR; ensureNotSet(STR, mode); ensureNotSet(oldMapperClass, mode); if (numRe... | /**
* Default to the new APIs unless they are explicitly set or the old mapper or
* reduce attributes are used.
* @throws IOException if the configuration is inconsistant
*/ | Default to the new APIs unless they are explicitly set or the old mapper or reduce attributes are used | setUseNewAPI | {
"repo_name": "zincumyx/Mammoth",
"path": "mammoth-src/src/mapred/org/apache/hadoop/mapreduce/Job.java",
"license": "apache-2.0",
"size": 16404
} | [
"java.io.IOException",
"org.apache.hadoop.mapreduce.JobContext"
] | import java.io.IOException; import org.apache.hadoop.mapreduce.JobContext; | import java.io.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,775,025 |
public ArrayList<ListItem> read() {
String line1;
String line2;
String line3;
ArrayList<ListItem> list = new ArrayList<>();
try {
reader = new BufferedReader(new FileReader(file));
while ((line1 = reader.readLine()) != null) {
line2 = encryption.decrypt(reader.readLine());
line3 = en... | ArrayList<ListItem> function() { String line1; String line2; String line3; ArrayList<ListItem> list = new ArrayList<>(); try { reader = new BufferedReader(new FileReader(file)); while ((line1 = reader.readLine()) != null) { line2 = encryption.decrypt(reader.readLine()); line3 = encryption.decrypt(reader.readLine()); li... | /**
* Reads and decrypts the file, adding three lines at a time to a {@link ListItem}.
* @return An {@link ArrayList<ListItem>} containing all the ListItems
*/ | Reads and decrypts the file, adding three lines at a time to a <code>ListItem</code> | read | {
"repo_name": "LxSystems/PassGuard",
"path": "LxPassGuard/src/cipher/EncryptedFile.java",
"license": "mit",
"size": 2859
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException",
"java.util.ArrayList"
] | import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,176,126 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.