method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Pin get_pin(int p_no) {
if (p_no < 0 || p_no >= pin_arr.length) {
Logger.getLogger(Package.class.getName()).log(Level.INFO, "Package.get_pin: p_no out of range");
return null;
}
return pin_arr[p_no];
} | Pin function(int p_no) { if (p_no < 0 p_no >= pin_arr.length) { Logger.getLogger(Package.class.getName()).log(Level.INFO, STR); return null; } return pin_arr[p_no]; } | /**
* Returns the pin with the input number from this package.
*/ | Returns the pin with the input number from this package | get_pin | {
"repo_name": "rbuj/FreeRouting",
"path": "src/main/java/net/freerouting/freeroute/library/Package.java",
"license": "gpl-3.0",
"size": 6719
} | [
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.util.logging.Level; import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,487,387 |
public Structure getStructure(File filename) throws IOException {
InputStreamProvider isp = new InputStreamProvider();
InputStream inStream = isp.getInputStream(filename);
return getStructure(inStream);
} | Structure function(File filename) throws IOException { InputStreamProvider isp = new InputStreamProvider(); InputStream inStream = isp.getInputStream(filename); return getStructure(inStream); } | /** opens filename, parses it and returns a Structure object
*
* @param filename a File object
* @return the Structure object
* @throws IOException ...
*/ | opens filename, parses it and returns a Structure object | getStructure | {
"repo_name": "JolantaWojcik/biojavaOwn",
"path": "biojava3-structure/src/main/java/org/biojava/bio/structure/io/PDBFileReader.java",
"license": "lgpl-2.1",
"size": 27187
} | [
"java.io.File",
"java.io.IOException",
"java.io.InputStream",
"org.biojava.bio.structure.Structure",
"org.biojava3.core.util.InputStreamProvider"
] | import java.io.File; import java.io.IOException; import java.io.InputStream; import org.biojava.bio.structure.Structure; import org.biojava3.core.util.InputStreamProvider; | import java.io.*; import org.biojava.bio.structure.*; import org.biojava3.core.util.*; | [
"java.io",
"org.biojava.bio",
"org.biojava3.core"
] | java.io; org.biojava.bio; org.biojava3.core; | 2,292,210 |
private void makeLargeFile(String fname) throws IOException {
File largeFile = new File(fname);
if (!largeFile.exists()) {
byte[] text = "abcdefghijklmnopqrstuvwxyz\n".getBytes();
FileOutputStream os = new FileOutputStream(largeFile);
for (int i = 0; i < 100000; i++) {
os.write(text)... | void function(String fname) throws IOException { File largeFile = new File(fname); if (!largeFile.exists()) { byte[] text = STR.getBytes(); FileOutputStream os = new FileOutputStream(largeFile); for (int i = 0; i < 100000; i++) { os.write(text); } os.close(); } } | /**
* Initialize a large file used for tests. This is to avoid
* having giant files checked into the source code repository.
*
* @param fname the name of the large file to create (if it
* doesn't already exist).
* @throws IOException if creating the large file fails.
*/ | Initialize a large file used for tests. This is to avoid having giant files checked into the source code repository | makeLargeFile | {
"repo_name": "googlegsa/manager.v3",
"path": "projects/connector-manager/source/javatests/com/google/enterprise/connector/traversal/QueryTraverserTest.java",
"license": "apache-2.0",
"size": 26940
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,328,175 |
String jaxbPackage = GetCustomersByName.class.getPackage().getName();
SoapJaxbDataFormat dataFormat = new SoapJaxbDataFormat();
dataFormat.setContextPath(jaxbPackage);
dataFormat.setElementNameStrategy(null);
return dataFormat;
} | String jaxbPackage = GetCustomersByName.class.getPackage().getName(); SoapJaxbDataFormat dataFormat = new SoapJaxbDataFormat(); dataFormat.setContextPath(jaxbPackage); dataFormat.setElementNameStrategy(null); return dataFormat; } | /**
* Create Dataformat by using the setters
*/ | Create Dataformat by using the setters | createDataFormat | {
"repo_name": "DariusX/camel",
"path": "components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/SoapMarshalSetterTest.java",
"license": "apache-2.0",
"size": 1499
} | [
"com.example.customerservice.GetCustomersByName"
] | import com.example.customerservice.GetCustomersByName; | import com.example.customerservice.*; | [
"com.example.customerservice"
] | com.example.customerservice; | 1,914,164 |
Process process = new ProcessBuilder(command).start();
InputStream stdout = process.getInputStream();
InputStreamReader reader = new InputStreamReader(stdout);
BufferedReader bufferedReader = new BufferedReader(reader);
int exitValue = process.waitFor();
String line;
List... | Process process = new ProcessBuilder(command).start(); InputStream stdout = process.getInputStream(); InputStreamReader reader = new InputStreamReader(stdout); BufferedReader bufferedReader = new BufferedReader(reader); int exitValue = process.waitFor(); String line; List<String> result = new ArrayList<>(); while ((lin... | /**
* Runs the given command and returns the output lines.
*
* @param command a {@link java.lang.String} object.
* @return a {@link java.util.List} object.
* @throws java.io.IOException if any.
* @throws java.lang.InterruptedException if any.
*/ | Runs the given command and returns the output lines | run | {
"repo_name": "ngeor/zfs-snapshot-trimmer",
"path": "src/main/java/zfs/snapshot/trimmer/ProcessRunner.java",
"license": "mit",
"size": 1190
} | [
"java.io.BufferedReader",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.util.ArrayList",
"java.util.List"
] | import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 726,461 |
@Override
public void info(final String message) {
logWrapper.logIfEnabled(loggerName, Level.INFO, null, message, (Throwable) null);
} | void function(final String message) { logWrapper.logIfEnabled(loggerName, Level.INFO, null, message, (Throwable) null); } | /**
* Logs a message object with the {@code Level.INFO} level.
*
* @param message the message object to log.
*/ | Logs a message object with the Level.INFO level | info | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/logging/log4j/LogWriterLogger.java",
"license": "apache-2.0",
"size": 56907
} | [
"org.apache.logging.log4j.Level"
] | import org.apache.logging.log4j.Level; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 2,215,546 |
public static void check() {
StringBuilder message = new StringBuilder();
final ServiceLoader<SAXParserFactory> allSax = ServiceLoader.load(SAXParserFactory.class);
for(final SAXParserFactory sax : allSax){
message.append(getClassName(sax.toString()));
mess... | static void function() { StringBuilder message = new StringBuilder(); final ServiceLoader<SAXParserFactory> allSax = ServiceLoader.load(SAXParserFactory.class); for(final SAXParserFactory sax : allSax){ message.append(getClassName(sax.toString())); message.append(" "); } logger.debug(STR + message.toString()); message ... | /**
* Perform checks on parsers, transformers and resolvers.
*/ | Perform checks on parsers, transformers and resolvers | check | {
"repo_name": "ambs/exist",
"path": "exist-core/src/main/java/org/exist/validation/XmlLibraryChecker.java",
"license": "lgpl-2.1",
"size": 12850
} | [
"java.util.ServiceLoader",
"javax.xml.parsers.SAXParserFactory",
"javax.xml.transform.TransformerFactory"
] | import java.util.ServiceLoader; import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.TransformerFactory; | import java.util.*; import javax.xml.parsers.*; import javax.xml.transform.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 1,485,746 |
@Test
public void getRootPackageWithSpecialCharactersTest() throws ParseException {
conflictResolver.setPrefixForIdentifier(VALID_PREFIX);
Date date = simpleDateFormat.parse(DATE1);
String rootPackage = getRootPackage((byte) 1, INVALID_NAME_SPACE1, date, conflictResolver);
assert... | void function() throws ParseException { conflictResolver.setPrefixForIdentifier(VALID_PREFIX); Date date = simpleDateFormat.parse(DATE1); String rootPackage = getRootPackage((byte) 1, INVALID_NAME_SPACE1, date, conflictResolver); assertThat(rootPackage.equals(DEFAULT_BASE_PKG + PERIOD + VERSION_NUMBER + PERIOD + VALID_... | /**
* Unit test for root package generation with special characters presence.
*/ | Unit test for root package generation with special characters presence | getRootPackageWithSpecialCharactersTest | {
"repo_name": "VinodKumarS-Huawei/ietf96yang",
"path": "utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntaxTest.java",
"license": "apache-2.0",
"size": 16297
} | [
"java.text.ParseException",
"java.util.Date",
"org.hamcrest.core.Is",
"org.junit.Assert",
"org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax"
] | import java.text.ParseException; import java.util.Date; import org.hamcrest.core.Is; import org.junit.Assert; import org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax; | import java.text.*; import java.util.*; import org.hamcrest.core.*; import org.junit.*; import org.onosproject.yangutils.translator.tojava.utils.*; | [
"java.text",
"java.util",
"org.hamcrest.core",
"org.junit",
"org.onosproject.yangutils"
] | java.text; java.util; org.hamcrest.core; org.junit; org.onosproject.yangutils; | 29,008 |
public static GetRecordByIdResultDocument export( GetRecordByIdResult response )
throws XMLException {
GetRecordByIdResultDocument doc = new GetRecordByIdResultDocument();
try {
doc.createEmptyDocument( response.getRequest().getVersion() );
... | static GetRecordByIdResultDocument function( GetRecordByIdResult response ) throws XMLException { GetRecordByIdResultDocument doc = new GetRecordByIdResultDocument(); try { doc.createEmptyDocument( response.getRequest().getVersion() ); Document owner = doc.getRootElement().getOwnerDocument(); if ( response != null && r... | /**
* Exports a instance of {@link GetRecordByIdResult} to a {@link GetRecordByIdResultDocument}.
*
* @param response
* @return a new document
* @throws XMLException
*/ | Exports a instance of <code>GetRecordByIdResult</code> to a <code>GetRecordByIdResultDocument</code> | export | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/csw/discovery/XMLFactory.java",
"license": "lgpl-2.1",
"size": 34135
} | [
"org.deegree.framework.xml.XMLException",
"org.deegree.ogcwebservices.OGCWebServiceException",
"org.deegree.ogcwebservices.csw.CSWExceptionCode",
"org.w3c.dom.Document",
"org.w3c.dom.Node"
] | import org.deegree.framework.xml.XMLException; import org.deegree.ogcwebservices.OGCWebServiceException; import org.deegree.ogcwebservices.csw.CSWExceptionCode; import org.w3c.dom.Document; import org.w3c.dom.Node; | import org.deegree.framework.xml.*; import org.deegree.ogcwebservices.*; import org.deegree.ogcwebservices.csw.*; import org.w3c.dom.*; | [
"org.deegree.framework",
"org.deegree.ogcwebservices",
"org.w3c.dom"
] | org.deegree.framework; org.deegree.ogcwebservices; org.w3c.dom; | 2,182,887 |
return new MatrixCursor(CONTACT_PROJECTION);
}
/**
* Create a {@link MatrixCursor} with the proper projection for a subclass of {@link AbstractContactsCursorLoader}
*
* @param initialCapacity The initial capacity to hand to the {@link MatrixCursor} | return new MatrixCursor(CONTACT_PROJECTION); } /** * Create a {@link MatrixCursor} with the proper projection for a subclass of {@link AbstractContactsCursorLoader} * * @param initialCapacity The initial capacity to hand to the {@link MatrixCursor} | /**
* Create a {@link MatrixCursor} with the proper projection for a subclass of {@link AbstractContactsCursorLoader}
*/ | Create a <code>MatrixCursor</code> with the proper projection for a subclass of <code>AbstractContactsCursorLoader</code> | createMatrixCursor | {
"repo_name": "WhisperSystems/Signal-Android",
"path": "app/src/main/java/org/thoughtcrime/securesms/contacts/ContactsCursorRows.java",
"license": "gpl-3.0",
"size": 7083
} | [
"android.database.MatrixCursor"
] | import android.database.MatrixCursor; | import android.database.*; | [
"android.database"
] | android.database; | 1,224,839 |
public Set<Integer> matchPattern(String pattern, String status,
boolean hasTag) {
PropertyConfigurator.configure("conf/log4j.properties");
Logger myLogger = Logger.getLogger("learn.discover.matchPattern");
myLogger.trace("Enter matchPattern");
myLogger.trace("Pattern: " + pattern);
myLogger.trace("Stat... | Set<Integer> function(String pattern, String status, boolean hasTag) { PropertyConfigurator.configure(STR); Logger myLogger = Logger.getLogger(STR); myLogger.trace(STR); myLogger.trace(STR + pattern); myLogger.trace(STR + status); myLogger.trace(STR + hasTag); Set<Integer> matchedIDs = new HashSet<Integer>(); for (int ... | /**
* Find the IDs of the sentences that matches the pattern
*
* @param pattern
* @param status
* @param hasTag
* @return a set of sentence IDs of the sentences that matches the pattern
*/ | Find the IDs of the sentences that matches the pattern | matchPattern | {
"repo_name": "phenoscape/charaparser-unsupervised",
"path": "src/main/java/semanticMarkup/ling/learn/Learner.java",
"license": "mit",
"size": 129278
} | [
"java.util.HashSet",
"java.util.Set",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"org.apache.commons.lang3.StringUtils",
"org.apache.log4j.Logger",
"org.apache.log4j.PropertyConfigurator"
] | import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; | import java.util.*; import java.util.regex.*; import org.apache.commons.lang3.*; import org.apache.log4j.*; | [
"java.util",
"org.apache.commons",
"org.apache.log4j"
] | java.util; org.apache.commons; org.apache.log4j; | 2,372,986 |
public Card deal(); | Card function(); | /**
* Deal a card from the deck. Return null when there is no more card in
* the deck to deal.
* @return a card from the deck or null
*/ | Deal a card from the deck. Return null when there is no more card in the deck to deal | deal | {
"repo_name": "htquach/GameOfWar",
"path": "src/com/gameofwar/Deck.java",
"license": "mit",
"size": 856
} | [
"com.gameofwar.model.Card"
] | import com.gameofwar.model.Card; | import com.gameofwar.model.*; | [
"com.gameofwar.model"
] | com.gameofwar.model; | 149,953 |
public void pause() throws IllegalStateException {
stayAwake(false);
_pause();
}
/**
* Set the low-level power management behavior for this MediaPlayer. This
* can be used when the MediaPlayer is not playing through a SurfaceHolder
* set with {@link #setDisplay(SurfaceHolder... | void function() throws IllegalStateException { stayAwake(false); _pause(); } /** * Set the low-level power management behavior for this MediaPlayer. This * can be used when the MediaPlayer is not playing through a SurfaceHolder * set with {@link #setDisplay(SurfaceHolder)} and thus can use the * high-level {@link #setS... | /**
* Pauses playback. Call start() to resume.
* @throws IllegalStateException if the internal player engine has not been
* initialized.
*/ | Pauses playback. Call start() to resume | pause | {
"repo_name": "openstreetview/android",
"path": "ffmpeg/src/main/java/com/telenav/ffmpeg/FFMPEGTrackPlayer.java",
"license": "lgpl-3.0",
"size": 27447
} | [
"android.os.PowerManager",
"android.view.SurfaceHolder"
] | import android.os.PowerManager; import android.view.SurfaceHolder; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 644,865 |
public ApiManagementServiceResourceInner restore(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParameters parameters) {
return restoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body();
} | ApiManagementServiceResourceInner function(String resourceGroupName, String serviceName, ApiManagementServiceBackupRestoreParameters parameters) { return restoreWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().last().body(); } | /**
* Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name... | Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete | restore | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2019_01_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_01_01/implementation/ApiManagementServicesInner.java",
"license": "mit",
"size": 134209
} | [
"com.microsoft.azure.management.apimanagement.v2019_01_01.ApiManagementServiceBackupRestoreParameters"
] | import com.microsoft.azure.management.apimanagement.v2019_01_01.ApiManagementServiceBackupRestoreParameters; | import com.microsoft.azure.management.apimanagement.v2019_01_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 399,109 |
@Test
public void testPersistEntityWithoutDateInsideAList() {
List<AnEntity> setOne = new ArrayList<AnEntity>();
EntityManager em = entityManagerFactory.createEntityManager();
AnEntity entity = RandomUtils.createRandomAnEntity();
setOne.add(entity);
em.getTransaction().b... | void function() { List<AnEntity> setOne = new ArrayList<AnEntity>(); EntityManager em = entityManagerFactory.createEntityManager(); AnEntity entity = RandomUtils.createRandomAnEntity(); setOne.add(entity); em.getTransaction().begin(); em.persist(entity); em.getTransaction().commit(); em.clear(); AnEntity returned = em.... | /**
* Tests the persistence of the Entity, fetches it and asserts that
* it is the same when inside a List, this is to sanity-check the apparent
* bug when comparing sets with dates inside.
*/ | Tests the persistence of the Entity, fetches it and asserts that it is the same when inside a List, this is to sanity-check the apparent bug when comparing sets with dates inside | testPersistEntityWithoutDateInsideAList | {
"repo_name": "GMelo/BatooJPAInvestigation",
"path": "src/test/java/org/gmelo/batooInvestigation/model/persistence/AnEntityTest.java",
"license": "gpl-2.0",
"size": 2987
} | [
"java.util.ArrayList",
"java.util.List",
"javax.persistence.EntityManager",
"junit.framework.Assert",
"org.gmelo.batooInvestigation.model.AnEntity",
"org.gmelo.batooInvestigation.util.RandomUtils"
] | import java.util.ArrayList; import java.util.List; import javax.persistence.EntityManager; import junit.framework.Assert; import org.gmelo.batooInvestigation.model.AnEntity; import org.gmelo.batooInvestigation.util.RandomUtils; | import java.util.*; import javax.persistence.*; import junit.framework.*; import org.gmelo.*; | [
"java.util",
"javax.persistence",
"junit.framework",
"org.gmelo"
] | java.util; javax.persistence; junit.framework; org.gmelo; | 1,446,994 |
public Iterator keys() {
return this.map.keySet().iterator();
} | Iterator function() { return this.map.keySet().iterator(); } | /**
* Get an enumeration of the keys of the JSONObject.
*
* @return An iterator of the keys.
*/ | Get an enumeration of the keys of the JSONObject | keys | {
"repo_name": "neo4j-attic/shell",
"path": "src/main/java/org/neo4j/shell/util/json/JSONObject.java",
"license": "agpl-3.0",
"size": 54079
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,544,995 |
@Override
public double evaluate(final double[] values, final int begin, final int length)
throws MathIllegalArgumentException {
double sum = Double.NaN;
if (test(values, begin, length, true)) {
sum = 0.0;
for (int i = begin; i < begin + length; i++) {
... | double function(final double[] values, final int begin, final int length) throws MathIllegalArgumentException { double sum = Double.NaN; if (test(values, begin, length, true)) { sum = 0.0; for (int i = begin; i < begin + length; i++) { sum += values[i]; } } return sum; } | /**
* The sum of the entries in the specified portion of
* the input array, or 0 if the designated subarray
* is empty.
* <p>
* Throws <code>MathIllegalArgumentException</code> if the array is null.</p>
*
* @param values the input array
* @param begin index of the first array ele... | The sum of the entries in the specified portion of the input array, or 0 if the designated subarray is empty. Throws <code>MathIllegalArgumentException</code> if the array is null | evaluate | {
"repo_name": "tbepler/seq-svm",
"path": "src/org/apache/commons/math3/stat/descriptive/summary/Sum.java",
"license": "mit",
"size": 7421
} | [
"org.apache.commons.math3.exception.MathIllegalArgumentException"
] | import org.apache.commons.math3.exception.MathIllegalArgumentException; | import org.apache.commons.math3.exception.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,775,786 |
public final MetaProperty<LocalDate> premiumDate() {
return _premiumDate;
} | final MetaProperty<LocalDate> function() { return _premiumDate; } | /**
* The meta-property for the {@code premiumDate} property.
* @return the meta-property, not null
*/ | The meta-property for the premiumDate property | premiumDate | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/main/java/com/opengamma/core/position/impl/SimpleTrade.java",
"license": "apache-2.0",
"size": 28757
} | [
"org.joda.beans.MetaProperty",
"org.threeten.bp.LocalDate"
] | import org.joda.beans.MetaProperty; import org.threeten.bp.LocalDate; | import org.joda.beans.*; import org.threeten.bp.*; | [
"org.joda.beans",
"org.threeten.bp"
] | org.joda.beans; org.threeten.bp; | 1,257,397 |
private Context getApplicationContext() {
return this.cordova.getActivity().getApplicationContext();
} | Context function() { return this.cordova.getActivity().getApplicationContext(); } | /**
* Gets the application context from cordova's main activity.
*
* @return the application context
*/ | Gets the application context from cordova's main activity | getApplicationContext | {
"repo_name": "sxagan/cordova-plugin-hlpush",
"path": "src/android/gcm/PushPlugin.java",
"license": "apache-2.0",
"size": 4868
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 656,827 |
private AutoPopulatingList<ErrorMessage> putMessageInMap(Map<String, AutoPopulatingList<ErrorMessage>> messagesMap, String propertyName, String messageKey, boolean withFullErrorPath, boolean escapeHtmlMessageParameters, String... messageParameters) {
if (StringUtils.isBlank(propertyName)) {
thro... | AutoPopulatingList<ErrorMessage> function(Map<String, AutoPopulatingList<ErrorMessage>> messagesMap, String propertyName, String messageKey, boolean withFullErrorPath, boolean escapeHtmlMessageParameters, String... messageParameters) { if (StringUtils.isBlank(propertyName)) { throw new IllegalArgumentException(STR); } ... | /**
* adds an error to the map under the given propertyName and adds an array of message parameters.
*
* @param propertyName name of the property to add error under
* @param messageKey resource key used to retrieve the error text from the error message resource bundle
* @param withFullErrorPath... | adds an error to the map under the given propertyName and adds an array of message parameters | putMessageInMap | {
"repo_name": "sbower/kuali-rice-1",
"path": "krad/krad-app-framework/src/main/java/org/kuali/rice/krad/util/MessageMap.java",
"license": "apache-2.0",
"size": 27367
} | [
"java.util.Map",
"org.apache.commons.lang.StringEscapeUtils",
"org.apache.commons.lang.StringUtils",
"org.springframework.util.AutoPopulatingList"
] | import java.util.Map; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.springframework.util.AutoPopulatingList; | import java.util.*; import org.apache.commons.lang.*; import org.springframework.util.*; | [
"java.util",
"org.apache.commons",
"org.springframework.util"
] | java.util; org.apache.commons; org.springframework.util; | 2,573,696 |
private boolean isOcrSupported() {
// If Tesseract has been installed and is set to be used through
// configuration, then ocr is enabled. OCR can only currently be run on 64
// bit Windows OS.
return TESSERACT_PATH != null
&& tesseractOCREnabled
&& Pl... | boolean function() { return TESSERACT_PATH != null && tesseractOCREnabled && PlatformUtil.isWindowsOS() && PlatformUtil.is64BitOS() && isSupported(); } | /**
* Whether or not OCR is supported in environment.
*
* @return True if OCR is supported.
*/ | Whether or not OCR is supported in environment | isOcrSupported | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/textextractors/TikaTextExtractor.java",
"license": "apache-2.0",
"size": 25298
} | [
"org.sleuthkit.autopsy.coreutils.PlatformUtil"
] | import org.sleuthkit.autopsy.coreutils.PlatformUtil; | import org.sleuthkit.autopsy.coreutils.*; | [
"org.sleuthkit.autopsy"
] | org.sleuthkit.autopsy; | 995,159 |
public Adapter createPackageElementAdapter()
{
return null;
}
| Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link org.xtext.burst.burst.PackageElement <em>Package Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases an... | Creates a new adapter for an object of class '<code>org.xtext.burst.burst.PackageElement Package Element</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createPackageElementAdapter | {
"repo_name": "Parashift/Burst",
"path": "org.xtext.burst/src-gen/org/xtext/burst/burst/util/BurstAdapterFactory.java",
"license": "agpl-3.0",
"size": 25573
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 972,132 |
@Override
public ServiceObjectiveListResponse list(String resourceGroupName, String serverName) throws IOException, ServiceException {
// Validate
if (resourceGroupName == null) {
throw new NullPointerException("resourceGroupName");
}
if (serverName == null) {
... | ServiceObjectiveListResponse function(String resourceGroupName, String serverName) throws IOException, ServiceException { if (resourceGroupName == null) { throw new NullPointerException(STR); } if (serverName == null) { throw new NullPointerException(STR); } boolean shouldTrace = CloudTracing.getIsEnabled(); String inv... | /**
* Returns information about an Azure SQL Database Server Service Objectives.
*
* @param resourceGroupName Required. The name of the Resource Group to
* which the server belongs.
* @param serverName Required. The name of the Server.
* @throws IOException Signals that an I/O exception of some ... | Returns information about an Azure SQL Database Server Service Objectives | list | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "resource-management/azure-mgmt-sql/src/main/java/com/microsoft/azure/management/sql/ServiceObjectiveOperationsImpl.java",
"license": "apache-2.0",
"size": 26695
} | [
"com.microsoft.azure.management.sql.models.ServiceObjectiveListResponse",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.tracing.CloudTracing",
"java.io.IOException",
"java.util.HashMap"
] | import com.microsoft.azure.management.sql.models.ServiceObjectiveListResponse; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.tracing.CloudTracing; import java.io.IOException; import java.util.HashMap; | import com.microsoft.azure.management.sql.models.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; | [
"com.microsoft.azure",
"com.microsoft.windowsazure",
"java.io",
"java.util"
] | com.microsoft.azure; com.microsoft.windowsazure; java.io; java.util; | 779,454 |
private void performDoubleQRStep(final int il, final int im, final int iu,
final ShiftInfo shift, final double[] hVec) {
final int n = matrixT.length;
double p = hVec[0];
double q = hVec[1];
double r = hVec[2];
for (int k = im; k <= iu -... | void function(final int il, final int im, final int iu, final ShiftInfo shift, final double[] hVec) { final int n = matrixT.length; double p = hVec[0]; double q = hVec[1]; double r = hVec[2]; for (int k = im; k <= iu - 1; k++) { boolean notlast = k != (iu - 1); if (k != im) { p = matrixT[k][k - 1]; q = matrixT[k + 1][k... | /**
* Perform a double QR step involving rows l:idx and columns m:n
*
* @param il the index of the small sub-diagonal element
* @param im the start index for the QR step
* @param iu the current eigenvalue index
* @param shift shift information holder
* @param hVec the initial houseHol... | Perform a double QR step involving rows l:idx and columns m:n | performDoubleQRStep | {
"repo_name": "tbepler/seq-svm",
"path": "src/org/apache/commons/math3/linear/SchurTransformer.java",
"license": "mit",
"size": 16356
} | [
"org.apache.commons.math3.util.FastMath",
"org.apache.commons.math3.util.Precision"
] | import org.apache.commons.math3.util.FastMath; import org.apache.commons.math3.util.Precision; | import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 762,623 |
public PagedList<KeyItem> listKeyVersions(final String vaultBaseUrl, final String keyName, final Integer maxresults)
throws KeyVaultErrorException, IOException, IllegalArgumentException {
return innerKeyVaultClient.getKeyVersions(vaultBaseUrl, keyName, maxresults);
} | PagedList<KeyItem> function(final String vaultBaseUrl, final String keyName, final Integer maxresults) throws KeyVaultErrorException, IOException, IllegalArgumentException { return innerKeyVaultClient.getKeyVersions(vaultBaseUrl, keyName, maxresults); } | /**
* List the versions of the specified key.
*
* @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net
* @param keyName The name of the key
* @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
* @t... | List the versions of the specified key | listKeyVersions | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java",
"license": "mit",
"size": 97117
} | [
"com.microsoft.azure.PagedList",
"com.microsoft.azure.keyvault.models.KeyItem",
"com.microsoft.azure.keyvault.models.KeyVaultErrorException",
"java.io.IOException"
] | import com.microsoft.azure.PagedList; import com.microsoft.azure.keyvault.models.KeyItem; import com.microsoft.azure.keyvault.models.KeyVaultErrorException; import java.io.IOException; | import com.microsoft.azure.*; import com.microsoft.azure.keyvault.models.*; import java.io.*; | [
"com.microsoft.azure",
"java.io"
] | com.microsoft.azure; java.io; | 2,439,920 |
public int compareNextTo(Composite composite) throws IOException; | int function(Composite composite) throws IOException; | /**
* Comparare the next name to read to the provided Composite.
* This does not consume the next name.
*/ | Comparare the next name to read to the provided Composite. This does not consume the next name | compareNextTo | {
"repo_name": "qinjin/mdtc-cassandra",
"path": "src/java/org/apache/cassandra/db/composites/CellNameType.java",
"license": "apache-2.0",
"size": 8290
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,739,158 |
public void setMixins(NodeId nodeId, Name[] mixinNodeTypeNames) throws RepositoryException; | void function(NodeId nodeId, Name[] mixinNodeTypeNames) throws RepositoryException; | /**
* Modify the set of mixin node types present on the node identified by the
* given id.
*
* @param nodeId NodeId identifying the node to be modified.
* @param mixinNodeTypeNames The new set of mixin types. Compared to the
* previous values this may result in both adding and/or removing ... | Modify the set of mixin node types present on the node identified by the given id | setMixins | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/Batch.java",
"license": "apache-2.0",
"size": 14018
} | [
"javax.jcr.RepositoryException"
] | import javax.jcr.RepositoryException; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 865,373 |
public PathMatcher getPathMatcher() {
return this.pathMatcher;
} | PathMatcher function() { return this.pathMatcher; } | /**
* The configured PathMatcher, or {@code null}.
*/ | The configured PathMatcher, or null | getPathMatcher | {
"repo_name": "boggad/jdk9-sample",
"path": "sample-catalog/spring-jdk9/src/spring.webmvc/org/springframework/web/servlet/handler/MappedInterceptor.java",
"license": "mit",
"size": 6115
} | [
"org.springframework.util.PathMatcher"
] | import org.springframework.util.PathMatcher; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 53,025 |
private static String calculateClassId(String s) {
//return a plain uuid:
return UUIDGenerator.getInstance().generateUUID();
} | static String function(String s) { return UUIDGenerator.getInstance().generateUUID(); } | /**
* Returns a unique stirng for a class name:
*/ | Returns a unique stirng for a class name: | calculateClassId | {
"repo_name": "grimurjonsson/com.idega.core",
"path": "src/java/com/idega/idegaweb/IWMainApplication.java",
"license": "gpl-3.0",
"size": 86797
} | [
"com.idega.core.idgenerator.business.UUIDGenerator"
] | import com.idega.core.idgenerator.business.UUIDGenerator; | import com.idega.core.idgenerator.business.*; | [
"com.idega.core"
] | com.idega.core; | 2,733,665 |
public static byte[] getBinaryContent(final Object iValue) {
if (iValue == null) return null;
else if (iValue instanceof OBinary) return ((OBinary) iValue).toByteArray();
else if (iValue instanceof byte[]) return (byte[]) iValue;
else if (iValue instanceof String) {
String s = (String) iValue;
... | static byte[] function(final Object iValue) { if (iValue == null) return null; else if (iValue instanceof OBinary) return ((OBinary) iValue).toByteArray(); else if (iValue instanceof byte[]) return (byte[]) iValue; else if (iValue instanceof String) { String s = (String) iValue; if (s.length() > 1 && (s.charAt(0) == BI... | /**
* Returns the binary representation of a content. If it's a String a Base64 decoding is applied.
*/ | Returns the binary representation of a content. If it's a String a Base64 decoding is applied | getBinaryContent | {
"repo_name": "orientechnologies/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/OStringSerializerHelper.java",
"license": "apache-2.0",
"size": 46285
} | [
"com.orientechnologies.common.types.OBinary",
"java.util.Base64"
] | import com.orientechnologies.common.types.OBinary; import java.util.Base64; | import com.orientechnologies.common.types.*; import java.util.*; | [
"com.orientechnologies.common",
"java.util"
] | com.orientechnologies.common; java.util; | 2,332,597 |
public Digest getDigest()
{
return digest;
} | Digest function() { return digest; } | /**
* return the underlying digest.
*/ | return the underlying digest | getDigest | {
"repo_name": "Skywalker-11/spongycastle",
"path": "core/src/main/java/org/spongycastle/crypto/agreement/kdf/ConcatenationKDFGenerator.java",
"license": "mit",
"size": 3133
} | [
"org.spongycastle.crypto.Digest"
] | import org.spongycastle.crypto.Digest; | import org.spongycastle.crypto.*; | [
"org.spongycastle.crypto"
] | org.spongycastle.crypto; | 879,799 |
public Node getXblParentNode(Node n) {
Node contentElement = getXblContentElement(n);
Node parent = contentElement == null
? n.getParentNode()
: contentElement.getParentNode();
if (parent instanceof XBLOMContentElement) {
parent = p... | Node function(Node n) { Node contentElement = getXblContentElement(n); Node parent = contentElement == null ? n.getParentNode() : contentElement.getParentNode(); if (parent instanceof XBLOMContentElement) { parent = parent.getParentNode(); } if (parent instanceof XBLOMShadowTreeElement) { parent = getXblBoundElement(pa... | /**
* Get the parent of a node in the fully flattened tree.
*/ | Get the parent of a node in the fully flattened tree | getXblParentNode | {
"repo_name": "shyamalschandra/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/bridge/svg12/DefaultXBLManager.java",
"license": "apache-2.0",
"size": 70751
} | [
"org.apache.flex.forks.batik.dom.svg12.XBLOMContentElement",
"org.apache.flex.forks.batik.dom.svg12.XBLOMShadowTreeElement",
"org.w3c.dom.Node"
] | import org.apache.flex.forks.batik.dom.svg12.XBLOMContentElement; import org.apache.flex.forks.batik.dom.svg12.XBLOMShadowTreeElement; import org.w3c.dom.Node; | import org.apache.flex.forks.batik.dom.svg12.*; import org.w3c.dom.*; | [
"org.apache.flex",
"org.w3c.dom"
] | org.apache.flex; org.w3c.dom; | 1,321,932 |
public void setFilters(List<Filter> filters) {
this.filters = filters;
} | void function(List<Filter> filters) { this.filters = filters; } | /**
* Sets the filters/buckets for this facet
*
* @param filters List of filters/buckets for this facet
*/ | Sets the filters/buckets for this facet | setFilters | {
"repo_name": "madickson/opencommercesearch",
"path": "opencommercesearch-sdk-java/src/main/java/org/opencommercesearch/client/impl/Facet.java",
"license": "apache-2.0",
"size": 8103
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,718,212 |
public String getDataDirectory() {
checkEventThread();
return System.getProperty("user.home") + File.separator + "." + name + File.separator;
} | String function() { checkEventThread(); return System.getProperty(STR) + File.separator + "." + name + File.separator; } | /**
* Gets a platform specific path that can be used to store
* application data. The application name typically appears
* as part of the path.
*
* On some platforms, the path may not yet exist and the caller
* will need to create it.
*
* @return the platform specific path for... | Gets a platform specific path that can be used to store application data. The application name typically appears as part of the path. On some platforms, the path may not yet exist and the caller will need to create it | getDataDirectory | {
"repo_name": "maiklos-mirrors/jfx78",
"path": "modules/graphics/src/main/java/com/sun/glass/ui/Application.java",
"license": "gpl-2.0",
"size": 24783
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 266,141 |
@Test
public void testFailedTargetWithSaveTemps() throws Exception {
write("bad_clib/BUILD",
"cc_library(name='bad_clib', srcs=['badlib.cc'])\n");
// trigger a warning to make the build fail:
// "control reaches end of non-void function [-Werror,-Wreturn-type]"
write("bad_clib/badlib.cc",
... | void function() throws Exception { write(STR, STR); write(STR, STR); addOptions(STR, STR); build(true, STRTarget assertThat(stderr).contains(STR); } | /**
* This is a regression test for bug #1013874, in which the temp artifacts (.ii and .s)
* were not being reported as having been created within a failing target.
* It's possible that one or more temps were successfully created, even if the
* compilation failed.
*/ | This is a regression test for bug #1013874, in which the temp artifacts (.ii and .s) were not being reported as having been created within a failing target. It's possible that one or more temps were successfully created, even if the compilation failed | testFailedTargetWithSaveTemps | {
"repo_name": "davidzchen/bazel",
"path": "src/test/java/com/google/devtools/build/lib/buildtool/BuildResultTestCase.java",
"license": "apache-2.0",
"size": 15596
} | [
"com.google.common.truth.Truth"
] | import com.google.common.truth.Truth; | import com.google.common.truth.*; | [
"com.google.common"
] | com.google.common; | 809,039 |
public static boolean onlyOnCompanion(Declaration model) {
return Decl.withinInterface(model)
&& (model instanceof ClassOrInterface
|| !Decl.isShared(model));
} | static boolean function(Declaration model) { return Decl.withinInterface(model) && (model instanceof ClassOrInterface !Decl.isShared(model)); } | /**
* Non-{@code shared} concrete interface members are
* only defined/declared on the companion class, not on the transformed
* interface itself.
*/ | Non-shared concrete interface members are only defined/declared on the companion class, not on the transformed interface itself | onlyOnCompanion | {
"repo_name": "lucaswerkmeister/ceylon-compiler",
"path": "src/com/redhat/ceylon/compiler/java/codegen/Strategy.java",
"license": "gpl-2.0",
"size": 13792
} | [
"com.redhat.ceylon.compiler.typechecker.model.ClassOrInterface",
"com.redhat.ceylon.compiler.typechecker.model.Declaration"
] | import com.redhat.ceylon.compiler.typechecker.model.ClassOrInterface; import com.redhat.ceylon.compiler.typechecker.model.Declaration; | import com.redhat.ceylon.compiler.typechecker.model.*; | [
"com.redhat.ceylon"
] | com.redhat.ceylon; | 1,599,488 |
@CheckForNull
MetricsAccessKey getAccessKey(String accessKey);
}
@Extension
public static class DescriptorImpl extends Descriptor<MetricsAccessKey> {
private static final SecureRandom entropy = new SecureRandom();
private static final char[] keyChars =
"ABCE... | MetricsAccessKey getAccessKey(String accessKey); } public static class DescriptorImpl extends Descriptor<MetricsAccessKey> { private static final SecureRandom entropy = new SecureRandom(); private static final char[] keyChars = STR.toCharArray(); @GuardedBy("this") private List<MetricsAccessKey> accessKeys; private tra... | /**
* Returns the definition of the specific access key. Note that all entries in {@link #getAccessKeys()} must
* be returned by this method, but it may also return additional entries.
*
* @param accessKey the access key to retrieve.
* @return the access key.
*/ | Returns the definition of the specific access key. Note that all entries in <code>#getAccessKeys()</code> must be returned by this method, but it may also return additional entries | getAccessKey | {
"repo_name": "oleg-nenashev/metrics-plugin",
"path": "src/main/java/jenkins/metrics/api/MetricsAccessKey.java",
"license": "mit",
"size": 22007
} | [
"hudson.model.Descriptor",
"java.security.SecureRandom",
"java.util.List",
"java.util.Set",
"javax.annotation.concurrent.GuardedBy"
] | import hudson.model.Descriptor; import java.security.SecureRandom; import java.util.List; import java.util.Set; import javax.annotation.concurrent.GuardedBy; | import hudson.model.*; import java.security.*; import java.util.*; import javax.annotation.concurrent.*; | [
"hudson.model",
"java.security",
"java.util",
"javax.annotation"
] | hudson.model; java.security; java.util; javax.annotation; | 549,094 |
public Connection getConnection() throws DAOException {
try {
if (THREAD_CONNECTION.get() == null) {
THREAD_CONNECTION.set(this.dataSource.getConnection());
}
return THREAD_CONNECTION.get();
} catch (SQLException e) {
throw new DAOExcep... | Connection function() throws DAOException { try { if (THREAD_CONNECTION.get() == null) { THREAD_CONNECTION.set(this.dataSource.getConnection()); } return THREAD_CONNECTION.get(); } catch (SQLException e) { throw new DAOException(STR + e.getMessage()); } } | /**
* Gets a connection from the pool or creates a new one.
* @return a connection taken from the pool
* @throws DAOException thrown if Hikari is unable to connect to the database
*/ | Gets a connection from the pool or creates a new one | getConnection | {
"repo_name": "serrearthur/training-java",
"path": "ComputerDataBase/src/main/java/cdb/dao/ConnectionManager.java",
"license": "apache-2.0",
"size": 5354
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,867,805 |
public void remove(ArrayList<Song> songs){
for(Song s : songs){
songList.remove(s);
playTime -= s.getLength();
}
int newIndex = songList.indexOf(currentSong);
if(newIndex == -1){
stop();
currentSongIndex = currentSongIndex % son... | void function(ArrayList<Song> songs){ for(Song s : songs){ songList.remove(s); playTime -= s.getLength(); } int newIndex = songList.indexOf(currentSong); if(newIndex == -1){ stop(); currentSongIndex = currentSongIndex % songList.size(); currentSong = songList.get(currentSongIndex); } else{ currentSongIndex = newIndex; ... | /**
* Removes from the list the given song list.
* @param songs List of songs to remove.
*/ | Removes from the list the given song list | remove | {
"repo_name": "jlsuarezdiaz/MusicPlayer",
"path": "src/Model/MusicPlayer.java",
"license": "gpl-2.0",
"size": 18064
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,684,137 |
public ServiceCall head300Async(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Return 300 status code and redirect to /http/success/200.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/ | Return 300 status code and redirect to /http/success/200 | head300Async | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/HttpRedirectsOperationsImpl.java",
"license": "mit",
"size": 53468
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 413,554 |
@ServiceMethod(returns = ReturnType.SINGLE)
public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) {
return updateAsync(resourceGroupName, workspaceName, parameters).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) WorkspaceInner function(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { return updateAsync(resourceGroupName, workspaceName, parameters).block(); } | /**
* Updates properties of a Workspace.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric
* characters along with dash (-) and underscore (_... | Updates properties of a Workspace | update | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/WorkspacesClientImpl.java",
"license": "mit",
"size": 77030
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner",
"com.azure.resourcemanager.batchai.models.WorkspaceUpdateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.batchai.fluent.models.WorkspaceInner; import com.azure.resourcemanager.batchai.models.WorkspaceUpdateParameters; | import com.azure.core.annotation.*; import com.azure.resourcemanager.batchai.fluent.models.*; import com.azure.resourcemanager.batchai.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,404,199 |
private void dateFilter(String period) {
if (arrayListDates != null) {
Date startDate = new Date();
Date endDate = new Date();
calendar = Calendar.getInstance();
calendar.setTime(startDate);
if (period.equals("thisPeriod")) {
calend... | void function(String period) { if (arrayListDates != null) { Date startDate = new Date(); Date endDate = new Date(); calendar = Calendar.getInstance(); calendar.setTime(startDate); if (period.equals(STR)) { calendar.add(Calendar.DATE, -getUser().getThisPeriod()); startDate = calendar.getTime(); } else if (period.equals... | /**
* Filters the tab based on the period selected
* @param period
*/ | Filters the tab based on the period selected | dateFilter | {
"repo_name": "robinsjovoll/Collective",
"path": "app/src/main/java/com/mobile/collective/implementation/controller/MainMenuController.java",
"license": "mit",
"size": 58605
} | [
"com.mobile.collective.framework.CustomHistoryListAdapter",
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.ArrayList",
"java.util.Calendar",
"java.util.Date"
] | import com.mobile.collective.framework.CustomHistoryListAdapter; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; | import com.mobile.collective.framework.*; import java.text.*; import java.util.*; | [
"com.mobile.collective",
"java.text",
"java.util"
] | com.mobile.collective; java.text; java.util; | 2,436,506 |
public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
return sun.management.ManagementFactory.getMemoryManagerMXBeans();
} | static List<MemoryManagerMXBean> function() { return sun.management.ManagementFactory.getMemoryManagerMXBeans(); } | /**
* Returns a list of {@link MemoryManagerMXBean} objects
* in the Java virtual machine.
* The Java virtual machine can have one or more memory managers.
* It may add or remove memory managers during execution.
*
* @return a list of <tt>MemoryManagerMXBean</tt> objects.
*
*/ | Returns a list of <code>MemoryManagerMXBean</code> objects in the Java virtual machine. The Java virtual machine can have one or more memory managers. It may add or remove memory managers during execution | getMemoryManagerMXBeans | {
"repo_name": "jgaltidor/VarJ",
"path": "analyzed_libs/jdk1.6.0_06_src/java/lang/management/ManagementFactory.java",
"license": "mit",
"size": 24568
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 607,948 |
private boolean deleteSelectedEntry()
{
String sAlias = m_jtKeyStore.getSelectedAlias();
if (sAlias == null)
{
return false;
}
int iSelected = JOptionPane.showConfirmDialog(this,
MessageFormat.format(RB.getString("FPortecle.DeleteEntry.message"), sAlias),
RB.getString("FPortecle.DeleteEntr... | boolean function() { String sAlias = m_jtKeyStore.getSelectedAlias(); if (sAlias == null) { return false; } int iSelected = JOptionPane.showConfirmDialog(this, MessageFormat.format(RB.getString(STR), sAlias), RB.getString(STR), JOptionPane.YES_NO_OPTION); if (iSelected != JOptionPane.YES_OPTION) { return false; } asser... | /**
* Let the user delete the selected keystore entry.
*
* @return True if the deletion is successful, false otherwise
*/ | Let the user delete the selected keystore entry | deleteSelectedEntry | {
"repo_name": "gavioto/portecle",
"path": "src/main/net/sf/portecle/FPortecle.java",
"license": "gpl-2.0",
"size": 188859
} | [
"java.security.KeyStore",
"java.security.KeyStoreException",
"java.text.MessageFormat",
"javax.swing.JOptionPane",
"net.sf.portecle.gui.error.DThrowable"
] | import java.security.KeyStore; import java.security.KeyStoreException; import java.text.MessageFormat; import javax.swing.JOptionPane; import net.sf.portecle.gui.error.DThrowable; | import java.security.*; import java.text.*; import javax.swing.*; import net.sf.portecle.gui.error.*; | [
"java.security",
"java.text",
"javax.swing",
"net.sf.portecle"
] | java.security; java.text; javax.swing; net.sf.portecle; | 1,182,493 |
checkStack(stack);// check the stack
Object dateObject = stack.pop();
// check for unknown values
if (dateObject == UnknownValue.UNKNOWN_NOMINAL || (dateObject instanceof Double && ((Double) dateObject).isNaN())) {
stack.push(UnknownValue.UNKNOWN_DATE);
return;
}
if (dateObject instanceof Double) ... | checkStack(stack); Object dateObject = stack.pop(); if (dateObject == UnknownValue.UNKNOWN_NOMINAL (dateObject instanceof Double && ((Double) dateObject).isNaN())) { stack.push(UnknownValue.UNKNOWN_DATE); return; } if (dateObject instanceof Double) { dateObject = ((Double)dateObject).longValue(); } if (!(dateObject ins... | /**
* Create the resulting Calendar object.
*/ | Create the resulting Calendar object | run | {
"repo_name": "aborg0/RapidMiner-Unuk",
"path": "src_agpl/com/rapidminer/tools/jep/function/expressions/date/DateParse.java",
"license": "agpl-3.0",
"size": 2788
} | [
"com.rapidminer.tools.expression.parser.UnknownValue",
"java.text.DateFormat",
"java.util.Calendar",
"java.util.Date",
"java.util.GregorianCalendar",
"org.nfunk.jep.ParseException"
] | import com.rapidminer.tools.expression.parser.UnknownValue; import java.text.DateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import org.nfunk.jep.ParseException; | import com.rapidminer.tools.expression.parser.*; import java.text.*; import java.util.*; import org.nfunk.jep.*; | [
"com.rapidminer.tools",
"java.text",
"java.util",
"org.nfunk.jep"
] | com.rapidminer.tools; java.text; java.util; org.nfunk.jep; | 2,222,254 |
public static String readStream(InputStream stream) throws IOException {
try (InputStreamReader reader = new InputStreamReader(stream, Constants.UTF8)) {
return readToString(reader);
}
} | static String function(InputStream stream) throws IOException { try (InputStreamReader reader = new InputStreamReader(stream, Constants.UTF8)) { return readToString(reader); } } | /**
* Reads a UTF-8-encoded string into a string.
*/ | Reads a UTF-8-encoded string into a string | readStream | {
"repo_name": "Squarespace/less-compiler",
"path": "src/main/java/com/squarespace/less/core/LessUtils.java",
"license": "apache-2.0",
"size": 8178
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader"
] | import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 166,735 |
public int lastIndexOf(CharSequence subString, int start) {
final int thisLen = length();
final int subCount = subString.length();
if (subCount > thisLen || start < 0) {
return -1;
}
if (subCount <= 0) {
return start < thisLen ? start : thisLen;
... | int function(CharSequence subString, int start) { final int thisLen = length(); final int subCount = subString.length(); if (subCount > thisLen start < 0) { return -1; } if (subCount <= 0) { return start < thisLen ? start : thisLen; } start = Math.min(start, thisLen - subCount); final char firstChar = subString.charAt(... | /**
* Searches in this string for the index of the specified string. The search for the string starts at the specified
* offset and moves towards the beginning of this string.
*
* @param subString the string to find.
* @param start the starting offset.
* @return the index of the first char... | Searches in this string for the index of the specified string. The search for the string starts at the specified offset and moves towards the beginning of this string | lastIndexOf | {
"repo_name": "danbev/netty",
"path": "common/src/main/java/io/netty/util/AsciiString.java",
"license": "apache-2.0",
"size": 37250
} | [
"io.netty.util.ByteProcessor",
"io.netty.util.internal.PlatformDependent"
] | import io.netty.util.ByteProcessor; import io.netty.util.internal.PlatformDependent; | import io.netty.util.*; import io.netty.util.internal.*; | [
"io.netty.util"
] | io.netty.util; | 1,951,168 |
public void testMarkForRollbackOnError()
{
try
{
EntityManager em = getEM();
EntityTransaction tx = em.getTransaction();
try
{
tx.begin();
try
{
em.find(Account.class,... | void function() { try { EntityManager em = getEM(); EntityTransaction tx = em.getTransaction(); try { tx.begin(); try { em.find(Account.class, Long.valueOf(123)); } catch (EntityNotFoundException enfe) { if (!tx.getRollbackOnly()) { fail(STR); } } tx.rollback(); } catch (Exception e) { e.printStackTrace(); } finally { ... | /**
* Test of marking of current txn for rollback on exception.
*/ | Test of marking of current txn for rollback on exception | testMarkForRollbackOnError | {
"repo_name": "datanucleus/tests",
"path": "jpa/general/src/test/org/datanucleus/tests/EntityManagerTest.java",
"license": "apache-2.0",
"size": 30260
} | [
"javax.persistence.EntityManager",
"javax.persistence.EntityNotFoundException",
"javax.persistence.EntityTransaction",
"org.datanucleus.samples.annotations.models.company.Account"
] | import javax.persistence.EntityManager; import javax.persistence.EntityNotFoundException; import javax.persistence.EntityTransaction; import org.datanucleus.samples.annotations.models.company.Account; | import javax.persistence.*; import org.datanucleus.samples.annotations.models.company.*; | [
"javax.persistence",
"org.datanucleus.samples"
] | javax.persistence; org.datanucleus.samples; | 46,804 |
public void setOnItemSelectedListener(@Nullable OnItemSelectedListener selectedListener) {
mItemSelectedListener = selectedListener;
} | void function(@Nullable OnItemSelectedListener selectedListener) { mItemSelectedListener = selectedListener; } | /**
* Sets a listener to receive events when a list item is selected.
*
* @param selectedListener Listener to register.
*
* @see ListView#setOnItemSelectedListener(OnItemSelectedListener)
*/ | Sets a listener to receive events when a list item is selected | setOnItemSelectedListener | {
"repo_name": "xorware/android_frameworks_base",
"path": "core/java/android/widget/ListPopupWindow.java",
"license": "apache-2.0",
"size": 48624
} | [
"android.annotation.Nullable",
"android.widget.AdapterView"
] | import android.annotation.Nullable; import android.widget.AdapterView; | import android.annotation.*; import android.widget.*; | [
"android.annotation",
"android.widget"
] | android.annotation; android.widget; | 2,119,373 |
public Timestamp getCreated();
public static final String COLUMNNAME_CreatedBy = "CreatedBy"; | Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR; | /** Get Created.
* Date this record was created
*/ | Get Created. Date this record was created | getCreated | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/I_I_ElementValue.java",
"license": "gpl-2.0",
"size": 11391
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,572,393 |
// -------------------------------------------------------------------------
// ---- Methods for EnvironmentTypes ---------------------------------------
// -------------------------------------------------------------------------
public EnvironmentTypes getKnownEnvironmentTypes() {
if (knownEnvironmentTypes==n... | EnvironmentTypes function() { if (knownEnvironmentTypes==null) { knownEnvironmentTypes = new EnvironmentTypes(); String envKey = "none"; String envDisplayName = STR; String envDisplayNameLanguage = Language.DE; Class<? extends EnvironmentController> envControllerClass = null; Class<? extends Agent> displayAgentClass = ... | /**
* This method returns all EnvironmentTypes known by Agent.GUI
* @return the knowEnvironmentTypes
* @see EnvironmentType
* @see EnvironmentTypes
*/ | This method returns all EnvironmentTypes known by Agent.GUI | getKnownEnvironmentTypes | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/config/GlobalInfo.java",
"license": "lgpl-2.1",
"size": 78561
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 53,478 |
public void parse(String systemId)
throws IOException, SAXException {
allowXMLCatalogPI = true;
setupBaseURI(systemId);
try {
super.parse(systemId);
} catch (InternalError ie) {
explain(systemId);
throw ie;
}
} | void function(String systemId) throws IOException, SAXException { allowXMLCatalogPI = true; setupBaseURI(systemId); try { super.parse(systemId); } catch (InternalError ie) { explain(systemId); throw ie; } } | /** SAX XMLReader API.
*
* @see #parse(InputSource)
*/ | SAX XMLReader API | parse | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java",
"license": "mit",
"size": 10923
} | [
"java.io.IOException",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 1,644,640 |
protected boolean checkPreparedPages(PageViewport newPageViewport,
boolean renderUnresolved) {
for (Iterator iter = prepared.iterator(); iter.hasNext();) {
PageViewport pageViewport = (PageViewport)iter.next();
if (pageViewport.isResolved() |... | boolean function(PageViewport newPageViewport, boolean renderUnresolved) { for (Iterator iter = prepared.iterator(); iter.hasNext();) { PageViewport pageViewport = (PageViewport)iter.next(); if (pageViewport.isResolved() renderUnresolved) { if (!renderer.supportsOutOfOrder() && pageViewport.getPageSequence().isFirstPag... | /**
* Check prepared pages
*
* @param newPageViewport the new page being added
* @param renderUnresolved render pages with unresolved idref's
* (done at end-of-document processing)
* @return true if the current page should be rendered
* false if the renderer doesn't s... | Check prepared pages | checkPreparedPages | {
"repo_name": "StrategyObject/fop",
"path": "src/java/org/apache/fop/area/RenderPagesModel.java",
"license": "apache-2.0",
"size": 9830
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,526,107 |
public void discardMostRecentElements(int i) throws MathIllegalArgumentException {
discardExtremeElements(i,false);
} | void function(int i) throws MathIllegalArgumentException { discardExtremeElements(i,false); } | /**
* Discards the {@code i} last elements of the array.
* <p>
* For example, if the array contains the elements 1,2,3,4, invoking
* {@code discardMostRecentElements(2)} will cause the last two elements
* to be discarded, leaving 1,2 in the array.
*
* @param i the number of elements ... | Discards the i last elements of the array. For example, if the array contains the elements 1,2,3,4, invoking discardMostRecentElements(2) will cause the last two elements to be discarded, leaving 1,2 in the array | discardMostRecentElements | {
"repo_name": "virtualdataset/metagen-java",
"path": "virtdata-lib-curves4/src/main/java/org/apache/commons/math4/util/ResizableDoubleArray.java",
"license": "apache-2.0",
"size": 32895
} | [
"org.apache.commons.math4.exception.MathIllegalArgumentException"
] | import org.apache.commons.math4.exception.MathIllegalArgumentException; | import org.apache.commons.math4.exception.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,052,748 |
public static ZergHosts from(Collection<ZergHost> hosts) {
return new ZergHosts(ImmutableSet.copyOf(hosts));
}
private static final Pattern ZONE_PATTERN = Pattern.compile("^(\\w+-\\w+)-(\\w+)$"); | static ZergHosts function(Collection<ZergHost> hosts) { return new ZergHosts(ImmutableSet.copyOf(hosts)); } private static final Pattern ZONE_PATTERN = Pattern.compile(STR); | /**
* Creates a ZergHosts set from a collection of {@link ZergHost}s.
*
* @param hosts the hosts to be in this set
* @return the ZergHosts
*/ | Creates a ZergHosts set from a collection of <code>ZergHost</code>s | from | {
"repo_name": "signal/agathon",
"path": "agathon-manager/src/main/java/com/brighttag/agathon/dao/zerg/ZergHosts.java",
"license": "apache-2.0",
"size": 6765
} | [
"com.google.common.collect.ImmutableSet",
"java.util.Collection",
"java.util.regex.Pattern"
] | import com.google.common.collect.ImmutableSet; import java.util.Collection; import java.util.regex.Pattern; | import com.google.common.collect.*; import java.util.*; import java.util.regex.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 490,697 |
@Message(id = 79, value = "Failed initializing module %s")
RuntimeException failedInitializingModule(@Cause Throwable cause, String name); | @Message(id = 79, value = STR) RuntimeException failedInitializingModule(@Cause Throwable cause, String name); | /**
* Creates an exception indicating a failure to initialize the module.
*
* @param cause the cause of the error.
* @param name the name of the module.
*
* @return a {@link RuntimeException} for the error.
*/ | Creates an exception indicating a failure to initialize the module | failedInitializingModule | {
"repo_name": "aloubyansky/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java",
"license": "lgpl-2.1",
"size": 164970
} | [
"org.jboss.logging.annotations.Cause",
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 79,079 |
EReference getAssociationEnd__IsSorted_1(); | EReference getAssociationEnd__IsSorted_1(); | /**
* Returns the meta object for the containment reference list '{@link cruise.umple.umple.AssociationEnd_#getIsSorted_1 <em>Is Sorted 1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Is Sorted 1</em>'.
* @see cruise.umple.umpl... | Returns the meta object for the containment reference list '<code>cruise.umple.umple.AssociationEnd_#getIsSorted_1 Is Sorted 1</code>'. | getAssociationEnd__IsSorted_1 | {
"repo_name": "ahmedvc/umple",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java",
"license": "mit",
"size": 485842
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 392,127 |
ISteamflakeTmTextDirective addTextDirective( Optional<IFileOrigin> origin, String text );
| ISteamflakeTmTextDirective addTextDirective( Optional<IFileOrigin> origin, String text ); | /**
* Creates a new text directive within this rule.
*
* @param origin the source file location of the new directive.
* @param text the text of the directive.
*
* @return the newly created directive.
*/ | Creates a new text directive within this rule | addTextDirective | {
"repo_name": "martin-nordberg/steamflake",
"path": "steamflake-templates/domain/steamflake-template-model/src/main/java/org/steamflake/templates/domain/model/api/elements/ISteamflakeTmDirectiveSequence.java",
"license": "apache-2.0",
"size": 3457
} | [
"java.util.Optional",
"org.steamflake.core.domain.base.model.api.utilities.IFileOrigin",
"org.steamflake.templates.domain.model.api.directives.text.ISteamflakeTmTextDirective"
] | import java.util.Optional; import org.steamflake.core.domain.base.model.api.utilities.IFileOrigin; import org.steamflake.templates.domain.model.api.directives.text.ISteamflakeTmTextDirective; | import java.util.*; import org.steamflake.core.domain.base.model.api.utilities.*; import org.steamflake.templates.domain.model.api.directives.text.*; | [
"java.util",
"org.steamflake.core",
"org.steamflake.templates"
] | java.util; org.steamflake.core; org.steamflake.templates; | 2,881,660 |
protected void connect(Object edge, Object terminal, boolean isSource,
boolean isClone)
{
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
model.beginUpdate();
try
{
if (isClone)
{
Object clone = graph.cloneCells(new Object[] { edge })[0];
Object parent... | void function(Object edge, Object terminal, boolean isSource, boolean isClone) { mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); model.beginUpdate(); try { if (isClone) { Object clone = graph.cloneCells(new Object[] { edge })[0]; Object parent = model.getParent(edge); graph.addCells(n... | /**
* Connects the given edge to the given source or target terminal.
*
* @param edge
* @param terminal
* @param isSource
*/ | Connects the given edge to the given source or target terminal | connect | {
"repo_name": "3w3rt0n/AmeacasInternas",
"path": "src/com/mxgraph/swing/handler/mxEdgeHandler.java",
"license": "apache-2.0",
"size": 18945
} | [
"com.mxgraph.view.mxConnectionConstraint"
] | import com.mxgraph.view.mxConnectionConstraint; | import com.mxgraph.view.*; | [
"com.mxgraph.view"
] | com.mxgraph.view; | 2,274,929 |
private void checkResourceRequirementsWithDelay() {
if (lastResourceRequirementsCheck == null || lastResourceRequirementsCheck.isDone()) {
lastResourceRequirementsCheck =
scheduledExecutor.schedule(
() -> mainThreadExecutor.execute(this::checkResou... | void function() { if (lastResourceRequirementsCheck == null lastResourceRequirementsCheck.isDone()) { lastResourceRequirementsCheck = scheduledExecutor.schedule( () -> mainThreadExecutor.execute(this::checkResourceRequirements), requirementsCheckDelay.toMilliseconds(), TimeUnit.MILLISECONDS); } } | /**
* Depending on the implementation of {@link ResourceAllocationStrategy}, checking resource
* requirements and potentially making a re-allocation can be heavy. In order to cover more
* changes with each check, thus reduce the frequency of unnecessary re-allocations, the checks
* are performed wit... | Depending on the implementation of <code>ResourceAllocationStrategy</code>, checking resource requirements and potentially making a re-allocation can be heavy. In order to cover more changes with each check, thus reduce the frequency of unnecessary re-allocations, the checks are performed with a slight delay | checkResourceRequirementsWithDelay | {
"repo_name": "tillrohrmann/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/FineGrainedSlotManager.java",
"license": "apache-2.0",
"size": 32650
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,506,981 |
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, List<?> args) {
return dslTemplate(cl, createTemplate(template), args);
} | static <T> DslTemplate<T> function(Class<? extends T> cl, String template, List<?> args) { return dslTemplate(cl, createTemplate(template), args); } | /**
* Create a new Template expression
*
* @param cl type of expression
* @param template template
* @param args template parameters
* @return template expression
*/ | Create a new Template expression | dslTemplate | {
"repo_name": "johnktims/querydsl",
"path": "querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java",
"license": "apache-2.0",
"size": 74346
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 164,310 |
private int getImageResourceForFile(File file) {
int res = R.drawable.file_document;
if (pointsToParentFolder(file)) {
res = R.drawable.arrow_up;
} else if (file.isDirectory()) {
res = R.drawable.folder;
} else if (GUESS_MUSIC.matcher(file.getName()).matches()) {
res = R.drawable.file_music;
} els... | int function(File file) { int res = R.drawable.file_document; if (pointsToParentFolder(file)) { res = R.drawable.arrow_up; } else if (file.isDirectory()) { res = R.drawable.folder; } else if (GUESS_MUSIC.matcher(file.getName()).matches()) { res = R.drawable.file_music; } else if (GUESS_IMAGE.matcher(file.getName()).mat... | /**
* Returns a drawable resource id for given file.
* This function is rather fast as the file type is guessed
* based on the extension.
*
* @return resource id to use.
*/ | Returns a drawable resource id for given file. This function is rather fast as the file type is guessed based on the extension | getImageResourceForFile | {
"repo_name": "xbao/vanilla",
"path": "src/ch/blinkenlights/android/vanilla/FileSystemAdapter.java",
"license": "gpl-3.0",
"size": 12663
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 197,326 |
CompletableFuture<Void> removeListener(MapEventListener<K, V> listener); | CompletableFuture<Void> removeListener(MapEventListener<K, V> listener); | /**
* Unregisters the specified listener such that it will no longer
* receive map change notifications.
*
* @param listener listener to unregister
* @return future that will be completed when the operation finishes
*/ | Unregisters the specified listener such that it will no longer receive map change notifications | removeListener | {
"repo_name": "osinstom/onos",
"path": "core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMap.java",
"license": "apache-2.0",
"size": 15961
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,854,914 |
public IQueue getQueueAppEvents(); | IQueue function(); | /**
* Gets {@link IQueue} to buffer application's events.
*
* @return
*/ | Gets <code>IQueue</code> to buffer application's events | getQueueAppEvents | {
"repo_name": "btnguyen2k/upas",
"path": "app/modules/registry/IRegistry.java",
"license": "mit",
"size": 2227
} | [
"com.github.ddth.queue.IQueue"
] | import com.github.ddth.queue.IQueue; | import com.github.ddth.queue.*; | [
"com.github.ddth"
] | com.github.ddth; | 312,980 |
protected Integer getNextAccountingLineNumber(CapitalAccountingLines capitalAccountingLine, CapitalAssetInformation capitalAsset) {
Integer nextAccountingLineNumber = 0;
List<CapitalAssetAccountsGroupDetails> capitalAssetAccountLines = capitalAsset.getCapitalAssetAccountsGroupDetails();
for ... | Integer function(CapitalAccountingLines capitalAccountingLine, CapitalAssetInformation capitalAsset) { Integer nextAccountingLineNumber = 0; List<CapitalAssetAccountsGroupDetails> capitalAssetAccountLines = capitalAsset.getCapitalAssetAccountsGroupDetails(); for (CapitalAssetAccountsGroupDetails capitalAssetAccountLine... | /**
* calculates the next accounting line number for accounts details for each capital asset.
* Goes through the current records and gets the last accounting line number.
*
* @param capitalAsset
* @return nextAccountingLineNumber
*/ | calculates the next accounting line number for accounts details for each capital asset. Goes through the current records and gets the last accounting line number | getNextAccountingLineNumber | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cab/document/service/impl/GlLineServiceImpl.java",
"license": "agpl-3.0",
"size": 46133
} | [
"java.util.List",
"org.kuali.kfs.fp.businessobject.CapitalAccountingLines",
"org.kuali.kfs.fp.businessobject.CapitalAssetAccountsGroupDetails",
"org.kuali.kfs.fp.businessobject.CapitalAssetInformation"
] | import java.util.List; import org.kuali.kfs.fp.businessobject.CapitalAccountingLines; import org.kuali.kfs.fp.businessobject.CapitalAssetAccountsGroupDetails; import org.kuali.kfs.fp.businessobject.CapitalAssetInformation; | import java.util.*; import org.kuali.kfs.fp.businessobject.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 2,882,561 |
public Document doFinal(Document context, Element element, boolean content)
throws Exception {
logger.log(java.util.logging.Level.FINE, "Processing source element...");
if(null == context)
logger.log(java.util.logging.Level.SEVERE, "Context document unexpectedly null...");
... | Document function(Document context, Element element, boolean content) throws Exception { logger.log(java.util.logging.Level.FINE, STR); if(null == context) logger.log(java.util.logging.Level.SEVERE, STR); if(null == element) logger.log(java.util.logging.Level.SEVERE, STR); _contextDocument = context; Document result = ... | /**
* Process the contents of a DOM <code>Element</code> node. The processing
* depends on the initialization parameters of
* {@link #init(int, Key) init()}.
*
* @param context the context <code>Document</code>.
* @param element the <code>Element</code> which contents is to be
* enc... | Process the contents of a DOM <code>Element</code> node. The processing depends on the initialization parameters of <code>#init(int, Key) init()</code> | doFinal | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xml/internal/security/encryption/XMLCipher.java",
"license": "apache-2.0",
"size": 155696
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,653,527 |
public PipeAdvertisement getAdvertisement(); | PipeAdvertisement function(); | /**
* Gets the pipe advertisement
*
* @return The advertisement
*/ | Gets the pipe advertisement | getAdvertisement | {
"repo_name": "johnjianfang/jxse",
"path": "src/main/java/net/jxta/pipe/OutputPipe.java",
"license": "apache-2.0",
"size": 5050
} | [
"net.jxta.protocol.PipeAdvertisement"
] | import net.jxta.protocol.PipeAdvertisement; | import net.jxta.protocol.*; | [
"net.jxta.protocol"
] | net.jxta.protocol; | 2,589,554 |
public static String getValidInputOverBlackListPatterns(String input, String... blackListPatterns)
throws IdentityValidationException {
if (StringUtils.isEmpty(input) || isValidOverBlackListPatterns(input, blackListPatterns)) {
return input;
}
throw new IdentityVali... | static String function(String input, String... blackListPatterns) throws IdentityValidationException { if (StringUtils.isEmpty(input) isValidOverBlackListPatterns(input, blackListPatterns)) { return input; } throw new IdentityValidationException( msgSection1 + String.format(msgSection3, getPatternString(blackListPatter... | /**
* Returns the input if valid over the given black list patterns else throws an IdentityValidationException
*
* @param input input
* @param blackListPatterns a String array of black list pattern keys
* @return input if valid over the given black list patterns else throws an Ident... | Returns the input if valid over the given black list patterns else throws an IdentityValidationException | getValidInputOverBlackListPatterns | {
"repo_name": "PasinduTennage/carbon-identity-framework",
"path": "components/identity-core/org.wso2.carbon.identity.base/src/main/java/org/wso2/carbon/identity/base/IdentityValidationUtil.java",
"license": "apache-2.0",
"size": 10711
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,316,843 |
@Nullable
public static Boolean getBooleanValue(@NotNull String value) {
value = StringUtil.toLowerCase(value);
if (ContainerUtil.newHashSet("true", "yes", "on", "1").contains(value)) return true;
if (ContainerUtil.newHashSet("false", "no", "off", "0", "").contains(value)) return false;
return null;... | static Boolean function(@NotNull String value) { value = StringUtil.toLowerCase(value); if (ContainerUtil.newHashSet("true", "yes", "on", "1").contains(value)) return true; if (ContainerUtil.newHashSet("false", "no", "off", "0", "").contains(value)) return false; return null; } | /**
* Converts the git config boolean value (which can be specified in various ways) to Java Boolean.
* @return true if the value represents "true", false if the value represents "false", null if the value doesn't look like a boolean value.
*/ | Converts the git config boolean value (which can be specified in various ways) to Java Boolean | getBooleanValue | {
"repo_name": "leafclick/intellij-community",
"path": "plugins/git4idea/src/git4idea/config/GitConfigUtil.java",
"license": "apache-2.0",
"size": 5926
} | [
"com.intellij.openapi.util.text.StringUtil",
"com.intellij.util.containers.ContainerUtil",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.util.text.*; import com.intellij.util.containers.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"com.intellij.util",
"org.jetbrains.annotations"
] | com.intellij.openapi; com.intellij.util; org.jetbrains.annotations; | 510,058 |
public void setScope(String value)
{
this.attributeMap.put(TagConstants.ATTRIBUTE_SCOPE, value);
} | void function(String value) { this.attributeMap.put(TagConstants.ATTRIBUTE_SCOPE, value); } | /**
* setter for the "scope" tag attribute.
* @param value attribute value
*/ | setter for the "scope" tag attribute | setScope | {
"repo_name": "martin-kuba/metacentrum-accounting",
"path": "metaacct/src/main/java/org/displaytag/tags/ColumnTag.java",
"license": "apache-2.0",
"size": 30040
} | [
"org.displaytag.util.TagConstants"
] | import org.displaytag.util.TagConstants; | import org.displaytag.util.*; | [
"org.displaytag.util"
] | org.displaytag.util; | 606,559 |
private boolean isTdbAuToBeConfigured(TdbAu tdbAu, Connection conn,
boolean isFirstRun, Configuration config) throws DbException {
final String DEBUG_HEADER = "processNewTdbAu(): ";
if (log.isDebug2()) {
log.debug2(DEBUG_HEADER + "tdbAu = " + tdbAu);
log.debug2(DEBUG_HEADER + "isFirstRun = "... | boolean function(TdbAu tdbAu, Connection conn, boolean isFirstRun, Configuration config) throws DbException { final String DEBUG_HEADER = STR; if (log.isDebug2()) { log.debug2(DEBUG_HEADER + STR + tdbAu); log.debug2(DEBUG_HEADER + STR + isFirstRun); } if (tdbAu.isDown()) { if (log.isDebug2()) log.debug2(DEBUG_HEADER + ... | /**
* Provides an indication of whether an archival unit needs to be configured.
*
* @param tdbAu
* A TdbAu for the archival unit to be processed.
* @param conn
* A Connection with the database connection to be used.
* @param isFirstRun
* A boolean with <code>true</co... | Provides an indication of whether an archival unit needs to be configured | isTdbAuToBeConfigured | {
"repo_name": "edina/lockss-daemon",
"path": "src/org/lockss/subscription/SubscriptionStarter.java",
"license": "bsd-3-clause",
"size": 26304
} | [
"java.sql.Connection",
"java.util.ArrayList",
"org.lockss.config.Configuration",
"org.lockss.config.TdbAu",
"org.lockss.db.DbException",
"org.lockss.plugin.ArchivalUnit"
] | import java.sql.Connection; import java.util.ArrayList; import org.lockss.config.Configuration; import org.lockss.config.TdbAu; import org.lockss.db.DbException; import org.lockss.plugin.ArchivalUnit; | import java.sql.*; import java.util.*; import org.lockss.config.*; import org.lockss.db.*; import org.lockss.plugin.*; | [
"java.sql",
"java.util",
"org.lockss.config",
"org.lockss.db",
"org.lockss.plugin"
] | java.sql; java.util; org.lockss.config; org.lockss.db; org.lockss.plugin; | 664,927 |
private void buildNewKey( Map<String,JSONObject> uniqueKey,
Map<String,JSONObject> lastUniqueKey,
List<Map<String,Object>> keyQuestions,
Map<Object,List<Object>> keyQuestionCombinations,
Object uniqueGroupId )
{
for ( int i = 0; i < keyQuestions.size(); ++i )
{
... | void function( Map<String,JSONObject> uniqueKey, Map<String,JSONObject> lastUniqueKey, List<Map<String,Object>> keyQuestions, Map<Object,List<Object>> keyQuestionCombinations, Object uniqueGroupId ) { for ( int i = 0; i < keyQuestions.size(); ++i ) { Map<String,Object> uniquePerEntityOrModuleQuestion = keyQuestions.get... | /**
* Generates a random unique key for a given module.
* Returns whether or not this key is actually a duplicate
* within the appropriate scope (per-module, per-entity or per-entitymodule).
*/ | Generates a random unique key for a given module. Returns whether or not this key is actually a duplicate within the appropriate scope (per-module, per-entity or per-entitymodule) | buildNewKey | {
"repo_name": "NCIP/edct-formbuilder",
"path": "src/main/java/com/healthcit/cacure/businessdelegates/GeneratedModuleDataManager.java",
"license": "bsd-3-clause",
"size": 41898
} | [
"com.healthcit.cacure.model.admin.GeneratedModuleDataDetail",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Map",
"net.sf.json.JSONObject"
] | import com.healthcit.cacure.model.admin.GeneratedModuleDataDetail; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import net.sf.json.JSONObject; | import com.healthcit.cacure.model.admin.*; import java.util.*; import net.sf.json.*; | [
"com.healthcit.cacure",
"java.util",
"net.sf.json"
] | com.healthcit.cacure; java.util; net.sf.json; | 2,816,379 |
public List<Axis> getUserAxes() {
List<Axis> r = new ArrayList<Axis>();
for (Axis a : axes)
if(!a.isSystem())
r.add(a);
return r;
} | List<Axis> function() { List<Axis> r = new ArrayList<Axis>(); for (Axis a : axes) if(!a.isSystem()) r.add(a); return r; } | /**
* Gets the subset of {@link AxisList} that are not system axes.
*
* @deprecated as of 1.373
* System vs user difference are generalized into extension point.
*/ | Gets the subset of <code>AxisList</code> that are not system axes | getUserAxes | {
"repo_name": "abayer/jenkins",
"path": "core/src/main/java/hudson/matrix/MatrixProject.java",
"license": "mit",
"size": 33330
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,223,132 |
public WorkItemClassificationNode updateClassificationNode(
final WorkItemClassificationNode postedNode,
final UUID project,
final TreeStructureGroup structureGroup,
final String path) {
final UUID locationId = UUID.fromString("5a172953-1b41-49d3-840a-33f79c3ce89f"); //$... | WorkItemClassificationNode function( final WorkItemClassificationNode postedNode, final UUID project, final TreeStructureGroup structureGroup, final String path) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new... | /**
* [Preview API 3.1-preview.2]
*
* @param postedNode
*
* @param project
* Project ID
* @param structureGroup
*
* @param path
*
* @return WorkItemClassificationNode
*/ | [Preview API 3.1-preview.2] | updateClassificationNode | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/workitemtracking/webapi/WorkItemTrackingHttpClientBase.java",
"license": "mit",
"size": 169431
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.TreeStructureGroup",
"com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.WorkItemClassificationNode",
"c... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.TreeStructureGroup; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.WorkItemClassificat... | import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 2,347,184 |
protected BoxFolder getCurrentFolder() {
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.box_browsesdk_fragment_container);
BoxFolder curFolder = fragment instanceof BoxBrowseFolderFragment ?
((BoxBrowseFolderFragment) fragment).getFolder() :
... | BoxFolder function() { Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.box_browsesdk_fragment_container); BoxFolder curFolder = fragment instanceof BoxBrowseFolderFragment ? ((BoxBrowseFolderFragment) fragment).getFolder() : null; return curFolder; } | /**
* Gets current folder.
*
* @return the current folder
*/ | Gets current folder | getCurrentFolder | {
"repo_name": "seema-at-box/box-android-browse-sdk",
"path": "box-browse-sdk/src/main/java/com/box/androidsdk/browse/activities/BoxBrowseActivity.java",
"license": "apache-2.0",
"size": 19444
} | [
"android.support.v4.app.Fragment",
"com.box.androidsdk.browse.fragments.BoxBrowseFolderFragment",
"com.box.androidsdk.content.models.BoxFolder"
] | import android.support.v4.app.Fragment; import com.box.androidsdk.browse.fragments.BoxBrowseFolderFragment; import com.box.androidsdk.content.models.BoxFolder; | import android.support.v4.app.*; import com.box.androidsdk.browse.fragments.*; import com.box.androidsdk.content.models.*; | [
"android.support",
"com.box.androidsdk"
] | android.support; com.box.androidsdk; | 829,697 |
public Collection<DatanodeDescriptor> getCorruptReplicas(Block block) {
return corruptReplicas.getNodes(block);
} | Collection<DatanodeDescriptor> function(Block block) { return corruptReplicas.getNodes(block); } | /**
* Get the replicas which are corrupt for a given block.
*/ | Get the replicas which are corrupt for a given block | getCorruptReplicas | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java",
"license": "apache-2.0",
"size": 138554
} | [
"java.util.Collection",
"org.apache.hadoop.hdfs.protocol.Block"
] | import java.util.Collection; import org.apache.hadoop.hdfs.protocol.Block; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,886,482 |
@Generated
@Selector("setLuminanceWeight:")
public native void setLuminanceWeight(float value); | @Selector(STR) native void function(float value); | /**
* Controls how samples' luminance values are compared during bilateral filtering. The final
* weight is given by exp(-abs(L1 - L2) / (luminanceWeight * luminanceVariance + EPSILON)). Must be
* greater than or equal to zero. Defaults to 4.
*/ | Controls how samples' luminance values are compared during bilateral filtering. The final weight is given by exp(-abs(L1 - L2) / (luminanceWeight * luminanceVariance + EPSILON)). Must be greater than or equal to zero. Defaults to 4 | setLuminanceWeight | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSSVGF.java",
"license": "apache-2.0",
"size": 51099
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,364,517 |
public Response updateUser(final UserResponse user); | Response function(final UserResponse user); | /**
* Service for updating a user.
*
* @param user json with user info.
* @return user info or message error.
*/ | Service for updating a user | updateUser | {
"repo_name": "tuliobraga/tech-gallery",
"path": "src/main/java/com/ciandt/techgallery/service/UserServiceTG.java",
"license": "apache-2.0",
"size": 1417
} | [
"com.ciandt.techgallery.service.model.Response",
"com.ciandt.techgallery.service.model.UserResponse"
] | import com.ciandt.techgallery.service.model.Response; import com.ciandt.techgallery.service.model.UserResponse; | import com.ciandt.techgallery.service.model.*; | [
"com.ciandt.techgallery"
] | com.ciandt.techgallery; | 1,454,430 |
Path createQuarantinePath(Path hFile) throws IOException {
// extract the normal dirs structure
Path cfDir = hFile.getParent();
Path regionDir = cfDir.getParent();
Path tableDir = regionDir.getParent();
// build up the corrupted dirs structure
Path corruptBaseDir = new Path(FSUtils.getRootDir... | Path createQuarantinePath(Path hFile) throws IOException { Path cfDir = hFile.getParent(); Path regionDir = cfDir.getParent(); Path tableDir = regionDir.getParent(); Path corruptBaseDir = new Path(FSUtils.getRootDir(conf), HConstants.CORRUPT_DIR_NAME); if (conf.get(STR) != null) { LOG.warn(STR + corruptBaseDir); } Path... | /**
* Given a path, generates a new path to where we move a corrupted hfile (bad
* trailer, no trailer).
*
* @param hFile
* Path to a corrupt hfile (assumes that it is HBASE_DIR/ table
* /region/cf/file)
* @return path to where corrupted files are stored. This should be
* ... | Given a path, generates a new path to where we move a corrupted hfile (bad trailer, no trailer) | createQuarantinePath | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/hbck/HFileCorruptionChecker.java",
"license": "apache-2.0",
"size": 19181
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.util.FSUtils"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.FSUtils; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,328,611 |
private static SOAPMessage sendRequest(String url, SOAPMessage message)
throws SOAPException {
SOAPConnection connection = null;
SOAPMessage response = null;
try {
connection = createConnection();
response = connection.call(message, url);
} finally... | static SOAPMessage function(String url, SOAPMessage message) throws SOAPException { SOAPConnection connection = null; SOAPMessage response = null; try { connection = createConnection(); response = connection.call(message, url); } finally { if (connection != null) { closeConnection(connection); } } return response; } | /**
* Sends the SOAP message request to the SOAP server
*
* @param url
* the endpoint of the web service
* @param message
* the SOAP message to be send
* @return the response, SOAP message
* @throws SOAPException
* if unable to send request
... | Sends the SOAP message request to the SOAP server | sendRequest | {
"repo_name": "bolobr/IEBT-Libreplan",
"path": "libreplan-webapp/src/main/java/org/libreplan/importers/TimSoapClient.java",
"license": "agpl-3.0",
"size": 11460
} | [
"javax.xml.soap.SOAPConnection",
"javax.xml.soap.SOAPException",
"javax.xml.soap.SOAPMessage"
] | import javax.xml.soap.SOAPConnection; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; | import javax.xml.soap.*; | [
"javax.xml"
] | javax.xml; | 2,528,804 |
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr());
doPost (request, response);
} // doGet
| void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.info(STR + request.getRemoteHost() + STR + request.getRemoteAddr()); doPost (request, response); } | /**
* Process the initial HTTP Get request.
* Reads the Parameter Amt and optional C_Invoice_ID
*
* @param request request
* @param response response
* @throws ServletException
* @throws IOException
*/ | Process the initial HTTP Get request. Reads the Parameter Amt and optional C_Invoice_ID | doGet | {
"repo_name": "erpcya/adempierePOS",
"path": "serverApps/src/main/servlet/org/compiere/wstore/ProductServlet.java",
"license": "gpl-2.0",
"size": 4770
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,551,882 |
void doFindMarkers(ArrayList<IMarker> result, String type, boolean includeSubtypes) {
// MarkerManager markerMan = ((Workspace) ResourcesPlugin.getWorkspace()).getMarkerManager();
// for (int i = 0; i < resources.length; i++)
// markerMan.doFindMarkers(resources[i], result, type, includeSubtypes, depth);
throw... | void doFindMarkers(ArrayList<IMarker> result, String type, boolean includeSubtypes) { throw new UnsupportedOperationException(STR); } | /**
* Efficient implementation of {@link #findMarkers(String, boolean)}, not
* available to clients because underlying non-API methods are used that
* may change.
*/ | Efficient implementation of <code>#findMarkers(String, boolean)</code>, not available to clients because underlying non-API methods are used that may change | doFindMarkers | {
"repo_name": "dhuebner/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/core/resources/mapping/ResourceTraversal.java",
"license": "epl-1.0",
"size": 6703
} | [
"java.util.ArrayList",
"org.eclipse.core.resources.IMarker"
] | import java.util.ArrayList; import org.eclipse.core.resources.IMarker; | import java.util.*; import org.eclipse.core.resources.*; | [
"java.util",
"org.eclipse.core"
] | java.util; org.eclipse.core; | 1,703,324 |
private static void addAbstractedAttribute(String tag, double value, String unit, MetadataElement dest, String desc) {
final MetadataAttribute attribute = new MetadataAttribute(tag, ProductData.TYPE_FLOAT64, 1);
attribute.getData().setElems(new double[]{value});
attribute.setUnit(unit);
... | static void function(String tag, double value, String unit, MetadataElement dest, String desc) { final MetadataAttribute attribute = new MetadataAttribute(tag, ProductData.TYPE_FLOAT64, 1); attribute.getData().setElems(new double[]{value}); attribute.setUnit(unit); attribute.setDescription(desc); dest.addAttribute(attr... | /**
* Adds an attribute from src to dest
*
* @param tag the name of the attribute
* @param value the double value
* @param unit the unit string
* @param dest the destination element
* @param desc the description
*/ | Adds an attribute from src to dest | addAbstractedAttribute | {
"repo_name": "arraydev/snap-engine",
"path": "snap-envisat-reader/src/main/java/org/esa/snap/dataio/envisat/AsarAbstractMetadata.java",
"license": "gpl-3.0",
"size": 31804
} | [
"org.esa.snap.framework.datamodel.MetadataAttribute",
"org.esa.snap.framework.datamodel.MetadataElement",
"org.esa.snap.framework.datamodel.ProductData"
] | import org.esa.snap.framework.datamodel.MetadataAttribute; import org.esa.snap.framework.datamodel.MetadataElement; import org.esa.snap.framework.datamodel.ProductData; | import org.esa.snap.framework.datamodel.*; | [
"org.esa.snap"
] | org.esa.snap; | 2,396,405 |
@SuppressWarnings("unchecked")
public HB options(Map<String, Object> options) {
this.options = options;
return (HB) this;
}
/**
* @return the value set by {@link #options(Map)} | @SuppressWarnings(STR) HB function(Map<String, Object> options) { this.options = options; return (HB) this; } /** * @return the value set by {@link #options(Map)} | /**
* Allows to set custom options for custom highlighters.
*/ | Allows to set custom options for custom highlighters | options | {
"repo_name": "henakamaMSFT/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java",
"license": "apache-2.0",
"size": 22299
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,877,573 |
public void refreshReferencingContentlets(File file, boolean live); | void function(File file, boolean live); | /**
* Refreshes (regenerates) all content files referenced by a given file asset
* @param file asset
* @param live contentlets or not
*/ | Refreshes (regenerates) all content files referenced by a given file asset | refreshReferencingContentlets | {
"repo_name": "guhb/core",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPostHook.java",
"license": "gpl-3.0",
"size": 52012
} | [
"com.dotmarketing.portlets.files.model.File"
] | import com.dotmarketing.portlets.files.model.File; | import com.dotmarketing.portlets.files.model.*; | [
"com.dotmarketing.portlets"
] | com.dotmarketing.portlets; | 644,631 |
public void testMultipleInsertRetrieve0()
throws DatabaseException {
initEnv(false);
Locker txn = new BasicLocker(DbInternal.envGetEnvironmentImpl(env));
NullCursor cursor = new NullCursor(tree.getDatabase(), txn);
for (int i = 0; i < 21; i++) {
byte[] key = ne... | void function() throws DatabaseException { initEnv(false); Locker txn = new BasicLocker(DbInternal.envGetEnvironmentImpl(env)); NullCursor cursor = new NullCursor(tree.getDatabase(), txn); for (int i = 0; i < 21; i++) { byte[] key = new byte[N_KEY_BYTES]; TestUtils.generateRandomAlphaBytes(key); insertAndRetrieve(curso... | /**
* Slightly less rudimentary test inserting a handfull of keys and LN's.
*/ | Slightly less rudimentary test inserting a handfull of keys and LN's | testMultipleInsertRetrieve0 | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/je-3.2.74/test/com/sleepycat/je/tree/TreeTest.java",
"license": "gpl-2.0",
"size": 11828
} | [
"com.sleepycat.je.DatabaseException",
"com.sleepycat.je.DbInternal",
"com.sleepycat.je.dbi.NullCursor",
"com.sleepycat.je.txn.BasicLocker",
"com.sleepycat.je.txn.Locker",
"com.sleepycat.je.util.TestUtils"
] | import com.sleepycat.je.DatabaseException; import com.sleepycat.je.DbInternal; import com.sleepycat.je.dbi.NullCursor; import com.sleepycat.je.txn.BasicLocker; import com.sleepycat.je.txn.Locker; import com.sleepycat.je.util.TestUtils; | import com.sleepycat.je.*; import com.sleepycat.je.dbi.*; import com.sleepycat.je.txn.*; import com.sleepycat.je.util.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 571,327 |
public void init(Properties configuration, SQLHandler sqlHandler, String dialect, List<String> schemaNames) {
this.configuration = configuration;
this.sqlHandler = sqlHandler;
this.dbSupports = getDbSupports(configuration, sqlHandler, dialect, schemaNames);
this.defaultDbSupport = ge... | void function(Properties configuration, SQLHandler sqlHandler, String dialect, List<String> schemaNames) { this.configuration = configuration; this.sqlHandler = sqlHandler; this.dbSupports = getDbSupports(configuration, sqlHandler, dialect, schemaNames); this.defaultDbSupport = getDefaultDbSupport(configuration, sqlHan... | /**
* Initializes the database operation class with the given {@link Properties}, {@link DataSource}.
*
* @param configuration The configuration, not null
* @param sqlHandler The sql handler, not null
*/ | Initializes the database operation class with the given <code>Properties</code>, <code>DataSource</code> | init | {
"repo_name": "arteam/unitils",
"path": "unitils-dbmaintainer/src/main/java/org/unitils/dbmaintainer/util/BaseDatabaseAccessor.java",
"license": "apache-2.0",
"size": 2983
} | [
"java.util.List",
"java.util.Properties",
"org.apache.commons.collections.CollectionUtils",
"org.unitils.core.dbsupport.DbSupportFactory",
"org.unitils.core.dbsupport.SQLHandler"
] | import java.util.List; import java.util.Properties; import org.apache.commons.collections.CollectionUtils; import org.unitils.core.dbsupport.DbSupportFactory; import org.unitils.core.dbsupport.SQLHandler; | import java.util.*; import org.apache.commons.collections.*; import org.unitils.core.dbsupport.*; | [
"java.util",
"org.apache.commons",
"org.unitils.core"
] | java.util; org.apache.commons; org.unitils.core; | 2,748,831 |
public void start(Context context, android.support.v4.app.Fragment fragment) {
start(context, fragment, REQUEST_CROP);
} | void function(Context context, android.support.v4.app.Fragment fragment) { start(context, fragment, REQUEST_CROP); } | /**
* Send the crop Intent from a support library Fragment
*
* @param context Context
* @param fragment Fragment to receive result
*/ | Send the crop Intent from a support library Fragment | start | {
"repo_name": "liuyanggithub/SuperSelector",
"path": "app/src/main/java/com/ly/selector/util/Crop.java",
"license": "mit",
"size": 7975
} | [
"android.app.Fragment",
"android.content.Context"
] | import android.app.Fragment; import android.content.Context; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 1,451,342 |
public Properties getSubstitutableProperties() {
return substitutableProperties;
} | Properties function() { return substitutableProperties; } | /**
* Returns all substitutable properties defined on this CoreDescriptor
* @return all substitutable properties defined on this CoreDescriptor
*/ | Returns all substitutable properties defined on this CoreDescriptor | getSubstitutableProperties | {
"repo_name": "visouza/solr-5.0.0",
"path": "solr/core/src/java/org/apache/solr/core/CoreDescriptor.java",
"license": "apache-2.0",
"size": 14566
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,305,203 |
private void applyState(CustomHashtable checked, CustomHashtable grayed,
Widget widget) {
Item[] items = getChildren(widget);
for (int i = 0; i < items.length; i++) {
Item item = items[i];
if (item instanceof TreeItem) {
Object data = item.getDat... | void function(CustomHashtable checked, CustomHashtable grayed, Widget widget) { Item[] items = getChildren(widget); for (int i = 0; i < items.length; i++) { Item item = items[i]; if (item instanceof TreeItem) { Object data = item.getData(); if (data != null) { TreeItem ti = (TreeItem) item; ti.setChecked(checked.contai... | /**
* Applies the checked and grayed states of the given widget and its
* descendents.
*
* @param checked a set of elements (element type: <code>Object</code>)
* @param grayed a set of elements (element type: <code>Object</code>)
* @param widget the widget
*/ | Applies the checked and grayed states of the given widget and its descendents | applyState | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/jface/viewers/CheckboxTreeViewer.java",
"license": "epl-1.0",
"size": 22544
} | [
"org.eclipse.swt.widgets.Item",
"org.eclipse.swt.widgets.TreeItem",
"org.eclipse.swt.widgets.Widget"
] | import org.eclipse.swt.widgets.Item; import org.eclipse.swt.widgets.TreeItem; import org.eclipse.swt.widgets.Widget; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 648,118 |
public void request(String contact, boolean batch)
throws GramException, GSSException {
Gram.request(contact, this, batch);
} | void function(String contact, boolean batch) throws GramException, GSSException { Gram.request(contact, this, batch); } | /**
* Submits a job to the specified gatekeeper either as
* an interactive or batch job. Performs limited delegation.
*
* @param contact
* the resource manager contact.
* @param batch
* specifies if the job should be submitted as
* a batch job.
* @th... | Submits a job to the specified gatekeeper either as an interactive or batch job. Performs limited delegation | request | {
"repo_name": "dCache/jglobus-1.8",
"path": "src/org/globus/gram/GramJob.java",
"license": "apache-2.0",
"size": 10987
} | [
"org.ietf.jgss.GSSException"
] | import org.ietf.jgss.GSSException; | import org.ietf.jgss.*; | [
"org.ietf.jgss"
] | org.ietf.jgss; | 2,013,034 |
private void setQueryFilterSingleValue(SolrQuery query, String fieldKey, String fieldValue, String fieldNegate) {
String fieldQuery;
if (StringUtils.isNotEmpty(fieldNegate) && fieldNegate.equalsIgnoreCase(
SolrConstants.NEGATE_VALUE_DEFAULT)) {
fieldQuery = fieldKey + Sol... | void function(SolrQuery query, String fieldKey, String fieldValue, String fieldNegate) { String fieldQuery; if (StringUtils.isNotEmpty(fieldNegate) && fieldNegate.equalsIgnoreCase( SolrConstants.NEGATE_VALUE_DEFAULT)) { fieldQuery = fieldKey + SolrConstants.SOLR_NEGATE_VALUE + fieldKey + fieldValue; } else { fieldQuery... | /**
* Method to add the query filter for single fields (resource author, resource last updater, resource media type)
* @param fieldValue resource value
* @param query solr query
* @param fieldNegate resource negation
*/ | Method to add the query filter for single fields (resource author, resource last updater, resource media type) | setQueryFilterSingleValue | {
"repo_name": "arunasujith/carbon-registry",
"path": "components/registry/org.wso2.carbon.registry.indexing/src/main/java/org/wso2/carbon/registry/indexing/solr/SolrClient.java",
"license": "apache-2.0",
"size": 53679
} | [
"org.apache.commons.lang.StringUtils",
"org.apache.solr.client.solrj.SolrQuery",
"org.wso2.carbon.registry.indexing.SolrConstants"
] | import org.apache.commons.lang.StringUtils; import org.apache.solr.client.solrj.SolrQuery; import org.wso2.carbon.registry.indexing.SolrConstants; | import org.apache.commons.lang.*; import org.apache.solr.client.solrj.*; import org.wso2.carbon.registry.indexing.*; | [
"org.apache.commons",
"org.apache.solr",
"org.wso2.carbon"
] | org.apache.commons; org.apache.solr; org.wso2.carbon; | 1,722,438 |
void onDrawerOpened(View drawerView); | void onDrawerOpened(View drawerView); | /**
* Called when a drawer has settled in a completely open state.
* The drawer is interactive at this point.
*
* @param drawerView Drawer view that is now open
*/ | Called when a drawer has settled in a completely open state. The drawer is interactive at this point | onDrawerOpened | {
"repo_name": "JakeWharton/u2020",
"path": "app/src/internalDebug/java/com/jakewharton/u2020/ui/debug/DebugDrawerLayout.java",
"license": "apache-2.0",
"size": 65682
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,652,715 |
@Test
public void whenFoundByPhoneThenFound() {
var dictionary = new PhoneDictionary();
dictionary.add(new Person("Alexey", "Tolstonogov", "Krasnoyarsk", "424242"));
dictionary.add(new Person("Nikolay", "Funtikov", "Moscow", "878787"));
dictionary.add(new Person("Evgeniy", "Esin"... | void function() { var dictionary = new PhoneDictionary(); dictionary.add(new Person(STR, STR, STR, STR)); dictionary.add(new Person(STR, STR, STR, STR)); dictionary.add(new Person(STR, "Esin", STR, STR)); assertThat(dictionary.find("87").iterator().next().getSurname(), is(STR)); } | /**
* key == "87" -> phone == "878787" -> surname == "Funtikov".
*/ | key == "87" -> phone == "878787" -> surname == "Funtikov" | whenFoundByPhoneThenFound | {
"repo_name": "tolstinator/atolstonogov",
"path": "chapter_003/src/test/java/ru/job4j/search/PhoneDictionaryTest.java",
"license": "apache-2.0",
"size": 2901
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 1,810,428 |
String addCompositeApiFromDefinition(InputStream apiDefinition) throws APIManagementException; | String addCompositeApiFromDefinition(InputStream apiDefinition) throws APIManagementException; | /**
* Create Composite API from Swagger Definition
*
* @param apiDefinition Swagger content of the Composite API.
* @return Details of the added Composite API.
* @throws APIManagementException If failed to add Composite API.
*/ | Create Composite API from Swagger Definition | addCompositeApiFromDefinition | {
"repo_name": "Minoli/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/api/APIStore.java",
"license": "apache-2.0",
"size": 24087
} | [
"java.io.InputStream",
"org.wso2.carbon.apimgt.core.exception.APIManagementException"
] | import java.io.InputStream; import org.wso2.carbon.apimgt.core.exception.APIManagementException; | import java.io.*; import org.wso2.carbon.apimgt.core.exception.*; | [
"java.io",
"org.wso2.carbon"
] | java.io; org.wso2.carbon; | 2,660,803 |
public static Document createDom(final InputStream inputStream) {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
org.w3c.dom.Document w3cDocument = null;
try {
final DocumentBuilder builder = factory.newDocumentBuilder();
w3cDocument = bu... | static Document function(final InputStream inputStream) { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); org.w3c.dom.Document w3cDocument = null; try { final DocumentBuilder builder = factory.newDocumentBuilder(); w3cDocument = builder.parse(inputStream); } catch (ParserConfigurationExcept... | /**
* Creates a parsed {@link Document} from the given {@link InputStream inputStream}.
*
* @param inputStream the stream to be parsed
* @return a parsed inputStream
*/ | Creates a parsed <code>Document</code> from the given <code>InputStream inputStream</code> | createDom | {
"repo_name": "lveci/nest",
"path": "beam/beam-core/src/main/java/org/esa/beam/dataio/dimap/DimapProductHelpers.java",
"license": "gpl-3.0",
"size": 94410
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"org.esa.beam.util.Debug",
"org.jdom.Document",
"org.jdom.input.DOMBuilder",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.esa.beam.util.Debug; import org.jdom.Document; import org.jdom.input.DOMBuilder; import org.xml.sax.SAXExce... | import java.io.*; import javax.xml.parsers.*; import org.esa.beam.util.*; import org.jdom.*; import org.jdom.input.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.esa.beam",
"org.jdom",
"org.jdom.input",
"org.xml.sax"
] | java.io; javax.xml; org.esa.beam; org.jdom; org.jdom.input; org.xml.sax; | 1,738,544 |
public Set<AddOn> getUninstalls() {
return uninstalls;
} | Set<AddOn> function() { return uninstalls; } | /**
* Gets the add-ons that need to be uninstalled as result of the changes.
*
* @return the the add-ons that need to be uninstalled
*/ | Gets the add-ons that need to be uninstalled as result of the changes | getUninstalls | {
"repo_name": "JordanGS/zaproxy",
"path": "src/org/zaproxy/zap/extension/autoupdate/AddOnDependencyChecker.java",
"license": "apache-2.0",
"size": 40883
} | [
"java.util.Set",
"org.zaproxy.zap.control.AddOn"
] | import java.util.Set; import org.zaproxy.zap.control.AddOn; | import java.util.*; import org.zaproxy.zap.control.*; | [
"java.util",
"org.zaproxy.zap"
] | java.util; org.zaproxy.zap; | 1,321,880 |
@Override
public IntHashMap clone() {
try {
IntHashMap t = (IntHashMap) super.clone();
t.table = new Entry[table.length];
for (int i = table.length; i-- > 0; ) {
t.table[i] = (table[i] != null)
? (Entry) table[i].clone() : null;
}
t.keySet = null;
t.entrySet = null;
t.values = null;... | IntHashMap function() { try { IntHashMap t = (IntHashMap) super.clone(); t.table = new Entry[table.length]; for (int i = table.length; i-- > 0; ) { t.table[i] = (table[i] != null) ? (Entry) table[i].clone() : null; } t.keySet = null; t.entrySet = null; t.values = null; t.modCount = 0; return t; } catch (CloneNotSupport... | /**
* Returns a shallow copy of this <code>IntHashMap</code> instance: the keys and
* values themselves are not cloned.
*
* @return a shallow copy of this map.
*/ | Returns a shallow copy of this <code>IntHashMap</code> instance: the keys and values themselves are not cloned | clone | {
"repo_name": "wjw465150/jodd",
"path": "jodd-core/src/main/java/jodd/util/collection/IntHashMap.java",
"license": "bsd-2-clause",
"size": 20924
} | [
"java.util.Collection",
"java.util.Set"
] | import java.util.Collection; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 300,754 |
private void addMetadataItems( final Map<String, MetadataItem> metadataItemMap, final EventQueryParams params,
final List<Option> itemOptions )
{
boolean includeDetails = params.isIncludeMetadataDetails();
if ( !params.isSkipData() )
{
// filtering if the rows in gri... | void function( final Map<String, MetadataItem> metadataItemMap, final EventQueryParams params, final List<Option> itemOptions ) { boolean includeDetails = params.isIncludeMetadataDetails(); if ( !params.isSkipData() ) { itemOptions.forEach( option -> metadataItemMap.put( option.getUid(), new MetadataItem( option.getDis... | /**
* Add into the MetadataItemMap itemOptions
*
* @param metadataItemMap MetadataItemMap.
* @param params EventQueryParams.
* @param itemOptions itemOtion list.
*/ | Add into the MetadataItemMap itemOptions | addMetadataItems | {
"repo_name": "dhis2/dhis2-core",
"path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/AbstractAnalyticsService.java",
"license": "bsd-3-clause",
"size": 21883
} | [
"java.util.Arrays",
"java.util.List",
"java.util.Map",
"org.hisp.dhis.analytics.event.EventQueryParams",
"org.hisp.dhis.common.MetadataItem",
"org.hisp.dhis.common.QueryItem",
"org.hisp.dhis.option.Option"
] | import java.util.Arrays; import java.util.List; import java.util.Map; import org.hisp.dhis.analytics.event.EventQueryParams; import org.hisp.dhis.common.MetadataItem; import org.hisp.dhis.common.QueryItem; import org.hisp.dhis.option.Option; | import java.util.*; import org.hisp.dhis.analytics.event.*; import org.hisp.dhis.common.*; import org.hisp.dhis.option.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 1,265,253 |
public Deferred<Object> addPoint(final String metric,
final long timestamp,
final long value,
final Map<String, String> tags) {
final byte[] v;
if (Byte.MIN_VALUE <= value && value <= Byte.MAX_VALUE) {
... | Deferred<Object> function(final String metric, final long timestamp, final long value, final Map<String, String> tags) { final byte[] v; if (Byte.MIN_VALUE <= value && value <= Byte.MAX_VALUE) { v = new byte[] { (byte) value }; } else if (Short.MIN_VALUE <= value && value <= Short.MAX_VALUE) { v = Bytes.fromShort((shor... | /**
* Adds a single integer value data point in the TSDB.
* @param metric A non-empty string.
* @param timestamp The timestamp associated with the value.
* @param value The value of the data point.
* @param tags The tags on this series. This map must be non-empty.
* @return A deferred object that ind... | Adds a single integer value data point in the TSDB | addPoint | {
"repo_name": "pepperdata/opentsdb",
"path": "opentsdb-core/src/main/java/net/opentsdb/core/TSDB.java",
"license": "lgpl-2.1",
"size": 55721
} | [
"com.stumbleupon.async.Deferred",
"java.util.Map",
"org.hbase.async.Bytes"
] | import com.stumbleupon.async.Deferred; import java.util.Map; import org.hbase.async.Bytes; | import com.stumbleupon.async.*; import java.util.*; import org.hbase.async.*; | [
"com.stumbleupon.async",
"java.util",
"org.hbase.async"
] | com.stumbleupon.async; java.util; org.hbase.async; | 1,417,245 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.