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
@Override public void stateChanged(String channelId, State newState) { if (StringUtils.isEmpty(channelId)) { return; } final State oldState = state.get(channelId); // If both null OR the same value (enums), nothing changed if (oldState == newState) { ...
void function(String channelId, State newState) { if (StringUtils.isEmpty(channelId)) { return; } final State oldState = state.get(channelId); if (oldState == newState) { return; } if (oldState != null && oldState.equals(newState)) { return; } state.put(channelId, newState); wrappedCallback.stateChanged(channelId, newS...
/** * Overrides the state changed to determine if the state is new or changed and then * to call the {@link #wrappedCallback} if it has * * @param channelId the channel id that changed * @param newState the new state */
Overrides the state changed to determine if the state is new or changed and then to call the <code>#wrappedCallback</code> if it has
stateChanged
{ "repo_name": "MikeJMajor/openhab2-addons-dlinksmarthome", "path": "bundles/org.openhab.binding.russound/src/main/java/org/openhab/binding/russound/internal/rio/StatefulHandlerCallback.java", "license": "epl-1.0", "size": 5154 }
[ "org.apache.commons.lang.StringUtils", "org.openhab.core.types.State" ]
import org.apache.commons.lang.StringUtils; import org.openhab.core.types.State;
import org.apache.commons.lang.*; import org.openhab.core.types.*;
[ "org.apache.commons", "org.openhab.core" ]
org.apache.commons; org.openhab.core;
573,812
public RepositoryService getRepositoryService() { return repositoryService; }
RepositoryService function() { return repositoryService; }
/** * Get repository service * * @return */
Get repository service
getRepositoryService
{ "repo_name": "nate-rcl/irplus", "path": "ir_web/src/edu/ur/ir/web/action/item/NameSearch.java", "license": "apache-2.0", "size": 7350 }
[ "edu.ur.ir.repository.RepositoryService" ]
import edu.ur.ir.repository.RepositoryService;
import edu.ur.ir.repository.*;
[ "edu.ur.ir" ]
edu.ur.ir;
578,692
public void addFamily(GedcomNode family) { m_families.add(family); }
void function(GedcomNode family) { m_families.add(family); }
/** * Add a family node to this individual * @param family */
Add a family node to this individual
addFamily
{ "repo_name": "msbmsb/genealoj", "path": "src/main/java/com/msbmsb/genealoj/IndividualNode.java", "license": "mit", "size": 5000 }
[ "com.msbmsb.genealoj.GedcomNode" ]
import com.msbmsb.genealoj.GedcomNode;
import com.msbmsb.genealoj.*;
[ "com.msbmsb.genealoj" ]
com.msbmsb.genealoj;
916,918
public void setVideoUrl(String videoUrl) { setMediaSource(videoUrl); onMetadataChanged(); } public MediaPlayerGlue(Context context) { this(context, new int[]{1}, new int[]{1}); } public MediaPlayerGlue( Context context, int[] fastForwardSpeeds, int[] r...
void function(String videoUrl) { setMediaSource(videoUrl); onMetadataChanged(); } public MediaPlayerGlue(Context context) { this(context, new int[]{1}, new int[]{1}); } public MediaPlayerGlue( Context context, int[] fastForwardSpeeds, int[] rewindSpeeds) { super(context, fastForwardSpeeds, rewindSpeeds); mRepeatAction ...
/** * Sets the url for the video. */
Sets the url for the video
setVideoUrl
{ "repo_name": "AndroidX/androidx", "path": "leanback/leanback/src/main/java/androidx/leanback/media/MediaPlayerGlue.java", "license": "apache-2.0", "size": 18049 }
[ "android.content.Context", "androidx.leanback.widget.PlaybackControlsRow" ]
import android.content.Context; import androidx.leanback.widget.PlaybackControlsRow;
import android.content.*; import androidx.leanback.widget.*;
[ "android.content", "androidx.leanback" ]
android.content; androidx.leanback;
1,258,565
public boolean processIncomingSleepData(byte[] data){ HPlusDataRecordSleep record; try{ record = new HPlusDataRecordSleep(data); } catch(IllegalArgumentException e){ LOG.debug((e.getMessage())); return false; } mLastSleepDayReceived.setTi...
boolean function(byte[] data){ HPlusDataRecordSleep record; try{ record = new HPlusDataRecordSleep(data); } catch(IllegalArgumentException e){ LOG.debug((e.getMessage())); return false; } mLastSleepDayReceived.setTimeInMillis(record.bedTimeStart * 1000L); try (DBHandler dbHandler = GBApplication.acquireDB()) { DaoSessi...
/** * Process sleep data from the device * Devices send a single sleep message for each sleep period * This message contains the duration of the sub-intervals (rem, deep, etc...) * * @param data the message from the device * @return boolean indicating success or fail */
Process sleep data from the device Devices send a single sleep message for each sleep period This message contains the duration of the sub-intervals (rem, deep, etc...)
processIncomingSleepData
{ "repo_name": "MurshidMac/vimo", "path": "app/src/main/java/vimo/service/devices/hplus/HPlusHandlerThread.java", "license": "agpl-3.0", "size": 19548 }
[ "java.util.ArrayList", "java.util.GregorianCalendar", "java.util.List" ]
import java.util.ArrayList; import java.util.GregorianCalendar; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
883,568
LoggerContract refresh(Context context);
LoggerContract refresh(Context context);
/** * Refreshes the resource to sync with Azure. * * @param context The context to associate with this operation. * @return the refreshed resource. */
Refreshes the resource to sync with Azure
refresh
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/models/LoggerContract.java", "license": "mit", "size": 11156 }
[ "com.azure.core.util.Context" ]
import com.azure.core.util.Context;
import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
2,790,365
private Point getDropPosition(){ return SwingUtilities.convertPoint(target, location, Workspace.getInstance().getBlockCanvas().getCanvas()); } class IconPanel extends JPanel { public IconPanel() { super(new FlowLayout()); setOpaque(false); add(new IconButton("Copy16.gif...
Point function(){ return SwingUtilities.convertPoint(target, location, Workspace.getInstance().getBlockCanvas().getCanvas()); } class IconPanel extends JPanel { public IconPanel() { super(new FlowLayout()); setOpaque(false); add(new IconButton(STR, "Copy")); add(new IconButton(STR, STR)); add(new IconButton(STR, "Help"...
/** * Returns the point where a new block should be dropped on the workspace. * @return the point where a new block should be dropped on the workspace. */
Returns the point where a new block should be dropped on the workspace
getDropPosition
{ "repo_name": "shilpamagrawal15/appinventor-sources", "path": "appinventor/blockslib/src/openblocks/yacodeblocks/HoverMenu.java", "license": "mit", "size": 9326 }
[ "java.awt.FlowLayout", "java.awt.Point", "javax.swing.ImageIcon", "javax.swing.JButton", "javax.swing.JPanel", "javax.swing.SwingUtilities" ]
import java.awt.FlowLayout; import java.awt.Point; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.SwingUtilities;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,617,316
@Test public void testGetId2() { doFilter(); String sessionId = ((HttpServletRequest) getFilteredRequest()).getSession().getId(); MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse(); Cookie cookie = (Cookie) response.getCookies().get(0); getWebMockObjectFactory().get...
void function() { doFilter(); String sessionId = ((HttpServletRequest) getFilteredRequest()).getSession().getId(); MockHttpServletResponse response = getWebMockObjectFactory().getMockResponse(); Cookie cookie = (Cookie) response.getCookies().get(0); getWebMockObjectFactory().getMockRequest().addCookie(cookie); doFilter...
/** * Test that multiple calls from the same client return the same session id */
Test that multiple calls from the same client return the same session id
testGetId2
{ "repo_name": "jdeppe-pivotal/geode", "path": "extensions/geode-modules-session/src/integrationTest/java/org/apache/geode/modules/session/internal/filter/CommonTests.java", "license": "apache-2.0", "size": 17167 }
[ "com.mockrunner.mock.web.MockHttpServletResponse", "javax.servlet.http.Cookie", "javax.servlet.http.HttpServletRequest", "org.junit.Assert" ]
import com.mockrunner.mock.web.MockHttpServletResponse; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import org.junit.Assert;
import com.mockrunner.mock.web.*; import javax.servlet.http.*; import org.junit.*;
[ "com.mockrunner.mock", "javax.servlet", "org.junit" ]
com.mockrunner.mock; javax.servlet; org.junit;
1,872,900
public Map<String,JRHyperlinkProducer> getProducersMap() { return producers; }
Map<String,JRHyperlinkProducer> function() { return producers; }
/** * Exposes the type to producer association map. * * @return the type to producer association map */
Exposes the type to producer association map
getProducersMap
{ "repo_name": "juniormesquitadandao/report4all", "path": "lib/src/net/sf/jasperreports/engine/export/JRHyperlinkProducerMapFactory.java", "license": "mit", "size": 2972 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
303,607
public void test0179() throws JavaScriptModelException { IJavaScriptUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.js"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ ASTNode result = runConversion(sourceUnit, true); ASTNode node2 = getASTNode((JavaScriptUnit) result, 0, ...
void function() throws JavaScriptModelException { IJavaScriptUnit sourceUnit = getCompilationUnit(STR , "src", STR, STR); ASTNode result = runConversion(sourceUnit, true); ASTNode node2 = getASTNode((JavaScriptUnit) result, 0, 0, 0); assertTrue(STR, node2 instanceof VariableDeclarationStatement); VariableDeclarationSta...
/** * Allocation expression */
Allocation expression
test0179
{ "repo_name": "echoes-tech/eclipse.jsdt.core", "path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/dom/ASTConverterTest.java", "license": "epl-1.0", "size": 521652 }
[ "java.util.List", "org.eclipse.wst.jsdt.core.IJavaScriptUnit", "org.eclipse.wst.jsdt.core.JavaScriptModelException", "org.eclipse.wst.jsdt.core.dom.ASTNode", "org.eclipse.wst.jsdt.core.dom.Expression", "org.eclipse.wst.jsdt.core.dom.ITypeBinding", "org.eclipse.wst.jsdt.core.dom.IVariableBinding", "org...
import java.util.List; import org.eclipse.wst.jsdt.core.IJavaScriptUnit; import org.eclipse.wst.jsdt.core.JavaScriptModelException; import org.eclipse.wst.jsdt.core.dom.ASTNode; import org.eclipse.wst.jsdt.core.dom.Expression; import org.eclipse.wst.jsdt.core.dom.ITypeBinding; import org.eclipse.wst.jsdt.core.dom.IVari...
import java.util.*; import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.core.dom.*;
[ "java.util", "org.eclipse.wst" ]
java.util; org.eclipse.wst;
2,129,366
public static void init() { if (!Canonicalizer._alreadyInitialized) { Canonicalizer._canonicalizerHash = new HashMap(10); Canonicalizer._alreadyInitialized = true; } } private Canonicalizer(String algorithmURI) throws InvalidCanonicalizerException { ...
static void function() { if (!Canonicalizer._alreadyInitialized) { Canonicalizer._canonicalizerHash = new HashMap(10); Canonicalizer._alreadyInitialized = true; } } private Canonicalizer(String algorithmURI) throws InvalidCanonicalizerException { try { Class implementingClass = getImplementingClass(algorithmURI); this....
/** * Method init * */
Method init
init
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java", "license": "apache-2.0", "size": 11878 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,974,101
@Test public void testRetryWithDelay() throws Exception { final int retries = 4; final Time delay = Time.milliseconds(5L); final AtomicInteger countDown = new AtomicInteger(retries); long start = System.currentTimeMillis(); CompletableFuture<Boolean> retryFuture = FutureUtils.retryWithDelay( () -> { ...
void function() throws Exception { final int retries = 4; final Time delay = Time.milliseconds(5L); final AtomicInteger countDown = new AtomicInteger(retries); long start = System.currentTimeMillis(); CompletableFuture<Boolean> retryFuture = FutureUtils.retryWithDelay( () -> { if (countDown.getAndDecrement() == 0) { re...
/** * Tests that the delay is respected between subsequent retries of a retry future with retry delay. */
Tests that the delay is respected between subsequent retries of a retry future with retry delay
testRetryWithDelay
{ "repo_name": "yew1eb/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/concurrent/FutureUtilsTest.java", "license": "apache-2.0", "size": 19124 }
[ "java.util.concurrent.CompletableFuture", "java.util.concurrent.atomic.AtomicInteger", "org.apache.flink.api.common.time.Time", "org.apache.flink.runtime.testingUtils.TestingUtils", "org.apache.flink.util.FlinkException", "org.junit.Assert" ]
import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.testingUtils.TestingUtils; import org.apache.flink.util.FlinkException; import org.junit.Assert;
import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.*; import org.apache.flink.util.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.junit" ]
java.util; org.apache.flink; org.junit;
2,221,986
public static String getFaultAction(final Port port, final QName operationName, String faultName, Boolean documentStyle) { // Overloaded methods not supported Operation operation = getOperationByElement(port, operationName, documentStyle); if (operation.getFault(faultName) == null) { ...
static String function(final Port port, final QName operationName, String faultName, Boolean documentStyle) { Operation operation = getOperationByElement(port, operationName, documentStyle); if (operation.getFault(faultName) == null) { throw SOAPMessages.MESSAGES.faultNameNotFoundOnOperation(faultName, operationName.ge...
/** * Get the fault action value for a given operation. * * @param port The WSDL service port. * @param operationName The SOAP Operation element QName. * @param faultName The fault name. * @param documentStyle true if it is 'document', false if 'rpc'. * @return the fault action value....
Get the fault action value for a given operation
getFaultAction
{ "repo_name": "igarashitm/switchyard", "path": "components/soap/src/main/java/org/switchyard/component/soap/util/WSDLUtil.java", "license": "apache-2.0", "size": 41339 }
[ "javax.wsdl.Operation", "javax.wsdl.Port", "javax.xml.namespace.QName", "org.switchyard.component.soap.SOAPMessages" ]
import javax.wsdl.Operation; import javax.wsdl.Port; import javax.xml.namespace.QName; import org.switchyard.component.soap.SOAPMessages;
import javax.wsdl.*; import javax.xml.namespace.*; import org.switchyard.component.soap.*;
[ "javax.wsdl", "javax.xml", "org.switchyard.component" ]
javax.wsdl; javax.xml; org.switchyard.component;
1,035,873
private void mountProducer() { int[] sect = new int[resources.size()]; for (int i = 0; i < sect.length; i++) sect[i] = -1; for (int i = 0; i < sect.length; i++) if (sect[i] == -1) computeSect(i, sect); for (ProtoFactory protoFactory : protoFactories) { int s = 1; for (int j = 0; j < ...
void function() { int[] sect = new int[resources.size()]; for (int i = 0; i < sect.length; i++) sect[i] = -1; for (int i = 0; i < sect.length; i++) if (sect[i] == -1) computeSect(i, sect); for (ProtoFactory protoFactory : protoFactories) { int s = 1; for (int j = 0; j < protoFactory.consumption.size(); j++) { int k = r...
/** * Transform a list of protofactories into actual factories, i.e. compute their sectors */
Transform a list of protofactories into actual factories, i.e. compute their sectors
mountProducer
{ "repo_name": "RemiEven/MichelCity2000", "path": "src/org/michelcity2000/mod/ModParser.java", "license": "gpl-3.0", "size": 5393 }
[ "org.michelcity2000.city.buildings.Factory", "org.michelcity2000.city.buildings.ProtoFactory" ]
import org.michelcity2000.city.buildings.Factory; import org.michelcity2000.city.buildings.ProtoFactory;
import org.michelcity2000.city.buildings.*;
[ "org.michelcity2000.city" ]
org.michelcity2000.city;
2,514,015
public ClassDef []getClassDefList() { return _classDef; }
public ClassDef []getClassDefList() { return _classDef; }
/** * Returns the class def */
Returns the class def
getClassDefList
{ "repo_name": "moriyoshi/quercus-gae", "path": "src/main/java/com/caucho/quercus/env/SaveState.java", "license": "gpl-2.0", "size": 4320 }
[ "com.caucho.quercus.program.ClassDef" ]
import com.caucho.quercus.program.ClassDef;
import com.caucho.quercus.program.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
1,601,663
public void mouseClicked(MouseEvent incomingEvent) {}
public void mouseClicked(MouseEvent incomingEvent) {}
/** * Required by {@link MouseInputListener} I/F but not actually needed * in our case, no op implementation. * @see MouseInputListener#mouseReleased(MouseEvent) */
Required by <code>MouseInputListener</code> I/F but not actually needed in our case, no op implementation
mouseReleased
{ "repo_name": "simleo/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/colourpicker/HSVWheelListener.java", "license": "gpl-2.0", "size": 3914 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
210,326
public static String rawEncode(String s) { boolean escaped = false; StringBuilder out = null; CharsetEncoder enc = null; CharBuffer buf = null; char c; for (int i = 0, m = s.length(); i < m; i++) { c = s.charAt(i); if (c > 122 || uriMap[c]) { ...
static String function(String s) { boolean escaped = false; StringBuilder out = null; CharsetEncoder enc = null; CharBuffer buf = null; char c; for (int i = 0, m = s.length(); i < m; i++) { c = s.charAt(i); if (c > 122 uriMap[c]) { if (!escaped) { out = new StringBuilder(i + (m - i) * 3); out.append(s.substring(0, i));...
/** * Encode a single path component for use in an HTTP URL. Escapes all * non-ASCII, general unsafe (space and "#%<>[\]^`{|}~) and HTTP special * characters (/;:?) as specified in RFC1738. (so alphanumeric and ! * * @$&*()-_=+',. are not encoded) Note that slash(/) is encoded, so the * gi...
Encode a single path component for use in an HTTP URL. Escapes all non-ASCII, general unsafe (space and "#%<>[\]^`{|}~) and HTTP special characters (/;:?) as specified in RFC1738. (so alphanumeric and
rawEncode
{ "repo_name": "eclipse/hudson.core", "path": "hudson-core/src/main/java/hudson/Util.java", "license": "apache-2.0", "size": 44657 }
[ "java.nio.ByteBuffer", "java.nio.CharBuffer", "java.nio.charset.CharacterCodingException", "java.nio.charset.Charset", "java.nio.charset.CharsetEncoder" ]
import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharacterCodingException; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder;
import java.nio.*; import java.nio.charset.*;
[ "java.nio" ]
java.nio;
500,952
protected IApacheService getService() throws ComponentLookupException, PlexusConfigurationException { return this.factory.lookup( IApacheService.class, IComponentFactory.EMPTY_CONFIG, this.session); }
IApacheService function() throws ComponentLookupException, PlexusConfigurationException { return this.factory.lookup( IApacheService.class, IComponentFactory.EMPTY_CONFIG, this.session); }
/** * Returns the apache service to be used. * * @return apache service. * @throws ComponentLookupException thrown on lookup errors. * @throws PlexusConfigurationException thrwn on configuration errors. */
Returns the apache service to be used
getService
{ "repo_name": "teosoft123/maven-php-plugin", "path": "maven-plugins/maven-httpd-plugin/src/main/java/org/phpmaven/httpd/AbstractApacheMojo.java", "license": "apache-2.0", "size": 10093 }
[ "org.codehaus.plexus.component.repository.exception.ComponentLookupException", "org.codehaus.plexus.configuration.PlexusConfigurationException", "org.phpmaven.core.IComponentFactory", "org.phpmaven.httpd.control.IApacheService" ]
import org.codehaus.plexus.component.repository.exception.ComponentLookupException; import org.codehaus.plexus.configuration.PlexusConfigurationException; import org.phpmaven.core.IComponentFactory; import org.phpmaven.httpd.control.IApacheService;
import org.codehaus.plexus.component.repository.exception.*; import org.codehaus.plexus.configuration.*; import org.phpmaven.core.*; import org.phpmaven.httpd.control.*;
[ "org.codehaus.plexus", "org.phpmaven.core", "org.phpmaven.httpd" ]
org.codehaus.plexus; org.phpmaven.core; org.phpmaven.httpd;
1,852,542
public Set<String> selectedFields() { return selectedFields; }
Set<String> function() { return selectedFields; }
/** * Return only term vectors for special selected fields. Returns for term * vectors for all fields if selectedFields == null */
Return only term vectors for special selected fields. Returns for term vectors for all fields if selectedFields == null
selectedFields
{ "repo_name": "apepper/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java", "license": "apache-2.0", "size": 24705 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,495,263
public static void setSyncDateFromServer( @NonNull Context context, @NonNull Date syncDate) { Cursor cursor = null; try { cursor = getCursor(context); ContentValues contentValues = new ContentValues(); contentValues.put( ...
static void function( @NonNull Context context, @NonNull Date syncDate) { Cursor cursor = null; try { cursor = getCursor(context); ContentValues contentValues = new ContentValues(); contentValues.put( DbContract.SyncEntry.COLUMN_SYNC_FROM_SERVER_DATE, syncDate.getTime()); if (cursor.moveToFirst()) { String selection = ...
/** * Set Sync date to server in to table */
Set Sync date to server in to table
setSyncDateFromServer
{ "repo_name": "sanjnair/projects", "path": "android/melange_app/App/src/main/java/com/xmatrix/melange/data/DbSyncUtil.java", "license": "mit", "size": 3693 }
[ "android.content.ContentValues", "android.content.Context", "android.database.Cursor", "android.provider.BaseColumns", "android.support.annotation.NonNull", "android.util.Log", "java.util.Date" ]
import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.provider.BaseColumns; import android.support.annotation.NonNull; import android.util.Log; import java.util.Date;
import android.content.*; import android.database.*; import android.provider.*; import android.support.annotation.*; import android.util.*; import java.util.*;
[ "android.content", "android.database", "android.provider", "android.support", "android.util", "java.util" ]
android.content; android.database; android.provider; android.support; android.util; java.util;
1,714,766
public InAvailabilityReasonType reason() { return this.reason; }
InAvailabilityReasonType function() { return this.reason; }
/** * Get the reason value. * * @return the reason value */
Get the reason value
reason
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/ResourceNameAvailabilityInner.java", "license": "mit", "size": 3064 }
[ "com.microsoft.azure.management.appservice.InAvailabilityReasonType" ]
import com.microsoft.azure.management.appservice.InAvailabilityReasonType;
import com.microsoft.azure.management.appservice.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
579,911
public synchronized void disconnect() { if ( connection == null ) { return; // Nothing to do... } try { if ( connection.isClosed() ) { return; // Nothing to do... } } catch ( SQLException ex ) { // cannot do anything about this but log it log.logError( "Error chec...
synchronized void function() { if ( connection == null ) { return; } try { if ( connection.isClosed() ) { return; } } catch ( SQLException ex ) { log.logError( STR + Const.CR + ex.getMessage() ); log.logError( Const.getStackTracker( ex ) ); } if ( pstmt != null ) { try { pstmt.close(); } catch ( SQLException ex ) { log...
/** * Disconnect from the database and close all open prepared statements. */
Disconnect from the database and close all open prepared statements
disconnect
{ "repo_name": "bmorrise/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/database/Database.java", "license": "apache-2.0", "size": 181052 }
[ "java.sql.SQLException", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleDatabaseException", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.extension.ExtensionPointHandler", "org.pentaho.di.core.extension.KettleExtensionPoint" ]
import java.sql.SQLException; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.extension.ExtensionPointHandler; import org.pentaho.di.core.extension.KettleExtensionPoint;
import java.sql.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.extension.*;
[ "java.sql", "org.pentaho.di" ]
java.sql; org.pentaho.di;
1,028,003
@Override public Result getCurrentValue() throws IOException, InterruptedException { return scanner.getCurrentResult(); }
Result function() throws IOException, InterruptedException { return scanner.getCurrentResult(); }
/** * Called by the Mapper class, exposes the currentResult */
Called by the Mapper class, exposes the currentResult
getCurrentValue
{ "repo_name": "ExplorysMedical/Apothecary", "path": "src/main/java/com/explorys/apothecary/hbase/mr/inputformat/MergedStoreFileRecordReader.java", "license": "apache-2.0", "size": 7294 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Result" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Result;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,478,809
public PrintStream getShowProgressStream() { return showProgressStream; }
PrintStream function() { return showProgressStream; }
/** * Javadoc for this public method is generated via * the doc templates in the doc_src directory. */
Javadoc for this public method is generated via the doc templates in the doc_src directory
getShowProgressStream
{ "repo_name": "ckaestne/LEADT", "path": "CIDE_Samples/cide_samples/Berkeley DB JE/src/com/sleepycat/je/StatsConfig.java", "license": "gpl-3.0", "size": 2669 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
1,678,578
public List<Error> getDetails() { return this.details; }
List<Error> function() { return this.details; }
/** * Get the details property: An array of details about specific errors that led to this reported error. * * @return the details value. */
Get the details property: An array of details about specific errors that led to this reported error
getDetails
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/remoterendering/azure-mixedreality-remoterendering/src/main/java/com/azure/mixedreality/remoterendering/implementation/models/Error.java", "license": "mit", "size": 2934 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,698,893
long createDirectory(AlluxioURI path, CreateDirectoryContext context) throws InvalidPathException, FileAlreadyExistsException, IOException, AccessControlException, FileDoesNotExistException;
long createDirectory(AlluxioURI path, CreateDirectoryContext context) throws InvalidPathException, FileAlreadyExistsException, IOException, AccessControlException, FileDoesNotExistException;
/** * Creates a directory for a given path. * <p> * This operation requires the client user to have WRITE permission on the parent of the path. * * @param path the path of the directory * @param context method context * @return the id of the created directory * @throws InvalidPathException when ...
Creates a directory for a given path. This operation requires the client user to have WRITE permission on the parent of the path
createDirectory
{ "repo_name": "maobaolong/alluxio", "path": "core/server/master/src/main/java/alluxio/master/file/FileSystemMaster.java", "license": "apache-2.0", "size": 25181 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,541,003
public RedisTransaction sdiff(String key, List<String> cmpkeys, Handler<AsyncResult<String>> handler) { delegate.sdiff(key, cmpkeys, handler); return this; }
RedisTransaction function(String key, List<String> cmpkeys, Handler<AsyncResult<String>> handler) { delegate.sdiff(key, cmpkeys, handler); return this; }
/** * Subtract multiple sets * @param key Key identifying the set to compare with all other sets combined * @param cmpkeys List of keys identifying sets to subtract from the key set * @param handler Handler for the result of this call. * @return */
Subtract multiple sets
sdiff
{ "repo_name": "brianjcj/vertx-redis-client", "path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java", "license": "apache-2.0", "size": 184983 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Handler", "java.util.List" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import java.util.List;
import io.vertx.core.*; import java.util.*;
[ "io.vertx.core", "java.util" ]
io.vertx.core; java.util;
638,652
try { URLEncodedString encoder = new URLEncodedString(); getParameterHolder().recordPredefinedParameters( encoder ); getParameterHolder().recordParameters( encoder ); return encoder.getString(); } catch (IOException e) { throw new RuntimeException( "Pr...
try { URLEncodedString encoder = new URLEncodedString(); getParameterHolder().recordPredefinedParameters( encoder ); getParameterHolder().recordParameters( encoder ); return encoder.getString(); } catch (IOException e) { throw new RuntimeException( STR + e ); } } protected HeaderOnlyWebRequest( URL urlBase, String urlS...
/** * Returns the query string defined for this request. **/
Returns the query string defined for this request
getQueryString
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/httpunit154/src/com/meterware/httpunit/HeaderOnlyWebRequest.java", "license": "lgpl-3.0", "size": 2968 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,300,082
public void setIcon(@Nullable NiftyImage icon) { chatEntry.setIcon(icon); }
void function(@Nullable NiftyImage icon) { chatEntry.setIcon(icon); }
/** * Supply a new icon which replaces the current one. * * @param icon The icon. */
Supply a new icon which replaces the current one
setIcon
{ "repo_name": "mkaring/nifty-gui", "path": "nifty-controls/src/main/java/de/lessvoid/nifty/controls/chatcontrol/ChatEntryModelClass.java", "license": "bsd-2-clause", "size": 2664 }
[ "de.lessvoid.nifty.render.NiftyImage", "javax.annotation.Nullable" ]
import de.lessvoid.nifty.render.NiftyImage; import javax.annotation.Nullable;
import de.lessvoid.nifty.render.*; import javax.annotation.*;
[ "de.lessvoid.nifty", "javax.annotation" ]
de.lessvoid.nifty; javax.annotation;
289,981
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RealmReactPackage() ); }
List<ReactPackage> function() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RealmReactPackage() ); }
/** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones, add more packages here. */
A list of packages used by the app. If the app uses additional views or modules besides the default ones, add more packages here
getPackages
{ "repo_name": "agenthunt/react-native-scratchpad", "path": "RealmReactTest/android/app/src/main/java/com/realmreacttest/MainActivity.java", "license": "mit", "size": 1116 }
[ "com.facebook.react.ReactPackage", "com.facebook.react.shell.MainReactPackage", "io.realm.react.RealmReactPackage", "java.util.Arrays", "java.util.List" ]
import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import io.realm.react.RealmReactPackage; import java.util.Arrays; import java.util.List;
import com.facebook.react.*; import com.facebook.react.shell.*; import io.realm.react.*; import java.util.*;
[ "com.facebook.react", "io.realm.react", "java.util" ]
com.facebook.react; io.realm.react; java.util;
1,693,403
public static Color getPointColor(double value, final double max, final double min) { value = (value - min) / (max - min); return getPointColor(value); }
static Color function(double value, final double max, final double min) { value = (value - min) / (max - min); return getPointColor(value); }
/** * Returns a color equivalent to the value of <code>value</code>. The value will be normalized * between 0 and 1 using the parameters max and min. Which are the minimum and maximum of the * complete dataset. */
Returns a color equivalent to the value of <code>value</code>. The value will be normalized between 0 and 1 using the parameters max and min. Which are the minimum and maximum of the complete dataset
getPointColor
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/gui/tools/SwingTools.java", "license": "agpl-3.0", "size": 93902 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,249,774
public void register(final Context context, final HeadsetPlugHandler handler) { mHandler = handler; IntentFilter intentFilter = new IntentFilter(Intent.ACTION_HEADSET_PLUG); context.registerReceiver(this, intentFilter); }
void function(final Context context, final HeadsetPlugHandler handler) { mHandler = handler; IntentFilter intentFilter = new IntentFilter(Intent.ACTION_HEADSET_PLUG); context.registerReceiver(this, intentFilter); }
/** * Register this receiver. * * @param context The context * @param handler A handler for headset plug events */
Register this receiver
register
{ "repo_name": "jeisfeld/Augendiagnose", "path": "AugendiagnoseIdea/augendiagnoseLib/src/main/java/de/jeisfeld/augendiagnoselib/components/HeadsetPlugReceiver.java", "license": "gpl-2.0", "size": 1656 }
[ "android.content.Context", "android.content.Intent", "android.content.IntentFilter" ]
import android.content.Context; import android.content.Intent; import android.content.IntentFilter;
import android.content.*;
[ "android.content" ]
android.content;
854,221
protected void setRecipientFromEndpointConfiguration(MimeMessage mimeMessage, MailEndpoint endpoint, Exchange exchange) throws MessagingException, IOException { Map<Message.RecipientType, String> recipients = endpoint.getConfiguration().getRecipients(); if (recipients.containsKey(Message.Re...
void function(MimeMessage mimeMessage, MailEndpoint endpoint, Exchange exchange) throws MessagingException, IOException { Map<Message.RecipientType, String> recipients = endpoint.getConfiguration().getRecipients(); if (recipients.containsKey(Message.RecipientType.TO)) { appendRecipientToMimeMessage(mimeMessage, endpoin...
/** * Appends the Mail headers from the endpoint configuration. */
Appends the Mail headers from the endpoint configuration
setRecipientFromEndpointConfiguration
{ "repo_name": "engagepoint/camel", "path": "components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java", "license": "apache-2.0", "size": 30921 }
[ "java.io.IOException", "java.util.Map", "javax.mail.Message", "javax.mail.MessagingException", "javax.mail.internet.MimeMessage", "org.apache.camel.Exchange" ]
import java.io.IOException; import java.util.Map; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; import org.apache.camel.Exchange;
import java.io.*; import java.util.*; import javax.mail.*; import javax.mail.internet.*; import org.apache.camel.*;
[ "java.io", "java.util", "javax.mail", "org.apache.camel" ]
java.io; java.util; javax.mail; org.apache.camel;
2,521,714
public static void marshall(SignatureType signature, OutputStream os) throws JAXBException, SAXException { throw logger.notImplementedYet("NYI"); }
static void function(SignatureType signature, OutputStream os) throws JAXBException, SAXException { throw logger.notImplementedYet("NYI"); }
/** * Marshall a SignatureType to output stream * * @param signature * @param os * * @throws SAXException * @throws JAXBException */
Marshall a SignatureType to output stream
marshall
{ "repo_name": "eugene-chow/keycloak", "path": "saml/saml-core/src/main/java/org/keycloak/saml/processing/core/util/XMLSignatureUtil.java", "license": "apache-2.0", "size": 24695 }
[ "java.io.OutputStream", "javax.xml.bind.JAXBException", "org.keycloak.dom.xmlsec.w3.xmldsig.SignatureType", "org.xml.sax.SAXException" ]
import java.io.OutputStream; import javax.xml.bind.JAXBException; import org.keycloak.dom.xmlsec.w3.xmldsig.SignatureType; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.bind.*; import org.keycloak.dom.xmlsec.w3.xmldsig.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.keycloak.dom", "org.xml.sax" ]
java.io; javax.xml; org.keycloak.dom; org.xml.sax;
1,367,098
public String toStringResult() throws PersistenceException { if (exceptionOccurred) { throw new PersistenceException(localExceptionMessage); } String resultString = null; for (Iterator<String> iterator = nodeToResults.keySet().iterator(); iterator.hasNext();) { ...
String function() throws PersistenceException { if (exceptionOccurred) { throw new PersistenceException(localExceptionMessage); } String resultString = null; for (Iterator<String> iterator = nodeToResults.keySet().iterator(); iterator.hasNext();) { String nodeName = iterator.next(); List<PersistenceResultRow> results =...
/** * Assumption here is that there is only one possible result so we just take the first one we come across. * * @return */
Assumption here is that there is only one possible result so we just take the first one we come across
toStringResult
{ "repo_name": "acshea/edgware", "path": "fabric.lib/src/fabric/registry/persistence/distributed/DistributedQueryResult.java", "license": "epl-1.0", "size": 16797 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
853,378
public static java.util.Set extractPatientCustomListSet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientCustomListVoCollection voCollection) { return extractPatientCustomListSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientCustomListVoCollection voCollection) { return extractPatientCustomListSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.clinical.domain.objects.PatientCustomList set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.clinical.domain.objects.PatientCustomList set from the value object collection
extractPatientCustomListSet
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PatientCustomListVoAssembler.java", "license": "agpl-3.0", "size": 17804 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,469,526
private static native byte[] nativeEncodeBitmap(Bitmap bitmap, int quality);
static native byte[] function(Bitmap bitmap, int quality);
/** * Encodes bitmap into byte array * * @param bitmap Bitmap * @param quality Quality, should be between 0 and 100 * @return Encoded byte array */
Encodes bitmap into byte array
nativeEncodeBitmap
{ "repo_name": "790396054/MobilePlayer", "path": "xutils/src/main/java_compat/android/backport/webp/WebPFactory.java", "license": "apache-2.0", "size": 3060 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,826,751
private Data convertToData(Object item) { return serializationService.toData(item); }
Data function(Object item) { return serializationService.toData(item); }
/** * Convert the supplied argument into serialized format. * * @throws HazelcastSerializationException when serialization fails. */
Convert the supplied argument into serialized format
convertToData
{ "repo_name": "emre-aydin/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java", "license": "apache-2.0", "size": 26764 }
[ "com.hazelcast.internal.serialization.Data" ]
import com.hazelcast.internal.serialization.Data;
import com.hazelcast.internal.serialization.*;
[ "com.hazelcast.internal" ]
com.hazelcast.internal;
2,291,111
Object[][] data = new Object[][] {{LocationController.LOCATION_SUBFLOW_ID, false, "parentLocation" }, {LocationController.TYPE_SUBFLOW_ID, false, "type" }}; return Arrays.asList(data); }
Object[][] data = new Object[][] {{LocationController.LOCATION_SUBFLOW_ID, false, STR }, {LocationController.TYPE_SUBFLOW_ID, false, "type" }}; return Arrays.asList(data); }
/** * Gets the parameterized test data. * * @return The parameters of the test */
Gets the parameterized test data
data
{ "repo_name": "NCIP/calims", "path": "calims2-webapp/test/unit/java/gov/nih/nci/calims2/ui/administration/location/LocationControllerSubFlowTest.java", "license": "bsd-3-clause", "size": 1246 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,304,842
public static long count( final Object example, final Criterion criterion, final Map<String,String> aliases ) { final Example qbe = Example.create( example ); final Criteria criteria = getTransaction( example ).getTxState( ).getSession( ) .create...
static long function( final Object example, final Criterion criterion, final Map<String,String> aliases ) { final Example qbe = Example.create( example ); final Criteria criteria = getTransaction( example ).getTxState( ).getSession( ) .createCriteria( example.getClass( ) ) .setReadOnly( true ) .setCacheable( false ) .a...
/** * Count the matching entities for the given example. * * @param example The example entity * @param criterion Additional restrictions for the query * @param aliases Any aliases necessary for the given criterion * @return The number of matching entities */
Count the matching entities for the given example
count
{ "repo_name": "davenpcj5542009/eucalyptus", "path": "clc/modules/msgs/src/main/java/com/eucalyptus/entities/Entities.java", "license": "gpl-3.0", "size": 50946 }
[ "java.util.Map", "org.hibernate.Criteria", "org.hibernate.criterion.Criterion", "org.hibernate.criterion.Example", "org.hibernate.criterion.Projections" ]
import java.util.Map; import org.hibernate.Criteria; import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Example; import org.hibernate.criterion.Projections;
import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*;
[ "java.util", "org.hibernate", "org.hibernate.criterion" ]
java.util; org.hibernate; org.hibernate.criterion;
935,381
public Node item(int index);
Node function(int index);
/** * This method retrieves a node specified by ordinal index. Nodes are * numbered in tree order (depth-first traversal order). * @param index The index of the node to be fetched. The index origin is * <code>0</code>. * @return The <code>Node</code> at the corresponding position upon ...
This method retrieves a node specified by ordinal index. Nodes are numbered in tree order (depth-first traversal order)
item
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java", "license": "bsd-3-clause", "size": 2812 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,259,072
public Composite createControl(Composite parent);
Composite function(Composite parent);
/** * Called once at start to create user interface for setting the filter's properties. * @param parent */
Called once at start to create user interface for setting the filter's properties
createControl
{ "repo_name": "belkassaby/dawnsci", "path": "org.eclipse.dawnsci.plotting.api/src/org/eclipse/dawnsci/plotting/api/filter/FilterConfiguration.java", "license": "epl-1.0", "size": 919 }
[ "org.eclipse.swt.widgets.Composite" ]
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,886,502
public void service(ServiceManager manager) throws ServiceException { this.serviceManager = manager; this.validator = (Validator) manager.lookup(Validator.ROLE); }
void function(ServiceManager manager) throws ServiceException { this.serviceManager = manager; this.validator = (Validator) manager.lookup(Validator.ROLE); }
/** * <p>Contextualize this component instance specifying its associated * {@link ServiceManager} instance.</p> * * @param manager the {@link ServiceManager} to associate with this component. * @throws ServiceException if a dependancy of this could not be resolved. */
Contextualize this component instance specifying its associated <code>ServiceManager</code> instance
service
{ "repo_name": "apache/cocoon", "path": "blocks/cocoon-validation/cocoon-validation-impl/src/main/java/org/apache/cocoon/transformation/ValidationReportTransformer.java", "license": "apache-2.0", "size": 12335 }
[ "org.apache.avalon.framework.service.ServiceException", "org.apache.avalon.framework.service.ServiceManager", "org.apache.cocoon.components.validation.Validator" ]
import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.cocoon.components.validation.Validator;
import org.apache.avalon.framework.service.*; import org.apache.cocoon.components.validation.*;
[ "org.apache.avalon", "org.apache.cocoon" ]
org.apache.avalon; org.apache.cocoon;
896,627
@VisibleForTesting static List<Pair<String, ListMultimap<String, String>>> getOptionsMap( OutErr outErr, List<String> rcFiles, List<CommonCommandOptions.OptionOverride> overrides, Set<String> validCommands) { List<Pair<String, ListMultimap<String, String>>> result = new ArrayList<>(); ...
static List<Pair<String, ListMultimap<String, String>>> getOptionsMap( OutErr outErr, List<String> rcFiles, List<CommonCommandOptions.OptionOverride> overrides, Set<String> validCommands) { List<Pair<String, ListMultimap<String, String>>> result = new ArrayList<>(); String lastRcFile = null; ListMultimap<String, String...
/** * Convert a list of option override specifications to a more easily digestible * form. * * @param overrides list of option override specifications */
Convert a list of option override specifications to a more easily digestible form
getOptionsMap
{ "repo_name": "wakashige/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java", "license": "apache-2.0", "size": 26896 }
[ "com.google.common.collect.ArrayListMultimap", "com.google.common.collect.ListMultimap", "com.google.devtools.build.lib.util.Pair", "com.google.devtools.build.lib.util.io.OutErr", "java.util.ArrayList", "java.util.List", "java.util.Set" ]
import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; import com.google.devtools.build.lib.util.Pair; import com.google.devtools.build.lib.util.io.OutErr; import java.util.ArrayList; import java.util.List; import java.util.Set;
import com.google.common.collect.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.util.io.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
130,325
public AbstractAllGroupHeadsCollector<?> createAllGroupCollector() throws IOException { return null; }
AbstractAllGroupHeadsCollector<?> function() throws IOException { return null; }
/** * Returns a collector that is able to return the most relevant document of all groups. * Returns <code>null</code> if the command doesn't support this type of collector. * * @return a collector that is able to return the most relevant document of all groups. * @throws IOException If I/O rel...
Returns a collector that is able to return the most relevant document of all groups. Returns <code>null</code> if the command doesn't support this type of collector
createAllGroupCollector
{ "repo_name": "visouza/solr-5.0.0", "path": "solr/core/src/java/org/apache/solr/search/Grouping.java", "license": "apache-2.0", "size": 36394 }
[ "java.io.IOException", "org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector" ]
import java.io.IOException; import org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector;
import java.io.*; import org.apache.lucene.search.grouping.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
2,400,990
protected IExecutionContext mergeContexts (List<IExecutionContext> contexts) { return new ExecutionContext(contexts.get(0)); }
IExecutionContext function (List<IExecutionContext> contexts) { return new ExecutionContext(contexts.get(0)); }
/** * Provide a policy for which child context should be promoted to represent the state * of the parent * * @param contexts A list of candidate child contexts to choose from * @return The chosen context */
Provide a policy for which child context should be promoted to represent the state of the parent
mergeContexts
{ "repo_name": "martelagelo/slogo", "path": "src/slogo/backend/impl/evaluation/commands/Operation.java", "license": "mit", "size": 4498 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,585,040
public ChunkPos getChunkCoordIntPair() { return new ChunkPos(this.xPosition, this.zPosition); }
ChunkPos function() { return new ChunkPos(this.xPosition, this.zPosition); }
/** * Gets a ChunkCoordIntPair representing the Chunk's position. */
Gets a ChunkCoordIntPair representing the Chunk's position
getChunkCoordIntPair
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/world/chunk/Chunk.java", "license": "lgpl-2.1", "size": 53710 }
[ "net.minecraft.util.math.ChunkPos" ]
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
189,400
private void updateAuthStatusIconAndText(RemoteOperationResult result) { mAuthStatusIcon = R.drawable.common_error; // the most common case in the switch below switch (result.getCode()) { case OK_SSL: mAuthStatusIcon = R.drawable.ic_lock; mAuthStatusText = R...
void function(RemoteOperationResult result) { mAuthStatusIcon = R.drawable.common_error; switch (result.getCode()) { case OK_SSL: mAuthStatusIcon = R.drawable.ic_lock; mAuthStatusText = R.string.auth_secure_connection; break; case OK_NO_SSL: case OK: if (mHostUrlInput.getText().toString().trim().toLowerCase().startsWit...
/** * Chooses the right icon and text to show to the user for the received operation result. * * @param result Result of a remote operation performed in this activity */
Chooses the right icon and text to show to the user for the received operation result
updateAuthStatusIconAndText
{ "repo_name": "gdieleman/android", "path": "src/com/owncloud/android/authentication/AuthenticatorActivity.java", "license": "gpl-2.0", "size": 77463 }
[ "com.owncloud.android.lib.common.operations.RemoteOperationResult" ]
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.*;
[ "com.owncloud.android" ]
com.owncloud.android;
2,206,424
public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { checkNotNull(e); return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); }
static <E extends Comparable> int function( List<? extends E> list, E e, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { checkNotNull(e); return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); }
/** * Searches the specified naturally ordered list for the specified object using the binary search * algorithm. * * <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, * KeyAbsentBehavior)} using {@link Ordering#natural}. */
Searches the specified naturally ordered list for the specified object using the binary search algorithm. Equivalent to <code>#binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, KeyAbsentBehavior)</code> using <code>Ordering#natural</code>
binarySearch
{ "repo_name": "typetools/guava", "path": "guava/src/com/google/common/collect/SortedLists.java", "license": "apache-2.0", "size": 10437 }
[ "com.google.common.base.Preconditions", "java.util.List" ]
import com.google.common.base.Preconditions; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,929,243
protected void validateOptions(final CommandLine line) { if (!line.hasOption(OPT_ALG)) { throw new IllegalArgumentException("alg option is required."); } if (!line.hasOption(OPT_KEY)) { throw new IllegalArgumentException("key option is required."); } }
void function(final CommandLine line) { if (!line.hasOption(OPT_ALG)) { throw new IllegalArgumentException(STR); } if (!line.hasOption(OPT_KEY)) { throw new IllegalArgumentException(STR); } }
/** * Validates the existence of required options for an operation. * * @param line * Parsed command line arguments container. */
Validates the existence of required options for an operation
validateOptions
{ "repo_name": "shivam091/Java-Security", "path": "crypt/src/main/java/org/security/crypt/signature/SignatureCli.java", "license": "mit", "size": 8684 }
[ "org.apache.commons.cli.CommandLine" ]
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.*;
[ "org.apache.commons" ]
org.apache.commons;
522,478
public void write(int b) throws IOException { byte[] buf = new byte[]{(byte) b}; write(buf); }
void function(int b) throws IOException { byte[] buf = new byte[]{(byte) b}; write(buf); }
/** * Writes the given byte to the underlying stream, adding SHOUTcast meta-data as necessary. */
Writes the given byte to the underlying stream, adding SHOUTcast meta-data as necessary
write
{ "repo_name": "Booksonic-Server/madsonic-main", "path": "src/main/java/org/madsonic/io/ShoutCastOutputStream.java", "license": "gpl-3.0", "size": 6943 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,117,459
public Permissions withKeys(List<KeyPermissions> keys) { this.keys = keys; return this; }
Permissions function(List<KeyPermissions> keys) { this.keys = keys; return this; }
/** * Set the keys value. * * @param keys the keys value to set * @return the Permissions object itself. */
Set the keys value
withKeys
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v2015_06_01/Permissions.java", "license": "mit", "size": 2236 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
350,218
public void setRunDao(RunDao runDao);
void function(RunDao runDao);
/** * setRunDao(RunDao runDao) * * @param runDao * */
setRunDao(RunDao runDao)
setRunDao
{ "repo_name": "WASP-System/central", "path": "wasp-core/src/main/java/edu/yu/einstein/wasp/service/RunService.java", "license": "agpl-3.0", "size": 5346 }
[ "edu.yu.einstein.wasp.dao.RunDao" ]
import edu.yu.einstein.wasp.dao.RunDao;
import edu.yu.einstein.wasp.dao.*;
[ "edu.yu.einstein" ]
edu.yu.einstein;
1,552,030
public static String getMatch(@Nullable final String data, final Pattern pattern, final String defaultValue) { return getMatch(data, pattern, true, 1, defaultValue, false); }
static String function(@Nullable final String data, final Pattern pattern, final String defaultValue) { return getMatch(data, pattern, true, 1, defaultValue, false); }
/** * Searches for the pattern pattern in the data. If the pattern is not found defaultValue is returned * * @param data * Data to search in * @param pattern * Pattern to search for * @param defaultValue * Value to return if the pattern is not fou...
Searches for the pattern pattern in the data. If the pattern is not found defaultValue is returned
getMatch
{ "repo_name": "pstorch/cgeo", "path": "main/src/cgeo/geocaching/utils/TextUtils.java", "license": "apache-2.0", "size": 9803 }
[ "android.support.annotation.Nullable", "java.util.regex.Pattern" ]
import android.support.annotation.Nullable; import java.util.regex.Pattern;
import android.support.annotation.*; import java.util.regex.*;
[ "android.support", "java.util" ]
android.support; java.util;
1,073,450
public final void registerTranslators( JavaType theType, Translator fromStringTranslator, Translator toStringTranslator ) { Preconditions.checkNotNull( theType, "need a type" ); Preconditions.checkNotNull( fromStringTranslator, "need a from-string translator" ); Preconditions.checkNotNull( toStringTranslator,...
final void function( JavaType theType, Translator fromStringTranslator, Translator toStringTranslator ) { Preconditions.checkNotNull( theType, STR ); Preconditions.checkNotNull( fromStringTranslator, STR ); Preconditions.checkNotNull( toStringTranslator, STR ); fromStringTranslators.put( theType, fromStringTranslator )...
/*** * This method is used to add translators into the manager for ensuring proper conversion. * @param theType the class to register for * @param theGenericType the generic type information, if it makes sense * @param fromStringTranslator the from translator * @param toStringTranslator the to translator ...
This method is used to add translators into the manager for ensuring proper conversion
registerTranslators
{ "repo_name": "Talvish/Tales", "path": "product/common/src/com/talvish/tales/serialization/StringTranslationFacility.java", "license": "apache-2.0", "size": 10034 }
[ "com.google.common.base.Preconditions", "com.talvish.tales.parts.reflection.JavaType", "com.talvish.tales.parts.translators.Translator" ]
import com.google.common.base.Preconditions; import com.talvish.tales.parts.reflection.JavaType; import com.talvish.tales.parts.translators.Translator;
import com.google.common.base.*; import com.talvish.tales.parts.reflection.*; import com.talvish.tales.parts.translators.*;
[ "com.google.common", "com.talvish.tales" ]
com.google.common; com.talvish.tales;
1,490,519
public void refine(RVMMethod target, boolean isPreciseTarget) { this.target = target; if (isPreciseTarget) { this.isPreciseTarget = isPreciseTarget; } else { setPreciseTarget(); } }
void function(RVMMethod target, boolean isPreciseTarget) { this.target = target; if (isPreciseTarget) { this.isPreciseTarget = isPreciseTarget; } else { setPreciseTarget(); } }
/** * Refine the target information. Used to reduce the set of * targets for an invokevirtual. */
Refine the target information. Used to reduce the set of targets for an invokevirtual
refine
{ "repo_name": "ut-osa/laminar", "path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/opt/ir/operand/MethodOperand.java", "license": "bsd-3-clause", "size": 9610 }
[ "org.jikesrvm.classloader.RVMMethod" ]
import org.jikesrvm.classloader.RVMMethod;
import org.jikesrvm.classloader.*;
[ "org.jikesrvm.classloader" ]
org.jikesrvm.classloader;
2,216,071
@Override public void addTouchables(ArrayList<View> views) { // Note that we don't call super.addTouchables(), which means that // we don't call View.addTouchables(). This is okay because a ViewPager // is itself not touchable. for (int i = 0; i < getChildCount(); i++) { ...
void function(ArrayList<View> views) { for (int i = 0; i < getChildCount(); i++) { final View child = getChildAt(i); if (child.getVisibility() == VISIBLE) { ItemInfo ii = infoForChild(child); if (ii != null && ii.position == mCurItem) { child.addTouchables(views); } } } }
/** * We only want the current page that is being shown to be touchable. */
We only want the current page that is being shown to be touchable
addTouchables
{ "repo_name": "gzsll/TLint", "path": "app/src/main/java/com/gzsll/hupu/widget/VerticalViewPager.java", "license": "apache-2.0", "size": 109046 }
[ "android.view.View", "java.util.ArrayList" ]
import android.view.View; import java.util.ArrayList;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
2,088,640
public void runValidationWithResult(View view) { // Initialize result to true result = true; try { if (MindDiagramEditorUtil.openDiagram(view.eResource())) { IEditorPart editorPart = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage() .getActiveEditor(); if (edi...
void function(View view) { result = true; try { if (MindDiagramEditorUtil.openDiagram(view.eResource())) { IEditorPart editorPart = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage() .getActiveEditor(); if (editorPart instanceof IDiagramWorkbenchPart) { runValidationWithResult(((IDiagramWorkbenchPart...
/** * Created only to call runValidationWithResult instead of runValidation * @param view */
Created only to call runValidationWithResult instead of runValidation
runValidationWithResult
{ "repo_name": "StephaneSeyvoz/mindEd", "path": "org.ow2.mindEd.adl.editor.graphic.ui/customsrc/org/ow2/mindEd/adl/editor/graphic/ui/custom/part/CustomValidateAction.java", "license": "lgpl-3.0", "size": 11511 }
[ "org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart", "org.eclipse.gmf.runtime.notation.View", "org.eclipse.ui.IEditorPart", "org.eclipse.ui.PlatformUI", "org.ow2.mindEd.adl.editor.graphic.ui.part.MindDiagramEditorPlugin", "org.ow2.mindEd.adl.editor.graphic.ui.part.MindDiagramEditorUtil" ]
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.PlatformUI; import org.ow2.mindEd.adl.editor.graphic.ui.part.MindDiagramEditorPlugin; import org.ow2.mindEd.adl.editor.graphic.ui.part.MindDiagram...
import org.eclipse.gmf.runtime.diagram.ui.parts.*; import org.eclipse.gmf.runtime.notation.*; import org.eclipse.ui.*; import org.ow2.*;
[ "org.eclipse.gmf", "org.eclipse.ui", "org.ow2" ]
org.eclipse.gmf; org.eclipse.ui; org.ow2;
1,044,553
@Message(id = 14031, value = "Operation name required - " + "multiple operations on service interface: %s") SwitchYardException operationNameRequiredMultipleOps(String serviceName);
@Message(id = 14031, value = STR + STR) SwitchYardException operationNameRequiredMultipleOps(String serviceName);
/** * operationNameRequiredMultipleOps method definition. * @param serviceName serviceName * @return SwitchYardException */
operationNameRequiredMultipleOps method definition
operationNameRequiredMultipleOps
{ "repo_name": "bfitzpat/switchyard", "path": "core/runtime/src/main/java/org/switchyard/runtime/RuntimeMessages.java", "license": "apache-2.0", "size": 14146 }
[ "org.jboss.logging.annotations.Message", "org.switchyard.SwitchYardException" ]
import org.jboss.logging.annotations.Message; import org.switchyard.SwitchYardException;
import org.jboss.logging.annotations.*; import org.switchyard.*;
[ "org.jboss.logging", "org.switchyard" ]
org.jboss.logging; org.switchyard;
209,903
public BulkRequest add(DocWriteRequest<?>... requests) { for (DocWriteRequest<?> request : requests) { add(request); } return this; }
BulkRequest function(DocWriteRequest<?>... requests) { for (DocWriteRequest<?> request : requests) { add(request); } return this; }
/** * Adds a list of requests to be executed. Either index or delete requests. */
Adds a list of requests to be executed. Either index or delete requests
add
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/bulk/BulkRequest.java", "license": "apache-2.0", "size": 16069 }
[ "org.elasticsearch.action.DocWriteRequest" ]
import org.elasticsearch.action.DocWriteRequest;
import org.elasticsearch.action.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,036,554
EReference getUnit_Controls();
EReference getUnit_Controls();
/** * Returns the meta object for the reference list '{@link CIM.IEC61970.Core.Unit#getControls <em>Controls</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Controls</em>'. * @see CIM.IEC61970.Core.Unit#getControls() * @see #getUnit() * @gene...
Returns the meta object for the reference list '<code>CIM.IEC61970.Core.Unit#getControls Controls</code>'.
getUnit_Controls
{ "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,143
public NumericOperand week() { return createNumericFunction(this, "week"); }
NumericOperand function() { return createNumericFunction(this, "week"); }
/** * Week numeric operand. * * @return the numeric operand */
Week numeric operand
week
{ "repo_name": "bluebiz/bluelytics-api", "path": "src/main/java/de/bluebiz/bluelytics/api/query/plan/expressions/operands/time/TimeOperand.java", "license": "apache-2.0", "size": 21683 }
[ "de.bluebiz.bluelytics.api.query.plan.expressions.operands.numeric.NumericOperand" ]
import de.bluebiz.bluelytics.api.query.plan.expressions.operands.numeric.NumericOperand;
import de.bluebiz.bluelytics.api.query.plan.expressions.operands.numeric.*;
[ "de.bluebiz.bluelytics" ]
de.bluebiz.bluelytics;
581,144
public synchronized boolean init (PersistenceContext ctx, DepotMetaData meta) throws DatabaseException { if (_meta != null) return false; _meta = meta; final SQLBuilder builder = ctx.getSQLBuilder(new DepotTypes(ctx, _pClass)); // perform the context-sensitive initializ...
synchronized boolean function (PersistenceContext ctx, DepotMetaData meta) throws DatabaseException { if (_meta != null) return false; _meta = meta; final SQLBuilder builder = ctx.getSQLBuilder(new DepotTypes(ctx, _pClass)); for (FieldMarshaller<?> fm : _fields.values()) { fm.init(builder); } if (getTableName() == null...
/** * Initializes the table used by this marshaller if it has not yet been done. If the table does * not exist, it will be created. If the schema version specified by the persistent object is * newer than the database schema, it will be migrated. * @return true if initialization was performed, false...
Initializes the table used by this marshaller if it has not yet been done. If the table does not exist, it will be created. If the schema version specified by the persistent object is newer than the database schema, it will be migrated
init
{ "repo_name": "threerings/depot", "path": "src/main/java/com/samskivert/depot/impl/DepotMarshaller.java", "license": "bsd-3-clause", "size": 47524 }
[ "com.google.common.collect.Lists", "com.samskivert.depot.DatabaseException", "com.samskivert.depot.PersistenceContext", "com.samskivert.depot.expression.ColumnExp", "com.samskivert.depot.impl.jdbc.ColumnDefinition", "java.util.List" ]
import com.google.common.collect.Lists; import com.samskivert.depot.DatabaseException; import com.samskivert.depot.PersistenceContext; import com.samskivert.depot.expression.ColumnExp; import com.samskivert.depot.impl.jdbc.ColumnDefinition; import java.util.List;
import com.google.common.collect.*; import com.samskivert.depot.*; import com.samskivert.depot.expression.*; import com.samskivert.depot.impl.jdbc.*; import java.util.*;
[ "com.google.common", "com.samskivert.depot", "java.util" ]
com.google.common; com.samskivert.depot; java.util;
926,586
public List<HostName> managedHostNames() { return this.managedHostNames; }
List<HostName> function() { return this.managedHostNames; }
/** * Get the managedHostNames value. * * @return the managedHostNames value */
Get the managedHostNames value
managedHostNames
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/DomainInner.java", "license": "mit", "size": 11796 }
[ "com.microsoft.azure.management.appservice.HostName", "java.util.List" ]
import com.microsoft.azure.management.appservice.HostName; import java.util.List;
import com.microsoft.azure.management.appservice.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
2,571,980
protected void onStartClose(int position, boolean right) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onStartClose(position, right); } }
void function(int position, boolean right) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onStartClose(position, right); } }
/** * Start close item * * @param position list item * @param right */
Start close item
onStartClose
{ "repo_name": "x251089003/EveryXDay", "path": "EveryXDay/src/main/java/com/xinxin/everyxday/widget/swipelistview/SwipeListView.java", "license": "apache-2.0", "size": 20981 }
[ "android.widget.ListView" ]
import android.widget.ListView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,976,737
public static final String dump(BigInteger x) { return dumpString(trim(x)); }
static final String function(BigInteger x) { return dumpString(trim(x)); }
/** * <p>Returns a hexadecimal dump of the trimmed bytes of a {@link BigInteger}. * </p> * * @param x the {@link BigInteger} to display. * @return the string representation of the designated {@link BigInteger}. */
Returns a hexadecimal dump of the trimmed bytes of a <code>BigInteger</code>.
dump
{ "repo_name": "ntfwc/file-checksum-calculator", "path": "src/gnu/crypto/util/Util.java", "license": "gpl-2.0", "size": 20628 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
466,625
final long reserveAndGetWaitLength(int permits, long nowMicros) { long momentAvailable = reserveEarliestAvailable(permits, nowMicros); return max(momentAvailable - nowMicros, 0); }
final long reserveAndGetWaitLength(int permits, long nowMicros) { long momentAvailable = reserveEarliestAvailable(permits, nowMicros); return max(momentAvailable - nowMicros, 0); }
/** * Reserves next ticket and returns the wait time that the caller must wait for. * * @return the required wait time, never negative */
Reserves next ticket and returns the wait time that the caller must wait for
reserveAndGetWaitLength
{ "repo_name": "Xaerxess/guava", "path": "guava/src/com/google/common/util/concurrent/RateLimiter.java", "license": "apache-2.0", "size": 18405 }
[ "java.lang.Math" ]
import java.lang.Math;
import java.lang.*;
[ "java.lang" ]
java.lang;
1,584,581
private JPanel createContentPane() { final JPanel content = new JPanel(new BorderLayout()); final JTabbedPane tabs = new JTabbedPane(); tabs.add("Alignment", createTab1Content()); tabs.add("Rotation", createTab2Content()); content.add(tabs); return content; }
JPanel function() { final JPanel content = new JPanel(new BorderLayout()); final JTabbedPane tabs = new JTabbedPane(); tabs.add(STR, createTab1Content()); tabs.add(STR, createTab2Content()); content.add(tabs); return content; }
/** * Creates the content pane for the demo frame. * * @return The content pane. */
Creates the content pane for the demo frame
createContentPane
{ "repo_name": "apetresc/JCommon", "path": "src/main/java/org/jfree/demo/DrawStringDemo.java", "license": "lgpl-2.1", "size": 11761 }
[ "java.awt.BorderLayout", "javax.swing.JPanel", "javax.swing.JTabbedPane" ]
import java.awt.BorderLayout; import javax.swing.JPanel; import javax.swing.JTabbedPane;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,128,524
@VisibleForTesting static String getRawMethod(@NonNull String name) { int index = name.indexOf('<'); if (index != -1) { return name.substring(0, index); } return name; }
static String getRawMethod(@NonNull String name) { int index = name.indexOf('<'); if (index != -1) { return name.substring(0, index); } return name; }
/** * Drop generic type variables from a method or constructor name */
Drop generic type variables from a method or constructor name
getRawMethod
{ "repo_name": "tranleduy2000/javaide", "path": "aosp/gradle/src/main/java/com/android/build/gradle/tasks/annotations/ApiDatabase.java", "license": "gpl-3.0", "size": 14951 }
[ "com.android.annotations.NonNull" ]
import com.android.annotations.NonNull;
import com.android.annotations.*;
[ "com.android.annotations" ]
com.android.annotations;
1,787,652
@Override public Class<? extends Annotation> getScope() { return Singleton.class; }
Class<? extends Annotation> function() { return Singleton.class; }
/** * Returns the scope annotation type. */
Returns the scope annotation type
getScope
{ "repo_name": "christianchristensen/resin", "path": "modules/kernel/src/com/caucho/config/scope/SingletonScope.java", "license": "gpl-2.0", "size": 2544 }
[ "java.lang.annotation.Annotation", "javax.inject.Singleton" ]
import java.lang.annotation.Annotation; import javax.inject.Singleton;
import java.lang.annotation.*; import javax.inject.*;
[ "java.lang", "javax.inject" ]
java.lang; javax.inject;
1,851,046
public static boolean textFile(File f, boolean emptyOk) { if (f.length() == 0) return emptyOk; String detected = VisorMimeTypes.getContentType(f); for (String mime : TEXT_MIME_TYPE) if (mime.equals(detected)) return true; return false; }
static boolean function(File f, boolean emptyOk) { if (f.length() == 0) return emptyOk; String detected = VisorMimeTypes.getContentType(f); for (String mime : TEXT_MIME_TYPE) if (mime.equals(detected)) return true; return false; }
/** * Check is text file. * * @param f file reference. * @param emptyOk default value if empty file. * @return Is text file. */
Check is text file
textFile
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java", "license": "apache-2.0", "size": 40720 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,154,925
private void verifyPageLoaded(final WebDriver webDriver) { webDriver.get(TEST_URL); final String currentUrl = webDriver.getCurrentUrl(); this.log.info(currentUrl); final String pageTitle = webDriver.getTitle(); this.log.info(pageTitle); }
void function(final WebDriver webDriver) { webDriver.get(TEST_URL); final String currentUrl = webDriver.getCurrentUrl(); this.log.info(currentUrl); final String pageTitle = webDriver.getTitle(); this.log.info(pageTitle); }
/** * Verify that verify page loaded. * * @param webDriver the web driver */
Verify that verify page loaded
verifyPageLoaded
{ "repo_name": "atf4j/atf4j", "path": "atf4j-webdriver/src/test/java/net/atf4j/webdriver/BrowserFactoryTest.java", "license": "gpl-3.0", "size": 5764 }
[ "org.openqa.selenium.WebDriver" ]
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
179,054
public void nameninitialisieren() { //ggf. Verbindung zur DB herstellen conn = getInstance(); //Befehl zur Erzeugung der Tabelle besrtehend aus Startnummer (Primärschlüssel) und Name String sql = "CREATE TABLE namen(" + "Namen TEXT, Startnummer VARCHAR(50) PRIMA...
void function() { conn = getInstance(); String sql = STR + STR + ");"; Statement query; try { query = conn.createStatement(); boolean result = query.execute(sql); } catch (SQLException e) { showExceptionDialog(e, STR, STR, STRnamen\STR, false); } }
/** * Legt die Tabelle in der Datenbank an, in der Namen und Startnummern * stehen */
Legt die Tabelle in der Datenbank an, in der Namen und Startnummern stehen
nameninitialisieren
{ "repo_name": "WorldofJARcraft/Kanu-s.a.M.", "path": "src/android_connector/MySQLConnection.java", "license": "gpl-3.0", "size": 63908 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,601,720
public void connectingBlip(Blip rootBlip) { clearWaveletBlips(rootBlip); TextView textView = rootBlip.getDocument(); textView.appendElement(new FormElement(ElementType.BUTTON, root.ID_BUTT_REFRESH, "Refresh")); textView.append("connecting..."); }
void function(Blip rootBlip) { clearWaveletBlips(rootBlip); TextView textView = rootBlip.getDocument(); textView.appendElement(new FormElement(ElementType.BUTTON, root.ID_BUTT_REFRESH, STR)); textView.append(STR); }
/** * Informs the user that we are connecting to wlm severs * @param rootBlip the root blip of the wave */
Informs the user that we are connecting to wlm severs
connectingBlip
{ "repo_name": "up1/Google-wave-Wave-Live-Messenger", "path": "Robot/WaveLiveMessenger/src/wavelivemessenger/BlipRender.java", "license": "mit", "size": 8530 }
[ "com.google.wave.api.Blip", "com.google.wave.api.ElementType", "com.google.wave.api.FormElement", "com.google.wave.api.TextView" ]
import com.google.wave.api.Blip; import com.google.wave.api.ElementType; import com.google.wave.api.FormElement; import com.google.wave.api.TextView;
import com.google.wave.api.*;
[ "com.google.wave" ]
com.google.wave;
2,324,909
public void executeTransaction(Transaction transaction) { if (transaction == null) return; beginTransaction(); try { transaction.execute(this); commitTransaction(); } catch (RuntimeException e) { cancelTransaction(); throw n...
void function(Transaction transaction) { if (transaction == null) return; beginTransaction(); try { transaction.execute(this); commitTransaction(); } catch (RuntimeException e) { cancelTransaction(); throw new RealmException(STR, e); } catch (Error e) { cancelTransaction(); throw e; } }
/** * Executes a given transaction on the Realm. {@link #beginTransaction()} and * {@link #commitTransaction()} will be called automatically. If any exception is thrown * during the transaction {@link #cancelTransaction()} will be called instead of {@link #commitTransaction()}. * * @param trans...
Executes a given transaction on the Realm. <code>#beginTransaction()</code> and <code>#commitTransaction()</code> will be called automatically. If any exception is thrown during the transaction <code>#cancelTransaction()</code> will be called instead of <code>#commitTransaction()</code>
executeTransaction
{ "repo_name": "ysnows/realm-java", "path": "realm/src/main/java/io/realm/Realm.java", "license": "apache-2.0", "size": 70596 }
[ "io.realm.exceptions.RealmException" ]
import io.realm.exceptions.RealmException;
import io.realm.exceptions.*;
[ "io.realm.exceptions" ]
io.realm.exceptions;
2,022,871
public JSONArray put(int index, boolean value) throws JSONException { put(index, value ? Boolean.TRUE : Boolean.FALSE); return this; }
JSONArray function(int index, boolean value) throws JSONException { put(index, value ? Boolean.TRUE : Boolean.FALSE); return this; }
/** * Put or replace a boolean value in the JSONArray. If the index is greater * than the length of the JSONArray, then null elements will be added as * necessary to pad it out. * @param index The subscript. * @param value A boolean value. * @return this. * @throws JSONException If th...
Put or replace a boolean value in the JSONArray. If the index is greater than the length of the JSONArray, then null elements will be added as necessary to pad it out
put
{ "repo_name": "matias-pequeno/ikea-calc-j2me-java", "path": "lib/src/com/mxme/json/JSONArray.java", "license": "gpl-2.0", "size": 26204 }
[ "com.mxme.common.Boolean" ]
import com.mxme.common.Boolean;
import com.mxme.common.*;
[ "com.mxme.common" ]
com.mxme.common;
181,245
public void removeProgressListener(ISyncProgressListener listener) { listeners.remove(listener); }
void function(ISyncProgressListener listener) { listeners.remove(listener); }
/** * Removes the progress listener. * * @param listener the listener */
Removes the progress listener
removeProgressListener
{ "repo_name": "consistec/doubleganger", "path": "common/src/main/java/de/consistec/doubleganger/common/client/SyncAgent.java", "license": "gpl-3.0", "size": 12898 }
[ "de.consistec.doubleganger.common.ISyncProgressListener" ]
import de.consistec.doubleganger.common.ISyncProgressListener;
import de.consistec.doubleganger.common.*;
[ "de.consistec.doubleganger" ]
de.consistec.doubleganger;
1,868,718
public void archive(MavenBuildProxy build, File file, BuildListener listener) throws IOException, InterruptedException { if (build.isArchivingDisabled()) { listener.getLogger().println("[JENKINS] Archiving disabled - not archiving " + file); } else { FilePath target =...
void function(MavenBuildProxy build, File file, BuildListener listener) throws IOException, InterruptedException { if (build.isArchivingDisabled()) { listener.getLogger().println(STR + file); } else { FilePath target = getArtifactArchivePath(build,groupId,artifactId,version); FilePath origin = new FilePath(file); if (!...
/** * Called from within Maven to archive an artifact in Hudson. */
Called from within Maven to archive an artifact in Hudson
archive
{ "repo_name": "sumitk1/jenkins", "path": "maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifact.java", "license": "mit", "size": 12663 }
[ "hudson.maven.MavenBuildProxy", "hudson.model.BuildListener", "java.io.File", "java.io.IOException" ]
import hudson.maven.MavenBuildProxy; import hudson.model.BuildListener; import java.io.File; import java.io.IOException;
import hudson.maven.*; import hudson.model.*; import java.io.*;
[ "hudson.maven", "hudson.model", "java.io" ]
hudson.maven; hudson.model; java.io;
98,901
private void startTrialGroup(TrialGroup trialGroup) { currentTrialGroup = trialGroup; responseLines = new ArrayList<String>(); showPrePatternFixationCross(); }
void function(TrialGroup trialGroup) { currentTrialGroup = trialGroup; responseLines = new ArrayList<String>(); showPrePatternFixationCross(); }
/** * Start the indicated TrialGroup, beginning by showing its pre-pattern fixation cross. */
Start the indicated TrialGroup, beginning by showing its pre-pattern fixation cross
startTrialGroup
{ "repo_name": "BramVanRensbergen/associations-under-cognitive-load", "path": "src/com/bram/concat/associationsundercognitiveload/experiment/Experiment.java", "license": "gpl-3.0", "size": 14215 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,268,310
public static List list(Object... objs) { if (objs.length == 1 && !(objs[0] instanceof Map)) { List r = new ArrayList(); ReflectUtils.collect(objs[0], r, true); return r; } return new ArrayList(Arrays.asList(objs)); }
static List function(Object... objs) { if (objs.length == 1 && !(objs[0] instanceof Map)) { List r = new ArrayList(); ReflectUtils.collect(objs[0], r, true); return r; } return new ArrayList(Arrays.asList(objs)); }
/** * Merge a list of objects into one list. * * @param objs * if an object is a Collection, all its' elements will be used, * not the Collection itself. * @return the list , never null */
Merge a list of objects into one list
list
{ "repo_name": "niuxuetao/paxml", "path": "PaxmlCore/src/main/java/org/paxml/el/UtilFunctions.java", "license": "agpl-3.0", "size": 25987 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "java.util.Map", "org.paxml.util.ReflectUtils" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import org.paxml.util.ReflectUtils;
import java.util.*; import org.paxml.util.*;
[ "java.util", "org.paxml.util" ]
java.util; org.paxml.util;
2,649,275
public static CellRangeAddress getMergedRegion(Sheet sheet, int rowNum, int colNum) { for (int i = 0, c = sheet.getNumMergedRegions(); i < c; i++) { CellRangeAddress merged = sheet.getMergedRegion(i); if (isRangeContainsCell(merged, rowNum, colNum)) { return merged; ...
static CellRangeAddress function(Sheet sheet, int rowNum, int colNum) { for (int i = 0, c = sheet.getNumMergedRegions(); i < c; i++) { CellRangeAddress merged = sheet.getMergedRegion(i); if (isRangeContainsCell(merged, rowNum, colNum)) { return merged; } } return null; }
/** * get the CellRangeAddress of sheet at [rowNum, colNum] if exists * @param sheet * @param rowNum * @param colNum * @return null if not exists */
get the CellRangeAddress of sheet at [rowNum, colNum] if exists
getMergedRegion
{ "repo_name": "tunnyblock/tunnyblock", "path": "src/main/java/com/thinkgem/jeesite/common/report/XLSUtil.java", "license": "apache-2.0", "size": 9315 }
[ "org.apache.poi.ss.usermodel.Sheet", "org.apache.poi.ss.util.CellRangeAddress" ]
import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.*;
[ "org.apache.poi" ]
org.apache.poi;
46,752
@Test public final void testSave_fileNotWriteable() throws NoSuchTableException { try { File save = File.createTempFile("NonReadableTestFile", "tmp"); // cleaning up save.deleteOnExit(); // try saving to a file that cannot be written to save.setWritable(false); // ensuring that the file was ...
final void function() throws NoSuchTableException { try { File save = File.createTempFile(STR, "tmp"); save.deleteOnExit(); save.setWritable(false); assertTrue(save.exists()); assertFalse(save.canWrite()); db.save(STR, save.toString()); assertEquals(STR + save.toString() + STR, output.toString().trim()); } catch (IOExc...
/** * Test method for Database#save(String, String). * * case: trivial, saveTo File cannot be saved to * * @throws NoSuchTableException if Table can't be found */
Test method for Database#save(String, String). case: trivial, saveTo File cannot be saved to
testSave_fileNotWriteable
{ "repo_name": "AlvaroNaranjo/Databases", "path": "DBMS/test/parser/DatabaseTest.java", "license": "gpl-2.0", "size": 93847 }
[ "java.io.File", "java.io.IOException", "java.util.logging.Level", "java.util.logging.Logger", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.Assert;
import java.io.*; import java.util.logging.*; import org.junit.*;
[ "java.io", "java.util", "org.junit" ]
java.io; java.util; org.junit;
2,249,483
if ("VentanaPrincipal".equals(NombreDeVentana)) { try { FXMLLoader loader = new FXMLLoader(Main.class.getResource("VentanaPrincipal.fxml")); rootPane = (AnchorPane) loader.load(); Scene scene = new Scene(rootPane); stagePrincipal...
if (STR.equals(NombreDeVentana)) { try { FXMLLoader loader = new FXMLLoader(Main.class.getResource(STR)); rootPane = (AnchorPane) loader.load(); Scene scene = new Scene(rootPane); stagePrincipal.setResizable(false); stagePrincipal.setScene(scene); stagePrincipal.setTitle(STR); ControladorVentanaPrincipal controller = l...
/** * Creacion de ventanas segun su respectiva invocacion * * @param NombreDeVentana */
Creacion de ventanas segun su respectiva invocacion
CreadorDeVentanas
{ "repo_name": "deibergv/Proyecto-1", "path": "org.TEC.Proyecto#1/src/GUI/Main.java", "license": "gpl-3.0", "size": 2041 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
921,632
ManagementMBeanAssembler getManagementMBeanAssembler();
ManagementMBeanAssembler getManagementMBeanAssembler();
/** * Returns the management mbean assembler * * @return the mbean assembler */
Returns the management mbean assembler
getManagementMBeanAssembler
{ "repo_name": "grgrzybek/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 61294 }
[ "org.apache.camel.spi.ManagementMBeanAssembler" ]
import org.apache.camel.spi.ManagementMBeanAssembler;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
68,879
@Override public String toString() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); }
String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); }
/** * Generates a String representation of the contents of this type. * This is an extension method, produced by the 'ts' xjc plugin * */
Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin
toString
{ "repo_name": "fpompermaier/onvif", "path": "onvif-ws-client/src/main/java/org/onvif/ver10/schema/LensOffset.java", "license": "apache-2.0", "size": 3106 }
[ "org.apache.commons.lang3.builder.ToStringBuilder", "org.apache.cxf.xjc.runtime.JAXBToStringStyle" ]
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle;
import org.apache.commons.lang3.builder.*; import org.apache.cxf.xjc.runtime.*;
[ "org.apache.commons", "org.apache.cxf" ]
org.apache.commons; org.apache.cxf;
1,422,712
private void initDatesBanner(CourseBannerInfoModel courseBannerInfo) { if (bannerViewBinding == null) bannerViewBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.layout_course_dates_banner, listView, false); if (courseBannerInfo != null && !isVideoMode && isOnCourseOutline...
void function(CourseBannerInfoModel courseBannerInfo) { if (bannerViewBinding == null) bannerViewBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.layout_course_dates_banner, listView, false); if (courseBannerInfo != null && !isVideoMode && isOnCourseOutline && !courseBannerInfo.getHasEnded()) { CourseDat...
/** * Initialized dates info banner on CourseOutlineFragment * * @param courseBannerInfo object of course deadline info */
Initialized dates info banner on CourseOutlineFragment
initDatesBanner
{ "repo_name": "edx/edx-app-android", "path": "OpenEdXMobile/src/main/java/org/edx/mobile/view/CourseOutlineFragment.java", "license": "apache-2.0", "size": 51561 }
[ "android.view.View", "androidx.databinding.DataBindingUtil", "org.edx.mobile.model.course.CourseBannerInfoModel", "org.edx.mobile.module.analytics.Analytics", "org.edx.mobile.util.CourseDateUtil" ]
import android.view.View; import androidx.databinding.DataBindingUtil; import org.edx.mobile.model.course.CourseBannerInfoModel; import org.edx.mobile.module.analytics.Analytics; import org.edx.mobile.util.CourseDateUtil;
import android.view.*; import androidx.databinding.*; import org.edx.mobile.model.course.*; import org.edx.mobile.module.analytics.*; import org.edx.mobile.util.*;
[ "android.view", "androidx.databinding", "org.edx.mobile" ]
android.view; androidx.databinding; org.edx.mobile;
2,390,753
public static void removeInterruptAuthenticationFlowFinalized(final RequestContext requestContext) { requestContext.getRequestScope().remove("authenticationFlowInterruptFinalized"); }
static void function(final RequestContext requestContext) { requestContext.getRequestScope().remove(STR); }
/** * Remove interrupt authentication flow finalized. * * @param requestContext the request context */
Remove interrupt authentication flow finalized
removeInterruptAuthenticationFlowFinalized
{ "repo_name": "apereo/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 71894 }
[ "org.springframework.webflow.execution.RequestContext" ]
import org.springframework.webflow.execution.RequestContext;
import org.springframework.webflow.execution.*;
[ "org.springframework.webflow" ]
org.springframework.webflow;
325,172
public static void nullFirstHeapRow(String schemaName, String tableName) throws StandardException { T_ConsistencyChecker t_cc = new T_ConsistencyChecker(schemaName, tableName, null); t_cc.getContexts(); t_cc.getDescriptors(); ScanController heapScan = t_cc.openUnqualifiedHeapScan(); // Move to the ...
static void function(String schemaName, String tableName) throws StandardException { T_ConsistencyChecker t_cc = new T_ConsistencyChecker(schemaName, tableName, null); t_cc.getContexts(); t_cc.getDescriptors(); ScanController heapScan = t_cc.openUnqualifiedHeapScan(); heapScan.next(); RowLocation baseRL = heapScan.newR...
/** * Set all of the columns in the first row from * the heap to null, without * updating the indexes on the table. * * @param schemaName The schema name. * @param tableName The table name. * * @exception StandardException Thrown on error */
Set all of the columns in the first row from the heap to null, without updating the indexes on the table
nullFirstHeapRow
{ "repo_name": "lpxz/grail-derby104", "path": "java/testing/org/apache/derbyTesting/functionTests/util/T_ConsistencyChecker.java", "license": "apache-2.0", "size": 16200 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.services.io.FormatableBitSet", "org.apache.derby.iapi.store.access.ScanController", "org.apache.derby.iapi.types.RowLocation" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.io.FormatableBitSet; import org.apache.derby.iapi.store.access.ScanController; import org.apache.derby.iapi.types.RowLocation;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.io.*; import org.apache.derby.iapi.store.access.*; import org.apache.derby.iapi.types.*;
[ "org.apache.derby" ]
org.apache.derby;
2,384,926
public IndexColorModel get_colourmap(int cache_id) throws RdesktopException { IndexColorModel map = null; map = colourcache[cache_id]; return map; }
IndexColorModel function(int cache_id) throws RdesktopException { IndexColorModel map = null; map = colourcache[cache_id]; return map; }
/** * Retrieve the indexed colour model from the specified cache * * @param cache_id * ID of cache from which to retrieve colour model * @return Indexed colour model for specified cache * @throws RdesktopException */
Retrieve the indexed colour model from the specified cache
get_colourmap
{ "repo_name": "automenta/narchy", "path": "lab/lab_x/main/java/automenta/rdp/Cache.java", "license": "agpl-3.0", "size": 8650 }
[ "java.awt.image.IndexColorModel" ]
import java.awt.image.IndexColorModel;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,956,067
void insert(final Account account, final String groupID) throws DataServiceException, DuplicatedUidException, DuplicatedEmailException;
void insert(final Account account, final String groupID) throws DataServiceException, DuplicatedUidException, DuplicatedEmailException;
/** * Creates a new account * * @param account * @param groupID * @throws DataServiceException * @throws DuplicatedEmailException * @throws RequiredFiedException */
Creates a new account
insert
{ "repo_name": "MaxiReglisse/georchestra", "path": "ldapadmin/src/main/java/org/georchestra/ldapadmin/ds/AccountDao.java", "license": "gpl-3.0", "size": 2973 }
[ "org.georchestra.ldapadmin.dto.Account" ]
import org.georchestra.ldapadmin.dto.Account;
import org.georchestra.ldapadmin.dto.*;
[ "org.georchestra.ldapadmin" ]
org.georchestra.ldapadmin;
127,305
public void write() throws IOException, TarMalformatException { File propertiesFile = new File(dbDir, instanceName + ".properties"); File scriptFile = new File(dbDir, instanceName + ".script"); File[] componentFiles = new File[] { propertiesFile, scriptFile, ...
void function() throws IOException, TarMalformatException { File propertiesFile = new File(dbDir, instanceName + STR); File scriptFile = new File(dbDir, instanceName + STR); File[] componentFiles = new File[] { propertiesFile, scriptFile, new File(dbDir, instanceName + STR), new File(dbDir, instanceName + ".data"), new...
/** * This method always backs up the .properties and .script files. * It will back up all of .backup, .data, and .log which exist. * * If abortUponModify is set, no tar file will be created, and this * method will throw. * * @throws IOException for any of many possible I/O problems ...
This method always backs up the .properties and .script files. It will back up all of .backup, .data, and .log which exist. If abortUponModify is set, no tar file will be created, and this method will throw
write
{ "repo_name": "malin1993ml/h-store", "path": "src/hsqldb19b3/org/hsqldb/lib/tar/DbBackup.java", "license": "gpl-3.0", "size": 15603 }
[ "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.util.Properties" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
455,809
protected void deployWarAndContext() throws MojoExecutionException, TomcatManagerException, IOException { validateWarFile(); validateContextFile(); getLog().info( messagesProvider.getMessage( "AbstractDeployMojo.deployingWarContext", getDeployedURL() ) ); URL warURL = g...
void function() throws MojoExecutionException, TomcatManagerException, IOException { validateWarFile(); validateContextFile(); getLog().info( messagesProvider.getMessage( STR, getDeployedURL() ) ); URL warURL = getWarFile().toURL(); URL contextURL = getContextFile().toURL(); TomcatManagerResponse tomcatResponse = getMa...
/** * Deploys the WAR and context XML file to Tomcat. * * @throws org.apache.maven.plugin.MojoExecutionException * if there was a problem locating either the WAR or the context XML file * @throws org.apache.tomcat.maven.common.deployer.TomcatManagerException * ...
Deploys the WAR and context XML file to Tomcat
deployWarAndContext
{ "repo_name": "apache/tomcat-maven-plugin", "path": "tomcat8-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat8/deploy/AbstractDeployMojo.java", "license": "apache-2.0", "size": 7871 }
[ "java.io.IOException", "org.apache.maven.plugin.MojoExecutionException", "org.apache.tomcat.maven.common.deployer.TomcatManagerException", "org.apache.tomcat.maven.common.deployer.TomcatManagerResponse" ]
import java.io.IOException; import org.apache.maven.plugin.MojoExecutionException; import org.apache.tomcat.maven.common.deployer.TomcatManagerException; import org.apache.tomcat.maven.common.deployer.TomcatManagerResponse;
import java.io.*; import org.apache.maven.plugin.*; import org.apache.tomcat.maven.common.deployer.*;
[ "java.io", "org.apache.maven", "org.apache.tomcat" ]
java.io; org.apache.maven; org.apache.tomcat;
1,695,075
public BackupsListInner withValue(List<BackupInner> value) { this.value = value; return this; }
BackupsListInner function(List<BackupInner> value) { this.value = value; return this; }
/** * Set a list of Backups. * * @param value the value value to set * @return the BackupsListInner object itself. */
Set a list of Backups
withValue
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/netapp/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/netapp/v2020_06_01/implementation/BackupsListInner.java", "license": "mit", "size": 987 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
691,039
protected final void addViewInternal(View child, ViewGroup.LayoutParams params) { super.addView(child, -1, params); }
final void function(View child, ViewGroup.LayoutParams params) { super.addView(child, -1, params); }
/** * Used internally for adding view. Need because we override addView to * pass-through to the Refreshable View */
Used internally for adding view. Need because we override addView to pass-through to the Refreshable View
addViewInternal
{ "repo_name": "zhangzijian86/XXApp", "path": "src/com/way/pulltorefresh/PullToRefreshBase.java", "license": "apache-2.0", "size": 46097 }
[ "android.view.View", "android.view.ViewGroup" ]
import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
2,785,832
private void dotnetDeployMultiple(BinaryRawReaderEx reader) { String name = reader.readString(); Object svc = reader.readObjectDetached(); int totalCnt = reader.readInt(); int maxPerNodeCnt = reader.readInt(); services.deployMultiple(name, new PlatformDotNetServiceImpl(svc, ...
void function(BinaryRawReaderEx reader) { String name = reader.readString(); Object svc = reader.readObjectDetached(); int totalCnt = reader.readInt(); int maxPerNodeCnt = reader.readInt(); services.deployMultiple(name, new PlatformDotNetServiceImpl(svc, platformCtx, srvKeepBinary), totalCnt, maxPerNodeCnt); }
/** * Deploys multiple dotnet services. * * @param reader Binary reader. */
Deploys multiple dotnet services
dotnetDeployMultiple
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java", "license": "apache-2.0", "size": 27582 }
[ "org.apache.ignite.internal.binary.BinaryRawReaderEx", "org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetServiceImpl" ]
import org.apache.ignite.internal.binary.BinaryRawReaderEx; import org.apache.ignite.internal.processors.platform.dotnet.PlatformDotNetServiceImpl;
import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.processors.platform.dotnet.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,281,616
public void feedString(String inputName, byte[] src) { addFeed(inputName, Tensor.create(src)); }
void function(String inputName, byte[] src) { addFeed(inputName, Tensor.create(src)); }
/** * Copy a byte sequence into the input Tensor with name {@link inputName} as a string-valued * scalar tensor. In the TensorFlow type system, a "string" is an arbitrary sequence of * bytes, not a Java {@code String} (which is a sequence of characters). */
Copy a byte sequence into the input Tensor with name <code>inputName</code> as a string-valued scalar tensor. In the TensorFlow type system, a "string" is an arbitrary sequence of bytes, not a Java String (which is a sequence of characters)
feedString
{ "repo_name": "pavelchristof/gomoku-ai", "path": "tensorflow/contrib/android/java/org/tensorflow/contrib/android/TensorFlowInferenceInterface.java", "license": "apache-2.0", "size": 21514 }
[ "org.tensorflow.Tensor" ]
import org.tensorflow.Tensor;
import org.tensorflow.*;
[ "org.tensorflow" ]
org.tensorflow;
595,087
public static List<String> diagnosticsToString(List<TestDiagnostic> diagnostics) { final List<String> strings = new ArrayList<String>(diagnostics.size()); for (TestDiagnostic diagnostic : diagnostics) { strings.add(diagnostic.toString()); } return strings; } priv...
static List<String> function(List<TestDiagnostic> diagnostics) { final List<String> strings = new ArrayList<String>(diagnostics.size()); for (TestDiagnostic diagnostic : diagnostics) { strings.add(diagnostic.toString()); } return strings; } private static final List<TestDiagnostic> EMPTY = Collections.unmodifiableList(...
/** * Converts the given diagnostics to strings (as they would appear in a source file individually) */
Converts the given diagnostics to strings (as they would appear in a source file individually)
diagnosticsToString
{ "repo_name": "atomicknight/checker-framework", "path": "framework/src/org/checkerframework/framework/test/diagnostics/TestDiagnosticUtils.java", "license": "gpl-2.0", "size": 12510 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,857,561
public java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.LessThanHLAPI> getSubterm_strings_LessThanHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.LessThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.LessThanHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getCl...
java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.LessThanHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.LessThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.LessThanHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.strings.im...
/** * This accessor return a list of encapsulated subelement, only of LessThanHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of LessThanHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_strings_LessThanHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/LessThanHLAPI.java", "license": "epl-1.0", "size": 108437 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
287,966
private StatusBar createStatusBar(BridgeContext context, Density density, int direction, boolean isRtlSupported) throws XmlPullParserException { StatusBar statusBar = new StatusBar(context, density, direction, isRtlSupported); statusBar.setLayoutParams( ne...
StatusBar function(BridgeContext context, Density density, int direction, boolean isRtlSupported) throws XmlPullParserException { StatusBar statusBar = new StatusBar(context, density, direction, isRtlSupported); statusBar.setLayoutParams( new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, mStatusBarSize)); retur...
/** * Creates the status bar with wifi and battery icons. */
Creates the status bar with wifi and battery icons
createStatusBar
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java", "license": "apache-2.0", "size": 70649 }
[ "android.view.ViewGroup", "android.widget.LinearLayout", "com.android.layoutlib.bridge.android.BridgeContext", "com.android.layoutlib.bridge.bars.StatusBar", "com.android.resources.Density", "org.xmlpull.v1.XmlPullParserException" ]
import android.view.ViewGroup; import android.widget.LinearLayout; import com.android.layoutlib.bridge.android.BridgeContext; import com.android.layoutlib.bridge.bars.StatusBar; import com.android.resources.Density; import org.xmlpull.v1.XmlPullParserException;
import android.view.*; import android.widget.*; import com.android.layoutlib.bridge.android.*; import com.android.layoutlib.bridge.bars.*; import com.android.resources.*; import org.xmlpull.v1.*;
[ "android.view", "android.widget", "com.android.layoutlib", "com.android.resources", "org.xmlpull.v1" ]
android.view; android.widget; com.android.layoutlib; com.android.resources; org.xmlpull.v1;
2,224,928
Set<K> keySet(Predicate<K, V> predicate);
Set<K> keySet(Predicate<K, V> predicate);
/** * Queries the map based on the specified predicate and * returns the keys of matching entries. * * @param predicate specified query criteria. * @return result key set of the query. * @throws NullPointerException if the specified predicate is null. */
Queries the map based on the specified predicate and returns the keys of matching entries
keySet
{ "repo_name": "emre-aydin/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/map/BaseMap.java", "license": "apache-2.0", "size": 7767 }
[ "com.hazelcast.query.Predicate", "java.util.Set" ]
import com.hazelcast.query.Predicate; import java.util.Set;
import com.hazelcast.query.*; import java.util.*;
[ "com.hazelcast.query", "java.util" ]
com.hazelcast.query; java.util;
2,700,760