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
private void unwrapResponse(State state) { if (state.wrapResponse == null) return; if (state.outerRequest.isAsyncStarted()) { if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) { return; } } Ser...
void function(State state) { if (state.wrapResponse == null) return; if (state.outerRequest.isAsyncStarted()) { if (!state.outerRequest.getAsyncContext().hasOriginalRequestAndResponse()) { return; } } ServletResponse previous = null; ServletResponse current = state.outerResponse; while (current != null) { if ((current ...
/** * Unwrap the response if we have wrapped it. */
Unwrap the response if we have wrapped it
unwrapResponse
{ "repo_name": "IAMTJW/Tomcat-8.5.20", "path": "tomcat-8.5.20/java/org/apache/catalina/core/ApplicationDispatcher.java", "license": "apache-2.0", "size": 40681 }
[ "javax.servlet.ServletResponse", "javax.servlet.ServletResponseWrapper", "org.apache.catalina.connector.Response", "org.apache.catalina.connector.ResponseFacade" ]
import javax.servlet.ServletResponse; import javax.servlet.ServletResponseWrapper; import org.apache.catalina.connector.Response; import org.apache.catalina.connector.ResponseFacade;
import javax.servlet.*; import org.apache.catalina.connector.*;
[ "javax.servlet", "org.apache.catalina" ]
javax.servlet; org.apache.catalina;
808,103
@RetrySemantics.ReadOnly public GetLatestCommittedCompactionInfoResponse getLatestCommittedCompactionInfo( GetLatestCommittedCompactionInfoRequest rqst) throws MetaException { GetLatestCommittedCompactionInfoResponse response = new GetLatestCommittedCompactionInfoResponse(new ArrayList<>()); Connectio...
@RetrySemantics.ReadOnly GetLatestCommittedCompactionInfoResponse function( GetLatestCommittedCompactionInfoRequest rqst) throws MetaException { GetLatestCommittedCompactionInfoResponse response = new GetLatestCommittedCompactionInfoResponse(new ArrayList<>()); Connection dbConn = null; PreparedStatement pst = null; Re...
/** * We assume this is only called by metadata cache server to know if there are new base/delta files should be read. * The query filters compactions by state and only returns SUCCEEDED or READY_FOR_CLEANING compactions because * only these two states means there are new files ready to be read. */
We assume this is only called by metadata cache server to know if there are new base/delta files should be read. The query filters compactions by state and only returns SUCCEEDED or READY_FOR_CLEANING compactions because only these two states means there are new files ready to be read
getLatestCommittedCompactionInfo
{ "repo_name": "sankarh/hive", "path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java", "license": "apache-2.0", "size": 278625 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hive.common.classification.RetrySemantics", "org.apache.hadoop.hive.metastore.api.GetLatestCommittedCompactionInfoRequest", "org.apache.hadoop.hive.metastore.api.GetLa...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.common.classification.RetrySemantics; import org.apache.hadoop.hive.metastore.api.GetLatestCommittedCompactionInfoRequest; import org.apache.hadoop.h...
import java.sql.*; import java.util.*; import org.apache.hadoop.hive.common.classification.*; import org.apache.hadoop.hive.metastore.api.*;
[ "java.sql", "java.util", "org.apache.hadoop" ]
java.sql; java.util; org.apache.hadoop;
1,765,997
QueryResult queryResult ; TupleQueryResult results = null ; try { queryResult = anzo.getModelService().executeQuery(allNamedGraphs, EMPTY_SET, query) ; results = queryResult.getSelectResult() ; } catch (Exception e) { throw new QueryExecutionException("Error obtaining query result from Anzo.", e) ; ...
QueryResult queryResult ; TupleQueryResult results = null ; try { queryResult = anzo.getModelService().executeQuery(allNamedGraphs, EMPTY_SET, query) ; results = queryResult.getSelectResult() ; } catch (Exception e) { throw new QueryExecutionException(STR, e) ; } try { while (results.hasNext()) { handler.handleBindings...
/** * This method will execute the passed in select query against all named graphs in * Anzo and calls the passed in BindingsHandler with each result binding. * @param query The query to execute * @param handler Handler for results * @throws QueryExecutionException On any error during query ex...
This method will execute the passed in select query against all named graphs in Anzo and calls the passed in BindingsHandler with each result binding
executeQuery
{ "repo_name": "NCIP/digital-model-repository", "path": "dmr-core/src/org/cvit/cabig/dmr/anzo/Anzo.java", "license": "bsd-3-clause", "size": 8331 }
[ "com.infotechsoft.rdf.mapping.QueryExecutionException", "com.infotechsoft.rdf.sesame.BindingSetAdapter" ]
import com.infotechsoft.rdf.mapping.QueryExecutionException; import com.infotechsoft.rdf.sesame.BindingSetAdapter;
import com.infotechsoft.rdf.mapping.*; import com.infotechsoft.rdf.sesame.*;
[ "com.infotechsoft.rdf" ]
com.infotechsoft.rdf;
1,170,684
public RelNode peek(int inputCount, int inputOrdinal) { return peek_(inputCount, inputOrdinal).rel; }
RelNode function(int inputCount, int inputOrdinal) { return peek_(inputCount, inputOrdinal).rel; }
/** Returns the relational expression {@code n} positions from the top of the * stack, but does not remove it. */
Returns the relational expression n positions from the top of the
peek
{ "repo_name": "sreev/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/tools/RelBuilder.java", "license": "apache-2.0", "size": 64409 }
[ "org.apache.calcite.rel.RelNode" ]
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.*;
[ "org.apache.calcite" ]
org.apache.calcite;
387,097
private static void extractAssets(ContextWrapper context, boolean worldReadable, boolean replaceIfNewer) { try { Runtime runtime = Runtime.getRuntime(); String appRoot = getAppRoot(context); File zipFile = new File(context.getPackageCodePath()); long zipLastMo...
static void function(ContextWrapper context, boolean worldReadable, boolean replaceIfNewer) { try { Runtime runtime = Runtime.getRuntime(); String appRoot = getAppRoot(context); File zipFile = new File(context.getPackageCodePath()); long zipLastModified = zipFile.lastModified(); ZipFile zip = new ZipFile(context.getPac...
/** * Extract assets from the apk zip file to the installed app directory. * Copies plugins, the config file, and displays. * @param context Typically an Activity instance. * @param worldReadable deprecated. Always use false. */
Extract assets from the apk zip file to the installed app directory. Copies plugins, the config file, and displays
extractAssets
{ "repo_name": "OSVR/OSVR-Android-Samples", "path": "OSVROpenGL/osvrcommon/src/main/java/com/osvr/common/util/OSVRFileExtractor.java", "license": "apache-2.0", "size": 6298 }
[ "android.content.ContextWrapper", "android.util.Log", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.util.Enumeration", "java.util.Vector", "java.util.zip.ZipEntry", "java.util.zip.ZipFile" ]
import android.content.ContextWrapper; import android.util.Log; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Enumeration; import java.util.Vector; import java.util.zip.ZipEntry; import java.util.zip.ZipFile;
import android.content.*; import android.util.*; import java.io.*; import java.util.*; import java.util.zip.*;
[ "android.content", "android.util", "java.io", "java.util" ]
android.content; android.util; java.io; java.util;
2,354,586
void loadIcon(ImageView imageView, boolean grayOut);
void loadIcon(ImageView imageView, boolean grayOut);
/** * Load this resolver's icon into the given ImageView */
Load this resolver's icon into the given ImageView
loadIcon
{ "repo_name": "ajju4455/tomahawk-android", "path": "src/org/tomahawk/libtomahawk/resolver/Resolver.java", "license": "gpl-3.0", "size": 2174 }
[ "android.widget.ImageView" ]
import android.widget.ImageView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,263,718
private HRegionInfo[] cloneHdfsRegions(final List<HRegionInfo> regions) throws IOException { if (regions == null || regions.size() == 0) return null; final Map<String, HRegionInfo> snapshotRegions = new HashMap<String, HRegionInfo>(regions.size()); // clone region info (change embedded tableName w...
HRegionInfo[] function(final List<HRegionInfo> regions) throws IOException { if (regions == null regions.size() == 0) return null; final Map<String, HRegionInfo> snapshotRegions = new HashMap<String, HRegionInfo>(regions.size()); HRegionInfo[] clonedRegionsInfo = new HRegionInfo[regions.size()]; for (int i = 0; i < clo...
/** * Clone specified regions. For each region create a new region * and create a HFileLink for each hfile. */
Clone specified regions. For each region create a new region and create a HFileLink for each hfile
cloneHdfsRegions
{ "repo_name": "cloud-software-foundation/c5", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java", "license": "apache-2.0", "size": 26981 }
[ "java.io.IOException", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,680,108
public final List < SimpleValue > getAttributes() { return this.attributes; }
final List < SimpleValue > function() { return this.attributes; }
/** * Getter for attributes. * * @return the attributes to get. */
Getter for attributes
getAttributes
{ "repo_name": "GIP-RECIA/esco-grouper-ui", "path": "metier/esco-core/src/main/java/org/esco/grouperui/domaine/beans/Subject.java", "license": "apache-2.0", "size": 6147 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,559,945
NoPutResultSet getLastIndexKeyResultSet ( Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String userSuppliedOptimizerOverrides, String indexName, int colRefItem, int lockMode, boolean tableLocke...
NoPutResultSet getLastIndexKeyResultSet ( Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, long conglomId, String tableName, String userSuppliedOptimizerOverrides, String indexName, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, double optimizerEstimatedRowCount, d...
/** * A last index key result set returns the last row from * the index in question. It is used as an ajunct to max(). * * @param activation the activation for this result set, * which provides the context for the row allocation operation. * @param resultSetNumber The resultSetNumber for the ResultSet ...
A last index key result set returns the last row from the index in question. It is used as an ajunct to max()
getLastIndexKeyResultSet
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java", "license": "apache-2.0", "size": 65629 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.services.loader.GeneratedMethod", "org.apache.derby.iapi.sql.Activation", "org.apache.derby.iapi.sql.ResultSet" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.loader.GeneratedMethod; import org.apache.derby.iapi.sql.Activation; import org.apache.derby.iapi.sql.ResultSet;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.loader.*; import org.apache.derby.iapi.sql.*;
[ "org.apache.derby" ]
org.apache.derby;
2,016,126
public static <T> T checkNotNull(T obj, @Nullable String errorMessageTemplate, int p1) { if (obj == null) { throw new NullPointerException(format(errorMessageTemplate, p1)); } return obj; }
static <T> T function(T obj, @Nullable String errorMessageTemplate, int p1) { if (obj == null) { throw new NullPointerException(format(errorMessageTemplate, p1)); } return obj; }
/** * Ensures that an object reference passed as a parameter to the calling method is not null. * <p/> * <p>See {@link #checkNotNull(Object, String, Object...)} for details. */
Ensures that an object reference passed as a parameter to the calling method is not null. See <code>#checkNotNull(Object, String, Object...)</code> for details
checkNotNull
{ "repo_name": "cymcsg/UltimateAndroid", "path": "UltimateAndroid/ultimateandroid/src/main/java/com/marshalchen/ua/common/commonUtils/basicUtils/Preconditions.java", "license": "apache-2.0", "size": 52256 }
[ "android.support.annotation.Nullable" ]
import android.support.annotation.Nullable;
import android.support.annotation.*;
[ "android.support" ]
android.support;
1,040,397
public TermsAggregationBuilder collectMode(SubAggCollectionMode collectMode) { if (collectMode == null) { throw new IllegalArgumentException("[collectMode] must not be null: [" + name + "]"); } this.collectMode = collectMode; return this; }
TermsAggregationBuilder function(SubAggCollectionMode collectMode) { if (collectMode == null) { throw new IllegalArgumentException(STR + name + "]"); } this.collectMode = collectMode; return this; }
/** * Expert: set the collection mode. */
Expert: set the collection mode
collectMode
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/TermsAggregationBuilder.java", "license": "apache-2.0", "size": 16225 }
[ "org.elasticsearch.search.aggregations.Aggregator" ]
import org.elasticsearch.search.aggregations.Aggregator;
import org.elasticsearch.search.aggregations.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,761,150
public ImmuSet range() { SetAccumulator acc; acc = SetAccumulator.make(); Stepper stomper = stepper(); for (; stomper.hasValue(); stomper.step()) { Heaper obj = (Heaper) stomper.fetch(); if (obj == null) { continue ; } acc.step(obj); } stomper.destroy(); return (ImmuSet) acc.value(); }
ImmuSet function() { SetAccumulator acc; acc = SetAccumulator.make(); Stepper stomper = stepper(); for (; stomper.hasValue(); stomper.step()) { Heaper obj = (Heaper) stomper.fetch(); if (obj == null) { continue ; } acc.step(obj); } stomper.destroy(); return (ImmuSet) acc.value(); }
/** * A snapshot of the current range elements of the table collected together into * an ImmuSet. */
A snapshot of the current range elements of the table collected together into an ImmuSet
range
{ "repo_name": "jonesd/udanax-gold2java", "path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/collection/tables/ScruTable.java", "license": "mit", "size": 30731 }
[ "info.dgjones.abora.gold.collection.sets.ImmuSet", "info.dgjones.abora.gold.collection.sets.SetAccumulator", "info.dgjones.abora.gold.collection.steppers.Stepper", "info.dgjones.abora.gold.xpp.basic.Heaper" ]
import info.dgjones.abora.gold.collection.sets.ImmuSet; import info.dgjones.abora.gold.collection.sets.SetAccumulator; import info.dgjones.abora.gold.collection.steppers.Stepper; import info.dgjones.abora.gold.xpp.basic.Heaper;
import info.dgjones.abora.gold.collection.sets.*; import info.dgjones.abora.gold.collection.steppers.*; import info.dgjones.abora.gold.xpp.basic.*;
[ "info.dgjones.abora" ]
info.dgjones.abora;
1,195,359
protected void initialize() { commentToken = newToken(TextStyle.COMMENT); }
void function() { commentToken = newToken(TextStyle.COMMENT); }
/** * Initialize the scanner. This method is also called whenever {@link TextAttribute} get modified. */
Initialize the scanner. This method is also called whenever <code>TextAttribute</code> get modified
initialize
{ "repo_name": "Arnauld/jbehave-eclipse-plugin", "path": "src/org/technbolts/jbehave/eclipse/editors/story/scanner/AbstractStoryPartBasedScanner.java", "license": "mit", "size": 14873 }
[ "org.technbolts.jbehave.eclipse.textstyle.TextStyle" ]
import org.technbolts.jbehave.eclipse.textstyle.TextStyle;
import org.technbolts.jbehave.eclipse.textstyle.*;
[ "org.technbolts.jbehave" ]
org.technbolts.jbehave;
980,466
@Override public void restorePythonPath(boolean force) { if (DEBUG_TESTS_BASE) { System.out.println("-------------- Restoring system pythonpath"); } restoreSystemPythonPath(force, TestDependent.PYTHON_LIB); if (DEBUG_TESTS_BASE) { System.out.println("-----...
void function(boolean force) { if (DEBUG_TESTS_BASE) { System.out.println(STR); } restoreSystemPythonPath(force, TestDependent.PYTHON_LIB); if (DEBUG_TESTS_BASE) { System.out.println(STR); } restoreProjectPythonPathRefactoring(force, TestDependent.TEST_COM_REFACTORING_PYSRC_LOC); if (DEBUG_TESTS_BASE) { System.out.prin...
/** * Overriden so that the pythonpath is only restored for the system and the refactoring nature * * @param force whether this should be forced, even if it was previously created for this class */
Overriden so that the pythonpath is only restored for the system and the refactoring nature
restorePythonPath
{ "repo_name": "smkr/pyclipse", "path": "plugins/com.python.pydev.refactoring/tests/com/python/pydev/refactoring/refactorer/refactorings/rename/RefactoringRenameTestBase.java", "license": "epl-1.0", "size": 13802 }
[ "org.python.pydev.core.TestDependent" ]
import org.python.pydev.core.TestDependent;
import org.python.pydev.core.*;
[ "org.python.pydev" ]
org.python.pydev;
2,156,316
public static Response processCitationPatentPDF(final InputStream inputStream, final boolean consolidate) { LOGGER.debug(methodLogIn()); Response response = null; String retVal; boolean isparallelExec = GrobidServiceProperties.isPar...
static Response function(final InputStream inputStream, final boolean consolidate) { LOGGER.debug(methodLogIn()); Response response = null; String retVal; boolean isparallelExec = GrobidServiceProperties.isParallelExec(); File originFile = null; Engine engine = null; try { originFile = GrobidRestUtils.writeInputFile(in...
/** * Process a patent document in PDF for extracting and parsing citations in the description body. * * @param inputStream the data of origin document * @return a response object mainly containing the TEI representation of the * citation */
Process a patent document in PDF for extracting and parsing citations in the description body
processCitationPatentPDF
{ "repo_name": "TitasNandi/Summer_Project", "path": "Grobid/grobid-main/grobid-service/src/main/java/org/grobid/service/process/GrobidRestProcessFiles.java", "license": "apache-2.0", "size": 32633 }
[ "java.io.File", "java.io.InputStream", "java.util.ArrayList", "java.util.List", "java.util.NoSuchElementException", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.grobid.core.data.BibDataSet", "org.grobid.core.data.PatentItem", "org.grobid.core.engines.Engine", "org.grobid.core....
import java.io.File; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.NoSuchElementException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.grobid.core.data.BibDataSet; import org.grobid.core.data.PatentItem; import org.grobid.core.engines...
import java.io.*; import java.util.*; import javax.ws.rs.core.*; import org.grobid.core.data.*; import org.grobid.core.engines.*; import org.grobid.core.factory.*; import org.grobid.service.util.*;
[ "java.io", "java.util", "javax.ws", "org.grobid.core", "org.grobid.service" ]
java.io; java.util; javax.ws; org.grobid.core; org.grobid.service;
2,033,069
public static reportingIntervalType fromPerUnaligned(byte[] encodedBytes) { reportingIntervalType result = new reportingIntervalType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; }
static reportingIntervalType function(byte[] encodedBytes) { reportingIntervalType result = new reportingIntervalType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new reportingIntervalType from encoded stream. */
Creates a new reportingIntervalType from encoded stream
fromPerUnaligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/lpp/PeriodicalReportingCriteria.java", "license": "apache-2.0", "size": 16815 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
1,612,047
public void testGetWhitespaceDefault() throws QuickFixException { WhitespaceBehavior defaultWhitespaceBehavior = define(baseTag, "", "").getWhitespaceBehavior(); assertEquals("By default, whitespace optimize should be true.", BaseComponentDef.DefaultWhitespaceBehavior, defaultWhitesp...
void function() throws QuickFixException { WhitespaceBehavior defaultWhitespaceBehavior = define(baseTag, STRSTRBy default, whitespace optimize should be true.", BaseComponentDef.DefaultWhitespaceBehavior, defaultWhitespaceBehavior); }
/** * Verify the whitespace attribute specified on a component tag. By default the whitespace logic is optimize, which * removes all non-necessary whitespace. Test method for * {@link org.auraframework.def.BaseComponentDef#getWhitespaceBehavior()}. */
Verify the whitespace attribute specified on a component tag. By default the whitespace logic is optimize, which removes all non-necessary whitespace. Test method for <code>org.auraframework.def.BaseComponentDef#getWhitespaceBehavior()</code>
testGetWhitespaceDefault
{ "repo_name": "badlogicmanpreet/aura", "path": "aura-impl/src/test/java/org/auraframework/impl/root/component/BaseComponentDefTest.java", "license": "apache-2.0", "size": 99025 }
[ "org.auraframework.def.BaseComponentDef", "org.auraframework.throwable.quickfix.QuickFixException" ]
import org.auraframework.def.BaseComponentDef; import org.auraframework.throwable.quickfix.QuickFixException;
import org.auraframework.def.*; import org.auraframework.throwable.quickfix.*;
[ "org.auraframework.def", "org.auraframework.throwable" ]
org.auraframework.def; org.auraframework.throwable;
1,618,612
this.setLayout(new CardLayout()); this.setName(Constant.messages.getString("session.general")); this.add(getPanelSession(), getPanelSession().getName()); }
this.setLayout(new CardLayout()); this.setName(Constant.messages.getString(STR)); this.add(getPanelSession(), getPanelSession().getName()); }
/** * This method initializes this */
This method initializes this
initialize
{ "repo_name": "GillesMoris/OSS", "path": "src/org/parosproxy/paros/view/SessionGeneralPanel.java", "license": "apache-2.0", "size": 5932 }
[ "java.awt.CardLayout", "org.parosproxy.paros.Constant" ]
import java.awt.CardLayout; import org.parosproxy.paros.Constant;
import java.awt.*; import org.parosproxy.paros.*;
[ "java.awt", "org.parosproxy.paros" ]
java.awt; org.parosproxy.paros;
2,838,566
@Nonnull private static byte[] mnemonicToBytesWithMultiplication(@Nonnull Dictionary dictionary, @Nonnull List<String> mnemonicWordList) { Converter<String, Integer> reverseConverter = dictionary.reverse(); BigInteger total = BigInteger.ZERO; BigInteger multiplier = BigInteger.valueOf(d...
static byte[] function(@Nonnull Dictionary dictionary, @Nonnull List<String> mnemonicWordList) { Converter<String, Integer> reverseConverter = dictionary.reverse(); BigInteger total = BigInteger.ZERO; BigInteger multiplier = BigInteger.valueOf(dictionary.getSize()); for (String word : Lists.reverse(mnemonicWordList)) {...
/** * Convert a sequence of mnemonic word into a byte array for validation and usage. * * @param dictionary * instance to check for the presence of all words. * @param mnemonicWordList * sequence of mnemonic words to map against a dictionary for bit values. * * @r...
Convert a sequence of mnemonic word into a byte array for validation and usage
mnemonicToBytesWithMultiplication
{ "repo_name": "harningt/atomun-mnemonic", "path": "src/main/java/us/eharning/atomun/mnemonic/spi/electrum/v2/MnemonicUnitSpiImpl.java", "license": "apache-2.0", "size": 10336 }
[ "com.google.common.base.Converter", "com.google.common.collect.Lists", "java.math.BigInteger", "java.util.List", "javax.annotation.Nonnull", "us.eharning.atomun.mnemonic.utility.dictionary.Dictionary" ]
import com.google.common.base.Converter; import com.google.common.collect.Lists; import java.math.BigInteger; import java.util.List; import javax.annotation.Nonnull; import us.eharning.atomun.mnemonic.utility.dictionary.Dictionary;
import com.google.common.base.*; import com.google.common.collect.*; import java.math.*; import java.util.*; import javax.annotation.*; import us.eharning.atomun.mnemonic.utility.dictionary.*;
[ "com.google.common", "java.math", "java.util", "javax.annotation", "us.eharning.atomun" ]
com.google.common; java.math; java.util; javax.annotation; us.eharning.atomun;
110,234
float[] r_value; final float[] w_value = smoke_value; final int w_size = w_value.length; switch ( access ) { case X3DFieldTypes.INPUT_ONLY: case X3DFieldTypes.INITIALIZE_ONLY: field.setValue( w_size/4, w_value ); break; case X3DFieldTypes.OUTPUT_ON...
float[] r_value; final float[] w_value = smoke_value; final int w_size = w_value.length; switch ( access ) { case X3DFieldTypes.INPUT_ONLY: case X3DFieldTypes.INITIALIZE_ONLY: field.setValue( w_size/4, w_value ); break; case X3DFieldTypes.OUTPUT_ONLY: r_value = new float[field.size( )*4]; field.getValue( r_value ); bre...
/** * Execute a 'smoke' test. * @return results, <code>true</code> for pass, <code>false</code> for fail */
Execute a 'smoke' test
smoke
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/parsetest/sai/external/nodetest/tMFRotation.java", "license": "gpl-2.0", "size": 4195 }
[ "org.web3d.x3d.sai.X3DFieldTypes" ]
import org.web3d.x3d.sai.X3DFieldTypes;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
563,572
synchronized void checkDatanodeUuid() throws IOException { if (storage.getDatanodeUuid() == null) { storage.setDatanodeUuid(generateUuid()); storage.writeAll(); LOG.info("Generated and persisted new Datanode UUID " + storage.getDatanodeUuid()); } }
synchronized void checkDatanodeUuid() throws IOException { if (storage.getDatanodeUuid() == null) { storage.setDatanodeUuid(generateUuid()); storage.writeAll(); LOG.info(STR + storage.getDatanodeUuid()); } }
/** * Verify that the DatanodeUuid has been initialized. If this is a new * datanode then we generate a new Datanode Uuid and persist it to disk. * * @throws IOException */
Verify that the DatanodeUuid has been initialized. If this is a new datanode then we generate a new Datanode Uuid and persist it to disk
checkDatanodeUuid
{ "repo_name": "busbey/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 120360 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,261,906
private static Map<Integer, Set<CTag>> getNodeTags(final CConnection connection, final INaviProject project, final ITagManager nodeTagManager) throws SQLException { final Map<Integer, Set<CTag>> tagMap = new HashMap<Integer, Set<CTag>>(); final String query = " SELECT * FROM load_project_node_tags(?) "...
static Map<Integer, Set<CTag>> function(final CConnection connection, final INaviProject project, final ITagManager nodeTagManager) throws SQLException { final Map<Integer, Set<CTag>> tagMap = new HashMap<Integer, Set<CTag>>(); final String query = STR; final PreparedStatement statement = connection.getConnection().pre...
/** * Loads the node tags of the views of a project. * * @param connection Provides the connection to the database. * @param project The project whose node-tagged views are determined. * @param nodeTagManager Provides the available node tags. * * @return Maps view ID -> node tags used in the view...
Loads the node tags of the views of a project
getNodeTags
{ "repo_name": "mayl8822/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Database/PostgreSQL/Loaders/PostgreSQLViewsLoader.java", "license": "apache-2.0", "size": 15302 }
[ "com.google.security.zynamics.binnavi.Database", "com.google.security.zynamics.binnavi.Tagging", "com.google.security.zynamics.binnavi.disassembly.INaviProject", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.HashMap", "java.util.HashSet", "java.util.Map", ...
import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.Tagging; import com.google.security.zynamics.binnavi.disassembly.INaviProject; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.HashSet;...
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.disassembly.*; import java.sql.*; import java.util.*;
[ "com.google.security", "java.sql", "java.util" ]
com.google.security; java.sql; java.util;
1,735,396
public void endDocument () throws SAXException { write('\n'); super.endDocument(); try { flush(); } catch (IOException e) { throw new SAXException(e); } }
void function () throws SAXException { write('\n'); super.endDocument(); try { flush(); } catch (IOException e) { throw new SAXException(e); } }
/** * Write a newline at the end of the document. * * Pass the event on down the filter chain for further processing. * * @exception org.xml.sax.SAXException If there is an error * writing the newline, or if a handler further down * the filter chain raises an exc...
Write a newline at the end of the document. Pass the event on down the filter chain for further processing
endDocument
{ "repo_name": "kluivers/plist4j", "path": "src/com/megginson/sax/XMLWriter.java", "license": "bsd-3-clause", "size": 38199 }
[ "java.io.IOException", "org.xml.sax.SAXException" ]
import java.io.IOException; import org.xml.sax.SAXException;
import java.io.*; import org.xml.sax.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
2,357,555
synchronized void asyncReconnect(final URI reconnectUri, String authKey, final ReconnectCallback callback) { if (getState() != State.OPEN) { return; } // Update the configuration with the new credentials final ProtocolConnectionConfiguration config = ProtocolConnectionCon...
synchronized void asyncReconnect(final URI reconnectUri, String authKey, final ReconnectCallback callback) { if (getState() != State.OPEN) { return; } final ProtocolConnectionConfiguration config = ProtocolConnectionConfiguration.copy(configuration); config.setCallbackHandler(createClientCallbackHandler(userName, authK...
/** * This continuously tries to reconnect in a separate thread and will only stop if the connection was established * successfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters * and callback will get updated. * * @param reconnectUri th...
This continuously tries to reconnect in a separate thread and will only stop if the connection was established successfully or the server gets shutdown. If there is currently a reconnect task active the connection paramaters and callback will get updated
asyncReconnect
{ "repo_name": "yersan/wildfly-core", "path": "server/src/main/java/org/jboss/as/server/mgmt/domain/HostControllerConnection.java", "license": "lgpl-2.1", "size": 18636 }
[ "org.jboss.as.protocol.ProtocolConnectionConfiguration" ]
import org.jboss.as.protocol.ProtocolConnectionConfiguration;
import org.jboss.as.protocol.*;
[ "org.jboss.as" ]
org.jboss.as;
2,768,461
public static IgniteUuid randomTrashId() { return TRASH_IDS[ThreadLocalRandom.current().nextInt(TRASH_CONCURRENCY)]; }
static IgniteUuid function() { return TRASH_IDS[ThreadLocalRandom.current().nextInt(TRASH_CONCURRENCY)]; }
/** * Get random trash ID. * * @return Trash ID. */
Get random trash ID
randomTrashId
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsUtils.java", "license": "apache-2.0", "size": 23100 }
[ "java.util.concurrent.ThreadLocalRandom", "org.apache.ignite.lang.IgniteUuid" ]
import java.util.concurrent.ThreadLocalRandom; import org.apache.ignite.lang.IgniteUuid;
import java.util.concurrent.*; import org.apache.ignite.lang.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
510,527
public void generateUpdateWhere(CharBuffer cb) { generateInternalWhere(cb, false); } // // private/protected
void function(CharBuffer cb) { generateInternalWhere(cb, false); }
/** * Generates the (update) where expression. */
Generates the (update) where expression
generateUpdateWhere
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/amber/expr/fun/AbsFunExpr.java", "license": "gpl-2.0", "size": 2520 }
[ "com.caucho.util.CharBuffer" ]
import com.caucho.util.CharBuffer;
import com.caucho.util.*;
[ "com.caucho.util" ]
com.caucho.util;
1,244,288
protected boolean isValidFragment(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) || GeneralPreferenceFragment.class.getName().equals(fragmentName) || DataSyncPreferenceFragment.class.getName().equals(fragmentName) || Noti...
boolean function(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) GeneralPreferenceFragment.class.getName().equals(fragmentName) DataSyncPreferenceFragment.class.getName().equals(fragmentName) NotificationPreferenceFragment.class.getName().equals(fragmentName); }
/** * This method stops fragment injection in malicious applications. * Make sure to deny any unknown fragments here. */
This method stops fragment injection in malicious applications. Make sure to deny any unknown fragments here
isValidFragment
{ "repo_name": "yeoupooh/subak", "path": "client/android/subak/app/src/main/java/com/subakstudio/subak/android/SettingsActivity.java", "license": "gpl-2.0", "size": 10165 }
[ "android.preference.PreferenceFragment" ]
import android.preference.PreferenceFragment;
import android.preference.*;
[ "android.preference" ]
android.preference;
1,608,768
if (f==null) { return false; } if(f.isDirectory()) { return true; } if (extensions!=null) { String extension = VideoIO.getExtension(f); if (extension!=null) { for (String next: extensions) { if (extension.toLowerCase().equals(next.toLowerCase())) return t...
if (f==null) { return false; } if(f.isDirectory()) { return true; } if (extensions!=null) { String extension = VideoIO.getExtension(f); if (extension!=null) { for (String next: extensions) { if (extension.toLowerCase().equals(next.toLowerCase())) return true; } } } else for (FileFilter next: VideoIO.singleVideoTypeFilt...
/** * Accepts directories and files with extensions specified in constructor, * or (no-arg constructor) with any extension in VideoIO.singleVideoTypeFilters. * * @param f the file * @return true if accepted */
Accepts directories and files with extensions specified in constructor, or (no-arg constructor) with any extension in VideoIO.singleVideoTypeFilters
accept
{ "repo_name": "dobrown/tracker-mvn", "path": "src/main/java/org/opensourcephysics/media/core/VideoFileFilter.java", "license": "gpl-3.0", "size": 6329 }
[ "javax.swing.filechooser.FileFilter" ]
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.*;
[ "javax.swing" ]
javax.swing;
2,057,252
public Object parseAs(Type dataType) throws IOException { if (!hasMessageBody()) { return null; } return request.getParser().parseAndClose(getContent(), getContentCharset(), dataType); }
Object function(Type dataType) throws IOException { if (!hasMessageBody()) { return null; } return request.getParser().parseAndClose(getContent(), getContentCharset(), dataType); }
/** * Parses the content of the HTTP response from {@link #getContent()} and reads it into a data * type of key/value pairs using the parser returned by {@link HttpRequest#getParser()}. * * @return parsed data type instance or {@code null} for no content * @since 1.10 */
Parses the content of the HTTP response from <code>#getContent()</code> and reads it into a data type of key/value pairs using the parser returned by <code>HttpRequest#getParser()</code>
parseAs
{ "repo_name": "wgpshashank/google-http-java-client", "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java", "license": "apache-2.0", "size": 15282 }
[ "java.io.IOException", "java.lang.reflect.Type" ]
import java.io.IOException; import java.lang.reflect.Type;
import java.io.*; import java.lang.reflect.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
52,817
private void step_1() { SpeakerNPC npc = npcs.get(QUEST_NPC); // quest can be given npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES, new OrCondition( new QuestNotStartedCondition(QUEST_SLOT), new AndCondition( new QuestCompletedCondition(QUEST_SLOT), n...
void function() { SpeakerNPC npc = npcs.get(QUEST_NPC); npc.add(ConversationStates.ATTENDING, ConversationPhrases.QUEST_MESSAGES, new OrCondition( new QuestNotStartedCondition(QUEST_SLOT), new AndCondition( new QuestCompletedCondition(QUEST_SLOT), new TimePassedCondition(QUEST_SLOT, 1, delay))), ConversationStates.ATTE...
/** * add quest state to npc's fsm. */
add quest state to npc's fsm
step_1
{ "repo_name": "dkfellows/stendhal", "path": "src/games/stendhal/server/maps/quests/KillEnemyArmy.java", "license": "gpl-2.0", "size": 19318 }
[ "games.stendhal.server.entity.npc.ConversationPhrases", "games.stendhal.server.entity.npc.ConversationStates", "games.stendhal.server.entity.npc.SpeakerNPC", "games.stendhal.server.entity.npc.action.SayTimeRemainingAction", "games.stendhal.server.entity.npc.condition.AndCondition", "games.stendhal.server....
import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.SpeakerNPC; import games.stendhal.server.entity.npc.action.SayTimeRemainingAction; import games.stendhal.server.entity.npc.condition.AndCondition; import games...
import games.stendhal.server.entity.npc.*; import games.stendhal.server.entity.npc.action.*; import games.stendhal.server.entity.npc.condition.*;
[ "games.stendhal.server" ]
games.stendhal.server;
1,249,533
@ServiceMethod(returns = ReturnType.SINGLE) public SendChatMessageResult sendChatMessage(String chatThreadId, SendChatMessageOptions body) { return sendChatMessageAsync(chatThreadId, body).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) SendChatMessageResult function(String chatThreadId, SendChatMessageOptions body) { return sendChatMessageAsync(chatThreadId, body).block(); }
/** * Sends a message to a thread. * * @param chatThreadId The thread id to send the message to. * @param body Details of the message to send. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorException thrown if the request is rejected by server. ...
Sends a message to a thread
sendChatMessage
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/AzureCommunicationChatServiceImpl.java", "license": "mit", "size": 111033 }
[ "com.azure.communication.chat.models.SendChatMessageOptions", "com.azure.communication.chat.models.SendChatMessageResult", "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.communication.chat.models.SendChatMessageOptions; import com.azure.communication.chat.models.SendChatMessageResult; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.communication.chat.models.*; import com.azure.core.annotation.*;
[ "com.azure.communication", "com.azure.core" ]
com.azure.communication; com.azure.core;
2,282,154
@Test public void testCreateSetIteratableWithEmptyInput() { assertEquals(String.format("Should return empty set for no input."), new HashSet<String>(), CollectionsUtil.createSet()); assertNull(String.format("Should return null for null input."), CollectionsUtil.createSet((Object[]) null)); }
void function() { assertEquals(String.format(STR), new HashSet<String>(), CollectionsUtil.createSet()); assertNull(String.format(STR), CollectionsUtil.createSet((Object[]) null)); }
/** * Tests the createSet()_Iteratable method using empty/null input */
Tests the createSet()_Iteratable method using empty/null input
testCreateSetIteratableWithEmptyInput
{ "repo_name": "UCDenver-ccp/common", "path": "src/test/java/edu/ucdenver/ccp/common/collections/CollectionsUtilTest.java", "license": "bsd-3-clause", "size": 27803 }
[ "java.util.HashSet", "org.junit.Assert" ]
import java.util.HashSet; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,278,968
public void testProjectNoImage() throws Exception { // Create test data Project p = new ProjectI(); p.setName(omero.rtypes.rstring("name")); Dataset d = new DatasetI(); d.setName(p.getName()); p.linkDataset(d); p = (Project) iUpdate.saveAndReturnObject(p); ...
void function() throws Exception { Project p = new ProjectI(); p.setName(omero.rtypes.rstring("name")); Dataset d = new DatasetI(); d.setName(p.getName()); p.linkDataset(d); p = (Project) iUpdate.saveAndReturnObject(p); final long id = p.getId().getValue(); final Delete2 dc = Requests.delete(STR, id); callback(true, cl...
/** * Deletes a project and all its datasets though no images are created. */
Deletes a project and all its datasets though no images are created
testProjectNoImage
{ "repo_name": "tp81/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/delete/AdditionalDeleteTest.java", "license": "gpl-2.0", "size": 23641 }
[ "java.util.List", "org.testng.Assert" ]
import java.util.List; import org.testng.Assert;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
1,352,022
public static double avgDoubleList(List<Double> list) { double sum = sumDoubleList(list); return list.size() == 0 ? 0.0 : sum / list.size(); }
static double function(List<Double> list) { double sum = sumDoubleList(list); return list.size() == 0 ? 0.0 : sum / list.size(); }
/** * Compute the average of a {@link java.lang.Double} list * * @param list * @return */
Compute the average of a <code>java.lang.Double</code> list
avgDoubleList
{ "repo_name": "cshaxu/voldemort", "path": "src/java/voldemort/utils/Utils.java", "license": "apache-2.0", "size": 27990 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
283,423
public void instanceLoad(String xmlstr, Appia appia) throws SAXException, IOException { if (appia == null) if (config == null) config = new Configuration(); else if (config == null) try { config = new Configuration(appia); } catch (AppiaXMLException e...
void function(String xmlstr, Appia appia) throws SAXException, IOException { if (appia == null) if (config == null) config = new Configuration(); else if (config == null) try { config = new Configuration(appia); } catch (AppiaXMLException e) { throw new SAXException(e); } handler = new XMLFileHandler(config); log.info(...
/** * Auxiliary method. * <p> * <b>INTERNAL USE ONLY!</b> * * @param xmlstr * @throws IOException * @throws SAXException */
Auxiliary method. INTERNAL USE ONLY
instanceLoad
{ "repo_name": "aparra/appia", "path": "src/core/net/sf/appia/xml/AppiaXML.java", "license": "apache-2.0", "size": 15063 }
[ "java.io.IOException", "java.io.StringReader", "net.sf.appia.core.Appia", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.StringReader; import net.sf.appia.core.Appia; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import net.sf.appia.core.*; import org.xml.sax.*;
[ "java.io", "net.sf.appia", "org.xml.sax" ]
java.io; net.sf.appia; org.xml.sax;
1,948,915
@Test public void testCycleDateStartTimerEvent() throws Exception { Clock previousClock = processEngineConfiguration.getClock(); Clock testClock = new DefaultClockImpl(); processEngineConfiguration.setClock(testClock); Calendar calendar = Calendar.getInstance(); calend...
void function() throws Exception { Clock previousClock = processEngineConfiguration.getClock(); Clock testClock = new DefaultClockImpl(); processEngineConfiguration.setClock(testClock); Calendar calendar = Calendar.getInstance(); calendar.set(2025, Calendar.DECEMBER, 10, 0, 0, 0); testClock.setCurrentTime(calendar.getT...
/** * Timer repetition */
Timer repetition
testCycleDateStartTimerEvent
{ "repo_name": "lsmall/flowable-engine", "path": "modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/event/timer/StartTimerEventRepeatWithoutEndDateTest.java", "license": "apache-2.0", "size": 8865 }
[ "java.util.Calendar", "java.util.List", "org.flowable.common.engine.api.delegate.event.FlowableEngineEventType", "org.flowable.common.engine.api.delegate.event.FlowableEvent", "org.flowable.common.engine.impl.runtime.Clock", "org.flowable.common.engine.impl.util.DefaultClockImpl", "org.flowable.engine.r...
import java.util.Calendar; import java.util.List; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; import org.flowable.common.engine.api.delegate.event.FlowableEvent; import org.flowable.common.engine.impl.runtime.Clock; import org.flowable.common.engine.impl.util.DefaultClockImpl; import o...
import java.util.*; import org.flowable.common.engine.api.delegate.event.*; import org.flowable.common.engine.impl.runtime.*; import org.flowable.common.engine.impl.util.*; import org.flowable.engine.runtime.*; import org.flowable.job.api.*;
[ "java.util", "org.flowable.common", "org.flowable.engine", "org.flowable.job" ]
java.util; org.flowable.common; org.flowable.engine; org.flowable.job;
1,758,299
public static String format(Context c, int id, Object...objects) { String f = c.getString(id); return String.format(f, objects); }
static String function(Context c, int id, Object...objects) { String f = c.getString(id); return String.format(f, objects); }
/** * Format the given string using the passed paraeters. */
Format the given string using the passed paraeters
format
{ "repo_name": "Grunthos/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/utils/Utils.java", "license": "gpl-3.0", "size": 70195 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,883,154
public Plugin[] loadPlugins(File directory) { Validate.notNull(directory, "Directory cannot be null"); Validate.isTrue(directory.isDirectory(), "Directory must be a directory"); List<Plugin> result = new ArrayList<Plugin>(); Set<Pattern> filters = fileAssociations.keySet(); ...
Plugin[] function(File directory) { Validate.notNull(directory, STR); Validate.isTrue(directory.isDirectory(), STR); List<Plugin> result = new ArrayList<Plugin>(); Set<Pattern> filters = fileAssociations.keySet(); if (!(server.getUpdateFolder().equals(STRbukkitSTRminecraftSTRmojangSTRCould not load 'STR' in folder 'STR...
/** * Loads the plugins contained within the specified directory * * @param directory Directory to check for plugins * @return A list of all plugins loaded */
Loads the plugins contained within the specified directory
loadPlugins
{ "repo_name": "TacoSpigot/Bukkit", "path": "src/main/java/org/bukkit/plugin/SimplePluginManager.java", "license": "gpl-3.0", "size": 28823 }
[ "java.io.File", "java.util.ArrayList", "java.util.List", "java.util.Set", "java.util.regex.Pattern", "org.apache.commons.lang.Validate" ]
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.regex.Pattern; import org.apache.commons.lang.Validate;
import java.io.*; import java.util.*; import java.util.regex.*; import org.apache.commons.lang.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
2,760,550
// Get point after nodelet Point<Node> point = nodelet.getParentNode() != null ? Point.inElement(nodelet.getParentNode(), nodelet.getNextSibling()) : null; // Attach nodelet to document body Document.get().getBody().appendChild(nodelet); return point; }
Point<Node> point = nodelet.getParentNode() != null ? Point.inElement(nodelet.getParentNode(), nodelet.getNextSibling()) : null; Document.get().getBody().appendChild(nodelet); return point; }
/** * Some IE element classes require their html nodelets be attached to * somewhere under the body of html document in order for implementation to * work. See, e.g., {@link ParagraphHelperIE#onEmpty(Element)} */
Some IE element classes require their html nodelets be attached to somewhere under the body of html document in order for implementation to work. See, e.g., <code>ParagraphHelperIE#onEmpty(Element)</code>
beforeImplementation
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/client/editor/content/paragraph/IeNodeletHelper.java", "license": "apache-2.0", "size": 1916 }
[ "com.google.gwt.dom.client.Document", "com.google.gwt.dom.client.Node", "org.waveprotocol.wave.model.document.util.Point" ]
import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Node; import org.waveprotocol.wave.model.document.util.Point;
import com.google.gwt.dom.client.*; import org.waveprotocol.wave.model.document.util.*;
[ "com.google.gwt", "org.waveprotocol.wave" ]
com.google.gwt; org.waveprotocol.wave;
2,735,281
public void testModifyResolution() { try { // increase and test long resolution = 20 * TimerThread.DEFAULT_RESOLUTION; //400 counterThread.setResolution(resolution); assertEquals(resolution, counterThread.getResolution()); doTestTimeout(false,true); // decrease much and test ...
void function() { try { long resolution = 20 * TimerThread.DEFAULT_RESOLUTION; counterThread.setResolution(resolution); assertEquals(resolution, counterThread.getResolution()); doTestTimeout(false,true); resolution = 5; counterThread.setResolution(resolution); assertEquals(resolution, counterThread.getResolution()); do...
/** * Test timeout behavior when resolution is modified. */
Test timeout behavior when resolution is modified
testModifyResolution
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java", "license": "apache-2.0", "size": 11971 }
[ "org.apache.lucene.search.TimeLimitingCollector" ]
import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.search.*;
[ "org.apache.lucene" ]
org.apache.lucene;
513,377
public void plotChanged(PlotChangeEvent event) { notifyListeners(event); }
void function(PlotChangeEvent event) { notifyListeners(event); }
/** * Receives a {@link PlotChangeEvent} and responds by notifying all * listeners. * * @param event the event. */
Receives a <code>PlotChangeEvent</code> and responds by notifying all listeners
plotChanged
{ "repo_name": "Mr-Steve/LTSpice_Library_Manager", "path": "libs/jfreechart-1.0.16/source/org/jfree/chart/plot/CombinedRangeXYPlot.java", "license": "gpl-2.0", "size": 26854 }
[ "org.jfree.chart.event.PlotChangeEvent" ]
import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
629,805
@Test public void testDeleteImage() throws Exception { Image img = mmFactory.createImage(); img = (Image) iUpdate.saveAndReturnObject(img); Pixels pixels = img.getPrimaryPixels(); long pixId = pixels.getId().getValue(); // method already tested in PixelsServiceTest ...
void function() throws Exception { Image img = mmFactory.createImage(); img = (Image) iUpdate.saveAndReturnObject(img); Pixels pixels = img.getPrimaryPixels(); long pixId = pixels.getId().getValue(); pixels = factory.getPixelsService().retrievePixDescription(pixId); long id = img.getId().getValue(); List<Long> channels...
/** * Test to delete an image with pixels, channels, logical channels and * statistics. * * @throws Exception * Thrown if an error occurred. */
Test to delete an image with pixels, channels, logical channels and statistics
testDeleteImage
{ "repo_name": "MontpellierRessourcesImagerie/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/DeleteServiceTest.java", "license": "gpl-2.0", "size": 157647 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.testng.Assert" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.testng.Assert;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
1,677,282
protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataServiceParameter_name_feature"), getString("_UI_PropertyDescriptor...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), DsPackage.Literals.DATA_SERVICE_PARAMETER__NAME, true, false, false, ItemPropertyDescriptor.GENER...
/** * This adds a property descriptor for the Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Name feature.
addNamePropertyDescriptor
{ "repo_name": "nwnpallewela/developer-studio", "path": "data-services/plugins/org.wso2.developerstudio.eclipse.ds.edit/src/org/wso2/developerstudio/eclipse/ds/provider/DataServiceParameterItemProvider.java", "license": "apache-2.0", "size": 5544 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.wso2.developerstudio.eclipse.ds.DsPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.ds.DsPackage;
import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.ds.*;
[ "org.eclipse.emf", "org.wso2.developerstudio" ]
org.eclipse.emf; org.wso2.developerstudio;
161,089
private void flushLeft() throws IOException { appendNewlineIfNecessary(leftBuf, leftColumn); while (leftBuf.length() != 0) { rightColumn.write('\n'); outputFullLines(); } }
void function() throws IOException { appendNewlineIfNecessary(leftBuf, leftColumn); while (leftBuf.length() != 0) { rightColumn.write('\n'); outputFullLines(); } }
/** * Flushes the left column buffer, printing it and clearing the buffer. * If the buffer is already empty, this does nothing. */
Flushes the left column buffer, printing it and clearing the buffer. If the buffer is already empty, this does nothing
flushLeft
{ "repo_name": "RyanTech/DexHunter", "path": "dalvik/dexgen/src/com/android/dexgen/util/TwoColumnOutput.java", "license": "apache-2.0", "size": 8156 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
656,033
private void notifyChangeListeners() { ChangeEvent ce = new ChangeEvent(this); for (ChangeListener mChangeListener : mChangeListeners) { mChangeListener.stateChanged(ce); } }
void function() { ChangeEvent ce = new ChangeEvent(this); for (ChangeListener mChangeListener : mChangeListeners) { mChangeListener.stateChanged(ce); } }
/** * Notify all registered change listeners that the text in the text field * has changed. */
Notify all registered change listeners that the text in the text field has changed
notifyChangeListeners
{ "repo_name": "hizhangqi/jmeter-1", "path": "src/jorphan/org/apache/jorphan/gui/JLabeledChoice.java", "license": "apache-2.0", "size": 9175 }
[ "javax.swing.event.ChangeEvent", "javax.swing.event.ChangeListener" ]
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
404,537
private void drawItemStack(ItemStack stack, int x, int y, String altText) { GlStateManager.translate(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; this.itemRender.zLevel = 200.0F; FontRenderer font = null; if (stack != null) font = stack.getItem().getFontRenderer(stack); ...
void function(ItemStack stack, int x, int y, String altText) { GlStateManager.translate(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; this.itemRender.zLevel = 200.0F; FontRenderer font = null; if (stack != null) font = stack.getItem().getFontRenderer(stack); if (font == null) font = fontRendererObj; this.itemRender.renderI...
/** * Render an ItemStack. Args : stack, x, y, format */
Render an ItemStack. Args : stack, x, y, format
drawItemStack
{ "repo_name": "kelthalorn/ConquestCraft", "path": "build/tmp/recompSrc/net/minecraft/client/gui/inventory/GuiContainer.java", "license": "lgpl-2.1", "size": 28781 }
[ "net.minecraft.client.gui.FontRenderer", "net.minecraft.client.renderer.GlStateManager", "net.minecraft.item.ItemStack" ]
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack;
import net.minecraft.client.gui.*; import net.minecraft.client.renderer.*; import net.minecraft.item.*;
[ "net.minecraft.client", "net.minecraft.item" ]
net.minecraft.client; net.minecraft.item;
2,226,245
private Database initEnvAndDb(boolean isTransactional) throws DatabaseException { EnvironmentConfig envConfig = TestUtils.initEnvConfig(); envConfig.setTransactional(isTransactional); envConfig.setConfigParam (EnvironmentParams.ENV_CHECK_LEAKS.getName(), "false"); ...
Database function(boolean isTransactional) throws DatabaseException { EnvironmentConfig envConfig = TestUtils.initEnvConfig(); envConfig.setTransactional(isTransactional); envConfig.setConfigParam (EnvironmentParams.ENV_CHECK_LEAKS.getName(), "false"); envConfig.setConfigParam(EnvironmentParams.NODE_MAX.getName(), "6")...
/** * Set up the environment and db. */
Set up the environment and db
initEnvAndDb
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/test/com/sleepycat/je/TruncateTest.java", "license": "apache-2.0", "size": 17754 }
[ "com.sleepycat.je.config.EnvironmentParams", "com.sleepycat.je.util.TestUtils" ]
import com.sleepycat.je.config.EnvironmentParams; import com.sleepycat.je.util.TestUtils;
import com.sleepycat.je.config.*; import com.sleepycat.je.util.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
1,525,401
@Test public void testTextAlign() throws Exception { TimedTextObject tto = StlTestUtil.buildTto( "10:00:00:00", "10:00:05:00", "text1", "10:00:05:00", "10:00:10:12", "text2", "10:04:59:00", "23:59:59:24", "text3" ); // set styles S...
void function() throws Exception { TimedTextObject tto = StlTestUtil.buildTto( STR, STR, "text1", STR, STR, "text2", STR, STR, "text3" ); Style style1 = new Style("1"); style1.setTextAlign(STR); Style style2 = new Style("2"); style2.setTextAlign(STR); Style style3 = new Style("3"); style3.setTextAlign(STR); tto.getCapt...
/** * Checks that text is aligned correctly * * @throws Exception */
Checks that text is aligned correctly
testTextAlign
{ "repo_name": "DSRCorporation/imf-conversion", "path": "ttml-to-stl/src/test/java/com/netflix/imfutility/ttmltostl/stl/StlTtiTest.java", "license": "gpl-3.0", "size": 38742 }
[ "com.netflix.imfutility.ttmltostl.ttml.Style", "com.netflix.imfutility.ttmltostl.ttml.TimedTextObject", "com.netflix.imfutility.ttmltostl.util.StlTestUtil", "java.util.Arrays", "junit.framework.TestCase", "org.junit.Assert" ]
import com.netflix.imfutility.ttmltostl.ttml.Style; import com.netflix.imfutility.ttmltostl.ttml.TimedTextObject; import com.netflix.imfutility.ttmltostl.util.StlTestUtil; import java.util.Arrays; import junit.framework.TestCase; import org.junit.Assert;
import com.netflix.imfutility.ttmltostl.ttml.*; import com.netflix.imfutility.ttmltostl.util.*; import java.util.*; import junit.framework.*; import org.junit.*;
[ "com.netflix.imfutility", "java.util", "junit.framework", "org.junit" ]
com.netflix.imfutility; java.util; junit.framework; org.junit;
511,643
public static MozuClient<com.mozu.api.contracts.productadmin.ProductReservationCollection> getProductReservationsClient(com.mozu.api.DataViewMode dataViewMode, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.cat...
static MozuClient<com.mozu.api.contracts.productadmin.ProductReservationCollection> function(com.mozu.api.DataViewMode dataViewMode, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.ProductReservationUrl....
/** * Retrieves a list of product reservations according to any specified filter criteria and sort options. * <p><pre><code> * MozuClient<com.mozu.api.contracts.productadmin.ProductReservationCollection> mozuClient=GetProductReservationsClient(dataViewMode, startIndex, pageSize, sortBy, filter, responseField...
Retrieves a list of product reservations according to any specified filter criteria and sort options. <code><code> MozuClient mozuClient=GetProductReservationsClient(dataViewMode, startIndex, pageSize, sortBy, filter, responseFields); client.setBaseAddress(url); client.executeRequest(); ProductReservationCollection pro...
getProductReservationsClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/ProductReservationClient.java", "license": "mit", "size": 15331 }
[ "com.mozu.api.DataViewMode", "com.mozu.api.Headers", "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
114,073
@Test public void testSerializationPM_Type() { try { TestTools.defineSchema(PersRefToPM.class); fail(); } catch (JDOUserException e) { //good. defining classes with PM attributes should not be allowed } }
void function() { try { TestTools.defineSchema(PersRefToPM.class); fail(); } catch (JDOUserException e) { } }
/** * Test serialisation of classes with obvious PM attributes. * * This used to fail because of NPE in OGT (see next test) and then because of StackOverflow. */
Test serialisation of classes with obvious PM attributes. This used to fail because of NPE in OGT (see next test) and then because of StackOverflow
testSerializationPM_Type
{ "repo_name": "NickCharsley/zoodb", "path": "tst/org/zoodb/test/jdo/Test_084_SerailizationBugRefToPM.java", "license": "gpl-3.0", "size": 5831 }
[ "javax.jdo.JDOUserException", "org.junit.Assert", "org.zoodb.test.testutil.TestTools" ]
import javax.jdo.JDOUserException; import org.junit.Assert; import org.zoodb.test.testutil.TestTools;
import javax.jdo.*; import org.junit.*; import org.zoodb.test.testutil.*;
[ "javax.jdo", "org.junit", "org.zoodb.test" ]
javax.jdo; org.junit; org.zoodb.test;
2,325,285
private static void escribirFutbolistas() { Writer output = null; try { output = new BufferedWriter(new FileWriter(nombrefichero2)); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { for (int i = 0; i < futbolistas.length; i++) { output.write(futbolis...
static void function() { Writer output = null; try { output = new BufferedWriter(new FileWriter(nombrefichero2)); } catch (IOException e) { e.printStackTrace(); } try { for (int i = 0; i < futbolistas.length; i++) { output.write(futbolistas[i] + "\n"); } } catch (IOException e) { e.printStackTrace(); } finally { try { ...
/** * Metodo que Escribe los Futbolistas en el Archivo */
Metodo que Escribe los Futbolistas en el Archivo
escribirFutbolistas
{ "repo_name": "davidhmhernandez/AcesoDatos", "path": "Act4.4/src/Main.java", "license": "epl-1.0", "size": 1742 }
[ "java.io.BufferedWriter", "java.io.FileWriter", "java.io.IOException", "java.io.Writer" ]
import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
726,553
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RouteFilterInner> listByResourceGroup(String resourceGroupName);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RouteFilterInner> listByResourceGroup(String resourceGroupName);
/** * Gets all route filters in a resource group. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by serv...
Gets all route filters in a resource group
listByResourceGroup
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java", "license": "mit", "size": 23978 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.network.fluent.models.RouteFilterInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.RouteFilterInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,399,702
@Override public Set<Short> getBroadcastPorts(long targetSw, long src, short srcPort, boolean tunnelEnabled) { TopologyInstance ti = getCurrentInstance(tunnelEnabled); return ti.getBroadcastPorts(targetSw, src, srcPo...
Set<Short> function(long targetSw, long src, short srcPort, boolean tunnelEnabled) { TopologyInstance ti = getCurrentInstance(tunnelEnabled); return ti.getBroadcastPorts(targetSw, src, srcPort); }
/** Get all the ports on the target switch (targetSw) on which a * broadcast packet must be sent from a host whose attachment point * is on switch port (src, srcPort). */
Get all the ports on the target switch (targetSw) on which a broadcast packet must be sent from a host whose attachment point is on switch port (src, srcPort)
getBroadcastPorts
{ "repo_name": "jmiserez/floodlight", "path": "src/main/java/net/floodlightcontroller/topology/TopologyManager.java", "license": "apache-2.0", "size": 56464 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,053,139
@Override public SailImplConfig getConfig() { return new HBaseSailConfig(); }
SailImplConfig function() { return new HBaseSailConfig(); }
/** * Factory method for instantiating an HBaseSailConfig * @return new HBaseSailConfig instance */
Factory method for instantiating an HBaseSailConfig
getConfig
{ "repo_name": "Merck/Halyard", "path": "sail/src/main/java/com/msd/gin/halyard/sail/HBaseSailFactory.java", "license": "apache-2.0", "size": 2279 }
[ "org.eclipse.rdf4j.sail.config.SailImplConfig" ]
import org.eclipse.rdf4j.sail.config.SailImplConfig;
import org.eclipse.rdf4j.sail.config.*;
[ "org.eclipse.rdf4j" ]
org.eclipse.rdf4j;
1,458,888
public void fromMap(Map map) { setSegNo(StringUtils.defaultIfEmpty(((String)map.get("segNo")), segNo)); setPreBillId(StringUtils.defaultIfEmpty(((String)map.get("preBillId")), preBillId)); setPreBillSubid(StringUtils.defaultIfEmpty(((String)map.get("preBillSubid")), preBillSubid)); setContractId(Strin...
void function(Map map) { setSegNo(StringUtils.defaultIfEmpty(((String)map.get("segNo")), segNo)); setPreBillId(StringUtils.defaultIfEmpty(((String)map.get(STR)), preBillId)); setPreBillSubid(StringUtils.defaultIfEmpty(((String)map.get(STR)), preBillSubid)); setContractId(StringUtils.defaultIfEmpty(((String)map.get(STR)...
/** * get the value from Map */
get the value from Map
fromMap
{ "repo_name": "stserp/erp1", "path": "source/src/com/baosight/sts/st/xs/domain/STXS1801D.java", "license": "apache-2.0", "size": 33286 }
[ "com.baosight.iplat4j.util.NumberUtils", "com.baosight.iplat4j.util.StringUtils", "java.util.Map" ]
import com.baosight.iplat4j.util.NumberUtils; import com.baosight.iplat4j.util.StringUtils; import java.util.Map;
import com.baosight.iplat4j.util.*; import java.util.*;
[ "com.baosight.iplat4j", "java.util" ]
com.baosight.iplat4j; java.util;
702,385
void searchForScenarios(Queue<Map<String, String>> queue, AtomicBoolean flag) throws IOException;
void searchForScenarios(Queue<Map<String, String>> queue, AtomicBoolean flag) throws IOException;
/** * Fills the queue with Maps of variable assignments produced by a DFS strategy; * the DFS is performed on a possible state bound up inside the Frontier and will * stop early if flag is set to true * * @param queue the queue * @param flag the exit flag * @throws IOException io exce...
Fills the queue with Maps of variable assignments produced by a DFS strategy; the DFS is performed on a possible state bound up inside the Frontier and will stop early if flag is set to true
searchForScenarios
{ "repo_name": "shraddha-patel/DGWithSpark", "path": "dg-core/src/main/java/org/finra/datagenerator/engine/Frontier.java", "license": "apache-2.0", "size": 2060 }
[ "java.io.IOException", "java.util.Map", "java.util.Queue", "java.util.concurrent.atomic.AtomicBoolean" ]
import java.io.IOException; import java.util.Map; import java.util.Queue; import java.util.concurrent.atomic.AtomicBoolean;
import java.io.*; import java.util.*; import java.util.concurrent.atomic.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,485,903
public static void localManagementReconfigure(Connection c, String iface) throws Types.BadServerResponse, XmlRpcException { String method_call = "host.local_management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session...
static void function(Connection c, String iface) throws Types.BadServerResponse, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(iface)}; Map response = c.dispatch(method_call, method_params); if(response...
/** * Reconfigure the management network interface. Should only be used if Host.management_reconfigure is impossible because the network configuration is broken. * * @param iface name of the interface to use as a management interface */
Reconfigure the management network interface. Should only be used if Host.management_reconfigure is impossible because the network configuration is broken
localManagementReconfigure
{ "repo_name": "cc14514/hq6", "path": "hq-plugin/xen-plugin/src/main/java/com/xensource/xenapi/Host.java", "license": "unlicense", "size": 71202 }
[ "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import java.util.*; import org.apache.xmlrpc.*;
[ "java.util", "org.apache.xmlrpc" ]
java.util; org.apache.xmlrpc;
1,299,875
public void extractArchive(Path archived, Path extractDirectory) throws IOException, ArchiveException;
void function(Path archived, Path extractDirectory) throws IOException, ArchiveException;
/** * Extracts an archive to the given directory. * @param archived The archived file. * @param extractDirectory The directory to which we will extracts the contents of the archive. * @throws IOException * @throws ArchiveException */
Extracts an archive to the given directory
extractArchive
{ "repo_name": "donaldmcdougal/compression", "path": "src/main/java/com/schneider/utils/archiving/Archiver.java", "license": "apache-2.0", "size": 941 }
[ "java.io.IOException", "java.nio.file.Path", "org.apache.commons.compress.archivers.ArchiveException" ]
import java.io.IOException; import java.nio.file.Path; import org.apache.commons.compress.archivers.ArchiveException;
import java.io.*; import java.nio.file.*; import org.apache.commons.compress.archivers.*;
[ "java.io", "java.nio", "org.apache.commons" ]
java.io; java.nio; org.apache.commons;
678,499
public MetaProperty<ObservableId> rateId() { return rateId; }
MetaProperty<ObservableId> function() { return rateId; }
/** * The meta-property for the {@code rateId} property. * @return the meta-property, not null */
The meta-property for the rateId property
rateId
{ "repo_name": "OpenGamma/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/node/FixedInflationSwapCurveNode.java", "license": "apache-2.0", "size": 28897 }
[ "com.opengamma.strata.data.ObservableId", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.data.ObservableId; import org.joda.beans.MetaProperty;
import com.opengamma.strata.data.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
1,486,356
public Locale getLocale() { return m_locale; }
Locale function() { return m_locale; }
/** * Returns the language locale of this index.<p> * * @return the language locale of this index, for example "en" */
Returns the language locale of this index
getLocale
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/search/CmsSearchIndex.java", "license": "lgpl-2.1", "size": 93424 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,821,448
public static int[] shape(INDArrayIndex... indices) { int[] ret = new int[indices.length]; for (int i = 0; i < ret.length; i++) { ret[i] = indices[i].length(); } List<Integer> nonZeros = new ArrayList<>(); for (int i = 0; i < ret.length; i++) { if (re...
static int[] function(INDArrayIndex... indices) { int[] ret = new int[indices.length]; for (int i = 0; i < ret.length; i++) { ret[i] = indices[i].length(); } List<Integer> nonZeros = new ArrayList<>(); for (int i = 0; i < ret.length; i++) { if (ret[i] > 0) nonZeros.add(ret[i]); } return ArrayUtil.toArray(nonZeros); }
/** * Calculate the shape for the given set of indices. * <p/> * The shape is defined as (for each dimension) * the difference between the end index + 1 and * the begin index * * @param indices the indices to calculate the shape for * @return the shape for the given indices ...
Calculate the shape for the given set of indices. The shape is defined as (for each dimension) the difference between the end index + 1 and the begin index
shape
{ "repo_name": "ZenDevelopmentSystems/nd4j", "path": "nd4j-api/src/main/java/org/nd4j/linalg/indexing/Indices.java", "license": "apache-2.0", "size": 17761 }
[ "java.util.ArrayList", "java.util.List", "org.nd4j.linalg.util.ArrayUtil" ]
import java.util.ArrayList; import java.util.List; import org.nd4j.linalg.util.ArrayUtil;
import java.util.*; import org.nd4j.linalg.util.*;
[ "java.util", "org.nd4j.linalg" ]
java.util; org.nd4j.linalg;
2,041,770
public Set<Long> search(String key, String query);
Set<Long> function(String key, String query);
/** * Search {@code key} for {@code query}. * <p> * This method performs a fulltext search for {@code query} in all data * <em>currently</em> mapped from {@code key}. * </p> * * @param key * @param query * @return the Set of primary keys identifying the records matching the...
Search key for query. This method performs a fulltext search for query in all data currently mapped from key.
search
{ "repo_name": "JerJohn15/concourse", "path": "concourse-server/src/main/java/com/cinchapi/concourse/server/storage/Store.java", "license": "apache-2.0", "size": 10638 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
488,705
public HeartbeatResponse heartbeat(TaskTrackerStatus status, boolean restarted, boolean initialContact, boolean acceptNewTasks, short responseId) throws IOException {...
HeartbeatResponse function(TaskTrackerStatus status, boolean restarted, boolean initialContact, boolean acceptNewTasks, short responseId) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug(STR + status.getTrackerName() + STR + restarted + STR + initialContact + STR + acceptNewTasks + ")" + STR + responseId); } ...
/** * The periodic heartbeat mechanism between the {@link TaskTracker} and * the {@link JobTracker}. * * The {@link JobTracker} processes the status information sent by the * {@link TaskTracker} and responds with instructions to start/stop * tasks or jobs, and also 'reset' instructions during continge...
The periodic heartbeat mechanism between the <code>TaskTracker</code> and the <code>JobTracker</code>. The <code>JobTracker</code> processes the status information sent by the <code>TaskTracker</code> and responds with instructions to start/stop tasks or jobs, and also 'reset' instructions during contingencies
heartbeat
{ "repo_name": "jchen123/hadoop-20-warehouse-fix", "path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java", "license": "apache-2.0", "size": 153244 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,613,924
public void testParseElementSerializer_Null() { // SETUP Properties props = new Properties(); // DO WORK IElementSerializer result = AuxiliaryCacheConfigurator .parseElementSerializer( props, "junk" ); // VERIFY assertTrue( "Should have the...
void function() { Properties props = new Properties(); IElementSerializer result = AuxiliaryCacheConfigurator .parseElementSerializer( props, "junk" ); assertTrue( STR, result instanceof StandardSerializer ); }
/** * Verify that we can parse the ElementSerializer. */
Verify that we can parse the ElementSerializer
testParseElementSerializer_Null
{ "repo_name": "tikue/jcs2-snapshot", "path": "src/test/org/apache/commons/jcs/auxiliary/AuxiliaryCacheConfiguratorUnitTest.java", "license": "apache-2.0", "size": 4079 }
[ "java.util.Properties", "org.apache.commons.jcs.engine.behavior.IElementSerializer", "org.apache.commons.jcs.utils.serialization.StandardSerializer" ]
import java.util.Properties; import org.apache.commons.jcs.engine.behavior.IElementSerializer; import org.apache.commons.jcs.utils.serialization.StandardSerializer;
import java.util.*; import org.apache.commons.jcs.engine.behavior.*; import org.apache.commons.jcs.utils.serialization.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,660,878
private void validateDialog() { String selectedRemote = getRemote(); if (StringUtil.isEmptyOrSpaces(selectedRemote)) { setOKActionEnabled(false); return; } setOKActionEnabled(myBranchChooser.getMarkedElements().size() != 0); }
void function() { String selectedRemote = getRemote(); if (StringUtil.isEmptyOrSpaces(selectedRemote)) { setOKActionEnabled(false); return; } setOKActionEnabled(myBranchChooser.getMarkedElements().size() != 0); }
/** * Validate dialog and enable buttons */
Validate dialog and enable buttons
validateDialog
{ "repo_name": "consulo/consulo-git", "path": "plugin/src/main/java/git4idea/merge/GitPullDialog.java", "license": "apache-2.0", "size": 11622 }
[ "com.intellij.openapi.util.text.StringUtil" ]
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.util.text.*;
[ "com.intellij.openapi" ]
com.intellij.openapi;
822,239
public void writeToFile(Path filename) { lock.lockRead(); Charset charset = Charset.forName("UTF-8"); try (BufferedWriter writer = Files.newBufferedWriter(filename, charset);) { for (String word : wordList.keySet()) { writer.write(word); for (Entry<Path, TreeSet<Integer>> entry : wordList.get(wor...
void function(Path filename) { lock.lockRead(); Charset charset = Charset.forName("UTF-8"); try (BufferedWriter writer = Files.newBufferedWriter(filename, charset);) { for (String word : wordList.keySet()) { writer.write(word); for (Entry<Path, TreeSet<Integer>> entry : wordList.get(word) .entrySet()) { writer.newLine(...
/** * Create a file with the given filename, and write the contents of * InvertedIndex to it. * * @param filename * @param toBeWritten */
Create a file with the given filename, and write the contents of InvertedIndex to it
writeToFile
{ "repo_name": "bjherger/search-engine-and-web-scraper", "path": "src/indexAndSearch/InvertedIndex.java", "license": "mit", "size": 7310 }
[ "java.io.BufferedWriter", "java.nio.charset.Charset", "java.nio.file.Files", "java.nio.file.Path", "java.util.Map", "java.util.TreeSet" ]
import java.io.BufferedWriter; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.util.Map; import java.util.TreeSet;
import java.io.*; import java.nio.charset.*; import java.nio.file.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
280,610
public void addFieldPropertyEditor(String propertyPath, PropertyEditor propertyEditor) { if (fieldPropertyEditors == null) { fieldPropertyEditors = new HashMap<String, PropertyEditor>(); } fieldPropertyEditors.put(propertyPath, propertyEditor); }
void function(String propertyPath, PropertyEditor propertyEditor) { if (fieldPropertyEditors == null) { fieldPropertyEditors = new HashMap<String, PropertyEditor>(); } fieldPropertyEditors.put(propertyPath, propertyEditor); }
/** * Associates a property editor instance with the given property path. * * @param propertyPath path for the property the editor should be associated with * @param propertyEditor editor instance to use when binding data for the property */
Associates a property editor instance with the given property path
addFieldPropertyEditor
{ "repo_name": "ricepanda/rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/lifecycle/ViewPostMetadata.java", "license": "apache-2.0", "size": 21036 }
[ "java.beans.PropertyEditor", "java.util.HashMap" ]
import java.beans.PropertyEditor; import java.util.HashMap;
import java.beans.*; import java.util.*;
[ "java.beans", "java.util" ]
java.beans; java.util;
1,859,229
public static void main(String[] args) throws TimeoutException, InterruptedException { //#thriftserverapi Hello.FutureIface impl = new HelloImpl(); ListeningServer server = Thrift.serveIface("localhost:8080", impl); Await.ready(server); //#thriftserverapi }
static void function(String[] args) throws TimeoutException, InterruptedException { Hello.FutureIface impl = new HelloImpl(); ListeningServer server = Thrift.serveIface(STR, impl); Await.ready(server); }
/** * Runs the example with given {@code args}. * * @param args the argument list */
Runs the example with given args
main
{ "repo_name": "nkhuyu/finagle", "path": "finagle-example/src/main/java/com/twitter/finagle/example/java/thrift/ThriftServer.java", "license": "apache-2.0", "size": 877 }
[ "com.twitter.finagle.ListeningServer", "com.twitter.finagle.Thrift", "com.twitter.finagle.example.thriftscala.Hello", "com.twitter.util.Await", "com.twitter.util.TimeoutException" ]
import com.twitter.finagle.ListeningServer; import com.twitter.finagle.Thrift; import com.twitter.finagle.example.thriftscala.Hello; import com.twitter.util.Await; import com.twitter.util.TimeoutException;
import com.twitter.finagle.*; import com.twitter.finagle.example.thriftscala.*; import com.twitter.util.*;
[ "com.twitter.finagle", "com.twitter.util" ]
com.twitter.finagle; com.twitter.util;
690,985
@CanIgnoreReturnValue public ToStringHelper addValue(@NullableDecl Object value) { return addHolder(value); }
ToStringHelper function(@NullableDecl Object value) { return addHolder(value); }
/** * Adds an unnamed value to the formatted output. * * <p>It is strongly encouraged to use {@link #add(String, Object)} instead and give value a * readable name. */
Adds an unnamed value to the formatted output. It is strongly encouraged to use <code>#add(String, Object)</code> instead and give value a readable name
addValue
{ "repo_name": "typetools/guava", "path": "android/guava/src/com/google/common/base/MoreObjects.java", "license": "apache-2.0", "size": 13434 }
[ "org.checkerframework.checker.nullness.compatqual.NullableDecl" ]
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import org.checkerframework.checker.nullness.compatqual.*;
[ "org.checkerframework.checker" ]
org.checkerframework.checker;
1,045,346
void taskPropertyAssignment(@Nullable String comment, String taskType, String propertyName, Object propertyValue);
void taskPropertyAssignment(@Nullable String comment, String taskType, String propertyName, Object propertyValue);
/** * Adds a property assignment statement to the configuration of all tasks with the given type of the target of this block. */
Adds a property assignment statement to the configuration of all tasks with the given type of the target of this block
taskPropertyAssignment
{ "repo_name": "lsmaira/gradle", "path": "subprojects/build-init/src/main/java/org/gradle/buildinit/plugins/internal/CrossConfigurationScriptBlockBuilder.java", "license": "apache-2.0", "size": 2026 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,148,630
public static boolean isStructuralAttribute(String name) { return (IRIMProfileConstants.CLASS_CODE.equals(name) || IRIMProfileConstants.TYPE_CODE.equals(name) || IRIMProfileConstants.MOOD_CODE.equals(name) || IRIMProfileConstants.DETERMINER_CODE.equals(name)); }
static boolean function(String name) { return (IRIMProfileConstants.CLASS_CODE.equals(name) IRIMProfileConstants.TYPE_CODE.equals(name) IRIMProfileConstants.MOOD_CODE.equals(name) IRIMProfileConstants.DETERMINER_CODE.equals(name)); }
/** * Test if the given model attribute name is a RIM structural attribute. * * @param name * attribute name * @return true if given name is structural */
Test if the given model attribute name is a RIM structural attribute
isStructuralAttribute
{ "repo_name": "drbgfc/mdht", "path": "hl7/plugins/org.openhealthtools.mdht.uml.hl7.core/src/org/openhealthtools/mdht/uml/hl7/core/util/RIMUtil.java", "license": "epl-1.0", "size": 2649 }
[ "org.openhealthtools.mdht.uml.hdf.util.IRIMProfileConstants" ]
import org.openhealthtools.mdht.uml.hdf.util.IRIMProfileConstants;
import org.openhealthtools.mdht.uml.hdf.util.*;
[ "org.openhealthtools.mdht" ]
org.openhealthtools.mdht;
1,865,673
socket.dataHandler(new Handler<Buffer>() { @Override public void handle(Buffer event) { accessor.getDispatcher().received(prefix, event.getBytes(), sock); } }); }
socket.dataHandler(new Handler<Buffer>() { void function(Buffer event) { accessor.getDispatcher().received(prefix, event.getBytes(), sock); } }); }
/** * Handles a web socket frames (message) * @param event the data */
Handles a web socket frames (message)
handle
{ "repo_name": "cheleb/wisdom", "path": "core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/SockJsHandler.java", "license": "apache-2.0", "size": 2791 }
[ "org.vertx.java.core.Handler", "org.vertx.java.core.buffer.Buffer" ]
import org.vertx.java.core.Handler; import org.vertx.java.core.buffer.Buffer;
import org.vertx.java.core.*; import org.vertx.java.core.buffer.*;
[ "org.vertx.java" ]
org.vertx.java;
1,407,641
public void moveRegionAndWait(RegionInfo destRegion, ServerName destServer) throws InterruptedException, IOException { HMaster master = getMiniHBaseCluster().getMaster(); // TODO: Here we start the move. The move can take a while. getAdmin().move(destRegion.getEncodedNameAsBytes(), destServer); ...
void function(RegionInfo destRegion, ServerName destServer) throws InterruptedException, IOException { HMaster master = getMiniHBaseCluster().getMaster(); getAdmin().move(destRegion.getEncodedNameAsBytes(), destServer); while (true) { ServerName serverName = master.getAssignmentManager().getRegionStates() .getRegionSer...
/** * Move region to destination server and wait till region is completely moved and online * * @param destRegion region to move * @param destServer destination server of the region * @throws InterruptedException * @throws IOException */
Move region to destination server and wait till region is completely moved and online
moveRegionAndWait
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 173926 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.RegionInfo", "org.apache.hadoop.hbase.master.HMaster" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.RegionInfo; import org.apache.hadoop.hbase.master.HMaster;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.master.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,069,480
public void processCommand(String scriptFunction, String[] functionArgs) { // // Initialize the JSObject by passing in a reference to the Applet // JSObject win = JSObject.getWindow(this.applet); // // // Call the JavaScript function, setFormTextEntry, and pass in the // // parameter...
void function(String scriptFunction, String[] functionArgs) { DOMService service = null;
/** * Performs actual call to JavaScript via Applet instance passed in Constructor. * @param scriptFunction - Name of JavaScript function to call * @param functionArgs - Array of parameter to pass into JavaScript function. Size of array * must match number of parameter in JavaScript function. *...
Performs actual call to JavaScript via Applet instance passed in Constructor
processCommand
{ "repo_name": "semantic-web-software/dynagent", "path": "Nucleo/src/dynagent/gui/JavaScriptCommand.java", "license": "agpl-3.0", "size": 3465 }
[ "com.sun.java.browser.dom.DOMService" ]
import com.sun.java.browser.dom.DOMService;
import com.sun.java.browser.dom.*;
[ "com.sun.java" ]
com.sun.java;
2,163,013
LOG.warn("funtion=create, msg=create new one."); OpenstackNetwork openStackNetMgr = new OpenstackNetwork(conInfoMap); return openStackNetMgr.createNetwork(network); }
LOG.warn(STR); OpenstackNetwork openStackNetMgr = new OpenstackNetwork(conInfoMap); return openStackNetMgr.createNetwork(network); }
/** * Create network to openstack.<br/> * * @param network the JSONObject of network information * @param conInfoMap the openstack info map * @return the result of creating network to openstack * @since NFVO 0.5 */
Create network to openstack
create
{ "repo_name": "open-o/nfvo", "path": "drivers/vim/vimadapter/VimDriverService/service/src/main/java/org/openo/nfvo/vimadapter/service/openstack/entry/NetworkMgrOpenstack.java", "license": "apache-2.0", "size": 2195 }
[ "org.openo.nfvo.vimadapter.service.openstack.networkmgr.OpenstackNetwork" ]
import org.openo.nfvo.vimadapter.service.openstack.networkmgr.OpenstackNetwork;
import org.openo.nfvo.vimadapter.service.openstack.networkmgr.*;
[ "org.openo.nfvo" ]
org.openo.nfvo;
419,286
protected String generateBodyParameters() { return KeyValueFormatter.format(bodyParameters, true); }
String function() { return KeyValueFormatter.format(bodyParameters, true); }
/** * Generate the body parameters to be added.<br> * <br> * <i>Note: values are encoded.</i> * * @return Body parameters (e.g. "limit=100&sort=top") */
Generate the body parameters to be added. Note: values are encoded
generateBodyParameters
{ "repo_name": "Murtaza0xFF/jReddit", "path": "src/main/java/com/github/jreddit/request/RedditPostRequest.java", "license": "mit", "size": 2641 }
[ "com.github.jreddit.request.util.KeyValueFormatter" ]
import com.github.jreddit.request.util.KeyValueFormatter;
import com.github.jreddit.request.util.*;
[ "com.github.jreddit" ]
com.github.jreddit;
1,526,154
public static boolean isAm() { Calendar cal = Calendar.getInstance(); return cal.get(GregorianCalendar.AM_PM) == 0; }
static boolean function() { Calendar cal = Calendar.getInstance(); return cal.get(GregorianCalendar.AM_PM) == 0; }
/** * Return whether it is am. * * @return {@code true}: yes<br>{@code false}: no */
Return whether it is am
isAm
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/TimeUtils.java", "license": "apache-2.0", "size": 58527 }
[ "java.util.Calendar", "java.util.GregorianCalendar" ]
import java.util.Calendar; import java.util.GregorianCalendar;
import java.util.*;
[ "java.util" ]
java.util;
362,415
public static TStatus toTStatus(Exception e) { if (e instanceof HiveSQLException) { return ((HiveSQLException)e).toTStatus(); } TStatus tStatus = new TStatus(TStatusCode.ERROR_STATUS); tStatus.setErrorMessage(e.getMessage()); tStatus.setInfoMessages(toString(e)); return tStatus; }
static TStatus function(Exception e) { if (e instanceof HiveSQLException) { return ((HiveSQLException)e).toTStatus(); } TStatus tStatus = new TStatus(TStatusCode.ERROR_STATUS); tStatus.setErrorMessage(e.getMessage()); tStatus.setInfoMessages(toString(e)); return tStatus; }
/** * Converts the specified {@link Exception} object into a {@link TStatus} object * @param e a {@link Exception} object * @return a {@link TStatus} object */
Converts the specified <code>Exception</code> object into a <code>TStatus</code> object
toTStatus
{ "repo_name": "LantaoJin/spark", "path": "sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/HiveSQLException.java", "license": "apache-2.0", "size": 7742 }
[ "org.apache.hive.service.cli.thrift.TStatus", "org.apache.hive.service.cli.thrift.TStatusCode" ]
import org.apache.hive.service.cli.thrift.TStatus; import org.apache.hive.service.cli.thrift.TStatusCode;
import org.apache.hive.service.cli.thrift.*;
[ "org.apache.hive" ]
org.apache.hive;
2,809,524
public List<BioFuzzParseNode> doTrace(BioFuzzParseTree tree, BioFuzzQuery q, TraceType type) { List<BioFuzzParseNode> ret = new Vector<BioFuzzParseNode>(); assert(tree != null); assert(q != null); if(type == TraceType.BFS) { // add first element just for bfs if(q.condition(tree.getRootNode())){...
List<BioFuzzParseNode> function(BioFuzzParseTree tree, BioFuzzQuery q, TraceType type) { List<BioFuzzParseNode> ret = new Vector<BioFuzzParseNode>(); assert(tree != null); assert(q != null); if(type == TraceType.BFS) { if(q.condition(tree.getRootNode())){ ret.add(tree.getRootNode()); } traceBFS(tree.getRootNode(), q, r...
/** * * Searches for nodes in the parse-tree that satisfy the constraint given * by the query. * * @param tree the parse-tree to analyze. * @param q the search constraint. * @param type the algorithm to use. * @return list of nodes that satisfy the query q. * */
Searches for nodes in the parse-tree that satisfy the constraint given by the query
doTrace
{ "repo_name": "julianthome/biofuzz-tk", "path": "src/main/java/org/biofuzztk/components/BioFuzzTracer.java", "license": "gpl-3.0", "size": 5178 }
[ "java.util.List", "java.util.Vector", "org.biofuzztk.ptree.BioFuzzParseNode", "org.biofuzztk.ptree.BioFuzzParseTree" ]
import java.util.List; import java.util.Vector; import org.biofuzztk.ptree.BioFuzzParseNode; import org.biofuzztk.ptree.BioFuzzParseTree;
import java.util.*; import org.biofuzztk.ptree.*;
[ "java.util", "org.biofuzztk.ptree" ]
java.util; org.biofuzztk.ptree;
2,705,820
public static Object fromXml(InputStream input) { return xstream.fromXML(input); }
static Object function(InputStream input) { return xstream.fromXML(input); }
/** Deserialize an object from an <code>InputStream</code>. * * @param input The <code>InputStream</code> * @return The deserialized <code>Object</code> */
Deserialize an object from an <code>InputStream</code>
fromXml
{ "repo_name": "zamentur/ofbiz_ynh", "path": "sources/framework/base/src/org/ofbiz/base/util/UtilXml.java", "license": "apache-2.0", "size": 49565 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
103,917
public void writeOptionalStreamable(@Nullable Streamable streamable) throws IOException { if (streamable != null) { writeBoolean(true); streamable.writeTo(this); } else { writeBoolean(false); } }
void function(@Nullable Streamable streamable) throws IOException { if (streamable != null) { writeBoolean(true); streamable.writeTo(this); } else { writeBoolean(false); } }
/** * Serializes a potential null value. */
Serializes a potential null value
writeOptionalStreamable
{ "repo_name": "palecur/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/io/stream/StreamOutput.java", "license": "apache-2.0", "size": 27770 }
[ "java.io.IOException", "org.elasticsearch.common.Nullable" ]
import java.io.IOException; import org.elasticsearch.common.Nullable;
import java.io.*; import org.elasticsearch.common.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
2,084,979
@VisibleForTesting static URI getClassPathEntry(File jarFile, String path) throws URISyntaxException { URI uri = new URI(path); if (uri.isAbsolute()) { return uri; } else { return new File(jarFile.getParentFile(), path.replace('/', File.separatorChar)).toURI(); } ...
@VisibleForTesting static URI getClassPathEntry(File jarFile, String path) throws URISyntaxException { URI uri = new URI(path); if (uri.isAbsolute()) { return uri; } else { return new File(jarFile.getParentFile(), path.replace('/', File.separatorChar)).toURI(); } } }
/** * Returns the absolute uri of the Class-Path entry value as specified in * <a href="http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Main%20Attributes"> * JAR File Specification</a>. Even though the specification only talks about relative urls, * absolute urls are actually supp...
Returns the absolute uri of the Class-Path entry value as specified in JAR File Specification. Even though the specification only talks about relative urls, absolute urls are actually supported too (for example, in Maven surefire plugin)
getClassPathEntry
{ "repo_name": "hsaputra/cdap", "path": "cdap-common/src/main/java/co/cask/cdap/common/internal/guava/ClassPath.java", "license": "apache-2.0", "size": 17255 }
[ "com.google.common.annotations.VisibleForTesting", "java.io.File", "java.net.URISyntaxException" ]
import com.google.common.annotations.VisibleForTesting; import java.io.File; import java.net.URISyntaxException;
import com.google.common.annotations.*; import java.io.*; import java.net.*;
[ "com.google.common", "java.io", "java.net" ]
com.google.common; java.io; java.net;
2,680,677
public static String buildValue( String primaryTable, String primaryField, String secondaryTable, String secondaryField ) { StringBuffer ret = new StringBuffer(); ret.append( FormTags.PRIMARY_LINK_TAG ); ret.append( ":" ); ret.append( primaryTable ); ret.appen...
static String function( String primaryTable, String primaryField, String secondaryTable, String secondaryField ) { StringBuffer ret = new StringBuffer(); ret.append( FormTags.PRIMARY_LINK_TAG ); ret.append( ":" ); ret.append( primaryTable ); ret.append( "." ); ret.append( primaryField ); ret.append( "~" ); ret.append( ...
/** * Builds a value String for a name value pair from the given parameters. * Ex: <code>PrimaryLink:ASQPCOMMON.ASQPDATAID~SecondaryLink:ASQPARRGMT.ASQPDATAID</code> * *@param primaryTable Description of Parameter *@param primaryField Description of Parameter *@param secondaryTa...
Builds a value String for a name value pair from the given parameters. Ex: <code>PrimaryLink:ASQPCOMMON.ASQPDATAID~SecondaryLink:ASQPARRGMT.ASQPDATAID</code>
buildValue
{ "repo_name": "jchoyt/mrald-lite", "path": "src/org/mitre/mrald/query/LinkElement.java", "license": "apache-2.0", "size": 15083 }
[ "org.mitre.mrald.util.FormTags" ]
import org.mitre.mrald.util.FormTags;
import org.mitre.mrald.util.*;
[ "org.mitre.mrald" ]
org.mitre.mrald;
2,876,742
void removeTrigger(Trigger trigger);
void removeTrigger(Trigger trigger);
/** * remove a Trigger * * @param trigger */
remove a Trigger
removeTrigger
{ "repo_name": "harfalm/Sakai-10.1", "path": "rwiki/rwiki-api/api/src/java/uk/ac/cam/caret/sakai/rwiki/service/message/api/TriggerService.java", "license": "apache-2.0", "size": 2686 }
[ "uk.ac.cam.caret.sakai.rwiki.service.message.api.model.Trigger" ]
import uk.ac.cam.caret.sakai.rwiki.service.message.api.model.Trigger;
import uk.ac.cam.caret.sakai.rwiki.service.message.api.model.*;
[ "uk.ac.cam" ]
uk.ac.cam;
1,048,965
public static void onCreate(Context c, String sdkKey) { if (sdkKey != null && !started) { if (Utils.DEBUG) { Log.i(TAG, "onCreate(" + sdkKey + ")"); } started = true; if (sdkKey.length() > 4) { //Get the public and private key from the SDK key publicKey = sdkKey.substring(0, 4); privat...
static void function(Context c, String sdkKey) { if (sdkKey != null && !started) { if (Utils.DEBUG) { Log.i(TAG, STR + sdkKey + ")"); } started = true; if (sdkKey.length() > 4) { publicKey = sdkKey.substring(0, 4); privateKey = sdkKey.substring(4); Context context = c.getApplicationContext(); preferences = context.getS...
/** * Start the SDK. Typically call this method from the onCreate(..) method of your main Activity * * @param c The application context, can be the activity where you are calling this method from * @param sdkKey Your SDK Key, go to https://analytics.distimo.com/settings/sdk to generate an SDK Key. */
Start the SDK. Typically call this method from the onCreate(..) method of your main Activity
onCreate
{ "repo_name": "platogo/DistimoSDK-PhoneGap-Plugin", "path": "src/android/DistimoSDK.java", "license": "apache-2.0", "size": 14078 }
[ "android.content.Context", "android.content.pm.PackageManager", "android.util.Log" ]
import android.content.Context; import android.content.pm.PackageManager; import android.util.Log;
import android.content.*; import android.content.pm.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
1,788,394
public void beforeIndexClosed(IndexService indexService) { }
void function(IndexService indexService) { }
/** * Called before the index get closed. * * @param indexService The index service */
Called before the index get closed
beforeIndexClosed
{ "repo_name": "petmit/elasticsearch", "path": "src/main/java/org/elasticsearch/indices/IndicesLifecycle.java", "license": "apache-2.0", "size": 5157 }
[ "org.elasticsearch.index.IndexService" ]
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
612,245
public void setDescent( float descent ) { dic.setFloat( COSName.DESCENT, descent ); }
void function( float descent ) { dic.setFloat( COSName.DESCENT, descent ); }
/** * This will set the descent for the font. * * @param descent The new descent for the font. */
This will set the descent for the font
setDescent
{ "repo_name": "mdamt/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontDescriptor.java", "license": "apache-2.0", "size": 19677 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
528,870
public static int decodeDesc(byte[] src, int srcOffset, BigDecimal[] valueRef) throws CorruptEncodingException { return decode(src, srcOffset, valueRef, -1); }
static int function(byte[] src, int srcOffset, BigDecimal[] valueRef) throws CorruptEncodingException { return decode(src, srcOffset, valueRef, -1); }
/** * Decodes the given BigDecimal as originally encoded for descending order. * * @param src source of encoded data * @param srcOffset offset into encoded data * @param valueRef decoded BigDecimal is stored in element 0, which may be * null * @return amount of bytes read from source...
Decodes the given BigDecimal as originally encoded for descending order
decodeDesc
{ "repo_name": "beebeandwer/TDDL", "path": "tddl-optimizer/src/main/java/com/taobao/tddl/optimizer/core/datatype/KeyDecoder.java", "license": "apache-2.0", "size": 31807 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,246,698
public TableDescriptor getTableDescriptor() throws StandardException { if (td == null) { td = getDataDictionary().getTableDescriptor(triggerTableId); } return td; } // caller converts referencedCols to referencedColsDescriptor... // public ReferencedColumns getReferencedColumnsDescriptor() // ...
TableDescriptor function() throws StandardException { if (td == null) { td = getDataDictionary().getTableDescriptor(triggerTableId); } return td; }
/** * Get the trigger table descriptor * * @return the table descripor upon which this trigger * is declared * * @exception StandardException on error */
Get the trigger table descriptor
getTableDescriptor
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java", "license": "apache-2.0", "size": 31404 }
[ "org.apache.derby.shared.common.error.StandardException" ]
import org.apache.derby.shared.common.error.StandardException;
import org.apache.derby.shared.common.error.*;
[ "org.apache.derby" ]
org.apache.derby;
855,605
@DELETE @Path("{md_name}") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response deleteMd(@PathParam("md_name") String mdName) { log.debug("DELETE called for MD {}", mdName); try { MdId mdId = MdIdCharStr.asMdId(mdName); b...
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam(STR) String mdName) { log.debug(STR, mdName); try { MdId mdId = MdIdCharStr.asMdId(mdName); boolean deleted = get(CfmMdService.class).deleteMaintenanceDomain(mdId); if (!deleted) { return Response.notModi...
/** * Delete Maintenance Domain by name. * * @param mdName The name of a Maintenance Domain * @return 200 OK, or 304 if not found or 500 on error */
Delete Maintenance Domain by name
deleteMd
{ "repo_name": "gkatsikas/onos", "path": "apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MdWebResource.java", "license": "apache-2.0", "size": 6144 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onosproject.incubator.net.l2monitoring.cfm.identifier.MdId", "org.onosproject.incubator.net.l2monitoring.cfm.identifier.MdIdCharStr", "org.onos...
import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MdId; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.Md...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.incubator.net.l2monitoring.cfm.identifier.*; import org.onosproject.incubator.net.l2monitoring.cfm.service.*;
[ "javax.ws", "org.onosproject.incubator" ]
javax.ws; org.onosproject.incubator;
142,484
public SourceReference getServiceProvider() ;
SourceReference function() ;
/** * Gets the service provider. * * @return the service provider */
Gets the service provider
getServiceProvider
{ "repo_name": "cts2/cts2-framework", "path": "cts2-service/src/main/java/edu/mayo/cts2/framework/service/profile/BaseService.java", "license": "apache-2.0", "size": 2211 }
[ "edu.mayo.cts2.framework.model.core.SourceReference" ]
import edu.mayo.cts2.framework.model.core.SourceReference;
import edu.mayo.cts2.framework.model.core.*;
[ "edu.mayo.cts2" ]
edu.mayo.cts2;
2,355,552
@Override public void generatePreTry(JavaWriter out) throws IOException { _next.generatePreTry(out); } /** * Generates code before the call, in the try block. * <code><pre> * retType myMethod(...) * { * try { * [pre-call] * value = bean.myMethod(...); * ... ...
void function(JavaWriter out) throws IOException { _next.generatePreTry(out); } /** * Generates code before the call, in the try block. * <code><pre> * retType myMethod(...) * { * try { * [pre-call] * value = bean.myMethod(...); * ... * }
/** * Generates code before the try block */
Generates code before the try block
generatePreTry
{ "repo_name": "CleverCloud/Quercus", "path": "resin/src/main/java/com/caucho/config/gen/AbstractAspectGenerator.java", "license": "gpl-2.0", "size": 11874 }
[ "com.caucho.java.JavaWriter", "java.io.IOException" ]
import com.caucho.java.JavaWriter; import java.io.IOException;
import com.caucho.java.*; import java.io.*;
[ "com.caucho.java", "java.io" ]
com.caucho.java; java.io;
2,902,552
public void asyncUnsubscribe(ByteString topic, ByteString subscriberId, Callback<Void> callback, Object context);
void function(ByteString topic, ByteString subscriberId, Callback<Void> callback, Object context);
/** * Unsubscribe from a topic asynchronously that the subscriberId user has * previously subscribed to. * * @param topic * Topic name of the subscription * @param subscriberId * ID of the subscriber * @param callback * Callback to invoke whe...
Unsubscribe from a topic asynchronously that the subscriberId user has previously subscribed to
asyncUnsubscribe
{ "repo_name": "rvenkatesh25/bookkeeper", "path": "hedwig-client/src/main/java/org/apache/hedwig/client/api/Subscriber.java", "license": "apache-2.0", "size": 10109 }
[ "com.google.protobuf.ByteString", "org.apache.hedwig.util.Callback" ]
import com.google.protobuf.ByteString; import org.apache.hedwig.util.Callback;
import com.google.protobuf.*; import org.apache.hedwig.util.*;
[ "com.google.protobuf", "org.apache.hedwig" ]
com.google.protobuf; org.apache.hedwig;
1,024,092
private int deleteFlowFilterEntries(RestResource restResource, String vtnName, String vbrName, String ifName, String seqNum) { StringBuilder sb = new StringBuilder(); sb.append(VtnServiceOpenStackConsts.VTN_PATH); sb.append(VtnServiceOpenStackConsts.URI_CONCATENATOR); sb.append(vtnName); sb.append(VtnSe...
int function(RestResource restResource, String vtnName, String vbrName, String ifName, String seqNum) { StringBuilder sb = new StringBuilder(); sb.append(VtnServiceOpenStackConsts.VTN_PATH); sb.append(VtnServiceOpenStackConsts.URI_CONCATENATOR); sb.append(vtnName); sb.append(VtnServiceOpenStackConsts.VBRIDGE_PATH); sb....
/** * delete Flow Filter Entry at UNC * * @param requestBody * - OpenStack request body * @param flowFilterVrtBean * - flow Filter infomation * @param restResource * - RestResource instance * @return - erorrCode, 200 for Success */
delete Flow Filter Entry at UNC
deleteFlowFilterEntries
{ "repo_name": "opendaylight/vtn", "path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/resources/openstack/FilterResource.java", "license": "epl-1.0", "size": 43375 }
[ "org.opendaylight.vtn.javaapi.RestResource", "org.opendaylight.vtn.javaapi.openstack.constants.VtnServiceOpenStackConsts" ]
import org.opendaylight.vtn.javaapi.RestResource; import org.opendaylight.vtn.javaapi.openstack.constants.VtnServiceOpenStackConsts;
import org.opendaylight.vtn.javaapi.*; import org.opendaylight.vtn.javaapi.openstack.constants.*;
[ "org.opendaylight.vtn" ]
org.opendaylight.vtn;
1,769,221
public static Long previousComparableTestResult(Long testResultId) { SelectMode m = ModeFactory.getMode("scap_queries", "previous_comparable_tr"); Map<String, Long> params = new HashMap<String, Long>(); params.put("xid", testResultId); DataResult<Map> toReturn = m.exe...
static Long function(Long testResultId) { SelectMode m = ModeFactory.getMode(STR, STR); Map<String, Long> params = new HashMap<String, Long>(); params.put("xid", testResultId); DataResult<Map> toReturn = m.execute(params); return (Long) toReturn.get(0).get("xid"); }
/** * Get a TestResult with metadata similar to the given. * Which has been evaluated on the same machine just before the given. * So it makes a sence to compare these two. * @param testResultId referential TestResult * @return result or null (if not any) */
Get a TestResult with metadata similar to the given. Which has been evaluated on the same machine just before the given. So it makes a sence to compare these two
previousComparableTestResult
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/audit/ScapManager.java", "license": "gpl-2.0", "size": 12626 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
82,361
String sqlCommand="select * from IntegratorConsent where facilityId=?1 and demographicId=?2 order by createdDate desc"; Query query = entityManager.createNativeQuery(sqlCommand, modelClass); query.setParameter(1, facilityId); query.setParameter(2, demographicId); return(getSingleResultOrNull(quer...
String sqlCommand=STR; Query query = entityManager.createNativeQuery(sqlCommand, modelClass); query.setParameter(1, facilityId); query.setParameter(2, demographicId); return(getSingleResultOrNull(query)); }
/** * results are ordered by newest first */
results are ordered by newest first
findLatestByFacilityDemographic
{ "repo_name": "hexbinary/landing", "path": "src/main/java/org/oscarehr/common/dao/IntegratorConsentDao.java", "license": "gpl-2.0", "size": 2404 }
[ "javax.persistence.Query" ]
import javax.persistence.Query;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
2,855,295
public boolean rowDeleted() throws SQLException { throw SQLError.createSQLFeatureNotSupportedException(); }
boolean function() throws SQLException { throw SQLError.createSQLFeatureNotSupportedException(); }
/** * JDBC 2.0 Determine if this row has been deleted. A deleted row may leave * a visible "hole" in a result set. This method can be used to detect holes * in a result set. The value returned depends on whether or not the result * set can detect deletions. * * @return true if deleted and...
JDBC 2.0 Determine if this row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not the result set can detect deletions
rowDeleted
{ "repo_name": "martingh15/TPJava", "path": "TPJavaNotebook/mysql-connector-java-5.1.39/src/com/mysql/jdbc/ResultSetImpl.java", "license": "mpl-2.0", "size": 288777 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
695,234
protected Highlights trafficSummary(TrafficLink.StatsType type) { Highlights highlights = new Highlights(); // TODO: consider whether a map would be better... Set<TrafficLink> linksWithTraffic = computeLinksWithTraffic(type); Set<TrafficLink> aggregatedLinks = doAggregation(linksWi...
Highlights function(TrafficLink.StatsType type) { Highlights highlights = new Highlights(); Set<TrafficLink> linksWithTraffic = computeLinksWithTraffic(type); Set<TrafficLink> aggregatedLinks = doAggregation(linksWithTraffic); for (TrafficLink tlink : aggregatedLinks) { highlights.add(tlink.highlight(type)); } return h...
/** * Generates a {@link Highlights} object summarizing the traffic on the * network, ready to be transmitted back to the client for display on * the topology view. * * @param type the type of statistics to be displayed * @return highlights, representing links to be labeled/colored */
Generates a <code>Highlights</code> object summarizing the traffic on the network, ready to be transmitted back to the client for display on the topology view
trafficSummary
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitorBase.java", "license": "apache-2.0", "size": 13921 }
[ "java.util.Set", "org.onosproject.ui.impl.topo.util.TrafficLink", "org.onosproject.ui.topo.Highlights" ]
import java.util.Set; import org.onosproject.ui.impl.topo.util.TrafficLink; import org.onosproject.ui.topo.Highlights;
import java.util.*; import org.onosproject.ui.impl.topo.util.*; import org.onosproject.ui.topo.*;
[ "java.util", "org.onosproject.ui" ]
java.util; org.onosproject.ui;
2,086,363
public void setLastSdkPath(String osSdkPath) { PreferenceStore prefs = getPreferenceStore(); synchronized (DdmsPreferenceStore.class) { prefs.setValue(LAST_SDK_PATH, osSdkPath); try { prefs.save(); } catch (IOException ioe) { } } }
void function(String osSdkPath) { PreferenceStore prefs = getPreferenceStore(); synchronized (DdmsPreferenceStore.class) { prefs.setValue(LAST_SDK_PATH, osSdkPath); try { prefs.save(); } catch (IOException ioe) { } } }
/** * Sets the last SDK OS path. * * @param osSdkPath The SDK OS Path. Can be null or empty. */
Sets the last SDK OS path
setLastSdkPath
{ "repo_name": "consulo/consulo-android", "path": "android/android/src/com/android/tools/idea/stats/DdmsPreferenceStore.java", "license": "apache-2.0", "size": 11022 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,309,447
private static void fixDecimalColumnTypeName(List<FieldSchema> cols) { for (FieldSchema col : cols) { if (serdeConstants.DECIMAL_TYPE_NAME.equals(col.getType())) { col.setType(DecimalTypeInfo.getQualifiedName(HiveDecimal.USER_DEFAULT_PRECISION, HiveDecimal.USER_DEFAULT_SCALE)); } ...
static void function(List<FieldSchema> cols) { for (FieldSchema col : cols) { if (serdeConstants.DECIMAL_TYPE_NAME.equals(col.getType())) { col.setType(DecimalTypeInfo.getQualifiedName(HiveDecimal.USER_DEFAULT_PRECISION, HiveDecimal.USER_DEFAULT_SCALE)); } } }
/** * Fix the type name of a column of type decimal w/o precision/scale specified. This makes * the describe table show "decimal(10,0)" instead of "decimal" even if the type stored * in metastore is "decimal", which is possible with previous hive. * * @param cols columns that to be fixed as such */
Fix the type name of a column of type decimal w/o precision/scale specified. This makes the describe table show "decimal(10,0)" instead of "decimal" even if the type stored in metastore is "decimal", which is possible with previous hive
fixDecimalColumnTypeName
{ "repo_name": "alanfgates/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/DescTableOperation.java", "license": "apache-2.0", "size": 13485 }
[ "java.util.List", "org.apache.hadoop.hive.common.type.HiveDecimal", "org.apache.hadoop.hive.metastore.api.FieldSchema", "org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo" ]
import java.util.List; import org.apache.hadoop.hive.common.type.HiveDecimal; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.serde2.typeinfo.DecimalTypeInfo;
import java.util.*; import org.apache.hadoop.hive.common.type.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.serde2.typeinfo.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
457,116