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
@Nullable public TFieldIdEnum successField() { return successField; }
TFieldIdEnum function() { return successField; }
/** * Returns the field that holds the successful result. */
Returns the field that holds the successful result
successField
{ "repo_name": "anuraaga/armeria", "path": "thrift/src/main/java/com/linecorp/armeria/internal/common/thrift/ThriftFunction.java", "license": "apache-2.0", "size": 14656 }
[ "org.apache.thrift.TFieldIdEnum" ]
import org.apache.thrift.TFieldIdEnum;
import org.apache.thrift.*;
[ "org.apache.thrift" ]
org.apache.thrift;
1,339,942
public List<Class<?>> findTestClasses(Class<?> xface) throws ClassNotFoundException, IOException { List<Class<?>> classes = new ArrayList<Class<?>>(); for (Class<?> c : findTestClasses()) { if (existCategoryAnnotation(c, xface)) { classes.add(c); } } return classes; }
List<Class<?>> function(Class<?> xface) throws ClassNotFoundException, IOException { List<Class<?>> classes = new ArrayList<Class<?>>(); for (Class<?> c : findTestClasses()) { if (existCategoryAnnotation(c, xface)) { classes.add(c); } } return classes; }
/** * Finds test classes which are annotated with @Category having xface value * @param xface the @Category value */
Finds test classes which are annotated with @Category having xface value
findTestClasses
{ "repo_name": "matteobertozzi/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java", "license": "apache-2.0", "size": 5491 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
322,887
public Paint getAngleGridlinePaint() { return this.angleGridlinePaint; }
Paint function() { return this.angleGridlinePaint; }
/** * Returns the paint for the grid lines (if any) plotted against the * angular axis. * * @return The paint (possibly <code>null</code>). * * @see #setAngleGridlinePaint(Paint) */
Returns the paint for the grid lines (if any) plotted against the angular axis
getAngleGridlinePaint
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/PolarPlot.java", "license": "apache-2.0", "size": 39793 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,361,488
private TestSuiteConfig validate(File rootDirectory, File file, int index, TestSuiteConfig config) { if (config == null || StringUtils.isBlank(config.getName()) || config.getCaseTypes() == null || CollectionUtils.isEmpty(config.getDataSources()) ...
TestSuiteConfig function(File rootDirectory, File file, int index, TestSuiteConfig config) { if (config == null StringUtils.isBlank(config.getName()) config.getCaseTypes() == null CollectionUtils.isEmpty(config.getDataSources()) config.getIntegrationTests() == null) { logger.log(Level.WARNING, String.format(STR, file.t...
/** * Validates a single test suite by returning it or null if invalid. The * relative output path is also determined based on the relative path from * rootDirectory to file. * * @param rootDirectory The root directory for configurations * (relativeOutputPath is set by determining relative...
Validates a single test suite by returning it or null if invalid. The relative output path is also determined based on the relative path from rootDirectory to file
validate
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/integrationtesting/config/ConfigDeserializer.java", "license": "apache-2.0", "size": 14275 }
[ "java.io.File", "java.util.logging.Level", "org.apache.commons.collections.CollectionUtils", "org.apache.commons.lang.StringUtils" ]
import java.io.File; import java.util.logging.Level; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils;
import java.io.*; import java.util.logging.*; import org.apache.commons.collections.*; import org.apache.commons.lang.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
707,749
public static <T> T decodeFromByteArray(Coder<T> coder, byte[] encodedValue) throws CoderException { return decodeFromByteArray(coder, encodedValue, Coder.Context.OUTER); }
static <T> T function(Coder<T> coder, byte[] encodedValue) throws CoderException { return decodeFromByteArray(coder, encodedValue, Coder.Context.OUTER); }
/** * Decodes the given bytes using the specified Coder, and returns * the resulting decoded value. */
Decodes the given bytes using the specified Coder, and returns the resulting decoded value
decodeFromByteArray
{ "repo_name": "shakamunyi/beam", "path": "sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/util/CoderUtils.java", "license": "apache-2.0", "size": 12157 }
[ "com.google.cloud.dataflow.sdk.coders.Coder", "com.google.cloud.dataflow.sdk.coders.CoderException" ]
import com.google.cloud.dataflow.sdk.coders.Coder; import com.google.cloud.dataflow.sdk.coders.CoderException;
import com.google.cloud.dataflow.sdk.coders.*;
[ "com.google.cloud" ]
com.google.cloud;
1,572,240
protected String createProvideMethodName(final String methodName) { String name = String.format(FORMAT_METHOD_NAME_PROVIDES, StringUtils.startUpperCase(methodName)); int count = trackMethodName(name); if (count > 1) name += count; return name; }
String function(final String methodName) { String name = String.format(FORMAT_METHOD_NAME_PROVIDES, StringUtils.startUpperCase(methodName)); int count = trackMethodName(name); if (count > 1) name += count; return name; }
/** * Formats given method name to create <code>provides</code> method name. Ensures that 2 methods won't have same name. */
Formats given method name to create <code>provides</code> method name. Ensures that 2 methods won't have same name
createProvideMethodName
{ "repo_name": "inloop/Knight", "path": "knight-compiler/src/main/java/eu/inloop/knight/builder/module/BaseModuleBuilder.java", "license": "apache-2.0", "size": 9665 }
[ "eu.inloop.knight.util.StringUtils" ]
import eu.inloop.knight.util.StringUtils;
import eu.inloop.knight.util.*;
[ "eu.inloop.knight" ]
eu.inloop.knight;
1,697,766
public static String[] getIPs(String strInterface) throws UnknownHostException { return getIPs(strInterface, true); }
static String[] function(String strInterface) throws UnknownHostException { return getIPs(strInterface, true); }
/** * Like {@link DNS#getIPs(String, boolean)}, but returns all * IPs associated with the given interface and its subinterfaces. */
Like <code>DNS#getIPs(String, boolean)</code>, but returns all IPs associated with the given interface and its subinterfaces
getIPs
{ "repo_name": "ivankelly/bookkeeper", "path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/net/DNS.java", "license": "apache-2.0", "size": 13885 }
[ "java.net.UnknownHostException" ]
import java.net.UnknownHostException;
import java.net.*;
[ "java.net" ]
java.net;
1,068,102
public static native void dumpNativeHeap(FileDescriptor fd);
static native void function(FileDescriptor fd);
/** * Writes native heap data to the specified file descriptor. * * @hide */
Writes native heap data to the specified file descriptor
dumpNativeHeap
{ "repo_name": "OmniEvo/android_frameworks_base", "path": "core/java/android/os/Debug.java", "license": "gpl-3.0", "size": 81574 }
[ "java.io.FileDescriptor" ]
import java.io.FileDescriptor;
import java.io.*;
[ "java.io" ]
java.io;
878,872
public static void clearUpdateInfo(Context context) { SharedPreferences preferenciasAlertas = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { preferenciasAlertas = context.getSharedPreferences("prefupdate", Context.MODE_MULTI_PROCESS); } else { ...
static void function(Context context) { SharedPreferences preferenciasAlertas = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { preferenciasAlertas = context.getSharedPreferences(STR, Context.MODE_MULTI_PROCESS); } else { preferenciasAlertas = context.getSharedPreferences(STR, 0); } SharedPreference...
/** * Eliminar pref de actualizaciones * * @param context */
Eliminar pref de actualizaciones
clearUpdateInfo
{ "repo_name": "alberapps/tiempobus", "path": "TiempoBus/src/alberapps/android/tiempobus/util/PreferencesUtil.java", "license": "gpl-3.0", "size": 9993 }
[ "android.content.Context", "android.content.SharedPreferences", "android.os.Build" ]
import android.content.Context; import android.content.SharedPreferences; import android.os.Build;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
1,810,127
// ÆÈ·¹Æ®¸¦ ¸¸µç´Ù. @Override protected PaletteRoot getPaletteRoot() { PaletteRoot root = new PaletteRoot(); PaletteGroup group = new PaletteGroup("Selection Tool"); ToolEntry select = new PanningSelectionToolEntry(); group.add(select); root.setDefaultEntry(select); group.add(new MarqueeToolEntry(...
PaletteRoot function() { PaletteRoot root = new PaletteRoot(); PaletteGroup group = new PaletteGroup(STR); ToolEntry select = new PanningSelectionToolEntry(); group.add(select); root.setDefaultEntry(select); group.add(new MarqueeToolEntry()); group.add(new ExportClipToolEntry()); group.add(new PaletteSeparator()); grou...
/** * Activate robot by attaching sensor listeners * @param robot */
Activate robot by attaching sensor listeners
getPaletteRoot
{ "repo_name": "roboidstudio/embedded", "path": "org.roboid.studio.contentscomposer/src/org/roboid/studio/contentscomposer/ContentsComposer.java", "license": "lgpl-2.1", "size": 31410 }
[ "org.eclipse.gef.palette.ConnectionCreationToolEntry", "org.eclipse.gef.palette.CreationToolEntry", "org.eclipse.gef.palette.MarqueeToolEntry", "org.eclipse.gef.palette.PaletteGroup", "org.eclipse.gef.palette.PaletteRoot", "org.eclipse.gef.palette.PaletteSeparator", "org.eclipse.gef.palette.PanningSelec...
import org.eclipse.gef.palette.ConnectionCreationToolEntry; import org.eclipse.gef.palette.CreationToolEntry; import org.eclipse.gef.palette.MarqueeToolEntry; import org.eclipse.gef.palette.PaletteGroup; import org.eclipse.gef.palette.PaletteRoot; import org.eclipse.gef.palette.PaletteSeparator; import org.eclipse.gef....
import org.eclipse.gef.palette.*;
[ "org.eclipse.gef" ]
org.eclipse.gef;
2,294,508
@Column(name = "task_location", nullable = false) public String getTaskLocation();
@Column(name = STR, nullable = false) String function();
/** * Getter for <code>public.task.task_location</code>. */
Getter for <code>public.task.task_location</code>
getTaskLocation
{ "repo_name": "nickguletskii/OpenOlympus", "path": "src-gen/main/java/org/ng200/openolympus/jooq/tables/interfaces/ITask.java", "license": "mit", "size": 3597 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,524,522
@Test(groups = "Hybrid", enabled = true) public void AONE_15630() throws Exception { String testName = getTestName() + System.currentTimeMillis(); String user1 = getUserNameForDomain(testName + "OP", testDomain); String cloudUser = getUserNameForDomain(testName + "CL", testDomai...
@Test(groups = STR, enabled = true) void function() throws Exception { String testName = getTestName() + System.currentTimeMillis(); String user1 = getUserNameForDomain(testName + "OP", testDomain); String cloudUser = getUserNameForDomain(testName + "CL", testDomain); String opSiteName = getSiteName(testName) + System....
/** * AONE-15630:Keep content synced on cloud */
AONE-15630:Keep content synced on cloud
AONE_15630
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/qa-share/src/test/java/org/alfresco/share/workflow/WorkflowOptionsTests.java", "license": "lgpl-3.0", "size": 130598 }
[ "org.alfresco.po.share.site.SiteDashboardPage", "org.alfresco.po.share.site.document.DocumentLibraryPage", "org.alfresco.po.share.workflow.CloudTaskOrReviewPage", "org.alfresco.po.share.workflow.KeepContentStrategy", "org.alfresco.po.share.workflow.Priority", "org.alfresco.po.share.workflow.TaskType", "...
import org.alfresco.po.share.site.SiteDashboardPage; import org.alfresco.po.share.site.document.DocumentLibraryPage; import org.alfresco.po.share.workflow.CloudTaskOrReviewPage; import org.alfresco.po.share.workflow.KeepContentStrategy; import org.alfresco.po.share.workflow.Priority; import org.alfresco.po.share.workfl...
import org.alfresco.po.share.site.*; import org.alfresco.po.share.site.document.*; import org.alfresco.po.share.workflow.*; import org.alfresco.share.util.*; import org.testng.*; import org.testng.annotations.*;
[ "org.alfresco.po", "org.alfresco.share", "org.testng", "org.testng.annotations" ]
org.alfresco.po; org.alfresco.share; org.testng; org.testng.annotations;
414,247
public void testAlarmActionWifiConnected() { Intent intent = new Intent(PeriodicReplicationReceiver.ALARM_ACTION); mMockContext.setMockConnectivityManager(ConnectivityManager.TYPE_WIFI, true); mMockPreferencesEditor = mock(SharedPreferences.Editor.class); when(mMockPreferences.edit(...
void function() { Intent intent = new Intent(PeriodicReplicationReceiver.ALARM_ACTION); mMockContext.setMockConnectivityManager(ConnectivityManager.TYPE_WIFI, true); mMockPreferencesEditor = mock(SharedPreferences.Editor.class); when(mMockPreferences.edit()).thenReturn(mMockPreferencesEditor); mReceiver.onReceive(mMock...
/** * Check that when {@link WifiPeriodicReplicationReceiver} receives * {@link PeriodicReplicationReceiver#ALARM_ACTION} and WiFi is connected, * an {@link Intent} is sent out to start the Service * {@link ReplicationService} associated with * {@link WifiPeriodicReplicationReceiver} containin...
Check that when <code>WifiPeriodicReplicationReceiver</code> receives <code>PeriodicReplicationReceiver#ALARM_ACTION</code> and WiFi is connected, an <code>Intent</code> is sent out to start the Service <code>ReplicationService</code> associated with <code>WifiPeriodicReplicationReceiver</code> containing the extra <co...
testAlarmActionWifiConnected
{ "repo_name": "cloudant/sync-android", "path": "cloudant-sync-datastore-android/src/test/java/com/cloudant/sync/replication/WifiPeriodicReplicationReceiverTest.java", "license": "apache-2.0", "size": 13717 }
[ "android.content.Intent", "android.content.SharedPreferences", "android.net.ConnectivityManager", "org.mockito.Mockito" ]
import android.content.Intent; import android.content.SharedPreferences; import android.net.ConnectivityManager; import org.mockito.Mockito;
import android.content.*; import android.net.*; import org.mockito.*;
[ "android.content", "android.net", "org.mockito" ]
android.content; android.net; org.mockito;
1,813,001
String events() { String result; final List<Event> events = countlyStore_.eventsList(); final JSONArray eventArray = new JSONArray(); for (Event e : events) { eventArray.put(e.toJSON()); } result = eventArray.toString(); countlyStore_.removeEve...
String events() { String result; final List<Event> events = countlyStore_.eventsList(); final JSONArray eventArray = new JSONArray(); for (Event e : events) { eventArray.put(e.toJSON()); } result = eventArray.toString(); countlyStore_.removeEvents(events); try { result = java.net.URLEncoder.encode(result, "UTF-8"); } c...
/** * Removes all current events from the local queue and returns them as a * URL-encoded JSON string that can be submitted to a ConnectionQueue. * @return URL-encoded JSON string of event data from the local event queue */
Removes all current events from the local queue and returns them as a URL-encoded JSON string that can be submitted to a ConnectionQueue
events
{ "repo_name": "UssieApp/countly-sdk-js", "path": "src/android/EventQueue.java", "license": "mit", "size": 4007 }
[ "java.io.UnsupportedEncodingException", "java.util.List", "org.json.JSONArray" ]
import java.io.UnsupportedEncodingException; import java.util.List; import org.json.JSONArray;
import java.io.*; import java.util.*; import org.json.*;
[ "java.io", "java.util", "org.json" ]
java.io; java.util; org.json;
2,560,239
public HadoopConfiguration configuration() { return cfg; }
HadoopConfiguration function() { return cfg; }
/** * Gets Hadoop configuration. * * @return Hadoop configuration. */
Gets Hadoop configuration
configuration
{ "repo_name": "dlnufox/ignite", "path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopContext.java", "license": "apache-2.0", "size": 5402 }
[ "org.apache.ignite.configuration.HadoopConfiguration" ]
import org.apache.ignite.configuration.HadoopConfiguration;
import org.apache.ignite.configuration.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,123,297
@Test public void testModelXmlSerialization() throws Exception { Logger.getLogger(getClass()).debug("TEST " + name.getMethodName()); XmlSerializationTester tester = new XmlSerializationTester(object); assertTrue(tester.testXmlSerialization()); }
void function() throws Exception { Logger.getLogger(getClass()).debug(STR + name.getMethodName()); XmlSerializationTester tester = new XmlSerializationTester(object); assertTrue(tester.testXmlSerialization()); }
/** * Test XML serialization. * * @throws Exception the exception */
Test XML serialization
testModelXmlSerialization
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-model/src/test/java/com/wci/umls/server/jpa/test/content/StringClassJpaUnitTest.java", "license": "apache-2.0", "size": 5203 }
[ "com.wci.umls.server.helpers.XmlSerializationTester", "org.apache.log4j.Logger", "org.junit.Assert" ]
import com.wci.umls.server.helpers.XmlSerializationTester; import org.apache.log4j.Logger; import org.junit.Assert;
import com.wci.umls.server.helpers.*; import org.apache.log4j.*; import org.junit.*;
[ "com.wci.umls", "org.apache.log4j", "org.junit" ]
com.wci.umls; org.apache.log4j; org.junit;
2,684,452
final void performAppGcLocked(ProcessRecord app) { try { app.lastRequestedGc = SystemClock.uptimeMillis(); if (app.thread != null) { if (app.reportLowMemory) { app.reportLowMemory = false; app.thread.scheduleLowMemory(); ...
final void performAppGcLocked(ProcessRecord app) { try { app.lastRequestedGc = SystemClock.uptimeMillis(); if (app.thread != null) { if (app.reportLowMemory) { app.reportLowMemory = false; app.thread.scheduleLowMemory(); } else { app.thread.processInBackground(); } } } catch (Exception e) { } }
/** * Ask a given process to GC right now. */
Ask a given process to GC right now
performAppGcLocked
{ "repo_name": "tenfar/baidurom-reference", "path": "aosp/frameworks/base/services/java/com/android/server/am/ActivityManagerService.java", "license": "apache-2.0", "size": 628755 }
[ "android.os.SystemClock" ]
import android.os.SystemClock;
import android.os.*;
[ "android.os" ]
android.os;
2,072,201
public void clear() { n = 0; Arrays.fill(sums, 0.0); Arrays.fill(productsSums, 0.0); }
void function() { n = 0; Arrays.fill(sums, 0.0); Arrays.fill(productsSums, 0.0); }
/** * Clears the internal state of the Statistic */
Clears the internal state of the Statistic
clear
{ "repo_name": "martingwhite/astor", "path": "examples/math_50v2/src/main/java/org/apache/commons/math/stat/descriptive/moment/VectorialCovariance.java", "license": "gpl-2.0", "size": 4872 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,319,448
public void tagSelected(Tag tag);
void function(Tag tag);
/** * this methode will be called if a tag is selected within the tree * * @param tag */
this methode will be called if a tag is selected within the tree
tagSelected
{ "repo_name": "HerbertJordan/JimCat", "path": "src/org/jimcat/gui/tagtree/TagTreeListener.java", "license": "gpl-2.0", "size": 1214 }
[ "org.jimcat.model.tag.Tag" ]
import org.jimcat.model.tag.Tag;
import org.jimcat.model.tag.*;
[ "org.jimcat.model" ]
org.jimcat.model;
1,199,858
private boolean hasMarker(Component comp) { for (Iterator iter = typeAheadMarkers.iterator(); iter.hasNext(); ) { if (((TypeAheadMarker)iter.next()).untilFocused == comp) { return true; } } return false; }
boolean function(Component comp) { for (Iterator iter = typeAheadMarkers.iterator(); iter.hasNext(); ) { if (((TypeAheadMarker)iter.next()).untilFocused == comp) { return true; } } return false; }
/** * Returns true if there are some marker associated with component <code>comp</code> * in a markers' queue * @since 1.5 */
Returns true if there are some marker associated with component <code>comp</code> in a markers' queue
hasMarker
{ "repo_name": "greghaskins/openjdk-jdk7u-jdk", "path": "src/share/classes/java/awt/DefaultKeyboardFocusManager.java", "license": "gpl-2.0", "size": 56167 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,267,754
public void setLastUpdatedTimeStamp(Date lastUpdatedTimeStamp) { this.lastUpdatedTimeStamp = lastUpdatedTimeStamp; }
void function(Date lastUpdatedTimeStamp) { this.lastUpdatedTimeStamp = lastUpdatedTimeStamp; }
/** * Sets the lastUpdatedTimeStamp attribute value. * @param lastUpdatedTimeStamp The lastUpdatedTimeStamp to set. */
Sets the lastUpdatedTimeStamp attribute value
setLastUpdatedTimeStamp
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/vnd/businessobject/DebarredVendorMatch.java", "license": "agpl-3.0", "size": 11562 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,560,834
private void mockOrganization(String organizationIdValue, boolean validOrganization) { OrganizationServiceImpl organizationServiceImpl = new OrganizationServiceImpl(); final Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(ORGANIZATION_ID, organizatio...
void function(String organizationIdValue, boolean validOrganization) { OrganizationServiceImpl organizationServiceImpl = new OrganizationServiceImpl(); final Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(ORGANIZATION_ID, organizationIdValue); final Organization organization = getOrgan...
/** * This method is to mock OrganizationServiceImpl * Test both valid and invalid organization here * @param organizationIdValue * @param validOrganization */
This method is to mock OrganizationServiceImpl Test both valid and invalid organization here
mockOrganization
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/test/java/org/kuali/kra/service/OrganizationServiceTest.java", "license": "agpl-3.0", "size": 3704 }
[ "java.util.HashMap", "java.util.Map", "org.jmock.Expectations", "org.junit.Assert", "org.kuali.coeus.common.framework.org.Organization", "org.kuali.coeus.common.impl.org.OrganizationServiceImpl", "org.kuali.rice.krad.service.BusinessObjectService" ]
import java.util.HashMap; import java.util.Map; import org.jmock.Expectations; import org.junit.Assert; import org.kuali.coeus.common.framework.org.Organization; import org.kuali.coeus.common.impl.org.OrganizationServiceImpl; import org.kuali.rice.krad.service.BusinessObjectService;
import java.util.*; import org.jmock.*; import org.junit.*; import org.kuali.coeus.common.framework.org.*; import org.kuali.coeus.common.impl.org.*; import org.kuali.rice.krad.service.*;
[ "java.util", "org.jmock", "org.junit", "org.kuali.coeus", "org.kuali.rice" ]
java.util; org.jmock; org.junit; org.kuali.coeus; org.kuali.rice;
2,461,240
public void insertUpdate(DocumentEvent e) { Document doc = e.getDocument(); if (doc == nameField.getDocument()) handleText(); else if (doc == widthField.getDocument()) handleDimensionChange(widthField); else handleDimensionChange(heightField); }
void function(DocumentEvent e) { Document doc = e.getDocument(); if (doc == nameField.getDocument()) handleText(); else if (doc == widthField.getDocument()) handleDimensionChange(widthField); else handleDimensionChange(heightField); }
/** * Sets the <code>enabled</code> flag of the controls. * @see DocumentListener#insertUpdate(DocumentEvent) */
Sets the <code>enabled</code> flag of the controls
insertUpdate
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/util/FigureDialog.java", "license": "gpl-2.0", "size": 68983 }
[ "javax.swing.event.DocumentEvent", "javax.swing.text.Document" ]
import javax.swing.event.DocumentEvent; import javax.swing.text.Document;
import javax.swing.event.*; import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,202,841
public static HttpServletRequest getHttpRequest(){ if(RequestThreadLocal.threadLocal.get() != null){ return RequestThreadLocal.threadLocal.get().getHttpServletRequest(); } else{ return null; } }
static HttpServletRequest function(){ if(RequestThreadLocal.threadLocal.get() != null){ return RequestThreadLocal.threadLocal.get().getHttpServletRequest(); } else{ return null; } }
/** * This method returns the Http request * @return The Http request */
This method returns the Http request
getHttpRequest
{ "repo_name": "gauravvermaicloud/JavaProjectTemplate", "path": "src/main/java/com/boilerplate/framework/RequestThreadLocal.java", "license": "apache-2.0", "size": 3097 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,192,202
@Override public void exitFunExpr(@NotNull ErlangParser.FunExprContext ctx) { }
@Override public void exitFunExpr(@NotNull ErlangParser.FunExprContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterFunExpr
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/ErlangBaseListener.java", "license": "gpl-3.0", "size": 35359 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
559,195
int updateByExample(@Param("record") Message record, @Param("example") MessageExample example);
int updateByExample(@Param(STR) Message record, @Param(STR) MessageExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_prj_message * * @mbggenerated Mon Sep 21 13:52:03 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table m_prj_message
updateByExample
{ "repo_name": "maduhu/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/project/dao/MessageMapper.java", "license": "agpl-3.0", "size": 5509 }
[ "com.esofthead.mycollab.module.project.domain.Message", "com.esofthead.mycollab.module.project.domain.MessageExample", "org.apache.ibatis.annotations.Param" ]
import com.esofthead.mycollab.module.project.domain.Message; import com.esofthead.mycollab.module.project.domain.MessageExample; import org.apache.ibatis.annotations.Param;
import com.esofthead.mycollab.module.project.domain.*; import org.apache.ibatis.annotations.*;
[ "com.esofthead.mycollab", "org.apache.ibatis" ]
com.esofthead.mycollab; org.apache.ibatis;
1,497,847
public static java.util.Set extractBooking_AppointmentSet(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.BookingAppointmentTheatreVoCollection voCollection) { return extractBooking_AppointmentSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.BookingAppointmentTheatreVoCollection voCollection) { return extractBooking_AppointmentSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.scheduling.domain.objects.Booking_Appointment 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.scheduling.domain.objects.Booking_Appointment set from the value object collection
extractBooking_AppointmentSet
{ "repo_name": "openhealthcare/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/scheduling/vo/domain/BookingAppointmentTheatreVoAssembler.java", "license": "agpl-3.0", "size": 28980 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,307,246
@SmallTest @Feature({"ContextualSearch"}) @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) public void testTapGestureFarAwayTogglesSelecting() throws InterruptedException, TimeoutException { clickWordNode("states"); assertEquals("States", getSelectedText()); waitForP...
@Feature({STR}) @Restriction(RESTRICTION_TYPE_NON_LOW_END_DEVICE) void function() throws InterruptedException, TimeoutException { clickWordNode(STR); assertEquals(STR, getSelectedText()); waitForPanelToPeek(); clickNode(STR); waitForGestureProcessing(); assertNull(getSelectedText()); assertPanelClosedOrUndefined(); cli...
/** * Tests that a Tap gesture far away toggles selecting text. */
Tests that a Tap gesture far away toggles selecting text
testTapGestureFarAwayTogglesSelecting
{ "repo_name": "was4444/chromium.src", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java", "license": "bsd-3-clause", "size": 103579 }
[ "java.util.concurrent.TimeoutException", "org.chromium.base.test.util.Feature", "org.chromium.base.test.util.Restriction" ]
import java.util.concurrent.TimeoutException; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction;
import java.util.concurrent.*; import org.chromium.base.test.util.*;
[ "java.util", "org.chromium.base" ]
java.util; org.chromium.base;
1,448,195
public synchronized void sendNowEx(IrcPacket packet) throws IOException { this.sendNowEx(packet.getRaw()); }
synchronized void function(IrcPacket packet) throws IOException { this.sendNowEx(packet.getRaw()); }
/** * Sends {@link IrcPacket} to the IRC server, without using the message * queue. * * @param packet The IrcPacket to send. * @throws IOException If anything goes wrong while sending this * message. */
Sends <code>IrcPacket</code> to the IRC server, without using the message queue
sendNowEx
{ "repo_name": "warriordog/acomputerbot", "path": "sirc/src/com/sorcix/sirc/io/IrcOutput.java", "license": "bsd-2-clause", "size": 6255 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
521,499
@Override public String getFormattedMessage() { // LOG4J2-763: cache formatted string in case obj changes later if (arrayString == null) { arrayString = Arrays.toString(array); } return arrayString; }
String function() { if (arrayString == null) { arrayString = Arrays.toString(array); } return arrayString; }
/** * Returns the formatted object message. * * @return the formatted object message. */
Returns the formatted object message
getFormattedMessage
{ "repo_name": "SourceStudyNotes/log4j2", "path": "src/main/java/org/apache/logging/log4j/message/ObjectArrayMessage.java", "license": "apache-2.0", "size": 3744 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,381,975
void deleteBlobs(Collection<String> blobNames) throws IOException { if (blobNames == null || blobNames.isEmpty()) { return; } if (blobNames.size() == 1) { deleteBlob(blobNames.iterator().next()); return; } final List<Storage.Objects.Delete...
void deleteBlobs(Collection<String> blobNames) throws IOException { if (blobNames == null blobNames.isEmpty()) { return; } if (blobNames.size() == 1) { deleteBlob(blobNames.iterator().next()); return; } final List<Storage.Objects.Delete> deletions = new ArrayList<>(); final Iterator<String> blobs = blobNames.iterator()...
/** * Deletes multiple blobs in the given bucket (uses a batch request to perform this) * * @param blobNames names of the bucket to delete */
Deletes multiple blobs in the given bucket (uses a batch request to perform this)
deleteBlobs
{ "repo_name": "winstonewert/elasticsearch", "path": "plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java", "license": "apache-2.0", "size": 15088 }
[ "com.google.api.client.googleapis.batch.BatchRequest", "com.google.api.services.storage.Storage", "com.google.api.services.storage.model.Objects", "java.io.IOException", "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "java.util.List", "org.elasticsearch.common.util.concurrent.C...
import com.google.api.client.googleapis.batch.BatchRequest; import com.google.api.services.storage.Storage; import com.google.api.services.storage.model.Objects; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.elasticsearc...
import com.google.api.client.googleapis.batch.*; import com.google.api.services.storage.*; import com.google.api.services.storage.model.*; import java.io.*; import java.util.*; import org.elasticsearch.common.util.concurrent.*;
[ "com.google.api", "java.io", "java.util", "org.elasticsearch.common" ]
com.google.api; java.io; java.util; org.elasticsearch.common;
1,546,210
public double getProbability(Triple triple1, Triple triple2);
double function(Triple triple1, Triple triple2);
/** * Return the probability of the joined triple patterns, i.e. the * conditional probabilitity P(triple2|triple1). Please note that it depends * on the implementation if this method returns both a meaningful and an * accurate probability. * * @param triple1 * @param triple2 * @return double ...
Return the probability of the joined triple patterns, i.e. the conditional probabilitity P(triple2|triple1). Please note that it depends on the implementation if this method returns both a meaningful and an accurate probability
getProbability
{ "repo_name": "tekrei/ARQ-ACO", "path": "src/stocker/probability/Probability.java", "license": "apache-2.0", "size": 4806 }
[ "com.hp.hpl.jena.graph.Triple" ]
import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.graph.*;
[ "com.hp.hpl" ]
com.hp.hpl;
2,252,823
public static JavaScriptException parseJavaScriptException( Object[] arguments) { String filename = (String) arguments[0]; Long lineNumber = Math.round((Double) arguments[1]); Long columnNumber = Math.round((Double) arguments[2]); String detail = (String) arguments[3]; return new JavaScriptException(nu...
static JavaScriptException function( Object[] arguments) { String filename = (String) arguments[0]; Long lineNumber = Math.round((Double) arguments[1]); Long columnNumber = Math.round((Double) arguments[2]); String detail = (String) arguments[3]; return new JavaScriptException(null, filename, lineNumber, columnNumber, ...
/** * This method creates an {@link JavaScriptException} out of the arguments * passed by the {@link Browser} to the callback specified using * {@link #getExceptionForwardingScript(String)}. * * @param arguments * @return */
This method creates an <code>JavaScriptException</code> out of the arguments passed by the <code>Browser</code> to the callback specified using <code>#getExceptionForwardingScript(String)</code>
parseJavaScriptException
{ "repo_name": "bkahlert/com.bkahlert.nebula", "path": "src/com/bkahlert/nebula/widgets/browser/BrowserUtils.java", "license": "mit", "size": 10931 }
[ "com.bkahlert.nebula.widgets.browser.exception.JavaScriptException" ]
import com.bkahlert.nebula.widgets.browser.exception.JavaScriptException;
import com.bkahlert.nebula.widgets.browser.exception.*;
[ "com.bkahlert.nebula" ]
com.bkahlert.nebula;
946,470
static Date parseDate(String dateString) { try { return DATE_FORMAT.parseDateTime(dateString).toDate(); } catch (IllegalArgumentException e) { return null; } }
static Date parseDate(String dateString) { try { return DATE_FORMAT.parseDateTime(dateString).toDate(); } catch (IllegalArgumentException e) { return null; } }
/** * Parses the date or returns null if it fails to do so. */
Parses the date or returns null if it fails to do so
parseDate
{ "repo_name": "aozarov/appengine-gcs-client", "path": "java/src/main/java/com/google/appengine/tools/cloudstorage/oauth/URLFetchUtils.java", "license": "apache-2.0", "size": 6474 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,398,331
public void write(final DataOutput out) throws IOException { out.writeInt(this.recordType); out.writeInt(this.headerLength); }
void function(final DataOutput out) throws IOException { out.writeInt(this.recordType); out.writeInt(this.headerLength); }
/** * Writes this header to a DataOut * * @param out the DataOutput to write values to */
Writes this header to a DataOut
write
{ "repo_name": "CSU-RADAR-GROUP/VCHILL", "path": "src/edu/colostate/vchill/chill/ChillHeaderHeader.java", "license": "gpl-3.0", "size": 1586 }
[ "java.io.DataOutput", "java.io.IOException" ]
import java.io.DataOutput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
386,287
@Nonnull public static <T> FloatBinding mapToFloatThenReduce(@Nonnull final ObservableSet<T> items, @Nullable final Float defaultValue, @Nonnull final Function<? super T, Float> mapper, @Nonnull final BinaryOperator<Float> reducer) { requireNonNull(items, ERROR_ITEMS_NULL); requireNonNull(reduce...
static <T> FloatBinding function(@Nonnull final ObservableSet<T> items, @Nullable final Float defaultValue, @Nonnull final Function<? super T, Float> mapper, @Nonnull final BinaryOperator<Float> reducer) { requireNonNull(items, ERROR_ITEMS_NULL); requireNonNull(reducer, ERROR_REDUCER_NULL); return createFloatBinding(()...
/** * Returns a float binding whose value is the reduction of all elements in the set. The mapper function is applied to each element before reduction. * * @param items the observable set of elements. * @param defaultValue the value to be returned if there is no value present, may be null. ...
Returns a float binding whose value is the reduction of all elements in the set. The mapper function is applied to each element before reduction
mapToFloatThenReduce
{ "repo_name": "griffon/griffon", "path": "subprojects/griffon-javafx/src/main/java/griffon/javafx/beans/binding/ReducingBindings.java", "license": "apache-2.0", "size": 249342 }
[ "java.util.Objects", "java.util.function.BinaryOperator", "java.util.function.Function" ]
import java.util.Objects; import java.util.function.BinaryOperator; import java.util.function.Function;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
509,767
public static List<String> linesOf(File file, String charsetName) { return Files.linesOf(file, charsetName); } // -------------------------------------------------------------------------------------------------- // URL/Resource methods : not assertions but here to have a single entry point to all AssertJ ...
static List<String> function(File file, String charsetName) { return Files.linesOf(file, charsetName); }
/** * Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are * either \n, \r or \r\n. * * @param file the file. * @param charsetName the name of the character set to use. * @return the content of the file. * @throws NullPointerException if...
Loads the text content of a file into a list of strings, each string corresponding to a line. The line endings are either \n, \r or \r\n
linesOf
{ "repo_name": "mariuszs/assertj-core", "path": "src/main/java/org/assertj/core/api/Assertions.java", "license": "apache-2.0", "size": 57618 }
[ "java.io.File", "java.util.List", "org.assertj.core.util.Files" ]
import java.io.File; import java.util.List; import org.assertj.core.util.Files;
import java.io.*; import java.util.*; import org.assertj.core.util.*;
[ "java.io", "java.util", "org.assertj.core" ]
java.io; java.util; org.assertj.core;
298,529
public static IMultiBlockable<?> createFakeTE(Block block) { IMultiBlockable<?> mb = null; if (block != null && block != Blocks.AIR) { if (block instanceof AbstractBlockNuclearComponent && ((AbstractBlockNuclearComponent) block).getTileEntity() instanceof IMultiBlockable<?>) { mb = (IMultiBl...
static IMultiBlockable<?> function(Block block) { IMultiBlockable<?> mb = null; if (block != null && block != Blocks.AIR) { if (block instanceof AbstractBlockNuclearComponent && ((AbstractBlockNuclearComponent) block).getTileEntity() instanceof IMultiBlockable<?>) { mb = (IMultiBlockable<?>) ((AbstractBlockNuclearCompo...
/** * Function to create a fake instance of IMultiBlockable TE. * * @param block block to reference. * @return object if valid, else returns false. */
Function to create a fake instance of IMultiBlockable TE
createFakeTE
{ "repo_name": "hockeyhurd/Project-Zed", "path": "com/projectzed/mod/util/WorldUtils.java", "license": "gpl-2.0", "size": 7089 }
[ "com.projectzed.api.block.AbstractBlockContainer", "com.projectzed.api.block.AbstractBlockNuclearComponent", "com.projectzed.api.tileentity.IMultiBlockable", "net.minecraft.block.Block", "net.minecraft.init.Blocks" ]
import com.projectzed.api.block.AbstractBlockContainer; import com.projectzed.api.block.AbstractBlockNuclearComponent; import com.projectzed.api.tileentity.IMultiBlockable; import net.minecraft.block.Block; import net.minecraft.init.Blocks;
import com.projectzed.api.block.*; import com.projectzed.api.tileentity.*; import net.minecraft.block.*; import net.minecraft.init.*;
[ "com.projectzed.api", "net.minecraft.block", "net.minecraft.init" ]
com.projectzed.api; net.minecraft.block; net.minecraft.init;
439,249
@Test public void testToString() { assertEquals("TheString", this.str1.toString()); }
void function() { assertEquals(STR, this.str1.toString()); }
/** * Verifies that toString returns the string representation of the CommonStringObject */
Verifies that toString returns the string representation of the CommonStringObject
testToString
{ "repo_name": "byu-vv-lab/sarl", "path": "test/edu/udel/cis/vsl/sarl/object/common/CommonStringObjectTest.java", "license": "gpl-3.0", "size": 2522 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,914,085
public SearchRequest source(SearchSourceBuilder sourceBuilder) { this.source = sourceBuilder.buildAsBytes(Requests.CONTENT_TYPE); this.sourceUnsafe = false; return this; }
SearchRequest function(SearchSourceBuilder sourceBuilder) { this.source = sourceBuilder.buildAsBytes(Requests.CONTENT_TYPE); this.sourceUnsafe = false; return this; }
/** * The source of the search request. */
The source of the search request
source
{ "repo_name": "fabiofumarola/elasticsearch", "path": "src/main/java/org/elasticsearch/action/search/SearchRequest.java", "license": "apache-2.0", "size": 17168 }
[ "org.elasticsearch.client.Requests", "org.elasticsearch.search.builder.SearchSourceBuilder" ]
import org.elasticsearch.client.Requests; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.client.*; import org.elasticsearch.search.builder.*;
[ "org.elasticsearch.client", "org.elasticsearch.search" ]
org.elasticsearch.client; org.elasticsearch.search;
318,942
public static <T> T getObject( String path, final Class<T> clazz) throws JsonParseException, JsonMappingException, IOException { String jsonString = FileUtils.readFileToString(new File(path), "utf-8"); return toObject(jsonString, clazz); }
static <T> T function( String path, final Class<T> clazz) throws JsonParseException, JsonMappingException, IOException { String jsonString = FileUtils.readFileToString(new File(path), "utf-8"); return toObject(jsonString, clazz); }
/** * Get JSON Mapped object * * @param path path to the json file * @param clazz class to map the json file * @param <T> Mapped class * @return Mapped Json object * @throws JsonParseException * @throws JsonMappingException * @throws IOException */
Get JSON Mapped object
getObject
{ "repo_name": "yasuflatland-lf/damascus", "path": "src/main/java/com/liferay/damascus/cli/common/JsonUtil.java", "license": "lgpl-3.0", "size": 3969 }
[ "com.fasterxml.jackson.core.JsonParseException", "com.fasterxml.jackson.databind.JsonMappingException", "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils" ]
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils;
import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*; import org.apache.commons.io.*;
[ "com.fasterxml.jackson", "java.io", "org.apache.commons" ]
com.fasterxml.jackson; java.io; org.apache.commons;
1,557,310
public static Nonce createNonce(Long userId) { Nonce n = new Nonce(); n.userId = userId; SecureRandom random = new SecureRandom(); n.nonce = new byte[NONCE_SIZE]; random.nextBytes(n.nonce); Calendar cal = Calendar.getInstance(); // Set nonce time-to-live to 5 minutes. cal.add(Calendar.MINUTE, 5); n...
static Nonce function(Long userId) { Nonce n = new Nonce(); n.userId = userId; SecureRandom random = new SecureRandom(); n.nonce = new byte[NONCE_SIZE]; random.nextBytes(n.nonce); Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, 5); n.nonceExpiryDate = cal.getTime(); try { n.encodedNonce = URLEncoder.enc...
/** * Creates a new nonce and resets its expiry date. * * @param userId the ID of the associated user * @return a new nonce */
Creates a new nonce and resets its expiry date
createNonce
{ "repo_name": "andrewbissada/gss", "path": "src/org/gss_project/gss/server/domain/Nonce.java", "license": "gpl-3.0", "size": 4289 }
[ "java.io.UnsupportedEncodingException", "java.net.URLEncoder", "java.security.SecureRandom", "java.util.Calendar", "org.apache.commons.codec.binary.Base64" ]
import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.security.SecureRandom; import java.util.Calendar; import org.apache.commons.codec.binary.Base64;
import java.io.*; import java.net.*; import java.security.*; import java.util.*; import org.apache.commons.codec.binary.*;
[ "java.io", "java.net", "java.security", "java.util", "org.apache.commons" ]
java.io; java.net; java.security; java.util; org.apache.commons;
1,387,017
private void updateBind(Node n) { CodingConvention.Bind bind = compiler.getCodingConvention().describeFunctionBind(n, false, true); if (bind == null) { return; } Node target = bind.target; FunctionType callTargetFn = getJSType(target) .restrictByNotNullOrUndefined().toMaybeF...
void function(Node n) { CodingConvention.Bind bind = compiler.getCodingConvention().describeFunctionBind(n, false, true); if (bind == null) { return; } Node target = bind.target; FunctionType callTargetFn = getJSType(target) .restrictByNotNullOrUndefined().toMaybeFunctionType(); if (callTargetFn == null) { return; } if...
/** * When "bind" is called on a function, we infer the type of the returned * "bound" function by looking at the number of parameters in the call site. * We also infer the "this" type of the target, if it's a function expression. */
When "bind" is called on a function, we infer the type of the returned "bound" function by looking at the number of parameters in the call site. We also infer the "this" type of the target, if it's a function expression
updateBind
{ "repo_name": "superkonduktr/closure-compiler", "path": "src/com/google/javascript/jscomp/TypeInference.java", "license": "apache-2.0", "size": 64389 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.FunctionBuilder", "com.google.javascript.rhino.jstype.FunctionType", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.FunctionBuilder; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
2,211,340
public static void assertInputIsValid(final String input) { if (input == null) { throw new IllegalArgumentException("Cannot check validity of null input."); } if (!isUrl(input)) { assertFileIsReadable(new File(input)); } }
static void function(final String input) { if (input == null) { throw new IllegalArgumentException(STR); } if (!isUrl(input)) { assertFileIsReadable(new File(input)); } }
/** * Checks that an input is is non-null, a URL or a file, exists, * and if its a file then it is not a directory and is readable. If any * condition is false then a runtime exception is thrown. * * @param input the input to check for validity */
Checks that an input is is non-null, a URL or a file, exists, and if its a file then it is not a directory and is readable. If any condition is false then a runtime exception is thrown
assertInputIsValid
{ "repo_name": "xubo245/CloudSW", "path": "src/main/java/htsjdk/samtools/util/IOUtil.java", "license": "gpl-2.0", "size": 35992 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,869,260
@Nullable String getPackageNameByDirectory(@NotNull VirtualFile dir); //Q: move to FileIndex?
String getPackageNameByDirectory(@NotNull VirtualFile dir);
/** * Returns the name of the package corresponding to the specified directory. * * @return the package name, or null if the directory does not correspond to any package. */
Returns the name of the package corresponding to the specified directory
getPackageNameByDirectory
{ "repo_name": "asedunov/intellij-community", "path": "platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java", "license": "apache-2.0", "size": 6138 }
[ "com.intellij.openapi.vfs.VirtualFile", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.vfs.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "org.jetbrains.annotations" ]
com.intellij.openapi; org.jetbrains.annotations;
1,192,423
@ServiceMethod(returns = ReturnType.SINGLE) public <T> Mono<DigitalTwinsResponse<T>> getComponentWithResponse(String digitalTwinId, String componentName, Class<T> clazz) { return withContext(context -> getComponentWithResponse(digitalTwinId, componentName, clazz, context)); }
@ServiceMethod(returns = ReturnType.SINGLE) <T> Mono<DigitalTwinsResponse<T>> function(String digitalTwinId, String componentName, Class<T> clazz) { return withContext(context -> getComponentWithResponse(digitalTwinId, componentName, clazz, context)); }
/** * Get a component of a digital twin. * * <p><strong>Code Samples</strong></p> * * <!-- src_embed com.azure.digitaltwins.core.DigitalTwinsAsyncClient.getComponentWithResponse#String-String-Class-Options --> * <pre> * digitalTwinsAsyncClient.getComponentWithResponse&#40; * ...
Get a component of a digital twin. Code Samples <code> digitalTwinsAsyncClient.getComponentWithResponse&#40; &quot;myDigitalTwinId&quot;, &quot;myComponentName&quot;, String.class&#41; .subscribe&#40;response -&gt; System.out.println&#40; &quot;Received component get operation response with HTTP status code: &quot; + r...
getComponentWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java", "license": "mit", "size": 127100 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.FluxUtil", "com.azure.digitaltwins.core.models.DigitalTwinsResponse" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.FluxUtil; import com.azure.digitaltwins.core.models.DigitalTwinsResponse;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.digitaltwins.core.models.*;
[ "com.azure.core", "com.azure.digitaltwins" ]
com.azure.core; com.azure.digitaltwins;
1,791,714
public BigDecimal getConfirmedQty(); public static final String COLUMNNAME_Created = "Created";
BigDecimal function(); public static final String COLUMNNAME_Created = STR;
/** Get Confirmed Quantity. * Confirmation of a received quantity */
Get Confirmed Quantity. Confirmation of a received quantity
getConfirmedQty
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_M_InOutLineConfirm.java", "license": "gpl-2.0", "size": 8033 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,245,868
public static Object convert(String typeName, String value, ClassLoader classLoader) { if (typeName.equals(Boolean.class.getName()) || typeName.equals(boolean.class.getName())) { return Boolean.valueOf(value); } else if (typeName.equals(Byte.class.getName()) || typeName.equals(byte.class...
static Object function(String typeName, String value, ClassLoader classLoader) { if (typeName.equals(Boolean.class.getName()) typeName.equals(boolean.class.getName())) { return Boolean.valueOf(value); } else if (typeName.equals(Byte.class.getName()) typeName.equals(byte.class.getName())) { return Byte.valueOf(value); }...
/** * Converts a String value of a named type to an object. * Works with primitive wrappers, String, File, URL types, or any type that has * an appropriate {@link PropertyEditor}. * * @param typeName name of the type * @param value its value * @param classLoader used to loa...
Converts a String value of a named type to an object. Works with primitive wrappers, String, File, URL types, or any type that has an appropriate <code>PropertyEditor</code>
convert
{ "repo_name": "tmyroadctfig/picocontainer-android", "path": "src/org/picocontainer/behaviors/PropertyApplicator.java", "license": "bsd-3-clause", "size": 12783 }
[ "java.io.File", "java.net.MalformedURLException", "org.picocontainer.PicoCompositionException" ]
import java.io.File; import java.net.MalformedURLException; import org.picocontainer.PicoCompositionException;
import java.io.*; import java.net.*; import org.picocontainer.*;
[ "java.io", "java.net", "org.picocontainer" ]
java.io; java.net; org.picocontainer;
191,201
public static MultipartRequest getInstance(HttpServletRequest request) throws IOException { return getInstance(request, null, null); } // ---------------------------------------------------------------- load
static MultipartRequest function(HttpServletRequest request) throws IOException { return getInstance(request, null, null); }
/** * Returns new or existing instance of <code>MultipartRequest</code>. */
Returns new or existing instance of <code>MultipartRequest</code>
getInstance
{ "repo_name": "wjw465150/jodd", "path": "jodd-servlet/src/main/java/jodd/servlet/upload/MultipartRequest.java", "license": "bsd-2-clause", "size": 6250 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
655,492
EReference getDocumentRoot_DataType();
EReference getDocumentRoot_DataType();
/** * Returns the meta object for the containment reference '{@link net.opengis.ows20.DocumentRoot#getDataType <em>Data Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Data Type</em>'. * @see net.opengis.ows20.DocumentRoot#getD...
Returns the meta object for the containment reference '<code>net.opengis.ows20.DocumentRoot#getDataType Data Type</code>'.
getDocumentRoot_DataType
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java", "license": "lgpl-2.1", "size": 356067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,706,283
EAttribute getSketch_FloatVar5();
EAttribute getSketch_FloatVar5();
/** * Returns the meta object for the attribute '{@link com.specmate.migration.test.baseline.testmodel.artefact.Sketch#getFloatVar5 <em>Float Var5</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Float Var5</em>'. * @see com.specmate.migration.test.bas...
Returns the meta object for the attribute '<code>com.specmate.migration.test.baseline.testmodel.artefact.Sketch#getFloatVar5 Float Var5</code>'.
getSketch_FloatVar5
{ "repo_name": "junkerm/specmate", "path": "bundles/specmate-migration-test/src/com/specmate/migration/test/baseline/testmodel/artefact/ArtefactPackage.java", "license": "apache-2.0", "size": 47870 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,603,216
public void testEntireObjectNestedSearch4() throws Exception { Class targetClass = Utensil.class; Utensil criteria = new Utensil(); Object[] results = getQueryObjectResults(targetClass, criteria); assertNotNull(results); assertEquals(3,results.length); for (Object obj : results){ Ut...
void function() throws Exception { Class targetClass = Utensil.class; Utensil criteria = new Utensil(); Object[] results = getQueryObjectResults(targetClass, criteria); assertNotNull(results); assertEquals(3,results.length); for (Object obj : results){ Utensil result = (Utensil)obj; assertNotNull(result); assertNotNull...
/** * Uses Nested Search Criteria for search * Verifies that the results are returned * Verifies size of the result set * Verifies that none of the attribute is null * * @throws Exception */
Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
testEntireObjectNestedSearch4
{ "repo_name": "NCIP/cacore-sdk", "path": "sdk-toolkit/example-project/junit/src/test/ws/DifferentPackageWithAssociationWSTest.java", "license": "bsd-3-clause", "size": 6440 }
[ "gov.nih.nci.cacoresdk.domain.other.differentpackage.associations.Utensil" ]
import gov.nih.nci.cacoresdk.domain.other.differentpackage.associations.Utensil;
import gov.nih.nci.cacoresdk.domain.other.differentpackage.associations.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,361,705
@Generated @CFunction public static native VoidPtr _Block_copy(ConstVoidPtr aBlock);
static native VoidPtr function(ConstVoidPtr aBlock);
/** * Create a heap based copy of a Block or simply add a reference to an existing one. * This must be paired with Block_release to recover memory, even when running * under Objective-C Garbage Collection. */
Create a heap based copy of a Block or simply add a reference to an existing one. This must be paired with Block_release to recover memory, even when running under Objective-C Garbage Collection
_Block_copy
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/c/Globals.java", "license": "apache-2.0", "size": 390376 }
[ "org.moe.natj.general.ptr.ConstVoidPtr", "org.moe.natj.general.ptr.VoidPtr" ]
import org.moe.natj.general.ptr.ConstVoidPtr; import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.general.ptr.*;
[ "org.moe.natj" ]
org.moe.natj;
1,108,849
public static DatabaseEntry buildDatabaseKeyEntry(final long nodeId) { final ByteBuffer keyByteBuffer = DataEncoderHelper.longToByteBuffer(nodeId); return new DatabaseEntry(keyByteBuffer.array()); }
static DatabaseEntry function(final long nodeId) { final ByteBuffer keyByteBuffer = DataEncoderHelper.longToByteBuffer(nodeId); return new DatabaseEntry(keyByteBuffer.array()); }
/** * Get the key db entry for a given node id * @param node * @return */
Get the key db entry for a given node id
buildDatabaseKeyEntry
{ "repo_name": "jnidzwetzki/scalephant", "path": "bboxdb-tools/src/main/java/org/bboxdb/tools/converter/osm/store/OSMBDBNodeStore.java", "license": "apache-2.0", "size": 7402 }
[ "com.sleepycat.je.DatabaseEntry", "java.nio.ByteBuffer", "org.bboxdb.commons.io.DataEncoderHelper" ]
import com.sleepycat.je.DatabaseEntry; import java.nio.ByteBuffer; import org.bboxdb.commons.io.DataEncoderHelper;
import com.sleepycat.je.*; import java.nio.*; import org.bboxdb.commons.io.*;
[ "com.sleepycat.je", "java.nio", "org.bboxdb.commons" ]
com.sleepycat.je; java.nio; org.bboxdb.commons;
1,866,739
public void disableJavascriptInterfacesInspection() { if (TRACE) Log.i(TAG, "%s disableJavascriptInterfacesInspection", this); if (!isDestroyed(WARN)) { getJavascriptInjector().setAllowInspection(false); } }
void function() { if (TRACE) Log.i(TAG, STR, this); if (!isDestroyed(WARN)) { getJavascriptInjector().setAllowInspection(false); } }
/** * Disables contents of JS-to-Java bridge objects to be inspectable using * Object.keys() method and "for .. in" loops. This is intended for applications * targeting earlier Android releases where this was not possible, and we want * to ensure backwards compatible behavior. */
Disables contents of JS-to-Java bridge objects to be inspectable using Object.keys() method and "for .. in" loops. This is intended for applications targeting earlier Android releases where this was not possible, and we want to ensure backwards compatible behavior
disableJavascriptInterfacesInspection
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/android_webview/java/src/org/chromium/android_webview/AwContents.java", "license": "bsd-3-clause", "size": 185177 }
[ "org.chromium.base.Log" ]
import org.chromium.base.Log;
import org.chromium.base.*;
[ "org.chromium.base" ]
org.chromium.base;
2,405,530
List<ArticleOutput> getOneThreadWeb(int threadId, String boardName) throws StorageBackendException;
List<ArticleOutput> getOneThreadWeb(int threadId, String boardName) throws StorageBackendException;
/** * Get one thread. ThreadService. * boardName used for article initialization only. * * If thread do not found * * @param threadId * @param boardName for article attachment string * @return * @throws StorageBackendException if no such thread */
Get one thread. ThreadService. boardName used for article initialization only. If thread do not found
getOneThreadWeb
{ "repo_name": "Anoncheg1/dibd", "path": "src/main/java/dibd/storage/web/StorageWeb.java", "license": "gpl-3.0", "size": 2983 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,011,444
void markFallbackFailure() { eventNotifier.markEvent(HystrixEventType.FALLBACK_FAILURE, key); counter.increment(HystrixRollingNumberEvent.FALLBACK_FAILURE); }
void markFallbackFailure() { eventNotifier.markEvent(HystrixEventType.FALLBACK_FAILURE, key); counter.increment(HystrixRollingNumberEvent.FALLBACK_FAILURE); }
/** * When a {@link HystrixCommand} attempts to retrieve a fallback but fails. */
When a <code>HystrixCommand</code> attempts to retrieve a fallback but fails
markFallbackFailure
{ "repo_name": "mauricionr/Hystrix", "path": "hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommandMetrics.java", "license": "apache-2.0", "size": 21525 }
[ "com.netflix.hystrix.util.HystrixRollingNumberEvent" ]
import com.netflix.hystrix.util.HystrixRollingNumberEvent;
import com.netflix.hystrix.util.*;
[ "com.netflix.hystrix" ]
com.netflix.hystrix;
1,840,463
interface WithHostHeader<ReturnT> { @Beta(SinceVersion.V1_4_0) WithAttach<ReturnT> withHostHeaderFromBackend();
interface WithHostHeader<ReturnT> { @Beta(SinceVersion.V1_4_0) WithAttach<ReturnT> withHostHeaderFromBackend();
/** * Specifies that the host header should come from the host name of the backend server. * @return the next stage of the definition */
Specifies that the host header should come from the host name of the backend server
withHostHeaderFromBackend
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHttpConfiguration.java", "license": "mit", "size": 35048 }
[ "com.microsoft.azure.management.apigeneration.Beta" ]
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
924,447
public static <T> byte[] toByteArray(T message, Schema<T> schema, boolean numeric) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { writeTo(baos, message, schema, numeric); } catch (IOException e) { throw new RuntimeE...
static <T> byte[] function(T message, Schema<T> schema, boolean numeric) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { writeTo(baos, message, schema, numeric); } catch (IOException e) { throw new RuntimeException(STR + STR, e); } return baos.toByteArray(); }
/** * Serializes the {@code message} into a byte array using the given {@code schema}. */
Serializes the message into a byte array using the given schema
toByteArray
{ "repo_name": "CodeBrig/Beam", "path": "src/io/protostuff/JsonIOUtil.java", "license": "mit", "size": 21920 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException" ]
import java.io.ByteArrayOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,351,351
@Test void testImportValueCatComboFail() throws IOException { enableDataSharing( user, dsA, AccessStringHelper.DATA_READ_WRITE ); enableDataSharing( user, categoryOptionA, AccessStringHelper.READ ); enableDataSharing( user, categoryOptionB, AccessStringHelper.READ ); ...
void testImportValueCatComboFail() throws IOException { enableDataSharing( user, dsA, AccessStringHelper.DATA_READ_WRITE ); enableDataSharing( user, categoryOptionA, AccessStringHelper.READ ); enableDataSharing( user, categoryOptionB, AccessStringHelper.READ ); in = new ClassPathResource( STR ).getInputStream(); Import...
/** * User has data write access for DataSet and data read access for * categoryOptions Expect fail * * @throws IOException */
User has data write access for DataSet and data read access for categoryOptions Expect fail
testImportValueCatComboFail
{ "repo_name": "msf-oca-his/dhis2-core", "path": "dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java", "license": "bsd-3-clause", "size": 55737 }
[ "java.io.IOException", "org.hisp.dhis.dxf2.importsummary.ImportStatus", "org.hisp.dhis.dxf2.importsummary.ImportSummary", "org.hisp.dhis.security.acl.AccessStringHelper", "org.junit.jupiter.api.Assertions", "org.springframework.core.io.ClassPathResource" ]
import java.io.IOException; import org.hisp.dhis.dxf2.importsummary.ImportStatus; import org.hisp.dhis.dxf2.importsummary.ImportSummary; import org.hisp.dhis.security.acl.AccessStringHelper; import org.junit.jupiter.api.Assertions; import org.springframework.core.io.ClassPathResource;
import java.io.*; import org.hisp.dhis.dxf2.importsummary.*; import org.hisp.dhis.security.acl.*; import org.junit.jupiter.api.*; import org.springframework.core.io.*;
[ "java.io", "org.hisp.dhis", "org.junit.jupiter", "org.springframework.core" ]
java.io; org.hisp.dhis; org.junit.jupiter; org.springframework.core;
538,014
public static Quaternion toVector4(Vector3 v1) { return toVector4(v1.x, v1.y, v1.z); }
static Quaternion function(Vector3 v1) { return toVector4(v1.x, v1.y, v1.z); }
/** * Fills a vector4 with values from a vector3 * * @param v1 * @return */
Fills a vector4 with values from a vector3
toVector4
{ "repo_name": "Kenoshen/Winger", "path": "src/main/java/com/winger/math/VectorMath.java", "license": "mit", "size": 7593 }
[ "com.badlogic.gdx.math.Quaternion", "com.badlogic.gdx.math.Vector3" ]
import com.badlogic.gdx.math.Quaternion; import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,829,199
protected void validateId(final Object elementOrId) { if (elementOrId == null || (elementOrId instanceof JsonNull)) { throw new IllegalArgumentException("Element or id cannot be null."); } else if (isStringType(elementOrId)) { String id = getStringValue(elementOrId); ...
void function(final Object elementOrId) { if (elementOrId == null (elementOrId instanceof JsonNull)) { throw new IllegalArgumentException(STR); } else if (isStringType(elementOrId)) { String id = getStringValue(elementOrId); if (!isValidStringId(id) isDefaultStringId(id)) { throw new IllegalArgumentException(STR); } } ...
/** * Validates the id value from an Object on Lookup/Update/Delete action * * @param elementOrId The Object to validate */
Validates the id value from an Object on Lookup/Update/Delete action
validateId
{ "repo_name": "daemun/azure-mobile-services", "path": "sdk/android/src/sdk/src/main/java/com/microsoft/windowsazure/mobileservices/table/MobileServiceTableBase.java", "license": "apache-2.0", "size": 34721 }
[ "com.google.gson.JsonNull", "com.google.gson.JsonObject" ]
import com.google.gson.JsonNull; import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,835,892
@Override public void putAll(Map<? extends K, ? extends V> m) { for (Map.Entry<? extends K, ? extends V> e : m.entrySet()) { put(e.getKey(), e.getValue()); } }
void function(Map<? extends K, ? extends V> m) { for (Map.Entry<? extends K, ? extends V> e : m.entrySet()) { put(e.getKey(), e.getValue()); } }
/** * Copies all of the mappings from the specified map to this one. * These mappings replace any mappings that this map had for any of the * keys currently in the specified map. * * @param m mappings to be stored in this map */
Copies all of the mappings from the specified map to this one. These mappings replace any mappings that this map had for any of the keys currently in the specified map
putAll
{ "repo_name": "nguyenhongson03/caffeine", "path": "caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/ConcurrentHashMapV7.java", "license": "apache-2.0", "size": 65944 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,589,662
public double cleanPriceFromCurves(final BondFixedSecurity bond, final IssuerProviderInterface issuerMulticurves) { final double dirtyPrice = dirtyPriceFromCurves(bond, issuerMulticurves); return cleanPriceFromDirtyPrice(bond, dirtyPrice); }
double function(final BondFixedSecurity bond, final IssuerProviderInterface issuerMulticurves) { final double dirtyPrice = dirtyPriceFromCurves(bond, issuerMulticurves); return cleanPriceFromDirtyPrice(bond, dirtyPrice); }
/** * Computes the clean price of a bond security from curves. * @param bond The bond security. * @param issuerMulticurves The issuer and multi-curves provider. * @return The clean price. */
Computes the clean price of a bond security from curves
cleanPriceFromCurves
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/bond/provider/BondSecurityDiscountingMethod.java", "license": "apache-2.0", "size": 42372 }
[ "com.opengamma.analytics.financial.interestrate.bond.definition.BondFixedSecurity", "com.opengamma.analytics.financial.provider.description.interestrate.IssuerProviderInterface" ]
import com.opengamma.analytics.financial.interestrate.bond.definition.BondFixedSecurity; import com.opengamma.analytics.financial.provider.description.interestrate.IssuerProviderInterface;
import com.opengamma.analytics.financial.interestrate.bond.definition.*; import com.opengamma.analytics.financial.provider.description.interestrate.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
1,408,411
final Map<String, Object> result = new HashMap<String, Object>(); final List<Action> children = getChildren(); final Map<String, Object> compositeContext = getCompositeContext(context); for (Action child : children) { ActionHandler childHandler = moduleHandlerMap.get(child); ...
final Map<String, Object> result = new HashMap<String, Object>(); final List<Action> children = getChildren(); final Map<String, Object> compositeContext = getCompositeContext(context); for (Action child : children) { ActionHandler childHandler = moduleHandlerMap.get(child); Map<String, Object> childContext = Collectio...
/** * The method calls handlers of child action, collect their outputs and sets the output of the parent action. * * @see org.eclipse.smarthome.automation.handler.ActionHandler#execute(java.util.Map) */
The method calls handlers of child action, collect their outputs and sets the output of the parent action
execute
{ "repo_name": "Snickermicker/smarthome", "path": "bundles/automation/org.eclipse.smarthome.automation.core/src/main/java/org/eclipse/smarthome/automation/core/internal/composite/CompositeActionHandler.java", "license": "epl-1.0", "size": 5735 }
[ "java.util.Collections", "java.util.HashMap", "java.util.List", "java.util.Map", "org.eclipse.smarthome.automation.Action", "org.eclipse.smarthome.automation.core.util.ReferenceResolver", "org.eclipse.smarthome.automation.handler.ActionHandler", "org.eclipse.smarthome.automation.type.CompositeActionTy...
import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.smarthome.automation.Action; import org.eclipse.smarthome.automation.core.util.ReferenceResolver; import org.eclipse.smarthome.automation.handler.ActionHandler; import org.eclipse.smarthome.automation...
import java.util.*; import org.eclipse.smarthome.automation.*; import org.eclipse.smarthome.automation.core.util.*; import org.eclipse.smarthome.automation.handler.*; import org.eclipse.smarthome.automation.type.*;
[ "java.util", "org.eclipse.smarthome" ]
java.util; org.eclipse.smarthome;
2,554,620
public static boolean isItemFuel(ItemStack par0ItemStack) { return getItemBurnTime(par0ItemStack) > 0; }
static boolean function(ItemStack par0ItemStack) { return getItemBurnTime(par0ItemStack) > 0; }
/** * Return true if item is a fuel source (getItemBurnTime() > 0). */
Return true if item is a fuel source (getItemBurnTime() > 0)
isItemFuel
{ "repo_name": "telinc1/Telicraft", "path": "telicraft_common/telinc/telicraft/tileentity/TileAdamantFurnace.java", "license": "gpl-3.0", "size": 17148 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
353,142
void setFlowService(FlowService flowService);
void setFlowService(FlowService flowService);
/** * Updates the Flow Service to use for obtaining the current flow * * @param flowService the flow service to use for obtaining the current flow */
Updates the Flow Service to use for obtaining the current flow
setFlowService
{ "repo_name": "Wesley-Lawrence/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/coordination/ClusterCoordinator.java", "license": "apache-2.0", "size": 10008 }
[ "org.apache.nifi.services.FlowService" ]
import org.apache.nifi.services.FlowService;
import org.apache.nifi.services.*;
[ "org.apache.nifi" ]
org.apache.nifi;
41,155
@Api(2.0) @ErrorStatus public int errorStatus(){ return mBuilder.mErrorStatus; }
@Api(2.0) int function(){ return mBuilder.mErrorStatus; }
/** * Provides the error status. * @return The error status. */
Provides the error status
errorStatus
{ "repo_name": "mobgen/halo-android", "path": "sdk/halo-framework/src/main/java/com/mobgen/halo/android/framework/toolbox/data/HaloStatus.java", "license": "apache-2.0", "size": 20098 }
[ "com.mobgen.halo.android.framework.common.annotations.Api" ]
import com.mobgen.halo.android.framework.common.annotations.Api;
import com.mobgen.halo.android.framework.common.annotations.*;
[ "com.mobgen.halo" ]
com.mobgen.halo;
488,094
private void validate(Block block, int rowOffset, QueryContext queryContext, DbTransaction xa) throws SQLException { TableIterator row = createTableIterator(); TableIterator []rows = new TableIterator[] { row }; row.setRow(block, rowOffset); for (int i = 0; i < _constra...
void function(Block block, int rowOffset, QueryContext queryContext, DbTransaction xa) throws SQLException { TableIterator row = createTableIterator(); TableIterator []rows = new TableIterator[] { row }; row.setRow(block, rowOffset); for (int i = 0; i < _constraints.length; i++) { _constraints[i].validate(rows, queryCo...
/** * Validates the given row. */
Validates the given row
validate
{ "repo_name": "bertrama/resin", "path": "modules/resin/src/com/caucho/db/table/Table.java", "license": "gpl-2.0", "size": 29420 }
[ "com.caucho.db.block.Block", "com.caucho.db.sql.QueryContext", "com.caucho.db.xa.DbTransaction", "java.sql.SQLException" ]
import com.caucho.db.block.Block; import com.caucho.db.sql.QueryContext; import com.caucho.db.xa.DbTransaction; import java.sql.SQLException;
import com.caucho.db.block.*; import com.caucho.db.sql.*; import com.caucho.db.xa.*; import java.sql.*;
[ "com.caucho.db", "java.sql" ]
com.caucho.db; java.sql;
1,185,223
public static Test suite() { return new TestSuite(SpreadSheetAggregateTest.class); }
static Test function() { return new TestSuite(SpreadSheetAggregateTest.class); }
/** * * Returns a test suite. * * @return the test suite */
Returns a test suite
suite
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-spreadsheet/src/test/java/adams/flow/transformer/SpreadSheetAggregateTest.java", "license": "gpl-3.0", "size": 6894 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
2,351,584
public MachinesClient getMachines() { return this.machines; } private final MachineExtensionsClient machineExtensions;
MachinesClient function() { return this.machines; } private final MachineExtensionsClient machineExtensions;
/** * Gets the MachinesClient object to access its operations. * * @return the MachinesClient object. */
Gets the MachinesClient object to access its operations
getMachines
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java", "license": "mit", "size": 12998 }
[ "com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient", "com.azure.resourcemanager.hybridcompute.fluent.MachinesClient" ]
import com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient; import com.azure.resourcemanager.hybridcompute.fluent.MachinesClient;
import com.azure.resourcemanager.hybridcompute.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,138,386
ProjectData projectData = projectCache.get(project).orElseThrow(illegalState(project)).toProjectData(); ProjectIndex i = indexes.getSearchIndex(); if (i == null) { return StalenessCheckResult .notStale(); // No index; caller couldn't do anything if it is stale. } Optional<FieldB...
ProjectData projectData = projectCache.get(project).orElseThrow(illegalState(project)).toProjectData(); ProjectIndex i = indexes.getSearchIndex(); if (i == null) { return StalenessCheckResult .notStale(); } Optional<FieldBundle> result = i.getRaw(project, QueryOptions.create(indexConfig, 0, 1, FIELDS)); if (!result.isP...
/** * Returns a {@link StalenessCheckResult} with structured information about staleness of the * provided {@link com.google.gerrit.entities.Project.NameKey}. */
Returns a <code>StalenessCheckResult</code> with structured information about staleness of the provided <code>com.google.gerrit.entities.Project.NameKey</code>
check
{ "repo_name": "GerritCodeReview/gerrit", "path": "java/com/google/gerrit/server/index/project/StalenessChecker.java", "license": "apache-2.0", "size": 3829 }
[ "com.google.common.collect.MultimapBuilder", "com.google.common.collect.SetMultimap", "com.google.gerrit.entities.Project", "com.google.gerrit.entities.RefNames", "com.google.gerrit.index.QueryOptions", "com.google.gerrit.index.RefState", "com.google.gerrit.index.project.ProjectData", "com.google.gerr...
import com.google.common.collect.MultimapBuilder; import com.google.common.collect.SetMultimap; import com.google.gerrit.entities.Project; import com.google.gerrit.entities.RefNames; import com.google.gerrit.index.QueryOptions; import com.google.gerrit.index.RefState; import com.google.gerrit.index.project.ProjectData;...
import com.google.common.collect.*; import com.google.gerrit.entities.*; import com.google.gerrit.index.*; import com.google.gerrit.index.project.*; import com.google.gerrit.index.query.*; import com.google.gerrit.server.index.*; import java.util.*;
[ "com.google.common", "com.google.gerrit", "java.util" ]
com.google.common; com.google.gerrit; java.util;
37,800
private static void ensureDirectory(File dir) throws IOException { if (!dir.mkdirs() && !dir.isDirectory()) { throw new IOException("Mkdirs failed to create " + dir.toString()); } }
static void function(File dir) throws IOException { if (!dir.mkdirs() && !dir.isDirectory()) { throw new IOException(STR + dir.toString()); } }
/** * Ensure the existence of a given directory. * * @throws IOException if it cannot be created and does not already exist */
Ensure the existence of a given directory
ensureDirectory
{ "repo_name": "raviperi/storm", "path": "storm-server/src/main/java/org/apache/storm/utils/ServerUtils.java", "license": "apache-2.0", "size": 29345 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,452,064
protected boolean[] getPropertyUpdateability(Object entity, EntityMode entityMode) { return hasUninitializedLazyProperties( entity, entityMode ) ? getNonLazyPropertyUpdateability() : getPropertyUpdateability(); }
boolean[] function(Object entity, EntityMode entityMode) { return hasUninitializedLazyProperties( entity, entityMode ) ? getNonLazyPropertyUpdateability() : getPropertyUpdateability(); }
/** * Which properties appear in the SQL update? * (Initialized, updateable ones!) */
Which properties appear in the SQL update? (Initialized, updateable ones!)
getPropertyUpdateability
{ "repo_name": "raedle/univis", "path": "lib/hibernate-3.1.3/src/org/hibernate/persister/entity/AbstractEntityPersister.java", "license": "lgpl-2.1", "size": 116750 }
[ "org.hibernate.EntityMode" ]
import org.hibernate.EntityMode;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
1,542,811
Calendar read(File importFile) throws CalendarIOException;
Calendar read(File importFile) throws CalendarIOException;
/** * Read a calendar from a file. * @param importFile the file to import * @return a calendar which is parsed from the file. * @throws CalendarIOException when there is a problem reading the calendar or invalid data is passed. */
Read a calendar from a file
read
{ "repo_name": "MartijnTheunissen/PLNR", "path": "src/psopv/taskplanner/io/CalendarReader.java", "license": "gpl-2.0", "size": 632 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
313,209
public void addStats( DataStatistics<SimpleFeature> stats, EntryVisibilityHandler<SimpleFeature> visibilityHandler ) { int replaceStat = 0; for (DataStatistics<SimpleFeature> currentStat : statsList) { if (currentStat.getStatisticsId().equals( stats.getStatisticsId())) { break; } replaceS...
void function( DataStatistics<SimpleFeature> stats, EntryVisibilityHandler<SimpleFeature> visibilityHandler ) { int replaceStat = 0; for (DataStatistics<SimpleFeature> currentStat : statsList) { if (currentStat.getStatisticsId().equals( stats.getStatisticsId())) { break; } replaceStat++; } if (replaceStat < statsList.s...
/** * Supports replacement. * * @param stats * @param visibilityHandler */
Supports replacement
addStats
{ "repo_name": "dcy2003/geowave", "path": "extensions/adapters/vector/src/main/java/mil/nga/giat/geowave/adapter/vector/stats/StatsManager.java", "license": "apache-2.0", "size": 6874 }
[ "mil.nga.giat.geowave.core.store.EntryVisibilityHandler", "mil.nga.giat.geowave.core.store.adapter.statistics.DataStatistics", "org.opengis.feature.simple.SimpleFeature" ]
import mil.nga.giat.geowave.core.store.EntryVisibilityHandler; import mil.nga.giat.geowave.core.store.adapter.statistics.DataStatistics; import org.opengis.feature.simple.SimpleFeature;
import mil.nga.giat.geowave.core.store.*; import mil.nga.giat.geowave.core.store.adapter.statistics.*; import org.opengis.feature.simple.*;
[ "mil.nga.giat", "org.opengis.feature" ]
mil.nga.giat; org.opengis.feature;
2,553,935
protected List<String> getMappedKeys(String[] partitionKeys) { List<String> mappedKeys = new ArrayList<String>(partitionKeys.length); for (int i = 0; i < partitionKeys.length; i++) { mappedKeys.add(colNameMap.get(partitionKeys[i])); } return mapped...
List<String> function(String[] partitionKeys) { List<String> mappedKeys = new ArrayList<String>(partitionKeys.length); for (int i = 0; i < partitionKeys.length; i++) { mappedKeys.add(colNameMap.get(partitionKeys[i])); } return mappedKeys; }
/** * The partition keys in the argument are as reported by * {@link LoadMetadata#getPartitionKeys(String, org.apache.hadoop.conf.Configuration)}. * The user may have renamed these by providing a schema with different names * in the load statement - this method will replace the form...
The partition keys in the argument are as reported by <code>LoadMetadata#getPartitionKeys(String, org.apache.hadoop.conf.Configuration)</code>. The user may have renamed these by providing a schema with different names in the load statement - this method will replace the former names with the latter names
getMappedKeys
{ "repo_name": "piaozhexiu/apache-pig", "path": "src/org/apache/pig/newplan/logical/rules/PartitionFilterOptimizer.java", "license": "apache-2.0", "size": 8466 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,199,804
public Set<String> getAuthorities() { return authorities; }
Set<String> function() { return authorities; }
/** * The users authorities. * * @return */
The users authorities
getAuthorities
{ "repo_name": "rdblue/incubator-nifi", "path": "nar-bundles/framework-bundle/framework/client-dto/src/main/java/org/apache/nifi/web/api/dto/UserGroupDTO.java", "license": "apache-2.0", "size": 2021 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,061,889
public AppdefResourceValue getResource() { return this.resource; }
AppdefResourceValue function() { return this.resource; }
/** Getter for property resource. * @return Value of property resource. * */
Getter for property resource
getResource
{ "repo_name": "cc14514/hq6", "path": "hq-web/src/main/java/org/hyperic/hq/ui/beans/DashboardControlBean.java", "license": "unlicense", "size": 2544 }
[ "org.hyperic.hq.appdef.shared.AppdefResourceValue" ]
import org.hyperic.hq.appdef.shared.AppdefResourceValue;
import org.hyperic.hq.appdef.shared.*;
[ "org.hyperic.hq" ]
org.hyperic.hq;
2,017,433
public static RealVector meanVector(RealMatrix A){ RealVector mean = new ArrayRealVector(new double[3]); for(int i = 0; i < 3; i ++){ for(int j = 0; j < A.getColumn(0).length; j++) mean.addToEntry(i, A.getEntry(j, i)); mean.setEntry(i, mean.getEntry(i) / A.getColumn(0).length); } return mean; }
static RealVector function(RealMatrix A){ RealVector mean = new ArrayRealVector(new double[3]); for(int i = 0; i < 3; i ++){ for(int j = 0; j < A.getColumn(0).length; j++) mean.addToEntry(i, A.getEntry(j, i)); mean.setEntry(i, mean.getEntry(i) / A.getColumn(0).length); } return mean; }
/** * For an n X 3 coordinate matrix, calculate the 1 X 3 mean vector * @param A - coordinate matrix * @return mean vector */
For an n X 3 coordinate matrix, calculate the 1 X 3 mean vector
meanVector
{ "repo_name": "statalign/statalign", "path": "src/statalign/model/ext/plugins/structalign/Funcs.java", "license": "gpl-3.0", "size": 7190 }
[ "org.apache.commons.math3.linear.ArrayRealVector", "org.apache.commons.math3.linear.RealMatrix", "org.apache.commons.math3.linear.RealVector" ]
import org.apache.commons.math3.linear.ArrayRealVector; import org.apache.commons.math3.linear.RealMatrix; import org.apache.commons.math3.linear.RealVector;
import org.apache.commons.math3.linear.*;
[ "org.apache.commons" ]
org.apache.commons;
1,748,393
Collection<Endpoint> removeEndpoints(String pattern) throws Exception;
Collection<Endpoint> removeEndpoints(String pattern) throws Exception;
/** * Removes all endpoints with the given URI from the {@link org.apache.camel.spi.EndpointRegistry}. * <p/> * The endpoints being removed will be stopped first. * * @param pattern an uri or pattern to match * @return a collection of endpoints removed which could be empty if there are no ...
Removes all endpoints with the given URI from the <code>org.apache.camel.spi.EndpointRegistry</code>. The endpoints being removed will be stopped first
removeEndpoints
{ "repo_name": "borcsokj/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 68766 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,456,432
public static boolean hasPythonShebang(Reader inputStreamReader) throws IllegalCharsetNameException { try { List<String> lines = readLines(inputStreamReader, 1); if (lines.size() > 0) { if (isPythonShebangLine(lines.get(0))) { return true; ...
static boolean function(Reader inputStreamReader) throws IllegalCharsetNameException { try { List<String> lines = readLines(inputStreamReader, 1); if (lines.size() > 0) { if (isPythonShebangLine(lines.get(0))) { return true; } } } finally { try { inputStreamReader.close(); } catch (IOException e1) { } } return false; }
/** * Returns if the given file has a python shebang (i.e.: starts with #!... python) * * Will close the reader. */
Returns if the given file has a python shebang (i.e.: starts with #!... python) Will close the reader
hasPythonShebang
{ "repo_name": "aptana/Pydev", "path": "bundles/org.python.pydev.shared_core/src/org/python/pydev/shared_core/io/FileUtils.java", "license": "epl-1.0", "size": 29455 }
[ "java.io.IOException", "java.io.Reader", "java.nio.charset.IllegalCharsetNameException", "java.util.List" ]
import java.io.IOException; import java.io.Reader; import java.nio.charset.IllegalCharsetNameException; import java.util.List;
import java.io.*; import java.nio.charset.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
823,958
@Override public void setNextProcessor(Processor processor) { nextProcessor = processor; }
void function(Processor processor) { nextProcessor = processor; }
/** * Set next processor element in processor chain * * @param processor Processor to be set as next element of processor chain */
Set next processor element in processor chain
setNextProcessor
{ "repo_name": "nirmal070125/siddhi", "path": "modules/siddhi-core/src/main/java/org/wso2/siddhi/core/query/input/stream/join/JoinProcessor.java", "license": "apache-2.0", "size": 8292 }
[ "org.wso2.siddhi.core.query.processor.Processor" ]
import org.wso2.siddhi.core.query.processor.Processor;
import org.wso2.siddhi.core.query.processor.*;
[ "org.wso2.siddhi" ]
org.wso2.siddhi;
800,693
return new Properties(); }
return new Properties(); }
/** * Creates a new instance of {@link Properties}. * @return the new instance */
Creates a new instance of <code>Properties</code>
createProperties
{ "repo_name": "nagyistoce/Wilma", "path": "wilma-application/modules/wilma-engine/src/main/java/com/epam/wilma/engine/properties/helper/PropertiesFactory.java", "license": "gpl-3.0", "size": 1265 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
190,520
try { HibernateHelper.initializeHibernate(); for (int i = 0; i < 1; i++) { //new Thread(new PopulationTask(30,30,10,5, 100)).start(); new Thread(new PopulationTask(0, 0, 0, 0, 100)).start(); } } catch (Exception e) { log.error("erro...
try { HibernateHelper.initializeHibernate(); for (int i = 0; i < 1; i++) { new Thread(new PopulationTask(0, 0, 0, 0, 100)).start(); } } catch (Exception e) { log.error("error", e); } } private static class PopulationTask implements Runnable { private final Logger log = Logger.getLogger(getClass()); private int projectC...
/** The main method. * * @param args * the arguments */
The main method
main
{ "repo_name": "alarulrajan/CodeFest", "path": "test/com/technoetic/xplanner/acceptance/LargeDatabasePopulator.java", "license": "gpl-2.0", "size": 10317 }
[ "com.technoetic.xplanner.db.hibernate.HibernateHelper", "net.sf.xplanner.domain.Iteration", "org.apache.log4j.Logger", "org.hibernate.classic.Session" ]
import com.technoetic.xplanner.db.hibernate.HibernateHelper; import net.sf.xplanner.domain.Iteration; import org.apache.log4j.Logger; import org.hibernate.classic.Session;
import com.technoetic.xplanner.db.hibernate.*; import net.sf.xplanner.domain.*; import org.apache.log4j.*; import org.hibernate.classic.*;
[ "com.technoetic.xplanner", "net.sf.xplanner", "org.apache.log4j", "org.hibernate.classic" ]
com.technoetic.xplanner; net.sf.xplanner; org.apache.log4j; org.hibernate.classic;
1,216,004
public static String trim(final String input, final String delims){ StringTokenizer tokens = new StringTokenizer(input,delims); return tokens.hasMoreTokens() ? tokens.nextToken() : ""; }
static String function(final String input, final String delims){ StringTokenizer tokens = new StringTokenizer(input,delims); return tokens.hasMoreTokens() ? tokens.nextToken() : ""; }
/** * Trim a string by the tokens provided. * * @param input string to trim * @param delims list of delimiters * @return input trimmed at the first delimiter */
Trim a string by the tokens provided
trim
{ "repo_name": "ThiagoGarciaAlves/jmeter", "path": "src/jorphan/org/apache/jorphan/util/JOrphanUtils.java", "license": "apache-2.0", "size": 18905 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
1,415,669
protected void addPanel__configurationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_House_panel__configuration_feature"), getString("_UI_P...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getHouse_Panel__configuration(), true, false, false, ItemPropertyDescrip...
/** * This adds a property descriptor for the Panel configuration feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Panel configuration feature.
addPanel__configurationPropertyDescriptor
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/HouseItemProvider.java", "license": "gpl-3.0", "size": 120584 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,019,352
public Bitmap getEventBitmap() { if (eventPicture != null) { byte[] decodedByteArray = Base64.decode(eventPicture, Base64.URL_SAFE | Base64.NO_WRAP); return BitmapFactory.decodeByteArray(decodedByteArray, 0, decodedByteArray.length); } return null; }
Bitmap function() { if (eventPicture != null) { byte[] decodedByteArray = Base64.decode(eventPicture, Base64.URL_SAFE Base64.NO_WRAP); return BitmapFactory.decodeByteArray(decodedByteArray, 0, decodedByteArray.length); } return null; }
/** * Gets the associated event bitmap */
Gets the associated event bitmap
getEventBitmap
{ "repo_name": "CMPUT301F17T05/Habilect", "path": "app/src/main/java/com/cmput301/t05/habilect/HabitEvent.java", "license": "mit", "size": 5240 }
[ "android.graphics.Bitmap", "android.graphics.BitmapFactory", "android.util.Base64" ]
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.util.Base64;
import android.graphics.*; import android.util.*;
[ "android.graphics", "android.util" ]
android.graphics; android.util;
1,469,848
@Override public String toString() { return name().toLowerCase(); } } private final Role requesterRole; public Clazz( final String id, final String name, final String description, final Role requesterRole) throws DomainException { if(StringUtils.isEmptyOrWhitespaceOnly(id)) { ...
String function() { return name().toLowerCase(); } } private final Role requesterRole; public Clazz( final String id, final String name, final String description, final Role requesterRole) throws DomainException { if(StringUtils.isEmptyOrWhitespaceOnly(id)) { throw new DomainException( ErrorCode.CLASS_INVALID_ID, STR);...
/** * Converts the role to a nice, human-readable format. */
Converts the role to a nice, human-readable format
toString
{ "repo_name": "HaiJiaoXinHeng/server-1", "path": "src/org/ohmage/domain/Clazz.java", "license": "apache-2.0", "size": 6279 }
[ "org.json.JSONException", "org.json.JSONObject", "org.ohmage.annotator.Annotator", "org.ohmage.exception.DomainException", "org.ohmage.util.StringUtils" ]
import org.json.JSONException; import org.json.JSONObject; import org.ohmage.annotator.Annotator; import org.ohmage.exception.DomainException; import org.ohmage.util.StringUtils;
import org.json.*; import org.ohmage.annotator.*; import org.ohmage.exception.*; import org.ohmage.util.*;
[ "org.json", "org.ohmage.annotator", "org.ohmage.exception", "org.ohmage.util" ]
org.json; org.ohmage.annotator; org.ohmage.exception; org.ohmage.util;
1,630,557
String type = status.getType(); if (!type.equals(DeviceType.SERVER)) { Entry<String, List<String>> objectInfo = status.getDevices().entrySet().iterator().next(); String instance = connection.getInstance(); String location = objectInfo.getKey(); String device = objectInfo.getValue().get(0); Lis...
String type = status.getType(); if (!type.equals(DeviceType.SERVER)) { Entry<String, List<String>> objectInfo = status.getDevices().entrySet().iterator().next(); String instance = connection.getInstance(); String location = objectInfo.getKey(); String device = objectInfo.getValue().get(0); List<PilightBindingConfig> co...
/** * Processes a status update received from pilight and changes the state of the * corresponding openHAB item (if item config is found) * * @param connection pilight connection * @param status The new Status */
Processes a status update received from pilight and changes the state of the corresponding openHAB item (if item config is found)
processStatus
{ "repo_name": "ShanksSGV/openhab", "path": "bundles/binding/org.openhab.binding.pilight/src/main/java/org/openhab/binding/pilight/internal/PilightBinding.java", "license": "epl-1.0", "size": 15626 }
[ "java.util.List", "java.util.Map", "org.openhab.binding.pilight.internal.communication.DeviceType" ]
import java.util.List; import java.util.Map; import org.openhab.binding.pilight.internal.communication.DeviceType;
import java.util.*; import org.openhab.binding.pilight.internal.communication.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
41,101
Preconditions.checkState(this.newName == null); this.newName = newName; } } private final SortedMap<String, Assignment> assignments = new TreeMap<String, Assignment>(); private final boolean localRenamingOnly; private boolean preserveFunctionExpressionNames; private final char[...
Preconditions.checkState(this.newName == null); this.newName = newName; } } private final SortedMap<String, Assignment> assignments = new TreeMap<String, Assignment>(); private final boolean localRenamingOnly; private boolean preserveFunctionExpressionNames; private final char[] reservedCharacters; private static final...
/** * Assigns the new name. */
Assigns the new name
setNewName
{ "repo_name": "antz29/closure-compiler", "path": "src/com/google/javascript/jscomp/RenameVars.java", "license": "apache-2.0", "size": 15699 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Maps", "com.google.common.collect.Sets", "com.google.javascript.jscomp.NodeTraversal", "java.util.Set", "java.util.SortedMap", "java.util.TreeMap", "javax.annotation.Nullable" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.javascript.jscomp.NodeTraversal; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import javax.annotation.Nullable;
import com.google.common.base.*; import com.google.common.collect.*; import com.google.javascript.jscomp.*; import java.util.*; import javax.annotation.*;
[ "com.google.common", "com.google.javascript", "java.util", "javax.annotation" ]
com.google.common; com.google.javascript; java.util; javax.annotation;
294,149
byte[] getOrCreateId(String name) throws HBaseException, IllegalStateException;
byte[] getOrCreateId(String name) throws HBaseException, IllegalStateException;
/** * Finds the ID associated with a given name or creates it. * <p> * The length of the byte array is fixed in advance by the implementation. * * @param name The name to lookup in the table or to assign an ID to. * @throws HBaseException if there is a problem communicating with HBase. * @throws Il...
Finds the ID associated with a given name or creates it. The length of the byte array is fixed in advance by the implementation
getOrCreateId
{ "repo_name": "marcuswestin/opentsdb", "path": "src/uid/UniqueIdInterface.java", "license": "gpl-3.0", "size": 3378 }
[ "org.hbase.async.HBaseException" ]
import org.hbase.async.HBaseException;
import org.hbase.async.*;
[ "org.hbase.async" ]
org.hbase.async;
2,014,954
public void setHeight(Integer height) { if (height != null) { Validate.isTrue(height >= 0, "height must be >= 0"); } this.height = height; }
void function(Integer height) { if (height != null) { Validate.isTrue(height >= 0, STR); } this.height = height; }
/** * Sets the page height. * @see net.sf.dynamicreports.report.builder.Units * * @param height the page height >= 0 * @exception IllegalArgumentException if <code>height</code> is < 0 */
Sets the page height
setHeight
{ "repo_name": "svn2github/dynamicreports-jasper", "path": "dynamicreports-core/src/main/java/net/sf/dynamicreports/report/base/DRPage.java", "license": "lgpl-3.0", "size": 4466 }
[ "org.apache.commons.lang3.Validate" ]
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
2,586,667
public static Room createSWRoom(BlockPos offset, BlockPos size, BuildMaterial material) { return new Room(RoomType.SW, offset, size, material); }
static Room function(BlockPos offset, BlockPos size, BuildMaterial material) { return new Room(RoomType.SW, offset, size, material); }
/** * Room #3 (SW) factory method. * * @param offset * room offset * * @param size * room size * * @param material * room material. * */
Room #3 (SW) factory method
createSWRoom
{ "repo_name": "athrane/bassebombecraft", "path": "src/main/java/bassebombecraft/item/action/build/tower/Room.java", "license": "gpl-3.0", "size": 4933 }
[ "net.minecraft.util.math.BlockPos" ]
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
2,160,143
private void writeResponse(final HttpServletResponse response, final String data) throws IOException { final byte[] outputBody = data.getBytes(StandardCharsets.UTF_8); response.getOutputStream().write(outputBody); }
void function(final HttpServletResponse response, final String data) throws IOException { final byte[] outputBody = data.getBytes(StandardCharsets.UTF_8); response.getOutputStream().write(outputBody); }
/** * Write a String to HTTP Response. */
Write a String to HTTP Response
writeResponse
{ "repo_name": "dkm2110/Microsoft-cisl", "path": "lang/java/reef-webserver/src/main/java/org/apache/reef/webserver/HttpServerReefEventHandler.java", "license": "apache-2.0", "size": 15739 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.nio.charset.StandardCharsets; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.nio.charset.*; import javax.servlet.http.*;
[ "java.io", "java.nio", "javax.servlet" ]
java.io; java.nio; javax.servlet;
2,495,807
public List<FeedbackResponseAttributes> getFeedbackResponsesFromStudentOrTeamForQuestion( FeedbackQuestionAttributes question, StudentAttributes student) { if (question.giverType == FeedbackParticipantType.TEAMS) { return getFeedbackResponsesFromTeamForQuestion( q...
List<FeedbackResponseAttributes> function( FeedbackQuestionAttributes question, StudentAttributes student) { if (question.giverType == FeedbackParticipantType.TEAMS) { return getFeedbackResponsesFromTeamForQuestion( question.getId(), question.courseId, student.team); } return frDb.getFeedbackResponsesFromGiverForQuesti...
/** * Get existing feedback responses from student or his team for the given * question. */
Get existing feedback responses from student or his team for the given question
getFeedbackResponsesFromStudentOrTeamForQuestion
{ "repo_name": "GriffinHines/teammates", "path": "src/main/java/teammates/logic/core/FeedbackResponsesLogic.java", "license": "gpl-2.0", "size": 37667 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
64,691
public void testAppendParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); createFile(igfs, file, true, BLOCK_SIZE, chunk); appendFile(igfs, file, chunk); checkFile(igfs, igfsSecondary, file, chunk, chunk); }
void function() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); createFile(igfs, file, true, BLOCK_SIZE, chunk); appendFile(igfs, file, chunk); checkFile(igfs, igfsSecondary, file, chunk, chunk); }
/** * Test create when parent is the root. * * @throws Exception If failed. */
Test create when parent is the root
testAppendParentRoot
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java", "license": "apache-2.0", "size": 103094 }
[ "org.apache.ignite.igfs.IgfsPath" ]
import org.apache.ignite.igfs.IgfsPath;
import org.apache.ignite.igfs.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,594,116
private void reopenRegion() throws Exception { // We reopen. We need a ZK node here, as a open is always triggered by a master. ZKAssign.createNodeOffline(HTU.getZooKeeperWatcher(), hri, getRS().getServerName()); // first version is '0' AdminProtos.OpenRegionRequest orr = RequestConverter.buildOpenReg...
void function() throws Exception { ZKAssign.createNodeOffline(HTU.getZooKeeperWatcher(), hri, getRS().getServerName()); AdminProtos.OpenRegionRequest orr = RequestConverter.buildOpenRegionRequest(hri, 0); AdminProtos.OpenRegionResponse responseOpen = getRS().openRegion(null, orr); Assert.assertTrue(responseOpen.getOpen...
/** * Reopen the region. Reused in multiple tests as we always leave the region open after a test. */
Reopen the region. Reused in multiple tests as we always leave the region open after a test
reopenRegion
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionServerNoMaster.java", "license": "apache-2.0", "size": 12896 }
[ "junit.framework.Assert", "org.apache.hadoop.hbase.protobuf.RequestConverter", "org.apache.hadoop.hbase.protobuf.generated.AdminProtos", "org.apache.hadoop.hbase.zookeeper.ZKAssign" ]
import junit.framework.Assert; import org.apache.hadoop.hbase.protobuf.RequestConverter; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos; import org.apache.hadoop.hbase.zookeeper.ZKAssign;
import junit.framework.*; import org.apache.hadoop.hbase.protobuf.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.zookeeper.*;
[ "junit.framework", "org.apache.hadoop" ]
junit.framework; org.apache.hadoop;
494,181
@Test public void testFileBasedBuilderWithFile() { Configurations configs = new Configurations(); File file = ConfigurationAssert.getTestFile(TEST_PROPERTIES); FileBasedConfigurationBuilder<PropertiesConfiguration> builder = configs.fileBasedBuilder(PropertiesConfigur...
void function() { Configurations configs = new Configurations(); File file = ConfigurationAssert.getTestFile(TEST_PROPERTIES); FileBasedConfigurationBuilder<PropertiesConfiguration> builder = configs.fileBasedBuilder(PropertiesConfiguration.class, file); assertEquals(STR, file.toURI(), builder.getFileHandler() .getFile...
/** * Tests whether a builder for a file-based configuration can be created if * an input File is specified. */
Tests whether a builder for a file-based configuration can be created if an input File is specified
testFileBasedBuilderWithFile
{ "repo_name": "mohanaraosv/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/builder/fluent/TestConfigurations.java", "license": "apache-2.0", "size": 17894 }
[ "java.io.File", "org.apache.commons.configuration2.ConfigurationAssert", "org.apache.commons.configuration2.PropertiesConfiguration", "org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder", "org.junit.Assert" ]
import java.io.File; import org.apache.commons.configuration2.ConfigurationAssert; import org.apache.commons.configuration2.PropertiesConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.junit.Assert;
import java.io.*; import org.apache.commons.configuration2.*; import org.apache.commons.configuration2.builder.*; import org.junit.*;
[ "java.io", "org.apache.commons", "org.junit" ]
java.io; org.apache.commons; org.junit;
2,266,338
public boolean getBooleanStorageAttributeValueByName(String attributeName, StorageEntity storageEntity, boolean attributeRequired, boolean attributeValueRequiredIfExists) throws IllegalStateException { // Get the boolean string value. // The required flag is being passed so an exception ...
boolean function(String attributeName, StorageEntity storageEntity, boolean attributeRequired, boolean attributeValueRequiredIfExists) throws IllegalStateException { String booleanStringValue = getStorageAttributeValueByName(attributeName, storageEntity, attributeRequired, attributeValueRequiredIfExists); if (StringUti...
/** * Gets attribute value by name from the storage entity and returns it as a boolean. Most types of boolean strings are supported (e.g. true/false, on/off, * yes/no, etc.). * * @param attributeName the attribute name (case insensitive) * @param storageEntity the storage entity * @param a...
Gets attribute value by name from the storage entity and returns it as a boolean. Most types of boolean strings are supported (e.g. true/false, on/off, yes/no, etc.)
getBooleanStorageAttributeValueByName
{ "repo_name": "FINRAOS/herd", "path": "herd-code/herd-service/src/main/java/org/finra/herd/service/helper/StorageHelper.java", "license": "apache-2.0", "size": 17059 }
[ "org.apache.commons.lang3.StringUtils", "org.finra.herd.model.jpa.StorageEntity", "org.springframework.beans.propertyeditors.CustomBooleanEditor" ]
import org.apache.commons.lang3.StringUtils; import org.finra.herd.model.jpa.StorageEntity; import org.springframework.beans.propertyeditors.CustomBooleanEditor;
import org.apache.commons.lang3.*; import org.finra.herd.model.jpa.*; import org.springframework.beans.propertyeditors.*;
[ "org.apache.commons", "org.finra.herd", "org.springframework.beans" ]
org.apache.commons; org.finra.herd; org.springframework.beans;
1,974,143