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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private boolean matchGroupInstruction(JsonNode instructionJson,
Description description) {
final String jsonType = instructionJson.get("type").textValue();
GroupInstruction instructionToMatch = (GroupInstruction) instruction;
if (!instructionToMatch.... | boolean function(JsonNode instructionJson, Description description) { final String jsonType = instructionJson.get("type").textValue(); GroupInstruction instructionToMatch = (GroupInstruction) instruction; if (!instructionToMatch.type().name().equals(jsonType)) { description.appendText(STR + jsonType); return false; } f... | /**
* Matches the contents of a group instruction.
*
* @param instructionJson JSON instruction to match
* @param description Description object used for recording errors
* @return true if contents match, false otherwise
*/ | Matches the contents of a group instruction | matchGroupInstruction | {
"repo_name": "opennetworkinglab/onos",
"path": "core/common/src/test/java/org/onosproject/codec/impl/InstructionJsonMatcher.java",
"license": "apache-2.0",
"size": 27950
} | [
"com.fasterxml.jackson.databind.JsonNode",
"org.hamcrest.Description",
"org.onosproject.net.flow.instructions.Instructions"
] | import com.fasterxml.jackson.databind.JsonNode; import org.hamcrest.Description; import org.onosproject.net.flow.instructions.Instructions; | import com.fasterxml.jackson.databind.*; import org.hamcrest.*; import org.onosproject.net.flow.instructions.*; | [
"com.fasterxml.jackson",
"org.hamcrest",
"org.onosproject.net"
] | com.fasterxml.jackson; org.hamcrest; org.onosproject.net; | 1,553,397 |
public static void warn(String message, BooleanCallback callback) {
say(SmartGwtMessages.INSTANCE.dialog_WarnTitle(), message, callback);
} | static void function(String message, BooleanCallback callback) { say(SmartGwtMessages.INSTANCE.dialog_WarnTitle(), message, callback); } | /**
* Show a modal dialog with a message, possibly an icon, and "OK" button.
* <p/>
* The callback will receive boolean true for an OK button click, or null if the Dialog is dismissed via the close button.
*
* @param message the message
* @param callback Optional Callback to fire when the... | Show a modal dialog with a message, possibly an icon, and "OK" button. The callback will receive boolean true for an OK button click, or null if the Dialog is dismissed via the close button | warn | {
"repo_name": "will-gilbert/SmartGWT-Mobile",
"path": "mobile/src/main/java/com/smartgwt/mobile/client/util/SC.java",
"license": "unlicense",
"size": 14076
} | [
"com.smartgwt.mobile.client.i18n.SmartGwtMessages"
] | import com.smartgwt.mobile.client.i18n.SmartGwtMessages; | import com.smartgwt.mobile.client.i18n.*; | [
"com.smartgwt.mobile"
] | com.smartgwt.mobile; | 1,254,985 |
protected void defineGlobalWrapperClass(Scriptable global) {
try {
ScriptableObject.defineClass(global, WindowWrapper.class);
} catch (Exception ex) {
// cannot happen
}
} | void function(Scriptable global) { try { ScriptableObject.defineClass(global, WindowWrapper.class); } catch (Exception ex) { } } | /**
* Defines the class for the global object.
*/ | Defines the class for the global object | defineGlobalWrapperClass | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/script/rhino/RhinoInterpreter.java",
"license": "gpl-3.0",
"size": 19691
} | [
"org.mozilla.javascript.Scriptable",
"org.mozilla.javascript.ScriptableObject"
] | import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 582,965 |
public byte[] nextDependencyAsBytes(final int dependencyId) {
final VoltTable vt = m_dependencyTracker.nextDependency(dependencyId);
if (vt != null) {
final byte[] bytes = vt.getTableDataReference().array();
return bytes;
}
else {
return null;
... | byte[] function(final int dependencyId) { final VoltTable vt = m_dependencyTracker.nextDependency(dependencyId); if (vt != null) { final byte[] bytes = vt.getTableDataReference().array(); return bytes; } else { return null; } } | /**
* Called from the ExecutionEngine to request serialized dependencies.
*/ | Called from the ExecutionEngine to request serialized dependencies | nextDependencyAsBytes | {
"repo_name": "wwgong/CVoltDB",
"path": "src/frontend/org/voltdb/jni/ExecutionEngine.java",
"license": "gpl-3.0",
"size": 27290
} | [
"org.voltdb.VoltTable"
] | import org.voltdb.VoltTable; | import org.voltdb.*; | [
"org.voltdb"
] | org.voltdb; | 2,759,698 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); PrintWriter out = response.getWriter(); out.println(STR); out.println(STR); out.println(STR); out.println(STR); out.println(STR); out.println(STR + request.getContextPath() + "</h... | /**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "ftomassetti/JavaIncrementalParser",
"path": "src/test/resources/javaee7-samples/jaxrs/link/src/main/java/org/sample/link/TestServlet.java",
"license": "apache-2.0",
"size": 5380
} | [
"java.io.IOException",
"java.io.PrintWriter",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.ws.rs.client.Client",
"javax.ws.rs.client.ClientBuilder",
"javax.ws.rs.client.WebTarget"
] | import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.WebTarget; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import javax.ws.rs.client.*; | [
"java.io",
"javax.servlet",
"javax.ws"
] | java.io; javax.servlet; javax.ws; | 674,108 |
public int idDropped(int par1, Random par2Random, int par3)
{
return Item.silk.itemID;
} | int function(int par1, Random par2Random, int par3) { return Item.silk.itemID; } | /**
* Returns the ID of the items to drop on destruction.
*/ | Returns the ID of the items to drop on destruction | idDropped | {
"repo_name": "Neil5043/Minetweak",
"path": "src/main/java/net/minecraft/src/BlockWeb.java",
"license": "lgpl-3.0",
"size": 1857
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 2,229,737 |
@Override
public synchronized void updateScanIteratorOption(String iteratorName, String key, String value) {
ArgumentChecker.notNull(iteratorName, key, value);
if (serverSideIteratorOptions.size() == 0)
serverSideIteratorOptions = new HashMap<String,Map<String,String>>();
Map<String,String> o... | synchronized void function(String iteratorName, String key, String value) { ArgumentChecker.notNull(iteratorName, key, value); if (serverSideIteratorOptions.size() == 0) serverSideIteratorOptions = new HashMap<String,Map<String,String>>(); Map<String,String> opts = serverSideIteratorOptions.get(iteratorName); if (opts ... | /**
* Override any existing options on the given named iterator
*/ | Override any existing options on the given named iterator | updateScanIteratorOption | {
"repo_name": "wjsl/jaredcumulo",
"path": "core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java",
"license": "apache-2.0",
"size": 6891
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.accumulo.core.util.ArgumentChecker"
] | import java.util.HashMap; import java.util.Map; import org.apache.accumulo.core.util.ArgumentChecker; | import java.util.*; import org.apache.accumulo.core.util.*; | [
"java.util",
"org.apache.accumulo"
] | java.util; org.apache.accumulo; | 2,285,403 |
boolean assertContainsValue(ExecutionResult result, String cmdExpectedValue, String stdoutMessage)
throws Exception {
String message = stdoutMessage.trim();
// create message
String assertionHeader = messageProvider.getMessage("do.execute_assertion_header");
Object[] args = { message, cmdExpectedVa... | boolean assertContainsValue(ExecutionResult result, String cmdExpectedValue, String stdoutMessage) throws Exception { String message = stdoutMessage.trim(); String assertionHeader = messageProvider.getMessage(STR); Object[] args = { message, cmdExpectedValue }; String assertionDescription = messageProvider.getMessage(S... | /**
* Assert remote command output versus expected value.
*/ | Assert remote command output versus expected value | assertContainsValue | {
"repo_name": "athrane/pineapple",
"path": "plugins/pineapple-ssh-plugin/src/main/java/com/alpha/pineapple/plugin/ssh/operation/DefaultOperation.java",
"license": "gpl-3.0",
"size": 16158
} | [
"com.alpha.pineapple.execution.ExecutionResult"
] | import com.alpha.pineapple.execution.ExecutionResult; | import com.alpha.pineapple.execution.*; | [
"com.alpha.pineapple"
] | com.alpha.pineapple; | 847,372 |
@Override
protected Optional<String> onLoadInBackground(String... params) {
return fetchCurriculum(params[0]);
} | Optional<String> function(String... params) { return fetchCurriculum(params[0]); } | /**
* Fetch information in a background task and show progress dialog in meantime
*/ | Fetch information in a background task and show progress dialog in meantime | onLoadInBackground | {
"repo_name": "kordianbruck/TumCampusApp",
"path": "app/src/main/java/de/tum/in/tumcampusapp/activities/CurriculaDetailsActivity.java",
"license": "gpl-2.0",
"size": 3522
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,138,529 |
public DateHistogramValuesSourceBuilder timeZone(DateTimeZone timeZone) {
if (timeZone == null) {
throw new IllegalArgumentException("[timeZone] must not be null: [" + name + "]");
}
this.timeZone = timeZone;
return this;
} | DateHistogramValuesSourceBuilder function(DateTimeZone timeZone) { if (timeZone == null) { throw new IllegalArgumentException(STR + name + "]"); } this.timeZone = timeZone; return this; } | /**
* Sets the time zone to use for this aggregation
*/ | Sets the time zone to use for this aggregation | timeZone | {
"repo_name": "fred84/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java",
"license": "apache-2.0",
"size": 9881
} | [
"org.joda.time.DateTimeZone"
] | import org.joda.time.DateTimeZone; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 793,180 |
public void commitChanges() {
if ( manager != null && trans != null ) {
try {
manager.commitTransaction( trans );
} catch ( GeneralSecurityException e ) {
e.printStackTrace();
}
}
if ( ctx != null ) {
tr... | void function() { if ( manager != null && trans != null ) { try { manager.commitTransaction( trans ); } catch ( GeneralSecurityException e ) { e.printStackTrace(); } } if ( ctx != null ) { try { ctx.close(); } catch ( NamingException e ) { e.printStackTrace(); } } } | /**
* Ends the synchronization process and commits all changes.
*/ | Ends the synchronization process and commits all changes | commitChanges | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/tools/security/ActiveDirectoryImporter.java",
"license": "lgpl-2.1",
"size": 26045
} | [
"javax.naming.NamingException",
"org.deegree.security.GeneralSecurityException"
] | import javax.naming.NamingException; import org.deegree.security.GeneralSecurityException; | import javax.naming.*; import org.deegree.security.*; | [
"javax.naming",
"org.deegree.security"
] | javax.naming; org.deegree.security; | 2,092,754 |
public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {
inactivityTimer.onActivity();
lastResult = rawResult;
ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
boolean fromLiveScan = barcode != null;
if (fromLiveScan) {
historyMan... | void function(Result rawResult, Bitmap barcode, float scaleFactor) { inactivityTimer.onActivity(); lastResult = rawResult; ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult); boolean fromLiveScan = barcode != null; if (fromLiveScan) { historyManager.addHistoryItem(rawResult, resultHan... | /**
* A valid barcode has been found, so give an indication of success and show the results.
*
* @param rawResult The contents of the barcode.
* @param scaleFactor amount by which thumbnail was scaled
* @param barcode A greyscale bitmap of the camera data which was decoded.
*/ | A valid barcode has been found, so give an indication of success and show the results | handleDecode | {
"repo_name": "Discounty/Discounty.android",
"path": "app/src/main/java/discounty/com/google/zxing/client/android/CaptureActivity.java",
"license": "apache-2.0",
"size": 28723
} | [
"android.content.SharedPreferences",
"android.graphics.Bitmap",
"android.preference.PreferenceManager",
"android.widget.Toast"
] | import android.content.SharedPreferences; import android.graphics.Bitmap; import android.preference.PreferenceManager; import android.widget.Toast; | import android.content.*; import android.graphics.*; import android.preference.*; import android.widget.*; | [
"android.content",
"android.graphics",
"android.preference",
"android.widget"
] | android.content; android.graphics; android.preference; android.widget; | 647,890 |
private void formatAndExecute(String itemName, Command command, Type value) {
HttpBindingProvider provider = findFirstMatchingBindingProvider(itemName, command);
if (provider == null) {
logger.trace("doesn't find matching binding provider [itemName={}, command={}]", itemName, command);
... | void function(String itemName, Command command, Type value) { HttpBindingProvider provider = findFirstMatchingBindingProvider(itemName, command); if (provider == null) { logger.trace(STR, itemName, command); return; } String httpMethod = provider.getHttpMethod(itemName, command); String url = provider.getUrl(itemName, ... | /**
* Finds the corresponding binding provider, replaces formatting markers
* in the url (@see java.util.Formatter for further information) and executes
* the formatted url.
*
* @param itemName the item context
* @param command the executed command or one of the virtual commands
* ... | Finds the corresponding binding provider, replaces formatting markers in the url (@see java.util.Formatter for further information) and executes the formatted url | formatAndExecute | {
"repo_name": "hemantsangwan/openhab",
"path": "bundles/binding/org.openhab.binding.http/src/main/java/org/openhab/binding/http/internal/HttpBinding.java",
"license": "epl-1.0",
"size": 20513
} | [
"java.util.Calendar",
"org.apache.commons.lang.StringUtils",
"org.openhab.binding.http.HttpBindingProvider",
"org.openhab.core.types.Command",
"org.openhab.core.types.Type",
"org.openhab.io.net.http.HttpUtil"
] | import java.util.Calendar; import org.apache.commons.lang.StringUtils; import org.openhab.binding.http.HttpBindingProvider; import org.openhab.core.types.Command; import org.openhab.core.types.Type; import org.openhab.io.net.http.HttpUtil; | import java.util.*; import org.apache.commons.lang.*; import org.openhab.binding.http.*; import org.openhab.core.types.*; import org.openhab.io.net.http.*; | [
"java.util",
"org.apache.commons",
"org.openhab.binding",
"org.openhab.core",
"org.openhab.io"
] | java.util; org.apache.commons; org.openhab.binding; org.openhab.core; org.openhab.io; | 103,867 |
public void validate() {
if (!isOnlyMemory()) {
try {
File tempFile = (tempDir == null)
? File.createTempFile(prefix, suffix)
: File.createTempFile(prefix, suffix, tempDir);
boolean deleted = tempFile.delete();
... | void function() { if (!isOnlyMemory()) { try { File tempFile = (tempDir == null) ? File.createTempFile(prefix, suffix) : File.createTempFile(prefix, suffix, tempDir); boolean deleted = tempFile.delete(); if (!deleted) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, STR, tempFile.getAbsolutePath()); } } } ... | /**
* Validates if it can create temporary files. Otherwise, it stores
* attachment contents in memory.
*/ | Validates if it can create temporary files. Otherwise, it stores attachment contents in memory | validate | {
"repo_name": "shelan/jdk9-mirror",
"path": "jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java",
"license": "gpl-2.0",
"size": 4558
} | [
"java.io.File",
"java.util.logging.Level"
] | import java.io.File; import java.util.logging.Level; | import java.io.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,177,027 |
public void testRemove2() {
ConcurrentSkipListMap map = map5();
assertTrue(map.containsKey(five));
assertEquals("E", map.get(five));
map.remove(five, "E");
assertEquals(4, map.size());
assertFalse(map.containsKey(five));
map.remove(four, "A");
assertEq... | void function() { ConcurrentSkipListMap map = map5(); assertTrue(map.containsKey(five)); assertEquals("E", map.get(five)); map.remove(five, "E"); assertEquals(4, map.size()); assertFalse(map.containsKey(five)); map.remove(four, "A"); assertEquals(4, map.size()); assertTrue(map.containsKey(four)); } | /**
* remove(key,value) removes only if pair present
*/ | remove(key,value) removes only if pair present | testRemove2 | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/java/util/concurrent/tck/ConcurrentSkipListMapTest.java",
"license": "gpl-2.0",
"size": 40653
} | [
"java.util.concurrent.ConcurrentSkipListMap"
] | import java.util.concurrent.ConcurrentSkipListMap; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 962,338 |
public void testGenerateTagsAllReqFieldsLocal()
throws XmlRpcException, MalformedURLException {
Map<String, Object> generateTagsParameters = new HashMap<String, Object>();
Object[] XMLRPCMethodParameters = new Object[] { sessionId, zoneId, CODE_TYPES[5], generateTagsParameters };
final String result = (St... | void function() throws XmlRpcException, MalformedURLException { Map<String, Object> generateTagsParameters = new HashMap<String, Object>(); Object[] XMLRPCMethodParameters = new Object[] { sessionId, zoneId, CODE_TYPES[5], generateTagsParameters }; final String result = (String) client .execute(ZONE_GENERATE_TAGS_METHO... | /**
* Test method with all required fields for local.
*
* @throws XmlRpcException
* @throws MalformedURLException
*/ | Test method with all required fields for local | testGenerateTagsAllReqFieldsLocal | {
"repo_name": "adqio/revive-adserver",
"path": "www/api/v2/xmlrpc/tests/unit/src/test/java/org/openx/zone/TestZoneGenerateTags.java",
"license": "gpl-2.0",
"size": 10388
} | [
"java.net.MalformedURLException",
"java.util.HashMap",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import java.net.*; import java.util.*; import org.apache.xmlrpc.*; | [
"java.net",
"java.util",
"org.apache.xmlrpc"
] | java.net; java.util; org.apache.xmlrpc; | 2,131,850 |
public static final Logger instance() {
return LogsHolder.INSTANCE;
} | static final Logger function() { return LogsHolder.INSTANCE; } | /**
* Gets an instance of this class.
*
* @return
*/ | Gets an instance of this class | instance | {
"repo_name": "dipu-bd/Tuntuni",
"path": "src/main/java/org/tuntuni/models/Logs.java",
"license": "apache-2.0",
"size": 3078
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,834,501 |
@Test
public void testCompare02() {
// given
DHTToken node0 = new DHTToken(new byte[]{2}, this.addr, this.port);
DHTToken node1 = new DHTToken(new byte[]{5}, this.addr, this.port);
// when
int result = DHTTokenComparator.getInstance().compare(node0, node1);
// t... | void function() { DHTToken node0 = new DHTToken(new byte[]{2}, this.addr, this.port); DHTToken node1 = new DHTToken(new byte[]{5}, this.addr, this.port); int result = DHTTokenComparator.getInstance().compare(node0, node1); assertEquals(-3, result); } | /**
* testCompare02() ID less than.
*/ | testCompare02() ID less than | testCompare02 | {
"repo_name": "mfriesen/cthulhu-dht",
"path": "src/test/java/ca/gobits/test/dht/comparator/DHTTokenComparatorUnitTest.java",
"license": "apache-2.0",
"size": 2266
} | [
"ca.gobits.dht.DHTToken",
"ca.gobits.dht.comparator.DHTTokenComparator",
"org.junit.Assert"
] | import ca.gobits.dht.DHTToken; import ca.gobits.dht.comparator.DHTTokenComparator; import org.junit.Assert; | import ca.gobits.dht.*; import ca.gobits.dht.comparator.*; import org.junit.*; | [
"ca.gobits.dht",
"org.junit"
] | ca.gobits.dht; org.junit; | 462,282 |
public boolean isReadOnly()
{
return annot.getFlag(COSName.F, FLAG_READ_ONLY);
} | boolean function() { return annot.getFlag(COSName.F, FLAG_READ_ONLY); } | /**
* Get the readOnly flag.
*
* @return The readOnly flag.
*/ | Get the readOnly flag | isReadOnly | {
"repo_name": "mathieufortin01/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotation.java",
"license": "apache-2.0",
"size": 27582
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 523,496 |
final double p = .88;
String filename = UNITTEST + "normally-distributed-data-1.csv";
AttributeWiseBetaNormalization<DoubleVector> filter = new ELKIBuilder<AttributeWiseBetaNormalization<DoubleVector>>(AttributeWiseBetaNormalization.class) //
.with(AttributeWiseBetaNormalization.Par.ALPHA_ID, p) //
... | final double p = .88; String filename = UNITTEST + STR; AttributeWiseBetaNormalization<DoubleVector> filter = new ELKIBuilder<AttributeWiseBetaNormalization<DoubleVector>>(AttributeWiseBetaNormalization.class) .with(AttributeWiseBetaNormalization.Par.DISTRIBUTIONS_ID, .build(); MultipleObjectsBundle bundle = readBundle... | /**
* Test with parameter p as alpha.
*/ | Test with parameter p as alpha | parameters | {
"repo_name": "elki-project/elki",
"path": "elki-input/src/test/java/elki/datasource/filter/normalization/columnwise/AttributeWiseBetaNormalizationTest.java",
"license": "agpl-3.0",
"size": 3175
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,160,237 |
public Viewer getViewer() {
return currentViewer;
} | Viewer function() { return currentViewer; } | /**
* This returns the viewer as required by the {@link IViewerProvider} interface.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the viewer as required by the <code>IViewerProvider</code> interface. | getViewer | {
"repo_name": "unicesi/QD-SPL",
"path": "ToolSupport/co.edu.icesi.shift.qaconfig.editor/src/qasvariabilitymodel/presentation/QasvariabilitymodelEditor.java",
"license": "lgpl-3.0",
"size": 54313
} | [
"org.eclipse.jface.viewers.Viewer"
] | import org.eclipse.jface.viewers.Viewer; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 86,430 |
public boolean equals(Object o) {
if (!(o instanceof ComplexFloatMatrix))
return false;
ComplexFloatMatrix other = (ComplexFloatMatrix) o;
if (!sameSize(other))
return false;
return Arrays.equals(data, other.data);
} | boolean function(Object o) { if (!(o instanceof ComplexFloatMatrix)) return false; ComplexFloatMatrix other = (ComplexFloatMatrix) o; if (!sameSize(other)) return false; return Arrays.equals(data, other.data); } | /** Compare two matrices.
* @param o Object to compare to
* @return true if and only if other is also a ComplexFloatMatrix which has the same size and the
* maximal absolute difference in matrix elements is smaller thatn 1e-6. */ | Compare two matrices | equals | {
"repo_name": "mikiobraun/jblas",
"path": "src/main/java/org/jblas/ComplexFloatMatrix.java",
"license": "bsd-3-clause",
"size": 60420
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 410,806 |
public static Object parse(AttributeDescriptor descriptor, Object value)
throws IllegalArgumentException {
if (value == null) {
if (descriptor.isNillable()) {
return descriptor.getDefaultValue();
}
} else {
Class<?> target = descriptor.... | static Object function(AttributeDescriptor descriptor, Object value) throws IllegalArgumentException { if (value == null) { if (descriptor.isNillable()) { return descriptor.getDefaultValue(); } } else { Class<?> target = descriptor.getType().getBinding(); if (!target.isAssignableFrom(value.getClass())) { Object convert... | /**
* Do our best to make the provided value line up with the needs of descriptor.
*
* <p>This helper method uses the Coverters api to convert the provided value into the required
* class. If the value is null (and the attribute is not nillable) a default value will be
* returned.
*
*... | Do our best to make the provided value line up with the needs of descriptor. This helper method uses the Coverters api to convert the provided value into the required class. If the value is null (and the attribute is not nillable) a default value will be returned | parse | {
"repo_name": "geotools/geotools",
"path": "modules/library/main/src/main/java/org/geotools/feature/type/Types.java",
"license": "lgpl-2.1",
"size": 36870
} | [
"org.geotools.util.Converters",
"org.opengis.feature.type.AttributeDescriptor"
] | import org.geotools.util.Converters; import org.opengis.feature.type.AttributeDescriptor; | import org.geotools.util.*; import org.opengis.feature.type.*; | [
"org.geotools.util",
"org.opengis.feature"
] | org.geotools.util; org.opengis.feature; | 2,842,912 |
@Override
protected boolean isRelevant(EStructuralFeature f) {
if (f instanceof EReference) {
ObjectDef sType = section.getType();
if (sType == null) {
LogUtil.error("section type was null");
return false;
}
EClass rType = ((EReference)f).getEReferenceType();
if (rType == null) {
LogUti... | boolean function(EStructuralFeature f) { if (f instanceof EReference) { ObjectDef sType = section.getType(); if (sType == null) { LogUtil.error(STR); return false; } EClass rType = ((EReference)f).getEReferenceType(); if (rType == null) { LogUtil.error(STR); return false; } return CommonUtils.equals(safelyGetURI(sType)... | /**
* Slightly more cumbersome than necessary since the
* types do not seem to resolve properly against the
* EPackages and .equals or .isSuperType fail.
*/ | Slightly more cumbersome than necessary since the types do not seem to resolve properly against the EPackages and .equals or .isSuperType fail | isRelevant | {
"repo_name": "nasa/OpenSPIFe",
"path": "gov.nasa.arc.spife.core.plan.editor.timeline/src/gov/nasa/arc/spife/core/plan/editor/timeline/models/PlanReferencedObjectSectionContentProvider.java",
"license": "apache-2.0",
"size": 5949
} | [
"gov.nasa.ensemble.common.CommonUtils",
"gov.nasa.ensemble.common.logging.LogUtil",
"gov.nasa.ensemble.dictionary.ObjectDef",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EReference",
"org.eclipse.emf.ecore.EStructuralFeature"
] | import gov.nasa.ensemble.common.CommonUtils; import gov.nasa.ensemble.common.logging.LogUtil; import gov.nasa.ensemble.dictionary.ObjectDef; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature; | import gov.nasa.ensemble.common.*; import gov.nasa.ensemble.common.logging.*; import gov.nasa.ensemble.dictionary.*; import org.eclipse.emf.ecore.*; | [
"gov.nasa.ensemble",
"org.eclipse.emf"
] | gov.nasa.ensemble; org.eclipse.emf; | 567,033 |
@Override
public void onDateChanged(DatePicker view, int year, int month, int day) {
Calendar selected = new GregorianCalendar(year, month, day);
this.changedValueCanBeNull = formatter().format(selected.getTime());
} | void function(DatePicker view, int year, int month, int day) { Calendar selected = new GregorianCalendar(year, month, day); this.changedValueCanBeNull = formatter().format(selected.getTime()); } | /**
* Called when the user changes the date.
*/ | Called when the user changes the date | onDateChanged | {
"repo_name": "NACC-Aus/Photomon-Android",
"path": "AndroidStudio/NACC/app/src/main/java/com/appiphany/nacc/ui/controls/DatePreference.java",
"license": "gpl-3.0",
"size": 8737
} | [
"android.widget.DatePicker",
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import android.widget.DatePicker; import java.util.Calendar; import java.util.GregorianCalendar; | import android.widget.*; import java.util.*; | [
"android.widget",
"java.util"
] | android.widget; java.util; | 2,090,370 |
public void updateSubTreeCheckingConsistency(TreePath path) {
if (isPathGreyed(path)) {
// greyed
for (TreePath childPath : getChildrenPath(path)) {
updateSubTreeCheckingConsistency(childPath);
}
updatePathGreyness(path);
} else {
// not greyed
if (isPathChecked(path)) {
checkSub... | void function(TreePath path) { if (isPathGreyed(path)) { for (TreePath childPath : getChildrenPath(path)) { updateSubTreeCheckingConsistency(childPath); } updatePathGreyness(path); } else { if (isPathChecked(path)) { checkSubTree(path); } else { uncheckSubTree(path); } return; } } | /**
* Updates consistency of the checking of sub-tree starting at path. It's
* based on paths greyness.
*
* @param path
* the root of the sub-tree to be grey-updated
*/ | Updates consistency of the checking of sub-tree starting at path. It's based on paths greyness | updateSubTreeCheckingConsistency | {
"repo_name": "lorebiga/CheckboxTree",
"path": "src/main/java/eu/floraresearch/lablib/gui/checkboxtree/DefaultTreeCheckingModel.java",
"license": "gpl-2.0",
"size": 22714
} | [
"javax.swing.tree.TreePath"
] | import javax.swing.tree.TreePath; | import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 2,003,403 |
public Border getBorder()
{
return border;
} | Border function() { return border; } | /**
* Get the value of the {@link #border} property.
*
* @return The property's current value
*
* @see #setBorder
*/ | Get the value of the <code>#border</code> property | getBorder | {
"repo_name": "rhuitl/uClinux",
"path": "lib/classpath/javax/swing/JComponent.java",
"license": "gpl-2.0",
"size": 117352
} | [
"javax.swing.border.Border"
] | import javax.swing.border.Border; | import javax.swing.border.*; | [
"javax.swing"
] | javax.swing; | 2,705,151 |
public interface OnParameterChangeListener {
void onParameterChange(AudioEffect effect, int status, byte[] param,
byte[] value);
}
// -------------------------------------------------------------------------
// Audio Effect Control panel intents
// ----------------... | interface OnParameterChangeListener { void function(AudioEffect effect, int status, byte[] param, byte[] value); } @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL = STR; @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final St... | /**
* Called on the listener to notify it that a parameter value has changed.
* @param effect the effect on which the interface is registered.
* @param status status of the set parameter operation.
* @param param ID of the modified parameter.
* @param value the new parameter... | Called on the listener to notify it that a parameter value has changed | onParameterChange | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/media/audiofx/AudioEffect.java",
"license": "apache-2.0",
"size": 49249
} | [
"android.annotation.SdkConstant",
"android.os.Handler",
"android.os.Looper"
] | import android.annotation.SdkConstant; import android.os.Handler; import android.os.Looper; | import android.annotation.*; import android.os.*; | [
"android.annotation",
"android.os"
] | android.annotation; android.os; | 2,709,093 |
private static void generateInterfaceMethod(
ClassWriter cw,
MethodType factoryMethodType,
Type lambdaClassType,
String interfaceMethodName,
MethodType interfaceMethodType,
Type delegateClassType,
int delegateInvokeType,
String delegateMethodName,
... | static void function( ClassWriter cw, MethodType factoryMethodType, Type lambdaClassType, String interfaceMethodName, MethodType interfaceMethodType, Type delegateClassType, int delegateInvokeType, String delegateMethodName, MethodType delegateMethodType, boolean isDelegateInterface, boolean isDelegateAugmented, Captur... | /**
* Generates the interface method that will delegate (call) to the delegate method
* with {@code INVOKEDYNAMIC} using the {@link #delegateBootstrap} type converter.
*/ | Generates the interface method that will delegate (call) to the delegate method with INVOKEDYNAMIC using the <code>#delegateBootstrap</code> type converter | generateInterfaceMethod | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/LambdaBootstrap.java",
"license": "apache-2.0",
"size": 25297
} | [
"java.lang.invoke.LambdaConversionException",
"java.lang.invoke.MethodType",
"java.util.List",
"java.util.stream.Collectors",
"org.objectweb.asm.ClassWriter",
"org.objectweb.asm.Handle",
"org.objectweb.asm.Type",
"org.objectweb.asm.commons.GeneratorAdapter",
"org.objectweb.asm.commons.Method"
] | import java.lang.invoke.LambdaConversionException; import java.lang.invoke.MethodType; import java.util.List; import java.util.stream.Collectors; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Handle; import org.objectweb.asm.Type; import org.objectweb.asm.commons.GeneratorAdapter; import org.objectweb.... | import java.lang.invoke.*; import java.util.*; import java.util.stream.*; import org.objectweb.asm.*; import org.objectweb.asm.commons.*; | [
"java.lang",
"java.util",
"org.objectweb.asm"
] | java.lang; java.util; org.objectweb.asm; | 1,836,215 |
ArrayList<Snapshot> snapshotList = new ArrayList<Snapshot>();
JSONArray snapshotJsonArray = jsonObject.getJSONArray("snapshots");
if (snapshotJsonArray.length() > 0) {
for (int index = 0; index < snapshotJsonArray.length(); index++) {
JSONObject snapshotJsonObject = snapshotJ... | ArrayList<Snapshot> snapshotList = new ArrayList<Snapshot>(); JSONArray snapshotJsonArray = jsonObject.getJSONArray(STR); if (snapshotJsonArray.length() > 0) { for (int index = 0; index < snapshotJsonArray.length(); index++) { JSONObject snapshotJsonObject = snapshotJsonArray.getJSONObject(index); snapshotList.add(new ... | /**
* Return the model list, it will be an empty list if no model exists.
*/ | Return the model list, it will be an empty list if no model exists | getSnapshotsList | {
"repo_name": "evercam/evercam-play-android",
"path": "evercamPlay/src/main/java/io/evercam/SnapshotsWithPaging.java",
"license": "agpl-3.0",
"size": 1111
} | [
"java.util.ArrayList",
"org.json.JSONArray",
"org.json.JSONObject"
] | import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONObject; | import java.util.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 1,029,968 |
public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) {
if (!isDialogEnabled(id))
return OptionalMessageDialog.NOT_SHOWN;
MessageDialog dialog= new OptionalMessageDialog(id, parent, t... | static int function(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex, String checkboxText) { if (!isDialogEnabled(id)) return OptionalMessageDialog.NOT_SHOWN; MessageDialog dialog= new OptionalMessageDialog(id, parent, title, titleIma... | /**
* Opens the dialog but only if the user hasn't chosen to hide it.
*
* @return the index of the pressed button or {@link SWT#DEFAULT} if the dialog got dismissed
* without pressing a button (e.g. via Esc) or {{@link #NOT_SHOWN} if the dialog was not
* shown
*/ | Opens the dialog but only if the user hasn't chosen to hide it | open | {
"repo_name": "ttimbul/eclipse.wst",
"path": "bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/OptionalMessageDialog.java",
"license": "epl-1.0",
"size": 5888
} | [
"org.eclipse.jface.dialogs.MessageDialog",
"org.eclipse.swt.graphics.Image",
"org.eclipse.swt.widgets.Shell"
] | import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; | import org.eclipse.jface.dialogs.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 1,256,655 |
private static void printHelp() {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("java -jar sifter.jar [OPTIONS] FAMILYNAME", buildOptions());
} | static void function() { HelpFormatter formatter = new HelpFormatter(); formatter.printHelp(STR, buildOptions()); } | /**
* Prints command-line help.
* @see sifter.main
*/ | Prints command-line help | printHelp | {
"repo_name": "juliandev/SIFTER",
"path": "src/sifter/main/Sifter.java",
"license": "gpl-3.0",
"size": 35084
} | [
"org.apache.commons.cli.HelpFormatter"
] | import org.apache.commons.cli.HelpFormatter; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,882,943 |
public void test008ConnectInd2() {
printDebugLog("[API:test08ConnectInd2]: the mTetheringOn is true.");
String jniLogs[] = {
"Req;0;false;initServiceNative;1;0",
"Req;0;false;serverActivateReqNative;void;0",
"Cb;1;true;callback_pan_handle_activate_cnf;... | void function() { printDebugLog(STR); String jniLogs[] = { STR, STR, STR, STR, STR, STR, STR }; ArrayList<String> checkLog = new ArrayList<String>(); checkLog.add("true"); checkLog.add("2:0"); checkLog.add("false"); mJniManager.setCaseLog(jniLogs, ";"); if (mJniManager.setCaseExpectedResults(checkLog)) { printDebugLog(... | /**
* This test function is to test connect indication
* And the mTetheringOn is true
* BluetoothDevice is null
* Test mPan isTetheringOn()
* The Pan role is NAP
* Case description:
* 1.start PanService
* 2.bind PanService
* 3.stop PanService
* 4.unb... | This test function is to test connect indication And the mTetheringOn is true BluetoothDevice is null Test mPan isTetheringOn() The Pan role is NAP Case description: 1.start PanService 2.bind PanService 3.stop PanService 4.unbind PanService 5.receive callback_pan_handle_connect_ind 6.stop the socket normally | test008ConnectInd2 | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/Bluetooth/tests/profiles/pan/src/com/mediatek/bluetooth/pan/PanServiceTestCase.java",
"license": "gpl-2.0",
"size": 69799
} | [
"android.bluetooth.IBluetoothPan",
"android.os.IBinder",
"java.util.ArrayList",
"junit.framework.Assert"
] | import android.bluetooth.IBluetoothPan; import android.os.IBinder; import java.util.ArrayList; import junit.framework.Assert; | import android.bluetooth.*; import android.os.*; import java.util.*; import junit.framework.*; | [
"android.bluetooth",
"android.os",
"java.util",
"junit.framework"
] | android.bluetooth; android.os; java.util; junit.framework; | 2,607,200 |
@Override
public SerieDto find() {
throw new UnsupportedOperationException(
"Do not use method find() with UpdatedLayersGeoServerImpl. Please use findByPeriod(Date, Date) instead");
} | SerieDto function() { throw new UnsupportedOperationException( STR); } | /**
* This method is unsupported in this implementation class. Please use
* {@link UpdatedLayersGeoServerImpl#findByPeriod(Date, Date)} instead.
*/ | This method is unsupported in this implementation class. Please use <code>UpdatedLayersGeoServerImpl#findByPeriod(Date, Date)</code> instead | find | {
"repo_name": "Emergya/opensir",
"path": "sir-admin/sir-admin-extensions/sir-admin-app-stats/src/main/java/com/emergya/ohiggins/stats/dao/impl/UpdatedLayersGeoServerImpl.java",
"license": "lgpl-2.1",
"size": 5037
} | [
"com.emergya.ohiggins.stats.dto.SerieDto"
] | import com.emergya.ohiggins.stats.dto.SerieDto; | import com.emergya.ohiggins.stats.dto.*; | [
"com.emergya.ohiggins"
] | com.emergya.ohiggins; | 1,082,100 |
public static RelDataType addCharsetAndCollation(
RelDataType type,
RelDataTypeFactory typeFactory) {
if (!inCharFamily(type)) {
return type;
}
Charset charset = type.getCharset();
if (charset == null) {
charset = typeFactory.getDefaultCharset();
}
SqlCollation collatio... | static RelDataType function( RelDataType type, RelDataTypeFactory typeFactory) { if (!inCharFamily(type)) { return type; } Charset charset = type.getCharset(); if (charset == null) { charset = typeFactory.getDefaultCharset(); } SqlCollation collation = type.getCollation(); if (collation == null) { collation = SqlCollat... | /**
* Adds collation and charset to a character type, returns other types
* unchanged.
*
* @param type Type
* @param typeFactory Type factory
* @return Type with added charset and collation, or unchanged type if it is
* not a char type.
*/ | Adds collation and charset to a character type, returns other types unchanged | addCharsetAndCollation | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java",
"license": "apache-2.0",
"size": 50603
} | [
"java.nio.charset.Charset",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rel.type.RelDataTypeFactory",
"org.apache.calcite.sql.SqlCollation",
"org.apache.calcite.sql.validate.SqlValidatorUtil"
] | import java.nio.charset.Charset; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory; import org.apache.calcite.sql.SqlCollation; import org.apache.calcite.sql.validate.SqlValidatorUtil; | import java.nio.charset.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*; import org.apache.calcite.sql.validate.*; | [
"java.nio",
"org.apache.calcite"
] | java.nio; org.apache.calcite; | 2,872,393 |
public boolean updateId(Object object, String newId){
try{
return getDao(object).updateId(object, newId)>0;
}catch(Exception e){
GEL.e("Exception updating id of an object: " + e.toString());
}
//error updating
return false;
} | boolean function(Object object, String newId){ try{ return getDao(object).updateId(object, newId)>0; }catch(Exception e){ GEL.e(STR + e.toString()); } return false; } | /**
* Update the id of an object
* @param object Object to update
* @param newId String identifier to set
* @return boolean TRUE if updated, FALSE if there was an error
*/ | Update the id of an object | updateId | {
"repo_name": "SilicorniO/googlyeyes-ormlite",
"path": "ge-ormlite/src/main/java/com/silicornio/geormlite/GeORMLiteManager.java",
"license": "apache-2.0",
"size": 27141
} | [
"com.silicornio.geormlite.general.GEL"
] | import com.silicornio.geormlite.general.GEL; | import com.silicornio.geormlite.general.*; | [
"com.silicornio.geormlite"
] | com.silicornio.geormlite; | 776,525 |
public final WebElementType getElementType() {
return this.elementType;
} | final WebElementType function() { return this.elementType; } | /**
* Getter for the elementType.
*
* @return Returns the elementType.
*/ | Getter for the elementType | getElementType | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.ui.web/src/main/man/org/nabucco/framework/base/ui/web/action/result/WebActionResultItem.java",
"license": "epl-1.0",
"size": 4575
} | [
"org.nabucco.framework.base.ui.web.component.WebElementType"
] | import org.nabucco.framework.base.ui.web.component.WebElementType; | import org.nabucco.framework.base.ui.web.component.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 315,322 |
public boolean printControl(PrintWriter out, int iPrintOptions)
{
boolean bFieldsFound = true; // This will keep screen from printing (non-existent sub-fields)
MenusModel recMenus = (MenusModel)((BaseMenuScreen)this.getScreenField()).getMainRecord();
if ((recMenus.getField(Me... | boolean function(PrintWriter out, int iPrintOptions) { boolean bFieldsFound = true; MenusModel recMenus = (MenusModel)((BaseMenuScreen)this.getScreenField()).getMainRecord(); if ((recMenus.getField(MenusModel.XML_DATA).isNull()) (recMenus.getField(MenusModel.XML_DATA).toString().startsWith(STR)) (recMenus.getField(Menu... | /**
* Code to display a Menu.
* @exception DBException File exception.
*/ | Code to display a Menu | printControl | {
"repo_name": "jbundle/jbundle",
"path": "base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseMenuScreen.java",
"license": "gpl-3.0",
"size": 3650
} | [
"java.io.InputStream",
"java.io.InputStreamReader",
"java.io.PrintWriter",
"org.jbundle.base.field.PropertiesField",
"org.jbundle.base.model.DBParams",
"org.jbundle.base.model.Utility",
"org.jbundle.base.screen.model.BaseMenuScreen",
"org.jbundle.model.main.db.MenusModel",
"org.jbundle.thin.main.db.... | import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import org.jbundle.base.field.PropertiesField; import org.jbundle.base.model.DBParams; import org.jbundle.base.model.Utility; import org.jbundle.base.screen.model.BaseMenuScreen; import org.jbundle.model.main.db.MenusModel; import... | import java.io.*; import org.jbundle.base.field.*; import org.jbundle.base.model.*; import org.jbundle.base.screen.model.*; import org.jbundle.model.main.db.*; import org.jbundle.thin.main.db.*; | [
"java.io",
"org.jbundle.base",
"org.jbundle.model",
"org.jbundle.thin"
] | java.io; org.jbundle.base; org.jbundle.model; org.jbundle.thin; | 218,181 |
Optional<String> getReturnType(); | Optional<String> getReturnType(); | /**
* Returns the return type of the corresponding operation.
*
* @return an {@link Optional} with the full qualified class name of the return type as value. Empty {@link Optional} if return type is unknown.
*/ | Returns the return type of the corresponding operation | getReturnType | {
"repo_name": "diagnoseIT/CTA",
"path": "cta/cta.api/src/main/java/rocks/cta/api/core/callables/MethodInvocation.java",
"license": "agpl-3.0",
"size": 3725
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,436,567 |
public void addURLTemplates(int apiId, API api, Connection connection) throws APIManagementException {
if (apiId == -1) {
//application addition has failed
return;
}
PreparedStatement prepStmt = null;
PreparedStatement scopePrepStmt = null;
String que... | void function(int apiId, API api, Connection connection) throws APIManagementException { if (apiId == -1) { return; } PreparedStatement prepStmt = null; PreparedStatement scopePrepStmt = null; String query = STR; String scopeQuery = STR; try { prepStmt = connection.prepareStatement(query); scopePrepStmt = connection.pr... | /**
* Adds URI templates define for an API
*
* @param apiId
* @param api
* @param connection
* @throws APIManagementException
*/ | Adds URI templates define for an API | addURLTemplates | {
"repo_name": "rnavagamuwa/custom-carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 404796
} | [
"java.io.ByteArrayInputStream",
"java.io.InputStream",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.util.Iterator",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.URITemplate",
"org.wso2.carbon.apimgt.impl.utils.APIMgtDBU... | import java.io.ByteArrayInputStream; import java.io.InputStream; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Iterator; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.URITemplate; import org.wso2.carbon.a... | import java.io.*; import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.io",
"java.sql",
"java.util",
"org.wso2.carbon"
] | java.io; java.sql; java.util; org.wso2.carbon; | 1,704,993 |
public static <T extends Throwable> T logFailure(T error)
{
logFailure(error, error.getMessage());
return error;
}
private static final Logger LOG = new Logger(DruidMeta.class);
private final SqlLifecycleFactory sqlLifecycleFactory;
private final ScheduledExecutorService exec;
private final Avat... | static <T extends Throwable> T function(T error) { logFailure(error, error.getMessage()); return error; } private static final Logger LOG = new Logger(DruidMeta.class); private final SqlLifecycleFactory sqlLifecycleFactory; private final ScheduledExecutorService exec; private final AvaticaServerConfig config; private f... | /**
* Logs any throwable at the error level with the throwables message.
*
* @param error the throwable to be logged
* @param <T> any type that extends throwable
* @return the original Throwable
*/ | Logs any throwable at the error level with the throwables message | logFailure | {
"repo_name": "nishantmonu51/druid",
"path": "sql/src/main/java/org/apache/druid/sql/avatica/DruidMeta.java",
"license": "apache-2.0",
"size": 29881
} | [
"com.google.common.base.Preconditions",
"com.google.common.util.concurrent.ThreadFactoryBuilder",
"com.google.inject.Injector",
"java.util.List",
"java.util.concurrent.ConcurrentHashMap",
"java.util.concurrent.ConcurrentMap",
"java.util.concurrent.Executors",
"java.util.concurrent.ScheduledExecutorSer... | import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.inject.Injector; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executors; import java.util.concurre... | import com.google.common.base.*; import com.google.common.util.concurrent.*; import com.google.inject.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.druid.java.util.common.*; import org.apache.druid.java.util.common.logger.*; import org.apache.druid.server.... | [
"com.google.common",
"com.google.inject",
"java.util",
"org.apache.druid"
] | com.google.common; com.google.inject; java.util; org.apache.druid; | 1,017,539 |
@Test
public final void testSetParameterByteArray() {
// Setup the resources for the test.
int frameID = 0x10;
XBee64BitAddress dest64Addr = new XBee64BitAddress("0013A2004032D9AB");
XBee16BitAddress dest16Addr = new XBee16BitAddress("FFFF");
int options = 23;
String command = "NI";
byte[] parameterTo... | final void function() { int frameID = 0x10; XBee64BitAddress dest64Addr = new XBee64BitAddress(STR); XBee16BitAddress dest16Addr = new XBee16BitAddress("FFFF"); int options = 23; String command = "NI"; byte[] parameterToSet = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65}; RemoteATCommandPacket packet = new... | /**
* Test method for {@link com.digi.xbee.api.packet.common.RemoteATCommandPacket#setParameter(byte[])}.
*
* <p>Test if a byte array parameter is properly configured.</p>
*/ | Test method for <code>com.digi.xbee.api.packet.common.RemoteATCommandPacket#setParameter(byte[])</code>. Test if a byte array parameter is properly configured | testSetParameterByteArray | {
"repo_name": "GUBotDev/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/packet/common/RemoteATCommandPacketTest.java",
"license": "mpl-2.0",
"size": 52215
} | [
"com.digi.xbee.api.models.XBee16BitAddress",
"com.digi.xbee.api.models.XBee64BitAddress",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import com.digi.xbee.api.models.XBee16BitAddress; import com.digi.xbee.api.models.XBee64BitAddress; import org.hamcrest.core.Is; import org.junit.Assert; | import com.digi.xbee.api.models.*; import org.hamcrest.core.*; import org.junit.*; | [
"com.digi.xbee",
"org.hamcrest.core",
"org.junit"
] | com.digi.xbee; org.hamcrest.core; org.junit; | 510,320 |
public static String[] splitAndAssert(String toSplit, String splitOn, int expectedNumber) {
String[] parts = toSplit.split(splitOn);
assertEquals(expectedNumber + 1, parts.length, "There should be " + expectedNumber + " " +
"instances of " + splitOn + " in the " +
"co... | static String[] function(String toSplit, String splitOn, int expectedNumber) { String[] parts = toSplit.split(splitOn); assertEquals(expectedNumber + 1, parts.length, STR + expectedNumber + " " + STR + splitOn + STR + STR); return parts; } | /**
* Test utility that splits a string and asserts that the expected number of separators were
* found. Expected number is for separators, but the assertion is done on parts, so this
* method is not safe for strings that end in their separator sequence.
*
* @param toSplit the string to ... | Test utility that splits a string and asserts that the expected number of separators were found. Expected number is for separators, but the assertion is done on parts, so this method is not safe for strings that end in their separator sequence | splitAndAssert | {
"repo_name": "cloudant/java-cloudant",
"path": "cloudant-client/src/test/java/com/cloudant/tests/util/Utils.java",
"license": "apache-2.0",
"size": 11462
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 1,815,478 |
public LinkedList<Patch> patch_make(String text1, String text2) {
if (text1 == null || text2 == null) {
throw new IllegalArgumentException("Null inputs. (patch_make)");
}
// No diffs provided, compute our own.
LinkedList<Diff> diffs = diff_main(text1, text2, true);
if (diffs.size() > 2) {
... | LinkedList<Patch> function(String text1, String text2) { if (text1 == null text2 == null) { throw new IllegalArgumentException(STR); } LinkedList<Diff> diffs = diff_main(text1, text2, true); if (diffs.size() > 2) { diff_cleanupSemantic(diffs); diff_cleanupEfficiency(diffs); } return patch_make(text1, diffs); } | /**
* Compute a list of patches to turn text1 into text2.
* A set of diffs will be computed.
* @param text1 Old text.
* @param text2 New text.
* @return LinkedList of Patch objects.
*/ | Compute a list of patches to turn text1 into text2. A set of diffs will be computed | patch_make | {
"repo_name": "wangzw/CppStyle",
"path": "plugin/src/org/wangzw/plugin/cppstyle/diff_match_patch.java",
"license": "mit",
"size": 89020
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,164,639 |
protected void addDependOnPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ApplicationInstance_dependOn_feature"),
getString("_UI_PropertyDes... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), CyberPhysicalSystemPackage.Literals.APPLICATION_INSTANCE__DEPEND_ON, true, false, true, null, nul... | /**
* This adds a property descriptor for the Depend On feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Depend On feature. | addDependOnPropertyDescriptor | {
"repo_name": "IncQueryLabs/incquery-examples-cps",
"path": "domains/org.eclipse.viatra.examples.cps.model.edit/src/org/eclipse/viatra/examples/cps/cyberPhysicalSystem/provider/ApplicationInstanceItemProvider.java",
"license": "epl-1.0",
"size": 10064
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.viatra.examples.cps.cyberPhysicalSystem.CyberPhysicalSystemPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.viatra.examples.cps.cyberPhysicalSystem.CyberPhysicalSystemPackage; | import org.eclipse.emf.edit.provider.*; import org.eclipse.viatra.examples.cps.*; | [
"org.eclipse.emf",
"org.eclipse.viatra"
] | org.eclipse.emf; org.eclipse.viatra; | 2,310,654 |
public void setOptions(Map<String, Object> options) {
this.options = options;
} | void function(Map<String, Object> options) { this.options = options; } | /**
* Allows to configure additional netty options using "option." as prefix.
* For example "option.child.keepAlive=false" to set the netty option "child.keepAlive=false". See the Netty documentation for possible options that can be used.
*/ | Allows to configure additional netty options using "option." as prefix. For example "option.child.keepAlive=false" to set the netty option "child.keepAlive=false". See the Netty documentation for possible options that can be used | setOptions | {
"repo_name": "jlpedrosa/camel",
"path": "components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyServerBootstrapConfiguration.java",
"license": "apache-2.0",
"size": 21485
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 169,858 |
Appendable append(CharSequence csq, int start, int end) throws IOException; | Appendable append(CharSequence csq, int start, int end) throws IOException; | /**
* Appends a subsequence of the specified character sequence to this
* <tt>Appendable</tt>.
*
* <p> An invocation of this method of the form <tt>out.append(csq, start,
* end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
* exactly the same way as the invocation
*
* <... | Appends a subsequence of the specified character sequence to this Appendable. An invocation of this method of the form out.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation <code> out.append(csq.subSequence(start, end)) </code> | append | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/java/lang/Appendable.java",
"license": "mit",
"size": 4686
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,909,321 |
public static int relTo(final Point2D from, final Point2D to,
final Point2D rel) {
return (int) Math.signum((to.getX() - from.getX())
* (from.getY() - rel.getY()) - (rel.getX() - from.getX())
* (from.getY() - to.getY()));
} | static int function(final Point2D from, final Point2D to, final Point2D rel) { return (int) Math.signum((to.getX() - from.getX()) * (from.getY() - rel.getY()) - (rel.getX() - from.getX()) * (from.getY() - to.getY())); } | /**
* Calculates the relative orientation of two vectors.
*
* @param from The starting point of the vector.
* @param to The vector the orientation is calculated for.
* @param rel The vector relative to the other.
* @return {@code > 0} if {@code rel} is left of {@code from -> to} and
* {@co... | Calculates the relative orientation of two vectors | relTo | {
"repo_name": "JosuaKrause/Bubble-Sets",
"path": "src/main/java/setvis/VecUtil.java",
"license": "mit",
"size": 6908
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,710,678 |
public NamingEnumeration search(Name name, Attributes matchingAttributes)
throws NamingException {
return search(name.toString(), matchingAttributes);
} | NamingEnumeration function(Name name, Attributes matchingAttributes) throws NamingException { return search(name.toString(), matchingAttributes); } | /**
* Searches in a single context for objects that contain a specified set
* of attributes. This method returns all the attributes of such objects.
* It is equivalent to supplying null as the atributesToReturn parameter
* to the method search(Name, Attributes, String[]).
*
* @param na... | Searches in a single context for objects that contain a specified set of attributes. This method returns all the attributes of such objects. It is equivalent to supplying null as the atributesToReturn parameter to the method search(Name, Attributes, String[]) | search | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/naming/resources/BaseDirContext.java",
"license": "apache-2.0",
"size": 48650
} | [
"javax.naming.Name",
"javax.naming.NamingEnumeration",
"javax.naming.NamingException",
"javax.naming.directory.Attributes"
] | import javax.naming.Name; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attributes; | import javax.naming.*; import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 650,620 |
PersistenceAdapter createPersistenceAdapter() throws IOException; | PersistenceAdapter createPersistenceAdapter() throws IOException; | /**
* Creates a persistence Adapter that can use a given directory to store it's data.
* @throws IOException
*/ | Creates a persistence Adapter that can use a given directory to store it's data | createPersistenceAdapter | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/store/PersistenceAdapterFactory.java",
"license": "epl-1.0",
"size": 1204
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,031,592 |
protected Wom3Rtd prependRtd(Wom3Node n, String rtd)
{
Wom3Node first = n.getFirstChild();
if (first instanceof Wom3Rtd)
{
first.setTextContent(
rtd + first.getTextContent());
return (Wom3Rtd) first;
}
else
{
Wom3Rtd rtdNode = rtd(rtd);
prependNode(n, rtdNode);
return rtdNode;
}
}... | Wom3Rtd function(Wom3Node n, String rtd) { Wom3Node first = n.getFirstChild(); if (first instanceof Wom3Rtd) { first.setTextContent( rtd + first.getTextContent()); return (Wom3Rtd) first; } else { Wom3Rtd rtdNode = rtd(rtd); prependNode(n, rtdNode); return rtdNode; } } | /**
* Prepends an <rtd> node to the children of node {@code n}. If the first
* child of node {@code n} is already an <rtd> node, the text is
* prepended to that <rtd> node.
*
* @return
*/ | Prepends an <rtd> node to the children of node n. If the first child of node n is already an <rtd> node, the text is prepended to that <rtd> node | prependRtd | {
"repo_name": "sweble/sweble-wom3",
"path": "sweble-wom3-swc-adapter/src/main/java/org/sweble/wom3/swcadapter/FixWomRtdBase.java",
"license": "agpl-3.0",
"size": 22519
} | [
"org.sweble.wom3.Wom3Node",
"org.sweble.wom3.Wom3Rtd"
] | import org.sweble.wom3.Wom3Node; import org.sweble.wom3.Wom3Rtd; | import org.sweble.wom3.*; | [
"org.sweble.wom3"
] | org.sweble.wom3; | 487,366 |
@Test
public void unitTestDecimalStringSplit() {
DecimalStringSplit splitter = new DecimalStringSplit();
// Check splitting while starting from scratch
byte[][] twoRegionsSplits = splitter.split(2);
assertEquals(1, twoRegionsSplits.length);
assertArrayEquals(Bytes.toBytes("50000000"), twoRegion... | void function() { DecimalStringSplit splitter = new DecimalStringSplit(); byte[][] twoRegionsSplits = splitter.split(2); assertEquals(1, twoRegionsSplits.length); assertArrayEquals(Bytes.toBytes(STR), twoRegionsSplits[0]); byte[][] threeRegionsSplits = splitter.split(3); assertEquals(2, threeRegionsSplits.length); byte... | /**
* Unit tests for the DecimalStringSplit algorithm. Makes sure it divides up the
* space of keys in the way that we expect.
*/ | Unit tests for the DecimalStringSplit algorithm. Makes sure it divides up the space of keys in the way that we expect | unitTestDecimalStringSplit | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestRegionSplitter.java",
"license": "apache-2.0",
"size": 19318
} | [
"org.apache.hadoop.hbase.util.RegionSplitter",
"org.junit.Assert"
] | import org.apache.hadoop.hbase.util.RegionSplitter; import org.junit.Assert; | import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,498,462 |
Collection<String> getWhitelistUrls(); | Collection<String> getWhitelistUrls(); | /**
* Returns the URL-matching regular expressions currently in effect. If the whitelist is disabled, this method always returns an empty collection.
* If the whitelist is enabled but empty, this method return an empty collection.
*
* @return whitelist currently in effect, or an empty collection if ... | Returns the URL-matching regular expressions currently in effect. If the whitelist is disabled, this method always returns an empty collection. If the whitelist is enabled but empty, this method return an empty collection | getWhitelistUrls | {
"repo_name": "bltb/browsermob-proxy",
"path": "browsermob-core/src/main/java/net/lightbody/bmp/BrowserMobProxy.java",
"license": "apache-2.0",
"size": 30419
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,228,951 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<MicrosoftGraphDirectoryObjectInner> listCreatedObjectsAsync(String servicePrincipalId); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<MicrosoftGraphDirectoryObjectInner> listCreatedObjectsAsync(String servicePrincipalId); | /**
* Get createdObjects from servicePrincipals.
*
* @param servicePrincipalId key: id of servicePrincipal.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainException thrown if the request ... | Get createdObjects from servicePrincipals | listCreatedObjectsAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java",
"license": "mit",
"size": 228379
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryObjectInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryObjectInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 107,129 |
public okhttp3.Call sendWhatsAppLocationMessageAsync(
WhatsAppLocationMessage whatsAppLocationMessage,
final ApiCallback<WhatsAppSingleMessageInfo> _callback)
throws ApiException {
okhttp3.Call localVarCall =
sendWhatsAppLocationMessageValidateBeforeCall(whatsAppLocationMessage, _callba... | okhttp3.Call function( WhatsAppLocationMessage whatsAppLocationMessage, final ApiCallback<WhatsAppSingleMessageInfo> _callback) throws ApiException { okhttp3.Call localVarCall = sendWhatsAppLocationMessageValidateBeforeCall(whatsAppLocationMessage, _callback); Type localVarReturnType = new TypeToken<WhatsAppSingleMessa... | /**
* Send WhatsApp location message (asynchronously). Send a location to a single recipient.
* Location messages can only be successfully delivered, if the recipient has contacted the
* business within the last 24 hours, otherwise template message should be used.
*
* @param whatsAppLocationMessage (requ... | Send WhatsApp location message (asynchronously). Send a location to a single recipient. Location messages can only be successfully delivered, if the recipient has contacted the business within the last 24 hours, otherwise template message should be used | sendWhatsAppLocationMessageAsync | {
"repo_name": "infobip/infobip-api-java-client",
"path": "src/main/java/com/infobip/api/SendWhatsAppApi.java",
"license": "apache-2.0",
"size": 65361
} | [
"com.google.gson.reflect.TypeToken",
"com.infobip.ApiCallback",
"com.infobip.ApiException",
"com.infobip.model.WhatsAppLocationMessage",
"com.infobip.model.WhatsAppSingleMessageInfo",
"java.lang.reflect.Type"
] | import com.google.gson.reflect.TypeToken; import com.infobip.ApiCallback; import com.infobip.ApiException; import com.infobip.model.WhatsAppLocationMessage; import com.infobip.model.WhatsAppSingleMessageInfo; import java.lang.reflect.Type; | import com.google.gson.reflect.*; import com.infobip.*; import com.infobip.model.*; import java.lang.reflect.*; | [
"com.google.gson",
"com.infobip",
"com.infobip.model",
"java.lang"
] | com.google.gson; com.infobip; com.infobip.model; java.lang; | 2,648,449 |
public static synchronized void prepareTrackersAndFbLogger(Shop shop, Context context) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(context);
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
if (shop == null) {
deleteAppTrackers();
} else... | static synchronized void function(Shop shop, Context context) { GoogleAnalytics analytics = GoogleAnalytics.getInstance(context); if (shop == null) { deleteAppTrackers(); } else { if (!mTrackers.containsKey(TRACKER_APP) && analytics != null) { if (shop.getGoogleUa() != null && !shop.getGoogleUa().isEmpty()) { Timber.d(... | /**
* Prepare Google analytics trackers and Facebook events logger.
* Send UTM campaign if exist.
*
* @param shop shop with app specific Google Ua or null, if global tracker is enough.
* @param context application context.
*/ | Prepare Google analytics trackers and Facebook events logger. Send UTM campaign if exist | prepareTrackersAndFbLogger | {
"repo_name": "deepakmalhotra633/DeeShop",
"path": "app/src/main/java/bf/io/openshop/utils/Analytics.java",
"license": "mit",
"size": 16138
} | [
"android.content.Context",
"com.facebook.appevents.AppEventsLogger",
"com.google.android.gms.analytics.GoogleAnalytics",
"com.google.android.gms.analytics.Tracker"
] | import android.content.Context; import com.facebook.appevents.AppEventsLogger; import com.google.android.gms.analytics.GoogleAnalytics; import com.google.android.gms.analytics.Tracker; | import android.content.*; import com.facebook.appevents.*; import com.google.android.gms.analytics.*; | [
"android.content",
"com.facebook.appevents",
"com.google.android"
] | android.content; com.facebook.appevents; com.google.android; | 2,741,711 |
public iCancelableFuture handleDataURL(String url, boolean deferred) {
ActionLink link = new ActionLink(this, url, null);
if (deferred) {
loadStarted(link);
return getAppContext().executeWorkerTask(this.createDataLoadTask(link, true));
} else {
handleActionLink(link, false);
ret... | iCancelableFuture function(String url, boolean deferred) { ActionLink link = new ActionLink(this, url, null); if (deferred) { loadStarted(link); return getAppContext().executeWorkerTask(this.createDataLoadTask(link, true)); } else { handleActionLink(link, false); return null; } } | /**
* Load the data referenced by the specified URL. For list type widgets
* (lists, trees, tables, etc), the data will be appended to any existing data
*
* @param url
* the URL
* @param deferred
* true to defer loading of the link; false otherwise
* @return the Future for the ... | Load the data referenced by the specified URL. For list type widgets (lists, trees, tables, etc), the data will be appended to any existing data | handleDataURL | {
"repo_name": "appnativa/rare",
"path": "source/rare/core/com/appnativa/rare/widget/aWidget.java",
"license": "gpl-3.0",
"size": 150848
} | [
"com.appnativa.rare.net.ActionLink"
] | import com.appnativa.rare.net.ActionLink; | import com.appnativa.rare.net.*; | [
"com.appnativa.rare"
] | com.appnativa.rare; | 1,640,418 |
public boolean truncate(String src, long newLength) throws IOException {
checkOpen();
if (newLength < 0) {
throw new HadoopIllegalArgumentException(
"Cannot truncate to a negative file size: " + newLength + ".");
}
try (TraceScope ignored = newPathTraceScope("truncate", src)) {
r... | boolean function(String src, long newLength) throws IOException { checkOpen(); if (newLength < 0) { throw new HadoopIllegalArgumentException( STR + newLength + "."); } try (TraceScope ignored = newPathTraceScope(STR, src)) { return namenode.truncate(src, newLength, clientName); } catch (RemoteException re) { throw re.u... | /**
* Truncate a file to an indicated size
* See {@link ClientProtocol#truncate}.
*/ | Truncate a file to an indicated size See <code>ClientProtocol#truncate</code> | truncate | {
"repo_name": "legend-hua/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 109420
} | [
"java.io.IOException",
"org.apache.hadoop.HadoopIllegalArgumentException",
"org.apache.hadoop.hdfs.protocol.UnresolvedPathException",
"org.apache.hadoop.ipc.RemoteException",
"org.apache.hadoop.security.AccessControlException",
"org.apache.htrace.core.TraceScope"
] | import java.io.IOException; import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.hdfs.protocol.UnresolvedPathException; import org.apache.hadoop.ipc.RemoteException; import org.apache.hadoop.security.AccessControlException; import org.apache.htrace.core.TraceScope; | import java.io.*; import org.apache.hadoop.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; import org.apache.htrace.core.*; | [
"java.io",
"org.apache.hadoop",
"org.apache.htrace"
] | java.io; org.apache.hadoop; org.apache.htrace; | 550,080 |
@Override
Type getHibernateType(); | Type getHibernateType(); | /**
* Access to the Hibernate type for this parameter registration
*
* @return The Hibernate Type
*/ | Access to the Hibernate type for this parameter registration | getHibernateType | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/hibernate-core/org/hibernate/procedure/spi/ParameterRegistrationImplementor.java",
"license": "gpl-2.0",
"size": 2129
} | [
"org.hibernate.type.Type"
] | import org.hibernate.type.Type; | import org.hibernate.type.*; | [
"org.hibernate.type"
] | org.hibernate.type; | 912,617 |
private LinkedList<PcepValueType> createPcepLabelStack(DefaultLabelStack labelStack, Path path) {
checkNotNull(labelStack);
LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
Iterator<Link> links = path.links().iterator();
LabelResourceId label = null;
... | LinkedList<PcepValueType> function(DefaultLabelStack labelStack, Path path) { checkNotNull(labelStack); LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>(); Iterator<Link> links = path.links().iterator(); LabelResourceId label = null; Link link = null; PcepValueType subObj = null; PcepNai nai = nul... | /**
* Creates label stack for ERO object from network resource.
*
* @param labelStack
* @param path (hop list)
* @return list of ERO subobjects
*/ | Creates label stack for ERO object from network resource | createPcepLabelStack | {
"repo_name": "paradisecr/ONOS-OXP",
"path": "providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java",
"license": "apache-2.0",
"size": 86475
} | [
"com.google.common.base.Preconditions",
"java.util.Iterator",
"java.util.LinkedList",
"java.util.ListIterator",
"org.onlab.packet.Ip4Address",
"org.onosproject.incubator.net.resource.label.LabelResourceId",
"org.onosproject.incubator.net.tunnel.DefaultLabelStack",
"org.onosproject.net.Device",
"org.... | import com.google.common.base.Preconditions; import java.util.Iterator; import java.util.LinkedList; import java.util.ListIterator; import org.onlab.packet.Ip4Address; import org.onosproject.incubator.net.resource.label.LabelResourceId; import org.onosproject.incubator.net.tunnel.DefaultLabelStack; import org.onosproje... | import com.google.common.base.*; import java.util.*; import org.onlab.packet.*; import org.onosproject.incubator.net.resource.label.*; import org.onosproject.incubator.net.tunnel.*; import org.onosproject.net.*; import org.onosproject.pcepio.protocol.*; import org.onosproject.pcepio.types.*; | [
"com.google.common",
"java.util",
"org.onlab.packet",
"org.onosproject.incubator",
"org.onosproject.net",
"org.onosproject.pcepio"
] | com.google.common; java.util; org.onlab.packet; org.onosproject.incubator; org.onosproject.net; org.onosproject.pcepio; | 2,835,067 |
public void setAttributesMutator(GfxdAttributesMutator mutator) {
// set the mutators only if not runnig as gfxd loner for hadoop
if (!Misc.getMemStoreBooting().isHadoopGfxdLonerMode())
this.mutator = mutator;
}
// GemStone changes END
// copied from constructor args and stored locally.
pr... | void function(GfxdAttributesMutator mutator) { if (!Misc.getMemStoreBooting().isHadoopGfxdLonerMode()) this.mutator = mutator; } private SchemaDescriptor sd; private String tableName; private UUID schemaId; private int tableType; private ColumnInfo[] columnInfo; private ConstraintConstantAction[] constraintActions; pri... | /**
* Set the {@link GfxdAttributesMutator} object that holds the changes
* required to be done to the underlying GemFire region.
*
* @param mutator
* the {@link GfxdAttributesMutator} object
*/ | Set the <code>GfxdAttributesMutator</code> object that holds the changes required to be done to the underlying GemFire region | setAttributesMutator | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/execute/AlterTableConstantAction.java",
"license": "apache-2.0",
"size": 140636
} | [
"com.pivotal.gemfirexd.internal.engine.Misc",
"com.pivotal.gemfirexd.internal.engine.ddl.GfxdAttributesMutator",
"com.pivotal.gemfirexd.internal.iapi.services.io.FormatableBitSet",
"com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager",
"com.pivotal.gemfirexd.internal.iapi.sql.Activation",
"c... | import com.pivotal.gemfirexd.internal.engine.Misc; import com.pivotal.gemfirexd.internal.engine.ddl.GfxdAttributesMutator; import com.pivotal.gemfirexd.internal.iapi.services.io.FormatableBitSet; import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager; import com.pivotal.gemfirexd.internal.iapi.sql.Act... | import com.pivotal.gemfirexd.internal.engine.*; import com.pivotal.gemfirexd.internal.engine.ddl.*; import com.pivotal.gemfirexd.internal.iapi.services.io.*; import com.pivotal.gemfirexd.internal.iapi.services.sanity.*; import com.pivotal.gemfirexd.internal.iapi.sql.*; import com.pivotal.gemfirexd.internal.iapi.sql.con... | [
"com.pivotal.gemfirexd",
"java.util"
] | com.pivotal.gemfirexd; java.util; | 526,412 |
private void loadSettings() {
Bundle metaData = null;
try {
metaData = getPackageManager().getActivityInfo(getComponentName(), PackageManager.GET_META_DATA).metaData;
} catch (NameNotFoundException e) {
// Never catch this
e.printStackTrace();
}
... | void function() { Bundle metaData = null; try { metaData = getPackageManager().getActivityInfo(getComponentName(), PackageManager.GET_META_DATA).metaData; } catch (NameNotFoundException e) { e.printStackTrace(); } if (metaData != null && metaData.containsKey(METADATA_MIN_WIRED_DOTS)) mMinWiredDots = AlpSettings.Display... | /**
* Loads settings, either from manifest or {@link AlpSettings}.
*/ | Loads settings, either from manifest or <code>AlpSettings</code> | loadSettings | {
"repo_name": "ahmgsk/Lockscreen",
"path": "app/src/main/java/haibison/android/lockpattern/LockPatternActivity.java",
"license": "apache-2.0",
"size": 46172
} | [
"android.content.pm.PackageManager",
"android.os.Bundle"
] | import android.content.pm.PackageManager; import android.os.Bundle; | import android.content.pm.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 1,755,508 |
public static void makeScrollable(Element elem) {
elem.getStyle().setOverflow(Overflow.AUTO);
} | static void function(Element elem) { elem.getStyle().setOverflow(Overflow.AUTO); } | /**
* Gives an element the overflow:auto property.<p>
*
* @param elem a DOM element
*/ | Gives an element the overflow:auto property | makeScrollable | {
"repo_name": "it-tavis/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java",
"license": "lgpl-2.1",
"size": 63520
} | [
"com.google.gwt.dom.client.Element",
"com.google.gwt.dom.client.Style"
] | import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,676,210 |
public void startDrag(DragSourceContext dsc, Cursor c, Image di, Point p)
throws InvalidDnDOperationException {
if (getTrigger().getTriggerEvent() == null) {
throw new InvalidDnDOperationException("DragGestureEvent has a null trigger");
}
dragSourceContext = dsc;... | void function(DragSourceContext dsc, Cursor c, Image di, Point p) throws InvalidDnDOperationException { if (getTrigger().getTriggerEvent() == null) { throw new InvalidDnDOperationException(STR); } dragSourceContext = dsc; cursor = c; sourceActions = getDragSourceContext().getSourceActions(); dragImage = di; dragImageOf... | /**
* initiate a DnD operation ...
*/ | initiate a DnD operation .. | startDrag | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java",
"license": "mit",
"size": 16694
} | [
"java.awt.Cursor",
"java.awt.Image",
"java.awt.Point",
"java.awt.datatransfer.Transferable",
"java.awt.dnd.DragSourceContext",
"java.awt.dnd.InvalidDnDOperationException",
"java.util.SortedMap"
] | import java.awt.Cursor; import java.awt.Image; import java.awt.Point; import java.awt.datatransfer.Transferable; import java.awt.dnd.DragSourceContext; import java.awt.dnd.InvalidDnDOperationException; import java.util.SortedMap; | import java.awt.*; import java.awt.datatransfer.*; import java.awt.dnd.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,775,412 |
@Nullable
public Project findProjectFor(@NonNull File file) {
if (mCurrentProjects != null) {
if (mCurrentProjects.length == 1) {
return mCurrentProjects[0];
}
String path = file.getPath();
for (Project project : mCurrentProjects) {
... | Project function(@NonNull File file) { if (mCurrentProjects != null) { if (mCurrentProjects.length == 1) { return mCurrentProjects[0]; } String path = file.getPath(); for (Project project : mCurrentProjects) { if (path.startsWith(project.getDir().getPath())) { return project; } } } return null; } | /**
* Returns the project containing a given file, or null if not found. This searches
* only among the currently checked project and its library projects, not among all
* possible projects being scanned sequentially.
*
* @param file the file to be checked
* @return the corresponding proje... | Returns the project containing a given file, or null if not found. This searches only among the currently checked project and its library projects, not among all possible projects being scanned sequentially | findProjectFor | {
"repo_name": "consulo/consulo-android",
"path": "tools-base/lint/libs/lint-api/src/main/java/com/android/tools/lint/client/api/LintDriver.java",
"license": "apache-2.0",
"size": 97510
} | [
"com.android.annotations.NonNull",
"com.android.tools.lint.detector.api.Project",
"java.io.File"
] | import com.android.annotations.NonNull; import com.android.tools.lint.detector.api.Project; import java.io.File; | import com.android.annotations.*; import com.android.tools.lint.detector.api.*; import java.io.*; | [
"com.android.annotations",
"com.android.tools",
"java.io"
] | com.android.annotations; com.android.tools; java.io; | 353,589 |
@SuppressWarnings("unused")
private void setAllGesturesEnabled(final JSONArray args, final CallbackContext callbackContext) throws JSONException {
Boolean isEnabled = args.getBoolean(1);
UiSettings uiSettings = map.getUiSettings();
uiSettings.setAllGesturesEnabled(isEnabled);
this.sendNoResult(callb... | @SuppressWarnings(STR) void function(final JSONArray args, final CallbackContext callbackContext) throws JSONException { Boolean isEnabled = args.getBoolean(1); UiSettings uiSettings = map.getUiSettings(); uiSettings.setAllGesturesEnabled(isEnabled); this.sendNoResult(callbackContext); } | /**
* Sets the preference for whether all gestures should be enabled or disabled.
* @param args
* @param callbackContext
* @throws JSONException
*/ | Sets the preference for whether all gestures should be enabled or disabled | setAllGesturesEnabled | {
"repo_name": "EmilianStankov/cordova-plugin-googlemaps",
"path": "src/android/plugin/google/maps/PluginMap.java",
"license": "apache-2.0",
"size": 24152
} | [
"com.google.android.gms.maps.UiSettings",
"org.apache.cordova.CallbackContext",
"org.json.JSONArray",
"org.json.JSONException"
] | import com.google.android.gms.maps.UiSettings; import org.apache.cordova.CallbackContext; import org.json.JSONArray; import org.json.JSONException; | import com.google.android.gms.maps.*; import org.apache.cordova.*; import org.json.*; | [
"com.google.android",
"org.apache.cordova",
"org.json"
] | com.google.android; org.apache.cordova; org.json; | 1,389,574 |
public CloseableIterator<InternalDataStatistics<?, ?, ?>> getAllDataStatistics(
String... authorizations); | CloseableIterator<InternalDataStatistics<?, ?, ?>> function( String... authorizations); | /**
* Get all data statistics from the store
*
* @return the list of all statistics
*/ | Get all data statistics from the store | getAllDataStatistics | {
"repo_name": "spohnan/geowave",
"path": "core/store/src/main/java/org/locationtech/geowave/core/store/adapter/statistics/DataStatisticsStore.java",
"license": "apache-2.0",
"size": 4646
} | [
"org.locationtech.geowave.core.store.CloseableIterator"
] | import org.locationtech.geowave.core.store.CloseableIterator; | import org.locationtech.geowave.core.store.*; | [
"org.locationtech.geowave"
] | org.locationtech.geowave; | 2,818,703 |
String getTileRelativeFilenameString(MapTile aTile); | String getTileRelativeFilenameString(MapTile aTile); | /**
* Get a unique file path for the tile. This file path may be used to store the tile on a file
* system and performance considerations should be taken into consideration. It can include
* multiple paths. It should not begin with a leading path separator.
*
* @param aTile the tile
* @ret... | Get a unique file path for the tile. This file path may be used to store the tile on a file system and performance considerations should be taken into consideration. It can include multiple paths. It should not begin with a leading path separator | getTileRelativeFilenameString | {
"repo_name": "garvankeeley/MozStumbler",
"path": "android/src/main/java/org/mozilla/osmdroid/tileprovider/tilesource/ITileSource.java",
"license": "mpl-2.0",
"size": 2000
} | [
"org.mozilla.osmdroid.tileprovider.MapTile"
] | import org.mozilla.osmdroid.tileprovider.MapTile; | import org.mozilla.osmdroid.tileprovider.*; | [
"org.mozilla.osmdroid"
] | org.mozilla.osmdroid; | 2,655,581 |
private void buildMessages() {
if (messages.isEmpty())
return;
for (Message message : messages.getAll()) {
if (message.getLevel() == Level.FATAL || message.getLevel() == Level.ERROR) {
actionErrors.add(message.getText());
} else {
... | void function() { if (messages.isEmpty()) return; for (Message message : messages.getAll()) { if (message.getLevel() == Level.FATAL message.getLevel() == Level.ERROR) { actionErrors.add(message.getText()); } else { actionMessages.add(message.getText()); } } messages.clear(); } | /**
* Processes the stored messages into the final rendered text and adds them
* to either the action error, or action message list depending on the severity.
*
* Once processed and added to the list for rendering, the messages will be cleared
* from the queue and will not be shown again.
... | Processes the stored messages into the final rendered text and adds them to either the action error, or action message list depending on the severity. Once processed and added to the list for rendering, the messages will be cleared from the queue and will not be shown again | buildMessages | {
"repo_name": "bcowdery/struts2-seam3-plugin",
"path": "src/main/java/com/pointyspoon/struts2/SeamActionSupport.java",
"license": "agpl-3.0",
"size": 5731
} | [
"org.jboss.seam.international.status.Level",
"org.jboss.seam.international.status.Message"
] | import org.jboss.seam.international.status.Level; import org.jboss.seam.international.status.Message; | import org.jboss.seam.international.status.*; | [
"org.jboss.seam"
] | org.jboss.seam; | 2,788,015 |
private String getValueForId(String id) {
for (int k = 0; k < fieldset.getWidgetCount(); k++) {
Widget widget = fieldset.getWidget(k);
if (id.equals(widget.getElement().getAttribute("id")))
return widget.getElement().getAttribute("value");
}
return nul... | String function(String id) { for (int k = 0; k < fieldset.getWidgetCount(); k++) { Widget widget = fieldset.getWidget(k); if (id.equals(widget.getElement().getAttribute("id"))) return widget.getElement().getAttribute("value"); } return null; } | /**
* Returns the value of the button that has the given id
*
* @return the value of the button with the given id
*/ | Returns the value of the button that has the given id | getValueForId | {
"repo_name": "outjie/jqm4gwt",
"path": "library/src/main/java/com/sksamuel/jqm4gwt/form/elements/JQMRadioset.java",
"license": "apache-2.0",
"size": 17281
} | [
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,652,909 |
@Column(name = "account_id", precision = 19)
public Long getAccountId();
// -------------------------------------------------------------------------
// FROM and INTO
// ------------------------------------------------------------------------- | @Column(name = STR, precision = 19) Long function(); | /**
* Getter for <code>cattle.process_instance.account_id</code>.
*/ | Getter for <code>cattle.process_instance.account_id</code> | getAccountId | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/ProcessInstance.java",
"license": "apache-2.0",
"size": 6183
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 112,943 |
public static DiskTypeAggregatedListOption filter(DiskTypeFilter filter) {
return new DiskTypeAggregatedListOption(ComputeRpc.Option.FILTER, filter.toPb());
} | static DiskTypeAggregatedListOption function(DiskTypeFilter filter) { return new DiskTypeAggregatedListOption(ComputeRpc.Option.FILTER, filter.toPb()); } | /**
* Returns an option to specify a filter on the disk types being listed.
*/ | Returns an option to specify a filter on the disk types being listed | filter | {
"repo_name": "jabubake/google-cloud-java",
"path": "google-cloud-compute/src/main/java/com/google/cloud/compute/Compute.java",
"license": "apache-2.0",
"size": 93984
} | [
"com.google.cloud.compute.spi.ComputeRpc"
] | import com.google.cloud.compute.spi.ComputeRpc; | import com.google.cloud.compute.spi.*; | [
"com.google.cloud"
] | com.google.cloud; | 2,569,153 |
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
s.defaultReadObject();
map = init(s.readInt(), s.readFloat());
for (int size = s.readInt(); size > 0; size--)
map.put(s.readObject(), "");
} | void function(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); map = init(s.readInt(), s.readFloat()); for (int size = s.readInt(); size > 0; size--) map.put(s.readObject(), ""); } | /**
* Deserializes this object from the given stream.
*
* @param s the stream to read from
* @throws ClassNotFoundException if the underlying stream fails
* @throws IOException if the underlying stream fails
* @serialData the <i>capacity</i> (int) and <i>loadFactor</i> (float)
* of the ... | Deserializes this object from the given stream | readObject | {
"repo_name": "unofficial-opensource-apple/gcc_40",
"path": "libjava/java/util/HashSet.java",
"license": "gpl-2.0",
"size": 8960
} | [
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 202,796 |
@Test
public void testScenario7() throws Exception {
InterestCalculationRequest request = new InterestCalculationRequest();
request.setInterestCalculatedToDate(new DateTime(2013, 7, 31, 0, 0).toDate());
List<ExtendedServicePeriod> extendedServicePeriods = new ArrayList<ExtendedServicePer... | void function() throws Exception { InterestCalculationRequest request = new InterestCalculationRequest(); request.setInterestCalculatedToDate(new DateTime(2013, 7, 31, 0, 0).toDate()); List<ExtendedServicePeriod> extendedServicePeriods = new ArrayList<ExtendedServicePeriod>(); ExtendedServicePeriod extendedServicePerio... | /**
* Ret Scenario - CSRS Two Refunds on Two Days.pdf
*
* @throws Exception
* to JUnit.
*/ | Ret Scenario - CSRS Two Refunds on Two Days.pdf | testScenario7 | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/InterestTest.java",
"license": "apache-2.0",
"size": 87229
} | [
"gov.opm.scrd.TestsHelper",
"gov.opm.scrd.entities.application.ExtendedServicePeriod",
"gov.opm.scrd.entities.application.InterestCalculationRequest",
"gov.opm.scrd.entities.application.InterestCalculationResponse",
"java.math.BigDecimal",
"java.util.ArrayList",
"java.util.List",
"junit.framework.Asse... | import gov.opm.scrd.TestsHelper; import gov.opm.scrd.entities.application.ExtendedServicePeriod; import gov.opm.scrd.entities.application.InterestCalculationRequest; import gov.opm.scrd.entities.application.InterestCalculationResponse; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; impo... | import gov.opm.scrd.*; import gov.opm.scrd.entities.application.*; import java.math.*; import java.util.*; import junit.framework.*; import org.joda.time.*; | [
"gov.opm.scrd",
"java.math",
"java.util",
"junit.framework",
"org.joda.time"
] | gov.opm.scrd; java.math; java.util; junit.framework; org.joda.time; | 790,117 |
@Pointcut("within(de.unioninvestment.eai.portal.portlet.crud.mvp.model..*)")
public void inMvpModel() {
// pointcut specification
} | @Pointcut(STR) void function() { } | /**
* innerhalb des Model-Packages.
*/ | innerhalb des Model-Packages | inMvpModel | {
"repo_name": "Union-Investment/Crud2Go",
"path": "eai-portal-webapp-administration/src/main/java/de/unioninvestment/eai/portal/portlet/crud/aspects/SystemArchitecture.java",
"license": "apache-2.0",
"size": 3309
} | [
"org.aspectj.lang.annotation.Pointcut"
] | import org.aspectj.lang.annotation.Pointcut; | import org.aspectj.lang.annotation.*; | [
"org.aspectj.lang"
] | org.aspectj.lang; | 2,334,926 |
public static String createSymmetricKeySignedGETRequest(URL descriptionURL,
String sequence,
String keyName,
String signature)
{
StringBuffer result =
createGETRequestBuffer(URLHelper.getURLPath(descriptionURL),
descriptionURL.getHost(),
descriptionURL.getPort(),
"");
... | static String function(URL descriptionURL, String sequence, String keyName, String signature) { StringBuffer result = createGETRequestBuffer(URLHelper.getURLPath(descriptionURL), descriptionURL.getHost(), descriptionURL.getPort(), ""); result.append(HTTPHeaderBuilder.buildHeader(HTTPConstant.X_SEQUENCE, sequence)); res... | /**
* Builds a signed GET message.
*
* @param sequence
* Sequence number for this request
* @param keyName
* Name for symmetric key
* @param signature
* Base64 encoded signature over nonce, callback URLs and public key
*
* @return GET message
*/ | Builds a signed GET message | createSymmetricKeySignedGETRequest | {
"repo_name": "fraunhoferfokus/fokus-upnp",
"path": "upnp-core/src/main/java/de/fraunhofer/fokus/upnp/core_security/helpers/HTTPSecuredMessageBuilder.java",
"license": "gpl-3.0",
"size": 3488
} | [
"de.fraunhofer.fokus.upnp.http.HTTPConstant",
"de.fraunhofer.fokus.upnp.http.HTTPHeaderBuilder",
"de.fraunhofer.fokus.upnp.util.URLHelper"
] | import de.fraunhofer.fokus.upnp.http.HTTPConstant; import de.fraunhofer.fokus.upnp.http.HTTPHeaderBuilder; import de.fraunhofer.fokus.upnp.util.URLHelper; | import de.fraunhofer.fokus.upnp.http.*; import de.fraunhofer.fokus.upnp.util.*; | [
"de.fraunhofer.fokus"
] | de.fraunhofer.fokus; | 338,560 |
public ArrayList<String> getPostInit() {
return postinit;
} | ArrayList<String> function() { return postinit; } | /**
* This list is used to add special commands to gnuplot, after the
* automatically generated from this library. It is a convenient method to
* send unsupported commands to gnuplot at the end of the program, just
* before the final plot command.
*
* @return he list of the post initializa... | This list is used to add special commands to gnuplot, after the automatically generated from this library. It is a convenient method to send unsupported commands to gnuplot at the end of the program, just before the final plot command | getPostInit | {
"repo_name": "LoickBriot/replication-benchmarker",
"path": "src/main/java/com/panayotis/gnuplot/GNUPlotParameters.java",
"license": "gpl-3.0",
"size": 6286
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,199,453 |
public boolean match(File sourceFile) {
Matcher matcher = sourcePattern.matcher(sourceFile.getName());
return (matcher.matches());
} | boolean function(File sourceFile) { Matcher matcher = sourcePattern.matcher(sourceFile.getName()); return (matcher.matches()); } | /**
* Determines if specified source file's name matches sourcePattern defined for this source to target specification.
* @param sourceFile source file to match against
* @return true, if file's name matches source sourcePattern; otherwise, false
*/ | Determines if specified source file's name matches sourcePattern defined for this source to target specification | match | {
"repo_name": "OSRData/etl-toolbox",
"path": "fileloader/src/main/java/com/osrdata/etltoolbox/fileloader/FileSpecification.java",
"license": "apache-2.0",
"size": 16382
} | [
"java.io.File",
"java.util.regex.Matcher"
] | import java.io.File; import java.util.regex.Matcher; | import java.io.*; import java.util.regex.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 647,593 |
public Observable<ServiceResponse<NetworkWatcherInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
... | Observable<ServiceResponse<NetworkWatcherInner>> function(String resourceGroupName, String networkWatcherName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (networkWatcherName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new ... | /**
* Gets the specified network watcher by resource group.
*
* @param resourceGroupName The name of the resource group.
* @param networkWatcherName The name of the network watcher.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ... | Gets the specified network watcher by resource group | getByResourceGroupWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkWatchersInner.java",
"license": "mit",
"size": 189693
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,950,626 |
public CmsSetupDBWrapper executeSqlStatement(String query, Map<String, String> replacer, List<Object> params)
throws SQLException {
CmsSetupDBWrapper dbwrapper = new CmsSetupDBWrapper(m_con);
String queryToExecute = query;
// Check if a map of replacements is given
if (replace... | CmsSetupDBWrapper function(String query, Map<String, String> replacer, List<Object> params) throws SQLException { CmsSetupDBWrapper dbwrapper = new CmsSetupDBWrapper(m_con); String queryToExecute = query; if (replacer != null) { queryToExecute = replaceTokens(query, replacer); } dbwrapper.createPreparedStatement(queryT... | /** Creates and executes a database statement from a String returning the result set.<p>
*
* @param query the query to execute
* @param replacer the replacements to perform in the script
* @param params the list of parameters for the statement
*
* @return the result set of the query
*... | Creates and executes a database statement from a String returning the result set | executeSqlStatement | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-setup/org/opencms/setup/CmsSetupDb.java",
"license": "lgpl-2.1",
"size": 27006
} | [
"java.sql.SQLException",
"java.util.List",
"java.util.Map"
] | import java.sql.SQLException; import java.util.List; import java.util.Map; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,908,565 |
@Before
public void setUp() throws Exception
{
// cassandraSetUp();
CassandraCli.cassandraSetUp();
CassandraCli.createKeySpace("KunderaExamples");
loadData();
emf = Persistence.createEntityManagerFactory("genericCassandraTest");
em = emf.createEntityManager(... | void function() throws Exception { CassandraCli.cassandraSetUp(); CassandraCli.createKeySpace(STR); loadData(); emf = Persistence.createEntityManagerFactory(STR); em = emf.createEntityManager(); } | /**
* Sets the up.
*
* @throws Exception
* the exception
*/ | Sets the up | setUp | {
"repo_name": "impetus-opensource/Kundera",
"path": "src/kundera-cassandra/cassandra-core/src/test/java/com/impetus/client/crud/EntityTransactionTest.java",
"license": "apache-2.0",
"size": 12828
} | [
"com.impetus.kundera.client.cassandra.persistence.CassandraCli",
"javax.persistence.Persistence"
] | import com.impetus.kundera.client.cassandra.persistence.CassandraCli; import javax.persistence.Persistence; | import com.impetus.kundera.client.cassandra.persistence.*; import javax.persistence.*; | [
"com.impetus.kundera",
"javax.persistence"
] | com.impetus.kundera; javax.persistence; | 548,661 |
public FixedIborSwapConvention getConvention(); | FixedIborSwapConvention function(); | /**
* Returns the convention of the swap for which the data is valid.
* @return the convention
*/ | Returns the convention of the swap for which the data is valid | getConvention | {
"repo_name": "nssales/Strata",
"path": "modules/pricer-beta/src/main/java/com/opengamma/strata/pricer/provider/BlackVolatilitySwaptionProvider.java",
"license": "apache-2.0",
"size": 1890
} | [
"com.opengamma.strata.finance.rate.swap.type.FixedIborSwapConvention"
] | import com.opengamma.strata.finance.rate.swap.type.FixedIborSwapConvention; | import com.opengamma.strata.finance.rate.swap.type.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 1,274,259 |
@NotNull String getName(); | @NotNull String getName(); | /**
* Returns the name of this module.
*
* @return the module name.
*/ | Returns the name of this module | getName | {
"repo_name": "leafclick/intellij-community",
"path": "platform/core-api/src/com/intellij/openapi/module/Module.java",
"license": "apache-2.0",
"size": 5436
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 996,974 |
protected void updateProblemIndication() {
if (updateProblemIndication) {
BasicDiagnostic diagnostic =
new BasicDiagnostic
(Diagnostic.OK,
"de.dfki.iui.basys.model.domain.editor",
0,
null,
new Object [] { editingDomain.getResourceSet() });
for (Diagnostic childDiagnostic : re... | void function() { if (updateProblemIndication) { BasicDiagnostic diagnostic = new BasicDiagnostic (Diagnostic.OK, STR, 0, null, new Object [] { editingDomain.getResourceSet() }); for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { if (childDiagnostic.getSeverity() != Diagnostic.OK) { diagnostic.add(ch... | /**
* Updates the problems indication with the information described in the specified diagnostic.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Updates the problems indication with the information described in the specified diagnostic. | updateProblemIndication | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/resourceinstance/presentation/ResourceinstanceEditor.java",
"license": "epl-1.0",
"size": 57600
} | [
"de.dfki.iui.basys.model.domain.order.presentation.DomainEditorPlugin",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.emf.common.ui.editor.ProblemEditorPart",
"org.eclipse.emf.common.util.BasicDiagnostic",
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.ui.PartInitException"
] | import de.dfki.iui.basys.model.domain.order.presentation.DomainEditorPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.emf.common.ui.editor.ProblemEditorPart; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.ui.PartInitExceptio... | import de.dfki.iui.basys.model.domain.order.presentation.*; import org.eclipse.core.runtime.*; import org.eclipse.emf.common.ui.editor.*; import org.eclipse.emf.common.util.*; import org.eclipse.ui.*; | [
"de.dfki.iui",
"org.eclipse.core",
"org.eclipse.emf",
"org.eclipse.ui"
] | de.dfki.iui; org.eclipse.core; org.eclipse.emf; org.eclipse.ui; | 1,677,170 |
protected void setWriter(Writer writer) {
this.writer = writer;
} | void function(Writer writer) { this.writer = writer; } | /**
* For unit testing purposes
*
* @param writer
*/ | For unit testing purposes | setWriter | {
"repo_name": "qingsong-xu/Smack",
"path": "smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java",
"license": "apache-2.0",
"size": 81954
} | [
"java.io.Writer"
] | import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,765,754 |
public TransactionConfiguration setTxTimeoutOnPartitionMapExchange(long txTimeoutOnPartitionMapExchange) {
this.txTimeoutOnPartitionMapExchange = txTimeoutOnPartitionMapExchange;
return this;
}
/**
* <b>This is an experimental feature. Transactional SQL is currently in a beta status.<... | TransactionConfiguration function(long txTimeoutOnPartitionMapExchange) { this.txTimeoutOnPartitionMapExchange = txTimeoutOnPartitionMapExchange; return this; } /** * <b>This is an experimental feature. Transactional SQL is currently in a beta status.</b> * <p> * Transaction deadlocks occurred for caches configured wit... | /**
* Sets the transaction timeout that will be enforced if the partition map exchange process starts.
*
* @param txTimeoutOnPartitionMapExchange Transaction timeout value in milliseconds.
* @return {@code this} for chaining.
*/ | Sets the transaction timeout that will be enforced if the partition map exchange process starts | setTxTimeoutOnPartitionMapExchange | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java",
"license": "apache-2.0",
"size": 18259
} | [
"org.apache.ignite.cache.CacheAtomicityMode",
"org.apache.ignite.transactions.Transaction"
] | import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.transactions.Transaction; | import org.apache.ignite.cache.*; import org.apache.ignite.transactions.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,249,077 |
public void setHasParams()
{
if (_paramTypes == null)
_paramTypes = new ArrayList<String>();
} | void function() { if (_paramTypes == null) _paramTypes = new ArrayList<String>(); } | /**
* Sets the parameters to zero to distinguish between
* methods with zero arguments and methods which don't
* specify the requirements.
*/ | Sets the parameters to zero to distinguish between methods with zero arguments and methods which don't specify the requirements | setHasParams | {
"repo_name": "dlitz/resin",
"path": "modules/kernel/src/com/caucho/config/types/SignaturePattern.java",
"license": "gpl-2.0",
"size": 4077
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,110,370 |
@Test
public void testResolveEntityNullSystemId() throws Exception {
final String systemId = null;
final InputSource inputSource = getEntityResolver().resolveEntity(null, systemId);
assertNull(inputSource);
} | void function() throws Exception { final String systemId = null; final InputSource inputSource = getEntityResolver().resolveEntity(null, systemId); assertNull(inputSource); } | /**
* Test {@link PivotalEntityResolver#resolveEntity(String, String)} with <code>null</code>
* <code>systemId</code>. Asserts that returns to <code>null<code>.
*
* @since GemFire 8.1
*/ | Test <code>PivotalEntityResolver#resolveEntity(String, String)</code> with <code>null</code> <code>systemId</code>. Asserts that returns to <code>null<code> | testResolveEntityNullSystemId | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/test/java/org/apache/geode/internal/cache/xmlcache/AbstractEntityResolverTest.java",
"license": "apache-2.0",
"size": 4445
} | [
"org.junit.Assert",
"org.xml.sax.InputSource"
] | import org.junit.Assert; import org.xml.sax.InputSource; | import org.junit.*; import org.xml.sax.*; | [
"org.junit",
"org.xml.sax"
] | org.junit; org.xml.sax; | 486,214 |
public Date getCreateTime(); | Date function(); | /**
* Get the time when the process instance was created.
* @return time of instance creation
*/ | Get the time when the process instance was created | getCreateTime | {
"repo_name": "isurusuranga/wso2-ode",
"path": "bpel-dao/src/main/java/org/apache/ode/bpel/dao/ProcessInstanceDAO.java",
"license": "apache-2.0",
"size": 7897
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 623,232 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<MicrosoftGraphShiftPreferencesInner> getShiftPreferencesAsync(
String userId, List<UsersSettingsSelect> select, List<String> expand) {
return getShiftPreferencesWithResponseAsync(userId, select, expand)
.flatMap(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<MicrosoftGraphShiftPreferencesInner> function( String userId, List<UsersSettingsSelect> select, List<String> expand) { return getShiftPreferencesWithResponseAsync(userId, select, expand) .flatMap( (Response<MicrosoftGraphShiftPreferencesInner> res) -> { if (res.getValue(... | /**
* Get shiftPreferences from users.
*
* @param userId key: id of user.
* @param select Select properties to be returned.
* @param expand Expand related entities.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws OdataErrorMainException thrown if... | Get shiftPreferences from users | getShiftPreferencesAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/UsersSettingsClientImpl.java",
"license": "mit",
"size": 22742
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphShiftPreferencesInner",
"com.azure.resourcemanager.authorization.fluent.models.UsersSettingsSelect",
"java.util.List"... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphShiftPreferencesInner; import com.azure.resourcemanager.authorization.fluent.models.UsersSettingsSelect; impor... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.authorization.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 1,188,580 |
@Beta
public static Converter<String, Double> stringConverter() {
return DoubleConverter.INSTANCE;
}
/**
* Returns an array containing the same values as {@code array}, but
* guaranteed to be of a specified minimum length. If {@code array} already
* has a length of at least {@code minLength}, it i... | static Converter<String, Double> function() { return DoubleConverter.INSTANCE; } /** * Returns an array containing the same values as {@code array}, but * guaranteed to be of a specified minimum length. If {@code array} already * has a length of at least {@code minLength}, it is returned directly. * Otherwise, a new ar... | /**
* Returns a serializable converter object that converts between strings and
* doubles using {@link Double#valueOf} and {@link Double#toString()}.
*
* @since 16.0
*/ | Returns a serializable converter object that converts between strings and doubles using <code>Double#valueOf</code> and <code>Double#toString()</code> | stringConverter | {
"repo_name": "mbarbero/guava-libraries",
"path": "guava/src/com/google/common/primitives/Doubles.java",
"license": "apache-2.0",
"size": 21834
} | [
"com.google.common.base.Converter"
] | import com.google.common.base.Converter; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 743,886 |
@Override
public void setPermission(Path p, FsPermission permisssion)
throws IOException {
throw new IOException("Har: setPermission not allowed");
}
private static class HarFSDataInputStream extends FSDataInputStream {
private static class HarFsInputStream extends FSInputStream {
... | void function(Path p, FsPermission permisssion) throws IOException { throw new IOException(STR); } private static class HarFSDataInputStream extends FSDataInputStream { private static class HarFsInputStream extends FSInputStream { private long position, start, end; private FSDataInputStream underLyingStream; private by... | /**
* Not implemented.
*/ | Not implemented | setPermission | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java",
"license": "apache-2.0",
"size": 34617
} | [
"java.io.IOException",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,051,363 |
public String checkKeyAndGetDatabaseName(String db) {
if (key == null) {
return db;
}
if (key.equals(db)) {
return keyDatabase;
}
throw DbException.get(ErrorCode.WRONG_USER_OR_PASSWORD);
} | String function(String db) { if (key == null) { return db; } if (key.equals(db)) { return keyDatabase; } throw DbException.get(ErrorCode.WRONG_USER_OR_PASSWORD); } | /**
* If no key is set, return the original database name. If a key is set,
* check if the key matches. If yes, return the correct database name. If
* not, throw an exception.
*
* @param db the key to test (or database name if no key is used)
* @return the database name
* @throws DbEx... | If no key is set, return the original database name. If a key is set, check if the key matches. If yes, return the correct database name. If not, throw an exception | checkKeyAndGetDatabaseName | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/server/pg/PgServer.java",
"license": "apache-2.0",
"size": 17272
} | [
"org.h2.api.ErrorCode",
"org.h2.message.DbException"
] | import org.h2.api.ErrorCode; import org.h2.message.DbException; | import org.h2.api.*; import org.h2.message.*; | [
"org.h2.api",
"org.h2.message"
] | org.h2.api; org.h2.message; | 1,471,788 |
@Pure
Date getDate() throws InvalidAttributeTypeException, AttributeNotInitializedException; | Date getDate() throws InvalidAttributeTypeException, AttributeNotInitializedException; | /**
* Replies the value of this metadata.
*
* @return the value
* @throws InvalidAttributeTypeException when type is invalid.
* @throws AttributeNotInitializedException when attribute is not initialized.
*/ | Replies the value of this metadata | getDate | {
"repo_name": "gallandarakhneorg/afc",
"path": "advanced/attributes/src/main/java/org/arakhne/afc/attrs/attr/AttributeValue.java",
"license": "apache-2.0",
"size": 17372
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 414,579 |
public static Map createPageScopeMap(PageContext pContext)
{
final PageContext context = pContext; | static Map function(PageContext pContext) { final PageContext context = pContext; | /**
* Creates the Map that "wraps" page-scoped attributes
*/ | Creates the Map that "wraps" page-scoped attributes | createPageScopeMap | {
"repo_name": "jboss/jboss-jstl-api_spec",
"path": "src/main/java/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java",
"license": "apache-2.0",
"size": 15296
} | [
"java.util.Map",
"javax.servlet.jsp.PageContext"
] | import java.util.Map; import javax.servlet.jsp.PageContext; | import java.util.*; import javax.servlet.jsp.*; | [
"java.util",
"javax.servlet"
] | java.util; javax.servlet; | 1,833,657 |
@NonNull
public Builder<T> setQuery(@NonNull Query query,
@NonNull PagingConfig config,
@NonNull SnapshotParser<T> parser) {
return setQuery(query, Source.DEFAULT, config, parser);
} | Builder<T> function(@NonNull Query query, @NonNull PagingConfig config, @NonNull SnapshotParser<T> parser) { return setQuery(query, Source.DEFAULT, config, parser); } | /**
* Sets the query using {@link Source#DEFAULT} and a custom {@link SnapshotParser}.
* <p>
* See {@link #setQuery(Query, Source, PagingConfig, SnapshotParser)}.
*/ | Sets the query using <code>Source#DEFAULT</code> and a custom <code>SnapshotParser</code>. See <code>#setQuery(Query, Source, PagingConfig, SnapshotParser)</code> | setQuery | {
"repo_name": "firebase/FirebaseUI-Android",
"path": "firestore/src/main/java/com/firebase/ui/firestore/paging/FirestorePagingOptions.java",
"license": "apache-2.0",
"size": 8042
} | [
"androidx.annotation.NonNull",
"androidx.paging.PagingConfig",
"com.firebase.ui.firestore.SnapshotParser",
"com.google.firebase.firestore.Query",
"com.google.firebase.firestore.Source"
] | import androidx.annotation.NonNull; import androidx.paging.PagingConfig; import com.firebase.ui.firestore.SnapshotParser; import com.google.firebase.firestore.Query; import com.google.firebase.firestore.Source; | import androidx.annotation.*; import androidx.paging.*; import com.firebase.ui.firestore.*; import com.google.firebase.firestore.*; | [
"androidx.annotation",
"androidx.paging",
"com.firebase.ui",
"com.google.firebase"
] | androidx.annotation; androidx.paging; com.firebase.ui; com.google.firebase; | 2,883,784 |
private void insertTableSection(int offset, byte tableId, int sectionLength) {
packetPayload[offset++] = tableId;
packetPayload[offset++] = (byte) ((sectionLength >> 8) & 0x0F);
packetPayload[offset] = (byte) (sectionLength & 0xFF);
}
// Internal classes.
private static final class CustomSectionPa... | void function(int offset, byte tableId, int sectionLength) { packetPayload[offset++] = tableId; packetPayload[offset++] = (byte) ((sectionLength >> 8) & 0x0F); packetPayload[offset] = (byte) (sectionLength & 0xFF); } private static final class CustomSectionPayloadReader implements SectionPayloadReader { List<Integer> p... | /**
* Inserts a private section header to {@link #packetPayload}.
*
* @param offset The position at which the header is inserted.
* @param tableId The table_id for the inserted section.
* @param sectionLength The value to use for private_section_length.
*/ | Inserts a private section header to <code>#packetPayload</code> | insertTableSection | {
"repo_name": "muxinc/stats-sdk-exoplayer",
"path": "library/src/androidTest/java/com/google/android/exoplayer2/extractor/ts/SectionReaderTest.java",
"license": "apache-2.0",
"size": 8024
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,165,451 |
public Game findGameById(Integer id_1, int startResult, int maxRows) throws DataAccessException;
| Game function(Integer id_1, int startResult, int maxRows) throws DataAccessException; | /**
* JPQL Query - findGameById
*
*/ | JPQL Query - findGameById | findGameById | {
"repo_name": "didoux/Spring-BowlingDB",
"path": "generated/bowling/dao/GameDAO.java",
"license": "gpl-2.0",
"size": 2628
} | [
"org.springframework.dao.DataAccessException"
] | import org.springframework.dao.DataAccessException; | import org.springframework.dao.*; | [
"org.springframework.dao"
] | org.springframework.dao; | 2,766,583 |
public static void setQueueName(QueueProperties queueProperties, String name) {
if (queueAccessor == null) {
throw new ClientLogger(EntityHelper.class).logExceptionAsError(
new IllegalStateException("'queueAccessor' should not be null."));
}
queueAccessor.setName... | static void function(QueueProperties queueProperties, String name) { if (queueAccessor == null) { throw new ClientLogger(EntityHelper.class).logExceptionAsError( new IllegalStateException(STR)); } queueAccessor.setName(queueProperties, name); } | /**
* Sets the queue name on a {@link QueueProperties}.
*
* @param queueProperties Queue to set name on.
* @param name Name of the queue.
*/ | Sets the queue name on a <code>QueueProperties</code> | setQueueName | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/implementation/EntityHelper.java",
"license": "mit",
"size": 23903
} | [
"com.azure.core.util.logging.ClientLogger",
"com.azure.messaging.servicebus.administration.models.QueueProperties"
] | import com.azure.core.util.logging.ClientLogger; import com.azure.messaging.servicebus.administration.models.QueueProperties; | import com.azure.core.util.logging.*; import com.azure.messaging.servicebus.administration.models.*; | [
"com.azure.core",
"com.azure.messaging"
] | com.azure.core; com.azure.messaging; | 1,601,514 |
EAttribute getWindingTest_FromTapStep(); | EAttribute getWindingTest_FromTapStep(); | /**
* Returns the meta object for the attribute '{@link gluemodel.CIM.IEC61970.Wires.WindingTest#getFromTapStep <em>From Tap Step</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>From Tap Step</em>'.
* @see gluemodel.CIM.IEC61970.Wires.WindingTest#getF... | Returns the meta object for the attribute '<code>gluemodel.CIM.IEC61970.Wires.WindingTest#getFromTapStep From Tap Step</code>'. | getWindingTest_FromTapStep | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Wires/WiresPackage.java",
"license": "mit",
"size": 669840
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 533,602 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.