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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) {
try {
Method m = PreferenceManager.class.getDeclaredMethod("setPreferences", PreferenceScreen.class);
m.setAccessible(true);
return ((Boolean) m.invoke(manager, screen));
} catch (Exception e) {
Log.w(TAG, "Couldn't c... | static boolean setPreferences(PreferenceManager manager, PreferenceScreen screen) { try { Method m = PreferenceManager.class.getDeclaredMethod(STR, PreferenceScreen.class); m.setAccessible(true); return ((Boolean) m.invoke(manager, screen)); } catch (Exception e) { Log.w(TAG, STR, e); } return false; } | /**
* Sets the root of the preference hierarchy.
*
* @param preferenceScreen The root {@link PreferenceScreen} of the preference hierarchy.
* @return Whether the {@link PreferenceScreen} given is different than the previous.
*/ | Sets the root of the preference hierarchy | setPreferences | {
"repo_name": "sukso96100/BullshIT-DB_Android",
"path": "app/src/main/java/org/bullshitbankdb/android/compat/PreferenceManagerCompat.java",
"license": "mit",
"size": 8848
} | [
"android.preference.PreferenceManager",
"android.preference.PreferenceScreen",
"android.util.Log",
"java.lang.reflect.Method"
] | import android.preference.PreferenceManager; import android.preference.PreferenceScreen; import android.util.Log; import java.lang.reflect.Method; | import android.preference.*; import android.util.*; import java.lang.reflect.*; | [
"android.preference",
"android.util",
"java.lang"
] | android.preference; android.util; java.lang; | 159,265 |
EReference getDirectEditLabel_InitialOperation(); | EReference getDirectEditLabel_InitialOperation(); | /**
* Returns the meta object for the containment reference '
* {@link org.eclipse.sirius.diagram.description.tool.DirectEditLabel#getInitialOperation
* <em>Initial Operation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @return the meta object for the containment reference '... | Returns the meta object for the containment reference ' <code>org.eclipse.sirius.diagram.description.tool.DirectEditLabel#getInitialOperation Initial Operation</code>'. | getDirectEditLabel_InitialOperation | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/tool/ToolPackage.java",
"license": "epl-1.0",
"size": 180886
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,445,884 |
public static void fromTour(Solution solution, Tour tour) {
int[] permutation = tour.toArray();
// decrement values to get permutation
for (int i = 0; i < permutation.length; i++) {
permutation[i]--;
}
EncodingUtils.setPermutation(solution.getVariable(0), permutation);
}
public static class ... | static void function(Solution solution, Tour tour) { int[] permutation = tour.toArray(); for (int i = 0; i < permutation.length; i++) { permutation[i]--; } EncodingUtils.setPermutation(solution.getVariable(0), permutation); } public static class TSPProblem extends AbstractProblem { private final TSPInstance instance; p... | /**
* Saves a {@link Tour} into a MOEA Framework solution.
*
* @param solution the MOEA Framework solution
* @param tour the tour
*/ | Saves a <code>Tour</code> into a MOEA Framework solution | fromTour | {
"repo_name": "priscylla/tsp-ia",
"path": "src/org/moeaframework/problem/tsplib/TSPExample.java",
"license": "mit",
"size": 7483
} | [
"org.moeaframework.core.Solution",
"org.moeaframework.core.variable.EncodingUtils",
"org.moeaframework.problem.AbstractProblem"
] | import org.moeaframework.core.Solution; import org.moeaframework.core.variable.EncodingUtils; import org.moeaframework.problem.AbstractProblem; | import org.moeaframework.core.*; import org.moeaframework.core.variable.*; import org.moeaframework.problem.*; | [
"org.moeaframework.core",
"org.moeaframework.problem"
] | org.moeaframework.core; org.moeaframework.problem; | 849,335 |
private void queueOrSubmitUpload(String key, File file) {
if (mReadyToBroadcast) {
submitUpload(key, file);
} else {
if (VERBOSE) Log.i(TAG, "queueing " + key + " until S3 Credentials available");
queueUpload(key, file);
}
} | void function(String key, File file) { if (mReadyToBroadcast) { submitUpload(key, file); } else { if (VERBOSE) Log.i(TAG, STR + key + STR); queueUpload(key, file); } } | /**
* Handle an upload, either submitting to the S3 client
* or queueing for submission once credentials are ready
*
* @param key destination key
* @param file local file
*/ | Handle an upload, either submitting to the S3 client or queueing for submission once credentials are ready | queueOrSubmitUpload | {
"repo_name": "MobileManAG/Moments-Android",
"path": "app/src/main/java/io/kickflip/sdk/av/Broadcaster.java",
"license": "apache-2.0",
"size": 41678
} | [
"android.util.Log",
"java.io.File"
] | import android.util.Log; import java.io.File; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 943,183 |
protected boolean needsDownload( String filename ) {
boolean retval = false;
File file = new File( filename );
if ( !file.exists() ) {
// Local file not exists!
if ( isDebug() ) {
logDebug( toString(), BaseMessages.getString( PKG, "JobEntryFTPS.LocalFileNotExists" ), filename );
... | boolean function( String filename ) { boolean retval = false; File file = new File( filename ); if ( !file.exists() ) { if ( isDebug() ) { logDebug( toString(), BaseMessages.getString( PKG, STR ), filename ); } return true; } else { if ( ifFileExists == ifFileExistsCreateUniq ) { if ( isDebug() ) { logDebug( toString()... | /**
* See if the filename on the FTPS server needs downloading. The default is to check the presence of the file in the
* target directory. If you need other functionality, extend this class and build it into a plugin.
*
* @param filename
* The local filename to check
* @param remoteFileSize
... | See if the filename on the FTPS server needs downloading. The default is to check the presence of the file in the target directory. If you need other functionality, extend this class and build it into a plugin | needsDownload | {
"repo_name": "rfellows/pentaho-kettle",
"path": "engine/src/org/pentaho/di/job/entries/ftpsget/JobEntryFTPSGet.java",
"license": "apache-2.0",
"size": 42872
} | [
"java.io.File",
"org.pentaho.di.core.util.StringUtil",
"org.pentaho.di.i18n.BaseMessages"
] | import java.io.File; import org.pentaho.di.core.util.StringUtil; import org.pentaho.di.i18n.BaseMessages; | import java.io.*; import org.pentaho.di.core.util.*; import org.pentaho.di.i18n.*; | [
"java.io",
"org.pentaho.di"
] | java.io; org.pentaho.di; | 162,074 |
public void colorChannel(String channel, Color color){
if(this.channelColors == null){
this.channelColors = new HashMap<String,Color>();
}
this.channelColors.put(channel.toLowerCase(),color);
} | void function(String channel, Color color){ if(this.channelColors == null){ this.channelColors = new HashMap<String,Color>(); } this.channelColors.put(channel.toLowerCase(),color); } | /**
* Color the tag for a particular channel this color
* @param channel The channel to color
* @param color The color to use
*/ | Color the tag for a particular channel this color | colorChannel | {
"repo_name": "gangeli/redwood",
"path": "src/edu/stanford/nlp/util/logging/OutputHandler.java",
"license": "lgpl-3.0",
"size": 15166
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,191,512 |
public boolean skipField(final int tag) throws IOException {
switch (WireFormatMicro.getTagWireType(tag)) {
case WireFormatMicro.WIRETYPE_VARINT:
readInt32();
return true;
case WireFormatMicro.WIRETYPE_FIXED64:
readRawLittleEndian64();
return true;
case WireFormat... | boolean function(final int tag) throws IOException { switch (WireFormatMicro.getTagWireType(tag)) { case WireFormatMicro.WIRETYPE_VARINT: readInt32(); return true; case WireFormatMicro.WIRETYPE_FIXED64: readRawLittleEndian64(); return true; case WireFormatMicro.WIRETYPE_LENGTH_DELIMITED: skipRawBytes(readRawVarint32())... | /**
* Reads and discards a single field, given its tag value.
*
* @return {@code false} if the tag is an endgroup tag, in which case
* nothing is skipped. Otherwise, returns {@code true}.
*/ | Reads and discards a single field, given its tag value | skipField | {
"repo_name": "zbsz/micro-protobuf",
"path": "java/src/main/java/com/google/protobuf/micro/CodedInputStreamMicro.java",
"license": "bsd-3-clause",
"size": 27112
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 543,148 |
private void cancelDownloadsForAccount(Account account) {
// Cancel pending downloads
mPendingDownloads.remove(account.name);
} | void function(Account account) { mPendingDownloads.remove(account.name); } | /**
* Remove downloads of an account
*
* @param account Downloads account to remove
*/ | Remove downloads of an account | cancelDownloadsForAccount | {
"repo_name": "jujojujoju/android",
"path": "src/com/owncloud/android/files/services/FileDownloader.java",
"license": "gpl-2.0",
"size": 27475
} | [
"android.accounts.Account"
] | import android.accounts.Account; | import android.accounts.*; | [
"android.accounts"
] | android.accounts; | 1,663,266 |
public BBox toBBox() {
return new BBox(minLon, minLat, maxLon, maxLat);
} | BBox function() { return new BBox(minLon, minLat, maxLon, maxLat); } | /**
* Creates BBox with same coordinates.
*
* @return BBox with same coordinates.
* @since 6203
*/ | Creates BBox with same coordinates | toBBox | {
"repo_name": "jonathanrcarter/divv-amsterdam-parkingapi",
"path": "src-josm/org/openstreetmap/josm/data/Bounds.java",
"license": "gpl-2.0",
"size": 16792
} | [
"org.openstreetmap.josm.data.osm.BBox"
] | import org.openstreetmap.josm.data.osm.BBox; | import org.openstreetmap.josm.data.osm.*; | [
"org.openstreetmap.josm"
] | org.openstreetmap.josm; | 1,431,526 |
protected void cleanup( TestParameters tParam, PrintWriter log ) {
log.println( " disposing xSheetDoc " );
XComponent oComp = UnoRuntime.queryInterface(XComponent.class, xSheetDoc) ;
util.DesktopTools.closeDoc(oComp);
} | void function( TestParameters tParam, PrintWriter log ) { log.println( STR ); XComponent oComp = UnoRuntime.queryInterface(XComponent.class, xSheetDoc) ; util.DesktopTools.closeDoc(oComp); } | /**
* Disposes Spreadsheet document.
*/ | Disposes Spreadsheet document | cleanup | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/mod/_sc/ScRecentFunctionsObj.java",
"license": "gpl-3.0",
"size": 4361
} | [
"com.sun.star.lang.XComponent",
"com.sun.star.uno.UnoRuntime",
"java.io.PrintWriter"
] | import com.sun.star.lang.XComponent; import com.sun.star.uno.UnoRuntime; import java.io.PrintWriter; | import com.sun.star.lang.*; import com.sun.star.uno.*; import java.io.*; | [
"com.sun.star",
"java.io"
] | com.sun.star; java.io; | 658,785 |
@Override()
public java.lang.Class getJavaClass(
) {
return org.chocolate_milk.model.UnitOfMeasureSetQueryRqType.class;
} | @Override() java.lang.Class function( ) { return org.chocolate_milk.model.UnitOfMeasureSetQueryRqType.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "galleon1/chocolate-milk",
"path": "src/org/chocolate_milk/model/descriptors/UnitOfMeasureSetQueryRqTypeDescriptor.java",
"license": "lgpl-3.0",
"size": 9635
} | [
"org.chocolate_milk.model.UnitOfMeasureSetQueryRqType"
] | import org.chocolate_milk.model.UnitOfMeasureSetQueryRqType; | import org.chocolate_milk.model.*; | [
"org.chocolate_milk.model"
] | org.chocolate_milk.model; | 1,412,254 |
@Test
public void testAggregateQueries() {
VM vm0 = VM.getVM(0);
VM vm1 = VM.getVM(1);
VM vm2 = VM.getVM(2);
final int port0 = vm0.invoke(() -> {
configAndStartBridgeServer();
Region region = getRootRegion().getSubregion(regionName);
for (int i = 0; i < 10; i++) {
region.p... | void function() { VM vm0 = VM.getVM(0); VM vm1 = VM.getVM(1); VM vm2 = VM.getVM(2); final int port0 = vm0.invoke(() -> { configAndStartBridgeServer(); Region region = getRootRegion().getSubregion(regionName); for (int i = 0; i < 10; i++) { region.put("key-" + i, new TestObject(i, "val-" + i)); } return getCacheServerPo... | /**
* Test Aggregate queries on Pdx instances
*/ | Test Aggregate queries on Pdx instances | testAggregateQueries | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/PdxQueryDUnitTest.java",
"license": "apache-2.0",
"size": 139502
} | [
"org.apache.geode.cache.Region",
"org.apache.geode.cache.client.PoolManager",
"org.apache.geode.cache.query.Query",
"org.apache.geode.cache.query.QueryService",
"org.apache.geode.cache.query.SelectResults",
"org.apache.geode.test.dunit.NetworkUtils",
"org.apache.geode.test.dunit.VM",
"org.junit.Assert... | import org.apache.geode.cache.Region; import org.apache.geode.cache.client.PoolManager; import org.apache.geode.cache.query.Query; import org.apache.geode.cache.query.QueryService; import org.apache.geode.cache.query.SelectResults; import org.apache.geode.test.dunit.NetworkUtils; import org.apache.geode.test.dunit.VM; ... | import org.apache.geode.cache.*; import org.apache.geode.cache.client.*; import org.apache.geode.cache.query.*; import org.apache.geode.test.dunit.*; import org.junit.*; | [
"org.apache.geode",
"org.junit"
] | org.apache.geode; org.junit; | 202,979 |
public @NonNull Set<String> getDependents() {
if (isBundled && dependents.isEmpty()) {
return CORE_ONLY_DEPENDANT;
} else {
return dependents;
}
} | @NonNull Set<String> function() { if (isBundled && dependents.isEmpty()) { return CORE_ONLY_DEPENDANT; } else { return dependents; } } | /**
* Get the list of components that depend on this plugin.
* Note that the list will include elements of {@link #getOptionalDependents}.
* @return The list of components that depend on this plugin.
*/ | Get the list of components that depend on this plugin. Note that the list will include elements of <code>#getOptionalDependents</code> | getDependents | {
"repo_name": "patbos/jenkins",
"path": "core/src/main/java/hudson/PluginWrapper.java",
"license": "mit",
"size": 46479
} | [
"edu.umd.cs.findbugs.annotations.NonNull",
"java.util.Set"
] | import edu.umd.cs.findbugs.annotations.NonNull; import java.util.Set; | import edu.umd.cs.findbugs.annotations.*; import java.util.*; | [
"edu.umd.cs",
"java.util"
] | edu.umd.cs; java.util; | 1,183,646 |
public PDObjectStream getExtends() {
PDObjectStream retval = null;
COSStream stream = (COSStream) getCOSObject().getDictionaryObject(COSName.EXTENDS);
if (stream != null) {
retval = new PDObjectStream(stream);
}
return retval;
} | PDObjectStream function() { PDObjectStream retval = null; COSStream stream = (COSStream) getCOSObject().getDictionaryObject(COSName.EXTENDS); if (stream != null) { retval = new PDObjectStream(stream); } return retval; } | /**
* A reference to an object stream, of which the current object stream is
* considered an extension.
*
* @return The object that this stream is an extension.
*/ | A reference to an object stream, of which the current object stream is considered an extension | getExtends | {
"repo_name": "gavanx/pdflearn",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDObjectStream.java",
"license": "apache-2.0",
"size": 3514
} | [
"org.apache.pdfbox.cos.COSName",
"org.apache.pdfbox.cos.COSStream"
] | import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSStream; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 1,011,813 |
@Test
public void testEmptyWrite() {
runWrite(Collections.<String>emptyList(), IDENTITY_MAP);
// Note we did not request a sharded write, so runWrite will not validate the number of shards.
assertThat(numShards.intValue(), greaterThan(0));
} | void function() { runWrite(Collections.<String>emptyList(), IDENTITY_MAP); assertThat(numShards.intValue(), greaterThan(0)); } | /**
* Test that Write with an empty input still produces one shard.
*/ | Test that Write with an empty input still produces one shard | testEmptyWrite | {
"repo_name": "sammcveety/DataflowJavaSDK",
"path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/io/WriteTest.java",
"license": "apache-2.0",
"size": 18276
} | [
"java.util.Collections",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import java.util.Collections; import org.hamcrest.Matchers; import org.junit.Assert; | import java.util.*; import org.hamcrest.*; import org.junit.*; | [
"java.util",
"org.hamcrest",
"org.junit"
] | java.util; org.hamcrest; org.junit; | 79,931 |
private void packageH264Keyframe(ByteBuffer encodedData, MediaCodec.BufferInfo bufferInfo) {
mH264Keyframe.position(mH264MetaSize);
mH264Keyframe.put(encodedData); // BufferOverflow
} | void function(ByteBuffer encodedData, MediaCodec.BufferInfo bufferInfo) { mH264Keyframe.position(mH264MetaSize); mH264Keyframe.put(encodedData); } | /**
* Adds the SPS + PPS data to the ByteBuffer containing a h264 keyframe
*
* @param encodedData
* @param bufferInfo
*/ | Adds the SPS + PPS data to the ByteBuffer containing a h264 keyframe | packageH264Keyframe | {
"repo_name": "cine-io/cineio-broadcast-android",
"path": "cineio-broadcast-android-sdk/src/main/java/io/cine/android/streaming/FFmpegMuxer.java",
"license": "mit",
"size": 17755
} | [
"android.media.MediaCodec",
"java.nio.ByteBuffer"
] | import android.media.MediaCodec; import java.nio.ByteBuffer; | import android.media.*; import java.nio.*; | [
"android.media",
"java.nio"
] | android.media; java.nio; | 100,629 |
Map<String, List<String>> getAuthenticationHandler() {
List<AbstractAuthenticationHandlerHolder> registeredHolders = authHandlerCache.getHolders();
LinkedHashMap<String, List<String>> handlerMap = new LinkedHashMap<String, List<String>>();
for (AbstractAuthenticationHandlerHolder holder : re... | Map<String, List<String>> getAuthenticationHandler() { List<AbstractAuthenticationHandlerHolder> registeredHolders = authHandlerCache.getHolders(); LinkedHashMap<String, List<String>> handlerMap = new LinkedHashMap<String, List<String>>(); for (AbstractAuthenticationHandlerHolder holder : registeredHolders) { List<Stri... | /**
* Returns the list of registered authentication handlers as a map
*/ | Returns the list of registered authentication handlers as a map | getAuthenticationHandler | {
"repo_name": "Nimco/sling",
"path": "bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java",
"license": "apache-2.0",
"size": 67314
} | [
"java.util.ArrayList",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,671,269 |
public void desactivar(){
if(!this.validateDesactivar()){
return;
}
this.setEstado(Estado.INACTIVO.getId());
DefDAOFactory.getEmiMatDAO().update(this);
}
| void function(){ if(!this.validateDesactivar()){ return; } this.setEstado(Estado.INACTIVO.getId()); DefDAOFactory.getEmiMatDAO().update(this); } | /**
* Desactiva el EmiMat. Previamente valida la desactivacion.
*
*/ | Desactiva el EmiMat. Previamente valida la desactivacion | desactivar | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/def/buss/bean/EmiMat.java",
"license": "gpl-3.0",
"size": 6284
} | [
"ar.gov.rosario.siat.def.buss.dao.DefDAOFactory",
"coop.tecso.demoda.iface.model.Estado"
] | import ar.gov.rosario.siat.def.buss.dao.DefDAOFactory; import coop.tecso.demoda.iface.model.Estado; | import ar.gov.rosario.siat.def.buss.dao.*; import coop.tecso.demoda.iface.model.*; | [
"ar.gov.rosario",
"coop.tecso.demoda"
] | ar.gov.rosario; coop.tecso.demoda; | 2,724,267 |
public void setResourceService(ResourceService resourceService) {
this.resourceService = resourceService;
} | void function(ResourceService resourceService) { this.resourceService = resourceService; } | /**
* Sets the resource remote service.
*
* @param resourceService the resource remote service
*/ | Sets the resource remote service | setResourceService | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/whp_sites_external_documentsLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 177106
} | [
"com.liferay.portal.service.ResourceService"
] | import com.liferay.portal.service.ResourceService; | import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,543,181 |
public static StringBuffer makeSimpleDoc(String... fieldsAndValues) {
try {
StringWriter w = new StringWriter();
w.append("<doc>");
for (int i = 0; i < fieldsAndValues.length; i+=2) {
XML.writeXML(w, "field", fieldsAndValues[i+1], "name",
fieldsAndValues[i]);
... | static StringBuffer function(String... fieldsAndValues) { try { StringWriter w = new StringWriter(); w.append("<doc>"); for (int i = 0; i < fieldsAndValues.length; i+=2) { XML.writeXML(w, "field", fieldsAndValues[i+1], "name", fieldsAndValues[i]); } w.append(STR); return w.getBuffer(); } catch (IOException e) { throw n... | /**
* A helper that creates an xml <doc> containing all of the
* fields and values specified
*
* @param fieldsAndValues 0 and Even numbered args are fields names odds are field values.
*/ | A helper that creates an xml <doc> containing all of the fields and values specified | makeSimpleDoc | {
"repo_name": "Lythimus/lptv",
"path": "apache-solr-3.6.0/solr/test-framework/src/java/org/apache/solr/util/TestHarness.java",
"license": "gpl-2.0",
"size": 21076
} | [
"java.io.IOException",
"java.io.StringWriter",
"org.apache.solr.common.util.XML"
] | import java.io.IOException; import java.io.StringWriter; import org.apache.solr.common.util.XML; | import java.io.*; import org.apache.solr.common.util.*; | [
"java.io",
"org.apache.solr"
] | java.io; org.apache.solr; | 126,253 |
public void writeView(File viewDir, String name, AbstractView view,
List<Action> actions) throws IOException, JAXBException {
ObjectViews objectViews = new ObjectViews();
File viewFile = new File(viewDir, name + ".xml");
if (viewFile.exists()) {
String xml = Files.toString(viewFile, Charsets.UTF_8);
... | void function(File viewDir, String name, AbstractView view, List<Action> actions) throws IOException, JAXBException { ObjectViews objectViews = new ObjectViews(); File viewFile = new File(viewDir, name + ".xml"); if (viewFile.exists()) { String xml = Files.toString(viewFile, Charsets.UTF_8); if (!Strings.isNullOrEmpty(... | /**
* Write view and action xml into new viewFile.
*
* @param name
* Name of model
* @param views
* List of AbstractView of models.
* @param actions
* List of Actions of model.
* @throws IOException
* @throws JAXBException
*/ | Write view and action xml into new viewFile | writeView | {
"repo_name": "jph-axelor/axelor-business-suite",
"path": "axelor-studio/src/main/java/com/axelor/studio/service/builder/ViewBuilderService.java",
"license": "agpl-3.0",
"size": 14401
} | [
"com.axelor.meta.loader.XMLViews",
"com.axelor.meta.schema.ObjectViews",
"com.axelor.meta.schema.actions.Action",
"com.axelor.meta.schema.views.AbstractView",
"com.google.common.base.Charsets",
"com.google.common.base.Strings",
"com.google.common.io.Files",
"java.io.File",
"java.io.FileWriter",
"j... | import com.axelor.meta.loader.XMLViews; import com.axelor.meta.schema.ObjectViews; import com.axelor.meta.schema.actions.Action; import com.axelor.meta.schema.views.AbstractView; import com.google.common.base.Charsets; import com.google.common.base.Strings; import com.google.common.io.Files; import java.io.File; import... | import com.axelor.meta.loader.*; import com.axelor.meta.schema.*; import com.axelor.meta.schema.actions.*; import com.axelor.meta.schema.views.*; import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.util.*; import javax.xml.bind.*; | [
"com.axelor.meta",
"com.google.common",
"java.io",
"java.util",
"javax.xml"
] | com.axelor.meta; com.google.common; java.io; java.util; javax.xml; | 1,764,673 |
@CheckForNull
CacheInvalidationStats invalidateCache(Iterable<String> keys); | CacheInvalidationStats invalidateCache(Iterable<String> keys); | /**
* Invalidate the document cache but only with entries that match one
* of the keys provided.
*
* See {@link #invalidateCache()} for the general contract of cache
* invalidation.
*
* @param keys the keys of the documents to invalidate.
* @return cache invalidation statistics o... | Invalidate the document cache but only with entries that match one of the keys provided. See <code>#invalidateCache()</code> for the general contract of cache invalidation | invalidateCache | {
"repo_name": "tripodsan/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java",
"license": "apache-2.0",
"size": 15336
} | [
"org.apache.jackrabbit.oak.plugins.document.cache.CacheInvalidationStats"
] | import org.apache.jackrabbit.oak.plugins.document.cache.CacheInvalidationStats; | import org.apache.jackrabbit.oak.plugins.document.cache.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 2,085,204 |
default AdvancedGoogleSheetsStreamEndpointBuilder pollStrategy(
PollingConsumerPollStrategy pollStrategy) {
doSetProperty("pollStrategy", pollStrategy);
return this;
} | default AdvancedGoogleSheetsStreamEndpointBuilder pollStrategy( PollingConsumerPollStrategy pollStrategy) { doSetProperty(STR, pollStrategy); return this; } | /**
* A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing
* you to provide your custom implementation to control error handling
* usually occurred during the poll operation before an Exchange have
* been created and being routed in Camel.
*
* The o... | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option is a: <code>org.apache.camel.spi.PollingConsumerPollStrategy</cod... | pollStrategy | {
"repo_name": "DariusX/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleSheetsStreamEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 35259
} | [
"org.apache.camel.spi.PollingConsumerPollStrategy"
] | import org.apache.camel.spi.PollingConsumerPollStrategy; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,289,823 |
Observable<WebJob> getWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); | Observable<WebJob> getWebJobSlotAsync(String resourceGroupName, String name, String webJobName, String slot); | /**
* Get webjob information for an app, or a deployment slot.
* Description for Get webjob information for an app, or a deployment slot.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Site name.
* @param webJobName Name of the web job.... | Get webjob information for an app, or a deployment slot. Description for Get webjob information for an app, or a deployment slot | getWebJobSlotAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebApps.java",
"license": "mit",
"size": 242740
} | [
"com.microsoft.azure.management.appservice.v2019_08_01.WebJob"
] | import com.microsoft.azure.management.appservice.v2019_08_01.WebJob; | import com.microsoft.azure.management.appservice.v2019_08_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 665,582 |
public void addMinMaxActions(JMenu menu) {
try {
wrap = true;
menuItem(menu, "Minimize", 'M', doMinimize(), iconNo);
menuItem(menu, "Zoom", doZoom(), iconNo);
} finally {
wrap = false;
}
} | void function(JMenu menu) { try { wrap = true; menuItem(menu, STR, 'M', doMinimize(), iconNo); menuItem(menu, "Zoom", doZoom(), iconNo); } finally { wrap = false; } } | /**
* This method inserts "Minimize" and "Maximize" entries into a JMenu.
*/ | This method inserts "Minimize" and "Maximize" entries into a JMenu | addMinMaxActions | {
"repo_name": "AlloyTools/org.alloytools.alloy",
"path": "org.alloytools.alloy.application/src/main/java/edu/mit/csail/sdg/alloy4viz/VizGUI.java",
"license": "apache-2.0",
"size": 84556
} | [
"edu.mit.csail.sdg.alloy4.OurUtil",
"javax.swing.JMenu"
] | import edu.mit.csail.sdg.alloy4.OurUtil; import javax.swing.JMenu; | import edu.mit.csail.sdg.alloy4.*; import javax.swing.*; | [
"edu.mit.csail",
"javax.swing"
] | edu.mit.csail; javax.swing; | 2,708,517 |
public void handleMessage(String fromPort, Msg msg) {
synchronized (m_lastMsgReceived) {
m_lastMsgReceived = System.currentTimeMillis();
}
synchronized(m_features) {
// first update all features that are
// not status features
for (DeviceFeature f : m_features.values()) {
if (!f.isStatusFeature... | void function(String fromPort, Msg msg) { synchronized (m_lastMsgReceived) { m_lastMsgReceived = System.currentTimeMillis(); } synchronized(m_features) { for (DeviceFeature f : m_features.values()) { if (!f.isStatusFeature()) { if (f.handleMessage(msg, fromPort)) { break; } } } for (DeviceFeature f : m_features.values(... | /**
* Handle incoming message for this device by forwarding
* it to all features that this device supports
* @param fromPort port from which the message come in
* @param msg the incoming message
*/ | Handle incoming message for this device by forwarding it to all features that this device supports | handleMessage | {
"repo_name": "paulianttila/openhab",
"path": "bundles/binding/org.openhab.binding.insteonplm/src/main/java/org/openhab/binding/insteonplm/internal/device/InsteonDevice.java",
"license": "epl-1.0",
"size": 11277
} | [
"org.openhab.binding.insteonplm.internal.message.Msg"
] | import org.openhab.binding.insteonplm.internal.message.Msg; | import org.openhab.binding.insteonplm.internal.message.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,983,085 |
@Test
public void testReplayRegionOpenEvent() throws IOException {
putDataWithFlushes(primaryRegion, 100, 0, 100); // no flush
int numRows = 100;
// close the region and open again.
primaryRegion.close();
primaryRegion = HRegion.openHRegion(rootDir, primaryHri, htd, walPrimary, CONF, rss, null)... | void function() throws IOException { putDataWithFlushes(primaryRegion, 100, 0, 100); int numRows = 100; primaryRegion.close(); primaryRegion = HRegion.openHRegion(rootDir, primaryHri, htd, walPrimary, CONF, rss, null); reader = createWALReaderForPrimary(); List<RegionEventDescriptor> regionEvents = Lists.newArrayList()... | /**
* Tests replaying region open markers from primary region. Checks whether the files are picked up
*/ | Tests replaying region open markers from primary region. Checks whether the files are picked up | testReplayRegionOpenEvent | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java",
"license": "apache-2.0",
"size": 69815
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.regionserver.TestHRegion",
"org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.hbase.wal.WALEdit",
"org.apache.hbase.thirdparty.com.google.common.collect.Lists",
"org.j... | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.regionserver.TestHRegion; import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.wal.WALEdit; import org.apache.hbase.thirdparty.com.google.common.coll... | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.hbase.wal.*; import org.apache.hbase.thirdparty.com.google.common.collect.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.hbase",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.apache.hbase; org.junit; | 164,060 |
private void setAttachments (JSONArray attachments, Intent draft) throws JSONException {
ArrayList<Uri> uris = new ArrayList<Uri>();
for (int i = 0; i < attachments.length(); i++) {
Uri uri = getUriForPath(attachments.getString(i));
uris.add(uri);
}
draft.p... | void function (JSONArray attachments, Intent draft) throws JSONException { ArrayList<Uri> uris = new ArrayList<Uri>(); for (int i = 0; i < attachments.length(); i++) { Uri uri = getUriForPath(attachments.getString(i)); uris.add(uri); } draft.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris); } | /**
* Setter for the attachments.
*
* @param attachments
* List of URIs
* @param draft
* The intent
*
* @throws JSONException
*/ | Setter for the attachments | setAttachments | {
"repo_name": "Pekes317/ebcbeta",
"path": "plugins/cordova-plugin-email/src/android/EmailComposer.java",
"license": "apache-2.0",
"size": 16771
} | [
"android.content.Intent",
"android.net.Uri",
"java.util.ArrayList",
"org.json.JSONArray",
"org.json.JSONException"
] | import android.content.Intent; import android.net.Uri; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; | import android.content.*; import android.net.*; import java.util.*; import org.json.*; | [
"android.content",
"android.net",
"java.util",
"org.json"
] | android.content; android.net; java.util; org.json; | 2,887,829 |
void onItemClick(StaggeredGridView parent, View view, int position, long id);
} | void onItemClick(StaggeredGridView parent, View view, int position, long id); } | /**
* Callback method to be invoked when an item in this AdapterView has
* been clicked.
* <p>
* Implementers can call getItemAtPosition(position) if they need
* to access the data associated with the selected item.
*
* @param parent The AdapterView where t... | Callback method to be invoked when an item in this AdapterView has been clicked. Implementers can call getItemAtPosition(position) if they need to access the data associated with the selected item | onItemClick | {
"repo_name": "kitek/PullToRefresh-StaggeredGridView",
"path": "library/src/android/support/v4/widget/StaggeredGridView.java",
"license": "apache-2.0",
"size": 91620
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,670,980 |
public List<NamedList<Object>> getTrimmedPivotsAsListOfNamedLists() {
if (null == pivotFacetField) {
// no values in any shard for the top field of this pivot
return Collections.<NamedList<Object>>emptyList();
}
pivotFacetField.trim();
return pivotFacetField.convertToListOfNamedLists();
... | List<NamedList<Object>> function() { if (null == pivotFacetField) { return Collections.<NamedList<Object>>emptyList(); } pivotFacetField.trim(); return pivotFacetField.convertToListOfNamedLists(); } | /**
* A recursive method for generating <code>NamedLists</code> for this pivot suitable for including
* in a pivot facet response to the original distributed request.
*
* @see PivotFacetField#trim
* @see PivotFacetField#convertToListOfNamedLists
*/ | A recursive method for generating <code>NamedLists</code> for this pivot suitable for including in a pivot facet response to the original distributed request | getTrimmedPivotsAsListOfNamedLists | {
"repo_name": "apache/solr",
"path": "solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java",
"license": "apache-2.0",
"size": 5684
} | [
"java.util.Collections",
"java.util.List",
"org.apache.solr.common.util.NamedList"
] | import java.util.Collections; import java.util.List; import org.apache.solr.common.util.NamedList; | import java.util.*; import org.apache.solr.common.util.*; | [
"java.util",
"org.apache.solr"
] | java.util; org.apache.solr; | 841,974 |
public List getAwardReportTermRecipients() {
return getAwardTemplateReportTermRecipients();
} | List function() { return getAwardTemplateReportTermRecipients(); } | /**
* Gets the awardReportTermRecipients attribute.
* @return Returns the awardReportTermRecipients.
*/ | Gets the awardReportTermRecipients attribute | getAwardReportTermRecipients | {
"repo_name": "sanjupolus/kc-coeus-1508.3",
"path": "coeus-impl/src/main/java/org/kuali/kra/award/home/AwardTemplateReportTerm.java",
"license": "agpl-3.0",
"size": 13816
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 294,381 |
public void basicBridgeClientInvalidate(DistributedMember serverId, Object key,
Object callbackArgument, boolean processedMarker, EventID eventID, VersionTag versionTag)
throws EntryNotFoundException {
if (!isCacheContentProxy()) {
concurrencyConfigurationCheck(versionTag);
// Create an ... | void function(DistributedMember serverId, Object key, Object callbackArgument, boolean processedMarker, EventID eventID, VersionTag versionTag) throws EntryNotFoundException { if (!isCacheContentProxy()) { concurrencyConfigurationCheck(versionTag); EntryEventImpl event = EntryEventImpl.create(this, Operation.INVALIDATE... | /**
* Perform an invalidate in a bridge client. The op is from the bridge server and should not be
* distributed back to it.
*/ | Perform an invalidate in a bridge client. The op is from the bridge server and should not be distributed back to it | basicBridgeClientInvalidate | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java",
"license": "apache-2.0",
"size": 428144
} | [
"org.apache.geode.cache.EntryNotFoundException",
"org.apache.geode.cache.Operation",
"org.apache.geode.distributed.DistributedMember",
"org.apache.geode.internal.cache.versions.ConcurrentCacheModificationException",
"org.apache.geode.internal.cache.versions.VersionTag"
] | import org.apache.geode.cache.EntryNotFoundException; import org.apache.geode.cache.Operation; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.internal.cache.versions.ConcurrentCacheModificationException; import org.apache.geode.internal.cache.versions.VersionTag; | import org.apache.geode.cache.*; import org.apache.geode.distributed.*; import org.apache.geode.internal.cache.versions.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,883,700 |
public void setGrids(final Collection<Grid> grids) {
this.grids = grids;
changeSupport.fireChange();
} | void function(final Collection<Grid> grids) { this.grids = grids; changeSupport.fireChange(); } | /**
* DOCUMENT ME!
*
* @param grids DOCUMENT ME!
*/ | DOCUMENT ME | setGrids | {
"repo_name": "cismet/cids-custom-sudplan",
"path": "src/main/java/de/cismet/cids/custom/sudplan/airquality/emissionupload/EmissionUploadPanelGrids.java",
"license": "lgpl-3.0",
"size": 9547
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 456,608 |
public Writer getWriter()
{
return this.writer;
}
/**
* {@inheritDoc} | Writer function() { return this.writer; } /** * {@inheritDoc} | /**
* Getter for the underlying writer
* @return the writer
*/ | Getter for the underlying writer | getWriter | {
"repo_name": "cgd/java-util",
"path": "src/java/org/jax/util/io/FlatFileWriter.java",
"license": "gpl-3.0",
"size": 5522
} | [
"java.io.Writer"
] | import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 1,462,699 |
protected int findInflateIndexAtStatement(int index, Expression expression)
{
int foundIndex = -1;
if (expression instanceof MethodInvocation)
{
MethodInvocation inflateInvocation = (MethodInvocation) expression;
if ((inflateInvocation.getName() != null)
... | int function(int index, Expression expression) { int foundIndex = -1; if (expression instanceof MethodInvocation) { MethodInvocation inflateInvocation = (MethodInvocation) expression; if ((inflateInvocation.getName() != null) && inflateInvocation.getName().getIdentifier().equals(STR)) { foundIndex = index; } } return f... | /**
* Returns the index of the inflate invocation
* @param index
* @param expression
*/ | Returns the index of the inflate invocation | findInflateIndexAtStatement | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/android.codeutils/src/com/motorola/studio/android/generatecode/AbstractCodeGenerator.java",
"license": "gpl-2.0",
"size": 26405
} | [
"org.eclipse.jdt.core.dom.Expression",
"org.eclipse.jdt.core.dom.MethodInvocation"
] | import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.MethodInvocation; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 1,407,586 |
public static Collection getStatistics() {
ArrayList c;
synchronized (list) {
c = (ArrayList) list.clone();
}
Collections.sort(c);
return c;
} | static Collection function() { ArrayList c; synchronized (list) { c = (ArrayList) list.clone(); } Collections.sort(c); return c; } | /**
* Return a sorted copy of the statistics table
*
* @return a copy of the Collection containing the sorted StatisticsItems
*/ | Return a sorted copy of the statistics table | getStatistics | {
"repo_name": "cdegroot/river",
"path": "qa/src/com/sun/jini/test/impl/end2end/jssewrapper/Statistics.java",
"license": "apache-2.0",
"size": 5417
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,500,456 |
@Override
public void close() throws IOException {
super.close();
if (this.noChecksumFs != fs) {
this.noChecksumFs.close();
}
} | void function() throws IOException { super.close(); if (this.noChecksumFs != fs) { this.noChecksumFs.close(); } } | /**
* Close this filesystem object
*/ | Close this filesystem object | close | {
"repo_name": "Eshcar/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java",
"license": "apache-2.0",
"size": 18872
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,439,968 |
//-----------------------------------------------------------------------
public MetaProperty<String> script() {
return _script;
} | MetaProperty<String> function() { return _script; } | /**
* The meta-property for the {@code script} property.
* @return the meta-property, not null
*/ | The meta-property for the script property | script | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Integration/src/main/java/com/opengamma/integration/marketdata/manipulator/dsl/ScenarioDslParameters.java",
"license": "apache-2.0",
"size": 10949
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 352,516 |
private void paintPath(Graphics2D g2d, int x, int y)
{
List<WeightedPoint> path = pf.getPath(pf.getCursor());
WeightedPoint prev = null;
g2d.setColor(colorScheme.path);
for (WeightedPoint wp : path)
{
if (prev != null)
{
g2d.drawLin... | void function(Graphics2D g2d, int x, int y) { List<WeightedPoint> path = pf.getPath(pf.getCursor()); WeightedPoint prev = null; g2d.setColor(colorScheme.path); for (WeightedPoint wp : path) { if (prev != null) { g2d.drawLine(x + getAxisLabelOffset() + wp.getCol() * tileWidth + tileWidth / 2, y + getAxisLabelOffset() + ... | /**
* Draw the path being tested as the algorithm runs or the final path after the algorithm has finished
*
* @param g2d
* @param x the X coordinate of the upper left corner of the tilemap
* @param y the Y coordinate of the upper left corner of the tilemap
*/ | Draw the path being tested as the algorithm runs or the final path after the algorithm has finished | paintPath | {
"repo_name": "ClickerMonkey/AStarGazer",
"path": "src/astargazer/gui/MapPanel.java",
"license": "unlicense",
"size": 17731
} | [
"java.awt.Graphics2D",
"java.util.List"
] | import java.awt.Graphics2D; import java.util.List; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,820,167 |
@SimpleProperty(category = PropertyCategory.BEHAVIOR)
public YailList Elements() {
return items;
} | @SimpleProperty(category = PropertyCategory.BEHAVIOR) YailList function() { return items; } | /**
* Elements property getter method
*
* @return a YailList representing the list of strings to be picked from
*/ | Elements property getter method | Elements | {
"repo_name": "kidebit/AudioBlurp",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/ListPicker.java",
"license": "apache-2.0",
"size": 10024
} | [
"com.google.appinventor.components.annotations.PropertyCategory",
"com.google.appinventor.components.annotations.SimpleProperty",
"com.google.appinventor.components.runtime.util.YailList"
] | import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty; import com.google.appinventor.components.runtime.util.YailList; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 901,978 |
private void manageDefaultStyleSheet(final Scene scene) {
if (scene.getStylesheets().isEmpty()) {
// No style sheet has been added to the scene
LOGGER.log(NO_CSS_DEFINED);
addCSS(scene, JRebirthStyles.DEFAULT);
}
} | void function(final Scene scene) { if (scene.getStylesheets().isEmpty()) { LOGGER.log(NO_CSS_DEFINED); addCSS(scene, JRebirthStyles.DEFAULT); } } | /**
* Attach default CSS file if none have been previously attached.
*
* @param scene the scene to check
*/ | Attach default CSS file if none have been previously attached | manageDefaultStyleSheet | {
"repo_name": "JRebirth/JRebirth",
"path": "org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/application/AbstractApplication.java",
"license": "apache-2.0",
"size": 24073
} | [
"org.jrebirth.af.core.resource.provided.JRebirthStyles"
] | import org.jrebirth.af.core.resource.provided.JRebirthStyles; | import org.jrebirth.af.core.resource.provided.*; | [
"org.jrebirth.af"
] | org.jrebirth.af; | 2,460,890 |
public JingleActionEnum getAction() {
return action;
} | JingleActionEnum function() { return action; } | /**
* Get the action specified in the packet.
*
* @return the action
*/ | Get the action specified in the packet | getAction | {
"repo_name": "deeringc/Smack",
"path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java",
"license": "apache-2.0",
"size": 10106
} | [
"org.jivesoftware.smackx.jingleold.JingleActionEnum"
] | import org.jivesoftware.smackx.jingleold.JingleActionEnum; | import org.jivesoftware.smackx.jingleold.*; | [
"org.jivesoftware.smackx"
] | org.jivesoftware.smackx; | 475,346 |
private void updateHardware(Cm11aAbstractHandler nextModule) throws InterruptedException {
boolean success = false;
while (!success) {
try {
if (connect()) {
nextModule.updateHardware(this);
success = true;
} else {
... | void function(Cm11aAbstractHandler nextModule) throws InterruptedException { boolean success = false; while (!success) { try { if (connect()) { nextModule.updateHardware(this); success = true; } else { Thread.sleep(IO_RECONNECT_INTERVAL); } } catch (IOException e) { connected = false; String message = STR; logger.warn(... | /**
* Perform Hardware update. Keep trying until it is successful
*
* @param nextModule - Next module that needs to be updated
* @throws InterruptedException
*/ | Perform Hardware update. Keep trying until it is successful | updateHardware | {
"repo_name": "johannrichard/openhab2-addons",
"path": "addons/binding/org.openhab.binding.cm11a/src/main/java/org/openhab/binding/cm11a/internal/X10Interface.java",
"license": "epl-1.0",
"size": 33797
} | [
"java.io.IOException",
"org.openhab.binding.cm11a.handler.Cm11aAbstractHandler"
] | import java.io.IOException; import org.openhab.binding.cm11a.handler.Cm11aAbstractHandler; | import java.io.*; import org.openhab.binding.cm11a.handler.*; | [
"java.io",
"org.openhab.binding"
] | java.io; org.openhab.binding; | 2,149,147 |
public List<TaskCategory> getListTaskCategory() {
return listTaskCategory;
} | List<TaskCategory> function() { return listTaskCategory; } | /**
* Gets the list task category.
*
* @return the list task category
*/ | Gets the list task category | getListTaskCategory | {
"repo_name": "uaijug/chronos",
"path": "src/main/java/br/com/uaijug/chronos/project/task/controller/TaskController.java",
"license": "gpl-3.0",
"size": 8425
} | [
"br.com.uaijug.chronos.project.task.model.TaskCategory",
"java.util.List"
] | import br.com.uaijug.chronos.project.task.model.TaskCategory; import java.util.List; | import br.com.uaijug.chronos.project.task.model.*; import java.util.*; | [
"br.com.uaijug",
"java.util"
] | br.com.uaijug; java.util; | 2,441,649 |
Observable<HostNameBinding> getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName); | Observable<HostNameBinding> getHostNameBindingSlotAsync(String resourceGroupName, String name, String slot, String hostName); | /**
* Get the named hostname binding for an app (or deployment slot, if specified).
* Description for Get the named hostname binding for an app (or deployment slot, if specified).
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the ap... | Get the named hostname binding for an app (or deployment slot, if specified). Description for Get the named hostname binding for an app (or deployment slot, if specified) | getHostNameBindingSlotAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebApps.java",
"license": "mit",
"size": 242740
} | [
"com.microsoft.azure.management.appservice.v2019_08_01.HostNameBinding"
] | import com.microsoft.azure.management.appservice.v2019_08_01.HostNameBinding; | import com.microsoft.azure.management.appservice.v2019_08_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 665,504 |
default boolean isComplete() {
return getStatus().equals(Status.COMPLETE);
}
default void updateParameters(Map<String, String> parameters) { } | default boolean isComplete() { return getStatus().equals(Status.COMPLETE); } default void updateParameters(Map<String, String> parameters) { } | /**
* Indicates whether this Element is complete.
*/ | Indicates whether this Element is complete | isComplete | {
"repo_name": "adragomir/dcos-commons",
"path": "sdk/scheduler/src/main/java/com/mesosphere/sdk/scheduler/plan/Element.java",
"license": "apache-2.0",
"size": 2716
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,885,623 |
private static Context createRemoteContextFromPackageName(
Context appContext, String implPackageName)
throws PackageManager.NameNotFoundException, ReflectiveOperationException {
// Load the code for the target package.
Context remoteContext = appContext.createPackageContext(... | static Context function( Context appContext, String implPackageName) throws PackageManager.NameNotFoundException, ReflectiveOperationException { Context remoteContext = appContext.createPackageContext( implPackageName, Context.CONTEXT_IGNORE_SECURITY Context.CONTEXT_INCLUDE_CODE); PackageInfo implPackageInfo = appConte... | /**
* Creates a Context for the remote (weblayer implementation) side
* using a specified package name as the implementation. This is only
* intended for testing, not production use.
*/ | Creates a Context for the remote (weblayer implementation) side using a specified package name as the implementation. This is only intended for testing, not production use | createRemoteContextFromPackageName | {
"repo_name": "endlessm/chromium-browser",
"path": "weblayer/public/java/org/chromium/weblayer/WebLayer.java",
"license": "bsd-3-clause",
"size": 26975
} | [
"android.content.Context",
"android.content.pm.PackageInfo",
"android.content.pm.PackageManager",
"java.lang.reflect.Field"
] | import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import java.lang.reflect.Field; | import android.content.*; import android.content.pm.*; import java.lang.reflect.*; | [
"android.content",
"java.lang"
] | android.content; java.lang; | 2,201,829 |
File getPagingLocation();
// Large Messages Properties ------------------------------------------------------------ | File getPagingLocation(); | /**
* The paging location related to artemis.instance
*/ | The paging location related to artemis.instance | getPagingLocation | {
"repo_name": "okalmanRH/jboss-activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java",
"license": "apache-2.0",
"size": 36647
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 805,846 |
@Override
public void setClassPathEntries(List<IRuntimeClasspathEntry> libraries) {
if (isDirty()) {
setDirty(false);
resolveDirtyFields(true);
}
if ((libraries == null && this.classPathEntries != null)
|| (libraries != null
&& (this.classPathEntries == null
|| libraries != this.classPath... | void function(List<IRuntimeClasspathEntry> libraries) { if (isDirty()) { setDirty(false); resolveDirtyFields(true); } if ((libraries == null && this.classPathEntries != null) (libraries != null && (this.classPathEntries == null libraries != this.classPathEntries))) { final PropertyChangeEvent event = new PropertyChange... | /**
* Change the library locations of this ISREInstall.
*
* @param libraries - The library locations of this ISREInstall.
* Must not be <code>null</code>.
*/ | Change the library locations of this ISREInstall | setClassPathEntries | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/AbstractSREInstall.java",
"license": "apache-2.0",
"size": 13680
} | [
"java.util.List",
"org.eclipse.jdt.launching.IRuntimeClasspathEntry",
"org.eclipse.jdt.launching.PropertyChangeEvent"
] | import java.util.List; import org.eclipse.jdt.launching.IRuntimeClasspathEntry; import org.eclipse.jdt.launching.PropertyChangeEvent; | import java.util.*; import org.eclipse.jdt.launching.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 850,305 |
public Point2DArray getPoints()
{
return getAttributes().getPoints();
}
/**
* Sets the end-points of this arrow. The points should be a 2-element {@link Point2DArray} | Point2DArray function() { return getAttributes().getPoints(); } /** * Sets the end-points of this arrow. The points should be a 2-element {@link Point2DArray} | /**
* Gets the end-points of this arrow.
* Point[0] is the start point and point[1] is the end point.
*
* @return Point2DArray
*/ | Gets the end-points of this arrow. Point[0] is the start point and point[1] is the end point | getPoints | {
"repo_name": "Josephblt/lienzo-core",
"path": "src/main/java/com/ait/lienzo/client/core/shape/Arrow.java",
"license": "apache-2.0",
"size": 15290
} | [
"com.ait.lienzo.client.core.types.Point2DArray"
] | import com.ait.lienzo.client.core.types.Point2DArray; | import com.ait.lienzo.client.core.types.*; | [
"com.ait.lienzo"
] | com.ait.lienzo; | 2,208,434 |
private void createLogInContent(ElementContainer ec, String errorMessage)
{
Div loginDiv = new Div();
loginDiv.setID("lesson_login");
Table table = new Table();
// table.setStyle(tableStyle);
table.addAttribute("align='center'", 0);
TR tr1 = new TR();
TD ... | void function(ElementContainer ec, String errorMessage) { Div loginDiv = new Div(); loginDiv.setID(STR); Table table = new Table(); table.addAttribute(STR, 0); TR tr1 = new TR(); TD td1 = new TD(); TD td2 = new TD(); td1.addElement(new StringElement(STR)); td2.addElement(new Input(Input.TEXT, USER)); tr1.addElement(td1... | /**
* Create content for logging in
*
* @param ec
*/ | Create content for logging in | createLogInContent | {
"repo_name": "RIGS-IT/sonar-xanitizer",
"path": "src/test/resources/webgoat/plugin_extracted/session-fixation-1.0/org/owasp/webgoat/plugin/SessionFixation.java",
"license": "apache-2.0",
"size": 23133
} | [
"org.apache.ecs.ElementContainer",
"org.apache.ecs.StringElement",
"org.apache.ecs.html.Div",
"org.apache.ecs.html.Input",
"org.apache.ecs.html.Table"
] | import org.apache.ecs.ElementContainer; import org.apache.ecs.StringElement; import org.apache.ecs.html.Div; import org.apache.ecs.html.Input; import org.apache.ecs.html.Table; | import org.apache.ecs.*; import org.apache.ecs.html.*; | [
"org.apache.ecs"
] | org.apache.ecs; | 510,398 |
public String setResponseBase64(
String requestPath, String base64EncodedResponse,
List<Pair<String, String>> responseHeaders) {
return setResponseInternal(
requestPath, Base64.decode(base64EncodedResponse, Base64.DEFAULT),
responseHeaders, null, RESPO... | String function( String requestPath, String base64EncodedResponse, List<Pair<String, String>> responseHeaders) { return setResponseInternal( requestPath, Base64.decode(base64EncodedResponse, Base64.DEFAULT), responseHeaders, null, RESPONSE_STATUS_NORMAL); } | /**
* Sets a base64 encoded response to be returned when a particular request path is passed
* in (with the option to specify additional headers).
*
* @param requestPath The path to respond to.
* @param base64EncodedResponse The response body that is base64 encoded. The actual server
* ... | Sets a base64 encoded response to be returned when a particular request path is passed in (with the option to specify additional headers) | setResponseBase64 | {
"repo_name": "androidarmv6/android_external_chromium_org",
"path": "net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java",
"license": "bsd-3-clause",
"size": 24368
} | [
"android.util.Base64",
"android.util.Pair",
"java.util.List"
] | import android.util.Base64; import android.util.Pair; import java.util.List; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 1,745,969 |
public void stopMonitorService() {
if (!isMonitorServiceStarted()) {
log.infoStoppedAlready();
return; // we are already stopped
}
log.infoStopping();
AtomicReference<Throwable> error = new AtomicReference<>(null); // will hold the first error we encountere... | void function() { if (!isMonitorServiceStarted()) { log.infoStoppedAlready(); return; } log.infoStopping(); AtomicReference<Throwable> error = new AtomicReference<>(null); try { try { if (feedComm != null) { feedComm.destroy(); feedComm = null; } } catch (Throwable t) { error.compareAndSet(null, t); log.debug(STR, t); ... | /**
* Stops this service. If the service is already stopped, this method is a no-op.
*/ | Stops this service. If the service is already stopped, this method is a no-op | stopMonitorService | {
"repo_name": "jmazzitelli/hawkular-agent",
"path": "hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/service/MonitorService.java",
"license": "apache-2.0",
"size": 49021
} | [
"java.util.List",
"java.util.Map",
"java.util.concurrent.atomic.AtomicReference",
"org.hawkular.agent.monitor.inventory.AvailType",
"org.hawkular.agent.monitor.inventory.MeasurementInstance",
"org.hawkular.agent.monitor.protocol.EndpointService"
] | import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; import org.hawkular.agent.monitor.inventory.AvailType; import org.hawkular.agent.monitor.inventory.MeasurementInstance; import org.hawkular.agent.monitor.protocol.EndpointService; | import java.util.*; import java.util.concurrent.atomic.*; import org.hawkular.agent.monitor.inventory.*; import org.hawkular.agent.monitor.protocol.*; | [
"java.util",
"org.hawkular.agent"
] | java.util; org.hawkular.agent; | 441,931 |
@Test
public void testRun() {
System.out.println("run");
TestProcessTask task = new TestProcessTask();
Queue instance = new Queue(new TestDataInitializer(task),new TestCallable(),new TestProgressElementGroup(),"", new PersistenceProvider());
instance.run();
Assert.assertT... | void function() { System.out.println("run"); TestProcessTask task = new TestProcessTask(); Queue instance = new Queue(new TestDataInitializer(task),new TestCallable(),new TestProgressElementGroup(),STRtask was not run",task.done); } private class TestCallable implements Callable { | /**
* Test of run method, of class Queue.
*/ | Test of run method, of class Queue | testRun | {
"repo_name": "Idrinths-Stellaris-Mods/Mod-Tools",
"path": "src/test/java/de/idrinth/stellaris/modtools/process/QueueTest.java",
"license": "gpl-3.0",
"size": 3391
} | [
"java.util.concurrent.Callable"
] | import java.util.concurrent.Callable; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,778,235 |
public final void setLognormalVol(final Double vol) {
Validate.isTrue(vol > 0.0 || CompareUtils.closeEquals(vol, 0.0), "Cannot set vol to be negative.");
_lognormalVol = vol;
} | final void function(final Double vol) { Validate.isTrue(vol > 0.0 CompareUtils.closeEquals(vol, 0.0), STR); _lognormalVol = vol; } | /**
* Sets the vol.
* @param vol the vol
*/ | Sets the vol | setLognormalVol | {
"repo_name": "charles-cooper/idylfin",
"path": "src/com/opengamma/analytics/financial/model/volatility/BlackFormula.java",
"license": "apache-2.0",
"size": 9743
} | [
"com.opengamma.util.CompareUtils",
"org.apache.commons.lang.Validate"
] | import com.opengamma.util.CompareUtils; import org.apache.commons.lang.Validate; | import com.opengamma.util.*; import org.apache.commons.lang.*; | [
"com.opengamma.util",
"org.apache.commons"
] | com.opengamma.util; org.apache.commons; | 723,781 |
public static String getRequiredStringProperty(Properties properties, String name) throws MissingPropertyException {
String text = properties.getProperty(name);
if (text == null) {
throw new MissingPropertyException(name);
}
return text;
}
| static String function(Properties properties, String name) throws MissingPropertyException { String text = properties.getProperty(name); if (text == null) { throw new MissingPropertyException(name); } return text; } | /**
* Returns the value of a mandatory string property.
*
* @param properties the properties containing the entry
* @param name the name of the property to be returned
* @return the value of a mandatory string property
* @throws ExtendedProperties.MissingPropertyException if the... | Returns the value of a mandatory string property | getRequiredStringProperty | {
"repo_name": "giuseppegallo/YAJSL",
"path": "src/YAJSL/Utils/ExtendedProperties.java",
"license": "mit",
"size": 41820
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 746,563 |
FeatureMap getAny();
| FeatureMap getAny(); | /**
* Returns the value of the '<em><b>Any</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Any</em>' attribute list.
* @see eu.hohenegger.xsd.pom.PomPackage#... | Returns the value of the 'Any' attribute list. The list contents are of type <code>org.eclipse.emf.ecore.util.FeatureMap.Entry</code>. | getAny | {
"repo_name": "Treehopper/EclipseAugments",
"path": "pom-editor/eu.hohenegger.xsd.pom/src-gen/eu/hohenegger/xsd/pom/GoalsType.java",
"license": "epl-1.0",
"size": 1210
} | [
"org.eclipse.emf.ecore.util.FeatureMap"
] | import org.eclipse.emf.ecore.util.FeatureMap; | import org.eclipse.emf.ecore.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,147,447 |
@Override
void layout(int delta, boolean animate) {
int childrenLeft = mSpinnerPadding.left;
int childrenWidth = mRight - mLeft - mSpinnerPadding.left - mSpinnerPadding.right;
if (mDataChanged) {
handleDataChanged();
}
// Handle the empty set by removing all... | void layout(int delta, boolean animate) { int childrenLeft = mSpinnerPadding.left; int childrenWidth = mRight - mLeft - mSpinnerPadding.left - mSpinnerPadding.right; if (mDataChanged) { handleDataChanged(); } if (mItemCount == 0) { resetList(); return; } if (mNextSelectedPosition >= 0) { setSelectedPositionInt(mNextSel... | /**
* Creates and positions all views for this Spinner.
*
* @param delta Change in the selected position. +1 moves selection is moving to the right,
* so views are scrolling to the left. -1 means selection is moving to the left.
*/ | Creates and positions all views for this Spinner | layout | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/widget/Spinner.java",
"license": "gpl-3.0",
"size": 11786
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,186,888 |
public static void setAppName(final String appName)
{
if (StringUtils.isNotEmpty(appName) && StringUtils.isEmpty(instance.appName))
{
instance.appName = appName;
} else
{
throw new RuntimeException("You cannot set the app name twice or with an empty string... | static void function(final String appName) { if (StringUtils.isNotEmpty(appName) && StringUtils.isEmpty(instance.appName)) { instance.appName = appName; } else { throw new RuntimeException(STR); } } | /**
* Sets the application name and this name cannot be changed (meaning it can only be set once).
* @param appName the application name (it is best if it doesn't have a space in the middle)
*/ | Sets the application name and this name cannot be changed (meaning it can only be set once) | setAppName | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/ui/UIRegistry.java",
"license": "gpl-2.0",
"size": 98859
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,424,944 |
public static Template getTemplate(String templateLocation)
{
try
{
Template templateFile = getFreemarkerConfig().getTemplate(templateLocation);
return templateFile;
}
catch (IOException ioEx)
{
throw new RuntimeException(ioEx);
}
} | static Template function(String templateLocation) { try { Template templateFile = getFreemarkerConfig().getTemplate(templateLocation); return templateFile; } catch (IOException ioEx) { throw new RuntimeException(ioEx); } } | /**
* Provides a {@link Template} representation of a Freemarker template present at a specified location.
*
* @param templateLocation The location of the template relative to the classpath
* @return The Freemarker {@link Template} instance for the specified location
*/ | Provides a <code>Template</code> representation of a Freemarker template present at a specified location | getTemplate | {
"repo_name": "forge/core",
"path": "javaee/scaffold-faces/src/main/java/org/jboss/forge/addon/scaffold/faces/freemarker/FreemarkerTemplateProcessor.java",
"license": "epl-1.0",
"size": 3391
} | [
"freemarker.template.Template",
"java.io.IOException"
] | import freemarker.template.Template; import java.io.IOException; | import freemarker.template.*; import java.io.*; | [
"freemarker.template",
"java.io"
] | freemarker.template; java.io; | 762,639 |
private boolean dispatchDrawUsingBitmap(Canvas canvas) {
Bitmap unmaskBitmap = tryObtainRenderUnmaskBitmap();
Bitmap maskBitmap = tryObtainRenderMaskBitmap();
if (unmaskBitmap == null || maskBitmap == null) {
return false;
}
// First draw a desaturated version
... | boolean function(Canvas canvas) { Bitmap unmaskBitmap = tryObtainRenderUnmaskBitmap(); Bitmap maskBitmap = tryObtainRenderMaskBitmap(); if (unmaskBitmap == null maskBitmap == null) { return false; } drawUnmasked(new Canvas(unmaskBitmap)); canvas.drawBitmap(unmaskBitmap, 0, 0, mAlphaPaint); drawMasked(new Canvas(maskBit... | /**
* Draws and masks the children using a Bitmap.
*
* @param canvas Canvas that the masked children will end up being drawn to.
*/ | Draws and masks the children using a Bitmap | dispatchDrawUsingBitmap | {
"repo_name": "chenshuais/Cloud-Hicc",
"path": "app/src/main/java/com/hicc/cloud/teacher/view/ShimmerFrameLayout.java",
"license": "apache-2.0",
"size": 33229
} | [
"android.graphics.Bitmap",
"android.graphics.Canvas"
] | import android.graphics.Bitmap; import android.graphics.Canvas; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,325,720 |
byte[] load(String key) throws FileNotFoundException; | byte[] load(String key) throws FileNotFoundException; | /**
* Loads the keySetId.
*
* @param key - key for the keySetId.
* @return - the keySetId to the drm.
* @throws FileNotFoundException - thrown when the keySetId could not be found with specified key.
*/ | Loads the keySetId | load | {
"repo_name": "kaltura/playkit-android",
"path": "playkit/src/main/java/com/kaltura/playkit/LocalDataStore.java",
"license": "agpl-3.0",
"size": 1359
} | [
"java.io.FileNotFoundException"
] | import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 1,188,994 |
public void setNextStructureId(CmsUUID cmsUUID) {
m_nextStructureId = cmsUUID;
} | void function(CmsUUID cmsUUID) { m_nextStructureId = cmsUUID; } | /**
* Sets the next structure id (if not set, it will be automatically generated).<p>
*
* @param cmsUUID the next structure id
*/ | Sets the next structure id (if not set, it will be automatically generated) | setNextStructureId | {
"repo_name": "alkacon/opencms-core",
"path": "test/org/opencms/module/CmsTestModuleBuilder.java",
"license": "lgpl-2.1",
"size": 17087
} | [
"org.opencms.util.CmsUUID"
] | import org.opencms.util.CmsUUID; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 322,396 |
public java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.MultisetSortHLAPI> getInput_terms_MultisetSortHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.MultisetSortHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.terms.hlapi.MultisetSortHLAPI>();
for (Sort elemnt : getInput()) {
if(elemnt.g... | java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.MultisetSortHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.MultisetSortHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.terms.hlapi.MultisetSortHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.terms.... | /**
* This accessor return a list of encapsulated subelement, only of MultisetSortHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of MultisetSortHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_terms_MultisetSortHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/LessThanOrEqualHLAPI.java",
"license": "epl-1.0",
"size": 108879
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 914,937 |
public Object replaceElements(
Object original,
Object target,
CollectionPersister persister,
Object owner,
Map copyCache,
SessionImplementor session)
throws HibernateException; | Object function( Object original, Object target, CollectionPersister persister, Object owner, Map copyCache, SessionImplementor session) throws HibernateException; | /**
* Replace the elements of a collection with the elements of another collection
*/ | Replace the elements of a collection with the elements of another collection | replaceElements | {
"repo_name": "renmeng8875/projects",
"path": "Hibernate-source/源代码及重要说明/Hibernate相关资料/hibernate-3.2.0.ga/hibernate-3.2/src/org/hibernate/usertype/UserCollectionType.java",
"license": "apache-2.0",
"size": 2239
} | [
"java.util.Map",
"org.hibernate.HibernateException",
"org.hibernate.engine.SessionImplementor",
"org.hibernate.persister.collection.CollectionPersister"
] | import java.util.Map; import org.hibernate.HibernateException; import org.hibernate.engine.SessionImplementor; import org.hibernate.persister.collection.CollectionPersister; | import java.util.*; import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.persister.collection.*; | [
"java.util",
"org.hibernate",
"org.hibernate.engine",
"org.hibernate.persister"
] | java.util; org.hibernate; org.hibernate.engine; org.hibernate.persister; | 837,176 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Association.class)) {
case UmlPackage.ASSOCIATION__NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
su... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Association.class)) { case UmlPackage.ASSOCIATION__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "TemenosDS/LearningSirius",
"path": "com.temenos.ds.learnsirius.uml.edit/src/com/temenos/ds/learnsirius/uml/provider/AssociationItemProvider.java",
"license": "epl-1.0",
"size": 5287
} | [
"com.temenos.ds.learnsirius.uml.Association",
"com.temenos.ds.learnsirius.uml.UmlPackage",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import com.temenos.ds.learnsirius.uml.Association; import com.temenos.ds.learnsirius.uml.UmlPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import com.temenos.ds.learnsirius.uml.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"com.temenos.ds",
"org.eclipse.emf"
] | com.temenos.ds; org.eclipse.emf; | 1,115,022 |
protected void writeToXml(EwsServiceXmlWriter writer)
throws XMLStreamException, ServiceXmlSerializationException {
writer
.writeStartElement(XmlNamespace.Messages,
XmlElementNames.GroupBy);
writer.writeAttributeValue(XmlAttributeNames.Order, this.sortDirection);
this.groupOn.wr... | void function(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException { writer .writeStartElement(XmlNamespace.Messages, XmlElementNames.GroupBy); writer.writeAttributeValue(XmlAttributeNames.Order, this.sortDirection); this.groupOn.writeToXml(writer); writer.writeStartElement(XmlNamespa... | /**
* Writes to XML.
*
* @param writer the writer
* @throws XMLStreamException the XML stream exception
* @throws ServiceXmlSerializationException the service xml serialization exception
*/ | Writes to XML | writeToXml | {
"repo_name": "KatharineYe/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/search/Grouping.java",
"license": "mit",
"size": 6308
} | [
"javax.xml.stream.XMLStreamException"
] | import javax.xml.stream.XMLStreamException; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 98,646 |
public void setAppointmentRequestedCsfFteQuantity(BigDecimal appointmentRequestedCsfFteQuantity) {
this.appointmentRequestedCsfFteQuantity = appointmentRequestedCsfFteQuantity;
} | void function(BigDecimal appointmentRequestedCsfFteQuantity) { this.appointmentRequestedCsfFteQuantity = appointmentRequestedCsfFteQuantity; } | /**
* Sets the appointmentRequestedCsfFteQuantity attribute.
*
* @param appointmentRequestedCsfFteQuantity The appointmentRequestedCsfFteQuantity to set.
*/ | Sets the appointmentRequestedCsfFteQuantity attribute | setAppointmentRequestedCsfFteQuantity | {
"repo_name": "quikkian-ua-devops/kfs",
"path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/PendingBudgetConstructionAppointmentFunding.java",
"license": "agpl-3.0",
"size": 35064
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,823,803 |
@Test
public void testGetProfileForCurrentUser() {
Person profile = client.getProfileForCurrentUser();
assertNotNull("Profile should never be null.", profile);
}
| void function() { Person profile = client.getProfileForCurrentUser(); assertNotNull(STR, profile); } | /**
* Test method for {@link com.google.code.linkedinapi.client.impl.LinkedInApiJaxbClient#getProfileForCurrentUser()}.
*/ | Test method for <code>com.google.code.linkedinapi.client.impl.LinkedInApiJaxbClient#getProfileForCurrentUser()</code> | testGetProfileForCurrentUser | {
"repo_name": "shisoft/LinkedIn-J",
"path": "core/src/test/java/com/google/code/linkedinapi/client/LinkedInApiClientTest.java",
"license": "apache-2.0",
"size": 36077
} | [
"com.google.code.linkedinapi.schema.Person"
] | import com.google.code.linkedinapi.schema.Person; | import com.google.code.linkedinapi.schema.*; | [
"com.google.code"
] | com.google.code; | 1,616,448 |
@Nonnull
public CoreMatrix4f store3f(@Nonnull final FloatBuffer buffer) {
buffer.put(m00);
buffer.put(m01);
buffer.put(m02);
buffer.put(m10);
buffer.put(m11);
buffer.put(m12);
buffer.put(m20);
buffer.put(m21);
buffer.put(m22);
return this;
} | CoreMatrix4f function(@Nonnull final FloatBuffer buffer) { buffer.put(m00); buffer.put(m01); buffer.put(m02); buffer.put(m10); buffer.put(m11); buffer.put(m12); buffer.put(m20); buffer.put(m21); buffer.put(m22); return this; } | /**
* Stores the rotation portion of this matrix in a {@link java.nio.FloatBuffer}. The matrix is stored in column major
* (OpenGL) order.
*
* @return This matrix.
*/ | Stores the rotation portion of this matrix in a <code>java.nio.FloatBuffer</code>. The matrix is stored in column major (OpenGL) order | store3f | {
"repo_name": "gouessej/nifty-gui",
"path": "nifty-core/src/main/java/de/lessvoid/nifty/batch/spi/core/CoreMatrix4f.java",
"license": "bsd-2-clause",
"size": 24533
} | [
"java.nio.FloatBuffer",
"javax.annotation.Nonnull"
] | import java.nio.FloatBuffer; import javax.annotation.Nonnull; | import java.nio.*; import javax.annotation.*; | [
"java.nio",
"javax.annotation"
] | java.nio; javax.annotation; | 1,248,337 |
ReplicationMetricList getReplicationMetrics(GetReplicationMetricsRequest replicationMetricsRequest); | ReplicationMetricList getReplicationMetrics(GetReplicationMetricsRequest replicationMetricsRequest); | /**
* Gets the replication metrics and progress info.
* @param replicationMetricsRequest
*/ | Gets the replication metrics and progress info | getReplicationMetrics | {
"repo_name": "lirui-apache/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java",
"license": "apache-2.0",
"size": 94780
} | [
"org.apache.hadoop.hive.metastore.api.GetReplicationMetricsRequest",
"org.apache.hadoop.hive.metastore.api.ReplicationMetricList"
] | import org.apache.hadoop.hive.metastore.api.GetReplicationMetricsRequest; import org.apache.hadoop.hive.metastore.api.ReplicationMetricList; | import org.apache.hadoop.hive.metastore.api.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,483,187 |
private List<SlotPair> getSlotPairs(Slot slot) {
Map<Slot, List<SlotPair>> slotMap = compiledInterSlotTrafficMap.get(slot.getTopology().getTopologyID());
if (slotMap == null) {
slotMap = new HashMap<Slot, List<SlotPair>>();
compiledInterSlotTrafficMap.put(slot.getTopology().getTopologyID(), slotMap);
}
... | List<SlotPair> function(Slot slot) { Map<Slot, List<SlotPair>> slotMap = compiledInterSlotTrafficMap.get(slot.getTopology().getTopologyID()); if (slotMap == null) { slotMap = new HashMap<Slot, List<SlotPair>>(); compiledInterSlotTrafficMap.put(slot.getTopology().getTopologyID(), slotMap); } List<SlotPair> slotPairList ... | /**
* useful helper method to fill in compiledInterSlotTrafficMap; only called by compileInterSlotTraffic()
* @param slot
* @return the list of slot pairs communicating with the given slot
*/ | useful helper method to fill in compiledInterSlotTrafficMap; only called by compileInterSlotTraffic() | getSlotPairs | {
"repo_name": "leonardoaniello/storm-adaptive-schedulers",
"path": "src/storm/scheduler/TrafficManager.java",
"license": "epl-1.0",
"size": 16061
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,944,462 |
public static NabuccoPropertyDescriptor getPropertyDescriptor(String propertyName) {
return PropertyCache.getInstance().retrieve(TraceMsg.class).getProperty(propertyName);
}
| static NabuccoPropertyDescriptor function(String propertyName) { return PropertyCache.getInstance().retrieve(TraceMsg.class).getProperty(propertyName); } | /**
* Getter for the PropertyDescriptor.
*
* @param propertyName the String.
* @return the NabuccoPropertyDescriptor.
*/ | Getter for the PropertyDescriptor | getPropertyDescriptor | {
"repo_name": "NABUCCO/org.nabucco.testautomation.result",
"path": "org.nabucco.testautomation.result.facade.message/src/main/gen/org/nabucco/testautomation/result/facade/message/TraceMsg.java",
"license": "epl-1.0",
"size": 5462
} | [
"org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor",
"org.nabucco.framework.base.facade.datatype.property.PropertyCache"
] | import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache; | import org.nabucco.framework.base.facade.datatype.property.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 222,910 |
public static ComponentLookup getInstance() {
boolean _equals = Objects.equal(ComponentLookup.instance, null);
if (_equals) {
throw new StopException();
}
return ComponentLookup.instance;
}
| static ComponentLookup function() { boolean _equals = Objects.equal(ComponentLookup.instance, null); if (_equals) { throw new StopException(); } return ComponentLookup.instance; } | /**
* Gets the single instance of ComponentLookup.
* TODO throw shutdown exception
* @return single instance of ComponentLookup
*/ | Gets the single instance of ComponentLookup. TODO throw shutdown exception | getInstance | {
"repo_name": "CymricNPG/abattle",
"path": "ABattle.Common/xtend-gen/net/npg/abattle/common/component/ComponentLookup.java",
"license": "apache-2.0",
"size": 8541
} | [
"com.google.common.base.Objects",
"net.npg.abattle.common.utils.StopException"
] | import com.google.common.base.Objects; import net.npg.abattle.common.utils.StopException; | import com.google.common.base.*; import net.npg.abattle.common.utils.*; | [
"com.google.common",
"net.npg.abattle"
] | com.google.common; net.npg.abattle; | 2,563,966 |
public List<SPKIData> getSPKIDatas(); | List<SPKIData> function(); | /**
* Get the list of SPKIData child elements.
*
* @return the list of SPKIData child elements
*/ | Get the list of SPKIData child elements | getSPKIDatas | {
"repo_name": "Safewhere/kombit-service-java",
"path": "XmlTooling/src/org/opensaml/xml/signature/KeyInfoType.java",
"license": "mit",
"size": 4404
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,403,205 |
public void serialize(String contextFile) throws FalconException {
LOG.info("Saving context to: [{}]", contextFile);
OutputStream out = null;
Path file = new Path(contextFile);
try {
FileSystem fs =
actionJobConf == null ? HadoopClientFactory.get().cre... | void function(String contextFile) throws FalconException { LOG.info(STR, contextFile); OutputStream out = null; Path file = new Path(contextFile); try { FileSystem fs = actionJobConf == null ? HadoopClientFactory.get().createProxiedFileSystem(file.toUri()) : HadoopClientFactory.get().createProxiedFileSystem(file.toUri(... | /**
* this method is invoked from with in the workflow.
*
* @param contextFile file to serialize the workflow execution metadata
* @throws org.apache.falcon.FalconException
*/ | this method is invoked from with in the workflow | serialize | {
"repo_name": "OpenPOWER-BigData/HDP-falcon",
"path": "common/src/main/java/org/apache/falcon/workflow/WorkflowExecutionContext.java",
"license": "apache-2.0",
"size": 16225
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.falcon.FalconException",
"org.apache.falcon.hadoop.HadoopClientFactory",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.json.simple.JSONValue"
] | import java.io.IOException; import java.io.OutputStream; import org.apache.falcon.FalconException; import org.apache.falcon.hadoop.HadoopClientFactory; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.json.simple.JSONValue; | import java.io.*; import org.apache.falcon.*; import org.apache.falcon.hadoop.*; import org.apache.hadoop.fs.*; import org.json.simple.*; | [
"java.io",
"org.apache.falcon",
"org.apache.hadoop",
"org.json.simple"
] | java.io; org.apache.falcon; org.apache.hadoop; org.json.simple; | 831,707 |
public static <T> Supplier<T> synchronizedSupplier(Supplier<T> delegate) {
return new ThreadSafeSupplier<T>(delegate);
}
private static class ThreadSafeSupplier<T> implements Supplier<T>, Serializable {
final Supplier<T> delegate;
ThreadSafeSupplier(Supplier<T> delegate) {
this.delegate = chec... | static <T> Supplier<T> function(Supplier<T> delegate) { return new ThreadSafeSupplier<T>(delegate); } private static class ThreadSafeSupplier<T> implements Supplier<T>, Serializable { final Supplier<T> delegate; ThreadSafeSupplier(Supplier<T> delegate) { this.delegate = checkNotNull(delegate); } | /**
* Returns a supplier whose {@code get()} method synchronizes on {@code delegate} before calling
* it, making it thread-safe.
*/ | Returns a supplier whose get() method synchronizes on delegate before calling it, making it thread-safe | synchronizedSupplier | {
"repo_name": "typetools/guava",
"path": "guava/src/com/google/common/base/Suppliers.java",
"license": "apache-2.0",
"size": 12213
} | [
"com.google.common.base.Preconditions",
"java.io.Serializable"
] | import com.google.common.base.Preconditions; import java.io.Serializable; | import com.google.common.base.*; import java.io.*; | [
"com.google.common",
"java.io"
] | com.google.common; java.io; | 757,277 |
public List<Action> getModules() {
return modules;
} | List<Action> function() { return modules; } | /**
* This method is used for getting Actions of the CompositeActionDescriptor.
*
* @return ordered set of modules of this CompositeActionDescriptor
*/ | This method is used for getting Actions of the CompositeActionDescriptor | getModules | {
"repo_name": "maieralex/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.api/src/main/java/org/eclipse/smarthome/automation/type/CompositeActionType.java",
"license": "epl-1.0",
"size": 1874
} | [
"java.util.List",
"org.eclipse.smarthome.automation.Action"
] | import java.util.List; import org.eclipse.smarthome.automation.Action; | import java.util.*; import org.eclipse.smarthome.automation.*; | [
"java.util",
"org.eclipse.smarthome"
] | java.util; org.eclipse.smarthome; | 1,681,937 |
public static String[] toLowerCaseWordArray(String text) {
if (text == null || text.length() == 0) {
return new String[0];
}
List<String> wordList = new ArrayList<>();
BreakIterator boundary = BreakIterator.getWordInstance();
boundary.setText(text);
int s... | static String[] function(String text) { if (text == null text.length() == 0) { return new String[0]; } List<String> wordList = new ArrayList<>(); BreakIterator boundary = BreakIterator.getWordInstance(); boundary.setText(text); int start = 0; for (int end = boundary.next(); end != BreakIterator.DONE; start = end, end =... | /**
* Converts a line of text into an array of lower case words using a
* BreakIterator.wordInstance().<p>
*
* This method is under the Jive Open Source Software License and was
* written by Mark Imbriaco.
*
* @param text a String of text to convert into an array of words
* @retu... | Converts a line of text into an array of lower case words using a BreakIterator.wordInstance(). This method is under the Jive Open Source Software License and was written by Mark Imbriaco | toLowerCaseWordArray | {
"repo_name": "Gugli/Openfire",
"path": "src/java/org/jivesoftware/util/StringUtils.java",
"license": "apache-2.0",
"size": 43834
} | [
"java.security.SecureRandom",
"java.text.BreakIterator",
"java.util.ArrayList",
"java.util.List"
] | import java.security.SecureRandom; import java.text.BreakIterator; import java.util.ArrayList; import java.util.List; | import java.security.*; import java.text.*; import java.util.*; | [
"java.security",
"java.text",
"java.util"
] | java.security; java.text; java.util; | 1,337,276 |
//------------//
// containsId //
//------------//
public static boolean containsId (Collection<Glyph> glyphs,
int id)
{
for (Glyph glyph : glyphs) {
if (glyph.getId() == id) {
return true;
}
}
... | static boolean function (Collection<Glyph> glyphs, int id) { for (Glyph glyph : glyphs) { if (glyph.getId() == id) { return true; } } return false; } | /**
* Tell whether the provided ID appears in the glyph collection.
*
* @param glyphs glyph collection
* @param id provided ID
* @return true if so
*/ | Tell whether the provided ID appears in the glyph collection | containsId | {
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/glyph/Glyphs.java",
"license": "agpl-3.0",
"size": 22866
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,882,964 |
protected void startDocument(PDDocument document) throws IOException
{
// no default implementation, but available for subclasses
} | void function(PDDocument document) throws IOException { } | /**
* This method is available for subclasses of this class. It will be called before processing of the document start.
*
* @param document The PDF document that is being processed.
* @throws IOException If an IO error occurs.
*/ | This method is available for subclasses of this class. It will be called before processing of the document start | startDocument | {
"repo_name": "apache/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java",
"license": "apache-2.0",
"size": 75973
} | [
"java.io.IOException",
"org.apache.pdfbox.pdmodel.PDDocument"
] | import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument; | import java.io.*; import org.apache.pdfbox.pdmodel.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 941,253 |
public static void main(String args[]) throws Exception {
// setup input stream
int index = -1;
if (args.length == 1)
index = 0;
BufferedReader input = null;
if (index == -1) {
System.out.println("\nPlease type in date expressions (and press <Enter>), exit with <Ctrl+D>:");
input... | static void function(String args[]) throws Exception { int index = -1; if (args.length == 1) index = 0; BufferedReader input = null; if (index == -1) { System.out.println(STR); input = new BufferedReader(new InputStreamReader(System.in)); } else { System.out.println(STR + args[index] + "':"); input = new BufferedReader... | /**
* Runs the parser from commandline. Either reads lines from System.in
* or from a provided file (line by line).
*
* @param args the commandline arguments
* @throws Exception if something goes wrong
*/ | Runs the parser from commandline. Either reads lines from System.in or from a provided file (line by line) | main | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/parser/basetimemsec/Parser.java",
"license": "gpl-3.0",
"size": 37510
} | [
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.FileReader",
"java.io.InputStreamReader",
"java_cup.runtime.DefaultSymbolFactory",
"java_cup.runtime.SymbolFactory"
] | import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.FileReader; import java.io.InputStreamReader; import java_cup.runtime.DefaultSymbolFactory; import java_cup.runtime.SymbolFactory; | import java.io.*; import java_cup.runtime.*; | [
"java.io",
"java_cup.runtime"
] | java.io; java_cup.runtime; | 69,460 |
private void setInternalNameKettleVariable(VariableSpace var) {
// The name of the job
var.setVariable(Const.INTERNAL_VARIABLE_JOB_NAME, Const.NVL(name, "")); //$NON-NLS-1$
}
| void function(VariableSpace var) { var.setVariable(Const.INTERNAL_VARIABLE_JOB_NAME, Const.NVL(name, "")); } | /**
* Sets the internal name kettle variable.
*
* @param var the new internal name kettle variable
*/ | Sets the internal name kettle variable | setInternalNameKettleVariable | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 103745
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.core.variables.VariableSpace"
] | import org.pentaho.di.core.Const; import org.pentaho.di.core.variables.VariableSpace; | import org.pentaho.di.core.*; import org.pentaho.di.core.variables.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 797,149 |
@SideOnly(Side.CLIENT)
public boolean isBadEffect()
{
return this.isBadEffect;
} | @SideOnly(Side.CLIENT) boolean function() { return this.isBadEffect; } | /**
* This method returns true if the potion effect is bad - negative - for the entity.
*/ | This method returns true if the potion effect is bad - negative - for the entity | isBadEffect | {
"repo_name": "trixmot/mod1",
"path": "build/tmp/recompileMc/sources/net/minecraft/potion/Potion.java",
"license": "lgpl-2.1",
"size": 17052
} | [
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import net.minecraftforge.fml.relauncher.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 435,690 |
ActionExecutionValue executeAction(Action action, ActionMetadataHandler metadataHandler,
long actionStartTime,
ActionExecutionContext actionExecutionContext)
throws ActionExecutionException, InterruptedException {
Exception exception = badActionMap.get(action);
if (exception != null) {
... | ActionExecutionValue executeAction(Action action, ActionMetadataHandler metadataHandler, long actionStartTime, ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException { Exception exception = badActionMap.get(action); if (exception != null) { reportError(exception.getMessage(... | /**
* Executes the provided action on the current thread. Returns the ActionExecutionValue with the
* result, either computed here or already computed on another thread.
*
* <p>For use from {@link ArtifactFunction} only.
*/ | Executes the provided action on the current thread. Returns the ActionExecutionValue with the result, either computed here or already computed on another thread. For use from <code>ArtifactFunction</code> only | executeAction | {
"repo_name": "hhclam/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java",
"license": "apache-2.0",
"size": 50690
} | [
"com.google.common.base.Throwables",
"com.google.devtools.build.lib.actions.Action",
"com.google.devtools.build.lib.actions.ActionExecutionContext",
"com.google.devtools.build.lib.actions.ActionExecutionException",
"com.google.devtools.build.lib.actions.Actions",
"com.google.devtools.build.lib.actions.Art... | import com.google.common.base.Throwables; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.ActionExecutionContext; import com.google.devtools.build.lib.actions.ActionExecutionException; import com.google.devtools.build.lib.actions.Actions; import com.google.devtools.buil... | import com.google.common.base.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.util.*; import java.util.*; import java.util.concurrent.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,765,963 |
@Override
public Schema getSchema() {
return schema$;
} | Schema function() { return schema$; } | /**
* This method supports the Avro framework and is not intended to be called
* directly by the user.
*
* @return the schema object describing this class.
*
*/ | This method supports the Avro framework and is not intended to be called directly by the user | getSchema | {
"repo_name": "GPUdb/gpudb-api-java",
"path": "api/src/main/java/com/gpudb/protocol/FilterByValueRequest.java",
"license": "mit",
"size": 18189
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 1,284,091 |
protected List<LayoutManager> createChildLMs(int size) {
if (fobjIter == null) {
return null;
}
List<LayoutManager> newLMs = new ArrayList<LayoutManager>(size);
while (fobjIter.hasNext() && newLMs.size() < size) {
Object theobj = fobjIter.next();
i... | List<LayoutManager> function(int size) { if (fobjIter == null) { return null; } List<LayoutManager> newLMs = new ArrayList<LayoutManager>(size); while (fobjIter.hasNext() && newLMs.size() < size) { Object theobj = fobjIter.next(); if (theobj instanceof FONode) { FONode foNode = (FONode) theobj; if (foNode instanceof Re... | /**
* Create the LM instances for the children of the
* formatting object being handled by this LM.
* @param size the requested number of child LMs
* @return the list with the preloaded child LMs
*/ | Create the LM instances for the children of the formatting object being handled by this LM | createChildLMs | {
"repo_name": "StrategyObject/fop",
"path": "src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java",
"license": "apache-2.0",
"size": 17941
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.fop.fo.FONode",
"org.apache.fop.fo.flow.RetrieveMarker"
] | import java.util.ArrayList; import java.util.List; import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.RetrieveMarker; | import java.util.*; import org.apache.fop.fo.*; import org.apache.fop.fo.flow.*; | [
"java.util",
"org.apache.fop"
] | java.util; org.apache.fop; | 1,288,623 |
public static orientationMajorAxisType fromPerUnaligned(byte[] encodedBytes) {
orientationMajorAxisType result = new orientationMajorAxisType();
result.decodePerUnaligned(new BitStreamReader(encodedBytes));
return result;
} | static orientationMajorAxisType function(byte[] encodedBytes) { orientationMajorAxisType result = new orientationMajorAxisType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new orientationMajorAxisType from encoded stream.
*/ | Creates a new orientationMajorAxisType from encoded stream | fromPerUnaligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/lpp/EllipsoidPointWithUncertaintyEllipse.java",
"license": "apache-2.0",
"size": 34851
} | [
"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,524,958 |
public final synchronized Altitude getAltitude() {
return altitude;
} | final synchronized Altitude function() { return altitude; } | /**
* Get the current altitude
*
* @return the altitude
*/ | Get the current altitude | getAltitude | {
"repo_name": "Richard-Linsdale/gpssurvey",
"path": "src/main/java/uk/theretiredprogrammer/gpssurvey/informationstore/LocationData.java",
"license": "apache-2.0",
"size": 13216
} | [
"uk.theretiredprogrammer.gpssurvey.Altitude"
] | import uk.theretiredprogrammer.gpssurvey.Altitude; | import uk.theretiredprogrammer.gpssurvey.*; | [
"uk.theretiredprogrammer.gpssurvey"
] | uk.theretiredprogrammer.gpssurvey; | 282,511 |
public void unregisterComponent( String oname ) {
try {
unregisterComponent(new ObjectName(oname));
} catch (MalformedObjectNameException e) {
CoyoteLogger.MODELER_LOGGER.errorCreatingObjectName(e);
}
}
| void function( String oname ) { try { unregisterComponent(new ObjectName(oname)); } catch (MalformedObjectNameException e) { CoyoteLogger.MODELER_LOGGER.errorCreatingObjectName(e); } } | /** Unregister a component. We'll first check if it is registered,
* and mask all errors. This is mostly a helper.
*
* @param oname
*
* @since 1.1
*/ | Unregister a component. We'll first check if it is registered, and mask all errors. This is mostly a helper | unregisterComponent | {
"repo_name": "whitingjr/JbossWeb_7_2_0",
"path": "src/main/java/org/apache/tomcat/util/modeler/Registry.java",
"license": "apache-2.0",
"size": 33058
} | [
"javax.management.MalformedObjectNameException",
"javax.management.ObjectName",
"org.jboss.web.CoyoteLogger"
] | import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.jboss.web.CoyoteLogger; | import javax.management.*; import org.jboss.web.*; | [
"javax.management",
"org.jboss.web"
] | javax.management; org.jboss.web; | 1,821,472 |
public StringTokenizer tokenize(String line, String delim) {
return new StringTokenizer(line, delim);
} | StringTokenizer function(String line, String delim) { return new StringTokenizer(line, delim); } | /**
* Parses the line using java.util.StringTokenizer.
*
* @param line
* line to be parsed
* @param delim
* delimiter
* @return StringTokenizer constructed with <code>line</code> and <code>delim</code>
*/ | Parses the line using java.util.StringTokenizer | tokenize | {
"repo_name": "max3163/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.java",
"license": "apache-2.0",
"size": 20425
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 2,181,059 |
public List<String> getServerFactoryConfigArgs()
{
ListBuilder<String> args = ListBuilder.to();
args.add( String.valueOf( getConfig().getPort()));
getCertConfigWriter().ifPresent( cert -> cert.getServerFactoryConfigArgs().forEach( certArg -> args.add( certArg)));
return args.build();... | List<String> function() { ListBuilder<String> args = ListBuilder.to(); args.add( String.valueOf( getConfig().getPort())); getCertConfigWriter().ifPresent( cert -> cert.getServerFactoryConfigArgs().forEach( certArg -> args.add( certArg))); return args.build(); } | /**
* Returns the Moco server factory arguments for this server configuration.
*/ | Returns the Moco server factory arguments for this server configuration | getServerFactoryConfigArgs | {
"repo_name": "Cornutum/tcases",
"path": "tcases-moco/src/main/java/org/cornutum/tcases/openapi/moco/MocoServerTestWriter.java",
"license": "mit",
"size": 17985
} | [
"java.util.List",
"org.cornutum.tcases.util.ListBuilder"
] | import java.util.List; import org.cornutum.tcases.util.ListBuilder; | import java.util.*; import org.cornutum.tcases.util.*; | [
"java.util",
"org.cornutum.tcases"
] | java.util; org.cornutum.tcases; | 2,098,509 |
@ApiModelProperty(required = false, value = "this is the total amount of taxes included in the total price")
@JsonProperty("taxes")
public Double getTaxes() {
return taxes;
} | @ApiModelProperty(required = false, value = STR) @JsonProperty("taxes") Double function() { return taxes; } | /**
* this is the total amount of taxes included in the total price
*/ | this is the total amount of taxes included in the total price | getTaxes | {
"repo_name": "Trackin/api-java-lib",
"path": "src/main/java/co/trackin/client/model/DeliveryForm.java",
"license": "mit",
"size": 12080
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"com.wordnik.swagger.annotations.ApiModelProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; import com.wordnik.swagger.annotations.ApiModelProperty; | import com.fasterxml.jackson.annotation.*; import com.wordnik.swagger.annotations.*; | [
"com.fasterxml.jackson",
"com.wordnik.swagger"
] | com.fasterxml.jackson; com.wordnik.swagger; | 2,790,006 |
void drawNoDataType(Graphics2D g) {
g.setStroke(STROKE_ARROW_THIN);
g.setColor(Color.BLACK);
g.draw(arrowShape);
}
// #############################################################################
// END INTERNAL
// #############################################################################
private c... | void drawNoDataType(Graphics2D g) { g.setStroke(STROKE_ARROW_THIN); g.setColor(Color.BLACK); g.draw(arrowShape); } private class DataItemShape extends PNode { private static final long serialVersionUID = -8622708993706228441L; private Class<? extends IData> type; private String typeName; private Color color; private bo... | /**
* Draws an empty data type filter. This will be drawn if all data types are unselected.
*
* @param g The graphics device to draw on.
*/ | Draws an empty data type filter. This will be drawn if all data types are unselected | drawNoDataType | {
"repo_name": "raedle/Squidy",
"path": "squidy-designer/src/main/java/org/squidy/designer/zoom/impl/DataTypeShape.java",
"license": "lgpl-3.0",
"size": 15111
} | [
"edu.umd.cs.piccolo.PNode",
"java.awt.Color",
"java.awt.Graphics2D",
"org.squidy.SquidyException",
"org.squidy.manager.data.DataType",
"org.squidy.manager.data.IData"
] | import edu.umd.cs.piccolo.PNode; import java.awt.Color; import java.awt.Graphics2D; import org.squidy.SquidyException; import org.squidy.manager.data.DataType; import org.squidy.manager.data.IData; | import edu.umd.cs.piccolo.*; import java.awt.*; import org.squidy.*; import org.squidy.manager.data.*; | [
"edu.umd.cs",
"java.awt",
"org.squidy",
"org.squidy.manager"
] | edu.umd.cs; java.awt; org.squidy; org.squidy.manager; | 1,196,028 |
public void setDeviceInformationMapToDelete(String key, DeviceInformation deviceInformationMapToDelete) {
if (deviceInformationMapToDelete != null) {
this.deviceInformationMapToDelete.put(key, deviceInformationMapToDelete);
}
} | void function(String key, DeviceInformation deviceInformationMapToDelete) { if (deviceInformationMapToDelete != null) { this.deviceInformationMapToDelete.put(key, deviceInformationMapToDelete); } } | /**
* Sets device information for removal.
*
* @param key ket used to add in map
* @param deviceInformationMapToDelete map from device information to remove
*/ | Sets device information for removal | setDeviceInformationMapToDelete | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java",
"license": "apache-2.0",
"size": 29510
} | [
"org.onosproject.ospf.controller.DeviceInformation"
] | import org.onosproject.ospf.controller.DeviceInformation; | import org.onosproject.ospf.controller.*; | [
"org.onosproject.ospf"
] | org.onosproject.ospf; | 1,237,553 |
private void setLengths(String[] strings) throws IOException {
if (strings.length != valueCount) {
throw invalidLengths(strings);
}
try {
for (int i = 0; i < strings.length; i++) {
lengths[i] = Long.parseLong(strings[i]);
... | void function(String[] strings) throws IOException { if (strings.length != valueCount) { throw invalidLengths(strings); } try { for (int i = 0; i < strings.length; i++) { lengths[i] = Long.parseLong(strings[i]); } } catch (NumberFormatException e) { throw invalidLengths(strings); } } | /**
* Set lengths using decimal numbers like "10123".
*/ | Set lengths using decimal numbers like "10123" | setLengths | {
"repo_name": "Shaojia/ZHCarPocket",
"path": "MaintainService/src/com/coortouch/android/urlimagehelper/DiskLruCache.java",
"license": "mit",
"size": 33069
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,822,104 |
public boolean removeFlag(IFlagType flagType); | boolean function(IFlagType flagType); | /**
* Removes a flag.
*
* @param flagType the flag type
* @return true, if successful
*/ | Removes a flag | removeFlag | {
"repo_name": "Tabinol/FactoidAPI",
"path": "src/main/java/me/tabinol/factoidapi/lands/ILand.java",
"license": "gpl-3.0",
"size": 12685
} | [
"me.tabinol.factoidapi.parameters.IFlagType"
] | import me.tabinol.factoidapi.parameters.IFlagType; | import me.tabinol.factoidapi.parameters.*; | [
"me.tabinol.factoidapi"
] | me.tabinol.factoidapi; | 2,836,251 |
public Node namedItem(String name); | Node function(String name); | /**
* This method retrieves a <code>Node</code> using a name. It first
* searches for a <code>Node</code> with a matching <code>id</code>
* attribute. If it doesn't find one, it then searches for a
* <code>Node</code> with a matching <code>name</code> attribute, but
* only on those elements th... | This method retrieves a <code>Node</code> using a name. It first searches for a <code>Node</code> with a matching <code>id</code> attribute. If it doesn't find one, it then searches for a <code>Node</code> with a matching <code>name</code> attribute, but only on those elements that are allowed a name attribute | namedItem | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxp/drop_included/jaxp_src/src/org/w3c/dom/html/HTMLCollection.java",
"license": "gpl-2.0",
"size": 3815
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 208,562 |
public static <K,V> Matcher<Map<? extends K,? extends V>> hasEntry(Matcher<? super K> keyMatcher, Matcher<? super V> valueMatcher) {
return new IsMapContaining<>(keyMatcher, valueMatcher);
} | static <K,V> Matcher<Map<? extends K,? extends V>> function(Matcher<? super K> keyMatcher, Matcher<? super V> valueMatcher) { return new IsMapContaining<>(keyMatcher, valueMatcher); } | /**
* Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains
* at least one entry whose key satisfies the specified <code>keyMatcher</code> <b>and</b> whose
* value satisfies the specified <code>valueMatcher</code>.
* For example:
* <pre>assertTha... | Creates a matcher for <code>java.util.Map</code>s matching when the examined <code>java.util.Map</code> contains at least one entry whose key satisfies the specified <code>keyMatcher</code> and whose value satisfies the specified <code>valueMatcher</code>. For example: <code>assertThat(myMap, hasEntry(equalTo("bar"), e... | hasEntry | {
"repo_name": "alb-i986/JavaHamcrest",
"path": "hamcrest-library/src/main/java/org/hamcrest/collection/IsMapContaining.java",
"license": "bsd-3-clause",
"size": 5194
} | [
"java.util.Map",
"org.hamcrest.Matcher"
] | import java.util.Map; import org.hamcrest.Matcher; | import java.util.*; import org.hamcrest.*; | [
"java.util",
"org.hamcrest"
] | java.util; org.hamcrest; | 1,534,777 |
EClass getSection(); | EClass getSection(); | /**
* Returns the meta object for class '{@link org.eclectic.frontend.mappings.Section <em>Section</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Section</em>'.
* @see org.eclectic.frontend.mappings.Section
* @generated
*/ | Returns the meta object for class '<code>org.eclectic.frontend.mappings.Section Section</code>'. | getSection | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/mappings/MappingsPackage.java",
"license": "gpl-3.0",
"size": 129327
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 228,003 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.