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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@SubsribeEvent
public void onCardsSelected(CardsSelectionEvent e) {
List<Long> ids = new ArrayList<>();
for (long l : e.getSelectedPanelsIds())
ids.add(l);
this.frame.setPanelsSelectedAsBackground(ids);
}
| void function(CardsSelectionEvent e) { List<Long> ids = new ArrayList<>(); for (long l : e.getSelectedPanelsIds()) ids.add(l); this.frame.setPanelsSelectedAsBackground(ids); } | /**
* Called when several cards are selected.
*
* @param e the event
*/ | Called when several cards are selected | onCardsSelected | {
"repo_name": "Darmo117/Jenealogio",
"path": "src/main/java/net/darmo_creations/jenealogio/controllers/MainController.java",
"license": "gpl-3.0",
"size": 22361
} | [
"java.util.ArrayList",
"java.util.List",
"net.darmo_creations.jenealogio.events.CardsSelectionEvent"
] | import java.util.ArrayList; import java.util.List; import net.darmo_creations.jenealogio.events.CardsSelectionEvent; | import java.util.*; import net.darmo_creations.jenealogio.events.*; | [
"java.util",
"net.darmo_creations.jenealogio"
] | java.util; net.darmo_creations.jenealogio; | 2,238,289 |
public interface LongEncodingWriter
{
void setBuffer(ByteBuffer buffer); | interface LongEncodingWriter { void function(ByteBuffer buffer); | /**
* Data will be written starting from current position of the buffer, and the position of the buffer will be
* updated as content is written.
*/ | Data will be written starting from current position of the buffer, and the position of the buffer will be updated as content is written | setBuffer | {
"repo_name": "noddi/druid",
"path": "processing/src/main/java/io/druid/segment/data/CompressionFactory.java",
"license": "apache-2.0",
"size": 11922
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,662,428 |
public static LocalFileSystem getLocal(Configuration conf)
throws IOException {
return (LocalFileSystem)get(LocalFileSystem.NAME, conf);
} | static LocalFileSystem function(Configuration conf) throws IOException { return (LocalFileSystem)get(LocalFileSystem.NAME, conf); } | /**
* Get the local file system.
* @param conf the configuration to configure the file system with
* @return a LocalFileSystem
*/ | Get the local file system | getLocal | {
"repo_name": "joyghosh/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java",
"license": "gpl-3.0",
"size": 116427
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; | import java.io.*; import org.apache.hadoop.conf.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,307,739 |
private Integer processLines(String[][] document, int start, int end,
String word) {
List<LineTask> tasks=new ArrayList<LineTask>();
for (int i=start; i<end; i++){
LineTask task=new LineTask(document[i], 0, document[i].length, word);
tasks.add(task);
}
invokeAll(tasks);
int result=0;
for (... | Integer function(String[][] document, int start, int end, String word) { List<LineTask> tasks=new ArrayList<LineTask>(); for (int i=start; i<end; i++){ LineTask task=new LineTask(document[i], 0, document[i].length, word); tasks.add(task); } invokeAll(tasks); int result=0; for (int i=0; i<tasks.size(); i++) { LineTask t... | /**
* Throws a LineTask task for each line of the block of lines this task has to process
* @param document Document to process
* @param start Starting position of the block of lines it has to process
* @param end Finish position of the block of lines it has to process
* @param word Word we are looking for
... | Throws a LineTask task for each line of the block of lines this task has to process | processLines | {
"repo_name": "xuelvming/Java7ConcurrencyCookbook",
"path": "7881_code/Chapter 5/ch5_recipe02/src/com/packtpub/java7/concurrency/chapter5/recipe02/task/DocumentTask.java",
"license": "mit",
"size": 3469
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.ExecutionException"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,293,883 |
private static byte[] constructMrzPassword(String machineReadableZone)
throws NoSuchAlgorithmException, NoSuchProviderException, IOException {
StringBuilder sb;
Mrz mrz;
sb = new StringBuilder();
mrz = new MrzTD1(machineReadableZone);
sb.append(mrz.getDocumentNumber());
sb.append(mrz.getDocume... | static byte[] function(String machineReadableZone) throws NoSuchAlgorithmException, NoSuchProviderException, IOException { StringBuilder sb; Mrz mrz; sb = new StringBuilder(); mrz = new MrzTD1(machineReadableZone); sb.append(mrz.getDocumentNumber()); sb.append(mrz.getDocumentNumberCd()); sb.append(mrz.getDateOfBirth())... | /**
* This method returns the input String used to compute the common secret
* from the MRZ
*
* @return the input String used to compute the common secret from the MRZ
* @throws IOException
* @throws NoSuchProviderException
* @throws NoSuchAlgorithmException
*/ | This method returns the input String used to compute the common secret from the MRZ | constructMrzPassword | {
"repo_name": "JGoeke/de.persosim.simulator",
"path": "de.persosim.simulator/src/de/persosim/simulator/cardobjects/MrzAuthObject.java",
"license": "gpl-3.0",
"size": 2073
} | [
"de.persosim.simulator.crypto.Crypto",
"de.persosim.simulator.documents.Mrz",
"de.persosim.simulator.documents.MrzTD1",
"java.io.IOException",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException"
] | import de.persosim.simulator.crypto.Crypto; import de.persosim.simulator.documents.Mrz; import de.persosim.simulator.documents.MrzTD1; import java.io.IOException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; | import de.persosim.simulator.crypto.*; import de.persosim.simulator.documents.*; import java.io.*; import java.security.*; | [
"de.persosim.simulator",
"java.io",
"java.security"
] | de.persosim.simulator; java.io; java.security; | 2,848,056 |
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
mViewPagerPageChangeListener = listener;
} | void function(ViewPager.OnPageChangeListener listener) { mViewPagerPageChangeListener = listener; } | /**
* Set the {@link ViewPager.OnPageChangeListener}. When using {@link SlidingTabLayout} you are
* required to set any {@link ViewPager.OnPageChangeListener} through this method. This is so
* that the layout can update it's scroll position correctly.
*
* @see ViewPager#setOnPageChangeListener(ViewPager.... | Set the <code>ViewPager.OnPageChangeListener</code>. When using <code>SlidingTabLayout</code> you are required to set any <code>ViewPager.OnPageChangeListener</code> through this method. This is so that the layout can update it's scroll position correctly | setOnPageChangeListener | {
"repo_name": "mmublackpirate/Bum-Meme-Maker",
"path": "app/src/main/java/com/yemyatthu/bumc/widget/SlidingTabLayout.java",
"license": "apache-2.0",
"size": 10762
} | [
"android.support.v4.view.ViewPager"
] | import android.support.v4.view.ViewPager; | import android.support.v4.view.*; | [
"android.support"
] | android.support; | 1,672,950 |
private void endTemplate(int position) throws MalformedUriTemplateException
{
startedTemplate = false;
if (expressionCaptureOn)
{
throw new MalformedUriTemplateException("The expression at position " + startPosition + " was never terminated", startPosition);
}
} | void function(int position) throws MalformedUriTemplateException { startedTemplate = false; if (expressionCaptureOn) { throw new MalformedUriTemplateException(STR + startPosition + STR, startPosition); } } | /**
* Called when the end of the template is reached. If an expression has
* not been closed, an exception will be raised.
*/ | Called when the end of the template is reached. If an expression has not been closed, an exception will be raised | endTemplate | {
"repo_name": "damnhandy/Handy-URI-Templates",
"path": "src/main/java/com/damnhandy/uri/template/impl/UriTemplateParser.java",
"license": "apache-2.0",
"size": 6685
} | [
"com.damnhandy.uri.template.MalformedUriTemplateException"
] | import com.damnhandy.uri.template.MalformedUriTemplateException; | import com.damnhandy.uri.template.*; | [
"com.damnhandy.uri"
] | com.damnhandy.uri; | 2,662,807 |
public Calendar getLastDate() {
if(this.catalog.size() > 0)
return this.catalog.getLast().date;
else
return null;
}
| Calendar function() { if(this.catalog.size() > 0) return this.catalog.getLast().date; else return null; } | /**
* Gets the date of the last snippet in the given file.
* This SHOULD be the newest snippet if the file was not
* hand modified.
* @return The Date of the newest snippet.
*/ | Gets the date of the last snippet in the given file. This SHOULD be the newest snippet if the file was not hand modified | getLastDate | {
"repo_name": "gundermanc/skope-3",
"path": "src/com/gundersoft/skope3/Keylogger.java",
"license": "gpl-3.0",
"size": 13303
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,805,451 |
Map<String, String> getAllPeerClusterKeys(); | Map<String, String> getAllPeerClusterKeys(); | /**
* List the cluster keys of all remote slave clusters (whether they are enabled/disabled or
* connected/disconnected).
* @return A map of peer ids to peer cluster keys
*/ | List the cluster keys of all remote slave clusters (whether they are enabled/disabled or connected/disconnected) | getAllPeerClusterKeys | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/replication/ReplicationPeers.java",
"license": "apache-2.0",
"size": 5927
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 394,598 |
public MessageView buildSentView(Context context) {
MessageView view = new ItemSentView(context);
return view;
} | MessageView function(Context context) { MessageView view = new ItemSentView(context); return view; } | /**
* Returns a MessageView object which is used to display messages that the chat-ui
* has sent.
* @param context A context that is used to instantiate the view.
* @return MessageView object for displaying sent messages.
*/ | Returns a MessageView object which is used to display messages that the chat-ui has sent | buildSentView | {
"repo_name": "IntentService/android-chat-ui",
"path": "chat-ui/src/main/java/co/intentservice/chatui/views/ViewBuilder.java",
"license": "apache-2.0",
"size": 1113
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,353,966 |
public void patch_splitMax(LinkedList<Patch> patches) {
short patch_size = Match_MaxBits;
String precontext, postcontext;
Patch patch;
int start1, start2;
boolean empty;
Operation diff_type;
String diff_text;
ListIterator<Patch> pointer = patches.listIterator();
Patch bigpatch = po... | void function(LinkedList<Patch> patches) { short patch_size = Match_MaxBits; String precontext, postcontext; Patch patch; int start1, start2; boolean empty; Operation diff_type; String diff_text; ListIterator<Patch> pointer = patches.listIterator(); Patch bigpatch = pointer.hasNext() ? pointer.next() : null; while (big... | /**
* Look through the patches and break up any which are longer than the
* maximum limit of the match algorithm.
* Intended to be called only from within patch_apply.
*
* @param patches LinkedList of Patch objects.
*/ | Look through the patches and break up any which are longer than the maximum limit of the match algorithm. Intended to be called only from within patch_apply | patch_splitMax | {
"repo_name": "Cognifide/AET",
"path": "core/jobs/src/main/java/com/cognifide/aet/job/common/comparators/source/diff/DiffMatchPatch.java",
"license": "apache-2.0",
"size": 91233
} | [
"java.util.LinkedList",
"java.util.ListIterator"
] | import java.util.LinkedList; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,144,203 |
public void generate(JavaWriter out)
throws Exception
{
} | void function(JavaWriter out) throws Exception { } | /**
* Generates the code for the tag
*
* @param out the output writer for the generated java.
*/ | Generates the code for the tag | generate | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/xsl/java/XslImport.java",
"license": "gpl-2.0",
"size": 2044
} | [
"com.caucho.java.JavaWriter"
] | import com.caucho.java.JavaWriter; | import com.caucho.java.*; | [
"com.caucho.java"
] | com.caucho.java; | 2,133,322 |
public char next() throws JSONException {
int c;
if (this.usePrevious) {
this.usePrevious = false;
c = this.previous;
} else {
try {
c = this.reader.read();
} catch (IOException exception) {
throw new JSONException(exception);
... | char function() throws JSONException { int c; if (this.usePrevious) { this.usePrevious = false; c = this.previous; } else { try { c = this.reader.read(); } catch (IOException exception) { throw new JSONException(exception); } if (c <= 0) { this.eof = true; c = 0; } } this.index += 1; if (this.previous == '\r') { this.l... | /**
* Get the next character in the source string.
*
* @return The next character, or 0 if past the end of the source string.
*/ | Get the next character in the source string | next | {
"repo_name": "spyhunter99/mil-sym-android",
"path": "renderer/src/main/java/sec/web/json/utilities/JSONTokener.java",
"license": "apache-2.0",
"size": 12714
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,792,224 |
@Override
public void run() {
TProcessor processor = null;
TTransport inputTransport = null;
TTransport outputTransport = null;
TProtocol inputProtocol = null;
TProtocol outputProtocol = null;
try {
processor = processorFactory_.getProcessor(client);
inputTran... | void function() { TProcessor processor = null; TTransport inputTransport = null; TTransport outputTransport = null; TProtocol inputProtocol = null; TProtocol outputProtocol = null; try { processor = processorFactory_.getProcessor(client); inputTransport = inputTransportFactory_.getTransport(client); outputTransport = o... | /**
* Loops on processing a client forever
*/ | Loops on processing a client forever | run | {
"repo_name": "ultratendency/hbase",
"path": "hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/TBoundedThreadPoolServer.java",
"license": "apache-2.0",
"size": 10612
} | [
"org.apache.thrift.TException",
"org.apache.thrift.TProcessor",
"org.apache.thrift.protocol.TProtocol",
"org.apache.thrift.transport.TTransport",
"org.apache.thrift.transport.TTransportException"
] | import org.apache.thrift.TException; import org.apache.thrift.TProcessor; import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TTransport; import org.apache.thrift.transport.TTransportException; | import org.apache.thrift.*; import org.apache.thrift.protocol.*; import org.apache.thrift.transport.*; | [
"org.apache.thrift"
] | org.apache.thrift; | 2,719,280 |
public Map<String, String> headers() {
return this.headers;
} | Map<String, String> function() { return this.headers; } | /**
* Get the headers value.
*
* @return the headers value
*/ | Get the headers value | headers | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/EventResponseMessage.java",
"license": "mit",
"size": 3416
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 756,421 |
public static SimpleFeature transform(
SimpleFeature feature, SimpleFeatureType schema, MathTransform transform)
throws MismatchedDimensionException, TransformException, IllegalAttributeException {
feature = SimpleFeatureBuilder.copy(feature);
GeometryDescriptor geomType = s... | static SimpleFeature function( SimpleFeature feature, SimpleFeatureType schema, MathTransform transform) throws MismatchedDimensionException, TransformException, IllegalAttributeException { feature = SimpleFeatureBuilder.copy(feature); GeometryDescriptor geomType = schema.getGeometryDescriptor(); Geometry geom = (Geome... | /**
* Applies transform to all geometry attribute.
*
* @param feature Feature to be transformed
* @param schema Schema for target transformation - transform( schema, crs )
* @param transform MathTransform used to transform coordinates - reproject( crs, crs )
* @return transformed Feature o... | Applies transform to all geometry attribute | transform | {
"repo_name": "geotools/geotools",
"path": "modules/library/main/src/main/java/org/geotools/feature/FeatureTypes.java",
"license": "lgpl-2.1",
"size": 33334
} | [
"org.geotools.feature.simple.SimpleFeatureBuilder",
"org.geotools.geometry.jts.JTS",
"org.locationtech.jts.geom.Geometry",
"org.opengis.feature.IllegalAttributeException",
"org.opengis.feature.simple.SimpleFeature",
"org.opengis.feature.simple.SimpleFeatureType",
"org.opengis.feature.type.GeometryDescri... | import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.geometry.jts.JTS; import org.locationtech.jts.geom.Geometry; import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.opengis.feature... | import org.geotools.feature.simple.*; import org.geotools.geometry.jts.*; import org.locationtech.jts.geom.*; import org.opengis.feature.*; import org.opengis.feature.simple.*; import org.opengis.feature.type.*; import org.opengis.geometry.*; import org.opengis.referencing.operation.*; | [
"org.geotools.feature",
"org.geotools.geometry",
"org.locationtech.jts",
"org.opengis.feature",
"org.opengis.geometry",
"org.opengis.referencing"
] | org.geotools.feature; org.geotools.geometry; org.locationtech.jts; org.opengis.feature; org.opengis.geometry; org.opengis.referencing; | 1,590,709 |
private void endTask() {
regionsContainer.setRegionContentVisibility(Region.CENTER, false);
regionsContainer.setRegionContentVisibility(Region.SOUTH, false);
regionsContainer.removeRegionContent(Region.CENTER);
regionsContainer.removeRegionContent(Region.SOUTH);
Question.getResponseProperty().setValue(t... | void function() { regionsContainer.setRegionContentVisibility(Region.CENTER, false); regionsContainer.setRegionContentVisibility(Region.SOUTH, false); regionsContainer.removeRegionContent(Region.CENTER); regionsContainer.removeRegionContent(Region.SOUTH); Question.getResponseProperty().setValue(this, givenResponse); Qu... | /**
* ends the execution
*/ | ends the execution | endTask | {
"repo_name": "j-stone/cog-tasks",
"path": "src/main/java/jms/cogtasks/executables/SymmetryProcessingTask.java",
"license": "gpl-3.0",
"size": 8870
} | [
"ch.tatool.core.data.DataUtils",
"ch.tatool.core.data.Misc",
"ch.tatool.core.data.Points",
"ch.tatool.core.data.Question",
"ch.tatool.core.data.Result",
"ch.tatool.core.data.Timing",
"ch.tatool.core.display.swing.container.RegionsContainer",
"ch.tatool.data.Trial",
"ch.tatool.exec.ExecutionOutcome"
... | import ch.tatool.core.data.DataUtils; import ch.tatool.core.data.Misc; import ch.tatool.core.data.Points; import ch.tatool.core.data.Question; import ch.tatool.core.data.Result; import ch.tatool.core.data.Timing; import ch.tatool.core.display.swing.container.RegionsContainer; import ch.tatool.data.Trial; import ch.tato... | import ch.tatool.core.data.*; import ch.tatool.core.display.swing.container.*; import ch.tatool.data.*; import ch.tatool.exec.*; | [
"ch.tatool.core",
"ch.tatool.data",
"ch.tatool.exec"
] | ch.tatool.core; ch.tatool.data; ch.tatool.exec; | 1,339,062 |
return service.search(offset, query, "*", limit)
.firstOrError()
.retry(1)
.flatMap(netGames -> Observable.fromIterable(netGames)
.map((Function<IGDBGame, IGameDatasource>) netGame -> netGame)
.toList());
} | return service.search(offset, query, "*", limit) .firstOrError() .retry(1) .flatMap(netGames -> Observable.fromIterable(netGames) .map((Function<IGDBGame, IGameDatasource>) netGame -> netGame) .toList()); } | /**
* Searches game that matches the specified query name
*
* @param query the name to query.
* @param offset the offset of the query
* @param limit the max amount of items to return
* @return a list of games matching the query.
*/ | Searches game that matches the specified query name | search | {
"repo_name": "Yorxxx/playednext",
"path": "app/src/main/java/com/piticlistudio/playednext/game/model/repository/datasource/IGDBGameRepositoryImpl.java",
"license": "apache-2.0",
"size": 2318
} | [
"com.piticlistudio.playednext.game.model.entity.datasource.IGDBGame",
"com.piticlistudio.playednext.game.model.entity.datasource.IGameDatasource",
"io.reactivex.Observable",
"io.reactivex.functions.Function"
] | import com.piticlistudio.playednext.game.model.entity.datasource.IGDBGame; import com.piticlistudio.playednext.game.model.entity.datasource.IGameDatasource; import io.reactivex.Observable; import io.reactivex.functions.Function; | import com.piticlistudio.playednext.game.model.entity.datasource.*; import io.reactivex.*; import io.reactivex.functions.*; | [
"com.piticlistudio.playednext",
"io.reactivex",
"io.reactivex.functions"
] | com.piticlistudio.playednext; io.reactivex; io.reactivex.functions; | 1,245,542 |
public Rectangle getImageBounds(int index) {
return null;
} | Rectangle function(int index) { return null; } | /**
* Returns the location and bounds of the area where the image is drawn.
*
* @param index
* the column index
* @return the bounds of the of the image area. May return <code>null</code>
* if the underlying widget implementation doesn't provide this
* information
* @since 3.... | Returns the location and bounds of the area where the image is drawn | getImageBounds | {
"repo_name": "neelance/jface4ruby",
"path": "jface4ruby/src/org/eclipse/jface/viewers/ViewerRow.java",
"license": "epl-1.0",
"size": 11491
} | [
"org.eclipse.swt.graphics.Rectangle"
] | import org.eclipse.swt.graphics.Rectangle; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,752,364 |
private DataSet<Tuple2<String, String>> createMetaData(LogicalGraph graph) {
return createMetaData(graph.getVertices())
.union(createMetaData(graph.getEdges()));
} | DataSet<Tuple2<String, String>> function(LogicalGraph graph) { return createMetaData(graph.getVertices()) .union(createMetaData(graph.getEdges())); } | /**
* Creates the meta data for the given graph.
*
* @param graph logical graph
* @return meta data information
*/ | Creates the meta data for the given graph | createMetaData | {
"repo_name": "p3et/gradoop",
"path": "gradoop-flink/src/main/java/org/gradoop/flink/io/impl/csv/CSVDataSink.java",
"license": "apache-2.0",
"size": 5521
} | [
"org.apache.flink.api.java.DataSet",
"org.apache.flink.api.java.tuple.Tuple2",
"org.gradoop.flink.model.api.epgm.LogicalGraph"
] | import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.tuple.Tuple2; import org.gradoop.flink.model.api.epgm.LogicalGraph; | import org.apache.flink.api.java.*; import org.apache.flink.api.java.tuple.*; import org.gradoop.flink.model.api.epgm.*; | [
"org.apache.flink",
"org.gradoop.flink"
] | org.apache.flink; org.gradoop.flink; | 229,254 |
Test getTest() {
String className = getTestClassName();
// this method is called from the test vm, so the config.getTestLoader
// method must not be used, since it's value is null
if (className != null) {
try {
Class testClass = Class.forName(className);
test = (Test) testClass.newInstance();
} ca... | Test getTest() { String className = getTestClassName(); if (className != null) { try { Class testClass = Class.forName(className); test = (Test) testClass.newInstance(); } catch (Throwable e) { logger.log(Level.INFO, STR + className, e); } } return test; } | /**
* Get an instance of the test represented by this descriptor.
*
* @return the test instance, or <code>null</code> if the test could not
* be instantiated
*/ | Get an instance of the test represented by this descriptor | getTest | {
"repo_name": "trasukg/river-qa-2.2",
"path": "qa/src/com/sun/jini/qa/harness/TestDescription.java",
"license": "apache-2.0",
"size": 25463
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 741,066 |
public void close() {
for (final Iterator<Runnable> i = cleanup.iterator(); i.hasNext();) {
try {
i.next().run();
} catch (Throwable err) {
log.error("Failed to execute cleanup for PrologEnvironment", err);
}
i.remove();
}
}
@Singleton
public static class Args {
... | void function() { for (final Iterator<Runnable> i = cleanup.iterator(); i.hasNext();) { try { i.next().run(); } catch (Throwable err) { log.error(STR, err); } i.remove(); } } public static class Args { private static final Class<Predicate> CONSULT_STREAM_2; static { try { @SuppressWarnings(STR) Class<Predicate> c = (Cl... | /**
* Release resources stored in interpreter's hash manager.
*/ | Release resources stored in interpreter's hash manager | close | {
"repo_name": "netroby/gerrit",
"path": "gerrit-server/src/main/java/com/google/gerrit/rules/PrologEnvironment.java",
"license": "apache-2.0",
"size": 7179
} | [
"com.google.gerrit.server.AnonymousUser",
"com.google.gerrit.server.IdentifiedUser",
"com.google.gerrit.server.config.GerritServerConfig",
"com.google.gerrit.server.git.GitRepositoryManager",
"com.google.gerrit.server.patch.PatchListCache",
"com.google.gerrit.server.patch.PatchSetInfoFactory",
"com.goog... | import com.google.gerrit.server.AnonymousUser; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.config.GerritServerConfig; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.patch.PatchListCache; import com.google.gerrit.server.patch.PatchSetInfoFact... | import com.google.gerrit.server.*; import com.google.gerrit.server.config.*; import com.google.gerrit.server.git.*; import com.google.gerrit.server.patch.*; import com.google.gerrit.server.project.*; import com.google.inject.*; import com.googlecode.prolog_cafe.lang.*; import java.util.*; import org.eclipse.jgit.lib.*; | [
"com.google.gerrit",
"com.google.inject",
"com.googlecode.prolog_cafe",
"java.util",
"org.eclipse.jgit"
] | com.google.gerrit; com.google.inject; com.googlecode.prolog_cafe; java.util; org.eclipse.jgit; | 1,346,009 |
public BoundedReadFromUnboundedSource<T> withMaxReadTime(Duration maxReadTime) {
return new BoundedReadFromUnboundedSource<T>(source, Long.MAX_VALUE, maxReadTime);
} | BoundedReadFromUnboundedSource<T> function(Duration maxReadTime) { return new BoundedReadFromUnboundedSource<T>(source, Long.MAX_VALUE, maxReadTime); } | /**
* Returns a new {@link BoundedReadFromUnboundedSource} that reads a bounded amount
* of data from the given {@link UnboundedSource}. The bound is specified as an amount
* of time to read for. Each split of the source will read for this much time.
*/ | Returns a new <code>BoundedReadFromUnboundedSource</code> that reads a bounded amount of data from the given <code>UnboundedSource</code>. The bound is specified as an amount of time to read for. Each split of the source will read for this much time | withMaxReadTime | {
"repo_name": "ahartley39/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/io/Read.java",
"license": "apache-2.0",
"size": 7046
} | [
"org.joda.time.Duration"
] | import org.joda.time.Duration; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,262,658 |
public static void checkDir(LocalFileSystem localFS, Path dir,
FsPermission expected)
throws DiskErrorException, IOException {
if (!mkdirsWithExistsAndPermissionCheck(localFS, dir, expected))
throw new DiskErrorException("can not create directory: "
... | static void function(LocalFileSystem localFS, Path dir, FsPermission expected) throws DiskErrorException, IOException { if (!mkdirsWithExistsAndPermissionCheck(localFS, dir, expected)) throw new DiskErrorException(STR + dir.toString()); FileStatus stat = localFS.getFileStatus(dir); FsPermission actual = stat.getPermiss... | /**
* Create the local directory if necessary, check permissions and also ensure
* it can be read from and written into.
* @param localFS local filesystem
* @param dir directory
* @param expected permission
* @throws DiskErrorException
* @throws IOException
*/ | Create the local directory if necessary, check permissions and also ensure it can be read from and written into | checkDir | {
"repo_name": "YuMatsuzawa/HadoopEclipseProject",
"path": "src/core/org/apache/hadoop/util/DiskChecker.java",
"license": "apache-2.0",
"size": 6737
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.LocalFileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsAction",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,303,089 |
protected void throwIfRetryRequest(Throwable caught) {
if (caught instanceof UnexpectedException) {
caught = caught.getCause();
}
if (JETTY_RETRY_REQUEST_EXCEPTION.equals(caught.getClass().getName())) {
throw (RuntimeException) caught;
}
} | void function(Throwable caught) { if (caught instanceof UnexpectedException) { caught = caught.getCause(); } if (JETTY_RETRY_REQUEST_EXCEPTION.equals(caught.getClass().getName())) { throw (RuntimeException) caught; } } | /**
* Throws the Jetty RetryRequest if found.
*
* @param caught the exception
*/ | Throws the Jetty RetryRequest if found | throwIfRetryRequest | {
"repo_name": "napcs/qedserver",
"path": "jetty/extras/gwt/src/main/java/org/mortbay/gwt/AsyncRemoteServiceServlet.java",
"license": "mit",
"size": 2501
} | [
"com.google.gwt.user.server.rpc.UnexpectedException"
] | import com.google.gwt.user.server.rpc.UnexpectedException; | import com.google.gwt.user.server.rpc.*; | [
"com.google.gwt"
] | com.google.gwt; | 146,913 |
void deleteDefinition(IdmFormDefinitionDto formDefinition, BasePermission... permission);
| void deleteDefinition(IdmFormDefinitionDto formDefinition, BasePermission... permission); | /**
* Deletes given form definition
*
* @param formDefinition
* @param permission base permissions to evaluate (AND)
* @throws ForbiddenEntityException if authorization policies doesn't met
* @since 10.5.0
*/ | Deletes given form definition | deleteDefinition | {
"repo_name": "bcvsolutions/CzechIdMng",
"path": "Realization/backend/core/core-api/src/main/java/eu/bcvsolutions/idm/core/eav/api/service/FormService.java",
"license": "mit",
"size": 39367
} | [
"eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto",
"eu.bcvsolutions.idm.core.security.api.domain.BasePermission"
] | import eu.bcvsolutions.idm.core.eav.api.dto.IdmFormDefinitionDto; import eu.bcvsolutions.idm.core.security.api.domain.BasePermission; | import eu.bcvsolutions.idm.core.eav.api.dto.*; import eu.bcvsolutions.idm.core.security.api.domain.*; | [
"eu.bcvsolutions.idm"
] | eu.bcvsolutions.idm; | 1,081,558 |
public static boolean borrarFTP(String element) {
try {
boolean res = false;
if(element.contains("(Directorio)")) {
element = element.substring(0, element.indexOf('('));
res = ftp.removeDirectory(element); //Para quitar [...](Directorio)
... | static boolean function(String element) { try { boolean res = false; if(element.contains(STR)) { element = element.substring(0, element.indexOf('(')); res = ftp.removeDirectory(element); if(res) System.out.println(STR); } else { res = ftp.deleteFile(element); if(res) System.out.println(STR); } if(!res) System.out.print... | /**
* Borrado de un elemento en remoto mediante FTP.
* @param element Elemento a borrar.
* @return Estado de la operacion.
*/ | Borrado de un elemento en remoto mediante FTP | borrarFTP | {
"repo_name": "MarioCodes/ProyectosClaseDAM",
"path": "java/FTPClient/src/controlador/Red.java",
"license": "apache-2.0",
"size": 6430
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,596,450 |
private void loadInternal(boolean eventHandled) {
LoadItemsEvent event = new LoadItemsEvent();
event.setItems(buildUsersList());
event.setHandled(eventHandled);
prepareResourceService();
when(service.fireEvent(anyString(), anyMap(), anyString(), anyString())).thenReturn(event);
Response response = servic... | void function(boolean eventHandled) { LoadItemsEvent event = new LoadItemsEvent(); event.setItems(buildUsersList()); event.setHandled(eventHandled); prepareResourceService(); when(service.fireEvent(anyString(), anyMap(), anyString(), anyString())).thenReturn(event); Response response = service.load(ResourceType.ALL.get... | /**
* Helps test the load method.
*
* @param eventHandled
* sets the event handled status
*/ | Helps test the load method | loadInternal | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/user-management/src/test/java/com/sirma/itt/seip/resources/ResourcesRestServiceTest.java",
"license": "lgpl-3.0",
"size": 7068
} | [
"com.sirma.itt.seip.domain.event.LoadItemsEvent",
"javax.ws.rs.core.Response",
"org.junit.Assert",
"org.mockito.Matchers",
"org.mockito.Mockito"
] | import com.sirma.itt.seip.domain.event.LoadItemsEvent; import javax.ws.rs.core.Response; import org.junit.Assert; import org.mockito.Matchers; import org.mockito.Mockito; | import com.sirma.itt.seip.domain.event.*; import javax.ws.rs.core.*; import org.junit.*; import org.mockito.*; | [
"com.sirma.itt",
"javax.ws",
"org.junit",
"org.mockito"
] | com.sirma.itt; javax.ws; org.junit; org.mockito; | 1,390,510 |
public void setSocketAddr(String name, InetSocketAddress addr) {
set(name, NetUtils.getHostPortString(addr));
} | void function(String name, InetSocketAddress addr) { set(name, NetUtils.getHostPortString(addr)); } | /**
* Set the socket address for the <code>name</code> property as
* a <code>host:port</code>.
*/ | Set the socket address for the <code>name</code> property as a <code>host:port</code> | setSocketAddr | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 133971
} | [
"java.net.InetSocketAddress",
"org.apache.hadoop.net.NetUtils"
] | import java.net.InetSocketAddress; import org.apache.hadoop.net.NetUtils; | import java.net.*; import org.apache.hadoop.net.*; | [
"java.net",
"org.apache.hadoop"
] | java.net; org.apache.hadoop; | 343,299 |
private static native void doCallBack(JavaScriptObject callback, String arg) ; | static native void function(JavaScriptObject callback, String arg) ; | /**
* Take a Javascript function, embedded in an opaque JavaScriptObject,
* and call it.
*
* @param callback the Javascript callback.
* @param arg argument to the callback
*/ | Take a Javascript function, embedded in an opaque JavaScriptObject, and call it | doCallBack | {
"repo_name": "warren922/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/BlocklyPanel.java",
"license": "apache-2.0",
"size": 36654
} | [
"com.google.gwt.core.client.JavaScriptObject"
] | import com.google.gwt.core.client.JavaScriptObject; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,174,951 |
public Connection getConnection() {
return this.connection;
} | Connection function() { return this.connection; } | /**
* Gets the connection.
*
* @return the connection
*/ | Gets the connection | getConnection | {
"repo_name": "Nomost80/pimp-my-fridge",
"path": "src/models/db/DBConnection.java",
"license": "mit",
"size": 1814
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 695,676 |
public static CouponFixedCompoundingDefinition from(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate,
final ZonedDateTime accrualEndDate,
final double paymentAccrualFactor, final double notional, final double rate, final ZonedDateTime[] accrualStartDates,
... | static CouponFixedCompoundingDefinition function(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double paymentAccrualFactor, final double notional, final double rate, final ZonedDateTime[] accrualStartDates, final ZonedDateTime[]... | /**
* Builds a fixed compounded coupon from all the details.
*
* @param currency
* The coupon currency.
* @param paymentDate
* The coupon payment date.
* @param accrualStartDate
* The start date of the accrual period.
* @param accrualEndDate
* The end d... | Builds a fixed compounded coupon from all the details | from | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/instrument/payment/CouponFixedCompoundingDefinition.java",
"license": "apache-2.0",
"size": 11854
} | [
"com.opengamma.util.money.Currency",
"org.threeten.bp.ZonedDateTime"
] | import com.opengamma.util.money.Currency; import org.threeten.bp.ZonedDateTime; | import com.opengamma.util.money.*; import org.threeten.bp.*; | [
"com.opengamma.util",
"org.threeten.bp"
] | com.opengamma.util; org.threeten.bp; | 1,082,498 |
@Override
public final void dump( DataOutputStream file ) throws IOException {
super.dump(file);
if (length > 0) {
file.write(bytes, 0, length);
}
} | final void function( DataOutputStream file ) throws IOException { super.dump(file); if (length > 0) { file.write(bytes, 0, length); } } | /**
* Dump source file attribute to file stream in binary format.
*
* @param file Output file stream
* @throws IOException
*/ | Dump source file attribute to file stream in binary format | dump | {
"repo_name": "Maccimo/commons-bcel",
"path": "src/main/java/org/apache/bcel/classfile/Deprecated.java",
"license": "apache-2.0",
"size": 4326
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,053,015 |
public static java.util.Set extractPrognosticGroupingConfigSet(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.PrognosticGroupingCongfigVoCollection voCollection)
{
return extractPrognosticGroupingConfigSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.PrognosticGroupingCongfigVoCollection voCollection) { return extractPrognosticGroupingConfigSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.oncology.configuration.domain.objects.PrognosticGroupingConfig set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.oncology.configuration.domain.objects.PrognosticGroupingConfig set from the value object collection | extractPrognosticGroupingConfigSet | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/clinicaladmin/vo/domain/PrognosticGroupingCongfigVoAssembler.java",
"license": "agpl-3.0",
"size": 28758
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 248,966 |
public static String getInstanceValue(XSDTypeDefinition type)
{
if (type != null)
{
if (isBuiltIn(type))
{
String nameID = type.getName();
return (String)defaultValue.get(nameID);
}
else
{
XSDTypeDefinition basetype = type.getBaseType();
if (base... | static String function(XSDTypeDefinition type) { if (type != null) { if (isBuiltIn(type)) { String nameID = type.getName(); return (String)defaultValue.get(nameID); } else { XSDTypeDefinition basetype = type.getBaseType(); if (basetype != type) return getInstanceValue(basetype); } } return null; } | /**
* Returns a valid default value for the simple type.
* @param type - a simple built-in type.
* @return a valid default value for the simple type.
*/ | Returns a valid default value for the simple type | getInstanceValue | {
"repo_name": "ttimbul/eclipse.wst",
"path": "bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDTypeUtil.java",
"license": "epl-1.0",
"size": 3897
} | [
"org.eclipse.xsd.XSDTypeDefinition"
] | import org.eclipse.xsd.XSDTypeDefinition; | import org.eclipse.xsd.*; | [
"org.eclipse.xsd"
] | org.eclipse.xsd; | 2,098,778 |
public static int findMinZoom(LatLonAltBox bounds) {
int minZoom;
long tileNumbers;
minZoom = 1;
for (int i = 23; i > 0; i--) {
tileNumbers = calculateNumberOfMapTiles(bounds, i, i);
if (tileNumbers == 1) {
minZo... | static int function(LatLonAltBox bounds) { int minZoom; long tileNumbers; minZoom = 1; for (int i = 23; i > 0; i--) { tileNumbers = calculateNumberOfMapTiles(bounds, i, i); if (tileNumbers == 1) { minZoom = i; break; } } return minZoom; } | /**
* Finds the zoom level that would result in the whole map being displayed
* in one tile.
*
* @param bounds
* @return
*/ | Finds the zoom level that would result in the whole map being displayed in one tile | findMinZoom | {
"repo_name": "alecdhuse/Folding-Map",
"path": "FoldingMap/src/co/foldingmap/mapImportExport/TileExporter.java",
"license": "gpl-3.0",
"size": 23576
} | [
"co.foldingmap.map.vector.LatLonAltBox"
] | import co.foldingmap.map.vector.LatLonAltBox; | import co.foldingmap.map.vector.*; | [
"co.foldingmap.map"
] | co.foldingmap.map; | 1,130,051 |
@SuppressWarnings("unchecked")
public <K1 extends K, V1 extends V> Builder<K1, V1> asyncExpirationListeners(
List<ExpirationListener<? super K1, ? super V1>> listeners) {
Assert.notNull(listeners, "listeners");
if (asyncExpirationListeners == null)
asyncExpirationListeners = new Arra... | @SuppressWarnings(STR) <K1 extends K, V1 extends V> Builder<K1, V1> function( List<ExpirationListener<? super K1, ? super V1>> listeners) { Assert.notNull(listeners, STR); if (asyncExpirationListeners == null) asyncExpirationListeners = new ArrayList<ExpirationListener<K, V>>(listeners.size()); for (ExpirationListener<... | /**
* Configures the expiration listeners which will receive asynchronous notifications upon each map entry's
* expiration.
*
* @param listeners to set
* @throws NullPointerException if {@code listener} is null
*/ | Configures the expiration listeners which will receive asynchronous notifications upon each map entry's expiration | asyncExpirationListeners | {
"repo_name": "ProtocolSupport/ProtocolSupportPocketStuff",
"path": "src/protocolsupportpocketstuff/libs/jodah/expiringmap/ExpiringMap.java",
"license": "agpl-3.0",
"size": 44103
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 742,609 |
public static Rectangle transformRect(final AffineTransform af, final Rectangle pSrc) {
final Rectangle dest = new Rectangle(0, 0, 0, 0);
final Rectangle src = absRect(pSrc);
Point p1 = new Point(src.x, src.y);
p1 = transformPoint(af, p1);
dest.x = p1.x;
dest.y = p1.y;
dest.width = (int) (src.width * a... | static Rectangle function(final AffineTransform af, final Rectangle pSrc) { final Rectangle dest = new Rectangle(0, 0, 0, 0); final Rectangle src = absRect(pSrc); Point p1 = new Point(src.x, src.y); p1 = transformPoint(af, p1); dest.x = p1.x; dest.y = p1.y; dest.width = (int) (src.width * af.getScaleX()); dest.height =... | /**
* Given an arbitrary rectangle, get the rectangle with the given transform. The result
* rectangle is positive width and positive height.
*
* @param af
* AffineTransform
* @param pSrc
* source rectangle
* @return rectangle after transform with positive width and height
*/ | Given an arbitrary rectangle, get the rectangle with the given transform. The result rectangle is positive width and positive height | transformRect | {
"repo_name": "rhchen/etrakr",
"path": "chart/net.tourbook.common/src/net/tourbook/common/util/SWT2Dutil.java",
"license": "epl-1.0",
"size": 12073
} | [
"java.awt.geom.AffineTransform",
"org.eclipse.swt.graphics.Point",
"org.eclipse.swt.graphics.Rectangle"
] | import java.awt.geom.AffineTransform; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; | import java.awt.geom.*; import org.eclipse.swt.graphics.*; | [
"java.awt",
"org.eclipse.swt"
] | java.awt; org.eclipse.swt; | 2,728,108 |
@SuppressWarnings("unchecked")
private void registerMbean(Object o, @Nullable String cacheName, boolean near)
throws IgniteCheckedException {
assert o != null;
MBeanServer srvr = ctx.config().getMBeanServer();
assert srvr != null;
cacheName = U.maskName(cacheName);
... | @SuppressWarnings(STR) void function(Object o, @Nullable String cacheName, boolean near) throws IgniteCheckedException { assert o != null; MBeanServer srvr = ctx.config().getMBeanServer(); assert srvr != null; cacheName = U.maskName(cacheName); cacheName = near ? cacheName + "-near" : cacheName; for (Class<?> itf : o.g... | /**
* Registers MBean for cache components.
*
* @param o Cache component.
* @param cacheName Cache name.
* @param near Near flag.
* @throws IgniteCheckedException If registration failed.
*/ | Registers MBean for cache components | registerMbean | {
"repo_name": "apacheignite/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java",
"license": "apache-2.0",
"size": 131496
} | [
"javax.management.JMException",
"javax.management.MBeanServer",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.util.typedef.internal.U",
"org.jetbrains.annotations.Nullable"
] | import javax.management.JMException; import javax.management.MBeanServer; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; | import javax.management.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*; | [
"javax.management",
"org.apache.ignite",
"org.jetbrains.annotations"
] | javax.management; org.apache.ignite; org.jetbrains.annotations; | 95,608 |
@Nonnull public static UBL23WriterBuilder<SelfBilledCreditNoteType> selfBilledCreditNote(){return UBL23WriterBuilder.create(SelfBilledCreditNoteType.class);} | @Nonnull public static UBL23WriterBuilder<SelfBilledCreditNoteType> selfBilledCreditNote(){return UBL23WriterBuilder.create(SelfBilledCreditNoteType.class);} | /** Create a writer builder for RetailEvent.
@return The builder and never <code>null</code> */ | Create a writer builder for RetailEvent | retailEvent | {
"repo_name": "phax/ph-ubl",
"path": "ph-ubl23/src/main/java/com/helger/ubl23/UBL23Writer.java",
"license": "apache-2.0",
"size": 32994
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 141,826 |
@Override
public void clickCell(int index) {
// Get the component at that location.
LWRComponent component = assemblyLocations.get(fullIndices.get(index));
// If possible, select the properties of the component in that location.
if (component != null) {
IPropertySource properties = new Property... | void function(int index) { LWRComponent component = assemblyLocations.get(fullIndices.get(index)); if (component != null) { IPropertySource properties = new PropertySourceFactory() .getPropertySource(component); if (properties != null) { selectionProvider .setSelection(new StructuredSelection(properties)); } } return; ... | /**
* Sends an update to {@link AnalysisView#selectionProvider
* selectionProvider} when a cell has been clicked.
*/ | Sends an update to <code>AnalysisView#selectionProvider selectionProvider</code> when a cell has been clicked | clickCell | {
"repo_name": "gorindn/ice",
"path": "src/org.eclipse.ice.client.widgets.reactoreditor.lwr/src/org/eclipse/ice/client/widgets/reactoreditor/lwr/AssemblyAnalysisView.java",
"license": "epl-1.0",
"size": 38597
} | [
"org.eclipse.ice.client.widgets.reactoreditor.lwr.properties.PropertySourceFactory",
"org.eclipse.ice.reactor.LWRComponent",
"org.eclipse.jface.viewers.StructuredSelection",
"org.eclipse.ui.views.properties.IPropertySource"
] | import org.eclipse.ice.client.widgets.reactoreditor.lwr.properties.PropertySourceFactory; import org.eclipse.ice.reactor.LWRComponent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.views.properties.IPropertySource; | import org.eclipse.ice.client.widgets.reactoreditor.lwr.properties.*; import org.eclipse.ice.reactor.*; import org.eclipse.jface.viewers.*; import org.eclipse.ui.views.properties.*; | [
"org.eclipse.ice",
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.ice; org.eclipse.jface; org.eclipse.ui; | 808,827 |
public Observable<ServiceResponse<Page<DetectorDefinitionInner>>> getSiteDetectorSlotNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<DetectorDefinitionInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Get Detector.
* Get Detector.
*
ServiceResponse<PageImpl<DetectorDefinitionInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<DetectorDef... | Get Detector. Get Detector | getSiteDetectorSlotNextSinglePageAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java",
"license": "mit",
"size": 295384
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,904,807 |
public static LegendScheme createImageLegend(GridArray gdata, List<Number> levs, ColorMap cmap) {
LegendScheme ls;
if (cmap.getColorCount() == levs.size()){
ls = LegendManage.createUniqValueLegendScheme(levs, cmap, ShapeTypes.Image);
} else {
if (gdata.hasNaN()) ... | static LegendScheme function(GridArray gdata, List<Number> levs, ColorMap cmap) { LegendScheme ls; if (cmap.getColorCount() == levs.size()){ ls = LegendManage.createUniqValueLegendScheme(levs, cmap, ShapeTypes.Image); } else { if (gdata.hasNaN()) { ls = LegendManage.createLegendScheme(gdata.min(), gdata.max(), levs, cm... | /**
* Create image legend from grid data
*
* @param gdata Grid data
* @param levs Legend break values
* @param cmap Color map
* @return Legend scheme
*/ | Create image legend from grid data | createImageLegend | {
"repo_name": "meteoinfo/meteoinfolib",
"path": "src/org/meteoinfo/legend/LegendManage.java",
"license": "lgpl-3.0",
"size": 74404
} | [
"java.util.List",
"org.meteoinfo.data.GridArray",
"org.meteoinfo.global.colors.ColorMap",
"org.meteoinfo.shape.ShapeTypes"
] | import java.util.List; import org.meteoinfo.data.GridArray; import org.meteoinfo.global.colors.ColorMap; import org.meteoinfo.shape.ShapeTypes; | import java.util.*; import org.meteoinfo.data.*; import org.meteoinfo.global.colors.*; import org.meteoinfo.shape.*; | [
"java.util",
"org.meteoinfo.data",
"org.meteoinfo.global",
"org.meteoinfo.shape"
] | java.util; org.meteoinfo.data; org.meteoinfo.global; org.meteoinfo.shape; | 868,383 |
public void retrieveFirstPrimaryKeyOrOne(ReportQuery subselect){
subselect.selectValue1();
} | void function(ReportQuery subselect){ subselect.selectValue1(); } | /**
* INTERNAL:
* Used by Exists queries because they just need to select a single row.
* In most databases, we will select one of the primary key fields.
*
* On Syfoware, there are situations where the key cannot be used.
*
* See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=303396
... | Used by Exists queries because they just need to select a single row. In most databases, we will select one of the primary key fields. On Syfoware, there are situations where the key cannot be used. See: HREF | retrieveFirstPrimaryKeyOrOne | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/platform/database/SymfowarePlatform.java",
"license": "epl-1.0",
"size": 51856
} | [
"org.eclipse.persistence.queries.ReportQuery"
] | import org.eclipse.persistence.queries.ReportQuery; | import org.eclipse.persistence.queries.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 719,343 |
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
if (request.getParameter(subLogin) != null) {
processLogin(request);
}
getServletContext().getRequestDispatcher("/WEB-INF/Administration/index.jsp").forward(request, response)... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getParameter(subLogin) != null) { processLogin(request); } getServletContext().getRequestDispatcher(STR).forward(request, response); } | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
*
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "Joxit/InstitutGalilee",
"path": "M2/LEE/devoir_magloire/devoir_magloire-war/src/java/Administration/Admin.java",
"license": "gpl-3.0",
"size": 4655
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,891,393 |
public void testEnoughCopiesFoundForAllocationOnLegacyIndex() {
MetaData metaData = MetaData.builder()
.put(IndexMetaData.builder(shardId.getIndexName()).settings(settings(Version.V_2_0_0)).numberOfShards(1).numberOfReplicas(2))
.build();
RoutingTable routingTable = R... | void function() { MetaData metaData = MetaData.builder() .put(IndexMetaData.builder(shardId.getIndexName()).settings(settings(Version.V_2_0_0)).numberOfShards(1).numberOfReplicas(2)) .build(); RoutingTable routingTable = RoutingTable.builder() .addAsRecovery(metaData.index(shardId.getIndex())) .build(); ClusterState st... | /**
* Tests that only when enough copies of the shard exists we are going to allocate it. This test
* verifies that with same version (1), and quorum allocation.
*/ | Tests that only when enough copies of the shard exists we are going to allocate it. This test verifies that with same version (1), and quorum allocation | testEnoughCopiesFoundForAllocationOnLegacyIndex | {
"repo_name": "girirajsharma/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java",
"license": "apache-2.0",
"size": 43911
} | [
"org.elasticsearch.Version",
"org.elasticsearch.cluster.ClusterName",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.cluster.health.ClusterHealthStatus",
"org.elasticsearch.cluster.metadata.IndexMetaData",
"org.elasticsearch.cluster.metadata.MetaData",
"org.elasticsearch.cluster.node.Disco... | import org.elasticsearch.Version; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearc... | import org.elasticsearch.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.health.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*; import org.elasticsearch.com... | [
"org.elasticsearch",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.hamcrest"
] | org.elasticsearch; org.elasticsearch.cluster; org.elasticsearch.common; org.hamcrest; | 666,474 |
private Number toNumber(Class<?> sourceType, Class<?> targetType, String value) {
// Byte
if (targetType.equals(Byte.class)) {
return new Byte(value);
}
// Short
if (targetType.equals(Short.class)) {
return new Short(value);
}
// Int... | Number function(Class<?> sourceType, Class<?> targetType, String value) { if (targetType.equals(Byte.class)) { return new Byte(value); } if (targetType.equals(Short.class)) { return new Short(value); } if (targetType.equals(Integer.class)) { return new Integer(value); } if (targetType.equals(Long.class)) { return new L... | /**
* Default String to Number conversion.
* <p>
* This method handles conversion from a String to the following types:
* <ul>
* <li><code>java.lang.Byte</code></li>
* <li><code>java.lang.Short</code></li>
* <li><code>java.lang.Integer</code></li>
* <li><code>java... | Default String to Number conversion. This method handles conversion from a String to the following types: <code>java.lang.Byte</code> <code>java.lang.Short</code> <code>java.lang.Integer</code> <code>java.lang.Long</code> <code>java.lang.Float</code> <code>java.lang.Double</code> <code>java.math.BigDecimal</code> <code... | toNumber | {
"repo_name": "77ilogin/training",
"path": "src/main/java/org/apache/commons/beanutils/converters/NumberConverter.java",
"license": "apache-2.0",
"size": 19744
} | [
"java.math.BigDecimal",
"java.math.BigInteger",
"org.apache.commons.beanutils.ConversionException"
] | import java.math.BigDecimal; import java.math.BigInteger; import org.apache.commons.beanutils.ConversionException; | import java.math.*; import org.apache.commons.beanutils.*; | [
"java.math",
"org.apache.commons"
] | java.math; org.apache.commons; | 1,588,965 |
@Override
public X509Certificate loadFromToken() {
return loadFromToken(null);
} | X509Certificate function() { return loadFromToken(null); } | /**
* Obtain the certificate from a Token or Smartcard,
* defined by ICP-BRASIL with the name A3.
*
* @return the certificate information in X509Certificate format.
*/ | Obtain the certificate from a Token or Smartcard, defined by ICP-BRASIL with the name A3 | loadFromToken | {
"repo_name": "demoiselle/signer",
"path": "core/src/main/java/org/demoiselle/signer/core/CertificateLoaderImpl.java",
"license": "lgpl-3.0",
"size": 5366
} | [
"java.security.cert.X509Certificate"
] | import java.security.cert.X509Certificate; | import java.security.cert.*; | [
"java.security"
] | java.security; | 2,710,561 |
Image getStopIcon(Dimension iconSize); | Image getStopIcon(Dimension iconSize); | /**
* Returns stop icon
* @param iconSize
* @return
*/ | Returns stop icon | getStopIcon | {
"repo_name": "PDavid/aTunes",
"path": "aTunes/src/main/java/net/sourceforge/atunes/model/IPlayerTrayIconsHandler.java",
"license": "gpl-2.0",
"size": 1498
} | [
"java.awt.Dimension",
"java.awt.Image"
] | import java.awt.Dimension; import java.awt.Image; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,446,040 |
@Test
public void testBuildValidTimestampNull() {
MetaData.Builder builder = new MetaData.Builder();
builder.setId(MetaDataTest.ID_TEST);
builder.setTimestamp(null);
MetaData metaData = builder.build();
Assert.assertNotNull(metaData);
Assert.assertEquals(MetaDataTest.ID_TEST, metaData.getId());
Asser... | void function() { MetaData.Builder builder = new MetaData.Builder(); builder.setId(MetaDataTest.ID_TEST); builder.setTimestamp(null); MetaData metaData = builder.build(); Assert.assertNotNull(metaData); Assert.assertEquals(MetaDataTest.ID_TEST, metaData.getId()); Assert.assertEquals(null, metaData.getTimestamp()); } | /**
* Test that the meta-data can be built with a null timestamp and that the
* resulting object is what we set it to.
*/ | Test that the meta-data can be built with a null timestamp and that the resulting object is what we set it to | testBuildValidTimestampNull | {
"repo_name": "mschulkind/shim",
"path": "dsu/test/org/openmhealth/reference/domain/MetaDataBuilderTest.java",
"license": "apache-2.0",
"size": 7171
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 375,587 |
@NotNull
@Required
GenericAttributeValue<RepositoryTypeAttribute> getType(); | GenericAttributeValue<RepositoryTypeAttribute> getType(); | /**
* Returns the value of the type child.
* <pre>
* <h3>Attribute null:type documentation</h3>
* The type of flow execution repository to use. The repository is responsible for managing flow execution
* persistence between requests.
* </pre>
*
* @return the value of the type child.
*/ | Returns the value of the type child. <code> Attribute null:type documentation The type of flow execution repository to use. The repository is responsible for managing flow execution persistence between requests. </code> | getType | {
"repo_name": "consulo-trash/consulo-spring",
"path": "webflow/src/com/intellij/spring/webflow/config/model/xml/version1_0/Repository.java",
"license": "apache-2.0",
"size": 2596
} | [
"com.intellij.util.xml.GenericAttributeValue"
] | import com.intellij.util.xml.GenericAttributeValue; | import com.intellij.util.xml.*; | [
"com.intellij.util"
] | com.intellij.util; | 420,133 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/t24/core/com.odcgroup.t24.enquiry.model.edit/src/com/odcgroup/t24/enquiry/enquiry/provider/UtilTypeItemProvider.java",
"license": "epl-1.0",
"size": 3306
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,251,965 |
RowData removeLast() {
Map.Entry<RowData, Collection<RowData>> last = treeMap.lastEntry();
RowData lastElement = null;
if (last != null) {
Collection<RowData> collection = last.getValue();
if (collection != null) {
if (collection instanceof List) {
... | RowData removeLast() { Map.Entry<RowData, Collection<RowData>> last = treeMap.lastEntry(); RowData lastElement = null; if (last != null) { Collection<RowData> collection = last.getValue(); if (collection != null) { if (collection instanceof List) { List<RowData> list = (List<RowData>) collection; if (!list.isEmpty()) {... | /**
* Removes the last record of the last Entry in the buffer.
*
* @return removed record
*/ | Removes the last record of the last Entry in the buffer | removeLast | {
"repo_name": "aljoscha/flink",
"path": "flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/rank/TopNBuffer.java",
"license": "apache-2.0",
"size": 8311
} | [
"java.util.Collection",
"java.util.List",
"java.util.Map",
"org.apache.flink.table.data.RowData"
] | import java.util.Collection; import java.util.List; import java.util.Map; import org.apache.flink.table.data.RowData; | import java.util.*; import org.apache.flink.table.data.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,125,033 |
public Path createCompilerclasspath() {
if (compilerClasspath == null) {
compilerClasspath = new Path(getProject());
}
return compilerClasspath.createPath();
} | Path function() { if (compilerClasspath == null) { compilerClasspath = new Path(getProject()); } return compilerClasspath.createPath(); } | /**
* Support nested compiler classpath, used to locate compiler adapter
* @return a path to be configured.
*/ | Support nested compiler classpath, used to locate compiler adapter | createCompilerclasspath | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java",
"license": "gpl-2.0",
"size": 20543
} | [
"org.apache.tools.ant.types.Path"
] | import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.*; | [
"org.apache.tools"
] | org.apache.tools; | 2,342,253 |
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String publicIpPrefixName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String publicIpPrefixName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, publicIpPrefixName), serviceCallback); } | /**
* Deletes the specified public IP prefix.
*
* @param resourceGroupName The name of the resource group.
* @param publicIpPrefixName The name of the PublicIpPrefix.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentExce... | Deletes the specified public IP prefix | deleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixesInner.java",
"license": "mit",
"size": 78189
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 941,094 |
public int getSchema(FlatBufferBuilder builder) {
int[] fieldOffsets = new int[fields.size()];
for (int i = 0; i < fields.size(); i++) {
fieldOffsets[i] = fields.get(i).getField(builder);
}
int fieldsOffset = org.apache.arrow.flatbuf.Schema.createFieldsVector(builder, fieldOffsets);
int meta... | int function(FlatBufferBuilder builder) { int[] fieldOffsets = new int[fields.size()]; for (int i = 0; i < fields.size(); i++) { fieldOffsets[i] = fields.get(i).getField(builder); } int fieldsOffset = org.apache.arrow.flatbuf.Schema.createFieldsVector(builder, fieldOffsets); int metadataOffset = FBSerializables.writeKe... | /**
* Adds this schema to the builder returning the size of the builder after adding.
*/ | Adds this schema to the builder returning the size of the builder after adding | getSchema | {
"repo_name": "cpcloud/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/types/pojo/Schema.java",
"license": "apache-2.0",
"size": 8438
} | [
"com.google.flatbuffers.FlatBufferBuilder",
"org.apache.arrow.vector.ipc.message.FBSerializables"
] | import com.google.flatbuffers.FlatBufferBuilder; import org.apache.arrow.vector.ipc.message.FBSerializables; | import com.google.flatbuffers.*; import org.apache.arrow.vector.ipc.message.*; | [
"com.google.flatbuffers",
"org.apache.arrow"
] | com.google.flatbuffers; org.apache.arrow; | 1,548,326 |
public void setColorAndState(Color color, int stateValue)
{
this.stateValue = stateValue;
// set a shape and background color
Shape shape = view.getDisplayShape(
new IntegerCellState(stateValue), this.getWidth(), this
.getHeight(), null);
if(shape == null)
{
this.setBack... | void function(Color color, int stateValue) { this.stateValue = stateValue; Shape shape = view.getDisplayShape( new IntegerCellState(stateValue), this.getWidth(), this .getHeight(), null); if(shape == null) { this.setBackground(color); } else { this.setBackground(ColorScheme.DEFAULT_EMPTY_COLOR); } colorOfPatch = color;... | /**
* Set the color and state of the patch.
*/ | Set the color and state of the patch | setColorAndState | {
"repo_name": "KEOpenSource/CAExplorer",
"path": "cellularAutomata/analysis/NeighborhoodSizeAnalysis.java",
"license": "apache-2.0",
"size": 54655
} | [
"java.awt.Color",
"java.awt.Shape"
] | import java.awt.Color; import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 124,484 |
public void testSimpleReadSequence()
throws IOException, StandardException {
InputStream in = new LoopingAlphabetStream(26);
PositionedStoreStream pss = new PositionedStoreStream(in);
assertEquals('a', pss.read());
pss.reposition(9);
assertEquals('j', pss.read());... | void function() throws IOException, StandardException { InputStream in = new LoopingAlphabetStream(26); PositionedStoreStream pss = new PositionedStoreStream(in); assertEquals('a', pss.read()); pss.reposition(9); assertEquals('j', pss.read()); pss.reposition(10); assertEquals('k', pss.read()); pss.reposition(9); assert... | /**
* Executes a simple read sequence against the lower case modern latin
* alphabet, which involves some repositioning.
*/ | Executes a simple read sequence against the lower case modern latin alphabet, which involves some repositioning | testSimpleReadSequence | {
"repo_name": "kavin256/Derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/store/PositionedStoreStreamTest.java",
"license": "apache-2.0",
"size": 9302
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.impl.jdbc.PositionedStoreStream",
"org.apache.derbyTesting.functionTests.util.streams.LoopingAlphabetStream"
] | import java.io.IOException; import java.io.InputStream; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.impl.jdbc.PositionedStoreStream; import org.apache.derbyTesting.functionTests.util.streams.LoopingAlphabetStream; | import java.io.*; import org.apache.*; import org.apache.derby.iapi.error.*; import org.apache.derby.impl.jdbc.*; | [
"java.io",
"org.apache",
"org.apache.derby"
] | java.io; org.apache; org.apache.derby; | 1,951,324 |
public BlockCipher getUnderlyingCipher()
{
return cipher;
} | BlockCipher function() { return cipher; } | /**
* return the underlying block cipher that we are wrapping.
*
* @return the underlying block cipher that we are wrapping.
*/ | return the underlying block cipher that we are wrapping | getUnderlyingCipher | {
"repo_name": "thedrummeraki/Aki-SSL",
"path": "src/org/bouncycastle/crypto/modes/OpenPGPCFBBlockCipher.java",
"license": "apache-2.0",
"size": 9384
} | [
"org.bouncycastle.crypto.BlockCipher"
] | import org.bouncycastle.crypto.BlockCipher; | import org.bouncycastle.crypto.*; | [
"org.bouncycastle.crypto"
] | org.bouncycastle.crypto; | 55,060 |
Observable<List<Double>> getDoubleValidAsync(); | Observable<List<Double>> getDoubleValidAsync(); | /**
* Get float array value [0, -0.01, 1.2e20].
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the List<Double> object
*/ | Get float array value [0, -0.01, 1.2e20] | getDoubleValidAsync | {
"repo_name": "balajikris/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java",
"license": "mit",
"size": 104816
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 120,497 |
public boolean killJob() {
// TODO: It should also be possible to kill the job when there is not
// an program or command running, but we can only get a Job object from a call object.
// This Job object would normally not change, but it might if the AS400 object
// automatically reconnects a... | boolean function() { if (activeJob==null) return false; As400Connection conn=new As400Connection(this.conf); try { activeJob.setSystem(conn.as400); JobLog jobLog = activeJob.getJobLog(); String status = activeJob.getStatus(); String logging=STR+jobId+STR+status+"]"; logging+=STR+executingProgram+STR; int nrofMessages=c... | /**
* Tries to kill the current job using ENDJOB
* @return true if a MessageWaiting was indeed cancelled, false otherwise
*/ | Tries to kill the current job using ENDJOB | killJob | {
"repo_name": "BackupTheBerlios/relayconnector",
"path": "src/java/org/kisst/cordys/as400/conn/As400Connection.java",
"license": "gpl-3.0",
"size": 10066
} | [
"com.eibus.util.logger.Severity",
"com.ibm.as400.access.AS400SecurityException",
"com.ibm.as400.access.ErrorCompletingRequestException",
"com.ibm.as400.access.JobLog",
"com.ibm.as400.access.ObjectDoesNotExistException",
"com.ibm.as400.access.QueuedMessage",
"java.beans.PropertyVetoException",
"java.io... | import com.eibus.util.logger.Severity; import com.ibm.as400.access.AS400SecurityException; import com.ibm.as400.access.ErrorCompletingRequestException; import com.ibm.as400.access.JobLog; import com.ibm.as400.access.ObjectDoesNotExistException; import com.ibm.as400.access.QueuedMessage; import java.beans.PropertyVetoEx... | import com.eibus.util.logger.*; import com.ibm.as400.access.*; import java.beans.*; import java.io.*; | [
"com.eibus.util",
"com.ibm.as400",
"java.beans",
"java.io"
] | com.eibus.util; com.ibm.as400; java.beans; java.io; | 1,458,193 |
protected void waitForAck() throws java.io.IOException {
try {
boolean ackReceived = false;
boolean failAckReceived = false;
ackbuf.clear();
int bytesRead = 0;
int i = soIn.read();
while ((i != -1) && (bytesRead < Constants.ACK_COMMAND.... | void function() throws java.io.IOException { try { boolean ackReceived = false; boolean failAckReceived = false; ackbuf.clear(); int bytesRead = 0; int i = soIn.read(); while ((i != -1) && (bytesRead < Constants.ACK_COMMAND.length)) { bytesRead++; byte d = (byte)i; ackbuf.append(d); if (ackbuf.doesPackageExist() ) { by... | /**
* Wait for Acknowledgement from other server.
* FIXME Please, not wait only for three characters, better control that the wait ack message is correct.
* @throws IOException An IO error occurred
*/ | Wait for Acknowledgement from other server. FIXME Please, not wait only for three characters, better control that the wait ack message is correct | waitForAck | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/tribes/transport/bio/BioSender.java",
"license": "apache-2.0",
"size": 10443
} | [
"java.io.IOException",
"java.util.Arrays",
"org.apache.catalina.tribes.RemoteProcessException",
"org.apache.catalina.tribes.transport.Constants",
"org.apache.catalina.tribes.transport.SenderState"
] | import java.io.IOException; import java.util.Arrays; import org.apache.catalina.tribes.RemoteProcessException; import org.apache.catalina.tribes.transport.Constants; import org.apache.catalina.tribes.transport.SenderState; | import java.io.*; import java.util.*; import org.apache.catalina.tribes.*; import org.apache.catalina.tribes.transport.*; | [
"java.io",
"java.util",
"org.apache.catalina"
] | java.io; java.util; org.apache.catalina; | 2,529,772 |
RefObject getSource();
| RefObject getSource(); | /**
* The model element that was used to produce this Artifact.
* @return the model element
*/ | The model element that was used to produce this Artifact | getSource | {
"repo_name": "NCIP/catissue-cacore-sdk",
"path": "src/gov/nih/nci/codegen/framework/Artifact.java",
"license": "bsd-3-clause",
"size": 2955
} | [
"javax.jmi.reflect.RefObject"
] | import javax.jmi.reflect.RefObject; | import javax.jmi.reflect.*; | [
"javax.jmi"
] | javax.jmi; | 2,437,584 |
public static void mtimes(Matrix res, Matrix A, char operator, Matrix B) {
if (operator == ' ') {
mtimes(res, A, B);
} else if (operator == 'T') {
if (res instanceof SparseMatrix) {
((SparseMatrix) res).assignSparseMatrix(sparse(A.transpose().mtimes(B)));
} else if (res instanceof DenseMatrix) {
... | static void function(Matrix res, Matrix A, char operator, Matrix B) { if (operator == ' ') { mtimes(res, A, B); } else if (operator == 'T') { if (res instanceof SparseMatrix) { ((SparseMatrix) res).assignSparseMatrix(sparse(A.transpose().mtimes(B))); } else if (res instanceof DenseMatrix) { double[][] resData = ((Dense... | /**
* res = A * B if operator is ' ',</br>
* res = A<sup>T</sup> * B if operator is 'T'.
*
* @param res
* @param A
* @param operator a {@code char} variable: 'T' or ' '
* @param B
*/ | res = A * B if operator is ' ', res = AT * B if operator is 'T' | mtimes | {
"repo_name": "MingjieQian/LAML",
"path": "src/ml/utils/InPlaceOperator.java",
"license": "apache-2.0",
"size": 114698
} | [
"la.matrix.DenseMatrix",
"la.matrix.Matrix",
"la.matrix.SparseMatrix"
] | import la.matrix.DenseMatrix; import la.matrix.Matrix; import la.matrix.SparseMatrix; | import la.matrix.*; | [
"la.matrix"
] | la.matrix; | 2,231,028 |
val username = request.getParameter("username");
val password = request.getParameter("password");
val entityId = request.getParameter(SamlProtocolConstants.PARAMETER_ENTITY_ID);
try {
val selectedService = this.serviceFactory.createService(entityId);
val registeredServic... | val username = request.getParameter(STR); val password = request.getParameter(STR); val entityId = request.getParameter(SamlProtocolConstants.PARAMETER_ENTITY_ID); try { val selectedService = this.serviceFactory.createService(entityId); val registeredService = this.servicesManager.findServiceBy(selectedService, SamlReg... | /**
* Produce response entity.
*
* @param request the request
* @param response the response
* @return the response entity
*/ | Produce response entity | produce | {
"repo_name": "leleuj/cas",
"path": "support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/sso/SSOSamlPostProfileHandlerEndpoint.java",
"license": "apache-2.0",
"size": 8302
} | [
"java.util.Map",
"java.util.Objects",
"org.apereo.cas.services.RegisteredServiceAccessStrategyUtils",
"org.apereo.cas.support.saml.SamlProtocolConstants",
"org.apereo.cas.support.saml.SamlUtils",
"org.apereo.cas.support.saml.services.SamlRegisteredService",
"org.apereo.cas.support.saml.services.idp.meta... | import java.util.Map; import java.util.Objects; import org.apereo.cas.services.RegisteredServiceAccessStrategyUtils; import org.apereo.cas.support.saml.SamlProtocolConstants; import org.apereo.cas.support.saml.SamlUtils; import org.apereo.cas.support.saml.services.SamlRegisteredService; import org.apereo.cas.support.sa... | import java.util.*; import org.apereo.cas.services.*; import org.apereo.cas.support.saml.*; import org.apereo.cas.support.saml.services.*; import org.apereo.cas.support.saml.services.idp.metadata.*; import org.opensaml.messaging.context.*; import org.opensaml.saml.common.xml.*; import org.opensaml.saml.saml2.core.impl.... | [
"java.util",
"org.apereo.cas",
"org.opensaml.messaging",
"org.opensaml.saml",
"org.springframework.http"
] | java.util; org.apereo.cas; org.opensaml.messaging; org.opensaml.saml; org.springframework.http; | 157,722 |
//-----------------------------------------------------------------------
private Function1D<Double, Double> getDerivative() {
return _derivative;
} | Function1D<Double, Double> function() { return _derivative; } | /**
* Gets the first derivative function.
* @return the value of the property, not null
*/ | Gets the first derivative function | getDerivative | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/math/curve/FunctionalDoublesCurve.java",
"license": "apache-2.0",
"size": 14954
} | [
"com.opengamma.analytics.math.function.Function1D"
] | import com.opengamma.analytics.math.function.Function1D; | import com.opengamma.analytics.math.function.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,262,243 |
public static void startWaveFilterForResult(final Activity activity, WaveDrawable waveDrawable, final Intent intent, final int requestCode, int backgroundColor) {
intent.putExtra(IntentKey.BACKGROUND_COLOR, backgroundColor);
startWaveFilterForResult(activity, waveDrawable, intent, requestCode);
... | static void function(final Activity activity, WaveDrawable waveDrawable, final Intent intent, final int requestCode, int backgroundColor) { intent.putExtra(IntentKey.BACKGROUND_COLOR, backgroundColor); startWaveFilterForResult(activity, waveDrawable, intent, requestCode); } | /**
* Start an activity for result with wave effect.
* @param activity
* @param waveDrawable
* @param intent
* @param requestCode
* @param backgroundColor
*/ | Start an activity for result with wave effect | startWaveFilterForResult | {
"repo_name": "wangjiegulu/WaveCompat",
"path": "library/src/main/java/com/wangjie/wavecompat/WaveCompat.java",
"license": "apache-2.0",
"size": 7173
} | [
"android.app.Activity",
"android.content.Intent"
] | import android.app.Activity; import android.content.Intent; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 978,096 |
@SuppressWarnings("static-method")
private void initialize ()
{
// start Maxima
Maxima.getInstance ();
} | @SuppressWarnings(STR) void function () { Maxima.getInstance (); } | /**
* Initializes the Patus driver.
*/ | Initializes the Patus driver | initialize | {
"repo_name": "intersense/patus-gw",
"path": "src/ch/unibas/cs/hpwc/patus/CodeGeneratorMain.java",
"license": "lgpl-2.1",
"size": 7477
} | [
"ch.unibas.cs.hpwc.patus.symbolic.Maxima"
] | import ch.unibas.cs.hpwc.patus.symbolic.Maxima; | import ch.unibas.cs.hpwc.patus.symbolic.*; | [
"ch.unibas.cs"
] | ch.unibas.cs; | 755,545 |
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd); | boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd); | /**
* Deletes a disk offering
*
* @param cmd
* - the command specifying disk offering id
* @return true or false
* @throws
*/ | Deletes a disk offering | deleteDiskOffering | {
"repo_name": "GabrielBrascher/cloudstack",
"path": "api/src/main/java/com/cloud/configuration/ConfigurationService.java",
"license": "apache-2.0",
"size": 11386
} | [
"org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd"
] | import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd; | import org.apache.cloudstack.api.command.admin.offering.*; | [
"org.apache.cloudstack"
] | org.apache.cloudstack; | 73,297 |
public Iterable<String> getCollectionParams(Interface service) {
TreeSet<String> params = new TreeSet<>();
for (CollectionConfig config :
getApiConfig().getInterfaceConfig(service).getCollectionConfigs()) {
for (String param : config.getNameTemplate().vars()) {
params.add(param);
}... | Iterable<String> function(Interface service) { TreeSet<String> params = new TreeSet<>(); for (CollectionConfig config : getApiConfig().getInterfaceConfig(service).getCollectionConfigs()) { for (String param : config.getNameTemplate().vars()) { params.add(param); } } return params; } | /**
* Returns the unique list of path component variable names in the path template.
*/ | Returns the unique list of path component variable names in the path template | getCollectionParams | {
"repo_name": "tcoffee-google/toolkit",
"path": "src/main/java/com/google/api/codegen/go/GoGapicContext.java",
"license": "apache-2.0",
"size": 18182
} | [
"com.google.api.codegen.CollectionConfig",
"com.google.api.tools.framework.model.Interface",
"java.util.TreeSet"
] | import com.google.api.codegen.CollectionConfig; import com.google.api.tools.framework.model.Interface; import java.util.TreeSet; | import com.google.api.codegen.*; import com.google.api.tools.framework.model.*; import java.util.*; | [
"com.google.api",
"java.util"
] | com.google.api; java.util; | 631,898 |
private void writeTable() throws IOException {
final String columnSeparator = this.columnSeparator;
final Cell[] currentLine = new Cell[maximalColumnWidths.length];
final int cellCount = cells.size();
for (int cellIndex=0; cellIndex<cellCount; cellIndex++) {
... | void function() throws IOException { final String columnSeparator = this.columnSeparator; final Cell[] currentLine = new Cell[maximalColumnWidths.length]; final int cellCount = cells.size(); for (int cellIndex=0; cellIndex<cellCount; cellIndex++) { Cell lineFill = null; int currentCount = 0; do { final Cell cell = cell... | /**
* Writes the table without clearing the {@code TableAppender} content.
* Invoking this method many time would result in the same table being
* repeated.
*/ | Writes the table without clearing the TableAppender content. Invoking this method many time would result in the same table being repeated | writeTable | {
"repo_name": "apache/sis",
"path": "core/sis-utility/src/main/java/org/apache/sis/io/TableAppender.java",
"license": "apache-2.0",
"size": 36351
} | [
"java.io.IOException",
"java.util.Arrays"
] | import java.io.IOException; import java.util.Arrays; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,735,319 |
public int getRemain() throws IOException {
checkEOF();
return remain;
} | int function() throws IOException { checkEOF(); return remain; } | /**
* How many bytes remain in the current chunk?
*
* @return remaining bytes left in the current chunk.
* @throws java.io.IOException
*/ | How many bytes remain in the current chunk | getRemain | {
"repo_name": "kaituo/sedge",
"path": "trunk/contrib/zebra/src/java/org/apache/hadoop/zebra/tfile/Chunk.java",
"license": "mit",
"size": 10963
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 169,780 |
public KcPerson getKcPerson() {
return kcPerson;
} | KcPerson function() { return kcPerson; } | /**.
* This is the Getter Method for kcPerson
* @return Returns the kcPerson.
*/ | . This is the Getter Method for kcPerson | getKcPerson | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/subaward/bo/SubAward.java",
"license": "apache-2.0",
"size": 44135
} | [
"org.kuali.coeus.common.framework.person.KcPerson"
] | import org.kuali.coeus.common.framework.person.KcPerson; | import org.kuali.coeus.common.framework.person.*; | [
"org.kuali.coeus"
] | org.kuali.coeus; | 2,781,000 |
Map<String, Integer> map = new HashMap<>();
for (String word : words) {
map.put(word, map.getOrDefault(word, 0) + 1);
}
SortedSet<Map.Entry<String, Integer>> sortedset = new TreeSet<>(
(e1, e2) -> {
if (e1.getValue() != e2.... | Map<String, Integer> map = new HashMap<>(); for (String word : words) { map.put(word, map.getOrDefault(word, 0) + 1); } SortedSet<Map.Entry<String, Integer>> sortedset = new TreeSet<>( (e1, e2) -> { if (e1.getValue() != e2.getValue()) { return e2.getValue() - e1.getValue(); } else { return e1.getKey().compareToIgnoreCa... | /**
* O(n) extra space
* O(nlogk) time
* */ | O(n) extra space O(nlogk) time | topKFrequent | {
"repo_name": "cy19890513/Leetcode-1",
"path": "src/main/java/com/fishercoder/solutions/_692.java",
"license": "apache-2.0",
"size": 2399
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"java.util.SortedSet",
"java.util.TreeSet"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,607,600 |
public IPath getResult() {
return result;
} | IPath function() { return result; } | /**
* Returns the full path entered by the user.
* <p>
* Note that the file and container might not exist and would need to be created.
* See the <code>IFile.create</code> method and the
* <code>ContainerGenerator</code> class.
* </p>
*
* @return the path, or <code>null</code> i... | Returns the full path entered by the user. Note that the file and container might not exist and would need to be created. See the <code>IFile.create</code> method and the <code>ContainerGenerator</code> class. | getResult | {
"repo_name": "roboidstudio/embedded",
"path": "org.roboid.studio.timeline/src/org/roboid/studio/timeline/SaveAsDialog.java",
"license": "lgpl-2.1",
"size": 13122
} | [
"org.eclipse.core.runtime.IPath"
] | import org.eclipse.core.runtime.IPath; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,088,220 |
MutableBoundedValue<Short> remainingDelay(); | MutableBoundedValue<Short> remainingDelay(); | /**
* Gets the {@link MutableBoundedValue} for the remaining delay before
* a new attempt at spawning an {@link Entity} is made.
*
* @return The immutable bounded value for the remaining delay
*/ | Gets the <code>MutableBoundedValue</code> for the remaining delay before a new attempt at spawning an <code>Entity</code> is made | remainingDelay | {
"repo_name": "ryantheleach/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/data/manipulator/mutable/MobSpawnerData.java",
"license": "mit",
"size": 6672
} | [
"org.spongepowered.api.data.value.mutable.MutableBoundedValue"
] | import org.spongepowered.api.data.value.mutable.MutableBoundedValue; | import org.spongepowered.api.data.value.mutable.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 2,019,027 |
public static PDStructureNode create(COSDictionary node)
{
String type = node.getNameAsString(COSName.TYPE);
if ("StructTreeRoot".equals(type))
{
return new PDStructureTreeRoot(node);
}
if ((type == null) || "StructElem".equals(type))
{
ret... | static PDStructureNode function(COSDictionary node) { String type = node.getNameAsString(COSName.TYPE); if (STR.equals(type)) { return new PDStructureTreeRoot(node); } if ((type == null) STR.equals(type)) { return new PDStructureElement(node); } throw new IllegalArgumentException(STR); } private COSDictionary dictionar... | /**
* Creates a node in the structure tree. Can be either a structure tree root,
* or a structure element.
*
* @param node the node dictionary
* @return the structure node
*/ | Creates a node in the structure tree. Can be either a structure tree root, or a structure element | create | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/documentinterchange/logicalstructure/PDStructureNode.java",
"license": "lgpl-2.1",
"size": 12423
} | [
"org.apache.pdfbox.cos.COSDictionary",
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 1,186,958 |
private void addAssign(Node assign, List<Call> calls)
{
if (assign.getChildCount() < 2) {
return;
}
if (assign.getLastChild().getType() == Token.NAME) {
addCall(assign.getLastChild().getString(), assign, call... | void function(Node assign, List<Call> calls) { if (assign.getChildCount() < 2) { return; } if (assign.getLastChild().getType() == Token.NAME) { addCall(assign.getLastChild().getString(), assign, calls); } else if (assign.getFirstChild().getType() == Token.GETELEM && assign.getLastChild().getLastChild() != null && assig... | /**
* Add an assignment call to the specified list of calls or increment the count if
* that assignment is already there..
*
* @param assign the assignment node to add
* @param calls the list of calls to add this assignment to
*/ | Add an assignment call to the specified list of calls or increment the count if that assignment is already there. | addAssign | {
"repo_name": "zgrossbart/forbiddenfunctions",
"path": "src/main/java/com/grossbart/forbiddenfunction/ForbiddenFunction.java",
"license": "apache-2.0",
"size": 22393
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token",
"java.util.List"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; import java.util.List; | import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 1,381,418 |
public void run() {
try {
jc = (jc == null) ? createJobConf() : createJobConf(jc);
String localPath = System.getProperty("test.build.data",
"build/test/mapred/local");
File f = new File(localPath).getAbsoluteFile();
jc.set("mapred.local.dir", f.getAbsolutePath());
... | void function() { try { jc = (jc == null) ? createJobConf() : createJobConf(jc); String localPath = System.getProperty(STR, STR); File f = new File(localPath).getAbsoluteFile(); jc.set(STR, f.getAbsolutePath()); jc.setClass(STR, StaticMapping.class, DNSToSwitchMapping.class); final String id = new SimpleDateFormat(STR)... | /**
* Create the job tracker and run it.
*/ | Create the job tracker and run it | run | {
"repo_name": "karahiyo/hanoi-hadoop-2.0.0-cdh",
"path": "src/test/org/apache/hadoop/mapred/MiniMRCluster.java",
"license": "apache-2.0",
"size": 23050
} | [
"java.io.File",
"java.text.SimpleDateFormat",
"java.util.Date",
"org.apache.hadoop.net.DNSToSwitchMapping",
"org.apache.hadoop.net.StaticMapping",
"org.apache.hadoop.security.UserGroupInformation"
] | import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.hadoop.net.DNSToSwitchMapping; import org.apache.hadoop.net.StaticMapping; import org.apache.hadoop.security.UserGroupInformation; | import java.io.*; import java.text.*; import java.util.*; import org.apache.hadoop.net.*; import org.apache.hadoop.security.*; | [
"java.io",
"java.text",
"java.util",
"org.apache.hadoop"
] | java.io; java.text; java.util; org.apache.hadoop; | 2,560,898 |
protected void initMimeConfig(XmlParser.Node node) {
String extension = node.getString("extension", false, true);
if (extension != null && extension.startsWith("."))
extension = extension.substring(1);
String mimeType = node.getString("mime-type", false, true);
getWebApplicationContext().setMimeMapping(... | void function(XmlParser.Node node) { String extension = node.getString(STR, false, true); if (extension != null && extension.startsWith(".")) extension = extension.substring(1); String mimeType = node.getString(STR, false, true); getWebApplicationContext().setMimeMapping(extension, mimeType); } | /**
* Inits the mime config.
*
* @param node
* the node
*/ | Inits the mime config | initMimeConfig | {
"repo_name": "confluxtoo/finflux_automation_test",
"path": "browsermob-proxy/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/XMLConfiguration.java",
"license": "mpl-2.0",
"size": 27731
} | [
"org.browsermob.proxy.jetty.xml.XmlParser"
] | import org.browsermob.proxy.jetty.xml.XmlParser; | import org.browsermob.proxy.jetty.xml.*; | [
"org.browsermob.proxy"
] | org.browsermob.proxy; | 2,183,634 |
interface BlockIterator {
HFileBlock nextBlock() throws IOException; | interface BlockIterator { HFileBlock nextBlock() throws IOException; | /**
* Get the next block, or null if there are no more blocks to iterate.
*/ | Get the next block, or null if there are no more blocks to iterate | nextBlock | {
"repo_name": "ndimiduk/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java",
"license": "apache-2.0",
"size": 87874
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,216,683 |
private boolean compareNumber (Number valueObj, String value1, String value2)
{
BigDecimal valueObjB = null;
BigDecimal value1B = null;
BigDecimal value2B = null;
try
{
if (valueObj instanceof BigDecimal)
valueObjB = (BigDecimal)valueObj;
else if (valueObj instanceof Integer)
valueObjB = new... | boolean function (Number valueObj, String value1, String value2) { BigDecimal valueObjB = null; BigDecimal value1B = null; BigDecimal value2B = null; try { if (valueObj instanceof BigDecimal) valueObjB = (BigDecimal)valueObj; else if (valueObj instanceof Integer) valueObjB = new BigDecimal (((Integer)valueObj).intValue... | /**
* Compare Number
* @param valueObj comparator
* @param value1 first value
* @param value2 second value
* @return true if operation
*/ | Compare Number | compareNumber | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/compiere/wf/MWFNextCondition.java",
"license": "gpl-2.0",
"size": 8836
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,251,870 |
public Component getTableCellRendererComponent(JTable table, Object color,
boolean isSelected, boolean hasFocus, int row, int column) {
Color newColor = (Color) color;
setBackground(newColor);
//JLabel boton=new JLabel("si");
//boton.setBackground(new Color(10,10,100));
... | Component function(JTable table, Object color, boolean isSelected, boolean hasFocus, int row, int column) { Color newColor = (Color) color; setBackground(newColor); if (isBordered) { if (isSelected) { if (selectedBorder == null) { selectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5, table.getSelectionBackground... | /**
* DOCUMENT ME!
*
* @param table DOCUMENT ME!
* @param color DOCUMENT ME!
* @param isSelected DOCUMENT ME!
* @param hasFocus DOCUMENT ME!
* @param row DOCUMENT ME!
* @param column DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getTableCellRendererComponent | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/gui/utils/ColorRenderer.java",
"license": "gpl-3.0",
"size": 3563
} | [
"java.awt.Color",
"java.awt.Component",
"javax.swing.BorderFactory",
"javax.swing.JTable"
] | import java.awt.Color; import java.awt.Component; import javax.swing.BorderFactory; import javax.swing.JTable; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,268,319 |
public java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.EqualityHLAPI> getSubterm_booleans_EqualityHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.EqualityHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.booleans.hlapi.EqualityHLAPI>();
for (Term elemnt : getSubterm()) {
if(elemnt.g... | java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.EqualityHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.booleans.hlapi.EqualityHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.booleans.hlapi.EqualityHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.boolean... | /**
* This accessor return a list of encapsulated subelement, only of EqualityHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of EqualityHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_booleans_EqualityHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/EmptyListHLAPI.java",
"license": "epl-1.0",
"size": 113924
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 5,431 |
void recordRead(RecordReader reader, Object record); | void recordRead(RecordReader reader, Object record); | /**
* Event listener for each record to be read.
* @param reader the record reader
* @param record in raw format (Collection, File, String, Writable, etc)
*/ | Event listener for each record to be read | recordRead | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "datavec/datavec-api/src/main/java/org/datavec/api/records/listener/RecordListener.java",
"license": "apache-2.0",
"size": 1734
} | [
"org.datavec.api.records.reader.RecordReader"
] | import org.datavec.api.records.reader.RecordReader; | import org.datavec.api.records.reader.*; | [
"org.datavec.api"
] | org.datavec.api; | 2,665,119 |
public List<String> getContainedCollectionNames() {
return containedCollectionNames;
}
| List<String> function() { return containedCollectionNames; } | /**
* Gets the containedCollectionNames attribute.
* @return Returns the containedCollectionNames.
*/ | Gets the containedCollectionNames attribute | getContainedCollectionNames | {
"repo_name": "bhutchinson/rice",
"path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/web/ui/Section.java",
"license": "apache-2.0",
"size": 7045
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,897,361 |
public Iterator<String> getExpressionTokenizer() {
return new Tokenizer(this.expression);
}
| Iterator<String> function() { return new Tokenizer(this.expression); } | /**
* Get an iterator for this expression, allows iterating over an expression
* token by token.
*
* @return A new iterator instance for this expression.
*/ | Get an iterator for this expression, allows iterating over an expression token by token | getExpressionTokenizer | {
"repo_name": "squeek502/EvalEx",
"path": "src/com/udojava/evalex/Expression.java",
"license": "mit",
"size": 34001
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,122,036 |
@Override
protected boolean valuesEqual(Value v1, Value v2){
//check if real valued or not
AttClass attClass = this.getAttClass(v1.getAttribute());
if(attClass == AttClass.DOUBLE){
Double multP = attributeWiseMultiples.get(v1.attName());
double mult = multP == null ? this.defaultMultiple : multP;
ret... | boolean function(Value v1, Value v2){ AttClass attClass = this.getAttClass(v1.getAttribute()); if(attClass == AttClass.DOUBLE){ Double multP = attributeWiseMultiples.get(v1.attName()); double mult = multP == null ? this.defaultMultiple : multP; return intMultiples(mult, v1.getRealVal()) == intMultiples(mult, v2.getReal... | /**
* Returns whether two values are equal. If the values are real-valued, they are discretized before
* comparison.
* @param v1 the first value to compare
* @param v2 the second value to compare
* @return true if v1 = v2 after accounting for discretization; false otherwise.
*/ | Returns whether two values are equal. If the values are real-valued, they are discretized before comparison | valuesEqual | {
"repo_name": "PowChow/MarkovDecisionProcesses-ML4",
"path": "src/burlap/oomdp/statehashing/DiscretizingMaskedHashableStateFactory.java",
"license": "lgpl-3.0",
"size": 8144
} | [
"burlap.oomdp.core.values.Value"
] | import burlap.oomdp.core.values.Value; | import burlap.oomdp.core.values.*; | [
"burlap.oomdp.core"
] | burlap.oomdp.core; | 278,822 |
protected void processSubjectDNKeyName(KeyInfo keyInfo, java.security.cert.X509Certificate cert) {
if (options.emitSubjectDNAsKeyName) {
String subjectNameValue = getSubjectName(cert);
if (! DatatypeHelper.isEmpty(subjectNameValue)) {
KeyInfoHelper.... | void function(KeyInfo keyInfo, java.security.cert.X509Certificate cert) { if (options.emitSubjectDNAsKeyName) { String subjectNameValue = getSubjectName(cert); if (! DatatypeHelper.isEmpty(subjectNameValue)) { KeyInfoHelper.addKeyName(keyInfo, subjectNameValue); } } } | /**
* Process the options related to generation of KeyName elements based on the certificate's
* subject DN value.
*
* @param keyInfo the KeyInfo element being processed.
* @param cert the certificate being processed
*/ | Process the options related to generation of KeyName elements based on the certificate's subject DN value | processSubjectDNKeyName | {
"repo_name": "Safewhere/kombit-service-java",
"path": "XmlTooling/src/org/opensaml/xml/security/x509/X509KeyInfoGeneratorFactory.java",
"license": "mit",
"size": 31297
} | [
"org.opensaml.xml.security.keyinfo.KeyInfoHelper",
"org.opensaml.xml.signature.KeyInfo",
"org.opensaml.xml.signature.X509Certificate",
"org.opensaml.xml.util.DatatypeHelper"
] | import org.opensaml.xml.security.keyinfo.KeyInfoHelper; import org.opensaml.xml.signature.KeyInfo; import org.opensaml.xml.signature.X509Certificate; import org.opensaml.xml.util.DatatypeHelper; | import org.opensaml.xml.security.keyinfo.*; import org.opensaml.xml.signature.*; import org.opensaml.xml.util.*; | [
"org.opensaml.xml"
] | org.opensaml.xml; | 2,121,213 |
public Enumeration getAttributeNames() {
return this.request.getAttributeNames();
}
| Enumeration function() { return this.request.getAttributeNames(); } | /**
* The default behavior of this method is to return getAttributeNames()
* on the wrapped request object.
*/ | The default behavior of this method is to return getAttributeNames() on the wrapped request object | getAttributeNames | {
"repo_name": "sintrb/SinJavaWebServlet",
"path": "src/javax/servlet/ServletRequestWrapper.java",
"license": "gpl-2.0",
"size": 9245
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,299,411 |
final void setEmptyText(final CharSequence text) {
View v = getView();
if (v != null) {
((TextView) v.findViewById(R.id.emptyText)).setText(text);
}
} | final void setEmptyText(final CharSequence text) { View v = getView(); if (v != null) { ((TextView) v.findViewById(R.id.emptyText)).setText(text); } } | /**
* Only call on the UI thread;
*/ | Only call on the UI thread | setEmptyText | {
"repo_name": "BioHaZard1/cabinet",
"path": "app/src/main/java/com/afollestad/cabinet/fragments/content/ContentFragment.java",
"license": "mit",
"size": 17294
} | [
"android.view.View",
"android.widget.TextView"
] | import android.view.View; import android.widget.TextView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 2,114,903 |
public String verifyEnvInjection(int testpoint) {
String envName = null;
// Assert that none of the injection methods were called
assertEquals(testpoint + (testpoint > 9 ? " --> " : " ---> ") +
"No Injection Methods called : 0 : " + ivInjectCount,
0... | String function(int testpoint) { String envName = null; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivInjectCount, 0, ivInjectCount); ++testpoint; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivString, I_STRING, ivString); ++testpoint; assertEquals(testpoint + (testpoint > 9 ? STR : STR... | /**
* Verify Environment Injection (field or method) occurred properly.
**/ | Verify Environment Injection (field or method) occurred properly | verifyEnvInjection | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.injection_fat/test-applications/EJB3INJSABean.jar/src/com/ibm/ws/ejbcontainer/injection/ann/ejb/SFEnvInjectObjMthdBean.java",
"license": "epl-1.0",
"size": 31743
} | [
"javax.naming.Context",
"javax.naming.InitialContext",
"javax.naming.NameNotFoundException",
"org.junit.Assert"
] | import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NameNotFoundException; import org.junit.Assert; | import javax.naming.*; import org.junit.*; | [
"javax.naming",
"org.junit"
] | javax.naming; org.junit; | 1,161,074 |
public Map<String, Map<String, PluginEntry>> getAllCategories() {
return categories;
} | Map<String, Map<String, PluginEntry>> function() { return categories; } | /**
* Returns all categories of plugins in this cache.
*
* @return all categories of plugins in this cache.
* @since 2.1
*/ | Returns all categories of plugins in this cache | getAllCategories | {
"repo_name": "dotCMS/log4j",
"path": "log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/processor/PluginCache.java",
"license": "apache-2.0",
"size": 5412
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,949,812 |
@Override
public void invokeAction(int action) {
//some actions have a different scope (not in selected range / out of selected range)
switch (action) {
case ST.LINE_START:
if (handleLineStartAction.execute(getDocument(), getCaretOffset(), getC... | void function(int action) { switch (action) { case ST.LINE_START: if (handleLineStartAction.execute(getDocument(), getCaretOffset(), getCommandLineOffset(), ScriptConsoleViewer.this)) { return; } else { super.invokeAction(action); } } if (isSelectedRangeEditable()) { try { int historyChange = 0; switch (action) { case ... | /**
* Execute some action.
*/ | Execute some action | invokeAction | {
"repo_name": "bobwalker99/Pydev",
"path": "plugins/org.python.pydev.shared_interactive_console/src/org/python/pydev/shared_interactive_console/console/ui/internal/ScriptConsoleViewer.java",
"license": "epl-1.0",
"size": 36016
} | [
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.ITextSelection",
"org.python.pydev.shared_core.log.Log"
] | import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.ITextSelection; import org.python.pydev.shared_core.log.Log; | import org.eclipse.jface.text.*; import org.python.pydev.shared_core.log.*; | [
"org.eclipse.jface",
"org.python.pydev"
] | org.eclipse.jface; org.python.pydev; | 184,543 |
private void testCallbackSynchronizationTimingStandby(AdminService as,
ActiveStandbyElectorBasedElectorService ees)
throws IOException, InterruptedException, TimeoutException {
synchronized (ees.zkDisconnectLock) {
// Sleep while holding the lock so that the timer thread can't do
// anythi... | void function(AdminService as, ActiveStandbyElectorBasedElectorService ees) throws IOException, InterruptedException, TimeoutException { synchronized (ees.zkDisconnectLock) { Thread.sleep(100); ees.becomeStandby(); } Thread.sleep(50); GenericTestUtils.waitFor( () -> transitionToStandbyCounter.get() >= 1, 500, 10 * 1000... | /**
* Helper method to test that neutral mode does not race with an active
* transition.
*
* @param as the admin service
* @param ees the embedded elector service
* @throws IOException if there's an issue transitioning
* @throws InterruptedException if interrupted
* @throws TimeoutException if w... | Helper method to test that neutral mode does not race with an active transition | testCallbackSynchronizationTimingStandby | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMEmbeddedElector.java",
"license": "apache-2.0",
"size": 12099
} | [
"java.io.IOException",
"java.util.concurrent.TimeoutException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.test.GenericTestUtils",
"org.mockito.Mockito"
] | import java.io.IOException; import java.util.concurrent.TimeoutException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.test.GenericTestUtils; import org.mockito.Mockito; | import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.test.*; import org.mockito.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.mockito"
] | java.io; java.util; org.apache.hadoop; org.mockito; | 639,963 |
public void parseBlockStatements(ConstructorDeclaration cd, CompilationUnitDeclaration unit) {
//only parse the method body of cd
//fill out its statements
//convert bugs into parse error
initialize();
// set the lastModifiers to reflect the modifiers of the constructor whose
// block statements are being parse... | void function(ConstructorDeclaration cd, CompilationUnitDeclaration unit) { initialize(); this.lastModifiers = cd.modifiers; this.lastModifiersStart = cd.modifiersSourceStart; goForBlockStatementsopt(); this.referenceContext = cd; this.compilationUnit = unit; this.scanner.resetTo(cd.bodyStart, bodyEnd(cd)); consumeNest... | /**
* Parse the block statements inside the given constructor declaration and try to complete at the
* cursor location.
*/ | Parse the block statements inside the given constructor declaration and try to complete at the cursor location | parseBlockStatements | {
"repo_name": "maxeler/eclipse",
"path": "eclipse.jdt.core/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java",
"license": "epl-1.0",
"size": 71875
} | [
"org.eclipse.jdt.internal.compiler.ast.ASTNode",
"org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration",
"org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration",
"org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall",
"org.eclipse.jdt.internal.compiler.ast.Statement",
"org.ecli... | import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration; import org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall; import org.eclipse.jdt.internal.compiler.ast.Statement... | import org.eclipse.jdt.internal.compiler.ast.*; import org.eclipse.jdt.internal.compiler.problem.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,907,157 |
private void collectQualifyingTypeArguments(java.util.List<TypeParameter> qualifyingTypeParameters,
Map<TypeParameter, Type> qualifyingTypeArguments,
java.util.List<Reference> qualifyingTypes) {
// make sure we only add type parameters with the same name once, as duplicates are era... | void function(java.util.List<TypeParameter> qualifyingTypeParameters, Map<TypeParameter, Type> qualifyingTypeArguments, java.util.List<Reference> qualifyingTypes) { Set<String> names = new HashSet<String>(); for (int i = qualifyingTypes.size()-1 ; i >= 0 ; i--) { Reference qualifiedType = qualifyingTypes.get(i); Map<Ty... | /**
* Collects all the type parameters and arguments required for an interface that's been pulled up to the
* toplevel, including its containing type and method type parameters.
*/ | Collects all the type parameters and arguments required for an interface that's been pulled up to the toplevel, including its containing type and method type parameters | collectQualifyingTypeArguments | {
"repo_name": "ceylon/ceylon",
"path": "compiler-java/src/org/eclipse/ceylon/compiler/java/codegen/AbstractTransformer.java",
"license": "apache-2.0",
"size": 290110
} | [
"java.util.HashSet",
"java.util.LinkedList",
"java.util.Map",
"java.util.Set",
"org.eclipse.ceylon.langtools.tools.javac.util.List",
"org.eclipse.ceylon.model.typechecker.model.ClassOrInterface",
"org.eclipse.ceylon.model.typechecker.model.Declaration",
"org.eclipse.ceylon.model.typechecker.model.Func... | import java.util.HashSet; import java.util.LinkedList; import java.util.Map; import java.util.Set; import org.eclipse.ceylon.langtools.tools.javac.util.List; import org.eclipse.ceylon.model.typechecker.model.ClassOrInterface; import org.eclipse.ceylon.model.typechecker.model.Declaration; import org.eclipse.ceylon.model... | import java.util.*; import org.eclipse.ceylon.langtools.tools.javac.util.*; import org.eclipse.ceylon.model.typechecker.model.*; | [
"java.util",
"org.eclipse.ceylon"
] | java.util; org.eclipse.ceylon; | 1,372,750 |
public static Ipv6Prefix prefixForByteBuf(final ByteBuf bytes) {
final int prefixLength = bytes.readByte();
final int size = prefixLength / Byte.SIZE + ((prefixLength % Byte.SIZE == 0) ? 0 : 1);
Preconditions.checkArgument(size <= bytes.readableBytes(), "Illegal length of IP prefix: " + (byt... | static Ipv6Prefix function(final ByteBuf bytes) { final int prefixLength = bytes.readByte(); final int size = prefixLength / Byte.SIZE + ((prefixLength % Byte.SIZE == 0) ? 0 : 1); Preconditions.checkArgument(size <= bytes.readableBytes(), STR + (bytes.readableBytes())); return Ipv6Util.prefixForBytes(ByteArray.readByte... | /**
* Creates an Ipv6Prefix object from given ByteBuf. Prefix length is assumed to
* be in the left most byte of the buffer.
*
* @param bytes IPv6 address
* @return Ipv6Prefix object
*/ | Creates an Ipv6Prefix object from given ByteBuf. Prefix length is assumed to be in the left most byte of the buffer | prefixForByteBuf | {
"repo_name": "inocybe/odl-bgpcep",
"path": "util/src/main/java/org/opendaylight/protocol/util/Ipv6Util.java",
"license": "epl-1.0",
"size": 7016
} | [
"com.google.common.base.Preconditions",
"io.netty.buffer.ByteBuf",
"org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix"
] | import com.google.common.base.Preconditions; import io.netty.buffer.ByteBuf; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv6Prefix; | import com.google.common.base.*; import io.netty.buffer.*; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.*; | [
"com.google.common",
"io.netty.buffer",
"org.opendaylight.yang"
] | com.google.common; io.netty.buffer; org.opendaylight.yang; | 1,910,115 |
public java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.ConcatenationHLAPI> getSubterm_lists_ConcatenationHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.ConcatenationHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.lists.hlapi.ConcatenationHLAPI>();
for (Term elemnt : getSubterm()) {
if(... | java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.ConcatenationHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.lists.hlapi.ConcatenationHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.lists.hlapi.ConcatenationHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.l... | /**
* This accessor return a list of encapsulated subelement, only of ConcatenationHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of ConcatenationHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_lists_ConcatenationHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/EmptyListHLAPI.java",
"license": "epl-1.0",
"size": 113924
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 5,426 |
protected T doSwitch(EClass theEClass, EObject theEObject) {
if (theEClass.eContainer() == modelPackage) {
return doSwitch(theEClass.getClassifierID(), theEObject);
}
else {
List<EClass> eSuperTypes = theEClass.getESuperTypes();
return eSuperTypes.isEmpty() ? defaultCase(... | T function(EClass theEClass, EObject theEObject) { if (theEClass.eContainer() == modelPackage) { return doSwitch(theEClass.getClassifierID(), theEObject); } else { List<EClass> eSuperTypes = theEClass.getESuperTypes(); return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); } ... | /**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/ | Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | doSwitch | {
"repo_name": "sourcepit/maven-dependency-model",
"path": "gen/main/emf/org/sourcepit/maven/dependency/model/util/DependencyModelSwitch.java",
"license": "apache-2.0",
"size": 6899
} | [
"java.util.List",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EObject"
] | import java.util.List; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; | import java.util.*; import org.eclipse.emf.ecore.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 900,900 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.