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 synchronized void setExcludesfile(File excl) throws BuildException { checkAttributesAllowed(); defaultPatterns.setExcludesfile(excl); ds = null; }
synchronized void function(File excl) throws BuildException { checkAttributesAllowed(); defaultPatterns.setExcludesfile(excl); ds = null; }
/** * Set the <code>File</code> containing the excludes patterns. * * @param excl <code>File</code> instance. * @throws BuildException if there is a problem. */
Set the <code>File</code> containing the excludes patterns
setExcludesfile
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/types/resources/Files.java", "license": "gpl-2.0", "size": 15654 }
[ "java.io.File", "org.apache.tools.ant.BuildException" ]
import java.io.File; import org.apache.tools.ant.BuildException;
import java.io.*; import org.apache.tools.ant.*;
[ "java.io", "org.apache.tools" ]
java.io; org.apache.tools;
1,726,478
public void getData() { for ( int i = 0; i < input.getFieldName().length; i++ ) { if ( input.getFieldName()[i] != null ) { TableItem item = wFields.table.getItem( i ); item.setText( 1, input.getFieldName()[i] ); String type = ValueMetaFactory.getValueMetaName( input.getFieldType()[i]...
void function() { for ( int i = 0; i < input.getFieldName().length; i++ ) { if ( input.getFieldName()[i] != null ) { TableItem item = wFields.table.getItem( i ); item.setText( 1, input.getFieldName()[i] ); String type = ValueMetaFactory.getValueMetaName( input.getFieldType()[i] ); int length = input.getFieldLength()[i]...
/** * Copy information from the meta-data input to the dialog fields. */
Copy information from the meta-data input to the dialog fields
getData
{ "repo_name": "tkafalas/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/trans/steps/mappinginput/MappingInputDialog.java", "license": "apache-2.0", "size": 9889 }
[ "org.eclipse.swt.widgets.TableItem", "org.pentaho.di.core.row.value.ValueMetaFactory" ]
import org.eclipse.swt.widgets.TableItem; import org.pentaho.di.core.row.value.ValueMetaFactory;
import org.eclipse.swt.widgets.*; import org.pentaho.di.core.row.value.*;
[ "org.eclipse.swt", "org.pentaho.di" ]
org.eclipse.swt; org.pentaho.di;
2,068,257
public void getUrls(Date createdAfter, Date createdBefore, ContentUrlHandler handler) throws ContentIOException;
void function(Date createdAfter, Date createdBefore, ContentUrlHandler handler) throws ContentIOException;
/** * Get a set of all content URLs in the store. This indicates all content available for reads. * * @param createdAfter * all URLs returned must have been created after this date. May be null. * @param createdBefore * all URLs returned must have been created before thi...
Get a set of all content URLs in the store. This indicates all content available for reads
getUrls
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/content/ContentStore.java", "license": "lgpl-3.0", "size": 11901 }
[ "java.util.Date", "org.alfresco.service.cmr.repository.ContentIOException" ]
import java.util.Date; import org.alfresco.service.cmr.repository.ContentIOException;
import java.util.*; import org.alfresco.service.cmr.repository.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
1,643,116
public static <B> Class getTypeParameter(Class<? extends B> c, Class<B> base, int n) { Type parameterization = Types.getBaseClass(c,base); if (parameterization instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) parameterization; return Types.erasure(Ty...
static <B> Class function(Class<? extends B> c, Class<B> base, int n) { Type parameterization = Types.getBaseClass(c,base); if (parameterization instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) parameterization; return Types.erasure(Types.getTypeArgument(pt,n)); } else { throw new AssertionErr...
/** * Given {@code c=MyList (extends ArrayList<Foo>), base=List}, compute the parameterization of 'base' * that's assignable from 'c' (in this case {@code List<Foo>}), and return its n-th type parameter * (n=0 would return {@code Foo}). * * <p> * This method is useful for doing type arithm...
Given c=MyList (extends ArrayList), base=List, compute the parameterization of 'base' that's assignable from 'c' (in this case List), and return its n-th type parameter (n=0 would return Foo). This method is useful for doing type arithmetic
getTypeParameter
{ "repo_name": "rsandell/jenkins", "path": "core/src/main/java/hudson/Functions.java", "license": "mit", "size": 84169 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type", "org.jvnet.tiger_types.Types" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import org.jvnet.tiger_types.Types;
import java.lang.reflect.*; import org.jvnet.tiger_types.*;
[ "java.lang", "org.jvnet.tiger_types" ]
java.lang; org.jvnet.tiger_types;
2,576,162
@Test public void errorFormattedStringWithTwoLongsAndOneObject() { logger.errorf("%d + %d = %s", 1L, 2L, "three"); if (errorEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.ERROR), same(null), any(PrintfStyleFormatter.class), eq("%d + %d = %s"), eq(1L), eq(2L), eq("three")); } else { veri...
void function() { logger.errorf(STR, 1L, 2L, "three"); if (errorEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.ERROR), same(null), any(PrintfStyleFormatter.class), eq(STR), eq(1L), eq(2L), eq("three")); } else { verify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any()); } }
/** * Verifies that a formatted string with two long and one object arguments will be logged correctly at * {@link Level#ERROR ERROR} level. */
Verifies that a formatted string with two long and one object arguments will be logged correctly at <code>Level#ERROR ERROR</code> level
errorFormattedStringWithTwoLongsAndOneObject
{ "repo_name": "pmwmedia/tinylog", "path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java", "license": "apache-2.0", "size": 189291 }
[ "org.mockito.ArgumentMatchers", "org.mockito.Mockito", "org.tinylog.Level", "org.tinylog.format.PrintfStyleFormatter" ]
import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.tinylog.Level; import org.tinylog.format.PrintfStyleFormatter;
import org.mockito.*; import org.tinylog.*; import org.tinylog.format.*;
[ "org.mockito", "org.tinylog", "org.tinylog.format" ]
org.mockito; org.tinylog; org.tinylog.format;
1,061,247
public static void printPersonsWithinAgeRange(List<Person> roster, int low, int high) { for (Person p : roster) { if (low <= p.getAge() && p.getAge() < high) { System.out.println(p); } } }
static void function(List<Person> roster, int low, int high) { for (Person p : roster) { if (low <= p.getAge() && p.getAge() < high) { System.out.println(p); } } }
/** * Klassischer Ansatz, um eine Collection zu durchsuchen. * * @param roster * @param low * @param high */
Klassischer Ansatz, um eine Collection zu durchsuchen
printPersonsWithinAgeRange
{ "repo_name": "Erunafailaro/java8tutorial", "path": "src/java8tutorial/lambda/search/PersonSearch.java", "license": "apache-2.0", "size": 5060 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
848,117
public Adapter createForStatementAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link org.tetrabox.minijava.model.miniJava.ForStatement <em>For Statement</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases...
Creates a new adapter for an object of class '<code>org.tetrabox.minijava.model.miniJava.ForStatement For Statement</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createForStatementAdapter
{ "repo_name": "tetrabox/minijava", "path": "plugins/org.tetrabox.minijava.model/src/org/tetrabox/minijava/model/miniJava/util/MiniJavaAdapterFactory.java", "license": "epl-1.0", "size": 42082 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
885,387
public static boolean isVmPriorityValueLegal(int value, List<String> reasons) { boolean res = false; if (value >= 0 && value <= Config.<Integer> getValue(ConfigValues.VmPriorityMaxValue)) { res = true; } else { reasons.add(EngineMessage.VM_OR_TEMPLATE_ILLEGAL_PRIORITY...
static boolean function(int value, List<String> reasons) { boolean res = false; if (value >= 0 && value <= Config.<Integer> getValue(ConfigValues.VmPriorityMaxValue)) { res = true; } else { reasons.add(EngineMessage.VM_OR_TEMPLATE_ILLEGAL_PRIORITY_VALUE.toString()); reasons.add(String.format(STR, Config.<Integer> getVa...
/** * Determines whether [is high availability value legal] [the specified * value]. * * @param value * The value. * @param reasons * The reasons. * @return <c>true</c> if [is vm priority value legal] [the specified * value]; otherwise, <c>false...
Determines whether [is high availability value legal] [the specified value]
isVmPriorityValueLegal
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateCommand.java", "license": "apache-2.0", "size": 12993 }
[ "java.util.List", "org.ovirt.engine.core.common.config.Config", "org.ovirt.engine.core.common.config.ConfigValues", "org.ovirt.engine.core.common.errors.EngineMessage" ]
import java.util.List; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.errors.EngineMessage;
import java.util.*; import org.ovirt.engine.core.common.config.*; import org.ovirt.engine.core.common.errors.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
938,518
protected void updateObjectNames() { if (m_ObjectNames == null) m_ObjectNames = getClasses(); if (m_Object != null) { String className = m_Object.getClass().getName(); if (!m_ObjectNames.contains(className)) { m_ObjectNames.add(className); Collections.sort(m_ObjectNames); } } ...
void function() { if (m_ObjectNames == null) m_ObjectNames = getClasses(); if (m_Object != null) { String className = m_Object.getClass().getName(); if (!m_ObjectNames.contains(className)) { m_ObjectNames.add(className); Collections.sort(m_ObjectNames); } } }
/** * Updates the list of selectable object names, adding any new names to the * list. */
Updates the list of selectable object names, adding any new names to the list
updateObjectNames
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/goe/GenericObjectEditor.java", "license": "gpl-3.0", "size": 40812 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,440,592
@Override public String toString() { final CharArrayBuffer buf = new CharArrayBuffer(64); buf.append(this.mimeType); if (this.params != null) { buf.append("; "); BasicHeaderValueFormatter.INSTANCE.formatParameters(buf, this.params, false); } else if (this....
String function() { final CharArrayBuffer buf = new CharArrayBuffer(64); buf.append(this.mimeType); if (this.params != null) { buf.append(STR); BasicHeaderValueFormatter.INSTANCE.formatParameters(buf, this.params, false); } else if (this.charset != null) { buf.append(STR); buf.append(this.charset.name()); } return buf....
/** * Generates textual representation of this content type which can be used as the value * of a <code>Content-Type</code> header. */
Generates textual representation of this content type which can be used as the value of a <code>Content-Type</code> header
toString
{ "repo_name": "FabioNgo/sound-cloud-player", "path": "apache_lib/src/org/apache/http/entity/ContentType.java", "license": "apache-2.0", "size": 11741 }
[ "org.apache.http.message.BasicHeaderValueFormatter", "org.apache.http.util.CharArrayBuffer" ]
import org.apache.http.message.BasicHeaderValueFormatter; import org.apache.http.util.CharArrayBuffer;
import org.apache.http.message.*; import org.apache.http.util.*;
[ "org.apache.http" ]
org.apache.http;
2,328,212
public void saveAs(final LoanFile loanFile, final Path path) throws IOException, JAXBException { ((BaseLoanFile) loanFile).setPath(path); save(loanFile); } private BaseLoanFile currentFile; private final XMLParser xmlParser = new XMLParser();
void function(final LoanFile loanFile, final Path path) throws IOException, JAXBException { ((BaseLoanFile) loanFile).setPath(path); save(loanFile); } private BaseLoanFile currentFile; private final XMLParser xmlParser = new XMLParser();
/** * Save the file. * * @param loanFile * the {@link LoanFile} to save * @param path * the path to save * @throws IOException * on io error * @throws JAXBException * on jaxb error */
Save the file
saveAs
{ "repo_name": "sambalmueslie/LoanCalculator", "path": "Loan Calculator/src/main/java/de/sambalmueslie/loan_calculator/controller/file/FileController.java", "license": "apache-2.0", "size": 2396 }
[ "de.sambalmueslie.loan_calculator.controller.file.xml.XMLParser", "java.io.IOException", "java.nio.file.Path", "javax.xml.bind.JAXBException" ]
import de.sambalmueslie.loan_calculator.controller.file.xml.XMLParser; import java.io.IOException; import java.nio.file.Path; import javax.xml.bind.JAXBException;
import de.sambalmueslie.loan_calculator.controller.file.xml.*; import java.io.*; import java.nio.file.*; import javax.xml.bind.*;
[ "de.sambalmueslie.loan_calculator", "java.io", "java.nio", "javax.xml" ]
de.sambalmueslie.loan_calculator; java.io; java.nio; javax.xml;
1,021,260
private void fillBuffer() throws IOException { init(); int bit = bits.nextBit(); if (bit == 1) { // literal value int literal; if (literalTree != null) { literal = literalTree.read(bits); } else { litera...
void function() throws IOException { init(); int bit = bits.nextBit(); if (bit == 1) { int literal; if (literalTree != null) { literal = literalTree.read(bits); } else { literal = bits.nextBits(8); } if (literal == -1) { return; } buffer.put(literal); } else if (bit == 0) { int distanceLowSize = dictionarySize == 4096 ...
/** * Fill the sliding dictionary with more data. * @throws IOException */
Fill the sliding dictionary with more data
fillBuffer
{ "repo_name": "eugenegardner/tenXMEIPolisher", "path": "src/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java", "license": "gpl-3.0", "size": 5172 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,590,586
@Override public void chartProgress(ChartProgressEvent event) { // does nothing - override if necessary }
void function(ChartProgressEvent event) { }
/** * Receives notification of a chart progress event. * * @param event the event. */
Receives notification of a chart progress event
chartProgress
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/ChartPanel.java", "license": "lgpl-3.0", "size": 119437 }
[ "org.jfree.chart.event.ChartProgressEvent" ]
import org.jfree.chart.event.ChartProgressEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,074,595
public void start() { System.out.println("Applet.start() is called"); // Call start() to prefetch and start the player. try { // in = mUrl.openStream(); //will never timeout, and hangs browser // use HTTPClient to get stream, because it will implement a proper // timeout System.out.println("conne...
void function() { System.out.println(STR); try { System.out.println(STR); HttpClient mClient = new HttpClient( new MultiThreadedHttpConnectionManager()); int timeout = 20; HttpConnectionManager conManager = mClient.getHttpConnectionManager(); HttpConnectionParams params = conManager.getParams(); params.setConnectionTim...
/** * Start media file playback. This function is called the first time that * the Applet runs and every time the user re-enters the page. */
Start media file playback. This function is called the first time that the Applet runs and every time the user re-enters the page
start
{ "repo_name": "thrasher/jipcam", "path": "jipcam-axis/jipcam-axis-core/src/main/java/net/sf/jipcam/axis/tools/MjpegApplet.java", "license": "lgpl-2.1", "size": 6965 }
[ "java.awt.BorderLayout", "java.io.BufferedInputStream", "java.io.IOException", "org.apache.commons.httpclient.HttpClient", "org.apache.commons.httpclient.HttpConnectionManager", "org.apache.commons.httpclient.MultiThreadedHttpConnectionManager", "org.apache.commons.httpclient.methods.GetMethod", "org....
import java.awt.BorderLayout; import java.io.BufferedInputStream; import java.io.IOException; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpConnectionManager; import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; import org.apache.commons.httpclient.methods...
import java.awt.*; import java.io.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*; import org.apache.commons.httpclient.params.*;
[ "java.awt", "java.io", "org.apache.commons" ]
java.awt; java.io; org.apache.commons;
367,035
@Override public void setDateexecuted(Date value) { set(3, value); }
void function(Date value) { set(3, value); }
/** * Setter for <code>cattle.DATABASECHANGELOG.DATEEXECUTED</code>. */
Setter for <code>cattle.DATABASECHANGELOG.DATEEXECUTED</code>
setDateexecuted
{ "repo_name": "rancherio/cattle", "path": "modules/model/src/main/java/io/cattle/platform/core/model/tables/records/DatabasechangelogRecord.java", "license": "apache-2.0", "size": 16377 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,621,715
public void setShipmentCache(ShipmentCache shipmentCache) { this.shipmentCache = shipmentCache; }
void function(ShipmentCache shipmentCache) { this.shipmentCache = shipmentCache; }
/** * Sets the shipment cache. * * @param shipmentCache the new shipment cache */
Sets the shipment cache
setShipmentCache
{ "repo_name": "freeacs/web", "path": "src/com/owera/xaps/web/app/util/SessionData.java", "license": "mit", "size": 8663 }
[ "com.owera.xaps.web.app.page.staging.StagingActions" ]
import com.owera.xaps.web.app.page.staging.StagingActions;
import com.owera.xaps.web.app.page.staging.*;
[ "com.owera.xaps" ]
com.owera.xaps;
163,439
public void pointerReleased(int x, int y) { if (!dragging) { if (!session.isLoggedIn()) { parent.showLoginRequiredMessage(); return; } // Vote down or up, depending on which side of the Item was clicked voteItemPressed(...
void function(int x, int y) { if (!dragging) { if (!session.isLoggedIn()) { parent.showLoginRequiredMessage(); return; } voteItemPressed(x < centerX ? VotePostOperation.VOTE_DOWN : VotePostOperation.VOTE_UP); } super.pointerReleased(x, y); }
/** * Detect touches (left side = vote down, right side = vote up). */
Detect touches (left side = vote down, right side = vote up)
pointerReleased
{ "repo_name": "mykmelez/pluotsorbet", "path": "tests/midlets/rlinks/view/item/VoteItem.java", "license": "gpl-2.0", "size": 7315 }
[ "com.nokia.example.rlinks.network.operation.VotePostOperation" ]
import com.nokia.example.rlinks.network.operation.VotePostOperation;
import com.nokia.example.rlinks.network.operation.*;
[ "com.nokia.example" ]
com.nokia.example;
2,674,664
public final void load(Class<?> relativeClass, String... resourceNames) { Resource[] resources = new Resource[resourceNames.length]; for (int i = 0; i < resourceNames.length; i++) { resources[i] = new ClassPathResource(resourceNames[i], relativeClass); } this.reader.loadBeanDefinitions(resources); }
final void function(Class<?> relativeClass, String... resourceNames) { Resource[] resources = new Resource[resourceNames.length]; for (int i = 0; i < resourceNames.length; i++) { resources[i] = new ClassPathResource(resourceNames[i], relativeClass); } this.reader.loadBeanDefinitions(resources); }
/** * Load bean definitions from the given XML resources. * @param relativeClass class whose package will be used as a prefix when loading each * specified resource name * @param resourceNames relatively-qualified names of resources to load */
Load bean definitions from the given XML resources
load
{ "repo_name": "eddumelendez/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java", "license": "apache-2.0", "size": 4845 }
[ "org.springframework.core.io.ClassPathResource", "org.springframework.core.io.Resource" ]
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource;
import org.springframework.core.io.*;
[ "org.springframework.core" ]
org.springframework.core;
665,270
public void reindex() { long start = System.nanoTime(); indexer.deleteAll(); for (String name : repositoryManager.getRepositoryList()) { RepositoryModel repository = repositoryManager.getRepositoryModel(name); try { List<TicketModel> tickets = getTickets(repository); if (!tickets.isEmpty()) { l...
void function() { long start = System.nanoTime(); indexer.deleteAll(); for (String name : repositoryManager.getRepositoryList()) { RepositoryModel repository = repositoryManager.getRepositoryModel(name); try { List<TicketModel> tickets = getTickets(repository); if (!tickets.isEmpty()) { log.info(STR, tickets.size(), re...
/** * Destroys an existing index and reindexes all tickets. * This operation may be expensive and time-consuming. * @since 1.4.0 */
Destroys an existing index and reindexes all tickets. This operation may be expensive and time-consuming
reindex
{ "repo_name": "vitalif/gitblit", "path": "src/main/java/com/gitblit/tickets/ITicketService.java", "license": "apache-2.0", "size": 39077 }
[ "com.gitblit.models.RepositoryModel", "com.gitblit.models.TicketModel", "java.util.List", "java.util.concurrent.TimeUnit" ]
import com.gitblit.models.RepositoryModel; import com.gitblit.models.TicketModel; import java.util.List; import java.util.concurrent.TimeUnit;
import com.gitblit.models.*; import java.util.*; import java.util.concurrent.*;
[ "com.gitblit.models", "java.util" ]
com.gitblit.models; java.util;
2,065,609
protected float getActiveScale() { if (PPickPath.CURRENT_PICK_PATH != null) { return (float) PPickPath.CURRENT_PICK_PATH.getScale(); } return 1.0f; }
float function() { if (PPickPath.CURRENT_PICK_PATH != null) { return (float) PPickPath.CURRENT_PICK_PATH.getScale(); } return 1.0f; }
/** * Detect the current scale. Made protected to enable custom * re-implementations. */
Detect the current scale. Made protected to enable custom re-implementations
getActiveScale
{ "repo_name": "bdaum/zoraPD", "path": "piccolo3/src/org/piccolo2d/extras/util/PSemanticStroke.java", "license": "gpl-2.0", "size": 4243 }
[ "org.piccolo2d.util.PPickPath" ]
import org.piccolo2d.util.PPickPath;
import org.piccolo2d.util.*;
[ "org.piccolo2d.util" ]
org.piccolo2d.util;
141,967
public static <E> E argmin(Counter<E> c, Comparator<E> tieBreaker) { double min = Double.POSITIVE_INFINITY; E argmin = null; for (E key : c.keySet()) { double count = c.getCount(key); if (argmin == null || count < min || (count == min && tieBreaker.compare(key, argmin) < 0)) { min = c...
static <E> E function(Counter<E> c, Comparator<E> tieBreaker) { double min = Double.POSITIVE_INFINITY; E argmin = null; for (E key : c.keySet()) { double count = c.getCount(key); if (argmin == null count < min (count == min && tieBreaker.compare(key, argmin) < 0)) { min = count; argmin = key; } } return argmin; }
/** * Finds and returns the key in this Counter with the smallest count. * * @param c * The Counter * @return The key in the Counter with the smallest count. */
Finds and returns the key in this Counter with the smallest count
argmin
{ "repo_name": "simplyianm/stanford-corenlp", "path": "src/main/java/edu/stanford/nlp/stats/Counters.java", "license": "gpl-2.0", "size": 84637 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
504,636
@Test public void whenCreateContainerShouldReturnTheStringType() { SimpleArray<String> arr = new SimpleArray<>(2); arr.add("first"); arr.add("second"); assertThat(arr.get(0), is("first")); assertThat(arr.get(1), is("second")); }
void function() { SimpleArray<String> arr = new SimpleArray<>(2); arr.add("first"); arr.add(STR); assertThat(arr.get(0), is("first")); assertThat(arr.get(1), is(STR)); }
/** * Test method add. Type String. */
Test method add. Type String
whenCreateContainerShouldReturnTheStringType
{ "repo_name": "sllexa/junior", "path": "chapter_005/src/test/java/ru/job4j/pro/generic/SimpleArrayTest.java", "license": "apache-2.0", "size": 4125 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,038,191
@Default @Update(description="Default update method. Places point in BaseCS at 1,1,1.", parameter={}) public boolean updateDefault() { this.o_x = 1; this.o_y = 1; this.o_z = 1; return true; }
@Update(description=STR, parameter={}) boolean function() { this.o_x = 1; this.o_y = 1; this.o_z = 1; return true; }
/** * Default update method. Places point in BaseCS at 1,1,1. * @return True if successful, false otherwise. */
Default update method. Places point in BaseCS at 1,1,1
updateDefault
{ "repo_name": "elmarquez/Federation", "path": "src/ca/sfu/federation/model/geometry/Plane.java", "license": "gpl-2.0", "size": 5636 }
[ "ca.sfu.federation.model.annotations.Update" ]
import ca.sfu.federation.model.annotations.Update;
import ca.sfu.federation.model.annotations.*;
[ "ca.sfu.federation" ]
ca.sfu.federation;
2,406,733
@NotNull List<Pair<PsiMethod, PsiSubstitutor>> findMethodsAndTheirSubstitutorsByName(@NonNls String name, boolean checkBases);
List<Pair<PsiMethod, PsiSubstitutor>> findMethodsAndTheirSubstitutorsByName(@NonNls String name, boolean checkBases);
/** * Searches the class (and optionally its superclasses) for the methods with the specified name * and returns the methods along with their substitutors. * * @param name the name of the methods to find. * @param checkBases if true, the methods are also searched in the base classes of the class. ...
Searches the class (and optionally its superclasses) for the methods with the specified name and returns the methods along with their substitutors
findMethodsAndTheirSubstitutorsByName
{ "repo_name": "msebire/intellij-community", "path": "java/java-psi-api/src/com/intellij/psi/PsiClass.java", "license": "apache-2.0", "size": 12078 }
[ "com.intellij.openapi.util.Pair", "java.util.List", "org.jetbrains.annotations.NonNls" ]
import com.intellij.openapi.util.Pair; import java.util.List; import org.jetbrains.annotations.NonNls;
import com.intellij.openapi.util.*; import java.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "java.util", "org.jetbrains.annotations" ]
com.intellij.openapi; java.util; org.jetbrains.annotations;
300,704
private void dynInit() { ArrayList<KeyNamePair> data = getPaySelectionData(); for(KeyNamePair pp : data) fPaySelect.addItem(pp); if (fPaySelect.getItemCount() == 0) ADialog.info(m_WindowNo, panel, "VPayPrintNoRecords"); else { fPaySelect.setSelectedIndex(0); loadPaySelectInfo(); } } //...
void function() { ArrayList<KeyNamePair> data = getPaySelectionData(); for(KeyNamePair pp : data) fPaySelect.addItem(pp); if (fPaySelect.getItemCount() == 0) ADialog.info(m_WindowNo, panel, STR); else { fPaySelect.setSelectedIndex(0); loadPaySelectInfo(); } }
/** * Dynamic Init */
Dynamic Init
dynInit
{ "repo_name": "neuroidss/adempiere", "path": "org.eevolution.hr_and_payroll/src/main/java/ui/swing/org/eevolution/form/VHRPayPrint.java", "license": "gpl-2.0", "size": 17271 }
[ "java.util.ArrayList", "org.compiere.apps.ADialog", "org.compiere.util.KeyNamePair" ]
import java.util.ArrayList; import org.compiere.apps.ADialog; import org.compiere.util.KeyNamePair;
import java.util.*; import org.compiere.apps.*; import org.compiere.util.*;
[ "java.util", "org.compiere.apps", "org.compiere.util" ]
java.util; org.compiere.apps; org.compiere.util;
2,814,919
private static GoalDecider getGoalDecider(final AIUnit aiUnit, final boolean deferOK) { GoalDecider gd = new GoalDecider() { private PathNode bestPath = null; private int bestValue = Integer.MIN_VALUE; @Override ...
static GoalDecider function(final AIUnit aiUnit, final boolean deferOK) { GoalDecider gd = new GoalDecider() { private PathNode bestPath = null; private int bestValue = Integer.MIN_VALUE; public PathNode getGoal() { return bestPath; }
/** * Makes a goal decider that checks for potential missions. * * @param aiUnit The {@code AIUnit} to find a mission with. * @param deferOK Enable deferring to a fallback colony. * @return A suitable {@code GoalDecider}. */
Makes a goal decider that checks for potential missions
getGoalDecider
{ "repo_name": "FreeCol/freecol", "path": "src/net/sf/freecol/server/ai/mission/MissionaryMission.java", "license": "gpl-2.0", "size": 15597 }
[ "net.sf.freecol.common.model.PathNode", "net.sf.freecol.common.model.pathfinding.GoalDecider", "net.sf.freecol.server.ai.AIUnit" ]
import net.sf.freecol.common.model.PathNode; import net.sf.freecol.common.model.pathfinding.GoalDecider; import net.sf.freecol.server.ai.AIUnit;
import net.sf.freecol.common.model.*; import net.sf.freecol.common.model.pathfinding.*; import net.sf.freecol.server.ai.*;
[ "net.sf.freecol" ]
net.sf.freecol;
516,173
List<DomElement> getElementsByNameNs(String namespaceUri, String localName); /** * Returns a new {@link DOMSource} of the document. * * Note that a {@link DOMSource} wraps the underlying {@link Document} which is * not thread-safe. Multiple DOMSources of the same document should be synchronized * by...
List<DomElement> getElementsByNameNs(String namespaceUri, String localName); /** * Returns a new {@link DOMSource} of the document. * * Note that a {@link DOMSource} wraps the underlying {@link Document} which is * not thread-safe. Multiple DOMSources of the same document should be synchronized * by the calling applica...
/** * Gets all elements with the namespace and name. * * @param namespaceUri the element namespaceURI to search for * @param localName the element name to search for * @return the list of matching elements */
Gets all elements with the namespace and name
getElementsByNameNs
{ "repo_name": "camunda/camunda-xml-model", "path": "src/main/java/org/camunda/bpm/model/xml/instance/DomDocument.java", "license": "apache-2.0", "size": 3146 }
[ "java.util.List", "javax.xml.transform.dom.DOMSource", "org.w3c.dom.Document" ]
import java.util.List; import javax.xml.transform.dom.DOMSource; import org.w3c.dom.Document;
import java.util.*; import javax.xml.transform.dom.*; import org.w3c.dom.*;
[ "java.util", "javax.xml", "org.w3c.dom" ]
java.util; javax.xml; org.w3c.dom;
1,685,899
public CreateVideoReviewsBodyItemVideoFramesItem withMetadata(List<CreateVideoReviewsBodyItemVideoFramesItemMetadataItem> metadata) { this.metadata = metadata; return this; }
CreateVideoReviewsBodyItemVideoFramesItem function(List<CreateVideoReviewsBodyItemVideoFramesItemMetadataItem> metadata) { this.metadata = metadata; return this; }
/** * Set the metadata value. * * @param metadata the metadata value to set * @return the CreateVideoReviewsBodyItemVideoFramesItem object itself. */
Set the metadata value
withMetadata
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItem.java", "license": "mit", "size": 3976 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
665,093
private void registerWeavingHook(BundleContext context, TransformerRegistry tr) { Dictionary<String, Object> props = new Hashtable<String, Object>(1); // NOSONAR props.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE); context.registerService(WeavingHook.class.getName(), tr, props); }
void function(BundleContext context, TransformerRegistry tr) { Dictionary<String, Object> props = new Hashtable<String, Object>(1); props.put(Constants.SERVICE_RANKING, Integer.MAX_VALUE); context.registerService(WeavingHook.class.getName(), tr, props); }
/** * ARIES-1019: Register with the highest possible service ranking to * avoid ClassNotFoundException caused by interfaces added by earlier * weaving hooks that are not yet visible to the bundle class loader. */
ARIES-1019: Register with the highest possible service ranking to avoid ClassNotFoundException caused by interfaces added by earlier weaving hooks that are not yet visible to the bundle class loader
registerWeavingHook
{ "repo_name": "kameshsampath/aries", "path": "jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/Activator.java", "license": "apache-2.0", "size": 2517 }
[ "java.util.Dictionary", "java.util.Hashtable", "org.apache.aries.jpa.container.weaving.impl.TransformerRegistry", "org.osgi.framework.BundleContext", "org.osgi.framework.Constants", "org.osgi.framework.hooks.weaving.WeavingHook" ]
import java.util.Dictionary; import java.util.Hashtable; import org.apache.aries.jpa.container.weaving.impl.TransformerRegistry; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import org.osgi.framework.hooks.weaving.WeavingHook;
import java.util.*; import org.apache.aries.jpa.container.weaving.impl.*; import org.osgi.framework.*; import org.osgi.framework.hooks.weaving.*;
[ "java.util", "org.apache.aries", "org.osgi.framework" ]
java.util; org.apache.aries; org.osgi.framework;
2,105,134
public void highlightDate(Date date, String uiid) { java.util.Calendar cal = java.util.Calendar.getInstance(tmz); cal.setTime(date); cal.set(java.util.Calendar.HOUR, 1); cal.set(java.util.Calendar.HOUR_OF_DAY, 1); cal.set(java.util.Calendar.MINUTE, 0); cal.set(java.ut...
void function(Date date, String uiid) { java.util.Calendar cal = java.util.Calendar.getInstance(tmz); cal.setTime(date); cal.set(java.util.Calendar.HOUR, 1); cal.set(java.util.Calendar.HOUR_OF_DAY, 1); cal.set(java.util.Calendar.MINUTE, 0); cal.set(java.util.Calendar.SECOND, 0); cal.set(java.util.Calendar.MILLISECOND, ...
/** * Highlights a date on the calendar using the supplied uiid. (Selected * dates uiid takes precedence over highlighted dates uiid) * * @param date the date to be highlighted * @param uiid a custom uiid to be used in highlighting the date */
Highlights a date on the calendar using the supplied uiid. (Selected dates uiid takes precedence over highlighted dates uiid)
highlightDate
{ "repo_name": "diamonddevgroup/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/Calendar.java", "license": "gpl-2.0", "size": 49055 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Date" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,913,420
public String determineUrl() { if (StringUtils.hasText(this.url)) { return this.url; } String url = this.embeddedDatabaseConnection.getUrl(this.name); if (!StringUtils.hasText(url)) { throw new DataSourceBeanCreationException(this.embeddedDatabaseConnection, this.environment, "url"); } return ...
String function() { if (StringUtils.hasText(this.url)) { return this.url; } String url = this.embeddedDatabaseConnection.getUrl(this.name); if (!StringUtils.hasText(url)) { throw new DataSourceBeanCreationException(this.embeddedDatabaseConnection, this.environment, "url"); } return url; }
/** * Determine the url to use based on this configuration and the environment. * @return the url to use * @since 1.4.0 */
Determine the url to use based on this configuration and the environment
determineUrl
{ "repo_name": "nebhale/spring-boot", "path": "spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java", "license": "apache-2.0", "size": 12493 }
[ "org.springframework.util.StringUtils" ]
import org.springframework.util.StringUtils;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
886,484
public void move(Dimension x, Dimension y) { from.move(x, y); to.move(x, y); }
void function(Dimension x, Dimension y) { from.move(x, y); to.move(x, y); }
/** * Moves the line. * * @param x * Horizontal displacement. * @param y * Vertical displacement. */
Moves the line
move
{ "repo_name": "zgrannan/Technical-Theatre-Assistant", "path": "src/com/zgrannan/crewandroid/Geometry.java", "license": "mit", "size": 10783 }
[ "com.zgrannan.crewandroid.Util" ]
import com.zgrannan.crewandroid.Util;
import com.zgrannan.crewandroid.*;
[ "com.zgrannan.crewandroid" ]
com.zgrannan.crewandroid;
929,940
private boolean deleteAction(Action<Boolean> deletion, String type) { boolean deleted; try { LOG.trace("Start deleting {} under {}", type, dir); deleted = deletion.act(); } catch (PathIsNotEmptyDirectoryException exception) { // N.B. HDFS throws this exception when we try t...
boolean function(Action<Boolean> deletion, String type) { boolean deleted; try { LOG.trace(STR, type, dir); deleted = deletion.act(); } catch (PathIsNotEmptyDirectoryException exception) { LOG.debug(STR + STR, dir); LOG.trace(STR, dir, exception); deleted = false; } catch (IOException ioe) { LOG.info(STR + STR, type, d...
/** * Perform a delete on a specified type. * @param deletion a delete * @param type possible values are 'files', 'subdirs', 'dirs' * @return true if it deleted successfully, false otherwise */
Perform a delete on a specified type
deleteAction
{ "repo_name": "Eshcar/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/cleaner/CleanerChore.java", "license": "apache-2.0", "size": 20754 }
[ "java.io.IOException", "org.apache.hadoop.fs.PathIsNotEmptyDirectoryException" ]
import java.io.IOException; import org.apache.hadoop.fs.PathIsNotEmptyDirectoryException;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,380,210
public Set<NodeKey> removedChildren();
Set<NodeKey> function();
/** * Returns the set of children that have been removed * * @return a {@code non-null} Set */
Returns the set of children that have been removed
removedChildren
{ "repo_name": "flownclouds/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/MutableCachedNode.java", "license": "apache-2.0", "size": 22992 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,219,850
private final long copyFileEntry(IndexOutput dataOut, FileEntry fileEntry) throws IOException { final IndexInput is = fileEntry.dir.openInput(fileEntry.file, IOContext.READONCE); boolean success = false; try { final long startPtr = dataOut.getFilePointer(); final long length = fileEntry....
final long function(IndexOutput dataOut, FileEntry fileEntry) throws IOException { final IndexInput is = fileEntry.dir.openInput(fileEntry.file, IOContext.READONCE); boolean success = false; try { final long startPtr = dataOut.getFilePointer(); final long length = fileEntry.length; dataOut.copyBytes(is, length); long e...
/** * Copy the contents of the file with specified extension into the provided * output stream. */
Copy the contents of the file with specified extension into the provided output stream
copyFileEntry
{ "repo_name": "williamchengit/TestRepo", "path": "solr-4.9.0/lucene/core/src/java/org/apache/lucene/store/CompoundFileWriter.java", "license": "apache-2.0", "size": 11258 }
[ "java.io.IOException", "org.apache.lucene.util.IOUtils" ]
import java.io.IOException; import org.apache.lucene.util.IOUtils;
import java.io.*; import org.apache.lucene.util.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
2,227,553
public void createDOM(Document doc) { if (isEmpty()) { return; } // fontconfig --> alias Element aliasElement = doc.createElement("alias"); Node root = doc.getElementsByTagName("fontconfig").item(0); root.appendChild(aliasElement); // fontconfig ...
void function(Document doc) { if (isEmpty()) { return; } Element aliasElement = doc.createElement("alias"); Node root = doc.getElementsByTagName(STR).item(0); root.appendChild(aliasElement); Element familyElement = doc.createElement(STR); familyElement.setTextContent(this.family); aliasElement.appendChild(familyElement...
/** * Create DOM and insert into document. * * @param doc Document to create elements */
Create DOM and insert into document
createDOM
{ "repo_name": "guoyunhe/fontweak", "path": "src/me/guoyunhe/fontweak/FontAlias.java", "license": "gpl-3.0", "size": 3146 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,669,377
public static void drawPicture2(Graphics2D g2) { Stickman s1 = new Stickman(50,300,100); g2.setColor(Color.GREEN); g2.draw(s1); // Make a black stickman that's half the size, // and moved over 50 pixels in x direction // and 100 pixels in the y direction Shape s2 = ShapeTransforms.scaledCopyOfL...
static void function(Graphics2D g2) { Stickman s1 = new Stickman(50,300,100); g2.setColor(Color.GREEN); g2.draw(s1); Shape s2 = ShapeTransforms.scaledCopyOfLL(s1,0.5,0.5); s2 = ShapeTransforms.translatedCopyOf(s2,50,150); g2.setColor(Color.BLACK); g2.draw(s2); s2 = ShapeTransforms.scaledCopyOfLL(s2,2,2); s2 = ShapeTran...
/** Draw a picture with a few stickmans */
Draw a picture with a few stickmans
drawPicture2
{ "repo_name": "UCSB-CS56-W14/CS56-W14-lab06", "path": "src/edu/ucsb/cs56/W14/drawings/ricklee/advanced/AllMyDrawings.java", "license": "mit", "size": 4371 }
[ "edu.ucsb.cs56.w14.drawings.utilities.ShapeTransforms", "java.awt.BasicStroke", "java.awt.Graphics2D", "java.awt.Stroke" ]
import edu.ucsb.cs56.w14.drawings.utilities.ShapeTransforms; import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.Stroke;
import edu.ucsb.cs56.w14.drawings.utilities.*; import java.awt.*;
[ "edu.ucsb.cs56", "java.awt" ]
edu.ucsb.cs56; java.awt;
2,068,474
public static Embellishment getLayerWithMatchingActivateCommand(GamePiece piece, KeyStroke stroke, boolean active) { for (Embellishment layer = (Embellishment) Decorator.getDecorator(piece, Embellishment.class); layer != null; layer = (Embellishment) Decorator .getDecorator(layer.piece, Embellishment.clas...
static Embellishment function(GamePiece piece, KeyStroke stroke, boolean active) { for (Embellishment layer = (Embellishment) Decorator.getDecorator(piece, Embellishment.class); layer != null; layer = (Embellishment) Decorator .getDecorator(layer.piece, Embellishment.class)) { for (int i = 0; i < layer.activateKey.leng...
/** * If the argument GamePiece contains a Layer whose "activate" command matches * the given keystroke, and whose active status matches the boolean argument, * return that Layer */
If the argument GamePiece contains a Layer whose "activate" command matches the given keystroke, and whose active status matches the boolean argument, return that Layer
getLayerWithMatchingActivateCommand
{ "repo_name": "caiusb/vassal", "path": "src/VASSAL/counters/Embellishment.java", "license": "lgpl-2.1", "size": 40942 }
[ "java.awt.GridLayout", "java.util.List", "javax.swing.Box", "javax.swing.BoxLayout", "javax.swing.JCheckBox", "javax.swing.JLabel", "javax.swing.JPanel", "javax.swing.JRadioButton", "javax.swing.JTextField", "javax.swing.KeyStroke" ]
import java.awt.GridLayout; import java.util.List; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; import javax.swing.KeyStroke;
import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
67,068
protected void reset() { systemBits.clear(); componentBits.clear(); uuid = UUID.randomUUID(); }
void function() { systemBits.clear(); componentBits.clear(); uuid = UUID.randomUUID(); }
/** * Make entity ready for re-use. * Will generate a new uuid for the entity. */
Make entity ready for re-use. Will generate a new uuid for the entity
reset
{ "repo_name": "nhydock/gdx-artemis", "path": "src/com/artemis/Entity.java", "license": "apache-2.0", "size": 6630 }
[ "java.util.UUID" ]
import java.util.UUID;
import java.util.*;
[ "java.util" ]
java.util;
2,684,111
public void addListSelectionListener(ListSelectionListener l) { list.addListSelectionListener(l); }
void function(ListSelectionListener l) { list.addListSelectionListener(l); }
/** * Add a ListSelectionListener to the JList component displayed as part of this component. */
Add a ListSelectionListener to the JList component displayed as part of this component
addListSelectionListener
{ "repo_name": "luizvneto/DC-UFSCar-ES2-201701-Grupo-NichRosaHugoLuizRodr", "path": "src/main/java/net/sf/jabref/gui/customentrytypes/FieldSetComponent.java", "license": "mit", "size": 11631 }
[ "javax.swing.event.ListSelectionListener" ]
import javax.swing.event.ListSelectionListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
2,495,431
public static String convertPowerPointDocumentToOtherFileFormats(String fileName, ValidFormatsEnum designatedFormat, String storageName, String folderName) throws InvalidKeyException, NoSuchAlgorithmException, IOException { String localFilePath = null; if(fileName == null || fileName.length() == 0) { t...
static String function(String fileName, ValidFormatsEnum designatedFormat, String storageName, String folderName) throws InvalidKeyException, NoSuchAlgorithmException, IOException { String localFilePath = null; if(fileName == null fileName.length() == 0) { throw new IllegalArgumentException(STR); } if(designatedFormat ...
/** * Convert PowerPoint document to other File formats * @param fileName Name of the file stored on cloud * @param designatedFormat Valid formats are tiff, pdf, xps, odp, ppsx, pptm, ppsm, potx, potm and html * @param storageName If file is stored at third party storage e.g. Amazon S3, Azure, Dropbox, Google ...
Convert PowerPoint document to other File formats
convertPowerPointDocumentToOtherFileFormats
{ "repo_name": "asposeforcloud/Aspose_Cloud_SDK_For_Android", "path": "asposecloudsdk/src/main/java/com/aspose/cloud/sdk/slides/api/Document.java", "license": "mit", "size": 17711 }
[ "android.net.Uri", "com.aspose.cloud.sdk.common.Utils", "com.aspose.cloud.sdk.slides.model.ValidFormatsEnum", "java.io.IOException", "java.io.InputStream", "java.security.InvalidKeyException", "java.security.NoSuchAlgorithmException" ]
import android.net.Uri; import com.aspose.cloud.sdk.common.Utils; import com.aspose.cloud.sdk.slides.model.ValidFormatsEnum; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException;
import android.net.*; import com.aspose.cloud.sdk.common.*; import com.aspose.cloud.sdk.slides.model.*; import java.io.*; import java.security.*;
[ "android.net", "com.aspose.cloud", "java.io", "java.security" ]
android.net; com.aspose.cloud; java.io; java.security;
71,597
void updateConfiguration() throws IOException;
void updateConfiguration() throws IOException;
/** * Update the configuration and trigger an online config change * on all the regionservers. * @throws IOException if a remote or network exception occurs */
Update the configuration and trigger an online config change on all the regionservers
updateConfiguration
{ "repo_name": "ChinmaySKulkarni/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 101053 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,553,376
public boolean isDeleted() throws DotStateException, DotDataException, DotSecurityException { return APILocator.getVersionableAPI().isDeleted(this); }
boolean function() throws DotStateException, DotDataException, DotSecurityException { return APILocator.getVersionableAPI().isDeleted(this); }
/** * Returns the deleted. * @return boolean * @throws DotSecurityException * @throws DotDataException * @throws DotStateException */
Returns the deleted
isDeleted
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotmarketing/beans/WebAsset.java", "license": "gpl-3.0", "size": 7046 }
[ "com.dotmarketing.business.APILocator", "com.dotmarketing.business.DotStateException", "com.dotmarketing.exception.DotDataException", "com.dotmarketing.exception.DotSecurityException" ]
import com.dotmarketing.business.APILocator; import com.dotmarketing.business.DotStateException; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException;
import com.dotmarketing.business.*; import com.dotmarketing.exception.*;
[ "com.dotmarketing.business", "com.dotmarketing.exception" ]
com.dotmarketing.business; com.dotmarketing.exception;
2,223,447
protected void drawMonthNums(Canvas canvas) { int y = (((mRowHeight + MINI_DAY_NUMBER_TEXT_SIZE) / 2) - DAY_SEPARATOR_WIDTH) + getMonthHeaderSize(); final float dayWidthHalf = (mWidth - mEdgePadding * 2) / (mNumDays * 2.0f); int j = findDayOffset(); for (int dayNumber...
void function(Canvas canvas) { int y = (((mRowHeight + MINI_DAY_NUMBER_TEXT_SIZE) / 2) - DAY_SEPARATOR_WIDTH) + getMonthHeaderSize(); final float dayWidthHalf = (mWidth - mEdgePadding * 2) / (mNumDays * 2.0f); int j = findDayOffset(); for (int dayNumber = 1; dayNumber <= mNumCells; dayNumber++) { final int x = (int)((2...
/** * Draws the week and month day numbers for this week. Override this method * if you need different placement. * * @param canvas The canvas to draw on */
Draws the week and month day numbers for this week. Override this method if you need different placement
drawMonthNums
{ "repo_name": "LingjuAI/AssistantBySDK", "path": "datetimelib/src/main/java/com/wdullaer/materialdatetimepicker/date/MonthView.java", "license": "apache-2.0", "size": 31252 }
[ "android.graphics.Canvas" ]
import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
774,671
public Map<WorkerSlot, Collection<ExecutorDetails>> getSlotToExecutors();
Map<WorkerSlot, Collection<ExecutorDetails>> function();
/** * Get the mapping of slot to executors on that slot. * * @return the slot to the executors assigned to that slot. */
Get the mapping of slot to executors on that slot
getSlotToExecutors
{ "repo_name": "srdo/storm", "path": "storm-server/src/main/java/org/apache/storm/scheduler/SchedulerAssignment.java", "license": "apache-2.0", "size": 2749 }
[ "java.util.Collection", "java.util.Map" ]
import java.util.Collection; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,319,496
public List<SyntaxError> errors() { return Collections.unmodifiableList(errors); }
List<SyntaxError> function() { return Collections.unmodifiableList(errors); }
/** * Returns an unmodifiable view of the list of scanner, parser, and (perhaps) resolver errors * accumulated in this Starlark file. */
Returns an unmodifiable view of the list of scanner, parser, and (perhaps) resolver errors accumulated in this Starlark file
errors
{ "repo_name": "perezd/bazel", "path": "src/main/java/net/starlark/java/syntax/StarlarkFile.java", "license": "apache-2.0", "size": 4775 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
741,484
public boolean enableNdefPush() { try { return sService.enableNdefPush(); } catch (RemoteException e) { attemptDeadServiceRecovery(e); return false; } }
boolean function() { try { return sService.enableNdefPush(); } catch (RemoteException e) { attemptDeadServiceRecovery(e); return false; } }
/** * Enable NDEF Push feature. * <p>This API is for the Settings application. * @hide */
Enable NDEF Push feature. This API is for the Settings application
enableNdefPush
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/nfc/NfcAdapter.java", "license": "apache-2.0", "size": 53519 }
[ "android.os.RemoteException" ]
import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
2,887,598
public void testUpdateMemberFromAdminToMember() throws Exception { final JID needle = new JID("jane@" + Fixtures.XMPP_DOMAIN); final String GROUP_NAME = "Test Group A"; final DefaultGroupProvider provider = new DefaultGroupProvider(); provider.createGroup(GROUP_NAME); provide...
void function() throws Exception { final JID needle = new JID("jane@" + Fixtures.XMPP_DOMAIN); final String GROUP_NAME = STR; final DefaultGroupProvider provider = new DefaultGroupProvider(); provider.createGroup(GROUP_NAME); provider.addMember(GROUP_NAME, needle, true); provider.updateMember(GROUP_NAME, needle, false)...
/** * Verifies that {@link DefaultGroupProvider#updateMember(String, JID, boolean)} sets an admin to a member */
Verifies that <code>DefaultGroupProvider#updateMember(String, JID, boolean)</code> sets an admin to a member
testUpdateMemberFromAdminToMember
{ "repo_name": "guusdk/Openfire", "path": "xmppserver/src/test/java/org/jivesoftware/openfire/group/DefaultGroupProviderTest.java", "license": "apache-2.0", "size": 33958 }
[ "org.jivesoftware.Fixtures" ]
import org.jivesoftware.Fixtures;
import org.jivesoftware.*;
[ "org.jivesoftware" ]
org.jivesoftware;
999,318
public MailingTemplate getByID(int id) throws PersistenceException;
MailingTemplate function(int id) throws PersistenceException;
/** * Retrieves MailingTemplate by ID * * @param id * unique MailingTemplate identification number * @return the MailingTemplate stored with the given id, or null if no such * MailingTemplate exists * @throws PersistenceException * if communication to the underlying persi...
Retrieves MailingTemplate by ID
getByID
{ "repo_name": "utebock/spendenverwaltung", "path": "src/main/java/at/fraubock/spendenverwaltung/interfaces/dao/IMailingTemplateDAO.java", "license": "gpl-3.0", "size": 2577 }
[ "at.fraubock.spendenverwaltung.interfaces.domain.MailingTemplate", "at.fraubock.spendenverwaltung.interfaces.exceptions.PersistenceException" ]
import at.fraubock.spendenverwaltung.interfaces.domain.MailingTemplate; import at.fraubock.spendenverwaltung.interfaces.exceptions.PersistenceException;
import at.fraubock.spendenverwaltung.interfaces.domain.*; import at.fraubock.spendenverwaltung.interfaces.exceptions.*;
[ "at.fraubock.spendenverwaltung" ]
at.fraubock.spendenverwaltung;
2,235,608
public void retractObject(final InternalFactHandle factHandle, final PropagationContext context, final InternalWorkingMemory workingMemory) { checkDirty(); doRetractObject( factHandle, context, workingMemory); }
void function(final InternalFactHandle factHandle, final PropagationContext context, final InternalWorkingMemory workingMemory) { checkDirty(); doRetractObject( factHandle, context, workingMemory); }
/** * Retract the <code>FactHandleimpl</code> from the <code>Rete</code> network. Also remove the * <code>FactHandleImpl</code> from the node memory. * * @param factHandle The fact handle. * @param context The propagation context. * @param workingMemory The working memory session....
Retract the <code>FactHandleimpl</code> from the <code>Rete</code> network. Also remove the <code>FactHandleImpl</code> from the node memory
retractObject
{ "repo_name": "romartin/drools", "path": "drools-core/src/main/java/org/drools/core/reteoo/ObjectTypeNode.java", "license": "apache-2.0", "size": 31103 }
[ "org.drools.core.common.InternalFactHandle", "org.drools.core.common.InternalWorkingMemory", "org.drools.core.spi.PropagationContext" ]
import org.drools.core.common.InternalFactHandle; import org.drools.core.common.InternalWorkingMemory; import org.drools.core.spi.PropagationContext;
import org.drools.core.common.*; import org.drools.core.spi.*;
[ "org.drools.core" ]
org.drools.core;
2,350,184
@Override public void submit() throws IOException, InterruptedException, ClassNotFoundException { if (sqlUtil == null) sqlUtil = SMSQLUtil.getInstance(super.getConfiguration().get( MRConstants.SPLICE_JDBC_STR)); if (conn == null) try { conn = sqlUtil.createConn(); sqlUtil.disableAutoCommi...
void function() throws IOException, InterruptedException, ClassNotFoundException { if (sqlUtil == null) sqlUtil = SMSQLUtil.getInstance(super.getConfiguration().get( MRConstants.SPLICE_JDBC_STR)); if (conn == null) try { conn = sqlUtil.createConn(); sqlUtil.disableAutoCommit(conn); String pTxsID = sqlUtil.getTransactio...
/** * Do not override this function! submit() creates one transaction for all * mappers Thus data read from Splice is consistent. */
Do not override this function! submit() creates one transaction for all mappers Thus data read from Splice is consistent
submit
{ "repo_name": "splicemachine/spliceengine", "path": "hbase_sql/src/main/java/com/splicemachine/mrio/api/mapreduce/SpliceJob.java", "license": "agpl-3.0", "size": 4084 }
[ "com.splicemachine.mrio.MRConstants", "com.splicemachine.mrio.api.core.SMSQLUtil", "java.io.IOException", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import com.splicemachine.mrio.MRConstants; import com.splicemachine.mrio.api.core.SMSQLUtil; import java.io.IOException; import java.sql.PreparedStatement; import java.sql.SQLException;
import com.splicemachine.mrio.*; import com.splicemachine.mrio.api.core.*; import java.io.*; import java.sql.*;
[ "com.splicemachine.mrio", "java.io", "java.sql" ]
com.splicemachine.mrio; java.io; java.sql;
208,706
public int addInterfaceMethodref( final String class_name, final String method_name, final String signature ) { int ret; int class_index; int name_and_type_index; if ((ret = lookupInterfaceMethodref(class_name, method_name, signature)) != -1) { return ret; // Already in C...
int function( final String class_name, final String method_name, final String signature ) { int ret; int class_index; int name_and_type_index; if ((ret = lookupInterfaceMethodref(class_name, method_name, signature)) != -1) { return ret; } adjustSize(); class_index = addClass(class_name); name_and_type_index = addNameAn...
/** * Add a new InterfaceMethodref constant to the ConstantPool, if it is not already * in there. * * @param class_name class name string to add * @param method_name method name string to add * @param signature signature string to add * @return index of entry */
Add a new InterfaceMethodref constant to the ConstantPool, if it is not already in there
addInterfaceMethodref
{ "repo_name": "apache/commons-bcel", "path": "src/main/java/org/apache/bcel/generic/ConstantPoolGen.java", "license": "apache-2.0", "size": 28295 }
[ "org.apache.bcel.classfile.ConstantInterfaceMethodref" ]
import org.apache.bcel.classfile.ConstantInterfaceMethodref;
import org.apache.bcel.classfile.*;
[ "org.apache.bcel" ]
org.apache.bcel;
1,972,024
public void setRoyaltyAmt (BigDecimal RoyaltyAmt) { set_Value (COLUMNNAME_RoyaltyAmt, RoyaltyAmt); }
void function (BigDecimal RoyaltyAmt) { set_Value (COLUMNNAME_RoyaltyAmt, RoyaltyAmt); }
/** Set Royalty Amount. @param RoyaltyAmt (Included) Amount for copyright, etc. */
Set Royalty Amount
setRoyaltyAmt
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/model/X_I_Product.java", "license": "gpl-2.0", "size": 27680 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,572,150
static LinkedField.IdMode getIdMode(ParserKlass parserKlass) { ParserField[] parserFields = parserKlass.getFields(); boolean noDup = true; Set<String> present = new HashSet<>(parserFields.length); for (ParserField parserField : parserFields) { if (!present.add(parserFiel...
static LinkedField.IdMode getIdMode(ParserKlass parserKlass) { ParserField[] parserFields = parserKlass.getFields(); boolean noDup = true; Set<String> present = new HashSet<>(parserFields.length); for (ParserField parserField : parserFields) { if (!present.add(parserField.getName().toString())) { noDup = false; break; ...
/** * Makes sure that the field IDs passed to the shape builder are all unique. */
Makes sure that the field IDs passed to the shape builder are all unique
getIdMode
{ "repo_name": "smarr/Truffle", "path": "espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/impl/LinkedKlassFieldLayout.java", "license": "gpl-2.0", "size": 12709 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,756,842
EReference getExternal_Allowance_Person();
EReference getExternal_Allowance_Person();
/** * Returns the meta object for the container reference '{@link TaxationWithRoot.External_Allowance#getPerson <em>Person</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the container reference '<em>Person</em>'. * @see TaxationWithRoot.External_Allowance#getPerso...
Returns the meta object for the container reference '<code>TaxationWithRoot.External_Allowance#getPerson Person</code>'.
getExternal_Allowance_Person
{ "repo_name": "viatra/VIATRA-Generator", "path": "Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/TaxationPackage.java", "license": "epl-1.0", "size": 295635 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,233,063
void upgradeIfNeeded(DD_Version dictionaryVersion, TransactionController tc, Properties startParams) throws StandardException { // database has been upgrade with a later engine version than this? if (dictionaryVersion.majorVersionNumber > majorVersionNumber) { throw StandardException.newException(...
void upgradeIfNeeded(DD_Version dictionaryVersion, TransactionController tc, Properties startParams) throws StandardException { if (dictionaryVersion.majorVersionNumber > majorVersionNumber) { throw StandardException.newException(SQLState.LANG_CANT_UPGRADE_CATALOGS, dictionaryVersion, this); } boolean minorOnly = false...
/** * Upgrade the data dictionary catalogs to the version represented by this * DD_Version. * * @param dictionaryVersion the version of the data dictionary tables. * @exception StandardException Ooops */
Upgrade the data dictionary catalogs to the version represented by this DD_Version
upgradeIfNeeded
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java", "license": "apache-2.0", "size": 29639 }
[ "java.util.Properties", "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.reference.SQLState", "org.apache.derby.iapi.services.monitor.Monitor", "org.apache.derby.iapi.sql.dictionary.DataDictionary", "org.apache.derby.iapi.store.access.TransactionController", "org.apache.derby.iapi...
import java.util.Properties; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.services.monitor.Monitor; import org.apache.derby.iapi.sql.dictionary.DataDictionary; import org.apache.derby.iapi.store.access.TransactionController; import o...
import java.util.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.services.monitor.*; import org.apache.derby.iapi.sql.dictionary.*; import org.apache.derby.iapi.store.access.*; import org.apache.derby.iapi.util.*;
[ "java.util", "org.apache.derby" ]
java.util; org.apache.derby;
1,691,983
public boolean createSPSManager(final Configuration conf, final String spsMode) { // sps manager manages the user invoked sps paths and does the movement. // StoragePolicySatisfier(SPS) configs boolean storagePolicyEnabled = conf.getBoolean( DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, ...
boolean function(final Configuration conf, final String spsMode) { boolean storagePolicyEnabled = conf.getBoolean( DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_DEFAULT); String modeVal = spsMode; if (org.apache.commons.lang3.StringUtils.isBlank(modeVal)) { modeVal = conf.get(DF...
/** * Create SPS manager instance. It manages the user invoked sps paths and does * the movement. * * @param conf * configuration * @param spsMode * satisfier mode * @return true if the instance is successfully created, false otherwise. */
Create SPS manager instance. It manages the user invoked sps paths and does the movement
createSPSManager
{ "repo_name": "dierobotsdie/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 194556 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.DFSConfigKeys", "org.apache.hadoop.hdfs.protocol.HdfsConstants", "org.apache.hadoop.hdfs.server.namenode.sps.StoragePolicySatisfyManager", "org.apache.hadoop.util.StringUtils" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.server.namenode.sps.StoragePolicySatisfyManager; import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.sps.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,519,380
@Column(name = "bereich") public int getBereich() { return bereich; }
@Column(name = STR) int function() { return bereich; }
/** * Bereich entspricht der 2.-4. Ziffer. * * @return */
Bereich entspricht der 2.-4. Ziffer
getBereich
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/business/fibu/kost/Kost1DO.java", "license": "gpl-3.0", "size": 5718 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
2,184,928
@Override public void onOutputAppend( String noteId, String paragraphId, int index, String appId, String output) { Message msg = new Message(OP.APP_APPEND_OUTPUT) .put("noteId", noteId) .put("paragraphId", paragraphId) .put("index", index) .put("appId", appId) .put(...
void function( String noteId, String paragraphId, int index, String appId, String output) { Message msg = new Message(OP.APP_APPEND_OUTPUT) .put(STR, noteId) .put(STR, paragraphId) .put("index", index) .put("appId", appId) .put("data", output); broadcast(noteId, msg); }
/** * When application append output * @param noteId * @param paragraphId * @param appId * @param output */
When application append output
onOutputAppend
{ "repo_name": "Altiscale/incubator-zeppelin", "path": "zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java", "license": "apache-2.0", "size": 74250 }
[ "org.apache.zeppelin.notebook.socket.Message" ]
import org.apache.zeppelin.notebook.socket.Message;
import org.apache.zeppelin.notebook.socket.*;
[ "org.apache.zeppelin" ]
org.apache.zeppelin;
1,342,810
public void setMethodDefaults(String method) { String defaultMethod = m_properties.getProperty(OutputKeys.METHOD); if((null == defaultMethod) || !defaultMethod.equals(method) // bjm - add the next condition as a hack // but it is because both output_xml.properties and ...
void function(String method) { String defaultMethod = m_properties.getProperty(OutputKeys.METHOD); if((null == defaultMethod) !defaultMethod.equals(method) defaultMethod.equals("xml") ) { Properties savedProps = m_properties; Properties newDefaults = OutputPropertiesFactory.getDefaultMethodProperties(method); m_propert...
/** * Reset the default properties based on the method. * * @param method the method value. * @see javax.xml.transform.OutputKeys */
Reset the default properties based on the method
setMethodDefaults
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/templates/OutputProperties.java", "license": "gpl-3.0", "size": 23242 }
[ "java.util.Properties", "javax.xml.transform.OutputKeys", "org.apache.xml.serializer.OutputPropertiesFactory" ]
import java.util.Properties; import javax.xml.transform.OutputKeys; import org.apache.xml.serializer.OutputPropertiesFactory;
import java.util.*; import javax.xml.transform.*; import org.apache.xml.serializer.*;
[ "java.util", "javax.xml", "org.apache.xml" ]
java.util; javax.xml; org.apache.xml;
86,778
private void unpersist () { SharedPreferences.Editor editor = getPrefs().edit(); editor.remove(options.getIdStr()); if (Build.VERSION.SDK_INT < 9) { editor.commit(); } else { editor.apply(); } }
void function () { SharedPreferences.Editor editor = getPrefs().edit(); editor.remove(options.getIdStr()); if (Build.VERSION.SDK_INT < 9) { editor.commit(); } else { editor.apply(); } }
/** * Remove the notification from the Android shared Preferences. */
Remove the notification from the Android shared Preferences
unpersist
{ "repo_name": "nozelrosario/Dcare", "path": "plugins/de.appplant.cordova.plugin.local-notification/src/android/notification/Notification.java", "license": "apache-2.0", "size": 9625 }
[ "android.content.SharedPreferences", "android.os.Build" ]
import android.content.SharedPreferences; import android.os.Build;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
121,689
Object getUR() throws IOException;
Object getUR() throws IOException;
/** * Returns the unified resource that is attached to this <code>Manager</code>. A unified resource can be anything * that is essential for the specific <code>Manager</code> implementation. * * @return the unified resource attachted to this <code>Manager</code> or <code>null</code> if there is non...
Returns the unified resource that is attached to this <code>Manager</code>. A unified resource can be anything that is essential for the specific <code>Manager</code> implementation
getUR
{ "repo_name": "cismet/cids-custom-sudplan", "path": "src/main/java/de/cismet/cids/custom/sudplan/Manager.java", "license": "lgpl-3.0", "size": 1866 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,958,474
@Deployment public static Archive<?> getTestArchive() { final WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war") .addClasses(GreeterServlet.class); final JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, "test.jar") .addClass(Greeter.class); final En...
static Archive<?> function() { final WebArchive war = ShrinkWrap.create(WebArchive.class, STR) .addClasses(GreeterServlet.class); final JavaArchive ejb = ShrinkWrap.create(JavaArchive.class, STR) .addClass(Greeter.class); final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, STR) .setApplicationXML(S...
/** * Deployment for the test * @return */
Deployment for the test
getTestArchive
{ "repo_name": "arquillian/arquillian_deprecated", "path": "containers/glassfish-remote-3/src/test/java/org/jboss/arquillian/container/glassfish/remote_3/GlassFishJSR88RemoteContainerEARTestCase.java", "license": "apache-2.0", "size": 3439 }
[ "org.jboss.shrinkwrap.api.Archive", "org.jboss.shrinkwrap.api.ShrinkWrap", "org.jboss.shrinkwrap.api.spec.EnterpriseArchive", "org.jboss.shrinkwrap.api.spec.JavaArchive", "org.jboss.shrinkwrap.api.spec.WebArchive" ]
import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.api.*; import org.jboss.shrinkwrap.api.spec.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
88,349
public final static void copy(InputStream in, OutputStream out) throws IOException { byte[] buffer = new byte[0xffff]; int len; try { while ((len = in.read(buffer)) != -1) out.write(buffer, 0, len); } finally { closeEL(in); closeEL(out); } }
final static void function(InputStream in, OutputStream out) throws IOException { byte[] buffer = new byte[0xffff]; int len; try { while ((len = in.read(buffer)) != -1) out.write(buffer, 0, len); } finally { closeEL(in); closeEL(out); } }
/** * copy a inputstream to a outputstream * * @param in * @param out * @throws IOException */
copy a inputstream to a outputstream
copy
{ "repo_name": "lucee/unoffical-Lucee-no-jre", "path": "source/java/loader/src/lucee/loader/engine/CFMLEngineFactorySupport.java", "license": "lgpl-2.1", "size": 8179 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
530,292
@Generated @Selector("setWeight:") public native void setWeight(float value);
@Selector(STR) native void function(float value);
/** * A scale factor to apply to each feature channel sum. */
A scale factor to apply to each feature channel sum
setWeight
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSNNReductionFeatureChannelsSumNode.java", "license": "apache-2.0", "size": 4994 }
[ "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,541,582
protected BusinessObjectDataEntity createBusinessObjectDataEntity(BusinessObjectFormatEntity businessObjectFormatEntity, String businessObjectDataPartitionValue, List<String> businessObjectDataSubPartitionValues, Integer businessObjectDataVersion, Boolean businessObjectDataLatestVersion, BusinessObj...
BusinessObjectDataEntity function(BusinessObjectFormatEntity businessObjectFormatEntity, String businessObjectDataPartitionValue, List<String> businessObjectDataSubPartitionValues, Integer businessObjectDataVersion, Boolean businessObjectDataLatestVersion, BusinessObjectDataStatusEntity businessObjectDataStatusEntity) ...
/** * Creates and persists a new business object data entity. * * @return the newly created business object data entity. */
Creates and persists a new business object data entity
createBusinessObjectDataEntity
{ "repo_name": "seoj/herd", "path": "herd-code/herd-dao/src/test/java/org/finra/herd/dao/AbstractDaoTest.java", "license": "apache-2.0", "size": 127305 }
[ "java.util.List", "org.finra.herd.model.jpa.BusinessObjectDataEntity", "org.finra.herd.model.jpa.BusinessObjectDataStatusEntity", "org.finra.herd.model.jpa.BusinessObjectFormatEntity" ]
import java.util.List; import org.finra.herd.model.jpa.BusinessObjectDataEntity; import org.finra.herd.model.jpa.BusinessObjectDataStatusEntity; import org.finra.herd.model.jpa.BusinessObjectFormatEntity;
import java.util.*; import org.finra.herd.model.jpa.*;
[ "java.util", "org.finra.herd" ]
java.util; org.finra.herd;
1,538,487
DataNode[] listDataNodes() { DataNode[] list = new DataNode[dataNodes.size()]; for (int i = 0; i < dataNodes.size(); i++) { list[i] = dataNodes.get(i).datanode; } return list; }
DataNode[] listDataNodes() { DataNode[] list = new DataNode[dataNodes.size()]; for (int i = 0; i < dataNodes.size(); i++) { list[i] = dataNodes.get(i).datanode; } return list; }
/** * Returns the current set of datanodes */
Returns the current set of datanodes
listDataNodes
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java", "license": "apache-2.0", "size": 100357 }
[ "org.apache.hadoop.hdfs.server.datanode.DataNode" ]
import org.apache.hadoop.hdfs.server.datanode.DataNode;
import org.apache.hadoop.hdfs.server.datanode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,029,223
ResultSet getNativeResultSet(ResultSet rs) throws SQLException;
ResultSet getNativeResultSet(ResultSet rs) throws SQLException;
/** * Retrieve the underlying native JDBC ResultSet for the given statement. * Supposed to return the given ResultSet if not capable of unwrapping. * @param rs the ResultSet handle, potentially wrapped by a connection pool * @return the underlying native JDBC ResultSet, if possible; * else, the original Conne...
Retrieve the underlying native JDBC ResultSet for the given statement. Supposed to return the given ResultSet if not capable of unwrapping
getNativeResultSet
{ "repo_name": "raedle/univis", "path": "lib/springframework-1.2.8/src/org/springframework/jdbc/support/nativejdbc/NativeJdbcExtractor.java", "license": "lgpl-2.1", "size": 7671 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
766,295
public T method(Object instance, String method) { return expression(new MethodCallExpression(instance, method)); }
T function(Object instance, String method) { return expression(new MethodCallExpression(instance, method)); }
/** * Evaluates an expression using the <a * href="http://camel.apache.org/bean-language.html>bean language</a> which * basically means the bean is invoked to determine the expression value. * * @param instance the instance of the bean * @param method the name of the method to invoke on th...
Evaluates an expression using the bean language which basically means the bean is invoked to determine the expression value
method
{ "repo_name": "ullgren/camel", "path": "core/camel-core-engine/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java", "license": "apache-2.0", "size": 40867 }
[ "org.apache.camel.model.language.MethodCallExpression" ]
import org.apache.camel.model.language.MethodCallExpression;
import org.apache.camel.model.language.*;
[ "org.apache.camel" ]
org.apache.camel;
2,269,582
public ConceptDefinition addConceptAndDefine(Class<? extends Concept> concept);
ConceptDefinition function(Class<? extends Concept> concept);
/** * Adds a concept - if already added the former found will be reused - and define additional concept details * @param concept - concept class * @return concept definition */
Adds a concept - if already added the former found will be reused - and define additional concept details
addConceptAndDefine
{ "repo_name": "de-jcup/code2doc", "path": "code2doc-core/src/main/java/de/jcup/code2doc/core/define/ElementContainerDefinition.java", "license": "apache-2.0", "size": 3689 }
[ "de.jcup.code2doc.api.Concept" ]
import de.jcup.code2doc.api.Concept;
import de.jcup.code2doc.api.*;
[ "de.jcup.code2doc" ]
de.jcup.code2doc;
478,602
public static HTTPEndpointV1[] find(Registry registry, Map<String, String> criteria) throws MetadataException { List<Base> list = find(registry, criteria, mediaType); return list.toArray(new HTTPEndpointV1[list.size()]); }
static HTTPEndpointV1[] function(Registry registry, Map<String, String> criteria) throws MetadataException { List<Base> list = find(registry, criteria, mediaType); return list.toArray(new HTTPEndpointV1[list.size()]); }
/** * Search all meta data instances of this particular type with the given search attributes * * @param criteria Key value map that has search attributes * @return */
Search all meta data instances of this particular type with the given search attributes
find
{ "repo_name": "shashikap/carbon-registry", "path": "components/registry/org.wso2.carbon.registry.metadata/src/main/java/org/wso2/carbon/registry/metadata/models/endpoint/HTTPEndpointV1.java", "license": "apache-2.0", "size": 4759 }
[ "java.util.List", "java.util.Map", "org.wso2.carbon.registry.core.Registry", "org.wso2.carbon.registry.metadata.Base", "org.wso2.carbon.registry.metadata.exception.MetadataException" ]
import java.util.List; import java.util.Map; import org.wso2.carbon.registry.core.Registry; import org.wso2.carbon.registry.metadata.Base; import org.wso2.carbon.registry.metadata.exception.MetadataException;
import java.util.*; import org.wso2.carbon.registry.core.*; import org.wso2.carbon.registry.metadata.*; import org.wso2.carbon.registry.metadata.exception.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,542,077
public InetAddress getListenAddress() { return listenAddress; }
InetAddress function() { return listenAddress; }
/** * Returns the IP address the server listens on. * Returns null if listening on the wildcard address. * * @return listen address or null */
Returns the IP address the server listens on. Returns null if listening on the wildcard address
getListenAddress
{ "repo_name": "talkincode/ToughRADIUS", "path": "src/main/java/org/tinyradius/util/RadiusServer.java", "license": "lgpl-3.0", "size": 19211 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,233,340
public void datasetChanged(DatasetChangeEvent event) { if (this.axis != null) { this.axis.configure(); } if (getParent() != null) { getParent().datasetChanged(event); } else { super.datasetChanged(event); } }
void function(DatasetChangeEvent event) { if (this.axis != null) { this.axis.configure(); } if (getParent() != null) { getParent().datasetChanged(event); } else { super.datasetChanged(event); } }
/** * Receives notification of a change to the plot's m_Dataset. * <P> * The axis ranges are updated if necessary. * * @param event information about the event (not used here). */
Receives notification of a change to the plot's m_Dataset. The axis ranges are updated if necessary
datasetChanged
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/PolarPlot.java", "license": "apache-2.0", "size": 39793 }
[ "org.jfree.data.general.DatasetChangeEvent" ]
import org.jfree.data.general.DatasetChangeEvent;
import org.jfree.data.general.*;
[ "org.jfree.data" ]
org.jfree.data;
1,361,500
EList<Collection> getMember();
EList<Collection> getMember();
/** * Returns the value of the '<em><b>Member</b></em>' containment reference list. * The list contents are of type {@link net.opengis.wfs20.MemberPropertyType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Member</em>' containment reference list isn't clear, * there really...
Returns the value of the 'Member' containment reference list. The list contents are of type <code>net.opengis.wfs20.MemberPropertyType</code>. If the meaning of the 'Member' containment reference list isn't clear, there really should be more of a description here...
getMember
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/ValueCollectionType.java", "license": "lgpl-2.1", "size": 9484 }
[ "java.util.Collection", "org.eclipse.emf.common.util.EList" ]
import java.util.Collection; import org.eclipse.emf.common.util.EList;
import java.util.*; import org.eclipse.emf.common.util.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
2,701,735
public void callEvent(Event event) { Bukkit.getPluginManager().callEvent(event); }
void function(Event event) { Bukkit.getPluginManager().callEvent(event); }
/** * Calls an event with the given details. * * @param event Event details * @throws IllegalStateException Thrown when an asynchronous event is * fired from synchronous code. */
Calls an event with the given details
callEvent
{ "repo_name": "games647/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/service/BukkitService.java", "license": "gpl-3.0", "size": 12069 }
[ "org.bukkit.Bukkit", "org.bukkit.event.Event" ]
import org.bukkit.Bukkit; import org.bukkit.event.Event;
import org.bukkit.*; import org.bukkit.event.*;
[ "org.bukkit", "org.bukkit.event" ]
org.bukkit; org.bukkit.event;
1,992,269
private JSType getJSType(Node n) { JSType jsType = n.getJSType(); if (jsType == null) { // TODO(user): This branch indicates a compiler bug, not worthy of // halting the compilation but we should log this and analyze to track // down why it happens. This is not critical and will be resolved ...
JSType function(Node n) { JSType jsType = n.getJSType(); if (jsType == null) { return getNativeType(UNKNOWN_TYPE); } else { return jsType; } }
/** * This method gets the JSType from the Node argument and verifies that it is * present. */
This method gets the JSType from the Node argument and verifies that it is present
getJSType
{ "repo_name": "dushmis/closure-compiler", "path": "src/com/google/javascript/jscomp/TypeValidator.java", "license": "apache-2.0", "size": 31137 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
399,986
public void findAndInit(Object someObj) { if (someObj instanceof MapPanel && someObj instanceof Container) { getContentPane().add((Container) someObj); JMenuBar jmb = ((MapPanel) someObj).getMapMenuBar(); if (jmb != null) { Debug.message("basic", "OpenMap...
void function(Object someObj) { if (someObj instanceof MapPanel && someObj instanceof Container) { getContentPane().add((Container) someObj); JMenuBar jmb = ((MapPanel) someObj).getMapMenuBar(); if (jmb != null) { Debug.message("basic", STR); getRootPane().setJMenuBar(jmb); } invalidate(); } if (someObj instanceof JMen...
/** * Called when an object is added to the MapHandler. */
Called when an object is added to the MapHandler
findAndInit
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/app/OpenMapApplet.java", "license": "mit", "size": 11727 }
[ "com.bbn.openmap.gui.MapPanel", "com.bbn.openmap.util.Debug", "java.awt.Container", "javax.swing.JMenuBar" ]
import com.bbn.openmap.gui.MapPanel; import com.bbn.openmap.util.Debug; import java.awt.Container; import javax.swing.JMenuBar;
import com.bbn.openmap.gui.*; import com.bbn.openmap.util.*; import java.awt.*; import javax.swing.*;
[ "com.bbn.openmap", "java.awt", "javax.swing" ]
com.bbn.openmap; java.awt; javax.swing;
892,656
public static byte[] convertHexToBytes(String s) { int len = s.length(); if (len % 2 != 0) { throw JdbcException.get(SQLErrorCode.HEX_STRING_ODD_1, s); } len /= 2; byte[] buff = new byte[len]; int mask = 0; int[] hex = HEX_DECODE; try { for (int i = 0; i < len; i++) { ...
static byte[] function(String s) { int len = s.length(); if (len % 2 != 0) { throw JdbcException.get(SQLErrorCode.HEX_STRING_ODD_1, s); } len /= 2; byte[] buff = new byte[len]; int mask = 0; int[] hex = HEX_DECODE; try { for (int i = 0; i < len; i++) { int d = hex[s.charAt(i + i)] << 4 hex[s.charAt(i + i + 1)]; mask = ...
/** * Convert a hex encoded string to a byte array. * * @param s * the hex encoded string * @return the byte array */
Convert a hex encoded string to a byte array
convertHexToBytes
{ "repo_name": "fengshao0907/wasp", "path": "src/main/java/com/alibaba/wasp/util/StringUtils.java", "license": "apache-2.0", "size": 27032 }
[ "com.alibaba.wasp.SQLErrorCode", "com.alibaba.wasp.jdbc.JdbcException" ]
import com.alibaba.wasp.SQLErrorCode; import com.alibaba.wasp.jdbc.JdbcException;
import com.alibaba.wasp.*; import com.alibaba.wasp.jdbc.*;
[ "com.alibaba.wasp" ]
com.alibaba.wasp;
681,100
public UpdateModelSnapshotResponse updateModelSnapshot(UpdateModelSnapshotRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::updateModelSn...
UpdateModelSnapshotResponse function(UpdateModelSnapshotRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::updateModelSnapshot, options, UpdateModelSnapshotResponse::fromXContent, Collections.emptySet()); }
/** * Updates a snapshot for a Machine Learning Job. * <p> * For additional info * see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html"> * ML UPDATE model snapshots documentation</a> * * @param request The request * @param options ...
Updates a snapshot for a Machine Learning Job. For additional info see ML UPDATE model snapshots documentation
updateModelSnapshot
{ "repo_name": "nknize/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java", "license": "apache-2.0", "size": 133260 }
[ "java.io.IOException", "java.util.Collections", "org.elasticsearch.client.ml.UpdateModelSnapshotRequest", "org.elasticsearch.client.ml.UpdateModelSnapshotResponse" ]
import java.io.IOException; import java.util.Collections; import org.elasticsearch.client.ml.UpdateModelSnapshotRequest; import org.elasticsearch.client.ml.UpdateModelSnapshotResponse;
import java.io.*; import java.util.*; import org.elasticsearch.client.ml.*;
[ "java.io", "java.util", "org.elasticsearch.client" ]
java.io; java.util; org.elasticsearch.client;
1,179,301
public void testRandom() throws IllegalBase64Exception { int iter; Random r = new Random(1234); for (iter = 0; iter < 1000; iter++) { byte[] b = new byte[r.nextInt(64)]; for (int i = 0; i < b.length; i++) b[i] = (byte) (r.nextInt(256)); String encoded = Base64.encode(b); byte[] decoded = Base64...
void function() throws IllegalBase64Exception { int iter; Random r = new Random(1234); for (iter = 0; iter < 1000; iter++) { byte[] b = new byte[r.nextInt(64)]; for (int i = 0; i < b.length; i++) b[i] = (byte) (r.nextInt(256)); String encoded = Base64.encode(b); byte[] decoded = Base64.decode(encoded); assertEquals(STR...
/** * Random test * * @throws IllegalBase64Exception */
Random test
testRandom
{ "repo_name": "spencerjackson/fred-staging", "path": "test/freenet/support/Base64Test.java", "license": "gpl-2.0", "size": 6566 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,760,968
HashMap<Tile, String> getTileImage();
HashMap<Tile, String> getTileImage();
/** Get the image file path for every possible Tile * @return the hashmap with Tile as key */
Get the image file path for every possible Tile
getTileImage
{ "repo_name": "quangvuwpi/SixesWild", "path": "SixesWild/src/sw/common/system/manager/IResourceManager.java", "license": "mit", "size": 978 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,994,080
public static Connection getDbConnection() throws SQLException { if (s_dataSource == null) { throw new IllegalStateException("You must set a DataSource before requesting a database connection."); } return s_dataSource.getConnection(); }
static Connection function() throws SQLException { if (s_dataSource == null) { throw new IllegalStateException(STR); } return s_dataSource.getConnection(); }
/** * Retrieve a database connection from the datasource. * * @return a {@link java.sql.Connection} object. * @throws java.sql.SQLException if any. */
Retrieve a database connection from the datasource
getDbConnection
{ "repo_name": "vishwaAbhinav/OpenNMS", "path": "opennms-util/src/main/java/org/opennms/core/resource/Vault.java", "license": "gpl-2.0", "size": 9202 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,140,001
public synchronized void unload (String fileName) { // check if it's currently processed (and the first element in the stack, thus not a dependency) // and cancel if necessary if (tasks.size() > 0) { AssetLoadingTask currAsset = tasks.firstElement(); if (currAsset.assetDesc.fileName.equals(fileName)) { ...
synchronized void function (String fileName) { if (tasks.size() > 0) { AssetLoadingTask currAsset = tasks.firstElement(); if (currAsset.assetDesc.fileName.equals(fileName)) { currAsset.cancel = true; log.debug(STR + fileName); return; } } int foundIndex = -1; for (int i = 0; i < loadQueue.size; i++) { if (loadQueue.get...
/** Removes the asset and all its dependencies, if they are not used by other assets. * @param fileName the file name */
Removes the asset and all its dependencies, if they are not used by other assets
unload
{ "repo_name": "saltares/libgdx", "path": "gdx/src/com/badlogic/gdx/assets/AssetManager.java", "license": "apache-2.0", "size": 27815 }
[ "com.badlogic.gdx.utils.Array", "com.badlogic.gdx.utils.Disposable", "com.badlogic.gdx.utils.GdxRuntimeException" ]
import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.Disposable; import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
256,299
public void readData(Node stepnode) throws KettleXMLException { try { servers = XMLHandler.getTagValue(stepnode, "servers"); String hostname = XMLHandler.getTagValue(stepnode, "hostname"); String port = XMLHandler.getTagValue(stepnode, "hostname"); if ( StringUtils.isNotEmpty(hostname)) { ...
void function(Node stepnode) throws KettleXMLException { try { servers = XMLHandler.getTagValue(stepnode, STR); String hostname = XMLHandler.getTagValue(stepnode, STR); String port = XMLHandler.getTagValue(stepnode, STR); if ( StringUtils.isNotEmpty(hostname)) { if (StringUtils.isNotEmpty( servers )) { servers+=","; } ...
/** * Reads data from XML transformation file. * * @param stepnode the step XML node. * @throws KettleXMLException the kettle XML exception. */
Reads data from XML transformation file
readData
{ "repo_name": "ivylabs/ivy-pdi-mongodb-steps", "path": "src/main/java/com/ivyis/di/trans/steps/mongodb/MongoDBLookupMeta.java", "license": "agpl-3.0", "size": 19620 }
[ "org.apache.commons.lang.StringUtils", "org.pentaho.di.core.encryption.Encr", "org.pentaho.di.core.exception.KettleXMLException", "org.pentaho.di.core.row.ValueMeta", "org.pentaho.di.core.row.ValueMetaInterface", "org.pentaho.di.core.xml.XMLHandler", "org.pentaho.di.i18n.BaseMessages", "org.w3c.dom.No...
import org.apache.commons.lang.StringUtils; import org.pentaho.di.core.encryption.Encr; import org.pentaho.di.core.exception.KettleXMLException; import org.pentaho.di.core.row.ValueMeta; import org.pentaho.di.core.row.ValueMetaInterface; import org.pentaho.di.core.xml.XMLHandler; import org.pentaho.di.i18n.BaseMessages...
import org.apache.commons.lang.*; import org.pentaho.di.core.encryption.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.row.*; import org.pentaho.di.core.xml.*; import org.pentaho.di.i18n.*; import org.w3c.dom.*;
[ "org.apache.commons", "org.pentaho.di", "org.w3c.dom" ]
org.apache.commons; org.pentaho.di; org.w3c.dom;
2,142,985
public static TupleSet createTupleSet(int[][] values){ Arrays.sort(values); if (values.length == 0){ return emptySet; } else { return createTupleSetFromSortedArray(values); } }
static TupleSet function(int[][] values){ Arrays.sort(values); if (values.length == 0){ return emptySet; } else { return createTupleSetFromSortedArray(values); } }
/** * Creates a new instance of class TupleSet from a two-dimensional rectangular array * iterable which every row represents one tuple. * @param values the two-dimensional array * @return new instance of class TupleSet */
Creates a new instance of class TupleSet from a two-dimensional rectangular array iterable which every row represents one tuple
createTupleSet
{ "repo_name": "supertweety/mln2poss", "path": "src/ida/utils/collections/TupleSet.java", "license": "mit", "size": 23824 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,932,860
public double reduceEntriesToDouble(long parallelismThreshold, ObjectToDouble<Map.Entry<K,V>> transformer, double basis, DoubleByDoubleToDouble reducer) { if (transformer == null || reduce...
double function(long parallelismThreshold, ObjectToDouble<Map.Entry<K,V>> transformer, double basis, DoubleByDoubleToDouble reducer) { if (transformer == null reducer == null) throw new NullPointerException(); return new MapReduceEntriesToDoubleTask<K,V> (null, batchFor(parallelismThreshold), 0, 0, table, null, transfo...
/** * Returns the result of accumulating the given transformation * of all entries using the given reducer to combine values, * and the given basis as an identity value. * * @param parallelismThreshold the (estimated) number of elements * needed for this operation to be executed in paralle...
Returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value
reduceEntriesToDouble
{ "repo_name": "rspieldenner/servo", "path": "servo-internal/src/main/java/com/netflix/servo/jsr166e/ConcurrentHashMapV8.java", "license": "apache-2.0", "size": 263792 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
662,389
public static void toByteArray(int value, byte[] array) { ByteBuffer.wrap(array).putInt(value); }
static void function(int value, byte[] array) { ByteBuffer.wrap(array).putInt(value); }
/** * Populate a byte array with the byte representation of an integer. * The byte array must consist of at least 4 bytes. * @param value - the integer to convert to a byte array. * @param array - the byte array where the converted int is placed. */
Populate a byte array with the byte representation of an integer. The byte array must consist of at least 4 bytes
toByteArray
{ "repo_name": "halfjew22/BenchmarkFrozenBubble", "path": "src/com/efortin/frozenbubble/NetworkGameManager.java", "license": "gpl-2.0", "size": 66915 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
361,834
public static boolean hasTrack(Context context, String trackId) { try { return Db.db(context).exists("track:" + trackId); } catch (SnappydbException e) { throw new RuntimeException(e); } }
static boolean function(Context context, String trackId) { try { return Db.db(context).exists(STR + trackId); } catch (SnappydbException e) { throw new RuntimeException(e); } }
/** * Returns true if the given track is saved. * * @param trackId Track ID * @return True if saved */
Returns true if the given track is saved
hasTrack
{ "repo_name": "sismics/music", "path": "music-android/app/src/main/java/com/sismics/music/db/dao/TrackDao.java", "license": "gpl-2.0", "size": 1507 }
[ "android.content.Context", "com.sismics.music.db.Db", "com.snappydb.SnappydbException" ]
import android.content.Context; import com.sismics.music.db.Db; import com.snappydb.SnappydbException;
import android.content.*; import com.sismics.music.db.*; import com.snappydb.*;
[ "android.content", "com.sismics.music", "com.snappydb" ]
android.content; com.sismics.music; com.snappydb;
299,639
public String[] getMembersByName() { Member[] currentMembers = getMembers(); String [] membernames ; if(currentMembers != null) { membernames = new String[currentMembers.length]; for (int i = 0; i < currentMembers.length; i++) { membernames[i] = curren...
String[] function() { Member[] currentMembers = getMembers(); String [] membernames ; if(currentMembers != null) { membernames = new String[currentMembers.length]; for (int i = 0; i < currentMembers.length; i++) { membernames[i] = currentMembers[i].toString() ; } } else membernames = new String[0] ; return membernames ...
/** * Return all the members by name */
Return all the members by name
getMembersByName
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.0/McastService.java", "license": "mit", "size": 16823 }
[ "org.apache.catalina.tribes.Member" ]
import org.apache.catalina.tribes.Member;
import org.apache.catalina.tribes.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,273,263
public void setStatus(BatchStatus status) { this.status = status; }
void function(BatchStatus status) { this.status = status; }
/** * Set the evaluation status of the batch. */
Set the evaluation status of the batch
setStatus
{ "repo_name": "jcreel/SAFCreator", "path": "src/main/java/edu/tamu/di/SAFCreator/model/Batch.java", "license": "mit", "size": 9705 }
[ "edu.tamu.di.SAFCreator" ]
import edu.tamu.di.SAFCreator;
import edu.tamu.di.*;
[ "edu.tamu.di" ]
edu.tamu.di;
1,805,287
public java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.StringConstantHLAPI> getSubterm_strings_StringConstantHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.StringConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.StringConstantHLAPI>(); for (Term elemnt : getSubterm(...
java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.StringConstantHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.StringConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.StringConstantHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pn...
/** * This accessor return a list of encapsulated subelement, only of StringConstantHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of StringConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_strings_StringConstantHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/booleans/hlapi/InequalityHLAPI.java", "license": "epl-1.0", "size": 108490 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,910,182
private static boolean testStrategy(InputStream is, CSVStrategy strategy) throws IOException { final int MIN_COLUMNS = 2; is.mark(Integer.MAX_VALUE); try { final CSVParser parser = new CSVParser(new InputStreamReader(is), strategy); int linesToCheck = 5; ...
static boolean function(InputStream is, CSVStrategy strategy) throws IOException { final int MIN_COLUMNS = 2; is.mark(Integer.MAX_VALUE); try { final CSVParser parser = new CSVParser(new InputStreamReader(is), strategy); int linesToCheck = 5; int headerColumnCount = -1; while (linesToCheck > 0) { String[] row; row = pa...
/** * make sure the reader has correct delimiter and quotation set. * Check first lines and make sure they have the same amount of columns and at least 2 * * @param is input stream to be checked * @param strategy strategy to be verified. * @return * @throws IOException * @param i...
make sure the reader has correct delimiter and quotation set. Check first lines and make sure they have the same amount of columns and at least 2
testStrategy
{ "repo_name": "kidaa/any23", "path": "csvutils/src/main/java/org/apache/any23/extractor/csv/CSVReaderBuilder.java", "license": "apache-2.0", "size": 6041 }
[ "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "org.apache.commons.csv.CSVParser", "org.apache.commons.csv.CSVStrategy" ]
import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVStrategy;
import java.io.*; import org.apache.commons.csv.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,034,084
public InputStream getInputStream();
InputStream function();
/** * Gets the input stream. * * @return the input stream */
Gets the input stream
getInputStream
{ "repo_name": "neo4j/windows-wrapper", "path": "src/main/java/org/rzo/yajsw/Process.java", "license": "gpl-3.0", "size": 4872 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
539,518
public void setFixture(ItemDefinitionHome pFixture) { mFixture = pFixture; }
void function(ItemDefinitionHome pFixture) { mFixture = pFixture; }
/** * Set the object that is being tested. * * @param mFixture the test fixture */
Set the object that is being tested
setFixture
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-core/src/test/java/org/cipres/treebase/dao/matrix/ItemDefinitionDAOTest.java", "license": "bsd-3-clause", "size": 2823 }
[ "org.cipres.treebase.domain.matrix.ItemDefinitionHome" ]
import org.cipres.treebase.domain.matrix.ItemDefinitionHome;
import org.cipres.treebase.domain.matrix.*;
[ "org.cipres.treebase" ]
org.cipres.treebase;
2,765,882
public void testSysinfoLocale() throws Exception { String[] SysInfoLocaleCmd = new String[] {"-Duser.language=de", "-Duser.country=DE", "org.apache.derby.drda.NetworkServerControl", "sysinfo", "-p", String.valueOf(TestConfiguration.getCurrent().getPort())}; ...
void function() throws Exception { String[] SysInfoLocaleCmd = new String[] {STR, STR, STR, STR, "-p", String.valueOf(TestConfiguration.getCurrent().getPort())}; Process p = execJavaCmd(SysInfoLocaleCmd); String s = readProcessOutput(p); print(STR, s); assertMatchingStringExists(s); }
/** * Test sysinfo w/ foreign (non-English) locale. * * @throws Exception */
Test sysinfo w/ foreign (non-English) locale
testSysinfoLocale
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java", "license": "apache-2.0", "size": 9040 }
[ "org.apache.derbyTesting.junit.TestConfiguration" ]
import org.apache.derbyTesting.junit.TestConfiguration;
import org.apache.*;
[ "org.apache" ]
org.apache;
1,597,577
public int proximity(Map<String, Object> options) { if (best == null) return DEFAULT_PROXIMITY; else return proxProvider.proximity(best, options); } // public int rto() { // if (best == null) // return DEFAULT_RTO; // else // return getRouteManager(b...
int function(Map<String, Object> options) { if (best == null) return DEFAULT_PROXIMITY; else return proxProvider.proximity(best, options); }
/** * Method which returns the last cached proximity value for the given address. * If there is no cached value, then DEFAULT_PROXIMITY is returned. * * @param address The address to return the value for * @return The ping value to the remote address */
Method which returns the last cached proximity value for the given address. If there is no cached value, then DEFAULT_PROXIMITY is returned
proximity
{ "repo_name": "barnyard/pi", "path": "freepastry/src/org/mpisws/p2p/transport/sourceroute/manager/SourceRouteManagerImpl.java", "license": "apache-2.0", "size": 43670 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,619,958
@SubscribeEvent(priority = EventPriority.HIGHEST) public void onPlayerInteract(PlayerInteractEvent event) { if (event.getWorld().isRemote) { return; } TileEntity te = event.getEntityPlayer().world.getTileEntity(event.getPos()); if (te instanceof TileEntit...
@SubscribeEvent(priority = EventPriority.HIGHEST) void function(PlayerInteractEvent event) { if (event.getWorld().isRemote) { return; } TileEntity te = event.getEntityPlayer().world.getTileEntity(event.getPos()); if (te instanceof TileEntitySign) { TileEntitySign sign = ((TileEntitySign) te); if (allowSignEdit && event...
/** * how to use: First line of the sign MUST BE [command] Second line is the command you want to run Third and fourth * lines are arguments to the command. */
how to use: First line of the sign MUST BE [command] Second line is the command you want to run Third and fourth lines are arguments to the command
onPlayerInteract
{ "repo_name": "ForgeEssentials/ForgeEssentials", "path": "src/main/java/com/forgeessentials/signtools/SignToolsModule.java", "license": "gpl-3.0", "size": 6745 }
[ "com.forgeessentials.api.APIRegistry", "com.forgeessentials.util.output.ChatOutputHandler", "net.minecraft.init.Items", "net.minecraft.item.ItemStack", "net.minecraft.tileentity.TileEntity", "net.minecraft.tileentity.TileEntitySign", "net.minecraft.util.text.TextComponentString", "net.minecraftforge.e...
import com.forgeessentials.api.APIRegistry; import com.forgeessentials.util.output.ChatOutputHandler; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntitySign; import net.minecraft.util.text.TextComponentString; impo...
import com.forgeessentials.api.*; import com.forgeessentials.util.output.*; import net.minecraft.init.*; import net.minecraft.item.*; import net.minecraft.tileentity.*; import net.minecraft.util.text.*; import net.minecraftforge.event.entity.player.*; import net.minecraftforge.fml.common.*; import net.minecraftforge.fm...
[ "com.forgeessentials.api", "com.forgeessentials.util", "net.minecraft.init", "net.minecraft.item", "net.minecraft.tileentity", "net.minecraft.util", "net.minecraftforge.event", "net.minecraftforge.fml", "net.minecraftforge.server" ]
com.forgeessentials.api; com.forgeessentials.util; net.minecraft.init; net.minecraft.item; net.minecraft.tileentity; net.minecraft.util; net.minecraftforge.event; net.minecraftforge.fml; net.minecraftforge.server;
920,414
public static void checkDfsSafeMode(final Configuration conf) throws IOException { boolean isInSafeMode = false; FileSystem fs = FileSystem.get(conf); if (fs instanceof DistributedFileSystem) { DistributedFileSystem dfs = (DistributedFileSystem)fs; isInSafeMode = isInSafeMode(dfs); } ...
static void function(final Configuration conf) throws IOException { boolean isInSafeMode = false; FileSystem fs = FileSystem.get(conf); if (fs instanceof DistributedFileSystem) { DistributedFileSystem dfs = (DistributedFileSystem)fs; isInSafeMode = isInSafeMode(dfs); } if (isInSafeMode) { throw new IOException(STR); } ...
/** * Check whether dfs is in safemode. * @param conf * @throws IOException */
Check whether dfs is in safemode
checkDfsSafeMode
{ "repo_name": "cloud-software-foundation/c5", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java", "license": "apache-2.0", "size": 67483 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.hdfs.DistributedFileSystem" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.DistributedFileSystem;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
124,553
EClass getUiSendEventCommand();
EClass getUiSendEventCommand();
/** * Returns the meta object for class '{@link org.lunifera.ecview.semantic.uimodel.UiSendEventCommand <em>Ui Send Event Command</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Ui Send Event Command</em>'. * @see org.lunifera.ecview.semantic.uimodel.UiSendEv...
Returns the meta object for class '<code>org.lunifera.ecview.semantic.uimodel.UiSendEventCommand Ui Send Event Command</code>'.
getUiSendEventCommand
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,650
Reader read(ReadRequest msg);
Reader read(ReadRequest msg);
/** * Returns a reader object for a given read request. The reader * provides read access to the file and can generate response * objects for the request. */
Returns a reader object for a given read request. The reader provides read access to the file and can generate response objects for the request
read
{ "repo_name": "dCache/xrootd4j-backport", "path": "src/main/java/org/dcache/xrootd/pool/FileDescriptor.java", "license": "agpl-3.0", "size": 2079 }
[ "org.dcache.xrootd.protocol.messages.ReadRequest" ]
import org.dcache.xrootd.protocol.messages.ReadRequest;
import org.dcache.xrootd.protocol.messages.*;
[ "org.dcache.xrootd" ]
org.dcache.xrootd;
1,729,656