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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Auditable(parameters={"sbStoreId"})
public void revertAll(String sbStoreId); | @Auditable(parameters={STR}) void function(String sbStoreId); | /**
* Revert all changed assets for given sandbox (eg. in user sandbox)
* <p>
* Note: This will revert all new/modified/deleted assets from the sandbox store root directory (eg. /www/avm_webapps) - ie. across all web apps
*
* @param sbStoreId sandbox store id
*/ | Revert all changed assets for given sandbox (eg. in user sandbox) Note: This will revert all new/modified/deleted assets from the sandbox store root directory (eg. /www/avm_webapps) - ie. across all web apps | revertAll | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/repository/source/java/org/alfresco/wcm/sandbox/SandboxService.java",
"license": "lgpl-3.0",
"size": 15954
} | [
"org.alfresco.service.Auditable"
] | import org.alfresco.service.Auditable; | import org.alfresco.service.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 419,060 |
public void removeElementAt(int i)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");
super.removeElementAt(i);
} | void function(int i) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); super.removeElementAt(i); } | /**
* Deletes the component at the specified index. Each component in
* this vector with an index greater or equal to the specified
* index is shifted downward to have an index one smaller than
* the value it had previously.
*
* @param i The index of the node to be removed.
* @throws RuntimeExcepti... | Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously | removeElementAt | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xpath/internal/NodeSetDTM.java",
"license": "apache-2.0",
"size": 35187
} | [
"com.sun.org.apache.xalan.internal.res.XSLMessages",
"com.sun.org.apache.xpath.internal.res.XPATHErrorResources"
] | import com.sun.org.apache.xalan.internal.res.XSLMessages; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; | import com.sun.org.apache.xalan.internal.res.*; import com.sun.org.apache.xpath.internal.res.*; | [
"com.sun.org"
] | com.sun.org; | 391,214 |
public static FloatBuffer createVector3Buffer(int vertices) {
FloatBuffer vBuff = createFloatBuffer(3 * vertices);
return vBuff;
}
| static FloatBuffer function(int vertices) { FloatBuffer vBuff = createFloatBuffer(3 * vertices); return vBuff; } | /**
* Create a new FloatBuffer of an appropriate size to hold the specified
* number of Vector3f object data.
*
* @param vertices
* number of vertices that need to be held by the newly created
* buffer
* @return the requested new FloatBuffer
*/ | Create a new FloatBuffer of an appropriate size to hold the specified number of Vector3f object data | createVector3Buffer | {
"repo_name": "asiermarzo/Ultraino",
"path": "AcousticFieldSim/src/acousticfield3d/utils/BufferUtils.java",
"license": "mit",
"size": 44937
} | [
"java.nio.FloatBuffer"
] | import java.nio.FloatBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,063,784 |
public boolean validateVitalSignObservation_validateResultObservationCode(VitalSignObservation vitalSignObservation, DiagnosticChain diagnostics, Map<Object, Object> context) {
// TODO override the constraint, if desired
// -> uncomment the scaffolding
// -> specify the condition that violates the constrain... | boolean function(VitalSignObservation vitalSignObservation, DiagnosticChain diagnostics, Map<Object, Object> context) { if (false) { if (diagnostics != null) { diagnostics.add (createDiagnostic (Diagnostic.ERROR, DIAGNOSTIC_SOURCE, 0, STR, new Object[] { STR, getObjectLabel(vitalSignObservation, context) }, new Object[... | /**
* Validates the validateResultObservationCode constraint of '<em>Vital Sign Observation</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Validates the validateResultObservationCode constraint of 'Vital Sign Observation'. | validateVitalSignObservation_validateResultObservationCode | {
"repo_name": "drbgfc/mdht",
"path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ihe/src/org/openhealthtools/mdht/uml/cda/ihe/util/IHEValidator.java",
"license": "epl-1.0",
"size": 429642
} | [
"java.util.Map",
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.common.util.DiagnosticChain",
"org.openhealthtools.mdht.uml.cda.ihe.VitalSignObservation"
] | import java.util.Map; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain; import org.openhealthtools.mdht.uml.cda.ihe.VitalSignObservation; | import java.util.*; import org.eclipse.emf.common.util.*; import org.openhealthtools.mdht.uml.cda.ihe.*; | [
"java.util",
"org.eclipse.emf",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.openhealthtools.mdht; | 914,132 |
public synchronized Pattern latestResetTopicsPattern() {
return internalTopologyBuilder.latestResetTopicsPattern();
} | synchronized Pattern function() { return internalTopologyBuilder.latestResetTopicsPattern(); } | /**
* Get the Pattern to match all topics requiring to start reading from latest available offset
*
* NOTE this function would not needed by developers working with the processor APIs, but only used
* for the high-level DSL parsing functionalities.
*
* @return the Pattern for matching all ... | Get the Pattern to match all topics requiring to start reading from latest available offset NOTE this function would not needed by developers working with the processor APIs, but only used for the high-level DSL parsing functionalities | latestResetTopicsPattern | {
"repo_name": "zzwlstarby/mykafka",
"path": "streams/src/main/java/org/apache/kafka/streams/processor/TopologyBuilder.java",
"license": "apache-2.0",
"size": 56195
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,833,512 |
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
CreativeServiceInterface creativeService =
adManagerServices.get(session, CreativeServiceInterface.class);
// Create a statement to select creatives.
StatementBuilder statem... | static void function(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { CreativeServiceInterface creativeService = adManagerServices.get(session, CreativeServiceInterface.class); StatementBuilder statementBuilder = new StatementBuilder() .where(STR) .orderBy(STR) .limit(StatementBui... | /**
* Runs the example.
*
* @param adManagerServices the services factory.
* @param session the session.
* @throws ApiException if the API request failed with one or more service errors.
* @throws RemoteException if the API request failed due to other errors.
*/ | Runs the example | runExample | {
"repo_name": "googleads/googleads-java-lib",
"path": "examples/admanager_axis/src/main/java/admanager/axis/v202111/creativeservice/GetImageCreatives.java",
"license": "apache-2.0",
"size": 5900
} | [
"com.google.api.ads.admanager.axis.factory.AdManagerServices",
"com.google.api.ads.admanager.axis.utils.v202111.StatementBuilder",
"com.google.api.ads.admanager.axis.v202111.Creative",
"com.google.api.ads.admanager.axis.v202111.CreativePage",
"com.google.api.ads.admanager.axis.v202111.CreativeServiceInterfa... | import com.google.api.ads.admanager.axis.factory.AdManagerServices; import com.google.api.ads.admanager.axis.utils.v202111.StatementBuilder; import com.google.api.ads.admanager.axis.v202111.Creative; import com.google.api.ads.admanager.axis.v202111.CreativePage; import com.google.api.ads.admanager.axis.v202111.Creative... | import com.google.api.ads.admanager.axis.factory.*; import com.google.api.ads.admanager.axis.utils.v202111.*; import com.google.api.ads.admanager.axis.v202111.*; import com.google.api.ads.admanager.lib.client.*; import java.rmi.*; | [
"com.google.api",
"java.rmi"
] | com.google.api; java.rmi; | 1,233,470 |
EReference getEquipmentContainer_Equipments(); | EReference getEquipmentContainer_Equipments(); | /**
* Returns the meta object for the reference list '{@link CIM.IEC61970.Core.EquipmentContainer#getEquipments <em>Equipments</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Equipments</em>'.
* @see CIM.IEC61970.Core.EquipmentContainer#getEquipm... | Returns the meta object for the reference list '<code>CIM.IEC61970.Core.EquipmentContainer#getEquipments Equipments</code>'. | getEquipmentContainer_Equipments | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Core/CorePackage.java",
"license": "mit",
"size": 253784
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,481,175 |
@XmlElement(name = "max_processors")
public Integer getMaxProcessors() {
return maxProcessors;
} | @XmlElement(name = STR) Integer function() { return maxProcessors; } | /**
* Maximum Number of processors supported by this virtual pool.
*
*/ | Maximum Number of processors supported by this virtual pool | getMaxProcessors | {
"repo_name": "emcvipr/controller-client-java",
"path": "models/src/main/java/com/emc/storageos/model/vpool/ComputeVirtualPoolRestRep.java",
"license": "apache-2.0",
"size": 9713
} | [
"javax.xml.bind.annotation.XmlElement"
] | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 2,451,229 |
public Map<String, Long> getDataToFlush() {
Map<String, Long> result = traces;
traces = new HashMap<>();
return result;
} | Map<String, Long> function() { Map<String, Long> result = traces; traces = new HashMap<>(); return result; } | /**
* Get data to be flushed from the state
* It only returns traces that have been updated since the last flush
*
*/ | Get data to be flushed from the state It only returns traces that have been updated since the last flush | getDataToFlush | {
"repo_name": "jasonchaffee/statsd-jvm-profiler",
"path": "src/main/java/com/etsy/statsd/profiler/util/CPUTraces.java",
"license": "mit",
"size": 1702
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,489,100 |
private int getAdIndexInAdGroupToLoad(int adGroupIndex) {
@AdState int[] states = adPlaybackState.adGroups[adGroupIndex].states;
int adIndexInAdGroup = 0;
// IMA loads ads in order.
while (adIndexInAdGroup < states.length
&& states[adIndexInAdGroup] != AdPlaybackState.AD_STATE_UNAVAILABLE) {
... | int function(int adGroupIndex) { @AdState int[] states = adPlaybackState.adGroups[adGroupIndex].states; int adIndexInAdGroup = 0; while (adIndexInAdGroup < states.length && states[adIndexInAdGroup] != AdPlaybackState.AD_STATE_UNAVAILABLE) { adIndexInAdGroup++; } return adIndexInAdGroup == states.length ? C.INDEX_UNSET ... | /**
* Returns the next ad index in the specified ad group to load, or {@link C#INDEX_UNSET} if all
* ads in the ad group have loaded.
*/ | Returns the next ad index in the specified ad group to load, or <code>C#INDEX_UNSET</code> if all ads in the ad group have loaded | getAdIndexInAdGroupToLoad | {
"repo_name": "kiall/ExoPlayer",
"path": "extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoader.java",
"license": "apache-2.0",
"size": 42515
} | [
"com.google.android.exoplayer2.source.ads.AdPlaybackState"
] | import com.google.android.exoplayer2.source.ads.AdPlaybackState; | import com.google.android.exoplayer2.source.ads.*; | [
"com.google.android"
] | com.google.android; | 1,331,045 |
void sendSickNoteConvertedToVacationNotification(Application application); | void sendSickNoteConvertedToVacationNotification(Application application); | /**
* Sends mail to the affected person if sick note is converted to vacation.
*
* @param application
*/ | Sends mail to the affected person if sick note is converted to vacation | sendSickNoteConvertedToVacationNotification | {
"repo_name": "pongo710/urlaubsverwaltung",
"path": "src/main/java/org/synyx/urlaubsverwaltung/core/mail/MailService.java",
"license": "apache-2.0",
"size": 7557
} | [
"org.synyx.urlaubsverwaltung.core.application.domain.Application"
] | import org.synyx.urlaubsverwaltung.core.application.domain.Application; | import org.synyx.urlaubsverwaltung.core.application.domain.*; | [
"org.synyx.urlaubsverwaltung"
] | org.synyx.urlaubsverwaltung; | 2,084,372 |
@Deprecated
public final native JsArray<Intersect> gwtPickIntersects(int mx,int my,int sw,int sh,Camera camera,Scene scene);
| final native JsArray<Intersect> function(int mx,int my,int sw,int sh,Camera camera,Scene scene); | /**
* temporaly fixed ,now just pick from scene.child() array,not recursive
* @deprecated no more scene support
*/ | temporaly fixed ,now just pick from scene.child() array,not recursive | gwtPickIntersects | {
"repo_name": "sebasbaumh/gwt-three.js",
"path": "src/com/akjava/gwt/three/client/examples/renderers/Projector.java",
"license": "apache-2.0",
"size": 8196
} | [
"com.akjava.gwt.three.client.gwt.core.Intersect",
"com.akjava.gwt.three.client.js.cameras.Camera",
"com.akjava.gwt.three.client.js.scenes.Scene",
"com.google.gwt.core.client.JsArray"
] | import com.akjava.gwt.three.client.gwt.core.Intersect; import com.akjava.gwt.three.client.js.cameras.Camera; import com.akjava.gwt.three.client.js.scenes.Scene; import com.google.gwt.core.client.JsArray; | import com.akjava.gwt.three.client.gwt.core.*; import com.akjava.gwt.three.client.js.cameras.*; import com.akjava.gwt.three.client.js.scenes.*; import com.google.gwt.core.client.*; | [
"com.akjava.gwt",
"com.google.gwt"
] | com.akjava.gwt; com.google.gwt; | 2,585,037 |
@SmallTest
@Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE)
public void testPrerenderingCorrectUrl() throws Exception {
Context context = getInstrumentation().getTargetContext().getApplicationContext();
final CustomTabsConnection connection = warmUpAndWait();
ICustomTabsCallback cb ... | @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) void function() throws Exception { Context context = getInstrumentation().getTargetContext().getApplicationContext(); final CustomTabsConnection connection = warmUpAndWait(); ICustomTabsCallback cb = new CustomTabsTestUtils.DummyCallback(); connection.newSession(cb); as... | /**
* Test whether the url shown on prerender gets updated from about:blank.
* Non-regression test for crbug.com/554236.
*/ | Test whether the url shown on prerender gets updated from about:blank. Non-regression test for crbug.com/554236 | testPrerenderingCorrectUrl | {
"repo_name": "hujiajie/chromium-crosswalk",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java",
"license": "bsd-3-clause",
"size": 38867
} | [
"android.content.Context",
"android.net.Uri",
"android.support.customtabs.ICustomTabsCallback",
"android.widget.EditText",
"org.chromium.base.test.util.Restriction"
] | import android.content.Context; import android.net.Uri; import android.support.customtabs.ICustomTabsCallback; import android.widget.EditText; import org.chromium.base.test.util.Restriction; | import android.content.*; import android.net.*; import android.support.customtabs.*; import android.widget.*; import org.chromium.base.test.util.*; | [
"android.content",
"android.net",
"android.support",
"android.widget",
"org.chromium.base"
] | android.content; android.net; android.support; android.widget; org.chromium.base; | 957,510 |
public synchronized void updateSubscriptions(final SubscriptionUpdates subscriptionUpdates,
final String threadId) {
internalTopologyBuilder.updateSubscriptions(subscriptionUpdates, threadId);
} | synchronized void function(final SubscriptionUpdates subscriptionUpdates, final String threadId) { internalTopologyBuilder.updateSubscriptions(subscriptionUpdates, threadId); } | /**
* NOTE this function would not needed by developers working with the processor APIs, but only used
* for the high-level DSL parsing functionalities.
*/ | NOTE this function would not needed by developers working with the processor APIs, but only used for the high-level DSL parsing functionalities | updateSubscriptions | {
"repo_name": "zzwlstarby/mykafka",
"path": "streams/src/main/java/org/apache/kafka/streams/processor/TopologyBuilder.java",
"license": "apache-2.0",
"size": 56195
} | [
"org.apache.kafka.streams.processor.internals.StreamPartitionAssignor"
] | import org.apache.kafka.streams.processor.internals.StreamPartitionAssignor; | import org.apache.kafka.streams.processor.internals.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,833,517 |
private void processConsumersForInputs(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> delteInst) throws DMLRuntimeException {
// reduce the consumer count for all input lops
// if the count becomes zero, then then variable associated w/ input can be removed
for(Lop in : node.getInputs() ) {
i... | void function(Lop node, ArrayList<Instruction> inst, ArrayList<Instruction> delteInst) throws DMLRuntimeException { for(Lop in : node.getInputs() ) { if(DMLScript.ENABLE_DEBUG_MODE) { processConsumers(in, inst, delteInst, node); } else { processConsumers(in, inst, delteInst, null); } } } | /**
* Generate rmvar instructions for the inputs, if their consumer count becomes zero.
*
* @param node low-level operator
* @param inst list of instructions
* @param delteInst list of instructions
* @throws DMLRuntimeException if DMLRuntimeException occurs
*/ | Generate rmvar instructions for the inputs, if their consumer count becomes zero | processConsumersForInputs | {
"repo_name": "akchinSTC/systemml",
"path": "src/main/java/org/apache/sysml/lops/compile/Dag.java",
"license": "apache-2.0",
"size": 140926
} | [
"java.util.ArrayList",
"org.apache.sysml.api.DMLScript",
"org.apache.sysml.lops.Lop",
"org.apache.sysml.runtime.DMLRuntimeException",
"org.apache.sysml.runtime.instructions.Instruction"
] | import java.util.ArrayList; import org.apache.sysml.api.DMLScript; import org.apache.sysml.lops.Lop; import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.instructions.Instruction; | import java.util.*; import org.apache.sysml.api.*; import org.apache.sysml.lops.*; import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.instructions.*; | [
"java.util",
"org.apache.sysml"
] | java.util; org.apache.sysml; | 2,419,388 |
@Test
public void testMassiveFailAndRecovery() throws Exception {
startGrids(5);
grid(0).events().enabledEvents();
CountDownLatch latch = new CountDownLatch(1);
grid(0).events().localListen(e -> {
DiscoveryEvent evt = (DiscoveryEvent)e;
if (evt.eventNo... | void function() throws Exception { startGrids(5); grid(0).events().enabledEvents(); CountDownLatch latch = new CountDownLatch(1); grid(0).events().localListen(e -> { DiscoveryEvent evt = (DiscoveryEvent)e; if (evt.eventNode().equals(compromisedNode)) latch.countDown(); return true; }, EventType.EVT_NODE_FAILED); compro... | /**
* When connectivity restored, no topology changes will be applied.
*
* @throws Exception If failed.
*/ | When connectivity restored, no topology changes will be applied | testMassiveFailAndRecovery | {
"repo_name": "ptupitsyn/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/IgniteDiscoveryMassiveNodeFailTest.java",
"license": "apache-2.0",
"size": 12020
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit",
"org.apache.ignite.events.DiscoveryEvent",
"org.apache.ignite.events.EventType",
"org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.events.EventType; import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode; | import java.util.concurrent.*; import org.apache.ignite.events.*; import org.apache.ignite.spi.discovery.tcp.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,428,260 |
@Override
public List<Class<?>> getModules() {
return Arrays.asList(
CommunicationsModuleDomModule.class,
DocumentModule.class,
CountryModule.class,
DemoModuleDomSubmodule.class,
DemoAppApplicationModuleFixtureSubmodule.clas... | List<Class<?>> function() { return Arrays.asList( CommunicationsModuleDomModule.class, DocumentModule.class, CountryModule.class, DemoModuleDomSubmodule.class, DemoAppApplicationModuleFixtureSubmodule.class, DemoAppApplicationModuleServicesSubmodule.class, PdfBoxModule.class, CommandModule.class, FreeMarkerModule.class... | /**
* Load all services and entities found in (the packages and subpackages within) these modules
*/ | Load all services and entities found in (the packages and subpackages within) these modules | getModules | {
"repo_name": "incodehq/incode-module-communications",
"path": "demo/application/src/main/java/org/incode/module/communications/demo/application/manifest/DemoAppAppManifest.java",
"license": "apache-2.0",
"size": 3324
} | [
"java.util.Arrays",
"java.util.List",
"org.incode.module.communications.demo.application.fixture.DemoAppApplicationModuleFixtureSubmodule",
"org.incode.module.communications.demo.application.services.DemoAppApplicationModuleServicesSubmodule",
"org.incode.module.communications.demo.module.dom.DemoModuleDomS... | import java.util.Arrays; import java.util.List; import org.incode.module.communications.demo.application.fixture.DemoAppApplicationModuleFixtureSubmodule; import org.incode.module.communications.demo.application.services.DemoAppApplicationModuleServicesSubmodule; import org.incode.module.communications.demo.module.dom.... | import java.util.*; import org.incode.module.communications.demo.application.fixture.*; import org.incode.module.communications.demo.application.services.*; import org.incode.module.communications.demo.module.dom.*; import org.incode.module.communications.dom.*; import org.incode.module.country.dom.*; import org.incode... | [
"java.util",
"org.incode.module",
"org.isisaddons.module"
] | java.util; org.incode.module; org.isisaddons.module; | 2,250,358 |
public StorageServer getUpdateStorage(String groupName, String filename) throws IOException {
ServerInfo[] servers = this
.getStorages(ProtoCommon.TRACKER_PROTO_CMD_SERVICE_QUERY_UPDATE, groupName, filename);
if (servers == null) {
return null;
} else {
... | StorageServer function(String groupName, String filename) throws IOException { ServerInfo[] servers = this .getStorages(ProtoCommon.TRACKER_PROTO_CMD_SERVICE_QUERY_UPDATE, groupName, filename); if (servers == null) { return null; } else { return ClientGlobal.getFactory().createStorageServer( new InetSocketAddress(serve... | /**
* query storage server to update file (delete file or set meta data)
*
* @param trackerServer the tracker server
* @param groupName the group name of storage server
* @param filename filename on storage server
* @return storage server Socket object, return null if fail
*/ | query storage server to update file (delete file or set meta data) | getUpdateStorage | {
"repo_name": "fanyunfeng/jfdfslib",
"path": "src/main/java/jfdfs/core/TrackerClient.java",
"license": "gpl-2.0",
"size": 19631
} | [
"java.io.IOException",
"java.net.InetSocketAddress"
] | import java.io.IOException; import java.net.InetSocketAddress; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 254,678 |
public ConditionalOperatorType getConditionalOperator() {
return conditionalOperator;
} | ConditionalOperatorType function() { return conditionalOperator; } | /**
* Gets the conditional operator.
*
* @return the conditional operator
*/ | Gets the conditional operator | getConditionalOperator | {
"repo_name": "porcelli/OpenSpotLight",
"path": "osl-graph/osl-graph-core/src/main/java/org/openspotlight/graph/query/info/WhereByLinkTypeInfo.java",
"license": "lgpl-3.0",
"size": 23586
} | [
"org.openspotlight.graph.query.ConditionalOperatorType"
] | import org.openspotlight.graph.query.ConditionalOperatorType; | import org.openspotlight.graph.query.*; | [
"org.openspotlight.graph"
] | org.openspotlight.graph; | 1,121,441 |
public Builder addNonLibraryInput(Artifact input) {
addNonLibraryInput(LinkerInputs.simpleLinkerInput(input));
return this;
} | Builder function(Artifact input) { addNonLibraryInput(LinkerInputs.simpleLinkerInput(input)); return this; } | /**
* Adds a single artifact to the set of inputs (C++ source files, header files, etc). Artifacts
* that are not of recognized types will be used for dependency checking but will not be passed
* to the linker. The artifact must not be an archive or a shared library.
*/ | Adds a single artifact to the set of inputs (C++ source files, header files, etc). Artifacts that are not of recognized types will be used for dependency checking but will not be passed to the linker. The artifact must not be an archive or a shared library | addNonLibraryInput | {
"repo_name": "hhclam/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java",
"license": "apache-2.0",
"size": 51985
} | [
"com.google.devtools.build.lib.actions.Artifact"
] | import com.google.devtools.build.lib.actions.Artifact; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 765,239 |
public Set<Obs> getGroupMembers(boolean includeVoided) {
if (includeVoided) {
//just return all group members
return groupMembers;
}
if (groupMembers == null) {
//Empty set so return null
return null;
}
Set<Obs> nonVoided = new LinkedHashSet<Obs>(groupMembers);
Iterator<Obs> i = nonVoided.ite... | Set<Obs> function(boolean includeVoided) { if (includeVoided) { return groupMembers; } if (groupMembers == null) { return null; } Set<Obs> nonVoided = new LinkedHashSet<Obs>(groupMembers); Iterator<Obs> i = nonVoided.iterator(); while (i.hasNext()) { Obs obs = i.next(); if (obs.isVoided()) { i.remove(); } } return nonV... | /**
* Get the group members of this obs group, if this obs is a group. This method will either
* return all group members, or only non-voided group members, depending on if the argument is
* set to be true or false respectively.
*
* @param includeVoided
* @return the set of group members in this obs group
... | Get the group members of this obs group, if this obs is a group. This method will either return all group members, or only non-voided group members, depending on if the argument is set to be true or false respectively | getGroupMembers | {
"repo_name": "vinayvenu/openmrs-core",
"path": "api/src/main/java/org/openmrs/Obs.java",
"license": "mpl-2.0",
"size": 39511
} | [
"java.util.Iterator",
"java.util.LinkedHashSet",
"java.util.Set"
] | import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 511,884 |
private void removeSameInputs(int i) throws Exception{
if(i >= A.size())return;
List<Integer> I = new ArrayList<Integer>();
I.add(i);
for(int j = i+1; j < A.size();j++){
if(label.get(i) == label.get(j)){
if(!UtilityMethods.areEqual(A.get(i), A.get(j))){
throw new Exception("input " + i + " and " ... | void function(int i) throws Exception{ if(i >= A.size())return; List<Integer> I = new ArrayList<Integer>(); I.add(i); for(int j = i+1; j < A.size();j++){ if(label.get(i) == label.get(j)){ if(!UtilityMethods.areEqual(A.get(i), A.get(j))){ throw new Exception(STR + i + STR +j + STR); } I.add(j); } } if(I.size() > 1){ red... | /**
* Checks if any input has the same label as input i. It then removes copies of input i appropriately. So for example an
* expression like f(a,a) becomes
* an automaton with one input. After we are done with input i, we call removeSameInputs(i+1)
* @param i
* @throws Exception
*/ | Checks if any input has the same label as input i. It then removes copies of input i appropriately. So for example an expression like f(a,a) becomes an automaton with one input. After we are done with input i, we call removeSameInputs(i+1) | removeSameInputs | {
"repo_name": "hamoonmousavi/Walnut",
"path": "src/Automata/Automaton.java",
"license": "gpl-3.0",
"size": 79292
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,538,782 |
@Test
public void testRdnQuotedAttributeValue() throws LdapException
{
assertEquals( "2.5.4.3=quoted \\\"value", new Rdn( schemaManager, "cn = quoted \\\"value" ).getNormName() );
} | void function() throws LdapException { assertEquals( STRvalueSTRcn = quoted \\\"value" ).getNormName() ); } | /**
* test a simple Rdn with quoted attribute value : cn = "quoted \"value"
*
* @throws LdapException
*/ | test a simple Rdn with quoted attribute value : cn = "quoted \"value" | testRdnQuotedAttributeValue | {
"repo_name": "darranl/directory-shared",
"path": "integ/src/test/java/org/apache/directory/api/ldap/model/name/SchemaAwareRdnTest.java",
"license": "apache-2.0",
"size": 35457
} | [
"org.apache.directory.api.ldap.model.exception.LdapException",
"org.junit.Assert"
] | import org.apache.directory.api.ldap.model.exception.LdapException; import org.junit.Assert; | import org.apache.directory.api.ldap.model.exception.*; import org.junit.*; | [
"org.apache.directory",
"org.junit"
] | org.apache.directory; org.junit; | 779,263 |
private void refreshMuteVideoButton() {
if ((null != mCall) && mCall.isVideo()) {
mMuteLocalCameraView.setVisibility(View.VISIBLE);
boolean isMuted = mCall.isVideoRecordingMuted();
Log.d(LOG_TAG,"## refreshMuteVideoButton(): isMuted="+isMuted);
// update ico... | void function() { if ((null != mCall) && mCall.isVideo()) { mMuteLocalCameraView.setVisibility(View.VISIBLE); boolean isMuted = mCall.isVideoRecordingMuted(); Log.d(LOG_TAG,STR+isMuted); int iconId = isMuted?R.drawable.ic_material_videocam_off_pink_red:R.drawable.ic_material_videocam_off_grey; mMuteLocalCameraView.setI... | /**
* Update the mute video icon.
*/ | Update the mute video icon | refreshMuteVideoButton | {
"repo_name": "floviolleau/vector-android",
"path": "vector/src/main/java/im/vector/activity/VectorCallViewActivity.java",
"license": "apache-2.0",
"size": 45089
} | [
"android.util.Log",
"android.view.View"
] | import android.util.Log; import android.view.View; | import android.util.*; import android.view.*; | [
"android.util",
"android.view"
] | android.util; android.view; | 1,457,137 |
public static ValueBuilder header(String name) {
return Builder.header(name);
} | static ValueBuilder function(String name) { return Builder.header(name); } | /**
* Returns a value builder for the given header
*/ | Returns a value builder for the given header | header | {
"repo_name": "logzio/camel",
"path": "camel-core/src/test/java/org/apache/camel/TestSupport.java",
"license": "apache-2.0",
"size": 18340
} | [
"org.apache.camel.builder.Builder",
"org.apache.camel.builder.ValueBuilder"
] | import org.apache.camel.builder.Builder; import org.apache.camel.builder.ValueBuilder; | import org.apache.camel.builder.*; | [
"org.apache.camel"
] | org.apache.camel; | 570,277 |
public void append(byte[] nameBuf, int namePos, int nameLen, FileMode mode,
byte[] idBuf, int idPos) {
if (fmtBuf(nameBuf, namePos, nameLen, mode)) {
System.arraycopy(idBuf, idPos, buf, ptr, OBJECT_ID_LENGTH);
ptr += OBJECT_ID_LENGTH;
} else {
try {
fmtOverflowBuffer(nameBuf, namePos, nameLen, m... | void function(byte[] nameBuf, int namePos, int nameLen, FileMode mode, byte[] idBuf, int idPos) { if (fmtBuf(nameBuf, namePos, nameLen, mode)) { System.arraycopy(idBuf, idPos, buf, ptr, OBJECT_ID_LENGTH); ptr += OBJECT_ID_LENGTH; } else { try { fmtOverflowBuffer(nameBuf, namePos, nameLen, mode); overflowBuffer.write(id... | /**
* Append any entry to the tree.
*
* @param nameBuf
* buffer holding the name of the entry. The name should be UTF-8
* encoded, but file name encoding is not a well defined concept
* in Git.
* @param namePos
* first position within {@code nameBuf} of the na... | Append any entry to the tree | append | {
"repo_name": "forge/plugin-undo",
"path": "src/main/jgit/org/jboss/forge/jgit/lib/TreeFormatter.java",
"license": "epl-1.0",
"size": 11557
} | [
"java.io.IOException",
"org.jboss.forge.jgit.lib.FileMode"
] | import java.io.IOException; import org.jboss.forge.jgit.lib.FileMode; | import java.io.*; import org.jboss.forge.jgit.lib.*; | [
"java.io",
"org.jboss.forge"
] | java.io; org.jboss.forge; | 773,465 |
private void transformImageBitmap(final ImageView child, final Transformation t, final int rotationAngle) {
mCamera.save();
final Matrix imageMatrix = t.getMatrix();
final int height = child.getLayoutParams().height;
final int width = child.getLayoutParams().width;
final in... | void function(final ImageView child, final Transformation t, final int rotationAngle) { mCamera.save(); final Matrix imageMatrix = t.getMatrix(); final int height = child.getLayoutParams().height; final int width = child.getLayoutParams().width; final int rotation = Math.abs(rotationAngle); mCamera.translate(0.0f, 0.0f... | /**
* Transform the Image Bitmap by the Angle passed.
*
* @param imageView
* ImageView the ImageView whose bitmap we want to rotate
* @param t
* transformation
* @param rotationAngle
* the Angle by which to rotate the Bitmap
*/ | Transform the Image Bitmap by the Angle passed | transformImageBitmap | {
"repo_name": "worldsproject/android-jigsaw-puzzle-library",
"path": "src/org/worldsproject/puzzle/coverflow/CoverFlow.java",
"license": "gpl-3.0",
"size": 10680
} | [
"android.graphics.Matrix",
"android.view.animation.Transformation",
"android.widget.ImageView"
] | import android.graphics.Matrix; import android.view.animation.Transformation; import android.widget.ImageView; | import android.graphics.*; import android.view.animation.*; import android.widget.*; | [
"android.graphics",
"android.view",
"android.widget"
] | android.graphics; android.view; android.widget; | 1,039,669 |
Map<V, GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder); | Map<V, GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder); | /**
* Returns the geo-position mapped by member.
* Members of a sorted set, which are within the
* borders of the area specified with the center location
* and the maximum distance from the center (the radius)
* in <code>GeoUnit</code> units with <code>GeoOrder</code>
*
* @param ... | Returns the geo-position mapped by member. Members of a sorted set, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius) in <code>GeoUnit</code> units with <code>GeoOrder</code> | radiusWithPosition | {
"repo_name": "ContaAzul/redisson",
"path": "redisson/src/main/java/org/redisson/api/RGeo.java",
"license": "apache-2.0",
"size": 21923
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 829,661 |
public static java.util.List extractPatientElectiveListList(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.PatientElectiveListLiteVoCollection voCollection)
{
return extractPatientElectiveListList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.PatientElectiveListLiteVoCollection voCollection) { return extractPatientElectiveListList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.RefMan.domain.objects.PatientElectiveList list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.RefMan.domain.objects.PatientElectiveList list from the value object collection | extractPatientElectiveListList | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/domain/PatientElectiveListLiteVoAssembler.java",
"license": "agpl-3.0",
"size": 20014
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,258,752 |
@JsonProperty("transit_vlan")
public Long getTransitVlan() {
return transitVlan;
} | @JsonProperty(STR) Long function() { return transitVlan; } | /**
* Gets the transit vlan.
*
* @return the transit vlan
*/ | Gets the transit vlan | getTransitVlan | {
"repo_name": "carmine/open-kilda",
"path": "services/src/openkilda-gui/src/main/java/org/openkilda/integration/model/response/FlowPathInfoData.java",
"license": "apache-2.0",
"size": 9322
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,494,012 |
TimeUnit getUnit(); | TimeUnit getUnit(); | /**
* The unit for the timeout.
*/ | The unit for the timeout | getUnit | {
"repo_name": "blazegraph/database",
"path": "bigdata-core/bigdata/src/java/com/bigdata/ha/msg/IHA2PhasePrepareMessage.java",
"license": "gpl-2.0",
"size": 3327
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 131,762 |
@Override
public Integer save(Object assignmentBean) {
return pPriorityDAO.save((TPpriorityBean)assignmentBean);
}
| Integer function(Object assignmentBean) { return pPriorityDAO.save((TPpriorityBean)assignmentBean); } | /**
* Saves an assignment
* @param assignmentBean
* @return
*/ | Saves an assignment | save | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/admin/customize/projectType/assignments/itemType/ProjectTypeItemTypePriorityAssignmentFacade.java",
"license": "gpl-3.0",
"size": 4728
} | [
"com.aurel.track.beans.TPpriorityBean"
] | import com.aurel.track.beans.TPpriorityBean; | import com.aurel.track.beans.*; | [
"com.aurel.track"
] | com.aurel.track; | 744,689 |
public FloatIterable iterate(Indexable indexes); | FloatIterable function(Indexable indexes); | /**
* Iterates over a set of elements designated by an iterator over indexes.
*
* @param indexes an iterable over indexes
*
* @return an iterable over all the elements associated to the identifiers
*/ | Iterates over a set of elements designated by an iterator over indexes | iterate | {
"repo_name": "varkhan/VCom4j",
"path": "Base/Containers/src/net/varkhan/base/containers/list/IndexedFloatList.java",
"license": "lgpl-2.1",
"size": 8292
} | [
"net.varkhan.base.containers.Indexable",
"net.varkhan.base.containers.type.FloatIterable"
] | import net.varkhan.base.containers.Indexable; import net.varkhan.base.containers.type.FloatIterable; | import net.varkhan.base.containers.*; import net.varkhan.base.containers.type.*; | [
"net.varkhan.base"
] | net.varkhan.base; | 656,692 |
public static TimePeriod triAnnual() {
return new TimePeriod(ChronoUnit.MONTHS, 4);
} | static TimePeriod function() { return new TimePeriod(ChronoUnit.MONTHS, 4); } | /**
* Create and return a new TimePeriod representing one third of a year.
*
* @return a new TimePeriod representing one third of a year.
*/ | Create and return a new TimePeriod representing one third of a year | triAnnual | {
"repo_name": "jrachiele/java-timeseries",
"path": "timeseries/src/main/java/com/github/signaflo/timeseries/TimePeriod.java",
"license": "mit",
"size": 9718
} | [
"java.time.temporal.ChronoUnit"
] | import java.time.temporal.ChronoUnit; | import java.time.temporal.*; | [
"java.time"
] | java.time; | 676,568 |
private void reportUpdate() {
if (DEBUG) {
synchronized (mLock) {
List<String> devices = new ArrayList<String>();
for (int i = 0; i < DEVICE_COUNT; ++i) {
if (mAudioDevices[i]) devices.add(DEVICE_NAMES[i]);
}
log... | void function() { if (DEBUG) { synchronized (mLock) { List<String> devices = new ArrayList<String>(); for (int i = 0; i < DEVICE_COUNT; ++i) { if (mAudioDevices[i]) devices.add(DEVICE_NAMES[i]); } logd(STR + mRequestedAudioDevice + STR + mBluetoothScoState + STR + devices); } } } | /**
* For now, just log the state change but the idea is that we should
* notify a registered state change listener (if any) that there has
* been a change in the state.
* TODO(henrika): add support for state change listener.
*/ | For now, just log the state change but the idea is that we should notify a registered state change listener (if any) that there has been a change in the state. TODO(henrika): add support for state change listener | reportUpdate | {
"repo_name": "XiaosongWei/chromium-crosswalk",
"path": "media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java",
"license": "bsd-3-clause",
"size": 52797
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 57,428 |
public static DoubleMatrix calculate_jacobian(int[] pqIndices, int[] pvpqIndices, ComplexDoubleMatrix voltageVector, ComplexDoubleMatrix y_Matrix) {
log.debug("enter calculate jacobian(...) function");
ComplexDoubleMatrix dSbus_dVmagnitude;
ComplexDoubleMatrix dSbus_dVangle;
DoubleMatrix J11;
D... | static DoubleMatrix function(int[] pqIndices, int[] pvpqIndices, ComplexDoubleMatrix voltageVector, ComplexDoubleMatrix y_Matrix) { log.debug(STR); ComplexDoubleMatrix dSbus_dVmagnitude; ComplexDoubleMatrix dSbus_dVangle; DoubleMatrix J11; DoubleMatrix J12; DoubleMatrix J21; DoubleMatrix J22; DoubleMatrix J; dSbus_dVma... | /**
* Calculates the jacobian matrix. For the calculation, it is required to know
*
* @param pqIndices a int array containing all indexes of pq busses
* @param pvpqIndices a int array containing all indexes of pq and pv busses
* @param voltageVector the (complex) voltage vector
* @param y_Matrix the admit... | Calculates the jacobian matrix. For the calculation, it is required to know | calculate_jacobian | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/powerflow/src/main/java/org/fortiss/powerflowsim/simulation/internal/Solver.java",
"license": "apache-2.0",
"size": 21067
} | [
"org.jblas.ComplexDoubleMatrix",
"org.jblas.DoubleMatrix"
] | import org.jblas.ComplexDoubleMatrix; import org.jblas.DoubleMatrix; | import org.jblas.*; | [
"org.jblas"
] | org.jblas; | 2,215,450 |
public static GridRegistry newInstance(Hub hub) {
DefaultGridRegistry registry = new DefaultGridRegistry(hub);
registry.start();
return registry;
} | static GridRegistry function(Hub hub) { DefaultGridRegistry registry = new DefaultGridRegistry(hub); registry.start(); return registry; } | /**
* Creates a new {@link GridRegistry} and starts it.
*
* @param hub the {@link Hub} to associate this registry with
* @return the registry
*/ | Creates a new <code>GridRegistry</code> and starts it | newInstance | {
"repo_name": "juangj/selenium",
"path": "java/server/src/org/openqa/grid/internal/DefaultGridRegistry.java",
"license": "apache-2.0",
"size": 12889
} | [
"org.openqa.grid.web.Hub"
] | import org.openqa.grid.web.Hub; | import org.openqa.grid.web.*; | [
"org.openqa.grid"
] | org.openqa.grid; | 1,574,891 |
public String recalcularValoresParaLog() throws Exception{
String log = "";
Double subtotal=0D;
Double total=0D;
if (getListDecJurDet()!=null){
for (DecJurDet decJurDet: getListDecJurDet()){
subtotal +=decJurDet.getTotalConcepto();
}
}
log += "\nSumatoria total de detalle de DJ: "+NumberUtil.tr... | String function() throws Exception{ String log = STR\nSumatoria total de detalle de DJ: STR\nMinimo del Recurso: STR\nSubtotal: STR\nSubtotal+Alicuota Publicidad: STR\nSubtotal+Alicuota Mesas y Sillas: STR\nTotal Declarado: STR\nTotal Pagos: "+NumberUtil.truncate(totalPagos,SiatParam.DEC_IMPORTE_DB); return log; } | /**
* Recalcula los valores de la DecJur como el 'recalcularValores' pero solo genera un log en un string que retorna.
*
* @throws Exception
*/ | Recalcula los valores de la DecJur como el 'recalcularValores' pero solo genera un log en un string que retorna | recalcularValoresParaLog | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/bean/DecJur.java",
"license": "gpl-3.0",
"size": 30651
} | [
"ar.gov.rosario.siat.base.iface.model.SiatParam",
"ar.gov.rosario.siat.def.buss.bean.Recurso",
"coop.tecso.demoda.iface.helper.NumberUtil"
] | import ar.gov.rosario.siat.base.iface.model.SiatParam; import ar.gov.rosario.siat.def.buss.bean.Recurso; import coop.tecso.demoda.iface.helper.NumberUtil; | import ar.gov.rosario.siat.base.iface.model.*; import ar.gov.rosario.siat.def.buss.bean.*; import coop.tecso.demoda.iface.helper.*; | [
"ar.gov.rosario",
"coop.tecso.demoda"
] | ar.gov.rosario; coop.tecso.demoda; | 2,466,231 |
public void testZeroAssociatedObjectsNestedSearch1() throws Exception
{
Bag searchObject = new Bag();
Ii ii = new Ii();
ii.setExtension("11");
searchObject.setId(ii);
Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.withjoin.Bag",searchObject ... | void function() throws Exception { Bag searchObject = new Bag(); Ii ii = new Ii(); ii.setExtension("11"); searchObject.setId(ii); Collection results = getApplicationService().search(STR,searchObject ); assertNotNull(results); assertEquals(1,results.size()); Iterator i = results.iterator(); Bag result = (Bag)i.next(); t... | /**
* Uses Nested Search Criteria for search
* Verifies that the results are returned
* Verifies size of the result set
* erifies that the associated object is null
*
* @throws Exception
*/ | Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set erifies that the associated object is null | testZeroAssociatedObjectsNestedSearch1 | {
"repo_name": "NCIP/cacore-sdk",
"path": "sdk-toolkit/iso-example-project/junit/src/test/xml/data/O2OUnidirectionalWJoinXMLDataTest.java",
"license": "bsd-3-clause",
"size": 4903
} | [
"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.withjoin.Bag",
"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.withjoin.Handle",
"gov.nih.nci.iso21090.Ii",
"java.util.Collection",
"java.util.Iterator"
] | import gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.withjoin.Bag; import gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.withjoin.Handle; import gov.nih.nci.iso21090.Ii; import java.util.Collection; import java.util.Iterator; | import gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.withjoin.*; import gov.nih.nci.iso21090.*; import java.util.*; | [
"gov.nih.nci",
"java.util"
] | gov.nih.nci; java.util; | 1,120,102 |
public void dispose() throws SaslException {
} | void function() throws SaslException { } | /**
* Dispose of this participant.
*
* @throws SaslException if disposal failed
*/ | Dispose of this participant | dispose | {
"repo_name": "girirajsharma/wildfly-elytron",
"path": "src/main/java/org/wildfly/security/sasl/util/AbstractSaslParticipant.java",
"license": "apache-2.0",
"size": 9582
} | [
"javax.security.sasl.SaslException"
] | import javax.security.sasl.SaslException; | import javax.security.sasl.*; | [
"javax.security"
] | javax.security; | 289,620 |
public void testSemantics() throws SQLException
{
println("testSemantics: auth=" + this._authLevel +
" user="+getTestConfiguration().getUserName());
_conn = getConnection();
_stm = _conn.createStatement();
doStmt("create role foo",
sqlA... | void function() throws SQLException { println(STR + this._authLevel + STR+getTestConfiguration().getUserName()); _conn = getConnection(); _stm = _conn.createStatement(); doStmt(STR, sqlAuthorizationRequired, null , roleDboOnly); doStmt(STR, sqlAuthorizationRequired, null , roleDboOnly); doStmt(STR, sqlAuthorizationRequ... | /**
* Semantic tests for roles.
* Side effect from the dbo run are needed for the nonDbo run
* which follows (since only dbo can create and grant roles).
*
* @throws SQLException
*/ | Semantic tests for roles. Side effect from the dbo run are needed for the nonDbo run which follows (since only dbo can create and grant roles) | testSemantics | {
"repo_name": "splicemachine/spliceengine",
"path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/RolesTest.java",
"license": "agpl-3.0",
"size": 49259
} | [
"com.splicemachine.dbTesting.junit.JDBC",
"java.sql.SQLException"
] | import com.splicemachine.dbTesting.junit.JDBC; import java.sql.SQLException; | import com.splicemachine.*; import java.sql.*; | [
"com.splicemachine",
"java.sql"
] | com.splicemachine; java.sql; | 1,866,524 |
public static void setJMSReplyTo(Message message, Destination replyTo) {
try {
message.setJMSReplyTo(replyTo);
} catch (Exception e) {
// ignore due OracleAQ does not support accessing JMSReplyTo
}
} | static void function(Message message, Destination replyTo) { try { message.setJMSReplyTo(replyTo); } catch (Exception e) { } } | /**
* Sets the JMSReplyTo on the message.
*
* @param message the message
* @param replyTo the reply to destination
*/ | Sets the JMSReplyTo on the message | setJMSReplyTo | {
"repo_name": "onders86/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessageHelper.java",
"license": "apache-2.0",
"size": 16011
} | [
"javax.jms.Destination",
"javax.jms.Message"
] | import javax.jms.Destination; import javax.jms.Message; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 1,993,554 |
public static java.util.Date toDate(int month, int day, int year, int hour, int minute, int second) {
Calendar calendar = Calendar.getInstance();
try {
calendar.set(year, month - 1, day, hour, minute, second);
calendar.set(Calendar.MILLISECOND, 0);
} catch (Exc... | static java.util.Date function(int month, int day, int year, int hour, int minute, int second) { Calendar calendar = Calendar.getInstance(); try { calendar.set(year, month - 1, day, hour, minute, second); calendar.set(Calendar.MILLISECOND, 0); } catch (Exception e) { return null; } return new java.util.Date(calendar.ge... | /**
* Makes a Date from separate ints for month, day, year, hour, minute, and second.
*
* @param month The month int
* @param day The day int
* @param year The year int
* @param hour The hour int
* @param minute The minute int
* @param second The second int
... | Makes a Date from separate ints for month, day, year, hour, minute, and second | toDate | {
"repo_name": "mfadili/ajiel3",
"path": "src/main/java/com/google/ajiel/service/util/UtilDateTime.java",
"license": "apache-2.0",
"size": 44106
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,697,160 |
@Test(timeout=30000)
public void testDatanodeRespectsKeepAliveTimeout() throws Exception {
Configuration clientConf = new Configuration(conf);
// Set a client socket cache expiry time much longer than
// the datanode-side expiration time.
final long CLIENT_EXPIRY_MS = 60000L;
clientConf.setLong... | @Test(timeout=30000) void function() throws Exception { Configuration clientConf = new Configuration(conf); final long CLIENT_EXPIRY_MS = 60000L; clientConf.setLong(DFS_CLIENT_SOCKET_CACHE_EXPIRY_MSEC_KEY, CLIENT_EXPIRY_MS); clientConf.set(DFS_CLIENT_CONTEXT, STR); DistributedFileSystem fs = (DistributedFileSystem)File... | /**
* Regression test for HDFS-3357. Check that the datanode is respecting
* its configured keepalive timeout.
*/ | Regression test for HDFS-3357. Check that the datanode is respecting its configured keepalive timeout | testDatanodeRespectsKeepAliveTimeout | {
"repo_name": "oza/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDataTransferKeepalive.java",
"license": "apache-2.0",
"size": 9809
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.hdfs.net.Peer",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.net.Peer; import org.junit.Assert; import org.junit.Test; | import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.net.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,349,835 |
private JsonWriter open(JsonScope empty, String openBracket) throws IOException {
beforeValue(true);
stack.add(empty);
out.write(openBracket);
return this;
} | JsonWriter function(JsonScope empty, String openBracket) throws IOException { beforeValue(true); stack.add(empty); out.write(openBracket); return this; } | /**
* Enters a new scope by appending any necessary whitespace and the given
* bracket.
*/ | Enters a new scope by appending any necessary whitespace and the given bracket | open | {
"repo_name": "axmadjon/AndroidSlidingMenu",
"path": "app/src/main/java/uz/greenwhite/slidingmenu/support/v10/json/android_json/JsonWriter.java",
"license": "apache-2.0",
"size": 16585
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,512,048 |
id = from.optInt("id");
title = from.optString("title");
return this;
}
public VKApiCity(Parcel in) {
this.id = in.readInt();
this.title = in.readString();
}
public VKApiCity() {
} | id = from.optInt("id"); title = from.optString("title"); return this; } public VKApiCity(Parcel in) { this.id = in.readInt(); this.title = in.readString(); } public VKApiCity() { } | /**
* Fills a City instance from JSONObject.
*/ | Fills a City instance from JSONObject | parse | {
"repo_name": "DementorAl/VkAdmin",
"path": "vksdk_library/src/main/java/com/vk/sdk/api/model/VKApiCity.java",
"license": "mit",
"size": 2622
} | [
"android.os.Parcel"
] | import android.os.Parcel; | import android.os.*; | [
"android.os"
] | android.os; | 2,540,148 |
this.problem = problem;
setAlive(true);
AndOrSearch<S, A> andOrSearch = new AndOrSearch<>();
Optional<Plan<S, A>> plan = andOrSearch.search(problem);
contingencyPlan = plan.orElse(null);
currStep = -1;
if (notifier != null)
notifier.notify("Contingency plan: " + contingencyPlan);
} | this.problem = problem; setAlive(true); AndOrSearch<S, A> andOrSearch = new AndOrSearch<>(); Optional<Plan<S, A>> plan = andOrSearch.search(problem); contingencyPlan = plan.orElse(null); currStep = -1; if (notifier != null) notifier.notify(STR + contingencyPlan); } | /**
* Computes a contingency plan for the given problem and prepares plan execution.
* @param problem
* The search problem for this agent to solve.
*/ | Computes a contingency plan for the given problem and prepares plan execution | makePlan | {
"repo_name": "aima-java/aima-java",
"path": "aima-core/src/main/java/aima/core/search/agent/NondeterministicSearchAgent.java",
"license": "mit",
"size": 3165
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,749,009 |
@Override public void enterRbraceRule(@NotNull PJParser.RbraceRuleContext ctx) { } | @Override public void enterRbraceRule(@NotNull PJParser.RbraceRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitClassOrInterfaceModifier | {
"repo_name": "Diolor/PJ",
"path": "src/main/java/com/lorentzos/pj/PJBaseListener.java",
"license": "mit",
"size": 73292
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 782,484 |
public void setServiceValue(String serviceValue) throws JNCException {
setServiceValue(new YangString(serviceValue));
} | void function(String serviceValue) throws JNCException { setServiceValue(new YangString(serviceValue)); } | /**
* Sets the value for child leaf "service",
* using a String value.
* @param serviceValue used during instantiation.
*/ | Sets the value for child leaf "service", using a String value | setServiceValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/statistics/gtpv2Path/Mobility.java",
"license": "apache-2.0",
"size": 11359
} | [
"com.tailf.jnc.YangString"
] | import com.tailf.jnc.YangString; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 662,048 |
public void setDateTrx (Timestamp DateTrx); | void function (Timestamp DateTrx); | /** Set Transaction Date.
* Transaction Date
*/ | Set Transaction Date. Transaction Date | setDateTrx | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/model/I_PA_SLA_Measure.java",
"license": "gpl-2.0",
"size": 6464
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,665,086 |
public void arrayStringCsvEmpty(List<String> arrayQuery) {
arrayStringCsvEmptyWithServiceResponseAsync(arrayQuery).toBlocking().single().body();
} | void function(List<String> arrayQuery) { arrayStringCsvEmptyWithServiceResponseAsync(arrayQuery).toBlocking().single().body(); } | /**
* Get an empty array [] of string using the csv-array format.
*
* @param arrayQuery an empty array [] of string using the csv-array format
*/ | Get an empty array [] of string using the csv-array format | arrayStringCsvEmpty | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/implementation/QueriesImpl.java",
"license": "mit",
"size": 139749
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,862,319 |
Future<List<R>> query(String query);
| Future<List<R>> query(String query); | /**
* Executes a query and returns a `Future` with the result rows.
*
* @param query
* the query statement
* @return the result rows
*/ | Executes a query and returns a `Future` with the result rows | query | {
"repo_name": "traneio/ndbc",
"path": "ndbc-api/src/main/java/io/trane/ndbc/DataSource.java",
"license": "apache-2.0",
"size": 5826
} | [
"io.trane.future.Future",
"java.util.List"
] | import io.trane.future.Future; import java.util.List; | import io.trane.future.*; import java.util.*; | [
"io.trane.future",
"java.util"
] | io.trane.future; java.util; | 2,762,805 |
public JTable getTable(final String widgetName, AbstractTableModel model) {
WidgetInfo wi = getWidgetInfo(widgetName);
JTable table = new JTable(model);
if (wi.getPreferredSize() != null) {
table.setPreferredScrollableViewportSize(wi.getPreferredSize());
}
table.setFillsViewportHeight(true);
return ta... | JTable function(final String widgetName, AbstractTableModel model) { WidgetInfo wi = getWidgetInfo(widgetName); JTable table = new JTable(model); if (wi.getPreferredSize() != null) { table.setPreferredScrollableViewportSize(wi.getPreferredSize()); } table.setFillsViewportHeight(true); return table; } | /**
* Liefert eine Tabelle.
*/ | Liefert eine Tabelle | getTable | {
"repo_name": "udamken/PswGen",
"path": "PswGenDesktop/src/de/dknapps/pswgendesktop/gui/base/WidgetFactory.java",
"license": "apache-2.0",
"size": 10622
} | [
"javax.swing.JTable",
"javax.swing.table.AbstractTableModel"
] | import javax.swing.JTable; import javax.swing.table.AbstractTableModel; | import javax.swing.*; import javax.swing.table.*; | [
"javax.swing"
] | javax.swing; | 1,810,933 |
@Override
public String getModifyColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc,
String pk, boolean semicolon ) {
String retval = "";
retval += "ALTER TABLE " + tablename + " DROP " + v.getName() + Const.CR + ";" + Const.CR;
retval += "ALTER TABLE " + tablenam... | String function( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc, String pk, boolean semicolon ) { String retval = STRALTER TABLE STR DROP STR;STRALTER TABLE STR ADD " + getFieldDefinition( v, tk, pk, useAutoinc, true, false ); return retval; } | /**
* Generates the SQL statement to modify a column in the specified table
*
* @param tablename
* The table to add
* @param v
* The column defined as a value
* @param tk
* the name of the technical key field
* @param useAutoinc
* whether or not this fie... | Generates the SQL statement to modify a column in the specified table | getModifyColumnStatement | {
"repo_name": "tkafalas/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/GuptaDatabaseMeta.java",
"license": "apache-2.0",
"size": 7190
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,396,868 |
public void onCreate(Bundle b) {
super.onCreate(b);
//Get a reference to the application, to gain access to the current Day object.
LifePreserverDiet application = (LifePreserverDiet) this.getApplication();
day = application.getDay();
//Get whether or not the user is a female from the previous Activity.
... | void function(Bundle b) { super.onCreate(b); LifePreserverDiet application = (LifePreserverDiet) this.getApplication(); day = application.getDay(); isFemale = this.getIntent().getBooleanExtra(STR, true); id = this.getIntent().getIntExtra("id", R.id.imageView_pfd_dairy); switch(id) { case R.id.imageView_pfd_dairy: dairy... | /**
* Called on create of the Activity. Sets up the activity
* with its layout.
*
* Will call a corresponding method for the share type you're looking at.
*/ | Called on create of the Activity. Sets up the activity with its layout. Will call a corresponding method for the share type you're looking at | onCreate | {
"repo_name": "lsissoko/Life-Preserver-Diet",
"path": "Life_Preserver_Diet_PFD/src/com/lifePreserverDiet/PFD/UserInterface/Dialogs/PFDShareDialog.java",
"license": "mit",
"size": 12392
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,475,126 |
protected void parseSequence(DICOMSequence sequence, long length, boolean isExplicit,
DICOMReaderFunctions dicomReaderFunctions, boolean skipSequence)
throws IOException, EOFException, DICOMException {
if (sequence == null) {
throw new NullPointerException("Null Sequence");
}
length = length & 0... | void function(DICOMSequence sequence, long length, boolean isExplicit, DICOMReaderFunctions dicomReaderFunctions, boolean skipSequence) throws IOException, EOFException, DICOMException { if (sequence == null) { throw new NullPointerException(STR); } length = length & 0xffffffffL; boolean isLengthUndefined = length == 0... | /**
* Parse a DICOM sequence.
*
* @param sequence DICOM sequence to parse.
* @param length Length of DICOM sequence.
* @param isExplicit Set if the content of the BufferedInputStream
* has explicit (true) or implicit (false) value representation.
* @param dicomReaderFunctions Implementation of the DICOMR... | Parse a DICOM sequence | parseSequence | {
"repo_name": "nelsonjchen/droid-dicom-viewer",
"path": "src/be/ac/ulb/lisa/idot/dicom/file/DICOMReader.java",
"license": "gpl-3.0",
"size": 21790
} | [
"be.ac.ulb.lisa.idot.dicom.DICOMException",
"be.ac.ulb.lisa.idot.dicom.DICOMItem",
"be.ac.ulb.lisa.idot.dicom.DICOMSequence",
"java.io.EOFException",
"java.io.IOException"
] | import be.ac.ulb.lisa.idot.dicom.DICOMException; import be.ac.ulb.lisa.idot.dicom.DICOMItem; import be.ac.ulb.lisa.idot.dicom.DICOMSequence; import java.io.EOFException; import java.io.IOException; | import be.ac.ulb.lisa.idot.dicom.*; import java.io.*; | [
"be.ac.ulb",
"java.io"
] | be.ac.ulb; java.io; | 654,276 |
public static Bitmap scale(Bitmap src, ScaleType scaleType, int w, int h) {
final PointF scales = resolveScale(scaleType, w, h, src.getWidth(), src.getHeight());
final Matrix m = new Matrix();
m.setScale(scales.x, scales.y);
return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.... | static Bitmap function(Bitmap src, ScaleType scaleType, int w, int h) { final PointF scales = resolveScale(scaleType, w, h, src.getWidth(), src.getHeight()); final Matrix m = new Matrix(); m.setScale(scales.x, scales.y); return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), m, true); } | /**
* More advanced scaling than simple
* {@link android.graphics.Bitmap#createScaledBitmap(android.graphics.Bitmap, int, int, boolean)}.
* <br /><br />
* <p/>
* Method will create totally new Bitmap, and the source Bitmap will stay safe
* ({@link android.graphics.Bitmap#recycle()} won't b... | More advanced scaling than simple <code>android.graphics.Bitmap#createScaledBitmap(android.graphics.Bitmap, int, int, boolean)</code>. Method will create totally new Bitmap, and the source Bitmap will stay safe (<code>android.graphics.Bitmap#recycle()</code> won't be called). So, if you don't need the source Bitmap aft... | scale | {
"repo_name": "janng0/Android-J0Util",
"path": "src/main/java/ru/jango/j0util/BmpUtil.java",
"license": "mit",
"size": 16992
} | [
"android.graphics.Bitmap",
"android.graphics.Matrix",
"android.graphics.PointF"
] | import android.graphics.Bitmap; import android.graphics.Matrix; import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,587,587 |
if (hasPermission(player, "usb.mod.bypasscooldowns") || hasPermission(player, "usb.exempt.cooldown." + cmd)) {
return 0;
}
Map<String, Long> map = cooldowns.get(player.getUniqueId());
if (map != null) {
Long timeout = map.get(cmd);
long now = System.currentTim... | if (hasPermission(player, STR) hasPermission(player, STR + cmd)) { return 0; } Map<String, Long> map = cooldowns.get(player.getUniqueId()); if (map != null) { Long timeout = map.get(cmd); long now = System.currentTimeMillis(); return timeout != null && timeout > now ? TimeUtil.millisAsSeconds(timeout - now) : 0; } retu... | /**
* Returns the number of seconds left on the cooldown.
* <code>0</code> if it's not on cooldown anymore.
* @param player The player
* @param cmd The command to check
* @return
*/ | Returns the number of seconds left on the cooldown. <code>0</code> if it's not on cooldown anymore | getCooldown | {
"repo_name": "GrimmKitty/uSkyBlock",
"path": "uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/handler/CooldownHandler.java",
"license": "gpl-3.0",
"size": 2760
} | [
"dk.lockfuglsang.minecraft.perm.PermissionUtil",
"java.util.Map",
"us.talabrek.ultimateskyblock.util.TimeUtil"
] | import dk.lockfuglsang.minecraft.perm.PermissionUtil; import java.util.Map; import us.talabrek.ultimateskyblock.util.TimeUtil; | import dk.lockfuglsang.minecraft.perm.*; import java.util.*; import us.talabrek.ultimateskyblock.util.*; | [
"dk.lockfuglsang.minecraft",
"java.util",
"us.talabrek.ultimateskyblock"
] | dk.lockfuglsang.minecraft; java.util; us.talabrek.ultimateskyblock; | 2,363,544 |
Localpart getLocalpartOrThrow(); | Localpart getLocalpartOrThrow(); | /**
* Get the localpart of this JID or throw an {@code IllegalStateException}.
* <p>
* If the JID is of form {@code <localpart@domain.example>} then this method returns 'localpart'. If the JID has no
* localpart, then <code>null</code> is returned.
* </p>
*
* @return the localpart of this JID.
*/ | Get the localpart of this JID or throw an IllegalStateException. If the JID is of form then this method returns 'localpart'. If the JID has no localpart, then <code>null</code> is returned. | getLocalpartOrThrow | {
"repo_name": "Flowdalic/jxmpp",
"path": "jxmpp-jid/src/main/java/org/jxmpp/jid/Jid.java",
"license": "apache-2.0",
"size": 13433
} | [
"org.jxmpp.jid.parts.Localpart"
] | import org.jxmpp.jid.parts.Localpart; | import org.jxmpp.jid.parts.*; | [
"org.jxmpp.jid"
] | org.jxmpp.jid; | 2,401,051 |
private IoSession newSessionWithoutLock(SocketAddress remoteAddress,
SocketAddress localAddress) throws Exception {
RawIoChannel handle = boundHandles.get(localAddress);
if (handle == null) {
throw new IllegalArgumentException("Unknown local address: "
+ ... | IoSession function(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception { RawIoChannel handle = boundHandles.get(localAddress); if (handle == null) { throw new IllegalArgumentException(STR + localAddress); } IoSession session; synchronized (sessionRecycler) { session = sessionRecycler.recycle(remot... | /**
* New session without lock.
*
* @param remoteAddress
* the remote address
* @param localAddress
* the local address
* @return the io session
* @throws Exception
* the exception
*/ | New session without lock | newSessionWithoutLock | {
"repo_name": "ravihuang/mina-transport-rawsocket",
"path": "src/main/java/org/apache/mina/transport/rawsocket/RawIoAcceptor.java",
"license": "apache-2.0",
"size": 23257
} | [
"java.net.SocketAddress",
"org.apache.mina.core.session.IoSession",
"org.apache.mina.util.ExceptionMonitor"
] | import java.net.SocketAddress; import org.apache.mina.core.session.IoSession; import org.apache.mina.util.ExceptionMonitor; | import java.net.*; import org.apache.mina.core.session.*; import org.apache.mina.util.*; | [
"java.net",
"org.apache.mina"
] | java.net; org.apache.mina; | 1,856,135 |
// ----------------------------------------------------------
public void testSetPieceOnSquare()
{
assertNull( b.getPieceOnSquare() );
b.setPieceOnSquare( new Pawn( c, 1, 5, 0 ) );
assertTrue( b.getPieceOnSquare() instanceof Pawn );
assertTrue( b.getComponents().length... | void function() { assertNull( b.getPieceOnSquare() ); b.setPieceOnSquare( new Pawn( c, 1, 5, 0 ) ); assertTrue( b.getPieceOnSquare() instanceof Pawn ); assertTrue( b.getComponents().length == 1 ); } | /**
* Tests the setPieceOnSquare() method.
*/ | Tests the setPieceOnSquare() method | testSetPieceOnSquare | {
"repo_name": "bakatz/Chess",
"path": "src/com/bakatz/chess/view/BoardSquareTest.java",
"license": "gpl-3.0",
"size": 2191
} | [
"com.bakatz.chess.model.Pawn"
] | import com.bakatz.chess.model.Pawn; | import com.bakatz.chess.model.*; | [
"com.bakatz.chess"
] | com.bakatz.chess; | 2,579,863 |
protected void writeIndexFile() throws IOException, CarbonDataWriterException {
// get the header
IndexHeader indexHeader = CarbonMetadataUtil
.getIndexHeader(localCardinality, thriftColumnSchemaList, dataWriterVo.getBucketNumber());
// get the block index info thrift
List<BlockIndex> blockInd... | void function() throws IOException, CarbonDataWriterException { IndexHeader indexHeader = CarbonMetadataUtil .getIndexHeader(localCardinality, thriftColumnSchemaList, dataWriterVo.getBucketNumber()); List<BlockIndex> blockIndexThrift = CarbonMetadataUtil.getBlockIndexInfo(blockIndexInfoList); String fileName = dataWrit... | /**
* Below method will be used to write the idex file
*
* @throws IOException throws io exception if any problem while writing
* @throws CarbonDataWriterException data writing
*/ | Below method will be used to write the idex file | writeIndexFile | {
"repo_name": "ksimar/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/store/writer/AbstractFactDataWriter.java",
"license": "apache-2.0",
"size": 28679
} | [
"java.io.File",
"java.io.IOException",
"java.util.List",
"org.apache.carbondata.core.util.CarbonMetadataUtil",
"org.apache.carbondata.core.writer.CarbonIndexFileWriter",
"org.apache.carbondata.format.BlockIndex",
"org.apache.carbondata.format.IndexHeader",
"org.apache.carbondata.processing.store.write... | import java.io.File; import java.io.IOException; import java.util.List; import org.apache.carbondata.core.util.CarbonMetadataUtil; import org.apache.carbondata.core.writer.CarbonIndexFileWriter; import org.apache.carbondata.format.BlockIndex; import org.apache.carbondata.format.IndexHeader; import org.apache.carbondata... | import java.io.*; import java.util.*; import org.apache.carbondata.core.util.*; import org.apache.carbondata.core.writer.*; import org.apache.carbondata.format.*; import org.apache.carbondata.processing.store.writer.exception.*; | [
"java.io",
"java.util",
"org.apache.carbondata"
] | java.io; java.util; org.apache.carbondata; | 2,208,090 |
private boolean sendEvent(Event eventToSend) throws ServletException {
if (eventToSend == null) return false;
try {
EventProxy eventProxy = Util.createEventProxy();
if (eventProxy == null) throw new ServletException("Event proxy object is null, unable to send event " + eventToSend.getUei(... | boolean function(Event eventToSend) throws ServletException { if (eventToSend == null) return false; try { EventProxy eventProxy = Util.createEventProxy(); if (eventProxy == null) throw new ServletException(STR + eventToSend.getUei()); eventProxy.send(eventToSend); return true; } catch (Throwable e) { throw new Servlet... | /**
* Sends the given event via the EventProxy to the system. If null no event is send.
* @param eventToSend The Event to send. If null, no event is send.
* @return <code>true</code> if the event was send successfully and no exception occured, <code>false</code> if eventToSend is null.
* @throws ServletExceptio... | Sends the given event via the EventProxy to the system. If null no event is send | sendEvent | {
"repo_name": "tdefilip/opennms",
"path": "opennms-webapp/src/main/java/org/opennms/web/admin/nodeManagement/SnmpConfigServlet.java",
"license": "agpl-3.0",
"size": 10061
} | [
"javax.servlet.ServletException",
"org.opennms.netmgt.model.events.EventProxy",
"org.opennms.netmgt.xml.event.Event",
"org.opennms.web.api.Util"
] | import javax.servlet.ServletException; import org.opennms.netmgt.model.events.EventProxy; import org.opennms.netmgt.xml.event.Event; import org.opennms.web.api.Util; | import javax.servlet.*; import org.opennms.netmgt.model.events.*; import org.opennms.netmgt.xml.event.*; import org.opennms.web.api.*; | [
"javax.servlet",
"org.opennms.netmgt",
"org.opennms.web"
] | javax.servlet; org.opennms.netmgt; org.opennms.web; | 279,724 |
static Map<String, Integer> getFeatureList(Schema inputSchema, @Nullable String featuresToInclude,
@Nullable String featuresToExclude, String predictionField) {
if (!Strings.isNullOrEmpty(featuresToExclude) && !Strings.isNullOrEmpty(featuresToInclude)) {
throw ne... | static Map<String, Integer> getFeatureList(Schema inputSchema, @Nullable String featuresToInclude, @Nullable String featuresToExclude, String predictionField) { if (!Strings.isNullOrEmpty(featuresToExclude) && !Strings.isNullOrEmpty(featuresToInclude)) { throw new IllegalArgumentException(STR + STR); } Map<String, Inte... | /**
* Get the feature list of the features that have to be used for training/prediction depending on the
* featuresToInclude or featuresToInclude list.
*
* @param inputSchema schema of the received record.
* @param featuresToInclude features to be used for training/prediction.
* @param featuresT... | Get the feature list of the features that have to be used for training/prediction depending on the featuresToInclude or featuresToInclude list | getFeatureList | {
"repo_name": "romy-khetan/hydrator-plugins",
"path": "spark-plugins/src/main/java/co/cask/hydrator/plugin/spark/SparkUtils.java",
"license": "apache-2.0",
"size": 9499
} | [
"co.cask.cdap.api.data.schema.Schema",
"com.google.common.base.Splitter",
"com.google.common.collect.Iterables",
"com.google.common.collect.Lists",
"java.util.HashSet",
"java.util.LinkedHashMap",
"java.util.Map",
"java.util.Set",
"javax.annotation.Nullable"
] | import co.cask.cdap.api.data.schema.Schema; import com.google.common.base.Splitter; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import javax.annotation.Nullable; | import co.cask.cdap.api.data.schema.*; import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import javax.annotation.*; | [
"co.cask.cdap",
"com.google.common",
"java.util",
"javax.annotation"
] | co.cask.cdap; com.google.common; java.util; javax.annotation; | 2,793,620 |
EClass getResourceParameter(); | EClass getResourceParameter(); | /**
* Returns the meta object for class '{@link org.eclipse.bpmn2.ResourceParameter <em>Resource Parameter</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Resource Parameter</em>'.
* @see org.eclipse.bpmn2.ResourceParameter
* @generated
... | Returns the meta object for class '<code>org.eclipse.bpmn2.ResourceParameter Resource Parameter</code>'. | getResourceParameter | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,408,319 |
public long setFeed(Feed feed) {
ContentValues values = new ContentValues();
values.put(KEY_TITLE, feed.getTitle());
values.put(KEY_LINK, feed.getLink());
values.put(KEY_DESCRIPTION, feed.getDescription());
values.put(KEY_PAYMENT_LINK, feed.getPaymentLink());
values.p... | long function(Feed feed) { ContentValues values = new ContentValues(); values.put(KEY_TITLE, feed.getTitle()); values.put(KEY_LINK, feed.getLink()); values.put(KEY_DESCRIPTION, feed.getDescription()); values.put(KEY_PAYMENT_LINK, feed.getPaymentLink()); values.put(KEY_AUTHOR, feed.getAuthor()); values.put(KEY_LANGUAGE,... | /**
* Inserts or updates a feed entry
*
* @return the id of the entry
*/ | Inserts or updates a feed entry | setFeed | {
"repo_name": "corecode/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java",
"license": "mit",
"size": 72353
} | [
"android.content.ContentValues",
"android.text.TextUtils",
"android.util.Log",
"de.danoeh.antennapod.core.feed.Feed"
] | import android.content.ContentValues; import android.text.TextUtils; import android.util.Log; import de.danoeh.antennapod.core.feed.Feed; | import android.content.*; import android.text.*; import android.util.*; import de.danoeh.antennapod.core.feed.*; | [
"android.content",
"android.text",
"android.util",
"de.danoeh.antennapod"
] | android.content; android.text; android.util; de.danoeh.antennapod; | 590,748 |
private void ensureFieldsInitialized() {
// if foreignFunctionNamesSet is null, create a new set and populate it
// with information from the module type info
if (foreignFunctionNamesSet == null) {
foreignFunctionNamesSet = new HashSet<String>();
fi... | void function() { if (foreignFunctionNamesSet == null) { foreignFunctionNamesSet = new HashSet<String>(); final int nFunctions = currentModuleTypeInfo.getNFunctions(); for (int i = 0; i < nFunctions; i++) { Function function = currentModuleTypeInfo.getNthFunction(i); if (function.getForeignFunctionInfo() != null) { for... | /**
* Ensures that the sets of foreign function names and primitive function names are
* initialized to contain the proper content given the current module.
*/ | Ensures that the sets of foreign function names and primitive function names are initialized to contain the proper content given the current module | ensureFieldsInitialized | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Platform/src/org/openquark/cal/compiler/CALTypeChecker.java",
"license": "bsd-3-clause",
"size": 321839
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,433,366 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<FileShareInner> getWithResponse(
String resourceGroupName, String accountName, String shareName, GetShareExpand expand, Context context) {
return getWithResponseAsync(resourceGroupName, accountName, shareName, expand, context).block();
... | @ServiceMethod(returns = ReturnType.SINGLE) Response<FileShareInner> function( String resourceGroupName, String accountName, String shareName, GetShareExpand expand, Context context) { return getWithResponseAsync(resourceGroupName, accountName, shareName, expand, context).block(); } | /**
* Gets properties of a specified share.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case
* insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names
* ... | Gets properties of a specified share | getWithResponse | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/FileSharesClientImpl.java",
"license": "mit",
"size": 82676
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.storage.fluent.models.FileShareInner",
"com.azure.resourcemanager.storage.models.GetShareExpand"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.storage.fluent.models.FileShareInner; import com.azure.resourcemanager.storage.models.GetShareExpand; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*; import com.azure.resourcemanager.storage.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,619,940 |
@Test
public void testErrorColumnAndColumnsArray() {
try {
ScanLevelProjection.build(
RowSetTestUtils.projectList("a", ColumnsScanFramework.COLUMNS_COL),
ScanTestUtils.parsers(new ColumnsArrayParser(true)));
fail();
} catch (UserException e) {
// Expected
}
} | void function() { try { ScanLevelProjection.build( RowSetTestUtils.projectList("a", ColumnsScanFramework.COLUMNS_COL), ScanTestUtils.parsers(new ColumnsArrayParser(true))); fail(); } catch (UserException e) { } } | /**
* Exclude a column and `columns` (reversed order of previous test).
*/ | Exclude a column and `columns` (reversed order of previous test) | testErrorColumnAndColumnsArray | {
"repo_name": "kkhatua/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/scan/TestColumnsArrayParser.java",
"license": "apache-2.0",
"size": 10552
} | [
"org.apache.drill.common.exceptions.UserException",
"org.apache.drill.exec.physical.impl.scan.columns.ColumnsArrayParser",
"org.apache.drill.exec.physical.impl.scan.columns.ColumnsScanFramework",
"org.apache.drill.exec.physical.impl.scan.project.ScanLevelProjection",
"org.apache.drill.exec.physical.resultSe... | import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.physical.impl.scan.columns.ColumnsArrayParser; import org.apache.drill.exec.physical.impl.scan.columns.ColumnsScanFramework; import org.apache.drill.exec.physical.impl.scan.project.ScanLevelProjection; import org.apache.drill.exec.phy... | import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.physical.*; import org.apache.drill.exec.physical.impl.scan.columns.*; import org.apache.drill.exec.physical.impl.scan.project.*; import org.junit.*; | [
"org.apache.drill",
"org.junit"
] | org.apache.drill; org.junit; | 2,384,587 |
placeTypeColors = createPlaceTypeColors();
placeTypeImg = createPlaceTypeImages();
for (String t : gui.getPlaceTypes()) {
selectionCombo.add(t);
String[] itemsOfType =
new String[gui.getPlacesOfType(t).size()];
int i = 0;
for (Place p : gui.getPlacesOfType(t)) {
itemsOfType[i] = p.getName()... | placeTypeColors = createPlaceTypeColors(); placeTypeImg = createPlaceTypeImages(); for (String t : gui.getPlaceTypes()) { selectionCombo.add(t); String[] itemsOfType = new String[gui.getPlacesOfType(t).size()]; int i = 0; for (Place p : gui.getPlacesOfType(t)) { itemsOfType[i] = p.getName(); i++; } Arrays.sort(itemsOfT... | /**
* Add all the places to the combo box. The types are put in as is, and
* each place is indented with two spaces.
*/ | Add all the places to the combo box. The types are put in as is, and each place is indented with two spaces | addSelectableElements | {
"repo_name": "bhenne/MoSP-Siafu",
"path": "Siafu/src/de/uni_hannover/dcsec/siafu/graphics/controlpanel/PlacesPanel.java",
"license": "gpl-2.0",
"size": 5877
} | [
"de.uni_hannover.dcsec.siafu.model.Place",
"java.util.Arrays"
] | import de.uni_hannover.dcsec.siafu.model.Place; import java.util.Arrays; | import de.uni_hannover.dcsec.siafu.model.*; import java.util.*; | [
"de.uni_hannover.dcsec",
"java.util"
] | de.uni_hannover.dcsec; java.util; | 2,154,208 |
public void testFileChecksumMatch() {
RoutingAllocation allocation = onePrimaryOnNode1And1Replica(yesAllocationDeciders());
DiscoveryNode nodeToMatch = randomBoolean() ? node2 : node3;
testAllocator.addData(node1, true, "MATCH", new StoreFileMetaData("file1", 10, "MATCH_CHECKSUM"))
... | void function() { RoutingAllocation allocation = onePrimaryOnNode1And1Replica(yesAllocationDeciders()); DiscoveryNode nodeToMatch = randomBoolean() ? node2 : node3; testAllocator.addData(node1, true, "MATCH", new StoreFileMetaData("file1", 10, STR)) .addData(nodeToMatch, false, STR, new StoreFileMetaData("file1", 10, S... | /**
* Verifies that when there is no sync id match but files match, we allocate it to matching node.
*/ | Verifies that when there is no sync id match but files match, we allocate it to matching node | testFileChecksumMatch | {
"repo_name": "myelin/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/gateway/ReplicaShardAllocatorTests.java",
"license": "apache-2.0",
"size": 22222
} | [
"org.elasticsearch.cluster.node.DiscoveryNode",
"org.elasticsearch.cluster.routing.ShardRoutingState",
"org.elasticsearch.cluster.routing.allocation.RoutingAllocation",
"org.elasticsearch.index.store.StoreFileMetaData",
"org.hamcrest.Matchers"
] | import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; import org.elasticsearch.index.store.StoreFileMetaData; import org.hamcrest.Matchers; | import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*; import org.elasticsearch.index.store.*; import org.hamcrest.*; | [
"org.elasticsearch.cluster",
"org.elasticsearch.index",
"org.hamcrest"
] | org.elasticsearch.cluster; org.elasticsearch.index; org.hamcrest; | 2,052,678 |
public static int getDayDifference(Time time, long date1, long date2) {
time.set(date1);
int startDay = Time.getJulianDay(date1, time.gmtoff);
time.set(date2);
int currentDay = Time.getJulianDay(date2, time.gmtoff);
return Math.abs(currentDay - startDay);
} | static int function(Time time, long date1, long date2) { time.set(date1); int startDay = Time.getJulianDay(date1, time.gmtoff); time.set(date2); int currentDay = Time.getJulianDay(date2, time.gmtoff); return Math.abs(currentDay - startDay); } | /**
* Determine the difference, in days between two dates. Uses similar logic as the
* {@link android.text.format.DateUtils.getRelativeTimeSpanString} method.
*
* @param time Instance of time object to use for calculations.
* @param date1 First date to check.
* @param date2 Second date to... | Determine the difference, in days between two dates. Uses similar logic as the <code>android.text.format.DateUtils.getRelativeTimeSpanString</code> method | getDayDifference | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/ContactsCommon/src/com/android/contacts/common/util/DateUtils.java",
"license": "gpl-3.0",
"size": 12330
} | [
"android.text.format.Time"
] | import android.text.format.Time; | import android.text.format.*; | [
"android.text"
] | android.text; | 802,658 |
private boolean disabled = false;
private Scheduler scheduler = null;
private Integer startDelay = null;
private boolean autoStart; | private boolean disabled = false; private Scheduler scheduler = null; private Integer startDelay = null; private boolean autoStart; | /**
* <p>Returns the singleton instance of the quartz lifecycle.</p>
*/ | Returns the singleton instance of the quartz lifecycle | getInstance | {
"repo_name": "ctrimble/xchain",
"path": "quartz/src/main/java/org/xchain/framework/quartz/QuartzLifecycle.java",
"license": "apache-2.0",
"size": 9684
} | [
"org.quartz.Scheduler"
] | import org.quartz.Scheduler; | import org.quartz.*; | [
"org.quartz"
] | org.quartz; | 2,364,157 |
void onResolve(Map<String, Object> obj); | void onResolve(Map<String, Object> obj); | /**
* This method woll be called for each object that is retrieved
* from this collection
* @param obj the object
*/ | This method woll be called for each object that is retrieved from this collection | onResolve | {
"repo_name": "igd-geo/mongomvcc",
"path": "src/main/java/de/fhg/igd/mongomvcc/impl/AccessStrategy.java",
"license": "lgpl-3.0",
"size": 1415
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 74,479 |
public boolean login(String username, String password, String account)
throws IOException
{
user(username);
if (FTPReply.isPositiveCompletion(replyCode))
return true;
// If we get here, we either have an error code, or an intermmediate
// reply requesting passwo... | boolean function(String username, String password, String account) throws IOException { user(username); if (FTPReply.isPositiveCompletion(replyCode)) return true; if (!FTPReply.isPositiveIntermediate(replyCode)) return false; pass(password); if (FTPReply.isPositiveCompletion(replyCode)) return true; if (!FTPReply.isPos... | /***
* Login to the FTP server using the provided username, password,
* and account. If no account is required by the server, only
* the username and password, the account information is not used.
* <p>
* @param username The username to login under.
* @param password The password to use.
... | Login to the FTP server using the provided username, password, and account. If no account is required by the server, only the username and password, the account information is not used. | login | {
"repo_name": "rwinston/netling",
"path": "src/main/java/org/netling/ftp/FTPClient.java",
"license": "apache-2.0",
"size": 119032
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 933,060 |
Observable<ServiceResponse<Product>> putNonRetry201Creating400InvalidJsonWithServiceResponseAsync();
Product putNonRetry201Creating400InvalidJson(Product product); | Observable<ServiceResponse<Product>> putNonRetry201Creating400InvalidJsonWithServiceResponseAsync(); Product putNonRetry201Creating400InvalidJson(Product product); | /**
* Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by serv... | Long running put request, service returns a Product with 'ProvisioningState' = 'Creating' and 201 response code | putNonRetry201Creating400InvalidJson | {
"repo_name": "sergey-shandar/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/LROSADs.java",
"license": "mit",
"size": 173405
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,685,698 |
@Override
public Adapter createExecutionAdapter() {
if (executionItemProvider == null) {
executionItemProvider = new ExecutionItemProvider(this);
}
return executionItemProvider;
}
protected AnyActionItemProvider anyActionItemProvider; | Adapter function() { if (executionItemProvider == null) { executionItemProvider = new ExecutionItemProvider(this); } return executionItemProvider; } protected AnyActionItemProvider anyActionItemProvider; | /**
* This creates an adapter for a {@link br.ufpe.ines.decode.decode.taskDescription.measurements.Execution}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>br.ufpe.ines.decode.decode.taskDescription.measurements.Execution</code>. | createExecutionAdapter | {
"repo_name": "netuh/DecodePlatformPlugin",
"path": "br.ufpe.ines.decode/bundles/br.ufpe.ines.decode.model.edit/src/br/ufpe/ines/decode/decode/taskDescription/measurements/provider/MeasurementsItemProviderAdapterFactory.java",
"license": "gpl-3.0",
"size": 8882
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 58,526 |
public static ZonedDateTimeMatcher sameInstant(ZonedDateTime date) {
return new ZonedDateTimeMatcher(date);
} | static ZonedDateTimeMatcher function(ZonedDateTime date) { return new ZonedDateTimeMatcher(date); } | /**
* Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime
* @param date the reference datetime against which the examined string is checked
*/ | Creates a matcher that matches when the examined string reprensents the same instant as the reference datetime | sameInstant | {
"repo_name": "AppertaFoundation/Code4Health-Platform",
"path": "src/test/java/cloud/operon/platform/web/rest/TestUtil.java",
"license": "agpl-3.0",
"size": 4388
} | [
"java.time.ZonedDateTime"
] | import java.time.ZonedDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 2,838,444 |
public static ConfigInfo lookupConfigInfoById(Long id) {
Session session = HibernateFactory.getSession();
ConfigInfo c = (ConfigInfo)session.get(ConfigInfo.class, id);
return c;
} | static ConfigInfo function(Long id) { Session session = HibernateFactory.getSession(); ConfigInfo c = (ConfigInfo)session.get(ConfigInfo.class, id); return c; } | /**
* Finds a ConfigInfo from the database with a given id.
* @param id The identifier for the ConfigInfo
* @return The sought for ConfigInfo or null if not found.
*/ | Finds a ConfigInfo from the database with a given id | lookupConfigInfoById | {
"repo_name": "aronparsons/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/config/ConfigurationFactory.java",
"license": "gpl-2.0",
"size": 39666
} | [
"com.redhat.rhn.common.hibernate.HibernateFactory",
"org.hibernate.Session"
] | import com.redhat.rhn.common.hibernate.HibernateFactory; import org.hibernate.Session; | import com.redhat.rhn.common.hibernate.*; import org.hibernate.*; | [
"com.redhat.rhn",
"org.hibernate"
] | com.redhat.rhn; org.hibernate; | 1,499,750 |
@Override
public void setError(CharSequence error, Drawable icon) {
super.setError(error, icon);
lastErrorIcon = icon;
// if the error is not null, and we are in JB, force
// the error to show
if (error != null ) {
showErrorIconHax(icon);
}
} | void function(CharSequence error, Drawable icon) { super.setError(error, icon); lastErrorIcon = icon; if (error != null ) { showErrorIconHax(icon); } } | /**
* Resolve an issue where the error icon is hidden under some cases in JB
* due to a bug http://code.google.com/p/android/issues/detail?id=40417
*/ | Resolve an issue where the error icon is hidden under some cases in JB due to a bug HREF | setError | {
"repo_name": "jbondia/android-edittext-validator",
"path": "library/src/com/andreabaccega/widget/FormEditText.java",
"license": "mit",
"size": 4694
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 526,465 |
@Test
public void testSearchHelpItemsPage() throws Exception {
HelpTopic topic = new HelpTopic();
topic.setName("test");
persist(topic);
for (int i = 0; i < 100; i++) {
HelpItem item = new HelpItem();
item.setContent("a");
item.setTitle... | void function() throws Exception { HelpTopic topic = new HelpTopic(); topic.setName("test"); persist(topic); for (int i = 0; i < 100; i++) { HelpItem item = new HelpItem(); item.setContent("a"); item.setTitle("b"); item.setTopic(topic); persist(item); } HelpItemSearchCriteria criteria = new HelpItemSearchCriteria(); cr... | /**
* <p>
* Tests the pagination of searching the help items.
* </p>
* @throws Exception to JUnit.
*/ | Tests the pagination of searching the help items. | testSearchHelpItemsPage | {
"repo_name": "pjcabrera/NTL-Asteroid-Data-Hunter",
"path": "Source Code/hunter/src/test/java/gov/nasa/asteroid/hunter/services/impl/HelpServiceImplTest.java",
"license": "apache-2.0",
"size": 8572
} | [
"gov.nasa.asteroid.hunter.models.HelpItem",
"gov.nasa.asteroid.hunter.models.HelpItemSearchCriteria",
"gov.nasa.asteroid.hunter.models.HelpTopic",
"gov.nasa.asteroid.hunter.models.SearchResult",
"org.junit.Assert"
] | import gov.nasa.asteroid.hunter.models.HelpItem; import gov.nasa.asteroid.hunter.models.HelpItemSearchCriteria; import gov.nasa.asteroid.hunter.models.HelpTopic; import gov.nasa.asteroid.hunter.models.SearchResult; import org.junit.Assert; | import gov.nasa.asteroid.hunter.models.*; import org.junit.*; | [
"gov.nasa.asteroid",
"org.junit"
] | gov.nasa.asteroid; org.junit; | 382,871 |
public void setKeyPW(FileSystemOptions opts, String keyPW){
setParam(opts, KEY_PASSWD, keyPW);
} | void function(FileSystemOptions opts, String keyPW){ setParam(opts, KEY_PASSWD, keyPW); } | /**
* Set the Key password.
*
* @param opts The FileSystemOptions.
* @param keyPW The key password.
*/ | Set the Key password | setKeyPW | {
"repo_name": "virajsenevirathne/wso2-commons-vfs",
"path": "core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java",
"license": "apache-2.0",
"size": 15470
} | [
"org.apache.commons.vfs2.FileSystemOptions"
] | import org.apache.commons.vfs2.FileSystemOptions; | import org.apache.commons.vfs2.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,348,155 |
public void addKernelLifecycleListener(final CommonLifecycleListener listener) {
if (!listeners.contains(listener)) {
listeners.add(listener);
}
} | void function(final CommonLifecycleListener listener) { if (!listeners.contains(listener)) { listeners.add(listener); } } | /**
* Add a listener to the lifecycle.
* @param listener the listener to add
*/ | Add a listener to the lifecycle | addKernelLifecycleListener | {
"repo_name": "sakai-mirror/k2",
"path": "agnostic/shared/src/main/java/org/sakaiproject/kernel/component/KernelLifecycle.java",
"license": "apache-2.0",
"size": 12622
} | [
"org.sakaiproject.kernel.loader.common.CommonLifecycleListener"
] | import org.sakaiproject.kernel.loader.common.CommonLifecycleListener; | import org.sakaiproject.kernel.loader.common.*; | [
"org.sakaiproject.kernel"
] | org.sakaiproject.kernel; | 1,918,215 |
public AwardEmoji addMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(),
"projects", g... | AwardEmoji function(Object projectIdOrPath, Integer mergeRequestIid, String name) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm().withParam("name", name, true); Response response = post(Response.Status.CREATED, form.asMap(), STR, getProjectIdOrPath(projectIdOrPath), STR, mergeRequestIid, STR); retu... | /**
* Add an award emoji to the specified merge request.
*
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/award_emoji</code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param mergeRequ... | Add an award emoji to the specified merge request. <code><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/award_emoji</code></code> | addMergeRequestAwardEmoji | {
"repo_name": "gmessner/gitlab4j-api",
"path": "src/main/java/org/gitlab4j/api/AwardEmojiApi.java",
"license": "mit",
"size": 15565
} | [
"javax.ws.rs.core.Response",
"org.gitlab4j.api.models.AwardEmoji"
] | import javax.ws.rs.core.Response; import org.gitlab4j.api.models.AwardEmoji; | import javax.ws.rs.core.*; import org.gitlab4j.api.models.*; | [
"javax.ws",
"org.gitlab4j.api"
] | javax.ws; org.gitlab4j.api; | 2,687,944 |
private void doDownloadStart(String url, String userAgent, String contentDisposition,
String mimetype, long contentLength) {
if (ApplicationUtils.checkCardState(this, true)) {
DownloadItem item = new DownloadItem(this, url);
Controller.getInstance().addToDownload(item);
item.startDownload();
Toast... | void function(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { if (ApplicationUtils.checkCardState(this, true)) { DownloadItem item = new DownloadItem(this, url); Controller.getInstance().addToDownload(item); item.startDownload(); Toast.makeText(this, getString(R.string.Ma... | /**
* Initiate a download. Check the SD card and start the download runnable.
*
* @param url
* The url to download.
* @param userAgent
* The user agent.
* @param contentDisposition
* The content disposition.
* @param mimetype
* The mime type.
* @param c... | Initiate a download. Check the SD card and start the download runnable | doDownloadStart | {
"repo_name": "udo-tech-team/ShadowsocksProxy",
"path": "src/org/shadowsocks/zirco/ui/activities/MainActivity.java",
"license": "gpl-3.0",
"size": 55388
} | [
"android.widget.Toast",
"org.shadowsocks.zirco.controllers.Controller",
"org.shadowsocks.zirco.model.items.DownloadItem",
"org.shadowsocks.zirco.utils.ApplicationUtils"
] | import android.widget.Toast; import org.shadowsocks.zirco.controllers.Controller; import org.shadowsocks.zirco.model.items.DownloadItem; import org.shadowsocks.zirco.utils.ApplicationUtils; | import android.widget.*; import org.shadowsocks.zirco.controllers.*; import org.shadowsocks.zirco.model.items.*; import org.shadowsocks.zirco.utils.*; | [
"android.widget",
"org.shadowsocks.zirco"
] | android.widget; org.shadowsocks.zirco; | 1,713,236 |
public static String resourceTypeToPath(String type) {
return type.replaceAll("\\:", "/");
}
/**
* Returns the super type of the given resource type. This is the result of
* adapting the child resource
* {@link JcrResourceConstants#SLING_RESOURCE_SUPER_TYPE_PROPERTY} of the
* <c... | static String function(String type) { return type.replaceAll("\\:", "/"); } /** * Returns the super type of the given resource type. This is the result of * adapting the child resource * {@link JcrResourceConstants#SLING_RESOURCE_SUPER_TYPE_PROPERTY} of the * <code>Resource</code> addressed by the <code>resourceType</c... | /**
* Helper method, which returns the given resource type as returned from the
* {@link org.apache.sling.api.resource.Resource#getResourceType()} as a
* relative path.
*
* @param type The resource type to be converted into a path
* @return The resource type as a path.
*/ | Helper method, which returns the given resource type as returned from the <code>org.apache.sling.api.resource.Resource#getResourceType()</code> as a relative path | resourceTypeToPath | {
"repo_name": "codders/k2-sling-fork",
"path": "bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/JcrResourceUtil.java",
"license": "apache-2.0",
"size": 14565
} | [
"org.apache.sling.api.resource.Resource",
"org.apache.sling.api.resource.ResourceResolver"
] | import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; | import org.apache.sling.api.resource.*; | [
"org.apache.sling"
] | org.apache.sling; | 262,155 |
public void forceProtocol(String protocol) throws UnknownProtocolException, NotYetExposedException {
if (protocol == null || protocol.length() == 0) {
this.forcedProtocol = null;
return;
}
// Protocols factories can be added dynamically, so the only way to
// ... | void function(String protocol) throws UnknownProtocolException, NotYetExposedException { if (protocol == null protocol.length() == 0) { this.forcedProtocol = null; return; } if (RemoteObjectProtocolFactoryRegistry.get(protocol) != null) { boolean exposed = false; for (URI uri : rros.keySet()) { if (uri.getScheme().equa... | /**
* Force the specified protocol to be used for all communication. Null value avoid the forcing.
*
* @throws UnknownProtocolException
* The protocol specified isn't known
* @throws NotYetExposedException
* The Object isn't already exposed with this protocol
*/ | Force the specified protocol to be used for all communication. Null value avoid the forcing | forceProtocol | {
"repo_name": "paraita/programming",
"path": "programming-core/src/main/java/org/objectweb/proactive/core/remoteobject/RemoteObjectSet.java",
"license": "agpl-3.0",
"size": 23798
} | [
"org.objectweb.proactive.core.remoteobject.exception.UnknownProtocolException"
] | import org.objectweb.proactive.core.remoteobject.exception.UnknownProtocolException; | import org.objectweb.proactive.core.remoteobject.exception.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 468,959 |
Collection<Instance> loadInstances(Collection<String> uris) {
Collection<Instance> instances = new LinkedList<>(instanceTypeResolver.resolveInstances(uris));
Set<String> deletedInstancesIds = getDeletedInstancesIds(uris, instances);
deletedInstancesIds
.forEach(deletedInstanceId -> instanceService.loadDele... | Collection<Instance> loadInstances(Collection<String> uris) { Collection<Instance> instances = new LinkedList<>(instanceTypeResolver.resolveInstances(uris)); Set<String> deletedInstancesIds = getDeletedInstancesIds(uris, instances); deletedInstancesIds .forEach(deletedInstanceId -> instanceService.loadDeleted(deletedIn... | /**
* Retrieve the instances for the given ids using a {@link InstanceTypeResolver}. If there are deleted instances
* they are retrieved using {@link InstanceService}.
*
* @param uris
* the uris of the objects
* @return the solr documents that match the search
*/ | Retrieve the instances for the given ids using a <code>InstanceTypeResolver</code>. If there are deleted instances they are retrieved using <code>InstanceService</code> | loadInstances | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/extensions/emf-solr-parent/emf-solr-impl/src/main/java/com/sirma/itt/emf/label/retrieve/HeaderFieldValueRetriever.java",
"license": "lgpl-3.0",
"size": 8608
} | [
"com.sirma.itt.seip.domain.instance.Instance",
"java.util.Collection",
"java.util.LinkedList",
"java.util.Set"
] | import com.sirma.itt.seip.domain.instance.Instance; import java.util.Collection; import java.util.LinkedList; import java.util.Set; | import com.sirma.itt.seip.domain.instance.*; import java.util.*; | [
"com.sirma.itt",
"java.util"
] | com.sirma.itt; java.util; | 220,774 |
@Test void testSqlBuilder() {
final SqlBuilder buf = new SqlBuilder(CalciteSqlDialect.DEFAULT);
assertEquals(0, buf.length());
buf.append("select ");
assertEquals("select ", buf.getSql());
buf.identifier("x");
assertEquals("select \"x\"", buf.getSql());
buf.append(", ");
buf.identifi... | @Test void testSqlBuilder() { final SqlBuilder buf = new SqlBuilder(CalciteSqlDialect.DEFAULT); assertEquals(0, buf.length()); buf.append(STR); assertEquals(STR, buf.getSql()); buf.identifier("x"); assertEquals(STRx\STR, STRySTRa b"); assertEquals(STRx\", \"y\".\STRSTRcan't get no satisfactionSTR'can''t get no satisfac... | /**
* Tests SQL builders.
*/ | Tests SQL builders | testSqlBuilder | {
"repo_name": "jcamachor/calcite",
"path": "core/src/test/java/org/apache/calcite/util/UtilTest.java",
"license": "apache-2.0",
"size": 110240
} | [
"org.apache.calcite.sql.dialect.CalciteSqlDialect",
"org.apache.calcite.sql.util.SqlBuilder",
"org.junit.jupiter.api.Assertions",
"org.junit.jupiter.api.Test"
] | import org.apache.calcite.sql.dialect.CalciteSqlDialect; import org.apache.calcite.sql.util.SqlBuilder; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; | import org.apache.calcite.sql.dialect.*; import org.apache.calcite.sql.util.*; import org.junit.jupiter.api.*; | [
"org.apache.calcite",
"org.junit.jupiter"
] | org.apache.calcite; org.junit.jupiter; | 2,648,798 |
public TimeValue getThrottled() {
return throttled;
} | TimeValue function() { return throttled; } | /**
* The total time this request has throttled itself not including the current throttle time if it is currently sleeping.
*/ | The total time this request has throttled itself not including the current throttle time if it is currently sleeping | getThrottled | {
"repo_name": "xuzha/elasticsearch",
"path": "modules/reindex/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java",
"license": "apache-2.0",
"size": 18171
} | [
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,893,208 |
public boolean recordAnswer(String answer) throws Exception {
LocalDateTime end = LocalDateTime.now();
Duration duration = Duration.between(start, end);
boolean correctness = quiz.get(quizIndex).checkAnswer(answer);
ArrayList<QuestionHistory> histories = getStudent().getQuestionHisto... | boolean function(String answer) throws Exception { LocalDateTime end = LocalDateTime.now(); Duration duration = Duration.between(start, end); boolean correctness = quiz.get(quizIndex).checkAnswer(answer); ArrayList<QuestionHistory> histories = getStudent().getQuestionHistories(); for (QuestionHistory qh : histories) { ... | /**
* Record and check the answer provided by the Student
* @param answer The Student's answer to the Question
* @return True if they were right, false otherwise
* @throws Exception Thrown if the file in which the answer will be recorded does not exist
*/ | Record and check the answer provided by the Student | recordAnswer | {
"repo_name": "U8NWXD/EducationApplication",
"path": "StaticQuestionQuiz.java",
"license": "gpl-3.0",
"size": 6054
} | [
"java.time.Duration",
"java.time.LocalDateTime",
"java.util.ArrayList"
] | import java.time.Duration; import java.time.LocalDateTime; import java.util.ArrayList; | import java.time.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 940,321 |
public Collection<Device> getDevices() {
return new LinkedList<Device>(mDevices);
} | Collection<Device> function() { return new LinkedList<Device>(mDevices); } | /**
* gets the list of devices
*
* @return devices
*/ | gets the list of devices | getDevices | {
"repo_name": "sourceress-project/archestica",
"path": "src/games/stendhal/client/sound/manager/SoundManagerNG.java",
"license": "gpl-2.0",
"size": 12427
} | [
"games.stendhal.client.sound.manager.DeviceEvaluator",
"java.util.Collection",
"java.util.LinkedList"
] | import games.stendhal.client.sound.manager.DeviceEvaluator; import java.util.Collection; import java.util.LinkedList; | import games.stendhal.client.sound.manager.*; import java.util.*; | [
"games.stendhal.client",
"java.util"
] | games.stendhal.client; java.util; | 2,059,323 |
public static void verifyFilesNotEqual(FileSystem fs, Path p1, Path p2,
int len) throws IOException {
try (FSDataInputStream in1 = fs.open(p1);
FSDataInputStream in2 = fs.open(p2)) {
for (int i = 0; i < len; i++) {
if (in1.read() != in2.read()) {
return;
}
}
... | static void function(FileSystem fs, Path p1, Path p2, int len) throws IOException { try (FSDataInputStream in1 = fs.open(p1); FSDataInputStream in2 = fs.open(p2)) { for (int i = 0; i < len; i++) { if (in1.read() != in2.read()) { return; } } fail(STR); } } | /**
* Verify that two files have different contents.
*
* @param fs The file system containing the two files.
* @param p1 The path of the first file.
* @param p2 The path of the second file.
* @param len The length of the two files.
* @throws IOException
*/ | Verify that two files have different contents | verifyFilesNotEqual | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java",
"license": "apache-2.0",
"size": 85590
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FSDataInputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.fs.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 45,338 |
public void setColor(Color newColor) {
Color oldValue = color;
color = newColor;
firePropertyChange(COLOR_PROPERTY, oldValue, newColor);
} | void function(Color newColor) { Color oldValue = color; color = newColor; firePropertyChange(COLOR_PROPERTY, oldValue, newColor); } | /**
* Sets the initial color for the color chooser dialog.
*
* @param newColor
* the {@link Color}.
*/ | Sets the initial color for the color chooser dialog | setColor | {
"repo_name": "devent/prefdialog",
"path": "prefdialog-corefields/src/main/java/com/anrisoftware/prefdialog/fields/colorbutton/SelectColorAction.java",
"license": "gpl-3.0",
"size": 2266
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 807,381 |
private boolean destroyPartitionedRegionGlobally(RegionEventImpl event) {
if (checkIfAlreadyDestroyedOrOldReference()) {
return false;
}
PartitionRegionConfig prConfig;
try {
prConfig = getPRRoot().get(this.getRegionIdentifier());
} catch (CancelException ignore) {
// global data... | boolean function(RegionEventImpl event) { if (checkIfAlreadyDestroyedOrOldReference()) { return false; } PartitionRegionConfig prConfig; try { prConfig = getPRRoot().get(this.getRegionIdentifier()); } catch (CancelException ignore) { return false; } if (prConfig == null prConfig.getIsDestroying()) { return false; } prC... | /**
* This method destroys the PartitionedRegion globally. It sends destroyRegion message to other
* nodes and handles cleaning up of the data stores and meta-data.
*
* @param event the RegionEvent which triggered this global destroy operation
* @return true if the region was found globally.
*/ | This method destroys the PartitionedRegion globally. It sends destroyRegion message to other nodes and handles cleaning up of the data stores and meta-data | destroyPartitionedRegionGlobally | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java",
"license": "apache-2.0",
"size": 381189
} | [
"org.apache.geode.CancelException"
] | import org.apache.geode.CancelException; | import org.apache.geode.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,247,762 |
public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
if (JdbcDebugCfg.entryActive)
debug[methodId_supportsOpenCursorsAcrossRollback].methodEntry();
try {
return false;
} finally {
if (JdbcDebugCfg.entryActive)
debug[methodId_supportsOpenCursorsAcrossRollback].methodExit();
}
... | boolean function() throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_supportsOpenCursorsAcrossRollback].methodEntry(); try { return false; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_supportsOpenCursorsAcrossRollback].methodExit(); } } | /**
* Retrieves whether this database supports keeping cursors open across
* rollbacks.
*
* @return false
* @throws SQLException
* - if a database access error occurs
**/ | Retrieves whether this database supports keeping cursors open across rollbacks | supportsOpenCursorsAcrossRollback | {
"repo_name": "mashengchen/incubator-trafodion",
"path": "core/conn/jdbc_type2/src/main/java/org/apache/trafodion/jdbc/t2/SQLMXDatabaseMetaData.java",
"license": "apache-2.0",
"size": 191582
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,236,263 |
public static String toString(List<ColumnName> columnList) {
if (columnList == null) return null;
StringBuilder result = new StringBuilder();
Iterator<ColumnName> it = columnList.iterator();
while (it.hasNext()) {
result.append(Microsyntax.toString(it.next()));
if (it.hasNext()) {
result.append(','... | static String function(List<ColumnName> columnList) { if (columnList == null) return null; StringBuilder result = new StringBuilder(); Iterator<ColumnName> it = columnList.iterator(); while (it.hasNext()) { result.append(Microsyntax.toString(it.next())); if (it.hasNext()) { result.append(','); } } return result.toStrin... | /**
* Serializes a column list to a string usable for d2rq:bNodeIdColumns
*/ | Serializes a column list to a string usable for d2rq:bNodeIdColumns | toString | {
"repo_name": "d2rq/r2rml-kit",
"path": "src/main/java/org/d2rq/lang/Microsyntax.java",
"license": "apache-2.0",
"size": 11905
} | [
"java.util.Iterator",
"java.util.List",
"org.d2rq.db.schema.ColumnName"
] | import java.util.Iterator; import java.util.List; import org.d2rq.db.schema.ColumnName; | import java.util.*; import org.d2rq.db.schema.*; | [
"java.util",
"org.d2rq.db"
] | java.util; org.d2rq.db; | 466,978 |
public void arrayLength() {
mv.visitInsn(Opcodes.ARRAYLENGTH);
} | void function() { mv.visitInsn(Opcodes.ARRAYLENGTH); } | /**
* Generates the instruction to compute the length of an array.
*/ | Generates the instruction to compute the length of an array | arrayLength | {
"repo_name": "Omnicrola/EssenJava",
"path": "test.lib/asm-4.2/asm-4.2/src/org/objectweb/asm/commons/GeneratorAdapter.java",
"license": "apache-2.0",
"size": 50570
} | [
"org.objectweb.asm.Opcodes"
] | import org.objectweb.asm.Opcodes; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,674,128 |
boolean loginExist(PerunSession sess, User user, String loginNamespace) throws PrivilegeException, UserNotExistsException; | boolean loginExist(PerunSession sess, User user, String loginNamespace) throws PrivilegeException, UserNotExistsException; | /**
* Check, if login exists in given login-namespace. Not implemented for all namespaces.
*
* @param sess Perun session
* @param user User to check existence of login for
* @param loginNamespace Login-namespace to check it for
* @return True if login exists, false otherwise
* @throws PrivilegeException
... | Check, if login exists in given login-namespace. Not implemented for all namespaces | loginExist | {
"repo_name": "CESNET/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 59111
} | [
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException"
] | import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,982,113 |
private static int getNumRepartitioning( CacheType type, MatrixCharacteristics mcRdd, MatrixCharacteristics mcBc ) {
boolean isLeft = (type == CacheType.LEFT);
long sizeOutput = (OptimizerUtils.estimatePartitionedSizeExactSparsity(isLeft?mcBc.getRows():mcRdd.getRows(),
isLeft?mcRdd.getCols():mcBc.getCols(), ... | static int function( CacheType type, MatrixCharacteristics mcRdd, MatrixCharacteristics mcBc ) { boolean isLeft = (type == CacheType.LEFT); long sizeOutput = (OptimizerUtils.estimatePartitionedSizeExactSparsity(isLeft?mcBc.getRows():mcRdd.getRows(), isLeft?mcRdd.getCols():mcBc.getCols(), isLeft?mcBc.getRowsPerBlock():m... | /**
* Computes the number of target partitions for repartitioning input rdds in case of
* outer-product-like mm.
*
* @param type cache type
* @param mcRdd rdd matrix characteristics
* @param mcBc ?
* @return number of target partitions for repartitioning
*/ | Computes the number of target partitions for repartitioning input rdds in case of outer-product-like mm | getNumRepartitioning | {
"repo_name": "dusenberrymw/systemml",
"path": "src/main/java/org/apache/sysml/runtime/instructions/spark/MapmmSPInstruction.java",
"license": "apache-2.0",
"size": 18477
} | [
"org.apache.spark.api.java.function.PairFunction",
"org.apache.sysml.hops.OptimizerUtils",
"org.apache.sysml.lops.MapMult",
"org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer",
"org.apache.sysml.runtime.functionobjects.Multiply",
"org.apache.sysml.runtime.functionobjects.Plus",
... | import org.apache.spark.api.java.function.PairFunction; import org.apache.sysml.hops.OptimizerUtils; import org.apache.sysml.lops.MapMult; import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer; import org.apache.sysml.runtime.functionobjects.Multiply; import org.apache.sysml.runtime.function... | import org.apache.spark.api.java.function.*; import org.apache.sysml.hops.*; import org.apache.sysml.lops.*; import org.apache.sysml.runtime.controlprogram.parfor.stat.*; import org.apache.sysml.runtime.functionobjects.*; import org.apache.sysml.runtime.instructions.spark.data.*; import org.apache.sysml.runtime.matrix.... | [
"org.apache.spark",
"org.apache.sysml"
] | org.apache.spark; org.apache.sysml; | 2,495,259 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.