method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static void initialize() {
if (initialized)
return;
Sys.initialize();
initialized = true;
}
| static void function() { if (initialized) return; Sys.initialize(); initialized = true; } | /**
* Static initialization
*/ | Static initialization | initialize | {
"repo_name": "andrewmcvearry/mille-bean",
"path": "lwjgl/src/java/org/lwjgl/input/Keyboard.java",
"license": "mit",
"size": 23298
} | [
"org.lwjgl.Sys"
] | import org.lwjgl.Sys; | import org.lwjgl.*; | [
"org.lwjgl"
] | org.lwjgl; | 1,055,177 |
public static InputStream post(URL url, String name1, Object value1, String name2,
Object value2, String name3, Object value3) throws IOException {
return new ClientHttpRequest(url).post(name1, value1, name2, value2, name3, value3);
} | static InputStream function(URL url, String name1, Object value1, String name2, Object value2, String name3, Object value3) throws IOException { return new ClientHttpRequest(url).post(name1, value1, name2, value2, name3, value3); } | /**
* post the POST request to specified URL, with the specified parameters
*
* @param name1 first parameter name
* @param value1 first parameter value
* @param name2 second parameter name
* @param value2 second parameter value
* @param name3 third parameter name
* @param valu... | post the POST request to specified URL, with the specified parameters | post | {
"repo_name": "medic/SMSSync",
"path": "smssync/src/main/java/org/addhen/smssync/net/ClientHttpRequest.java",
"license": "lgpl-3.0",
"size": 18423
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,182,988 |
public void flush(long mod) {
Log.i(AnkiDroidApp.TAG, "flush - Saving information to DB...");
mMod = (mod == 0 ? Utils.intNow(1000) : mod);
ContentValues values = new ContentValues();
values.put("crt", mCrt);
values.put("mod", mMod);
values.put("scm", mScm);
v... | void function(long mod) { Log.i(AnkiDroidApp.TAG, STR); mMod = (mod == 0 ? Utils.intNow(1000) : mod); ContentValues values = new ContentValues(); values.put("crt", mCrt); values.put("mod", mMod); values.put("scm", mScm); values.put("dty", mDty ? 1 : 0); values.put("usn", mUsn); values.put("ls", mLs); values.put("conf",... | /**
* Flush state to DB, updating mod time.
*/ | Flush state to DB, updating mod time | flush | {
"repo_name": "socialpercon/anki",
"path": "src/com/ichi2/libanki/Collection.java",
"license": "gpl-3.0",
"size": 47783
} | [
"android.content.ContentValues",
"android.util.Log",
"com.ichi2.anki.AnkiDroidApp"
] | import android.content.ContentValues; import android.util.Log; import com.ichi2.anki.AnkiDroidApp; | import android.content.*; import android.util.*; import com.ichi2.anki.*; | [
"android.content",
"android.util",
"com.ichi2.anki"
] | android.content; android.util; com.ichi2.anki; | 2,645,750 |
Transformer<F, T> setTo(QName toType); | Transformer<F, T> setTo(QName toType); | /**
* Set the name of the to, or target, message type.
* @param toType To type.
* @return a reference to the current Transformer.
*/ | Set the name of the to, or target, message type | setTo | {
"repo_name": "tadayosi/switchyard",
"path": "core/api/src/main/java/org/switchyard/transform/Transformer.java",
"license": "apache-2.0",
"size": 2397
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 2,353,170 |
public static InputFormatBuilder.ClientParams<JobConf> configure() {
return new InputFormatBuilderImpl<>(CLASS);
} | static InputFormatBuilder.ClientParams<JobConf> function() { return new InputFormatBuilderImpl<>(CLASS); } | /**
* Sets all the information required for this map reduce job.
*/ | Sets all the information required for this map reduce job | configure | {
"repo_name": "apache/accumulo",
"path": "hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoop/mapred/AccumuloInputFormat.java",
"license": "apache-2.0",
"size": 3518
} | [
"org.apache.accumulo.hadoop.mapreduce.InputFormatBuilder",
"org.apache.accumulo.hadoopImpl.mapreduce.InputFormatBuilderImpl",
"org.apache.hadoop.mapred.JobConf"
] | import org.apache.accumulo.hadoop.mapreduce.InputFormatBuilder; import org.apache.accumulo.hadoopImpl.mapreduce.InputFormatBuilderImpl; import org.apache.hadoop.mapred.JobConf; | import org.apache.accumulo.*; import org.apache.accumulo.hadoop.mapreduce.*; import org.apache.hadoop.mapred.*; | [
"org.apache.accumulo",
"org.apache.hadoop"
] | org.apache.accumulo; org.apache.hadoop; | 2,652,419 |
private void writeOutCache( final long pointer ) throws IOException {
if ( DEBUG ) System.err.println( "Entered writeOutCache() with cache=" + cache + " (H is " + ( 1L << height ) + ", B is " + w + ")" );
cacheDataLength[ (int)( ( ( cache + quantum - 1 ) >>> quantumDivisionShift ) - 1 ) ] = cacheDataOut.written... | void function( final long pointer ) throws IOException { if ( DEBUG ) System.err.println( STR + cache + STR + ( 1L << height ) + STR + w + ")" ); cacheDataLength[ (int)( ( ( cache + quantum - 1 ) >>> quantumDivisionShift ) - 1 ) ] = cacheDataOut.writtenBits(); long toTheEnd; int nextAfter = (int)( ( ( cache + quantum )... | /** Write out the cache content.
*
* @param pointer the first pointer of the next block, or -1 if this is the last block.
*/ | Write out the cache content | writeOutCache | {
"repo_name": "JC-R/mg4j",
"path": "src/it/unimi/di/big/mg4j/index/SkipBitStreamIndexWriter.java",
"license": "gpl-3.0",
"size": 37434
} | [
"it.unimi.dsi.bits.Fast",
"it.unimi.dsi.fastutil.ints.Int2IntRBTreeMap",
"java.io.IOException"
] | import it.unimi.dsi.bits.Fast; import it.unimi.dsi.fastutil.ints.Int2IntRBTreeMap; import java.io.IOException; | import it.unimi.dsi.bits.*; import it.unimi.dsi.fastutil.ints.*; import java.io.*; | [
"it.unimi.dsi",
"java.io"
] | it.unimi.dsi; java.io; | 2,421,283 |
public void setCategoryMargin(double margin) {
this.categoryMargin = margin;
notifyListeners(new AxisChangeEvent(this));
}
| void function(double margin) { this.categoryMargin = margin; notifyListeners(new AxisChangeEvent(this)); } | /**
* Sets the category margin and sends an {@link AxisChangeEvent} to all
* registered listeners. The overall category margin is distributed over
* N-1 gaps, where N is the number of categories on the axis.
*
* @param margin the margin as a percentage of the axis length (for
* ... | Sets the category margin and sends an <code>AxisChangeEvent</code> to all registered listeners. The overall category margin is distributed over N-1 gaps, where N is the number of categories on the axis | setCategoryMargin | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/axis/CategoryAxis.java",
"license": "lgpl-2.1",
"size": 58999
} | [
"org.jfree.chart.event.AxisChangeEvent"
] | import org.jfree.chart.event.AxisChangeEvent; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 786,519 |
private static String getIcons(SimpleItypeConfig sic, int level, int rowNum, int maxRows, int spRowNum, int maxSp, boolean canDelete) {
String html = "";
// Right Arrow
if ( (level==1 && rowNum>0)
|| (level>1 && spRowNum>0) )
html += "<IMG bord... | static String function(SimpleItypeConfig sic, int level, int rowNum, int maxRows, int spRowNum, int maxSp, boolean canDelete) { String html = STR<IMG border=\"0\" alt=\STR\STRSTR\STRabsmiddle\STRimages/arrow_right.png\" " + STRdoClick('shiftRight', STR);\STRthis.style.cursor='hand';this.style.cursor='pointer';\">"; els... | /**
* Generates icons for shifting and deleting operations on itype config elements
* @param sic SimpleItypeConfig object
* @param level Recurse Level
* @param rowNum Row Number (in config)
* @param maxRows Max elements in config
* @param uid Unique Id of course offering
* @param spRo... | Generates icons for shifting and deleting operations on itype config elements | getIcons | {
"repo_name": "maciej-zygmunt/unitime",
"path": "JavaSource/org/unitime/timetable/webutil/SchedulingSubpartTableBuilder.java",
"license": "apache-2.0",
"size": 22262
} | [
"org.unitime.timetable.model.SimpleItypeConfig"
] | import org.unitime.timetable.model.SimpleItypeConfig; | import org.unitime.timetable.model.*; | [
"org.unitime.timetable"
] | org.unitime.timetable; | 2,829,557 |
@Nullable
public static <T> T getAnnotation(@Nonnull Annotation[] annotations, @Nonnull Class<T> annotation) {
if(annotations == null || annotations.length == 0) {
return null;
}
for(Annotation a: annotations) {
if(annotation.isAssignableFrom(a.getClass())) {
... | static <T> T function(@Nonnull Annotation[] annotations, @Nonnull Class<T> annotation) { if(annotations == null annotations.length == 0) { return null; } for(Annotation a: annotations) { if(annotation.isAssignableFrom(a.getClass())) { return (T) a; } } return null; } | /**
* Retrieve the annotation of given type from array of annotations
*
* @param annotations
* @param annotation
* @return
*/ | Retrieve the annotation of given type from array of annotations | getAnnotation | {
"repo_name": "Mak-Sym/dbg4j",
"path": "dbg4j-core/src/main/java/org/dbg4j/core/DebugUtils.java",
"license": "apache-2.0",
"size": 8596
} | [
"java.lang.annotation.Annotation",
"javax.annotation.Nonnull"
] | import java.lang.annotation.Annotation; import javax.annotation.Nonnull; | import java.lang.annotation.*; import javax.annotation.*; | [
"java.lang",
"javax.annotation"
] | java.lang; javax.annotation; | 2,111,155 |
private void testTransactionMixed0(IgniteCache<Integer, Object>[] caches, TransactionConcurrency concurrency,
Integer key1, byte[] val1, @Nullable Integer key2, @Nullable Object val2) throws Exception {
for (IgniteCache<Integer, Object> cache : caches) {
Transaction tx = cache.unwrap(Ign... | void function(IgniteCache<Integer, Object>[] caches, TransactionConcurrency concurrency, Integer key1, byte[] val1, @Nullable Integer key2, @Nullable Object val2) throws Exception { for (IgniteCache<Integer, Object> cache : caches) { Transaction tx = cache.unwrap(Ignite.class).transactions().txStart(concurrency, REPEAT... | /**
* Test transaction behavior.
*
* @param caches Caches.
* @param concurrency Concurrency.
* @param key1 Key 1.
* @param val1 Value 1.
* @param key2 Key 2.
* @param val2 Value 2.
* @throws Exception If failed.
*/ | Test transaction behavior | testTransactionMixed0 | {
"repo_name": "agoncharuk/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java",
"license": "apache-2.0",
"size": 12255
} | [
"org.apache.ignite.Ignite",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.transactions.Transaction",
"org.apache.ignite.transactions.TransactionConcurrency",
"org.jetbrains.annotations.Nullable",
"org.junit.Assert"
] | import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; import org.junit.Assert; | import org.apache.ignite.*; import org.apache.ignite.transactions.*; import org.jetbrains.annotations.*; import org.junit.*; | [
"org.apache.ignite",
"org.jetbrains.annotations",
"org.junit"
] | org.apache.ignite; org.jetbrains.annotations; org.junit; | 2,272,498 |
public static LabeledSymmetricMatrix<StructuralMotif> calculateRmsdMatrix(List<StructuralMotif> structuralMotifs,
Predicate<Atom> atomFilter,
boolean idealSuper... | static LabeledSymmetricMatrix<StructuralMotif> function(List<StructuralMotif> structuralMotifs, Predicate<Atom> atomFilter, boolean idealSuperimposition) { if (structuralMotifs.stream() .map(StructuralMotif::size) .distinct() .count() != 1) { throw new IllegalArgumentException(STR); } double[][] temporaryDistanceMatrix... | /**
* Performs a superimposition of given {@link StructuralMotif}s using the specified {@link
* StructuralEntityFilter.AtomFilter} and returns the RMSD distance matrix between all elements.
*
* @param structuralMotifs The input structural motifs.
* @param atomFilter The {@link StructuralEntityF... | Performs a superimposition of given <code>StructuralMotif</code>s using the specified <code>StructuralEntityFilter.AtomFilter</code> and returns the RMSD distance matrix between all elements | calculateRmsdMatrix | {
"repo_name": "cleberecht/singa",
"path": "singa-structure/src/main/java/bio/singa/structure/model/oak/StructuralMotifs.java",
"license": "gpl-3.0",
"size": 4970
} | [
"bio.singa.mathematics.matrices.LabeledSymmetricMatrix",
"bio.singa.structure.algorithms.superimposition.SubstructureSuperimposer",
"bio.singa.structure.algorithms.superimposition.SubstructureSuperimposition",
"bio.singa.structure.model.interfaces.Atom",
"java.util.ArrayList",
"java.util.List",
"java.ut... | import bio.singa.mathematics.matrices.LabeledSymmetricMatrix; import bio.singa.structure.algorithms.superimposition.SubstructureSuperimposer; import bio.singa.structure.algorithms.superimposition.SubstructureSuperimposition; import bio.singa.structure.model.interfaces.Atom; import java.util.ArrayList; import java.util.... | import bio.singa.mathematics.matrices.*; import bio.singa.structure.algorithms.superimposition.*; import bio.singa.structure.model.interfaces.*; import java.util.*; import java.util.function.*; | [
"bio.singa.mathematics",
"bio.singa.structure",
"java.util"
] | bio.singa.mathematics; bio.singa.structure; java.util; | 606,095 |
@Test
public void testCopyPasteNoSettingsUsingApplySettingsToImage() throws Exception {
EventContext ctx = newUserAndGroup("rwra--");
Image image = createBinaryImage();
Image image2 = createBinaryImage();
Pixels pixels = image.getPrimaryPixels();
IRenderingSettingsPrx prx... | void function() throws Exception { EventContext ctx = newUserAndGroup(STR); Image image = createBinaryImage(); Image image2 = createBinaryImage(); Pixels pixels = image.getPrimaryPixels(); IRenderingSettingsPrx prx = factory.getRenderingSettingsService(); disconnect(); newUserInGroup(ctx); prx = factory.getRenderingSet... | /**
* Test the copying of rendering settings by a user who do not have rendering
* settings for that image.
* The source image does not have any settings.
* No copy occurs
* Use the applySettingsToImage
* @throws Exception
*/ | Test the copying of rendering settings by a user who do not have rendering settings for that image. The source image does not have any settings. No copy occurs Use the applySettingsToImage | testCopyPasteNoSettingsUsingApplySettingsToImage | {
"repo_name": "knabar/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/RenderingSettingsServicePermissionsTest.java",
"license": "gpl-2.0",
"size": 51046
} | [
"java.util.List",
"org.testng.Assert"
] | import java.util.List; import org.testng.Assert; | import java.util.*; import org.testng.*; | [
"java.util",
"org.testng"
] | java.util; org.testng; | 323,753 |
public void navigateToStudyFlashcardsActivity(Context context, Long lessonId) {
Intent intent = StudyFlashcardsActivity.createIntent(context, lessonId);
context.startActivity(intent);
} | void function(Context context, Long lessonId) { Intent intent = StudyFlashcardsActivity.createIntent(context, lessonId); context.startActivity(intent); } | /**
* Navigate to study flashcards activity
*/ | Navigate to study flashcards activity | navigateToStudyFlashcardsActivity | {
"repo_name": "Eagles2F/words4you",
"path": "app/src/main/java/com/dbychkov/words/navigator/Navigator.java",
"license": "apache-2.0",
"size": 2438
} | [
"android.content.Context",
"android.content.Intent",
"com.dbychkov.words.activity.StudyFlashcardsActivity"
] | import android.content.Context; import android.content.Intent; import com.dbychkov.words.activity.StudyFlashcardsActivity; | import android.content.*; import com.dbychkov.words.activity.*; | [
"android.content",
"com.dbychkov.words"
] | android.content; com.dbychkov.words; | 643,297 |
private int readImpl() throws IOException {
final int c = super.read();
final int rc;
switch (state) {
case NORMAL:
if (c == '/') {
state = State.SLASH;
rc = -2;
} else if (c == '\\') {
state = State.ESCAPE;
... | int function() throws IOException { final int c = super.read(); final int rc; switch (state) { case NORMAL: if (c == '/') { state = State.SLASH; rc = -2; } else if (c == '\\') { state = State.ESCAPE; rc = c; } else if (c == 'STR') { state = State.NORMAL; rc = c; } else if (c == '\\') { state = State.ESCAPE_IN_STRING; r... | /**
* Implementation of {@link #read()}.
*
* @return read character.
* @throws IOException In case of I/O problems.
* @retval -1 in case of end of file.
* @retval -2 in case this function needs to be invoked again.
*/ | Implementation of <code>#read()</code> | readImpl | {
"repo_name": "christianhujer/aceunit",
"path": "generator/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java",
"license": "bsd-3-clause",
"size": 9410
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,265,245 |
public void send(Resource resource, String metric, Object value) {
if (!started) {
logger.error("The DCAgent is not started, data won't be sent");
return;
}
if (!shouldMonitor(resource, metric)) {
logger.error(
"Monitoring is not required for the given resource and the given metric, datum [{},{},... | void function(Resource resource, String metric, Object value) { if (!started) { logger.error(STR); return; } if (!shouldMonitor(resource, metric)) { logger.error( STR, resource.getId(), metric, value.toString()); return; } JsonObject jsonDatum = new JsonObject(); jsonDatum.addProperty(MOVocabulary.resourceId, resource.... | /**
* Send a metric to the data analyzer. Note that {@code value} should have the actual data type,
* serialization is managed by the library. Sending Strings, for example, won't allow the data analyzer
* to compute aggregations such as the average.
*
* @param resource
* @param metric
* @param value
*/ | Send a metric to the data analyzer. Note that value should have the actual data type, serialization is managed by the library. Sending Strings, for example, won't allow the data analyzer to compute aggregations such as the average | send | {
"repo_name": "deib-polimi/tower4clouds",
"path": "data-collector-library/src/main/java/it/polimi/tower4clouds/data_collector_library/DCAgent.java",
"license": "apache-2.0",
"size": 13522
} | [
"com.google.gson.JsonObject",
"it.polimi.tower4clouds.model.ontology.MOVocabulary",
"it.polimi.tower4clouds.model.ontology.Resource"
] | import com.google.gson.JsonObject; import it.polimi.tower4clouds.model.ontology.MOVocabulary; import it.polimi.tower4clouds.model.ontology.Resource; | import com.google.gson.*; import it.polimi.tower4clouds.model.ontology.*; | [
"com.google.gson",
"it.polimi.tower4clouds"
] | com.google.gson; it.polimi.tower4clouds; | 908,338 |
private static void grantPermissionToHierarchyLevel(UserRealm userRealm, String topicId, String role)
throws UserStoreException {
//tokenize resource path
StringTokenizer tokenizer = new StringTokenizer(topicId, "/");
StringBuilder resourcePathBuilder = new StringBuilder();
... | static void function(UserRealm userRealm, String topicId, String role) throws UserStoreException { StringTokenizer tokenizer = new StringTokenizer(topicId, "/"); StringBuilder resourcePathBuilder = new StringBuilder(); int tokenCount = tokenizer.countTokens(); int count = 0; Pattern pattern = Pattern.compile(PARENT_RES... | /**
* Admin user and user who had add topic permission create the hierarchy topic get permission to all level by default
*
* @param userRealm User's Realm
* @param topicId topic id
* @param role admin role
* @throws UserStoreException
*/ | Admin user and user who had add topic permission create the hierarchy topic get permission to all level by default | grantPermissionToHierarchyLevel | {
"repo_name": "hemikak/carbon-business-messaging",
"path": "components/andes/org.wso2.carbon.andes.authorization/src/main/java/org/wso2/carbon/andes/authorization/andes/AndesAuthorizationHandler.java",
"license": "apache-2.0",
"size": 57226
} | [
"java.util.StringTokenizer",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"org.wso2.carbon.user.api.UserRealm",
"org.wso2.carbon.user.api.UserStoreException",
"org.wso2.carbon.user.core.authorization.TreeNode"
] | import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.wso2.carbon.user.api.UserRealm; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.core.authorization.TreeNode; | import java.util.*; import java.util.regex.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.authorization.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,099,653 |
public void sort()
{
Collections.sort(list);
} | void function() { Collections.sort(list); } | /**
* Will sort the elements in the list
*/ | Will sort the elements in the list | sort | {
"repo_name": "Navaneethsen/Astar_Java",
"path": "src/components/SortedList.java",
"license": "gpl-2.0",
"size": 1545
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 1,788,745 |
private void initialize() {
frame = new JFrame(APP_TITLE);
frame.setBounds(100, 100, 890, 601);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
frame.getContentPane().add(getLeftPanel());
frame.getContentPane().add(getPane... | void function() { frame = new JFrame(APP_TITLE); frame.setBounds(100, 100, 890, 601); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().setLayout(null); frame.getContentPane().add(getLeftPanel()); frame.getContentPane().add(getPanel_1_1()); frame.getContentPane().add(getMessagePanel()); JPane... | /**
* Initialize the contents of the frame.
*/ | Initialize the contents of the frame | initialize | {
"repo_name": "intelligent-decision-support-systems/knowledge-based-reasoning-framework",
"path": "src/main/java/org/uclab/mm/kcl/edket/krf/ui/ReasonerGui.java",
"license": "apache-2.0",
"size": 23265
} | [
"java.awt.BorderLayout",
"java.awt.Color",
"java.awt.SystemColor",
"javax.swing.JFrame",
"javax.swing.JPanel",
"javax.swing.JScrollPane",
"javax.swing.JTextArea",
"javax.swing.UIManager",
"javax.swing.border.TitledBorder"
] | import java.awt.BorderLayout; import java.awt.Color; import java.awt.SystemColor; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.UIManager; import javax.swing.border.TitledBorder; | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,027,705 |
public ServerConfiguration killBookie(int index) throws Exception {
if (index >= bs.size()) {
throw new IOException("Bookie does not exist");
}
BookieServer server = bs.get(index);
server.shutdown();
stopAutoRecoveryService(server);
bs.remove(server);
... | ServerConfiguration function(int index) throws Exception { if (index >= bs.size()) { throw new IOException(STR); } BookieServer server = bs.get(index); server.shutdown(); stopAutoRecoveryService(server); bs.remove(server); return bsConfs.remove(index); } | /**
* Kill a bookie by index. Also, stops the respective auto recovery process
* for this bookie, if isAutoRecoveryEnabled is true.
*
* @param index
* Bookie Index
* @return the configuration of killed bookie
* @throws InterruptedException
* @throws IOException
*/ | Kill a bookie by index. Also, stops the respective auto recovery process for this bookie, if isAutoRecoveryEnabled is true | killBookie | {
"repo_name": "robindh/bookkeeper",
"path": "bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java",
"license": "apache-2.0",
"size": 22013
} | [
"java.io.IOException",
"org.apache.bookkeeper.conf.ServerConfiguration",
"org.apache.bookkeeper.proto.BookieServer"
] | import java.io.IOException; import org.apache.bookkeeper.conf.ServerConfiguration; import org.apache.bookkeeper.proto.BookieServer; | import java.io.*; import org.apache.bookkeeper.conf.*; import org.apache.bookkeeper.proto.*; | [
"java.io",
"org.apache.bookkeeper"
] | java.io; org.apache.bookkeeper; | 2,302,192 |
@Test
public void testEventIDPrapogationOnServerDuringRegionDestroy() {
destroyRegion();
Boolean pass = (Boolean) vm0.invoke(() -> EventIDVerificationDUnitTest.verifyResult());
assertTrue(pass.booleanValue());
pass = (Boolean) vm1.invoke(() -> EventIDVerificationDUnitTest.verifyResult());
assert... | void function() { destroyRegion(); Boolean pass = (Boolean) vm0.invoke(() -> EventIDVerificationDUnitTest.verifyResult()); assertTrue(pass.booleanValue()); pass = (Boolean) vm1.invoke(() -> EventIDVerificationDUnitTest.verifyResult()); assertTrue(pass.booleanValue()); } | /**
* Verify that EventId is prapogated to server in case of region destroy. It also checks that peer
* nodes also get the same EventID.
*
*/ | Verify that EventId is prapogated to server in case of region destroy. It also checks that peer nodes also get the same EventID | testEventIDPrapogationOnServerDuringRegionDestroy | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java",
"license": "apache-2.0",
"size": 15972
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,697,794 |
void getUserFromServer(String userSelfLink, DataLoadListenerImpl dataLoadListener); | void getUserFromServer(String userSelfLink, DataLoadListenerImpl dataLoadListener); | /**
* Gets user from server.
*/ | Gets user from server | getUserFromServer | {
"repo_name": "yonadev/yona-app-android",
"path": "app/src/main/java/nu/yona/app/api/manager/AuthenticateManager.java",
"license": "mpl-2.0",
"size": 2853
} | [
"nu.yona.app.listener.DataLoadListenerImpl"
] | import nu.yona.app.listener.DataLoadListenerImpl; | import nu.yona.app.listener.*; | [
"nu.yona.app"
] | nu.yona.app; | 1,908,347 |
private void createPhoneNumberUI()
{
Label phoneNumberLabel = new Label(this, SWT.NONE);
phoneNumberLabel.setText(phoneNumberLabelStr);
GridData data = new GridData(SWT.FILL, SWT.CENTER, false, false);
data.widthHint = getLabelWidthHint(phoneNumberLabel);
phoneNumberLabe... | void function() { Label phoneNumberLabel = new Label(this, SWT.NONE); phoneNumberLabel.setText(phoneNumberLabelStr); GridData data = new GridData(SWT.FILL, SWT.CENTER, false, false); data.widthHint = getLabelWidthHint(phoneNumberLabel); phoneNumberLabel.setLayoutData(data); this.phoneNumberText = new Text(this, SWT.BOR... | /**
* Build the phone number part controls
*/ | Build the phone number part controls | createPhoneNumberUI | {
"repo_name": "DmitryADP/diff_qc750",
"path": "tools/motodev/src/plugins/emulator/src/com/motorola/studio/android/emulator/core/emulationui/SrcDestComposite.java",
"license": "gpl-2.0",
"size": 14637
} | [
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Label",
"org.eclipse.swt.widgets.Text"
] | import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Text; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,607,828 |
List<RdfTriple> getInsertStateAndServiceAndValueInstances(); | List<RdfTriple> getInsertStateAndServiceAndValueInstances(); | /**
* Method returns instance information of ALL services and states.
*
* @return a list with rdf triples to insert the services and states.
*/ | Method returns instance information of ALL services and states | getInsertStateAndServiceAndValueInstances | {
"repo_name": "openbase/bco.ontology",
"path": "lib/src/main/java/org/openbase/bco/ontology/lib/manager/abox/configuration/OntInstanceMapping.java",
"license": "lgpl-3.0",
"size": 3959
} | [
"java.util.List",
"org.openbase.bco.ontology.lib.utility.sparql.RdfTriple"
] | import java.util.List; import org.openbase.bco.ontology.lib.utility.sparql.RdfTriple; | import java.util.*; import org.openbase.bco.ontology.lib.utility.sparql.*; | [
"java.util",
"org.openbase.bco"
] | java.util; org.openbase.bco; | 1,483,750 |
public void initiateTracking(final String allocationId) {
assert assertPrimaryMode();
replicationTracker.initiateTracking(allocationId);
}
/**
* Marks the shard with the provided allocation ID as in-sync with the primary shard. See
* {@link ReplicationTracker#markAllocationIdAsInS... | void function(final String allocationId) { assert assertPrimaryMode(); replicationTracker.initiateTracking(allocationId); } /** * Marks the shard with the provided allocation ID as in-sync with the primary shard. See * {@link ReplicationTracker#markAllocationIdAsInSync(String, long)} | /**
* Called when the recovery process for a shard has opened the engine on the target shard. Ensures that the right data structures
* have been set up locally to track local checkpoint information for the shard and that the shard is added to the replication group.
*
* @param allocationId the alloc... | Called when the recovery process for a shard has opened the engine on the target shard. Ensures that the right data structures have been set up locally to track local checkpoint information for the shard and that the shard is added to the replication group | initiateTracking | {
"repo_name": "scorpionvicky/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 175161
} | [
"org.elasticsearch.index.seqno.ReplicationTracker"
] | import org.elasticsearch.index.seqno.ReplicationTracker; | import org.elasticsearch.index.seqno.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 720,813 |
public void draw() {
int state = game.getCurrentStateID();
boolean mousePressed =
(((state == Opsu.STATE_GAME || state == Opsu.STATE_GAMEPAUSEMENU) && Utils.isGameKeyPressed()) ||
((input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON) || input.isMouseButtonDown(Input.MOUSE_RIGHT_BUTTON)) &&
!(state == Opsu.... | void function() { int state = game.getCurrentStateID(); boolean mousePressed = (((state == Opsu.STATE_GAME state == Opsu.STATE_GAMEPAUSEMENU) && Utils.isGameKeyPressed()) ((input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON) input.isMouseButtonDown(Input.MOUSE_RIGHT_BUTTON)) && !(state == Opsu.STATE_GAME && Options.isMous... | /**
* Draws the cursor.
*/ | Draws the cursor | draw | {
"repo_name": "kanekikun420/opsu",
"path": "src/itdelatrisu/opsu/ui/Cursor.java",
"license": "gpl-3.0",
"size": 8582
} | [
"org.newdawn.slick.Input"
] | import org.newdawn.slick.Input; | import org.newdawn.slick.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 489,602 |
@Test
public void testSelectTracksWithNoSampleRendererWithNullOverride() throws ExoPlaybackException {
TrackSelection[] expectedTrackSelection = TRACK_SELECTIONS_WITH_NO_SAMPLE_RENDERER;
FakeMappingTrackSelector trackSelector = new FakeMappingTrackSelector(expectedTrackSelection);
trackSelector.setSelec... | void function() throws ExoPlaybackException { TrackSelection[] expectedTrackSelection = TRACK_SELECTIONS_WITH_NO_SAMPLE_RENDERER; FakeMappingTrackSelector trackSelector = new FakeMappingTrackSelector(expectedTrackSelection); trackSelector.setSelectionOverride(0, new TrackGroupArray(VIDEO_TRACK_GROUP), null); TrackSelec... | /**
* Tests that a null override clears a track selection when there is no-sample renderer.
*/ | Tests that a null override clears a track selection when there is no-sample renderer | testSelectTracksWithNoSampleRendererWithNullOverride | {
"repo_name": "kiall/ExoPlayer",
"path": "library/core/src/test/java/com/google/android/exoplayer2/trackselection/MappingTrackSelectorTest.java",
"license": "apache-2.0",
"size": 17126
} | [
"com.google.android.exoplayer2.ExoPlaybackException",
"com.google.android.exoplayer2.RendererConfiguration",
"com.google.android.exoplayer2.source.TrackGroupArray",
"com.google.common.truth.Truth"
] | import com.google.android.exoplayer2.ExoPlaybackException; import com.google.android.exoplayer2.RendererConfiguration; import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.common.truth.Truth; | import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.source.*; import com.google.common.truth.*; | [
"com.google.android",
"com.google.common"
] | com.google.android; com.google.common; | 1,809,181 |
public void loginToAdminConsole(String userName, String pwd)
throws MalformedURLException, XPathExpressionException {
getDriver().get(getBaseUrl() + ADMIN_CONSOLE_SUFFIX);
getDriver().findElement(By.id("txtUserName")).clear();
getDriver().findElement(By.id("txtUserName")).sendKey... | void function(String userName, String pwd) throws MalformedURLException, XPathExpressionException { getDriver().get(getBaseUrl() + ADMIN_CONSOLE_SUFFIX); getDriver().findElement(By.id(STR)).clear(); getDriver().findElement(By.id(STR)).sendKeys(userName); getDriver().findElement(By.id(STR)).clear(); getDriver().findElem... | /**
* To login to admin console DashBoard server.
*
* @param userName user name
* @param pwd password
* @throws MalformedURLException
* @throws XPathExpressionException
*/ | To login to admin console DashBoard server | loginToAdminConsole | {
"repo_name": "wso2/product-ues",
"path": "modules/integration/tests-ui-integration/ui-test-utils/src/main/java/org/wso2/ds/ui/integration/util/DSUIIntegrationTest.java",
"license": "apache-2.0",
"size": 32053
} | [
"java.net.MalformedURLException",
"javax.xml.xpath.XPathExpressionException",
"org.openqa.selenium.By"
] | import java.net.MalformedURLException; import javax.xml.xpath.XPathExpressionException; import org.openqa.selenium.By; | import java.net.*; import javax.xml.xpath.*; import org.openqa.selenium.*; | [
"java.net",
"javax.xml",
"org.openqa.selenium"
] | java.net; javax.xml; org.openqa.selenium; | 2,295,669 |
@SuppressWarnings("unchecked")
public void done(final Resolve<T> resolve, final Reject reject) {
callActual(resolve, reject);
} | @SuppressWarnings(STR) void function(final Resolve<T> resolve, final Reject reject) { callActual(resolve, reject); } | /**
* Start route and process result and exception.
*
* @param resolve Result callback
* @param reject Exception callback
*/ | Start route and process result and exception | done | {
"repo_name": "TangXiaoLv/Android-Router",
"path": "androidrouter/src/main/java/com/tangxiaolv/router/operators/CPromise.java",
"license": "apache-2.0",
"size": 6489
} | [
"com.tangxiaolv.router.Reject",
"com.tangxiaolv.router.Resolve"
] | import com.tangxiaolv.router.Reject; import com.tangxiaolv.router.Resolve; | import com.tangxiaolv.router.*; | [
"com.tangxiaolv.router"
] | com.tangxiaolv.router; | 403,477 |
protected ParameterService getParameterService() {
if (this.parameterService == null) {
this.parameterService = KcServiceLocator.getService(ParameterService.class);
}
return this.parameterService;
} | ParameterService function() { if (this.parameterService == null) { this.parameterService = KcServiceLocator.getService(ParameterService.class); } return this.parameterService; } | /**
* Looks up and returns the ParameterService.
* @return the parameter service.
*/ | Looks up and returns the ParameterService | getParameterService | {
"repo_name": "mukadder/kc",
"path": "coeus-impl/src/main/java/org/kuali/kra/award/web/struts/action/AwardHomeAction.java",
"license": "agpl-3.0",
"size": 29497
} | [
"org.kuali.coeus.sys.framework.service.KcServiceLocator",
"org.kuali.rice.coreservice.framework.parameter.ParameterService"
] | import org.kuali.coeus.sys.framework.service.KcServiceLocator; import org.kuali.rice.coreservice.framework.parameter.ParameterService; | import org.kuali.coeus.sys.framework.service.*; import org.kuali.rice.coreservice.framework.parameter.*; | [
"org.kuali.coeus",
"org.kuali.rice"
] | org.kuali.coeus; org.kuali.rice; | 767,332 |
@RequestMapping(value = "/search", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<UserGroupResource>> getUserGroups(@RequestBody final UserGroupSearchCriteria userGroupSearchCriteria) throws BusinessException {
... | @RequestMapping(value = STR, method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) ResponseEntity<List<UserGroupResource>> function(@RequestBody final UserGroupSearchCriteria userGroupSearchCriteria) throws BusinessException { final List<UserGroup> userGr... | /**
* Retrieve Financial year by Id.
*
* @param id
* id of Financial year to be retrieved.
* @return
*/ | Retrieve Financial year by Id | getUserGroups | {
"repo_name": "karreypradeep/BlueSpaceTechEmailApp",
"path": "EmailApp/src/main/java/com/bluespacetech/security/controller/UserGroupController.java",
"license": "apache-2.0",
"size": 6595
} | [
"com.bluespacetech.core.exceptions.BusinessException",
"com.bluespacetech.security.model.UserGroup",
"com.bluespacetech.security.resources.UserGroupResource",
"com.bluespacetech.security.resources.assembler.UserGroupResourceAssembler",
"com.bluespacetech.security.searchcriterias.UserGroupSearchCriteria",
... | import com.bluespacetech.core.exceptions.BusinessException; import com.bluespacetech.security.model.UserGroup; import com.bluespacetech.security.resources.UserGroupResource; import com.bluespacetech.security.resources.assembler.UserGroupResourceAssembler; import com.bluespacetech.security.searchcriterias.UserGroupSearc... | import com.bluespacetech.core.exceptions.*; import com.bluespacetech.security.model.*; import com.bluespacetech.security.resources.*; import com.bluespacetech.security.resources.assembler.*; import com.bluespacetech.security.searchcriterias.*; import java.util.*; import org.springframework.http.*; import org.springfram... | [
"com.bluespacetech.core",
"com.bluespacetech.security",
"java.util",
"org.springframework.http",
"org.springframework.web"
] | com.bluespacetech.core; com.bluespacetech.security; java.util; org.springframework.http; org.springframework.web; | 928,513 |
@Override
public String[] keys() throws IOException {
ResultSet rst = null;
String keys[] = null;
synchronized (this) {
int numberOfTries = 2;
while (numberOfTries > 0) {
Connection _conn = getConnection();
if (_conn == nu... | String[] function() throws IOException { ResultSet rst = null; String keys[] = null; synchronized (this) { int numberOfTries = 2; while (numberOfTries > 0) { Connection _conn = getConnection(); if (_conn == null) { return (new String[0]); } try { if (preparedKeysSql == null) { String keysSql = STR + sessionIdCol + STR ... | /**
* Return an array containing the session identifiers of all Sessions
* currently saved in this Store. If there are no such Sessions, a
* zero-length array is returned.
*
* @exception IOException if an input/output error occurred
*/ | Return an array containing the session identifiers of all Sessions currently saved in this Store. If there are no such Sessions, a zero-length array is returned | keys | {
"repo_name": "pistolove/sourcecode4junit",
"path": "Source4Tomcat/src/org/apache/catalina/session/JDBCStore.java",
"license": "apache-2.0",
"size": 36727
} | [
"java.io.IOException",
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.ArrayList"
] | import java.io.IOException; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; | import java.io.*; import java.sql.*; import java.util.*; | [
"java.io",
"java.sql",
"java.util"
] | java.io; java.sql; java.util; | 1,801,729 |
private boolean isDefaultProperty(String name, Properties properties) {
return (properties.get(name) == null);
} | boolean function(String name, Properties properties) { return (properties.get(name) == null); } | /**
* Checks if a given output property is default (2nd layer only)
*/ | Checks if a given output property is default (2nd layer only) | isDefaultProperty | {
"repo_name": "JetBrains/jdk8u_jaxp",
"path": "src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java",
"license": "gpl-2.0",
"size": 53558
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 151,497 |
public static Range findDefaultRange( Context context )
{
if ( mDefaultName == null )
listRanges( context );
return findRange( context, mDefaultName );
}
| static Range function( Context context ) { if ( mDefaultName == null ) listRanges( context ); return findRange( context, mDefaultName ); } | /**
* Answers the Range object set as the default one in the
* ranges XML source file.
*
* @param context Context used to find the XML file
* @return
*/ | Answers the Range object set as the default one in the ranges XML source file | findDefaultRange | {
"repo_name": "derekfountain/android-depth-of-field-gpl",
"path": "src/org/derekfountain/dofc/m/Range.java",
"license": "gpl-3.0",
"size": 5192
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,094,821 |
public boolean isTypeVariable() {
return type instanceof TypeVariable<?>;
} | boolean function() { return type instanceof TypeVariable<?>; } | /**
* True if this is a type variable
*
* @return
*/ | True if this is a type variable | isTypeVariable | {
"repo_name": "sefaakca/EvoSuite-Sefa",
"path": "client/src/main/java/org/evosuite/utils/generic/GenericClass.java",
"license": "lgpl-3.0",
"size": 54610
} | [
"java.lang.reflect.TypeVariable"
] | import java.lang.reflect.TypeVariable; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,776,281 |
List<FieldValueGetter> generateGetters(Class clazz); | List<FieldValueGetter> generateGetters(Class clazz); | /**
* Generates getters for {@code clazz}.
*/ | Generates getters for clazz | generateGetters | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/values/reflect/GetterFactory.java",
"license": "apache-2.0",
"size": 1200
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,593,864 |
@Generated
@CVariable()
@MappedReturn(ObjCStringMapper.class)
public static native String NSPersonNameComponentDelimiter(); | @CVariable() @MappedReturn(ObjCStringMapper.class) static native String function(); | /**
* The delimiter is the character or characters used to separate name components.
* For CJK languages there is no delimiter.
*/ | The delimiter is the character or characters used to separate name components. For CJK languages there is no delimiter | NSPersonNameComponentDelimiter | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/c/Foundation.java",
"license": "apache-2.0",
"size": 156135
} | [
"org.moe.natj.c.ann.CVariable",
"org.moe.natj.general.ann.MappedReturn",
"org.moe.natj.objc.map.ObjCStringMapper"
] | import org.moe.natj.c.ann.CVariable; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.map.ObjCStringMapper; | import org.moe.natj.c.ann.*; import org.moe.natj.general.ann.*; import org.moe.natj.objc.map.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,657,939 |
@Override
public List<TClusterNodeBean> loadByIP(String ip) {
Criteria crit = new Criteria();
crit.add(NODEADDRESS, ip);
try {
return convertTorqueListToBeanList(doSelect(crit));
} catch(Exception e) {
LOGGER.error("Loading node by ip " + ip + " failed with " + e.getMessage());
return null;
}
}
| List<TClusterNodeBean> function(String ip) { Criteria crit = new Criteria(); crit.add(NODEADDRESS, ip); try { return convertTorqueListToBeanList(doSelect(crit)); } catch(Exception e) { LOGGER.error(STR + ip + STR + e.getMessage()); return null; } } | /**
* Loads all entity changes for a cluster node
* @return
*/ | Loads all entity changes for a cluster node | loadByIP | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/TClusterNodePeer.java",
"license": "gpl-3.0",
"size": 13325
} | [
"com.aurel.track.beans.TClusterNodeBean",
"java.util.List",
"org.apache.torque.util.Criteria"
] | import com.aurel.track.beans.TClusterNodeBean; import java.util.List; import org.apache.torque.util.Criteria; | import com.aurel.track.beans.*; import java.util.*; import org.apache.torque.util.*; | [
"com.aurel.track",
"java.util",
"org.apache.torque"
] | com.aurel.track; java.util; org.apache.torque; | 1,782,927 |
public void addRow(ResultSetRow row) throws SQLException {
notSupported();
} | void function(ResultSetRow row) throws SQLException { notSupported(); } | /**
* Adds a row to this row data.
*
* @param row
* the row to add
* @throws SQLException
* if a database error occurs
*/ | Adds a row to this row data | addRow | {
"repo_name": "yyuu/libmysql-java",
"path": "src/com/mysql/jdbc/RowDataCursor.java",
"license": "gpl-2.0",
"size": 11889
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 886,774 |
public @Nullable UUID lookupUuid(String username) {
Set<UUID> uuids = this.lookupMap.lookupUuid(username);
return Iterables.getFirst(uuids, null);
} | @Nullable UUID function(String username) { Set<UUID> uuids = this.lookupMap.lookupUuid(username); return Iterables.getFirst(uuids, null); } | /**
* Gets the most recent uuid which connected with the given username, or null
*
* @param username the username to lookup with
* @return a uuid, or null
*/ | Gets the most recent uuid which connected with the given username, or null | lookupUuid | {
"repo_name": "lucko/LuckPerms",
"path": "common/src/main/java/me/lucko/luckperms/common/storage/implementation/file/FileUuidCache.java",
"license": "mit",
"size": 7924
} | [
"com.google.common.collect.Iterables",
"java.util.Set",
"org.checkerframework.checker.nullness.qual.Nullable"
] | import com.google.common.collect.Iterables; import java.util.Set; import org.checkerframework.checker.nullness.qual.Nullable; | import com.google.common.collect.*; import java.util.*; import org.checkerframework.checker.nullness.qual.*; | [
"com.google.common",
"java.util",
"org.checkerframework.checker"
] | com.google.common; java.util; org.checkerframework.checker; | 2,431,660 |
@SimpleFunction(description = "This searches Twitter for the given String query."
+ "<p><u>Requirements</u>: This should only be called after the "
+ "<code>IsAuthorized</code> event has been raised, indicating that the "
+ "user has successfully logged in to Twitter.</p>")
public void SearchTwitt... | @SimpleFunction(description = STR + STR + STR + STR) void function(final String query) { if (twitter == null userName.length() == 0) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_TWITTER_SEARCH_FAILED, STR); return; } AsynchUtil.runAsynchronously(new Runnable() { List<Status> tweets = Collections.emp... | /**
* Search for tweets or labels
*/ | Search for tweets or labels | SearchTwitter | {
"repo_name": "anseo/friedgerAI24BLE",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Twitter.java",
"license": "mit",
"size": 38565
} | [
"com.google.appinventor.components.annotations.SimpleFunction",
"com.google.appinventor.components.runtime.util.AsynchUtil",
"com.google.appinventor.components.runtime.util.ErrorMessages",
"java.util.Collections",
"java.util.List"
] | import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.AsynchUtil; import com.google.appinventor.components.runtime.util.ErrorMessages; import java.util.Collections; import java.util.List; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*; import java.util.*; | [
"com.google.appinventor",
"java.util"
] | com.google.appinventor; java.util; | 1,364,008 |
public static L0ModificationInstruction modL0Lambda(Lambda lambda) {
checkNotNull(lambda, "L0 OCh signal cannot be null");
if (lambda instanceof IndexedLambda) {
return new ModLambdaInstruction(L0SubType.LAMBDA, (short) ((IndexedLambda) lambda).index());
} else if (lambda instan... | static L0ModificationInstruction function(Lambda lambda) { checkNotNull(lambda, STR); if (lambda instanceof IndexedLambda) { return new ModLambdaInstruction(L0SubType.LAMBDA, (short) ((IndexedLambda) lambda).index()); } else if (lambda instanceof OchSignal) { return new ModOchSignalInstruction((OchSignal) lambda); } el... | /**
* Creates an L0 modification with the specified OCh signal.
*
* @param lambda OCh signal
* @return an L0 modification
*/ | Creates an L0 modification with the specified OCh signal | modL0Lambda | {
"repo_name": "CNlukai/onos-gerrit-test",
"path": "core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java",
"license": "apache-2.0",
"size": 17125
} | [
"com.google.common.base.Preconditions",
"org.onosproject.net.IndexedLambda",
"org.onosproject.net.Lambda",
"org.onosproject.net.OchSignal",
"org.onosproject.net.flow.instructions.L0ModificationInstruction"
] | import com.google.common.base.Preconditions; import org.onosproject.net.IndexedLambda; import org.onosproject.net.Lambda; import org.onosproject.net.OchSignal; import org.onosproject.net.flow.instructions.L0ModificationInstruction; | import com.google.common.base.*; import org.onosproject.net.*; import org.onosproject.net.flow.instructions.*; | [
"com.google.common",
"org.onosproject.net"
] | com.google.common; org.onosproject.net; | 595,421 |
public Action chooseAction(Map<Direction, Occupant> neighbors) {
List<Direction> empties = getNeighborsOfType(neighbors, "empty");
if (empties.size() == 1) {
Direction moveDir = empties.get(0);
return new Action(Action.ActionType.MOVE, moveDir);
}
if (empties... | Action function(Map<Direction, Occupant> neighbors) { List<Direction> empties = getNeighborsOfType(neighbors, "empty"); if (empties.size() == 1) { Direction moveDir = empties.get(0); return new Action(Action.ActionType.MOVE, moveDir); } if (empties.size() > 1) { if (HugLifeUtils.random() < moveProbability) { Direction ... | /** Sample Creatures take actions according to the following rules about
* NEIGHBORS:
* 1. If surrounded on three sides, move into the empty space.
* 2. Otherwise, if there are any empty spaces, move into one of them with
* probabiltiy given by moveProbability.
* 3. Otherwise, stay.
... | Sample Creatures take actions according to the following rules about 1. If surrounded on three sides, move into the empty space. 2. Otherwise, if there are any empty spaces, move into one of them with probabiltiy given by moveProbability. 3. Otherwise, stay. Returns the action selected | chooseAction | {
"repo_name": "hardfist/CS61b",
"path": "lab9/huglifeSavable/huglife/SampleCreature.java",
"license": "mit",
"size": 4264
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,863,633 |
Observable<ServiceResponse<Void>> postOptionalArrayHeaderWithServiceResponseAsync(List<String> headerParameter); | Observable<ServiceResponse<Void>> postOptionalArrayHeaderWithServiceResponseAsync(List<String> headerParameter); | /**
* Test explicitly optional integer. Please put a header 'headerParameter' => null.
*
* @param headerParameter the List<String> value
* @return the {@link ServiceResponse} object if successful.
*/ | Test explicitly optional integer. Please put a header 'headerParameter' => null | postOptionalArrayHeaderWithServiceResponseAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/Explicits.java",
"license": "mit",
"size": 43451
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 775,741 |
private TypeFlow lookupFlow(ValueNode node) {
ValueNode unproxiedNode = GraphUtil.unproxify(node);
TypeFlow result = typeFlows.get(unproxiedNode);
if (result == null) {
throw error("Node is not supported yet by static analysis: " + node.getCla... | TypeFlow function(ValueNode node) { ValueNode unproxiedNode = GraphUtil.unproxify(node); TypeFlow result = typeFlows.get(unproxiedNode); if (result == null) { throw error(STR + node.getClass().getName()); } return result; } | /**
* Lookup the type flow node for a Graal node.
*/ | Lookup the type flow node for a Graal node | lookupFlow | {
"repo_name": "graalvm/graal-core",
"path": "graal/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/tutorial/StaticAnalysis.java",
"license": "gpl-2.0",
"size": 26206
} | [
"org.graalvm.compiler.nodes.ValueNode",
"org.graalvm.compiler.nodes.util.GraphUtil"
] | import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.util.GraphUtil; | import org.graalvm.compiler.nodes.*; import org.graalvm.compiler.nodes.util.*; | [
"org.graalvm.compiler"
] | org.graalvm.compiler; | 1,240,320 |
public boolean unregisterServices(NodeConfig nodeConfig) {
LOG.info("Removing service xml configuration file",
Constant.Component.Name.HADOOP, nodeConfig.getHost());
return com.impetus.ankush2.agent.AgentUtils.removeServiceXml(
nodeConfig.getConnection(), Constant.Component.Name.HADOOP);
} | boolean function(NodeConfig nodeConfig) { LOG.info(STR, Constant.Component.Name.HADOOP, nodeConfig.getHost()); return com.impetus.ankush2.agent.AgentUtils.removeServiceXml( nodeConfig.getConnection(), Constant.Component.Name.HADOOP); } | /**
* Unregister services.
*
* @param nodeConfig
* the node config
* @return true, if successful
*/ | Unregister services | unregisterServices | {
"repo_name": "zengzhaozheng/ankush",
"path": "ankush/src/main/java/com/impetus/ankush2/hadoop/deployer/servicemanager/HadoopServiceManager.java",
"license": "lgpl-3.0",
"size": 16372
} | [
"com.impetus.ankush2.agent.AgentUtils",
"com.impetus.ankush2.constant.Constant",
"com.impetus.ankush2.framework.config.NodeConfig"
] | import com.impetus.ankush2.agent.AgentUtils; import com.impetus.ankush2.constant.Constant; import com.impetus.ankush2.framework.config.NodeConfig; | import com.impetus.ankush2.agent.*; import com.impetus.ankush2.constant.*; import com.impetus.ankush2.framework.config.*; | [
"com.impetus.ankush2"
] | com.impetus.ankush2; | 1,570,366 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginSuspend(
String resourceGroupName, String cacheName, String storageTargetName); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginSuspend( String resourceGroupName, String cacheName, String storageTargetName); | /**
* Suspends client access to a storage target.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
* @param storageTargetName Name of Storage Target.
... | Suspends client access to a storage target | beginSuspend | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java",
"license": "mit",
"size": 11541
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 730,801 |
protected void configureProperties(final List<ScanCommandProperty> properties)
{
properties.add(
new ScanCommandProperty("error_handler", "Error Handler", String.class));
} | void function(final List<ScanCommandProperty> properties) { properties.add( new ScanCommandProperty(STR, STR, String.class)); } | /** Declare properties of this command
*
* <p>Derived classes should add their properties and
* call the base implementation to declare inherited properties.
*
* @param properties List to which to add properties
*/ | Declare properties of this command Derived classes should add their properties and call the base implementation to declare inherited properties | configureProperties | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "applications/scan/scan-plugins/org.csstudio.scan/src/org/csstudio/scan/command/ScanCommand.java",
"license": "epl-1.0",
"size": 14255
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,563,039 |
public String getOfficial()
{
final String ret;
if (docTypeName == null) {
ret = DBProperties.getProperty(AccountFundsToBeSettledReport.class.getName() + ".NotWithDocument");
} else {
ret = DBProperties.getProperty(AccountFundsToBeSettl... | String function() { final String ret; if (docTypeName == null) { ret = DBProperties.getProperty(AccountFundsToBeSettledReport.class.getName() + STR); } else { ret = DBProperties.getProperty(AccountFundsToBeSettledReport.class.getName() + STR); } return ret; } | /**
* Gets the official.
*
* @return the official
*/ | Gets the official | getOfficial | {
"repo_name": "eFaps/eFapsApp-Sales",
"path": "src/main/efaps/ESJP/org/efaps/esjp/sales/report/AccountFundsToBeSettledReport_Base.java",
"license": "apache-2.0",
"size": 38204
} | [
"org.efaps.admin.dbproperty.DBProperties"
] | import org.efaps.admin.dbproperty.DBProperties; | import org.efaps.admin.dbproperty.*; | [
"org.efaps.admin"
] | org.efaps.admin; | 2,499,497 |
public Set<PacketType> getClientPackets() {
return Collections.unmodifiableSet(register.clientPackets);
}
| Set<PacketType> function() { return Collections.unmodifiableSet(register.clientPackets); } | /**
* Retrieve every known client packet, from every protocol.
* @return Every client packet.
*/ | Retrieve every known client packet, from every protocol | getClientPackets | {
"repo_name": "ewized/ProtocolLib",
"path": "ProtocolLib/src/main/java/com/comphenix/protocol/injector/netty/NettyProtocolRegistry.java",
"license": "gpl-2.0",
"size": 7760
} | [
"com.comphenix.protocol.PacketType",
"java.util.Collections",
"java.util.Set"
] | import com.comphenix.protocol.PacketType; import java.util.Collections; import java.util.Set; | import com.comphenix.protocol.*; import java.util.*; | [
"com.comphenix.protocol",
"java.util"
] | com.comphenix.protocol; java.util; | 2,012,119 |
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
Component renderer = getDrawComponent(value);
if (table.isCellEditable(row, column)) {
// If the cell is editable, returns a comboBox
combo.removeAllItems();
if ... | Component function(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component renderer = getDrawComponent(value); if (table.isCellEditable(row, column)) { combo.removeAllItems(); if (value != null) { combo.addItem(renderer); combo.setSelectedItem(value); } if (!isSelected) { comb... | /**
* Returns the component used for drawing the cell. This method is
* used to configure the renderer appropriately before drawing.
*
* @param table the <code>JTable</code> that is asking the
* renderer to draw; can be <code>null</code>
* @param value the value of the cell to be ... | Returns the component used for drawing the cell. This method is used to configure the renderer appropriately before drawing | getTableCellRendererComponent | {
"repo_name": "HOMlab/QN-ACTR-Release",
"path": "QN-ACTR Java/src/jmt/gui/common/editors/ImagedComboBoxCellEditorFactory.java",
"license": "lgpl-3.0",
"size": 14784
} | [
"java.awt.Component",
"javax.swing.DefaultCellEditor",
"javax.swing.JComboBox",
"javax.swing.JTable"
] | import java.awt.Component; import javax.swing.DefaultCellEditor; import javax.swing.JComboBox; import javax.swing.JTable; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,008,980 |
public void addTargetFields(Set<String> targetFields) {
for (String tf : targetFields)
{
this.targetFields.add(tf);
}
} | void function(Set<String> targetFields) { for (String tf : targetFields) { this.targetFields.add(tf); } } | /**
* Set target fields
*
* @param targetFields
*/ | Set target fields | addTargetFields | {
"repo_name": "jamie-dryad/dryad-repo",
"path": "dspace-api/src/main/java/org/dspace/app/itemupdate/UpdateMetadataAction.java",
"license": "bsd-3-clause",
"size": 1513
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 369,305 |
public List<Expression> getArguments() {
return arguments;
} | List<Expression> function() { return arguments; } | /**
* Gets arguments of this function call
*
* @return list of expressions representing arguments of function call
*/ | Gets arguments of this function call | getArguments | {
"repo_name": "turn/camino",
"path": "src/main/java/com/turn/camino/lang/ast/FunctionCall.java",
"license": "apache-2.0",
"size": 1946
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,468,632 |
public static Uint8ClampedArray create(JsArrayInteger array) {
if (!isSupported()) {
return null;
}
return createImpl(array);
}
| static Uint8ClampedArray function(JsArrayInteger array) { if (!isSupported()) { return null; } return createImpl(array); } | /**
* Creates a new instance of the {@link Uint8ClampedArray} of the length of the given array in
* values. The values contained in the given array are set to the newly created
* {@link Uint8ClampedArray}.
*
* @param array the array to get the values from
* @return the created {@link Uint8Clamp... | Creates a new instance of the <code>Uint8ClampedArray</code> of the length of the given array in values. The values contained in the given array are set to the newly created <code>Uint8ClampedArray</code> | create | {
"repo_name": "syntelos/gwtcc-gwtgl",
"path": "src/com/google/gwt/typedarrays/client/Uint8ClampedArray.java",
"license": "apache-2.0",
"size": 12627
} | [
"com.google.gwt.core.client.JsArrayInteger"
] | import com.google.gwt.core.client.JsArrayInteger; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 367,963 |
public static boolean validateHITSPMedicationsSectionMedication(MedicationsSection medicationsSection, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (VALIDATE_HITSP_MEDICATIONS_SECTION_MEDICATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
OCL.Helper helper = EOCL_ENV.createOCLHelper();
h... | static boolean function(MedicationsSection medicationsSection, DiagnosticChain diagnostics, Map<Object, Object> context) { if (VALIDATE_HITSP_MEDICATIONS_SECTION_MEDICATION__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) { OCL.Helper helper = EOCL_ENV.createOCLHelper(); helper.setContext(HITSPPackage.Literals.MEDICATIONS_SECT... | /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* self.entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(hitsp::Medication))
* @param medicationsSection The receiving '<em><b>Medications Sec... | self.entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(hitsp::Medication)) | validateHITSPMedicationsSectionMedication | {
"repo_name": "drbgfc/mdht",
"path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.hitsp/src/org/openhealthtools/mdht/uml/cda/hitsp/operations/MedicationsSectionOperations.java",
"license": "epl-1.0",
"size": 10589
} | [
"java.util.Map",
"org.eclipse.emf.common.util.BasicDiagnostic",
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.common.util.DiagnosticChain",
"org.eclipse.emf.ecore.EClassifier",
"org.eclipse.ocl.ParserException",
"org.eclipse.ocl.expressions.OCLExpression",
"org.openhealthtools.mdht.uml.cd... | import java.util.Map; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.ocl.ParserException; import org.eclipse.ocl.expressions.OCLExpression; import org.open... | import java.util.*; import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.ocl.*; import org.eclipse.ocl.expressions.*; import org.openhealthtools.mdht.uml.cda.hitsp.*; import org.openhealthtools.mdht.uml.cda.hitsp.util.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.ocl",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.eclipse.ocl; org.openhealthtools.mdht; | 1,319,401 |
public int calcSampleSize(View parent, int srcWidth, int srcHeight, TiDimension destWidthDimension, TiDimension destHeightDimension)
{
int destWidth, destHeight;
destWidth = destHeight = TiDrawableReference.UNKNOWN;
Bounds destBounds = calcDestSize(srcWidth, srcHeight, destWidthDimension, destHeightDimension... | int function(View parent, int srcWidth, int srcHeight, TiDimension destWidthDimension, TiDimension destHeightDimension) { int destWidth, destHeight; destWidth = destHeight = TiDrawableReference.UNKNOWN; Bounds destBounds = calcDestSize(srcWidth, srcHeight, destWidthDimension, destHeightDimension, parent); destWidth = d... | /**
* Calculates a value for the BitmapFactory.Options .inSampleSize property.
*
* @see <a href="http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html#inSampleSize">BitmapFactory.Options.inSampleSize</a>
* @param srcWidth int
* @param srcHeight int
* @param destWidthDimension T... | Calculates a value for the BitmapFactory.Options .inSampleSize property | calcSampleSize | {
"repo_name": "smit1625/titanium_mobile",
"path": "android/titanium/src/java/org/appcelerator/titanium/view/TiDrawableReference.java",
"license": "apache-2.0",
"size": 31660
} | [
"android.view.View",
"org.appcelerator.titanium.TiDimension"
] | import android.view.View; import org.appcelerator.titanium.TiDimension; | import android.view.*; import org.appcelerator.titanium.*; | [
"android.view",
"org.appcelerator.titanium"
] | android.view; org.appcelerator.titanium; | 955,289 |
public final void setRepeatedMeasuresList(
final List<RepeatedMeasuresNode> repeatedMeasuresList) {
this.repeatedMeasuresList = repeatedMeasuresList;
}
| final void function( final List<RepeatedMeasuresNode> repeatedMeasuresList) { this.repeatedMeasuresList = repeatedMeasuresList; } | /**
* Sets the repeated measures list.
*
* @param repeatedMeasuresList the new repeated measures list
*/ | Sets the repeated measures list | setRepeatedMeasuresList | {
"repo_name": "SampleSizeShop/WebServiceCommon",
"path": "src/edu/ucdenver/bios/webservice/common/domain/RepeatedMeasuresNodeList.java",
"license": "gpl-2.0",
"size": 3775
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,675,171 |
public static void main(Iterable<Class<? extends BlazeModule>> moduleClasses, String[] args) {
setupUncaughtHandlerAtStartup(args);
List<BlazeModule> modules = createModules(moduleClasses);
// blaze.cc will put --batch first if the user set it.
if (args.length >= 1 && args[0].equals("--batch")) {
... | static void function(Iterable<Class<? extends BlazeModule>> moduleClasses, String[] args) { setupUncaughtHandlerAtStartup(args); List<BlazeModule> modules = createModules(moduleClasses); if (args.length >= 1 && args[0].equals(STR)) { System.exit(batchMain(modules, args)); } logger.atInfo().log( STR, maybeGetPidString()... | /**
* Main method for the Blaze server startup. Note: This method logs exceptions to remote servers.
* Do not add this to a unittest.
*/ | Main method for the Blaze server startup. Note: This method logs exceptions to remote servers. Do not add this to a unittest | main | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java",
"license": "apache-2.0",
"size": 68600
} | [
"com.google.devtools.build.lib.bugreport.BugReport",
"com.google.devtools.build.lib.util.CrashFailureDetails",
"com.google.devtools.build.lib.util.CustomFailureDetailPublisher",
"com.google.devtools.build.lib.util.ExitCode",
"com.google.devtools.build.lib.util.io.OutErr",
"java.util.Arrays",
"java.util.... | import com.google.devtools.build.lib.bugreport.BugReport; import com.google.devtools.build.lib.util.CrashFailureDetails; import com.google.devtools.build.lib.util.CustomFailureDetailPublisher; import com.google.devtools.build.lib.util.ExitCode; import com.google.devtools.build.lib.util.io.OutErr; import java.util.Array... | import com.google.devtools.build.lib.bugreport.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.util.io.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 595,382 |
private void doRenameEncryptionZone(FSTestWrapper wrapper) throws Exception {
final Path testRoot = new Path("/tmp/TestEncryptionZones");
final Path pathFoo = new Path(testRoot, "foo");
final Path pathFooBaz = new Path(pathFoo, "baz");
final Path pathFooBazFile = new Path(pathFooBaz, "file");
fina... | void function(FSTestWrapper wrapper) throws Exception { final Path testRoot = new Path(STR); final Path pathFoo = new Path(testRoot, "foo"); final Path pathFooBaz = new Path(pathFoo, "baz"); final Path pathFooBazFile = new Path(pathFooBaz, "file"); final Path pathFooBar = new Path(pathFoo, "bar"); final Path pathFooBar... | /**
* Test success of Rename EZ on a directory which is already an EZ.
*/ | Test success of Rename EZ on a directory which is already an EZ | doRenameEncryptionZone | {
"repo_name": "nandakumar131/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestEncryptionZones.java",
"license": "apache-2.0",
"size": 99544
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FSTestWrapper",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.test.GenericTestUtils",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.hadoop.fs.FSTestWrapper; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.test.GenericTestUtils; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.test.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 1,163,681 |
ExtensibleHardwareMap hardwareMap(); | ExtensibleHardwareMap hardwareMap(); | /**
* Returns the Hardware Map
*
* @return the <code>ExtensibleHardwareMap</code> currently in use
*/ | Returns the Hardware Map | hardwareMap | {
"repo_name": "MHS-FIRSTrobotics/TeamClutch-FTC2016",
"path": "FtcXtensible/src/main/java/org/ftccommunity/ftcxtensible/interfaces/AbstractRobotContext.java",
"license": "mit",
"size": 5983
} | [
"org.ftccommunity.ftcxtensible.robot.ExtensibleHardwareMap"
] | import org.ftccommunity.ftcxtensible.robot.ExtensibleHardwareMap; | import org.ftccommunity.ftcxtensible.robot.*; | [
"org.ftccommunity.ftcxtensible"
] | org.ftccommunity.ftcxtensible; | 2,559,097 |
@Override public void enterBetweenOperator(@NotNull AQLParser.BetweenOperatorContext ctx) { } | @Override public void enterBetweenOperator(@NotNull AQLParser.BetweenOperatorContext ctx) { } | /**
* {@inheritDoc}
* <p/>
* The default implementation does nothing.
*/ | The default implementation does nothing | exitSubquery | {
"repo_name": "chriswhite199/jdbc-driver",
"path": "src/main/java/com/ibm/si/jaql/aql/AQLBaseListener.java",
"license": "apache-2.0",
"size": 13047
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,190,125 |
@Override
public void delete( Collection<? extends T> entities )
{
for ( T obj : entities )
{
delete( obj );
}
}
/**
* Gets the {@link Class} of the entity that this repository is managing.
*
* @return the entity {@link Class} | void function( Collection<? extends T> entities ) { for ( T obj : entities ) { delete( obj ); } } /** * Gets the {@link Class} of the entity that this repository is managing. * * @return the entity {@link Class} | /**
* Delete a collection of objects.
*
* @param entities the objects to be deleted
*/ | Delete a collection of objects | delete | {
"repo_name": "csnemeti/fim",
"path": "src/main/java/pfa/alliance/fim/dao/impl/AbstractJpaRepository.java",
"license": "apache-2.0",
"size": 3809
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 327,387 |
void resetUserPin(String newPin) throws PinModeLockedException, IOException; | void resetUserPin(String newPin) throws PinModeLockedException, IOException; | /**
* Re-sets and unblocks the user PIN. Can be used if the user PIN is lost.
* Requires admin mode to be unlocked.
*
* @param newPin The new user PIN to set.
* @throws PinModeLockedException
* @throws IOException
*/ | Re-sets and unblocks the user PIN. Can be used if the user PIN is lost. Requires admin mode to be unlocked | resetUserPin | {
"repo_name": "Yubico/yubico-bitcoin-java",
"path": "yubico-bitcoin-java-core/src/main/java/com/yubico/bitcoin/api/YkneoBitcoin.java",
"license": "apache-2.0",
"size": 9009
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,512,363 |
public boolean delNodes(int mot1, int mot2) {
int nmots = mots.size();
ArrayList<Mot> mots2del = new ArrayList<Mot>();
for (int i=mot1;i<=mot2;i++) {
mots2del.add(getMot(i));
}
// on detruit d'abord les dependances
for (int i=deps.size()-1;i>=0;i--) {
Dep dep = deps.get(i);
if (mots2del.contains... | boolean function(int mot1, int mot2) { int nmots = mots.size(); ArrayList<Mot> mots2del = new ArrayList<Mot>(); for (int i=mot1;i<=mot2;i++) { mots2del.add(getMot(i)); } for (int i=deps.size()-1;i>=0;i--) { Dep dep = deps.get(i); if (mots2del.contains(dep.gov) mots2del.contains(dep.head)) { deps.remove(i); } } if (grou... | /**
* supprime les noeuds (et leurs arcs) de mot1 a mot2 inclus
* retourne true ssi il ne reste aucun noeud
*/ | supprime les noeuds (et leurs arcs) de mot1 a mot2 inclus retourne true ssi il ne reste aucun noeud | delNodes | {
"repo_name": "cerisara/jsafran",
"path": "src/jsafran/DetGraph.java",
"license": "gpl-2.0",
"size": 28612
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 451,469 |
@Override
public List<MapEntry> getResolveMaps() {
final List<MapEntry> entries = new ArrayList<MapEntry>();
for (final List<MapEntry> list : this.resolveMapsMap.values()) {
entries.addAll(list);
}
Collections.sort(entries);
return Collections.unmodifiableList... | List<MapEntry> function() { final List<MapEntry> entries = new ArrayList<MapEntry>(); for (final List<MapEntry> list : this.resolveMapsMap.values()) { entries.addAll(list); } Collections.sort(entries); return Collections.unmodifiableList(entries); } | /**
* This is for the web console plugin
*/ | This is for the web console plugin | getResolveMaps | {
"repo_name": "cleliameneghin/sling",
"path": "bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java",
"license": "apache-2.0",
"size": 59449
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 915,406 |
public static Resource getCanonicalResourceEL(Resource res) {
if (res == null) return res;
try {
return res.getCanonicalResource();
}
catch (IOException e) {
return res.getAbsoluteResource();
}
} | static Resource function(Resource res) { if (res == null) return res; try { return res.getCanonicalResource(); } catch (IOException e) { return res.getAbsoluteResource(); } } | /**
* Returns the canonical form of this abstract pathname.
*
* @param res file to get canonical form from it
*
* @return The canonical pathname string denoting the same file or directory as this abstract
* pathname
*
* @throws SecurityException If a required system prop... | Returns the canonical form of this abstract pathname | getCanonicalResourceEL | {
"repo_name": "jzuijlek/Lucee",
"path": "core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java",
"license": "lgpl-2.1",
"size": 48568
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,871,459 |
public void setCommunitiesCreated(List<Community> communitiesCreated) {
this.communitiesCreated = communitiesCreated;
}
| void function(List<Community> communitiesCreated) { this.communitiesCreated = communitiesCreated; } | /**
* Sets the communities created.
*
* @param communitiesCreated the new communities created
*/ | Sets the communities created | setCommunitiesCreated | {
"repo_name": "hibernate/hibernate-demos",
"path": "hibernate-orm/core/Basic/src/main/java/org/hibernate/brmeyer/demo/entity/User.java",
"license": "apache-2.0",
"size": 7776
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,504,034 |
@SuppressWarnings("deprecation")
public synchronized Session getHibernateSession() throws UNISoNException {
HibernateHelper.logger.debug("getHibernateSession");
if (null == HibernateHelper.sessionFactory) {
try {
final Configuration config = this.getHibernateConfig();
// FIXME - couldn't stop the No... | @SuppressWarnings(STR) synchronized Session function() throws UNISoNException { HibernateHelper.logger.debug(STR); if (null == HibernateHelper.sessionFactory) { try { final Configuration config = this.getHibernateConfig(); final Level level = Category.getRoot().getLevel(); Category.getRoot().setLevel(Level.FATAL); Hibe... | /**
* Gets the hibernate session.
*
* @return the hibernate session
* @throws UNISoNException
* the UNI so n exception
*/ | Gets the hibernate session | getHibernateSession | {
"repo_name": "leonarduk/unison",
"path": "src/main/java/uk/co/sleonard/unison/datahandling/HibernateHelper.java",
"license": "apache-2.0",
"size": 24694
} | [
"org.apache.log4j.Category",
"org.apache.log4j.Level",
"org.hibernate.Session",
"org.hibernate.cfg.Configuration",
"uk.co.sleonard.unison.UNISoNException"
] | import org.apache.log4j.Category; import org.apache.log4j.Level; import org.hibernate.Session; import org.hibernate.cfg.Configuration; import uk.co.sleonard.unison.UNISoNException; | import org.apache.log4j.*; import org.hibernate.*; import org.hibernate.cfg.*; import uk.co.sleonard.unison.*; | [
"org.apache.log4j",
"org.hibernate",
"org.hibernate.cfg",
"uk.co.sleonard"
] | org.apache.log4j; org.hibernate; org.hibernate.cfg; uk.co.sleonard; | 187,249 |
public Object getConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
{
log.debug("call getConnection");
return null;
} | Object function(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException { log.debug(STR); return null; } | /** Creates a new connection handle for the underlying physical connection
* represented by the ManagedConnection instance.
*
* @param subject security context as JAAS subject
* @param cxRequestInfo ConnectionRequestInfo instance
* @return generic Object instance ... | Creates a new connection handle for the underlying physical connection represented by the ManagedConnection instance | getConnection | {
"repo_name": "ironjacamar/ironjacamar",
"path": "validator/tests/src/test/java/org/jboss/jca/validator/rules/base/BaseManagedConnection.java",
"license": "lgpl-2.1",
"size": 6068
} | [
"javax.resource.ResourceException",
"javax.resource.spi.ConnectionRequestInfo",
"javax.security.auth.Subject"
] | import javax.resource.ResourceException; import javax.resource.spi.ConnectionRequestInfo; import javax.security.auth.Subject; | import javax.resource.*; import javax.resource.spi.*; import javax.security.auth.*; | [
"javax.resource",
"javax.security"
] | javax.resource; javax.security; | 2,688,395 |
public String createToken(final Principal principal, final List<Permission> permissions) {
return createToken(principal, permissions, null);
} | String function(final Principal principal, final List<Permission> permissions) { return createToken(principal, permissions, null); } | /**
* Creates a new JWT for the specified principal. Token is signed using
* the SecretKey with an HMAC 256 algorithm.
*
* @param principal the Principal to create the token for
* @param permissions the effective list of permissions for the principal
* @return a String representation of th... | Creates a new JWT for the specified principal. Token is signed using the SecretKey with an HMAC 256 algorithm | createToken | {
"repo_name": "stevespringett/Alpine",
"path": "alpine/src/main/java/alpine/auth/JsonWebToken.java",
"license": "apache-2.0",
"size": 8823
} | [
"java.security.Principal",
"java.util.List"
] | import java.security.Principal; import java.util.List; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 786,752 |
public void setJschLoggingLevel(LoggingLevel jschLoggingLevel) {
this.jschLoggingLevel = jschLoggingLevel;
} | void function(LoggingLevel jschLoggingLevel) { this.jschLoggingLevel = jschLoggingLevel; } | /**
* The logging level to use for JSCH activity logging.
* As JSCH is verbose at by default at INFO level the threshold is WARN by default.
*/ | The logging level to use for JSCH activity logging. As JSCH is verbose at by default at INFO level the threshold is WARN by default | setJschLoggingLevel | {
"repo_name": "Fabryprog/camel",
"path": "components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java",
"license": "apache-2.0",
"size": 9575
} | [
"org.apache.camel.LoggingLevel"
] | import org.apache.camel.LoggingLevel; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,874,803 |
private void add(PdfTable table, boolean onlyFirstPage) throws DocumentException {
// before every table, we flush all lines
flushLines();
// initialisation of parameters
float pagetop = indentTop();
float oldHeight = currentHeight;
float cellDisplacement;
PdfCell cell;
PdfContentByte cellG... | void function(PdfTable table, boolean onlyFirstPage) throws DocumentException { flushLines(); float pagetop = indentTop(); float oldHeight = currentHeight; float cellDisplacement; PdfCell cell; PdfContentByte cellGraphics = new PdfContentByte(writer); boolean tableHasToFit = table.hasToFitPageTable() ? table.bottom() <... | /**
* Adds a new table to
* @param table Table to add. Rendered rows will be deleted after processing.
* @param onlyFirstPage Render only the first full page
* @throws DocumentException
*/ | Adds a new table to | add | {
"repo_name": "MesquiteProject/MesquiteArchive",
"path": "trunk/Mesquite Project/LibrarySource/com/lowagie/text/pdf/PdfDocument.java",
"license": "lgpl-3.0",
"size": 115660
} | [
"com.lowagie.text.DocumentException",
"com.lowagie.text.Image",
"com.lowagie.text.Rectangle",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.ListIterator"
] | import com.lowagie.text.DocumentException; import com.lowagie.text.Image; import com.lowagie.text.Rectangle; import java.util.ArrayList; import java.util.Iterator; import java.util.ListIterator; | import com.lowagie.text.*; import java.util.*; | [
"com.lowagie.text",
"java.util"
] | com.lowagie.text; java.util; | 2,801,988 |
public void loadSegs(Node node, Map<String, List<String>> segs) {
int type = node.getNodeType();
is_ref = false;
switch(type) {
case Node.DOCUMENT_NODE:
loadSegs(((Document) node).getDocumentElement(), segs);
break;
case Node.ELEMENT_NODE:
loadSegsElement(node, segs);
NodeList chi... | void function(Node node, Map<String, List<String>> segs) { int type = node.getNodeType(); is_ref = false; switch(type) { case Node.DOCUMENT_NODE: loadSegs(((Document) node).getDocumentElement(), segs); break; case Node.ELEMENT_NODE: loadSegsElement(node, segs); NodeList children = node.getChildNodes(); if(children != n... | /********************************************************
* Name: loadSegs
* Desc: Loads the segments from the document objects.
* This document object do NOT assumes the existence of sysid
* field.
* Segment text and sysids are put into the given hashmaps.
**************************... | Name: loadSegs Desc: Loads the segments from the document objects. This document object do NOT assumes the existence of sysid field. Segment text and sysids are put into the given hashmaps | loadSegs | {
"repo_name": "jhclark/tercom",
"path": "src/ter/io/SgmlProcessor.java",
"license": "lgpl-2.1",
"size": 33189
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.w3c.dom.Document",
"org.w3c.dom.Node",
"org.w3c.dom.NodeList"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 107,776 |
EMap<Tuple<DeployedOperation, DeployedStorage>, AggregatedStorageAccess> getAggregatedStorageAccesses(); | EMap<Tuple<DeployedOperation, DeployedStorage>, AggregatedStorageAccess> getAggregatedStorageAccesses(); | /**
* Returns the value of the '<em><b>Aggregated Storage Accesses</b></em>' map.
* The key is of type {@link kieker.model.analysismodel.execution.Tuple<kieker.model.analysismodel.deployment.DeployedOperation, kieker.model.analysismodel.deployment.DeployedStorage>},
* and the value is of type {@link kieker.model.... | Returns the value of the 'Aggregated Storage Accesses' map. The key is of type <code>kieker.model.analysismodel.execution.Tuple</code>, and the value is of type <code>kieker.model.analysismodel.execution.AggregatedStorageAccess</code>, | getAggregatedStorageAccesses | {
"repo_name": "kieker-monitoring/kieker",
"path": "kieker-model/src-gen/kieker/model/analysismodel/execution/ExecutionModel.java",
"license": "apache-2.0",
"size": 3078
} | [
"org.eclipse.emf.common.util.EMap"
] | import org.eclipse.emf.common.util.EMap; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,163,423 |
@Deprecated
public Future<CommandResult> getCreditPaymentCommand(Calendar latestEndTime, Integer numberOfRecords) {
GetCreditPaymentCommand command = new GetCreditPaymentCommand();
// Set the fields
command.setLatestEndTime(latestEndTime);
command.setNumberOfRecords(numberOfReco... | Future<CommandResult> function(Calendar latestEndTime, Integer numberOfRecords) { GetCreditPaymentCommand command = new GetCreditPaymentCommand(); command.setLatestEndTime(latestEndTime); command.setNumberOfRecords(numberOfRecords); return sendCommand(command); } | /**
* The Get Credit Payment Command
* <p>
* This command initiates PublishCreditPayment commands for the requested credit
* payment information.
*
* @param latestEndTime {@link Calendar} Latest End Time
* @param numberOfRecords {@link Integer} Number Of Records
* @return the {@l... | The Get Credit Payment Command This command initiates PublishCreditPayment commands for the requested credit payment information | getCreditPaymentCommand | {
"repo_name": "zsmartsystems/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclPriceCluster.java",
"license": "epl-1.0",
"size": 846624
} | [
"com.zsmartsystems.zigbee.CommandResult",
"com.zsmartsystems.zigbee.zcl.clusters.price.GetCreditPaymentCommand",
"java.util.Calendar",
"java.util.concurrent.Future"
] | import com.zsmartsystems.zigbee.CommandResult; import com.zsmartsystems.zigbee.zcl.clusters.price.GetCreditPaymentCommand; import java.util.Calendar; import java.util.concurrent.Future; | import com.zsmartsystems.zigbee.*; import com.zsmartsystems.zigbee.zcl.clusters.price.*; import java.util.*; import java.util.concurrent.*; | [
"com.zsmartsystems.zigbee",
"java.util"
] | com.zsmartsystems.zigbee; java.util; | 2,303,670 |
@Test(dependsOnMethods = "testReadEmptyBaseline")
public void testAvoidingRedundantWrite() {
Map<String, ResourceAssignment> dummyAssignment = getDummyAssignment();
// Call persist functions
_store.persistBaseline(dummyAssignment);
_store.persistBestPossibleAssignment(dummyAssignment);
// Chec... | @Test(dependsOnMethods = STR) void function() { Map<String, ResourceAssignment> dummyAssignment = getDummyAssignment(); _store.persistBaseline(dummyAssignment); _store.persistBestPossibleAssignment(dummyAssignment); Assert.assertEquals(getExistingVersionNumbers(BASELINE_KEY).size(), 1); Assert.assertEquals(getExistingV... | /**
* Test that if the old assignment and new assignment are the same,
*/ | Test that if the old assignment and new assignment are the same | testAvoidingRedundantWrite | {
"repo_name": "dasahcc/helix",
"path": "helix-core/src/test/java/org/apache/helix/controller/rebalancer/waged/TestAssignmentMetadataStore.java",
"license": "apache-2.0",
"size": 8720
} | [
"java.util.Map",
"org.apache.helix.model.ResourceAssignment",
"org.testng.Assert",
"org.testng.annotations.Test"
] | import java.util.Map; import org.apache.helix.model.ResourceAssignment; import org.testng.Assert; import org.testng.annotations.Test; | import java.util.*; import org.apache.helix.model.*; import org.testng.*; import org.testng.annotations.*; | [
"java.util",
"org.apache.helix",
"org.testng",
"org.testng.annotations"
] | java.util; org.apache.helix; org.testng; org.testng.annotations; | 568,211 |
Cvss vector = Cvss.fromVector("CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H/E:X/RL:X/RC:X/CR:X/IR:H/AR:H/MAV:A/MAC:H/MPR:H/MUI:X/MS:U/MC:H/MI:H/MA:H");
double environmentalScore = vector.calculateScore().getEnvironmentalScore();
assertEquals("CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H/E:X/RL:X/RC:X/... | Cvss vector = Cvss.fromVector(STR); double environmentalScore = vector.calculateScore().getEnvironmentalScore(); assertEquals(STR, vector.getVector()); assertEquals(6.4, environmentalScore, 0.01); } | /**
* Regression for CVSS Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H/E:X/RL:X/RC:X/CR:X/IR:H/AR:H/MAV:A/MAC:H/MPR:H/MUI:X/MS:U/MC:H/MI:H/MA:H
* Correct environmental score is 6.4 according to https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H/IR:H/AR:H/MAV:A/MAC:H/... | Problem: If MUI is NOT_DEFINED the modifiedExploitabilitySubScore is calculated wrongly (multiplication with 0 instead of using the UI-value) | regressionForEnvironmentalScore1 | {
"repo_name": "stevespringett/cvss-calculator",
"path": "src/test/java/us/springett/cvss/CvssV3_1NotDefinedRegression.java",
"license": "apache-2.0",
"size": 6735
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,106,194 |
@Override
public void doPostDeleteWorkflows(int tenantId) throws WorkflowException {
} | void function(int tenantId) throws WorkflowException { } | /**
* Trigger after deleting workflows by tenant id.
*
* @param tenantId The id of the tenant.
* @throws WorkflowException
*/ | Trigger after deleting workflows by tenant id | doPostDeleteWorkflows | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/workflow-mgt/org.wso2.carbon.identity.workflow.mgt/src/main/java/org/wso2/carbon/identity/workflow/mgt/listener/AbstractWorkflowListener.java",
"license": "apache-2.0",
"size": 19381
} | [
"org.wso2.carbon.identity.workflow.mgt.exception.WorkflowException"
] | import org.wso2.carbon.identity.workflow.mgt.exception.WorkflowException; | import org.wso2.carbon.identity.workflow.mgt.exception.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,262,601 |
public final ImmutableSet<E> toSet() {
return ImmutableSet.copyOf(iterable);
}
/**
* Returns an {@code ImmutableSortedSet} containing all of the elements from this {@code Sequence} | final ImmutableSet<E> function() { return ImmutableSet.copyOf(iterable); } /** * Returns an {@code ImmutableSortedSet} containing all of the elements from this {@code Sequence} | /**
* Returns an {@code ImmutableSet} containing all of the elements from this fluent iterable with
* duplicates removed.
* @return the immutable set
* @since 14.0 (since 12.0 as {@code toImmutableSet()}).
*/ | Returns an ImmutableSet containing all of the elements from this fluent iterable with duplicates removed | toSet | {
"repo_name": "immutables/miscellaneous",
"path": "sequence/src/org/immutables/sequence/Sequence.java",
"license": "apache-2.0",
"size": 21792
} | [
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.ImmutableSortedSet"
] | import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,905,440 |
private void createPartitionsDirectoriesOnFS(Table table, int numPartitions, boolean reverseOrder) throws IOException {
String path = table.getDataLocation().toString();
fs = table.getPath().getFileSystem(hive.getConf());
int numPartKeys = table.getPartitionKeys().size();
for (int i = 0; i < numPartit... | void function(Table table, int numPartitions, boolean reverseOrder) throws IOException { String path = table.getDataLocation().toString(); fs = table.getPath().getFileSystem(hive.getConf()); int numPartKeys = table.getPartitionKeys().size(); for (int i = 0; i < numPartitions; i++) { StringBuilder partPath = new StringB... | /**
* Creates partition sub-directories for a given table on the file system. Used to test the
* use-cases when partitions for the table are not present in the metastore db
*
* @param table - Table which provides the base locations and partition specs for creating the
* sub-directories
* @par... | Creates partition sub-directories for a given table on the file system. Used to test the use-cases when partitions for the table are not present in the metastore db | createPartitionsDirectoriesOnFS | {
"repo_name": "b-slim/hive",
"path": "ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java",
"license": "apache-2.0",
"size": 31411
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hive.metastore.api.FieldSchema"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.api.FieldSchema; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,091,412 |
public List findAll (int x0, int y0, int x1, int y1)
{
List objects = new ArrayList();
findAll (x0, y0, x1, y1, objects);
return objects;
} | List function (int x0, int y0, int x1, int y1) { List objects = new ArrayList(); findAll (x0, y0, x1, y1, objects); return objects; } | /**
* Find all objects intersecting a specified rectangle. Objects are
* returned with front most object on screen last in list. Seacrh is
* done in the subtree of this object (including this). If no objects
* intersects, an empty list is returned.
*
* @param x0 X coordinate of upper left corner of ... | Find all objects intersecting a specified rectangle. Objects are returned with front most object on screen last in list. Seacrh is done in the subtree of this object (including this). If no objects intersects, an empty list is returned | findAll | {
"repo_name": "ys880526/Test",
"path": "Simulators/GateBar/src/main/java/no/geosoft/cc/graphics/GObject.java",
"license": "lgpl-3.0",
"size": 50218
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 830,036 |
public static java.util.List extractAdmissionDetailList(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.AdmissionDetailForPatientCodingListVoCollection voCollection)
{
return extractAdmissionDetailList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.AdmissionDetailForPatientCodingListVoCollection voCollection) { return extractAdmissionDetailList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.admin.pas.domain.objects.AdmissionDetail list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.admin.pas.domain.objects.AdmissionDetail list from the value object collection | extractAdmissionDetailList | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/refman/vo/domain/AdmissionDetailForPatientCodingListVoAssembler.java",
"license": "agpl-3.0",
"size": 29176
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 300,616 |
public BesGetRenewListResponse getRenewList(BesGetRenewListRequest request) {
checkNotNull(request, "request should not be null.");
String json = null;
try {
json = request.toJson();
} catch (IOException e) {
throw new BceClientException("Fail to generate jso... | BesGetRenewListResponse function(BesGetRenewListRequest request) { checkNotNull(request, STR); String json = null; try { json = request.toJson(); } catch (IOException e) { throw new BceClientException(STR, e); } InternalRequest internalRequest = this.createRequest( request, HttpMethodName.POST, BASE_PATH, RENEW, LIST);... | /**
* Get BES renew list owned by the authenticated user.
* Users must authenticate with a valid BCE Access Key ID, and the response
* contains all the BES clusters owned by the user.
*
* @param request
* @return Returns a request response code or error message
*/ | Get BES renew list owned by the authenticated user. Users must authenticate with a valid BCE Access Key ID, and the response contains all the BES clusters owned by the user | getRenewList | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/services/bes/BesClient.java",
"license": "apache-2.0",
"size": 26806
} | [
"com.baidubce.BceClientException",
"com.baidubce.http.HttpMethodName",
"com.baidubce.internal.InternalRequest",
"com.baidubce.services.bes.model.BesGetRenewListRequest",
"com.baidubce.services.bes.model.BesGetRenewListResponse",
"com.google.common.base.Preconditions",
"java.io.IOException"
] | import com.baidubce.BceClientException; import com.baidubce.http.HttpMethodName; import com.baidubce.internal.InternalRequest; import com.baidubce.services.bes.model.BesGetRenewListRequest; import com.baidubce.services.bes.model.BesGetRenewListResponse; import com.google.common.base.Preconditions; import java.io.IOExce... | import com.baidubce.*; import com.baidubce.http.*; import com.baidubce.internal.*; import com.baidubce.services.bes.model.*; import com.google.common.base.*; import java.io.*; | [
"com.baidubce",
"com.baidubce.http",
"com.baidubce.internal",
"com.baidubce.services",
"com.google.common",
"java.io"
] | com.baidubce; com.baidubce.http; com.baidubce.internal; com.baidubce.services; com.google.common; java.io; | 2,651,492 |
@RequestMapping(value = "/nuevo", method = RequestMethod.GET)
public String nuevo(Model model) {
logger.info("Iniciamos usuario/nuevo [GET]");
// Creamos un nuevo usuario que actuará como formulario en la vista.
model.addAttribute("usuario", new Usuario());
logger.info("Pasamos un usuario nuevo a la v... | @RequestMapping(value = STR, method = RequestMethod.GET) String function(Model model) { logger.info(STR); model.addAttribute(STR, new Usuario()); logger.info(STR); return STR; } | /**
* Formulario de nuevo usuario [GET]
*
* @param model
* @return
*/ | Formulario de nuevo usuario [GET] | nuevo | {
"repo_name": "gales2015/BibliotecaAlejandria",
"path": "src/main/java/org/alexandrialibrary/spring/controller/UsuarioController.java",
"license": "mit",
"size": 8787
} | [
"org.alexandrialibrary.spring.model.Usuario",
"org.springframework.ui.Model",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import org.alexandrialibrary.spring.model.Usuario; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; | import org.alexandrialibrary.spring.model.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; | [
"org.alexandrialibrary.spring",
"org.springframework.ui",
"org.springframework.web"
] | org.alexandrialibrary.spring; org.springframework.ui; org.springframework.web; | 432,283 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v202111")
@RequestWrapper(localName = "performLiveStreamEventAction", targetNamespace = "https://www.google.com/apis/ads/publisher/v202111", className = "com.google.api.ads.admanager.jaxws.v202111.LiveStreamEve... | @WebResult(name = "rval", targetNamespace = STRperformLiveStreamEventActionSTRhttps: @ResponseWrapper(localName = "performLiveStreamEventActionResponseSTRhttps: UpdateResult function( @WebParam(name = "liveStreamEventActionSTRhttps: LiveStreamEventAction liveStreamEventAction, @WebParam(name = "filterStatementSTRhttps:... | /**
*
* Performs actions on {@link LiveStreamEvent} objects that match the given
* {@link Statement#query}.
*
* @param liveStreamEventAction the action to perform
* @param filterStatement a Publisher Query Language statement used to filter
* ... | Performs actions on <code>LiveStreamEvent</code> objects that match the given <code>Statement#query</code> | performLiveStreamEventAction | {
"repo_name": "googleads/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v202111/LiveStreamEventServiceInterface.java",
"license": "apache-2.0",
"size": 15748
} | [
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 988,336 |
TestSuite suite = new TestSuite("Runs all GWT based tests");
suite.addTest(org.opencms.acacia.client.entity.AllTests.suite());
return suite;
} | TestSuite suite = new TestSuite(STR); suite.addTest(org.opencms.acacia.client.entity.AllTests.suite()); return suite; } | /**
* Creates the test suite.<p>
*
* @return the test suite
*/ | Creates the test suite | suite | {
"repo_name": "ggiudetti/opencms-core",
"path": "test-gwt/org/opencms/client/test/AllTests.java",
"license": "lgpl-2.1",
"size": 1659
} | [
"junit.framework.TestSuite"
] | import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,845,409 |
public void setWidget(Widget widget) {
this.content = widget;
this.type = GridStaticCellType.WIDGET;
section.requestSectionRefresh();
} | void function(Widget widget) { this.content = widget; this.type = GridStaticCellType.WIDGET; section.requestSectionRefresh(); } | /**
* Set widget as the content of the cell. The type of the cell
* becomes {@link GridStaticCellType#WIDGET}. All previous content
* is discarded.
*
* @param widget
* The widget to add to the cell. Should not be
* ... | Set widget as the content of the cell. The type of the cell becomes <code>GridStaticCellType#WIDGET</code>. All previous content is discarded | setWidget | {
"repo_name": "travisfw/vaadin",
"path": "client/src/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 285859
} | [
"com.google.gwt.user.client.ui.Widget",
"com.vaadin.shared.ui.grid.GridStaticCellType"
] | import com.google.gwt.user.client.ui.Widget; import com.vaadin.shared.ui.grid.GridStaticCellType; | import com.google.gwt.user.client.ui.*; import com.vaadin.shared.ui.grid.*; | [
"com.google.gwt",
"com.vaadin.shared"
] | com.google.gwt; com.vaadin.shared; | 2,033,090 |
@SmallTest
@Feature({"ContextualSearch"})
@Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
public void testHttpsAfterAcceptForOptOut() throws InterruptedException, TimeoutException {
mPolicy.overrideDecidedStateForTesting(true);
mFakeServer.setShouldUseHttps(true);
clickToResol... | @Feature({STR}) @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) void function() throws InterruptedException, TimeoutException { mPolicy.overrideDecidedStateForTesting(true); mFakeServer.setShouldUseHttps(true); clickToResolveAndAssertPrefetch(); } | /**
* Tests that HTTPS does resolve in the opt-out model after the user accepts.
*/ | Tests that HTTPS does resolve in the opt-out model after the user accepts | testHttpsAfterAcceptForOptOut | {
"repo_name": "was4444/chromium.src",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java",
"license": "bsd-3-clause",
"size": 103579
} | [
"java.util.concurrent.TimeoutException",
"org.chromium.base.test.util.Feature",
"org.chromium.base.test.util.Restriction"
] | import java.util.concurrent.TimeoutException; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction; | import java.util.concurrent.*; import org.chromium.base.test.util.*; | [
"java.util",
"org.chromium.base"
] | java.util; org.chromium.base; | 1,448,209 |
private void onTerminalChanged() {
View terminalNameOverlay = findCurrentView(R.id.terminal_name_overlay);
if (terminalNameOverlay != null)
terminalNameOverlay.startAnimation(fade_out_delayed);
updateDefault();
updatePromptVisible();
ActivityCompat.invalidateOptionsMenu(ConsoleActivity.this);
} | void function() { View terminalNameOverlay = findCurrentView(R.id.terminal_name_overlay); if (terminalNameOverlay != null) terminalNameOverlay.startAnimation(fade_out_delayed); updateDefault(); updatePromptVisible(); ActivityCompat.invalidateOptionsMenu(ConsoleActivity.this); } | /**
* Called whenever the displayed terminal is changed.
*/ | Called whenever the displayed terminal is changed | onTerminalChanged | {
"repo_name": "lotan/connectbot",
"path": "app/src/main/java/org/connectbot/ConsoleActivity.java",
"license": "apache-2.0",
"size": 42823
} | [
"android.view.View",
"androidx.core.app.ActivityCompat"
] | import android.view.View; import androidx.core.app.ActivityCompat; | import android.view.*; import androidx.core.app.*; | [
"android.view",
"androidx.core"
] | android.view; androidx.core; | 1,425,344 |
@Test
public void testGPIOAnalogPortAllMax() {
String message = " PKT:SID=11;PC=2238;MT=8;MGID=1;MID=10;MD=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;bceeea75";
SHCMessage shcMessage = new SHCMessage(message, packet);
List<Type> values = shcMessage.getData().getOpenHABTypes();
... | void function() { String message = STR; SHCMessage shcMessage = new SHCMessage(message, packet); List<Type> values = shcMessage.getData().getOpenHABTypes(); assertEquals(16, values.size()); for (int i = 0; i < values.size(); i += 2) { assertEquals(OnOffType.ON, values.get(i)); assertEquals(2047, ((DecimalType) values.g... | /**
* test data is: GPIO AnalogPort:
* FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
*/ | test data is: GPIO AnalogPort: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF | testGPIOAnalogPortAllMax | {
"repo_name": "watou/openhab",
"path": "bundles/binding/org.openhab.binding.smarthomatic/src/test/java/org/openhab/binding/smarthomatic/TestSHCMessage.java",
"license": "epl-1.0",
"size": 24841
} | [
"java.util.List",
"org.junit.Assert",
"org.openhab.binding.smarthomatic.internal.SHCMessage",
"org.openhab.core.library.types.DecimalType",
"org.openhab.core.library.types.OnOffType",
"org.openhab.core.types.Type"
] | import java.util.List; import org.junit.Assert; import org.openhab.binding.smarthomatic.internal.SHCMessage; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.OnOffType; import org.openhab.core.types.Type; | import java.util.*; import org.junit.*; import org.openhab.binding.smarthomatic.internal.*; import org.openhab.core.library.types.*; import org.openhab.core.types.*; | [
"java.util",
"org.junit",
"org.openhab.binding",
"org.openhab.core"
] | java.util; org.junit; org.openhab.binding; org.openhab.core; | 450,905 |
public void start() throws BundleException {
logger.info("Loading the OSGi Framework Factory");
FrameworkFactory frameworkFactory = ServiceLoader.load(FrameworkFactory.class).iterator()
.next();
logger.info("Creating the OSGi Framework");
framework = frameworkFactory.newFramework(frameworkConfiguration)... | void function() throws BundleException { logger.info(STR); FrameworkFactory frameworkFactory = ServiceLoader.load(FrameworkFactory.class).iterator() .next(); logger.info(STR); framework = frameworkFactory.newFramework(frameworkConfiguration); logger.info(STR); framework.start(); | /**
* Starts the OSGi framework, installs and starts the bundles.
*
* @throws BundleException
* if the framework could not be started
*/ | Starts the OSGi framework, installs and starts the bundles | start | {
"repo_name": "taverna-incubator/incubator-taverna-osgi",
"path": "osgi-launcher/src/main/java/uk/org/taverna/osgi/OsgiLauncher.java",
"license": "apache-2.0",
"size": 13958
} | [
"java.util.ServiceLoader",
"org.osgi.framework.BundleException",
"org.osgi.framework.launch.FrameworkFactory"
] | import java.util.ServiceLoader; import org.osgi.framework.BundleException; import org.osgi.framework.launch.FrameworkFactory; | import java.util.*; import org.osgi.framework.*; import org.osgi.framework.launch.*; | [
"java.util",
"org.osgi.framework"
] | java.util; org.osgi.framework; | 1,109,002 |
@Override
public String getBestProvider(Criteria criteria, boolean enabledOnly) {
String result = null;
List<String> providers = getProviders(criteria, enabledOnly);
if (!providers.isEmpty()) {
result = pickBest(providers);
if (D) Log.d(TAG, "getBestProvider(" + ... | String function(Criteria criteria, boolean enabledOnly) { String result = null; List<String> providers = getProviders(criteria, enabledOnly); if (!providers.isEmpty()) { result = pickBest(providers); if (D) Log.d(TAG, STR + criteria + STR + enabledOnly + ")=" + result); return result; } providers = getProviders(null, e... | /**
* Return the name of the best provider given a Criteria object.
* This method has been deprecated from the public API,
* and the whole LocationProvider (including #meetsCriteria)
* has been deprecated as well. So this method now uses
* some simplified logic.
*/ | Return the name of the best provider given a Criteria object. This method has been deprecated from the public API, and the whole LocationProvider (including #meetsCriteria) has been deprecated as well. So this method now uses some simplified logic | getBestProvider | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/com/android/server/LocationManagerService.java",
"license": "apache-2.0",
"size": 99961
} | [
"android.location.Criteria",
"android.util.Log",
"java.util.List"
] | import android.location.Criteria; import android.util.Log; import java.util.List; | import android.location.*; import android.util.*; import java.util.*; | [
"android.location",
"android.util",
"java.util"
] | android.location; android.util; java.util; | 2,528,751 |
public void setParameterService(ParameterService parameterService) {
this.parameterService = parameterService;
} | void function(ParameterService parameterService) { this.parameterService = parameterService; } | /**
* Sets the parameterService attribute value.
* @param parameterService The parameterService to set.
*/ | Sets the parameterService attribute value | setParameterService | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/coeus/propdev/impl/budget/ProposalBudgetServiceImpl.java",
"license": "apache-2.0",
"size": 9405
} | [
"org.kuali.rice.coreservice.framework.parameter.ParameterService"
] | import org.kuali.rice.coreservice.framework.parameter.ParameterService; | import org.kuali.rice.coreservice.framework.parameter.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,610,730 |
private static float calcWeightedHashValue(final int hashIndex, final float w)
throws HiveException {
if(w < 0.f) {
throw new HiveException("Non-negative value is not accepted for a feature weight");
}
if(w == 0.f) {
return Float.MAX_VALUE;
} else ... | static float function(final int hashIndex, final float w) throws HiveException { if(w < 0.f) { throw new HiveException(STR); } if(w == 0.f) { return Float.MAX_VALUE; } else { return hashIndex / w; } } | /**
* For a larger w, hash value tends to be smaller and tends to be selected as minhash.
*/ | For a larger w, hash value tends to be smaller and tends to be selected as minhash | calcWeightedHashValue | {
"repo_name": "NaokiStones/hivemall",
"path": "src/main/java/hivemall/knn/lsh/bBitMinHashUDF.java",
"license": "apache-2.0",
"size": 5356
} | [
"org.apache.hadoop.hive.ql.metadata.HiveException"
] | import org.apache.hadoop.hive.ql.metadata.HiveException; | import org.apache.hadoop.hive.ql.metadata.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,466,815 |
public Map<String, NailStats> getNailStats() {
Map<String, NailStats> result = new TreeMap();
synchronized (allNailStats) {
for (Map.Entry<String, NailStats> entry : allNailStats.entrySet()) {
result.put(entry.getKey(), (NailStats) entry.getValue().clone());
}
}
return result;
} | Map<String, NailStats> function() { Map<String, NailStats> result = new TreeMap(); synchronized (allNailStats) { for (Map.Entry<String, NailStats> entry : allNailStats.entrySet()) { result.put(entry.getKey(), (NailStats) entry.getValue().clone()); } } return result; } | /**
* Returns a snapshot of this NGServer's nail statistics. The result is a <code>java.util.Map
* </code>, keyed by class name, with <a href="NailStats.html">NailStats</a> objects as values.
*
* @return a snapshot of this NGServer's nail statistics.
*/ | Returns a snapshot of this NGServer's nail statistics. The result is a <code>java.util.Map </code>, keyed by class name, with NailStats objects as values | getNailStats | {
"repo_name": "martylamb/nailgun",
"path": "nailgun-server/src/main/java/com/facebook/nailgun/NGServer.java",
"license": "apache-2.0",
"size": 19107
} | [
"java.util.Map",
"java.util.TreeMap"
] | import java.util.Map; import java.util.TreeMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,640,911 |
public InputStream getInputStream(int index) {
return ins[index];
} | InputStream function(int index) { return ins[index]; } | /**
* Returns the unbuffered stream with the value for {@code index}.
*/ | Returns the unbuffered stream with the value for index | getInputStream | {
"repo_name": "Proplex/Leaf",
"path": "mainActivity/src/main/java/co/wakarimasen/ceredux/DiskLruCache.java",
"license": "mit",
"size": 33096
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 819,301 |
public HTMLWriter ew(final String tagAndAttrs, String content) {
List<String> p = NWUtils.split(tagAndAttrs, ' ');
String tag = p.get(0);
b.append('<').append(tag);
for (int i = 1; i < p.size(); i++) {
String nameAndValue = p.get(i);
int pos = nameAndV... | HTMLWriter function(final String tagAndAttrs, String content) { List<String> p = NWUtils.split(tagAndAttrs, ' '); String tag = p.get(0); b.append('<').append(tag); for (int i = 1; i < p.size(); i++) { String nameAndValue = p.get(i); int pos = nameAndValue.indexOf('='); b.append(' '); b.append(nameAndValue, 0, pos); b.a... | /**
* Creates a tag.
*
* @param tagAndAttrs name of the tag and attributes separated by spaces.
* Example: "textarea wrap=off"
* @param content text content for the tag. null is treated as an empty
* string
* @return this
*/ | Creates a tag | ew | {
"repo_name": "tim-lebedkov/npackd-gae-web",
"path": "src/main/java/com/googlecode/npackdweb/wlib/HTMLWriter.java",
"license": "gpl-3.0",
"size": 5624
} | [
"com.googlecode.npackdweb.NWUtils",
"java.util.List"
] | import com.googlecode.npackdweb.NWUtils; import java.util.List; | import com.googlecode.npackdweb.*; import java.util.*; | [
"com.googlecode.npackdweb",
"java.util"
] | com.googlecode.npackdweb; java.util; | 731,234 |
private void startBackgroundThread() {
backgroundThread = new HandlerThread("CameraBackground");
backgroundThread.start();
backgroundHandler = new Handler(backgroundThread.getLooper());
} | void function() { backgroundThread = new HandlerThread(STR); backgroundThread.start(); backgroundHandler = new Handler(backgroundThread.getLooper()); } | /**
* Starts a background thread and its Handler.
*/ | Starts a background thread and its Handler | startBackgroundThread | {
"repo_name": "lackary/CameraSample",
"path": "camera2tool/src/main/java/com/lackary/camera2tool/Control/Camera2Instant.java",
"license": "gpl-3.0",
"size": 42877
} | [
"android.os.Handler",
"android.os.HandlerThread"
] | import android.os.Handler; import android.os.HandlerThread; | import android.os.*; | [
"android.os"
] | android.os; | 2,559,462 |
public void writeSyncValue(String storeName, Scope scope,
boolean persist,
byte[] key, Iterable<Versioned<byte[]>> values)
throws PersistException {
SynchronizingStorageEngine store = storeRegistry.get(store... | void function(String storeName, Scope scope, boolean persist, byte[] key, Iterable<Versioned<byte[]>> values) throws PersistException { SynchronizingStorageEngine store = storeRegistry.get(storeName); if (store == null) { store = storeRegistry.register(storeName, scope, persist); } store.writeSyncValue(new ByteArray(ke... | /**
* Write a value synchronized from another node, bypassing some of the
* usual logic when a client writes data. If the store is not known,
* this will automatically register it
* @param storeName the store name
* @param scope the scope for the store
* @param persist TODO
* @param ... | Write a value synchronized from another node, bypassing some of the usual logic when a client writes data. If the store is not known, this will automatically register it | writeSyncValue | {
"repo_name": "dothub/floodlight",
"path": "src/main/java/org/sdnplatform/sync/internal/SyncManager.java",
"license": "apache-2.0",
"size": 33105
} | [
"org.sdnplatform.sync.Versioned",
"org.sdnplatform.sync.error.PersistException",
"org.sdnplatform.sync.internal.store.SynchronizingStorageEngine",
"org.sdnplatform.sync.internal.util.ByteArray"
] | import org.sdnplatform.sync.Versioned; import org.sdnplatform.sync.error.PersistException; import org.sdnplatform.sync.internal.store.SynchronizingStorageEngine; import org.sdnplatform.sync.internal.util.ByteArray; | import org.sdnplatform.sync.*; import org.sdnplatform.sync.error.*; import org.sdnplatform.sync.internal.store.*; import org.sdnplatform.sync.internal.util.*; | [
"org.sdnplatform.sync"
] | org.sdnplatform.sync; | 325,228 |
@Override
public Shape createTransformedShape(final Shape shape) throws TransformException {
return isIdentity() ? shape : AbstractMathTransform2D.createTransformedShape(this, shape, null, null, false);
} | Shape function(final Shape shape) throws TransformException { return isIdentity() ? shape : AbstractMathTransform2D.createTransformedShape(this, shape, null, null, false); } | /**
* Transforms the specified shape. The default implementation computes quadratic curves
* using three points for each line segment in the shape. The returned object is often
* a {@link Path2D}, but may also be a {@link Line2D} or a {@link QuadCurve2D} if such
* simplification is p... | Transforms the specified shape. The default implementation computes quadratic curves using three points for each line segment in the shape. The returned object is often a <code>Path2D</code>, but may also be a <code>Line2D</code> or a <code>QuadCurve2D</code> if such simplification is possible | createTransformedShape | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractMathTransform2D.java",
"license": "apache-2.0",
"size": 19208
} | [
"java.awt.Shape",
"org.opengis.referencing.operation.TransformException"
] | import java.awt.Shape; import org.opengis.referencing.operation.TransformException; | import java.awt.*; import org.opengis.referencing.operation.*; | [
"java.awt",
"org.opengis.referencing"
] | java.awt; org.opengis.referencing; | 243,580 |
protected void addWidgetToList(Widget listItem) {
m_scrollList.add(listItem);
onContentChange();
} | void function(Widget listItem) { m_scrollList.add(listItem); onContentChange(); } | /**
* Add a list item widget to the list panel.<p>
*
* @param listItem the list item to add
*/ | Add a list item widget to the list panel | addWidgetToList | {
"repo_name": "it-tavis/opencms-core",
"path": "src-gwt/org/opencms/ade/galleries/client/ui/A_CmsListTab.java",
"license": "lgpl-2.1",
"size": 22797
} | [
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,410,414 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.