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 void setSponsorName(String sponsorName) {
sponsorName = Utils.setEmptyToNull(sponsorName);
this.sponsorName = sponsorName;
}
| void function(String sponsorName) { sponsorName = Utils.setEmptyToNull(sponsorName); this.sponsorName = sponsorName; } | /**
* Sets the sponsor name.
*
* @param sponsorName the new sponsor name
*/ | Sets the sponsor name | setSponsorName | {
"repo_name": "rmap-project/share-client",
"path": "src/main/java/info/rmapproject/cos/share/client/model/Sponsor.java",
"license": "apache-2.0",
"size": 2358
} | [
"info.rmapproject.cos.share.client.utils.Utils"
] | import info.rmapproject.cos.share.client.utils.Utils; | import info.rmapproject.cos.share.client.utils.*; | [
"info.rmapproject.cos"
] | info.rmapproject.cos; | 8,486 |
if (isWindows()) {
return new WindowsBackupInspector(backupDir);
}
return new UnixBackupInspector(backupDir);
}
public BackupInspector(File backupDir) throws IOException {
this.backupDir = backupDir;
if (!backupDir.exists()) {
throw new IOException("Backup directory " + backupDir.g... | if (isWindows()) { return new WindowsBackupInspector(backupDir); } return new UnixBackupInspector(backupDir); } public BackupInspector(File backupDir) throws IOException { this.backupDir = backupDir; if (!backupDir.exists()) { throw new IOException(STR + backupDir.getAbsolutePath() + STR); } File restoreFile = getResto... | /**
* Returns a BackupInspector for a member's backup directory.
*
* @param backupDir a member's backup directory.
* @return a new BackupInspector.
* @throws IOException the backup directory was malformed.
*/ | Returns a BackupInspector for a member's backup directory | createInspector | {
"repo_name": "prasi-in/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/persistence/BackupInspector.java",
"license": "apache-2.0",
"size": 9796
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,375,219 |
@Override
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
JournalTrace info = (JournalTrace) o;
int rc = super.tightMarshal1(wireFormat, o, bs);
rc += tightMarshalString1(info.getMessage(), bs);
return rc + 0;
} | int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { JournalTrace info = (JournalTrace) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getMessage(), bs); return rc + 0; } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | tightMarshal1 | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v6/JournalTraceMarshaller.java",
"license": "apache-2.0",
"size": 4129
} | [
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.JournalTrace"
] | import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.JournalTrace; | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 260,617 |
public void setDataSource(InputStream is, String mimeType, Runnable onCompletion) throws IOException{
video = MediaManager.createMedia(is, mimeType, onCompletion);
initUI();
} | void function(InputStream is, String mimeType, Runnable onCompletion) throws IOException{ video = MediaManager.createMedia(is, mimeType, onCompletion); initUI(); } | /**
* Sets the data source of this video player
* @param stream the stream containing the media data
* @param mimeType the type of the data in the stream
* @return Media a Media Object that can be used to control the playback
* of the media
* @throws java.io.IOException if the creation of... | Sets the data source of this video player | setDataSource | {
"repo_name": "shannah/cn1",
"path": "CodenameOne/src/com/codename1/components/MediaPlayer.java",
"license": "gpl-2.0",
"size": 10930
} | [
"com.codename1.media.MediaManager",
"java.io.IOException",
"java.io.InputStream"
] | import com.codename1.media.MediaManager; import java.io.IOException; import java.io.InputStream; | import com.codename1.media.*; import java.io.*; | [
"com.codename1.media",
"java.io"
] | com.codename1.media; java.io; | 261,594 |
public Map<IOFSwitch, Map<MacVlanPair,Integer>> getTable(); | Map<IOFSwitch, Map<MacVlanPair,Integer>> function(); | /**
* Returns the LearningSwitch's learned host table
* @return The learned host table
*/ | Returns the LearningSwitch's learned host table | getTable | {
"repo_name": "rcchan/cs168-sdn-floodlight",
"path": "src/main/java/net/floodlightcontroller/learningswitch/ILearningSwitchService.java",
"license": "apache-2.0",
"size": 1130
} | [
"java.util.Map",
"net.floodlightcontroller.core.IOFSwitch",
"net.floodlightcontroller.core.types.MacVlanPair"
] | import java.util.Map; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.core.types.MacVlanPair; | import java.util.*; import net.floodlightcontroller.core.*; import net.floodlightcontroller.core.types.*; | [
"java.util",
"net.floodlightcontroller.core"
] | java.util; net.floodlightcontroller.core; | 1,069,398 |
public static org.w3c.dom.Node referenceToNode(Object obj, DOM dom) {
if (obj instanceof Node || obj instanceof DTMAxisIterator) {
DTMAxisIterator iter = referenceToNodeSet(obj);
return dom.makeNode(iter);
}
else if (obj instanceof DOM) {
dom = (DOM)ob... | static org.w3c.dom.Node function(Object obj, DOM dom) { if (obj instanceof Node obj instanceof DTMAxisIterator) { DTMAxisIterator iter = referenceToNodeSet(obj); return dom.makeNode(iter); } else if (obj instanceof DOM) { dom = (DOM)obj; DTMAxisIterator iter = dom.getChildren(DTMDefaultBase.ROOTNODE); return dom.makeNo... | /**
* Utility function: used to convert reference to org.w3c.dom.Node.
*/ | Utility function: used to convert reference to org.w3c.dom.Node | referenceToNode | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java",
"license": "mit",
"size": 57511
} | [
"org.apache.xml.dtm.DTMAxisIterator",
"org.apache.xml.dtm.ref.DTMDefaultBase"
] | import org.apache.xml.dtm.DTMAxisIterator; import org.apache.xml.dtm.ref.DTMDefaultBase; | import org.apache.xml.dtm.*; import org.apache.xml.dtm.ref.*; | [
"org.apache.xml"
] | org.apache.xml; | 395,218 |
@Test
public void testAddImmediatelyEditE2E() throws Exception {
List<IFileSpec> submittedFiles = null;
List<IFileSpec> editedFiles = null;
debugPrintTestName("testAddImmediatelyEditE2E");
String clientRoot = client.getRoot();
assertNotNull("clientRoot should not be Nul... | void function() throws Exception { List<IFileSpec> submittedFiles = null; List<IFileSpec> editedFiles = null; debugPrintTestName(STR); String clientRoot = client.getRoot(); assertNotNull(STR, clientRoot); String newFile = clientRoot + File.separator + testId + File.separator + STR; String newBaseFile = prepareTestFile(... | /**
* This tests that you can use the fileSpec returned from addFiles+submit in
* the editFiles method. Add->Submit->Edit[submittedFSpecs].
*/ | This tests that you can use the fileSpec returned from addFiles+submit in the editFiles method. Add->Submit->Edit[submittedFSpecs] | testAddImmediatelyEditE2E | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/endtoend/ClientEditSubmitE2ETest.java",
"license": "apache-2.0",
"size": 52979
} | [
"com.perforce.p4java.core.file.IFileSpec",
"java.io.File",
"java.util.List",
"org.junit.Assert"
] | import com.perforce.p4java.core.file.IFileSpec; import java.io.File; import java.util.List; import org.junit.Assert; | import com.perforce.p4java.core.file.*; import java.io.*; import java.util.*; import org.junit.*; | [
"com.perforce.p4java",
"java.io",
"java.util",
"org.junit"
] | com.perforce.p4java; java.io; java.util; org.junit; | 731,681 |
public int GetBestNumFeaturesAcrossOuterFolds() throws Exception
{
ArrayList<Integer> numFeaturesOptions = Singletons.Config.GetNumFeaturesOptions(Processor, FeatureSelectionAlgorithm);
if (numFeaturesOptions.size() == 1)
return numFeaturesOptions.get(0);
if (_bestNu... | int function() throws Exception { ArrayList<Integer> numFeaturesOptions = Singletons.Config.GetNumFeaturesOptions(Processor, FeatureSelectionAlgorithm); if (numFeaturesOptions.size() == 1) return numFeaturesOptions.get(0); if (_bestNumFeaturesAllFolds == 0) { double bestResult = Double.MIN_VALUE; for (int numFeatures :... | /** Identifies the option for the number of features that performed best across all outer cross-validation folds. The "best" performance is determined according to performance within outer cross-validation folds.
*
* @return Best number of features
* @throws Exception
*/ | Identifies the option for the number of features that performed best across all outer cross-validation folds. The "best" performance is determined according to performance within outer cross-validation folds | GetBestNumFeaturesAcrossOuterFolds | {
"repo_name": "srp33/ML-Flex",
"path": "Internals/Java/core/ModelSelector.java",
"license": "gpl-3.0",
"size": 16618
} | [
"java.util.ArrayList",
"java.util.concurrent.ConcurrentHashMap"
] | import java.util.ArrayList; import java.util.concurrent.ConcurrentHashMap; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,063,370 |
public String getPreviousInvoiceDocumentNumber() {
CustomerInvoiceDocument _previousInvoiceDocument = null;
PaymentApplicationInvoiceApply invoiceApplication = getSelectedInvoiceApplication();
CustomerInvoiceDocument selectedInvoiceDocument = invoiceApplication == null ? null : invoiceAppli... | String function() { CustomerInvoiceDocument _previousInvoiceDocument = null; PaymentApplicationInvoiceApply invoiceApplication = getSelectedInvoiceApplication(); CustomerInvoiceDocument selectedInvoiceDocument = invoiceApplication == null ? null : invoiceApplication.getInvoice(); if (null == selectedInvoiceDocument 2 >... | /**
* This method gets the previous invoice document number
*
* @return the previous invoice document number
*/ | This method gets the previous invoice document number | getPreviousInvoiceDocumentNumber | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/ar/document/web/struts/PaymentApplicationDocumentForm.java",
"license": "apache-2.0",
"size": 29869
} | [
"java.util.Iterator",
"org.kuali.kfs.module.ar.document.CustomerInvoiceDocument"
] | import java.util.Iterator; import org.kuali.kfs.module.ar.document.CustomerInvoiceDocument; | import java.util.*; import org.kuali.kfs.module.ar.document.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 2,448,895 |
public KualiDecimal getTotalDollarAmount() {
KualiDecimal sumTotalAmount = getTotalCoinAmount().add(getTotalCurrencyAmount());
return sumTotalAmount;
}
| KualiDecimal function() { KualiDecimal sumTotalAmount = getTotalCoinAmount().add(getTotalCurrencyAmount()); return sumTotalAmount; } | /**
* This method returns the overall total of the document - coin plus check plus cash.
*
* @return KualiDecimal
*/ | This method returns the overall total of the document - coin plus check plus cash | getTotalDollarAmount | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/document/web/struts/DepositWizardForm.java",
"license": "agpl-3.0",
"size": 18130
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,228,441 |
public AtomicIntegerArrayAssert isSortedAccordingTo(Comparator<? super Integer> comparator) {
arrays.assertIsSortedAccordingToComparator(info, array, comparator);
return myself;
} | AtomicIntegerArrayAssert function(Comparator<? super Integer> comparator) { arrays.assertIsSortedAccordingToComparator(info, array, comparator); return myself; } | /**
* Verifies that the actual AtomicIntegerArray is sorted according to the given comparator.<br> Empty arrays are considered sorted whatever
* the comparator is.<br> One element arrays are considered sorted if the element is compatible with comparator, otherwise an
* AssertionError is thrown.
*
* @par... | Verifies that the actual AtomicIntegerArray is sorted according to the given comparator. Empty arrays are considered sorted whatever the comparator is. One element arrays are considered sorted if the element is compatible with comparator, otherwise an AssertionError is thrown | isSortedAccordingTo | {
"repo_name": "ChrisCanCompute/assertj-core",
"path": "src/main/java/org/assertj/core/api/AtomicIntegerArrayAssert.java",
"license": "apache-2.0",
"size": 25209
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 2,682,875 |
@Test
public void testSimpleFlush() throws IOException {
Configuration conf = new HdfsConfiguration();
if (simulatedStorage) {
SimulatedFSDataset.setFactory(conf);
}
fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE);
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf... | void function() throws IOException { Configuration conf = new HdfsConfiguration(); if (simulatedStorage) { SimulatedFSDataset.setFactory(conf); } fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fs = cluster.getFileSystem()... | /**
* Test a simple flush on a simple HDFS file.
* @throws IOException an exception might be thrown
*/ | Test a simple flush on a simple HDFS file | testSimpleFlush | {
"repo_name": "tomatoKiller/Hadoop_Source_Learn",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend.java",
"license": "apache-2.0",
"size": 12998
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,044,596 |
private State<T> createState(String name, State.StateType stateType) {
String stateName = stateNameHandler.getUniqueInternalName(name);
State<T> state = new State<>(stateName, stateType);
states.add(state);
return state;
} | State<T> function(String name, State.StateType stateType) { String stateName = stateNameHandler.getUniqueInternalName(name); State<T> state = new State<>(stateName, stateType); states.add(state); return state; } | /**
* Creates a state with {@link State.StateType#Normal} and adds it to the collection of created states.
* Should be used instead of instantiating with new operator.
*
* @return the created state
*/ | Creates a state with <code>State.StateType#Normal</code> and adds it to the collection of created states. Should be used instead of instantiating with new operator | createState | {
"repo_name": "mtunique/flink",
"path": "flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/compiler/NFACompiler.java",
"license": "apache-2.0",
"size": 37769
} | [
"org.apache.flink.cep.nfa.State"
] | import org.apache.flink.cep.nfa.State; | import org.apache.flink.cep.nfa.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,094,006 |
public void delete() throws AccessControlException {
removeFromAllGroups();
}
private InetAddress networkAddress; | void function() throws AccessControlException { removeFromAllGroups(); } private InetAddress networkAddress; | /**
* Delete an IP range
*
* @throws AccessControlException if the delete failed
*/ | Delete an IP range | delete | {
"repo_name": "apache/lenya",
"path": "src/java/org/apache/lenya/ac/impl/AbstractIPRange.java",
"license": "apache-2.0",
"size": 15343
} | [
"java.net.InetAddress",
"org.apache.lenya.ac.AccessControlException"
] | import java.net.InetAddress; import org.apache.lenya.ac.AccessControlException; | import java.net.*; import org.apache.lenya.ac.*; | [
"java.net",
"org.apache.lenya"
] | java.net; org.apache.lenya; | 945,185 |
public void runTestIt4( String dir, String targetFile )
throws Exception
{
TransformMojo mojo = (TransformMojo) newMojo( dir );
mojo.execute();
Document doc1 = parse( new File( dir, "xml/doc1.xml" ) );
doc1.normalize();
Document doc2 = parse( new File( dir, "targe... | void function( String dir, String targetFile ) throws Exception { TransformMojo mojo = (TransformMojo) newMojo( dir ); mojo.execute(); Document doc1 = parse( new File( dir, STR ) ); doc1.normalize(); Document doc2 = parse( new File( dir, STR + targetFile ) ); doc2.normalize(); Element doc1Element = doc1.getDocumentElem... | /**
* Common code for the it4, it6 and it10 test projects.
*/ | Common code for the it4, it6 and it10 test projects | runTestIt4 | {
"repo_name": "G-Ork/xml-maven-plugin",
"path": "src/test/java/org/codehaus/mojo/xml/test/TransformMojoTest.java",
"license": "apache-2.0",
"size": 12870
} | [
"java.io.File",
"org.codehaus.mojo.xml.TransformMojo",
"org.w3c.dom.Document",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import java.io.File; import org.codehaus.mojo.xml.TransformMojo; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; | import java.io.*; import org.codehaus.mojo.xml.*; import org.w3c.dom.*; | [
"java.io",
"org.codehaus.mojo",
"org.w3c.dom"
] | java.io; org.codehaus.mojo; org.w3c.dom; | 2,771,646 |
@GET("/balance")
Single<Balance> getBalance(
@Query("account_id") String accountId
); | @GET(STR) Single<Balance> getBalance( @Query(STR) String accountId ); | /**
* Loads the balance for the authenticated user.
*
* @see <a href="https://monzo.com/docs/#read-balance">https://monzo.com/docs/#read-balance</a>
*/ | Loads the balance for the authenticated user | getBalance | {
"repo_name": "ChristianGarcia/MonzoRetrofit",
"path": "monzo-retrofit/src/main/java/com/christiangp/monzoapi/RxMonzoApiService.java",
"license": "apache-2.0",
"size": 10198
} | [
"com.christiangp.monzoapi.model.Balance",
"io.reactivex.Single"
] | import com.christiangp.monzoapi.model.Balance; import io.reactivex.Single; | import com.christiangp.monzoapi.model.*; import io.reactivex.*; | [
"com.christiangp.monzoapi",
"io.reactivex"
] | com.christiangp.monzoapi; io.reactivex; | 1,606,750 |
synchronized static Map<String, Throwable> loadAllLibraries(GpacConfig config) {
if (errors != null)
return errors;
StringBuilder sb = new StringBuilder();
final String[] toLoad = { "GLESv1_CM", "dl", "log",//$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
"j... | synchronized static Map<String, Throwable> loadAllLibraries(GpacConfig config) { if (errors != null) return errors; StringBuilder sb = new StringBuilder(); final String[] toLoad = { STR, "dl", "log", STR, STR, "mad", STR, "ft2", STR, STR, "png", "z", STR, "faad", "gpac", STR, STR, STR, STR }; HashMap<String, Throwable>... | /**
* Loads all libraries
*
* @param config
*
* @return a map of exceptions containing the library as key and the exception as value. If map is empty, no error
*
*/ | Loads all libraries | loadAllLibraries | {
"repo_name": "Kurtnoise/gpac",
"path": "applications/osmo4_android/src/com/gpac/Osmo4/GPACInstance.java",
"license": "lgpl-2.1",
"size": 13380
} | [
"android.util.Log",
"java.io.File",
"java.io.PrintStream",
"java.util.Collections",
"java.util.Date",
"java.util.HashMap",
"java.util.Map"
] | import android.util.Log; import java.io.File; import java.io.PrintStream; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Map; | import android.util.*; import java.io.*; import java.util.*; | [
"android.util",
"java.io",
"java.util"
] | android.util; java.io; java.util; | 2,409,263 |
AsyncExecutions<Boolean> msetnx(Map<K, V> map); | AsyncExecutions<Boolean> msetnx(Map<K, V> map); | /**
* Set multiple keys to multiple values, only if none of the keys exist.
*
* @param map the map.
* @return Boolean integer-reply specifically:
*
* {@code 1} if the all the keys were set. {@code 0} if no key was set (at least one key already existed).
*/ | Set multiple keys to multiple values, only if none of the keys exist | msetnx | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionStringAsyncCommands.java",
"license": "apache-2.0",
"size": 15955
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,187,841 |
public void init(IWorkbench workbench, IStructuredSelection selection) {
//this.selection = selection;
return;
} | void function(IWorkbench workbench, IStructuredSelection selection) { return; } | /**
* We will accept the selection in the workbench to see if we can initialize from it.
*
* @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
*/ | We will accept the selection in the workbench to see if we can initialize from it | init | {
"repo_name": "longsebo/javasec",
"path": "eclipse-plugin/quickbundle-gp/src/main/java/org/quickbundle/mda/gp/GenerateProjectWizard.java",
"license": "apache-2.0",
"size": 3800
} | [
"org.eclipse.jface.viewers.IStructuredSelection",
"org.eclipse.ui.IWorkbench"
] | import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IWorkbench; | import org.eclipse.jface.viewers.*; import org.eclipse.ui.*; | [
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.jface; org.eclipse.ui; | 194,420 |
public void mark(int readAheadLimit) throws IOException {
throw new IOException(fFormatter.formatMessage(fLocale, "OperationNotSupported", new Object[]{"mark()", "UTF-8"}));
} // mark(int) | void function(int readAheadLimit) throws IOException { throw new IOException(fFormatter.formatMessage(fLocale, STR, new Object[]{STR, "UTF-8"})); } | /**
* Mark the present position in the stream. Subsequent calls to reset()
* will attempt to reposition the stream to this point. Not all
* character-input streams support the mark() operation.
*
* @param readAheadLimit Limit on the number of characters that may be
* ... | Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation | mark | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/xerces/src/org/apache/xerces/impl/io/UTF8Reader.java",
"license": "gpl-2.0",
"size": 23829
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,374,277 |
public static boolean isWellFormedRaw(ViolationCollector v, DocOp op) {
// We validate the operation against the empty document. It will likely
// be invalid; however, we ignore the validity aspect anyway since we
// only care about well-formedness.
return !validate(v, DocumentSchema.NO_SCHEMA_CONSTR... | static boolean function(ViolationCollector v, DocOp op) { return !validate(v, DocumentSchema.NO_SCHEMA_CONSTRAINTS, DocOpAutomaton.EMPTY_DOCUMENT, op) .isIllFormed(); } private static final class IllFormed extends RuntimeException { IllFormed(String message) { super(message); } | /**
* Same as {@link #isWellFormed(ViolationCollector, DocOp)}, but without
* the fast path for BufferedDocOpImpl
*/ | Same as <code>#isWellFormed(ViolationCollector, DocOp)</code>, but without the fast path for BufferedDocOpImpl | isWellFormedRaw | {
"repo_name": "processone/google-wave-api",
"path": "wave-model/src/main/java/org/waveprotocol/wave/model/document/operation/impl/DocOpValidator.java",
"license": "apache-2.0",
"size": 7081
} | [
"org.waveprotocol.wave.model.document.operation.DocOp",
"org.waveprotocol.wave.model.document.operation.automaton.DocOpAutomaton",
"org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema"
] | import org.waveprotocol.wave.model.document.operation.DocOp; import org.waveprotocol.wave.model.document.operation.automaton.DocOpAutomaton; import org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema; | import org.waveprotocol.wave.model.document.operation.*; import org.waveprotocol.wave.model.document.operation.automaton.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 1,185,986 |
public static List<Object> loadFieldValues(MappedFieldType fieldType,
FetchSubPhase.HitContext hitContext,
boolean forceSource) throws IOException {
//percolator needs to always load from source, thus it sets the g... | static List<Object> function(MappedFieldType fieldType, FetchSubPhase.HitContext hitContext, boolean forceSource) throws IOException { List<Object> textsToHighlight; TextSearchInfo tsi = fieldType.getTextSearchInfo(); if (forceSource == false && tsi.isStored()) { CustomFieldsVisitor fieldVisitor = new CustomFieldsVisit... | /**
* Load field values for highlighting.
*/ | Load field values for highlighting | loadFieldValues | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightUtils.java",
"license": "apache-2.0",
"size": 3188
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.List",
"org.apache.lucene.search.highlight.DefaultEncoder",
"org.apache.lucene.search.highlight.Encoder",
"org.apache.lucene.search.highlight.SimpleHTMLEncoder",
"org.elasticsearch.index.fieldvisitor.CustomFieldsVisitor",
"org.elasticsearch.in... | import java.io.IOException; import java.util.Collections; import java.util.List; import org.apache.lucene.search.highlight.DefaultEncoder; import org.apache.lucene.search.highlight.Encoder; import org.apache.lucene.search.highlight.SimpleHTMLEncoder; import org.elasticsearch.index.fieldvisitor.CustomFieldsVisitor; impo... | import java.io.*; import java.util.*; import org.apache.lucene.search.highlight.*; import org.elasticsearch.index.fieldvisitor.*; import org.elasticsearch.index.mapper.*; import org.elasticsearch.search.fetch.*; import org.elasticsearch.search.lookup.*; | [
"java.io",
"java.util",
"org.apache.lucene",
"org.elasticsearch.index",
"org.elasticsearch.search"
] | java.io; java.util; org.apache.lucene; org.elasticsearch.index; org.elasticsearch.search; | 2,224,036 |
public final static AUID namebasedAUID(
byte[] nameData)
throws NullPointerException {
return AUIDImpl.namebasedAUID(nameData);
}
| final static AUID function( byte[] nameData) throws NullPointerException { return AUIDImpl.namebasedAUID(nameData); } | /**
* <p>Generates a new UUID as an AUID generated with the name-based method, type 3. This
* method is based on {@link java.util.UUID#nameUUIDFromBytes(byte[])} that uses an
* MD5 hashing algorithm.</p>
*
* @param nameData Name data to use to create a name-based UUID.
* @return Name-based UUID as an A... | Generates a new UUID as an AUID generated with the name-based method, type 3. This method is based on <code>java.util.UUID#nameUUIDFromBytes(byte[])</code> that uses an MD5 hashing algorithm | namebasedAUID | {
"repo_name": "AMWA-TV/maj",
"path": "src/main/java/tv/amwa/maj/industry/Forge.java",
"license": "apache-2.0",
"size": 104487
} | [
"tv.amwa.maj.record.impl.AUIDImpl"
] | import tv.amwa.maj.record.impl.AUIDImpl; | import tv.amwa.maj.record.impl.*; | [
"tv.amwa.maj"
] | tv.amwa.maj; | 1,054,030 |
private JsonNode json(Iterable<Device> devices,
Map<Device, List<FlowEntry>> flows) {
ObjectMapper mapper = new ObjectMapper();
ArrayNode result = mapper.createArrayNode();
for (Device device : devices) {
result.add(json(mapper, device, flows.get(device)... | JsonNode function(Iterable<Device> devices, Map<Device, List<FlowEntry>> flows) { ObjectMapper mapper = new ObjectMapper(); ArrayNode result = mapper.createArrayNode(); for (Device device : devices) { result.add(json(mapper, device, flows.get(device))); } return result; } | /**
* Produces a JSON array of flows grouped by the each device.
*
* @param devices collection of devices to group flow by
* @param flows collection of flows per each device
* @return JSON array
*/ | Produces a JSON array of flows grouped by the each device | json | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "cli/src/main/java/org/onosproject/cli/net/FlowsListCommand.java",
"license": "apache-2.0",
"size": 13038
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.ObjectMapper",
"com.fasterxml.jackson.databind.node.ArrayNode",
"java.util.List",
"java.util.Map",
"org.onosproject.net.Device",
"org.onosproject.net.flow.FlowEntry"
] | import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import java.util.List; import java.util.Map; import org.onosproject.net.Device; import org.onosproject.net.flow.FlowEntry; | import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import java.util.*; import org.onosproject.net.*; import org.onosproject.net.flow.*; | [
"com.fasterxml.jackson",
"java.util",
"org.onosproject.net"
] | com.fasterxml.jackson; java.util; org.onosproject.net; | 1,913,190 |
public void testPeriodic() {
LiveWindow.run();
} | void function() { LiveWindow.run(); } | /**
* This function is called periodically during test mode
*/ | This function is called periodically during test mode | testPeriodic | {
"repo_name": "wjaneal/liastem",
"path": "java/6162_3739/src/org/usfirst/frc/team6162/robot/Robot.java",
"license": "gpl-3.0",
"size": 3657
} | [
"edu.wpi.first.wpilibj.livewindow.LiveWindow"
] | import edu.wpi.first.wpilibj.livewindow.LiveWindow; | import edu.wpi.first.wpilibj.livewindow.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 900,349 |
@Override
public void run (long timeToRun) {
// Increment the frame number
frame++;
// Clear the list of tasks to run
runList.size = 0;
// Go through each task
for (int i = 0; i < schedulableRecords.size; i++) {
SchedulableRecord record = schedulableRecords.get(i);
// If it is due, schedule it
... | void function (long timeToRun) { frame++; runList.size = 0; for (int i = 0; i < schedulableRecords.size; i++) { SchedulableRecord record = schedulableRecords.get(i); if ((frame + record.phase) % record.frequency == 0) runList.add(record); } long lastTime = TimeUtils.nanoTime(); int numToRun = runList.size; for (int i =... | /** Executes scheduled tasks based on their frequency and phase. This method must be called once per frame.
* @param timeToRun the maximum time in nanoseconds this scheduler should run on the current frame. */ | Executes scheduled tasks based on their frequency and phase. This method must be called once per frame | run | {
"repo_name": "atomixnmc/AtomMiniGdx",
"path": "src/sg/atom/core/execution/LoadBalancingScheduler.java",
"license": "apache-2.0",
"size": 5889
} | [
"sg.atom.core.execution.SchedulerBase"
] | import sg.atom.core.execution.SchedulerBase; | import sg.atom.core.execution.*; | [
"sg.atom.core"
] | sg.atom.core; | 1,616,183 |
private void butNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butNewActionPerformed
if (butNew.getText().equals("New")) {
this.newView();
}
else {
if (butNew.getText().equals("Save")) {
if (this.validateView()) {
... | void function(java.awt.event.ActionEvent evt) { if (butNew.getText().equals("New")) { this.newView(); } else { if (butNew.getText().equals("Save")) { if (this.validateView()) { this.insertProduct(); butNew.setText("New"); butFirst.setEnabled(true); butPrevious.setEnabled(true); butNext.setEnabled(true); butLast.setEnab... | /**
* New product
* @param evt Event
*/ | New product | butNewActionPerformed | {
"repo_name": "jfmendozam/BillApp",
"path": "BillApp/src/billapp/view/FraProduct.java",
"license": "apache-2.0",
"size": 25170
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,145,873 |
protected void addInlineTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EnrichMediator_inlineType_feature"),
getString("_UI_PropertyDesc... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.ENRICH_MEDIATOR__INLINE_TYPE, true, false, false, ItemPropertyDescriptor.GENE... | /**
* This adds a property descriptor for the Inline Type feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/ | This adds a property descriptor for the Inline Type feature. | addInlineTypePropertyDescriptor | {
"repo_name": "sohaniwso2/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EnrichMediatorItemProvider.java",
"license": "apache-2.0",
"size": 16091
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 261,098 |
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
{
if (!worldIn.isRemote && entityIn.canTrample(worldIn, this, pos, fallDistance)) // Forge: Move logic to Entity#canTrample
{
this.turnToDirt(worldIn, pos);
}
super.onFa... | void function(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) { if (!worldIn.isRemote && entityIn.canTrample(worldIn, this, pos, fallDistance)) { this.turnToDirt(worldIn, pos); } super.onFallenUpon(worldIn, pos, entityIn, fallDistance); } | /**
* Block's chance to react to a living entity falling on it.
*/ | Block's chance to react to a living entity falling on it | onFallenUpon | {
"repo_name": "InverMN/MinecraftForgeReference",
"path": "MinecraftBlocks/BlockFarmland.java",
"license": "unlicense",
"size": 7157
} | [
"net.minecraft.entity.Entity",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.entity.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 2,127,469 |
public void setShadow(Drawable shadow, int edgeFlag) {
if ((edgeFlag & EDGE_LEFT) != 0) {
mShadowLeft = shadow;
} else if ((edgeFlag & EDGE_RIGHT) != 0) {
mShadowRight = shadow;
} else if ((edgeFlag & EDGE_BOTTOM) != 0) {
mShadowBottom = shadow;
}
... | void function(Drawable shadow, int edgeFlag) { if ((edgeFlag & EDGE_LEFT) != 0) { mShadowLeft = shadow; } else if ((edgeFlag & EDGE_RIGHT) != 0) { mShadowRight = shadow; } else if ((edgeFlag & EDGE_BOTTOM) != 0) { mShadowBottom = shadow; } invalidate(); } | /**
* Set a drawable used for edge shadow.
*
* @param shadow Drawable to use
* @param edgeFlag Combination of edgeflag describing the edge to set
* @see #EDGE_LEFT
* @see #EDGE_RIGHT
* @see #EDGE_BOTTOM
*/ | Set a drawable used for edge shadow | setShadow | {
"repo_name": "DragonLz/CYXBS_Android_V2.0",
"path": "app/src/main/java/com/mredrock/cyxbs/presenter/activity/swipebacklayout/SwipeBackLayout.java",
"license": "apache-2.0",
"size": 20243
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,085,078 |
public static DismountEntityEvent createDismountEntityEvent(Cause cause, Entity targetEntity) {
HashMap<String, Object> values = new HashMap<>();
values.put("cause", cause);
values.put("targetEntity", targetEntity);
return SpongeEventFactoryUtils.createEventImpl(DismountEntityEvent.c... | static DismountEntityEvent function(Cause cause, Entity targetEntity) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put(STR, targetEntity); return SpongeEventFactoryUtils.createEventImpl(DismountEntityEvent.class, values); } | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.entity.DismountEntityEvent}.
*
* @param cause The cause
* @param targetEntity The target entity
* @return A new dismount entity event
*/ | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.entity.DismountEntityEvent</code> | createDismountEntityEvent | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 215110
} | [
"java.util.HashMap",
"org.spongepowered.api.entity.Entity",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.event.entity.DismountEntityEvent"
] | import java.util.HashMap; import org.spongepowered.api.entity.Entity; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.event.entity.DismountEntityEvent; | import java.util.*; import org.spongepowered.api.entity.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.event.entity.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,946,695 |
public void archive(List<Contentlet> contentlets, User user, boolean respectFrontendRoles) throws DotDataException,DotSecurityException, DotContentletStateException;
public void unarchive(List<Contentlet> contentlets, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException, DotConte... | void archive(List<Contentlet> contentlets, User user, boolean respectFrontendRoles) throws DotDataException,DotSecurityException, DotContentletStateException; public void function(List<Contentlet> contentlets, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException, DotContentletStateExce... | /**
* This method unarchives the given contentlets
* @param contentlets
* @param user
* @param respectFrontendRoles
* @throws DotDataException
* @throws DotSecurityException
* @throws DotContentletStateException If one or more of the contentlets are not archived. It will unarchive all that it can though
... | This method unarchives the given contentlets | unarchive | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPI.java",
"license": "gpl-3.0",
"size": 64036
} | [
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.exception.DotSecurityException",
"com.dotmarketing.portlets.contentlet.model.Contentlet",
"com.liferay.portal.model.User",
"java.util.List"
] | import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.liferay.portal.model.User; import java.util.List; | import com.dotmarketing.exception.*; import com.dotmarketing.portlets.contentlet.model.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotmarketing.exception",
"com.dotmarketing.portlets",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal; java.util; | 1,733,267 |
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mViewContainer = (FrameLayout) findViewById(R.id.main_activity_view_container);
// Setting the client id string on the ArcGISRuntime class will set the app
// license level to Basic. ArcGISRuntime.setClientId() must be called ... | super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mViewContainer = (FrameLayout) findViewById(R.id.main_activity_view_container); LicenseResult licenseResult = ArcGISRuntime.setClientId(CLIENT_ID); LicenseLevel licenseLevel = ArcGISRuntime.License.getLicenseLevel(); if (licenseResult == Licens... | /**
* Called when the activity is starting. Set the client ID and initialize
* license.
*/ | Called when the activity is starting. Set the client ID and initialize license | onCreate | {
"repo_name": "ibrucekong/arcgis-runtime-samples-android",
"path": "StandardLicenseOffline/src/main/java/com/esri/arcgis/android/samples/standardlicenseoffline/MainActivity.java",
"license": "apache-2.0",
"size": 15853
} | [
"android.widget.FrameLayout",
"com.esri.android.runtime.ArcGISRuntime",
"com.esri.core.runtime.LicenseLevel",
"com.esri.core.runtime.LicenseResult"
] | import android.widget.FrameLayout; import com.esri.android.runtime.ArcGISRuntime; import com.esri.core.runtime.LicenseLevel; import com.esri.core.runtime.LicenseResult; | import android.widget.*; import com.esri.android.runtime.*; import com.esri.core.runtime.*; | [
"android.widget",
"com.esri.android",
"com.esri.core"
] | android.widget; com.esri.android; com.esri.core; | 871,946 |
EventQueue.invokeLater(new Runnable() { | EventQueue.invokeLater(new Runnable() { | /**
* Launch the application.
*/ | Launch the application | main | {
"repo_name": "Eggop92/IS_Replicantes",
"path": "src/packinterfaz/InicioJugar.java",
"license": "gpl-2.0",
"size": 2382
} | [
"java.awt.EventQueue"
] | import java.awt.EventQueue; | import java.awt.*; | [
"java.awt"
] | java.awt; | 183,700 |
private void addParts() {
Set parts = views.getPartSet();
if (parts.isEmpty()) {
System.out.println("Adding Parts");
parts.add(new Part("P1", "Nut", "Red",
new Weight(12.0, Weight.GRAMS), "London"));
parts.add(new Part("P2", "Bolt", "Green",
n... | void function() { Set parts = views.getPartSet(); if (parts.isEmpty()) { System.out.println(STR); parts.add(new Part("P1", "Nut", "Red", new Weight(12.0, Weight.GRAMS), STR)); parts.add(new Part("P2", "Bolt", "Green", new Weight(17.0, Weight.GRAMS), "Paris")); parts.add(new Part("P3", "Screw", "Blue", new Weight(17.0, ... | /**
* Populate the part entities in the database. If the part set is not
* empty, assume that this has already been done.
*/ | Populate the part entities in the database. If the part set is not empty, assume that this has already been done | addParts | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/je-3.2.74/examples/collections/ship/tuple/Sample.java",
"license": "gpl-2.0",
"size": 7930
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,731,342 |
private void init(String fileName) throws IOException {
BufferedReader br = new BufferedReader(new FileReader(fileName));
String line = null;
String[] tokens = null;
double[] numbers = null;
while ((line = br.readLine()) != null) {
tokens = line.split(" ");
numbers = new double[tokens.length -... | void function(String fileName) throws IOException { BufferedReader br = new BufferedReader(new FileReader(fileName)); String line = null; String[] tokens = null; double[] numbers = null; while ((line = br.readLine()) != null) { tokens = line.split(" "); numbers = new double[tokens.length - 1]; for (int i = 0; i < token... | /**
* It loads the probability data from the specified file.
* @param fileName - the path of the file which has the probability data
* @throws IOException
*/ | It loads the probability data from the specified file | init | {
"repo_name": "alexk9/jhannanum-alexk",
"path": "src/kr/ac/kaist/swrc/jhannanum/plugin/MajorPlugin/PosTagger/HmmPosTagger/ProbabilityDBM.java",
"license": "gpl-3.0",
"size": 2570
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,561,590 |
public void testClassElement1() throws Exception
{
Class targetClass = Mammal.class;
validateClassElements(targetClass);
validateAttributeElement(targetClass, "id", "ii");
validateAttributeElement(targetClass, "hairColor", "st");
}
| void function() throws Exception { Class targetClass = Mammal.class; validateClassElements(targetClass); validateAttributeElement(targetClass, "id", "ii"); validateAttributeElement(targetClass, STR, "st"); } | /**
* Verifies that the 'element' and 'complexType' elements
* corresponding to the Class are present in the XSD
* Verifies that the Class attributes are present in the XSD
*
* @throws Exception
*/ | Verifies that the 'element' and 'complexType' elements corresponding to the Class are present in the XSD Verifies that the Class attributes are present in the XSD | testClassElement1 | {
"repo_name": "NCIP/cacore-sdk",
"path": "sdk-toolkit/iso-example-project/junit/src/test/xsd/OneChildXSDTest.java",
"license": "bsd-3-clause",
"size": 1982
} | [
"gov.nih.nci.cacoresdk.domain.inheritance.onechild.Mammal"
] | import gov.nih.nci.cacoresdk.domain.inheritance.onechild.Mammal; | import gov.nih.nci.cacoresdk.domain.inheritance.onechild.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 666,843 |
public static long writeToFile(Content content, java.io.File outputFile,
Supplier<Boolean> cancelCheck, long startingOffset, long endingOffset) throws IOException {
InputStream in = new ReadContentInputStream(content);
long totalRead = 0;
try (FileOutputStream out = new ... | static long function(Content content, java.io.File outputFile, Supplier<Boolean> cancelCheck, long startingOffset, long endingOffset) throws IOException { InputStream in = new ReadContentInputStream(content); long totalRead = 0; try (FileOutputStream out = new FileOutputStream(outputFile, false)) { long offsetSkipped =... | /**
* Reads all the data from any content object and writes (extracts) it to a
* file, using a cancellation check instead of a Future object method.
*
* @param content Any content object.
* @param outputFile Will be created if it doesn't exist, and overwritten
* if ... | Reads all the data from any content object and writes (extracts) it to a file, using a cancellation check instead of a Future object method | writeToFile | {
"repo_name": "rcordovano/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java",
"license": "apache-2.0",
"size": 20990
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.function.Supplier",
"org.sleuthkit.datamodel.Content",
"org.sleuthkit.datamodel.File",
"org.sleuthkit.datamodel.ReadContentInputStream"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.function.Supplier; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.File; import org.sleuthkit.datamodel.ReadContentInputStream; | import java.io.*; import java.util.function.*; import org.sleuthkit.datamodel.*; | [
"java.io",
"java.util",
"org.sleuthkit.datamodel"
] | java.io; java.util; org.sleuthkit.datamodel; | 647,998 |
public static DataSourcesForm getDataSourcesForm(MBeanServer mserver,
String resourcetype, String path, String host, String service)
throws Exception {
ObjectName rname = null;
if (resourcetype!=null) {
if (resourcetype.equals("Global")) {
... | static DataSourcesForm function(MBeanServer mserver, String resourcetype, String path, String host, String service) throws Exception { ObjectName rname = null; if (resourcetype!=null) { if (resourcetype.equals(STR)) { rname = new ObjectName( RESOURCE_TYPE + GLOBAL_TYPE + STR + DATASOURCE_CLASS + ",*"); } else if (resou... | /**
* Construct and return a DataSourcesForm identifying all currently defined
* datasources in the specified resource database.
*
* @param mserver MBeanServer to be consulted
*
* @exception Exception if an error occurs
*/ | Construct and return a DataSourcesForm identifying all currently defined datasources in the specified resource database | getDataSourcesForm | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-4.1.12-src/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/resources/ResourceUtils.java",
"license": "apache-2.0",
"size": 16721
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.Iterator",
"javax.management.MBeanServer",
"javax.management.ObjectInstance",
"javax.management.ObjectName"
] | import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import javax.management.MBeanServer; import javax.management.ObjectInstance; import javax.management.ObjectName; | import java.util.*; import javax.management.*; | [
"java.util",
"javax.management"
] | java.util; javax.management; | 2,628,457 |
Certificate[] getCertificates() throws FileSystemException; | Certificate[] getCertificates() throws FileSystemException; | /**
* Retrieves the certificates if any used to sign this file or folder.
*
* @return The certificates, or an empty array if there are no certificates or
* the file does not support signing.
* @throws FileSystemException If the file does not exist, or is being written.
*/ | Retrieves the certificates if any used to sign this file or folder | getCertificates | {
"repo_name": "kichenko/apache-vfs2-fix",
"path": "core/src/main/java/org/apache/commons/vfs2/FileContent.java",
"license": "apache-2.0",
"size": 11161
} | [
"java.security.cert.Certificate"
] | import java.security.cert.Certificate; | import java.security.cert.*; | [
"java.security"
] | java.security; | 153,822 |
protected Expression createExpression(final String expression, final Class expectedType) {
final ParserContext parserContext = new FluentParserContext()
.expectResult(expectedType);
return getSpringExpressionParser().parseExpression(expression, parserContext);
} | Expression function(final String expression, final Class expectedType) { final ParserContext parserContext = new FluentParserContext() .expectResult(expectedType); return getSpringExpressionParser().parseExpression(expression, parserContext); } | /**
* Create expression expression.
*
* @param expression the expression
* @param expectedType the expected type
* @return the expression
*/ | Create expression expression | createExpression | {
"repo_name": "zawn/cas",
"path": "cas-server-core-webflow/src/main/java/org/apereo/cas/web/flow/AbstractCasWebflowConfigurer.java",
"license": "apache-2.0",
"size": 21919
} | [
"org.springframework.binding.expression.Expression",
"org.springframework.binding.expression.ParserContext",
"org.springframework.binding.expression.support.FluentParserContext"
] | import org.springframework.binding.expression.Expression; import org.springframework.binding.expression.ParserContext; import org.springframework.binding.expression.support.FluentParserContext; | import org.springframework.binding.expression.*; import org.springframework.binding.expression.support.*; | [
"org.springframework.binding"
] | org.springframework.binding; | 494,314 |
private void parse(final String definition) throws BadThresholdException {
String[] thresholdComponentAry = definition.split(",");
for (String thresholdComponent : thresholdComponentAry) {
String[] nameValuePair = thresholdComponent.split("=");
if (nameValuePair.length != 2... | void function(final String definition) throws BadThresholdException { String[] thresholdComponentAry = definition.split(","); for (String thresholdComponent : thresholdComponentAry) { String[] nameValuePair = thresholdComponent.split("="); if (nameValuePair.length != 2 StringUtils.isEmpty(nameValuePair[0]) StringUtils.... | /**
* Parses a threshold definition.
*
* @param definition
* The threshold definition
* @throws BadThresholdException
* -
*/ | Parses a threshold definition | parse | {
"repo_name": "BeamFoundry/spring-jnrpe",
"path": "jnrpe-lib/src/main/java/it/jnrpe/utils/thresholds/Threshold.java",
"license": "apache-2.0",
"size": 10530
} | [
"it.jnrpe.utils.BadThresholdException",
"org.apache.commons.lang.StringUtils"
] | import it.jnrpe.utils.BadThresholdException; import org.apache.commons.lang.StringUtils; | import it.jnrpe.utils.*; import org.apache.commons.lang.*; | [
"it.jnrpe.utils",
"org.apache.commons"
] | it.jnrpe.utils; org.apache.commons; | 2,061,868 |
public static List<String> getURLTemplateParams(String url) {
boolean endVal = false;
List<String> params = new ArrayList<String>();
if (url.contains("{")) {
int start = 0;
int end = 0;
for (int i = 0; i < url.length(); i++) {
if (url.cha... | static List<String> function(String url) { boolean endVal = false; List<String> params = new ArrayList<String>(); if (url.contains("{")) { int start = 0; int end = 0; for (int i = 0; i < url.length(); i++) { if (url.charAt(i) == '{') start = i; else if (url.charAt(i) == '}') { end = i; endVal = true; } if (endVal) { pa... | /**
* extract the parameters from the url tempate.
*
* @param url
* @return
*/ | extract the parameters from the url tempate | getURLTemplateParams | {
"repo_name": "ruwanta/product-apim",
"path": "modules/distribution/resources/migration-1.8.0_to_1.9.0/wso2-api-migration-client/src/main/java/org/wso2/carbon/apimgt/migration/client/util/ResourceUtil.java",
"license": "apache-2.0",
"size": 29992
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 268,612 |
private boolean checkLastParam() throws JSqlException {
// Will check param value by user.
// Notice options 'Inject each URL params' and 'inject JSON' must be checked both
// for JSON injection of last param
SimpleEntry<String, String> parameterToInject = this.getParams().s... | boolean function() throws JSqlException { SimpleEntry<String, String> parameterToInject = this.getParams().stream().reduce((a, b) -> b).orElseThrow(NullPointerException::new); return this.injectionModel.getMediatorStrategy().testStrategies(parameterToInject); } | /**
* Default injection: last param tested only
*/ | Default injection: last param tested only | checkLastParam | {
"repo_name": "ron190/jsql-injection",
"path": "model/src/main/java/com/jsql/model/injection/method/AbstractMethodInjection.java",
"license": "gpl-2.0",
"size": 8983
} | [
"com.jsql.model.exception.JSqlException",
"java.util.AbstractMap"
] | import com.jsql.model.exception.JSqlException; import java.util.AbstractMap; | import com.jsql.model.exception.*; import java.util.*; | [
"com.jsql.model",
"java.util"
] | com.jsql.model; java.util; | 2,039,942 |
protected void initGUI() {
JPanel panel;
CheckBoxListModel model;
setTitle("Filtering Capabilities...");
setLayout(new BorderLayout());
panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
getContentPane().add(pane... | void function() { JPanel panel; CheckBoxListModel model; setTitle(STR); setLayout(new BorderLayout()); panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); getContentPane().add(panel, BorderLayout.NORTH); m_InfoLabel.setText( STR + m_ClassType.getName().replaceAll(".*\\.... | /**
* sets up the GUI.
*/ | sets up the GUI | initGUI | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/GenericObjectEditor.java",
"license": "gpl-3.0",
"size": 52493
} | [
"java.awt.BorderLayout",
"java.awt.FlowLayout",
"javax.swing.BorderFactory",
"javax.swing.JPanel",
"javax.swing.JScrollPane"
] | import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 918,358 |
@Override
public List<Contact> getAll() {
if(true) {
throw new AssertionError("Not refactorized yet.");
}
List<Contact> contacts = new ArrayList(addressBookMap.size());
contacts.addAll(addressBookMap.values());
return contacts;
} | List<Contact> function() { if(true) { throw new AssertionError(STR); } List<Contact> contacts = new ArrayList(addressBookMap.size()); contacts.addAll(addressBookMap.values()); return contacts; } | /**
* Obtiene todos los contactos del sistema.
*
* @return
*/ | Obtiene todos los contactos del sistema | getAll | {
"repo_name": "theprogrammingchronicles/tpc-tdd-exercises",
"path": "tdd-lesson-6/tdd-6-1-services-db-based/src/main/java/com/programmingchronicles/tdd/addressbook/support/DbAddressBook.java",
"license": "gpl-3.0",
"size": 5950
} | [
"com.programmingchronicles.tdd.domain.Contact",
"java.util.ArrayList",
"java.util.List"
] | import com.programmingchronicles.tdd.domain.Contact; import java.util.ArrayList; import java.util.List; | import com.programmingchronicles.tdd.domain.*; import java.util.*; | [
"com.programmingchronicles.tdd",
"java.util"
] | com.programmingchronicles.tdd; java.util; | 2,771,172 |
private boolean hasContainerForNode(Priority prio, FSSchedulerNode node) {
ResourceRequest anyRequest = getResourceRequest(prio, ResourceRequest.ANY);
ResourceRequest rackRequest = getResourceRequest(prio, node.getRackName());
ResourceRequest nodeRequest = getResourceRequest(prio, node.getNodeName());
... | boolean function(Priority prio, FSSchedulerNode node) { ResourceRequest anyRequest = getResourceRequest(prio, ResourceRequest.ANY); ResourceRequest rackRequest = getResourceRequest(prio, node.getRackName()); ResourceRequest nodeRequest = getResourceRequest(prio, node.getNodeName()); return anyRequest != null && anyRequ... | /**
* Whether this app has containers requests that could be satisfied on the
* given node, if the node had full space.
*/ | Whether this app has containers requests that could be satisfied on the given node, if the node had full space | hasContainerForNode | {
"repo_name": "aliyun-beta/aliyun-oss-hadoop-fs",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java",
"license": "apache-2.0",
"size": 34957
} | [
"org.apache.hadoop.yarn.api.records.Priority",
"org.apache.hadoop.yarn.api.records.ResourceRequest",
"org.apache.hadoop.yarn.util.resource.Resources"
] | import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.api.records.ResourceRequest; import org.apache.hadoop.yarn.util.resource.Resources; | import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.util.resource.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,205,334 |
public void keyTyped(KeyEvent k) {
if (k.getKeyChar() == '\n' && k.isControlDown()) {
k.consume();
execute();
}
} | void function(KeyEvent k) { if (k.getKeyChar() == '\n' && k.isControlDown()) { k.consume(); execute(); } } | /**
* Method declaration
*
*
* @param k
*/ | Method declaration | keyTyped | {
"repo_name": "minghao7896321/canyin",
"path": "hsqldb/src/org/hsqldb/util/DatabaseManager.java",
"license": "apache-2.0",
"size": 40840
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,102,491 |
List<String> getCatalogs(); | List<String> getCatalogs(); | /**
* Get all the catalogs.
* @return list of names of all catalogs in the system
*/ | Get all the catalogs | getCatalogs | {
"repo_name": "lirui-apache/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java",
"license": "apache-2.0",
"size": 94780
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,483,045 |
public static <T> T instantiateClass(Constructor<T> ctor, Object... args)
throws IllegalAccessException, InvocationTargetException, InstantiationException
{
KFunction<T> kotlinConstructor = ReflectJvmMapping.getKotlinFunction(ctor);
if (kotlinConstructor == null) {
return ctor.newInstance(args);
... | static <T> T function(Constructor<T> ctor, Object... args) throws IllegalAccessException, InvocationTargetException, InstantiationException { KFunction<T> kotlinConstructor = ReflectJvmMapping.getKotlinFunction(ctor); if (kotlinConstructor == null) { return ctor.newInstance(args); } List<KParameter> parameters = kotlin... | /**
* Instantiate a Kotlin class using the provided constructor.
*
* @param ctor the constructor of the Kotlin class to instantiate
* @param args the constructor arguments to apply (use {@code null} for
* unspecified parameter if needed)
*/ | Instantiate a Kotlin class using the provided constructor | instantiateClass | {
"repo_name": "emacslisp/Java",
"path": "SpringFrameworkReading/src/org/springframework/beans/BeanUtils.java",
"license": "mit",
"size": 33111
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.InvocationTargetException",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.springframework.util.Assert"
] | import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.util.Assert; | import java.lang.reflect.*; import java.util.*; import org.springframework.util.*; | [
"java.lang",
"java.util",
"org.springframework.util"
] | java.lang; java.util; org.springframework.util; | 2,167,053 |
public Function1D<Double, Double> getFirstDerivativeFunction() {
return _derivative;
} | Function1D<Double, Double> function() { return _derivative; } | /**
* Gets the first derivative function.
*
* @return the function, not null
*/ | Gets the first derivative function | getFirstDerivativeFunction | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/math/curve/FunctionalDoublesCurve.java",
"license": "apache-2.0",
"size": 14954
} | [
"com.opengamma.analytics.math.function.Function1D"
] | import com.opengamma.analytics.math.function.Function1D; | import com.opengamma.analytics.math.function.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,262,239 |
private DocumentRouteHeaderValue notifyPostProcessorAfterProcess(DocumentRouteHeaderValue document, String nodeInstanceId, boolean successfullyProcessed) {
if (document == null) {
// this could happen if we failed to acquire the lock on the document
return null;
}
return notifyPostProc... | DocumentRouteHeaderValue function(DocumentRouteHeaderValue document, String nodeInstanceId, boolean successfullyProcessed) { if (document == null) { return null; } return notifyPostProcessorAfterProcess(document, nodeInstanceId, new AfterProcessEvent(document.getDocumentId(),document.getAppDocId(),nodeInstanceId,succes... | /**
* TODO get the routeContext in this method - it should be a better object
* than the nodeInstance
*/ | TODO get the routeContext in this method - it should be a better object than the nodeInstance | notifyPostProcessorAfterProcess | {
"repo_name": "bsmith83/rice-1",
"path": "rice-middleware/impl/src/main/java/org/kuali/rice/kew/engine/StandardWorkflowEngine.java",
"license": "apache-2.0",
"size": 34116
} | [
"org.kuali.rice.kew.framework.postprocessor.AfterProcessEvent",
"org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue"
] | import org.kuali.rice.kew.framework.postprocessor.AfterProcessEvent; import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue; | import org.kuali.rice.kew.framework.postprocessor.*; import org.kuali.rice.kew.routeheader.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,655,030 |
private static void persistOALModelElement(ModelElement me) {
Body_c bdy = OALPersistenceUtil.getOALModelElement(me);
if (bdy != null) {
// Let the parse thread complete
IEditorPart ed = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage()
.getActiveEditor();
if (ed i... | static void function(ModelElement me) { Body_c bdy = OALPersistenceUtil.getOALModelElement(me); if (bdy != null) { IEditorPart ed = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage() .getActiveEditor(); if (ed instanceof ActivityEditor) { ((ActivityEditor) ed).waitForParseThread(); } bdy.Initialize()... | /**
* This routine will persist the given model element across R601/R66.
*
* @param me
*/ | This routine will persist the given model element across R601/R66 | persistOALModelElement | {
"repo_name": "HebaKhaled/bposs",
"path": "src/com.mentor.nucleus.bp.ui.text/src/com/mentor/nucleus/bp/ui/text/ModelElementPropertyStorage.java",
"license": "apache-2.0",
"size": 7743
} | [
"com.mentor.nucleus.bp.core.common.ModelElement",
"com.mentor.nucleus.bp.core.common.OALPersistenceUtil",
"com.mentor.nucleus.bp.ui.text.activity.ActivityEditor",
"org.eclipse.ui.IEditorPart",
"org.eclipse.ui.PlatformUI"
] | import com.mentor.nucleus.bp.core.common.ModelElement; import com.mentor.nucleus.bp.core.common.OALPersistenceUtil; import com.mentor.nucleus.bp.ui.text.activity.ActivityEditor; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PlatformUI; | import com.mentor.nucleus.bp.core.common.*; import com.mentor.nucleus.bp.ui.text.activity.*; import org.eclipse.ui.*; | [
"com.mentor.nucleus",
"org.eclipse.ui"
] | com.mentor.nucleus; org.eclipse.ui; | 2,075,042 |
protected static void configureSslContextFactoryTrustStore(SslContextFactory ssl, Map<String, Object> sslConfigValues) {
ssl.setTrustStoreType((String) getOrDefault(sslConfigValues, SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG, SslConfigs.DEFAULT_SSL_TRUSTSTORE_TYPE));
String sslTruststoreLocation = (Stri... | static void function(SslContextFactory ssl, Map<String, Object> sslConfigValues) { ssl.setTrustStoreType((String) getOrDefault(sslConfigValues, SslConfigs.SSL_TRUSTSTORE_TYPE_CONFIG, SslConfigs.DEFAULT_SSL_TRUSTSTORE_TYPE)); String sslTruststoreLocation = (String) sslConfigValues.get(SslConfigs.SSL_TRUSTSTORE_LOCATION_... | /**
* Configures TrustStore related settings in SslContextFactory
*/ | Configures TrustStore related settings in SslContextFactory | configureSslContextFactoryTrustStore | {
"repo_name": "gf53520/kafka",
"path": "connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/util/SSLUtils.java",
"license": "apache-2.0",
"size": 7326
} | [
"java.util.Map",
"org.apache.kafka.common.config.SslConfigs",
"org.apache.kafka.common.config.types.Password",
"org.eclipse.jetty.util.ssl.SslContextFactory"
] | import java.util.Map; import org.apache.kafka.common.config.SslConfigs; import org.apache.kafka.common.config.types.Password; import org.eclipse.jetty.util.ssl.SslContextFactory; | import java.util.*; import org.apache.kafka.common.config.*; import org.apache.kafka.common.config.types.*; import org.eclipse.jetty.util.ssl.*; | [
"java.util",
"org.apache.kafka",
"org.eclipse.jetty"
] | java.util; org.apache.kafka; org.eclipse.jetty; | 872,598 |
@Deprecated
public static float getPivotX(View view) {
return view.getPivotX();
} | static float function(View view) { return view.getPivotX(); } | /**
* The x location of the point around which the view is
* {@link #setRotation(View, float) rotated} and {@link #setScaleX(View, float) scaled}.
*
* @deprecated Use {@link View#getPivotX()} directly.
*/ | The x location of the point around which the view is <code>#setRotation(View, float) rotated</code> and <code>#setScaleX(View, float) scaled</code> | getPivotX | {
"repo_name": "AndroidX/androidx",
"path": "core/core/src/main/java/androidx/core/view/ViewCompat.java",
"license": "apache-2.0",
"size": 224652
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 605,241 |
private void validateMaxMinRatingValue(int ratingValue) throws APIRatingException {
if (ratingValue > 0 && ratingValue <= getConfig().getRatingMaxValue()) {
return;
}
String errorMsg = "Provided rating value is invalid";
log.error(errorMsg);
throw new APIRatingExc... | void function(int ratingValue) throws APIRatingException { if (ratingValue > 0 && ratingValue <= getConfig().getRatingMaxValue()) { return; } String errorMsg = STR; log.error(errorMsg); throw new APIRatingException(errorMsg, ExceptionCodes.RATING_VALUE_INVALID); } | /**
* Validate whether the rating value provided by user is positive and less than or equal to the max rating in config
*
* @param ratingValue rating value provided by user
* @throws APIRatingException if rating value is negative or larger than max rating
*/ | Validate whether the rating value provided by user is positive and less than or equal to the max rating in config | validateMaxMinRatingValue | {
"repo_name": "lakmali/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/impl/APIStoreImpl.java",
"license": "apache-2.0",
"size": 86781
} | [
"org.wso2.carbon.apimgt.core.exception.APIRatingException",
"org.wso2.carbon.apimgt.core.exception.ExceptionCodes"
] | import org.wso2.carbon.apimgt.core.exception.APIRatingException; import org.wso2.carbon.apimgt.core.exception.ExceptionCodes; | import org.wso2.carbon.apimgt.core.exception.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,101,599 |
public static LocLogger get(String language, Class<?> clazz) {
if (language == null || language.isEmpty()) {
log.warn(InternalLogMessages.LANGUAGENOTFOUND);
return get(clazz);
}
IMessageConveyor messageConveyor = new MessageConveyor(new Locale(language));
LocLoggerFactory factory = new LocLoggerFactory... | static LocLogger function(String language, Class<?> clazz) { if (language == null language.isEmpty()) { log.warn(InternalLogMessages.LANGUAGENOTFOUND); return get(clazz); } IMessageConveyor messageConveyor = new MessageConveyor(new Locale(language)); LocLoggerFactory factory = new LocLoggerFactory(messageConveyor); ret... | /**
* Creates a Logger with the language indicated with its language code, this
* method does not consider the region.
*
* @param language
* An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
* up to 8 characters in length. See the Locale class description
* ... | Creates a Logger with the language indicated with its language code, this method does not consider the region | get | {
"repo_name": "adrigrillo/logging-system",
"path": "src/main/java/com/example/logging/IntLogger.java",
"license": "mit",
"size": 3786
} | [
"ch.qos.cal10n.IMessageConveyor",
"ch.qos.cal10n.MessageConveyor",
"java.util.Locale",
"org.slf4j.cal10n.LocLogger",
"org.slf4j.cal10n.LocLoggerFactory"
] | import ch.qos.cal10n.IMessageConveyor; import ch.qos.cal10n.MessageConveyor; import java.util.Locale; import org.slf4j.cal10n.LocLogger; import org.slf4j.cal10n.LocLoggerFactory; | import ch.qos.cal10n.*; import java.util.*; import org.slf4j.cal10n.*; | [
"ch.qos.cal10n",
"java.util",
"org.slf4j.cal10n"
] | ch.qos.cal10n; java.util; org.slf4j.cal10n; | 651,350 |
public void updateSubscription(APIIdentifier identifier, String subStatus, int applicationId)
throws APIManagementException {
Connection conn = null;
ResultSet resultSet = null;
PreparedStatement ps = null;
PreparedStatement updatePs = null;
int apiId = -1;
... | void function(APIIdentifier identifier, String subStatus, int applicationId) throws APIManagementException { Connection conn = null; ResultSet resultSet = null; PreparedStatement ps = null; PreparedStatement updatePs = null; int apiId = -1; try { conn = APIMgtDBUtil.getConnection(); conn.setAutoCommit(false); String ge... | /**
* This method is used to update the subscription
*
* @param identifier APIIdentifier
* @param subStatus Subscription Status[BLOCKED/UNBLOCKED]
* @param applicationId Application id
* @throws org.wso2.carbon.apimgt.api.APIManagementException if failed to update subscriber
*/ | This method is used to update the subscription | updateSubscription | {
"repo_name": "dhanuka84/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 461690
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Timestamp",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.APIIdentifier",
"org.wso2.carbon.apimgt.impl.APIConstants",
"org.wso2.carbon.apimgt.impl.da... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.impl.APIConstants; import org.... | import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 2,822,667 |
@IgniteSpiConfiguration(optional = true)
public void setMessageQueueLimit(int msgQueueLimit) {
this.msgQueueLimit = msgQueueLimit;
} | @IgniteSpiConfiguration(optional = true) void function(int msgQueueLimit) { this.msgQueueLimit = msgQueueLimit; } | /**
* Sets message queue limit for incoming and outgoing messages.
* <p>
* When set to positive number send queue is limited to the configured value.
* {@code 0} disables the size limitations.
* <p>
* If not provided, default is {@link #DFLT_MSG_QUEUE_LIMIT}.
*
* @param msgQueueL... | Sets message queue limit for incoming and outgoing messages. When set to positive number send queue is limited to the configured value. 0 disables the size limitations. If not provided, default is <code>#DFLT_MSG_QUEUE_LIMIT</code> | setMessageQueueLimit | {
"repo_name": "kromulan/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java",
"license": "apache-2.0",
"size": 135672
} | [
"org.apache.ignite.spi.IgniteSpiConfiguration"
] | import org.apache.ignite.spi.IgniteSpiConfiguration; | import org.apache.ignite.spi.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,147,971 |
public InputDevice getInputDevice(int id); | InputDevice function(int id); | /**
* Gets information about the input device with the specified id.
*
* @param id The device id
* @return The input device or null if not found
*/ | Gets information about the input device with the specified id | getInputDevice | {
"repo_name": "NateWardawg/godot",
"path": "platform/android/java/src/org/godotengine/godot/input/InputManagerCompat.java",
"license": "mit",
"size": 4399
} | [
"android.view.InputDevice"
] | import android.view.InputDevice; | import android.view.*; | [
"android.view"
] | android.view; | 1,768,793 |
public HashMap<String, String> retrieve_request_url(int i_limit) {
HashMap<String, String> mbtiles_request_url = new LinkedHashMap<String, String>();
String s_limit = "";
if ((i_limit > 0) && (i_limit < this.i_request_url_count)) { // avoid excesive memory usage
s_limit = " LIMIT... | HashMap<String, String> function(int i_limit) { HashMap<String, String> mbtiles_request_url = new LinkedHashMap<String, String>(); String s_limit = STR LIMIT STRSELECT tile_id,tile_url FROM request_urlSTRtile_idSTRtile_urlSTRMBTilesDroidSplitter: [STR] -E-> retrieve_request_url[STR] ", e); } finally { db_lock.readLock(... | /**
* Returns list of collected 'request_url'
* - Query only when 'this.i_request_url_count' > 0 ; i.e. Table exists and has records
*
* @param i_limit amount of records to retrieve [i_limit < 1 == all]
* @return HashMap<String,String> mbtiles_request_url [tile_id,tile_url]
*/ | Returns list of collected 'request_url' - Query only when 'this.i_request_url_count' > 0 ; i.e. Table exists and has records | retrieve_request_url | {
"repo_name": "Huertix/geopaparazzi",
"path": "geopaparazzispatialitelibrary/src/eu/geopaparazzi/spatialite/database/spatial/core/mbtiles/MBTilesDroidSpitter.java",
"license": "gpl-3.0",
"size": 97216
} | [
"java.util.HashMap",
"java.util.LinkedHashMap"
] | import java.util.HashMap; import java.util.LinkedHashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,456,185 |
public void prune() {
HashSet hs = (HashSet) this.xPoints.clone();
Iterator iterator = hs.iterator();
while (iterator.hasNext()) {
Number x = (Number) iterator.next();
if (canPrune(x)) {
removeAllValuesForX(x);
}
}
}
| void function() { HashSet hs = (HashSet) this.xPoints.clone(); Iterator iterator = hs.iterator(); while (iterator.hasNext()) { Number x = (Number) iterator.next(); if (canPrune(x)) { removeAllValuesForX(x); } } } | /**
* Removes all x-values for which all the y-values are <code>null</code>.
*/ | Removes all x-values for which all the y-values are <code>null</code> | prune | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/data/xy/DefaultTableXYDataset.java",
"license": "lgpl-2.1",
"size": 21886
} | [
"java.util.HashSet",
"java.util.Iterator"
] | import java.util.HashSet; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 703,204 |
Object queryForObject(String id, Object parameterObject, Object resultObject) throws SQLException; | Object queryForObject(String id, Object parameterObject, Object resultObject) throws SQLException; | /**
* Executes a mapped SQL SELECT statement that returns data to populate
* the supplied result object.
* <p/>
* The parameter object is generally used to supply the input
* data for the WHERE clause parameter(s) of the SELECT statement.
*
* @param id The name of the sta... | Executes a mapped SQL SELECT statement that returns data to populate the supplied result object. The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement | queryForObject | {
"repo_name": "mashuai/Open-Source-Research",
"path": "iBATIS/src/com/ibatis/sqlmap/client/SqlMapExecutor.java",
"license": "apache-2.0",
"size": 15752
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 775,401 |
public static DataType getAggregatedValueType(AggregationFunctionType aggregationType) {
switch (aggregationType) {
case COUNT:
return CountValueAggregator.AGGREGATED_VALUE_TYPE;
case MIN:
return MinValueAggregator.AGGREGATED_VALUE_TYPE;
case MAX:
return MaxValueAggregato... | static DataType function(AggregationFunctionType aggregationType) { switch (aggregationType) { case COUNT: return CountValueAggregator.AGGREGATED_VALUE_TYPE; case MIN: return MinValueAggregator.AGGREGATED_VALUE_TYPE; case MAX: return MaxValueAggregator.AGGREGATED_VALUE_TYPE; case SUM: return SumValueAggregator.AGGREGAT... | /**
* Returns the data type of the aggregated value for the given aggregation type.
*
* @param aggregationType Aggregation type
* @return Data type of the aggregated value
*/ | Returns the data type of the aggregated value for the given aggregation type | getAggregatedValueType | {
"repo_name": "apucher/pinot",
"path": "pinot-core/src/main/java/com/linkedin/pinot/core/data/aggregator/ValueAggregatorFactory.java",
"license": "apache-2.0",
"size": 3213
} | [
"com.linkedin.pinot.common.data.FieldSpec",
"com.linkedin.pinot.core.query.aggregation.function.AggregationFunctionType"
] | import com.linkedin.pinot.common.data.FieldSpec; import com.linkedin.pinot.core.query.aggregation.function.AggregationFunctionType; | import com.linkedin.pinot.common.data.*; import com.linkedin.pinot.core.query.aggregation.function.*; | [
"com.linkedin.pinot"
] | com.linkedin.pinot; | 60,959 |
public String getString(Object[] dataRow, int index) throws KettleValueException;
| String function(Object[] dataRow, int index) throws KettleValueException; | /**
* Get a String value from a row of data. Convert data if this needed.
*
* @param dataRow the data row
* @param index the index
* @return The string found on that position in the row
* @throws KettleValueException in case there was a problem converting the data.
*/ | Get a String value from a row of data. Convert data if this needed | getString | {
"repo_name": "jjeb/kettle-trunk",
"path": "core/src/org/pentaho/di/core/row/RowMetaInterface.java",
"license": "apache-2.0",
"size": 21460
} | [
"org.pentaho.di.core.exception.KettleValueException"
] | import org.pentaho.di.core.exception.KettleValueException; | import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,252,978 |
public void addOrExpression(final INodeReadTrx mTransaction) {
assert getPipeStack().size() >= 2;
final AbsAxis mOperand2 = getPipeStack().pop().getExpr();
final AbsAxis mOperand1 = getPipeStack().pop().getExpr();
if (getPipeStack().empty() || getExpression().getSize() != 0) {
... | void function(final INodeReadTrx mTransaction) { assert getPipeStack().size() >= 2; final AbsAxis mOperand2 = getPipeStack().pop().getExpr(); final AbsAxis mOperand1 = getPipeStack().pop().getExpr(); if (getPipeStack().empty() getExpression().getSize() != 0) { addExpressionSingle(); } getExpression().add(new OrExpr(mTr... | /**
* Adds a or expression to the pipeline.
*
* @param mTransaction
* Transaction to operate with.
*/ | Adds a or expression to the pipeline | addOrExpression | {
"repo_name": "sebastiangraf/treetank",
"path": "interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java",
"license": "bsd-3-clause",
"size": 28631
} | [
"org.treetank.api.INodeReadTrx",
"org.treetank.axis.AbsAxis",
"org.treetank.service.xml.xpath.expr.OrExpr"
] | import org.treetank.api.INodeReadTrx; import org.treetank.axis.AbsAxis; import org.treetank.service.xml.xpath.expr.OrExpr; | import org.treetank.api.*; import org.treetank.axis.*; import org.treetank.service.xml.xpath.expr.*; | [
"org.treetank.api",
"org.treetank.axis",
"org.treetank.service"
] | org.treetank.api; org.treetank.axis; org.treetank.service; | 906,687 |
@Override
public void setURL(String parameterName, URL val) throws SQLException {
throw unsupported("url");
} | void function(String parameterName, URL val) throws SQLException { throw unsupported("url"); } | /**
* [Not supported]
*/ | [Not supported] | setURL | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/jdbc/JdbcCallableStatement.java",
"license": "apache-2.0",
"size": 53148
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,447,705 |
private static boolean isNumericType(int type) {
return type == TokenTypes.LITERAL_BYTE
|| type == TokenTypes.LITERAL_SHORT
|| type == TokenTypes.LITERAL_INT
|| type == TokenTypes.LITERAL_FLOAT
|| type == TokenTypes.LITERAL_LONG
... | static boolean function(int type) { return type == TokenTypes.LITERAL_BYTE type == TokenTypes.LITERAL_SHORT type == TokenTypes.LITERAL_INT type == TokenTypes.LITERAL_FLOAT type == TokenTypes.LITERAL_LONG type == TokenTypes.LITERAL_DOUBLE; } | /**
* Determine if a given type is a numeric type.
* @param type code of the type for check.
* @return true if it's a numeric type.
* @see TokenTypes
*/ | Determine if a given type is a numeric type | isNumericType | {
"repo_name": "liscju/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ExplicitInitializationCheck.java",
"license": "lgpl-2.1",
"size": 7931
} | [
"com.puppycrawl.tools.checkstyle.api.TokenTypes"
] | import com.puppycrawl.tools.checkstyle.api.TokenTypes; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 22,341 |
public void startCDATA() throws SAXException
{
m_handler.startCDATA();
} | void function() throws SAXException { m_handler.startCDATA(); } | /**
* Pass the call on to the underlying handler
* @see org.xml.sax.ext.LexicalHandler#startCDATA()
*/ | Pass the call on to the underlying handler | startCDATA | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.xml/src/main/resources/META-INF/modules/java.xml/classes/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java",
"license": "apache-2.0",
"size": 38096
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 584,601 |
Claim getClaim(EntityIdValue subject, Snak mainSnak,
List<SnakGroup> qualifiers); | Claim getClaim(EntityIdValue subject, Snak mainSnak, List<SnakGroup> qualifiers); | /**
* Creates a {@link Claim}.
*
* @param subject
* the subject the Statement refers to
* @param mainSnak
* the main Snak of the Statement
* @param qualifiers
* the qualifiers of the Statement, grouped in SnakGroups
* @return a {@link Claim} corresponding to the input
... | Creates a <code>Claim</code> | getClaim | {
"repo_name": "zazi/Wikidata-Toolkit",
"path": "wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/interfaces/DataObjectFactory.java",
"license": "apache-2.0",
"size": 11503
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,909,589 |
private void setupStarvedCluster() {
AllocationFileWriter.create()
.drfDefaultQueueSchedulingPolicy()
// Default queue
.addQueue(new AllocationFileQueue.Builder("default").build())
// Queue with preemption disabled
.addQueue(new AllocationFileQueue.Builder("no-preemption")
... | void function() { AllocationFileWriter.create() .drfDefaultQueueSchedulingPolicy() .addQueue(new AllocationFileQueue.Builder(STR).build()) .addQueue(new AllocationFileQueue.Builder(STR) .fairSharePreemptionThreshold(0).build()) .addQueue(new AllocationFileQueue.Builder(STR) .fairSharePreemptionThreshold(0) .minSharePre... | /**
* Setup the cluster for starvation testing:
* 1. Create FS allocation file
* 2. Create and start MockRM
* 3. Add two nodes to the cluster
* 4. Submit an app that uses up all resources on the cluster
*/ | Setup the cluster for starvation testing: 1. Create FS allocation file 2. Create and start MockRM 3. Add two nodes to the cluster 4. Submit an app that uses up all resources on the cluster | setupStarvedCluster | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFSAppStarvation.java",
"license": "apache-2.0",
"size": 9664
} | [
"org.apache.hadoop.yarn.api.records.ApplicationAttemptId",
"org.apache.hadoop.yarn.server.resourcemanager.MockRM",
"org.junit.Assert"
] | import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.server.resourcemanager.MockRM; import org.junit.Assert; | import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 607,761 |
private static int compareEntry(ArrayList<Entry> entries, int entry, int target) {
return entries.get(entry).getGeneratedColumn() - target;
} | static int function(ArrayList<Entry> entries, int entry, int target) { return entries.get(entry).getGeneratedColumn() - target; } | /**
* Compare an array entry's column value to the target column value.
*/ | Compare an array entry's column value to the target column value | compareEntry | {
"repo_name": "Yannic/closure-compiler",
"path": "src/com/google/debugging/sourcemap/SourceMapConsumerV3.java",
"license": "apache-2.0",
"size": 21003
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,822,820 |
public boolean verify(final String login,
final KeyPair keyPair,
final byte[] data,
final byte[] signedData) {
Objects.requireNonNull(login, "Login must be present");
Objects.requireNonNull(keyPair, "Keypair must be presen... | boolean function(final String login, final KeyPair keyPair, final byte[] data, final byte[] signedData) { Objects.requireNonNull(login, STR); Objects.requireNonNull(keyPair, STR); Objects.requireNonNull(signedData, STR); try { signature.initVerify(keyPair.getPublic()); signature.update(data); return signature.verify(si... | /**
* Cryptographically signs an any data input.
*
* @param login Account/login name
* @param keyPair public/private keypair
* @param data data that was signed
* @param signedData data to verify against signature
* @return signed value of data
*/ | Cryptographically signs an any data input | verify | {
"repo_name": "phillipross/java-http-signature",
"path": "common/src/main/java/com/joyent/http/signature/Signer.java",
"license": "mpl-2.0",
"size": 32123
} | [
"java.security.InvalidKeyException",
"java.security.KeyPair",
"java.security.SignatureException",
"java.util.Objects"
] | import java.security.InvalidKeyException; import java.security.KeyPair; import java.security.SignatureException; import java.util.Objects; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 2,400,007 |
Composite getDurationEditor() {
if (durationEditorComposite != null) {
return durationEditorComposite;
}
TabbedPropertySheetWidgetFactory wf = getWidgetFactory();
durationEditorComposite = wf.createComposite(editorComposite, SWT.NONE);
FormLayout layout = new FormLayout();
layout.... | Composite getDurationEditor() { if (durationEditorComposite != null) { return durationEditorComposite; } TabbedPropertySheetWidgetFactory wf = getWidgetFactory(); durationEditorComposite = wf.createComposite(editorComposite, SWT.NONE); FormLayout layout = new FormLayout(); layout.marginWidth = layout.marginHeight = 0; ... | /**
* Get or create the duration editor.
*
* @return
*/ | Get or create the duration editor | getDurationEditor | {
"repo_name": "chanakaudaya/developer-studio",
"path": "bps/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/expressions/XPathExpressionEditor.java",
"license": "apache-2.0",
"size": 19337
} | [
"org.eclipse.bpel.common.ui.details.IDetailsAreaConstants",
"org.eclipse.bpel.ui.Messages",
"org.eclipse.bpel.ui.properties.BPELPropertySection",
"org.eclipse.bpel.ui.properties.DurationSelector",
"org.eclipse.bpel.ui.util.BPELUtil",
"org.eclipse.swt.layout.FormAttachment",
"org.eclipse.swt.layout.FormD... | import org.eclipse.bpel.common.ui.details.IDetailsAreaConstants; import org.eclipse.bpel.ui.Messages; import org.eclipse.bpel.ui.properties.BPELPropertySection; import org.eclipse.bpel.ui.properties.DurationSelector; import org.eclipse.bpel.ui.util.BPELUtil; import org.eclipse.swt.layout.FormAttachment; import org.ecli... | import org.eclipse.bpel.common.ui.details.*; import org.eclipse.bpel.ui.*; import org.eclipse.bpel.ui.properties.*; import org.eclipse.bpel.ui.util.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.views.properties.tabbed.*; | [
"org.eclipse.bpel",
"org.eclipse.swt",
"org.eclipse.ui"
] | org.eclipse.bpel; org.eclipse.swt; org.eclipse.ui; | 1,524,090 |
EAttribute getStringValueNotEquals_Value(); | EAttribute getStringValueNotEquals_Value(); | /**
* Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.ecl.ecl.StringValueNotEquals#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see com.b2international.snowowl.snomed.ecl.... | Returns the meta object for the attribute '<code>com.b2international.snowowl.snomed.ecl.ecl.StringValueNotEquals#getValue Value</code>'. | getStringValueNotEquals_Value | {
"repo_name": "IHTSDO/snow-owl",
"path": "snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java",
"license": "apache-2.0",
"size": 121411
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 578,946 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ContentKeyPolicyInner>> createOrUpdateWithResponseAsync(
String resourceGroupName,
String accountName,
String contentKeyPolicyName,
ContentKeyPolicyInner parameters,
Context context) {
if (this.clie... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ContentKeyPolicyInner>> function( String resourceGroupName, String accountName, String contentKeyPolicyName, ContentKeyPolicyInner parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } ... | /**
* Create or update a Content Key Policy in the Media Services account.
*
* @param resourceGroupName The name of the resource group within the Azure subscription.
* @param accountName The Media Services account name.
* @param contentKeyPolicyName The Content Key Policy name.
* @param pa... | Create or update a Content Key Policy in the Media Services account | createOrUpdateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/ContentKeyPoliciesClientImpl.java",
"license": "mit",
"size": 67421
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.mediaservices.fluent.models.ContentKeyPolicyInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.fluent.models.ContentKeyPolicyInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mediaservices.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 957,643 |
public static int findCommonPrefix(ByteBuffer left, int leftOffset, int leftLength,
ByteBuffer right, int rightOffset, int rightLength) {
int length = Math.min(leftLength, rightLength);
int result = 0;
while (result < length && ByteBufferUtils.toByte(left, leftOffset + result) == ByteBufferUtils
... | static int function(ByteBuffer left, int leftOffset, int leftLength, ByteBuffer right, int rightOffset, int rightLength) { int length = Math.min(leftLength, rightLength); int result = 0; while (result < length && ByteBufferUtils.toByte(left, leftOffset + result) == ByteBufferUtils .toByte(right, rightOffset + result)) ... | /**
* Find length of common prefix in two arrays.
* @param left ByteBuffer to be compared.
* @param leftOffset Offset in left ByteBuffer.
* @param leftLength Length of left ByteBuffer.
* @param right ByteBuffer to be compared.
* @param rightOffset Offset in right ByteBuffer.
* @param rightLength Le... | Find length of common prefix in two arrays | findCommonPrefix | {
"repo_name": "HubSpot/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java",
"license": "apache-2.0",
"size": 39287
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,233,948 |
private void resetDefaults(RenderingDef def, Pixels pixels,
QuantumFactory quantumFactory, List<RenderingModel> renderingModels,
PixelBuffer buffer, boolean computeStats) {
// The default rendering definition settings
def.setDefaultZ(pixels.getSizeZ() / 2);
def.setDef... | void function(RenderingDef def, Pixels pixels, QuantumFactory quantumFactory, List<RenderingModel> renderingModels, PixelBuffer buffer, boolean computeStats) { def.setDefaultZ(pixels.getSizeZ() / 2); def.setDefaultT(0); RenderingModel defaultModel = null; int sizeC = pixels.getSizeC(); if (sizeC > 1 && sizeC < Renderer... | /**
* Resets a rendering definition to its predefined defaults.
*
* @param def The rendering definition to reset.
* @param pixels The pixels set to reset the definition based upon.
* @param quantumFactory A populated quantum factory.
* @param renderingModels An enumerated list of all rend... | Resets a rendering definition to its predefined defaults | resetDefaults | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/server/src/ome/logic/RenderingSettingsImpl.java",
"license": "gpl-2.0",
"size": 57280
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 122,717 |
public static CancelStatListenerResponse create(DistributionManager dm,
InternalDistributedMember recipient, int listenerId) {
CancelStatListenerResponse m = new CancelStatListenerResponse();
m.setRecipient(recipient);
GemFireStatSampler sampler = null;
sampler = dm.getSystem().getStatSampler();... | static CancelStatListenerResponse function(DistributionManager dm, InternalDistributedMember recipient, int listenerId) { CancelStatListenerResponse m = new CancelStatListenerResponse(); m.setRecipient(recipient); GemFireStatSampler sampler = null; sampler = dm.getSystem().getStatSampler(); if (sampler != null) { sampl... | /**
* Returns a <code>CancelStatListenerResponse</code> that will be returned to the specified
* recipient. The message will contains a copy of the local manager's system config.
*/ | Returns a <code>CancelStatListenerResponse</code> that will be returned to the specified recipient. The message will contains a copy of the local manager's system config | create | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/admin/remote/CancelStatListenerResponse.java",
"license": "apache-2.0",
"size": 2661
} | [
"org.apache.geode.distributed.internal.DistributionManager",
"org.apache.geode.distributed.internal.membership.InternalDistributedMember",
"org.apache.geode.internal.statistics.GemFireStatSampler"
] | import org.apache.geode.distributed.internal.DistributionManager; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; import org.apache.geode.internal.statistics.GemFireStatSampler; | import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.membership.*; import org.apache.geode.internal.statistics.*; | [
"org.apache.geode"
] | org.apache.geode; | 841,876 |
public Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> query(DnsQuestion question) {
return query(nameServerAddresses, question);
} | Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> function(DnsQuestion question) { return query(nameServerAddresses, question); } | /**
* Sends a DNS query with the specified question.
*/ | Sends a DNS query with the specified question | query | {
"repo_name": "shism/netty",
"path": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java",
"license": "apache-2.0",
"size": 34248
} | [
"io.netty.channel.AddressedEnvelope",
"io.netty.handler.codec.dns.DnsQuestion",
"io.netty.handler.codec.dns.DnsResponse",
"io.netty.util.concurrent.Future",
"java.net.InetSocketAddress"
] | import io.netty.channel.AddressedEnvelope; import io.netty.handler.codec.dns.DnsQuestion; import io.netty.handler.codec.dns.DnsResponse; import io.netty.util.concurrent.Future; import java.net.InetSocketAddress; | import io.netty.channel.*; import io.netty.handler.codec.dns.*; import io.netty.util.concurrent.*; import java.net.*; | [
"io.netty.channel",
"io.netty.handler",
"io.netty.util",
"java.net"
] | io.netty.channel; io.netty.handler; io.netty.util; java.net; | 501,960 |
public boolean deleteCategory(final String groupname, final String catlabel) {
try {
getWriteLock().lock();
final Enumeration<Categorygroup> enumCG = m_config.enumerateCategorygroup();
while (enumCG.hasMoreElements()) {
final Categorygroup cg = enumCG.next... | boolean function(final String groupname, final String catlabel) { try { getWriteLock().lock(); final Enumeration<Categorygroup> enumCG = m_config.enumerateCategorygroup(); while (enumCG.hasMoreElements()) { final Categorygroup cg = enumCG.nextElement(); if (cg.getName().equals(groupname)) { final Categories cats = cg.g... | /**
* Delete category from a categorygroup.
*
* @param groupname
* category group from which category is to be removed
* @param catlabel
* label of the category to be deleted
* @return true if category is successfully deleted from the specified
* cat... | Delete category from a categorygroup | deleteCategory | {
"repo_name": "tdefilip/opennms",
"path": "opennms-config/src/main/java/org/opennms/netmgt/config/CategoryFactory.java",
"license": "agpl-3.0",
"size": 17473
} | [
"java.util.Enumeration",
"org.opennms.netmgt.config.categories.Categories",
"org.opennms.netmgt.config.categories.Category",
"org.opennms.netmgt.config.categories.Categorygroup"
] | import java.util.Enumeration; import org.opennms.netmgt.config.categories.Categories; import org.opennms.netmgt.config.categories.Category; import org.opennms.netmgt.config.categories.Categorygroup; | import java.util.*; import org.opennms.netmgt.config.categories.*; | [
"java.util",
"org.opennms.netmgt"
] | java.util; org.opennms.netmgt; | 1,913,739 |
private void writeFieldsOfNode(JsonGenerator generator, JsonObject node) throws IOException {
if (node != null) {
for (Map.Entry<String, JsonElement> field : node.entrySet()) {
generator.writeFieldName(field.getKey());
generator.writeTree(field.getValue());
... | void function(JsonGenerator generator, JsonObject node) throws IOException { if (node != null) { for (Map.Entry<String, JsonElement> field : node.entrySet()) { generator.writeFieldName(field.getKey()); generator.writeTree(field.getValue()); } } } | /**
* Writes the fields of the given node into the generator.
*/ | Writes the fields of the given node into the generator | writeFieldsOfNode | {
"repo_name": "flexiblepower/fpai-apps",
"path": "net.logstash.logback/src/net/logstash/logback/LogstashFormatter.java",
"license": "apache-2.0",
"size": 11588
} | [
"com.google.gson.JsonElement",
"com.google.gson.JsonObject",
"java.io.IOException",
"java.util.Map"
] | import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.io.IOException; import java.util.Map; | import com.google.gson.*; import java.io.*; import java.util.*; | [
"com.google.gson",
"java.io",
"java.util"
] | com.google.gson; java.io; java.util; | 2,706,944 |
Observable<ServiceResponse<Void>> putNullWithServiceResponseAsync(String stringBody); | Observable<ServiceResponse<Void>> putNullWithServiceResponseAsync(String stringBody); | /**
* Set string value null.
*
* @param stringBody Possible values include: ''
* @return the {@link ServiceResponse} object if successful.
*/ | Set string value null | putNullWithServiceResponseAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodystring/Strings.java",
"license": "mit",
"size": 17112
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 475,555 |
public Logger getLogger() {
if (this.unitLogger == null) {
this.unitLogger = Logger.getLogger(getClass().getName());
final String value = Strings.nullToEmpty(System.getenv("org.arakhne.afc.tests.logging")); //$NON-NLS-1$
if ("true".equals(value.toLowerCase())) { //$NON-NLS-1$
this.unitLogger.setLevel(... | Logger function() { if (this.unitLogger == null) { this.unitLogger = Logger.getLogger(getClass().getName()); final String value = Strings.nullToEmpty(System.getenv(STR)); if ("true".equals(value.toLowerCase())) { this.unitLogger.setLevel(Level.ALL); } else { this.unitLogger.setLevel(Level.WARNING); } } return this.unit... | /** Replies the unit test logger.
*
* @return the unit test logger.
* @since 14.0
*/ | Replies the unit test logger | getLogger | {
"repo_name": "gallandarakhneorg/afc",
"path": "core/testtools/src/main/java/org/arakhne/afc/testtools/AbstractTestCase.java",
"license": "apache-2.0",
"size": 63962
} | [
"com.google.common.base.Strings",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import com.google.common.base.Strings; import java.util.logging.Level; import java.util.logging.Logger; | import com.google.common.base.*; import java.util.logging.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,255,320 |
protected Cursor getAllEntriesCursor() {
return db.query(DATABASE_TABLE, null, null, null, null, null, CTG_TAG_NAME);
}
| Cursor function() { return db.query(DATABASE_TABLE, null, null, null, null, null, CTG_TAG_NAME); } | /**
* Used for testing
* @return
*/ | Used for testing | getAllEntriesCursor | {
"repo_name": "RightHandedMonkey/CTG_API",
"path": "src/com/worxforus/ctg/db/CTGTagTable.java",
"license": "gpl-2.0",
"size": 16077
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 817,478 |
private void runCommandNativeDdl(String sql, SqlCommand cmd) {
IgniteInternalFuture fut = null;
try {
isDdlOnSchemaSupported(cmd.schemaName());
finishActiveTxIfNecessary();
if (cmd instanceof SqlCreateIndexCommand) {
SqlCreateIndexCommand cmd0 =... | void function(String sql, SqlCommand cmd) { IgniteInternalFuture fut = null; try { isDdlOnSchemaSupported(cmd.schemaName()); finishActiveTxIfNecessary(); if (cmd instanceof SqlCreateIndexCommand) { SqlCreateIndexCommand cmd0 = (SqlCreateIndexCommand)cmd; GridH2Table tbl = schemaMgr.dataTable(cmd0.schemaName(), cmd0.tab... | /**
* Run DDL statement.
*
* @param sql Original SQL.
* @param cmd Command.
*/ | Run DDL statement | runCommandNativeDdl | {
"repo_name": "ptupitsyn/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/CommandProcessor.java",
"license": "apache-2.0",
"size": 37612
} | [
"java.util.LinkedHashMap",
"org.apache.ignite.IgniteCluster",
"org.apache.ignite.cache.QueryIndex",
"org.apache.ignite.cache.QueryIndexType",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode",
"org.apache.ignite.internal.processor... | import java.util.LinkedHashMap; import org.apache.ignite.IgniteCluster; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.cache.QueryIndexType; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignit... | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.processors.query.h2.opt.*; import org.apache.ignite.i... | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 339,369 |
@Test(expected = UnsupportedException.class)
public void dropCatalogTest() throws Exception {
decisionMetadataEngine.dropCatalog(null, (Connection) null);
} | @Test(expected = UnsupportedException.class) void function() throws Exception { decisionMetadataEngine.dropCatalog(null, (Connection) null); } | /**
* Method: dropCatalog(CatalogName indexName, Connection<IStratioStreamingAPI> connection)
*/ | Method: dropCatalog(CatalogName indexName, Connection connection) | dropCatalogTest | {
"repo_name": "Stratio/stratio-connector-decision",
"path": "connector-decision/src/test/java/com/stratio/connector/decision/core/engine/DecisionMetadataEngineTest.java",
"license": "apache-2.0",
"size": 6913
} | [
"com.stratio.connector.commons.connection.Connection",
"com.stratio.crossdata.common.exceptions.UnsupportedException",
"org.junit.Test"
] | import com.stratio.connector.commons.connection.Connection; import com.stratio.crossdata.common.exceptions.UnsupportedException; import org.junit.Test; | import com.stratio.connector.commons.connection.*; import com.stratio.crossdata.common.exceptions.*; import org.junit.*; | [
"com.stratio.connector",
"com.stratio.crossdata",
"org.junit"
] | com.stratio.connector; com.stratio.crossdata; org.junit; | 2,097,563 |
@ManagedAttribute("the timezone")
public String getLogTimeZone()
{
return _logTimeZone;
} | @ManagedAttribute(STR) String function() { return _logTimeZone; } | /**
* Retrieve the timezone of the request log.
*
* @return timezone string
*/ | Retrieve the timezone of the request log | getLogTimeZone | {
"repo_name": "sdw2330976/Research-jetty-9.2.5",
"path": "jetty-server/src/main/java/org/eclipse/jetty/server/AbstractNCSARequestLog.java",
"license": "apache-2.0",
"size": 13747
} | [
"org.eclipse.jetty.util.annotation.ManagedAttribute"
] | import org.eclipse.jetty.util.annotation.ManagedAttribute; | import org.eclipse.jetty.util.annotation.*; | [
"org.eclipse.jetty"
] | org.eclipse.jetty; | 2,231,661 |
public IFile getModelFile() {
return newFileCreationPage.getModelFile();
}
| IFile function() { return newFileCreationPage.getModelFile(); } | /**
* Get the file from the page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Get the file from the page. | getModelFile | {
"repo_name": "ejuliot/PlayWithSirius",
"path": "tictactoe/plugins/org.obeonetwork.dsl.tictactoe.editor/src/tictactoe/presentation/TictactoeModelWizard.java",
"license": "epl-1.0",
"size": 18393
} | [
"org.eclipse.core.resources.IFile"
] | import org.eclipse.core.resources.IFile; | import org.eclipse.core.resources.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,461,753 |
public static String escapeTextValue(Object value, Context cx)
{
XMLLib xmlLib = currentXMLLib(cx);
return xmlLib.escapeTextValue(value);
} | static String function(Object value, Context cx) { XMLLib xmlLib = currentXMLLib(cx); return xmlLib.escapeTextValue(value); } | /**
* Escapes the reserved characters in a value of a text node
*
* @param value Unescaped text
* @return The escaped text
*/ | Escapes the reserved characters in a value of a text node | escapeTextValue | {
"repo_name": "smartfeeling/smartly",
"path": "smartly_package_01_htmldeployer/src_yahoo/old/mozilla/javascript/ScriptRuntime.java",
"license": "lgpl-3.0",
"size": 124872
} | [
"old.mozilla.javascript.xml.XMLLib"
] | import old.mozilla.javascript.xml.XMLLib; | import old.mozilla.javascript.xml.*; | [
"old.mozilla.javascript"
] | old.mozilla.javascript; | 400,965 |
public void setProperties(Map<String, String> properties) {
this.properties = properties;
} | void function(Map<String, String> properties) { this.properties = properties; } | /**
* Sets properties.
* @param properties properties to set
*/ | Sets properties | setProperties | {
"repo_name": "djelinek/reddeer",
"path": "plugins/org.eclipse.reddeer.requirements/src/org/eclipse/reddeer/requirements/property/PropertyConfiguration.java",
"license": "epl-1.0",
"size": 1914
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 114,122 |
@Test
public void testSortByValueAscending() {
DefaultKeyedValues data = new DefaultKeyedValues();
data.addValue("C", new Double(1.0));
data.addValue("B", null);
data.addValue("D", new Double(3.0));
data.addValue("A", new Double(2.0));
data.sortByValues(SortOrde... | void function() { DefaultKeyedValues data = new DefaultKeyedValues(); data.addValue("C", new Double(1.0)); data.addValue("B", null); data.addValue("D", new Double(3.0)); data.addValue("A", new Double(2.0)); data.sortByValues(SortOrder.ASCENDING); assertEquals(data.getKey(0), "C"); assertEquals(data.getKey(1), "A"); ass... | /**
* Tests sorting of data by value (ascending).
*/ | Tests sorting of data by value (ascending) | testSortByValueAscending | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/test/java/org/jfree/data/DefaultKeyedValuesTest.java",
"license": "gpl-3.0",
"size": 16342
} | [
"org.jfree.chart.util.SortOrder",
"org.junit.Assert"
] | import org.jfree.chart.util.SortOrder; import org.junit.Assert; | import org.jfree.chart.util.*; import org.junit.*; | [
"org.jfree.chart",
"org.junit"
] | org.jfree.chart; org.junit; | 935,445 |
@Override
public boolean equals(Object other)
{
// implemented for performance reasons
return Annotation.class.isInstance(other) &&
Annotation.class.cast(other).annotationType().equals(annotationType());
} | boolean function(Object other) { return Annotation.class.isInstance(other) && Annotation.class.cast(other).annotationType().equals(annotationType()); } | /**
* Just checks whether the 2 classes have the same annotationType.
* We do not need to dynamically evaluate the member values via reflection
* as there are no members in this annotation at all.
*/ | Just checks whether the 2 classes have the same annotationType. We do not need to dynamically evaluate the member values via reflection as there are no members in this annotation at all | equals | {
"repo_name": "apache/openwebbeans",
"path": "webbeans-impl/src/main/java/org/apache/webbeans/annotation/EmptyAnnotationLiteral.java",
"license": "apache-2.0",
"size": 4222
} | [
"java.lang.annotation.Annotation"
] | import java.lang.annotation.Annotation; | import java.lang.annotation.*; | [
"java.lang"
] | java.lang; | 2,008,903 |
public long getValue() {
return u.value;
}
}
public static class HANDLE extends PointerType {
private boolean immutable;
public HANDLE() {}
public HANDLE(Pointer p) {
setPointer(p);
immutable = true;
}
| long function() { return u.value; } } public static class HANDLE extends PointerType { private boolean immutable; public HANDLE() {} public HANDLE(Pointer p) { setPointer(p); immutable = true; } | /**
* 64-bit value.
* @return
* 64-bit value.
*/ | 64-bit value | getValue | {
"repo_name": "lahorichargha/jna",
"path": "contrib/platform/src/com/sun/jna/platform/win32/WinNT.java",
"license": "lgpl-2.1",
"size": 126942
} | [
"com.sun.jna.Pointer",
"com.sun.jna.PointerType"
] | import com.sun.jna.Pointer; import com.sun.jna.PointerType; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 515,097 |
void onAttributeChanged(ROIFigure figure)
{
if (model.getState() != MeasurementViewer.READY) return;
if (figure == null) return;
if (!model.isHCSData()) {
roiInspector.setModelData(figure);
roiResults.refreshResults();
}
}
Drawing getDrawing() { return model.getD... | void onAttributeChanged(ROIFigure figure) { if (model.getState() != MeasurementViewer.READY) return; if (figure == null) return; if (!model.isHCSData()) { roiInspector.setModelData(figure); roiResults.refreshResults(); } } Drawing getDrawing() { return model.getDrawing(); } | /**
* Reacts to the changes of attributes for the specified figure.
*
* @param figure The figure to handle.
*/ | Reacts to the changes of attributes for the specified figure | onAttributeChanged | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerUI.java",
"license": "gpl-2.0",
"size": 45535
} | [
"org.jhotdraw.draw.Drawing",
"org.openmicroscopy.shoola.util.roi.figures.ROIFigure"
] | import org.jhotdraw.draw.Drawing; import org.openmicroscopy.shoola.util.roi.figures.ROIFigure; | import org.jhotdraw.draw.*; import org.openmicroscopy.shoola.util.roi.figures.*; | [
"org.jhotdraw.draw",
"org.openmicroscopy.shoola"
] | org.jhotdraw.draw; org.openmicroscopy.shoola; | 2,861,449 |
@Test
public void testMRAsyncDiskService() throws Throwable {
FileSystem localFileSystem = FileSystem.getLocal(new Configuration());
String[] vols = new String[]{TEST_ROOT_DIR + "/0",
TEST_ROOT_DIR + "/1"};
MRAsyncDiskService service = new MRAsyncDiskService(
localFileSystem, vols);
... | void function() throws Throwable { FileSystem localFileSystem = FileSystem.getLocal(new Configuration()); String[] vols = new String[]{TEST_ROOT_DIR + "/0", TEST_ROOT_DIR + "/1"}; MRAsyncDiskService service = new MRAsyncDiskService( localFileSystem, vols); String a = "a"; String b = "b"; String c = "b/c"; String d = "d... | /**
* This test creates some directories and then removes them through
* MRAsyncDiskService.
*/ | This test creates some directories and then removes them through MRAsyncDiskService | testMRAsyncDiskService | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/util/TestMRAsyncDiskService.java",
"license": "apache-2.0",
"size": 11460
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.mapreduce.util.MRAsyncDiskService"
] | import java.io.File; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.util.MRAsyncDiskService; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,562,095 |
public PreferenceManager getPreferenceManager() {
return mPreferenceManager;
} | PreferenceManager function() { return mPreferenceManager; } | /**
* Returns the {@link PreferenceManager} used by this fragment.
*
* @return The {@link PreferenceManager}.
*/ | Returns the <code>PreferenceManager</code> used by this fragment | getPreferenceManager | {
"repo_name": "wathika/EMV-NFC-Paycard-Enrollment",
"path": "sample/src/main/java/android/support/v4/preference/PreferenceFragment.java",
"license": "apache-2.0",
"size": 9240
} | [
"android.preference.PreferenceManager"
] | import android.preference.PreferenceManager; | import android.preference.*; | [
"android.preference"
] | android.preference; | 1,791,296 |
@Override
public boolean decompose( DenseMatrix64F A )
{
if( A.numRows != A.numCols )
throw new IllegalArgumentException("A must be square.");
if( A.numRows <= 0 )
return false;
QH = A;
N = A.numCols;
if( b.length < N ) {
b = new... | boolean function( DenseMatrix64F A ) { if( A.numRows != A.numCols ) throw new IllegalArgumentException(STR); if( A.numRows <= 0 ) return false; QH = A; N = A.numCols; if( b.length < N ) { b = new double[ N ]; gammas = new double[ N ]; u = new double[ N ]; } return _decompose(); } | /**
* Computes the decomposition of the provided matrix. If no errors are detected then true is returned,
* false otherwise.
* @param A The matrix that is being decomposed. Not modified.
* @return If it detects any errors or not.
*/ | Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise | decompose | {
"repo_name": "sizuest/EMod",
"path": "ch.ethz.inspire.emod/ejml-v0.26-src/main/core/src/org/ejml/alg/dense/decomposition/hessenberg/HessenbergSimilarDecomposition_D64.java",
"license": "gpl-3.0",
"size": 7565
} | [
"org.ejml.data.DenseMatrix64F"
] | import org.ejml.data.DenseMatrix64F; | import org.ejml.data.*; | [
"org.ejml.data"
] | org.ejml.data; | 1,684,352 |
public static int getPSMCountByProjectAndSequence(String projectAccession, String sequence) throws IOException {
return getCount(PrideQuery.GET_ALL_PEPTIDE_IDENTIFICATIONS_BY_PROJECT_AND_SEQUENCE.getQueryTemplate(true)
.replace("{projectAccession}", projectAccession)
.replace... | static int function(String projectAccession, String sequence) throws IOException { return getCount(PrideQuery.GET_ALL_PEPTIDE_IDENTIFICATIONS_BY_PROJECT_AND_SEQUENCE.getQueryTemplate(true) .replace(STR, projectAccession) .replace(STR, sequence)); } | /**
* Returns a count of PSM details for a given project and a given peptide
* sequence.
*
* @param projectAccession the project accession
* @param sequence the peptide sequence
* @return a count of PSM details for a given project and a given peptide
* sequence
* @throws IOExcept... | Returns a count of PSM details for a given project and a given peptide sequence | getPSMCountByProjectAndSequence | {
"repo_name": "compomics/compomics-utilities",
"path": "src/main/java/com/compomics/util/pride/PrideWebService.java",
"license": "apache-2.0",
"size": 20970
} | [
"com.compomics.util.pride.prideobjects.webservice.PrideQuery",
"java.io.IOException"
] | import com.compomics.util.pride.prideobjects.webservice.PrideQuery; import java.io.IOException; | import com.compomics.util.pride.prideobjects.webservice.*; import java.io.*; | [
"com.compomics.util",
"java.io"
] | com.compomics.util; java.io; | 2,015,715 |
public Boolean fluidContainer() {
return false;
}
public static class HALRedirectPage extends RedirectPage {
private static final long serialVersionUID = -750983217518258464L;
public HALRedirectPage() {
super(WebApplication.get().getServletContext().getContextPath() + "... | Boolean function() { return false; } public static class HALRedirectPage extends RedirectPage { private static final long serialVersionUID = -750983217518258464L; public HALRedirectPage() { super(WebApplication.get().getServletContext().getContextPath() + STR); } } public static class JminixRedirectPage extends Redirec... | /**
* Determines if this page has a fluid container for the content or not.
*/ | Determines if this page has a fluid container for the content or not | fluidContainer | {
"repo_name": "EMResearch/EMB",
"path": "jdk_8_maven/cs/rest-gui/ocvn/forms/src/main/java/org/devgateway/toolkit/forms/wicket/page/BasePage.java",
"license": "apache-2.0",
"size": 16984
} | [
"org.apache.wicket.markup.html.pages.RedirectPage",
"org.apache.wicket.protocol.http.WebApplication"
] | import org.apache.wicket.markup.html.pages.RedirectPage; import org.apache.wicket.protocol.http.WebApplication; | import org.apache.wicket.markup.html.pages.*; import org.apache.wicket.protocol.http.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,027,030 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.