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
GradoopId getTargetId();
GradoopId getTargetId();
/** * Returns the target vertex identifier. * * @return target vertex id */
Returns the target vertex identifier
getTargetId
{ "repo_name": "Venom590/gradoop", "path": "gradoop-common/src/main/java/org/gradoop/common/model/api/entities/EPGMEdge.java", "license": "gpl-3.0", "size": 1396 }
[ "org.gradoop.common.model.impl.id.GradoopId" ]
import org.gradoop.common.model.impl.id.GradoopId;
import org.gradoop.common.model.impl.id.*;
[ "org.gradoop.common" ]
org.gradoop.common;
1,286,482
void resetRequestResourceResolver(final ResourceResolver resolver) { requestResourceResolver.set(resolver); } // ---------- IOProvider interface -----------------------------------------
void resetRequestResourceResolver(final ResourceResolver resolver) { requestResourceResolver.set(resolver); }
/** * Reset the thread context resource resolver. */
Reset the thread context resource resolver
resetRequestResourceResolver
{ "repo_name": "MRivas-XumaK/slingBuild", "path": "bundles/scripting/jsp/src/main/java/org/apache/sling/scripting/jsp/SlingIOProvider.java", "license": "apache-2.0", "size": 8432 }
[ "org.apache.sling.api.resource.ResourceResolver" ]
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.*;
[ "org.apache.sling" ]
org.apache.sling;
2,854,794
@Override public int reset(int size) throws IOException { int mark = this.buffer.position(); if (size > mark) { size = mark; } if (mark > 0) { this.buffer.position(mark - size); this.count += size; } return size; }
int function(int size) throws IOException { int mark = this.buffer.position(); if (size > mark) { size = mark; } if (mark > 0) { this.buffer.position(mark - size); this.count += size; } return size; }
/** * Moves the source backward within the stream. This ensures that any bytes * read from the last read can be pushed back in to the stream so that they * can be read again. This will throw an exception if the reset can not be * performed. * * @param size * this is the nu...
Moves the source backward within the stream. This ensures that any bytes read from the last read can be pushed back in to the stream so that they can be read again. This will throw an exception if the reset can not be performed
reset
{ "repo_name": "TehSomeLuigi/someluigis-peripherals", "path": "slp_common/org/simpleframework/transport/TransportSource.java", "license": "gpl-3.0", "size": 7920 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,311,034
public Object q(String query) throws IOException, SQLException { if (con != null) { //try { PreparedStatement ps = con.prepareStatement(query); ResultSet rs = ps.executeQuery(); int numberColumns = rs.getMetaData().getColumnCount(); JSEngine.JSMap no = AFCmdBase.jse.getNewMap(null); ...
Object function(String query) throws IOException, SQLException { if (con != null) { PreparedStatement ps = con.prepareStatement(query); ResultSet rs = ps.executeQuery(); int numberColumns = rs.getMetaData().getColumnCount(); JSEngine.JSMap no = AFCmdBase.jse.getNewMap(null); JSEngine.JSList records = AFCmdBase.jse.getN...
/** * <odoc> * <key>DB.q(aQuery) : Map</key> * Performs aQuery (SQL) on the current DB object instance. It returns a Map with a * results array that will have an element per result set line. In case of error an exception will be * thrown. * </odoc> */
DB.q(aQuery) : Map Performs aQuery (SQL) on the current DB object instance. It returns a Map with a results array that will have an element per result set line. In case of error an exception will be thrown.
q
{ "repo_name": "OpenAF/openaf", "path": "src/openaf/core/DB.java", "license": "apache-2.0", "size": 29945 }
[ "java.io.IOException", "java.io.InputStream", "java.io.StringWriter", "java.lang.String", "java.nio.charset.Charset", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "org.apache.commons.io.IOUtils", "org.mozilla.javascript.Scriptable" ]
import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.lang.String; import java.nio.charset.Charset; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.apache.commons.io.IOUtils; import org.mozilla.javascript.Scriptable;
import java.io.*; import java.lang.*; import java.nio.charset.*; import java.sql.*; import org.apache.commons.io.*; import org.mozilla.javascript.*;
[ "java.io", "java.lang", "java.nio", "java.sql", "org.apache.commons", "org.mozilla.javascript" ]
java.io; java.lang; java.nio; java.sql; org.apache.commons; org.mozilla.javascript;
1,160,944
@Test @MediumTest public void testSampledInCrashesForCanaryChannel() throws IOException { // samplingPercentage >= CRASH_DUMP_PERCENTAGE_FOR_STABLE so crashes should never be // sampled-in. testSampleCrashesByChannel(Channel.CANARY, 1, true); } private static class Test...
void function() throws IOException { testSampleCrashesByChannel(Channel.CANARY, 1, true); } private static class TestCrashSamplingMinidumpUploaderDelegate extends AwMinidumpUploaderDelegate { private final boolean mIsSampled; TestCrashSamplingMinidumpUploaderDelegate( SamplingDelegate samplingDelegate, boolean isSample...
/** * Ensure that crash files are sampled-in for CANARY channel. */
Ensure that crash files are sampled-in for CANARY channel
testSampledInCrashesForCanaryChannel
{ "repo_name": "endlessm/chromium-browser", "path": "android_webview/javatests/src/org/chromium/android_webview/test/services/MinidumpUploadJobTest.java", "license": "bsd-3-clause", "size": 21773 }
[ "java.io.IOException", "org.chromium.android_webview.services.AwMinidumpUploaderDelegate", "org.chromium.components.version_info.Channel" ]
import java.io.IOException; import org.chromium.android_webview.services.AwMinidumpUploaderDelegate; import org.chromium.components.version_info.Channel;
import java.io.*; import org.chromium.android_webview.services.*; import org.chromium.components.version_info.*;
[ "java.io", "org.chromium.android_webview", "org.chromium.components" ]
java.io; org.chromium.android_webview; org.chromium.components;
1,161,043
private void removeAllAssignments() { List<ResourceAssignment> copy = new ArrayList<ResourceAssignment>(myAssignments); for (int i = 0; i < copy.size(); i++) { ResourceAssignmentImpl next = (ResourceAssignmentImpl) copy.get(i); next.myAssignmentToTask.delete(); } resetLoads(); }
void function() { List<ResourceAssignment> copy = new ArrayList<ResourceAssignment>(myAssignments); for (int i = 0; i < copy.size(); i++) { ResourceAssignmentImpl next = (ResourceAssignmentImpl) copy.get(i); next.myAssignmentToTask.delete(); } resetLoads(); }
/** * Removes the assignment objects associated to this ProjectResource and those * associated to it's Tasks */
Removes the assignment objects associated to this ProjectResource and those associated to it's Tasks
removeAllAssignments
{ "repo_name": "Prasad1337/GANTTing", "path": "ganttproject/src/net/sourceforge/ganttproject/resource/HumanResource.java", "license": "gpl-2.0", "size": 9141 }
[ "java.util.ArrayList", "java.util.List", "net.sourceforge.ganttproject.task.ResourceAssignment" ]
import java.util.ArrayList; import java.util.List; import net.sourceforge.ganttproject.task.ResourceAssignment;
import java.util.*; import net.sourceforge.ganttproject.task.*;
[ "java.util", "net.sourceforge.ganttproject" ]
java.util; net.sourceforge.ganttproject;
1,220,686
public java.sql.Blob getBlob(int columnIndex) throws SQLException { if (!this.isBinaryEncoded) { checkRowPos(); checkColumnBounds(columnIndex); int columnIndexMinusOne = columnIndex - 1; if (this.thisRow.isNull(columnIndexMinusOne)) { this.wasNullFlag = true; } else { this.wasNullFlag ...
java.sql.Blob function(int columnIndex) throws SQLException { if (!this.isBinaryEncoded) { checkRowPos(); checkColumnBounds(columnIndex); int columnIndexMinusOne = columnIndex - 1; if (this.thisRow.isNull(columnIndexMinusOne)) { this.wasNullFlag = true; } else { this.wasNullFlag = false; } if (this.wasNullFlag) { retur...
/** * JDBC 2.0 Get a BLOB column. * * @param columnIndex * the first column is 1, the second is 2, ... * * @return an object representing a BLOB * * @throws SQLException * if an error occurs. */
JDBC 2.0 Get a BLOB column
getBlob
{ "repo_name": "Ytrio/Project-RPG-Story", "path": "mysql-connector-java-5.1.23/mysql-connector-java-5.1.23/src/com/mysql/jdbc/ResultSetImpl.java", "license": "gpl-2.0", "size": 246055 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
436,935
public void writeElement(double[] array) throws IOException { this.writePrimitiveElementTag(MatlabDataType.DOUBLE, array.length); this.writeDoubles(array); }
void function(double[] array) throws IOException { this.writePrimitiveElementTag(MatlabDataType.DOUBLE, array.length); this.writeDoubles(array); }
/** * Writes a <code>double</code> MATLAB element to the underlying stream. * @param array The array of <code>double</code> values to write. * @throws IOException if writing to the underlying stream fails. */
Writes a <code>double</code> MATLAB element to the underlying stream
writeElement
{ "repo_name": "bwkimmel/jmist", "path": "jmist-core/src/main/java/ca/eandb/jmist/util/matlab/MatlabOutputStream.java", "license": "mit", "size": 59813 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,253,764
protected float calculateMultiplier(Dimension size) { Shape shape = getShape(); Area base = new Area(shape); AffineTransform transform = new AffineTransform(); Rectangle2D r = ShapeBounds.getBounds(base); transform.translate(size.width / 2f - r.getCenterX(), size.height / 2f - r.getCenterY()); base.t...
float function(Dimension size) { Shape shape = getShape(); Area base = new Area(shape); AffineTransform transform = new AffineTransform(); Rectangle2D r = ShapeBounds.getBounds(base); transform.translate(size.width / 2f - r.getCenterX(), size.height / 2f - r.getCenterY()); base.transform(transform); r = ShapeBounds.get...
/** * Calculating the scaling ratio for the shape to fit the dimensions * provided. */
Calculating the scaling ratio for the shape to fit the dimensions provided
calculateMultiplier
{ "repo_name": "mickleness/pumpernickel", "path": "src/main/java/com/pump/image/transition/AbstractShapeTransition2D.java", "license": "mit", "size": 4628 }
[ "com.pump.geom.ShapeBounds", "java.awt.Dimension", "java.awt.Shape", "java.awt.geom.AffineTransform", "java.awt.geom.Area", "java.awt.geom.Rectangle2D" ]
import com.pump.geom.ShapeBounds; import java.awt.Dimension; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Area; import java.awt.geom.Rectangle2D;
import com.pump.geom.*; import java.awt.*; import java.awt.geom.*;
[ "com.pump.geom", "java.awt" ]
com.pump.geom; java.awt;
2,301,080
@Test public void testAddAnnotation() { // test Handler OpenConfigTransceiverHandler transceiver = new OpenConfigTransceiverHandler(parent); // call addAnnotation transceiver.addAnnotation("name", "value"); // get annotatedNodeInfos List<AnnotatedNodeInfo> annot...
void function() { OpenConfigTransceiverHandler transceiver = new OpenConfigTransceiverHandler(parent); transceiver.addAnnotation("name", "value"); List<AnnotatedNodeInfo> annotatedNodeInfos = new ArrayList<AnnotatedNodeInfo>(); try { Field field = OpenConfigObjectHandler.class.getDeclaredField(STR); field.setAccessible...
/** * UnitTest method for addAnnotation. */
UnitTest method for addAnnotation
testAddAnnotation
{ "repo_name": "opennetworkinglab/onos", "path": "apps/odtn/api/src/test/java/org/onosproject/odtn/utils/openconfig/OpenConfigTransceiverHandlerTest.java", "license": "apache-2.0", "size": 8265 }
[ "java.lang.reflect.Field", "java.util.ArrayList", "java.util.List", "org.junit.Assert", "org.onosproject.yang.runtime.AnnotatedNodeInfo" ]
import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.onosproject.yang.runtime.AnnotatedNodeInfo;
import java.lang.reflect.*; import java.util.*; import org.junit.*; import org.onosproject.yang.runtime.*;
[ "java.lang", "java.util", "org.junit", "org.onosproject.yang" ]
java.lang; java.util; org.junit; org.onosproject.yang;
1,453,219
private Size getOptimalSize(List<Size> sizes, int w, int h) { if (sizes == null) return null; // optimal size should be the closest to the required; it could be checked by squares Size optimalSize = sizes.get(0); for (Size size : sizes) if (Math.abs(w*h - size.wid...
Size function(List<Size> sizes, int w, int h) { if (sizes == null) return null; Size optimalSize = sizes.get(0); for (Size size : sizes) if (Math.abs(w*h - size.width*size.height) <= Math.abs(w*h - optimalSize.width*optimalSize.height)) optimalSize = size; return optimalSize; }
/** * Looks through collection of supported by camera sizes and returns the most suitable. */
Looks through collection of supported by camera sizes and returns the most suitable
getOptimalSize
{ "repo_name": "janng0/Android-J0Widget", "path": "src/main/java/ru/jango/j0widget/camera/CameraPreview.java", "license": "mit", "size": 6989 }
[ "android.hardware.Camera", "java.util.List" ]
import android.hardware.Camera; import java.util.List;
import android.hardware.*; import java.util.*;
[ "android.hardware", "java.util" ]
android.hardware; java.util;
2,007,606
public Logger getLog(WorkDirectory wd, String key) throws NoSuchLogFault { if (gpls == null) throw new NoSuchLogFault(i18n, "ts.logger.nologscreated", key); if (wd == null) throw new NullPointerException(i18n.getString("ts.logger.nullwd")); String logFile = wd.getLo...
Logger function(WorkDirectory wd, String key) throws NoSuchLogFault { if (gpls == null) throw new NoSuchLogFault(i18n, STR, key); if (wd == null) throw new NullPointerException(i18n.getString(STR)); String logFile = wd.getLogFileName(); for (int i = 0; i < gpls.size(); i++) { GeneralPurposeLogger logger = gpls.get(i); ...
/** * Returns general purpose logger with given key registered for given WorkDirectory. * The log should be created first. * @param wd WorkDirectory desired logger is registered for * @param key key for this log * @return general purpose logger with given key registered for given WorkDirectory ...
Returns general purpose logger with given key registered for given WorkDirectory. The log should be created first
getLog
{ "repo_name": "Distrotech/icedtea7", "path": "test/jtreg/com/sun/javatest/TestSuite.java", "license": "gpl-2.0", "size": 52273 }
[ "java.util.logging.Logger" ]
import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,244,401
public boolean isPureTranslation() { if (isPureCrystalTranslation()) return true; if (SpaceGroup.deltaComp(matTransform.m00,1,SpaceGroup.DELTA) && SpaceGroup.deltaComp(matTransform.m01,0,SpaceGroup.DELTA) && SpaceGroup.deltaComp(matTransform.m02,0,SpaceGroup.DELTA) && SpaceGroup.deltaComp(matTransfo...
boolean function() { if (isPureCrystalTranslation()) return true; if (SpaceGroup.deltaComp(matTransform.m00,1,SpaceGroup.DELTA) && SpaceGroup.deltaComp(matTransform.m01,0,SpaceGroup.DELTA) && SpaceGroup.deltaComp(matTransform.m02,0,SpaceGroup.DELTA) && SpaceGroup.deltaComp(matTransform.m10,0,SpaceGroup.DELTA) && SpaceG...
/** * Tells whether this transformation is a pure translation: * either a pure crystal (lattice) translation or a fractional (within * unit cell) translation: space groups Ixxx, Cxxx, Fxxx have operators * with fractional translations within the unit cell. * @return */
Tells whether this transformation is a pure translation: either a pure crystal (lattice) translation or a fractional (within unit cell) translation: space groups Ixxx, Cxxx, Fxxx have operators with fractional translations within the unit cell
isPureTranslation
{ "repo_name": "fionakim/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/xtal/CrystalTransform.java", "license": "lgpl-2.1", "size": 13822 }
[ "java.lang.Math" ]
import java.lang.Math;
import java.lang.*;
[ "java.lang" ]
java.lang;
1,782,066
public DcmElement putLO(int tag, String[] values) { return put(values != null ? StringElement.createLO(tag, values, getSpecificCharacterSet()) : StringElement.createLO(tag)); }
DcmElement function(int tag, String[] values) { return put(values != null ? StringElement.createLO(tag, values, getSpecificCharacterSet()) : StringElement.createLO(tag)); }
/** * Description of the Method * * @param tag * Description of the Parameter * @param values * Description of the Parameter * @return Description of the Return Value */
Description of the Method
putLO
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4che14/branches/DCM4CHE_2_14_22_BRANCHA/src/java/org/dcm4cheri/data/DcmObjectImpl.java", "license": "apache-2.0", "size": 86392 }
[ "org.dcm4che.data.DcmElement" ]
import org.dcm4che.data.DcmElement;
import org.dcm4che.data.*;
[ "org.dcm4che.data" ]
org.dcm4che.data;
2,695,309
public void renderParticle(VertexBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) { }
void function(VertexBuffer worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) { }
/** * Renders the particle */
Renders the particle
renderParticle
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/client/particle/ParticleFirework.java", "license": "gpl-3.0", "size": 19736 }
[ "net.minecraft.client.renderer.VertexBuffer", "net.minecraft.entity.Entity" ]
import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.entity.Entity;
import net.minecraft.client.renderer.*; import net.minecraft.entity.*;
[ "net.minecraft.client", "net.minecraft.entity" ]
net.minecraft.client; net.minecraft.entity;
1,006,113
PartitionResponse createReplyProcessor(PartitionedRegion r, Set recipients) { return new PartitionResponse(r.getSystem(), recipients); }
PartitionResponse createReplyProcessor(PartitionedRegion r, Set recipients) { return new PartitionResponse(r.getSystem(), recipients); }
/** * return a new reply processor for this class, for use in relaying a response. This <b>must</b> * be an instance method so subclasses can override it properly. */
return a new reply processor for this class, for use in relaying a response. This must be an instance method so subclasses can override it properly
createReplyProcessor
{ "repo_name": "charliemblack/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionMessage.java", "license": "apache-2.0", "size": 31476 }
[ "java.util.Set", "org.apache.geode.internal.cache.PartitionedRegion" ]
import java.util.Set; import org.apache.geode.internal.cache.PartitionedRegion;
import java.util.*; import org.apache.geode.internal.cache.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
2,908,204
public void registerInstanceMethod(final MetaMethod metaMethod) { final boolean inited = this.initCalled; performOperationOnMetaClass(() -> { String methodName = metaMethod.getName(); checkIfGroovyObjectMethod(metaMethod); MethodKey key = new DefaultCachedMethodKe...
void function(final MetaMethod metaMethod) { final boolean inited = this.initCalled; performOperationOnMetaClass(() -> { String methodName = metaMethod.getName(); checkIfGroovyObjectMethod(metaMethod); MethodKey key = new DefaultCachedMethodKey(theClass, methodName, metaMethod.getParameterTypes(), false); if (isInitial...
/** * Registers a new instance method for the given method name and closure on this MetaClass * * @param metaMethod */
Registers a new instance method for the given method name and closure on this MetaClass
registerInstanceMethod
{ "repo_name": "paulk-asert/groovy", "path": "src/main/java/groovy/lang/ExpandoMetaClass.java", "license": "apache-2.0", "size": 60706 }
[ "org.codehaus.groovy.runtime.DefaultCachedMethodKey", "org.codehaus.groovy.runtime.MethodKey" ]
import org.codehaus.groovy.runtime.DefaultCachedMethodKey; import org.codehaus.groovy.runtime.MethodKey;
import org.codehaus.groovy.runtime.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
2,841,649
@JsonProperty("identificacaoEstrangeiro") public IdentificacaoEstrangeiro getIdentificacaoEstrangeiro() { return identificacaoEstrangeiro; }
@JsonProperty(STR) IdentificacaoEstrangeiro function() { return identificacaoEstrangeiro; }
/** * Get identificacaoEstrangeiro * @return identificacaoEstrangeiro **/
Get identificacaoEstrangeiro
getIdentificacaoEstrangeiro
{ "repo_name": "samuelfac/portalunico.siscomex.gov.br", "path": "src/main/java/br/gov/siscomex/portalunico/cct_ext/model/Destinatario.java", "license": "mit", "size": 4089 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
775,909
public RedisResourceInner create(String resourceGroupName, String name, RedisCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); }
RedisResourceInner function(String resourceGroupName, String name, RedisCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); }
/** * Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. * * @param resourceGroupName The name of the resource group. * @param name The name of the Redis cache. * @param parameters Parameters supplied to the Create Redis operation. * @throws IllegalArg...
Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache
create
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/redis/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/redis/v2018_03_01/implementation/RedisInner.java", "license": "mit", "size": 110186 }
[ "com.microsoft.azure.management.redis.v2018_03_01.RedisCreateParameters" ]
import com.microsoft.azure.management.redis.v2018_03_01.RedisCreateParameters;
import com.microsoft.azure.management.redis.v2018_03_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,768,309
boolean supports(Overlay overlay, Figure figure);
boolean supports(Overlay overlay, Figure figure);
/** * Determines whether the adapter can handle a particular overlay, or overlay * / figure combination. * * @param overlay - an overlay that might be editable * @param figure - a figure that will be either updated by the overlay or will * update the overlay. The figure can be null: this indicates...
Determines whether the adapter can handle a particular overlay, or overlay figure combination
supports
{ "repo_name": "imagej/imagej-ui-swing", "path": "src/main/java/net/imagej/ui/swing/overlay/JHotDrawAdapter.java", "license": "bsd-2-clause", "size": 4257 }
[ "net.imagej.overlay.Overlay", "org.jhotdraw.draw.Figure" ]
import net.imagej.overlay.Overlay; import org.jhotdraw.draw.Figure;
import net.imagej.overlay.*; import org.jhotdraw.draw.*;
[ "net.imagej.overlay", "org.jhotdraw.draw" ]
net.imagej.overlay; org.jhotdraw.draw;
2,767,577
private boolean enable(boolean initReporter) { try { if (alarmInterface == null) { boolean valido = (email != null && email.getMail() != null && email.getPassword() != null && email.getSmtpAddres() != null && email.getSmtpPort() != null && email.getIssue() != null && email.getAddress...
boolean function(boolean initReporter) { try { if (alarmInterface == null) { boolean valido = (email != null && email.getMail() != null && email.getPassword() != null && email.getSmtpAddres() != null && email.getSmtpPort() != null && email.getIssue() != null && email.getAddressee() != null); if (valido) { this.setAlarm...
/** * Inicializa el AlarmReporter interno y carga las metricas del archivo en * el AlarmReporter * * @param initReporter * indica si de inizializa el start o no (false: solo para test) * @return true, if successful */
Inicializa el AlarmReporter interno y carga las metricas del archivo en el AlarmReporter
enable
{ "repo_name": "snoopconsulting/metrics-alarms", "path": "reporter-config-snoop/src/main/java/com/snoopconsulting/idi/metrics/config/AlarmReporterConfig.java", "license": "apache-2.0", "size": 6199 }
[ "com.snoopconsulting.idi.metrics.alarm.AlarmConfig", "com.snoopconsulting.idi.metrics.alarm.AlarmReporter", "com.snoopconsulting.idi.metrics.alarm.util.EmailAlarm", "com.yammer.metrics.Metrics" ]
import com.snoopconsulting.idi.metrics.alarm.AlarmConfig; import com.snoopconsulting.idi.metrics.alarm.AlarmReporter; import com.snoopconsulting.idi.metrics.alarm.util.EmailAlarm; import com.yammer.metrics.Metrics;
import com.snoopconsulting.idi.metrics.alarm.*; import com.snoopconsulting.idi.metrics.alarm.util.*; import com.yammer.metrics.*;
[ "com.snoopconsulting.idi", "com.yammer.metrics" ]
com.snoopconsulting.idi; com.yammer.metrics;
2,872,356
RepositoryVersionEntity repositoryEntity = null; // !!! try to find the component repo first if (null != component) { repositoryEntity = component.getDesiredRepositoryVersion(); } else { LOG.info("Service component not passed in, attempt to resolve the repository for cluster {}", cl...
RepositoryVersionEntity repositoryEntity = null; if (null != component) { repositoryEntity = component.getDesiredRepositoryVersion(); } else { LOG.info(STR, cluster.getClusterName()); } if (null == repositoryEntity && null != component) { try { Service service = cluster.getService(component.getServiceName()); repositor...
/** * Checks repo URLs against the current version for the cluster and make * adjustments to the Base URL when the current is different. * * @param cluster {@link Cluster} object * @param component resolve {@link RepositoryVersionEntity} for the component, could be {@code null} * * @return {@link R...
Checks repo URLs against the current version for the cluster and make adjustments to the Base URL when the current is different
getRepositoryVersionEntity
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java", "license": "apache-2.0", "size": 31494 }
[ "org.apache.ambari.server.AmbariException", "org.apache.ambari.server.controller.spi.SystemException", "org.apache.ambari.server.orm.entities.RepositoryVersionEntity", "org.apache.ambari.server.state.Service" ]
import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.orm.entities.RepositoryVersionEntity; import org.apache.ambari.server.state.Service;
import org.apache.ambari.server.*; import org.apache.ambari.server.controller.spi.*; import org.apache.ambari.server.orm.entities.*; import org.apache.ambari.server.state.*;
[ "org.apache.ambari" ]
org.apache.ambari;
1,677,654
@Override public boolean isSupported(Node candidateRootNode) { return true; }
boolean function(Node candidateRootNode) { return true; }
/** * Indicates whether a given node is supported as a root node for this * tabular viewer. * * @param candidateRootNode The candidate root node. * * @return */
Indicates whether a given node is supported as a root node for this tabular viewer
isSupported
{ "repo_name": "APriestman/autopsy", "path": "Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java", "license": "apache-2.0", "size": 35614 }
[ "org.openide.nodes.Node" ]
import org.openide.nodes.Node;
import org.openide.nodes.*;
[ "org.openide.nodes" ]
org.openide.nodes;
611,137
public Vertex postXML(String url, Vertex xmlObject, Network network) { log("POST XML", Level.INFO, url); try { String data = convertToXML(xmlObject); log("POST XML", Level.FINE, data); String xml = Utils.httpPOST(url, "application/xml", data); log("XML", Level.FINE, xml); InputStream stream = new ...
Vertex function(String url, Vertex xmlObject, Network network) { log(STR, Level.INFO, url); try { String data = convertToXML(xmlObject); log(STR, Level.FINE, data); String xml = Utils.httpPOST(url, STR, data); log("XML", Level.FINE, xml); InputStream stream = new ByteArrayInputStream(xml.getBytes("utf-8")); Element ele...
/** * Post the XML document object and return the XML data from the URL. */
Post the XML document object and return the XML data from the URL
postXML
{ "repo_name": "BOTlibre/BOTlibre", "path": "micro-ai-engine/android/source/org/botlibre/sense/http/Http.java", "license": "epl-1.0", "size": 46787 }
[ "java.io.ByteArrayInputStream", "java.io.InputStream", "java.util.logging.Level", "org.botlibre.api.knowledge.Network", "org.botlibre.api.knowledge.Vertex", "org.botlibre.util.Utils", "org.w3c.dom.Element" ]
import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.logging.Level; import org.botlibre.api.knowledge.Network; import org.botlibre.api.knowledge.Vertex; import org.botlibre.util.Utils; import org.w3c.dom.Element;
import java.io.*; import java.util.logging.*; import org.botlibre.api.knowledge.*; import org.botlibre.util.*; import org.w3c.dom.*;
[ "java.io", "java.util", "org.botlibre.api", "org.botlibre.util", "org.w3c.dom" ]
java.io; java.util; org.botlibre.api; org.botlibre.util; org.w3c.dom;
460,975
EOperation getEdge__HashCode();
EOperation getEdge__HashCode();
/** * Returns the meta object for the '{@link ocldependencyanalysis.graph2.Edge#hashCode() <em>Hash Code</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the '<em>Hash Code</em>' operation. * @see ocldependencyanalysis.graph2.Edge#hashCode() * @generated */
Returns the meta object for the '<code>ocldependencyanalysis.graph2.Edge#hashCode() Hash Code</code>' operation.
getEdge__HashCode
{ "repo_name": "adolfosbh/cs2as", "path": "oclDependencyAnalysis/emf-gen/ocldependencyanalysis/graph2/GraphPackage.java", "license": "epl-1.0", "size": 15474 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,320,439
public Builder putAllExtraParam(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; }
Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; }
/** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link SessionCreateParams.PaymentMethodOptions.AcssDebit#extraParams} for the * field docume...
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>SessionCreateParams.PaymentMethodOptions.AcssDebit#extraParams</code> for the field documentation
putAllExtraParam
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/checkout/SessionCreateParams.java", "license": "mit", "size": 222478 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,385,452
public final Property<String> name() { return metaBean().name().createProperty(this); }
final Property<String> function() { return metaBean().name().createProperty(this); }
/** * Gets the the {@code name} property. * This field must not be null for the object to be valid. * @return the property, not null */
Gets the the name property. This field must not be null for the object to be valid
name
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Master/src/main/java/com/opengamma/master/portfolio/ManageablePortfolio.java", "license": "apache-2.0", "size": 13916 }
[ "org.joda.beans.Property" ]
import org.joda.beans.Property;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
34,552
Optional<MethodDefinition> getMethodDefinition();
Optional<MethodDefinition> getMethodDefinition();
/** * Returns the method definition being invoked, or {@code Optional.empty()} if method name was not recognized. */
Returns the method definition being invoked, or Optional.empty() if method name was not recognized
getMethodDefinition
{ "repo_name": "dnault/therapi-json-rpc", "path": "src/main/java/com/github/therapi/jsonrpc/JsonRpcLogger.java", "license": "apache-2.0", "size": 1449 }
[ "com.github.therapi.core.MethodDefinition", "java.util.Optional" ]
import com.github.therapi.core.MethodDefinition; import java.util.Optional;
import com.github.therapi.core.*; import java.util.*;
[ "com.github.therapi", "java.util" ]
com.github.therapi; java.util;
2,049,410
public static double[] sample(UnivariateRealFunction f, double min, double max, int n) throws FunctionEvaluationException, IllegalArgumentException { if (n <= 0) { throw MathRuntimeException.createIllegalArgumentException( "num...
static double[] function(UnivariateRealFunction f, double min, double max, int n) throws FunctionEvaluationException, IllegalArgumentException { if (n <= 0) { throw MathRuntimeException.createIllegalArgumentException( STR, n); } verifyInterval(min, max); double s[] = new double[n]; double h = (max - min) / n; for (int ...
/** * Sample the given univariate real function on the given interval. * <p> * The interval is divided equally into N sections and sample points * are taken from min to max-(max-min)/N. Usually f(x) is periodic * such that f(min) = f(max) (note max is not sampled), but we don't * req...
Sample the given univariate real function on the given interval. The interval is divided equally into N sections and sample points are taken from min to max-(max-min)/N. Usually f(x) is periodic such that f(min) = f(max) (note max is not sampled), but we don't require that
sample
{ "repo_name": "SpoonLabs/astor", "path": "examples/Math-issue-288/src/main/java/org/apache/commons/math/transform/FastFourierTransformer.java", "license": "gpl-2.0", "size": 35221 }
[ "org.apache.commons.math.FunctionEvaluationException", "org.apache.commons.math.MathRuntimeException", "org.apache.commons.math.analysis.UnivariateRealFunction" ]
import org.apache.commons.math.FunctionEvaluationException; import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.analysis.UnivariateRealFunction;
import org.apache.commons.math.*; import org.apache.commons.math.analysis.*;
[ "org.apache.commons" ]
org.apache.commons;
1,634,900
public static Response update( Equipo equipo ) { try { equipoFacade.update(equipo); return Response.status(Response.Status.OK).entity( null ).build(); } catch (Exception e) { LOGGER.error("Error al actualizar el equipo. ", e); return Response.status(Response.Status.PRECONDITION_FAILED).e...
static Response function( Equipo equipo ) { try { equipoFacade.update(equipo); return Response.status(Response.Status.OK).entity( null ).build(); } catch (Exception e) { LOGGER.error(STR, e); return Response.status(Response.Status.PRECONDITION_FAILED).entity(null).build(); } }
/** * Lista los equipos del sistema * @return */
Lista los equipos del sistema
update
{ "repo_name": "dmaldonadol/adm-ceppi", "path": "ws/ceppi-web/src/main/java/cl/ml/ceppi/web/logic/EquipoLogic.java", "license": "mit", "size": 4066 }
[ "cl.ml.ceppi.core.model.equipo.Equipo", "javax.ws.rs.core.Response" ]
import cl.ml.ceppi.core.model.equipo.Equipo; import javax.ws.rs.core.Response;
import cl.ml.ceppi.core.model.equipo.*; import javax.ws.rs.core.*;
[ "cl.ml.ceppi", "javax.ws" ]
cl.ml.ceppi; javax.ws;
1,836,419
@GET @Path("accounts/{address}/orders") RippleAccountOrders openAccountOrders(@PathParam("address") final String address) throws IOException, RippleException;
@Path(STR) RippleAccountOrders openAccountOrders(@PathParam(STR) final String address) throws IOException, RippleException;
/** * Returns the account information for this address. */
Returns the account information for this address
openAccountOrders
{ "repo_name": "gaborkolozsy/XChange", "path": "xchange-ripple/src/main/java/org/knowm/xchange/ripple/RipplePublic.java", "license": "mit", "size": 3576 }
[ "java.io.IOException", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "org.knowm.xchange.ripple.dto.RippleException", "org.knowm.xchange.ripple.dto.trade.RippleAccountOrders" ]
import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.knowm.xchange.ripple.dto.RippleException; import org.knowm.xchange.ripple.dto.trade.RippleAccountOrders;
import java.io.*; import javax.ws.rs.*; import org.knowm.xchange.ripple.dto.*; import org.knowm.xchange.ripple.dto.trade.*;
[ "java.io", "javax.ws", "org.knowm.xchange" ]
java.io; javax.ws; org.knowm.xchange;
58,461
public static DoubleVector minimizeFunction(CostFunction f, DoubleVector theta, int maxIterations, boolean verbose) { return new OWLQN().minimize(f, theta, maxIterations, verbose); }
static DoubleVector function(CostFunction f, DoubleVector theta, int maxIterations, boolean verbose) { return new OWLQN().minimize(f, theta, maxIterations, verbose); }
/** * Minimizes the given cost function with L-BFGS. * * @param f the costfunction to minimize. * @param theta the initial weights. * @param maxIterations the maximum amount of iterations. * @param verbose true if progress output shall be printed. * @return t...
Minimizes the given cost function with L-BFGS
minimizeFunction
{ "repo_name": "thomasjungblut/thomasjungblut-common", "path": "src/main/java/de/jungblut/math/minimize/OWLQN.java", "license": "apache-2.0", "size": 12894 }
[ "de.jungblut.math.DoubleVector" ]
import de.jungblut.math.DoubleVector;
import de.jungblut.math.*;
[ "de.jungblut.math" ]
de.jungblut.math;
626,733
Set<E> createElementSet() { return new ElementSet(); }
Set<E> createElementSet() { return new ElementSet(); }
/** * Creates a new instance of this multiset's element set, which will be * returned by {@link #elementSet()}. */
Creates a new instance of this multiset's element set, which will be returned by <code>#elementSet()</code>
createElementSet
{ "repo_name": "wolffcm/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/collect/AbstractMultiset.java", "license": "agpl-3.0", "size": 5796 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,050,222
public static String format(String format, Object ... args) { return new Formatter().format(format, args).toString(); }
static String function(String format, Object ... args) { return new Formatter().format(format, args).toString(); }
/** * Returns a formatted string using the specified format string and * arguments. * * <p> The locale always used is the one returned by {@link * java.util.Locale#getDefault() Locale.getDefault()}. * * @param format * A <a href="../util/Formatter.html#syntax">format str...
Returns a formatted string using the specified format string and arguments. The locale always used is the one returned by <code>java.util.Locale#getDefault() Locale.getDefault()</code>
format
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jdk/src/share/classes/java/lang/String.java", "license": "gpl-2.0", "size": 122986 }
[ "java.util.Formatter" ]
import java.util.Formatter;
import java.util.*;
[ "java.util" ]
java.util;
2,797,609
public final Set<Filter> getFilters() { return Collections.unmodifiableSet(filterImages.keySet()); }
final Set<Filter> function() { return Collections.unmodifiableSet(filterImages.keySet()); }
/** * Returns an unmodifiable Set view of the Filters that will have an effect * on this SpriteSheet's Sprites when applied to them with draw(). * @return The Set of Filters that will have an effect on this SpriteSheet's * Sprites when applied to them with draw() */
Returns an unmodifiable Set view of the Filters that will have an effect on this SpriteSheet's Sprites when applied to them with draw()
getFilters
{ "repo_name": "742mph/Ironclad2D", "path": "src/org/cell2d/SpriteSheet.java", "license": "gpl-3.0", "size": 16760 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,739,427
public void testTimedOfferNull() throws InterruptedException { final BlockingQueue q = emptyCollection(); long startTime = System.nanoTime(); try { q.offer(null, LONG_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (NullPointerException success) {} ass...
void function() throws InterruptedException { final BlockingQueue q = emptyCollection(); long startTime = System.nanoTime(); try { q.offer(null, LONG_DELAY_MS, MILLISECONDS); shouldThrow(); } catch (NullPointerException success) {} assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS); }
/** * timed offer(null) throws NullPointerException */
timed offer(null) throws NullPointerException
testTimedOfferNull
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "jsr166-tests/src/test/java/jsr166/BlockingQueueTest.java", "license": "gpl-2.0", "size": 12350 }
[ "java.util.concurrent.BlockingQueue" ]
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,445,378
protected void subscribeToUser(final String uname, final String groupname) { final Presence presence = new Presence(Presence.Type.subscribe); presence.setTo(uname + "@" + jabberServer); try { connection.sendPacket(presence); final RosterPacket rosterPacket = new Rost...
void function(final String uname, final String groupname) { final Presence presence = new Presence(Presence.Type.subscribe); presence.setTo(uname + "@" + jabberServer); try { connection.sendPacket(presence); final RosterPacket rosterPacket = new RosterPacket(); rosterPacket.setType(IQ.Type.SET); final RosterPacket.Item...
/** * Sends a subscription request to the username answers are handled by the method * * @param uname * @param groupname */
Sends a subscription request to the username answers are handled by the method
subscribeToUser
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/main/java/org/olat/lms/instantmessaging/InstantMessagingClient.java", "license": "apache-2.0", "size": 23058 }
[ "org.jivesoftware.smack.packet.Presence", "org.jivesoftware.smack.packet.RosterPacket" ]
import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.packet.RosterPacket;
import org.jivesoftware.smack.packet.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
2,281,349
getMipsMap().clear(); setAvailableMips(PeList.getTotalMips(getPeList())); getPeList().forEach(pe -> pe.getPeProvisioner().deallocateMipsForAllVms()); }
getMipsMap().clear(); setAvailableMips(PeList.getTotalMips(getPeList())); getPeList().forEach(pe -> pe.getPeProvisioner().deallocateMipsForAllVms()); }
/** * Releases PEs allocated to all the VMs of the host the VmSchedulerAbstract * is associated to. After that, all PEs will be available to be used on * demand for requesting VMs. * * @pre $none * @post $none */
Releases PEs allocated to all the VMs of the host the VmSchedulerAbstract is associated to. After that, all PEs will be available to be used on demand for requesting VMs
deallocatePesForAllVms
{ "repo_name": "thejotta/CloudSimPlusModificado", "path": "cloudsim-plus/src/main/java/org/cloudbus/cloudsim/schedulers/VmSchedulerAbstract.java", "license": "gpl-3.0", "size": 8080 }
[ "org.cloudbus.cloudsim.lists.PeList" ]
import org.cloudbus.cloudsim.lists.PeList;
import org.cloudbus.cloudsim.lists.*;
[ "org.cloudbus.cloudsim" ]
org.cloudbus.cloudsim;
236,740
public void setPoolDataSource(ConnectionPoolDataSource pDataSource) throws SQLException { _poolDataSource = pDataSource; _driverObject = _poolDataSource; }
void function(ConnectionPoolDataSource pDataSource) throws SQLException { _poolDataSource = pDataSource; _driverObject = _poolDataSource; }
/** * Sets the pooled data source driver. */
Sets the pooled data source driver
setPoolDataSource
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/sql/DriverConfig.java", "license": "gpl-2.0", "size": 24562 }
[ "java.sql.SQLException", "javax.sql.ConnectionPoolDataSource" ]
import java.sql.SQLException; import javax.sql.ConnectionPoolDataSource;
import java.sql.*; import javax.sql.*;
[ "java.sql", "javax.sql" ]
java.sql; javax.sql;
1,392,479
@Schema(example = "1", description = "Number of days to allow user to use the same password") public Integer getPasswordValidityDays() { return passwordValidityDays; }
@Schema(example = "1", description = STR) Integer function() { return passwordValidityDays; }
/** * Number of days to allow user to use the same password * @return passwordValidityDays **/
Number of days to allow user to use the same password
getPasswordValidityDays
{ "repo_name": "iterate-ch/cyberduck", "path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/model/UsersIdBody.java", "license": "gpl-3.0", "size": 36297 }
[ "io.swagger.v3.oas.annotations.media.Schema" ]
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.*;
[ "io.swagger.v3" ]
io.swagger.v3;
213,332
private static DrillbitEndpoint getEndpoint(final String name) { @SuppressWarnings("resource") final Drillbit drillbit = drillbits.get(name); if (drillbit == null) { throw new IllegalStateException("No Drillbit named \"" + name + "\" found."); } return drillbit.getContext().getEndpoint(); ...
static DrillbitEndpoint function(final String name) { @SuppressWarnings(STR) final Drillbit drillbit = drillbits.get(name); if (drillbit == null) { throw new IllegalStateException(STRSTR\STR); } return drillbit.getContext().getEndpoint(); }
/** * Get the endpoint for the drillbit, if it is running * @param name name of the drillbit * @return endpoint of the drillbit */
Get the endpoint for the drillbit, if it is running
getEndpoint
{ "repo_name": "bitblender/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java", "license": "apache-2.0", "size": 37749 }
[ "org.apache.drill.exec.proto.CoordinationProtos" ]
import org.apache.drill.exec.proto.CoordinationProtos;
import org.apache.drill.exec.proto.*;
[ "org.apache.drill" ]
org.apache.drill;
699,901
public boolean isConstructorBased() { if (isImmutable()) { return true; } Properties properties; if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) { properties = tableConfiguration.getProperties(); ...
boolean function() { if (isImmutable()) { return true; } Properties properties; if (tableConfiguration.getProperties().containsKey(PropertyRegistry.ANY_CONSTRUCTOR_BASED)) { properties = tableConfiguration.getProperties(); } else { properties = context.getJavaModelGeneratorConfiguration().getProperties(); } return isTr...
/** * Checks if is constructor based. * * @return true, if is constructor based */
Checks if is constructor based
isConstructorBased
{ "repo_name": "peterzhu1688/mybatis-generator-core-1.3.5-fix", "path": "src/main/java/org/mybatis/generator/api/IntrospectedTable.java", "license": "apache-2.0", "size": 58925 }
[ "java.util.Properties", "org.mybatis.generator.config.PropertyRegistry", "org.mybatis.generator.internal.util.StringUtility" ]
import java.util.Properties; import org.mybatis.generator.config.PropertyRegistry; import org.mybatis.generator.internal.util.StringUtility;
import java.util.*; import org.mybatis.generator.config.*; import org.mybatis.generator.internal.util.*;
[ "java.util", "org.mybatis.generator" ]
java.util; org.mybatis.generator;
828,091
public final <O extends SpaceObject> List<O> objectsWithinRectangle( long x1, long y1, long x2, long y2, Class<O> cls) { List<O> within = new ArrayList<>(); List<Hitbox> scanned = new ArrayList<>(); Iterator<Cell> iterator = new ReadCellRangeIterator(getCellRangeExclusive(x1,...
final <O extends SpaceObject> List<O> function( long x1, long y1, long x2, long y2, Class<O> cls) { List<O> within = new ArrayList<>(); List<Hitbox> scanned = new ArrayList<>(); Iterator<Cell> iterator = new ReadCellRangeIterator(getCellRangeExclusive(x1, y1, x2, y2)); while (iterator.hasNext()) { for (Hitbox centerHit...
/** * Returns all of this SpaceState's SpaceObjects of the specified class with * their centers within the specified rectangular region. * @param <O> The subclass of SpaceObject to search for * @param x1 The x-coordinate of the region's left edge * @param y1 The y-coordinate of the region'...
Returns all of this SpaceState's SpaceObjects of the specified class with their centers within the specified rectangular region
objectsWithinRectangle
{ "repo_name": "742mph/Ironclad2D", "path": "src/org/cell2d/space/SpaceState.java", "license": "gpl-3.0", "size": 167865 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,415,762
List<Predicate> predicates(CriteriaBuilder builder, Path<C> path);
List<Predicate> predicates(CriteriaBuilder builder, Path<C> path);
/** * Return the list of predicates applicable for this Criteria instance. * @param builder A CriteriaBuilder used to instantiate the Predicates. * @param path Current path. * @return List of predicates applicable to this Criteria. */
Return the list of predicates applicable for this Criteria instance
predicates
{ "repo_name": "tremes/deltaspike", "path": "deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/criteria/Criteria.java", "license": "apache-2.0", "size": 11313 }
[ "java.util.List", "javax.persistence.criteria.CriteriaBuilder", "javax.persistence.criteria.Path", "javax.persistence.criteria.Predicate" ]
import java.util.List; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.Path; import javax.persistence.criteria.Predicate;
import java.util.*; import javax.persistence.criteria.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
2,493,066
public int countLines() throws IOException { int lines = 0; while (this.hasNext()) { this.next(); lines++; } this.close(); return lines; } //=============================================================== // Main //==================...
int function() throws IOException { int lines = 0; while (this.hasNext()) { this.next(); lines++; } this.close(); return lines; }
/** * Iterates over all lines, ignoring their contents, and * returns the count of lines. If some lines have already * been read, this will return the count of remaining lines. * Because no lines will remain after calling this method, * we implicitly call close. * * @return the numbe...
Iterates over all lines, ignoring their contents, and returns the count of lines. If some lines have already been read, this will return the count of remaining lines. Because no lines will remain after calling this method, we implicitly call close
countLines
{ "repo_name": "dowobeha/thrax", "path": "src/edu/jhu/thrax/util/io/LineReader.java", "license": "mit", "size": 10490 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,791,778
public void setArticles(List<Article> articles) { this.articles = articles; }
void function(List<Article> articles) { this.articles = articles; }
/** * <p>Setter for the field <code>articles</code>.</p> * * @param articles a {@link java.util.List} object. */
Setter for the field <code>articles</code>
setArticles
{ "repo_name": "NotFound403/WePay", "path": "src/main/java/cn/felord/wepay/ali/sdk/api/domain/AlipayOpenPublicMessageTotalSendModel.java", "license": "apache-2.0", "size": 2036 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
996,880
synchronized void abortCurrentLogSegment() { try { //Check for null, as abort can be called any time. if (editLogStream != null) { editLogStream.abort(); editLogStream = null; state = State.BETWEEN_LOG_SEGMENTS; } } catch (IOException e) { LOG.warn("All journals...
synchronized void abortCurrentLogSegment() { try { if (editLogStream != null) { editLogStream.abort(); editLogStream = null; state = State.BETWEEN_LOG_SEGMENTS; } } catch (IOException e) { LOG.warn(STR, e); } }
/** * Abort all current logs. Called from the backup node. */
Abort all current logs. Called from the backup node
abortCurrentLogSegment
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java", "license": "apache-2.0", "size": 52179 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,603,330
public void clearIncomingDir() throws IOException { log.info( "cleaning incoming dir \'{}\'", this.incomingDirName ); FileUtils.cleanDirectory( new File( this.incomingDirName) ); }
void function() throws IOException { log.info( STR, this.incomingDirName ); FileUtils.cleanDirectory( new File( this.incomingDirName) ); }
/** * Removes all files from the incoming directory. * * TODO implement locking with the {@link IncomingStorageMessageListener}s * @throws IOException */
Removes all files from the incoming directory. TODO implement locking with the <code>IncomingStorageMessageListener</code>s
clearIncomingDir
{ "repo_name": "emarsys/dyson", "path": "src/main/java/com/emarsys/dyson/storage/DefaultDysonStorage.java", "license": "gpl-3.0", "size": 13983 }
[ "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils" ]
import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils;
import java.io.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
617,301
public void child(Object self, Object child) throws SAXException { append.accept(self, child); }
void function(Object self, Object child) throws SAXException { append.accept(self, child); }
/** * handle child building * * @param self created object * @param child the child to add * @throws SAXException */
handle child building
child
{ "repo_name": "Unknow0/scene-builder", "path": "src/main/java/unknow/scene/builder/builders/BuilderActor.java", "license": "lgpl-3.0", "size": 2966 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
805,677
public MarkerView getMarkerView() { return mMarkerView; }
MarkerView function() { return mMarkerView; }
/** * returns the view that is set as a marker view for the chart * * @return */
returns the view that is set as a marker view for the chart
getMarkerView
{ "repo_name": "MPieter/Notification-Analyser", "path": "NotificationAnalyser/MPChartLib/src/com/github/mikephil/charting/charts/Chart.java", "license": "mit", "size": 71102 }
[ "com.github.mikephil.charting.utils.MarkerView" ]
import com.github.mikephil.charting.utils.MarkerView;
import com.github.mikephil.charting.utils.*;
[ "com.github.mikephil" ]
com.github.mikephil;
1,274,551
public final List<String> getArgs() { return args; }
final List<String> function() { return args; }
/** Returns the invocation arguments. * @return the invocation arguments */
Returns the invocation arguments
getArgs
{ "repo_name": "AludraTest/aludratest", "path": "src/main/java/org/aludratest/service/gitclient/data/InvocationData.java", "license": "apache-2.0", "size": 3227 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
187,291
@Test public void testQueriesOnReplicatedRegionWithSameProjAttr() { Cache cache = CacheUtils.getCache(); createReplicatedRegion(); assertNotNull(cache.getRegion(regionName)); assertEquals(numElem * 2, cache.getRegion(regionName).size()); QueryService queryService = cache.getQueryService(); ...
void function() { Cache cache = CacheUtils.getCache(); createReplicatedRegion(); assertNotNull(cache.getRegion(regionName)); assertEquals(numElem * 2, cache.getRegion(regionName).size()); QueryService queryService = cache.getQueryService(); Query query1 = null; try { for (String queryStr : moreQueries) { query1 = query...
/** * Test on Replicated Region data */
Test on Replicated Region data
testQueriesOnReplicatedRegionWithSameProjAttr
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/DistinctResultsWithDupValuesInRegionJUnitTest.java", "license": "apache-2.0", "size": 15389 }
[ "com.gemstone.gemfire.cache.Cache", "com.gemstone.gemfire.cache.query.CacheUtils", "com.gemstone.gemfire.cache.query.Query", "com.gemstone.gemfire.cache.query.QueryService", "com.gemstone.gemfire.cache.query.SelectResults", "org.junit.Assert" ]
import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.query.CacheUtils; import com.gemstone.gemfire.cache.query.Query; import com.gemstone.gemfire.cache.query.QueryService; import com.gemstone.gemfire.cache.query.SelectResults; import org.junit.Assert;
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.cache.query.*; import org.junit.*;
[ "com.gemstone.gemfire", "org.junit" ]
com.gemstone.gemfire; org.junit;
9,149
void addScrapView(View scrap) { TwoWayAbsListView.LayoutParams lp = (TwoWayAbsListView.LayoutParams) scrap.getLayoutParams(); if (lp == null) { return; } // Don't put header or footer views or views that should be ignored // into the scrap heap int viewType = lp.viewType; if (!shouldRecyc...
void addScrapView(View scrap) { TwoWayAbsListView.LayoutParams lp = (TwoWayAbsListView.LayoutParams) scrap.getLayoutParams(); if (lp == null) { return; } int viewType = lp.viewType; if (!shouldRecycleViewType(viewType)) { if (viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) { removeDetachedView(scrap, false); } return; } i...
/** * Put a view into the ScapViews list. These views are unordered. * * @param scrap The view to add */
Put a view into the ScapViews list. These views are unordered
addScrapView
{ "repo_name": "searchy2/recent-images", "path": "recentimages/src/main/java/com/jess/ui/TwoWayAbsListView.java", "license": "mit", "size": 164635 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
312,065
public void addTBasket(TBasket l, Connection con) throws TorqueException { getTBaskets(con).add(l); l.setTPerson((TPerson) this); } private Criteria lastTBasketsCriteria = null;
void function(TBasket l, Connection con) throws TorqueException { getTBaskets(con).add(l); l.setTPerson((TPerson) this); } private Criteria lastTBasketsCriteria = null;
/** * Method called to associate a TBasket object to this object * through the TBasket foreign key attribute using connection. * * @param l TBasket * @throws TorqueException */
Method called to associate a TBasket object to this object through the TBasket foreign key attribute using connection
addTBasket
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPerson.java", "license": "gpl-3.0", "size": 1013508 }
[ "com.aurel.track.persist.TPerson", "java.sql.Connection", "org.apache.torque.TorqueException", "org.apache.torque.util.Criteria" ]
import com.aurel.track.persist.TPerson; import java.sql.Connection; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria;
import com.aurel.track.persist.*; import java.sql.*; import org.apache.torque.*; import org.apache.torque.util.*;
[ "com.aurel.track", "java.sql", "org.apache.torque" ]
com.aurel.track; java.sql; org.apache.torque;
1,207,013
public List<ModelError> translateAndSaveModelWithOtherStructure(OntModel model, Object otherStructure, String translationFolder, String modelName, List<String> orderedImports, String saveFilename) throws TranslationException, IOException, URISyntaxException;
List<ModelError> function(OntModel model, Object otherStructure, String translationFolder, String modelName, List<String> orderedImports, String saveFilename) throws TranslationException, IOException, URISyntaxException;
/** * Method to translate and save a model when there are other knowledge structures besides rules * @param model--Jena OntModel to be saved * @param otherStructure -- the other knowledge structures * @param translationFolder--folder in which file-based saving is to place save files * @param modelName--the UR...
Method to translate and save a model when there are other knowledge structures besides rules
translateAndSaveModelWithOtherStructure
{ "repo_name": "crapo/sadlos2", "path": "sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.reasoner/com.ge.research.sadl.reasoner-api/src/main/java/com/ge/research/sadl/reasoner/ITranslator.java", "license": "epl-1.0", "size": 11083 }
[ "com.ge.research.sadl.model.ModelError", "java.io.IOException", "java.net.URISyntaxException", "java.util.List", "org.apache.jena.ontology.OntModel" ]
import com.ge.research.sadl.model.ModelError; import java.io.IOException; import java.net.URISyntaxException; import java.util.List; import org.apache.jena.ontology.OntModel;
import com.ge.research.sadl.model.*; import java.io.*; import java.net.*; import java.util.*; import org.apache.jena.ontology.*;
[ "com.ge.research", "java.io", "java.net", "java.util", "org.apache.jena" ]
com.ge.research; java.io; java.net; java.util; org.apache.jena;
880,903
public void selectionChanged(SelectionChangedEvent event) { // Remove any menu items for old selection. // if (createChildMenuManager != null) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createS...
void function(SelectionChangedEvent event) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createSiblingActions); } Collection<?> newSiblingDescriptors = null; ISelection selection = event.getSelection(); if (selectio...
/** * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings * that can be added to the selected object and updating the menus accordingly. * <!-- begin-user-doc --> * <!-- end-u...
This implements <code>org.eclipse.jface.viewers.ISelectionChangedListener</code>, handling <code>org.eclipse.jface.viewers.SelectionChangedEvent</code>s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly.
selectionChanged
{ "repo_name": "netuh/DecodePlatformPlugin", "path": "br.ufpe.ines.decode/bundles/br.ufpe.ines.decode.model.editor/src/br/ufpe/ines/decode/decode/presentation/DecodeActionBarContributor.java", "license": "gpl-3.0", "size": 13957 }
[ "java.util.Collection", "org.eclipse.emf.edit.domain.EditingDomain", "org.eclipse.emf.edit.domain.IEditingDomainProvider", "org.eclipse.jface.viewers.ISelection", "org.eclipse.jface.viewers.IStructuredSelection", "org.eclipse.jface.viewers.SelectionChangedEvent" ]
import java.util.Collection; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent;
import java.util.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.util; org.eclipse.emf; org.eclipse.jface;
2,819,989
public List<DelegateUser> getDelegateUsers() { return this.delegateUsers; }
List<DelegateUser> function() { return this.delegateUsers; }
/** * Gets the delegate users. <value>The delegate users.</value> * * @return the delegate users */
Gets the delegate users. The delegate users
getDelegateUsers
{ "repo_name": "eveoh/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/UpdateDelegateRequest.java", "license": "mit", "size": 4638 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,514,949
private void writeOutputFile(final File outputFile) { final PrintWriter tw = prepareOutputFile(outputFile); final boolean[] nonNumeric = new boolean[getColumnCount()]; boolean first = true; resetStatus(); // write the file for (final LoadedRow row : this.data) { updateStatus("Writing output"); //...
void function(final File outputFile) { final PrintWriter tw = prepareOutputFile(outputFile); final boolean[] nonNumeric = new boolean[getColumnCount()]; boolean first = true; resetStatus(); for (final LoadedRow row : this.data) { updateStatus(STR); if (first) { for (int i = 0; i < getColumnCount(); i++) { try { final S...
/** * Write the sorted output file. * * @param outputFile * The name of the output file. */
Write the sorted output file
writeOutputFile
{ "repo_name": "krzysztof-magosa/encog-java-core", "path": "src/main/java/org/encog/app/analyst/csv/sort/SortCSV.java", "license": "apache-2.0", "size": 4223 }
[ "java.io.File", "java.io.PrintWriter", "org.encog.app.analyst.csv.basic.LoadedRow" ]
import java.io.File; import java.io.PrintWriter; import org.encog.app.analyst.csv.basic.LoadedRow;
import java.io.*; import org.encog.app.analyst.csv.basic.*;
[ "java.io", "org.encog.app" ]
java.io; org.encog.app;
318,979
public void testEqualsObject() { assertEquals(resource, new OsgiBundleResource(bundle, path)); assertEquals(resource, resource); assertFalse(resource.equals(new OsgiBundleResource(bundle, ""))); assertFalse(resource.equals(new OsgiBundleResource(new MockBundle(), path))); }
void function() { assertEquals(resource, new OsgiBundleResource(bundle, path)); assertEquals(resource, resource); assertFalse(resource.equals(new OsgiBundleResource(bundle, ""))); assertFalse(resource.equals(new OsgiBundleResource(new MockBundle(), path))); }
/** * Test method for * {@link org.springframework.osgi.io.OsgiBundleResource#equals(java.lang.Object)}. */
Test method for <code>org.springframework.osgi.io.OsgiBundleResource#equals(java.lang.Object)</code>
testEqualsObject
{ "repo_name": "kurtharriger/spring-osgi", "path": "io/src/test/java/org/springframework/osgi/io/OsgiBundleResourceTest.java", "license": "apache-2.0", "size": 9559 }
[ "org.springframework.osgi.mock.MockBundle" ]
import org.springframework.osgi.mock.MockBundle;
import org.springframework.osgi.mock.*;
[ "org.springframework.osgi" ]
org.springframework.osgi;
521,914
protected ArrayList<String> readAlias() throws SQLException { ArrayList<String> aliasList = new ArrayList<String>(); try { readAlias = connect.prepareStatement("SELECT user_alias FROM cdi_user"); requestRes = readAlias.executeQuery(); while(requestRes.next()){ userAlias = requestRes.getS...
ArrayList<String> function() throws SQLException { ArrayList<String> aliasList = new ArrayList<String>(); try { readAlias = connect.prepareStatement(STR); requestRes = readAlias.executeQuery(); while(requestRes.next()){ userAlias = requestRes.getString(1); aliasList.add(userAlias); } } catch (SQLException e) { e.printS...
/** * Read users' alias from database. * * @author Claire * @return aliasList * @throws SQLException * @version 25-10-2016 */
Read users' alias from database
readAlias
{ "repo_name": "CDI-Enterprise/ecf-16035-b", "path": "src/fr/cdiEnterprise/dao/UserDAO.java", "license": "gpl-3.0", "size": 15263 }
[ "java.sql.SQLException", "java.util.ArrayList" ]
import java.sql.SQLException; import java.util.ArrayList;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
414,942
private SnmpValue[] convertSnmpSyntaxs(SnmpSyntax[] results) { SnmpValue[] values = { null }; if (results == null || results[0] == null || results.length == 0) { return values; } values = new JoeSnmpValue[results.length]; for (int i=...
SnmpValue[] function(SnmpSyntax[] results) { SnmpValue[] values = { null }; if (results == null results[0] == null results.length == 0) { return values; } values = new JoeSnmpValue[results.length]; for (int i=0; i<results.length; i++) { values[i] = new JoeSnmpValue(results[i]); } return values; }
/** * Convert JoeSnmp SnmpSyntax array to OpenNMS SnmpValue array * * @param results * @return * values as an OpenNMS SnmpValue array */
Convert JoeSnmp SnmpSyntax array to OpenNMS SnmpValue array
convertSnmpSyntaxs
{ "repo_name": "tdefilip/opennms", "path": "core/snmp/impl-joesnmp/src/main/java/org/opennms/netmgt/snmp/joesnmp/JoeSnmpStrategy.java", "license": "agpl-3.0", "size": 15929 }
[ "org.opennms.netmgt.snmp.SnmpValue", "org.opennms.protocols.snmp.SnmpSyntax" ]
import org.opennms.netmgt.snmp.SnmpValue; import org.opennms.protocols.snmp.SnmpSyntax;
import org.opennms.netmgt.snmp.*; import org.opennms.protocols.snmp.*;
[ "org.opennms.netmgt", "org.opennms.protocols" ]
org.opennms.netmgt; org.opennms.protocols;
878,093
protected static Config commandLineConfigs(String cluster, String role, String environ, Boolean dryRun, DryRunFormatType dryRunFormat, ...
static Config function(String cluster, String role, String environ, Boolean dryRun, DryRunFormatType dryRunFormat, Boolean verbose) { return Config.newBuilder() .put(Key.CLUSTER, cluster) .put(Key.ROLE, role) .put(Key.ENVIRON, environ) .put(Key.DRY_RUN, dryRun) .put(Key.DRY_RUN_FORMAT_TYPE, dryRunFormat) .put(Key.VERBO...
/** * Load the config parameters from the command line * * @param cluster, name of the cluster * @param role, user role * @param environ, user provided environment/tag * @param verbose, enable verbose logging * @return config, the command line config */
Load the config parameters from the command line
commandLineConfigs
{ "repo_name": "objmagic/heron", "path": "heron/scheduler-core/src/java/com/twitter/heron/scheduler/SubmitterMain.java", "license": "apache-2.0", "size": 21734 }
[ "com.twitter.heron.common.basics.DryRunFormatType", "com.twitter.heron.spi.common.Config", "com.twitter.heron.spi.common.Key" ]
import com.twitter.heron.common.basics.DryRunFormatType; import com.twitter.heron.spi.common.Config; import com.twitter.heron.spi.common.Key;
import com.twitter.heron.common.basics.*; import com.twitter.heron.spi.common.*;
[ "com.twitter.heron" ]
com.twitter.heron;
1,450,579
public GroupForm getGroupForm(String key) { log.debug("Initializing group form for group key " + key); // find the current version of this group entity IEntityGroup group = GroupService.findGroup(key); // update the group form with the existing group's main information Gro...
GroupForm function(String key) { log.debug(STR + key); IEntityGroup group = GroupService.findGroup(key); GroupForm form = new GroupForm(); form.setKey(key); form.setName(group.getName()); form.setDescription(group.getDescription()); form.setCreatorId(group.getCreatorID()); form.setType(groupListHelper.getEntityType(gro...
/** * Construct a group form for the group with the specified key. * * @param key * @param entityEnum * @return */
Construct a group form for the group with the specified key
getGroupForm
{ "repo_name": "stalele/uPortal", "path": "uPortal-api/uPortal-api-internal/src/main/java/org/apereo/portal/portlets/groupadmin/GroupAdministrationHelper.java", "license": "apache-2.0", "size": 10985 }
[ "org.apereo.portal.groups.IEntityGroup", "org.apereo.portal.groups.IGroupMember", "org.apereo.portal.layout.dlm.remoting.JsonEntityBean", "org.apereo.portal.services.GroupService" ]
import org.apereo.portal.groups.IEntityGroup; import org.apereo.portal.groups.IGroupMember; import org.apereo.portal.layout.dlm.remoting.JsonEntityBean; import org.apereo.portal.services.GroupService;
import org.apereo.portal.groups.*; import org.apereo.portal.layout.dlm.remoting.*; import org.apereo.portal.services.*;
[ "org.apereo.portal" ]
org.apereo.portal;
1,558,400
public void error( String source, int messageResource, String value ) { errorCount++; StringBuilder sb = new StringBuilder(); if ( source != null ) { sb.append("[").append(source).append("] "); } sb.append( context.getString( messageResour...
void function( String source, int messageResource, String value ) { errorCount++; StringBuilder sb = new StringBuilder(); if ( source != null ) { sb.append("[").append(source).append(STR); } sb.append( context.getString( messageResource )); if ( value != null ) { sb.append(" ").append(value); } sb.append( STR ).append(...
/** * Error message for secondary log. * @param source source of the bad data - if needed. Can be null. * @param messageResource message resource id * @param value value of the bad data - if needed. Can be null. */
Error message for secondary log
error
{ "repo_name": "Palmodroid/BestBoard", "path": "app/src/main/java/org/lattilad/bestboard/parser/Tokenizer.java", "license": "mit", "size": 56955 }
[ "org.lattilad.bestboard.scribe.Scribe" ]
import org.lattilad.bestboard.scribe.Scribe;
import org.lattilad.bestboard.scribe.*;
[ "org.lattilad.bestboard" ]
org.lattilad.bestboard;
1,431,369
@Test public void simpleClassLoaderTest() throws IOException, JdwpException, ClassNotFoundException { JdwpLoadUtility util = new JdwpLoadUtility(); util.movePkgOut(); if (verifyNoPropertyViolation()) { URL[] urls = { new URL(util.dirUrl) }; URLClassLoader cl = new URLClassLoader(urls...
void function() throws IOException, JdwpException, ClassNotFoundException { JdwpLoadUtility util = new JdwpLoadUtility(); util.movePkgOut(); if (verifyNoPropertyViolation()) { URL[] urls = { new URL(util.dirUrl) }; URLClassLoader cl = new URLClassLoader(urls); String cname = util.pkg + STR; Class cls = cl.loadClass(cna...
/** * Test using the custom classloader.<br/> * The problem is though, classloaders don't really work in JPF as one would * excpect. That is why the class is not registered as a loaded class even if * it is loaded!. */
Test using the custom classloader. The problem is though, classloaders don't really work in JPF as one would excpect. That is why the class is not registered as a loaded class even if it is loaded!
simpleClassLoaderTest
{ "repo_name": "stepanv/jpf-jdwp", "path": "src/tests/gov/nasa/jpf/jdwp/command/ClassLoaderReferenceCommandTest.java", "license": "gpl-3.0", "size": 6887 }
[ "gov.nasa.jpf.jdwp.exception.JdwpException", "java.io.IOException", "java.net.URLClassLoader" ]
import gov.nasa.jpf.jdwp.exception.JdwpException; import java.io.IOException; import java.net.URLClassLoader;
import gov.nasa.jpf.jdwp.exception.*; import java.io.*; import java.net.*;
[ "gov.nasa.jpf", "java.io", "java.net" ]
gov.nasa.jpf; java.io; java.net;
439,447
public void setTaggingService(TaggingService taggingService) { this.taggingService = taggingService; }
void function(TaggingService taggingService) { this.taggingService = taggingService; }
/** * Set the tagging service */
Set the tagging service
setTaggingService
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/site/SiteServiceImpl.java", "license": "lgpl-3.0", "size": 138206 }
[ "org.alfresco.service.cmr.tagging.TaggingService" ]
import org.alfresco.service.cmr.tagging.TaggingService;
import org.alfresco.service.cmr.tagging.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,246,212
@Transactional(rollbackOn = Exception.class) public void deleteObject(final String uuid) { final EntityManager entityManager = acquire(false); final POJOCLASS updateObject = entityManager.find(clasz, uuid); BasicJPAService.LOG.debug("try to delete {} with uuid '{}' from the database", className, uuid); p...
@Transactional(rollbackOn = Exception.class) void function(final String uuid) { final EntityManager entityManager = acquire(false); final POJOCLASS updateObject = entityManager.find(clasz, uuid); BasicJPAService.LOG.debug(STR, className, uuid); prepareObjectForRemoval(updateObject); entityManager.remove(updateObject); ...
/** * Deletes an instance of the specific class permanently from the DB by a given identifier.<br> * Created by: tgaengler * * @param uuid the identifier of the to be deleted instance of the specific class */
Deletes an instance of the specific class permanently from the DB by a given identifier. Created by: tgaengler
deleteObject
{ "repo_name": "dswarm/dswarm", "path": "persistence/src/main/java/org/dswarm/persistence/service/BasicJPAService.java", "license": "apache-2.0", "size": 22773 }
[ "com.google.inject.persist.Transactional", "javax.persistence.EntityManager" ]
import com.google.inject.persist.Transactional; import javax.persistence.EntityManager;
import com.google.inject.persist.*; import javax.persistence.*;
[ "com.google.inject", "javax.persistence" ]
com.google.inject; javax.persistence;
1,584,266
public static TestMSMStatistic testMSMAsync(final String msmFile, final ActionListener progress, final ActionListener complete) { final TestMSMStatistic stats = new TestMSMStatistic(); Runnable runner = new Runnable() {
static TestMSMStatistic function(final String msmFile, final ActionListener progress, final ActionListener complete) { final TestMSMStatistic stats = new TestMSMStatistic(); Runnable runner = new Runnable() {
/** * Tests whether a file can be used as peak-list. * If there is a problem with the file an error message will be reported (the message returned from the error message) * @param msmFile * @param progress * @param complete * @return null if everything is ok; the error message otherwise ...
Tests whether a file can be used as peak-list. If there is a problem with the file an error message will be reported (the message returned from the error message)
testMSMAsync
{ "repo_name": "lutzfischer/XiSearch", "path": "src/main/java/rappsilber/ms/dataAccess/test/TestMSM.java", "license": "apache-2.0", "size": 8227 }
[ "java.awt.event.ActionListener" ]
import java.awt.event.ActionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
891,076
public static XMethod createXMethod(JavaClass javaClass, Method method) { if (method == null) { throw new NullPointerException("method must not be null"); } XMethod xmethod = createXMethod(javaClass.getClassName(), method); assert xmethod.isResolved(); return xmet...
static XMethod function(JavaClass javaClass, Method method) { if (method == null) { throw new NullPointerException(STR); } XMethod xmethod = createXMethod(javaClass.getClassName(), method); assert xmethod.isResolved(); return xmethod; }
/** * Create an XMethod object from a BCEL Method. * * @param javaClass * the class to which the Method belongs * @param method * the Method * @return an XMethod representing the Method */
Create an XMethod object from a BCEL Method
createXMethod
{ "repo_name": "spotbugs/spotbugs", "path": "spotbugs/src/main/java/edu/umd/cs/findbugs/ba/XFactory.java", "license": "lgpl-2.1", "size": 27588 }
[ "org.apache.bcel.classfile.JavaClass", "org.apache.bcel.classfile.Method" ]
import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.classfile.Method;
import org.apache.bcel.classfile.*;
[ "org.apache.bcel" ]
org.apache.bcel;
336,470
@SuppressLint("ApplySharedPref") @Override public void write(@NonNull final IntegerCounter counter) { final SharedPreferences.Editor prefsEditor = sharedPreferences.edit(); prefsEditor.putInt(counter.getName(), counter.getValue()); prefsEditor.commit(); broadcastHelper.sendBroadcast(Actions.COUNT...
@SuppressLint(STR) void function(@NonNull final IntegerCounter counter) { final SharedPreferences.Editor prefsEditor = sharedPreferences.edit(); prefsEditor.putInt(counter.getName(), counter.getValue()); prefsEditor.commit(); broadcastHelper.sendBroadcast(Actions.COUNTER_SET_CHANGE); }
/** * Saves provided counter in storage. If it's identifier is already defined, existing counter will * be overwritten. */
Saves provided counter in storage. If it's identifier is already defined, existing counter will be overwritten
write
{ "repo_name": "gentlecat/counter", "path": "app/src/main/java/me/tsukanov/counter/repository/SharedPrefsCounterStorage.java", "license": "apache-2.0", "size": 5044 }
[ "android.annotation.SuppressLint", "android.content.SharedPreferences", "androidx.annotation.NonNull", "me.tsukanov.counter.domain.IntegerCounter", "me.tsukanov.counter.infrastructure.Actions" ]
import android.annotation.SuppressLint; import android.content.SharedPreferences; import androidx.annotation.NonNull; import me.tsukanov.counter.domain.IntegerCounter; import me.tsukanov.counter.infrastructure.Actions;
import android.annotation.*; import android.content.*; import androidx.annotation.*; import me.tsukanov.counter.domain.*; import me.tsukanov.counter.infrastructure.*;
[ "android.annotation", "android.content", "androidx.annotation", "me.tsukanov.counter" ]
android.annotation; android.content; androidx.annotation; me.tsukanov.counter;
72,827
public boolean isReserveMedication(){ return getEntryType() == EntryType.RESERVE_MEDICATION; }
boolean function(){ return getEntryType() == EntryType.RESERVE_MEDICATION; }
/** * required by JFace data-binding * * @since 3.1.0 */
required by JFace data-binding
isReserveMedication
{ "repo_name": "elexis/elexis-3-core", "path": "bundles/ch.elexis.core.data/src/ch/elexis/data/Prescription.java", "license": "epl-1.0", "size": 24437 }
[ "ch.elexis.core.model.prescription.EntryType" ]
import ch.elexis.core.model.prescription.EntryType;
import ch.elexis.core.model.prescription.*;
[ "ch.elexis.core" ]
ch.elexis.core;
299,543
private ToolUseEvent buildEvent(Action action) { return ToolUseEvent.builder() .context(context) .id(id) .actor(actor) .action(action) .object(object) .eventTime(new DateTime(2016, 11, 15, 10, 15, 0, 0, DateTimeZone.UTC)) .e...
ToolUseEvent function(Action action) { return ToolUseEvent.builder() .context(context) .id(id) .actor(actor) .action(action) .object(object) .eventTime(new DateTime(2016, 11, 15, 10, 15, 0, 0, DateTimeZone.UTC)) .edApp(edApp) .group(group) .membership(membership) .session(session) .build(); }
/** * Build View event * @param action * @return event */
Build View event
buildEvent
{ "repo_name": "IMSGlobal/caliper-java-public", "path": "src/test/java/org/imsglobal/caliper/events/ToolUseEventUsedTest.java", "license": "lgpl-3.0", "size": 4864 }
[ "org.imsglobal.caliper.actions.Action", "org.joda.time.DateTime", "org.joda.time.DateTimeZone" ]
import org.imsglobal.caliper.actions.Action; import org.joda.time.DateTime; import org.joda.time.DateTimeZone;
import org.imsglobal.caliper.actions.*; import org.joda.time.*;
[ "org.imsglobal.caliper", "org.joda.time" ]
org.imsglobal.caliper; org.joda.time;
649,607
public void setPaint(Paint paint) { if (paint == null) return; if (!(paint instanceof Color)) currentColor = null; currentPaint = paint; }
void function(Paint paint) { if (paint == null) return; if (!(paint instanceof Color)) currentColor = null; currentPaint = paint; }
/** * Sets the current paint. * * @param paint to be set */
Sets the current paint
setPaint
{ "repo_name": "phuseman/r2cat", "path": "org/freehep/graphics2d/AbstractVectorGraphics.java", "license": "gpl-3.0", "size": 24807 }
[ "java.awt.Color", "java.awt.Paint" ]
import java.awt.Color; import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
626,274
boolean result = rng.nextDouble() <= successProb; return result; } private double meanDailyBookings; private double sdDailyBookings; private int seed; private double cancelProb; private Random rng; private int maxQueueSize; private double firstProb; private double businessProb; private double premiu...
boolean result = rng.nextDouble() <= successProb; return result; } private double meanDailyBookings; private double sdDailyBookings; private int seed; private double cancelProb; private Random rng; private int maxQueueSize; private double firstProb; private double businessProb; private double premiumProb; private doubl...
/** * Static utility method to implement a <a href="http://en.wikipedia.org/wiki/Bernoulli_trial">Bernoulli Trial</a>, * a coin toss with two outcomes: success (probability successProb) and failure (probability 1-successProb) * * @param rng <code>Random</code> generating the random sequence of numbers * @pa...
Static utility method to implement a Bernoulli Trial, a coin toss with two outcomes: success (probability successProb) and failure (probability 1-successProb)
randomSuccess
{ "repo_name": "DecsterB/CAB302-A2-Pair", "path": "src/asgn2Simulators/Simulator.java", "license": "mit", "size": 24161 }
[ "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "java.util.Queue", "java.util.Random" ]
import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,312,973
public static Typeface getTypeface(final Context context, final String name) { return Typeface.createFromAsset(context.getAssets(), name); }
static Typeface function(final Context context, final String name) { return Typeface.createFromAsset(context.getAssets(), name); }
/** * Get typeface with name * * @param context * @param name * @return typeface */
Get typeface with name
getTypeface
{ "repo_name": "hufsm/PocketHub", "path": "app/src/main/java/com/github/pockethub/util/TypefaceUtils.java", "license": "apache-2.0", "size": 6032 }
[ "android.content.Context", "android.graphics.Typeface" ]
import android.content.Context; import android.graphics.Typeface;
import android.content.*; import android.graphics.*;
[ "android.content", "android.graphics" ]
android.content; android.graphics;
2,636,138
public Map<String,Object> toMap() { Map<String,Object> map = new HashMap<String,Object>(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("class_name", this.clazzName == null ? "" : this.clazzName); map.put("vendor_name", this.vendorName == null ? ""...
Map<String,Object> function() { Map<String,Object> map = new HashMap<String,Object>(); map.put("uuid", this.uuid == null ? STRclass_nameSTRSTRvendor_nameSTRSTRdevice_nameSTRSTRhostSTROpaqueRef:NULLSTRpci_idSTRSTRdependenciesSTRother_config", this.otherConfig == null ? new HashMap<String, String>() : this.otherConfig); ...
/** * Convert a PCI.Record to a Map */
Convert a PCI.Record to a Map
toMap
{ "repo_name": "mufaddalq/cloudstack-datera-driver", "path": "deps/XenServerJava/src/com/xensource/xenapi/PCI.java", "license": "apache-2.0", "size": 14416 }
[ "java.util.HashMap", "java.util.Map", "java.util.Set" ]
import java.util.HashMap; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,163,151
StringBuilder sourceBuilder = new StringBuilder(); String line = InserterConstants.EMPTY_STRING; String source = null; try (BufferedReader reader = new BufferedReader(new FileReader(file))) { while ((line = reader.readLine()) != null) { sourceBuilder.append(line); ...
StringBuilder sourceBuilder = new StringBuilder(); String line = InserterConstants.EMPTY_STRING; String source = null; try (BufferedReader reader = new BufferedReader(new FileReader(file))) { while ((line = reader.readLine()) != null) { sourceBuilder.append(line); sourceBuilder.append(InserterConstants.LINE_SEPARATOR);...
/** * Reads the source from a file. * * @param file * - the given source file * @return String, the source file content */
Reads the source from a file
readFromFile
{ "repo_name": "dim4o/copyright-tools", "path": "src/main/java/com/coprtools/util/SourceManipulator.java", "license": "apache-2.0", "size": 3769 }
[ "com.coprtools.constants.InserterConstants", "java.io.BufferedReader", "java.io.FileReader" ]
import com.coprtools.constants.InserterConstants; import java.io.BufferedReader; import java.io.FileReader;
import com.coprtools.constants.*; import java.io.*;
[ "com.coprtools.constants", "java.io" ]
com.coprtools.constants; java.io;
1,818,019
public void print (int w, int d) { print(new PrintWriter(System.out,true),w,d); }
void function (int w, int d) { print(new PrintWriter(System.out,true),w,d); }
/** Print the matrix to stdout. Line the elements up in columns * with a Fortran-like 'Fw.d' style format. @param w Column width. @param d Number of digits after the decimal. */
Print the matrix to stdout. Line the elements up in columns with a Fortran-like 'Fw.d' style format
print
{ "repo_name": "citygml4j/citygml4j", "path": "src/main/java/org/citygml4j/geometry/Matrix.java", "license": "apache-2.0", "size": 30355 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,278,516
public List<Entity> reason(String projectId, String ce) { try { ProjectManager manager = getProjectManager(projectId); Map<String, String> shortFormMap = manager.getOntologyIris(); for (String shortForm : shortFormMap.keySet()) { ce = ce.replaceAll(shortForm + ":([\\w_\\-]+)", "<" + shortFormMap.get(...
List<Entity> function(String projectId, String ce) { try { ProjectManager manager = getProjectManager(projectId); Map<String, String> shortFormMap = manager.getOntologyIris(); for (String shortForm : shortFormMap.keySet()) { ce = ce.replaceAll(shortForm + STR, "<" + shortFormMap.get(shortForm) + "#$1>"); } return manag...
/** * Reasons over the specified ontologies with supplied class expression. * @param projectId projectId of the project * @param ce class expression * @return search result */
Reasons over the specified ontologies with supplied class expression
reason
{ "repo_name": "ChristophB/webprotege-rest-api", "path": "src/main/java/de/onto_med/ontology_service/resources/ProjectResource.java", "license": "gpl-3.0", "size": 10310 }
[ "de.onto_med.ontology_service.data_model.Entity", "de.onto_med.ontology_service.manager.ProjectManager", "java.util.List", "java.util.Map", "javax.ws.rs.WebApplicationException" ]
import de.onto_med.ontology_service.data_model.Entity; import de.onto_med.ontology_service.manager.ProjectManager; import java.util.List; import java.util.Map; import javax.ws.rs.WebApplicationException;
import de.onto_med.ontology_service.data_model.*; import de.onto_med.ontology_service.manager.*; import java.util.*; import javax.ws.rs.*;
[ "de.onto_med.ontology_service", "java.util", "javax.ws" ]
de.onto_med.ontology_service; java.util; javax.ws;
1,386,783
public void paintAST(DefaultMutableTreeNode root) { if (localVar == null && blockSmt != null) blockSmt.paintAST(root); else if (localVar != null) localVar.paintAST(root); }
void function(DefaultMutableTreeNode root) { if (localVar == null && blockSmt != null) blockSmt.paintAST(root); else if (localVar != null) localVar.paintAST(root); }
/** * Paint the ast tree of the block statement element * * @author LQZ */
Paint the ast tree of the block statement element
paintAST
{ "repo_name": "shaolinwu/uimaster", "path": "modules/javacc/src/main/java/org/shaolin/javacc/statement/BlockStatement.java", "license": "apache-2.0", "size": 2440 }
[ "javax.swing.tree.DefaultMutableTreeNode" ]
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
2,891,742
public void runCommandsOnLogout(Player player) { executeCommands(player, onLogoutCommands.getAdaptedItems(player)); }
void function(Player player) { executeCommands(player, onLogoutCommands.getAdaptedItems(player)); }
/** * Runs the configured commands for when a player logs out (by command or by quitting the server). * * @param player the player that is no longer logged in */
Runs the configured commands for when a player logs out (by command or by quitting the server)
runCommandsOnLogout
{ "repo_name": "Maxetto/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/settings/commandconfig/CommandManager.java", "license": "gpl-3.0", "size": 7736 }
[ "org.bukkit.entity.Player" ]
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
1,434,110
public List<StepInjectionMetaEntry> getStepInjectionMetadataEntries() throws KettleException { return getStepInjectionMetadataEntries( PKG ); }
List<StepInjectionMetaEntry> function() throws KettleException { return getStepInjectionMetadataEntries( PKG ); }
/** * Describe the metadata attributes that can be injected into this step metadata object. * * @throws KettleException */
Describe the metadata attributes that can be injected into this step metadata object
getStepInjectionMetadataEntries
{ "repo_name": "rfellows/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/steps/csvinput/CsvInputMeta.java", "license": "apache-2.0", "size": 33603 }
[ "java.util.List", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.trans.step.StepInjectionMetaEntry" ]
import java.util.List; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.trans.step.StepInjectionMetaEntry;
import java.util.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.trans.step.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,611,418
public FontDecoration getDecoration(){ return item.getDecoration(); }
FontDecoration function(){ return item.getDecoration(); }
/** * Return the encapsulate Low Level API object. */
Return the encapsulate Low Level API object
getDecoration
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/hlapi/FontHLAPI.java", "license": "epl-1.0", "size": 9267 }
[ "fr.lip6.move.pnml.ptnet.FontDecoration" ]
import fr.lip6.move.pnml.ptnet.FontDecoration;
import fr.lip6.move.pnml.ptnet.*;
[ "fr.lip6.move" ]
fr.lip6.move;
594,329
public JobEntryCopy getStartJobEntryCopy() { return startJobEntryCopy; }
JobEntryCopy function() { return startJobEntryCopy; }
/** * Gets the start job entry copy. * * @return the startJobEntryCopy */
Gets the start job entry copy
getStartJobEntryCopy
{ "repo_name": "rfellows/pentaho-kettle", "path": "engine/src/org/pentaho/di/job/Job.java", "license": "apache-2.0", "size": 68024 }
[ "org.pentaho.di.job.entry.JobEntryCopy" ]
import org.pentaho.di.job.entry.JobEntryCopy;
import org.pentaho.di.job.entry.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,808,768
public Transporter setLog(Transporter log) { return handleByMode(); }
Transporter function(Transporter log) { return handleByMode(); }
/** * PUBLIC: * Set the writer to which an accessor writes logged messages and SQL. * If not set, this reference defaults to a writer on System.out. * To enable logging logMessages() is used. * * @see #logMessages() */
Set the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging logMessages() is used
setLog
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/suncorba/CORBARemoteSessionControllerDispatcherForTestingExceptions.java", "license": "epl-1.0", "size": 15143 }
[ "org.eclipse.persistence.internal.sessions.remote.Transporter" ]
import org.eclipse.persistence.internal.sessions.remote.Transporter;
import org.eclipse.persistence.internal.sessions.remote.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,424,694
public static Element createTH() { return Document.get().createTHElement().cast(); }
static Element function() { return Document.get().createTHElement().cast(); }
/** * Creates an HTML TH element. * * @return the newly-created element */
Creates an HTML TH element
createTH
{ "repo_name": "syntelos/gwtcc", "path": "src/com/google/gwt/user/client/DOM.java", "license": "apache-2.0", "size": 41015 }
[ "com.google.gwt.dom.client.Document" ]
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,048,414
public void setWorld(@Nullable World worldIn) { this.world = worldIn; if (worldIn == null) { this.renderViewEntity = null; } }
void function(@Nullable World worldIn) { this.world = worldIn; if (worldIn == null) { this.renderViewEntity = null; } }
/** * World sets this RenderManager's worldObj to the world provided */
World sets this RenderManager's worldObj to the world provided
setWorld
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/client/renderer/entity/RenderManager.java", "license": "lgpl-2.1", "size": 27424 }
[ "javax.annotation.Nullable", "net.minecraft.world.World" ]
import javax.annotation.Nullable; import net.minecraft.world.World;
import javax.annotation.*; import net.minecraft.world.*;
[ "javax.annotation", "net.minecraft.world" ]
javax.annotation; net.minecraft.world;
42,832
public void assertContainsPattern(AssertionInfo info, CharSequence actual, Pattern pattern) { checkIsNotNull(pattern); assertNotNull(info, actual); Matcher matcher = pattern.matcher(actual); if (!matcher.find()) throw failures.failure(info, shouldContainPattern(actual, pattern.pattern())); }
void function(AssertionInfo info, CharSequence actual, Pattern pattern) { checkIsNotNull(pattern); assertNotNull(info, actual); Matcher matcher = pattern.matcher(actual); if (!matcher.find()) throw failures.failure(info, shouldContainPattern(actual, pattern.pattern())); }
/** * Verifies that the given {@code CharSequence} contains the given regular expression. * * @param info contains information about the assertion. * @param actual the given {@code CharSequence}. * @param pattern the regular expression to find in the actual {@code CharSequence}. * @throws NullPointerE...
Verifies that the given CharSequence contains the given regular expression
assertContainsPattern
{ "repo_name": "joel-costigliola/assertj-core", "path": "src/main/java/org/assertj/core/internal/Strings.java", "license": "apache-2.0", "size": 57552 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern", "org.assertj.core.api.AssertionInfo", "org.assertj.core.error.ShouldContainPattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern; import org.assertj.core.api.AssertionInfo; import org.assertj.core.error.ShouldContainPattern;
import java.util.regex.*; import org.assertj.core.api.*; import org.assertj.core.error.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
1,652,472
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) { System.out.println(); System.out.println(">>> Cache events example started.");
try (Ignite ignite = Ignition.start(STR)) { System.out.println(); System.out.println(STR);
/** * Executes example. * * @param args Command line arguments, none required. * @throws IgniteException If example execution failed. */
Executes example
main
{ "repo_name": "samaitra/ignite", "path": "examples/src/main/java/org/apache/ignite/examples/datagrid/CacheEventsExample.java", "license": "apache-2.0", "size": 4853 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.Ignition" ]
import org.apache.ignite.Ignite; import org.apache.ignite.Ignition;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
256,409
public void testGetSingleExternalIdBundleVersionType() { final ExternalIdBundle eid = ExternalIdBundle.of("conv", "1"); final VersionCorrection version = VersionCorrection.ofVersionAsOf(Instant.ofEpochSecond(100000)); final Convention convention = new TestConvention(UniqueId.of("conv", "1", null), "conven...
void function() { final ExternalIdBundle eid = ExternalIdBundle.of("conv", "1"); final VersionCorrection version = VersionCorrection.ofVersionAsOf(Instant.ofEpochSecond(100000)); final Convention convention = new TestConvention(UniqueId.of("conv", "1", null), STR); final DummyConventionWebResource resource = new DummyC...
/** * Tests getting a convention by external id bundle. */
Tests getting a convention by external id bundle
testGetSingleExternalIdBundleVersionType
{ "repo_name": "McLeodMoores/starling", "path": "projects/core-rest-client/src/test/java/com/opengamma/core/convention/impl/RemoteConventionSourceTest.java", "license": "apache-2.0", "size": 21252 }
[ "com.opengamma.core.DummyWebResource", "com.opengamma.core.change.ChangeManager", "com.opengamma.core.convention.Convention", "com.opengamma.id.ExternalIdBundle", "com.opengamma.id.UniqueId", "com.opengamma.id.VersionCorrection", "org.testng.Assert", "org.threeten.bp.Instant" ]
import com.opengamma.core.DummyWebResource; import com.opengamma.core.change.ChangeManager; import com.opengamma.core.convention.Convention; import com.opengamma.id.ExternalIdBundle; import com.opengamma.id.UniqueId; import com.opengamma.id.VersionCorrection; import org.testng.Assert; import org.threeten.bp.Instant;
import com.opengamma.core.*; import com.opengamma.core.change.*; import com.opengamma.core.convention.*; import com.opengamma.id.*; import org.testng.*; import org.threeten.bp.*;
[ "com.opengamma.core", "com.opengamma.id", "org.testng", "org.threeten.bp" ]
com.opengamma.core; com.opengamma.id; org.testng; org.threeten.bp;
2,149,966
MigratablePipeline findPipelineToMigrate(LoadImbalance imbalance);
MigratablePipeline findPipelineToMigrate(LoadImbalance imbalance);
/** * Finds a {@link MigratablePipeline pipeline} to migrate * * @param imbalance * @return Handler to migrate or <code>null</code> if no suitable candidate is found */
Finds a <code>MigratablePipeline pipeline</code> to migrate
findPipelineToMigrate
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/internal/networking/nio/iobalancer/MigrationStrategy.java", "license": "apache-2.0", "size": 1531 }
[ "com.hazelcast.internal.networking.nio.MigratablePipeline" ]
import com.hazelcast.internal.networking.nio.MigratablePipeline;
import com.hazelcast.internal.networking.nio.*;
[ "com.hazelcast.internal" ]
com.hazelcast.internal;
1,923,204
// open the contact info pane JFrame frame = new JFrame("Contact Info"); JOptionPane.showMessageDialog(frame, "Questions? Contact Jared Cassarly at\njaredcassarly@gmail.com", "Contact Info", JOptionPane.INFORMATION_MESSAGE); }//GEN-LAST:event_jMenuItem1ActionPerformed // </editor-fold> // <e...
JFrame frame = new JFrame(STR); JOptionPane.showMessageDialog(frame, STR, STR, JOptionPane.INFORMATION_MESSAGE); } void function(String t) { String f = formulaTextField.getText(); if (f.equals(STR2STR"; int at = f.length() - 1; for (int i = f.length() - 1; i >= 0; i--) { if (!Formatting.isDigit(f.charAt(i))) { at = i +...
/** * Adds a text t to the text field or increases the number of that text by one if its already at the end of a string * @param t the text to add */
Adds a text t to the text field or increases the number of that text by one if its already at the end of a string
addText
{ "repo_name": "jcassarly/chemulator", "path": "src/ui/functions/MolarMassCalculator.java", "license": "mit", "size": 196799 }
[ "javax.swing.JFrame", "javax.swing.JOptionPane" ]
import javax.swing.JFrame; import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,616,540
private void popupTriggered(MouseEvent e) { // TODO show the popup menu for microarrays } /** * {@inheritDoc}
void function(MouseEvent e) { } /** * {@inheritDoc}
/** * Respond to a popup trigger event. * @param e * the event we're responding to */
Respond to a popup trigger event
popupTriggered
{ "repo_name": "cgd/j-maanova", "path": "modules/main/src/java/org/jax/maanova/project/gui/MicroarrayTreeNode.java", "license": "gpl-3.0", "size": 3822 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,604,084
public boolean removeAll(Collection<?> c) { throw new UnsupportedOperationException(); }
boolean function(Collection<?> c) { throw new UnsupportedOperationException(); }
/** * Unsupported Operation. If you wish to remove data sources, * remove, do so in the underlying ReaderIteratorFactory. */
Unsupported Operation. If you wish to remove data sources, remove, do so in the underlying ReaderIteratorFactory
removeAll
{ "repo_name": "bulters/stanford-stemming-server", "path": "src/edu/stanford/nlp/objectbank/ObjectBank.java", "license": "gpl-2.0", "size": 13641 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,182,526
static <T> T newInstance(final Class<T> implClass, final Class<?>[] argumentTypes, final Object[] arguments) { if (implClass == null) { throw new IllegalArgumentException("ImplClass must be specified"); } if (argumentTypes == null) { throw new IllegalArgumentExcepti...
static <T> T newInstance(final Class<T> implClass, final Class<?>[] argumentTypes, final Object[] arguments) { if (implClass == null) { throw new IllegalArgumentException(STR); } if (argumentTypes == null) { throw new IllegalArgumentException(STR); } if (arguments == null) { throw new IllegalArgumentException(STR); } f...
/** * Create a new instance by finding a constructor that matches the argumentTypes signature * using the arguments for instantiation. * * @param className Full classname of class to create * @param argumentTypes The constructor argument types * @param arguments The constructor arguments *...
Create a new instance by finding a constructor that matches the argumentTypes signature using the arguments for instantiation
newInstance
{ "repo_name": "topicusonderwijs/arquillian-core", "path": "core/impl-base/src/main/java/org/jboss/arquillian/core/impl/SecurityActions.java", "license": "apache-2.0", "size": 12319 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,897,069
public Path getPath(int id) { return SQLite.select() .from(Path.class) .where(Path_Table.id.eq(id)) .querySingle(); }
Path function(int id) { return SQLite.select() .from(Path.class) .where(Path_Table.id.eq(id)) .querySingle(); }
/** * Database query to get a path from its id * * @param id The path id * @return The corresponding path */
Database query to get a path from its id
getPath
{ "repo_name": "benjisora/Tub", "path": "TubApp/app/src/main/java/com/projects/benjisora/tubapp/data/database/Utils.java", "license": "apache-2.0", "size": 4406 }
[ "com.projects.benjisora.tubapp.data.model.Path", "com.raizlabs.android.dbflow.sql.language.SQLite" ]
import com.projects.benjisora.tubapp.data.model.Path; import com.raizlabs.android.dbflow.sql.language.SQLite;
import com.projects.benjisora.tubapp.data.model.*; import com.raizlabs.android.dbflow.sql.language.*;
[ "com.projects.benjisora", "com.raizlabs.android" ]
com.projects.benjisora; com.raizlabs.android;
1,342,424
@Test public void testRegister() throws Exception { EntityManager mockManager = mock(EntityManager.class); PersonDTO person = mock(PersonDTO.class); LogManager mockLogManager = mock(LogManager.class); when((person.getPassword())).thenReturn("test"); instance.setLogMan...
void function() throws Exception { EntityManager mockManager = mock(EntityManager.class); PersonDTO person = mock(PersonDTO.class); LogManager mockLogManager = mock(LogManager.class); when((person.getPassword())).thenReturn("test"); instance.setLogManager(mockLogManager); instance.setEm(mockManager); instance.registerP...
/** * Test of register method of class DataAccessObject * @throws Exception */
Test of register method of class DataAccessObject
testRegister
{ "repo_name": "Limmen/IV1201", "path": "src/test/java/grupp14/IV1201/integration/DAO/DataAccessObjectTest.java", "license": "mit", "size": 6012 }
[ "javax.persistence.EntityManager", "org.mockito.Mockito" ]
import javax.persistence.EntityManager; import org.mockito.Mockito;
import javax.persistence.*; import org.mockito.*;
[ "javax.persistence", "org.mockito" ]
javax.persistence; org.mockito;
149,882
public void toDerivative() { final ZonedDateTime referenceDate = DateUtils.getUTCDate(2014, 3, 31); final double expirationTime = TimeCalculator.getTimeBetween(referenceDate, EXPIRY_DATE_OPT); final double lastTradingTime = TimeCalculator.getTimeBetween(referenceDate, LAST_TRADING_DATE_OPT); final Bon...
void function() { final ZonedDateTime referenceDate = DateUtils.getUTCDate(2014, 3, 31); final double expirationTime = TimeCalculator.getTimeBetween(referenceDate, EXPIRY_DATE_OPT); final double lastTradingTime = TimeCalculator.getTimeBetween(referenceDate, LAST_TRADING_DATE_OPT); final BondFuturesSecurity underlyingFu...
/** * Tests the toDerivative method. */
Tests the toDerivative method
toDerivative
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/test/java/com/opengamma/analytics/financial/instrument/future/BondFuturesOptionMarginSecurityDefinitionTest.java", "license": "apache-2.0", "size": 5911 }
[ "com.opengamma.analytics.financial.interestrate.future.derivative.BondFuturesOptionMarginSecurity", "com.opengamma.analytics.financial.interestrate.future.derivative.BondFuturesSecurity", "com.opengamma.analytics.util.time.TimeCalculator", "com.opengamma.util.time.DateUtils", "org.testng.AssertJUnit", "or...
import com.opengamma.analytics.financial.interestrate.future.derivative.BondFuturesOptionMarginSecurity; import com.opengamma.analytics.financial.interestrate.future.derivative.BondFuturesSecurity; import com.opengamma.analytics.util.time.TimeCalculator; import com.opengamma.util.time.DateUtils; import org.testng.Asser...
import com.opengamma.analytics.financial.interestrate.future.derivative.*; import com.opengamma.analytics.util.time.*; import com.opengamma.util.time.*; import org.testng.*; import org.threeten.bp.*;
[ "com.opengamma.analytics", "com.opengamma.util", "org.testng", "org.threeten.bp" ]
com.opengamma.analytics; com.opengamma.util; org.testng; org.threeten.bp;
2,770,516
@Test public void checkClad() { LWRRod testRod = new LWRRod(); Material cladMaterial = new Material("Steel304", MaterialType.SOLID); Ring newClad = new Ring("Clad", cladMaterial, 0.0, 0.0); // check if clad can be a set to a new clad testRod.setClad(newClad); assertEquals(newClad, testRod.getClad()); ...
void function() { LWRRod testRod = new LWRRod(); Material cladMaterial = new Material(STR, MaterialType.SOLID); Ring newClad = new Ring("Clad", cladMaterial, 0.0, 0.0); testRod.setClad(newClad); assertEquals(newClad, testRod.getClad()); testRod.setClad(null); assertEquals(newClad, testRod.getClad()); }
/** * <p> * This operations checks getters and setters for the clad object * </p> * */
This operations checks getters and setters for the clad object
checkClad
{ "repo_name": "gorindn/ice", "path": "tests/org.eclipse.ice.reactor.test/src/org/eclipse/ice/reactor/test/LWRRodTester.java", "license": "epl-1.0", "size": 23888 }
[ "org.eclipse.ice.reactor.LWRRod", "org.eclipse.ice.reactor.Material", "org.eclipse.ice.reactor.MaterialType", "org.eclipse.ice.reactor.Ring", "org.junit.Assert" ]
import org.eclipse.ice.reactor.LWRRod; import org.eclipse.ice.reactor.Material; import org.eclipse.ice.reactor.MaterialType; import org.eclipse.ice.reactor.Ring; import org.junit.Assert;
import org.eclipse.ice.reactor.*; import org.junit.*;
[ "org.eclipse.ice", "org.junit" ]
org.eclipse.ice; org.junit;
2,626,507
Artifact load(String vdc, String productInstance, String name) throws EntityNotFoundException;
Artifact load(String vdc, String productInstance, String name) throws EntityNotFoundException;
/** * Find the ProductInstance using the given id. * * @param vdc * the vdc * @param id * the productInstance identifier * @return the productInstance * @throws EntityNotFoundException * if the product instance does not exists */
Find the ProductInstance using the given id
load
{ "repo_name": "hmunfru/fiware-sdc", "path": "core/src/main/java/com/telefonica/euro_iaas/sdc/manager/ArtifactManager.java", "license": "apache-2.0", "size": 4545 }
[ "com.telefonica.euro_iaas.commons.dao.EntityNotFoundException", "com.telefonica.euro_iaas.sdc.model.Artifact" ]
import com.telefonica.euro_iaas.commons.dao.EntityNotFoundException; import com.telefonica.euro_iaas.sdc.model.Artifact;
import com.telefonica.euro_iaas.commons.dao.*; import com.telefonica.euro_iaas.sdc.model.*;
[ "com.telefonica.euro_iaas" ]
com.telefonica.euro_iaas;
2,444,537