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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@VisibleForTesting
public static boolean start(final Context context, final Bundle serviceBundle,
final Bundle connectionBundle, final LaunchCallback launchCallback,
final IBinder childProcessCallback, final boolean inSandbox,
final boolean alwaysInForeground, final ChildProc... | static boolean function(final Context context, final Bundle serviceBundle, final Bundle connectionBundle, final LaunchCallback launchCallback, final IBinder childProcessCallback, final boolean inSandbox, final boolean alwaysInForeground, final ChildProcessCreationParams creationParams) { assert LauncherThread.runningOn... | /**
* Spawns and connects to a child process. It will not block, but will instead callback to
* {@link #LaunchCallback} on the launcher thread when the connection is established on.
*
* @param context Context used to obtain the application context.
* @param paramId Key used to retrieve ChildPro... | Spawns and connects to a child process. It will not block, but will instead callback to <code>#LaunchCallback</code> on the launcher thread when the connection is established on | start | {
"repo_name": "mogoweb/365browser",
"path": "app/src/main/java/org/chromium/content/browser/ChildProcessLauncher.java",
"license": "apache-2.0",
"size": 24243
} | [
"android.content.Context",
"android.os.Bundle",
"android.os.IBinder",
"org.chromium.base.TraceEvent",
"org.chromium.base.process_launcher.ChildProcessCreationParams"
] | import android.content.Context; import android.os.Bundle; import android.os.IBinder; import org.chromium.base.TraceEvent; import org.chromium.base.process_launcher.ChildProcessCreationParams; | import android.content.*; import android.os.*; import org.chromium.base.*; import org.chromium.base.process_launcher.*; | [
"android.content",
"android.os",
"org.chromium.base"
] | android.content; android.os; org.chromium.base; | 1,146,373 |
public IWizardPage getNextPage() {
saveDataToModel();
PageAlgorithms page = ((NewEncryptionWizard) getWizard()).getPageAlgorithms();
page.onEnterPage();
return page;
} | IWizardPage function() { saveDataToModel(); PageAlgorithms page = ((NewEncryptionWizard) getWizard()).getPageAlgorithms(); page.onEnterPage(); return page; } | /**
* Returns the next wizard page after all the necessary data is entered correctly.
*
* @return IWizardPage The next wizard page
*/ | Returns the next wizard page after all the necessary data is entered correctly | getNextPage | {
"repo_name": "jcryptool/incubator",
"path": "org.jcryptool.crypto.xml.ui/src/org/jcryptool/crypto/xml/ui/encrypt/PageKey.java",
"license": "epl-1.0",
"size": 9419
} | [
"org.eclipse.jface.wizard.IWizardPage"
] | import org.eclipse.jface.wizard.IWizardPage; | import org.eclipse.jface.wizard.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,660,910 |
SortedMap<ValidationRule, String> getInvalidValidationRuleLeftSideExpressions(); | SortedMap<ValidationRule, String> getInvalidValidationRuleLeftSideExpressions(); | /**
* Gets all ValidationRules with invalid left side expressions.
*/ | Gets all ValidationRules with invalid left side expressions | getInvalidValidationRuleLeftSideExpressions | {
"repo_name": "uonafya/jphes-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java",
"license": "bsd-3-clause",
"size": 7902
} | [
"java.util.SortedMap",
"org.hisp.dhis.validation.ValidationRule"
] | import java.util.SortedMap; import org.hisp.dhis.validation.ValidationRule; | import java.util.*; import org.hisp.dhis.validation.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 1,510,364 |
public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer)
{
if (par6EntityPlayer.capabilities.isCreativeMode)
{
par5 |= 8;
par1World.setBlockMetadataWithNotify(par2, par3, par4, par5, 4);
}
dropBl... | void function(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) { if (par6EntityPlayer.capabilities.isCreativeMode) { par5 = 8; par1World.setBlockMetadataWithNotify(par2, par3, par4, par5, 4); } dropBlockAsItem(par1World, par2, par3, par4, par5, 0); super.onBlockHarvested(par1World... | /**
* Called when the block is attempted to be harvested
*/ | Called when the block is attempted to be harvested | onBlockHarvested | {
"repo_name": "HATB0T/RuneCraftery",
"path": "forge/mcp/src/minecraft/net/minecraft/block/BlockSkull.java",
"license": "lgpl-3.0",
"size": 13885
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.world.World"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; | import net.minecraft.entity.player.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.world; | 1,061,983 |
@Override
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
RemoveInfo info = (RemoveInfo) o;
super.looseMarshal(wireFormat, o, dataOut);
looseMarshalCachedObject(wireFormat, info.getObjectId(), dataOut);
} | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { RemoveInfo info = (RemoveInfo) o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, info.getObjectId(), dataOut); } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | looseMarshal | {
"repo_name": "tabish121/OpenWire",
"path": "openwire-legacy/src/main/java/io/openwire/codec/v2/RemoveInfoMarshaller.java",
"license": "apache-2.0",
"size": 4038
} | [
"io.openwire.codec.OpenWireFormat",
"io.openwire.commands.RemoveInfo",
"java.io.DataOutput",
"java.io.IOException"
] | import io.openwire.codec.OpenWireFormat; import io.openwire.commands.RemoveInfo; import java.io.DataOutput; import java.io.IOException; | import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*; | [
"io.openwire.codec",
"io.openwire.commands",
"java.io"
] | io.openwire.codec; io.openwire.commands; java.io; | 1,731,929 |
Field originatingView = mode.getClass().getDeclaredField("mOriginatingView");
originatingView.setAccessible(true);
return (View) originatingView.get(mode);
}
private ViewUtil() {
} | Field originatingView = mode.getClass().getDeclaredField(STR); originatingView.setAccessible(true); return (View) originatingView.get(mode); } private ViewUtil() { } | /**
* Find the originating view of an ActionMode.
* @param mode The ActionMode in question.
* @return The view from which the ActionMode originated.
* @throws NoSuchFieldException
* @throws IllegalAccessException
*/ | Find the originating view of an ActionMode | getOriginatingView | {
"repo_name": "Wikinaut/wikipedia-app",
"path": "app/src/main/java/org/wikipedia/util/ViewUtil.java",
"license": "apache-2.0",
"size": 736
} | [
"android.view.View",
"java.lang.reflect.Field"
] | import android.view.View; import java.lang.reflect.Field; | import android.view.*; import java.lang.reflect.*; | [
"android.view",
"java.lang"
] | android.view; java.lang; | 1,094,840 |
@Override
public String processReturningText(final String s, final HttpAction hm) {
return processAllReturningText(s);
} | String function(final String s, final HttpAction hm) { return processAllReturningText(s); } | /**
* Deals with the MediaWiki API's response by parsing the provided text.
*
* @param s the answer to the most recently generated MediaWiki API request
* @param hm the requestor message
* @return the returning text on processing problems
*/ | Deals with the MediaWiki API's response by parsing the provided text | processReturningText | {
"repo_name": "Hunsu/jwbf",
"path": "src/main/java/net/sourceforge/jwbf/mediawiki/actions/util/MWAction.java",
"license": "apache-2.0",
"size": 3245
} | [
"net.sourceforge.jwbf.core.actions.util.HttpAction"
] | import net.sourceforge.jwbf.core.actions.util.HttpAction; | import net.sourceforge.jwbf.core.actions.util.*; | [
"net.sourceforge.jwbf"
] | net.sourceforge.jwbf; | 707,110 |
@WebMethod(operationName = "GetWeather", action = "http://www.webserviceX.NET/GetWeather")
@WebResult(name = "GetWeatherResult", targetNamespace = "http://www.webserviceX.NET")
@RequestWrapper(localName = "GetWeather", targetNamespace = "http://www.webserviceX.NET", className = "net.webservicex.GetWeather")... | @WebMethod(operationName = STR, action = STRGetWeatherResultSTRhttp: @RequestWrapper(localName = STR, targetNamespace = STRGetWeatherResponseSTRhttp: String function( @WebParam(name = "CityNameSTRhttp: String cityName, @WebParam(name = "CountryNameSTRhttp: String countryName); | /**
* Get weather report for all major cities around the world.
*
* @param countryName
* @param cityName
* @return
* returns java.lang.String
*/ | Get weather report for all major cities around the world | getWeather | {
"repo_name": "crisstanza/GlobalWeather",
"path": "src/main/java.wsimport/net/webservicex/GlobalWeatherSoap.java",
"license": "unlicense",
"size": 2309
} | [
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.xml.ws.RequestWrapper"
] | import javax.jws.WebMethod; import javax.jws.WebParam; import javax.xml.ws.RequestWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 784,213 |
protected String ensureId(Element element) {
String id = element.getId();
if ((id == null) || "".equals(id)) {
id = Document.get().createUniqueId();
element.setId(id);
}
return id;
}
| String function(Element element) { String id = element.getId(); if ((id == null) "".equals(id)) { id = Document.get().createUniqueId(); element.setId(id); } return id; } | /**
* Gives an element an id if it doesn't already have an id, and then returns the element's id.<p>
*
* @param element the element for which we want to add the id
*
* @return the id
*/ | Gives an element an id if it doesn't already have an id, and then returns the element's id | ensureId | {
"repo_name": "mediaworx/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/widgets/CmsTinyMCEWidget.java",
"license": "lgpl-2.1",
"size": 26076
} | [
"com.google.gwt.dom.client.Document",
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 485,062 |
public static boolean doesPluginRequireRestart(final Plugin plugin)
{
//PLUG-451: When in dev mode, plugins should not require a restart.
if (Boolean.getBoolean(ATLASSIAN_DEV_MODE))
{
return false;
}
for (final ModuleDescriptor<?> descriptor : plugin.getModul... | static boolean function(final Plugin plugin) { if (Boolean.getBoolean(ATLASSIAN_DEV_MODE)) { return false; } for (final ModuleDescriptor<?> descriptor : plugin.getModuleDescriptors()) { if (descriptor.getClass().getAnnotation(RequiresRestart.class) != null) { return true; } } return false; } | /**
* Determines if a plugin requires a restart after being installed at runtime. Looks for the annotation
* {@link RequiresRestart} on the plugin's module descriptors.
*
* @param plugin The plugin that was just installed at runtime, but not yet enabled
* @return True if a restart is required
... | Determines if a plugin requires a restart after being installed at runtime. Looks for the annotation <code>RequiresRestart</code> on the plugin's module descriptors | doesPluginRequireRestart | {
"repo_name": "mrdon/PLUG",
"path": "atlassian-plugins-core/src/main/java/com/atlassian/plugin/util/PluginUtils.java",
"license": "bsd-3-clause",
"size": 4280
} | [
"com.atlassian.plugin.ModuleDescriptor",
"com.atlassian.plugin.Plugin",
"com.atlassian.plugin.descriptors.RequiresRestart"
] | import com.atlassian.plugin.ModuleDescriptor; import com.atlassian.plugin.Plugin; import com.atlassian.plugin.descriptors.RequiresRestart; | import com.atlassian.plugin.*; import com.atlassian.plugin.descriptors.*; | [
"com.atlassian.plugin"
] | com.atlassian.plugin; | 707,359 |
public static final void waitForAcmeToCreateCertificate(LibertyServer server) {
assertNotNull("ACME did not fetch the certificate.", server.waitForStringInLog("CWPKI2064I", 120000));
assertNotNull("ACME did not create the certificate.", server.waitForStringInLogUsingMark("CWPKI2007I", 120000));
}
| static final void function(LibertyServer server) { assertNotNull(STR, server.waitForStringInLog(STR, 120000)); assertNotNull(STR, server.waitForStringInLogUsingMark(STR, 120000)); } | /**
* Wait for the ACME service to report that a new certificate has been
* created.
*
* @param server
* The server to check.
*/ | Wait for the ACME service to report that a new certificate has been created | waitForAcmeToCreateCertificate | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.acme_fat/fat/src/com/ibm/ws/security/acme/utils/AcmeFatUtils.java",
"license": "epl-1.0",
"size": 36960
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,559,187 |
void rmidx(String command) throws QueryException {
List args = new ArrayList();
parseCommand(command, args);
if (args.size() < 1) {
System.out.println("rmidx requires 1 arg: name");
return;
}
String name = (String)args.get(1);
QueryService qs = this.cache.getQueryService();
In... | void rmidx(String command) throws QueryException { List args = new ArrayList(); parseCommand(command, args); if (args.size() < 1) { System.out.println(STR); return; } String name = (String)args.get(1); QueryService qs = this.cache.getQueryService(); Index index = qs.getIndex(this.currRegion, name); if (index == null) {... | /**
* Removes an index.
* Argument is type
*/ | Removes an index. Argument is type | rmidx | {
"repo_name": "papicella/snappy-store",
"path": "gemfire-examples/src/dist/java/cacheRunner/CacheRunner.java",
"license": "apache-2.0",
"size": 58690
} | [
"com.gemstone.gemfire.cache.query.Index",
"com.gemstone.gemfire.cache.query.QueryException",
"com.gemstone.gemfire.cache.query.QueryService",
"java.util.ArrayList",
"java.util.List"
] | import com.gemstone.gemfire.cache.query.Index; import com.gemstone.gemfire.cache.query.QueryException; import com.gemstone.gemfire.cache.query.QueryService; import java.util.ArrayList; import java.util.List; | import com.gemstone.gemfire.cache.query.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.util"
] | com.gemstone.gemfire; java.util; | 1,936,478 |
public void validate() throws ParameterException {
// Check if files exists
if (problemFilePath == null || solutionFilePath == null) {
throw new ParameterException("Files cannot have null value.");
}
File problemFile = new File(problemFilePath);
File solutionFile = new File(problemFilePath);
tr... | void function() throws ParameterException { if (problemFilePath == null solutionFilePath == null) { throw new ParameterException(STR); } File problemFile = new File(problemFilePath); File solutionFile = new File(problemFilePath); try { if (!problemFile.isFile()) { throw new ParameterException(STR + "."); } if (!solutio... | /**
* Validates the parameters and throw an exception if one of the
* parameter is not valid.
*
* @throws ParameterException if a parameter value is not valid.
*/ | Validates the parameters and throw an exception if one of the parameter is not valid | validate | {
"repo_name": "dmeignan/INRC2010-UOS-evaluator",
"path": "fr.lalea.inrc2010evaluator/src/main/java/fr/lalea/inrc2010evaluator/EvaluatorParameters.java",
"license": "apache-2.0",
"size": 2213
} | [
"com.beust.jcommander.ParameterException",
"java.io.File"
] | import com.beust.jcommander.ParameterException; import java.io.File; | import com.beust.jcommander.*; import java.io.*; | [
"com.beust.jcommander",
"java.io"
] | com.beust.jcommander; java.io; | 464,275 |
Date getLastChange(); | Date getLastChange(); | /**
* Returns the last change date of this report.
*
* @return the last change date of this report, or <tt>null</tt> if it was
* never changed
*/ | Returns the last change date of this report | getLastChange | {
"repo_name": "BellaDati/belladati-sdk-api",
"path": "src/main/java/com/belladati/sdk/report/Report.java",
"license": "apache-2.0",
"size": 2652
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 958,598 |
Pair<ReturnResult, TransferData> changeHandler(RevisionKey key, boolean clear); | Pair<ReturnResult, TransferData> changeHandler(RevisionKey key, boolean clear); | /**
* Changes revision handler if revision can be found and there is a need to change the handler.
* @param key RevisionKey to find the revision
* @param clear Should handler be cleared or set to current user
* @return Pair
*/ | Changes revision handler if revision can be found and there is a need to change the handler | changeHandler | {
"repo_name": "Tietoarkisto/metka",
"path": "metka/src/main/java/fi/uta/fsd/metka/storage/repository/RevisionHandlerRepository.java",
"license": "bsd-3-clause",
"size": 3651
} | [
"fi.uta.fsd.metka.model.general.RevisionKey",
"fi.uta.fsd.metka.model.transfer.TransferData",
"fi.uta.fsd.metka.storage.repository.enums.ReturnResult",
"org.apache.commons.lang3.tuple.Pair"
] | import fi.uta.fsd.metka.model.general.RevisionKey; import fi.uta.fsd.metka.model.transfer.TransferData; import fi.uta.fsd.metka.storage.repository.enums.ReturnResult; import org.apache.commons.lang3.tuple.Pair; | import fi.uta.fsd.metka.model.general.*; import fi.uta.fsd.metka.model.transfer.*; import fi.uta.fsd.metka.storage.repository.enums.*; import org.apache.commons.lang3.tuple.*; | [
"fi.uta.fsd",
"org.apache.commons"
] | fi.uta.fsd; org.apache.commons; | 2,027,236 |
public void testReport()
throws Exception
{
generateReport( "summary", "summary-plugin-config.xml" );
assertTrue( "Test html generated", getGeneratedReport( "project-summary.html" ).exists() );
URL reportURL = getGeneratedReport( "project-summary.html" ).toURI().toURL();
... | void function() throws Exception { generateReport( STR, STR ); assertTrue( STR, getGeneratedReport( STR ).exists() ); URL reportURL = getGeneratedReport( STR ).toURI().toURL(); assertNotNull( reportURL ); WebRequest request = new GetMethodWebRequest( reportURL.toString() ); WebResponse response = WEB_CONVERSATION.getRe... | /**
* Test report
*
* @throws Exception if any
*/ | Test report | testReport | {
"repo_name": "mcculls/maven-plugins",
"path": "maven-project-info-reports-plugin/src/test/java/org/apache/maven/report/projectinfo/SummaryReportTest.java",
"license": "apache-2.0",
"size": 2934
} | [
"com.meterware.httpunit.GetMethodWebRequest",
"com.meterware.httpunit.TextBlock",
"com.meterware.httpunit.WebRequest",
"com.meterware.httpunit.WebResponse"
] | import com.meterware.httpunit.GetMethodWebRequest; import com.meterware.httpunit.TextBlock; import com.meterware.httpunit.WebRequest; import com.meterware.httpunit.WebResponse; | import com.meterware.httpunit.*; | [
"com.meterware.httpunit"
] | com.meterware.httpunit; | 1,970,152 |
public static ParseResult parseFileForSkylark(
ParserInputSource input, EventHandler eventHandler) {
Lexer lexer = new Lexer(input, eventHandler);
Parser parser = new Parser(lexer, eventHandler, SKYLARK);
List<Statement> statements = parser.parseFileInput();
return new ParseResult(
state... | static ParseResult function( ParserInputSource input, EventHandler eventHandler) { Lexer lexer = new Lexer(input, eventHandler); Parser parser = new Parser(lexer, eventHandler, SKYLARK); List<Statement> statements = parser.parseFileInput(); return new ParseResult( statements, parser.comments, locationFromStatements(lex... | /**
* Entry-point to parser that parses a build file with comments. All errors encountered during
* parsing are reported via "reporter". Enable Skylark extensions that are not part of the core
* BUILD language.
*/ | Entry-point to parser that parses a build file with comments. All errors encountered during parsing are reported via "reporter". Enable Skylark extensions that are not part of the core BUILD language | parseFileForSkylark | {
"repo_name": "iamthearm/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/Parser.java",
"license": "apache-2.0",
"size": 53785
} | [
"com.google.devtools.build.lib.events.EventHandler",
"java.util.List"
] | import com.google.devtools.build.lib.events.EventHandler; import java.util.List; | import com.google.devtools.build.lib.events.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 1,945,529 |
public InputStream getInputStream(ZipEntry entry) throws IOException {
if(descriptor == -1) {
throw new IllegalStateException();
}
byte[] buf = inflateEntryImpl2(descriptor, entry.getName());
if (buf == null) {
return null;
}
return new ByteArrayInputStream(buf);
} | InputStream function(ZipEntry entry) throws IOException { if(descriptor == -1) { throw new IllegalStateException(); } byte[] buf = inflateEntryImpl2(descriptor, entry.getName()); if (buf == null) { return null; } return new ByteArrayInputStream(buf); } | /**
* Answers an input stream on the data of the specified ZipEntry.
*
* @param entry
* the ZipEntry
* @return an input stream on the ZipEntry data
*/ | Answers an input stream on the data of the specified ZipEntry | getInputStream | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/archive/src/main/java/java/util/zip/ZipFile.java",
"license": "apache-2.0",
"size": 6653
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 81,443 |
public ModelAndView display(HttpServletRequest request, HttpServletResponse response) throws Exception {
String logFileName = request.getParameter(PARAM_LOG_FILE);
String contents = logFileManager.tail(logFileName, tailBytes);
Map<String, Object> model = new HashMap<String, Object>();
model.put("conte... | ModelAndView function(HttpServletRequest request, HttpServletResponse response) throws Exception { String logFileName = request.getParameter(PARAM_LOG_FILE); String contents = logFileManager.tail(logFileName, tailBytes); Map<String, Object> model = new HashMap<String, Object>(); model.put(STR, contents); Long taskId = ... | /**
* Displays the contents of a particular log file.
*
* @param request
* @param response
* @return A ModelAndView to render.
* @throws Exception
*/ | Displays the contents of a particular log file | display | {
"repo_name": "titantang/citrine-scheduler",
"path": "src/main/java/fm/last/citrine/web/DisplayLogsController.java",
"license": "apache-2.0",
"size": 2870
} | [
"java.util.HashMap",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.springframework.web.servlet.ModelAndView"
] | import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; | import java.util.*; import javax.servlet.http.*; import org.springframework.web.servlet.*; | [
"java.util",
"javax.servlet",
"org.springframework.web"
] | java.util; javax.servlet; org.springframework.web; | 2,410,591 |
private void repositionComponent(){
valueLabel.setBounds(
this.getWidth()-margin-valueLabel.getPreferredSize().width-1,
header,
valueLabel.getPreferredSize().width+1,
10);
slider.setBounds(
margin,
header+10,
this.getWidth()-2*margin,
20);
leftLabel.setBounds(
margin,
h... | void function(){ valueLabel.setBounds( this.getWidth()-margin-valueLabel.getPreferredSize().width-1, header, valueLabel.getPreferredSize().width+1, 10); slider.setBounds( margin, header+10, this.getWidth()-2*margin, 20); leftLabel.setBounds( margin, header+30, leftLabel.getPreferredSize().width+1, 10); rightLabel.setBo... | /**
* Repositions the components of this widget. Should be called
* whenever clients invoke an internal method that changes the
* bounding strings of the text fields or size of this widget
*/ | Repositions the components of this widget. Should be called whenever clients invoke an internal method that changes the bounding strings of the text fields or size of this widget | repositionComponent | {
"repo_name": "boubre/BayouBot",
"path": "Workspace/src/codeblockutil/CSliderPane.java",
"license": "mit",
"size": 14880
} | [
"java.awt.event.ComponentEvent"
] | import java.awt.event.ComponentEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,352,904 |
@Test
public void testPutWithTsSlop() throws IOException {
byte[] fam = Bytes.toBytes("info");
byte[][] families = { fam };
String method = this.getName();
// add data with a timestamp that is too recent for range. Ensure assert
CONF.setInt("hbase.hregion.keyvalue.timestamp.slop.millisecs", 100... | void function() throws IOException { byte[] fam = Bytes.toBytes("info"); byte[][] families = { fam }; String method = this.getName(); CONF.setInt(STR, 1000); this.region = initHRegion(tableName, method, CONF, families); boolean caughtExcep = false; try { try { region.put(new Put(row).add(fam, Bytes.toBytes("qual"), Byt... | /**
* Tests that there is server-side filtering for invalid timestamp upper
* bound. Note that the timestamp lower bound is automatically handled for us
* by the TTL field.
*/ | Tests that there is server-side filtering for invalid timestamp upper bound. Note that the timestamp lower bound is automatically handled for us by the TTL field | testPutWithTsSlop | {
"repo_name": "justintung/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java",
"license": "apache-2.0",
"size": 221371
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HBaseTestingUtility",
"org.apache.hadoop.hbase.client.Put",
"org.apache.hadoop.hbase.exceptions.FailedSanityCheckException",
"org.apache.hadoop.hbase.util.Bytes",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.exceptions.FailedSanityCheckException; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.exceptions.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 95,024 |
public static void createSuperTenantDLC() throws AndesException {
CarbonContext carbonContext = CarbonContext.getThreadLocalCarbonContext();
try {
String adminUserName = carbonContext.getUserRealm().getRealmConfiguration().getAdminUserName();
DLCQueueUtils.createDLCQueue(carb... | static void function() throws AndesException { CarbonContext carbonContext = CarbonContext.getThreadLocalCarbonContext(); try { String adminUserName = carbonContext.getUserRealm().getRealmConfiguration().getAdminUserName(); DLCQueueUtils.createDLCQueue(carbonContext.getTenantDomain(), adminUserName); } catch (UserStore... | /**
* Create a DEAD_LETTER_CHANNEL for the super tenant.
*/ | Create a DEAD_LETTER_CHANNEL for the super tenant | createSuperTenantDLC | {
"repo_name": "ramith/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesKernelBoot.java",
"license": "apache-2.0",
"size": 26611
} | [
"org.wso2.andes.server.queue.DLCQueueUtils",
"org.wso2.carbon.context.CarbonContext",
"org.wso2.carbon.user.api.UserStoreException"
] | import org.wso2.andes.server.queue.DLCQueueUtils; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.user.api.UserStoreException; | import org.wso2.andes.server.queue.*; import org.wso2.carbon.context.*; import org.wso2.carbon.user.api.*; | [
"org.wso2.andes",
"org.wso2.carbon"
] | org.wso2.andes; org.wso2.carbon; | 555,653 |
public BigDecimal getBOMQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_BOMQty);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_BOMQty); if (bd == null) return Env.ZERO; return bd; } | /** Get BOM Quantity.
@return Bill of Materials Quantity
*/ | Get BOM Quantity | getBOMQty | {
"repo_name": "TaymourReda/-https-github.com-adempiere-adempiere",
"path": "base/src/org/compiere/model/X_M_Product_BOM.java",
"license": "gpl-2.0",
"size": 10174
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 2,809,375 |
@Test
public void testEquals() throws Exception {
Set<Object> set = new HashSet<>();
List<VtnFlowFilter> list = new ArrayList<>();
VtnDropFilterCase drop = new VtnDropFilterCaseBuilder().
setVtnDropFilter(new VtnDropFilterBuilder().build()).
build();
Vnod... | void function() throws Exception { Set<Object> set = new HashSet<>(); List<VtnFlowFilter> list = new ArrayList<>(); VtnDropFilterCase drop = new VtnDropFilterCaseBuilder(). setVtnDropFilter(new VtnDropFilterBuilder().build()). build(); VnodeName vcond1 = new VnodeName(STR); VnodeName vcond2 = new VnodeName(STR); VtnFlo... | /**
* Test case for {@link FlowFilterList#equals(Object)} and
* {@link FlowFilterList#hashCode()}.
*
* @throws Exception An error occurred.
*/ | Test case for <code>FlowFilterList#equals(Object)</code> and <code>FlowFilterList#hashCode()</code> | testEquals | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/test/java/org/opendaylight/vtn/manager/internal/util/flow/filter/FlowFilterListTest.java",
"license": "epl-1.0",
"size": 28790
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.mockito.Mockito",
"org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.VtnFlowFilterList",
"org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.vtn.flow.filter.list.VtnFlowFilter",... | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.mockito.Mockito; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.VtnFlowFilterList; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.vtn.flow.filter.... | import java.util.*; import org.mockito.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.vtn.flow.filter.list.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.flow.filter.rev150907.vtn.flow.filte... | [
"java.util",
"org.mockito",
"org.opendaylight.yang"
] | java.util; org.mockito; org.opendaylight.yang; | 1,176,205 |
protected void assumeGlobalXactIdentity(
TransactionTableEntry ent)
{
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(ent != null);
SanityManager.ASSERT(ent.getXid() != null, "TTE.xid is null");
SanityManager.ASSERT(
ent.getFirstLog() != null, "T... | void function( TransactionTableEntry ent) { if (SanityManager.DEBUG) { SanityManager.ASSERT(ent != null); SanityManager.ASSERT(ent.getXid() != null, STR); SanityManager.ASSERT( ent.getFirstLog() != null, STR); SanityManager.ASSERT(ent.isPrepared()); } myId = ent.getXid(); myGlobalId = ent.getGid(); logStart = ent.getFi... | /**
* Assume complete identity of the given Transaction Table Entry.
* <p>
* Used by the final phase of the recovery to create new real transactions
* to take on the identity of in-doubt prepared transactions found during
* redo. Need to assume the globalId.
*
* @param ent The origin... | Assume complete identity of the given Transaction Table Entry. Used by the final phase of the recovery to create new real transactions to take on the identity of in-doubt prepared transactions found during redo. Need to assume the globalId | assumeGlobalXactIdentity | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/impl/store/raw/xact/Xact.java",
"license": "apache-2.0",
"size": 80536
} | [
"org.apache.derby.iapi.services.sanity.SanityManager"
] | import org.apache.derby.iapi.services.sanity.SanityManager; | import org.apache.derby.iapi.services.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,246,199 |
static class Allocator implements TypeAllocator<ImagesType> {
public ImagesType newInstance(String elementName, ComplexDataType parent) {
return new ImagesType(elementName, parent);
}
}
private static Allocator allocator = new Allocator();
| static class Allocator implements TypeAllocator<ImagesType> { ImagesType function(String elementName, ComplexDataType parent) { return new ImagesType(elementName, parent); } } private static Allocator allocator = new Allocator(); | /**
* method for getting a new instance of type ImagesType.
*
* @param elementName the name of the originating XML tag
* @param parent the parent data
* @return new instance
*/ | method for getting a new instance of type ImagesType | newInstance | {
"repo_name": "lolkedijkstra/xml2j-gen",
"path": "samples/discogs/releases/src/main/java/com/xml2j/discogs/releases/ImagesType.java",
"license": "mit",
"size": 3086
} | [
"com.xml2j.xml.core.ComplexDataType",
"com.xml2j.xml.core.TypeAllocator"
] | import com.xml2j.xml.core.ComplexDataType; import com.xml2j.xml.core.TypeAllocator; | import com.xml2j.xml.core.*; | [
"com.xml2j.xml"
] | com.xml2j.xml; | 1,937,176 |
public static SparseBitmap xor(SparseBitmap... bitmaps) {
if (bitmaps.length == 0)
return new SparseBitmap();
else if (bitmaps.length == 1)
return bitmaps[0];
else if (bitmaps.length == 2)
return bitmaps[0].or(bitmaps[1]);
PriorityQueue<SparseBitmap> pq = new PriorityQueue<SparseBitmap>(
bitmaps... | static SparseBitmap function(SparseBitmap... bitmaps) { if (bitmaps.length == 0) return new SparseBitmap(); else if (bitmaps.length == 1) return bitmaps[0]; else if (bitmaps.length == 2) return bitmaps[0].or(bitmaps[1]); PriorityQueue<SparseBitmap> pq = new PriorityQueue<SparseBitmap>( bitmaps.length, smallfirst); for ... | /**
* Computes the bit-wise exclusive or aggregate over several bitmaps.
*
* @param bitmaps
* the bitmaps to aggregate
* @return the resulting bitmap
*/ | Computes the bit-wise exclusive or aggregate over several bitmaps | xor | {
"repo_name": "lemire/sparsebitmap",
"path": "src/main/java/sparsebitmap/SparseBitmap.java",
"license": "apache-2.0",
"size": 29014
} | [
"java.util.PriorityQueue"
] | import java.util.PriorityQueue; | import java.util.*; | [
"java.util"
] | java.util; | 1,625,540 |
public static void makeAccessible(Field field) {
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) ||
Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) {
field.setAccessible(true);
}
} | static void function(Field field) { if ((!Modifier.isPublic(field.getModifiers()) !Modifier.isPublic(field.getDeclaringClass().getModifiers()) Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) { field.setAccessible(true); } } | /**
* Make the given field accessible, explicitly setting it accessible if
* necessary. The <code>setAccessible(true)</code> method is only called
* when actually necessary, to avoid unnecessary conflicts with a JVM
* SecurityManager (if active).
* @param field the field to make accessible
* @see java.lang.... | Make the given field accessible, explicitly setting it accessible if necessary. The <code>setAccessible(true)</code> method is only called when actually necessary, to avoid unnecessary conflicts with a JVM SecurityManager (if active) | makeAccessible | {
"repo_name": "xuse/ef-orm",
"path": "common-core/src/main/java/jef/tools/reflect/ReflectionUtils.java",
"license": "apache-2.0",
"size": 22293
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Modifier"
] | import java.lang.reflect.Field; import java.lang.reflect.Modifier; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,739,328 |
public void setAttackTimerValue(String attackTimerValue)
throws JNCException {
setAttackTimerValue(new YangUInt16(attackTimerValue));
} | void function(String attackTimerValue) throws JNCException { setAttackTimerValue(new YangUInt16(attackTimerValue)); } | /**
* Sets the value for child leaf "attack-timer",
* using a String value.
* @param attackTimerValue used during instantiation.
*/ | Sets the value for child leaf "attack-timer", using a String value | setAttackTimerValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/interface_/ss7/MmeSccpProfile.java",
"license": "apache-2.0",
"size": 19551
} | [
"com.tailf.jnc.YangUInt16"
] | import com.tailf.jnc.YangUInt16; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 1,663,700 |
private ObservableList<CuteElementContainer<Action>> generateCasesBasedOnMap(
TreeMap<String, ArrayList<Action>> actionsMap) {
ObservableList<CuteElementContainer<Action>> genCases = FXCollections.observableArrayList();
for (Entry<String, ArrayList<Action>> entry : actionsMap.entrySet()) {
CuteElementConta... | ObservableList<CuteElementContainer<Action>> function( TreeMap<String, ArrayList<Action>> actionsMap) { ObservableList<CuteElementContainer<Action>> genCases = FXCollections.observableArrayList(); for (Entry<String, ArrayList<Action>> entry : actionsMap.entrySet()) { CuteElementContainer<Action> container = new CuteEle... | /**
* Generates list of {@link CuteElementContainer}s containing Action from the map of string
* Values and corresponding Actions.
*
* @param actionsMap
* map which keys are Values and it's values are corresponding lists of Actions.
* @return ObservableList of CuteElementContainers which contain... | Generates list of <code>CuteElementContainer</code>s containing Action from the map of string Values and corresponding Actions | generateCasesBasedOnMap | {
"repo_name": "ubershy/StreamSis",
"path": "src/main/java/com/ubershy/streamsis/elements/actions/VariableSwitchAction.java",
"license": "gpl-3.0",
"size": 8674
} | [
"com.ubershy.streamsis.elements.CuteElementContainer",
"java.util.ArrayList",
"java.util.Map",
"java.util.TreeMap"
] | import com.ubershy.streamsis.elements.CuteElementContainer; import java.util.ArrayList; import java.util.Map; import java.util.TreeMap; | import com.ubershy.streamsis.elements.*; import java.util.*; | [
"com.ubershy.streamsis",
"java.util"
] | com.ubershy.streamsis; java.util; | 2,247,240 |
public static BufferedImage renderProjected(Registry context, Long pixelsID,
int startZ, int endZ, int type, int stepping,
List<Integer> channels)
throws RenderingServiceException, DSOutOfServiceException
{
if (!(context.equals(registry)))
throw new IllegalArgumentException("Not allow to access metho... | static BufferedImage function(Registry context, Long pixelsID, int startZ, int endZ, int type, int stepping, List<Integer> channels) throws RenderingServiceException, DSOutOfServiceException { if (!(context.equals(registry))) throw new IllegalArgumentException(STR); RenderingControlProxy proxy = (RenderingControlProxy)... | /**
* Renders the projected images.
*
* @param context Reference to the registry. To ensure that agents cannot
* call the method. It must be a reference to the
* container's registry.
* @param pixelsID The id of the pixels set.
* @param startZ The first optical section.... | Renders the projected images | renderProjected | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/rnd/PixelsServicesFactory.java",
"license": "gpl-2.0",
"size": 27446
} | [
"java.awt.image.BufferedImage",
"java.util.List",
"org.openmicroscopy.shoola.env.config.Registry",
"org.openmicroscopy.shoola.env.data.DSOutOfServiceException"
] | import java.awt.image.BufferedImage; import java.util.List; import org.openmicroscopy.shoola.env.config.Registry; import org.openmicroscopy.shoola.env.data.DSOutOfServiceException; | import java.awt.image.*; import java.util.*; import org.openmicroscopy.shoola.env.config.*; import org.openmicroscopy.shoola.env.data.*; | [
"java.awt",
"java.util",
"org.openmicroscopy.shoola"
] | java.awt; java.util; org.openmicroscopy.shoola; | 402,952 |
private void setCurrentActivity(Activity activity) {
if (VectorApp.isAppInBackground() && (null != activity)) {
Matrix matrixInstance = Matrix.getInstance(activity.getApplicationContext());
// sanity check
if (null != matrixInstance) {
matrixInstance.ref... | void function(Activity activity) { if (VectorApp.isAppInBackground() && (null != activity)) { Matrix matrixInstance = Matrix.getInstance(activity.getApplicationContext()); if (null != matrixInstance) { matrixInstance.refreshPushRules(); } Log.d(LOG_TAG, STR); CommonActivityUtils.displayMemoryInformation(activity); } if... | /**
* Update the current active activity.
* It manages the application background / foreground when it is required.
* @param activity the current activity, null if there is no more one.
*/ | Update the current active activity. It manages the application background / foreground when it is required | setCurrentActivity | {
"repo_name": "floviolleau/vector-android",
"path": "vector/src/main/java/im/vector/VectorApp.java",
"license": "apache-2.0",
"size": 14732
} | [
"android.app.Activity",
"android.util.Log",
"im.vector.activity.CommonActivityUtils"
] | import android.app.Activity; import android.util.Log; import im.vector.activity.CommonActivityUtils; | import android.app.*; import android.util.*; import im.vector.activity.*; | [
"android.app",
"android.util",
"im.vector.activity"
] | android.app; android.util; im.vector.activity; | 1,061,367 |
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<EffectiveNetworkSecurityGroupListResultInner>, EffectiveNetworkSecurityGroupListResultInner>
beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<EffectiveNetworkSecurityGroupListResultInner>, EffectiveNetworkSecurityGroupListResultInner> beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName, Context context); | /**
* Gets all network security groups applied to a network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @param context The context to associate with this operation.
* @throws IllegalArgumentExcep... | Gets all network security groups applied to a network interface | beginListEffectiveNetworkSecurityGroups | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java",
"license": "mit",
"size": 60151
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.network.fluent.models.EffectiveNetworkSecurityGroupListResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.EffectiveNetworkSecurityGroupListRes... | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 355,159 |
public final void init(final FilterConfig filterConfig) throws ServletException {
try {
this.filterConfig = filterConfig;
processInitParams(filterConfig);
// Attempt to initialise this filter
doInit(filterConfig);
} catch (final Exception e) {
... | final void function(final FilterConfig filterConfig) throws ServletException { try { this.filterConfig = filterConfig; processInitParams(filterConfig); doInit(filterConfig); } catch (final Exception e) { LOG.error(STR, e); throw new ServletException(STR, e); } } | /**
* Initialises the filter.
* <p/>
* Calls template method {@link #doInit(javax.servlet.FilterConfig)} to perform any filter specific initialisation.
*/ | Initialises the filter. Calls template method <code>#doInit(javax.servlet.FilterConfig)</code> to perform any filter specific initialisation | init | {
"repo_name": "hailin0/pagecache-parent",
"path": "pagecache-common/src/main/java/net/sf/pagecache/constructs/web/filter/Filter.java",
"license": "apache-2.0",
"size": 13347
} | [
"javax.servlet.FilterConfig",
"javax.servlet.ServletException"
] | import javax.servlet.FilterConfig; import javax.servlet.ServletException; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,872,113 |
protected boolean isSnapshotArtifactValid(@Nonnull Artifact artifact, @Nullable Path path) {
try {
return !artifact.isSnapshot() || (path != null && Files.getLastModifiedTime(path).toInstant().isAfter(Instant.now().minus(SNAPSHOT_CACHING_DURATION)));
} catch (IOException ex) {
... | boolean function(@Nonnull Artifact artifact, @Nullable Path path) { try { return !artifact.isSnapshot() (path != null && Files.getLastModifiedTime(path).toInstant().isAfter(Instant.now().minus(SNAPSHOT_CACHING_DURATION))); } catch (IOException ex) { this.getLog().warn(STR + this.getArtifactCoordinateString(artifact) + ... | /**
* Checks whether a snapshot artifact is considered valid.
*/ | Checks whether a snapshot artifact is considered valid | isSnapshotArtifactValid | {
"repo_name": "BasinMC/minecraft-maven-plugin",
"path": "src/main/java/org/basinmc/maven/plugins/minecraft/AbstractArtifactMojo.java",
"license": "apache-2.0",
"size": 9222
} | [
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.time.Instant",
"javax.annotation.Nonnull",
"javax.annotation.Nullable",
"org.apache.maven.artifact.Artifact"
] | import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.time.Instant; import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.apache.maven.artifact.Artifact; | import java.io.*; import java.nio.file.*; import java.time.*; import javax.annotation.*; import org.apache.maven.artifact.*; | [
"java.io",
"java.nio",
"java.time",
"javax.annotation",
"org.apache.maven"
] | java.io; java.nio; java.time; javax.annotation; org.apache.maven; | 2,033,573 |
public static String getArgValue(List<String> args, int argValueIndex) {
if (argValueIndex >= args.size() || argValueIndex < 0) {
return null;
}
String argValue = args.get(argValueIndex);
if (argValue.startsWith("-")) {
return null;
}
return argValue;
} | static String function(List<String> args, int argValueIndex) { if (argValueIndex >= args.size() argValueIndex < 0) { return null; } String argValue = args.get(argValueIndex); if (argValue.startsWith("-")) { return null; } return argValue; } | /**
* Returns the argument value that should be at the given index. If the index
* is out of bounds or the string at the index is another argument (i.e.
* starts with '-'), null is returned.
*/ | Returns the argument value that should be at the given index. If the index is out of bounds or the string at the index is another argument (i.e. starts with '-'), null is returned | getArgValue | {
"repo_name": "boa0332/google-plugin-for-eclipse",
"path": "plugins/com.google.gdt.eclipse.core/src/com/google/gdt/eclipse/core/launch/LaunchConfigurationProcessorUtilities.java",
"license": "epl-1.0",
"size": 9889
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,411,004 |
EdgeStyleDescription getStyle(); | EdgeStyleDescription getStyle(); | /**
* Returns the value of the '<em><b>Style</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Style</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
*
... | Returns the value of the 'Style' containment reference. If the meaning of the 'Style' containment reference isn't clear, there really should be more of a description here... | getStyle | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/ConditionalEdgeStyleDescription.java",
"license": "epl-1.0",
"size": 2283
} | [
"org.eclipse.sirius.diagram.description.style.EdgeStyleDescription"
] | import org.eclipse.sirius.diagram.description.style.EdgeStyleDescription; | import org.eclipse.sirius.diagram.description.style.*; | [
"org.eclipse.sirius"
] | org.eclipse.sirius; | 2,140,496 |
@NotNull
protected List<Property<String>> findByResult(
@NotNull final String resultId,
@NotNull final Map<String, List<Property<String>>> properties,
@NotNull final List<Result<String>> customResults)
{
@NotNull final List<Property<String>> result = new ArrayList<>();
... | List<Property<String>> function( @NotNull final String resultId, @NotNull final Map<String, List<Property<String>>> properties, @NotNull final List<Result<String>> customResults) { @NotNull final List<Property<String>> result = new ArrayList<>(); @Nullable final Result<String> customResult = new CucumberSqlResultDAO(cu... | /**
* Retrieves all {@link Property properties} used in given
* {@link Result}.
* @param resultId the {@link Result} identifier.
* @param properties the properties.
* @param customResults the custom results.
* @return the list of properties associated to given {@link Result}.
*/ | Retrieves all <code>Property properties</code> used in given <code>Result</code> | findByResult | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-test/src/main/java/org/acmsl/queryj/test/sql/CucumberSqlPropertyDAO.java",
"license": "gpl-2.0",
"size": 9227
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.acmsl.queryj.customsql.Property",
"org.acmsl.queryj.customsql.PropertyRef",
"org.acmsl.queryj.customsql.Result",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.acmsl.queryj.customsql.Property; import org.acmsl.queryj.customsql.PropertyRef; import org.acmsl.queryj.customsql.Result; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.acmsl.queryj.customsql.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.acmsl.queryj",
"org.jetbrains.annotations"
] | java.util; org.acmsl.queryj; org.jetbrains.annotations; | 650,329 |
public ResponsesCCE SendResponseCCE(byte[] message, ElGamalKey tKeys)
{
Masks mask = this.SendMasksCCE(tKeys);
BigInteger challenge = this.SendChallenge(mask, message);
BigInteger response = this.ResponseCCE(challenge, mask);
return new ResponsesCCE(mask,challenge,response);
}
| ResponsesCCE function(byte[] message, ElGamalKey tKeys) { Masks mask = this.SendMasksCCE(tKeys); BigInteger challenge = this.SendChallenge(mask, message); BigInteger response = this.ResponseCCE(challenge, mask); return new ResponsesCCE(mask,challenge,response); } | /**
* Create responseCCE will send
* @return response in bigInteger
*/ | Create responseCCE will send | SendResponseCCE | {
"repo_name": "pja35/SXP",
"path": "src/main/java/protocol/impl/sigma/Sender.java",
"license": "lgpl-3.0",
"size": 6451
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,547,140 |
public Signature getSignature() {
return sig1;
} | Signature function() { return sig1; } | /**
* Return the signature of the proxied method.
*/ | Return the signature of the proxied method | getSignature | {
"repo_name": "vongosling/cglib-ext",
"path": "src/proxy/net/sf/cglib/proxy/MethodProxy.java",
"license": "apache-2.0",
"size": 8384
} | [
"net.sf.cglib.core.Signature"
] | import net.sf.cglib.core.Signature; | import net.sf.cglib.core.*; | [
"net.sf.cglib"
] | net.sf.cglib; | 1,026,827 |
public KCTScript parseFromJson(String jsonText)
throws TurtleException
{
JSONParser parser=new JSONParser();
try {
log.trace(jsonText);
JSONObject json=(JSONObject)parser.parse(jsonText);
String scriptname=(String)json.get("scriptname");
... | KCTScript function(String jsonText) throws TurtleException { JSONParser parser=new JSONParser(); try { log.trace(jsonText); JSONObject json=(JSONObject)parser.parse(jsonText); String scriptname=(String)json.get(STR); KCTScript script=new KCTScript(scriptname); log.trace(String.format("%s\n", scriptname)); JSONArray lan... | /**
* Static factory method to parse Json and produce a KCTScript.
*
* @param jsonText
* @return
* @throws TurtleException If there are any errors in the json
*/ | Static factory method to parse Json and produce a KCTScript | parseFromJson | {
"repo_name": "jspacco/Knoxcraft",
"path": "TurtleSponge/src/main/java/org/knoxcraft/turtle3d/TurtleCompiler.java",
"license": "agpl-3.0",
"size": 14201
} | [
"org.json.simple.JSONArray",
"org.json.simple.JSONObject",
"org.json.simple.parser.JSONParser",
"org.json.simple.parser.ParseException"
] | import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; | import org.json.simple.*; import org.json.simple.parser.*; | [
"org.json.simple"
] | org.json.simple; | 2,443,880 |
protected void unlock(String lock, String resource) throws PermissionException
{
if (!unlockCheck(lock, resource))
{
throw new PermissionException(sessionManager().getCurrentSessionUserId(), lock, resource);
}
} | void function(String lock, String resource) throws PermissionException { if (!unlockCheck(lock, resource)) { throw new PermissionException(sessionManager().getCurrentSessionUserId(), lock, resource); } } | /**
* Check security permission.
*
* @param lock
* The lock id string.
* @param resource
* The resource reference string, or null if no resource is involved.
* @exception PermissionException
* Thrown if the user does not have access
*/ | Check security permission | unlock | {
"repo_name": "harfalm/Sakai-10.1",
"path": "kernel/kernel-impl/src/main/java/org/sakaiproject/site/impl/BaseSiteService.java",
"license": "apache-2.0",
"size": 95539
} | [
"org.sakaiproject.exception.PermissionException"
] | import org.sakaiproject.exception.PermissionException; | import org.sakaiproject.exception.*; | [
"org.sakaiproject.exception"
] | org.sakaiproject.exception; | 1,704,418 |
public Date getUpdateStart()
{
return (m_updateStart);
} | Date function() { return (m_updateStart); } | /**
* Gets the Update Start Field value.
*
* @return update Start Date
*/ | Gets the Update Start Field value | getUpdateStart | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/ResourceAssignmentWorkgroupFields.java",
"license": "lgpl-2.1",
"size": 3374
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,526,842 |
private MenuItem addConnectionAction(Menu menu, final EClass relationshipType, final boolean reverseDirection) {
final MenuItem item = new MenuItem(menu, SWT.CASCADE);
item.setText(ArchiLabelProvider.INSTANCE.getRelationshipPhrase(relationshipType, reverseDirection));
item.setImage(ArchiLabe... | MenuItem function(Menu menu, final EClass relationshipType, final boolean reverseDirection) { final MenuItem item = new MenuItem(menu, SWT.CASCADE); item.setText(ArchiLabelProvider.INSTANCE.getRelationshipPhrase(relationshipType, reverseDirection)); item.setImage(ArchiLabelProvider.INSTANCE.getImage(relationshipType)); | /**
* Add a Connection Action with a relationship type
*/ | Add a Connection Action with a relationship type | addConnectionAction | {
"repo_name": "archimatetool/archi",
"path": "com.archimatetool.editor/src/com/archimatetool/editor/diagram/tools/MagicConnectionCreationTool.java",
"license": "mit",
"size": 28490
} | [
"com.archimatetool.editor.ui.ArchiLabelProvider",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.swt.widgets.Menu",
"org.eclipse.swt.widgets.MenuItem"
] | import com.archimatetool.editor.ui.ArchiLabelProvider; import org.eclipse.emf.ecore.EClass; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; | import com.archimatetool.editor.ui.*; import org.eclipse.emf.ecore.*; import org.eclipse.swt.widgets.*; | [
"com.archimatetool.editor",
"org.eclipse.emf",
"org.eclipse.swt"
] | com.archimatetool.editor; org.eclipse.emf; org.eclipse.swt; | 989,884 |
public static JSONObject getEntry(File file) throws JSONException {
JSONObject entry = new JSONObject();
entry.put("isFile", file.isFile());
entry.put("isDirectory", file.isDirectory());
entry.put("name", file.getName());
entry.put("fullPath", "file://" + file.getAbsolutePat... | static JSONObject function(File file) throws JSONException { JSONObject entry = new JSONObject(); entry.put(STR, file.isFile()); entry.put(STR, file.isDirectory()); entry.put("name", file.getName()); entry.put(STR, "file: return entry; } | /**
* Returns a JSON object representing the given File.
*
* @param file the File to convert
* @return a JSON representation of the given File
* @throws org.json.JSONException
*/ | Returns a JSON object representing the given File | getEntry | {
"repo_name": "usersource/tasks",
"path": "tasks_phonegap/Tasks/plugins/io.usersource.anno/anno_plugin_android/src/org/apache/cordova/file/FileUtils.java",
"license": "mpl-2.0",
"size": 47712
} | [
"java.io.File",
"org.json.JSONException",
"org.json.JSONObject"
] | import java.io.File; import org.json.JSONException; import org.json.JSONObject; | import java.io.*; import org.json.*; | [
"java.io",
"org.json"
] | java.io; org.json; | 2,674,242 |
@Override
public void widgetSelected(final SelectionEvent arg0) {
selectedDelimiter = comboDelimiter.getSelectionIndex();
customDelimiter = true;
evaluatePage();
}
});
new Label(container, SWT.N... | void function(final SelectionEvent arg0) { selectedDelimiter = comboDelimiter.getSelectionIndex(); customDelimiter = true; evaluatePage(); } }); new Label(container, SWT.NONE); lblQuote = new Label(container, SWT.NONE); lblQuote.setVisible(false); lblQuote.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false,... | /**
* Set selection index and customDelimiter and (re-)evaluates page
*/ | Set selection index and customDelimiter and (re-)evaluates page | widgetSelected | {
"repo_name": "RaffaelBild/arx",
"path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/ImportWizardPageCSV.java",
"license": "apache-2.0",
"size": 31391
} | [
"org.deidentifier.arx.gui.resources.Resources",
"org.eclipse.swt.events.SelectionAdapter",
"org.eclipse.swt.events.SelectionEvent",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Combo",
"org.eclipse.swt.widgets.Label"
] | import org.deidentifier.arx.gui.resources.Resources; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Label; | import org.deidentifier.arx.gui.resources.*; import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.deidentifier.arx",
"org.eclipse.swt"
] | org.deidentifier.arx; org.eclipse.swt; | 1,250,818 |
protected void parseValueConstraints( TokenStream tokens,
JcrPropertyDefinitionTemplate propDefn ) {
if (tokens.canConsume('<')) {
List<String> defaultValues = parseStringList(tokens);
if (!defaultValues.isEmpty()) {
propDefn.... | void function( TokenStream tokens, JcrPropertyDefinitionTemplate propDefn ) { if (tokens.canConsume('<')) { List<String> defaultValues = parseStringList(tokens); if (!defaultValues.isEmpty()) { propDefn.setValueConstraints(strings(defaultValues)); } } } | /**
* Parse the property definition's value constraints, if they appear next on the token stream.
*
* @param tokens the tokens containing the definition; never null
* @param propDefn the property definition; never null
* @throws ParsingException if there is a problem parsing the content
*... | Parse the property definition's value constraints, if they appear next on the token stream | parseValueConstraints | {
"repo_name": "phantomjinx/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/CndImporter.java",
"license": "apache-2.0",
"size": 38876
} | [
"java.util.List",
"org.modeshape.common.text.TokenStream"
] | import java.util.List; import org.modeshape.common.text.TokenStream; | import java.util.*; import org.modeshape.common.text.*; | [
"java.util",
"org.modeshape.common"
] | java.util; org.modeshape.common; | 1,294,176 |
boolean isObjectProperty(Predicate predicate); | boolean isObjectProperty(Predicate predicate); | /**
* Checks whether the predicate is a object property assertion.
*
* @param predicate
* The target predicate.
* @return Returns true if the predicate is a object property assertion from
* the input ontology, or false otherwise.
*/ | Checks whether the predicate is a object property assertion | isObjectProperty | {
"repo_name": "srapisarda/ontop",
"path": "obdalib-core/src/main/java/it/unibz/inf/ontop/io/TargetQueryVocabularyValidator.java",
"license": "apache-2.0",
"size": 2556
} | [
"it.unibz.inf.ontop.model.Predicate"
] | import it.unibz.inf.ontop.model.Predicate; | import it.unibz.inf.ontop.model.*; | [
"it.unibz.inf"
] | it.unibz.inf; | 1,900,053 |
public LoadStats plus(final LoadStats stats) {
return new LoadStats(loadSuccessCount + stats.loadSuccessCount,
loadTimeoutCount + stats.loadTimeoutCount,
loadExceptionCount + stats.loadExceptionCount,
totalLoadTime + stat... | LoadStats function(final LoadStats stats) { return new LoadStats(loadSuccessCount + stats.loadSuccessCount, loadTimeoutCount + stats.loadTimeoutCount, loadExceptionCount + stats.loadExceptionCount, totalLoadTime + stats.totalLoadTime, BASE_UNIT); } public LoadStats(final long loadSuccessCount, final long loadTimeoutCou... | /**
* Returns a new LoadStats representing the aggregation of this object and the other one. Subclasses will want
* to override this.
*/ | Returns a new LoadStats representing the aggregation of this object and the other one. Subclasses will want to override this | plus | {
"repo_name": "toonetown/guava-ext",
"path": "src/main/java/com/toonetown/guava_ext/LoadStats.java",
"license": "mit",
"size": 8333
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,578,083 |
@Override
public Attribute fillAttribute(PerunSessionImpl perunSession, User user, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException {
Attribute filledAttribute = new Attribute(attribute);
// Get all attributes urn:perun:user:attribute-def:def:login-namespace:[logi... | Attribute function(PerunSessionImpl perunSession, User user, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException { Attribute filledAttribute = new Attribute(attribute); List<Attribute> loginAttributes = perunSession.getPerunBl().getAttributesManagerBl().getAttributesByAttribu... | /**
* Fill unique (not used) login for user defined as number starting from 1
*
* @param perunSession PerunSession
* @param user User to fill attribute for
* @param attribute Attribute to fill value to
* @return Filled attribute
* @throws InternalErrorException
* @throws WrongAttributeAssignmentExceptio... | Fill unique (not used) login for user defined as number starting from 1 | fillAttribute | {
"repo_name": "stavamichal/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/impl/modules/attributes/urn_perun_user_attribute_def_def_login_namespace_fedcloud.java",
"license": "bsd-2-clause",
"size": 3414
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.AttributeDefinition",
"cz.metacentrum.perun.core.api.User",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException",
"cz.metacentrum.perun.core.... | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.AttributeDefinition; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.metace... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import cz.metacentrum.perun.core.impl.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,572,295 |
public void parse(Format format) throws IOException
{
parse(format, null);
} | void function(Format format) throws IOException { parse(format, null); } | /**
* Parse the given file and check if it is a confirming file according to the given format.
*
* @param format
* format that the document should follow (default {@link Format#PDF_A1B})
* @throws IOException
*/ | Parse the given file and check if it is a confirming file according to the given format | parse | {
"repo_name": "ZhenyaM/veraPDF-pdfbox",
"path": "preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java",
"license": "apache-2.0",
"size": 34951
} | [
"java.io.IOException",
"org.apache.pdfbox.preflight.Format"
] | import java.io.IOException; import org.apache.pdfbox.preflight.Format; | import java.io.*; import org.apache.pdfbox.preflight.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 1,577,465 |
public Observable<ServiceResponse<PublicIPPrefixInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String publicIpPrefixName, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null... | Observable<ServiceResponse<PublicIPPrefixInner>> function(String resourceGroupName, String publicIpPrefixName, String expand) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (publicIpPrefixName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == nul... | /**
* Gets the specified public IP prefix in a specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param publicIpPrefixName The name of the public IP prefix.
* @param expand Expands referenced resources.
* @throws IllegalArgumentException thrown if par... | Gets the specified public IP prefix in a specified resource group | getByResourceGroupWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixesInner.java",
"license": "mit",
"size": 78189
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 941,101 |
public static Path getWindupHome()
{
String windupHome = System.getProperty(WINDUP_HOME);
if (windupHome == null)
{
Path path = new File("").toPath();
LOG.warning("$WINDUP_HOME not set, using [" + path.toAbsolutePath().toString() + "] instead.");
retur... | static Path function() { String windupHome = System.getProperty(WINDUP_HOME); if (windupHome == null) { Path path = new File(STR$WINDUP_HOME not set, using [STR] instead."); return path; } return Paths.get(windupHome); } | /**
* The path $WINDUP_HOME (where Windup is installed.)
*/ | The path $WINDUP_HOME (where Windup is installed.) | getWindupHome | {
"repo_name": "lincolnthree/windup",
"path": "utils/src/main/java/org/jboss/windup/util/PathUtil.java",
"license": "epl-1.0",
"size": 6532
} | [
"java.io.File",
"java.nio.file.Path",
"java.nio.file.Paths"
] | import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; | import java.io.*; import java.nio.file.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,904,536 |
@Test
public void canDoActionShareableDiskVolumeFormatFails() {
DiskImage image = createShareableDiskImage();
image.setvolumeFormat(VolumeFormat.COW);
AddDiskParameters parameters = createParameters();
parameters.setDiskInfo(image);
Guid storageId = Guid.newGuid();
... | void function() { DiskImage image = createShareableDiskImage(); image.setvolumeFormat(VolumeFormat.COW); AddDiskParameters parameters = createParameters(); parameters.setDiskInfo(image); Guid storageId = Guid.newGuid(); initializeCommand(storageId, parameters); mockVm(); mockStorageDomain(storageId, Version.v3_1); mock... | /**
* CanDoAction should fail when creating a Shareable Disk with COW volume format
*/ | CanDoAction should fail when creating a Shareable Disk with COW volume format | canDoActionShareableDiskVolumeFormatFails | {
"repo_name": "yingyun001/ovirt-engine",
"path": "backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddDiskCommandTest.java",
"license": "apache-2.0",
"size": 40788
} | [
"org.junit.Assert",
"org.ovirt.engine.core.common.action.AddDiskParameters",
"org.ovirt.engine.core.common.businessentities.storage.DiskImage",
"org.ovirt.engine.core.common.businessentities.storage.VolumeFormat",
"org.ovirt.engine.core.common.errors.EngineMessage",
"org.ovirt.engine.core.compat.Guid",
... | import org.junit.Assert; import org.ovirt.engine.core.common.action.AddDiskParameters; import org.ovirt.engine.core.common.businessentities.storage.DiskImage; import org.ovirt.engine.core.common.businessentities.storage.VolumeFormat; import org.ovirt.engine.core.common.errors.EngineMessage; import org.ovirt.engine.core... | import org.junit.*; import org.ovirt.engine.core.common.action.*; import org.ovirt.engine.core.common.businessentities.storage.*; import org.ovirt.engine.core.common.errors.*; import org.ovirt.engine.core.compat.*; | [
"org.junit",
"org.ovirt.engine"
] | org.junit; org.ovirt.engine; | 599,623 |
Artifact getAssociatedArtifact( final Overlay overlay )
throws InvalidOverlayConfigurationException
{
if ( overlay.isCurrentProject() )
{
return null;
}
for ( Artifact artifact : artifactsOverlays )
{
// Handle classifier dependencies prop... | Artifact getAssociatedArtifact( final Overlay overlay ) throws InvalidOverlayConfigurationException { if ( overlay.isCurrentProject() ) { return null; } for ( Artifact artifact : artifactsOverlays ) { if ( compareOverlayWithArtifact( overlay, artifact ) ) { return artifact; } } @SuppressWarnings( STR ) Set<Artifact> pr... | /**
* Returns the Artifact associated to the specified overlay.
* <p/>
* If the overlay defines the current project, <tt>null</tt> is
* returned. If no artifact could not be found for the overlay
* a InvalidOverlayConfigurationException is thrown.
*
* @param overlay an overlay
* ... | Returns the Artifact associated to the specified overlay. If the overlay defines the current project, null is returned. If no artifact could not be found for the overlay a InvalidOverlayConfigurationException is thrown | getAssociatedArtifact | {
"repo_name": "dmlloyd/maven-plugins",
"path": "maven-war-plugin/src/main/java/org/apache/maven/plugin/war/overlay/OverlayManager.java",
"license": "apache-2.0",
"size": 8944
} | [
"java.util.Set",
"org.apache.maven.artifact.Artifact",
"org.apache.maven.plugin.war.Overlay"
] | import java.util.Set; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.war.Overlay; | import java.util.*; import org.apache.maven.artifact.*; import org.apache.maven.plugin.war.*; | [
"java.util",
"org.apache.maven"
] | java.util; org.apache.maven; | 2,241,244 |
private static boolean codecNeedsDiscardChannelsWorkaround(String codecName) {
// The workaround applies to Samsung Galaxy S6 and Samsung Galaxy S7.
return Util.SDK_INT < 24 && "OMX.SEC.aac.dec".equals(codecName)
&& "samsung".equals(Util.MANUFACTURER)
&& (Util.DEVICE.startsWith("zeroflte") || ... | static boolean function(String codecName) { return Util.SDK_INT < 24 && STR.equals(codecName) && STR.equals(Util.MANUFACTURER) && (Util.DEVICE.startsWith(STR) Util.DEVICE.startsWith(STR) Util.DEVICE.startsWith(STR)); } | /**
* Returns whether the decoder is known to output six audio channels when provided with input with
* fewer than six channels.
* <p>
* See [Internal: b/35655036].
*/ | Returns whether the decoder is known to output six audio channels when provided with input with fewer than six channels. See [Internal: b/35655036] | codecNeedsDiscardChannelsWorkaround | {
"repo_name": "superbderrick/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java",
"license": "apache-2.0",
"size": 42299
} | [
"com.google.android.exoplayer2.util.Util"
] | import com.google.android.exoplayer2.util.Util; | import com.google.android.exoplayer2.util.*; | [
"com.google.android"
] | com.google.android; | 1,274,257 |
@HiveDecimalWritableVersionV1
@Override
public void write(DataOutput out) throws IOException {
if (!isSet()) {
throw new RuntimeException("no value set");
}
if (internalScratchLongs == null) {
internalScratchLongs = new long[FastHiveDecimal.FAST_SCRATCH_LONGS_LEN];
internalScratchBu... | @HiveDecimalWritableVersionV1 void function(DataOutput out) throws IOException { if (!isSet()) { throw new RuntimeException(STR); } if (internalScratchLongs == null) { internalScratchLongs = new long[FastHiveDecimal.FAST_SCRATCH_LONGS_LEN]; internalScratchBuffer = new byte[FastHiveDecimal.FAST_SCRATCH_BUFFER_LEN_BIG_IN... | /**
* Standard Writable method that serialize the fields of this object to a DataOutput.
*
*/ | Standard Writable method that serialize the fields of this object to a DataOutput | write | {
"repo_name": "vergilchiu/hive",
"path": "storage-api/src/java/org/apache/hadoop/hive/serde2/io/HiveDecimalWritable.java",
"license": "apache-2.0",
"size": 26923
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.hadoop.hive.common.type.FastHiveDecimal"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.hadoop.hive.common.type.FastHiveDecimal; | import java.io.*; import org.apache.hadoop.hive.common.type.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,013,084 |
EnrolmentInfo getEnrolment(DeviceIdentifier deviceId, int tenantId) throws DeviceManagementDAOException; | EnrolmentInfo getEnrolment(DeviceIdentifier deviceId, int tenantId) throws DeviceManagementDAOException; | /**
* This method is used to retrieve current enrollment of a given device.
*
* @param deviceId device id.
* @param tenantId tenant id.
* @return returns EnrolmentInfo object.
* @throws DeviceManagementDAOException
*/ | This method is used to retrieve current enrollment of a given device | getEnrolment | {
"repo_name": "prithvi66/carbon-device-mgt",
"path": "components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java",
"license": "apache-2.0",
"size": 16585
} | [
"org.wso2.carbon.device.mgt.common.DeviceIdentifier",
"org.wso2.carbon.device.mgt.common.EnrolmentInfo"
] | import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.EnrolmentInfo; | import org.wso2.carbon.device.mgt.common.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,783,543 |
@RequirePOST
public void doAct(StaplerRequest req, StaplerResponse rsp) throws IOException {
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
if(req.hasParameter("no")) {
disable(true);
rsp.sendRedirect(req.getContextPath()+"/manage");
} else {
rsp.s... | void function(StaplerRequest req, StaplerResponse rsp) throws IOException { Jenkins.get().checkPermission(Jenkins.ADMINISTER); if(req.hasParameter("no")) { disable(true); rsp.sendRedirect(req.getContextPath()+STR); } else { rsp.sendRedirect(req.getContextPath()+STR); } } | /**
* Depending on whether the user said "yes" or "no", send him to the right place.
*/ | Depending on whether the user said "yes" or "no", send him to the right place | doAct | {
"repo_name": "rsandell/jenkins",
"path": "core/src/main/java/hudson/diagnosis/TooManyJobsButNoView.java",
"license": "mit",
"size": 2947
} | [
"java.io.IOException",
"org.kohsuke.stapler.StaplerRequest",
"org.kohsuke.stapler.StaplerResponse"
] | import java.io.IOException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; | import java.io.*; import org.kohsuke.stapler.*; | [
"java.io",
"org.kohsuke.stapler"
] | java.io; org.kohsuke.stapler; | 657,467 |
protected void addDistribution_energyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Substation_distribution_energy_feature"),
getString("_U... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getSubstation_Distribution_energy(), true, false, false, ItemPropertyDes... | /**
* This adds a property descriptor for the Distribution energy feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Distribution energy feature. | addDistribution_energyPropertyDescriptor | {
"repo_name": "mikesligo/visGrid",
"path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/SubstationItemProvider.java",
"license": "gpl-3.0",
"size": 29813
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,354,124 |
@SuppressWarnings("unchecked")
public T setHeaders(final Map<String, List<String>> headers) {
this.headers = headers;
return (T) this;
} | @SuppressWarnings(STR) T function(final Map<String, List<String>> headers) { this.headers = headers; return (T) this; } | /**
* Sets all of the headers in one call.
*
* @param headers
* A Map of headers, where the header name is a String, and the value is a List of one or more values.
* @return this Message, to support chained method calls
*/ | Sets all of the headers in one call | setHeaders | {
"repo_name": "hyperwallet/java-sdk",
"path": "src/main/java/com/hyperwallet/clientsdk/util/Message.java",
"license": "mit",
"size": 4191
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,242,443 |
//
// BookmarksXMLLoader
//
public T load(Class docClass) throws IOException {
final InputStream in = getClass().getResourceAsStream("/" + uri.getPath());
if (in == null) {
errors.add(new Error(0, Error.ERROR_SEVERITY.FATAL, "Cannot find resource: " + uri));
throw new F... | T function(Class docClass) throws IOException { final InputStream in = getClass().getResourceAsStream("/" + uri.getPath()); if (in == null) { errors.add(new Error(0, Error.ERROR_SEVERITY.FATAL, STR + uri)); throw new FileNotFoundException(STR + uri); } try { return load(docClass, in); } finally { in.close(); } } | /**
* Load bookmarks into a action list.
*
* @throws IOException If an I/O error occurred.
* @throws FileNotFoundException If the resource was not found.
*/ | Load bookmarks into a action list | load | {
"repo_name": "isa-group/SEDL",
"path": "modules/SEDL-core/src/main/java/es/us/isa/sedl/core/util/xml/XMLUnmarshaller.java",
"license": "gpl-2.0",
"size": 3254
} | [
"es.us.isa.sedl.core.util.Error",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream"
] | import es.us.isa.sedl.core.util.Error; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; | import es.us.isa.sedl.core.util.*; import java.io.*; | [
"es.us.isa",
"java.io"
] | es.us.isa; java.io; | 1,701,044 |
MockContext.initContext();
FileField field = new FileField("name");
String value = "<script>";
String expected = "<script>";
field.setValue(value);
assertTrue(field.toString().indexOf(expected) > 1);
// Check that the value <script> is not rendered
... | MockContext.initContext(); FileField field = new FileField("name"); String value = STR; String expected = STR; field.setValue(value); assertTrue(field.toString().indexOf(expected) > 1); assertTrue(field.toString().indexOf(value) < 0); } | /**
* Check that FileField value is escaped. This protects against
* cross-site scripting attacks (XSS).
*/ | Check that FileField value is escaped. This protects against cross-site scripting attacks (XSS) | testEscapeValue | {
"repo_name": "medgar/click",
"path": "framework/test/org/apache/click/control/FileFieldTest.java",
"license": "apache-2.0",
"size": 2994
} | [
"org.apache.click.MockContext"
] | import org.apache.click.MockContext; | import org.apache.click.*; | [
"org.apache.click"
] | org.apache.click; | 515,261 |
public static ExpectedCondition<Boolean> attributeContains(final By locator,
final String attribute,
final String value) {
return new ExpectedCondition<Boolean>() {
private String curren... | static ExpectedCondition<Boolean> function(final By locator, final String attribute, final String value) { return new ExpectedCondition<Boolean>() { private String currentValue = null; | /**
* An expectation for checking WebElement with given locator has attribute which contains specific
* value
*
* @param locator used to define WebElement to check its parameters
* @param attribute used to define css or html attribute
* @param value used as expected attribute value
* @return ... | An expectation for checking WebElement with given locator has attribute which contains specific value | attributeContains | {
"repo_name": "xmhubj/selenium",
"path": "java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java",
"license": "apache-2.0",
"size": 50692
} | [
"org.openqa.selenium.By"
] | import org.openqa.selenium.By; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 1,260,882 |
if (!versionMeetsMinimum(5, 0)) {
return;
}
createTable("testCoordination", "(field1 int) ENGINE=InnoDB");
Connection conn1 = null;
Connection conn2 = null;
XAConnection xaConn1 = null;
XAConnection xaConn2 = null;
try {
xaConn1 = getXAConnection();
XAResource xaRes1 = xaC... | if (!versionMeetsMinimum(5, 0)) { return; } createTable(STR, STR); Connection conn1 = null; Connection conn2 = null; XAConnection xaConn1 = null; XAConnection xaConn2 = null; try { xaConn1 = getXAConnection(); XAResource xaRes1 = xaConn1.getXAResource(); conn1 = xaConn1.getConnection(); xaConn2 = getXAConnection(); XAR... | /**
* Tests that simple distributed transaction processing works as expected.
*
* @throws Exception
* if the test fails.
*/ | Tests that simple distributed transaction processing works as expected | testCoordination | {
"repo_name": "yyuu/libmysql-java",
"path": "src/testsuite/simple/XATest.java",
"license": "gpl-2.0",
"size": 13254
} | [
"java.sql.Connection",
"javax.sql.XAConnection",
"javax.transaction.xa.XAResource",
"javax.transaction.xa.Xid"
] | import java.sql.Connection; import javax.sql.XAConnection; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; | import java.sql.*; import javax.sql.*; import javax.transaction.xa.*; | [
"java.sql",
"javax.sql",
"javax.transaction"
] | java.sql; javax.sql; javax.transaction; | 919,401 |
public final Markup getMarkup(final MarkupContainer container, final Class<?> clazz,
final boolean enforceReload)
{
Class<?> containerClass = clazz;
if (clazz == null)
{
containerClass = container.getClass();
}
else if (!clazz.isAssignableFrom(container.getClass()))
{
throw new WicketRuntimeExce... | final Markup function(final MarkupContainer container, final Class<?> clazz, final boolean enforceReload) { Class<?> containerClass = clazz; if (clazz == null) { containerClass = container.getClass(); } else if (!clazz.isAssignableFrom(container.getClass())) { throw new WicketRuntimeException(STR + container.getClass()... | /**
* THIS IS NOT PART OF WICKET'S PUBLIC API. DO NOT USE IT.
*
* I still don't like this method being part of the API but I didn't find a suitable other
* solution.
*
* @see org.apache.wicket.markup.IMarkupCache#getMarkup(org.apache.wicket.MarkupContainer,
* java.lang.Class, boolean)
*/ | THIS IS NOT PART OF WICKET'S PUBLIC API. DO NOT USE IT. I still don't like this method being part of the API but I didn't find a suitable other solution | getMarkup | {
"repo_name": "Servoy/wicket",
"path": "wicket/src/main/java/org/apache/wicket/markup/MarkupCache.java",
"license": "apache-2.0",
"size": 22301
} | [
"org.apache.wicket.MarkupContainer",
"org.apache.wicket.WicketRuntimeException",
"org.apache.wicket.util.resource.IResourceStream"
] | import org.apache.wicket.MarkupContainer; import org.apache.wicket.WicketRuntimeException; import org.apache.wicket.util.resource.IResourceStream; | import org.apache.wicket.*; import org.apache.wicket.util.resource.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,052,615 |
public void resetToDefault(TreeTableNode node) {
if (node == null) {
node = root;
}
if (node instanceof DataTypePropertiesTableNode) {
DataTypePropertiesTableNode tableNode = (DataTypePropertiesTableNode) node;
tableNode.resetToDefault();
}
... | void function(TreeTableNode node) { if (node == null) { node = root; } if (node instanceof DataTypePropertiesTableNode) { DataTypePropertiesTableNode tableNode = (DataTypePropertiesTableNode) node; tableNode.resetToDefault(); } for (int i = 0; i < node.getChildCount(); i++) { resetToDefault(node.getChildAt(i)); } } | /**
* Resets the node and all of its children to the data type's default values
*/ | Resets the node and all of its children to the data type's default values | resetToDefault | {
"repo_name": "encapturemd/MirthConnect",
"path": "client/src/com/mirth/connect/client/ui/DataTypePropertiesTableModel.java",
"license": "mpl-2.0",
"size": 8582
} | [
"org.jdesktop.swingx.treetable.TreeTableNode"
] | import org.jdesktop.swingx.treetable.TreeTableNode; | import org.jdesktop.swingx.treetable.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 2,496,423 |
public Observable<ServiceResponse<Void>> putUtcMaxDateTimeAsync(DateTime datetimeBody) {
if (datetimeBody == null) {
throw new IllegalArgumentException("Parameter datetimeBody is required and cannot be null.");
} | Observable<ServiceResponse<Void>> function(DateTime datetimeBody) { if (datetimeBody == null) { throw new IllegalArgumentException(STR); } | /**
* Put max datetime value 9999-12-31T23:59:59.9999999Z.
*
* @param datetimeBody the DateTime value
* @return the {@link ServiceResponse} object if successful.
*/ | Put max datetime value 9999-12-31T23:59:59.9999999Z | putUtcMaxDateTimeAsync | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydatetime/implementation/DatetimesImpl.java",
"license": "mit",
"size": 50464
} | [
"com.microsoft.rest.ServiceResponse",
"org.joda.time.DateTime"
] | import com.microsoft.rest.ServiceResponse; import org.joda.time.DateTime; | import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.rest; org.joda.time; | 953,205 |
@Override
public VcfEmission next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
VcfRecord nextRecord = it.next();
if (nextRecord.hasFormat("PGP")){
return new PGPRefGT(nextRecord);
}
else
return new BitSetRefGT(nextRecord);
} | VcfEmission function() { if (!hasNext()) { throw new NoSuchElementException(); } VcfRecord nextRecord = it.next(); if (nextRecord.hasFormat("PGP")){ return new PGPRefGT(nextRecord); } else return new BitSetRefGT(nextRecord); } | /**
* Returns the next element in the iteration.
* @return the next element in the iteration.
* @throws NoSuchElementException if the iteration has no more elements.
*
* @throws IllegalArgumentException if the next VCF record
* does not have a "GT" format field, has a missing allele, or
... | Returns the next element in the iteration | next | {
"repo_name": "tfwillems/PhasedBEAGLE",
"path": "vcf/VcfRefIterator.java",
"license": "gpl-3.0",
"size": 3172
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 740,399 |
public void setFantasyFontFamily(String font) {
if (TRACE) Log.i(LOGTAG, "setFantasyFontFamily=" + font);
synchronized (mAwSettingsLock) {
if (font != null && !mFantasyFontFamily.equals(font)) {
mFantasyFontFamily = font;
mEventHandler.updateWebkitPreferen... | void function(String font) { if (TRACE) Log.i(LOGTAG, STR + font); synchronized (mAwSettingsLock) { if (font != null && !mFantasyFontFamily.equals(font)) { mFantasyFontFamily = font; mEventHandler.updateWebkitPreferencesLocked(); } } } | /**
* See {@link android.webkit.WebSettings#setFantasyFontFamily}.
*/ | See <code>android.webkit.WebSettings#setFantasyFontFamily</code> | setFantasyFontFamily | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/android_webview/java/src/org/chromium/android_webview/AwSettings.java",
"license": "bsd-3-clause",
"size": 65230
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,318,889 |
Future<Void> thenAcceptAsync(AcceptFunction<? super T> acceptFunction, Executor executor); | Future<Void> thenAcceptAsync(AcceptFunction<? super T> acceptFunction, Executor executor); | /**
* Applies the accept function to the value of the future. Unlike the {@link ApplyFunction}, the
* {@link AcceptFunction} does not return a value. The returned future, thus, represents only
* the completion of the accept callback.
* <p>
* The accept function is executed asynchronously by the given executor... | Applies the accept function to the value of the future. Unlike the <code>ApplyFunction</code>, the <code>AcceptFunction</code> does not return a value. The returned future, thus, represents only the completion of the accept callback. The accept function is executed asynchronously by the given executor | thenAcceptAsync | {
"repo_name": "WangTaoTheTonic/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/Future.java",
"license": "apache-2.0",
"size": 11467
} | [
"java.util.concurrent.Executor"
] | import java.util.concurrent.Executor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,149,811 |
public void setMinutes(int intMinutes)
{
ScriptBuffer script = new ScriptBuffer();
script.appendCall(getContextPath() + "setMinutes", intMinutes);
ScriptSessions.addScript(script);
} | void function(int intMinutes) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + STR, intMinutes); ScriptSessions.addScript(script); } | /**
* Sets the minute value of this time picker. This method updates the view immediately.
* @param intMinutes 0-59.
*/ | Sets the minute value of this time picker. This method updates the view immediately | setMinutes | {
"repo_name": "burris/dwr",
"path": "ui/gi/generated/java/jsx3/gui/TimePicker.java",
"license": "apache-2.0",
"size": 39659
} | [
"org.directwebremoting.ScriptBuffer",
"org.directwebremoting.ScriptSessions"
] | import org.directwebremoting.ScriptBuffer; import org.directwebremoting.ScriptSessions; | import org.directwebremoting.*; | [
"org.directwebremoting"
] | org.directwebremoting; | 1,199,124 |
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
WireFormatInfo info = (WireFormatInfo)o;
info.beforeMarshall(wireFormat);
int rc = super.tightMarshal1(wireFormat, o, bs);
rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8)... | int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { WireFormatInfo info = (WireFormatInfo)o; info.beforeMarshall(wireFormat); int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8); rc += tightMarshalByteSequence1(info.getMarshalle... | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | tightMarshal1 | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java",
"license": "epl-1.0",
"size": 5147
} | [
"java.io.IOException",
"org.apache.activemq.command.WireFormatInfo",
"org.apache.activemq.openwire.BooleanStream",
"org.apache.activemq.openwire.OpenWireFormat"
] | import java.io.IOException; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.openwire.BooleanStream; import org.apache.activemq.openwire.OpenWireFormat; | import java.io.*; import org.apache.activemq.command.*; import org.apache.activemq.openwire.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 80,246 |
private String getPcepTunnelKey(TunnelId tunnelId) {
for (String key : tunnelMap.keySet()) {
if (tunnelMap.get(key).id() == tunnelId.id()) {
return key;
}
}
return null;
} | String function(TunnelId tunnelId) { for (String key : tunnelMap.keySet()) { if (tunnelMap.get(key).id() == tunnelId.id()) { return key; } } return null; } | /**
* Get the tunnel key according to the tunnelID.
*
* @param tunnelId tunnel id
* @return corresponding a tunnel key of the tunnel id.
*/ | Get the tunnel key according to the tunnelID | getPcepTunnelKey | {
"repo_name": "harikrushna-Huawei/hackathon",
"path": "providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java",
"license": "apache-2.0",
"size": 87555
} | [
"org.onlab.util.Tools",
"org.onosproject.incubator.net.tunnel.TunnelId"
] | import org.onlab.util.Tools; import org.onosproject.incubator.net.tunnel.TunnelId; | import org.onlab.util.*; import org.onosproject.incubator.net.tunnel.*; | [
"org.onlab.util",
"org.onosproject.incubator"
] | org.onlab.util; org.onosproject.incubator; | 1,727,252 |
void suspend(String resourceGroupName, String dedicatedCapacityName, Context context); | void suspend(String resourceGroupName, String dedicatedCapacityName, Context context); | /**
* Suspends operation of the specified dedicated capacity instance.
*
* @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
* This name must be at least 1 character in length, and no more than 90.
* @param dedicatedCapacityNam... | Suspends operation of the specified dedicated capacity instance | suspend | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java",
"license": "mit",
"size": 17073
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,232,786 |
@Test
public void testSourceMac() throws Exception {
isisHeader.setSourceMac(macAddress);
result1 = isisHeader.sourceMac();
assertThat(result1, is(macAddress));
} | void function() throws Exception { isisHeader.setSourceMac(macAddress); result1 = isisHeader.sourceMac(); assertThat(result1, is(macAddress)); } | /**
* Tests sourceMac() getter method.
*/ | Tests sourceMac() getter method | testSourceMac | {
"repo_name": "harikrushna-Huawei/hackathon",
"path": "protocols/isis/isisio/src/test/java/org/onosproject/isis/io/isispacket/IsisHeaderTest.java",
"license": "apache-2.0",
"size": 8318
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 1,334,097 |
@SkipForRepeat({ EE8_FEATURES })
@Test
public void CxfSAMLWSSTemplatesTests_Saml20TokenOverSSL_httpFromClientEE7Only() throws Exception {
WebClient webClient = SAMLCommonTestHelpers.getWebClient();
SAMLTestSettings updatedTestSettings = testSettings.copyTestSettings();
updatedTest... | @SkipForRepeat({ EE8_FEATURES }) void function() throws Exception { WebClient webClient = SAMLCommonTestHelpers.getWebClient(); SAMLTestSettings updatedTestSettings = testSettings.copyTestSettings(); updatedTestSettings.updatePartnerInSettings("sp1", true); updatedTestSettings.setSpTargetApp(testSAMLServer.getHttpsStri... | /**
* TestDescription:
* Client matches server side policy (transport enabled), but
* the client doesn't use https
* Test should fail to accessing the server side service.
*
*/ | TestDescription: Client matches server side policy (transport enabled), but the client doesn't use https Test should fail to accessing the server side service | CxfSAMLWSSTemplatesTests_Saml20TokenOverSSL_httpFromClientEE7Only | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.wssecurity_fat.wsscxf.saml.1/fat/src/com/ibm/ws/wssecurity/fat/cxf/samltoken1/common/CxfSAMLWSSTemplatesTests.java",
"license": "epl-1.0",
"size": 27423
} | [
"com.gargoylesoftware.htmlunit.WebClient",
"com.ibm.ws.security.saml20.fat.commonTest.SAMLCommonTestHelpers",
"com.ibm.ws.security.saml20.fat.commonTest.SAMLConstants",
"com.ibm.ws.security.saml20.fat.commonTest.SAMLTestSettings"
] | import com.gargoylesoftware.htmlunit.WebClient; import com.ibm.ws.security.saml20.fat.commonTest.SAMLCommonTestHelpers; import com.ibm.ws.security.saml20.fat.commonTest.SAMLConstants; import com.ibm.ws.security.saml20.fat.commonTest.SAMLTestSettings; | import com.gargoylesoftware.htmlunit.*; import com.ibm.ws.security.saml20.fat.*; | [
"com.gargoylesoftware.htmlunit",
"com.ibm.ws"
] | com.gargoylesoftware.htmlunit; com.ibm.ws; | 1,873,703 |
public VirtualNetworkGatewayIPConfiguration withSubnet(SubResource subnet) {
this.subnet = subnet;
return this;
} | VirtualNetworkGatewayIPConfiguration function(SubResource subnet) { this.subnet = subnet; return this; } | /**
* Set the reference to the subnet resource.
*
* @param subnet the subnet value to set
* @return the VirtualNetworkGatewayIPConfiguration object itself.
*/ | Set the reference to the subnet resource | withSubnet | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/VirtualNetworkGatewayIPConfiguration.java",
"license": "mit",
"size": 5272
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,159,467 |
@Test
public void testPrivateField4() {
final Object result = JField.jStaticFieldX(XLString.of("com.mcleodmoores.xl4j.v1.javacode.testutils.TestObject"),
XLString.of("PRIVATE_FIELD"));
assertSame(result, XLError.Null);
} | void function() { final Object result = JField.jStaticFieldX(XLString.of(STR), XLString.of(STR)); assertSame(result, XLError.Null); } | /**
* Tests the case where the field is not visible.
*/ | Tests the case where the field is not visible | testPrivateField4 | {
"repo_name": "McLeodMoores/xl4j",
"path": "xll-java/src/test/java/com/mcleodmoores/xl4j/v1/javacode/JFieldTest.java",
"license": "gpl-3.0",
"size": 5671
} | [
"com.mcleodmoores.xl4j.v1.api.values.XLError",
"com.mcleodmoores.xl4j.v1.api.values.XLString",
"org.testng.Assert"
] | import com.mcleodmoores.xl4j.v1.api.values.XLError; import com.mcleodmoores.xl4j.v1.api.values.XLString; import org.testng.Assert; | import com.mcleodmoores.xl4j.v1.api.values.*; import org.testng.*; | [
"com.mcleodmoores.xl4j",
"org.testng"
] | com.mcleodmoores.xl4j; org.testng; | 876,691 |
@Post
public void upload(Representation entity)
{
if (entity != null)
{
if (MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(),
true))
{
// The Apache FileUpload project parses HTTP requests which
... | void function(Representation entity) { if (entity != null) { if (MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(), true)) { DiskFileItemFactory factory = new DiskFileItemFactory(); factory.setSizeThreshold(1000240); RestletFileUpload upload = new RestletFileUpload(factory); List<FileItem> items; try { items =... | /**
* Handle POST requests for file upload
* @param entity entity body information (multi-part form encoded)
*/ | Handle POST requests for file upload | upload | {
"repo_name": "SampleSizeShop/FileSvc",
"path": "src/edu/cudenver/bios/filesvc/resource/UploadResource.java",
"license": "gpl-2.0",
"size": 5565
} | [
"java.util.Iterator",
"java.util.List",
"org.apache.commons.fileupload.FileItem",
"org.apache.commons.fileupload.disk.DiskFileItemFactory",
"org.restlet.data.MediaType",
"org.restlet.data.Status",
"org.restlet.ext.fileupload.RestletFileUpload",
"org.restlet.representation.Representation",
"org.restl... | import java.util.Iterator; import java.util.List; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.restlet.data.MediaType; import org.restlet.data.Status; import org.restlet.ext.fileupload.RestletFileUpload; import org.restlet.representation.Repres... | import java.util.*; import org.apache.commons.fileupload.*; import org.apache.commons.fileupload.disk.*; import org.restlet.data.*; import org.restlet.ext.fileupload.*; import org.restlet.representation.*; | [
"java.util",
"org.apache.commons",
"org.restlet.data",
"org.restlet.ext",
"org.restlet.representation"
] | java.util; org.apache.commons; org.restlet.data; org.restlet.ext; org.restlet.representation; | 2,650,403 |
public ServiceFuture<VirtualHubInner> updateTagsAsync(String resourceGroupName, String virtualHubName, Map<String, String> tags, final ServiceCallback<VirtualHubInner> serviceCallback) {
return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags), serviceCal... | ServiceFuture<VirtualHubInner> function(String resourceGroupName, String virtualHubName, Map<String, String> tags, final ServiceCallback<VirtualHubInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags), serviceCallback); } | /**
* Updates VirtualHub tags.
*
* @param resourceGroupName The resource group name of the VirtualHub.
* @param virtualHubName The name of the VirtualHub.
* @param tags Resource tags.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @thro... | Updates VirtualHub tags | updateTagsAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/VirtualHubsInner.java",
"license": "mit",
"size": 72294
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.Map"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 332,715 |
QDevelopmentKitTestFactory getDevelopmentKitTestFactory();
interface Literals {
EClass ASSERTER = eINSTANCE.getAsserter();
EClass ASSERTION_FAILED = eINSTANCE.getAssertionFailed();
EClass ASSERTION_RESULT = eINSTANCE.getAssertionResult();
EAttribute ASSERTION_RESULT__MESSAGE = eINSTANCE.ge... | QDevelopmentKitTestFactory getDevelopmentKitTestFactory(); interface Literals { EClass ASSERTER = eINSTANCE.getAsserter(); EClass ASSERTION_FAILED = eINSTANCE.getAssertionFailed(); EClass ASSERTION_RESULT = eINSTANCE.getAssertionResult(); EAttribute ASSERTION_RESULT__MESSAGE = eINSTANCE.getAssertionResult_Message(); EA... | /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getDevelopmentKitTestFactory | {
"repo_name": "smeup/asup",
"path": "org.smeup.sys.dk.test/src/org/smeup/sys/dk/test/QDevelopmentKitTestPackage.java",
"license": "epl-1.0",
"size": 40251
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EEnum",
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 513,938 |
EntryWriter put(CharSequence k, Object v) throws IOException; | EntryWriter put(CharSequence k, Object v) throws IOException; | /**
* Writes a key value into the map
*
* @param k The key
* @param v The value can be any supported object
*/ | Writes a key value into the map | put | {
"repo_name": "apache/solr",
"path": "solr/solrj/src/java/org/apache/solr/common/MapWriter.java",
"license": "apache-2.0",
"size": 5412
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 837,196 |
@Override
protected void writable(final SelectionKey key) {
IOSession session = getSession(key);
try {
this.eventDispatch.outputReady(session);
} catch (CancelledKeyException ex) {
queueClosedSession(session);
key.attach(null);
} catch ... | void function(final SelectionKey key) { IOSession session = getSession(key); try { this.eventDispatch.outputReady(session); } catch (CancelledKeyException ex) { queueClosedSession(session); key.attach(null); } catch (RuntimeException ex) { handleRuntimeException(ex); } } /** * Verifies whether any of the sessions assoc... | /**
* Processes {@link SelectionKey#OP_WRITE} event on the given selection key.
* This method dispatches the event notification to the
* {@link IOEventDispatch#outputReady(IOSession)} method.
*/ | Processes <code>SelectionKey#OP_WRITE</code> event on the given selection key. This method dispatches the event notification to the <code>IOEventDispatch#outputReady(IOSession)</code> method | writable | {
"repo_name": "0x90sled/droidtowers",
"path": "main/source/org/apach3/http/impl/nio/reactor/BaseIOReactor.java",
"license": "mit",
"size": 10181
} | [
"java.nio.channels.CancelledKeyException",
"java.nio.channels.SelectionKey",
"org.apach3.http.nio.reactor.IOSession"
] | import java.nio.channels.CancelledKeyException; import java.nio.channels.SelectionKey; import org.apach3.http.nio.reactor.IOSession; | import java.nio.channels.*; import org.apach3.http.nio.reactor.*; | [
"java.nio",
"org.apach3.http"
] | java.nio; org.apach3.http; | 1,830,368 |
public static int hashCodeByteBuffer(List<ByteBuffer> list) {
int hash = 1;
for (ByteBuffer bytes : list) {
hash = 31 * hash + hashCodeByteBuffer(bytes);
}
return hash;
}
private static final int DEFAULT_BUFFER_SIZE = 4096; | static int function(List<ByteBuffer> list) { int hash = 1; for (ByteBuffer bytes : list) { hash = 31 * hash + hashCodeByteBuffer(bytes); } return hash; } private static final int DEFAULT_BUFFER_SIZE = 4096; | /**
* Helper method for implementing {@link Message#hashCode()} for bytes
* field.
*/ | Helper method for implementing <code>Message#hashCode()</code> for bytes field | hashCodeByteBuffer | {
"repo_name": "danakj/chromium",
"path": "third_party/protobuf/java/core/src/main/java/com/google/protobuf/Internal.java",
"license": "bsd-3-clause",
"size": 23877
} | [
"java.nio.ByteBuffer",
"java.util.List"
] | import java.nio.ByteBuffer; import java.util.List; | import java.nio.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 39,143 |
public DuplicateOnWriteSimpleCollection<E> add(E element) {
Object[] newElements = Arrays.copyOf(elements, elements.length + 1);
newElements[elements.length] = element;
return new DuplicateOnWriteSimpleCollection<>(newElements);
} | DuplicateOnWriteSimpleCollection<E> function(E element) { Object[] newElements = Arrays.copyOf(elements, elements.length + 1); newElements[elements.length] = element; return new DuplicateOnWriteSimpleCollection<>(newElements); } | /**
* Add a new element to a new collection
* @param element the element to add
* @return the modified collection
*/ | Add a new element to a new collection | add | {
"repo_name": "mattunderscorechampion/tree-root",
"path": "simple-collections/src/main/java/com/mattunderscore/simple/collections/DuplicateOnWriteSimpleCollection.java",
"license": "bsd-3-clause",
"size": 5735
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,813,300 |
protected boolean isSameParents(Node node1, Node node2) {
return node1.getParent()==node2.getParent();
}
private static final Random r = new Random(); | boolean function(Node node1, Node node2) { return node1.getParent()==node2.getParent(); } private static final Random r = new Random(); | /**
* Compare the parents of each node for equality
*
* <p>To be overridden in subclasses for specific NetworkTopology
* implementations, as alternative to overriding the full
* {@link #isOnSameRack(Node, Node)} method.
*
* @param node1 the first node to compare
* @param node2 the second nod... | Compare the parents of each node for equality To be overridden in subclasses for specific NetworkTopology implementations, as alternative to overriding the full <code>#isOnSameRack(Node, Node)</code> method | isSameParents | {
"repo_name": "Microsoft-CISL/hadoop-prototype",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java",
"license": "apache-2.0",
"size": 30633
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 1,623,765 |
public void reenqueue(ProducerBatch batch, long now) {
batch.reenqueued(now);
Deque<ProducerBatch> deque = getOrCreateDeque(batch.topicPartition);
synchronized (deque) {
deque.addFirst(batch);
}
} | void function(ProducerBatch batch, long now) { batch.reenqueued(now); Deque<ProducerBatch> deque = getOrCreateDeque(batch.topicPartition); synchronized (deque) { deque.addFirst(batch); } } | /**
* Re-enqueue the given record batch in the accumulator to retry
*/ | Re-enqueue the given record batch in the accumulator to retry | reenqueue | {
"repo_name": "zzwlstarby/mykafka",
"path": "clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java",
"license": "apache-2.0",
"size": 34740
} | [
"java.util.Deque"
] | import java.util.Deque; | import java.util.*; | [
"java.util"
] | java.util; | 1,248,169 |
private void manageControls(Set<Action> pressedKeys) {
if (shootingCounter > 0) {
shootingCounter -= 1;
}
for (Action code : pressedKeys) {
if (code == Action.left) {
this.rotateLeft();
} else if (code == Action.right) {
this.rotateRight();
}
if (code == Action.up) {
this.moveUp();... | void function(Set<Action> pressedKeys) { if (shootingCounter > 0) { shootingCounter -= 1; } for (Action code : pressedKeys) { if (code == Action.left) { this.rotateLeft(); } else if (code == Action.right) { this.rotateRight(); } if (code == Action.up) { this.moveUp(); } else if (code == Action.down) { this.moveDown(); ... | /**
* Determine the movement action to be done based on a list of pressed keycodes.
*/ | Determine the movement action to be done based on a list of pressed keycodes | manageControls | {
"repo_name": "hkamran/JavaAsteroidGame",
"path": "src/main/java/com/hkamran/asteroid/game/objects/Player.java",
"license": "gpl-2.0",
"size": 4044
} | [
"com.hkamran.asteroid.game.controls.Action",
"java.util.Set"
] | import com.hkamran.asteroid.game.controls.Action; import java.util.Set; | import com.hkamran.asteroid.game.controls.*; import java.util.*; | [
"com.hkamran.asteroid",
"java.util"
] | com.hkamran.asteroid; java.util; | 630,992 |
@Column(name = "ldap_values", length = 4000)
public String getLdapValues()
{
return ldapValues;
} | @Column(name = STR, length = 4000) String function() { return ldapValues; } | /**
* LDAP values as key-value-pairs, e. g. gidNumber=1000,uidNumber=1001,homeDirectory="/home/kai",shell="/bin/bash". For handling of string
* values see {@link org.apache.commons.csv.writer.CSVWriter}. This field is handled by the ldap package and has no further effect in
* ProjectForge's core package.
* ... | LDAP values as key-value-pairs, e. g. gidNumber=1000,uidNumber=1001,homeDirectory="/home/kai",shell="/bin/bash". For handling of string values see <code>org.apache.commons.csv.writer.CSVWriter</code>. This field is handled by the ldap package and has no further effect in ProjectForge's core package | getLdapValues | {
"repo_name": "micromata/projectforge-webapp",
"path": "src/main/java/org/projectforge/user/PFUserDO.java",
"license": "gpl-3.0",
"size": 23178
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,144,088 |
protected void transferForeignAttributes(AreaTreeObject targetArea) {
Map<QName, String> atts = fobj.getForeignAttributes();
targetArea.setForeignAttributes(atts);
} | void function(AreaTreeObject targetArea) { Map<QName, String> atts = fobj.getForeignAttributes(); targetArea.setForeignAttributes(atts); } | /**
* Transfers foreign attributes from the formatting object to the area.
* @param targetArea the area to set the attributes on
*/ | Transfers foreign attributes from the formatting object to the area | transferForeignAttributes | {
"repo_name": "Distrotech/fop",
"path": "src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java",
"license": "apache-2.0",
"size": 15202
} | [
"java.util.Map",
"org.apache.fop.area.AreaTreeObject",
"org.apache.xmlgraphics.util.QName"
] | import java.util.Map; import org.apache.fop.area.AreaTreeObject; import org.apache.xmlgraphics.util.QName; | import java.util.*; import org.apache.fop.area.*; import org.apache.xmlgraphics.util.*; | [
"java.util",
"org.apache.fop",
"org.apache.xmlgraphics"
] | java.util; org.apache.fop; org.apache.xmlgraphics; | 2,831,998 |
protected boolean sendStartupMessage(StartupOperation op, boolean cancelOnTimeout)
throws InterruptedException
{
if (Thread.interrupted()) throw new InterruptedException();
this.receivedStartupResponse = false;
boolean ok = false;
// Be sure to add ourself to the equivalencies list!
Set equ... | boolean function(StartupOperation op, boolean cancelOnTimeout) throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); this.receivedStartupResponse = false; boolean ok = false; Set equivs = StartupMessage.getMyAddresses(this); if (equivs == null equivs.size() == 0) { equivs = new HashS... | /**
* Sends a startup message and waits for a response.
* Returns true if response received; false if it timed out or there are no peers.
*/ | Sends a startup message and waits for a response. Returns true if response received; false if it timed out or there are no peers | sendStartupMessage | {
"repo_name": "fengshao0907/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java",
"license": "apache-2.0",
"size": 176212
} | [
"com.gemstone.gemfire.SystemConnectException",
"com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember",
"com.gemstone.gemfire.internal.SocketCreator",
"com.gemstone.gemfire.internal.i18n.LocalizedStrings",
"com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage",
"java.net.U... | import com.gemstone.gemfire.SystemConnectException; import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember; import com.gemstone.gemfire.internal.SocketCreator; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage; ... | import com.gemstone.gemfire.*; import com.gemstone.gemfire.distributed.internal.membership.*; import com.gemstone.gemfire.internal.*; import com.gemstone.gemfire.internal.i18n.*; import com.gemstone.gemfire.internal.logging.log4j.*; import java.net.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.net",
"java.util"
] | com.gemstone.gemfire; java.net; java.util; | 2,508,014 |
@Test
public void stopForegroundDoesntRemoveNotificationUnlessAsked() {
Notification n = notBuilder.build();
service.startForeground(21, n);
service.stopForeground(false);
assertThat(nm.getNotification(21)).isSameAs(n);
} | void function() { Notification n = notBuilder.build(); service.startForeground(21, n); service.stopForeground(false); assertThat(nm.getNotification(21)).isSameAs(n); } | /**
* According to spec, if the foreground notification is not removed earlier,
* then it will be removed when the service is destroyed.
*/ | According to spec, if the foreground notification is not removed earlier, then it will be removed when the service is destroyed | stopForegroundDoesntRemoveNotificationUnlessAsked | {
"repo_name": "gruszczy/robolectric",
"path": "robolectric/src/test/java/org/robolectric/shadows/ShadowServiceTest.java",
"license": "mit",
"size": 4453
} | [
"android.app.Notification",
"org.assertj.core.api.Assertions"
] | import android.app.Notification; import org.assertj.core.api.Assertions; | import android.app.*; import org.assertj.core.api.*; | [
"android.app",
"org.assertj.core"
] | android.app; org.assertj.core; | 1,690,931 |
public void testQueryWithMultipleResultsFromCode() throws Exception {
if (supportsStoredProcedures() && getPlatform().isMySQL()) {
// SQL result set mapping for employee.
SQLResultSetMapping employeeResultSetMapping = new SQLResultSetMapping("EmployeeResultSetMapping");
e... | void function() throws Exception { if (supportsStoredProcedures() && getPlatform().isMySQL()) { SQLResultSetMapping employeeResultSetMapping = new SQLResultSetMapping(STR); employeeResultSetMapping.addResult(new EntityResult(Employee.class)); SQLResultSetMapping addressResultSetMapping = new SQLResultSetMapping(STR); a... | /**
* Test multiple result sets by setting the SQL results set mapping from code.
*/ | Test multiple result sets by setting the SQL results set mapping from code | testQueryWithMultipleResultsFromCode | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa21/advanced/StoredProcedureQueryTestSuite.java",
"license": "epl-1.0",
"size": 52951
} | [
"java.util.List",
"org.eclipse.persistence.queries.ColumnResult",
"org.eclipse.persistence.queries.ConstructorResult",
"org.eclipse.persistence.queries.EntityResult",
"org.eclipse.persistence.queries.FieldResult",
"org.eclipse.persistence.queries.ResultSetMappingQuery",
"org.eclipse.persistence.queries.... | import java.util.List; import org.eclipse.persistence.queries.ColumnResult; import org.eclipse.persistence.queries.ConstructorResult; import org.eclipse.persistence.queries.EntityResult; import org.eclipse.persistence.queries.FieldResult; import org.eclipse.persistence.queries.ResultSetMappingQuery; import org.eclipse.... | import java.util.*; import org.eclipse.persistence.queries.*; import org.eclipse.persistence.testing.models.jpa21.advanced.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 34,459 |
public void showBusStops(List<BusStopViewModel> busStops,
long delayMarkerVisibilityMillis,
boolean animateCamera) {
if (isAdded()) {
clearMarkers();
// Add the bus stops as markers to the map. We're given the bounding box of... | void function(List<BusStopViewModel> busStops, long delayMarkerVisibilityMillis, boolean animateCamera) { if (isAdded()) { clearMarkers(); LatLngBounds bounds = busStopInfoWindowAdapter.showBusStopsAsMarkers(googleMap, busStops, delayMarkerVisibilityMillis); if (animateCamera) { if (searchArea != null) { bounds = getLa... | /**
* Show the list of bus stops as markers on the map.
*
* @param busStops The list of bus stops to show as markers.
* @param delayMarkerVisibilityMillis Number of milliseconds to delay when showing a marker as
* visible.
* @param anim... | Show the list of bus stops as markers on the map | showBusStops | {
"repo_name": "jvivanco28/PegCityTransit",
"path": "app/src/main/java/jessevivanco/com/pegcitytransit/ui/fragments/TransitMapFragment.java",
"license": "mit",
"size": 19771
} | [
"com.google.android.gms.maps.model.LatLngBounds",
"java.util.List"
] | import com.google.android.gms.maps.model.LatLngBounds; import java.util.List; | import com.google.android.gms.maps.model.*; import java.util.*; | [
"com.google.android",
"java.util"
] | com.google.android; java.util; | 1,934,831 |
interface WithDefaultMessageTTL {
Update withDefaultMessageTTL(Duration ttl);
} | interface WithDefaultMessageTTL { Update withDefaultMessageTTL(Duration ttl); } | /**
* Specifies the duration after which the message expires.
*
* @param ttl time to live duration
* @return the next stage of subscription update
*/ | Specifies the duration after which the message expires | withDefaultMessageTTL | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/models/ServiceBusSubscription.java",
"license": "mit",
"size": 17684
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,527,148 |
public void loadImageDrawable(Drawable drawable) {
resetImageURL(null);
super.setImageDrawable(drawable);
currentDrawType = null;
currentURL = null;
}
| void function(Drawable drawable) { resetImageURL(null); super.setImageDrawable(drawable); currentDrawType = null; currentURL = null; } | /**
* Load a Drawable as an image in the View, similar to {@link ImageView#setImageDrawable(Drawable) setImageDrawable(Drawable)} but canceling the previous network load if there was any
*
* @param drawable The drawable to set
*/ | Load a Drawable as an image in the View, similar to <code>ImageView#setImageDrawable(Drawable) setImageDrawable(Drawable)</code> but canceling the previous network load if there was any | loadImageDrawable | {
"repo_name": "levelup/PictureCache",
"path": "library/src/com/levelup/picturecache/widget/LoadedImageView.java",
"license": "apache-2.0",
"size": 15630
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 1,562,032 |
public void reAlloc() {
final long newAllocationSize = allocationSizeInBytes * 2L;
if (newAllocationSize > MAX_ALLOCATION_SIZE) {
throw new OversizedAllocationException("Requested amount of memory is more than max allowed allocation size");
}
final int curSize = (int)newAllocationSize;
fina... | void function() { final long newAllocationSize = allocationSizeInBytes * 2L; if (newAllocationSize > MAX_ALLOCATION_SIZE) { throw new OversizedAllocationException(STR); } final int curSize = (int)newAllocationSize; final ArrowBuf newBuf = allocator.buffer(curSize); newBuf.setZero(0, newBuf.capacity()); newBuf.setBytes(... | /**
* Allocate new buffer with double capacity, and copy data into the new buffer. Replace vector's buffer with new buffer, and release old one
*/ | Allocate new buffer with double capacity, and copy data into the new buffer. Replace vector's buffer with new buffer, and release old one | reAlloc | {
"repo_name": "jeffknupp/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/BitVector.java",
"license": "apache-2.0",
"size": 18070
} | [
"io.netty.buffer.ArrowBuf",
"org.apache.arrow.vector.util.OversizedAllocationException"
] | import io.netty.buffer.ArrowBuf; import org.apache.arrow.vector.util.OversizedAllocationException; | import io.netty.buffer.*; import org.apache.arrow.vector.util.*; | [
"io.netty.buffer",
"org.apache.arrow"
] | io.netty.buffer; org.apache.arrow; | 1,974,217 |
public Collection<SemaphoreNeighborInjectMatch> getAllMatches(final Route pRoute, final Semaphore pSemaphore) {
return rawGetAllMatches(new Object[]{pRoute, pSemaphore});
} | Collection<SemaphoreNeighborInjectMatch> function(final Route pRoute, final Semaphore pSemaphore) { return rawGetAllMatches(new Object[]{pRoute, pSemaphore}); } | /**
* Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
* @param pRoute the fixed value of pattern parameter route, or null if not bound.
* @param pSemaphore the fixed value of pattern parameter semaphore, or null if not bound.
* @return matches represe... | Returns the set of all matches of the pattern that conform to the given fixed values of some parameters | getAllMatches | {
"repo_name": "FTSRG/trainbenchmark",
"path": "trainbenchmark-tool-viatra-patterns/src-gen/hu/bme/mit/trainbenchmark/benchmark/viatra/SemaphoreNeighborInjectMatcher.java",
"license": "epl-1.0",
"size": 12391
} | [
"hu.bme.mit.trainbenchmark.benchmark.viatra.SemaphoreNeighborInjectMatch",
"hu.bme.mit.trainbenchmark.railway.Route",
"hu.bme.mit.trainbenchmark.railway.Semaphore",
"java.util.Collection"
] | import hu.bme.mit.trainbenchmark.benchmark.viatra.SemaphoreNeighborInjectMatch; import hu.bme.mit.trainbenchmark.railway.Route; import hu.bme.mit.trainbenchmark.railway.Semaphore; import java.util.Collection; | import hu.bme.mit.trainbenchmark.benchmark.viatra.*; import hu.bme.mit.trainbenchmark.railway.*; import java.util.*; | [
"hu.bme.mit",
"java.util"
] | hu.bme.mit; java.util; | 306,253 |
public SelectableAjaxBehavior setTolerance(ToleranceEnum tolerance) {
selectableBehavior.setTolerance(tolerance);
return this;
}
| SelectableAjaxBehavior function(ToleranceEnum tolerance) { selectableBehavior.setTolerance(tolerance); return this; } | /** Set's the tolerance
* <ul>
* <li><b>fit</b>: draggable overlaps the droppable entirely</li>
* <li><b>touch</b>: draggable overlaps the droppable any amount</li>
* </ul>
* @param tolerance
* @return instance of the current behavior
*/ | Set's the tolerance fit: draggable overlaps the droppable entirely touch: draggable overlaps the droppable any amount | setTolerance | {
"repo_name": "magomi/wiquery",
"path": "src/main/java/org/odlabs/wiquery/ui/selectable/SelectableAjaxBehavior.java",
"license": "mit",
"size": 12432
} | [
"org.odlabs.wiquery.ui.selectable.SelectableBehavior"
] | import org.odlabs.wiquery.ui.selectable.SelectableBehavior; | import org.odlabs.wiquery.ui.selectable.*; | [
"org.odlabs.wiquery"
] | org.odlabs.wiquery; | 107,032 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.