method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void testInClassFileWithoutSource() throws JavaModelException {
IClassFile cu = getClassFile("Resolve", "p4.jar", "p4", "X.class");
String selection = "Object";
int start = 34;
int length = selection.length();
IJavaElement[] elements = cu.codeSelect(start, length);
assertElementsEqual(
"Unexpected elemen... | void function() throws JavaModelException { IClassFile cu = getClassFile(STR, STR, "p4", STR); String selection = STR; int start = 34; int length = selection.length(); IJavaElement[] elements = cu.codeSelect(start, length); assertElementsEqual( STR, "", elements ); } | /**
* Tests code resolve on a class file without attached source.
*/ | Tests code resolve on a class file without attached source | testInClassFileWithoutSource | {
"repo_name": "maxeler/eclipse",
"path": "eclipse.jdt.core/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests.java",
"license": "epl-1.0",
"size": 92379
} | [
"org.eclipse.jdt.core.IClassFile",
"org.eclipse.jdt.core.IJavaElement",
"org.eclipse.jdt.core.JavaModelException"
] | import org.eclipse.jdt.core.IClassFile; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.JavaModelException; | import org.eclipse.jdt.core.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 738,056 |
private JLabel getLblPass4() {
if (lblPass4 == null) {
lblPass4 = new JLabel("Password: ");
lblPass4.setFont(new Font("Tahoma", Font.PLAIN, 13));
}
return lblPass4;
} | JLabel function() { if (lblPass4 == null) { lblPass4 = new JLabel(STR); lblPass4.setFont(new Font(STR, Font.PLAIN, 13)); } return lblPass4; } | /**
* Devuelve el valor de lblPass4
*
* @return lblPass4
*/ | Devuelve el valor de lblPass4 | getLblPass4 | {
"repo_name": "Arquisoft/Trivial5a",
"path": "game/src/main/java/es/uniovi/asw/gui/ConfigurarPartida.java",
"license": "gpl-2.0",
"size": 26710
} | [
"java.awt.Font",
"javax.swing.JLabel"
] | import java.awt.Font; import javax.swing.JLabel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,310,846 |
public void testCycleDateStartTimerEvent() throws Exception {
Clock previousClock = processEngineConfiguration.getClock();
Clock testClock = new DefaultClockImpl();
processEngineConfiguration.setClock(testClock);
Calendar calendar = Calendar.getInstance();
calendar.set(2025, Calendar.DECEMBER, ... | void function() throws Exception { Clock previousClock = processEngineConfiguration.getClock(); Clock testClock = new DefaultClockImpl(); processEngineConfiguration.setClock(testClock); Calendar calendar = Calendar.getInstance(); calendar.set(2025, Calendar.DECEMBER, 10, 0, 0, 0); testClock.setCurrentTime(calendar.getT... | /**
* Timer repetition
*/ | Timer repetition | testCycleDateStartTimerEvent | {
"repo_name": "Activiti/Activiti",
"path": "activiti-core/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/event/timer/compatibility/StartTimerEventRepeatCompatibilityTest.java",
"license": "apache-2.0",
"size": 7980
} | [
"java.util.Calendar",
"java.util.List",
"org.activiti.engine.delegate.event.ActivitiEvent",
"org.activiti.engine.delegate.event.ActivitiEventType",
"org.activiti.engine.impl.util.DefaultClockImpl",
"org.activiti.engine.runtime.Clock",
"org.activiti.engine.runtime.Job",
"org.activiti.engine.runtime.Pro... | import java.util.Calendar; import java.util.List; import org.activiti.engine.delegate.event.ActivitiEvent; import org.activiti.engine.delegate.event.ActivitiEventType; import org.activiti.engine.impl.util.DefaultClockImpl; import org.activiti.engine.runtime.Clock; import org.activiti.engine.runtime.Job; import org.acti... | import java.util.*; import org.activiti.engine.delegate.event.*; import org.activiti.engine.impl.util.*; import org.activiti.engine.runtime.*; import org.activiti.engine.task.*; import org.assertj.core.api.*; | [
"java.util",
"org.activiti.engine",
"org.assertj.core"
] | java.util; org.activiti.engine; org.assertj.core; | 1,101,361 |
public void cleanup() throws RepositoryException {
repo.getConnection().clear();
} | void function() throws RepositoryException { repo.getConnection().clear(); } | /**
* Removes all data from the repository.
*
* @throws RepositoryException
* If cleanup fails.
*/ | Removes all data from the repository | cleanup | {
"repo_name": "chrpin/rodi",
"path": "src/com/fluidops/rdb2rdfbench/db/rdf/SesameAdapter.java",
"license": "mit",
"size": 12175
} | [
"org.openrdf.repository.RepositoryException"
] | import org.openrdf.repository.RepositoryException; | import org.openrdf.repository.*; | [
"org.openrdf.repository"
] | org.openrdf.repository; | 1,088,906 |
public static void matchesPattern(final CharSequence input, final String pattern) {
// TODO when breaking BC, consider returning input
if (Pattern.matches(pattern, input) == false) {
throw new IllegalArgumentException(String.format(DEFAULT_MATCHES_PATTERN_EX, input, pattern));
}
... | static void function(final CharSequence input, final String pattern) { if (Pattern.matches(pattern, input) == false) { throw new IllegalArgumentException(String.format(DEFAULT_MATCHES_PATTERN_EX, input, pattern)); } } | /**
* <p>Validate that the specified argument character sequence matches the specified regular
* expression pattern; otherwise throwing an exception.</p>
*
* <pre>Validate.matchesPattern("hi", "[a-z]*");</pre>
*
* <p>The syntax of the pattern is the one used in the {@link Pattern} class.</... | Validate that the specified argument character sequence matches the specified regular expression pattern; otherwise throwing an exception. <code>Validate.matchesPattern("hi", "[a-z]*");</code> The syntax of the pattern is the one used in the <code>Pattern</code> class | matchesPattern | {
"repo_name": "longestname1/commonslang",
"path": "src/main/java/org/apache/commons/lang3/Validate.java",
"license": "apache-2.0",
"size": 57184
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,178,196 |
public static void logTapShortWordSeen(
boolean wasSearchContentViewSeen, boolean isTapOnShortWord) {
if (!isTapOnShortWord) return;
// We just record CTR of short words.
RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchTapShortWordSeen",
wasSear... | static void function( boolean wasSearchContentViewSeen, boolean isTapOnShortWord) { if (!isTapOnShortWord) return; RecordHistogram.recordEnumeratedHistogram(STR, wasSearchContentViewSeen ? Results.SEEN : Results.NOT_SEEN, Results.NUM_ENTRIES); } | /**
* Log whether results were seen due to a Tap on a short word.
* @param wasSearchContentViewSeen If the panel was opened.
* @param isTapOnShortWord Whether this tap was on a "short" word.
*/ | Log whether results were seen due to a Tap on a short word | logTapShortWordSeen | {
"repo_name": "chromium/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java",
"license": "bsd-3-clause",
"size": 83424
} | [
"org.chromium.base.metrics.RecordHistogram"
] | import org.chromium.base.metrics.RecordHistogram; | import org.chromium.base.metrics.*; | [
"org.chromium.base"
] | org.chromium.base; | 369,139 |
public final SocketFactory getSocketFactory() {
return socketFactory;
}
| final SocketFactory function() { return socketFactory; } | /**
* Gets the socket factory.
*
* @return The socket factory.
*/ | Gets the socket factory | getSocketFactory | {
"repo_name": "jeozey/XmppServerTester",
"path": "xmpp-core-client/src/main/java/rocks/xmpp/core/session/TcpConnectionConfiguration.java",
"license": "mit",
"size": 6001
} | [
"javax.net.SocketFactory"
] | import javax.net.SocketFactory; | import javax.net.*; | [
"javax.net"
] | javax.net; | 1,535,614 |
private static File getExternalCacheDir(Context context) {
// TODO: This needs to be moved to a background thread to ensure no disk access on the
// main/UI thread as unfortunately getExternalCacheDir() calls mkdirs() for us (even
// though the Volley library will later try and call mkdirs()... | static File function(Context context) { return context.getExternalCacheDir(); } | /**
* Get the external app cache directory.
*
* @param context The context to use
* @return The external cache dir
*/ | Get the external app cache directory | getExternalCacheDir | {
"repo_name": "shaojie519/google-io-2013-eclipse",
"path": "google-io-2013/src/com/google/android/apps/iosched/util/ImageLoader.java",
"license": "apache-2.0",
"size": 13009
} | [
"android.content.Context",
"java.io.File"
] | import android.content.Context; import java.io.File; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 2,714,703 |
@Generated
@Selector("typingAttributes")
public native NSDictionary<String, ?> typingAttributes(); | @Selector(STR) native NSDictionary<String, ?> function(); | /**
* automatically resets when the selection changes
*/ | automatically resets when the selection changes | typingAttributes | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UITextField.java",
"license": "apache-2.0",
"size": 46138
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,335,822 |
void endVisitEarComponent(IVirtualComponent component) throws CoreException;
| void endVisitEarComponent(IVirtualComponent component) throws CoreException; | /**
* Post process EAR resource.
*
* @param component
* EAR component to process
* @throws CoreException
*/ | Post process EAR resource | endVisitEarComponent | {
"repo_name": "bengalaviz/JettyWTPPlugin",
"path": "org.eclipse.jst.server.jetty.core/src/org/eclipse/jst/server/jetty/core/internal/wst/IModuleVisitor.java",
"license": "epl-1.0",
"size": 3134
} | [
"org.eclipse.core.runtime.CoreException",
"org.eclipse.wst.common.componentcore.resources.IVirtualComponent"
] | import org.eclipse.core.runtime.CoreException; import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; | import org.eclipse.core.runtime.*; import org.eclipse.wst.common.componentcore.resources.*; | [
"org.eclipse.core",
"org.eclipse.wst"
] | org.eclipse.core; org.eclipse.wst; | 1,714,140 |
public boolean showRecs(int numrecs) {
int tcprecs = fmt.getNumberOfTCPRecords();
// Display the wait cursor
((Component) l).setCursor(new Cursor(Cursor.WAIT_CURSOR));
if(page==0) { // If we are supposed to view a new page
if(oper==OPEN || oper==OPENRMT) { // We are reading the data in from a ... | boolean function(int numrecs) { int tcprecs = fmt.getNumberOfTCPRecords(); ((Component) l).setCursor(new Cursor(Cursor.WAIT_CURSOR)); if(page==0) { if(oper==OPEN oper==OPENRMT) { int end = recsdisp+numrecs; if(end>ifsrecs) { msg.setText(recsdisp + "-STR STRofSTR STR " + ResourceBundleLoader_ct.getText(STR)); } else { m... | /**
* Displays numrecs in the TextArea.
* @param numrecs the number of records to show.
* @return returns false when there are no more records to display.
*/ | Displays numrecs in the TextArea | showRecs | {
"repo_name": "devjunix/libjt400-java",
"path": "src/com/ibm/as400/util/commtrace/FormatDisplay.java",
"license": "epl-1.0",
"size": 27927
} | [
"java.awt.Component",
"java.awt.Cursor"
] | import java.awt.Component; import java.awt.Cursor; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,634,768 |
private ClassLoader buildWebAppClassLoader(Map startupArgs, ClassLoader parentClassLoader,
String webRoot, List classPathFileList) {
List urlList = new ArrayList();
try {
// Web-inf folder
File webInfFolder = new File(webRoot, WEB_INF);
// Cl... | ClassLoader function(Map startupArgs, ClassLoader parentClassLoader, String webRoot, List classPathFileList) { List urlList = new ArrayList(); try { File webInfFolder = new File(webRoot, WEB_INF); File classesFolder = new File(webInfFolder, CLASSES); if (classesFolder.exists()) { Logger.log(Logger.DEBUG, Launcher.RESOU... | /**
* Build the web-app classloader. This tries to load the preferred classloader first,
* but if it fails, falls back to a simple URLClassLoader.
*/ | Build the web-app classloader. This tries to load the preferred classloader first, but if it fails, falls back to a simple URLClassLoader | buildWebAppClassLoader | {
"repo_name": "cdauth/winstone",
"path": "src/java/winstone/WebAppConfiguration.java",
"license": "lgpl-2.1",
"size": 86541
} | [
"java.io.File",
"java.io.IOException",
"java.lang.reflect.Constructor",
"java.net.MalformedURLException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import java.io.File; import java.io.IOException; import java.lang.reflect.Constructor; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.List; import java.util.Map; | import java.io.*; import java.lang.reflect.*; import java.net.*; import java.util.*; | [
"java.io",
"java.lang",
"java.net",
"java.util"
] | java.io; java.lang; java.net; java.util; | 2,805,698 |
public void setMode(@NonNull PorterDuff.Mode mode) {
mMode = mode;
update();
} | void function(@NonNull PorterDuff.Mode mode) { mMode = mode; update(); } | /**
* Specifies the Porter-Duff mode to use when compositing this color
* filter's color with the source pixel at draw time.
*
* @see PorterDuff
* @see #getMode()
* @see #getColor()
*
* @hide
*/ | Specifies the Porter-Duff mode to use when compositing this color filter's color with the source pixel at draw time | setMode | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/graphics/PorterDuffColorFilter.java",
"license": "gpl-3.0",
"size": 3545
} | [
"android.annotation.NonNull"
] | import android.annotation.NonNull; | import android.annotation.*; | [
"android.annotation"
] | android.annotation; | 813,547 |
public Iterator<WebSpacesListResponse.WebSpace> iterator() {
return this.getWebSpaces().iterator();
}
public static class WebSpace {
private WebSpaceAvailabilityState availabilityState; | Iterator<WebSpacesListResponse.WebSpace> function() { return this.getWebSpaces().iterator(); } public static class WebSpace { private WebSpaceAvailabilityState availabilityState; | /**
* Gets the sequence of WebSpaces.
*
*/ | Gets the sequence of WebSpaces | iterator | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-websites/src/main/java/com/microsoft/windowsazure/management/websites/models/WebSpacesListResponse.java",
"license": "apache-2.0",
"size": 8423
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,440,734 |
public int findModuleVersion(ModuleVersion moduleVersion) {
for (int i = 0; i < this.listReference.size(); i++) {
ModuleVersion moduleVersion2;
moduleVersion2 = this.listReference.get(i).getModuleVersion();
if ( (moduleVersion2 != null)
&& (moduleVersion2.getNodePath().equals(modul... | int function(ModuleVersion moduleVersion) { for (int i = 0; i < this.listReference.size(); i++) { ModuleVersion moduleVersion2; moduleVersion2 = this.listReference.get(i).getModuleVersion(); if ( (moduleVersion2 != null) && (moduleVersion2.getNodePath().equals(moduleVersion.getNodePath())) && ((moduleVersion.getVersion... | /**
* Finds a {@link ModuleVersion}.
*
* @param moduleVersion ModuleVersion. The {@link Version} can be null in which
* case only the {@link NodePath}'s of the {@link Module}'s are considered.
* @return Index of the ModuleVersion if found. -1 if the ModuleVersion is not
* found.
*/ | Finds a <code>ModuleVersion</code> | findModuleVersion | {
"repo_name": "azyva/dragom-api",
"path": "src/main/java/org/azyva/dragom/reference/ReferencePath.java",
"license": "agpl-3.0",
"size": 7527
} | [
"org.azyva.dragom.model.ModuleVersion"
] | import org.azyva.dragom.model.ModuleVersion; | import org.azyva.dragom.model.*; | [
"org.azyva.dragom"
] | org.azyva.dragom; | 1,611,195 |
@ServiceMethod(returns = ReturnType.SINGLE)
PrivateLinkResourceListResultDescriptionInner listByService(String resourceGroupName, String resourceName); | @ServiceMethod(returns = ReturnType.SINGLE) PrivateLinkResourceListResultDescriptionInner listByService(String resourceGroupName, String resourceName); | /**
* Gets the private link resources that need to be created for a service.
*
* @param resourceGroupName The name of the resource group that contains the service instance.
* @param resourceName The name of the service instance.
* @throws IllegalArgumentException thrown if parameters fail the v... | Gets the private link resources that need to be created for a service | listByService | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateLinkResourcesClient.java",
"license": "mit",
"size": 4318
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.healthcareapis.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,846,481 |
public void writeField (Object object, String fieldName, String jsonName, Class elementType) {
Class type = object.getClass();
ObjectMap<String, FieldMetadata> fields = typeToFields.get(type);
if (fields == null) fields = cacheFields(type);
FieldMetadata metadata = fields.get(fieldName);
if (metadata == nu... | void function (Object object, String fieldName, String jsonName, Class elementType) { Class type = object.getClass(); ObjectMap<String, FieldMetadata> fields = typeToFields.get(type); if (fields == null) fields = cacheFields(type); FieldMetadata metadata = fields.get(fieldName); if (metadata == null) throw new Serializ... | /** Writes the specified field to the current JSON object.
* @param elementType May be null if the type is unknown. */ | Writes the specified field to the current JSON object | writeField | {
"repo_name": "genura/libgdx",
"path": "gdx/src/com/badlogic/gdx/utils/Json.java",
"license": "apache-2.0",
"size": 39194
} | [
"com.badlogic.gdx.utils.reflect.Field",
"com.badlogic.gdx.utils.reflect.ReflectionException"
] | import com.badlogic.gdx.utils.reflect.Field; import com.badlogic.gdx.utils.reflect.ReflectionException; | import com.badlogic.gdx.utils.reflect.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,232,216 |
public UnsafeSorterIterator getSortedIterator() {
int offset = 0;
long start = System.nanoTime();
if (sortComparator != null) {
if (this.radixSortSupport != null) {
offset = RadixSort.sortKeyPrefixArray(
array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7,
radixSor... | UnsafeSorterIterator function() { int offset = 0; long start = System.nanoTime(); if (sortComparator != null) { if (this.radixSortSupport != null) { offset = RadixSort.sortKeyPrefixArray( array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7, radixSortSupport.sortDescending(), radixSortSupport.sortSigned()); } els... | /**
* Return an iterator over record pointers in sorted order. For efficiency, all calls to
* {@code next()} will return the same mutable object.
*/ | Return an iterator over record pointers in sorted order. For efficiency, all calls to next() will return the same mutable object | getSortedIterator | {
"repo_name": "spark0001/spark2.1.1",
"path": "core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java",
"license": "apache-2.0",
"size": 13044
} | [
"java.util.LinkedList",
"org.apache.spark.unsafe.array.LongArray",
"org.apache.spark.unsafe.memory.MemoryBlock",
"org.apache.spark.util.collection.Sorter"
] | import java.util.LinkedList; import org.apache.spark.unsafe.array.LongArray; import org.apache.spark.unsafe.memory.MemoryBlock; import org.apache.spark.util.collection.Sorter; | import java.util.*; import org.apache.spark.unsafe.array.*; import org.apache.spark.unsafe.memory.*; import org.apache.spark.util.collection.*; | [
"java.util",
"org.apache.spark"
] | java.util; org.apache.spark; | 2,569,420 |
ServiceBusNamespaceDescriptionResponse getNamespaceDescription(String namespaceName) throws IOException, ServiceException, ParserConfigurationException, SAXException; | ServiceBusNamespaceDescriptionResponse getNamespaceDescription(String namespaceName) throws IOException, ServiceException, ParserConfigurationException, SAXException; | /**
* The namespace description is an XML AtomPub document that defines the
* desired semantics for a service namespace. The namespace description
* contains the following properties. (see
* http://msdn.microsoft.com/en-us/library/windowsazure/jj873988.aspx for
* more information)
*
* @para... | The namespace description is an XML AtomPub document that defines the desired semantics for a service namespace. The namespace description contains the following properties. (see HREF for more information) | getNamespaceDescription | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-servicebus/src/main/java/com/microsoft/windowsazure/management/servicebus/NamespaceOperations.java",
"license": "apache-2.0",
"size": 20585
} | [
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.servicebus.models.ServiceBusNamespaceDescriptionResponse",
"java.io.IOException",
"javax.xml.parsers.ParserConfigurationException",
"org.xml.sax.SAXException"
] | import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.servicebus.models.ServiceBusNamespaceDescriptionResponse; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; | import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.servicebus.models.*; import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*; | [
"com.microsoft.windowsazure",
"java.io",
"javax.xml",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; javax.xml; org.xml.sax; | 1,111,189 |
public List<String> parse(Tweet tweet) {
String text = tweet.getOrigText();
List<String> tok = EuroLangTwokenizer.tokenize(text);
List<String> poss = fgen.getPostagger().tag(tok);
String posstr = "";
for (int i = 0; i < poss.size(); i++)
posstr += poss.get(i);
List<String> matches = new ArrayList<St... | List<String> function(Tweet tweet) { String text = tweet.getOrigText(); List<String> tok = EuroLangTwokenizer.tokenize(text); List<String> poss = fgen.getPostagger().tag(tok); String posstr = STRSTR STRst{STR}stSTRSTR STRbd{STR}bd"); } } return matches; } | /**
* Find streets by street suffixes
*
* @param tweetMatches
* @param tweet
*/ | Find streets by street suffixes | parse | {
"repo_name": "weizh/geolocator-1.0",
"path": "geo-locator/src/edu/cmu/geoparser/parser/english/EnglishRuleSTBDParser.java",
"license": "apache-2.0",
"size": 4506
} | [
"edu.cmu.geoparser.model.Tweet",
"edu.cmu.geoparser.nlp.tokenizer.EuroLangTwokenizer",
"java.util.List"
] | import edu.cmu.geoparser.model.Tweet; import edu.cmu.geoparser.nlp.tokenizer.EuroLangTwokenizer; import java.util.List; | import edu.cmu.geoparser.model.*; import edu.cmu.geoparser.nlp.tokenizer.*; import java.util.*; | [
"edu.cmu.geoparser",
"java.util"
] | edu.cmu.geoparser; java.util; | 1,441,584 |
boolean addAll( Collection<? extends Long> collection ); | boolean addAll( Collection<? extends Long> collection ); | /**
* Adds all of the elements in <tt>collection</tt> to the set.
*
* @param collection a <code>Collection</code> value
* @return true if the set was modified by the add all operation.
*/ | Adds all of the elements in collection to the set | addAll | {
"repo_name": "GenomeView/genomeview",
"path": "src/gnu/trove/set/TLongSet.java",
"license": "gpl-3.0",
"size": 10360
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 866,143 |
public EntryFromFileCreator getEntryCreator(File file) {
if ((file == null) || !file.exists()) {
return null;
}
for (EntryFromFileCreator creator : entryCreators) {
if (creator.accept(file)) {
return creator;
}
}
return null... | EntryFromFileCreator function(File file) { if ((file == null) !file.exists()) { return null; } for (EntryFromFileCreator creator : entryCreators) { if (creator.accept(file)) { return creator; } } return null; } | /**
* Returns a EntryFromFileCreator object that is capable of creating a
* BibEntry for the given File.
*
* @param file the pdf file
* @return null if there is no EntryFromFileCreator for this File.
*/ | Returns a EntryFromFileCreator object that is capable of creating a BibEntry for the given File | getEntryCreator | {
"repo_name": "motokito/jabref",
"path": "src/main/java/net/sf/jabref/gui/importer/EntryFromFileCreatorManager.java",
"license": "mit",
"size": 8933
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 541,461 |
private void format2text(Book book) {
//mTextScanIsbn;
//at present only focus on below info:
//ISBN, title and subtitle, author, publisher, price.
StringBuffer scanResult = new StringBuffer();
//isbn
scanResult.append(book.getISBN());
scanResult.append("\n")... | void function(Book book) { StringBuffer scanResult = new StringBuffer(); scanResult.append(book.getISBN()); scanResult.append("\n"); scanResult.append(book.getTitle()); scanResult.append("\n"); if (book.getSubTitle() != null && !book.getSubTitle().isEmpty()) { scanResult.append(book.getSubTitle()); scanResult.append("\... | /**
* only for showing base info to user
* @param book
*/ | only for showing base info to user | format2text | {
"repo_name": "tancolo/wosaosao",
"path": "Wosaosao/app/src/main/java/com/ckt/shrimp/wosaosao/BooksPutIn.java",
"license": "gpl-3.0",
"size": 18348
} | [
"com.ckt.shrimp.utils.Book",
"com.ckt.shrimp.utils.Log"
] | import com.ckt.shrimp.utils.Book; import com.ckt.shrimp.utils.Log; | import com.ckt.shrimp.utils.*; | [
"com.ckt.shrimp"
] | com.ckt.shrimp; | 2,086,136 |
public synchronized void writeFormat(PrintWriter output) {
super.writeFormat(output);
if (_reuseDatasets) {
output.println("<reuseDatasets/>");
}
StringBuffer defaults = new StringBuffer();
if (!_connected) {
defaults.append(" connected=\"no\"");
}
switch (_mark... | synchronized void function(PrintWriter output) { super.writeFormat(output); if (_reuseDatasets) { output.println(STR); } StringBuffer defaults = new StringBuffer(); if (!_connected) { defaults.append(STRno\STR marks=\STRSTR marks=\"dots\"STR marks=\STRSTR marks=\STRSTR marks=\STRSTR stems=\"yes\"STR<defaultSTR/>STR<bar... | /** Write plot format information to the specified output stream in
* PlotML, an XML scheme.
* @param output A buffered print writer.
*/ | Write plot format information to the specified output stream in PlotML, an XML scheme | writeFormat | {
"repo_name": "Thomashuet/Biocham",
"path": "gui/customComponents/Plot.java",
"license": "gpl-2.0",
"size": 94046
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,280,117 |
public static void generate(final NiFiProperties properties, final ExtensionManager extensionManager, final ExtensionMapping extensionMapping) {
final File explodedNiFiDocsDir = properties.getComponentDocumentationWorkingDirectory();
logger.debug("Generating documentation for: " + extensionMapping.... | static void function(final NiFiProperties properties, final ExtensionManager extensionManager, final ExtensionMapping extensionMapping) { final File explodedNiFiDocsDir = properties.getComponentDocumentationWorkingDirectory(); logger.debug(STR + extensionMapping.size() + STR + explodedNiFiDocsDir); documentConfigurable... | /**
* Generates documentation into the work/docs dir specified by
* NiFiProperties.
*
* @param properties to lookup nifi properties
* @param extensionMapping extension mapping
*/ | Generates documentation into the work/docs dir specified by NiFiProperties | generate | {
"repo_name": "MikeThomsen/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/DocGenerator.java",
"license": "apache-2.0",
"size": 8757
} | [
"java.io.File",
"org.apache.nifi.controller.ControllerService",
"org.apache.nifi.nar.ExtensionManager",
"org.apache.nifi.nar.ExtensionMapping",
"org.apache.nifi.processor.Processor",
"org.apache.nifi.reporting.ReportingTask",
"org.apache.nifi.util.NiFiProperties"
] | import java.io.File; import org.apache.nifi.controller.ControllerService; import org.apache.nifi.nar.ExtensionManager; import org.apache.nifi.nar.ExtensionMapping; import org.apache.nifi.processor.Processor; import org.apache.nifi.reporting.ReportingTask; import org.apache.nifi.util.NiFiProperties; | import java.io.*; import org.apache.nifi.controller.*; import org.apache.nifi.nar.*; import org.apache.nifi.processor.*; import org.apache.nifi.reporting.*; import org.apache.nifi.util.*; | [
"java.io",
"org.apache.nifi"
] | java.io; org.apache.nifi; | 1,521,801 |
public ContourToolTipGenerator getToolTipGenerator() {
return this.toolTipGenerator;
}
| ContourToolTipGenerator function() { return this.toolTipGenerator; } | /**
* Returns the tool tip generator.
*
* @return The tool tip generator (possibly null).
*/ | Returns the tool tip generator | getToolTipGenerator | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/plot/ContourPlot.java",
"license": "lgpl-2.1",
"size": 61516
} | [
"org.jfree.chart.labels.ContourToolTipGenerator"
] | import org.jfree.chart.labels.ContourToolTipGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 402,016 |
public void getParts(Collection<? super String> outParts) {
getPartsFromCanonicalForm(canonicalForm, isMultiPart, outParts);
} | void function(Collection<? super String> outParts) { getPartsFromCanonicalForm(canonicalForm, isMultiPart, outParts); } | /**
* Appends dataverse name parts into a given output collection
*/ | Appends dataverse name parts into a given output collection | getParts | {
"repo_name": "apache/incubator-asterixdb",
"path": "asterixdb/asterix-common/src/main/java/org/apache/asterix/common/metadata/DataverseName.java",
"license": "apache-2.0",
"size": 14859
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,450,278 |
public ServiceFuture<Void> post202Retry200Async(final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromHeaderResponse(post202Retry200WithServiceResponseAsync(), serviceCallback);
} | ServiceFuture<Void> function(final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromHeaderResponse(post202Retry200WithServiceResponseAsync(), serviceCallback); } | /**
* Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws Illeg... | Long running post request, service returns a 500, then a 202 to the initial request, with 'Location' and 'Retry-After' headers, Polls return a 200 with a response body after success | post202Retry200Async | {
"repo_name": "lmazuel/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/implementation/LRORetrysImpl.java",
"license": "mit",
"size": 88420
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,222,914 |
private static void wrapSetterMethod(ClassNode classNode, boolean bindable, PropertyNode propertyNode) {
String getterName = propertyNode.getGetterNameOrDefault();
String propertyName = propertyNode.getName();
MethodNode setter = classNode.getSetterMethod(propertyNode.getSetterNameOrDefault(... | static void function(ClassNode classNode, boolean bindable, PropertyNode propertyNode) { String getterName = propertyNode.getGetterNameOrDefault(); String propertyName = propertyNode.getName(); MethodNode setter = classNode.getSetterMethod(propertyNode.getSetterNameOrDefault()); if (setter != null) { Statement code = s... | /**
* Wrap an existing setter.
*/ | Wrap an existing setter | wrapSetterMethod | {
"repo_name": "apache/groovy",
"path": "src/main/java/groovy/beans/VetoableASTTransformation.java",
"license": "apache-2.0",
"size": 20556
} | [
"org.codehaus.groovy.ast.ClassNode",
"org.codehaus.groovy.ast.MethodNode",
"org.codehaus.groovy.ast.PropertyNode",
"org.codehaus.groovy.ast.expr.Expression",
"org.codehaus.groovy.ast.stmt.BlockStatement",
"org.codehaus.groovy.ast.stmt.Statement",
"org.codehaus.groovy.ast.tools.GeneralUtils"
] | import org.codehaus.groovy.ast.ClassNode; import org.codehaus.groovy.ast.MethodNode; import org.codehaus.groovy.ast.PropertyNode; import org.codehaus.groovy.ast.expr.Expression; import org.codehaus.groovy.ast.stmt.BlockStatement; import org.codehaus.groovy.ast.stmt.Statement; import org.codehaus.groovy.ast.tools.Genera... | import org.codehaus.groovy.ast.*; import org.codehaus.groovy.ast.expr.*; import org.codehaus.groovy.ast.stmt.*; import org.codehaus.groovy.ast.tools.*; | [
"org.codehaus.groovy"
] | org.codehaus.groovy; | 548,503 |
// [TARGET write(Iterable, WriteOption...)]
// [VARIABLE "my_log_name"]
public void write(String logName) {
// [START write]
List<LogEntry> entries = new ArrayList<>();
entries.add(LogEntry.of(StringPayload.of("Entry payload")));
Map<String, Object> jsonMap = new HashMap<>();
jsonMap.put("key"... | void function(String logName) { List<LogEntry> entries = new ArrayList<>(); entries.add(LogEntry.of(StringPayload.of(STR))); Map<String, Object> jsonMap = new HashMap<>(); jsonMap.put("key", "value"); entries.add(LogEntry.of(JsonPayload.of(jsonMap))); logging.write( entries, WriteOption.logName(logName), WriteOption.re... | /**
* Example of writing log entries and providing a default log name and monitored
* resource.
* Logging writes are asynchronous by default.
* {@link Logging#setWriteSynchronicity(Synchronicity)} can be used to update the synchronicity.
*/ | Example of writing log entries and providing a default log name and monitored resource. Logging writes are asynchronous by default. <code>Logging#setWriteSynchronicity(Synchronicity)</code> can be used to update the synchronicity | write | {
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-examples/src/main/java/com/google/cloud/examples/logging/snippets/LoggingSnippets.java",
"license": "apache-2.0",
"size": 15856
} | [
"com.google.cloud.MonitoredResource",
"com.google.cloud.logging.LogEntry",
"com.google.cloud.logging.Logging",
"com.google.cloud.logging.Payload",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.google.cloud.MonitoredResource; import com.google.cloud.logging.LogEntry; import com.google.cloud.logging.Logging; import com.google.cloud.logging.Payload; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.google.cloud.*; import com.google.cloud.logging.*; import java.util.*; | [
"com.google.cloud",
"java.util"
] | com.google.cloud; java.util; | 2,447,285 |
public void setSpellCastState(SpellCastState state) {
this.state = state;
stateChanged = true;
}
| void function(SpellCastState state) { this.state = state; stateChanged = true; } | /**
* Changes the spell cast state.
* @param state the new spell cast state
*/ | Changes the spell cast state | setSpellCastState | {
"repo_name": "TheComputerGeek2/MagicSpells",
"path": "core/src/main/java/com/nisovin/magicspells/events/SpellCastEvent.java",
"license": "gpl-3.0",
"size": 4194
} | [
"com.nisovin.magicspells.Spell"
] | import com.nisovin.magicspells.Spell; | import com.nisovin.magicspells.*; | [
"com.nisovin.magicspells"
] | com.nisovin.magicspells; | 969,653 |
public Object readObject() throws IOException, ClassNotFoundException; | Object function() throws IOException, ClassNotFoundException; | /**
* Reads a <code>Serializable</code> object from the input.
*
* @return the object read.
*
* @exception java.io.IOException an error occurred
* @exception ClassNotFoundException is thrown when the class of a
* serialized object is not found.
*/ | Reads a <code>Serializable</code> object from the input | readObject | {
"repo_name": "jmaassen/AetherIO",
"path": "src/nl/esciencecenter/aether/io/SerializationInput.java",
"license": "apache-2.0",
"size": 3948
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,774,177 |
// ----------------------------------------------------------------------
// BinaryDataInput Multi-value Methods
// ----------------------------------------------------------------------
public void readBooleans(boolean[] values, int nValues)
throws EOFException, IOException {
byte bytes[] = new byte[nValues... | void function(boolean[] values, int nValues) throws EOFException, IOException { byte bytes[] = new byte[nValues]; readFully(bytes, 0, nValues); for (int i = 0; i < nValues; i++) { values[i] = (bytes[i] != 0); } } | /**
* Reads nValues input bytes, each one representing a boolean value, and set
* each value in a boolean array to true if the corresponding byte is
* nonzero, false if that byte is zero. This method is suitable for reading
* the byte written by the writeBooleans method of interface
* BinaryDataOutput.
* <P... | Reads nValues input bytes, each one representing a boolean value, and set each value in a boolean array to true if the corresponding byte is nonzero, false if that byte is zero. This method is suitable for reading the byte written by the writeBooleans method of interface BinaryDataOutput. | readBooleans | {
"repo_name": "skoulouzis/vlet",
"path": "source/core/nl.uva.vlet.vfs.irods/irodssrc/edu/sdsc/grid/io/GeneralRandomAccessFile.java",
"license": "apache-2.0",
"size": 74263
} | [
"java.io.EOFException",
"java.io.IOException"
] | import java.io.EOFException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 690,308 |
@Test
public void testReportAllocatedSlot() throws Exception {
final ResourceID taskManagerId = ResourceID.generate();
final ResourceActions resourceActions = new TestingResourceActionsBuilder().build();
final TestingTaskExecutorGateway taskExecutorGateway =
new TestingTa... | void function() throws Exception { final ResourceID taskManagerId = ResourceID.generate(); final ResourceActions resourceActions = new TestingResourceActionsBuilder().build(); final TestingTaskExecutorGateway taskExecutorGateway = new TestingTaskExecutorGatewayBuilder().createTestingTaskExecutorGateway(); final TaskExe... | /**
* Tests that free slots which are reported as allocated won't be considered for fulfilling
* other pending slot requests.
*
* <p>See: FLINK-8505
*/ | Tests that free slots which are reported as allocated won't be considered for fulfilling other pending slot requests. See: FLINK-8505 | testReportAllocatedSlot | {
"repo_name": "tillrohrmann/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerImplTest.java",
"license": "apache-2.0",
"size": 96159
} | [
"org.apache.flink.api.common.JobID",
"org.apache.flink.runtime.clusterframework.types.AllocationID",
"org.apache.flink.runtime.clusterframework.types.ResourceID",
"org.apache.flink.runtime.clusterframework.types.ResourceProfile",
"org.apache.flink.runtime.clusterframework.types.SlotID",
"org.apache.flink.... | import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.clusterframework.types.AllocationID; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.clusterframework.types.ResourceProfile; import org.apache.flink.runtime.clusterframework.types.SlotID; import ... | import org.apache.flink.api.common.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.resourcemanager.*; import org.apache.flink.runtime.resourcemanager.registration.*; import org.apache.flink.runtime.taskexecutor.*; import org.hamcrest.*; import org.junit.*; | [
"org.apache.flink",
"org.hamcrest",
"org.junit"
] | org.apache.flink; org.hamcrest; org.junit; | 2,532,193 |
Tenant getTenant (); | Tenant getTenant (); | /**
* Get the current tenant
* @return null if there is not a current tenant, otherwise return a tenant.
*/ | Get the current tenant | getTenant | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/ApiContext.java",
"license": "mit",
"size": 3108
} | [
"com.mozu.api.contracts.tenant.Tenant"
] | import com.mozu.api.contracts.tenant.Tenant; | import com.mozu.api.contracts.tenant.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,353,264 |
public static TerminalOp<Integer, Boolean> makeInt(IntPredicate predicate,
MatchKind matchKind) {
Objects.requireNonNull(predicate);
Objects.requireNonNull(matchKind);
class MatchSink extends BooleanTerminalSink<Integer> implements Sink.... | static TerminalOp<Integer, Boolean> function(IntPredicate predicate, MatchKind matchKind) { Objects.requireNonNull(predicate); Objects.requireNonNull(matchKind); class MatchSink extends BooleanTerminalSink<Integer> implements Sink.OfInt { MatchSink() { super(matchKind); } | /**
* Constructs a quantified predicate matcher for an {@code IntStream}.
*
* @param predicate the {@code Predicate} to apply to stream elements
* @param matchKind the kind of quantified match (all, any, none)
* @return a {@code TerminalOp} implementing the desired quantified match
* ... | Constructs a quantified predicate matcher for an IntStream | makeInt | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/java/util/stream/MatchOps.java",
"license": "apache-2.0",
"size": 10360
} | [
"java.util.Objects",
"java.util.function.IntPredicate"
] | import java.util.Objects; import java.util.function.IntPredicate; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 1,421,442 |
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
} | void function(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } | /**
* This removes a listener.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This removes a listener. | removeListener | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/operations/semantic/provider/SemanticItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 5816
} | [
"org.eclipse.emf.edit.provider.INotifyChangedListener"
] | import org.eclipse.emf.edit.provider.INotifyChangedListener; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,421,951 |
public void tryRollback(final Graph graph) {
if (graph.features().graph().supportsTransactions())
graph.tx().rollback();
} | void function(final Graph graph) { if (graph.features().graph().supportsTransactions()) graph.tx().rollback(); } | /**
* Utility method that rollsback if the graph supports transactions.
*/ | Utility method that rollsback if the graph supports transactions | tryRollback | {
"repo_name": "RussellSpitzer/incubator-tinkerpop",
"path": "gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinTest.java",
"license": "apache-2.0",
"size": 13190
} | [
"org.apache.tinkerpop.gremlin.structure.Graph"
] | import org.apache.tinkerpop.gremlin.structure.Graph; | import org.apache.tinkerpop.gremlin.structure.*; | [
"org.apache.tinkerpop"
] | org.apache.tinkerpop; | 2,034,096 |
private boolean isPrivateOrFinalOrAbstract(DetailAST ast) {
// method is ok if it is private or abstract or final
final DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS);
return modifiers.branchContains(TokenTypes.LITERAL_PRIVATE)
|| modifiers.branchContains(Toke... | boolean function(DetailAST ast) { final DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS); return modifiers.branchContains(TokenTypes.LITERAL_PRIVATE) modifiers.branchContains(TokenTypes.ABSTRACT) modifiers.branchContains(TokenTypes.FINAL) modifiers.branchContains(TokenTypes.LITERAL_STATIC); } | /**
* check for modifiers
* @param ast modifier ast
* @return tru in modifier is in checked ones
*/ | check for modifiers | isPrivateOrFinalOrAbstract | {
"repo_name": "naver/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.java",
"license": "lgpl-2.1",
"size": 6335
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 2,804,298 |
public ImportProcessPrx createImport(final ImportContainer container)
throws ServerError, IOException {
checkManagedRepo();
String[] usedFiles = container.getUsedFiles();
File target = container.getFile();
if (log.isDebugEnabled()) {
log.debug("Main file: " + targ... | ImportProcessPrx function(final ImportContainer container) throws ServerError, IOException { checkManagedRepo(); String[] usedFiles = container.getUsedFiles(); File target = container.getFile(); if (log.isDebugEnabled()) { log.debug(STR + target.getAbsolutePath()); log.debug(STR); for (String f : usedFiles) { log.debug... | /**
* Provide initial configuration to the server in order to create the
* {@link ImportProcessPrx} which will manage state server-side.
* @throws IOException if the used files' absolute path could not be found
*/ | Provide initial configuration to the server in order to create the <code>ImportProcessPrx</code> which will manage state server-side | createImport | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/blitz/src/ome/formats/importer/ImportLibrary.java",
"license": "gpl-2.0",
"size": 28246
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,228,281 |
public AuthToken refreshToken() throws NoNetworkConnection {
AuthToken authToken = readAuthToken();
if(!isInitialized){
throw new IllegalStateException("AuthHelper is not initialized, " +
"please call AuthHelper.initialize()");
}
if(TextUtils.isEmpty(m... | AuthToken function() throws NoNetworkConnection { AuthToken authToken = readAuthToken(); if(!isInitialized){ throw new IllegalStateException(STR + STR); } if(TextUtils.isEmpty(mClientId)){ throw new IllegalStateException(STR); } if(TextUtils.isEmpty(mClientSecret)){ throw new IllegalStateException(STR); } try { JsonObj... | /**
* Makes request to QuantiModo webservice
* @return new AuthToken object
* @throws NoNetworkConnection thrown when refresh failed because of connectivity problems
* @throws IllegalStateException thrown when the AuthHelper is not initialized or
* when client id or secret are missing
*/ | Makes request to QuantiModo webservice | refreshToken | {
"repo_name": "QuantiModo/QuantiModo-SDK-Android",
"path": "sdk/src/main/java/com/quantimodo/android/sdk/login/QuantimodoSDKHelper.java",
"license": "gpl-2.0",
"size": 9012
} | [
"android.text.TextUtils",
"com.google.gson.JsonObject",
"com.koushikdutta.ion.Ion",
"java.net.UnknownHostException",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.TimeoutException"
] | import android.text.TextUtils; import com.google.gson.JsonObject; import com.koushikdutta.ion.Ion; import java.net.UnknownHostException; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; | import android.text.*; import com.google.gson.*; import com.koushikdutta.ion.*; import java.net.*; import java.util.concurrent.*; | [
"android.text",
"com.google.gson",
"com.koushikdutta.ion",
"java.net",
"java.util"
] | android.text; com.google.gson; com.koushikdutta.ion; java.net; java.util; | 1,535,645 |
@Test
public void testIsNameValidRenameTestSuiteWithNotTestInTheName() throws Exception {
TestProject testProject = new TestProject();
TestSuite testSuite = new TestSuite();
testSuite.setName("MySuite");
testProject.addChild(testSuite);
TestCase testCase = new TestCase();
testCase.setName("HelloW... | void function() throws Exception { TestProject testProject = new TestProject(); TestSuite testSuite = new TestSuite(); testSuite.setName(STR); testProject.addChild(testSuite); TestCase testCase = new TestCase(); testCase.setName(STR); TestCase testCase2 = new TestCase(); testCase2.setName(STR); testSuite.addChild(testC... | /**
* Test the IsNameValid Method in the renaming state. For testsuites there
* should not the word 'Test' in the name.
*
* @throws Exception
* for Test
*/ | Test the IsNameValid Method in the renaming state. For testsuites there should not the word 'Test' in the name | testIsNameValidRenameTestSuiteWithNotTestInTheName | {
"repo_name": "franzbecker/test-editor",
"path": "ui/org.testeditor.ui.test/src/org/testeditor/ui/wizardpages/RenameTestStructureWizardTest.java",
"license": "epl-1.0",
"size": 7307
} | [
"org.eclipse.e4.core.contexts.ContextInjectionFactory",
"org.junit.Assert",
"org.testeditor.core.model.teststructure.TestCase",
"org.testeditor.core.model.teststructure.TestProject",
"org.testeditor.core.model.teststructure.TestSuite"
] | import org.eclipse.e4.core.contexts.ContextInjectionFactory; import org.junit.Assert; import org.testeditor.core.model.teststructure.TestCase; import org.testeditor.core.model.teststructure.TestProject; import org.testeditor.core.model.teststructure.TestSuite; | import org.eclipse.e4.core.contexts.*; import org.junit.*; import org.testeditor.core.model.teststructure.*; | [
"org.eclipse.e4",
"org.junit",
"org.testeditor.core"
] | org.eclipse.e4; org.junit; org.testeditor.core; | 2,543,103 |
public boolean isPeripheralModeSupported() {
if (getState() != STATE_ON) return false;
try {
mServiceLock.readLock().lock();
if (mService != null) return mService.isPeripheralModeSupported();
} catch (RemoteException e) {
Log.e(TAG, "failed to get peripher... | boolean function() { if (getState() != STATE_ON) return false; try { mServiceLock.readLock().lock(); if (mService != null) return mService.isPeripheralModeSupported(); } catch (RemoteException e) { Log.e(TAG, STR, e); } finally { mServiceLock.readLock().unlock(); } return false; } | /**
* Returns whether peripheral mode is supported.
*
* @hide
*/ | Returns whether peripheral mode is supported | isPeripheralModeSupported | {
"repo_name": "xorware/android_frameworks_base",
"path": "core/java/android/bluetooth/BluetoothAdapter.java",
"license": "apache-2.0",
"size": 97550
} | [
"android.os.RemoteException",
"android.util.Log"
] | import android.os.RemoteException; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 332,849 |
public static <K, V> Map<K, V> compose(Map<K, V> map, Callback callback) {
return new CallbackMap<K, V>(map, callback);
} | static <K, V> Map<K, V> function(Map<K, V> map, Callback callback) { return new CallbackMap<K, V>(map, callback); } | /**
* Returns the composition of the given map and callback.
* <p>
* Note: Any changes to the original map will cause the returned
* map to change and vice versa. But direct changes on the source
* will not be propagated with the callback.
* </p>
*
* @param <K> the generic... | Returns the composition of the given map and callback. Note: Any changes to the original map will cause the returned map to change and vice versa. But direct changes on the source will not be propagated with the callback. | compose | {
"repo_name": "cosmocode/cosmocode-commons",
"path": "src/main/java/de/cosmocode/collections/callback/Callbacks.java",
"license": "apache-2.0",
"size": 5183
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,860,296 |
public UByte getStaffId() {
return (UByte) getValue(2);
} | UByte function() { return (UByte) getValue(2); } | /**
* Getter for <code>sakila.payment.staff_id</code>.
*/ | Getter for <code>sakila.payment.staff_id</code> | getStaffId | {
"repo_name": "bjansen/ceylon-jooq-example",
"path": "gen-source/gen/example/jooq/tables/records/PaymentRecord.java",
"license": "mit",
"size": 6958
} | [
"org.jooq.types.UByte"
] | import org.jooq.types.UByte; | import org.jooq.types.*; | [
"org.jooq.types"
] | org.jooq.types; | 2,042,127 |
EReference getScatterSet_Datums(); | EReference getScatterSet_Datums(); | /**
* Returns the meta object for the containment reference list '{@link info.limpet.stackedcharts.model.ScatterSet#getDatums <em>Datums</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Datums</em>'.
* @see info.limpet.stackedchar... | Returns the meta object for the containment reference list '<code>info.limpet.stackedcharts.model.ScatterSet#getDatums Datums</code>'. | getScatterSet_Datums | {
"repo_name": "pecko/limpet",
"path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/StackedchartsPackage.java",
"license": "epl-1.0",
"size": 92511
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,004,346 |
public VM reset() {
r0.set(0);
r1.set(0);
r2.set(0);
r3.set(0);
rs.set(0);
rf.set(0);
rb.set(0);
rp.set(0);
exit = false;
if (memory != null) {
rs.set(memory.getMemorySize() + memory.getStackSize() - 4);
rb.set(m... | VM function() { r0.set(0); r1.set(0); r2.set(0); r3.set(0); rs.set(0); rf.set(0); rb.set(0); rp.set(0); exit = false; if (memory != null) { rs.set(memory.getMemorySize() + memory.getStackSize() - 4); rb.set(memory.getMemorySize() - 4); } log.debug(STR, debugAsm()); eventBus.post(new ResetEvent(this)); return this; } | /**
* Reset virtual machine state, should be this before every rerun
*/ | Reset virtual machine state, should be this before every rerun | reset | {
"repo_name": "wenerme/bbvm",
"path": "jbbvm/bbvm-core/src/main/java/me/wener/bbvm/vm/VM.java",
"license": "apache-2.0",
"size": 13037
} | [
"me.wener.bbvm.vm.event.ResetEvent"
] | import me.wener.bbvm.vm.event.ResetEvent; | import me.wener.bbvm.vm.event.*; | [
"me.wener.bbvm"
] | me.wener.bbvm; | 2,031,275 |
Project resolveProject( final Path resource ); | Project resolveProject( final Path resource ); | /**
* Given a Resource path resolve it to the containing Project Path. A Project path is the folder containing pom.xml
* @param resource
* @return Path to the folder containing the Project's pom.xml file or null if the resource was not in a Project
*/ | Given a Resource path resolve it to the containing Project Path. A Project path is the folder containing pom.xml | resolveProject | {
"repo_name": "mswiderski/guvnor",
"path": "guvnor-project/guvnor-project-api/src/main/java/org/guvnor/common/services/project/service/ProjectService.java",
"license": "apache-2.0",
"size": 3719
} | [
"org.guvnor.common.services.project.model.Project",
"org.uberfire.backend.vfs.Path"
] | import org.guvnor.common.services.project.model.Project; import org.uberfire.backend.vfs.Path; | import org.guvnor.common.services.project.model.*; import org.uberfire.backend.vfs.*; | [
"org.guvnor.common",
"org.uberfire.backend"
] | org.guvnor.common; org.uberfire.backend; | 2,717,628 |
public Builder<I, O> in(Set<O> values) {
checkArgument(!values.isEmpty());
return transform(new InFunction<>(values));
}
/**
* Performs arbitrary type transformation from {@code O} to {@code T}.
*
* <p>Your {@code transform} function is expected to pass-through {@code null} value... | Builder<I, O> function(Set<O> values) { checkArgument(!values.isEmpty()); return transform(new InFunction<>(values)); } /** * Performs arbitrary type transformation from {@code O} to {@code T}. * * <p>Your {@code transform} function is expected to pass-through {@code null} values as a * no-op, since it's up to {@link #... | /**
* Enforce value be a member of {@code values}.
*
* <p>{@code null} values are passed through.
*
* @throws IllegalArgumentException if {@code values} is empty.
*/ | Enforce value be a member of values. null values are passed through | in | {
"repo_name": "google/nomulus",
"path": "core/src/main/java/google/registry/ui/forms/FormField.java",
"license": "apache-2.0",
"size": 27664
} | [
"com.google.common.base.Preconditions",
"java.util.Set",
"java.util.function.Function",
"javax.annotation.Nullable"
] | import com.google.common.base.Preconditions; import java.util.Set; import java.util.function.Function; import javax.annotation.Nullable; | import com.google.common.base.*; import java.util.*; import java.util.function.*; import javax.annotation.*; | [
"com.google.common",
"java.util",
"javax.annotation"
] | com.google.common; java.util; javax.annotation; | 1,379,211 |
return status;
}
/**
* EZSP_SUCCESS if the policy was changed, EZSP_ERROR_INVALID_ID if the NCP does not
* recognize policyId.
*
* @param status the status to set as {@link EzspStatus} | return status; } /** * EZSP_SUCCESS if the policy was changed, EZSP_ERROR_INVALID_ID if the NCP does not * recognize policyId. * * @param status the status to set as {@link EzspStatus} | /**
* EZSP_SUCCESS if the policy was changed, EZSP_ERROR_INVALID_ID if the NCP does not
* recognize policyId.
* <p>
* EZSP type is <i>EzspStatus</i> - Java type is {@link EzspStatus}
*
* @return the current status as {@link EzspStatus}
*/ | EZSP_SUCCESS if the policy was changed, EZSP_ERROR_INVALID_ID if the NCP does not recognize policyId. EZSP type is EzspStatus - Java type is <code>EzspStatus</code> | getStatus | {
"repo_name": "cschwer/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/ezsp/command/EzspSetPolicyResponse.java",
"license": "epl-1.0",
"size": 2455
} | [
"com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.EzspStatus"
] | import com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.EzspStatus; | import com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.*; | [
"com.zsmartsystems.zigbee"
] | com.zsmartsystems.zigbee; | 1,520,422 |
public void execute() throws MojoExecutionException, MojoFailureException {
executeModel();
Set<String> components = executeComponents();
Set<String> dataformats = executeDataFormats();
Set<String> languages = executeLanguages();
Set<String> others = executeOthers();
... | void function() throws MojoExecutionException, MojoFailureException { executeModel(); Set<String> components = executeComponents(); Set<String> dataformats = executeDataFormats(); Set<String> languages = executeLanguages(); Set<String> others = executeOthers(); executeDocuments(components, dataformats, languages, other... | /**
* Execute goal.
*
* @throws org.apache.maven.plugin.MojoExecutionException execution of the main class or one of the
* threads it generated failed.
* @throws org.apache.maven.plugin.MojoFailureException something bad happened...
... | Execute goal | execute | {
"repo_name": "jkorab/camel",
"path": "tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCatalogMojo.java",
"license": "apache-2.0",
"size": 66900
} | [
"java.util.Set",
"org.apache.maven.plugin.MojoExecutionException",
"org.apache.maven.plugin.MojoFailureException"
] | import java.util.Set; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; | import java.util.*; import org.apache.maven.plugin.*; | [
"java.util",
"org.apache.maven"
] | java.util; org.apache.maven; | 1,753,772 |
public void browseTable() {
DatabaseMeta databaseMeta = jobMeta.findDatabase( getConfig().getDatabase() );
DatabaseExplorerDialog std =
new DatabaseExplorerDialog( getShell(), SWT.NONE, databaseMeta, jobMeta.getDatabases() );
std.setSelectedSchemaAndTable( getConfig().getSchema(), getConfig().getT... | void function() { DatabaseMeta databaseMeta = jobMeta.findDatabase( getConfig().getDatabase() ); DatabaseExplorerDialog std = new DatabaseExplorerDialog( getShell(), SWT.NONE, databaseMeta, jobMeta.getDatabases() ); std.setSelectedSchemaAndTable( getConfig().getSchema(), getConfig().getTable() ); if ( std.open() ) { ge... | /**
* Show the Database Explorer Dialog for the database information provided. The provided schema and table will be
* selected if already configured. Any new selection will be saved in the current configuration.
*/ | Show the Database Explorer Dialog for the database information provided. The provided schema and table will be selected if already configured. Any new selection will be saved in the current configuration | browseTable | {
"repo_name": "stepanovdg/big-data-plugin",
"path": "kettle-plugins/sqoop/src/main/java/org/pentaho/big/data/kettle/plugins/sqoop/ui/AbstractSqoopJobEntryController.java",
"license": "apache-2.0",
"size": 39379
} | [
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog"
] | import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.ui.core.database.dialog.DatabaseExplorerDialog; | import org.pentaho.di.core.database.*; import org.pentaho.di.ui.core.database.dialog.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 975,299 |
@Override
public MaterializedReplica getMaterializedReplica(ExtendedBlock block)
throws ReplicaNotFoundException {
File blockFile;
try {
ReplicaInfo r = dataset.getReplicaInfo(block);
blockFile = new File(r.getBlockURI());
} catch (IOException e) {
LOG.error("Block file for " + b... | MaterializedReplica function(ExtendedBlock block) throws ReplicaNotFoundException { File blockFile; try { ReplicaInfo r = dataset.getReplicaInfo(block); blockFile = new File(r.getBlockURI()); } catch (IOException e) { LOG.error(STR + block + STR, e); throw new ReplicaNotFoundException(block); } File metaFile = FsDatase... | /**
* Return a materialized replica from the FsDatasetImpl.
*/ | Return a materialized replica from the FsDatasetImpl | getMaterializedReplica | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImplTestUtils.java",
"license": "apache-2.0",
"size": 17937
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.server.datanode.ReplicaInfo",
"org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException"
] | import java.io.File; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; import org.apache.hadoop.hdfs.server.datanode.ReplicaNotFoundException; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,475,773 |
public int getTabRunCount(JTabbedPane a) {
int returnValue =
((TabbedPaneUI) (uis.elementAt(0))).getTabRunCount(a);
for (int i = 1; i < uis.size(); i++) {
((TabbedPaneUI) (uis.elementAt(i))).getTabRunCount(a);
}
return returnValue;
}
////////////////////
... | int function(JTabbedPane a) { int returnValue = ((TabbedPaneUI) (uis.elementAt(0))).getTabRunCount(a); for (int i = 1; i < uis.size(); i++) { ((TabbedPaneUI) (uis.elementAt(i))).getTabRunCount(a); } return returnValue; } | /**
* Invokes the <code>getTabRunCount</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/ | Invokes the <code>getTabRunCount</code> method on each UI handled by this object | getTabRunCount | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/javax/swing/plaf/multi/MultiTabbedPaneUI.java",
"license": "mit",
"size": 9161
} | [
"javax.swing.JTabbedPane",
"javax.swing.plaf.TabbedPaneUI"
] | import javax.swing.JTabbedPane; import javax.swing.plaf.TabbedPaneUI; | import javax.swing.*; import javax.swing.plaf.*; | [
"javax.swing"
] | javax.swing; | 851,565 |
int countPendingActivation(MemberGroup group, MemberAccountType accountType); | int countPendingActivation(MemberGroup group, MemberAccountType accountType); | /**
* Returns the number of accounts which are pending activation with the given group and type
*/ | Returns the number of accounts which are pending activation with the given group and type | countPendingActivation | {
"repo_name": "mateli/OpenCyclos",
"path": "src/main/java/nl/strohalm/cyclos/services/accounts/AccountServiceLocal.java",
"license": "gpl-2.0",
"size": 7048
} | [
"nl.strohalm.cyclos.entities.accounts.MemberAccountType",
"nl.strohalm.cyclos.entities.groups.MemberGroup"
] | import nl.strohalm.cyclos.entities.accounts.MemberAccountType; import nl.strohalm.cyclos.entities.groups.MemberGroup; | import nl.strohalm.cyclos.entities.accounts.*; import nl.strohalm.cyclos.entities.groups.*; | [
"nl.strohalm.cyclos"
] | nl.strohalm.cyclos; | 1,762,392 |
public final Element getElement() {
return this.wrappedElement;
} | final Element function() { return this.wrappedElement; } | /**
* Returns the Element which was constructed by the Object.
*
* @return the Element which was constructed by the Object.
*/ | Returns the Element which was constructed by the Object | getElement | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java",
"license": "gpl-2.0",
"size": 17777
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,674,170 |
public void startup() {
feedInProcess.clear();
feedQueue.clear();
executorService = newExecutorService();
if (scheduleInterval == -1) {
logger.info("Disabled scheduled collects.");
} else {
scheduleService = Executors.newSingleThreadScheduledExecutor()... | void function() { feedInProcess.clear(); feedQueue.clear(); executorService = newExecutorService(); if (scheduleInterval == -1) { logger.info(STR); } else { scheduleService = Executors.newSingleThreadScheduledExecutor(); scheduleService.scheduleAtFixedRate( new Runnable() { public void run() { collectAllFeeds(); } | /**
* Initiate a fixed rate schedule for collecting all feeds, with an interval
* of <code>scheduleInterval</code>, unless it is set to -1.
*/ | Initiate a fixed rate schedule for collecting all feeds, with an interval of <code>scheduleInterval</code>, unless it is set to -1 | startup | {
"repo_name": "rinfo/rdl",
"path": "packages/java/rinfo-collector/src/main/java/se/lagrummet/rinfo/collector/AbstractCollectScheduler.java",
"license": "bsd-2-clause",
"size": 8089
} | [
"java.util.concurrent.Executors"
] | import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,128,879 |
public static <T> T buildInstanceForMap(Class<T> clazz, Map<String, Object> values)
throws InstantiationException, IllegalAccessException, IntrospectionException,
IllegalArgumentException, InvocationTargetException {
return buildInstanceForMap(clazz, values, new MyDefaultReflectionDifferenceHandler())... | static <T> T function(Class<T> clazz, Map<String, Object> values) throws InstantiationException, IllegalAccessException, IntrospectionException, IllegalArgumentException, InvocationTargetException { return buildInstanceForMap(clazz, values, new MyDefaultReflectionDifferenceHandler()); } | /**
* Builds a instance of the class for a map containing the values, without specifying the handler for differences
*
* @param clazz The class to build instance
* @param values The values map
* @return The instance
* @throws InstantiationException Error instantiating
* @throws IllegalAccessExcept... | Builds a instance of the class for a map containing the values, without specifying the handler for differences | buildInstanceForMap | {
"repo_name": "brunocvcunha/inutils4j",
"path": "src/main/java/org/brunocvcunha/inutils4j/reflection/MyReflectionUtils.java",
"license": "apache-2.0",
"size": 4513
} | [
"java.beans.IntrospectionException",
"java.lang.reflect.InvocationTargetException",
"java.util.Map"
] | import java.beans.IntrospectionException; import java.lang.reflect.InvocationTargetException; import java.util.Map; | import java.beans.*; import java.lang.reflect.*; import java.util.*; | [
"java.beans",
"java.lang",
"java.util"
] | java.beans; java.lang; java.util; | 1,869,711 |
@Override
public void setSliceItem(SliceItem slice, boolean isHeader, int index,
SliceView.OnSliceActionListener observer) {
resetView();
setSliceActionListener(observer);
mRowIndex = index;
mGridContent = new GridContent(getContext(), slice);
populateViews(mG... | void function(SliceItem slice, boolean isHeader, int index, SliceView.OnSliceActionListener observer) { resetView(); setSliceActionListener(observer); mRowIndex = index; mGridContent = new GridContent(getContext(), slice); populateViews(mGridContent); } | /**
* This is called when GridView is being used as a component in a larger template.
*/ | This is called when GridView is being used as a component in a larger template | setSliceItem | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "slices/view/src/main/java/androidx/slice/widget/GridRowView.java",
"license": "apache-2.0",
"size": 15259
} | [
"androidx.slice.SliceItem"
] | import androidx.slice.SliceItem; | import androidx.slice.*; | [
"androidx.slice"
] | androidx.slice; | 33,832 |
public void testGetChildren() throws Exception {
ExpectedStrings expectedString = new ExpectedStrings(expectedStringList);
ITranslationUnit tu = CProjectHelper.findTranslationUnit(testProject, "exetest.c");
if (tu.hasChildren()) {
ICElement[] elements = tu.getChildren();
for (int x = 0; x < elements.le... | void function() throws Exception { ExpectedStrings expectedString = new ExpectedStrings(expectedStringList); ITranslationUnit tu = CProjectHelper.findTranslationUnit(testProject, STR); if (tu.hasChildren()) { ICElement[] elements = tu.getChildren(); for (int x = 0; x < elements.length; x++) { expectedString.foundString... | /***************************************************************************
* Simple sanity tests to make sure TranslationUnit.getChildren seems to basically work.
*/ | Simple sanity tests to make sure TranslationUnit.getChildren seems to basically work | testGetChildren | {
"repo_name": "Yuerr14/RepeatedFixes",
"path": "RepeatedFixes/model/org/eclipse/cdt/core/model/tests/TranslationUnitTests.java",
"license": "mit",
"size": 7504
} | [
"org.eclipse.cdt.core.model.ICElement",
"org.eclipse.cdt.core.model.ITranslationUnit",
"org.eclipse.cdt.core.testplugin.CProjectHelper",
"org.eclipse.cdt.core.testplugin.util.ExpectedStrings"
] | import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.testplugin.CProjectHelper; import org.eclipse.cdt.core.testplugin.util.ExpectedStrings; | import org.eclipse.cdt.core.model.*; import org.eclipse.cdt.core.testplugin.*; import org.eclipse.cdt.core.testplugin.util.*; | [
"org.eclipse.cdt"
] | org.eclipse.cdt; | 1,582,684 |
public void connect(String url, String userName, String password) throws Exception {
svcInstRef.setType(SVC_INST_NAME);
svcInstRef.setValue(SVC_INST_NAME);
vimPort = vimService.getVimPort();
Map<String, Object> ctxt = ((BindingProvider)vimPort).getRequestContext();
ctxt.put... | void function(String url, String userName, String password) throws Exception { svcInstRef.setType(SVC_INST_NAME); svcInstRef.setValue(SVC_INST_NAME); vimPort = vimService.getVimPort(); Map<String, Object> ctxt = ((BindingProvider)vimPort).getRequestContext(); ctxt.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url); ct... | /**
* Establishes session with the virtual center server.
*
* @throws Exception
* the exception
*/ | Establishes session with the virtual center server | connect | {
"repo_name": "ikoula/cloudstack",
"path": "vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java",
"license": "gpl-2.0",
"size": 25921
} | [
"com.vmware.vim25.ServiceContent",
"java.util.List",
"java.util.Map",
"java.util.StringTokenizer",
"javax.xml.ws.BindingProvider",
"javax.xml.ws.handler.MessageContext"
] | import com.vmware.vim25.ServiceContent; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import javax.xml.ws.BindingProvider; import javax.xml.ws.handler.MessageContext; | import com.vmware.vim25.*; import java.util.*; import javax.xml.ws.*; import javax.xml.ws.handler.*; | [
"com.vmware.vim25",
"java.util",
"javax.xml"
] | com.vmware.vim25; java.util; javax.xml; | 2,190,808 |
@Test
public void testGetProfileWithEnglishText() throws InterruptedException {
final ProfileOptions options = new ProfileOptions.Builder().text(text).language(Language.ENGLISH).build();
server.enqueue(jsonResponse(profile));
final Profile profile = service.getProfile(options).execute();
final Reco... | void function() throws InterruptedException { final ProfileOptions options = new ProfileOptions.Builder().text(text).language(Language.ENGLISH).build(); server.enqueue(jsonResponse(profile)); final Profile profile = service.getProfile(options).execute(); final RecordedRequest request = server.takeRequest(); assertEqual... | /**
* Test get profile with english text.
*
* @throws InterruptedException the interrupted exception
*/ | Test get profile with english text | testGetProfileWithEnglishText | {
"repo_name": "supunucsc/java-sdk",
"path": "personality-insights/src/test/java/com/ibm/watson/developer_cloud/personality_insights/v2/PersonalityInsightsTest.java",
"license": "apache-2.0",
"size": 5009
} | [
"com.ibm.watson.developer_cloud.http.HttpHeaders",
"com.ibm.watson.developer_cloud.http.HttpMediaType",
"com.ibm.watson.developer_cloud.personality_insights.v2.model.Language",
"com.ibm.watson.developer_cloud.personality_insights.v2.model.Profile",
"com.ibm.watson.developer_cloud.personality_insights.v2.mod... | import com.ibm.watson.developer_cloud.http.HttpHeaders; import com.ibm.watson.developer_cloud.http.HttpMediaType; import com.ibm.watson.developer_cloud.personality_insights.v2.model.Language; import com.ibm.watson.developer_cloud.personality_insights.v2.model.Profile; import com.ibm.watson.developer_cloud.personality_i... | import com.ibm.watson.developer_cloud.http.*; import com.ibm.watson.developer_cloud.personality_insights.v2.model.*; import org.junit.*; | [
"com.ibm.watson",
"org.junit"
] | com.ibm.watson; org.junit; | 886,992 |
public void mergeFrom(final FieldSet<FieldDescriptorType> other) {
for (int i = 0; i < other.fields.getNumArrayEntries(); i++) {
mergeFromField(other.fields.getArrayEntryAt(i));
}
for (final Map.Entry<FieldDescriptorType, Object> entry :
other.fields.getOverflowEntries()) {
mergeF... | void function(final FieldSet<FieldDescriptorType> other) { for (int i = 0; i < other.fields.getNumArrayEntries(); i++) { mergeFromField(other.fields.getArrayEntryAt(i)); } for (final Map.Entry<FieldDescriptorType, Object> entry : other.fields.getOverflowEntries()) { mergeFromField(entry); } } | /**
* Like {@link Message.Builder#mergeFrom(Message)}, but merges from another
* {@link FieldSet}.
*/ | Like <code>Message.Builder#mergeFrom(Message)</code>, but merges from another <code>FieldSet</code> | mergeFrom | {
"repo_name": "legrosbuffle/kythe",
"path": "third_party/proto/java/core/src/main/java/com/google/protobuf/FieldSet.java",
"license": "apache-2.0",
"size": 32472
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 550,957 |
@Test
public void testWriteString() throws Exception {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
BasicByteWriter writer = new BasicByteWriter(stream);
writer.write("test");
writer.flush();
byte[] bytes = stream.toByteArray();
byte[] stringBy... | void function() throws Exception { ByteArrayOutputStream stream = new ByteArrayOutputStream(); BasicByteWriter writer = new BasicByteWriter(stream); writer.write("test"); writer.flush(); byte[] bytes = stream.toByteArray(); byte[] stringBytes = "test".getBytes(StandardCharsets.UTF_16); byte[] expected = new byte[string... | /**
* Make sure {@link #writeString} works correctly.
*/ | Make sure <code>#writeString</code> works correctly | testWriteString | {
"repo_name": "JCThePants/NucleusFramework",
"path": "tests/src/com/jcwhatever/nucleus/utils/file/BasicByteWriterTest.java",
"license": "mit",
"size": 6407
} | [
"com.jcwhatever.nucleus.utils.ArrayUtils",
"java.io.ByteArrayOutputStream",
"java.nio.charset.StandardCharsets",
"org.junit.Assert"
] | import com.jcwhatever.nucleus.utils.ArrayUtils; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import org.junit.Assert; | import com.jcwhatever.nucleus.utils.*; import java.io.*; import java.nio.charset.*; import org.junit.*; | [
"com.jcwhatever.nucleus",
"java.io",
"java.nio",
"org.junit"
] | com.jcwhatever.nucleus; java.io; java.nio; org.junit; | 2,524,999 |
EClass getParentOf(); | EClass getParentOf(); | /**
* Returns the meta object for class '{@link com.b2international.snowowl.snomed.ecl.ecl.ParentOf <em>Parent Of</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Parent Of</em>'.
* @see com.b2international.snowowl.snomed.ecl.ecl.ParentOf
* @generated
... | Returns the meta object for class '<code>com.b2international.snowowl.snomed.ecl.ecl.ParentOf Parent Of</code>'. | getParentOf | {
"repo_name": "IHTSDO/snow-owl",
"path": "snomed/com.b2international.snowowl.snomed.ecl/src-gen/com/b2international/snowowl/snomed/ecl/ecl/EclPackage.java",
"license": "apache-2.0",
"size": 121411
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 578,911 |
private Node[] pslcluster() {
final int nnodes = samples - 1;
final int[] vector = new int[nnodes];
final float[] temp = new float[nnodes];
final int[] index = new int[samples];
Node[] result = new Node[samples];
for (int i = 0; i < samples; i++) {
result[i] = new Node();
result[i].setCorrelation... | Node[] function() { final int nnodes = samples - 1; final int[] vector = new int[nnodes]; final float[] temp = new float[nnodes]; final int[] index = new int[samples]; Node[] result = new Node[samples]; for (int i = 0; i < samples; i++) { result[i] = new Node(); result[i].setCorrelation(Float.MAX_VALUE); for (int j = 0... | /**
* The palcluster routine performs clustering using single linking on the given distance matrix.
*
* @param eClustererType
* @return virtual array with ordered indexes
*/ | The palcluster routine performs clustering using single linking on the given distance matrix | pslcluster | {
"repo_name": "Caleydo/caleydo",
"path": "org.caleydo.core/src/org/caleydo/core/util/clusterer/algorithm/tree/TreeClusterer.java",
"license": "bsd-3-clause",
"size": 15787
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,732,586 |
protected void writeMetaData(PrintWriter pw) throws IOException {
// Collect elementMetaData
if (elements != null) {
for (int i = 0; i < elements.size(); i++) {
ElementDecl elem = (ElementDecl) elements.get(i);
// String elemName = elem.getName().getLoca... | void function(PrintWriter pw) throws IOException { if (elements != null) { for (int i = 0; i < elements.size(); i++) { ElementDecl elem = (ElementDecl) elements.get(i); if (elementMetaData == null) { elementMetaData = new Vector(); } elementMetaData.add(elem); } } pw.println(STR private static org.apache.axis.descripti... | /**
* write MetaData code
*
* @param pw
* @throws IOException
*/ | write MetaData code | writeMetaData | {
"repo_name": "apache/axis1-java",
"path": "axis-codegen/src/main/java/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java",
"license": "apache-2.0",
"size": 18846
} | [
"java.io.IOException",
"java.io.PrintWriter",
"java.util.Vector",
"javax.xml.namespace.QName",
"org.apache.axis.wsdl.symbolTable.CollectionTE",
"org.apache.axis.wsdl.symbolTable.DefinedElement",
"org.apache.axis.wsdl.symbolTable.DefinedType",
"org.apache.axis.wsdl.symbolTable.ElementDecl",
"org.apac... | import java.io.IOException; import java.io.PrintWriter; import java.util.Vector; import javax.xml.namespace.QName; import org.apache.axis.wsdl.symbolTable.CollectionTE; import org.apache.axis.wsdl.symbolTable.DefinedElement; import org.apache.axis.wsdl.symbolTable.DefinedType; import org.apache.axis.wsdl.symbolTable.El... | import java.io.*; import java.util.*; import javax.xml.namespace.*; import org.apache.axis.wsdl.*; | [
"java.io",
"java.util",
"javax.xml",
"org.apache.axis"
] | java.io; java.util; javax.xml; org.apache.axis; | 1,418,540 |
private static <E> Collection<E> toCollection(Iterable<E> iterable) {
return (iterable instanceof Collection)
? (Collection<E>) iterable
: Lists.newArrayList(iterable.iterator());
} | static <E> Collection<E> function(Iterable<E> iterable) { return (iterable instanceof Collection) ? (Collection<E>) iterable : Lists.newArrayList(iterable.iterator()); } | /**
* Converts an iterable into a collection. If the iterable is already a
* collection, it is returned. Otherwise, an {@link java.util.ArrayList} is
* created with the contents of the iterable in the same iteration order.
*/ | Converts an iterable into a collection. If the iterable is already a collection, it is returned. Otherwise, an <code>java.util.ArrayList</code> is created with the contents of the iterable in the same iteration order | toCollection | {
"repo_name": "lshain-android-source/external-guava",
"path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Iterables.java",
"license": "apache-2.0",
"size": 38623
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,385,438 |
public static PutRepositoryRequest putRepositoryRequest(String name) {
return new PutRepositoryRequest(name);
} | static PutRepositoryRequest function(String name) { return new PutRepositoryRequest(name); } | /**
* Registers snapshot repository
*
* @param name repository name
* @return repository registration request
*/ | Registers snapshot repository | putRepositoryRequest | {
"repo_name": "zuoyebushiwo/elasticsearch1.7-study",
"path": "src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 24567
} | [
"org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest"
] | import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest; | import org.elasticsearch.action.admin.cluster.repositories.put.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 415,464 |
public IncomingPhoneNumber create(List<NameValuePair> params) throws TwilioRestException; | IncomingPhoneNumber function(List<NameValuePair> params) throws TwilioRestException; | /**
* Creates the IncomingPhoneNumber
*
* @param params the param list
* @return the incoming phone number
* @throws TwilioRestException
*/ | Creates the IncomingPhoneNumber | create | {
"repo_name": "Forestvap/Twilio-Project",
"path": "twilio-java/src/main/java/com/twilio/sdk/resource/factory/IncomingPhoneNumberFactory.java",
"license": "mit",
"size": 864
} | [
"com.twilio.sdk.TwilioRestException",
"com.twilio.sdk.resource.instance.IncomingPhoneNumber",
"java.util.List",
"org.apache.http.NameValuePair"
] | import com.twilio.sdk.TwilioRestException; import com.twilio.sdk.resource.instance.IncomingPhoneNumber; import java.util.List; import org.apache.http.NameValuePair; | import com.twilio.sdk.*; import com.twilio.sdk.resource.instance.*; import java.util.*; import org.apache.http.*; | [
"com.twilio.sdk",
"java.util",
"org.apache.http"
] | com.twilio.sdk; java.util; org.apache.http; | 943,943 |
public void testCertificateExpiredException03() {
String msg = null;
CertificateExpiredException tE = new CertificateExpiredException(msg);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
} | void function() { String msg = null; CertificateExpiredException tE = new CertificateExpiredException(msg); assertNull(STR, tE.getMessage()); assertNull(STR, tE.getCause()); } | /**
* Test for <code>CertificateExpiredException(String)</code> constructor
* Assertion: constructs CertificateExpiredException when <code>msg</code>
* is null
*/ | Test for <code>CertificateExpiredException(String)</code> constructor Assertion: constructs CertificateExpiredException when <code>msg</code> is null | testCertificateExpiredException03 | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateExpiredExceptionTest.java",
"license": "gpl-2.0",
"size": 3216
} | [
"java.security.cert.CertificateExpiredException"
] | import java.security.cert.CertificateExpiredException; | import java.security.cert.*; | [
"java.security"
] | java.security; | 1,285,817 |
public ArrayList<String> getValues(OrganizationListHeader header) {
String locator = String.format(Locators.ORGANIZATION_CELL_XPATH, header.getIndex());
List<WebElement> cells = seleniumWebDriver.findElements(By.xpath(locator));
ArrayList<String> values = new ArrayList<>();
cells.forEach(
cell... | ArrayList<String> function(OrganizationListHeader header) { String locator = String.format(Locators.ORGANIZATION_CELL_XPATH, header.getIndex()); List<WebElement> cells = seleniumWebDriver.findElements(By.xpath(locator)); ArrayList<String> values = new ArrayList<>(); cells.forEach( cell -> { values.add(cell.getText()); ... | /**
* Returns values of the pointed column.
*
* @param header header
* @return list of values in the cells
*/ | Returns values of the pointed column | getValues | {
"repo_name": "sleshchenko/che",
"path": "selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/dashboard/organization/OrganizationListPage.java",
"license": "epl-1.0",
"size": 11440
} | [
"java.util.ArrayList",
"java.util.List",
"org.openqa.selenium.By",
"org.openqa.selenium.WebElement"
] | import java.util.ArrayList; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; | import java.util.*; import org.openqa.selenium.*; | [
"java.util",
"org.openqa.selenium"
] | java.util; org.openqa.selenium; | 900,134 |
public TCTokenResponse handleActivate(TCTokenRequest request) {
final DynamicContext dynCtx = DynamicContext.getInstance(TR03112Keys.INSTANCE_KEY);
boolean performChecks = TCTokenHacks.isPerformTR03112Checks(request);
if (! performChecks) {
logger.warn("Checks according to BSI TR03112 3.4.2, 3.4.4 (TCToken ... | TCTokenResponse function(TCTokenRequest request) { final DynamicContext dynCtx = DynamicContext.getInstance(TR03112Keys.INSTANCE_KEY); boolean performChecks = TCTokenHacks.isPerformTR03112Checks(request); if (! performChecks) { logger.warn(STR); } boolean isObjectActivation = request.getTCTokenURL() == null; if (isObje... | /**
* Activates the client according to the received TCToken.
*
* @param request The activation request containing the TCToken.
* @return The response containing the result of the activation process.
*/ | Activates the client according to the received TCToken | handleActivate | {
"repo_name": "adelapie/open-ecard-IRMA",
"path": "addons/tr03112/src/main/java/org/openecard/control/module/tctoken/TCTokenHandler.java",
"license": "apache-2.0",
"size": 19389
} | [
"java.io.IOException",
"java.math.BigInteger",
"java.util.Set",
"org.openecard.common.DynamicContext",
"org.openecard.common.ECardConstants",
"org.openecard.common.WSHelper",
"org.openecard.common.interfaces.DispatcherException",
"org.openecard.common.sal.state.CardStateEntry",
"org.openecard.transp... | import java.io.IOException; import java.math.BigInteger; import java.util.Set; import org.openecard.common.DynamicContext; import org.openecard.common.ECardConstants; import org.openecard.common.WSHelper; import org.openecard.common.interfaces.DispatcherException; import org.openecard.common.sal.state.CardStateEntry; i... | import java.io.*; import java.math.*; import java.util.*; import org.openecard.common.*; import org.openecard.common.interfaces.*; import org.openecard.common.sal.state.*; import org.openecard.transport.paos.*; | [
"java.io",
"java.math",
"java.util",
"org.openecard.common",
"org.openecard.transport"
] | java.io; java.math; java.util; org.openecard.common; org.openecard.transport; | 2,788,663 |
protected void addInitialContextsNameListPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PCM_MergeComponents_initialContextsNameList_feature"),
... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), PcmarchoptionsPackage.Literals.PCM_MERGE_COMPONENTS__INITIAL_CONTEXTS_NAME_LIST, true, false, fal... | /**
* This adds a property descriptor for the Initial Contexts Name List feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Initial Contexts Name List feature. | addInitialContextsNameListPropertyDescriptor | {
"repo_name": "KAMP-Research/KAMP",
"path": "bundles/Toometa/toometa.pcmarchoptions.edit/src/pcmarchoptions/provider/PCM_MergeComponentsItemProvider.java",
"license": "apache-2.0",
"size": 4846
} | [
"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,130,489 |
private Latch createClientLatch(CompletableLatchUid latchUid, ClusterNode coordinator,
Collection<ClusterNode> participants) {
assert !serverLatches.containsKey(latchUid);
assert !clientLatches.containsKey(latchUid);
ClientLatch latch = new ClientLatch(latchUid, coordinator, partici... | Latch function(CompletableLatchUid latchUid, ClusterNode coordinator, Collection<ClusterNode> participants) { assert !serverLatches.containsKey(latchUid); assert !clientLatches.containsKey(latchUid); ClientLatch latch = new ClientLatch(latchUid, coordinator, participants); if (log.isDebugEnabled()) log.debug(STR + latc... | /**
* Creates client latch. If there is final ack corresponds to given {@code id} and {@code topVer}, latch will be
* completed immediately.
*
* @param latchUid Latch uid.
* @param coordinator Coordinator node.
* @param participants Participant nodes.
* @return Client latch instance.
... | Creates client latch. If there is final ack corresponds to given id and topVer, latch will be completed immediately | createClientLatch | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/latch/ExchangeLatchManager.java",
"license": "apache-2.0",
"size": 31342
} | [
"java.util.Collection",
"org.apache.ignite.cluster.ClusterNode"
] | import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; | import java.util.*; import org.apache.ignite.cluster.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 330,582 |
int offset,i,r1,r2;
Point start= this.getStartPoint(conn);
conn.translateToRelative(start);
Point end=this.getEndPoint(conn);
conn.translateToRelative(end);
IFigure source=conn.getSourceAnchor().getOwner();
IFigure target=conn.getTargetAnchor().getOwner();
Rectangle rs=source.getBounds().getCopy()... | int offset,i,r1,r2; Point start= this.getStartPoint(conn); conn.translateToRelative(start); Point end=this.getEndPoint(conn); conn.translateToRelative(end); IFigure source=conn.getSourceAnchor().getOwner(); IFigure target=conn.getTargetAnchor().getOwner(); Rectangle rs=source.getBounds().getCopy(); Rectangle rt=target.... | /**
* Routes the Connection.
* @param conn The Connection to route
* @see org.eclipse.draw2d.ConnectionRouter#route(org.eclipse.draw2d.Connection)
*/ | Routes the Connection | route | {
"repo_name": "jurkov/j-algo-mod",
"path": "relicts/org/jalgo/main/gfx/RoundedManhattanConnectionRouter.java",
"license": "gpl-2.0",
"size": 16156
} | [
"org.eclipse.draw2d.IFigure",
"org.eclipse.draw2d.geometry.Point",
"org.eclipse.draw2d.geometry.PointList",
"org.eclipse.draw2d.geometry.Rectangle"
] | import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.PointList; import org.eclipse.draw2d.geometry.Rectangle; | import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*; | [
"org.eclipse.draw2d"
] | org.eclipse.draw2d; | 2,380,741 |
private static boolean prefetch(
final Repository repository,
final String path, final MavenPathParser mavenPathParser) throws IOException
{
MavenPath mavenPath = mavenPathParser.parsePath(path);
Request getRequest = new Request.Builder()
.action(GET)
.path(path)
.build()... | static boolean function( final Repository repository, final String path, final MavenPathParser mavenPathParser) throws IOException { MavenPath mavenPath = mavenPathParser.parsePath(path); Request getRequest = new Request.Builder() .action(GET) .path(path) .build(); Context context = new Context(repository, getRequest);... | /**
* Primes proxy cache with given path and return {@code true} if succeeds. Accepts only maven proxy type.
*/ | Primes proxy cache with given path and return true if succeeds. Accepts only maven proxy type | prefetch | {
"repo_name": "sonatype/nexus-public",
"path": "plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/internal/MavenIndexPublisher.java",
"license": "epl-1.0",
"size": 13477
} | [
"java.io.IOException",
"org.sonatype.nexus.repository.Repository",
"org.sonatype.nexus.repository.maven.MavenPath",
"org.sonatype.nexus.repository.maven.MavenPathParser",
"org.sonatype.nexus.repository.proxy.ProxyFacet",
"org.sonatype.nexus.repository.view.Context",
"org.sonatype.nexus.repository.view.R... | import java.io.IOException; import org.sonatype.nexus.repository.Repository; import org.sonatype.nexus.repository.maven.MavenPath; import org.sonatype.nexus.repository.maven.MavenPathParser; import org.sonatype.nexus.repository.proxy.ProxyFacet; import org.sonatype.nexus.repository.view.Context; import org.sonatype.nex... | import java.io.*; import org.sonatype.nexus.repository.*; import org.sonatype.nexus.repository.maven.*; import org.sonatype.nexus.repository.proxy.*; import org.sonatype.nexus.repository.view.*; | [
"java.io",
"org.sonatype.nexus"
] | java.io; org.sonatype.nexus; | 1,483,346 |
public Object invoke(Environment targetEnv,
String actionName,
Object[] params,
String[] signature)
throws MBeanException {
if (actionName == null) {
throw new IllegalArgumentException("actionName cannot... | Object function(Environment targetEnv, String actionName, Object[] params, String[] signature) throws MBeanException { if (actionName == null) { throw new IllegalArgumentException(STR); } try { if (targetEnv != null) { if (actionName.equals(OP_CLEAN)) { int numFiles = targetEnv.cleanLog(); return new Integer(numFiles);... | /**
* Invoke an operation for the given environment.
*
* @param targetEnv The target JE environment. May be null if the
* environment is not open.
* @param actionName operation name.
* @param params operation parameters. May be null.
* @param signature operation signature. May be null... | Invoke an operation for the given environment | invoke | {
"repo_name": "prat0318/dbms",
"path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/jmx/JEMBeanHelper.java",
"license": "mit",
"size": 31637
} | [
"com.sleepycat.je.CheckpointConfig",
"com.sleepycat.je.DatabaseStats",
"com.sleepycat.je.Environment",
"javax.management.MBeanException"
] | import com.sleepycat.je.CheckpointConfig; import com.sleepycat.je.DatabaseStats; import com.sleepycat.je.Environment; import javax.management.MBeanException; | import com.sleepycat.je.*; import javax.management.*; | [
"com.sleepycat.je",
"javax.management"
] | com.sleepycat.je; javax.management; | 885,171 |
public double[][] getBounds() {
return TriangleUtil.copy(bounds);
} | double[][] function() { return TriangleUtil.copy(bounds); } | /**
* Returns all bounds. Modifying the retunred array does not affect
* the internal state of this instance.
*/ | Returns all bounds. Modifying the retunred array does not affect the internal state of this instance | getBounds | {
"repo_name": "Depter/JRLib",
"path": "NetbeansProject/jrlib/src/main/java/org/jreserve/jrlib/bootstrap/util/HistogramData.java",
"license": "lgpl-3.0",
"size": 5513
} | [
"org.jreserve.jrlib.triangle.TriangleUtil"
] | import org.jreserve.jrlib.triangle.TriangleUtil; | import org.jreserve.jrlib.triangle.*; | [
"org.jreserve.jrlib"
] | org.jreserve.jrlib; | 1,157,737 |
public @Nullable Double getSecondaryPriority() {
return getCheck().getSecondaryPriority(this);
} | @Nullable Double function() { return getCheck().getSecondaryPriority(this); } | /**
* Gets a secondary priority for the result.
*
* @see AccessibilityHierarchyCheck#getSecondaryPriority
*/ | Gets a secondary priority for the result | getSecondaryPriority | {
"repo_name": "google/Accessibility-Test-Framework-for-Android",
"path": "src/main/java/com/google/android/apps/common/testing/accessibility/framework/AccessibilityHierarchyCheckResult.java",
"license": "apache-2.0",
"size": 10943
} | [
"org.checkerframework.checker.nullness.qual.Nullable"
] | import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.*; | [
"org.checkerframework.checker"
] | org.checkerframework.checker; | 268,947 |
public Duration getGossipInterval() {
return gossipInterval;
} | Duration function() { return gossipInterval; } | /**
* Returns the gossip interval.
*
* @return the gossip interval
*/ | Returns the gossip interval | getGossipInterval | {
"repo_name": "kuujo/copycat",
"path": "protocols/gossip/src/main/java/io/atomix/protocols/gossip/CrdtProtocolConfig.java",
"license": "apache-2.0",
"size": 2565
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 1,548,251 |
protected void fireTreeNodeInserted(TreeNode insertedNode)
{
if ( !showContents )
{
// there has to be a much better way of
// doing this but do it the inefficient way
// for now.
setRoot(root);
int index = flatNodes.indexOf(insertedNode);
fireTableRowsInserted(index,index);
}
... | void function(TreeNode insertedNode) { if ( !showContents ) { setRoot(root); int index = flatNodes.indexOf(insertedNode); fireTableRowsInserted(index,index); } Object[] ls = listeners.getListenerList(); TreeModelEvent e = null; for (int i = ls.length - 2; i >= 0; i -= 2) { if (ls[i] == TreeModelListener.class) { if (e ... | /**
* Invoked after nodes have been inserted into the tree.
*/ | Invoked after nodes have been inserted into the tree | fireTreeNodeInserted | {
"repo_name": "belteshazzar/oors",
"path": "oors/src/org/oors/ui/common/TreeTableModel.java",
"license": "bsd-2-clause",
"size": 17639
} | [
"javax.swing.event.TreeModelEvent",
"javax.swing.event.TreeModelListener"
] | import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 725,273 |
public boolean isHttp10() {
return protocol.equals(Protocols.HTTP_1_0);
} | boolean function() { return protocol.equals(Protocols.HTTP_1_0); } | /**
* Determine whether this request conforms to HTTP 1.0.
*
* @return {@code true} if the request protocol is equal to {@link Protocols#HTTP_1_0}, {@code false} otherwise
*/ | Determine whether this request conforms to HTTP 1.0 | isHttp10 | {
"repo_name": "n1hility/undertow",
"path": "core/src/main/java/io/undertow/server/HttpServerExchange.java",
"license": "apache-2.0",
"size": 85558
} | [
"io.undertow.util.Protocols"
] | import io.undertow.util.Protocols; | import io.undertow.util.*; | [
"io.undertow.util"
] | io.undertow.util; | 2,854,845 |
public long getDistanceCallbackPeriod() throws TimeoutException, NotConnectedException {
ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_GET_DISTANCE_CALLBACK_PERIOD, this);
byte[] response = sendRequest(bb.array());
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LIT... | long function() throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_GET_DISTANCE_CALLBACK_PERIOD, this); byte[] response = sendRequest(bb.array()); bb = ByteBuffer.wrap(response, 8, response.length - 8); bb.order(ByteOrder.LITTLE_ENDIAN); long period = IPConnecti... | /**
* Returns the period as set by {@link BrickletDistanceIR#setDistanceCallbackPeriod(long)}.
*/ | Returns the period as set by <code>BrickletDistanceIR#setDistanceCallbackPeriod(long)</code> | getDistanceCallbackPeriod | {
"repo_name": "jaggr2/ch.bfh.fbi.mobiComp.17herz",
"path": "com.tinkerforge/src/com/tinkerforge/BrickletDistanceIR.java",
"license": "apache-2.0",
"size": 22241
} | [
"java.nio.ByteBuffer",
"java.nio.ByteOrder"
] | import java.nio.ByteBuffer; import java.nio.ByteOrder; | import java.nio.*; | [
"java.nio"
] | java.nio; | 58,928 |
public Date getUpdateTimestamp() {
return updateTimestamp;
} | Date function() { return updateTimestamp; } | /**
* <p>
* Getter for the field <code>updateTimestamp</code>.
* </p>
*
* @return a {@link java.util.Date} object.
*/ | Getter for the field <code>updateTimestamp</code>. | getUpdateTimestamp | {
"repo_name": "joansmith/seqware",
"path": "seqware-common/src/main/java/net/sourceforge/seqware/common/model/Registration.java",
"license": "gpl-3.0",
"size": 12065
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,703,545 |
protected void formatRegion(IXtextDocument document, int offset, int length) {
try {
final int startRegionOffset = document.getLineInformationOfOffset(
previousSiblingChar(document, offset)).getOffset();
final IRegion endLine = document.getLineInformationOfOffset(offset + length);
final int endRegion... | void function(IXtextDocument document, int offset, int length) { try { final int startRegionOffset = document.getLineInformationOfOffset( previousSiblingChar(document, offset)).getOffset(); final IRegion endLine = document.getLineInformationOfOffset(offset + length); final int endRegionOffset = endLine.getOffset() + en... | /** Called for formatting a region.
*
* @param document the document to format.
* @param offset the offset of the text to format.
* @param length the length of the text.
*/ | Called for formatting a region | formatRegion | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/editor/DocumentAutoFormatter.java",
"license": "apache-2.0",
"size": 5162
} | [
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.IRegion",
"org.eclipse.xtext.ui.editor.model.IXtextDocument",
"org.eclipse.xtext.xbase.lib.Exceptions"
] | import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IRegion; import org.eclipse.xtext.ui.editor.model.IXtextDocument; import org.eclipse.xtext.xbase.lib.Exceptions; | import org.eclipse.jface.text.*; import org.eclipse.xtext.ui.editor.model.*; import org.eclipse.xtext.xbase.lib.*; | [
"org.eclipse.jface",
"org.eclipse.xtext"
] | org.eclipse.jface; org.eclipse.xtext; | 1,065,939 |
@Nullable
public Chunk loadChunk(World worldIn, int x, int z) throws IOException
{
Object[] data = this.loadChunk__Async(worldIn, x, z);
if (data != null)
{
Chunk chunk = (Chunk) data[0];
NBTTagCompound nbttagcompound = (NBTTagCompound) data[1];
t... | Chunk function(World worldIn, int x, int z) throws IOException { Object[] data = this.loadChunk__Async(worldIn, x, z); if (data != null) { Chunk chunk = (Chunk) data[0]; NBTTagCompound nbttagcompound = (NBTTagCompound) data[1]; this.loadEntities(worldIn, nbttagcompound.getCompoundTag("Level"), chunk); return chunk; } r... | /**
* Loads the specified(XZ) chunk into the specified world.
*/ | Loads the specified(XZ) chunk into the specified world | loadChunk | {
"repo_name": "Im-Jrotica/forge_latest",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/chunk/storage/AnvilChunkLoader.java",
"license": "lgpl-2.1",
"size": 25079
} | [
"java.io.IOException",
"net.minecraft.nbt.NBTTagCompound",
"net.minecraft.world.World",
"net.minecraft.world.chunk.Chunk"
] | import java.io.IOException; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; | import java.io.*; import net.minecraft.nbt.*; import net.minecraft.world.*; import net.minecraft.world.chunk.*; | [
"java.io",
"net.minecraft.nbt",
"net.minecraft.world"
] | java.io; net.minecraft.nbt; net.minecraft.world; | 1,211,722 |
private JCheckBox getJDeviceHTTPSendCheckBox()
{
if (jDeviceHTTPSendCheckBox == null)
{
jDeviceHTTPSendCheckBox = new JCheckBox();
jDeviceHTTPSendCheckBox.setFont(new Font("SansSerif", Font.PLAIN, 12));
jDeviceHTTPSendCheckBox.setText("Kann senden HTTP");
}
return jDeviceHTTPSendCh... | JCheckBox function() { if (jDeviceHTTPSendCheckBox == null) { jDeviceHTTPSendCheckBox = new JCheckBox(); jDeviceHTTPSendCheckBox.setFont(new Font(STR, Font.PLAIN, 12)); jDeviceHTTPSendCheckBox.setText(STR); } return jDeviceHTTPSendCheckBox; } | /**
* This method initializes jCheckBox3
*
* @return javax.swing.JCheckBox
*/ | This method initializes jCheckBox3 | getJDeviceHTTPSendCheckBox | {
"repo_name": "fraunhoferfokus/fokus-upnp",
"path": "upnp-gui/src/main/java/de/fraunhofer/fokus/upnp/gateway/examples/internet/RouterCheck.java",
"license": "gpl-3.0",
"size": 30031
} | [
"java.awt.Font",
"javax.swing.JCheckBox"
] | import java.awt.Font; import javax.swing.JCheckBox; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 92,373 |
public void setReadingConstraint(Reading constraint) {
Reading invertedConstraint = new Reading(constraint.start, constraint.length, TextUtil.invertKanaCase(constraint.text));
sentence.setReadingConstraint(invertedConstraint);
needsAnalysis = true;
} | void function(Reading constraint) { Reading invertedConstraint = new Reading(constraint.start, constraint.length, TextUtil.invertKanaCase(constraint.text)); sentence.setReadingConstraint(invertedConstraint); needsAnalysis = true; } | /**
* Sets a reading constraint on the currently analysed text.<br>
* Note: In contrast to constraints set directly on a Viterbi instance,
* there is no need to pass the constraint in katakana; the exact reading
* text supplied will appear in the analysed readings
*
* @param constraint
*/ | Sets a reading constraint on the currently analysed text. Note: In contrast to constraints set directly on a Viterbi instance, there is no need to pass the constraint in katakana; the exact reading text supplied will appear in the analysed readings | setReadingConstraint | {
"repo_name": "aymkam/lucene-gosen",
"path": "src/java/net/java/sen/ReadingProcessor.java",
"license": "lgpl-2.1",
"size": 20299
} | [
"net.java.sen.dictionary.Reading",
"net.java.sen.util.TextUtil"
] | import net.java.sen.dictionary.Reading; import net.java.sen.util.TextUtil; | import net.java.sen.dictionary.*; import net.java.sen.util.*; | [
"net.java.sen"
] | net.java.sen; | 879,067 |
public final Loader selectRootLoader( UnmarshallingContext.State state, TagName tag ) {
JaxBeanInfo beanInfo = rootMap.get(tag.uri,tag.local);
if(beanInfo==null)
return null;
return beanInfo.getLoader(this,true);
} | final Loader function( UnmarshallingContext.State state, TagName tag ) { JaxBeanInfo beanInfo = rootMap.get(tag.uri,tag.local); if(beanInfo==null) return null; return beanInfo.getLoader(this,true); } | /**
* Based on the tag name, determine what object to unmarshal,
* and then set a new object and its loader to the current unmarshaller state.
*
* @return
* null if the given name pair is not recognized.
*/ | Based on the tag name, determine what object to unmarshal, and then set a new object and its loader to the current unmarshaller state | selectRootLoader | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java",
"license": "gpl-2.0",
"size": 39022
} | [
"com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader",
"com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName",
"com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext"
] | import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.TagName; import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext; | import com.sun.xml.internal.bind.v2.runtime.unmarshaller.*; | [
"com.sun.xml"
] | com.sun.xml; | 1,067,735 |
public static RequestTimeline of(final Event... events) {
return new RequestTimeline(ImmutableList.copyOf(events));
} | static RequestTimeline function(final Event... events) { return new RequestTimeline(ImmutableList.copyOf(events)); } | /**
* Returns a new {@link RequestTimeline} with an arbitrary number of events.
*
* @return a new {@link RequestTimeline} with an arbitrary number of events.
*/ | Returns a new <code>RequestTimeline</code> with an arbitrary number of events | of | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RequestTimeline.java",
"license": "mit",
"size": 7202
} | [
"com.azure.cosmos.implementation.guava25.collect.ImmutableList"
] | import com.azure.cosmos.implementation.guava25.collect.ImmutableList; | import com.azure.cosmos.implementation.guava25.collect.*; | [
"com.azure.cosmos"
] | com.azure.cosmos; | 758,700 |
public void afterPhase(PhaseEvent event) {
if(event.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES ||
event.getPhaseId() == PhaseId.PROCESS_VALIDATIONS ||
event.getPhaseId() == PhaseId.UPDATE_MODEL_VALUES ||
event.getPhaseId() == PhaseId.INVOKE_APPLICATION) {
FacesContext facesContext = event.get... | void function(PhaseEvent event) { if(event.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES event.getPhaseId() == PhaseId.PROCESS_VALIDATIONS event.getPhaseId() == PhaseId.UPDATE_MODEL_VALUES event.getPhaseId() == PhaseId.INVOKE_APPLICATION) { FacesContext facesContext = event.getFacesContext(); saveMessages(facesContext);... | /**
* Handle a notification that the processing for a particular phase has just
* been completed.
*/ | Handle a notification that the processing for a particular phase has just been completed | afterPhase | {
"repo_name": "hantsy/spring4-sandbox",
"path": "mvc-jsf2/src/main/java/com/hantsylabs/example/spring/faces/MessageHandler.java",
"license": "apache-2.0",
"size": 4641
} | [
"javax.faces.context.FacesContext",
"javax.faces.event.PhaseEvent",
"javax.faces.event.PhaseId"
] | import javax.faces.context.FacesContext; import javax.faces.event.PhaseEvent; import javax.faces.event.PhaseId; | import javax.faces.context.*; import javax.faces.event.*; | [
"javax.faces"
] | javax.faces; | 1,543,263 |
public static void printStackTrace(Thread thread, Throwable throwable,
PrintWriter writer) {
printStackTrace(thread, throwable, writer, Svetovid.LOCALE);
}
| static void function(Thread thread, Throwable throwable, PrintWriter writer) { printStackTrace(thread, throwable, writer, Svetovid.LOCALE); } | /**
* Prints the supplied throwable and its stack trace to the specified print
* writer. If the thread is supplied also, its name is printed before the
* throwable.
*
* @param thread
* the thread on which the throwable was thrown; if it is
* {@code null} n... | Prints the supplied throwable and its stack trace to the specified print writer. If the thread is supplied also, its name is printed before the throwable | printStackTrace | {
"repo_name": "ivanpribela/svetovid-lib",
"path": "src/org/svetovid/SvetovidException.java",
"license": "apache-2.0",
"size": 16386
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,615,215 |
protected VirtualFileSystemInode loadInode(String path)
throws FileNotFoundException {
String fullPath = fileSystemPath + path;
//logger.debug("Loading inode - " + fullPath);
File xmlFile = new File(fullPath);
File realDirectory = null;
if (xmlFile.isDirectory()) {
realDirectory = xmlFile;
fullPat... | VirtualFileSystemInode function(String path) throws FileNotFoundException { String fullPath = fileSystemPath + path; File xmlFile = new File(fullPath); File realDirectory = null; if (xmlFile.isDirectory()) { realDirectory = xmlFile; fullPath = fullPath + separator + dirName; xmlFile = new File(fullPath); } XMLDecoder x... | /**
* Accepts a String path that starts with "/" and unserializes the requested
* Inode
*/ | Accepts a String path that starts with "/" and unserializes the requested Inode | loadInode | {
"repo_name": "dr3plus/dr3",
"path": "src/master/src/org/drftpd/vfs/VirtualFileSystem.java",
"license": "gpl-2.0",
"size": 14635
} | [
"java.beans.XMLDecoder",
"java.io.BufferedInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"org.drftpd.util.CommonPluginUtils"
] | import java.beans.XMLDecoder; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import org.drftpd.util.CommonPluginUtils; | import java.beans.*; import java.io.*; import org.drftpd.util.*; | [
"java.beans",
"java.io",
"org.drftpd.util"
] | java.beans; java.io; org.drftpd.util; | 2,856,371 |
public void printJob(PrinterJob job)
{
Frame frame = this.getFrame();
dialog = new PrintDialog(frame, false);
dialog.pack();
if (frame != null)
this.centerDialogInFrame(dialog, frame); | void function(PrinterJob job) { Frame frame = this.getFrame(); dialog = new PrintDialog(frame, false); dialog.pack(); if (frame != null) this.centerDialogInFrame(dialog, frame); | /**
* Print this job.
* @param job
*/ | Print this job | printJob | {
"repo_name": "jbundle/jbundle",
"path": "thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/print/ScreenPrinter.java",
"license": "gpl-3.0",
"size": 9142
} | [
"java.awt.Frame",
"java.awt.print.PrinterJob"
] | import java.awt.Frame; import java.awt.print.PrinterJob; | import java.awt.*; import java.awt.print.*; | [
"java.awt"
] | java.awt; | 763,832 |
public static String decodeParameter(String input) {
String result = CmsStringUtil.substitute(input, ENTITY_REPLACEMENT, ENTITY_PREFIX);
return CmsEncoder.decodeHtmlEntities(result, OpenCms.getSystemInfo().getDefaultEncoding());
} | static String function(String input) { String result = CmsStringUtil.substitute(input, ENTITY_REPLACEMENT, ENTITY_PREFIX); return CmsEncoder.decodeHtmlEntities(result, OpenCms.getSystemInfo().getDefaultEncoding()); } | /**
* Decodes a string used as parameter in an uri in a way independent of other encodings/decodings applied before.<p>
*
* @param input the encoded parameter string
*
* @return the decoded parameter string
*
* @see #encodeParameter(String)
*/ | Decodes a string used as parameter in an uri in a way independent of other encodings/decodings applied before | decodeParameter | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/i18n/CmsEncoder.java",
"license": "lgpl-2.1",
"size": 34873
} | [
"org.opencms.main.OpenCms",
"org.opencms.util.CmsStringUtil"
] | import org.opencms.main.OpenCms; import org.opencms.util.CmsStringUtil; | import org.opencms.main.*; import org.opencms.util.*; | [
"org.opencms.main",
"org.opencms.util"
] | org.opencms.main; org.opencms.util; | 1,789,989 |
public void setPlayers(List<String> players) {
this.players = players != null ? new ArrayList<>(players) : new ArrayList<>();
}
public static class ProtocolInfo {
private final int id;
private final String name;
public ProtocolInfo(int id, String name) {
this.id = id;
this.name = name;
}
publi... | void function(List<String> players) { this.players = players != null ? new ArrayList<>(players) : new ArrayList<>(); } public static class ProtocolInfo { private final int id; private final String name; public ProtocolInfo(int id, String name) { this.id = id; this.name = name; } public ProtocolInfo(ProtocolVersion vers... | /**
* Sets player list
* @param players player list
*/ | Sets player list | setPlayers | {
"repo_name": "ProtocolSupport/ProtocolSupport",
"path": "src/protocolsupport/api/events/ServerPingResponseEvent.java",
"license": "agpl-3.0",
"size": 4705
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,717,705 |
@Required
public void setSessionFactory(final SessionFactory _factory)
{
this.factory = _factory;
}
| void function(final SessionFactory _factory) { this.factory = _factory; } | /**
* Setter for session factory. Spring will use this to inject the session
* factory into the dao.
*
* @param _factory
* hibernate session factory
*/ | Setter for session factory. Spring will use this to inject the session factory into the dao | setSessionFactory | {
"repo_name": "AlienQueen/alienlabs-skeleton-for-wicket-spring-hibernate",
"path": "src/main/java/org/alienlabs/amazon/persistence/dao/AmazonDaoImpl.java",
"license": "agpl-3.0",
"size": 2851
} | [
"org.hibernate.SessionFactory"
] | import org.hibernate.SessionFactory; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 1,912,607 |
public void doHelp_items(RunData data) {
SessionState state = ((JetspeedRunData) data)
.getPortletSessionState(((JetspeedRunData) data).getJs_peid());
ParameterParser params = data.getParameters();
TaggingManager taggingManager = (TaggingManager) ComponentManager
.get("org.sakaiproject.taggable.api.Ta... | void function(RunData data) { SessionState state = ((JetspeedRunData) data) .getPortletSessionState(((JetspeedRunData) data).getJs_peid()); ParameterParser params = data.getParameters(); TaggingManager taggingManager = (TaggingManager) ComponentManager .get(STR); TaggingProvider provider = taggingManager.findProviderBy... | /**
* Action is to tag items via an items tagging helper
*/ | Action is to tag items via an items tagging helper | doHelp_items | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 631432
} | [
"java.util.Map",
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.component.cover.ComponentManager",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.taggable.api.TaggingHelperInfo",
"org.sakaiproject.taggable.api.TaggingManager",
"org.sak... | import java.util.Map; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.component.cover.ComponentManager; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.taggable.api.TaggingHelperInfo; import org.sakaiproject.taggable.api.Tagging... | import java.util.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.taggable.api.*; import org.sakaiproject.util.*; | [
"java.util",
"org.sakaiproject.cheftool",
"org.sakaiproject.component",
"org.sakaiproject.event",
"org.sakaiproject.taggable",
"org.sakaiproject.util"
] | java.util; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.taggable; org.sakaiproject.util; | 683,239 |
public static Iterable<String> toRootRelativePaths(Iterable<Artifact> artifacts) {
return Iterables.transform(
Iterables.filter(artifacts, MIDDLEMAN_FILTER),
artifact -> artifact.getRootRelativePath().getPathString());
} | static Iterable<String> function(Iterable<Artifact> artifacts) { return Iterables.transform( Iterables.filter(artifacts, MIDDLEMAN_FILTER), artifact -> artifact.getRootRelativePath().getPathString()); } | /**
* Lazily converts artifacts into root-relative path strings. Middleman artifacts are ignored by
* this method.
*/ | Lazily converts artifacts into root-relative path strings. Middleman artifacts are ignored by this method | toRootRelativePaths | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java",
"license": "apache-2.0",
"size": 61163
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,106,650 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.