method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void setRenderingHint(Key hintKey, Object hintValue) {
this.hints.put(hintKey, hintValue);
} | void function(Key hintKey, Object hintValue) { this.hints.put(hintKey, hintValue); } | /**
* Sets the value for a rendering hint. For now, this graphics context
* ignores all hints.
*
* @param hintKey the key (<code>null</code> not permitted).
* @param hintValue the value (must be compatible with the specified key).
*
* @throws IllegalArgumentException if <code>hintV... | Sets the value for a rendering hint. For now, this graphics context ignores all hints | setRenderingHint | {
"repo_name": "int32at/sweaty",
"path": "src/src/at/int32/sweaty/ui/utils/SWTGraphics2D.java",
"license": "mit",
"size": 43576
} | [
"java.awt.RenderingHints"
] | import java.awt.RenderingHints; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,219,547 |
void onMoved(I item, List<ModularItem> adapterList); | void onMoved(I item, List<ModularItem> adapterList); | /**
* Called when item is dragged and dropped.
*
* Might not be the best parameters. If you would like other parameters passed into this method,
* please open an issue on the github page https://github.com/RobbeSneyders/Modular2Recycler.
*
* @param item moved item
* @param adapterList... | Called when item is dragged and dropped. Might not be the best parameters. If you would like other parameters passed into this method, please open an issue on the github page HREF | onMoved | {
"repo_name": "RobbeSneyders/UndoRecycler",
"path": "library/src/main/java/com/cuttingedge/adapter2recycler/Modules/DragAndDropPlugin.java",
"license": "apache-2.0",
"size": 1097
} | [
"com.cuttingedge.adapter2recycler.ModularItem",
"java.util.List"
] | import com.cuttingedge.adapter2recycler.ModularItem; import java.util.List; | import com.cuttingedge.adapter2recycler.*; import java.util.*; | [
"com.cuttingedge.adapter2recycler",
"java.util"
] | com.cuttingedge.adapter2recycler; java.util; | 1,265,415 |
public void printResults() {
System.out.println("[ --- Lucee Debug Response --- ]");
System.out.println();
System.out.println("----------------------------");
System.out.println("| Output |");
System.out.println("----------------------------");
System.out.println(write);
System.out.p... | void function() { System.out.println(STR); System.out.println(); System.out.println(STR); System.out.println(STR); System.out.println(STR); System.out.println(write); System.out.println(); System.out.println(STR); System.out.println(STR); System.out.println(STR); System.out.println(writeDebug); System.out.println(); Sy... | /**
* print out the response
*/ | print out the response | printResults | {
"repo_name": "lucee/Lucee",
"path": "loader/src/main/java/com/allaire/cfx/DebugResponse.java",
"license": "lgpl-2.1",
"size": 4134
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 2,589,043 |
public void applyTest(Test t) {
if (t.isIndependentSimilarity()) {
applyParallelizedTest(t);
return;
}
t.setProgress(0f);
t.setCancelled(false);
float[][] F = new float[subs.length][subs.length];
SimilarityJob job = new SimilarityJob(F, t, 0, subs.length, true);
job.run();
job.end();
} | void function(Test t) { if (t.isIndependentSimilarity()) { applyParallelizedTest(t); return; } t.setProgress(0f); t.setCancelled(false); float[][] F = new float[subs.length][subs.length]; SimilarityJob job = new SimilarityJob(F, t, 0, subs.length, true); job.run(); job.end(); } | /**
* Apply a single test
*/ | Apply a single test | applyTest | {
"repo_name": "manuel-freire/ac2",
"path": "ac-core/src/main/java/es/ucm/fdi/ac/Analysis.java",
"license": "gpl-3.0",
"size": 13877
} | [
"es.ucm.fdi.ac.test.Test"
] | import es.ucm.fdi.ac.test.Test; | import es.ucm.fdi.ac.test.*; | [
"es.ucm.fdi"
] | es.ucm.fdi; | 518,267 |
public double measureAngleDisntance(Point s1, Point e1, Point s2, Point e2) {
int nDimensions = s1.getnDimensions();
// NOTE: the variables m_vector1 and m_vector2 are declared as member
// variables
// construct two vectors representing the cluster component and a line
// segment, respectively
... | double function(Point s1, Point e1, Point s2, Point e2) { int nDimensions = s1.getnDimensions(); for (int i = 0; i < nDimensions; i++) { vector1.setCoordinate(i, e1.getCoordinate(i) - s1.getCoordinate(i)); vector2.setCoordinate(i, e2.getCoordinate(i) - s2.getCoordinate(i)); } double vectorLength1 = VectorUtils.computeV... | /**
* Angle Disntance
*
* @param s1
* @param e1
* @param s2
* @param e2
* @return
*/ | Angle Disntance | measureAngleDisntance | {
"repo_name": "zhujiangang/TrajectoryMiner",
"path": "src/edu/sjtu/trajectoryminer/clustering/traclus/TraClusClustering.java",
"license": "gpl-2.0",
"size": 39451
} | [
"edu.sjtu.trajectoryminer.Point",
"edu.sjtu.trajectoryminer.utils.VectorUtils"
] | import edu.sjtu.trajectoryminer.Point; import edu.sjtu.trajectoryminer.utils.VectorUtils; | import edu.sjtu.trajectoryminer.*; import edu.sjtu.trajectoryminer.utils.*; | [
"edu.sjtu.trajectoryminer"
] | edu.sjtu.trajectoryminer; | 2,768,886 |
@Override
protected void materialize(
final ManagedResourceService resourceService,
final IAllocationContext allocationContext) {
super.materialize(resourceService, allocationContext);
}
}
| void function( final ManagedResourceService resourceService, final IAllocationContext allocationContext) { super.materialize(resourceService, allocationContext); } } | /**
* Overridden to expose to the unit test.
*/ | Overridden to expose to the unit test | materialize | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "bigdata/src/test/com/bigdata/bop/fed/TestNIOChunkMessage.java",
"license": "gpl-2.0",
"size": 9539
} | [
"com.bigdata.io.DirectBufferPoolAllocator",
"com.bigdata.service.ManagedResourceService"
] | import com.bigdata.io.DirectBufferPoolAllocator; import com.bigdata.service.ManagedResourceService; | import com.bigdata.io.*; import com.bigdata.service.*; | [
"com.bigdata.io",
"com.bigdata.service"
] | com.bigdata.io; com.bigdata.service; | 1,239,226 |
public void testCompute4() {
ConcurrentMap map = map5();
map.compute(one, (x, y) -> null);
assertFalse(map.containsKey(one));
} | void function() { ConcurrentMap map = map5(); map.compute(one, (x, y) -> null); assertFalse(map.containsKey(one)); } | /**
* compute removes when the given key is present and function returns null
*/ | compute removes when the given key is present and function returns null | testCompute4 | {
"repo_name": "tasomaniac/caffeine",
"path": "guava/src/test/java/jsr166/ConcurrentHashMap8Test.java",
"license": "apache-2.0",
"size": 15842
} | [
"java.util.concurrent.ConcurrentMap"
] | import java.util.concurrent.ConcurrentMap; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,150,810 |
int segmentCount = 10;
int operationCountPerType = 5;
// Add to MTL + Add to ReadIndex (append; beginMerge).
InMemoryLog opLog = new InMemoryLog();
val readIndex = mock(ReadIndex.class);
val triggerSegmentIds = new ArrayList<Long>();
doAnswer(x -> {
triggerS... | int segmentCount = 10; int operationCountPerType = 5; InMemoryLog opLog = new InMemoryLog(); val readIndex = mock(ReadIndex.class); val triggerSegmentIds = new ArrayList<Long>(); doAnswer(x -> { triggerSegmentIds.clear(); triggerSegmentIds.addAll(x.getArgument(0)); return null; }).when(readIndex).triggerFutureReads(any... | /**
* Tests the functionality of the process() method.
*/ | Tests the functionality of the process() method | testProcess | {
"repo_name": "pravega/pravega",
"path": "segmentstore/server/src/test/java/io/pravega/segmentstore/server/logs/MemoryStateUpdaterTests.java",
"license": "apache-2.0",
"size": 11772
} | [
"io.pravega.segmentstore.server.DataCorruptionException",
"io.pravega.segmentstore.server.ReadIndex",
"io.pravega.segmentstore.server.SegmentOperation",
"io.pravega.segmentstore.server.logs.operations.CachedStreamSegmentAppendOperation",
"io.pravega.segmentstore.server.logs.operations.MergeSegmentOperation"... | import io.pravega.segmentstore.server.DataCorruptionException; import io.pravega.segmentstore.server.ReadIndex; import io.pravega.segmentstore.server.SegmentOperation; import io.pravega.segmentstore.server.logs.operations.CachedStreamSegmentAppendOperation; import io.pravega.segmentstore.server.logs.operations.MergeSeg... | import io.pravega.segmentstore.server.*; import io.pravega.segmentstore.server.logs.operations.*; import io.pravega.test.common.*; import java.util.*; import java.util.stream.*; import org.junit.*; import org.mockito.*; import org.mockito.invocation.*; | [
"io.pravega.segmentstore",
"io.pravega.test",
"java.util",
"org.junit",
"org.mockito",
"org.mockito.invocation"
] | io.pravega.segmentstore; io.pravega.test; java.util; org.junit; org.mockito; org.mockito.invocation; | 682,791 |
public void send(Message message);
| void function(Message message); | /**
* Sends a network message to the session's client.
* @param message The message to send.
*/ | Sends a network message to the session's client | send | {
"repo_name": "good2000mo/OpenClassicAPI",
"path": "src/main/java/ch/spacebase/openclassic/api/player/Session.java",
"license": "mit",
"size": 1074
} | [
"ch.spacebase.openclassic.api.network.msg.Message"
] | import ch.spacebase.openclassic.api.network.msg.Message; | import ch.spacebase.openclassic.api.network.msg.*; | [
"ch.spacebase.openclassic"
] | ch.spacebase.openclassic; | 210,499 |
return new FromEndOfWindow();
}
public static class AfterWatermarkEarlyAndLate extends Trigger {
private final OnceTrigger earlyTrigger;
@Nullable
private final OnceTrigger lateTrigger; | return new FromEndOfWindow(); } public static class AfterWatermarkEarlyAndLate extends Trigger { private final OnceTrigger earlyTrigger; private final OnceTrigger lateTrigger; | /**
* Creates a trigger that fires when the watermark passes the end of the window.
*/ | Creates a trigger that fires when the watermark passes the end of the window | pastEndOfWindow | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/AfterWatermark.java",
"license": "apache-2.0",
"size": 7382
} | [
"org.apache.beam.sdk.transforms.windowing.Trigger"
] | import org.apache.beam.sdk.transforms.windowing.Trigger; | import org.apache.beam.sdk.transforms.windowing.*; | [
"org.apache.beam"
] | org.apache.beam; | 519,356 |
@SuppressWarnings("unchecked")
@Override
public List<Cliente> getClientes() {
return hibernateTemplate.find("from Cliente");
}
| @SuppressWarnings(STR) List<Cliente> function() { return hibernateTemplate.find(STR); } | /**
* Get List of clientes from database
*
* @return list of all clientes
*/ | Get List of clientes from database | getClientes | {
"repo_name": "osmaroi/touchBar",
"path": "touchbar/src/es/bootools/touchbar/dao/ClienteDAO.java",
"license": "gpl-3.0",
"size": 2876
} | [
"es.bootools.touchbar.model.Cliente",
"java.util.List"
] | import es.bootools.touchbar.model.Cliente; import java.util.List; | import es.bootools.touchbar.model.*; import java.util.*; | [
"es.bootools.touchbar",
"java.util"
] | es.bootools.touchbar; java.util; | 726,929 |
if (obj == null) {
return;
}
if (obj instanceof Spatial) {
Spatial node = (Spatial) obj;
for (int i = 0; i < node.getNumControls(); i++) {
if (node.getControl(i) instanceof PhysicsControl) {
space.add(((PhysicsControl) node.getContr... | if (obj == null) { return; } if (obj instanceof Spatial) { Spatial node = (Spatial) obj; for (int i = 0; i < node.getNumControls(); i++) { if (node.getControl(i) instanceof PhysicsControl) { space.add(((PhysicsControl) node.getControl(i))); } } } else { space.add(obj); } } | /**
* adds an object to the physics space
*
* @param obj the PhysicsControl or Spatial with PhysicsControl to add
*/ | adds an object to the physics space | add | {
"repo_name": "TripleSnail/Arkhados",
"path": "src/arkhados/util/PhysicsWorkaround.java",
"license": "gpl-3.0",
"size": 5928
} | [
"com.jme3.bullet.control.PhysicsControl",
"com.jme3.scene.Spatial"
] | import com.jme3.bullet.control.PhysicsControl; import com.jme3.scene.Spatial; | import com.jme3.bullet.control.*; import com.jme3.scene.*; | [
"com.jme3.bullet",
"com.jme3.scene"
] | com.jme3.bullet; com.jme3.scene; | 2,060,477 |
public ServiceCall<Void> putUuidValidAsync(List<UUID> arrayBody, final ServiceCallback<Void> serviceCallback) {
if (arrayBody == null) {
throw new IllegalArgumentException("Parameter arrayBody is required and cannot be null.");
} | ServiceCall<Void> function(List<UUID> arrayBody, final ServiceCallback<Void> serviceCallback) { if (arrayBody == null) { throw new IllegalArgumentException(STR); } | /**
* Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205'].
*
* @param arrayBody the List<UUID> value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @retur... | Set array value ['6dcc7237-45fe-45c4-8a6b-3a8a3f625652', 'd1399005-30f7-40d6-8da6-dd7c89ad34db', 'f42f6aa1-a5bc-4ddf-907e-5f915de43205'] | putUuidValidAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/implementation/ArraysImpl.java",
"license": "mit",
"size": 176923
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.List"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,859,530 |
@Nullable
public static String stripHtml(@Nullable final String html) {
return containsHtml(html) ? trimSpanned(HtmlCompat.fromHtml(html, HtmlCompat.FROM_HTML_MODE_LEGACY)).toString() : html;
} | static String function(@Nullable final String html) { return containsHtml(html) ? trimSpanned(HtmlCompat.fromHtml(html, HtmlCompat.FROM_HTML_MODE_LEGACY)).toString() : html; } | /**
* Convert a potentially HTML string into a plain-text one. If the string does not contain HTML markup,
* it is returned unchanged.
*
* @param html a string containing either HTML or plain text
* @return a string without any HTML markup
*/ | Convert a potentially HTML string into a plain-text one. If the string does not contain HTML markup, it is returned unchanged | stripHtml | {
"repo_name": "rsudev/c-geo-opensource",
"path": "main/src/cgeo/geocaching/utils/TextUtils.java",
"license": "apache-2.0",
"size": 22213
} | [
"androidx.annotation.Nullable",
"androidx.core.text.HtmlCompat"
] | import androidx.annotation.Nullable; import androidx.core.text.HtmlCompat; | import androidx.annotation.*; import androidx.core.text.*; | [
"androidx.annotation",
"androidx.core"
] | androidx.annotation; androidx.core; | 1,311,567 |
public static Set<ApiMetricName> getByLogicalTable(TestLogicalTableName logicalTable) {
switch (logicalTable) {
case PETS:
return Utils.asLinkedHashSet(A_ROW_NUM, A_LIMBS, A_DAY_AVG_LIMBS);
case SHAPES:
return Utils.asLinkedHashSet(
... | static Set<ApiMetricName> function(TestLogicalTableName logicalTable) { switch (logicalTable) { case PETS: return Utils.asLinkedHashSet(A_ROW_NUM, A_LIMBS, A_DAY_AVG_LIMBS); case SHAPES: return Utils.asLinkedHashSet( A_HEIGHT, A_WIDTH, A_DEPTH, A_AREA, A_VOLUME, A_USERS, A_OTHER_USERS, A_DAY_AVG_USERS, A_DAY_AVG_OTHER_... | /**
* Get the Metric Names by the logical table they should be present in.
*
* @param logicalTable Logical table for which to get the MetricNames
*
* @return the metric names for that logical table
*/ | Get the Metric Names by the logical table they should be present in | getByLogicalTable | {
"repo_name": "yahoo/fili",
"path": "fili-core/src/test/java/com/yahoo/bard/webservice/data/config/names/TestApiMetricName.java",
"license": "apache-2.0",
"size": 4250
} | [
"com.yahoo.bard.webservice.util.Utils",
"java.util.Collections",
"java.util.Set"
] | import com.yahoo.bard.webservice.util.Utils; import java.util.Collections; import java.util.Set; | import com.yahoo.bard.webservice.util.*; import java.util.*; | [
"com.yahoo.bard",
"java.util"
] | com.yahoo.bard; java.util; | 2,684,315 |
public Builder longQuantity(double longQuantity) {
ArgChecker.notNegative(longQuantity, "longQuantity");
this.longQuantity = longQuantity;
return this;
} | Builder function(double longQuantity) { ArgChecker.notNegative(longQuantity, STR); this.longQuantity = longQuantity; return this; } | /**
* Sets the long quantity of the security.
* <p>
* This is the quantity of the underlying security that is held.
* The quantity cannot be negative, as that would imply short selling.
* @param longQuantity the new value
* @return this, for chaining, not null
*/ | Sets the long quantity of the security. This is the quantity of the underlying security that is held. The quantity cannot be negative, as that would imply short selling | longQuantity | {
"repo_name": "OpenGamma/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/etd/EtdOptionPosition.java",
"license": "apache-2.0",
"size": 24965
} | [
"com.opengamma.strata.collect.ArgChecker"
] | import com.opengamma.strata.collect.ArgChecker; | import com.opengamma.strata.collect.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,504,700 |
public String getRichText() {
COSBase rv = field.getDictionaryObject(COSName.RV);
if (rv == null) {
return null;
} else if (rv instanceof COSString) {
return ((COSString) rv).getString();
} else {
return ((COSStream) rv).toTextString();
}
} | String function() { COSBase rv = field.getDictionaryObject(COSName.RV); if (rv == null) { return null; } else if (rv instanceof COSString) { return ((COSString) rv).getString(); } else { return ((COSStream) rv).toTextString(); } } | /**
* This will set the rich text that is associated with this field.
*
* @return The rich text XHTML stream.
*/ | This will set the rich text that is associated with this field | getRichText | {
"repo_name": "gavanx/pdflearn",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFField.java",
"license": "apache-2.0",
"size": 20329
} | [
"org.apache.pdfbox.cos.COSBase",
"org.apache.pdfbox.cos.COSName",
"org.apache.pdfbox.cos.COSStream",
"org.apache.pdfbox.cos.COSString"
] | import org.apache.pdfbox.cos.COSBase; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSStream; import org.apache.pdfbox.cos.COSString; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 652,532 |
private Node.JspAttribute getJspAttribute(TagAttributeInfo tai,
String qName, String uri, String localName, String value,
Class expectedType, Node n, boolean dynamic)
throws JasperException {
Node.JspAttribute result = null;
// XXX Is it ... | Node.JspAttribute function(TagAttributeInfo tai, String qName, String uri, String localName, String value, Class expectedType, Node n, boolean dynamic) throws JasperException { Node.JspAttribute result = null; if (value != null) { if (n.getRoot().isXmlSyntax() && value.startsWith("%=")) { result = new Node.JspAttribute... | /**
* Preprocess attributes that can be expressions. Expression delimiters
* are stripped.
* <p>
* If value is null, checks if there are any NamedAttribute subelements
* in the tree node, and if so, constructs a JspAttribute out of a child
* NamedAttribute node.
... | Preprocess attributes that can be expressions. Expression delimiters are stripped. If value is null, checks if there are any NamedAttribute subelements in the tree node, and if so, constructs a JspAttribute out of a child NamedAttribute node | getJspAttribute | {
"repo_name": "whitingjr/JbossWeb_7_2_0",
"path": "src/main/java/org/apache/jasper/compiler/Validator.java",
"license": "apache-2.0",
"size": 82833
} | [
"javax.el.ELException",
"javax.servlet.jsp.tagext.TagAttributeInfo",
"org.apache.jasper.JasperException",
"org.apache.jasper.el.ELContextImpl",
"org.jboss.web.JasperMessages"
] | import javax.el.ELException; import javax.servlet.jsp.tagext.TagAttributeInfo; import org.apache.jasper.JasperException; import org.apache.jasper.el.ELContextImpl; import org.jboss.web.JasperMessages; | import javax.el.*; import javax.servlet.jsp.tagext.*; import org.apache.jasper.*; import org.apache.jasper.el.*; import org.jboss.web.*; | [
"javax.el",
"javax.servlet",
"org.apache.jasper",
"org.jboss.web"
] | javax.el; javax.servlet; org.apache.jasper; org.jboss.web; | 1,393,659 |
//-------------------------------------------------------------------------
public void addExternalId(ExternalId exchangeId) {
ArgumentChecker.notNull(exchangeId, "exchangeId");
addExternalIds(Arrays.asList(exchangeId));
} | void function(ExternalId exchangeId) { ArgumentChecker.notNull(exchangeId, STR); addExternalIds(Arrays.asList(exchangeId)); } | /**
* Adds a single exchange external identifier to the collection to search for.
* Unless customized, the search will match
* {@link ExternalIdSearchType#ANY any} of the identifiers.
*
* @param exchangeId the exchange key identifier to add, not null
*/ | Adds a single exchange external identifier to the collection to search for. Unless customized, the search will match <code>ExternalIdSearchType#ANY any</code> of the identifiers | addExternalId | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "projects/OG-Master/src/main/java/com/opengamma/master/exchange/ExchangeSearchRequest.java",
"license": "apache-2.0",
"size": 17411
} | [
"com.opengamma.id.ExternalId",
"com.opengamma.util.ArgumentChecker",
"java.util.Arrays"
] | import com.opengamma.id.ExternalId; import com.opengamma.util.ArgumentChecker; import java.util.Arrays; | import com.opengamma.id.*; import com.opengamma.util.*; import java.util.*; | [
"com.opengamma.id",
"com.opengamma.util",
"java.util"
] | com.opengamma.id; com.opengamma.util; java.util; | 1,387,202 |
public static void sendContinueResponseBlocking(final HttpServerExchange exchange) throws IOException {
if (!exchange.isResponseChannelAvailable()) {
throw UndertowMessages.MESSAGES.cannotSendContinueResponse();
}
if(exchange.getAttachment(ALREADY_SENT) != null) {
ret... | static void function(final HttpServerExchange exchange) throws IOException { if (!exchange.isResponseChannelAvailable()) { throw UndertowMessages.MESSAGES.cannotSendContinueResponse(); } if(exchange.getAttachment(ALREADY_SENT) != null) { return; } HttpServerExchange newExchange = exchange.getConnection().sendOutOfBandR... | /**
* Sends a continue response using blocking IO
*
* @param exchange The exchange
*/ | Sends a continue response using blocking IO | sendContinueResponseBlocking | {
"repo_name": "rhusar/undertow",
"path": "core/src/main/java/io/undertow/server/protocol/http/HttpContinue.java",
"license": "apache-2.0",
"size": 10495
} | [
"io.undertow.UndertowMessages",
"io.undertow.server.HttpServerExchange",
"io.undertow.util.Headers",
"io.undertow.util.StatusCodes",
"java.io.IOException"
] | import io.undertow.UndertowMessages; import io.undertow.server.HttpServerExchange; import io.undertow.util.Headers; import io.undertow.util.StatusCodes; import java.io.IOException; | import io.undertow.*; import io.undertow.server.*; import io.undertow.util.*; import java.io.*; | [
"io.undertow",
"io.undertow.server",
"io.undertow.util",
"java.io"
] | io.undertow; io.undertow.server; io.undertow.util; java.io; | 2,505,672 |
public void setNextMaintenenceDate (Timestamp NextMaintenenceDate)
{
set_Value (COLUMNNAME_NextMaintenenceDate, NextMaintenenceDate);
} | void function (Timestamp NextMaintenenceDate) { set_Value (COLUMNNAME_NextMaintenenceDate, NextMaintenenceDate); } | /** Set Next Maintenence.
@param NextMaintenenceDate
Next Maintenence Date
*/ | Set Next Maintenence | setNextMaintenenceDate | {
"repo_name": "TaymourReda/-https-github.com-adempiere-adempiere",
"path": "base/src/org/compiere/model/X_A_Asset.java",
"license": "gpl-2.0",
"size": 35310
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 350,616 |
private void populateOperatorGraph(
org.apache.hadoop.hive.ql.plan.api.Task task,
Collection<Operator<? extends OperatorDesc>> topOps) {
task.setOperatorGraph(new org.apache.hadoop.hive.ql.plan.api.Graph());
task.getOperatorGraph().setNodeType(NodeType.OPERATOR);
Queue<Operator<? extends Ope... | void function( org.apache.hadoop.hive.ql.plan.api.Task task, Collection<Operator<? extends OperatorDesc>> topOps) { task.setOperatorGraph(new org.apache.hadoop.hive.ql.plan.api.Graph()); task.getOperatorGraph().setNodeType(NodeType.OPERATOR); Queue<Operator<? extends OperatorDesc>> opsToVisit = new LinkedList<Operator<... | /**
* generate the operator graph and operator list for the given task based on
* the operators corresponding to that task.
*
* @param task
* api.Task which needs its operator graph populated
* @param topOps
* the set of top operators from which the operator graph for the
* ... | generate the operator graph and operator list for the given task based on the operators corresponding to that task | populateOperatorGraph | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java",
"license": "apache-2.0",
"size": 27564
} | [
"java.util.Collection",
"java.util.HashSet",
"java.util.LinkedList",
"java.util.Queue",
"java.util.Set",
"org.apache.hadoop.hive.ql.exec.Operator",
"org.apache.hadoop.hive.ql.exec.Task",
"org.apache.hadoop.hive.ql.plan.OperatorDesc",
"org.apache.hadoop.hive.ql.plan.api.AdjacencyType",
"org.apache.... | import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; import java.util.Queue; import java.util.Set; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.exec.Task; import org.apache.hadoop.hive.ql.plan.OperatorDesc; import org.apache.hadoop.hive.ql.plan.api.Adja... | import java.util.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.plan.*; import org.apache.hadoop.hive.ql.plan.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,734,642 |
public void test_21_triggers() throws Exception
{
Connection conn = getConnection();
goodStatement
(
conn,
"create table alumnus\n" +
"(\n" +
" alumnusID int primary key generated always as identity,\n" +
" name ... | void function() throws Exception { Connection conn = getConnection(); goodStatement ( conn, STR + "(\n" + STR + STR + STR + ")\n" ); goodStatement ( conn, STR + "(\n" + STR + STR + STR + ")\n" ); goodStatement ( conn, STR + STR + STR + STR + STR + STR ); goodStatement( conn, STR ); goodStatement( conn, STR ); assertRes... | /**
* <p>
* Verify triggers on boolean columns.
* </p>
*/ | Verify triggers on boolean columns. | test_21_triggers | {
"repo_name": "splicemachine/spliceengine",
"path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/BooleanValuesTest.java",
"license": "agpl-3.0",
"size": 69208
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 520,825 |
public String getToolTipText(float x, float y, Shape allocation) {
return getAltText();
} | String function(float x, float y, Shape allocation) { return getAltText(); } | /**
* For images the tooltip text comes from text specified with the
* <code>ALT</code> attribute. This is overriden to return
* <code>getAltText</code>.
*
* @see JTextComponent#getToolTipText
*/ | For images the tooltip text comes from text specified with the <code>ALT</code> attribute. This is overriden to return <code>getAltText</code> | getToolTipText | {
"repo_name": "md-5/jdk10",
"path": "src/java.desktop/share/classes/javax/swing/text/html/ImageView.java",
"license": "gpl-2.0",
"size": 37563
} | [
"java.awt.Shape"
] | import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,612,295 |
Action<? super ArtifactResolutionDetails> getContentFilter(); | Action<? super ArtifactResolutionDetails> getContentFilter(); | /**
* Returns the repository content filter, if any.
*/ | Returns the repository content filter, if any | getContentFilter | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/dependency-management/src/main/java/org/gradle/internal/resolve/result/ComponentSelectionContext.java",
"license": "apache-2.0",
"size": 2949
} | [
"org.gradle.api.Action",
"org.gradle.api.internal.artifacts.repositories.ArtifactResolutionDetails"
] | import org.gradle.api.Action; import org.gradle.api.internal.artifacts.repositories.ArtifactResolutionDetails; | import org.gradle.api.*; import org.gradle.api.internal.artifacts.repositories.*; | [
"org.gradle.api"
] | org.gradle.api; | 1,388,477 |
private void updateCurrenciesListView(final Activity activity, List<CurrencyData> currencies) {
AppSettings appSettings = new AppSettings(activity);
currencyListAdapter = new CurrencyListAdapter(activity, R.layout.currency_row_layout,
toCurrencyRows(activity, getVisibleCurrencies(activity, currencies)),
... | void function(final Activity activity, List<CurrencyData> currencies) { AppSettings appSettings = new AppSettings(activity); currencyListAdapter = new CurrencyListAdapter(activity, R.layout.currency_row_layout, toCurrencyRows(activity, getVisibleCurrencies(activity, currencies)), appSettings.getCurrenciesPrecision(), a... | /**
* Populates the list of currencies
*
* @param activity
* @param currencies
*/ | Populates the list of currencies | updateCurrenciesListView | {
"repo_name": "vexelon-dot-net/currencybg.app",
"path": "src/main/java/net/vexelon/currencybg/app/ui/fragments/CurrenciesFragment.java",
"license": "gpl-3.0",
"size": 26937
} | [
"android.app.Activity",
"java.util.List",
"net.vexelon.currencybg.app.AppSettings",
"net.vexelon.currencybg.app.db.models.CurrencyData",
"net.vexelon.currencybg.app.ui.components.CurrencyListAdapter",
"net.vexelon.currencybg.app.utils.DateTimeUtils"
] | import android.app.Activity; import java.util.List; import net.vexelon.currencybg.app.AppSettings; import net.vexelon.currencybg.app.db.models.CurrencyData; import net.vexelon.currencybg.app.ui.components.CurrencyListAdapter; import net.vexelon.currencybg.app.utils.DateTimeUtils; | import android.app.*; import java.util.*; import net.vexelon.currencybg.app.*; import net.vexelon.currencybg.app.db.models.*; import net.vexelon.currencybg.app.ui.components.*; import net.vexelon.currencybg.app.utils.*; | [
"android.app",
"java.util",
"net.vexelon.currencybg"
] | android.app; java.util; net.vexelon.currencybg; | 1,851,100 |
int[] collect(int n) throws
IOException
{
int[] buf = new int[n];
boolean seenEOF = false;
for (int i = 0; i < buf.length; i++)
{
if (seenEOF)
{
buf[i] = -1;
}
else
{
buf[i] = next();
if (curChar == -1)
{
seenEOF = true;
... | int[] collect(int n) throws IOException { int[] buf = new int[n]; boolean seenEOF = false; for (int i = 0; i < buf.length; i++) { if (seenEOF) { buf[i] = -1; } else { buf[i] = next(); if (curChar == -1) { seenEOF = true; } } } return buf; } | /**
* Reads forward and returns the the next n characters in the stream. Escapes
* are returned verbatim. At return, the reader is at positioned such that
* next() will return n+1 or EOF (-1).
*
* @param n the number of characters to read
* @return An array with guaranteed length n, with -1 being the ... | Reads forward and returns the the next n characters in the stream. Escapes are returned verbatim. At return, the reader is at positioned such that next() will return n+1 or EOF (-1) | collect | {
"repo_name": "IDPF/epubcheck",
"path": "src/main/java/org/idpf/epubcheck/util/css/CssReader.java",
"license": "mit",
"size": 8911
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,486,841 |
List<Device> getDevices(int tenantId) throws DeviceManagementDAOException; | List<Device> getDevices(int tenantId) throws DeviceManagementDAOException; | /**
* This method is used to retrieve all the devices of a given tenant.
*
* @param tenantId tenant id.
* @return returns a list of devices.
* @throws DeviceManagementDAOException
*/ | This method is used to retrieve all the devices of a given tenant | getDevices | {
"repo_name": "prithvi66/carbon-device-mgt",
"path": "components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java",
"license": "apache-2.0",
"size": 16585
} | [
"java.util.List",
"org.wso2.carbon.device.mgt.common.Device"
] | import java.util.List; import org.wso2.carbon.device.mgt.common.Device; | import java.util.*; import org.wso2.carbon.device.mgt.common.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,783,528 |
public void learn(FamilyDB families) {
this.chains.clear();
this.finalChains.clear();
this.db = new ChainsDB();
List<Residue> roots = new ArrayList<>();
for (Family family : families.getObjects()) {
for (Residue root : family.getRoots()) {
roots.add(root);
}
}
// --- Roots ---
// Init... | void function(FamilyDB families) { this.chains.clear(); this.finalChains.clear(); this.db = new ChainsDB(); List<Residue> roots = new ArrayList<>(); for (Family family : families.getObjects()) { for (Residue root : family.getRoots()) { roots.add(root); } } ResidueMappings residueIndex_1 = new ResidueMappings(); this.in... | /**
* Learn Sequences from families using the learning base.
* @param families families to index.
*/ | Learn Sequences from families using the learning base | learn | {
"repo_name": "yoann-dufresne/Smiles2Monomers",
"path": "src/algorithms/isomorphism/chains/ChainLearning.java",
"license": "agpl-3.0",
"size": 14767
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,541,788 |
public static Set<String> unassignedJobIds(@Nullable PersistentTasksCustomMetadata tasks,
DiscoveryNodes nodes) {
return unassignedJobTasks(tasks, nodes).stream()
.map(task -> task.getId().substring(JOB_TASK_ID_PREFIX.length()))
... | static Set<String> function(@Nullable PersistentTasksCustomMetadata tasks, DiscoveryNodes nodes) { return unassignedJobTasks(tasks, nodes).stream() .map(task -> task.getId().substring(JOB_TASK_ID_PREFIX.length())) .collect(Collectors.toSet()); } /** * The job tasks that do not have an assignment as determined by * {@li... | /**
* Get the job Ids of anomaly detector job tasks that do
* not have an assignment.
*
* @param tasks Persistent tasks. If null an empty set is returned.
* @param nodes The cluster nodes
* @return The job Ids of tasks to do not have an assignment.
*/ | Get the job Ids of anomaly detector job tasks that do not have an assignment | unassignedJobIds | {
"repo_name": "nknize/elasticsearch",
"path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MlTasks.java",
"license": "apache-2.0",
"size": 12988
} | [
"java.util.Set",
"java.util.stream.Collectors",
"org.elasticsearch.cluster.node.DiscoveryNodes",
"org.elasticsearch.common.Nullable",
"org.elasticsearch.persistent.PersistentTasksClusterService",
"org.elasticsearch.persistent.PersistentTasksCustomMetadata"
] | import java.util.Set; import java.util.stream.Collectors; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.common.Nullable; import org.elasticsearch.persistent.PersistentTasksClusterService; import org.elasticsearch.persistent.PersistentTasksCustomMetadata; | import java.util.*; import java.util.stream.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.common.*; import org.elasticsearch.persistent.*; | [
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.persistent"
] | java.util; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.persistent; | 1,747,487 |
public static <T> long
LazySmoothMovingImmediateAverage(
final LazyMovingImmediateAverageAdapter<T> adapter,
final T instance )
{
int update_window = GeneralUtils.getSmoothUpdateWindow();
int update_interval = GeneralUtils.getSmoothUpdateInterval();
return( LazyMovingImmediate... | static <T> long function( final LazyMovingImmediateAverageAdapter<T> adapter, final T instance ) { int update_window = GeneralUtils.getSmoothUpdateWindow(); int update_interval = GeneralUtils.getSmoothUpdateInterval(); return( LazyMovingImmediateAverage( update_window / update_interval, update_interval, adapter, instan... | /**
* Creates an auto-updating immediate moving average that will auto-deactivate average maintenance
* when values are not being extracted from it, auto-reactivate when required etc.
* @param periods
* @param adapter
* @param instance
* @return
*/ | Creates an auto-updating immediate moving average that will auto-deactivate average maintenance when values are not being extracted from it, auto-reactivate when required etc | LazySmoothMovingImmediateAverage | {
"repo_name": "AcademicTorrents/AcademicTorrents-Downloader",
"path": "vuze/com/aelitis/azureus/core/util/average/AverageFactory.java",
"license": "gpl-2.0",
"size": 6380
} | [
"com.aelitis.azureus.core.util.GeneralUtils"
] | import com.aelitis.azureus.core.util.GeneralUtils; | import com.aelitis.azureus.core.util.*; | [
"com.aelitis.azureus"
] | com.aelitis.azureus; | 2,634,530 |
public void interactiveTreeTableCustomIconsPerformance() {
// modify the file model to return the file itself for the hierarchical column
TreeTableModel model = new FileSystemModel() { | void function() { TreeTableModel model = new FileSystemModel() { | /**
* example to configure treeTable hierarchical column with
* custom icon and content mapping. The nodes are actually of type File.
*
* Problem:
* painting on resizing tree column sluggish, especially if the PatternHighlighter
* is on. Reason seems to be the FileSystemView - prepare ti... | example to configure treeTable hierarchical column with custom icon and content mapping. The nodes are actually of type File. Problem: painting on resizing tree column sluggish, especially if the PatternHighlighter is on. Reason seems to be the FileSystemView - prepare time increases with number of accesses | interactiveTreeTableCustomIconsPerformance | {
"repo_name": "trejkaz/swingx",
"path": "swingx-core/src/test/java/org/jdesktop/swingx/renderer/RendererIssues.java",
"license": "lgpl-2.1",
"size": 29665
} | [
"org.jdesktop.swingx.treetable.FileSystemModel",
"org.jdesktop.swingx.treetable.TreeTableModel"
] | import org.jdesktop.swingx.treetable.FileSystemModel; import org.jdesktop.swingx.treetable.TreeTableModel; | import org.jdesktop.swingx.treetable.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 2,234,939 |
@FunctionalInterface
public interface PopupVisibilityListener extends Serializable {
public void popupVisibilityChange(PopupVisibilityEvent event);
} | interface PopupVisibilityListener extends Serializable { public void function(PopupVisibilityEvent event); } | /**
* Pass to {@link PopupView.PopupVisibilityEvent} to start listening for
* popup visibility changes.
*
* @param event
* the event
*
* @see PopupVisibilityEvent
* @see PopupView#addPopupVisibilityListener(PopupVisibilityListener)
... | Pass to <code>PopupView.PopupVisibilityEvent</code> to start listening for popup visibility changes | popupVisibilityChange | {
"repo_name": "Darsstar/framework",
"path": "server/src/main/java/com/vaadin/ui/PopupView.java",
"license": "apache-2.0",
"size": 13351
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 1,972,365 |
Object result;
if (javaType == byte[].class) {
result = HexBinary.decode(source);
} else {
result = new HexBinary(source);
}
if (result == null) result = new HexBinary("");
return result;
} | Object result; if (javaType == byte[].class) { result = HexBinary.decode(source); } else { result = new HexBinary(source); } if (result == null) result = new HexBinary(""); return result; } | /**
* Convert the string that has been accumulated into an Object. Subclasses
* may override this. Note that if the javaType is a primitive, the returned
* object is a wrapper class.
* @param source the serialized value to be deserialized
* @throws Exception any exception thrown by this metho... | Convert the string that has been accumulated into an Object. Subclasses may override this. Note that if the javaType is a primitive, the returned object is a wrapper class | makeValue | {
"repo_name": "apache/axis1-java",
"path": "axis-rt-core/src/main/java/org/apache/axis/encoding/ser/HexDeserializer.java",
"license": "apache-2.0",
"size": 1808
} | [
"org.apache.axis.types.HexBinary"
] | import org.apache.axis.types.HexBinary; | import org.apache.axis.types.*; | [
"org.apache.axis"
] | org.apache.axis; | 1,777,365 |
protected boolean isReserved(String word) {
SqlAbstractParserImpl.Metadata metadata = getSqlParser("").getMetadata();
return metadata.isReservedWord(word.toUpperCase(Locale.ROOT));
} | boolean function(String word) { SqlAbstractParserImpl.Metadata metadata = getSqlParser("").getMetadata(); return metadata.isReservedWord(word.toUpperCase(Locale.ROOT)); } | /** Returns whether a word is reserved in this parser. This method can be
* used to disable tests that behave differently with different collections
* of reserved words. */ | Returns whether a word is reserved in this parser. This method can be used to disable tests that behave differently with different collections | isReserved | {
"repo_name": "googleinterns/calcite",
"path": "parsing/src/test/java/org/apache/calcite/test/SqlDialectParserTest.java",
"license": "apache-2.0",
"size": 360542
} | [
"java.util.Locale",
"org.apache.calcite.sql.parser.SqlAbstractParserImpl"
] | import java.util.Locale; import org.apache.calcite.sql.parser.SqlAbstractParserImpl; | import java.util.*; import org.apache.calcite.sql.parser.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 253,125 |
protected final ModelAndView showPage(HttpServletRequest request, BindException errors, int page) throws Exception {
if (page >= 0 && page < getPageCount(request, errors.getTarget())) {
if (logger.isDebugEnabled()) {
logger.debug("Showing wizard page " + page + " for form bean '" + getCommandName() + "'"... | final ModelAndView function(HttpServletRequest request, BindException errors, int page) throws Exception { if (page >= 0 && page < getPageCount(request, errors.getTarget())) { if (logger.isDebugEnabled()) { logger.debug(STR + page + STR + getCommandName() + "'"); } Integer pageInteger = Integer.valueOf(page); String pa... | /**
* Prepare the form model and view, including reference and error data,
* for the given page. Can be used in {@link #processFinish} implementations,
* to show the corresponding page in case of validation errors.
* @param request current HTTP request
* @param errors validation errors holder
* @param page ... | Prepare the form model and view, including reference and error data, for the given page. Can be used in <code>#processFinish</code> implementations, to show the corresponding page in case of validation errors | showPage | {
"repo_name": "shiangree/openmrs-core",
"path": "web/src/main/java/org/springframework/web/servlet/mvc/AbstractWizardFormController.java",
"license": "mpl-2.0",
"size": 29231
} | [
"java.util.HashMap",
"java.util.Map",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"org.springframework.validation.BindException",
"org.springframework.web.servlet.ModelAndView"
] | import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; | import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.springframework.validation.*; import org.springframework.web.servlet.*; | [
"java.util",
"javax.servlet",
"org.springframework.validation",
"org.springframework.web"
] | java.util; javax.servlet; org.springframework.validation; org.springframework.web; | 1,001,712 |
public void testRestoreOrder2Jcr2_4() throws RepositoryException,
NotExecutableException {
// create a test-root that has orderable child nodes
Node testRoot = versionableNode.addNode(nodeName4, "nt:unstructured");
ensureMixinType(testRoot, mixVersionable);
versionableNod... | void function() throws RepositoryException, NotExecutableException { Node testRoot = versionableNode.addNode(nodeName4, STR); ensureMixinType(testRoot, mixVersionable); versionableNode.getSession().save(); Node child1 = testRoot.addNode(nodeName1); ensureMixinType(child1, mixVersionable); Node child2 = testRoot.addNode... | /**
* Test the child ordering of restored nodes.
* @throws RepositoryException
*/ | Test the child ordering of restored nodes | testRestoreOrder2Jcr2_4 | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java",
"license": "apache-2.0",
"size": 61164
} | [
"javax.jcr.Node",
"javax.jcr.NodeIterator",
"javax.jcr.RepositoryException",
"javax.jcr.version.Version",
"org.apache.jackrabbit.test.NotExecutableException"
] | import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; import javax.jcr.version.Version; import org.apache.jackrabbit.test.NotExecutableException; | import javax.jcr.*; import javax.jcr.version.*; import org.apache.jackrabbit.test.*; | [
"javax.jcr",
"org.apache.jackrabbit"
] | javax.jcr; org.apache.jackrabbit; | 538,325 |
public void update()
{
byte []code = new byte[_code.size()];
System.arraycopy(_code.getBuffer(), 0, code, 0, _code.size());
_codeAttr.setCode(code);
if (_changeLength) {
// XXX: really need more sophisticated solution
ArrayList<Attribute> attrList = getCodeAttribute().getAttributes();... | void function() { byte []code = new byte[_code.size()]; System.arraycopy(_code.getBuffer(), 0, code, 0, _code.size()); _codeAttr.setCode(code); if (_changeLength) { ArrayList<Attribute> attrList = getCodeAttribute().getAttributes(); for (int i = attrList.size() - 1; i >= 0; i--) { Attribute attr = attrList.get(i); if (... | /**
* Updates the code.
*/ | Updates the code | update | {
"repo_name": "baratine/baratine",
"path": "core/src/main/java/com/caucho/v5/bytecode/CodeEnhancer.java",
"license": "gpl-2.0",
"size": 13769
} | [
"com.caucho.v5.bytecode.attr.Attribute",
"java.util.ArrayList"
] | import com.caucho.v5.bytecode.attr.Attribute; import java.util.ArrayList; | import com.caucho.v5.bytecode.attr.*; import java.util.*; | [
"com.caucho.v5",
"java.util"
] | com.caucho.v5; java.util; | 2,496,217 |
@Override
public synchronized void onMigrationEnded(MigrationRequest migrationRequest)
{
log_.debug(String.format("Adding virtual machine %s to finished migrations list",
migrationRequest.getSourceVirtualMachineLocation().getVirtualMachineId())... | synchronized void function(MigrationRequest migrationRequest) { log_.debug(String.format(STR, migrationRequest.getSourceVirtualMachineLocation().getVirtualMachineId())); finishedMigrations_.add(migrationRequest); if (numberOfMigrations_ == finishedMigrations_.size()) { log_.debug(STR); for (MigrationRequest finishedMig... | /**
* Migration callback.
*
* @param migrationRequest The migration request
*/ | Migration callback | onMigrationEnded | {
"repo_name": "snoozesoftware/snoozenode",
"path": "src/main/java/org/inria/myriads/snoozenode/groupmanager/migration/MigrationPlanEnforcer.java",
"license": "gpl-2.0",
"size": 19553
} | [
"org.inria.myriads.snoozecommon.communication.virtualcluster.migration.MigrationRequest",
"org.inria.myriads.snoozenode.exception.MigrationPlanEnforcerException",
"org.inria.myriads.snoozenode.message.ManagementMessage",
"org.inria.myriads.snoozenode.message.ManagementMessageType",
"org.inria.myriads.snooze... | import org.inria.myriads.snoozecommon.communication.virtualcluster.migration.MigrationRequest; import org.inria.myriads.snoozenode.exception.MigrationPlanEnforcerException; import org.inria.myriads.snoozenode.message.ManagementMessage; import org.inria.myriads.snoozenode.message.ManagementMessageType; import org.inria.... | import org.inria.myriads.snoozecommon.communication.virtualcluster.migration.*; import org.inria.myriads.snoozenode.exception.*; import org.inria.myriads.snoozenode.message.*; import org.inria.myriads.snoozenode.util.*; import org.inria.snoozenode.external.notifier.*; | [
"org.inria.myriads",
"org.inria.snoozenode"
] | org.inria.myriads; org.inria.snoozenode; | 2,414,118 |
public Observable<ServiceResponse<EndpointInner>> createWithServiceResponseAsync(String resourceGroupName, String profileName, String endpointName, EndpointInner endpoint) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be... | Observable<ServiceResponse<EndpointInner>> function(String resourceGroupName, String profileName, String endpointName, EndpointInner endpoint) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (profileName == null) { throw new IllegalArgumentException(STR); } if (endpointName == null) { t... | /**
* Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource grou... | Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile | createWithServiceResponseAsync | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-cdn/src/main/java/com/microsoft/azure/management/cdn/implementation/EndpointsInner.java",
"license": "mit",
"size": 125719
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.rest.ServiceResponse",
"com.microsoft.rest.Validator"
] | import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; | import com.google.common.reflect.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.rest"
] | com.google.common; com.microsoft.rest; | 1,411,515 |
EReference getLEntityModel_Packages(); | EReference getLEntityModel_Packages(); | /**
* Returns the meta object for the containment reference list '{@link org.lunifera.dsl.semantic.entity.LEntityModel#getPackages <em>Packages</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Packages</em>'.
* @see org.lunifera.dsl.se... | Returns the meta object for the containment reference list '<code>org.lunifera.dsl.semantic.entity.LEntityModel#getPackages Packages</code>'. | getLEntityModel_Packages | {
"repo_name": "lunifera/lunifera-dsl",
"path": "org.lunifera.dsl.semantic.entity/emf-gen/org/lunifera/dsl/semantic/entity/LunEntityPackage.java",
"license": "epl-1.0",
"size": 119334
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,025,687 |
void verifyParentDir(INodesInPath iip, String src)
throws FileNotFoundException, ParentNotDirectoryException {
Path parent = new Path(src).getParent();
if (parent != null) {
final INode parentNode = iip.getINode(-2);
if (parentNode == null) {
throw new FileNotFoundException("Parent d... | void verifyParentDir(INodesInPath iip, String src) throws FileNotFoundException, ParentNotDirectoryException { Path parent = new Path(src).getParent(); if (parent != null) { final INode parentNode = iip.getINode(-2); if (parentNode == null) { throw new FileNotFoundException(STR + parent); } else if (!parentNode.isDirec... | /**
* Verify that parent directory of src exists.
*/ | Verify that parent directory of src exists | verifyParentDir | {
"repo_name": "matrix-stone/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 57399
} | [
"java.io.FileNotFoundException",
"org.apache.hadoop.fs.ParentNotDirectoryException",
"org.apache.hadoop.fs.Path"
] | import java.io.FileNotFoundException; import org.apache.hadoop.fs.ParentNotDirectoryException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 448,356 |
@Override
public void onMessage(Object sender, Message message)
{
ImmutableBag<MessageReceiver> listeners = getMessageHandler(message.getType());
if(listeners != null)
{
final int size = listeners.size();
for(int i=0; i<size; i++)
{
MessageReceiver handler = listeners.get(i);
handler.onMe... | void function(Object sender, Message message) { ImmutableBag<MessageReceiver> listeners = getMessageHandler(message.getType()); if(listeners != null) { final int size = listeners.size(); for(int i=0; i<size; i++) { MessageReceiver handler = listeners.get(i); handler.onMessage(sender, message); } } } | /**
* Caso general de envio de mensajes.
* @param message Mensaje a enviar.
* @param args Argumentos del mensaje.
*/ | Caso general de envio de mensajes | onMessage | {
"repo_name": "egyware/fp4g",
"path": "Apollo/src/com/apollo/Entity.java",
"license": "bsd-3-clause",
"size": 5074
} | [
"com.apollo.utils.ImmutableBag"
] | import com.apollo.utils.ImmutableBag; | import com.apollo.utils.*; | [
"com.apollo.utils"
] | com.apollo.utils; | 1,468,667 |
protected void selectRange(EditorPartPresenter editor, int line, int column) {
line--;
column--;
if (line < 0) line = 0;
if (editor instanceof TextEditor) {
Document document = ((TextEditor) editor).getDocument();
LinearRange selectionRange = document.getLinearRangeForLine(line);
if ... | void function(EditorPartPresenter editor, int line, int column) { line--; column--; if (line < 0) line = 0; if (editor instanceof TextEditor) { Document document = ((TextEditor) editor).getDocument(); LinearRange selectionRange = document.getLinearRangeForLine(line); if (column >= 0) { selectionRange = LinearRange.crea... | /**
* Selects and shows the specified line and column of text in editor
*
* @param editor
* @param line
* @param column
*/ | Selects and shows the specified line and column of text in editor | selectRange | {
"repo_name": "jonahkichwacoders/che",
"path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/console/AbstractOutputCustomizer.java",
"license": "epl-1.0",
"size": 6365
} | [
"org.eclipse.che.ide.api.editor.EditorPartPresenter",
"org.eclipse.che.ide.api.editor.document.Document",
"org.eclipse.che.ide.api.editor.text.LinearRange",
"org.eclipse.che.ide.api.editor.text.TextPosition",
"org.eclipse.che.ide.api.editor.texteditor.TextEditor"
] | import org.eclipse.che.ide.api.editor.EditorPartPresenter; import org.eclipse.che.ide.api.editor.document.Document; import org.eclipse.che.ide.api.editor.text.LinearRange; import org.eclipse.che.ide.api.editor.text.TextPosition; import org.eclipse.che.ide.api.editor.texteditor.TextEditor; | import org.eclipse.che.ide.api.editor.*; import org.eclipse.che.ide.api.editor.document.*; import org.eclipse.che.ide.api.editor.text.*; import org.eclipse.che.ide.api.editor.texteditor.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 985,093 |
public void setC_DocTypeTarget_ID ()
{
if (isSOTrx()) // SO = Std Order
{
setC_DocTypeTarget_ID(DocSubTypeSO_Standard);
return;
}
// PO
String sql = "SELECT C_DocType_ID FROM C_DocType "
+ "WHERE AD_Client_ID=? AND AD_Org_ID IN (0," + getAD_Org_ID()
+ ") AND DocBaseType='POO' "
+ "ORDER BY... | void function () { if (isSOTrx()) { setC_DocTypeTarget_ID(DocSubTypeSO_Standard); return; } String sql = STR + STR + getAD_Org_ID() + STR + STR; int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID()); if (C_DocType_ID <= 0) log.severe (STR + getAD_Client_ID ()); else { log.fine(STR + C_DocType_ID); setC_DocTyp... | /**
* Set Target Document Type.
* Standard Order or PO
*/ | Set Target Document Type. Standard Order or PO | setC_DocTypeTarget_ID | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiereTrunk/base/src/org/compiere/model/MOrder.java",
"license": "gpl-2.0",
"size": 76045
} | [
"org.compiere.util.DB"
] | import org.compiere.util.DB; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 2,127,158 |
private Reply validateReply(String reply, String expectedReplyCode) throws IOException, FileTransferException {
// all reply codes are 3 chars long
String replyCode = reply.substring(0, 3);
String replyText = reply.substring(4);
Reply replyObj = new Reply(replyCode, replyText);
if (replyCode.equ... | Reply function(String reply, String expectedReplyCode) throws IOException, FileTransferException { String replyCode = reply.substring(0, 3); String replyText = reply.substring(4); Reply replyObj = new Reply(replyCode, replyText); if (replyCode.equals(expectedReplyCode)) { return replyObj; } throw new FtpException(reply... | /**
* Validate the response the host has supplied against the expected reply. If
* we get an unexpected reply we throw an exception, setting the message to
* that returned by the FTP server
*
* @param reply the entire reply string we received
* @param expectedReplyCode the reply we expected to receiv... | Validate the response the host has supplied against the expected reply. If we get an unexpected reply we throw an exception, setting the message to that returned by the FTP server | validateReply | {
"repo_name": "mcwarman/interlok",
"path": "adapter/src/main/java/com/adaptris/ftp/ApacheFtpClientImpl.java",
"license": "apache-2.0",
"size": 15354
} | [
"com.adaptris.filetransfer.FileTransferException",
"java.io.IOException"
] | import com.adaptris.filetransfer.FileTransferException; import java.io.IOException; | import com.adaptris.filetransfer.*; import java.io.*; | [
"com.adaptris.filetransfer",
"java.io"
] | com.adaptris.filetransfer; java.io; | 2,644,217 |
public static <T> Attribute<T> forSetter(final Method setter) {
return MethodAttribute.newSetterAttribute(setter);
} | static <T> Attribute<T> function(final Method setter) { return MethodAttribute.newSetterAttribute(setter); } | /**
* Creates an attribute based on the given setter. The attribute name and type will be inferred from the setter. The
* method must be a valid setter and not be static.
*
* @param <T> the attribute type
* @param setter the setter this attribute represents
* @return an attribute for th... | Creates an attribute based on the given setter. The attribute name and type will be inferred from the setter. The method must be a valid setter and not be static | forSetter | {
"repo_name": "ymachkivskiy/hage",
"path": "platform/platform-utils/reflection/src/main/java/org/hage/platform/util/reflect/attribute/Attributes.java",
"license": "gpl-3.0",
"size": 2371
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,873,861 |
public ReplyPacket receiveReply(int commandId, long timeout)
throws InterruptedException, IOException {
// if connection is already closed reraise the exception
if (connectionException != null)
throw connectionException;
// receive the reply
... | ReplyPacket function(int commandId, long timeout) throws InterruptedException, IOException { if (connectionException != null) throw connectionException; ReplyPacket currentReply = null; long endTimeMlsecForWait = System.currentTimeMillis() + timeout; synchronized (replies) { while (true) { currentReply = (ReplyPacket) ... | /**
* Receives the reply during timeout for command with specified command
* ID.
*
* @param commandId
* id of previously sent commend
* @param timeout
* receive timeout
* @return received ReplyPacket
* @throws Timeou... | Receives the reply during timeout for command with specified command ID | receiveReply | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/jdwp/PacketDispatcher.java",
"license": "gpl-3.0",
"size": 27117
} | [
"java.io.IOException",
"org.apache.harmony.jpda.tests.framework.jdwp.exceptions.TimeoutException"
] | import java.io.IOException; import org.apache.harmony.jpda.tests.framework.jdwp.exceptions.TimeoutException; | import java.io.*; import org.apache.harmony.jpda.tests.framework.jdwp.exceptions.*; | [
"java.io",
"org.apache.harmony"
] | java.io; org.apache.harmony; | 2,616,103 |
private void serveTrackList() {
Model m = im.getModel();
List<Map<String, Object>> tracks = new ArrayList<Map<String, Object>>();
ClassDescriptor fcd = m.getClassDescriptorByName(featType);
tracks.add(featureTrack(fcd));
for (ClassDescriptor cd: m.getAllSubs(fcd)) {
... | void function() { Model m = im.getModel(); List<Map<String, Object>> tracks = new ArrayList<Map<String, Object>>(); ClassDescriptor fcd = m.getClassDescriptorByName(featType); tracks.add(featureTrack(fcd)); for (ClassDescriptor cd: m.getAllSubs(fcd)) { tracks.add(featureTrack(cd)); } tracks.add(referenceTrack()); addRe... | /**
* Tell the requester that:
* <ul>
* <li>We can serve features of all the types in our model that are subtypes of featType</li>
* <li>We can serve reference data for the reference track.</li>
* <li>We can perform name lookup and autocompletion.</li>
* <li>Our name</li>
* </ul>
... | Tell the requester that: We can serve features of all the types in our model that are subtypes of featType We can serve reference data for the reference track. We can perform name lookup and autocompletion. Our name | serveTrackList | {
"repo_name": "joshkh/intermine",
"path": "intermine/jbrowse-endpoint/main/src/org/intermine/webservice/server/jbrowse/Config.java",
"license": "lgpl-2.1",
"size": 12806
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.intermine.metadata.ClassDescriptor",
"org.intermine.metadata.Model"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.intermine.metadata.ClassDescriptor; import org.intermine.metadata.Model; | import java.util.*; import org.intermine.metadata.*; | [
"java.util",
"org.intermine.metadata"
] | java.util; org.intermine.metadata; | 1,877,501 |
@Override
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
MessageDispatch info = (MessageDispatch) o;
info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
... | void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); MessageDispatch info = (MessageDispatch) o; info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((OpenWireDestination) looseUnmarsalCached... | /**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/ | Un-marshal an object instance from the data input stream | looseUnmarshal | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v8/MessageDispatchMarshaller.java",
"license": "apache-2.0",
"size": 5460
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.ConsumerId",
"org.apache.activemq.openwire.commands.Message",
"org.apache.activemq.openwire.commands.MessageDispatch",
"org.apache.activemq.openwire.commands.OpenWireDe... | import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.ConsumerId; import org.apache.activemq.openwire.commands.Message; import org.apache.activemq.openwire.commands.MessageDispatch; import org.apache.activemq.openwire... | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 839,577 |
public static Test suite() {
return new TestSuite(CopyCallableSourceTest.class);
} | static Test function() { return new TestSuite(CopyCallableSourceTest.class); } | /**
*
* Returns a test suite.
*
* @return the test suite
*/ | Returns a test suite | suite | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-meta/src/test/java/adams/flow/source/CopyCallableSourceTest.java",
"license": "gpl-3.0",
"size": 7994
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 21,354 |
void setThreadLocal(ThreadLocal<Object> local, Object value) {
if (localValues == null) {
localValues = new IdentityHashMap<ThreadLocal<Object>, Object>();
}
localValues.put(local, value);
} | void setThreadLocal(ThreadLocal<Object> local, Object value) { if (localValues == null) { localValues = new IdentityHashMap<ThreadLocal<Object>, Object>(); } localValues.put(local, value); } | /**
* A sample implementation of this method is provided by the reference
* implementation. It must be included, as it is called by ThreadLocal.set()
* and InheritableThreadLocal.set(). Set the value associated with the
* ThreadLocal in the receiver to be <code>value</code>.
*
* @param local ThreadLo... | A sample implementation of this method is provided by the reference implementation. It must be included, as it is called by ThreadLocal.set() and InheritableThreadLocal.set(). Set the value associated with the ThreadLocal in the receiver to be <code>value</code> | setThreadLocal | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/libraryInterface/Harmony/ASF/src/java/lang/Thread.java",
"license": "epl-1.0",
"size": 31758
} | [
"java.util.IdentityHashMap"
] | import java.util.IdentityHashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,518,266 |
public static ims.therapies.vo.EducationToCarersVo insert(DomainObjectMap map, ims.therapies.vo.EducationToCarersVo valueObject, ims.therapies.domain.objects.EducationToCarers domainObject)
{
if (null == domainObject)
{
return valueObject;
}
if (null == map)
{
map = new DomainObject... | static ims.therapies.vo.EducationToCarersVo function(DomainObjectMap map, ims.therapies.vo.EducationToCarersVo valueObject, ims.therapies.domain.objects.EducationToCarers domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_EducationToCare... | /**
* Update the ValueObject with the Domain Object.
* @param map DomainObjectMap of DomainObjects to already created ValueObjects.
* @param valueObject to be updated
* @param domainObject ims.therapies.domain.objects.EducationToCarers
*/ | Update the ValueObject with the Domain Object | insert | {
"repo_name": "openhealthcare/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/therapies/vo/domain/EducationToCarersVoAssembler.java",
"license": "agpl-3.0",
"size": 22249
} | [
"org.hibernate.proxy.HibernateProxy"
] | import org.hibernate.proxy.HibernateProxy; | import org.hibernate.proxy.*; | [
"org.hibernate.proxy"
] | org.hibernate.proxy; | 844,142 |
@Test(expected = IllegalArgumentException.class)
public void testRegisterEventTypeNull()
{
list.addEventListener(null, new ListenerTestImpl());
} | @Test(expected = IllegalArgumentException.class) void function() { list.addEventListener(null, new ListenerTestImpl()); } | /**
* Tries to register a listener for a null event type.
*/ | Tries to register a listener for a null event type | testRegisterEventTypeNull | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/event/TestEventListenerList.java",
"license": "apache-2.0",
"size": 20553
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,555,605 |
public void setPortTypePersistence(PortTypePersistence portTypePersistence) {
this.portTypePersistence = portTypePersistence;
} | void function(PortTypePersistence portTypePersistence) { this.portTypePersistence = portTypePersistence; } | /**
* Sets the port type persistence.
*
* @param portTypePersistence the port type persistence
*/ | Sets the port type persistence | setPortTypePersistence | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/RequiredLibServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 52463
} | [
"org.kisti.edison.science.service.persistence.PortTypePersistence"
] | import org.kisti.edison.science.service.persistence.PortTypePersistence; | import org.kisti.edison.science.service.persistence.*; | [
"org.kisti.edison"
] | org.kisti.edison; | 2,156,612 |
CompletableFuture<String> evaluate(String expression); | CompletableFuture<String> evaluate(String expression); | /**
* Evaluate an expression
*
* This evaluates an expression in the same way that the CLI commands {@code print},
* {@code output}, and {@code call} would.
*
* @param expression the expression to evaluate
* @return a future that completes with the string representation of the value
*/ | Evaluate an expression This evaluates an expression in the same way that the CLI commands print, output, and call would | evaluate | {
"repo_name": "NationalSecurityAgency/ghidra",
"path": "Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/manager/GdbContextualOperations.java",
"license": "apache-2.0",
"size": 1714
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,806,025 |
public void send(ClusterMessage input) throws ZigBeeNetworkManagerException; | void function(ClusterMessage input) throws ZigBeeNetworkManagerException; | /**
* Send the given {@link ClusterMessage} (which is supposed to be Input Cluster) to this EndPoint,<br>
* on the contrary than the {@link #invoke(ClusterMessage)} this method doesn't wait for nor requires<br>
* an answer from the EndPoint-
*
* @param input the {@link ClusterMessage} containin... | Send the given <code>ClusterMessage</code> (which is supposed to be Input Cluster) to this EndPoint, on the contrary than the <code>#invoke(ClusterMessage)</code> this method doesn't wait for nor requires an answer from the EndPoint- | send | {
"repo_name": "cdealti/zigbee4java",
"path": "zigbee-api/src/main/java/org/bubblecloud/zigbee/network/ZigBeeEndpoint.java",
"license": "apache-2.0",
"size": 7201
} | [
"org.bubblecloud.zigbee.network.impl.ZigBeeNetworkManagerException"
] | import org.bubblecloud.zigbee.network.impl.ZigBeeNetworkManagerException; | import org.bubblecloud.zigbee.network.impl.*; | [
"org.bubblecloud.zigbee"
] | org.bubblecloud.zigbee; | 2,335,237 |
public boolean moveFile ( String inode, String folder ) throws Exception {
HttpServletRequest req = WebContextFactory.get().getHttpServletRequest();
User user = getUser( req );
//Contentlet file identifier
Identifier id = APILocator.getIdentifierAPI().findFromInode( inode );
... | boolean function ( String inode, String folder ) throws Exception { HttpServletRequest req = WebContextFactory.get().getHttpServletRequest(); User user = getUser( req ); Identifier id = APILocator.getIdentifierAPI().findFromInode( inode ); Folder parent = null; try { parent = APILocator.getFolderAPI().find( folder, use... | /**
* Moves a given inode reference to a given folder
*
* @param inode Contentlet inode
* @param folder This could be the inode of a folder or a host
* @return true if success, false otherwise
* @throws Exception
*/ | Moves a given inode reference to a given folder | moveFile | {
"repo_name": "guhb/core",
"path": "src/com/dotmarketing/portlets/browser/ajax/BrowserAjax.java",
"license": "gpl-3.0",
"size": 92456
} | [
"com.dotcms.repackage.org.directwebremoting.WebContextFactory",
"com.dotmarketing.beans.Host",
"com.dotmarketing.beans.Identifier",
"com.dotmarketing.business.APILocator",
"com.dotmarketing.exception.DotRuntimeException",
"com.dotmarketing.factories.InodeFactory",
"com.dotmarketing.portlets.contentlet.m... | import com.dotcms.repackage.org.directwebremoting.WebContextFactory; import com.dotmarketing.beans.Host; import com.dotmarketing.beans.Identifier; import com.dotmarketing.business.APILocator; import com.dotmarketing.exception.DotRuntimeException; import com.dotmarketing.factories.InodeFactory; import com.dotmarketing.p... | import com.dotcms.repackage.org.directwebremoting.*; import com.dotmarketing.beans.*; import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.dotmarketing.factories.*; import com.dotmarketing.portlets.contentlet.model.*; import com.dotmarketing.portlets.files.model.*; import com.dotmarketing... | [
"com.dotcms.repackage",
"com.dotmarketing.beans",
"com.dotmarketing.business",
"com.dotmarketing.exception",
"com.dotmarketing.factories",
"com.dotmarketing.portlets",
"com.liferay.portal",
"javax.servlet"
] | com.dotcms.repackage; com.dotmarketing.beans; com.dotmarketing.business; com.dotmarketing.exception; com.dotmarketing.factories; com.dotmarketing.portlets; com.liferay.portal; javax.servlet; | 170,298 |
EClass getBid(); | EClass getBid(); | /**
* Returns the meta object for class '{@link CIM.IEC61970.Informative.MarketOperations.Bid <em>Bid</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Bid</em>'.
* @see CIM.IEC61970.Informative.MarketOperations.Bid
* @generated
*/ | Returns the meta object for class '<code>CIM.IEC61970.Informative.MarketOperations.Bid Bid</code>'. | getBid | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java",
"license": "mit",
"size": 688294
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,431,940 |
public static boolean contains(byte[] self, Object value) {
for (byte next : self) {
if (DefaultTypeTransformation.compareEqual(value, next)) return true;
}
return false;
} | static boolean function(byte[] self, Object value) { for (byte next : self) { if (DefaultTypeTransformation.compareEqual(value, next)) return true; } return false; } | /**
* Checks whether the array contains the given value.
*
* @param self the array we are searching
* @param value the value being searched for
* @return true if the array contains the value
* @since 1.8.6
*/ | Checks whether the array contains the given value | contains | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation"
] | import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation; | import org.codehaus.groovy.runtime.typehandling.*; | [
"org.codehaus.groovy"
] | org.codehaus.groovy; | 1,565,687 |
public void removeFromOtherConfig(Connection c, String key) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "network.remove_from_other_config";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(sess... | void function(Connection c, String key) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; Map response = c.dispatch(method_c... | /**
* Remove the given key and its corresponding value from the other_config field of the given network. If the key is not in that Map, then do nothing.
*
* @param key Key to remove
*/ | Remove the given key and its corresponding value from the other_config field of the given network. If the key is not in that Map, then do nothing | removeFromOtherConfig | {
"repo_name": "mufaddalq/cloudstack-datera-driver",
"path": "deps/XenServerJava/src/com/xensource/xenapi/Network.java",
"license": "apache-2.0",
"size": 30009
} | [
"com.xensource.xenapi.Types",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.xensource.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.xensource.xenapi; java.util; org.apache.xmlrpc; | 2,336,339 |
public ResultSetCacheChunk getQueryCacheChunk(String sql,
Object []args,
int startRow)
{
_queryKey.init(sql, args, startRow);
return _persistenceUnit.getQueryChunk(_queryKey);
} | ResultSetCacheChunk function(String sql, Object []args, int startRow) { _queryKey.init(sql, args, startRow); return _persistenceUnit.getQueryChunk(_queryKey); } | /**
* Returns the cache chunk.
*
* @param sql the SQL for the cache chunk
* @param args the filled parameters for the cache chunk
* @param startRow the starting row for the cache chunk
*/ | Returns the cache chunk | getQueryCacheChunk | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/amber/manager/AmberConnection.java",
"license": "gpl-2.0",
"size": 89822
} | [
"com.caucho.amber.query.ResultSetCacheChunk"
] | import com.caucho.amber.query.ResultSetCacheChunk; | import com.caucho.amber.query.*; | [
"com.caucho.amber"
] | com.caucho.amber; | 2,569,562 |
protected boolean conditionallyAskQuestion(Document document) {
CustomerCreditMemoDocument customerCreditMemoDocument = (CustomerCreditMemoDocument) document;
boolean shouldAskQuestion = customerCreditMemoDocument.getInvoice().hasAtLeastOneDiscount();
if (shouldAskQuestion) {
Str... | boolean function(Document document) { CustomerCreditMemoDocument customerCreditMemoDocument = (CustomerCreditMemoDocument) document; boolean shouldAskQuestion = customerCreditMemoDocument.getInvoice().hasAtLeastOneDiscount(); if (shouldAskQuestion) { String questionText = SpringContext.getBean(ConfigurationService.clas... | /**
* This method checks if there is at least one discount applied to the invoice and generates yes/no question
*
* @param document the maintenance document
* @return
*/ | This method checks if there is at least one discount applied to the invoice and generates yes/no question | conditionallyAskQuestion | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/ar/document/validation/impl/CustomerCreditMemoDocumentPreRules.java",
"license": "apache-2.0",
"size": 2423
} | [
"org.kuali.kfs.module.ar.ArConstants",
"org.kuali.kfs.module.ar.ArKeyConstants",
"org.kuali.kfs.module.ar.document.CustomerCreditMemoDocument",
"org.kuali.kfs.sys.context.SpringContext",
"org.kuali.rice.core.api.config.property.ConfigurationService",
"org.kuali.rice.krad.document.Document"
] | import org.kuali.kfs.module.ar.ArConstants; import org.kuali.kfs.module.ar.ArKeyConstants; import org.kuali.kfs.module.ar.document.CustomerCreditMemoDocument; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.core.api.config.property.ConfigurationService; import org.kuali.rice.krad.document.Document... | import org.kuali.kfs.module.ar.*; import org.kuali.kfs.module.ar.document.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.core.api.config.property.*; import org.kuali.rice.krad.document.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 1,409,838 |
private void firePropertyChanged(PropertyDescriptor property,
Object newValue, Object oldValue) {
boolean notify;
if (alwaysNotifyListeners) {
notify = true;
} else {
notify = false;
if ((newValue != null || oldValue != null)) {
if (newValue == null || oldValue == null
|| !newValue.equals... | void function(PropertyDescriptor property, Object newValue, Object oldValue) { boolean notify; if (alwaysNotifyListeners) { notify = true; } else { notify = false; if ((newValue != null oldValue != null)) { if (newValue == null oldValue == null !newValue.equals(oldValue)) { notify = true; } } } if (notify) { List<Prope... | /**
* Sends a notification about the change of a property provided both values
* are not equal (with respect to the result of <tt>equals(Object)</tt>.
*
* @param property
* the descriptor of the property whose value has changed
* @param newValue
* the new value of the property
* @... | Sends a notification about the change of a property provided both values are not equal (with respect to the result of equals(Object) | firePropertyChanged | {
"repo_name": "janlindblom/sdedit",
"path": "src/net/sf/sdedit/ui/components/configuration/Bean.java",
"license": "bsd-2-clause",
"size": 20018
} | [
"java.beans.PropertyChangeEvent",
"java.beans.PropertyChangeListener",
"java.beans.PropertyDescriptor",
"java.util.LinkedList",
"java.util.List"
] | import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyDescriptor; import java.util.LinkedList; import java.util.List; | import java.beans.*; import java.util.*; | [
"java.beans",
"java.util"
] | java.beans; java.util; | 2,020,387 |
private boolean isCertificateAllowed(final X509Certificate cert) {
return doesNameMatchPattern(cert.getSubjectDN(), this.regExSubjectDnPattern);
} | boolean function(final X509Certificate cert) { return doesNameMatchPattern(cert.getSubjectDN(), this.regExSubjectDnPattern); } | /**
* Checks if is certificate allowed based no the pattern given.
*
* @param cert the cert
* @return true, if certificate allowed
*/ | Checks if is certificate allowed based no the pattern given | isCertificateAllowed | {
"repo_name": "dodok1/cas",
"path": "support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandler.java",
"license": "apache-2.0",
"size": 13213
} | [
"java.security.cert.X509Certificate"
] | import java.security.cert.X509Certificate; | import java.security.cert.*; | [
"java.security"
] | java.security; | 788,147 |
Transport.Connection getConnection(String clusterAlias, String nodeId); | Transport.Connection getConnection(String clusterAlias, String nodeId); | /**
* Returns a connection to the node if connected otherwise and {@link org.elasticsearch.transport.ConnectTransportException} will be
* thrown.
*/ | Returns a connection to the node if connected otherwise and <code>org.elasticsearch.transport.ConnectTransportException</code> will be thrown | getConnection | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/search/SearchPhaseContext.java",
"license": "apache-2.0",
"size": 5630
} | [
"org.elasticsearch.transport.Transport"
] | import org.elasticsearch.transport.Transport; | import org.elasticsearch.transport.*; | [
"org.elasticsearch.transport"
] | org.elasticsearch.transport; | 750,212 |
public void prepareSuperstep(MasterClient masterClient) {
if (LOG.isDebugEnabled()) {
LOG.debug("prepareSuperstep: Start preparing aggregators");
}
// prepare aggregators for master compute
for (AggregatorWrapper<Writable> aggregator : aggregatorMap.values()) {
if (aggregator.isPersistent(... | void function(MasterClient masterClient) { if (LOG.isDebugEnabled()) { LOG.debug(STR); } for (AggregatorWrapper<Writable> aggregator : aggregatorMap.values()) { if (aggregator.isPersistent()) { aggregator.aggregateCurrent(aggregator.getPreviousAggregatedValue()); } aggregator.setPreviousAggregatedValue( aggregator.getC... | /**
* Prepare aggregators for current superstep
*
* @param masterClient IPC client on master
*/ | Prepare aggregators for current superstep | prepareSuperstep | {
"repo_name": "mmaro/giraph",
"path": "giraph-core/src/main/java/org/apache/giraph/master/MasterAggregatorHandler.java",
"license": "apache-2.0",
"size": 13330
} | [
"org.apache.giraph.aggregators.AggregatorWrapper",
"org.apache.giraph.comm.MasterClient",
"org.apache.giraph.utils.MasterLoggingAggregator",
"org.apache.hadoop.io.Writable"
] | import org.apache.giraph.aggregators.AggregatorWrapper; import org.apache.giraph.comm.MasterClient; import org.apache.giraph.utils.MasterLoggingAggregator; import org.apache.hadoop.io.Writable; | import org.apache.giraph.aggregators.*; import org.apache.giraph.comm.*; import org.apache.giraph.utils.*; import org.apache.hadoop.io.*; | [
"org.apache.giraph",
"org.apache.hadoop"
] | org.apache.giraph; org.apache.hadoop; | 776,596 |
private BaseAppDriver getSeleniumGridWebDriver(Configurator configurator) {
//Set Desired Capabilities
DesiredCapabilities capability;
//Set Browser version
String browserVersion = configurator.getBrowserVersion();
//Set Platform to run tests on (Windows, Linux etc)
... | BaseAppDriver function(Configurator configurator) { DesiredCapabilities capability; String browserVersion = configurator.getBrowserVersion(); Platform platform = configurator.getPlatform(); Boolean javascriptEnabled = configurator.getJavascriptStatus(); switch (configurator.getBrowser()) { case FIREFOX: { capability = ... | /**
* Returns an instance of a remote browser to run in Grid configuration
*
* @return RemoteWebDriver as configured in the Configurator
* @throws MalformedURLException
*/ | Returns an instance of a remote browser to run in Grid configuration | getSeleniumGridWebDriver | {
"repo_name": "dvsa/motr-webapp",
"path": "selenium/src/main/java/uk/gov/dvsa/motr/config/webdriver/DriverFactory.java",
"license": "mit",
"size": 10017
} | [
"java.net.MalformedURLException",
"org.openqa.selenium.Platform",
"org.openqa.selenium.firefox.FirefoxDriver",
"org.openqa.selenium.firefox.FirefoxProfile",
"org.openqa.selenium.ie.InternetExplorerDriver",
"org.openqa.selenium.remote.DesiredCapabilities",
"org.openqa.selenium.remote.RemoteWebDriver",
... | import java.net.MalformedURLException; import org.openqa.selenium.Platform; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.ie.InternetExplorerDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.... | import java.net.*; import org.openqa.selenium.*; import org.openqa.selenium.firefox.*; import org.openqa.selenium.ie.*; import org.openqa.selenium.remote.*; import org.testng.*; import uk.gov.dvsa.motr.config.*; import uk.gov.dvsa.motr.logging.*; | [
"java.net",
"org.openqa.selenium",
"org.testng",
"uk.gov.dvsa"
] | java.net; org.openqa.selenium; org.testng; uk.gov.dvsa; | 1,142,944 |
@Override
public String getAddColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc,
String pk, boolean semicolon ) {
if ( databaseDialect != null ) {
return databaseDialect.getAddColumnStatement( tablename, v, tk, use_autoinc, pk, semicolon );
}
return "ALTE... | String function( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon ) { if ( databaseDialect != null ) { return databaseDialect.getAddColumnStatement( tablename, v, tk, use_autoinc, pk, semicolon ); } return STR + tablename + STR + getFieldDefinition( v, tk, pk, use_aut... | /**
* Generates the SQL statement to add a column to the specified table For this generic type, i set it to the most
* common possibility.
*
* @param tablename
* The table to add
* @param v
* The column defined as a value
* @param tk
* the name of the technical key ... | Generates the SQL statement to add a column to the specified table For this generic type, i set it to the most common possibility | getAddColumnStatement | {
"repo_name": "dkincade/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/GenericDatabaseMeta.java",
"license": "apache-2.0",
"size": 26693
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,793,685 |
private void increaseCapacityTo(int newCapacity) {
int l = data.length-pos;
if (l >= newCapacity)
return;
int n = computeNewCapacity(l, newCapacity);
if (n != l) {
Object[] d2 = new Object[n];
System.arraycopy(data, pos, d2, 0, size);
data = d2;
pos = 0;
}
}
/**
* Freezes... | void function(int newCapacity) { int l = data.length-pos; if (l >= newCapacity) return; int n = computeNewCapacity(l, newCapacity); if (n != l) { Object[] d2 = new Object[n]; System.arraycopy(data, pos, d2, 0, size); data = d2; pos = 0; } } /** * Freezes the list. After the first invocation of <code>freeze</code>, the ... | /**
* Adjusts the capacity to the given new size, if it is not large enough yet.
* @param newCapacity the new size
*/ | Adjusts the capacity to the given new size, if it is not large enough yet | increaseCapacityTo | {
"repo_name": "timjansen/actorsguild",
"path": "src/org/actorsguildframework/immutable/FreezableList.java",
"license": "apache-2.0",
"size": 20653
} | [
"java.io.Serializable",
"org.actorsguildframework.ActorRuntimeException",
"org.actorsguildframework.Immutable"
] | import java.io.Serializable; import org.actorsguildframework.ActorRuntimeException; import org.actorsguildframework.Immutable; | import java.io.*; import org.actorsguildframework.*; | [
"java.io",
"org.actorsguildframework"
] | java.io; org.actorsguildframework; | 1,087,249 |
protected String getLookupUrlFromModuleService(Class<?> lookupDataObjectClass, Properties urlParameters) {
String lookupUrl = null;
ModuleService responsibleModuleService =
KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(lookupDataObjectClass);
... | String function(Class<?> lookupDataObjectClass, Properties urlParameters) { String lookupUrl = null; ModuleService responsibleModuleService = KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(lookupDataObjectClass); if (responsibleModuleService != null && responsibleModuleService.isExternalizabl... | /**
* Attempts to find a module service that claims responsibility for the given data object class and if
* found invokes that module service to build the lookup url.
*
* @param lookupDataObjectClass data object class to find responsible module service for
* @param urlParameters properties... | Attempts to find a module service that claims responsibility for the given data object class and if found invokes that module service to build the lookup url | getLookupUrlFromModuleService | {
"repo_name": "jruchcolo/rice-cd",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/web/service/impl/QueryControllerServiceImpl.java",
"license": "apache-2.0",
"size": 13373
} | [
"java.util.Properties",
"org.kuali.rice.krad.service.KRADServiceLocatorWeb",
"org.kuali.rice.krad.service.ModuleService"
] | import java.util.Properties; import org.kuali.rice.krad.service.KRADServiceLocatorWeb; import org.kuali.rice.krad.service.ModuleService; | import java.util.*; import org.kuali.rice.krad.service.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 1,242,164 |
public QName getName() { return NAME; } | public QName getName() { return NAME; } | /**
* Gets the javadoc comment specified in the customization.
* Can be null if none is specified.
*/ | Gets the javadoc comment specified in the customization. Can be null if none is specified | getJavadoc | {
"repo_name": "samskivert/ikvm-openjdk",
"path": "build/linux-amd64/impsrc/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIClass.java",
"license": "gpl-2.0",
"size": 3952
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 2,370,013 |
ClusterStatus getClusterStatus(EnumSet<Option> options) throws IOException; | ClusterStatus getClusterStatus(EnumSet<Option> options) throws IOException; | /**
* Get cluster status with a set of {@link Option} to get desired status.
* @return cluster status
* @throws IOException if a remote or network exception occurs
*/ | Get cluster status with a set of <code>Option</code> to get desired status | getClusterStatus | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 104154
} | [
"java.io.IOException",
"java.util.EnumSet",
"org.apache.hadoop.hbase.ClusterStatus"
] | import java.io.IOException; import java.util.EnumSet; import org.apache.hadoop.hbase.ClusterStatus; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,668,783 |
public static NLClassifier createFromFile(Context context, String modelPath) throws IOException {
return createFromFileAndOptions(context, modelPath, NLClassifierOptions.builder().build());
} | static NLClassifier function(Context context, String modelPath) throws IOException { return createFromFileAndOptions(context, modelPath, NLClassifierOptions.builder().build()); } | /**
* Creates {@link NLClassifier} from default {@link NLClassifierOptions}.
*
* @param context Android context
* @param modelPath path to the classification model relative to asset dir
* @return an {@link NLClassifier} instance
* @throws IOException if model file fails to load
* @throws IllegalArg... | Creates <code>NLClassifier</code> from default <code>NLClassifierOptions</code> | createFromFile | {
"repo_name": "tensorflow/tflite-support",
"path": "tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/text/nlclassifier/NLClassifier.java",
"license": "apache-2.0",
"size": 15949
} | [
"android.content.Context",
"java.io.IOException"
] | import android.content.Context; import java.io.IOException; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 1,398,610 |
public void setTransformationOptions(TransformationOptions options)
{
this.options = options;
}
| void function(TransformationOptions options) { this.options = options; } | /**
* Set the transformation options
*
* @param options the transformation options
*/ | Set the transformation options | setTransformationOptions | {
"repo_name": "daniel-he/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/thumbnail/ThumbnailDefinition.java",
"license": "lgpl-3.0",
"size": 7210
} | [
"org.alfresco.service.cmr.repository.TransformationOptions"
] | import org.alfresco.service.cmr.repository.TransformationOptions; | import org.alfresco.service.cmr.repository.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 2,711,490 |
public long getRemoteReplicaLagFromLocalInBytes(PartitionId partitionId, String hostName, String replicaPath) {
RemoteReplicaInfo remoteReplicaInfo = getRemoteReplicaInfo(partitionId, hostName, replicaPath);
if (remoteReplicaInfo != null) {
return remoteReplicaInfo.getRemoteLagFromLocalInBytes();
}
... | long function(PartitionId partitionId, String hostName, String replicaPath) { RemoteReplicaInfo remoteReplicaInfo = getRemoteReplicaInfo(partitionId, hostName, replicaPath); if (remoteReplicaInfo != null) { return remoteReplicaInfo.getRemoteLagFromLocalInBytes(); } return 0; } | /**
* Gets the replica lag of the remote replica with the local store
* @param partitionId The partition to which the remote replica belongs to
* @param hostName The hostname where the remote replica is present
* @param replicaPath The path of the remote replica on the host
* @return The lag in bytes tha... | Gets the replica lag of the remote replica with the local store | getRemoteReplicaLagFromLocalInBytes | {
"repo_name": "pnarayanan/ambry",
"path": "ambry-replication/src/main/java/com.github.ambry.replication/ReplicationEngine.java",
"license": "apache-2.0",
"size": 24411
} | [
"com.github.ambry.clustermap.PartitionId"
] | import com.github.ambry.clustermap.PartitionId; | import com.github.ambry.clustermap.*; | [
"com.github.ambry"
] | com.github.ambry; | 898,861 |
public ArrayList<ServiceBusNamespace> getNamespaces() {
return this.namespaces;
} | ArrayList<ServiceBusNamespace> function() { return this.namespaces; } | /**
* Optional. The list of namespaces.
* @return The Namespaces value.
*/ | Optional. The list of namespaces | getNamespaces | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-servicebus/src/main/java/com/microsoft/windowsazure/management/servicebus/models/ServiceBusNamespacesResponse.java",
"license": "apache-2.0",
"size": 2117
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,304,382 |
@Test
public void testGetNoStoreEntry() throws Exception {
final Ehcache<String, String> ehcache = this.getEhcache();
assertThat(ehcache.get("key"), is(nullValue()));
verify(this.store).get(eq("key"));
verifyZeroInteractions(this.resilienceStrategy);
validateStats(ehcache, EnumSet.of(CacheOpera... | void function() throws Exception { final Ehcache<String, String> ehcache = this.getEhcache(); assertThat(ehcache.get("key"), is(nullValue())); verify(this.store).get(eq("key")); verifyZeroInteractions(this.resilienceStrategy); validateStats(ehcache, EnumSet.of(CacheOperationOutcomes.GetOutcome.MISS)); } | /**
* Tests the effect of a {@link Ehcache#get(Object)} for
* <ul>
* <li>key not present in {@code Store}</li>
* </ul>
*/ | Tests the effect of a <code>Ehcache#get(Object)</code> for key not present in Store | testGetNoStoreEntry | {
"repo_name": "ljacomet/ehcache3",
"path": "ehcache-core/src/test/java/org/ehcache/core/EhcacheBasicGetTest.java",
"license": "apache-2.0",
"size": 5140
} | [
"java.util.EnumSet",
"org.ehcache.core.statistics.CacheOperationOutcomes",
"org.hamcrest.CoreMatchers",
"org.hamcrest.MatcherAssert",
"org.mockito.Mockito"
] | import java.util.EnumSet; import org.ehcache.core.statistics.CacheOperationOutcomes; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.mockito.Mockito; | import java.util.*; import org.ehcache.core.statistics.*; import org.hamcrest.*; import org.mockito.*; | [
"java.util",
"org.ehcache.core",
"org.hamcrest",
"org.mockito"
] | java.util; org.ehcache.core; org.hamcrest; org.mockito; | 2,328,688 |
public static boolean sameXID (Xid x1, Xid x2)
{
if (x1 == x2)
return true;
else
{
if (x1.getFormatId() == x2.getFormatId())
{
byte[] gtrid1 = x1.getGlobalTransactionId();
byte[] gtrid2 = x2.getGlobalTransactionId();
if (gtrid1.length == gtrid2.length)
{
for (int i = 0; i < gtri... | static boolean function (Xid x1, Xid x2) { if (x1 == x2) return true; else { if (x1.getFormatId() == x2.getFormatId()) { byte[] gtrid1 = x1.getGlobalTransactionId(); byte[] gtrid2 = x2.getGlobalTransactionId(); if (gtrid1.length == gtrid2.length) { for (int i = 0; i < gtrid1.length; i++) { if (gtrid1[i] != gtrid2[i]) r... | /**
* Compares two Xid instances.
*
* @param x1 first Xid
* @param x2 second Xid
*
* @return <code>true</code> if the two instances are the same,
* <code>false</code> otherwise.
*/ | Compares two Xid instances | sameXID | {
"repo_name": "nmcl/scratch",
"path": "graalvm/transactions/fork/narayana/ArjunaJTA/jta/classes/com/arjuna/ats/jta/utils/XAHelper.java",
"license": "apache-2.0",
"size": 5963
} | [
"javax.transaction.xa.Xid"
] | import javax.transaction.xa.Xid; | import javax.transaction.xa.*; | [
"javax.transaction"
] | javax.transaction; | 2,665,821 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<GenericResourceExpandedInner> list(
String filter, String expand, Integer top, Context context) {
return new PagedIterable<>(listAsync(filter, expand, top, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<GenericResourceExpandedInner> function( String filter, String expand, Integer top, Context context) { return new PagedIterable<>(listAsync(filter, expand, top, context)); } | /**
* Get all the resources in a subscription.
*
* @param filter The filter to apply on the operation.<br><br>The properties you can use for eq (equals)
* or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan,
* plan/publis... | Get all the resources in a subscription | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java",
"license": "mit",
"size": 230225
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.resources.fluent.models.GenericResourceExpandedInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.fluent.models.GenericResourceExpandedInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 573,550 |
public final PersonIdent getRefLogIdent() {
return refLogIdent;
} | final PersonIdent function() { return refLogIdent; } | /**
* Returns the identity that should be used for reflog entries when updating
* the destination branch.
* <p>
* The reflog identity may only be set during {@link #run(CodeReviewCommit,
* Collection)}, and this method is invalid to call beforehand.
*
* @return the ref log identity, which may be {@... | Returns the identity that should be used for reflog entries when updating the destination branch. The reflog identity may only be set during <code>#run(CodeReviewCommit, Collection)</code>, and this method is invalid to call beforehand | getRefLogIdent | {
"repo_name": "Seinlin/gerrit",
"path": "gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/SubmitStrategy.java",
"license": "apache-2.0",
"size": 6975
} | [
"org.eclipse.jgit.lib.PersonIdent"
] | import org.eclipse.jgit.lib.PersonIdent; | import org.eclipse.jgit.lib.*; | [
"org.eclipse.jgit"
] | org.eclipse.jgit; | 1,653,445 |
public boolean onPrepareActionMode(ActionMode mode, Menu menu); | boolean function(ActionMode mode, Menu menu); | /**
* Called to refresh an action mode's action menu whenever it is invalidated.
*
* @param mode ActionMode being prepared
* @param menu Menu used to populate action buttons
* @return true if the menu or action mode was updated, false otherwise.
*/ | Called to refresh an action mode's action menu whenever it is invalidated | onPrepareActionMode | {
"repo_name": "Kingjimny/gdmc-mm",
"path": "extra_libs/AppCompatLibrary/src/android/support/v7/view/ActionMode.java",
"license": "apache-2.0",
"size": 10292
} | [
"android.view.Menu"
] | import android.view.Menu; | import android.view.*; | [
"android.view"
] | android.view; | 2,599,045 |
public Enumeration<Global> enumerateGlobal(
) {
return Collections.enumeration(this._globalList);
} | Enumeration<Global> function( ) { return Collections.enumeration(this._globalList); } | /**
* Method enumerateGlobal.
*
* @return an Enumeration over all possible elements of this
* collection
*/ | Method enumerateGlobal | enumerateGlobal | {
"repo_name": "tdefilip/opennms",
"path": "opennms-correlation/drools-correlation-engine/src/main/java/org/opennms/netmgt/correlation/drools/config/RuleSet.java",
"license": "agpl-3.0",
"size": 26206
} | [
"java.util.Collections",
"java.util.Enumeration"
] | import java.util.Collections; import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,420,006 |
boolean release(long version) {
synchronized (mutex) {
SnapshotDeletionPolicy.SnapshotHolder holder = snapshots.get(version);
if (holder == null) {
return false;
}
if (holder.counter <= 0) {
snapshots.remove(version);
... | boolean release(long version) { synchronized (mutex) { SnapshotDeletionPolicy.SnapshotHolder holder = snapshots.get(version); if (holder == null) { return false; } if (holder.counter <= 0) { snapshots.remove(version); return false; } if (--holder.counter == 0) { snapshots.remove(version); } return true; } } static clas... | /**
* Releases the version provided. Returns <tt>true</tt> if the release was successful.
*/ | Releases the version provided. Returns true if the release was successful | release | {
"repo_name": "alexksikes/elasticsearch",
"path": "src/main/java/org/elasticsearch/index/deletionpolicy/SnapshotDeletionPolicy.java",
"license": "apache-2.0",
"size": 8227
} | [
"java.io.IOException",
"org.apache.lucene.index.IndexCommit"
] | import java.io.IOException; import org.apache.lucene.index.IndexCommit; | import java.io.*; import org.apache.lucene.index.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,802,299 |
public Date getEndDate() {
return endDate;
} | Date function() { return endDate; } | /**
* Get endDate <br>
*
* @return Returns the endDate. <br>
*/ | Get endDate | getEndDate | {
"repo_name": "jeromechan/packease-utils-java",
"path": "utils/src/main/java/com/aboutcoder/packease/utils/date/PEDateScope.java",
"license": "mit",
"size": 1407
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,492,700 |
@Cmd("open")
String open(@Arg("datapath|string|Data path") String datapath,
@Arg("journalpath|string|Journal path") String journalpath,
@Arg("volumepath|string|Volume file") String volumepath,
@Arg("rmiport|int:1099:0:99999|RMI Management port") int rmiport,
@Arg(... | @Cmd("open") String open(@Arg(STR) String datapath, @Arg(STR) String journalpath, @Arg(STR) String volumepath, @Arg(STR) int rmiport, @Arg(STR) boolean y) throws Exception { if (_live) { return STR; } close(false); String jpath = journalPath(filesOnPath(journalpath.isEmpty() ? datapath : journalpath)); List<VolumeSpeci... | /**
* Open files on disk and attempt to make a read-only Persistit instance.
* This method does not return a Task and cannot be executed in a live
*
* @param datapath
* @param journalpath
* @param volumepath
* @param rmiport
* @param y
* @return
* @throws Exception
... | Open files on disk and attempt to make a read-only Persistit instance. This method does not return a Task and cannot be executed in a live | open | {
"repo_name": "jaytaylor/persistit",
"path": "src/main/java/com/persistit/CLI.java",
"license": "epl-1.0",
"size": 52466
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Properties",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.Properties; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,218,523 |
public Optional<Long> connectionAcquisitionTime() {
return connectionAcquisitionTime;
} | Optional<Long> function() { return connectionAcquisitionTime; } | /**
* How long did it take to acquire a {@link java.sql.Connection} from the {@link javax.sql.DataSource}, in
* nanoseconds?
*
* @return how long it took to acquire a {@link java.sql.Connection}, if available
*/ | How long did it take to acquire a <code>java.sql.Connection</code> from the <code>javax.sql.DataSource</code>, in nanoseconds | connectionAcquisitionTime | {
"repo_name": "pyranid/pyranid",
"path": "src/main/java/com/pyranid/StatementLog.java",
"license": "apache-2.0",
"size": 12128
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,089,546 |
@Generated
@Selector("beginCustomizingItems:")
public native void beginCustomizingItems(NSArray<? extends UITabBarItem> items); | @Selector(STR) native void function(NSArray<? extends UITabBarItem> items); | /**
* list all items that can be reordered. always animates a sheet up. visible items not listed are fixed in place
*/ | list all items that can be reordered. always animates a sheet up. visible items not listed are fixed in place | beginCustomizingItems | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UITabBar.java",
"license": "apache-2.0",
"size": 30961
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,688,857 |
public static byte[] getIV(Context context, String other, boolean m3_or_m4) throws NoSuchPreferenceFoundException{
String key = null;
if(m3_or_m4){
key = MyPrefFiles.IV;
}
else{
key = MyPrefFiles.IV_FOR_M4;
}
String iv = MyPrefFiles.getMyPreference(MyPrefFiles.COMMAND_SESSION, other + key, context)... | static byte[] function(Context context, String other, boolean m3_or_m4) throws NoSuchPreferenceFoundException{ String key = null; if(m3_or_m4){ key = MyPrefFiles.IV; } else{ key = MyPrefFiles.IV_FOR_M4; } String iv = MyPrefFiles.getMyPreference(MyPrefFiles.COMMAND_SESSION, other + key, context); return Base64.decode(iv... | /**
* Ritorna l'initialization vector per m3 o m4.
*
* @param context
* @param other
* @param m3_or_m4 : se è true si riferisce a m3, altrimenti a m4
* @return
* @throws NoSuchPreferenceFoundException
*/ | Ritorna l'initialization vector per m3 o m4 | getIV | {
"repo_name": "ClaudioRizzo/WatchDog",
"path": "src/it/polimi/dima/watchdog/utilities/MyPrefFiles.java",
"license": "gpl-2.0",
"size": 29422
} | [
"android.content.Context",
"android.util.Base64",
"it.polimi.dima.watchdog.exceptions.NoSuchPreferenceFoundException"
] | import android.content.Context; import android.util.Base64; import it.polimi.dima.watchdog.exceptions.NoSuchPreferenceFoundException; | import android.content.*; import android.util.*; import it.polimi.dima.watchdog.exceptions.*; | [
"android.content",
"android.util",
"it.polimi.dima"
] | android.content; android.util; it.polimi.dima; | 1,912,313 |
@Nonnull
public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() {
final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>();
if(this.probability != null) {
result.add(new com.microsoft.graph.options.FunctionOption("probabil... | java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.probability != null) { result.add(new com.microsoft.graph.options.FunctionOption(STR, probability)); } if(this.degFreedom != null) { result.add(new com.... | /**
* Gets the functions options from the properties that have been set
* @return a list of function options for the request
*/ | Gets the functions options from the properties that have been set | getFunctionOptions | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/WorkbookFunctionsT_InvParameterSet.java",
"license": "mit",
"size": 4366
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,757,009 |
public ServiceCall getComplexItemNullAsync(final ServiceCallback<Map<String, Widget>> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Map<String, Widget>> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Get dictionary of complex type with null item {"0": {"integer": 1, "string": "2"}, "1": null, "2": {"integer": 5, "string": "6"}}.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
... | Get dictionary of complex type with null item {"0": {"integer": 1, "string": "2"}, "1": null, "2": {"integer": 5, "string": "6"}} | getComplexItemNullAsync | {
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java",
"license": "mit",
"size": 172079
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.Map"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,322,914 |
public Locale getFirstMatchingLocale(List<Locale> locales, List<Locale> available) {
Iterator<Locale> i;
// first try a precise match
i = locales.iterator();
while (i.hasNext()) {
Locale locale = i.next();
if (available.contains(locale)) {
// ... | Locale function(List<Locale> locales, List<Locale> available) { Iterator<Locale> i; i = locales.iterator(); while (i.hasNext()) { Locale locale = i.next(); if (available.contains(locale)) { return locale; } } i = locales.iterator(); while (i.hasNext()) { Locale locale = i.next(); if (locale.getVariant().length() > 0) {... | /**
* Returns the first matching locale (eventually simplified) from the available locales.<p>
*
* In case no match is found, code <code>null</code> is returned.<p>
*
* @param locales must be an ascending sorted list of locales in order of preference
* @param available the available locale... | Returns the first matching locale (eventually simplified) from the available locales. In case no match is found, code <code>null</code> is returned | getFirstMatchingLocale | {
"repo_name": "mediaworx/opencms-core",
"path": "src/org/opencms/i18n/CmsLocaleManager.java",
"license": "lgpl-2.1",
"size": 44003
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Locale"
] | import java.util.Iterator; import java.util.List; import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,673,751 |
private void startSchemaChange(SchemaOperation schemaOp) {
assert Thread.holdsLock(stateMux);
assert !schemaOp.started();
// Get current cache state.
SchemaProposeDiscoveryMessage msg = schemaOp.proposeMessage();
String cacheName = msg.operation().cacheName();
Dyna... | void function(SchemaOperation schemaOp) { assert Thread.holdsLock(stateMux); assert !schemaOp.started(); SchemaProposeDiscoveryMessage msg = schemaOp.proposeMessage(); String cacheName = msg.operation().cacheName(); DynamicCacheDescriptor cacheDesc = ctx.cache().cacheDescriptor(cacheName); boolean cacheExists = cacheDe... | /**
* Initiate actual schema change operation.
*
* @param schemaOp Schema operation.
*/ | Initiate actual schema change operation | startSchemaChange | {
"repo_name": "BiryukovVA/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java",
"license": "apache-2.0",
"size": 115527
} | [
"org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor",
"org.apache.ignite.internal.processors.query.schema.SchemaOperationException",
"org.apache.ignite.internal.processors.query.schema.SchemaOperationManager",
"org.apache.ignite.internal.processors.query.schema.SchemaOperationWorker",
"org.a... | import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor; import org.apache.ignite.internal.processors.query.schema.SchemaOperationException; import org.apache.ignite.internal.processors.query.schema.SchemaOperationManager; import org.apache.ignite.internal.processors.query.schema.SchemaOperationWorker... | import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.query.schema.*; import org.apache.ignite.internal.processors.query.schema.message.*; import org.apache.ignite.internal.processors.query.schema.operation.*; import org.apache.ignite.internal.util.typedef.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 275,827 |
public void execute(final Executable executable) {
if (LOG.isDebugEnabled()) {
LOG.debug("submitting executable: " + executable); // NOI18N
}
final Future<Void> future = executor.submit(new Callable<Void>() { | void function(final Executable executable) { if (LOG.isDebugEnabled()) { LOG.debug(STR + executable); } final Future<Void> future = executor.submit(new Callable<Void>() { | /**
* DOCUMENT ME!
*
* @param executable DOCUMENT ME!
*/ | DOCUMENT ME | execute | {
"repo_name": "cismet/cids-custom-sudplan",
"path": "src/main/java/de/cismet/cids/custom/sudplan/ExecutableThreadPool.java",
"license": "lgpl-3.0",
"size": 8772
} | [
"java.util.concurrent.Callable",
"java.util.concurrent.Future"
] | import java.util.concurrent.Callable; import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 268,517 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(CoordinateRange.class)) {
case InitPackage.COORDINATE_RANGE__LOWER_COORDINATE:
case InitPackage.COORDINATE_RANGE__UPPER_COORDINATE:
fireNotifyChanged(new ViewerNotification... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(CoordinateRange.class)) { case InitPackage.COORDINATE_RANGE__LOWER_COORDINATE: case InitPackage.COORDINATE_RANGE__UPPER_COORDINATE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier()... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "diverse-project/k3",
"path": "k3-samples-incomplete/cellular_automata/org.kermeta.language.sample.cellularautomata.rules.initialization.model.edit/src/ruleInit/provider/CoordinateRangeItemProvider.java",
"license": "epl-1.0",
"size": 5820
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,836,565 |
public void done(final PeerAddress ourPeerAddress, final PeerAddress reporter) {
synchronized (lock) {
if (!completedAndNotify()) {
return;
}
this.type = FutureType.OK;
if(this.reporter != null) {
if(!this.reporter.equals(reporter)) {
... | void function(final PeerAddress ourPeerAddress, final PeerAddress reporter) { synchronized (lock) { if (!completedAndNotify()) { return; } this.type = FutureType.OK; if(this.reporter != null) { if(!this.reporter.equals(reporter)) { this.type = FutureType.FAILED; this.reason = STR+this.reporter+STR+reporter+")"; } } thi... | /**
* Gets called if the discovery was a success and another peer could ping us with TCP and UDP.
*
* @param ourPeerAddress
* The peerAddress of our server
* @param reporter
* The peerAddress of the peer that reported our address
*/ | Gets called if the discovery was a success and another peer could ping us with TCP and UDP | done | {
"repo_name": "Biocodr/TomP2P",
"path": "core/src/main/java/net/tomp2p/futures/FutureDiscover.java",
"license": "apache-2.0",
"size": 6999
} | [
"net.tomp2p.peers.PeerAddress"
] | import net.tomp2p.peers.PeerAddress; | import net.tomp2p.peers.*; | [
"net.tomp2p.peers"
] | net.tomp2p.peers; | 2,004,100 |
private static boolean matches(BitSet reference, BitSet query)
{
BitSet cp = (BitSet) reference.clone();
cp.and(query);
if (cp.equals(query)) {
return true;
}
return false;
} | static boolean function(BitSet reference, BitSet query) { BitSet cp = (BitSet) reference.clone(); cp.and(query); if (cp.equals(query)) { return true; } return false; } | /**
* Checks whether query is contained (i.e. subset of a possible sub-structure) of reference
*
* @param reference Reference BitSet
* @param query Query BitSet
* @return true, if query is a subset of reference
* @keyword substructure search
*/ | Checks whether query is contained (i.e. subset of a possible sub-structure) of reference | matches | {
"repo_name": "egonw/openchemlib",
"path": "src/com/actelion/research/chem/FingerPrintGenerator.java",
"license": "bsd-3-clause",
"size": 11801
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,033,584 |
int n = numberOfNodes;
Graph result = new Graph(n, (n * (n - 1)) / 2, 42);
int counter = 0;
try {
for (int i = 0; i < n; i++) {
for (int ii = i + 1; ii < n; ii++) {
result.addEdge(counter++, i, ii, 1);
}
}
result.makeImmutable();
} catch (InvalidGraphExcepti... | int n = numberOfNodes; Graph result = new Graph(n, (n * (n - 1)) / 2, 42); int counter = 0; try { for (int i = 0; i < n; i++) { for (int ii = i + 1; ii < n; ii++) { result.addEdge(counter++, i, ii, 1); } } result.makeImmutable(); } catch (InvalidGraphException e) { fail(STR); } return result; } | /**
* Creates a complete graph with a claimed lower bound of 42.
*
* @param numberOfNodes The number of vertices
* @return The complete graph
*/ | Creates a complete graph with a claimed lower bound of 42 | createCompleteGraph | {
"repo_name": "TiloW/ocm-validator",
"path": "src/test/java/proof/GraphBasedTest.java",
"license": "mit",
"size": 912
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,797,038 |
@Override
public VariableField getVariableField(final String tag) {
final List<VariableField> fields = getVariableFieldsWithLeader();
for (final VariableField field : fields) {
if (fieldMatches(field, tag)) {
return field;
}
}
return null... | VariableField function(final String tag) { final List<VariableField> fields = getVariableFieldsWithLeader(); for (final VariableField field : fields) { if (fieldMatches(field, tag)) { return field; } } return null; } | /**
* Gets the first {@link VariableField} with the supplied tag.
*
* @param tag The tag of the field to be returned
*/ | Gets the first <code>VariableField</code> with the supplied tag | getVariableField | {
"repo_name": "marc4j/marc4j",
"path": "src/org/marc4j/marc/impl/RecordImpl.java",
"license": "lgpl-2.1",
"size": 13729
} | [
"java.util.List",
"org.marc4j.marc.VariableField"
] | import java.util.List; import org.marc4j.marc.VariableField; | import java.util.*; import org.marc4j.marc.*; | [
"java.util",
"org.marc4j.marc"
] | java.util; org.marc4j.marc; | 2,475,619 |
private double getCountTf(final Object gemNr,
final GerinneGeschlFlaechenReportDialog.Art art,
final Integer from,
final Integer till) {
final List<GmdPartObjGeschl> gemList = gemPartMap.get(gemNr);
int count = 0;
for (final GmdPartObjGeschl tmp : gemList... | double function(final Object gemNr, final GerinneGeschlFlaechenReportDialog.Art art, final Integer from, final Integer till) { final List<GmdPartObjGeschl> gemList = gemPartMap.get(gemNr); int count = 0; for (final GmdPartObjGeschl tmp : gemList) { if (tmp.getArt().equals(art.name()) && valueBetween(tmp.getTf(), from, ... | /**
* DOCUMENT ME!
*
* @param gemNr DOCUMENT ME!
* @param art DOCUMENT ME!
* @param from DOCUMENT ME!
* @param till DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getCountTf | {
"repo_name": "cismet/watergis-client",
"path": "src/main/java/de/cismet/watergis/reports/GerinneGFlReport.java",
"license": "lgpl-3.0",
"size": 159735
} | [
"de.cismet.watergis.gui.dialog.GerinneGeschlFlaechenReportDialog",
"de.cismet.watergis.reports.types.GmdPartObjGeschl",
"java.util.List"
] | import de.cismet.watergis.gui.dialog.GerinneGeschlFlaechenReportDialog; import de.cismet.watergis.reports.types.GmdPartObjGeschl; import java.util.List; | import de.cismet.watergis.gui.dialog.*; import de.cismet.watergis.reports.types.*; import java.util.*; | [
"de.cismet.watergis",
"java.util"
] | de.cismet.watergis; java.util; | 489,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.