method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void setAffectedByUser() {
mAffectedByUser = true;
Log.v(LOG_TAG, "_y is affected by user: " + mAffectedByUser);
} | void function() { mAffectedByUser = true; Log.v(LOG_TAG, STR + mAffectedByUser); } | /**"remembers" that the last layout change was
/* caused by user interaction
*/ | "remembers" that the last layout change was caused by user interaction | setAffectedByUser | {
"repo_name": "vrestivo/popmovies_public",
"path": "app/src/main/java/com/example/android/popmoviesstage2/DetailFragment.java",
"license": "gpl-3.0",
"size": 9178
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 163,661 |
void setJobSubmitHostName(String hostname) {
set(MRJobConfig.JOB_SUBMITHOST, hostname);
} | void setJobSubmitHostName(String hostname) { set(MRJobConfig.JOB_SUBMITHOST, hostname); } | /**
* Set JobSubmitHostName for this job.
*
* @param hostname the JobSubmitHostName for this job.
*/ | Set JobSubmitHostName for this job | setJobSubmitHostName | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java",
"license": "apache-2.0",
"size": 67409
} | [
"org.apache.hadoop.mapreduce.MRJobConfig"
] | import org.apache.hadoop.mapreduce.MRJobConfig; | import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 685,524 |
private List<String> parseStructure(String parameter)
throws BadRequestException {
if (parameter == null) {
throw new BadRequestException("The passed structure is null.");
}
String structure = StringUtils.remove(parameter, "\r");
List<String> structureList =
... | List<String> function(String parameter) throws BadRequestException { if (parameter == null) { throw new BadRequestException(STR); } String structure = StringUtils.remove(parameter, "\r"); List<String> structureList = Arrays.asList(structure.trim().split("\n")); return structureList; } | /**
* Parses the structure String as a List.
*
* @param parameter
* the String encoding the Structure
* @return the structure encoded as a list.
* @throws BadRequestException
* if the passed structure is null
*/ | Parses the structure String as a List | parseStructure | {
"repo_name": "team-grit/grit",
"path": "src/de/teamgrit/grit/webserver/ConnectionHandler.java",
"license": "gpl-3.0",
"size": 13043
} | [
"java.util.Arrays",
"java.util.List",
"org.apache.commons.lang3.StringUtils"
] | import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; | import java.util.*; import org.apache.commons.lang3.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,145,773 |
public void onRecordBeforeRead(final ODocument iDocument) {
};
| void function(final ODocument iDocument) { }; | /**
* It's called just before to read the document.
*
* @param iDocument
* The document to read
*/ | It's called just before to read the document | onRecordBeforeRead | {
"repo_name": "fedgehog/Orient",
"path": "core/src/main/java/com/orientechnologies/orient/core/hook/ODocumentHookAbstract.java",
"license": "apache-2.0",
"size": 4075
} | [
"com.orientechnologies.orient.core.record.impl.ODocument"
] | import com.orientechnologies.orient.core.record.impl.ODocument; | import com.orientechnologies.orient.core.record.impl.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 1,113,709 |
@Override
public CharSequence getPkSource(TableIdentifier table, PkDefinition def, boolean forInlineUse)
{
OracleIndexReader reader = (OracleIndexReader)dbConnection.getMetadata().getIndexReader();
String sql = super.getPkSource(table, def, forInlineUse).toString();
if (StringUtil.isEmptyString(sql)) return ... | CharSequence function(TableIdentifier table, PkDefinition def, boolean forInlineUse) { OracleIndexReader reader = (OracleIndexReader)dbConnection.getMetadata().getIndexReader(); String sql = super.getPkSource(table, def, forInlineUse).toString(); if (StringUtil.isEmptyString(sql)) return sql; PkDefinition pk = def == n... | /**
* Generate the SQL to create the primary key for the table.
*
* If the primary key is supported by an index that does not have the same name
* as the primary key, it is assumed that the index is defined as an additional
* option to the ADD CONSTRAINT SQL...
*
* @param table the table for which ... | Generate the SQL to create the primary key for the table. If the primary key is supported by an index that does not have the same name as the primary key, it is assumed that the index is defined as an additional option to the ADD CONSTRAINT SQL.. | getPkSource | {
"repo_name": "Taller/sqlworkbench-plus",
"path": "src/workbench/db/oracle/OracleTableSourceBuilder.java",
"license": "apache-2.0",
"size": 28335
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,623,556 |
@Test
public void normalizeWindowsTests() {
assumeTrue(WINDOWS);
assertEquals("c:/a/b", new AlluxioURI("c:\\a\\b").toString());
assertEquals("c:/a/c", new AlluxioURI("c:\\a\\b\\..\\c").toString());
} | void function() { assumeTrue(WINDOWS); assertEquals(STR, new AlluxioURI(STR).toString()); assertEquals(STR, new AlluxioURI(STR).toString()); } | /**
* Tests the {@link AlluxioURI#toString()} method to normalize Windows paths.
*/ | Tests the <code>AlluxioURI#toString()</code> method to normalize Windows paths | normalizeWindowsTests | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/common/src/test/java/alluxio/AlluxioURITest.java",
"license": "apache-2.0",
"size": 40892
} | [
"org.junit.Assert",
"org.junit.Assume"
] | import org.junit.Assert; import org.junit.Assume; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,319,356 |
void majorCompactRegion(final byte[] regionName) throws IOException; | void majorCompactRegion(final byte[] regionName) throws IOException; | /**
* Major compact a table or an individual region. Asynchronous operation.
*
* @param regionName region to major compact
* @throws IOException if a remote or network exception occurs
*/ | Major compact a table or an individual region. Asynchronous operation | majorCompactRegion | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 97415
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 90,705 |
@Step
List<ICell> cellsMatch(String regex); | List<ICell> cellsMatch(String regex); | /**
* Get all Cells with values matches to searched regex
*/ | Get all Cells with values matches to searched regex | cellsMatch | {
"repo_name": "epam/JDI",
"path": "Java/JDI/jdi-uitest-core/src/main/java/com/epam/jdi/uitests/core/interfaces/complex/tables/interfaces/ITable.java",
"license": "gpl-3.0",
"size": 10547
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,815,687 |
private String getFileContents(final File actualFile)
throws AnalysisException {
try {
return FileUtils.readFileToString(actualFile, Charset.defaultCharset()).trim();
} catch (IOException e) {
throw new AnalysisException(
"Problem occurred whil... | String function(final File actualFile) throws AnalysisException { try { return FileUtils.readFileToString(actualFile, Charset.defaultCharset()).trim(); } catch (IOException e) { throw new AnalysisException( STR, e); } } | /**
* Retrieves the contents of a given file.
*
* @param actualFile the file to read
* @return the contents of the file
* @throws AnalysisException thrown if there is an IO Exception
*/ | Retrieves the contents of a given file | getFileContents | {
"repo_name": "stefanneuhaus/DependencyCheck",
"path": "core/src/main/java/org/owasp/dependencycheck/analyzer/OpenSSLAnalyzer.java",
"license": "apache-2.0",
"size": 8698
} | [
"java.io.File",
"java.io.IOException",
"java.nio.charset.Charset",
"org.apache.commons.io.FileUtils",
"org.owasp.dependencycheck.analyzer.exception.AnalysisException"
] | import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import org.apache.commons.io.FileUtils; import org.owasp.dependencycheck.analyzer.exception.AnalysisException; | import java.io.*; import java.nio.charset.*; import org.apache.commons.io.*; import org.owasp.dependencycheck.analyzer.exception.*; | [
"java.io",
"java.nio",
"org.apache.commons",
"org.owasp.dependencycheck"
] | java.io; java.nio; org.apache.commons; org.owasp.dependencycheck; | 1,879,598 |
public final native CMLineInfoOverlay lineInfo(CMLineHandleOverlay lineHandle) ; | final native CMLineInfoOverlay function(CMLineHandleOverlay lineHandle) ; | /**
* Obtain information (line number, text content, and marker status of the given line) on the
* given line.
* @param lineHandle the line handle
* @return the line information
*/ | Obtain information (line number, text content, and marker status of the given line) on the given line | lineInfo | {
"repo_name": "Panthro/che-plugins",
"path": "plugin-codemirror/che-plugin-codemirror-jso/src/main/java/org/eclipse/che/ide/editor/codemirrorjso/client/CMEditorOverlay.java",
"license": "epl-1.0",
"size": 20828
} | [
"org.eclipse.che.ide.editor.codemirrorjso.client.line.CMLineHandleOverlay",
"org.eclipse.che.ide.editor.codemirrorjso.client.line.CMLineInfoOverlay"
] | import org.eclipse.che.ide.editor.codemirrorjso.client.line.CMLineHandleOverlay; import org.eclipse.che.ide.editor.codemirrorjso.client.line.CMLineInfoOverlay; | import org.eclipse.che.ide.editor.codemirrorjso.client.line.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,763,869 |
public static Map calcularRangosAlgoritimicosBackType(double media, double desviacion) {
Map<String, Double> rangosAlgoritimicos = new HashMap<>();
rangosAlgoritimicos.put(MUY_PEQUENIO, Math.exp(media - (2 * desviacion)));
rangosAlgoritimicos.put(PEQUENIO, Math.exp(media - desviacion));
... | static Map function(double media, double desviacion) { Map<String, Double> rangosAlgoritimicos = new HashMap<>(); rangosAlgoritimicos.put(MUY_PEQUENIO, Math.exp(media - (2 * desviacion))); rangosAlgoritimicos.put(PEQUENIO, Math.exp(media - desviacion)); rangosAlgoritimicos.put(MEDIANO, Math.exp(media)); rangosAlgoritim... | /**
* Metodo: Retorna un Mapa con los valores de rangos algorimicos con los
* valores a presentar
*
* @param media valor de la media
* @param desviacion valor de la desviacion estandart
* @return Map ocn los valores para presentar de la tarea 04
*/ | Metodo: Retorna un Mapa con los valores de rangos algorimicos con los valores a presentar | calcularRangosAlgoritimicosBackType | {
"repo_name": "ditoaforero/psp07",
"path": "src/main/java/Estadistica.java",
"license": "mit",
"size": 25547
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 858,693 |
public void testDefaults() {
SOAPFaultException soapFaultException = new SOAPFaultException(null, null, null, null);
AxisFault axisFault = AxisFault.makeFault(soapFaultException);
assertEquals(QNAME_FAULT_SERVER_USER, axisFault.getFaultCode());
assertNotNull(axisFault.getFaultStrin... | void function() { SOAPFaultException soapFaultException = new SOAPFaultException(null, null, null, null); AxisFault axisFault = AxisFault.makeFault(soapFaultException); assertEquals(QNAME_FAULT_SERVER_USER, axisFault.getFaultCode()); assertNotNull(axisFault.getFaultString()); } | /**
* Tests the defaults generated from a SOAPFaultException
*/ | Tests the defaults generated from a SOAPFaultException | testDefaults | {
"repo_name": "apache/axis1-java",
"path": "axis-rt-core/src/test/java/test/faults/TestSOAPFaultException.java",
"license": "apache-2.0",
"size": 6788
} | [
"javax.xml.rpc.soap.SOAPFaultException",
"org.apache.axis.AxisFault"
] | import javax.xml.rpc.soap.SOAPFaultException; import org.apache.axis.AxisFault; | import javax.xml.rpc.soap.*; import org.apache.axis.*; | [
"javax.xml",
"org.apache.axis"
] | javax.xml; org.apache.axis; | 1,821,177 |
public static void emitMessage(
LogLevel level,
String categoryKey,
String message,
int samplingFrequency,
@Nullable Map<String, Object> metadata) {
ErrorReporter.getInstance()
.report(map(level), categoryKey, message, null, samplingFrequency, metadata);
} | static void function( LogLevel level, String categoryKey, String message, int samplingFrequency, @Nullable Map<String, Object> metadata) { ErrorReporter.getInstance() .report(map(level), categoryKey, message, null, samplingFrequency, metadata); } | /**
* Emit a message that can be logged or escalated by the logger implementation.
*
* @param level One of {@link LogLevel#WARNING}, {@link LogLevel#ERROR}, {@link LogLevel#FATAL}.
* @param categoryKey Unique key for aggregating all occurrences of given error in error
* aggregation systems
* @para... | Emit a message that can be logged or escalated by the logger implementation | emitMessage | {
"repo_name": "facebook/litho",
"path": "litho-core/src/main/java/com/facebook/litho/ComponentsReporter.java",
"license": "apache-2.0",
"size": 3832
} | [
"androidx.annotation.Nullable",
"com.facebook.rendercore.ErrorReporter",
"java.util.Map"
] | import androidx.annotation.Nullable; import com.facebook.rendercore.ErrorReporter; import java.util.Map; | import androidx.annotation.*; import com.facebook.rendercore.*; import java.util.*; | [
"androidx.annotation",
"com.facebook.rendercore",
"java.util"
] | androidx.annotation; com.facebook.rendercore; java.util; | 136,029 |
public int skipBytes( int n ) throws IOException
{
return (int) skipBytes( (long) n );
} | int function( int n ) throws IOException { return (int) skipBytes( (long) n ); } | /**
* Description of the Method
*
* @param n
* Description of Parameter
* @return Description of the Returned Value
* @exception IOException
* Description of Exception
*/ | Description of the Method | skipBytes | {
"repo_name": "sguan-actuate/birt",
"path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/data/document/AbstractBufferedRandomAccessObject.java",
"license": "epl-1.0",
"size": 23429
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,153,148 |
@Override
public void drawOutline(Graphics2D g2, CategoryPlot plot,
Rectangle2D dataArea) {
float x0 = (float) dataArea.getX();
float x1 = x0 + (float) Math.abs(this.xOffset);
float x3 = (float) dataArea.getMaxX();
float x2 = x3 - (float) Math.abs(thi... | void function(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea) { float x0 = (float) dataArea.getX(); float x1 = x0 + (float) Math.abs(this.xOffset); float x3 = (float) dataArea.getMaxX(); float x2 = x3 - (float) Math.abs(this.xOffset); float y0 = (float) dataArea.getMaxY(); float y1 = y0 - (float) Math.abs(this.... | /**
* Draws the outline for the plot.
*
* @param g2 the graphics device.
* @param plot the plot.
* @param dataArea the area inside the axes.
*/ | Draws the outline for the plot | drawOutline | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/main/java/org/jfree/chart/renderer/category/LineRenderer3D.java",
"license": "gpl-3.0",
"size": 23941
} | [
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.Stroke",
"java.awt.geom.GeneralPath",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.plot.CategoryPlot"
] | import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.CategoryPlot; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.plot.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 87,668 |
public Memento putStringArray(String key,List<String> value) {
return putStringArray(key, value.toArray(new String[value.size()]));
} | Memento function(String key,List<String> value) { return putStringArray(key, value.toArray(new String[value.size()])); } | /**
* Creates a string array property from a list of strings.
* If a property with the given key
* already exists, it is replaced. No elements of the list may be
* {@code null}.
* @param key the key of the property
* @param value the value of the property
* @return this memento
*/ | Creates a string array property from a list of strings. If a property with the given key already exists, it is replaced. No elements of the list may be null | putStringArray | {
"repo_name": "kazocsaba/memento",
"path": "src/main/java/hu/kazocsaba/memento/Memento.java",
"license": "mit",
"size": 28722
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 50,850 |
protected final void flagContent() throws IOException {
if (!m_contentSeen) {
writeMarkup('>');
incrementNesting();
m_contentSeen = true;
}
} | final void function() throws IOException { if (!m_contentSeen) { writeMarkup('>'); incrementNesting(); m_contentSeen = true; } } | /**
* Set up for writing any content to element. If the start tag for the
* element has not been closed, this will close it.
*
* @throws IOException on error writing to document
*/ | Set up for writing any content to element. If the start tag for the element has not been closed, this will close it | flagContent | {
"repo_name": "vkorbut/jibx",
"path": "jibx/build/src/org/jibx/runtime/impl/XMLWriterBase.java",
"license": "bsd-3-clause",
"size": 15751
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,972,371 |
private void calculateNumberOfMethods(CompilationUnit unit){
for (Object type : unit.types()){
if (type instanceof TypeDeclaration){
MethodDeclaration [] methods = ((TypeDeclaration) type).getMethods();
for (MethodDeclaration method: methods){
this.listOfMethods.add(method);
}
}
}
Ite... | void function(CompilationUnit unit){ for (Object type : unit.types()){ if (type instanceof TypeDeclaration){ MethodDeclaration [] methods = ((TypeDeclaration) type).getMethods(); for (MethodDeclaration method: methods){ this.listOfMethods.add(method); } } } Iterator<MethodDeclaration> itMethods = this.listOfMethods.ite... | /**
* Method to calculate the number of methods in a class and verify if two methods share attributes
*
* @author Mariana Azevedo
* @since 13/07/2014
*
* @param unit
*/ | Method to calculate the number of methods in a class and verify if two methods share attributes | calculateNumberOfMethods | {
"repo_name": "mariazevedo88/o3smeasures-tool",
"path": "src/io/github/mariazevedo88/o3smeasures/astvisitors/TightClassCohesionVisitor.java",
"license": "gpl-3.0",
"size": 4881
} | [
"java.util.Iterator",
"org.eclipse.jdt.core.dom.CompilationUnit",
"org.eclipse.jdt.core.dom.MethodDeclaration",
"org.eclipse.jdt.core.dom.TypeDeclaration"
] | import java.util.Iterator; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.TypeDeclaration; | import java.util.*; import org.eclipse.jdt.core.dom.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 2,230,764 |
public static void unlock(Directory directory) throws IOException {
directory.makeLock(IndexWriter.WRITE_LOCK_NAME).release();
}
public static final class MaxFieldLength {
private int limit;
private String name;
private MaxFieldLength(String name, int limit) {
this.name = name;
... | static void function(Directory directory) throws IOException { directory.makeLock(IndexWriter.WRITE_LOCK_NAME).release(); } public static final class MaxFieldLength { private int limit; private String name; private MaxFieldLength(String name, int limit) { this.name = name; this.limit = limit; } public MaxFieldLength(in... | /**
* Forcibly unlocks the index in the named directory.
* <P>
* Caution: this should only be used by failure recovery code,
* when it is known that no other process nor thread is in fact
* currently accessing this index.
*/ | Forcibly unlocks the index in the named directory. Caution: this should only be used by failure recovery code, when it is known that no other process nor thread is in fact currently accessing this index | unlock | {
"repo_name": "Photobucket/Solbase-Lucene",
"path": "src/java/org/apache/lucene/index/IndexWriter.java",
"license": "apache-2.0",
"size": 205989
} | [
"java.io.IOException",
"org.apache.lucene.store.Directory"
] | import java.io.IOException; import org.apache.lucene.store.Directory; | import java.io.*; import org.apache.lucene.store.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,832,513 |
public DocumentFragment createDocumentFragment()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
} | DocumentFragment function() { error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); return null; } | /**
* Unimplemented. See org.w3c.dom.Document
*
* @return null
*/ | Unimplemented. See org.w3c.dom.Document | createDocumentFragment | {
"repo_name": "mirego/j2objc",
"path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/UnImplNode.java",
"license": "apache-2.0",
"size": 54550
} | [
"org.apache.xml.res.XMLErrorResources",
"org.w3c.dom.DocumentFragment"
] | import org.apache.xml.res.XMLErrorResources; import org.w3c.dom.DocumentFragment; | import org.apache.xml.res.*; import org.w3c.dom.*; | [
"org.apache.xml",
"org.w3c.dom"
] | org.apache.xml; org.w3c.dom; | 1,639,931 |
TbContentCategory selectByPrimaryKey(Long id); | TbContentCategory selectByPrimaryKey(Long id); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tb_content_category
*
* @mbg.generated Fri Apr 28 17:20:11 CST 2017
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table tb_content_category | selectByPrimaryKey | {
"repo_name": "fundmarkhua/fmall",
"path": "fm-manage/fm-manage-dao/src/main/java/com/fmall/mapper/TbContentCategoryMapper.java",
"license": "apache-2.0",
"size": 3204
} | [
"com.fmall.pojo.TbContentCategory"
] | import com.fmall.pojo.TbContentCategory; | import com.fmall.pojo.*; | [
"com.fmall.pojo"
] | com.fmall.pojo; | 2,010,427 |
@Override
public boolean offer(ProtocolChain pc)
{
return protocolChains.offer(pc);
}
};
controller.setProtocolChainInstanceHandler(instanceHandler);
Pipeline pipeline = new DefaultPipeline();
if(getServer().getThr... | boolean function(ProtocolChain pc) { return protocolChains.offer(pc); } }; controller.setProtocolChainInstanceHandler(instanceHandler); Pipeline pipeline = new DefaultPipeline(); if(getServer().getThreadPool() instanceof BoundedThreadPool) pipeline.setMaxThreads(((BoundedThreadPool)getServer().getThreadPool()).getMaxTh... | /**
* Pool an instance of ProtocolChain.
*/ | Pool an instance of ProtocolChain | offer | {
"repo_name": "napcs/qedserver",
"path": "jetty/contrib/grizzly/src/main/java/org/mortbay/jetty/grizzly/GrizzlyConnector.java",
"license": "mit",
"size": 10028
} | [
"com.sun.grizzly.DefaultPipeline",
"com.sun.grizzly.Pipeline",
"com.sun.grizzly.ProtocolChain",
"com.sun.grizzly.filter.ReadFilter",
"org.mortbay.jetty.HttpParser",
"org.mortbay.thread.BoundedThreadPool",
"org.mortbay.thread.QueuedThreadPool"
] | import com.sun.grizzly.DefaultPipeline; import com.sun.grizzly.Pipeline; import com.sun.grizzly.ProtocolChain; import com.sun.grizzly.filter.ReadFilter; import org.mortbay.jetty.HttpParser; import org.mortbay.thread.BoundedThreadPool; import org.mortbay.thread.QueuedThreadPool; | import com.sun.grizzly.*; import com.sun.grizzly.filter.*; import org.mortbay.jetty.*; import org.mortbay.thread.*; | [
"com.sun.grizzly",
"org.mortbay.jetty",
"org.mortbay.thread"
] | com.sun.grizzly; org.mortbay.jetty; org.mortbay.thread; | 153,586 |
@SmallTest
@Feature({"Homepage"})
@Suppress
public void testHomepageProviderTimeout() throws InterruptedException {
mHomepageManager.setPrefHomepageEnabled(true);
mHomepageManager.setPrefHomepageUseDefaultUri(true);
mHomepageManager.setPrefHomepageCustomUri(TEST_CUSTOM_HOMEPAGE_U... | @Feature({STR}) void function() throws InterruptedException { mHomepageManager.setPrefHomepageEnabled(true); mHomepageManager.setPrefHomepageUseDefaultUri(true); mHomepageManager.setPrefHomepageCustomUri(TEST_CUSTOM_HOMEPAGE_URI); | /**
* Everything is enabled for using partner homepage, but the homepage provider query takes
* longer than the timeout we specify.
*/ | Everything is enabled for using partner homepage, but the homepage provider query takes longer than the timeout we specify | testHomepageProviderTimeout | {
"repo_name": "vadimtk/chrome4sdp",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/partnercustomizations/PartnerHomepageUnitTest.java",
"license": "bsd-3-clause",
"size": 13626
} | [
"org.chromium.base.test.util.Feature"
] | import org.chromium.base.test.util.Feature; | import org.chromium.base.test.util.*; | [
"org.chromium.base"
] | org.chromium.base; | 538,007 |
public static void addBaseDirectory(final Class<?> c, final Path p) {
baseDirectories.put(c, p);
} | static void function(final Class<?> c, final Path p) { baseDirectories.put(c, p); } | /**
* Add a base directory to safe files to
* @param c The class for the base directory to save files
* @param p the path to save files to
*/ | Add a base directory to safe files to | addBaseDirectory | {
"repo_name": "phac-nml/irida",
"path": "src/main/java/ca/corefacility/bioinformatics/irida/repositories/filesystem/FilesystemSupplementedRepositoryImpl.java",
"license": "apache-2.0",
"size": 9780
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 1,103,397 |
private static int compileShader(int shaderType, String source) {
int shader = GLES20.glCreateShader(shaderType);
if (shader != 0) {
GLES20.glShaderSource(shader, source);
GLES20.glCompileShader(shader);
int[] compiled = new int[1];
GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0);... | static int function(int shaderType, String source) { int shader = GLES20.glCreateShader(shaderType); if (shader != 0) { GLES20.glShaderSource(shader, source); GLES20.glCompileShader(shader); int[] compiled = new int[1]; GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0); if (compiled[0] == 0) { Log.e(S... | /**
* Compiles the shader.
*
* @param shaderType Type of the shader. Use {@link GLES20#GL_VERTEX_SHADER } or {@link GLES20#GL_FRAGMENT_SHADER }.
* @param source GLSL code of the shader.
* @return the ID of the compiled shader generated by OpenGL ES 2.0
*/ | Compiles the shader | compileShader | {
"repo_name": "miviclin/droidengine2d",
"path": "src/com/miviclin/droidengine2d/graphics/shader/ShaderProgram.java",
"license": "apache-2.0",
"size": 16239
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,464,859 |
protected List<TimestampedReference> getAdbeRevocationInfoArchivalReferences() {
SignatureProperties<CAdESAttribute> signedSignatureProperties = getSignedSignatureProperties();
if (!signedSignatureProperties.isExist()) {
return Collections.emptyList();
}
final List<Timest... | List<TimestampedReference> function() { SignatureProperties<CAdESAttribute> signedSignatureProperties = getSignedSignatureProperties(); if (!signedSignatureProperties.isExist()) { return Collections.emptyList(); } final List<TimestampedReference> references = new ArrayList<>(); for (CAdESAttribute attribute : signedSig... | /**
* Returns a list of revocation data {@code TimestampedReference}s from the adbe-revocationInfoArchival signed attribute
*
* @return a list of {@link TimestampedReference}s
*/ | Returns a list of revocation data TimestampedReferences from the adbe-revocationInfoArchival signed attribute | getAdbeRevocationInfoArchivalReferences | {
"repo_name": "esig/dss",
"path": "dss-pades/src/main/java/eu/europa/esig/dss/pades/validation/timestamp/PAdESTimestampSource.java",
"license": "lgpl-2.1",
"size": 11212
} | [
"eu.europa.esig.dss.cades.validation.CAdESAttribute",
"eu.europa.esig.dss.crl.CRLBinary",
"eu.europa.esig.dss.pades.PAdESUtils",
"eu.europa.esig.dss.pades.validation.RevocationInfoArchival",
"eu.europa.esig.dss.spi.DSSASN1Utils",
"eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPResponseBinary",
"eu.euro... | import eu.europa.esig.dss.cades.validation.CAdESAttribute; import eu.europa.esig.dss.crl.CRLBinary; import eu.europa.esig.dss.pades.PAdESUtils; import eu.europa.esig.dss.pades.validation.RevocationInfoArchival; import eu.europa.esig.dss.spi.DSSASN1Utils; import eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPResponseBi... | import eu.europa.esig.dss.cades.validation.*; import eu.europa.esig.dss.crl.*; import eu.europa.esig.dss.pades.*; import eu.europa.esig.dss.pades.validation.*; import eu.europa.esig.dss.spi.*; import eu.europa.esig.dss.spi.x509.revocation.ocsp.*; import eu.europa.esig.dss.utils.*; import eu.europa.esig.dss.validation.*... | [
"eu.europa.esig",
"java.util"
] | eu.europa.esig; java.util; | 951,259 |
public static void addFuture(final Future<?> future, final ChainRequest request,
final String futuresAttributeName)
{
if (log.isDebugEnabled())
{
log.debug("Adding Link Future to request");
}
List<Future<?>> futures = request.getAttribute(futuresAttributeName);
if (futures == null)
{
futures = ... | static void function(final Future<?> future, final ChainRequest request, final String futuresAttributeName) { if (log.isDebugEnabled()) { log.debug(STR); } List<Future<?>> futures = request.getAttribute(futuresAttributeName); if (futures == null) { futures = CollectionUtil.newList(); } futures.add(future); request.setA... | /**
* Adds a future to the {@link List} of Link {@link Future}'s kept in a request.
*
* @param future
* @param request
* @param futuresAttributeName
* name of request attribute that keeps future object list
*/ | Adds a future to the <code>List</code> of Link <code>Future</code>'s kept in a request | addFuture | {
"repo_name": "openfurther/further-open-core",
"path": "core/core-util/src/main/java/edu/utah/further/core/util/concurrent/NamedThreadFactory.java",
"license": "apache-2.0",
"size": 3564
} | [
"edu.utah.further.core.api.chain.ChainRequest",
"edu.utah.further.core.api.collections.CollectionUtil",
"java.util.List",
"java.util.concurrent.Future"
] | import edu.utah.further.core.api.chain.ChainRequest; import edu.utah.further.core.api.collections.CollectionUtil; import java.util.List; import java.util.concurrent.Future; | import edu.utah.further.core.api.chain.*; import edu.utah.further.core.api.collections.*; import java.util.*; import java.util.concurrent.*; | [
"edu.utah.further",
"java.util"
] | edu.utah.further; java.util; | 1,919,815 |
public void setTimezone(String timezone) {
if (timezone != null) {
this.standardPairs.put(Parameter.TIMEZONE, timezone);
}
} | void function(String timezone) { if (timezone != null) { this.standardPairs.put(Parameter.TIMEZONE, timezone); } } | /**
* Sets the timezone parameter
*
* @param timezone a timezone string
*/ | Sets the timezone parameter | setTimezone | {
"repo_name": "snowplow/snowplow-java-tracker",
"path": "src/main/java/com/snowplowanalytics/snowplow/tracker/Subject.java",
"license": "apache-2.0",
"size": 9333
} | [
"com.snowplowanalytics.snowplow.tracker.constants.Parameter"
] | import com.snowplowanalytics.snowplow.tracker.constants.Parameter; | import com.snowplowanalytics.snowplow.tracker.constants.*; | [
"com.snowplowanalytics.snowplow"
] | com.snowplowanalytics.snowplow; | 1,330,615 |
public int processGitRepo(NamespaceName name, String gitUrl, String gitRef) throws IOException {
BuildConfig buildConfig = new BuildConfig();
BuildConfigSpec buildConfigSpec = new BuildConfigSpec();
buildConfig.setSpec(buildConfigSpec);
BuildSource buildSource = new BuildSource();
... | int function(NamespaceName name, String gitUrl, String gitRef) throws IOException { BuildConfig buildConfig = new BuildConfig(); BuildConfigSpec buildConfigSpec = new BuildConfigSpec(); buildConfig.setSpec(buildConfigSpec); BuildSource buildSource = new BuildSource(); buildSource.setType("Git"); GitBuildSource gitSourc... | /**
* This method is public for easier unit testing
*/ | This method is public for easier unit testing | processGitRepo | {
"repo_name": "KurtStam/fabric8-devops",
"path": "git-collector/src/main/java/io/fabric8/collector/git/GitBuildConfigProcessor.java",
"license": "apache-2.0",
"size": 18036
} | [
"io.fabric8.collector.NamespaceName",
"io.fabric8.openshift.api.model.BuildConfig",
"io.fabric8.openshift.api.model.BuildConfigSpec",
"io.fabric8.openshift.api.model.BuildSource",
"io.fabric8.openshift.api.model.GitBuildSource",
"io.fabric8.utils.Strings",
"java.io.IOException",
"org.eclipse.jgit.api.... | import io.fabric8.collector.NamespaceName; import io.fabric8.openshift.api.model.BuildConfig; import io.fabric8.openshift.api.model.BuildConfigSpec; import io.fabric8.openshift.api.model.BuildSource; import io.fabric8.openshift.api.model.GitBuildSource; import io.fabric8.utils.Strings; import java.io.IOException; impor... | import io.fabric8.collector.*; import io.fabric8.openshift.api.model.*; import io.fabric8.utils.*; import java.io.*; import org.eclipse.jgit.api.*; | [
"io.fabric8.collector",
"io.fabric8.openshift",
"io.fabric8.utils",
"java.io",
"org.eclipse.jgit"
] | io.fabric8.collector; io.fabric8.openshift; io.fabric8.utils; java.io; org.eclipse.jgit; | 2,398,774 |
private static String[] readSqlStatements(URL url) {
try {
char buffer[] = new char[256];
StringBuilder result = new StringBuilder();
InputStreamReader reader = new InputStreamReader(url.openStream(), "UTF-8");
while (true) {
int count = reader... | static String[] function(URL url) { try { char buffer[] = new char[256]; StringBuilder result = new StringBuilder(); InputStreamReader reader = new InputStreamReader(url.openStream(), "UTF-8"); while (true) { int count = reader.read(buffer); if (count < 0) { break; } result.append(buffer, 0, count); } return result.toS... | /**
* Reads SQL statements from file. SQL commands in file must be separated by
* a semicolon.
*
* @param url url of the file
* @return array of command strings
*/ | Reads SQL statements from file. SQL commands in file must be separated by a semicolon | readSqlStatements | {
"repo_name": "th3Dot/seminar-java",
"path": "BookRegisterMaven/src/main/java/cz/muni/fi/javaseminar/kafa/common/DBUtils.java",
"license": "mit",
"size": 6204
} | [
"java.io.IOException",
"java.io.InputStreamReader"
] | import java.io.IOException; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 1,310,671 |
public synchronized void setTitle(String title)
{
this.title = title;
if (peer != null)
((FramePeer) peer).setTitle(title);
} | synchronized void function(String title) { this.title = title; if (peer != null) ((FramePeer) peer).setTitle(title); } | /**
* Sets this frame's title to the specified value.
*
* @param title the new frame title
*/ | Sets this frame's title to the specified value | setTitle | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/java/awt/Frame.java",
"license": "gpl-2.0",
"size": 17494
} | [
"java.awt.peer.FramePeer"
] | import java.awt.peer.FramePeer; | import java.awt.peer.*; | [
"java.awt"
] | java.awt; | 2,365,995 |
@Test
public void checkPayment() {
request.setPaymentReceived(true); // rider pays
assertEquals(true,request.isPaymentRecived());
} | void function() { request.setPaymentReceived(true); assertEquals(true,request.isPaymentRecived()); } | /**
* US 01.07.01
As a rider, I want to confirm the completion of a request and enable payment.
*/ | US 01.07.01 | checkPayment | {
"repo_name": "CMPUT301F16T11/a2b",
"path": "app/src/test/java/com/cmput301f16t11/a2b/RequestsUnitTest.java",
"license": "apache-2.0",
"size": 4184
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,393,099 |
public static StopServerRequest buildStopServerRequest(final String reason) {
StopServerRequest.Builder builder = StopServerRequest.newBuilder();
builder.setReason(reason);
return builder.build();
}
//End utilities for Admin | static StopServerRequest function(final String reason) { StopServerRequest.Builder builder = StopServerRequest.newBuilder(); builder.setReason(reason); return builder.build(); } | /**
* Create a new StopServerRequest
*
* @param reason the reason to stop the server
* @return a StopServerRequest
*/ | Create a new StopServerRequest | buildStopServerRequest | {
"repo_name": "francisliu/hbase_namespace",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java",
"license": "apache-2.0",
"size": 49508
} | [
"org.apache.hadoop.hbase.protobuf.generated.AdminProtos"
] | import org.apache.hadoop.hbase.protobuf.generated.AdminProtos; | import org.apache.hadoop.hbase.protobuf.generated.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,589,169 |
private boolean deleteDirectory(File dir) {
if (!dir.exists() || !dir.isDirectory()) {
return false;
}
String[] files = dir.list();
for (int i = 0, len = files.length; i < len; i++) {
File f = new File(dir, files[i]);
if (f.isDirectory()) {
deleteDirectory(f);
} else {
f.delete();
}
... | boolean function(File dir) { if (!dir.exists() !dir.isDirectory()) { return false; } String[] files = dir.list(); for (int i = 0, len = files.length; i < len; i++) { File f = new File(dir, files[i]); if (f.isDirectory()) { deleteDirectory(f); } else { f.delete(); } } return dir.delete(); } | /**
* Deletes a dir recursively deleting anything inside it.
*
* @param dir
* The dir to delete
* @return true if the dir was successfully deleted
*/ | Deletes a dir recursively deleting anything inside it | deleteDirectory | {
"repo_name": "macedoleonardo/Mystic",
"path": "src/main/java/com/mystic/db/utils/EmbeddedMysqlDataSource.java",
"license": "apache-2.0",
"size": 3048
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,860,782 |
protected Map<PacketListener, ListenerWrapper> getPacketListeners() {
return recvListeners;
} | Map<PacketListener, ListenerWrapper> function() { return recvListeners; } | /**
* Get a map of all packet listeners for received packets of this connection.
*
* @return a map of all packet listeners for received packets.
*/ | Get a map of all packet listeners for received packets of this connection | getPacketListeners | {
"repo_name": "UzxMx/java-bells",
"path": "lib-src/smack_src_3_3_0/source/org/jivesoftware/smack/Connection.java",
"license": "bsd-3-clause",
"size": 35765
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,038,775 |
private URL getRedirectURL(AEDTO aedto, WADORequestObject req) {
URL url = null;
try {
URL reqURL = new URL( req.getRequestURL());
if ( aedto.getWadoUrl() != null ) {
URL baseURL = new URL(aedto.getWadoUrl());
StringBuffer sbQuery = new String... | URL function(AEDTO aedto, WADORequestObject req) { URL url = null; try { URL reqURL = new URL( req.getRequestURL()); if ( aedto.getWadoUrl() != null ) { URL baseURL = new URL(aedto.getWadoUrl()); StringBuffer sbQuery = new StringBuffer(); sbQuery.append('?').append(REDIRECT_PARAM).append("=true"); sbQuery.append('&').a... | /**
* Returns the WADO URL to remote server which serves the object.
* <p>
* the remote server have to be a dcm4chee-wado server on the same port as
* this WADO server!
*
* @param aedto
* @param req
* @return
*/ | Returns the WADO URL to remote server which serves the object. the remote server have to be a dcm4chee-wado server on the same port as this WADO server | getRedirectURL | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_14_0/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/WADOSupport.java",
"license": "apache-2.0",
"size": 56888
} | [
"java.net.MalformedURLException",
"org.dcm4chex.wado.common.WADORequestObject"
] | import java.net.MalformedURLException; import org.dcm4chex.wado.common.WADORequestObject; | import java.net.*; import org.dcm4chex.wado.common.*; | [
"java.net",
"org.dcm4chex.wado"
] | java.net; org.dcm4chex.wado; | 1,460,949 |
protected void processContent(Content file) {
// Handle metadata/special cases
String lowerCaseFileName = file.name.toLowerCase();
if (lowerCaseFileName.endsWith("pom.properties")) {
// handle pom properties files
InputStream is = new ByteArrayInputStream(file.bytes);... | void function(Content file) { String lowerCaseFileName = file.name.toLowerCase(); if (lowerCaseFileName.endsWith(STR)) { InputStream is = new ByteArrayInputStream(file.bytes); Metadata md = Metadata.fromPomProperties(is); putMetadata(file.name, md); } if (RECURSIVE) { Artifact record = Processor.process(file.bytes, fil... | /**
* Threadable task for processing a given {@link Content} file.
*
* @param file
*/ | Threadable task for processing a given <code>Content</code> file | processContent | {
"repo_name": "victims/victims-lib-java",
"path": "src/main/java/com/redhat/victims/fingerprint/JarFile.java",
"license": "agpl-3.0",
"size": 7323
} | [
"java.io.ByteArrayInputStream",
"java.io.InputStream"
] | import java.io.ByteArrayInputStream; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 458,927 |
public boolean refreshEditLineDialogContents(DialogGroup dialogGroup, Object model, CollectionGroup collectionGroup,
int lineIndex) {
UifFormBase formBase = (UifFormBase) model;
String selectedCollectionPath = formBase.getActionParamaterValue(UifParameters.SELECTED_COLLECTION_PATH);
... | boolean function(DialogGroup dialogGroup, Object model, CollectionGroup collectionGroup, int lineIndex) { UifFormBase formBase = (UifFormBase) model; String selectedCollectionPath = formBase.getActionParamaterValue(UifParameters.SELECTED_COLLECTION_PATH); String selectedLineIndex = formBase.getActionParamaterValue(UifP... | /**
* Helper method that checks if this is a refresh lifecycle and if the component to be refreshed is the
* dialog group, and if the action parameters bind to the same object as the collection's current line, and
* if they are then it returns true.
*
* @param dialogGroup the dialog group ... | Helper method that checks if this is a refresh lifecycle and if the component to be refreshed is the dialog group, and if the action parameters bind to the same object as the collection's current line, and if they are then it returns true | refreshEditLineDialogContents | {
"repo_name": "kuali/kc-rice",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/container/CollectionGroupBuilder.java",
"license": "apache-2.0",
"size": 36271
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.krad.uif.UifParameters",
"org.kuali.rice.krad.uif.UifPropertyPaths",
"org.kuali.rice.krad.uif.lifecycle.ViewLifecycle",
"org.kuali.rice.krad.web.form.UifFormBase"
] | import org.apache.commons.lang.StringUtils; import org.kuali.rice.krad.uif.UifParameters; import org.kuali.rice.krad.uif.UifPropertyPaths; import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle; import org.kuali.rice.krad.web.form.UifFormBase; | import org.apache.commons.lang.*; import org.kuali.rice.krad.uif.*; import org.kuali.rice.krad.uif.lifecycle.*; import org.kuali.rice.krad.web.form.*; | [
"org.apache.commons",
"org.kuali.rice"
] | org.apache.commons; org.kuali.rice; | 1,300,706 |
return find.where().eq("Id", timeId).findUnique();
} | return find.where().eq("Id", timeId).findUnique(); } | /**
* Get a Time Object from the database by id.
*
* @param timeId
*/ | Get a Time Object from the database by id | getTime | {
"repo_name": "FG-SE/InterViewer",
"path": "app/models/Time.java",
"license": "gpl-3.0",
"size": 4849
} | [
"javax.persistence.Id"
] | import javax.persistence.Id; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,903,601 |
public boolean waitFor() {
try {
myWaitSemaphore.waitFor();
return true;
}
catch (ProcessCanceledException e) {
return false;
}
} | boolean function() { try { myWaitSemaphore.waitFor(); return true; } catch (ProcessCanceledException e) { return false; } } | /**
* Wait for process execution.
*
* @return true if target process has actually ended; false if we stopped watching the process execution and don't know if it has completed.
*/ | Wait for process execution | waitFor | {
"repo_name": "apixandru/intellij-community",
"path": "platform/util/src/com/intellij/execution/process/ProcessHandler.java",
"license": "apache-2.0",
"size": 8479
} | [
"com.intellij.openapi.progress.ProcessCanceledException"
] | import com.intellij.openapi.progress.ProcessCanceledException; | import com.intellij.openapi.progress.*; | [
"com.intellij.openapi"
] | com.intellij.openapi; | 481,853 |
public boolean getEnabled() {
if ( enabled == null ) {
enabled = (SFBool)getField( "enabled" );
}
return( enabled.getValue( ) );
} | boolean function() { if ( enabled == null ) { enabled = (SFBool)getField( STR ); } return( enabled.getValue( ) ); } | /** Return the enabled boolean value.
* @return The enabled boolean value. */ | Return the enabled boolean value | getEnabled | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/external/node/keydevicesensor/SAIStringSensor.java",
"license": "gpl-2.0",
"size": 3549
} | [
"org.web3d.x3d.sai.SFBool"
] | import org.web3d.x3d.sai.SFBool; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 697,959 |
boolean result = true;
LaborJournalVoucherDetail laborJournalVoucherDetail = (LaborJournalVoucherDetail) getAccountingLineForValidation();
String positionNumber = laborJournalVoucherDetail.getPositionNumber();
if (StringUtils.isBlank(positionNumber) || LaborConstants.getDashPositionNumber().eq... | boolean result = true; LaborJournalVoucherDetail laborJournalVoucherDetail = (LaborJournalVoucherDetail) getAccountingLineForValidation(); String positionNumber = laborJournalVoucherDetail.getPositionNumber(); if (StringUtils.isBlank(positionNumber) LaborConstants.getDashPositionNumber().equals(positionNumber)) { retur... | /**
* Validates that the accounting line in the labor journal voucher document for valid position code
*
* @see org.kuali.kfs.validation.Validation#validate(java.lang.Object[])
*/ | Validates that the accounting line in the labor journal voucher document for valid position code | validate | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/document/validation/impl/LaborJournalVoucherPositionCodeExistenceCheckValidation.java",
"license": "agpl-3.0",
"size": 4486
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.kfs.module.ld.LaborConstants",
"org.kuali.kfs.module.ld.businessobject.LaborJournalVoucherDetail"
] | import org.apache.commons.lang.StringUtils; import org.kuali.kfs.module.ld.LaborConstants; import org.kuali.kfs.module.ld.businessobject.LaborJournalVoucherDetail; | import org.apache.commons.lang.*; import org.kuali.kfs.module.ld.*; import org.kuali.kfs.module.ld.businessobject.*; | [
"org.apache.commons",
"org.kuali.kfs"
] | org.apache.commons; org.kuali.kfs; | 1,495,484 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mNum = getArguments() != null ? getArguments().getInt("num") : 1;
} | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mNum = getArguments() != null ? getArguments().getInt("num") : 1; } | /**
* When creating, retrieve this instance's number from its arguments.
*/ | When creating, retrieve this instance's number from its arguments | onCreate | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "samples/Support13Demos/src/main/java/com/example/android/supportv13/app/CountingFragment.java",
"license": "apache-2.0",
"size": 2044
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,304,348 |
public void useList() {
setCollectionType(ArrayList.class);
} | void function() { setCollectionType(ArrayList.class); } | /**
* Uses {@link java.util.ArrayList} when unmarshalling.
*/ | Uses <code>java.util.ArrayList</code> when unmarshalling | useList | {
"repo_name": "adessaigne/camel",
"path": "components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java",
"license": "apache-2.0",
"size": 22284
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,910,008 |
public static long getLong(Context context, String key) {
return getLong(context, key, -1);
} | static long function(Context context, String key) { return getLong(context, key, -1); } | /**
* get long preferences
*
* @param context
* @param key The name of the preference to retrieve
* @return The preference value if it exists, or -1. Throws ClassCastException if there is a preference with this
* name that is not a long
* @see #getLong(android.content.Context,... | get long preferences | getLong | {
"repo_name": "xm0625/VBrowser-Android",
"path": "app/src/main/java/com/xm/vbrowser/app/util/PreferencesUtils.java",
"license": "gpl-2.0",
"size": 10026
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 791,484 |
void preTabInitialization(Tab tab, String url);
}
private static final String TAG = "ChromeTabCreator";
private final Activity mActivity;
private final StartupTabPreloader mStartupTabPreloader;
private final boolean mIncognito;
private WindowAndroid mNativeWindow;
private TabModel... | void preTabInitialization(Tab tab, String url); } private static final String TAG = STR; private final Activity mActivity; private final StartupTabPreloader mStartupTabPreloader; private final boolean mIncognito; private WindowAndroid mNativeWindow; private TabModel mTabModel; private TabModelOrderController mOrderCont... | /**
* Called before the Tab's initialization.
* @param tab The newly created Tab.
* @param url The URL to load.
*/ | Called before the Tab's initialization | preTabInitialization | {
"repo_name": "scheib/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java",
"license": "bsd-3-clause",
"size": 24589
} | [
"android.app.Activity",
"org.chromium.base.supplier.Supplier",
"org.chromium.chrome.browser.compositor.CompositorViewHolder",
"org.chromium.chrome.browser.init.StartupTabPreloader",
"org.chromium.chrome.browser.tab.Tab",
"org.chromium.chrome.browser.tab.TabDelegateFactory",
"org.chromium.ui.base.WindowA... | import android.app.Activity; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.browser.compositor.CompositorViewHolder; import org.chromium.chrome.browser.init.StartupTabPreloader; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabDelegateFactory; import org.chro... | import android.app.*; import org.chromium.base.supplier.*; import org.chromium.chrome.browser.compositor.*; import org.chromium.chrome.browser.init.*; import org.chromium.chrome.browser.tab.*; import org.chromium.ui.base.*; | [
"android.app",
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.ui"
] | android.app; org.chromium.base; org.chromium.chrome; org.chromium.ui; | 265,320 |
public static DescendantListener addMouseListener(Component c,
final MouseMotionListener mouseListener, boolean includeParent,
final Class... classesToIgnore) {
return addMouseListener(c, null, mouseListener, includeParent,
classesToIgnore);
} | static DescendantListener function(Component c, final MouseMotionListener mouseListener, boolean includeParent, final Class... classesToIgnore) { return addMouseListener(c, null, mouseListener, includeParent, classesToIgnore); } | /**
* Add MouseMotionListener to a component and all of its descendants.
*
* @param classesToIgnore
* an optional set of Component classes for which we will NOT add
* the mouse listener.
*/ | Add MouseMotionListener to a component and all of its descendants | addMouseListener | {
"repo_name": "mickleness/pumpernickel",
"path": "src/main/java/com/pump/awt/DescendantListener.java",
"license": "mit",
"size": 5704
} | [
"java.awt.Component",
"java.awt.event.MouseMotionListener"
] | import java.awt.Component; import java.awt.event.MouseMotionListener; | import java.awt.*; import java.awt.event.*; | [
"java.awt"
] | java.awt; | 828,734 |
@Test
public void testEquals() {
DefaultCategoryDataset d1 = new DefaultCategoryDataset();
d1.setValue(23.4, "R1", "C1");
DefaultCategoryDataset d2 = new DefaultCategoryDataset();
d2.setValue(23.4, "R1", "C1");
assertEquals(d1, d2);
assertEquals(d2, d1);
... | void function() { DefaultCategoryDataset d1 = new DefaultCategoryDataset(); d1.setValue(23.4, "R1", "C1"); DefaultCategoryDataset d2 = new DefaultCategoryDataset(); d2.setValue(23.4, "R1", "C1"); assertEquals(d1, d2); assertEquals(d2, d1); d1.setValue(36.5, "R1", "C2"); assertFalse(d1.equals(d2)); d2.setValue(36.5, "R1... | /**
* Confirm that the equals method can distinguish all the required fields.
*/ | Confirm that the equals method can distinguish all the required fields | testEquals | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/test/java/org/jfree/data/category/DefaultCategoryDatasetTest.java",
"license": "lgpl-2.1",
"size": 13045
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,094,946 |
EAttribute getCreditCard_GracePeriod(); | EAttribute getCreditCard_GracePeriod(); | /**
* Returns the meta object for the attribute '{@link org.nasdanika.examples.bank.CreditCard#getGracePeriod <em>Grace Period</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Grace Period</em>'.
* @see org.nasdanika.examples.bank.CreditCard#getGracePe... | Returns the meta object for the attribute '<code>org.nasdanika.examples.bank.CreditCard#getGracePeriod Grace Period</code>'. | getCreditCard_GracePeriod | {
"repo_name": "Nasdanika/examples",
"path": "org.nasdanika.examples.bank/src/org/nasdanika/examples/bank/BankPackage.java",
"license": "epl-1.0",
"size": 69780
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,165,137 |
public void setImage(Image image) {
fImage = image;
} | void function(Image image) { fImage = image; } | /**
* Sets the proposal's image or <code>null</code> if no image is desired.
*
* @param image the desired image.
*/ | Sets the proposal's image or <code>null</code> if no image is desired | setImage | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/ui/text/java/correction/ChangeCorrectionProposal.java",
"license": "epl-1.0",
"size": 15320
} | [
"org.eclipse.swt.graphics.Image"
] | import org.eclipse.swt.graphics.Image; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,573,685 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> deleteWithResponseAsync(
String resourceGroupName, String cacheName, String privateEndpointConnectionName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new Il... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String resourceGroupName, String cacheName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new Illeg... | /**
* Deletes the specified private endpoint connection associated with the redis cache.
*
* @param resourceGroupName The name of the resource group.
* @param cacheName The name of the Redis cache.
* @param privateEndpointConnectionName The name of the private endpoint connection associated wit... | Deletes the specified private endpoint connection associated with the redis cache | deleteWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-redis/src/main/java/com/azure/resourcemanager/redis/implementation/PrivateEndpointConnectionsClientImpl.java",
"license": "mit",
"size": 50106
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,135,615 |
public static boolean setClient(Client client) {
boolean updated = false;
try {
// Update the clientspec
Process p4 = Common.exec("p4 client -i ");
PrintWriter p4out = new PrintWriter(p4.getOutputStream(), true);
p4out.print(client.toString());
... | static boolean function(Client client) { boolean updated = false; try { Process p4 = Common.exec(STR); PrintWriter p4out = new PrintWriter(p4.getOutputStream(), true); p4out.print(client.toString()); p4out.flush(); p4out.close(); boolean error = p4out.checkError(); int result = p4.waitFor(); if (result > 0) { error = t... | /**
* Update the client information for the specified client.
* This is equivalent to executing the following p4 command:
* <blockquote>
* p4 client -i SOMECLIENTSPEC < clientspec
* </blockquote>
*
* @param client Updated clientspec information
* @param TRUE if the cli... | Update the client information for the specified client. This is equivalent to executing the following p4 command: p4 client -i SOMECLIENTSPEC | setClient | {
"repo_name": "ModelN/build-management",
"path": "mn-build-core/src/main/java/com/modeln/build/perforce/Client.java",
"license": "mit",
"size": 24456
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.PrintWriter"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 247,569 |
public static void main(String [] args) throws Exception {
PopulationFunctionFromJSON instance = new PopulationFunctionFromJSON();
instance.initByName(
"fileName", "/home/tim/work/articles/volzpaper/SimulatedData/SIR_1000sims.json",
"popSizeExpression", "(I-... | static void function(String [] args) throws Exception { PopulationFunctionFromJSON instance = new PopulationFunctionFromJSON(); instance.initByName( STR, STR, STR, STR, STR, new RealParameter(STR), STR, 1, STR, 0.0, STR, 0.0); PrintStream outf = new PrintStream(STR); outf.println(STR); double dt = 66.5499977474/1000; f... | /**
* Main method for debugging.
*/ | Main method for debugging | main | {
"repo_name": "CompEvol/MASTER",
"path": "src/master/utilities/PopulationFunctionFromJSON.java",
"license": "gpl-3.0",
"size": 9717
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,740,362 |
@Override
public Matrix derivative(final DirectPosition point) {
final MatrixSIS matrix = Matrices.createZero(indices.length, srcDim);
for (int j=0; j<indices.length; j++) {
matrix.setElement(j, indices[j], 1);
}
return matrix;
} | Matrix function(final DirectPosition point) { final MatrixSIS matrix = Matrices.createZero(indices.length, srcDim); for (int j=0; j<indices.length; j++) { matrix.setElement(j, indices[j], 1); } return matrix; } | /**
* Gets the derivative of this transform at a point.
* For a matrix transform, the derivative is the same everywhere.
*
* @param point ignored (can be {@code null}).
*/ | Gets the derivative of this transform at a point. For a matrix transform, the derivative is the same everywhere | derivative | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/CopyTransform.java",
"license": "apache-2.0",
"size": 15570
} | [
"org.apache.sis.referencing.operation.matrix.Matrices",
"org.apache.sis.referencing.operation.matrix.MatrixSIS",
"org.opengis.geometry.DirectPosition",
"org.opengis.referencing.operation.Matrix"
] | import org.apache.sis.referencing.operation.matrix.Matrices; import org.apache.sis.referencing.operation.matrix.MatrixSIS; import org.opengis.geometry.DirectPosition; import org.opengis.referencing.operation.Matrix; | import org.apache.sis.referencing.operation.matrix.*; import org.opengis.geometry.*; import org.opengis.referencing.operation.*; | [
"org.apache.sis",
"org.opengis.geometry",
"org.opengis.referencing"
] | org.apache.sis; org.opengis.geometry; org.opengis.referencing; | 1,636,403 |
public void process(String sUserId, IAttributes oAttributes) throws AttributeException
{
DirContext oDirContext = null;
NamingEnumeration oNamingEnumeration = null;
try
{
try
{
oDirContext = new InitialDirContext(_htJNDIEnvironment)... | void function(String sUserId, IAttributes oAttributes) throws AttributeException { DirContext oDirContext = null; NamingEnumeration oNamingEnumeration = null; try { try { oDirContext = new InitialDirContext(_htJNDIEnvironment); } catch (NamingException e) { _logger.error(STR + _htJNDIEnvironment); throw new AttributeEx... | /**
* Gathers attributes from JNDI storage to the supplied attributes object.
* @see com.alfaariss.oa.engine.core.attribute.gather.processor.IProcessor#process(java.lang.String, com.alfaariss.oa.api.attribute.IAttributes)
*/ | Gathers attributes from JNDI storage to the supplied attributes object | process | {
"repo_name": "GluuFederation/Asimba",
"path": "asimba-engine-attribute-gather-jndi/src/main/java/com/alfaariss/oa/engine/attribute/gather/processor/jndi/JNDIGatherer.java",
"license": "agpl-3.0",
"size": 20400
} | [
"com.alfaariss.oa.SystemErrors",
"com.alfaariss.oa.api.attribute.IAttributes",
"com.alfaariss.oa.engine.core.attribute.AttributeException",
"java.util.Vector",
"javax.naming.Context",
"javax.naming.NamingEnumeration",
"javax.naming.NamingException",
"javax.naming.directory.Attribute",
"javax.naming.... | import com.alfaariss.oa.SystemErrors; import com.alfaariss.oa.api.attribute.IAttributes; import com.alfaariss.oa.engine.core.attribute.AttributeException; import java.util.Vector; import javax.naming.Context; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attri... | import com.alfaariss.oa.*; import com.alfaariss.oa.api.attribute.*; import com.alfaariss.oa.engine.core.attribute.*; import java.util.*; import javax.naming.*; import javax.naming.directory.*; | [
"com.alfaariss.oa",
"java.util",
"javax.naming"
] | com.alfaariss.oa; java.util; javax.naming; | 1,388,891 |
public URL addParameters(Map<String, String> parameters) {
if (parameters == null || parameters.size() == 0) {
return this;
}
boolean hasAndEqual = true;
for(Map.Entry<String, String> entry : parameters.entrySet()) {
String value = getParameters().ge... | URL function(Map<String, String> parameters) { if (parameters == null parameters.size() == 0) { return this; } boolean hasAndEqual = true; for(Map.Entry<String, String> entry : parameters.entrySet()) { String value = getParameters().get(entry.getKey()); if(value == null && entry.getValue() != null !value.equals(entry.g... | /**
* Add parameters to a new url.
*
* @param parameters
* @return A new URL
*/ | Add parameters to a new url | addParameters | {
"repo_name": "yshaojie/dubbo",
"path": "dubbo-common/src/main/java/com/alibaba/dubbo/common/URL.java",
"license": "apache-2.0",
"size": 45854
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,247,945 |
public static <T> T first(T[] self) {
if (self.length == 0) {
throw new NoSuchElementException("Cannot access first() element from an empty List");
}
return self[0];
} | static <T> T function(T[] self) { if (self.length == 0) { throw new NoSuchElementException(STR); } return self[0]; } | /**
* Returns the first item from the Object array.
* <pre class="groovyTestCase">def array = [3, 4, 2].toArray()
* assert array.first() == 3</pre>
*
* @param self an Object array
* @return the first item from the Object array
* @throws NoSuchElementException if the array is empty and... | Returns the first item from the Object array. def array = [3, 4, 2].toArray() assert array.first() == 3</code> | first | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,565,550 |
public void testNormalCase3() {
Queue fifo = new Queue(4);
Integer result = null;
fifo.add(Integer.valueOf(1));
fifo.add(Integer.valueOf(2));
fifo.add(Integer.valueOf(3));
result = (Integer)fifo.get();
assertEquals(Integer.valueOf(1), result);
result = (Integer)fifo.get();
assertEquals(Integer.v... | void function() { Queue fifo = new Queue(4); Integer result = null; fifo.add(Integer.valueOf(1)); fifo.add(Integer.valueOf(2)); fifo.add(Integer.valueOf(3)); result = (Integer)fifo.get(); assertEquals(Integer.valueOf(1), result); result = (Integer)fifo.get(); assertEquals(Integer.valueOf(2), result); fifo.add(Integer.v... | /**
* Put in elements and take them out. But now try to roll over the
* queue, this is transparant to the user of the queue.
*/ | Put in elements and take them out. But now try to roll over the queue, this is transparant to the user of the queue | testNormalCase3 | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/test/org/jetel/util/FifoTest.java",
"license": "lgpl-2.1",
"size": 5527
} | [
"org.jetel.util.primitive.Queue"
] | import org.jetel.util.primitive.Queue; | import org.jetel.util.primitive.*; | [
"org.jetel.util"
] | org.jetel.util; | 2,668,429 |
@Override
public void removeStatementEventListener(StatementEventListener listener) {
throw new UnsupportedOperationException();
} | void function(StatementEventListener listener) { throw new UnsupportedOperationException(); } | /**
* [Not supported] Remove a statement event listener.
*
* @param listener the statement event listener
*/ | [Not supported] Remove a statement event listener | removeStatementEventListener | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/jdbcx/JdbcXAConnection.java",
"license": "mpl-2.0",
"size": 14282
} | [
"javax.sql.StatementEventListener"
] | import javax.sql.StatementEventListener; | import javax.sql.*; | [
"javax.sql"
] | javax.sql; | 2,475,570 |
@Override public T visitNumber(@NotNull PrologParser.NumberContext ctx) { return visitChildren(ctx); } | @Override public T visitNumber(@NotNull PrologParser.NumberContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitPlrule | {
"repo_name": "BasTesterink/WAM",
"path": "src/parser/PrologBaseVisitor.java",
"license": "mit",
"size": 3301
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 950,762 |
@Test
public void testReadXMPSeq() throws COSVisitorException, IOException {
String bibtex = "<bibtex:author><rdf:Seq>\n" + " <rdf:li>Kelly Clarkson</rdf:li>"
+ " <rdf:li>Ozzy Osbourne</rdf:li>" + "</rdf:Seq></bibtex:author>" + "<bibtex:editor><rdf:Seq>"
+ " <rdf:li>H... | void function() throws COSVisitorException, IOException { String bibtex = STR + STR + STR + STR + STR + STR + STR + STR + STR + STR; writeManually(pdfFile, XMPUtilTest.bibtexXPacket(XMPUtilTest.bibtexDescription(bibtex))); List<BibEntry> l = XMPUtil.readXMP(pdfFile.getAbsoluteFile(), xmpPreferences); Assert.assertEqual... | /**
* Are authors and editors correctly read?
* @throws IOException
* @throws COSVisitorException
*/ | Are authors and editors correctly read | testReadXMPSeq | {
"repo_name": "shitikanth/jabref",
"path": "src/test/java/org/jabref/logic/xmp/XMPUtilTest.java",
"license": "mit",
"size": 62159
} | [
"java.io.IOException",
"java.util.List",
"java.util.Optional",
"org.apache.pdfbox.exceptions.COSVisitorException",
"org.jabref.model.entry.BibEntry",
"org.junit.Assert"
] | import java.io.IOException; import java.util.List; import java.util.Optional; import org.apache.pdfbox.exceptions.COSVisitorException; import org.jabref.model.entry.BibEntry; import org.junit.Assert; | import java.io.*; import java.util.*; import org.apache.pdfbox.exceptions.*; import org.jabref.model.entry.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.pdfbox",
"org.jabref.model",
"org.junit"
] | java.io; java.util; org.apache.pdfbox; org.jabref.model; org.junit; | 716,603 |
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Default processing provided by our superclass
... | void function(Container container) { if ((this.container != null) && (this.container instanceof Context)) ((Context) this.container).removePropertyChangeListener(this); super.setContainer(container); if ((this.container != null) && (this.container instanceof Context)) { ((Context) this.container).addPropertyChangeListe... | /**
* Set the Container with which this Manager has been associated. If
* it is a Context (the usual case), listen for changes to the session
* timeout property.
*
* @param container The associated Container
*/ | Set the Container with which this Manager has been associated. If it is a Context (the usual case), listen for changes to the session timeout property | setContainer | {
"repo_name": "Netprophets/JBOSSWEB_7_0_13_FINAL",
"path": "java/org/apache/catalina/session/StandardManager.java",
"license": "lgpl-3.0",
"size": 23760
} | [
"org.apache.catalina.Container",
"org.apache.catalina.Context"
] | import org.apache.catalina.Container; import org.apache.catalina.Context; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,332,614 |
IViewContext getContext(); | IViewContext getContext(); | /**
* Returns the view context. It offers access to more view related
* information.
*
* @return context The view context
*/ | Returns the view context. It offers access to more view related information | getContext | {
"repo_name": "lunifera/lunifera-ecview",
"path": "org.lunifera.ecview.core.common/src/org/lunifera/ecview/core/common/editpart/IViewEditpart.java",
"license": "epl-1.0",
"size": 5321
} | [
"org.lunifera.ecview.core.common.context.IViewContext"
] | import org.lunifera.ecview.core.common.context.IViewContext; | import org.lunifera.ecview.core.common.context.*; | [
"org.lunifera.ecview"
] | org.lunifera.ecview; | 1,446,882 |
protected void registerFlowDefinitionIntoLoginFlowRegistry(final FlowDefinitionRegistry sourceRegistry) {
final String[] flowIds = sourceRegistry.getFlowDefinitionIds();
for (final String flowId : flowIds) {
final FlowDefinition definition = sourceRegistry.getFlowDefinition(flowId);
... | void function(final FlowDefinitionRegistry sourceRegistry) { final String[] flowIds = sourceRegistry.getFlowDefinitionIds(); for (final String flowId : flowIds) { final FlowDefinition definition = sourceRegistry.getFlowDefinition(flowId); logger.debug(STR, flowId); this.loginFlowDefinitionRegistry.registerFlowDefinitio... | /**
* Register flow definition into login flow registry.
*
* @param sourceRegistry the source registry
*/ | Register flow definition into login flow registry | registerFlowDefinitionIntoLoginFlowRegistry | {
"repo_name": "yisiqi/cas",
"path": "cas-server-core-webflow/src/main/java/org/apereo/cas/web/flow/AbstractCasWebflowConfigurer.java",
"license": "apache-2.0",
"size": 24245
} | [
"org.springframework.webflow.definition.FlowDefinition",
"org.springframework.webflow.definition.registry.FlowDefinitionRegistry"
] | import org.springframework.webflow.definition.FlowDefinition; import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; | import org.springframework.webflow.definition.*; import org.springframework.webflow.definition.registry.*; | [
"org.springframework.webflow"
] | org.springframework.webflow; | 1,744,318 |
public String run(String request) {
try {
String urlString = this.baseURL + this.resource + request;
Log.d("CALLING URL", urlString);
URL url = new URL(urlString);
Log.d("alive", "1");
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setConnectTimeout(150)... | String function(String request) { try { String urlString = this.baseURL + this.resource + request; Log.d(STR, urlString); URL url = new URL(urlString); Log.d("aliveSTR1"); HttpURLConnection connection = (HttpURLConnection) url .openConnection(); connection.setConnectTimeout(150); Log.d("aliveSTR2"); connection.setReque... | /**
* runs the request. returns the whole plain JSON response text. returns
* null if the request as a HTTP request failed.
*
* @param request
* @return String
*/ | runs the request. returns the whole plain JSON response text. returns null if the request as a HTTP request failed | run | {
"repo_name": "wolxXx/android.app.de.mein-plattenregal",
"path": "src/de/mein_plattenregal/logic/Requestor.java",
"license": "mit",
"size": 3735
} | [
"android.util.Log",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.OutputStreamWriter",
"java.net.HttpURLConnection"
] | import android.util.Log; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; | import android.util.*; import java.io.*; import java.net.*; | [
"android.util",
"java.io",
"java.net"
] | android.util; java.io; java.net; | 788,628 |
public GetObjectResponse getObject(@Nonnull byte[] objectId) throws IOException; | GetObjectResponse function(@Nonnull byte[] objectId) throws IOException; | /**
* Get an object with id <code>objectId</code> stored in the store.
* @param objectId to retrieve
* @return a {@link GetObjectResponse} with an {@link InputStream} to the object and object metadata
* @throws IOException if object does not exist or there was a failure reading the object
*/ | Get an object with id <code>objectId</code> stored in the store | getObject | {
"repo_name": "yukuai518/gobblin",
"path": "gobblin-core/src/main/java/gobblin/writer/objectstore/ObjectStoreClient.java",
"license": "apache-2.0",
"size": 3256
} | [
"java.io.IOException",
"javax.annotation.Nonnull"
] | import java.io.IOException; import javax.annotation.Nonnull; | import java.io.*; import javax.annotation.*; | [
"java.io",
"javax.annotation"
] | java.io; javax.annotation; | 1,450,404 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<ArmDisasterRecoveryInner> getAsync(String resourceGroupName, String namespaceName, String alias) {
return getWithResponseAsync(resourceGroupName, namespaceName, alias)
.flatMap(
(Response<ArmDisasterRecoveryInner> res) -... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<ArmDisasterRecoveryInner> function(String resourceGroupName, String namespaceName, String alias) { return getWithResponseAsync(resourceGroupName, namespaceName, alias) .flatMap( (Response<ArmDisasterRecoveryInner> res) -> { if (res.getValue() != null) { return Mono.just(... | /**
* Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name.
* @param alias The Disaster Recovery configuration name.
* @throws Il... | Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace | getAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java",
"license": "mit",
"size": 101562
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.eventhubs.fluent.models.ArmDisasterRecoveryInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.eventhubs.fluent.models.ArmDisasterRecoveryInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.eventhubs.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,091,044 |
static Unit<? extends Quantity> getQuotientInstance(Unit<?> left, Unit<?> right) {
Element[] leftElems;
if (left instanceof ProductUnit) {
leftElems = ((ProductUnit<?>) left)._elements;
} else {
leftElems = new Element[] { new Element(left, 1, 1) };
}
... | static Unit<? extends Quantity> getQuotientInstance(Unit<?> left, Unit<?> right) { Element[] leftElems; if (left instanceof ProductUnit) { leftElems = ((ProductUnit<?>) left)._elements; } else { leftElems = new Element[] { new Element(left, 1, 1) }; } Element[] rightElems; if (right instanceof ProductUnit) { Element[] ... | /**
* Returns the quotient of the specified units.
*
* @param left the dividend unit operand.
* @param right the divisor unit operand.
* @return <code>dividend / divisor</code>
*/ | Returns the quotient of the specified units | getQuotientInstance | {
"repo_name": "mkulesh/microMathematics",
"path": "app/src/main/java/javax/measure/unit/ProductUnit.java",
"license": "gpl-3.0",
"size": 15434
} | [
"javax.measure.quantity.Quantity"
] | import javax.measure.quantity.Quantity; | import javax.measure.quantity.*; | [
"javax.measure"
] | javax.measure; | 1,780,887 |
@Override
protected void initializeFromAttribute(MXMLTreeBuilder builder,
IMXMLTagAttributeData attribute,
MXMLNodeInfo info)
{
super.initializeFromAttribute(builder, attribute, info);
// Break the attribu... | void function(MXMLTreeBuilder builder, IMXMLTagAttributeData attribute, MXMLNodeInfo info) { super.initializeFromAttribute(builder, attribute, info); Collection<ICompilerProblem> problems = builder.getProblems(); ISourceFragment[] fragments = attribute.getValueFragments(problems); info.addSourceFragments(attribute.getS... | /**
* This override handles a property attribute like label="OK".
*/ | This override handles a property attribute like label="OK" | initializeFromAttribute | {
"repo_name": "greg-dove/flex-falcon",
"path": "compiler/src/main/java/org/apache/flex/compiler/internal/tree/mxml/MXMLPropertySpecifierNode.java",
"license": "apache-2.0",
"size": 21319
} | [
"java.util.Collection",
"org.apache.flex.compiler.internal.parsing.ISourceFragment",
"org.apache.flex.compiler.mxml.IMXMLTagAttributeData",
"org.apache.flex.compiler.problems.ICompilerProblem"
] | import java.util.Collection; import org.apache.flex.compiler.internal.parsing.ISourceFragment; import org.apache.flex.compiler.mxml.IMXMLTagAttributeData; import org.apache.flex.compiler.problems.ICompilerProblem; | import java.util.*; import org.apache.flex.compiler.internal.parsing.*; import org.apache.flex.compiler.mxml.*; import org.apache.flex.compiler.problems.*; | [
"java.util",
"org.apache.flex"
] | java.util; org.apache.flex; | 2,790,939 |
protected NatsListenerContainer createListenerContainer(NatsListenerEndpoint endpoint,
NatsListenerContainerFactory factory) {
NatsListenerContainer listenerContainer = factory.createListenerContainer(endpoint);
if (listenerContainer instanceof InitializingBean) {
try {
((InitializingBean... | NatsListenerContainer function(NatsListenerEndpoint endpoint, NatsListenerContainerFactory factory) { NatsListenerContainer listenerContainer = factory.createListenerContainer(endpoint); if (listenerContainer instanceof InitializingBean) { try { ((InitializingBean) listenerContainer).afterPropertiesSet(); } catch (Exce... | /**
* Create and start a new {@link NatsListenerContainer} using the specified factory.
* @param endpoint the endpoint to create a {@link NatsListenerContainer}.
* @param factory the {@link NatsListenerContainerFactory} to use.
* @return the {@link NatsListenerContainer}.
*/ | Create and start a new <code>NatsListenerContainer</code> using the specified factory | createListenerContainer | {
"repo_name": "dstrelec/nats",
"path": "nats-enabler/src/main/java/dstrelec/nats/config/NatsListenerEndpointRegistry.java",
"license": "apache-2.0",
"size": 10582
} | [
"org.springframework.beans.factory.BeanInitializationException",
"org.springframework.beans.factory.InitializingBean"
] | import org.springframework.beans.factory.BeanInitializationException; import org.springframework.beans.factory.InitializingBean; | import org.springframework.beans.factory.*; | [
"org.springframework.beans"
] | org.springframework.beans; | 1,675,292 |
@Override
public synchronized void write(byte[] b, int off, int len) throws IOException {
checkStream();
if (b == null) {
throw new NullPointerException();
} else if (off < 0 || len < 0 || off > b.length ||
len > b.length - off) {
throw new IndexOutOfBoundsException();
}
whi... | synchronized void function(byte[] b, int off, int len) throws IOException { checkStream(); if (b == null) { throw new NullPointerException(); } else if (off < 0 len < 0 off > b.length len > b.length - off) { throw new IndexOutOfBoundsException(); } while (len > 0) { final int remaining = inBuffer.remaining(); if (len <... | /**
* Encryption is buffer based.
* If there is enough room in {@link #inBuffer}, then write to this buffer.
* If {@link #inBuffer} is full, then do encryption and write data to the
* underlying stream.
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes... | Encryption is buffer based. If there is enough room in <code>#inBuffer</code>, then write to this buffer. If <code>#inBuffer</code> is full, then do encryption and write data to the underlying stream | write | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java",
"license": "apache-2.0",
"size": 9378
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,603,400 |
public void unregister(Object subscriber) {
if (DEBUG_TRACE_ALL) {
logWithPid("unregister()");
}
// Fail immediately if we are being called from the non-main thread
long callingThreadId = Thread.currentThread().getId();
if (callingThreadId != mHandler.getLooper()... | void function(Object subscriber) { if (DEBUG_TRACE_ALL) { logWithPid(STR); } long callingThreadId = Thread.currentThread().getId(); if (callingThreadId != mHandler.getLooper().getThread().getId()) { throw new RuntimeException(STR); } if (!findRegisteredSubscriber(subscriber, true )) { return; } Class<?> subscriberType ... | /**
* Remove all EventHandlers pointing to the specified subscriber. This does not remove the
* mapping of subscriber type to event handler method, in case new instances of this subscriber
* are registered.
*/ | Remove all EventHandlers pointing to the specified subscriber. This does not remove the mapping of subscriber type to event handler method, in case new instances of this subscriber are registered | unregister | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/SystemUI/src/com/android/systemui/recents/events/EventBus.java",
"license": "apache-2.0",
"size": 39441
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,357,724 |
@SuppressWarnings("unchecked")
protected String addPostRunDependent(Executable<? extends Indexable> executable) {
TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) executable;
return this.addPostRunDependent(dependency);
} | @SuppressWarnings(STR) String function(Executable<? extends Indexable> executable) { TaskGroup.HasTaskGroup dependency = (TaskGroup.HasTaskGroup) executable; return this.addPostRunDependent(dependency); } | /**
* Add an executable "post-run" dependent for this task item.
*
* @param executable the executable "post-run" dependent
* @return the key to be used as parameter to taskResult(string) method to retrieve result of executing
* the executable "post-run" dependent
*/ | Add an executable "post-run" dependent for this task item | addPostRunDependent | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/dag/IndexableTaskItem.java",
"license": "mit",
"size": 10694
} | [
"com.azure.resourcemanager.resources.fluentcore.model.Executable",
"com.azure.resourcemanager.resources.fluentcore.model.Indexable"
] | import com.azure.resourcemanager.resources.fluentcore.model.Executable; import com.azure.resourcemanager.resources.fluentcore.model.Indexable; | import com.azure.resourcemanager.resources.fluentcore.model.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 113,087 |
private Hop simplifyDotProductSum(Hop parent, Hop hi, int pos)
throws HopsException
{
//sum(v^2)/sum(v1*v2) --> as.scalar(t(v)%*%v) in order to exploit tsmm vector dotproduct
//w/o materialization of intermediates
if( hi instanceof AggUnaryOp && ((AggUnaryOp)hi).getOp()==AggOp.SUM //sum
&& ((AggUnaryOp... | Hop function(Hop parent, Hop hi, int pos) throws HopsException { if( hi instanceof AggUnaryOp && ((AggUnaryOp)hi).getOp()==AggOp.SUM && ((AggUnaryOp)hi).getDirection()==Direction.RowCol && hi.getInput().get(0).getDim2() == 1 ) { Hop baLeft = null; Hop baRight = null; Hop hi2 = hi.getInput().get(0); if( HopRewriteUtils.... | /**
* NOTE: dot-product-sum could be also applied to sum(a*b). However, we
* restrict ourselfs to sum(a^2) and transitively sum(a*a) since a general mm
* a%*%b on MR can be also counter-productive (e.g., MMCJ) while tsmm is always
* beneficial.
*
* @param parent parent high-level operator
* @param hi ... | restrict ourselfs to sum(a^2) and transitively sum(a*a) since a general mm a%*%b on MR can be also counter-productive (e.g., MMCJ) while tsmm is always beneficial | simplifyDotProductSum | {
"repo_name": "sandeep-n/incubator-systemml",
"path": "src/main/java/org/apache/sysml/hops/rewrite/RewriteAlgebraicSimplificationDynamic.java",
"license": "apache-2.0",
"size": 99470
} | [
"org.apache.sysml.hops.AggBinaryOp",
"org.apache.sysml.hops.AggUnaryOp",
"org.apache.sysml.hops.Hop",
"org.apache.sysml.hops.HopsException",
"org.apache.sysml.hops.LiteralOp",
"org.apache.sysml.hops.ReorgOp",
"org.apache.sysml.hops.UnaryOp"
] | import org.apache.sysml.hops.AggBinaryOp; import org.apache.sysml.hops.AggUnaryOp; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.LiteralOp; import org.apache.sysml.hops.ReorgOp; import org.apache.sysml.hops.UnaryOp; | import org.apache.sysml.hops.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 1,707,117 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<RulesResultsInner> addAsync(String workspaceId, String resourceId) {
final RulesResultsInput body = null;
return addWithResponseAsync(workspaceId, resourceId, body)
.flatMap(
(Response<RulesResultsInner> res) ->... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<RulesResultsInner> function(String workspaceId, String resourceId) { final RulesResultsInput body = null; return addWithResponseAsync(workspaceId, resourceId, body) .flatMap( (Response<RulesResultsInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getVal... | /**
* Add a list of baseline rules. Will overwrite any previously existing results (for all rules).
*
* @param workspaceId The workspace Id.
* @param resourceId The identifier of the resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws Management... | Add a list of baseline rules. Will overwrite any previously existing results (for all rules) | addAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/SqlVulnerabilityAssessmentBaselineRulesClientImpl.java",
"license": "mit",
"size": 40824
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.security.fluent.models.RulesResultsInner",
"com.azure.resourcemanager.security.models.RulesResultsInput"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.security.fluent.models.RulesResultsInner; import com.azure.resourcemanager.security.models.RulesResultsInput; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.security.fluent.models.*; import com.azure.resourcemanager.security.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,107,768 |
private Set<MClassifier> getSelectedClassifier() {
return ((SelectionClassTableModel)fTableModel).getSelectedClassifier();
} | Set<MClassifier> function() { return ((SelectionClassTableModel)fTableModel).getSelectedClassifier(); } | /**
* Method getSelectedClasses return selected classes.
*/ | Method getSelectedClasses return selected classes | getSelectedClassifier | {
"repo_name": "anonymous100001/maxuse",
"path": "src/gui/org/tzi/use/gui/views/selection/classselection/SelectionClassView.java",
"license": "gpl-2.0",
"size": 6880
} | [
"java.util.Set",
"org.tzi.use.uml.mm.MClassifier"
] | import java.util.Set; import org.tzi.use.uml.mm.MClassifier; | import java.util.*; import org.tzi.use.uml.mm.*; | [
"java.util",
"org.tzi.use"
] | java.util; org.tzi.use; | 1,687,771 |
TableMetaData getTableMetaData(String tableName); | TableMetaData getTableMetaData(String tableName); | /**
* Gets the metadata (column names, column types, etc.) of a certain table. Returns null when no table exists with the given name.
*/ | Gets the metadata (column names, column types, etc.) of a certain table. Returns null when no table exists with the given name | getTableMetaData | {
"repo_name": "lsmall/flowable-engine",
"path": "modules/flowable-content-api/src/main/java/org/flowable/content/api/ContentManagementService.java",
"license": "apache-2.0",
"size": 1844
} | [
"org.flowable.common.engine.api.management.TableMetaData"
] | import org.flowable.common.engine.api.management.TableMetaData; | import org.flowable.common.engine.api.management.*; | [
"org.flowable.common"
] | org.flowable.common; | 2,861,800 |
@Deprecated
public static List<SAMLSSOServiceProviderDO> getRemainingSessionParticipantsForSLO(
String sessionIndex, String issuer, boolean isIdPInitSLO) {
// For backward compatibility, SUPER_TENANT_DOMAIN was used as the cache maintaining tenant.
return getRemainingSessionParticip... | static List<SAMLSSOServiceProviderDO> function( String sessionIndex, String issuer, boolean isIdPInitSLO) { return getRemainingSessionParticipantsForSLO(sessionIndex, issuer, isIdPInitSLO, MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); } | /**
* Get remaining session participants for SLO except for the original issuer.
*
* @param sessionIndex Session index.
* @param issuer Original issuer.
* @param isIdPInitSLO Whether IdP initiated SLO or not.
* @return SP List with remaining session participants for SLO except for th... | Get remaining session participants for SLO except for the original issuer | getRemainingSessionParticipantsForSLO | {
"repo_name": "wso2-extensions/identity-inbound-auth-saml",
"path": "components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java",
"license": "apache-2.0",
"size": 115944
} | [
"java.util.List",
"org.wso2.carbon.identity.core.model.SAMLSSOServiceProviderDO",
"org.wso2.carbon.utils.multitenancy.MultitenantConstants"
] | import java.util.List; import org.wso2.carbon.identity.core.model.SAMLSSOServiceProviderDO; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; | import java.util.*; import org.wso2.carbon.identity.core.model.*; import org.wso2.carbon.utils.multitenancy.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,234,135 |
public JTextField getTextoFecha() {
if (textoFecha == null) {
textoFecha = new JTextField();
textoFecha.setEditable(false);
textoFecha.setBackground(new Color(238, 238, 238));
}
return textoFecha;
}
| JTextField function() { if (textoFecha == null) { textoFecha = new JTextField(); textoFecha.setEditable(false); textoFecha.setBackground(new Color(238, 238, 238)); } return textoFecha; } | /**
* This method initializes textoFecha
*
* @return javax.swing.JTextField
*/ | This method initializes textoFecha | getTextoFecha | {
"repo_name": "lucianait10/BasicVet",
"path": "source_basicvet/cuGestionarVenta/GUIVenta.java",
"license": "gpl-3.0",
"size": 21893
} | [
"java.awt.Color",
"javax.swing.JTextField"
] | import java.awt.Color; import javax.swing.JTextField; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 875 |
public int getInteger(String keyStr) {
SoyData valueData = get(keyStr);
if (valueData == null) {
throw new IllegalArgumentException("Missing key: " + keyStr);
}
return valueData.integerValue();
} | int function(String keyStr) { SoyData valueData = get(keyStr); if (valueData == null) { throw new IllegalArgumentException(STR + keyStr); } return valueData.integerValue(); } | /**
* Precondition: The specified key string is the path to an integer. Gets the integer at the
* specified key string.
*
* @param keyStr One or more map keys and/or list indices (separated by '.' if multiple parts).
* Indicates the path to the location within this data tree.
* @return The integer... | Precondition: The specified key string is the path to an integer. Gets the integer at the specified key string | getInteger | {
"repo_name": "rpatil26/closure-templates",
"path": "java/src/com/google/template/soy/data/restricted/CollectionData.java",
"license": "apache-2.0",
"size": 13946
} | [
"com.google.template.soy.data.SoyData"
] | import com.google.template.soy.data.SoyData; | import com.google.template.soy.data.*; | [
"com.google.template"
] | com.google.template; | 2,565,021 |
private void onConnected() throws ClosedChannelException {
this.isChannelConnecting = false;
this.lastPingTimeStamp = System.nanoTime(); // Start ping timer
synchronized (this.callback.getChannelRegisterSync()) {
this.callback.getSelector().wakeup(); // Wakes up a current or next... | void function() throws ClosedChannelException { this.isChannelConnecting = false; this.lastPingTimeStamp = System.nanoTime(); synchronized (this.callback.getChannelRegisterSync()) { this.callback.getSelector().wakeup(); this.channel.register(this.callback.getSelector(), SelectionKey.OP_READ, this); } } | /**
* Must be called once the connection is established.
*
* @throws ClosedChannelException if channel is not open
*/ | Must be called once the connection is established | onConnected | {
"repo_name": "openhab/openhab",
"path": "bundles/binding/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/connection/Connection.java",
"license": "epl-1.0",
"size": 18876
} | [
"java.nio.channels.ClosedChannelException",
"java.nio.channels.SelectionKey"
] | import java.nio.channels.ClosedChannelException; import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,381,811 |
@Test
public void testSubstituteDefaultProperties() {
final String org = "${doesnotwork}";
System.setProperty("doesnotwork", "It works!");
// create a new Properties object with the System.getProperties as default
final Properties props = new Properties(System.getProperties());
... | void function() { final String org = STR; System.setProperty(STR, STR); final Properties props = new Properties(System.getProperties()); assertEquals(STR, StrSubstitutor.replace(org, props)); } | /**
* Test the replace of a properties object
*/ | Test the replace of a properties object | testSubstituteDefaultProperties | {
"repo_name": "britter/commons-lang",
"path": "src/test/java/org/apache/commons/lang3/text/StrSubstitutorTest.java",
"license": "apache-2.0",
"size": 26896
} | [
"java.util.Properties",
"org.junit.jupiter.api.Assertions"
] | import java.util.Properties; import org.junit.jupiter.api.Assertions; | import java.util.*; import org.junit.jupiter.api.*; | [
"java.util",
"org.junit.jupiter"
] | java.util; org.junit.jupiter; | 2,084,964 |
static boolean isValidPropertyName(LanguageMode mode, String name) {
if (isValidSimpleName(name)) {
return true;
} else {
return mode.isEs5OrHigher() && TokenStream.isKeyword(name);
}
}
private static class VarCollector implements Visitor {
final Map<String, Node> vars = new LinkedHas... | static boolean isValidPropertyName(LanguageMode mode, String name) { if (isValidSimpleName(name)) { return true; } else { return mode.isEs5OrHigher() && TokenStream.isKeyword(name); } } private static class VarCollector implements Visitor { final Map<String, Node> vars = new LinkedHashMap<>(); | /**
* Determines whether the given name can appear on the right side of
* the dot operator. Many properties (like reserved words) cannot, in ES3.
*/ | Determines whether the given name can appear on the right side of the dot operator. Many properties (like reserved words) cannot, in ES3 | isValidPropertyName | {
"repo_name": "thurday/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 118862
} | [
"com.google.javascript.jscomp.CompilerOptions",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.TokenStream",
"java.util.LinkedHashMap",
"java.util.Map"
] | import com.google.javascript.jscomp.CompilerOptions; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.TokenStream; import java.util.LinkedHashMap; import java.util.Map; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 2,374,163 |
public Observable<ServiceResponse<String>> supportedVpnDevicesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
... | Observable<ServiceResponse<String>> function(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualNetworkGatewayName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new... | /**
* Gets a xml format representation for supported vpn devices.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return t... | Gets a xml format representation for supported vpn devices | supportedVpnDevicesWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkGatewaysInner.java",
"license": "mit",
"size": 230879
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,578,498 |
@SuppressWarnings("unchecked")
public static <T> T call(Object obj, String methodName, Object... args) {
// TODO cache method instances
try {
Class<?> clazz = obj.getClass();
Class<?>[] parameterTypes = new Class<?>[args.length];
Class<?>[] altParameterTypes = new... | @SuppressWarnings(STR) static <T> T function(Object obj, String methodName, Object... args) { try { Class<?> clazz = obj.getClass(); Class<?>[] parameterTypes = new Class<?>[args.length]; Class<?>[] altParameterTypes = new Class<?>[args.length]; for (int i = 0; i < args.length; i++) { parameterTypes[i] = args[i].getCla... | /**
* Use reflection to call an instance method on {@code obj} with the
* specified {@code args}.
*
* @param obj
* @param methodName
* @param args
* @return the result of calling the method
*/ | Use reflection to call an instance method on obj with the specified args | call | {
"repo_name": "hcuffy/concourse",
"path": "concourse-driver-java/src/main/java/com/cinchapi/concourse/util/Reflection.java",
"license": "apache-2.0",
"size": 9311
} | [
"com.google.common.base.Throwables",
"java.lang.reflect.Method"
] | import com.google.common.base.Throwables; import java.lang.reflect.Method; | import com.google.common.base.*; import java.lang.reflect.*; | [
"com.google.common",
"java.lang"
] | com.google.common; java.lang; | 1,231,407 |
public Dimension getSize() {
return extent;
} | Dimension function() { return extent; } | /**
* Replies the size specified by the geometry
*
* @return the size specified by the geometry
*/ | Replies the size specified by the geometry | getSize | {
"repo_name": "jonathanrcarter/divv-amsterdam-parkingapi",
"path": "src-josm/org/openstreetmap/josm/tools/WindowGeometry.java",
"license": "gpl-2.0",
"size": 14394
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 781,043 |
Set<MethodDescriptor> getConstrainedMethods(); | Set<MethodDescriptor> getConstrainedMethods(); | /**
* Returns a set with the constrained methods of this type.
*
* @return A set with the constrained methods of this type, will be empty if
* none of this type's methods are constrained.
*/ | Returns a set with the constrained methods of this type | getConstrainedMethods | {
"repo_name": "gastaldi/hibernate-validator",
"path": "hibernate-validator/src/main/java/org/hibernate/validator/method/metadata/TypeDescriptor.java",
"license": "apache-2.0",
"size": 3434
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 49,085 |
synchronized public Map<MetricQuantile, Long> snapshot() throws IOException {
// flush the buffer first for best results
insertBatch();
Map<MetricQuantile, Long> values = new HashMap<MetricQuantile, Long>(
quantiles.length);
for (int i = 0; i < quantiles.length; i++) {
values.put(quantil... | synchronized Map<MetricQuantile, Long> function() throws IOException { insertBatch(); Map<MetricQuantile, Long> values = new HashMap<MetricQuantile, Long>( quantiles.length); for (int i = 0; i < quantiles.length; i++) { values.put(quantiles[i], query(quantiles[i].quantile)); } return values; } | /**
* Get a snapshot of the current values of all the tracked quantiles.
*
* @return snapshot of the tracked quantiles
* @throws java.io.IOException if no items have been added to the estimator
*/ | Get a snapshot of the current values of all the tracked quantiles | snapshot | {
"repo_name": "alibaba/wasp",
"path": "src/main/java/com/alibaba/wasp/metrics/lib/MetricSampleQuantiles.java",
"license": "apache-2.0",
"size": 8563
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map"
] | import java.io.IOException; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 632,235 |
public static void startJob(String jobName, Map<String, Object> params) {
try {
JobDataMap jobDataMap = new JobDataMap();
for (String key : params.keySet()) {
// logger.debug("key= " + key);
// logger.debug("value= " + pParams.get(key));
jobDataMap.put(key, params.get... | static void function(String jobName, Map<String, Object> params) { try { JobDataMap jobDataMap = new JobDataMap(); for (String key : params.keySet()) { jobDataMap.put(key, params.get(key)); } getScheduler().triggerJob(jobName, jobDataMap); } catch (SchedulerException e) { logger.error(STR, e); } } | /**
* Starts a Job matching the the given Job Name found in jobs.xml
*
* @param jobName
*/ | Starts a Job matching the the given Job Name found in jobs.xml | startJob | {
"repo_name": "wentixiaogege/Sundial",
"path": "src/main/java/com/xeiam/sundial/SundialJobScheduler.java",
"license": "apache-2.0",
"size": 13515
} | [
"java.util.Map",
"org.quartz.exceptions.SchedulerException",
"org.quartz.jobs.JobDataMap"
] | import java.util.Map; import org.quartz.exceptions.SchedulerException; import org.quartz.jobs.JobDataMap; | import java.util.*; import org.quartz.exceptions.*; import org.quartz.jobs.*; | [
"java.util",
"org.quartz.exceptions",
"org.quartz.jobs"
] | java.util; org.quartz.exceptions; org.quartz.jobs; | 83,518 |
void warn(Marker marker, String message, Supplier<?>... paramSuppliers);
/**
* Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} | void warn(Marker marker, String message, Supplier<?>... paramSuppliers); /** * Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable} | /**
* Logs a message with parameters which are only to be constructed if the logging level is the {@link Level#WARN
* WARN} level.
*
* @param marker the marker data specific to this log statement
* @param message the message to log; the format depends on the message factory.
* @param param... | Logs a message with parameters which are only to be constructed if the logging level is the <code>Level#WARN WARN</code> level | warn | {
"repo_name": "lburgazzoli/apache-logging-log4j2",
"path": "log4j-api/src/main/java/org/apache/logging/log4j/Logger.java",
"license": "apache-2.0",
"size": 84950
} | [
"org.apache.logging.log4j.util.Supplier"
] | import org.apache.logging.log4j.util.Supplier; | import org.apache.logging.log4j.util.*; | [
"org.apache.logging"
] | org.apache.logging; | 692,841 |
public void testCandidatesTimeWarp_enabledGoodId()
throws RepositoryException {
conn.setCandidatesTimeWarpFuzz(0);
Date first = dateFormat.parse("2014-01-01 00:00:00");
checkCandidatesTimeWarp(first, 1000, first, 0, "2014-01-01 00:00:00,999");
}
| void function() throws RepositoryException { conn.setCandidatesTimeWarpFuzz(0); Date first = dateFormat.parse(STR); checkCandidatesTimeWarp(first, 1000, first, 0, STR); } | /**
* The last candidate is impossibly set before the first candidate
* and the checkpoint.
*/ | The last candidate is impossibly set before the first candidate and the checkpoint | testCandidatesTimeWarp_enabledGoodId | {
"repo_name": "googlegsa/livelink.v3",
"path": "projects/otex-core/source/javatests/com/google/enterprise/connector/otex/LivelinkTraversalManagerTest.java",
"license": "apache-2.0",
"size": 40970
} | [
"com.google.enterprise.connector.spi.RepositoryException",
"java.util.Date"
] | import com.google.enterprise.connector.spi.RepositoryException; import java.util.Date; | import com.google.enterprise.connector.spi.*; import java.util.*; | [
"com.google.enterprise",
"java.util"
] | com.google.enterprise; java.util; | 2,598,872 |
public void setSelectedIndex(int index) {
if (index < 0) {
return;
}
//set default index if not added options yet
if (index >= getItemCount()) {
defaultSelectedIndex = index;
return;
}
selectedIndex = index;
currentItemLab... | void function(int index) { if (index < 0) { return; } if (index >= getItemCount()) { defaultSelectedIndex = index; return; } selectedIndex = index; currentItemLabel.setInnerText(getItemText(index)); InputElement inputElement = getListItemElement(index); inputElement.setChecked(true); } | /**
* Sets the currently selected index.
*
* @param index
* the index of the item to be selected
*/ | Sets the currently selected index | setSelectedIndex | {
"repo_name": "slemeur/che",
"path": "ide/commons-gwt/src/main/java/org/eclipse/che/ide/ui/listbox/CustomListBox.java",
"license": "epl-1.0",
"size": 16021
} | [
"com.google.gwt.dom.client.InputElement"
] | import com.google.gwt.dom.client.InputElement; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,567,599 |
public void assertLessThan(Description description, Character actual, char other) {
assertNotNull(description, actual);
if (!isLessThan(actual, other)) {
throw failures.failure(description, shouldBeLessThan(actual, other));
}
}
| void function(Description description, Character actual, char other) { assertNotNull(description, actual); if (!isLessThan(actual, other)) { throw failures.failure(description, shouldBeLessThan(actual, other)); } } | /**
* Asserts that the actual value is less than the other one.
*
* @param description contains information about the assertion.
* @param actual the actual value.
* @param other the value to compare the actual value to.
* @throws AssertionError if the actual value is {@code null}.
* @throws ... | Asserts that the actual value is less than the other one | assertLessThan | {
"repo_name": "alexruiz/fest-assert-2.x",
"path": "src/main/java/org/fest/assertions/internal/Characters.java",
"license": "apache-2.0",
"size": 7866
} | [
"org.fest.assertions.description.Description",
"org.fest.assertions.error.ShouldBeLessThan"
] | import org.fest.assertions.description.Description; import org.fest.assertions.error.ShouldBeLessThan; | import org.fest.assertions.description.*; import org.fest.assertions.error.*; | [
"org.fest.assertions"
] | org.fest.assertions; | 452,676 |
public SortedDocValues select(final SortedSetDocValues values) {
if (values.getValueCount() >= Integer.MAX_VALUE) {
throw new UnsupportedOperationException("fields containing more than " + (Integer.MAX_VALUE-1) + " unique terms are unsupported");
}
final SortedDocValues singleto... | SortedDocValues function(final SortedSetDocValues values) { if (values.getValueCount() >= Integer.MAX_VALUE) { throw new UnsupportedOperationException(STR + (Integer.MAX_VALUE-1) + STR); } final SortedDocValues singleton = DocValues.unwrapSingleton(values); if (singleton != null) { return singleton; } else { return new... | /**
* Return a {@link SortedDocValues} instance that can be used to sort documents
* with this mode and the provided values.
*
* Allowed Modes: MIN, MAX
*/ | Return a <code>SortedDocValues</code> instance that can be used to sort documents with this mode and the provided values. Allowed Modes: MIN, MAX | select | {
"repo_name": "jprante/elasticsearch-server",
"path": "server/src/main/java/org/elasticsearch/search/MultiValueMode.java",
"license": "apache-2.0",
"size": 33463
} | [
"org.apache.lucene.index.DocValues",
"org.apache.lucene.index.SortedDocValues",
"org.apache.lucene.index.SortedSetDocValues",
"org.apache.lucene.search.AbstractSortedDocValues"
] | import org.apache.lucene.index.DocValues; import org.apache.lucene.index.SortedDocValues; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.search.AbstractSortedDocValues; | import org.apache.lucene.index.*; import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 280,270 |
public Date parseDateTime(final String dateTimeString) {
try {
return FORMAT_DATE_TIME.get().parse(dateTimeString);
} catch (ParseException e) {
return null;
}
} | Date function(final String dateTimeString) { try { return FORMAT_DATE_TIME.get().parse(dateTimeString); } catch (ParseException e) { return null; } } | /**
* Returns a {@link Date} parsed via the date {@link String} or <code>null</code> if the
* given string could not be parsed. Uses {@link Locale#ENGLISH}.
* <p>
* Not static because {@link DateFormat} is NOT threadsafe.
* </p>
*
* @see #FORMAT_DATE_TIME
* @param dateTimeString
* @return
... | Returns a <code>Date</code> parsed via the date <code>String</code> or <code>null</code> if the given string could not be parsed. Uses <code>Locale#ENGLISH</code>. Not static because <code>DateFormat</code> is NOT threadsafe. | parseDateTime | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/example/set/CustomFilter.java",
"license": "agpl-3.0",
"size": 35773
} | [
"java.text.ParseException",
"java.util.Date"
] | import java.text.ParseException; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 693,870 |
public java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.NumberConstantHLAPI> getSubterm_integers_NumberConstantHLAPI() {
java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.NumberConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.integers.hlapi.NumberConstantHLAPI>();
for (Term elemnt : g... | java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.NumberConstantHLAPI> function() { java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.NumberConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.integers.hlapi.NumberConstantHLAPI>(); for (Term elemnt : getSubterm()) { if (elemnt.getClass().equals(f... | /**
* This accessor return a list of encapsulated subelement, only of
* NumberConstantHLAPI kind. WARNING : this method can creates a lot of new
* object in memory.
*/ | This accessor return a list of encapsulated subelement, only of NumberConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_integers_NumberConstantHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/integers/hlapi/DivisionHLAPI.java",
"license": "epl-1.0",
"size": 69770
} | [
"fr.lip6.move.pnml.pthlpng.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.pthlpng.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.pthlpng.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 2,327,224 |
Observable<ServiceResponse<Void>> putFloatValidAsync(List<Double> arrayBody); | Observable<ServiceResponse<Void>> putFloatValidAsync(List<Double> arrayBody); | /**
* Set array value [0, -0.01, 1.2e20].
*
* @param arrayBody the List<Double> value
* @return the {@link ServiceResponse} object if successful.
*/ | Set array value [0, -0.01, 1.2e20] | putFloatValidAsync | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java",
"license": "mit",
"size": 72234
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,501,155 |
boolean validateProblemActSubjectOfTarget(DiagnosticChain diagnostics, Map<Object, Object> context);
| boolean validateProblemActSubjectOfTarget(DiagnosticChain diagnostics, Map<Object, Object> context); | /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* self.getEntryRelationshipTargets(vocab::x_ActRelationshipEntryRelationship::SUBJ, cda::ClinicalStatement)->forAll(target : cda::ClinicalStatement | not target.oclIsUndefined() and
* (target.oclIsKindOf(ccd::ProblemObser... | self.getEntryRelationshipTargets(vocab::x_ActRelationshipEntryRelationship::SUBJ, cda::ClinicalStatement)->forAll(target : cda::ClinicalStatement | not target.oclIsUndefined() and (target.oclIsKindOf(ccd::ProblemObservation) or target.oclIsKindOf(ccd::AlertObservation))) | validateProblemActSubjectOfTarget | {
"repo_name": "drbgfc/mdht",
"path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ccd/src/org/openhealthtools/mdht/uml/cda/ccd/ProblemAct.java",
"license": "epl-1.0",
"size": 11254
} | [
"java.util.Map",
"org.eclipse.emf.common.util.DiagnosticChain"
] | import java.util.Map; import org.eclipse.emf.common.util.DiagnosticChain; | import java.util.*; import org.eclipse.emf.common.util.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 178,140 |
public RecommendationProperties withChannels(Channels channels) {
this.channels = channels;
return this;
} | RecommendationProperties function(Channels channels) { this.channels = channels; return this; } | /**
* Set the channels property: List of channels that this recommendation can apply.
*
* @param channels the channels value to set.
* @return the RecommendationProperties object itself.
*/ | Set the channels property: List of channels that this recommendation can apply | withChannels | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/RecommendationProperties.java",
"license": "mit",
"size": 18705
} | [
"com.azure.resourcemanager.appservice.models.Channels"
] | import com.azure.resourcemanager.appservice.models.Channels; | import com.azure.resourcemanager.appservice.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,099,187 |
setupConf(UTIL.getConfiguration());
UTIL.startMiniCluster(NUM_RS);
fs = UTIL.getDFSCluster().getFileSystem();
master = UTIL.getMiniHBaseCluster().getMaster();
rootDir = master.getMasterFileSystem().getRootDir();
archiveDir = new Path(rootDir, HConstants.HFILE_ARCHIVE_DIRECTORY);
} | setupConf(UTIL.getConfiguration()); UTIL.startMiniCluster(NUM_RS); fs = UTIL.getDFSCluster().getFileSystem(); master = UTIL.getMiniHBaseCluster().getMaster(); rootDir = master.getMasterFileSystem().getRootDir(); archiveDir = new Path(rootDir, HConstants.HFILE_ARCHIVE_DIRECTORY); } | /**
* Setup the config for the cluster
*/ | Setup the config for the cluster | setupCluster | {
"repo_name": "Guavus/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java",
"license": "apache-2.0",
"size": 17589
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HConstants"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HConstants; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,472,308 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.