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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void clearPersistedFiles() throws Exception {
writeFileWithBlocks(1L, ImmutableList.of(2L, 3L));
mManager.clearPersistedFiles(ImmutableList.of(1L));
assertEquals(Collections.emptyList(), mManager.getPersistedFiles());
} | void function() throws Exception { writeFileWithBlocks(1L, ImmutableList.of(2L, 3L)); mManager.clearPersistedFiles(ImmutableList.of(1L)); assertEquals(Collections.emptyList(), mManager.getPersistedFiles()); } | /**
* Tests that persisted file are cleared in the manager.
*/ | Tests that persisted file are cleared in the manager | clearPersistedFiles | {
"repo_name": "ChangerYoung/alluxio",
"path": "core/server/worker/src/test/java/alluxio/worker/file/FileDataManagerTest.java",
"license": "apache-2.0",
"size": 11829
} | [
"com.google.common.collect.ImmutableList",
"java.util.Collections",
"org.junit.Assert"
] | import com.google.common.collect.ImmutableList; import java.util.Collections; import org.junit.Assert; | import com.google.common.collect.*; import java.util.*; import org.junit.*; | [
"com.google.common",
"java.util",
"org.junit"
] | com.google.common; java.util; org.junit; | 2,111,248 |
public void walkFileTree(Path root, FileVisitor<Path> fileVisitor) throws IOException {
java.nio.file.Files.walkFileTree(root, fileVisitor);
} | void function(Path root, FileVisitor<Path> fileVisitor) throws IOException { java.nio.file.Files.walkFileTree(root, fileVisitor); } | /**
* Allows {@link java.nio.file.Files#walkFileTree} to be faked in tests.
*/ | Allows <code>java.nio.file.Files#walkFileTree</code> to be faked in tests | walkFileTree | {
"repo_name": "denizt/buck",
"path": "src/com/facebook/buck/util/ProjectFilesystem.java",
"license": "apache-2.0",
"size": 11970
} | [
"com.google.common.io.Files",
"java.io.IOException",
"java.nio.file.FileVisitor",
"java.nio.file.Path"
] | import com.google.common.io.Files; import java.io.IOException; import java.nio.file.FileVisitor; import java.nio.file.Path; | import com.google.common.io.*; import java.io.*; import java.nio.file.*; | [
"com.google.common",
"java.io",
"java.nio"
] | com.google.common; java.io; java.nio; | 195,666 |
public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) {
Registrant r = new Registrant(h, what, obj);
mCdmaForSubscriptionInfoReadyRegistrants.add(r);
if (isMinInfoReady()) {
r.notifyRegistrant();
}
} | void function(Handler h, int what, Object obj) { Registrant r = new Registrant(h, what, obj); mCdmaForSubscriptionInfoReadyRegistrants.add(r); if (isMinInfoReady()) { r.notifyRegistrant(); } } | /**
* Registration point for subscription info ready
* @param h handler to notify
* @param what what code of message when delivered
* @param obj placed in Message.obj
*/ | Registration point for subscription info ready | registerForSubscriptionInfoReady | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java",
"license": "gpl-3.0",
"size": 83187
} | [
"android.os.Handler",
"android.os.Registrant"
] | import android.os.Handler; import android.os.Registrant; | import android.os.*; | [
"android.os"
] | android.os; | 687,255 |
public Element getRootElement(){
return doc.getRootElement();
}
| Element function(){ return doc.getRootElement(); } | /** Gets the root element of the DOM
* @return Root element of DOM
*/ | Gets the root element of the DOM | getRootElement | {
"repo_name": "DynamicalSystem/brailleblaster",
"path": "src/main/org/brailleblaster/document/BBDocument.java",
"license": "apache-2.0",
"size": 23111
} | [
"nu.xom.Element"
] | import nu.xom.Element; | import nu.xom.*; | [
"nu.xom"
] | nu.xom; | 2,080,123 |
public void receivedUnknownMessage(UnknownMessageEvent evt); | void function(UnknownMessageEvent evt); | /**
* Fired when an Unknow message is received
*
* @param evt UnknownMessageEvent
*/ | Fired when an Unknow message is received | receivedUnknownMessage | {
"repo_name": "guusdk/Spark",
"path": "plugins/sip/src/main/java/net/java/sipmack/softphone/listeners/SoftPhoneListener.java",
"license": "apache-2.0",
"size": 1858
} | [
"net.java.sipmack.sip.event.UnknownMessageEvent"
] | import net.java.sipmack.sip.event.UnknownMessageEvent; | import net.java.sipmack.sip.event.*; | [
"net.java.sipmack"
] | net.java.sipmack; | 1,215,361 |
public void addButton(String name, ActionListener action) {
JButton temp = new JButton(name);
buttonMap.put(name, temp);
int rows = buttonMap.size() % buttonsPerCol == 0 ? buttonMap.size() / buttonsPerCol : buttonMap.size() / buttonsPerCol + 1;
masterPanel.setLayout(new GridLayout(rows, buttonsPerCol > butto... | void function(String name, ActionListener action) { JButton temp = new JButton(name); buttonMap.put(name, temp); int rows = buttonMap.size() % buttonsPerCol == 0 ? buttonMap.size() / buttonsPerCol : buttonMap.size() / buttonsPerCol + 1; masterPanel.setLayout(new GridLayout(rows, buttonsPerCol > buttonMap.size() ? butto... | /**
* add button
* @param name button name
* @param action action when pressing this menu bar item
*/ | add button | addButton | {
"repo_name": "andyballer/battleGame",
"path": "src/display/util/ButtonPanel.java",
"license": "mit",
"size": 2103
} | [
"java.awt.GridLayout",
"java.awt.event.ActionListener",
"javax.swing.JButton"
] | import java.awt.GridLayout; import java.awt.event.ActionListener; import javax.swing.JButton; | import java.awt.*; import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,126,043 |
@Test
public void shouldSendThirtyDataPackets() throws Exception {
byte[] controlData = new byte[blockSize * 3];
InBandBytestreamSession session = new InBandBytestreamSession(connection, initBytestream,
initiatorJID);
// set acknowledgments for the data packets
... | void function() throws Exception { byte[] controlData = new byte[blockSize * 3]; InBandBytestreamSession session = new InBandBytestreamSession(connection, initBytestream, initiatorJID); IQ resultIQ = IBBPacketUtils.createResultIQ(initiatorJID, targetJID); for (int i = 0; i < controlData.length; i++) { protocol.addRespo... | /**
* Test the output stream flush() method.
*
* @throws Exception should not happen
*/ | Test the output stream flush() method | shouldSendThirtyDataPackets | {
"repo_name": "magnetsystems/message-smack",
"path": "smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSessionTest.java",
"license": "apache-2.0",
"size": 22768
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,236,385 |
List<VpnTarget> vpnTarget(); | List<VpnTarget> vpnTarget(); | /**
* Returns the attribute vpnTarget.
*
* @return list of vpnTarget
*/ | Returns the attribute vpnTarget | vpnTarget | {
"repo_name": "mengmoya/onos",
"path": "apps/l3vpn/nel3vpn/nemgr/src/main/java/org/onosproject/yang/gen/v1/ne/l3vpn/api/rev20141225/nel3vpnapi/l3vpninstances/l3vpninstance/vpninstafs/vpninstaf/VpnTargets.java",
"license": "apache-2.0",
"size": 1815
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 977,248 |
public Map<String, Chain> getChainMap() {
return this.chainMap;
} | Map<String, Chain> function() { return this.chainMap; } | /**
* return Map of chains this channel is in
*
* @return Map
*/ | return Map of chains this channel is in | getChainMap | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelContainer.java",
"license": "epl-1.0",
"size": 3037
} | [
"com.ibm.ws.channelfw.internal.chains.Chain",
"java.util.Map"
] | import com.ibm.ws.channelfw.internal.chains.Chain; import java.util.Map; | import com.ibm.ws.channelfw.internal.chains.*; import java.util.*; | [
"com.ibm.ws",
"java.util"
] | com.ibm.ws; java.util; | 12,848 |
static ByteString unescapeBytes(final CharSequence charString)
throws InvalidEscapeSequenceException {
// First convert the Java characater sequence to UTF-8 bytes.
ByteString input = ByteString.copyFromUtf8(charString.toString());
// Then unescape certain byte sequences introduced by ASCII '\\'. T... | static ByteString unescapeBytes(final CharSequence charString) throws InvalidEscapeSequenceException { ByteString input = ByteString.copyFromUtf8(charString.toString()); final byte[] result = new byte[input.size()]; int pos = 0; for (int i = 0; i < input.size(); i++) { byte c = input.byteAt(i); if (c == '\\') { if (i +... | /**
* Un-escape a byte sequence as escaped using
* {@link #escapeBytes(ByteString)}. Two-digit hex escapes (starting with
* "\x") are also recognized.
*/ | Un-escape a byte sequence as escaped using <code>#escapeBytes(ByteString)</code>. Two-digit hex escapes (starting with "\x") are also recognized | unescapeBytes | {
"repo_name": "os72/protobuf-java-shaded-241",
"path": "java/src/main/java/com/github/os72/protobuf241/TextFormat.java",
"license": "bsd-3-clause",
"size": 50731
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,442,495 |
public String getString(final String name, final String category, final String defaultValue, final String comment, final String langKey, final Pattern pattern)
{
final Property prop = this.get(category, name, defaultValue);
prop.setLanguageKey(langKey);
prop.setValidationPattern(pattern);
... | String function(final String name, final String category, final String defaultValue, final String comment, final String langKey, final Pattern pattern) { final Property prop = this.get(category, name, defaultValue); prop.setLanguageKey(langKey); prop.setValidationPattern(pattern); prop.comment = comment + STR + default... | /**
* Creates a string property.
*
* @param name Name of the property.
* @param category Category of the property.
* @param defaultValue Default value of the property.
* @param comment A brief description what the property does.
* @param langKey A language key used for localization o... | Creates a string property | getString | {
"repo_name": "OreCruncher/Restructured",
"path": "src/main/java/org/blockartistry/mod/Restructured/util/JarConfiguration.java",
"license": "mit",
"size": 61536
} | [
"java.util.regex.Pattern",
"net.minecraftforge.common.config.Property"
] | import java.util.regex.Pattern; import net.minecraftforge.common.config.Property; | import java.util.regex.*; import net.minecraftforge.common.config.*; | [
"java.util",
"net.minecraftforge.common"
] | java.util; net.minecraftforge.common; | 254,453 |
public static void printDebug(String message) {
if(DEBUG){
printMessage(LogService.LOG_DEBUG, message);
}
} | static void function(String message) { if(DEBUG){ printMessage(LogService.LOG_DEBUG, message); } } | /**
* show debug with the logger service or only on standard output if it doesn't
* started
*
* @param message
*/ | show debug with the logger service or only on standard output if it doesn't started | printDebug | {
"repo_name": "Orange-OpenSource/Driver-RX-TX",
"path": "driver-rx-tx/src/java/gnu/io/RXTXlog.java",
"license": "lgpl-2.1",
"size": 4625
} | [
"org.osgi.service.log.LogService"
] | import org.osgi.service.log.LogService; | import org.osgi.service.log.*; | [
"org.osgi.service"
] | org.osgi.service; | 802,870 |
public void validateDocument(Document doc) throws ConverterException {
ClassLoader cl = PathwayModel.class.getClassLoader();
InputStream is = cl.getResourceAsStream(xsdFile);
if (is != null) {
Schema schema;
try {
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
... | void function(Document doc) throws ConverterException { ClassLoader cl = PathwayModel.class.getClassLoader(); InputStream is = cl.getResourceAsStream(xsdFile); if (is != null) { Schema schema; try { SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); StreamSource ss = new StreamSource... | /**
* validates a JDOM document against the xml-schema definition specified by
* 'xsdFile'
*
* @param doc the document to validate
*/ | validates a JDOM document against the xml-schema definition specified by 'xsdFile' | validateDocument | {
"repo_name": "PathVisio/libGPML",
"path": "org.pathvisio.lib/src/main/java/org/pathvisio/model/GPML2021FormatAbstract.java",
"license": "apache-2.0",
"size": 6240
} | [
"java.io.InputStream",
"javax.xml.XMLConstants",
"javax.xml.transform.stream.StreamSource",
"javax.xml.validation.Schema",
"javax.xml.validation.SchemaFactory",
"javax.xml.validation.ValidatorHandler",
"org.jdom2.Document",
"org.jdom2.JDOMException",
"org.jdom2.output.Format",
"org.jdom2.output.SA... | import java.io.InputStream; import javax.xml.XMLConstants; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import javax.xml.validation.ValidatorHandler; import org.jdom2.Document; import org.jdom2.JDOMException; import org.jdom2.output.Forma... | import java.io.*; import javax.xml.*; import javax.xml.transform.stream.*; import javax.xml.validation.*; import org.jdom2.*; import org.jdom2.output.*; import org.pathvisio.debug.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.jdom2",
"org.jdom2.output",
"org.pathvisio.debug",
"org.xml.sax"
] | java.io; javax.xml; org.jdom2; org.jdom2.output; org.pathvisio.debug; org.xml.sax; | 1,165,970 |
private String runValidation(final String file, final boolean result)
throws IOException {
final Environment.Mock mock = new Environment.Mock();
final File license = this.rule.savePackageInfo(
new File(mock.basedir(), CheckstyleValidatorTest.DIRECTORY)
).withLines(new Str... | String function(final String file, final boolean result) throws IOException { final Environment.Mock mock = new Environment.Mock(); final File license = this.rule.savePackageInfo( new File(mock.basedir(), CheckstyleValidatorTest.DIRECTORY) ).withLines(new String[] {CheckstyleValidatorTest.LICENSE}) .withEol("\n").file(... | /**
* Returns string with Checkstyle validation results.
* @param file File to check.
* @param result Expected validation result.
* @return String containing validation results in textual form.
* @throws IOException In case of error
*/ | Returns string with Checkstyle validation results | runValidation | {
"repo_name": "carlosmiranda/qulice",
"path": "qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java",
"license": "bsd-3-clause",
"size": 15108
} | [
"com.qulice.spi.Environment",
"com.qulice.spi.ValidationException",
"java.io.File",
"java.io.IOException",
"java.io.StringWriter",
"org.apache.commons.io.IOUtils",
"org.apache.log4j.SimpleLayout",
"org.apache.log4j.WriterAppender",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import com.qulice.spi.Environment; import com.qulice.spi.ValidationException; import java.io.File; import java.io.IOException; import java.io.StringWriter; import org.apache.commons.io.IOUtils; import org.apache.log4j.SimpleLayout; import org.apache.log4j.WriterAppender; import org.hamcrest.MatcherAssert; import org.ha... | import com.qulice.spi.*; import java.io.*; import org.apache.commons.io.*; import org.apache.log4j.*; import org.hamcrest.*; | [
"com.qulice.spi",
"java.io",
"org.apache.commons",
"org.apache.log4j",
"org.hamcrest"
] | com.qulice.spi; java.io; org.apache.commons; org.apache.log4j; org.hamcrest; | 1,028,302 |
void sortBy(int index)
{
model.getSorter().setByDate(SORT_BY_DATE == index);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
Browser browser = model.getBrowser();
Layout layout = browser.getSelectedLayout();
if (layout != null)
browser.accept(layout, ImageDispla... | void sortBy(int index) { model.getSorter().setByDate(SORT_BY_DATE == index); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getBrowser(); Layout layout = browser.getSelectedLayout(); if (layout != null) browser.accept(layout, ImageDisplayVisitor.IMAGE_SET_ONLY); ImageTableView v = mo... | /**
* Sorts the thumbnails either alphabetically or by date.
*
* @param index The sorting index.
*/ | Sorts the thumbnails either alphabetically or by date | sortBy | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowserUI.java",
"license": "gpl-2.0",
"size": 19515
} | [
"java.awt.Cursor",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.Browser",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplayVisitor",
"org.openmicroscopy.shoola.agents.dataBrowser.layout.Layout"
] | import java.awt.Cursor; import org.openmicroscopy.shoola.agents.dataBrowser.browser.Browser; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplayVisitor; import org.openmicroscopy.shoola.agents.dataBrowser.layout.Layout; | import java.awt.*; import org.openmicroscopy.shoola.agents.*; | [
"java.awt",
"org.openmicroscopy.shoola"
] | java.awt; org.openmicroscopy.shoola; | 1,218,409 |
public List<List<Integer>> getFactors3(int n) {
List<List<Integer>> ans = new ArrayList<>();
backtrack3(n, ans, new ArrayList<Integer>());
return ans;
} | List<List<Integer>> function(int n) { List<List<Integer>> ans = new ArrayList<>(); backtrack3(n, ans, new ArrayList<Integer>()); return ans; } | /**
* same speed as above
*/ | same speed as above | getFactors3 | {
"repo_name": "BruceZu/KeepTry",
"path": "arrows/src/main/java/nosubmmitted/LC254FactorCombinations.java",
"license": "apache-2.0",
"size": 5846
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,586,808 |
private static void enableCountrySpecificEncodings() {
Resources r = Resources.getSystem();
// See comments in frameworks/base/core/res/res/values/config.xml for allowed values
sEnabledSingleShiftTables = r.getIntArray(R.array.config_sms_enabled_single_shift_tables);
sEnabledLockingS... | static void function() { Resources r = Resources.getSystem(); sEnabledSingleShiftTables = r.getIntArray(R.array.config_sms_enabled_single_shift_tables); sEnabledLockingShiftTables = r.getIntArray(R.array.config_sms_enabled_locking_shift_tables); if (sEnabledSingleShiftTables.length > 0) { sHighestEnabledSingleShiftCode... | /**
* Enable country-specific language tables from MCC-specific overlays.
* @context the context to use to get the TelephonyManager
*/ | Enable country-specific language tables from MCC-specific overlays | enableCountrySpecificEncodings | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "telephony/java/com/android/internal/telephony/GsmAlphabet.java",
"license": "apache-2.0",
"size": 72469
} | [
"android.content.res.Resources",
"android.telephony.Rlog",
"android.util.SparseIntArray"
] | import android.content.res.Resources; import android.telephony.Rlog; import android.util.SparseIntArray; | import android.content.res.*; import android.telephony.*; import android.util.*; | [
"android.content",
"android.telephony",
"android.util"
] | android.content; android.telephony; android.util; | 2,096,250 |
private List<Object> getModules() {
// If you define all the dependencies directly in the module class annotation
// using includes, you don't need to list all the modules here. Otherwise,
// this is the right place to define all modules
// return Arrays.asList(
// new ... | List<Object> function() { return Arrays.asList( (Object) new MobileModule(this.getApplicationContext()) ); } | /**
* Could be overridden in tests, passing a different list of modules
* @return
*/ | Could be overridden in tests, passing a different list of modules | getModules | {
"repo_name": "rainbowbreeze/20150124-ciscolive",
"path": "mobileapp/ciscolive/mobile/src/main/java/it/rainbowbreeze/ciscolive/common/MyApp.java",
"license": "apache-2.0",
"size": 2751
} | [
"java.util.Arrays",
"java.util.List"
] | import java.util.Arrays; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,680,187 |
public FirewallPolicyThreatIntelWhitelist threatIntelWhitelist() {
return this.innerProperties() == null ? null : this.innerProperties().threatIntelWhitelist();
} | FirewallPolicyThreatIntelWhitelist function() { return this.innerProperties() == null ? null : this.innerProperties().threatIntelWhitelist(); } | /**
* Get the threatIntelWhitelist property: ThreatIntel Whitelist for Firewall Policy.
*
* @return the threatIntelWhitelist value.
*/ | Get the threatIntelWhitelist property: ThreatIntel Whitelist for Firewall Policy | threatIntelWhitelist | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/FirewallPolicyInner.java",
"license": "mit",
"size": 14473
} | [
"com.azure.resourcemanager.network.models.FirewallPolicyThreatIntelWhitelist"
] | import com.azure.resourcemanager.network.models.FirewallPolicyThreatIntelWhitelist; | import com.azure.resourcemanager.network.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,406,464 |
public static void addGVTListener(BridgeContext ctx, Document doc) {
UserAgent ua = ctx.getUserAgent();
if (ua != null) {
EventDispatcher dispatcher = ua.getEventDispatcher();
if (dispatcher != null) {
final Listener listener = new Listener(ctx, ua);
... | static void function(BridgeContext ctx, Document doc) { UserAgent ua = ctx.getUserAgent(); if (ua != null) { EventDispatcher dispatcher = ua.getEventDispatcher(); if (dispatcher != null) { final Listener listener = new Listener(ctx, ua); dispatcher.addGraphicsNodeMouseListener(listener); dispatcher.addGraphicsNodeMouse... | /**
* Is called only for the root element in order to dispatch GVT
* events to the DOM.
*/ | Is called only for the root element in order to dispatch GVT events to the DOM | addGVTListener | {
"repo_name": "sflyphotobooks/crp-batik",
"path": "sources/org/apache/batik/bridge/svg12/SVG12BridgeEventSupport.java",
"license": "apache-2.0",
"size": 40847
} | [
"org.apache.batik.bridge.BridgeContext",
"org.apache.batik.bridge.BridgeEventSupport",
"org.apache.batik.bridge.UserAgent",
"org.apache.batik.dom.events.NodeEventTarget",
"org.apache.batik.gvt.event.EventDispatcher",
"org.apache.batik.gvt.event.GraphicsNodeMouseWheelListener",
"org.apache.batik.util.XML... | import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.BridgeEventSupport; import org.apache.batik.bridge.UserAgent; import org.apache.batik.dom.events.NodeEventTarget; import org.apache.batik.gvt.event.EventDispatcher; import org.apache.batik.gvt.event.GraphicsNodeMouseWheelListener; import org.a... | import org.apache.batik.bridge.*; import org.apache.batik.dom.events.*; import org.apache.batik.gvt.event.*; import org.apache.batik.util.*; import org.w3c.dom.*; import org.w3c.dom.events.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,784,121 |
public void removeItem(int which, float velocityX) {
if (mDragState == IDLE || mDragState == DRAGGING) {
if (mDragState == IDLE) {
// called from outside drag-sort
mSrcPos = getHeaderViewsCount() + which;
mFirstExpPos = mSrcPos;
mS... | void function(int which, float velocityX) { if (mDragState == IDLE mDragState == DRAGGING) { if (mDragState == IDLE) { mSrcPos = getHeaderViewsCount() + which; mFirstExpPos = mSrcPos; mSecondExpPos = mSrcPos; mFloatPos = mSrcPos; View v = getChildAt(mSrcPos - getFirstVisiblePosition()); if (v != null) { v.setVisibility... | /**
* Removes an item from the list and animates the removal.
*
* @param which Position to remove (NOTE: headers/footers ignored!
* this is a position in your input ListAdapter).
* @param velocityX
*/ | Removes an item from the list and animates the removal | removeItem | {
"repo_name": "libill/InformationDemo",
"path": "src/com/android/informationdemo/view/DragSortListView.java",
"license": "epl-1.0",
"size": 100496
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,362,761 |
public static void parse(DocListener document, InputStream is) {
HtmlParser p = new HtmlParser();
p.go(document, new InputSource(is));
}
| static void function(DocListener document, InputStream is) { HtmlParser p = new HtmlParser(); p.go(document, new InputSource(is)); } | /**
* Parses a given file that validates with the iText DTD and writes the content to a document.
* @param document the document the parser will write to
* @param is the InputStream with the content
*/ | Parses a given file that validates with the iText DTD and writes the content to a document | parse | {
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/html/HtmlParser.java",
"license": "lgpl-3.0",
"size": 6384
} | [
"com.lowagie.text.DocListener",
"java.io.InputStream",
"org.xml.sax.InputSource"
] | import com.lowagie.text.DocListener; import java.io.InputStream; import org.xml.sax.InputSource; | import com.lowagie.text.*; import java.io.*; import org.xml.sax.*; | [
"com.lowagie.text",
"java.io",
"org.xml.sax"
] | com.lowagie.text; java.io; org.xml.sax; | 1,861,466 |
@Observer(JpaIdentityStore.EVENT_PRE_PERSIST_USER)
public void prePersistUser(User user) {
if(!ConfigurationServiceImpl.configurationInProgress) {
user.setResource(tripleStore.createUriResource(
configurationService.getBaseUri()+"/user/"+user.getLogin()));
user.setType(tripleStore.createUriResource(Con... | @Observer(JpaIdentityStore.EVENT_PRE_PERSIST_USER) void function(User user) { if(!ConfigurationServiceImpl.configurationInProgress) { user.setResource(tripleStore.createUriResource( configurationService.getBaseUri()+STR+user.getLogin())); user.setType(tripleStore.createUriResource(Constants.NS_KIWI_CORE + "User")); } } | /**
* Called by IdentityManager.instance().createUser() before the user will be created
* @param user
*/ | Called by IdentityManager.instance().createUser() before the user will be created | prePersistUser | {
"repo_name": "StexX/KiWi-OSE",
"path": "src/action/kiwi/service/user/IdentityManagerService.java",
"license": "bsd-3-clause",
"size": 9086
} | [
"kiwi.model.Constants",
"kiwi.model.user.User",
"kiwi.service.config.ConfigurationServiceImpl",
"org.jboss.seam.annotations.Observer",
"org.jboss.seam.security.management.JpaIdentityStore"
] | import kiwi.model.Constants; import kiwi.model.user.User; import kiwi.service.config.ConfigurationServiceImpl; import org.jboss.seam.annotations.Observer; import org.jboss.seam.security.management.JpaIdentityStore; | import kiwi.model.*; import kiwi.model.user.*; import kiwi.service.config.*; import org.jboss.seam.annotations.*; import org.jboss.seam.security.management.*; | [
"kiwi.model",
"kiwi.model.user",
"kiwi.service.config",
"org.jboss.seam"
] | kiwi.model; kiwi.model.user; kiwi.service.config; org.jboss.seam; | 1,190,452 |
protected void addDecimalMinutesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DMSAngleType_decimalMinutes_feature"),
getString("_UI_Proper... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), GmlPackage.eINSTANCE.getDMSAngleType_DecimalMinutes(), true, false, false, ItemPropertyDescriptor... | /**
* This adds a property descriptor for the Decimal Minutes feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Decimal Minutes feature. | addDecimalMinutesPropertyDescriptor | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/DMSAngleTypeItemProvider.java",
"license": "apache-2.0",
"size": 7824
} | [
"net.opengis.gml.GmlPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import net.opengis.gml.GmlPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import net.opengis.gml.*; import org.eclipse.emf.edit.provider.*; | [
"net.opengis.gml",
"org.eclipse.emf"
] | net.opengis.gml; org.eclipse.emf; | 1,579,207 |
private static BaseModel loadModel(int index) {
Tools toolElement = Tools.values()[index];
LogHelper.getLogger(LogHelper.INIT).info("Initializing the " + toolElement.description + "...");
PerformanceMonitor.start("model");
InputStream is = null;
try {is = new FileInputStream(Paths.TOOLS[index]);}
catc... | static BaseModel function(int index) { Tools toolElement = Tools.values()[index]; LogHelper.getLogger(LogHelper.INIT).info(STR + toolElement.description + "..."); PerformanceMonitor.start("model"); InputStream is = null; try {is = new FileInputStream(Paths.TOOLS[index]);} catch (IOException e) { LogHelper.getLogger(Log... | /**
* Loads an individual openNLP tool.
*
* @param index the index of the tool in both the {@code Tools} enum and the array of Tools in {@link Paths}.
* @return a BaseModel which holds the loaded file
*/ | Loads an individual openNLP tool | loadModel | {
"repo_name": "MXProgrammingClub/BSChecker",
"path": "src/main/java/bschecker/util/Tools.java",
"license": "bsd-3-clause",
"size": 4064
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.lang.reflect.InvocationTargetException"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.lang.reflect.InvocationTargetException; | import java.io.*; import java.lang.reflect.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 982,394 |
private static JitterParameter getNewParameter1(
ArrayList<JitterParameter> solutions, double expectation,
double iqr) {
double middleM = (solutions.get(0).m + solutions.get(1).m + solutions
.get(2).m) / 3.0;
double middleS = (solutions.get(0).s + solutions.get(1).s + solutions
.get(2).s) / 3.0;
... | static JitterParameter function( ArrayList<JitterParameter> solutions, double expectation, double iqr) { double middleM = (solutions.get(0).m + solutions.get(1).m + solutions .get(2).m) / 3.0; double middleS = (solutions.get(0).s + solutions.get(1).s + solutions .get(2).s) / 3.0; double newM = middleM + (solutions.get(... | /**
* movement of factor 2 to center of solutions
*
* @param solutions
* @param expectation
* @param iqr
* @return moved solution
*/ | movement of factor 2 to center of solutions | getNewParameter1 | {
"repo_name": "flyroom/PeerfactSimKOM_Clone",
"path": "src/org/peerfact/impl/network/modular/common/PingErToolkit.java",
"license": "gpl-2.0",
"size": 7073
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,686,460 |
@Pure
public void toCoordinateSystem2D(Point3D point, Point2D result) {
switch(this) {
case XYZ_RIGHT_HAND:
case XYZ_LEFT_HAND:
result.set(point.getX(), point.getY());
break;
case XZY_LEFT_HAND:
case XZY_RIGHT_HAND:
result.set(point.getX(), point.getZ());
break;
default:
throw new Coordin... | void function(Point3D point, Point2D result) { switch(this) { case XYZ_RIGHT_HAND: case XYZ_LEFT_HAND: result.set(point.getX(), point.getY()); break; case XZY_LEFT_HAND: case XZY_RIGHT_HAND: result.set(point.getX(), point.getZ()); break; default: throw new CoordinateSystemNotFoundException(); } } | /** Convert the specified point into from the current coordinate system
* to the specified coordinate system.
*
* @param point is the point to convert
* @param result the 2D point.
*/ | Convert the specified point into from the current coordinate system to the specified coordinate system | toCoordinateSystem2D | {
"repo_name": "gallandarakhneorg/afc",
"path": "core/maths/mathgeom/tobeincluded/src/coordinatesystem/CoordinateSystem3D.java",
"license": "apache-2.0",
"size": 36244
} | [
"org.arakhne.afc.math.geometry.d2.Point2D",
"org.arakhne.afc.math.geometry.d3.Point3D"
] | import org.arakhne.afc.math.geometry.d2.Point2D; import org.arakhne.afc.math.geometry.d3.Point3D; | import org.arakhne.afc.math.geometry.d2.*; import org.arakhne.afc.math.geometry.d3.*; | [
"org.arakhne.afc"
] | org.arakhne.afc; | 2,520,274 |
public VmStatisticsDao getVmStatisticsDao() {
return getDao(VmStatisticsDao.class);
} | VmStatisticsDao function() { return getDao(VmStatisticsDao.class); } | /**
* Returns the singleton instance of {@link VmStatisticsDao}.
*
* @return the dao
*/ | Returns the singleton instance of <code>VmStatisticsDao</code> | getVmStatisticsDao | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java",
"license": "gpl-3.0",
"size": 42484
} | [
"org.ovirt.engine.core.dao.VmStatisticsDao"
] | import org.ovirt.engine.core.dao.VmStatisticsDao; | import org.ovirt.engine.core.dao.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 2,876,187 |
@SuppressWarnings("unchecked")
private void markBranch(GraphNode node) {
ArrayList<GraphItem> items = new ArrayList<GraphItem>();
try {
GraphConnection connection = (GraphConnection) node.getTargetConnections().get(0);
connection.setLineColor(viewer.getGraphControl().DARK_BLUE);
items.add(connection... | @SuppressWarnings(STR) void function(GraphNode node) { ArrayList<GraphItem> items = new ArrayList<GraphItem>(); try { GraphConnection connection = (GraphConnection) node.getTargetConnections().get(0); connection.setLineColor(viewer.getGraphControl().DARK_BLUE); items.add(connection.getSource()); items.add(connection.ge... | /**
* Marks the whole branch beginning from the selected node
*
* @param node any node of the graph
*/ | Marks the whole branch beginning from the selected node | markBranch | {
"repo_name": "jcryptool/crypto",
"path": "org.jcryptool.visual.sphincs/src/org/jcryptool/visual/sphincs/ui/SphincsTreeView.java",
"license": "epl-1.0",
"size": 19686
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.zest.core.widgets.GraphConnection",
"org.eclipse.zest.core.widgets.GraphItem",
"org.eclipse.zest.core.widgets.GraphNode"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.zest.core.widgets.GraphConnection; import org.eclipse.zest.core.widgets.GraphItem; import org.eclipse.zest.core.widgets.GraphNode; | import java.util.*; import org.eclipse.zest.core.widgets.*; | [
"java.util",
"org.eclipse.zest"
] | java.util; org.eclipse.zest; | 2,903,637 |
@Override
public Collection<String> getCliqueFeatures(PaddedList<IN> cInfo, int loc, Clique clique) {
Collection<String> features = Generics.newHashSet();
String domain = cInfo.get(0).get(CoreAnnotations.DomainAnnotation.class);
final boolean doFE = domain != null;
// log.info(doFE+"\t"+domain);
... | Collection<String> function(PaddedList<IN> cInfo, int loc, Clique clique) { Collection<String> features = Generics.newHashSet(); String domain = cInfo.get(0).get(CoreAnnotations.DomainAnnotation.class); final boolean doFE = domain != null; Collection<String> c; String suffix; if (clique == cliqueC) { c = featuresC(cInf... | /**
* Extracts all the features from the input data at a certain index.
*
* @param cInfo The complete data set as a List of WordInfo
* @param loc The index at which to extract features.
*/ | Extracts all the features from the input data at a certain index | getCliqueFeatures | {
"repo_name": "intfloat/CoreNLP",
"path": "src/edu/stanford/nlp/ie/NERFeatureFactory.java",
"license": "gpl-2.0",
"size": 108304
} | [
"edu.stanford.nlp.ling.CoreAnnotations",
"edu.stanford.nlp.sequences.Clique",
"edu.stanford.nlp.util.Generics",
"edu.stanford.nlp.util.PaddedList",
"java.util.Collection",
"java.util.Map"
] | import edu.stanford.nlp.ling.CoreAnnotations; import edu.stanford.nlp.sequences.Clique; import edu.stanford.nlp.util.Generics; import edu.stanford.nlp.util.PaddedList; import java.util.Collection; import java.util.Map; | import edu.stanford.nlp.ling.*; import edu.stanford.nlp.sequences.*; import edu.stanford.nlp.util.*; import java.util.*; | [
"edu.stanford.nlp",
"java.util"
] | edu.stanford.nlp; java.util; | 900,301 |
public synchronized void unload(LCMSDataSubset subset, Object user, Set<LCMSDataSubset> exclude) {
//System.err.println("=========== UNLOAD (user) CALLED ***********************");
if (!isLoaded(subset)) {
throw new IllegalStateException("LCMSData load/unload methods only"
+ " work for subsets... | synchronized void function(LCMSDataSubset subset, Object user, Set<LCMSDataSubset> exclude) { if (!isLoaded(subset)) { throw new IllegalStateException(STR + STR + STR + STR + STR + STR); } Set<LCMSDataSubset> userSubsets = cache.getIfPresent(user); if (userSubsets == null) { throw new IllegalStateException(STR + STR + ... | /**
* Unloads spectra matched by this subset.
*
* @param subset to be unloaded
* @param user the user, that has had this subset loaded. If other users have parts of this subset
* loaded, those parts won't be unloaded.
* @param exclude can be null. If specified, data from these subsets won't be exclude... | Unloads spectra matched by this subset | unload | {
"repo_name": "chhh/MSFTBX",
"path": "MSFileToolbox/src/main/java/umich/ms/datatypes/LCMSData.java",
"license": "apache-2.0",
"size": 12150
} | [
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"java.util.concurrent.ConcurrentMap"
] | import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentMap; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,295,651 |
void delete(final RamFileObject file) throws FileSystemException {
// root is read only check
if (file.getParent() == null) {
throw new FileSystemException("unable to delete root");
}
// Remove reference from cache
this.cache.remove(file.getName());
// No... | void delete(final RamFileObject file) throws FileSystemException { if (file.getParent() == null) { throw new FileSystemException(STR); } this.cache.remove(file.getName()); final RamFileObject parent = (RamFileObject) this.resolveFile(file.getParent().getName()); parent.getData().removeChild(file.getData()); parent.clos... | /**
* Delete a file
*
* @param file
* @throws FileSystemException
*/ | Delete a file | delete | {
"repo_name": "wso2/wso2-commons-vfs",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystem.java",
"license": "apache-2.0",
"size": 9220
} | [
"org.apache.commons.vfs2.FileSystemException"
] | import org.apache.commons.vfs2.FileSystemException; | import org.apache.commons.vfs2.*; | [
"org.apache.commons"
] | org.apache.commons; | 102,894 |
@Test
public void checkFindSecondElement() {
int expectedIndex = 2;
assertEquals(expectedIndex, tree.findNearestIndex(16.0));
assertEquals(expectedIndex, tree.findNearestIndex(19.0));
assertEquals(expectedIndex, tree.findNearestIndex(20.0));
assertEquals(expectedIndex, tree.findNearestIndex(21.0));
... | void function() { int expectedIndex = 2; assertEquals(expectedIndex, tree.findNearestIndex(16.0)); assertEquals(expectedIndex, tree.findNearestIndex(19.0)); assertEquals(expectedIndex, tree.findNearestIndex(20.0)); assertEquals(expectedIndex, tree.findNearestIndex(21.0)); assertEquals(expectedIndex, tree.findNearestInd... | /**
* Checks that the element at index 2 in the tree can be found with the
* appropriate search values (anything between 15.0--exclusive--to
* 25.0--inclusive).
*/ | Checks that the element at index 2 in the tree can be found with the appropriate search values (anything between 15.0--exclusive--to 25.0--inclusive) | checkFindSecondElement | {
"repo_name": "SmithRWORNL/ice",
"path": "tests/org.eclipse.ice.viz.service.visit.test/src/org/eclipse/ice/viz/service/visit/test/BinarySearchTreeTester.java",
"license": "epl-1.0",
"size": 16020
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,120,157 |
long worldTime = getWorldTime();
while (worldTime - lastChange >= spawnDelay && location.getCreatureCount(id) < populationLimit) {
World world = location.getWorld();
Creature creature = world.getCreatureFactory().makeCreature(id, world);
if (creature != null) {
location.addCreature(creatur... | long worldTime = getWorldTime(); while (worldTime - lastChange >= spawnDelay && location.getCreatureCount(id) < populationLimit) { World world = location.getWorld(); Creature creature = world.getCreatureFactory().makeCreature(id, world); if (creature != null) { location.addCreature(creature); } else { DungeonLogger.war... | /**
* Refresh the spawner, spawning all creatures that should have spawned since the last spawn.
*
* <p>Only spawners in locations whose creatures are visible to the player should be refreshed.
*/ | Refresh the spawner, spawning all creatures that should have spawned since the last spawn. Only spawners in locations whose creatures are visible to the player should be refreshed | refresh | {
"repo_name": "ffurkanhas/dungeon",
"path": "src/main/java/org/mafagafogigante/dungeon/game/Spawner.java",
"license": "bsd-3-clause",
"size": 2772
} | [
"org.mafagafogigante.dungeon.entity.creatures.Creature",
"org.mafagafogigante.dungeon.logging.DungeonLogger"
] | import org.mafagafogigante.dungeon.entity.creatures.Creature; import org.mafagafogigante.dungeon.logging.DungeonLogger; | import org.mafagafogigante.dungeon.entity.creatures.*; import org.mafagafogigante.dungeon.logging.*; | [
"org.mafagafogigante.dungeon"
] | org.mafagafogigante.dungeon; | 2,621,249 |
public static void parseExtras(Context context, AccountType accountType, RawContactDelta state,
Bundle extras) {
if (extras == null || extras.size() == 0) {
// Bail early if no useful data
return;
}
parseStructuredNameExtra(context, accountType, state, ex... | static void function(Context context, AccountType accountType, RawContactDelta state, Bundle extras) { if (extras == null extras.size() == 0) { return; } parseStructuredNameExtra(context, accountType, state, extras); parseStructuredPostalExtra(accountType, state, extras); { final DataKind kind = accountType.getKindForM... | /**
* Parse the given {@link Bundle} into the given {@link RawContactDelta} state,
* assuming the extras defined through {@link Intents}.
*/ | Parse the given <code>Bundle</code> into the given <code>RawContactDelta</code> state, assuming the extras defined through <code>Intents</code> | parseExtras | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Contacts/src/com/android/contacts/model/RawContactModifier.java",
"license": "gpl-2.0",
"size": 68535
} | [
"android.content.ContentValues",
"android.content.Context",
"android.net.sip.SipManager",
"android.os.Bundle",
"android.provider.ContactsContract",
"android.util.Log",
"com.android.contacts.ContactsUtils",
"com.android.contacts.model.RawContactDelta",
"com.android.contacts.model.account.AccountType"... | import android.content.ContentValues; import android.content.Context; import android.net.sip.SipManager; import android.os.Bundle; import android.provider.ContactsContract; import android.util.Log; import com.android.contacts.ContactsUtils; import com.android.contacts.model.RawContactDelta; import com.android.contacts.... | import android.content.*; import android.net.sip.*; import android.os.*; import android.provider.*; import android.util.*; import com.android.contacts.*; import com.android.contacts.model.*; import com.android.contacts.model.account.*; import com.android.contacts.model.dataitem.*; import java.util.*; | [
"android.content",
"android.net",
"android.os",
"android.provider",
"android.util",
"com.android.contacts",
"java.util"
] | android.content; android.net; android.os; android.provider; android.util; com.android.contacts; java.util; | 355,456 |
@NonNull
public static String generateSignatureHash(@NonNull Signature signature) {
try {
MessageDigest digest = MessageDigest.getInstance(DIGEST_SHA_512);
byte[] hashBytes = digest.digest(signature.toByteArray());
return Base64.encodeToString(hashBytes, Base64.URL_SA... | static String function(@NonNull Signature signature) { try { MessageDigest digest = MessageDigest.getInstance(DIGEST_SHA_512); byte[] hashBytes = digest.digest(signature.toByteArray()); return Base64.encodeToString(hashBytes, Base64.URL_SAFE Base64.NO_WRAP); } catch (NoSuchAlgorithmException e) { throw new IllegalState... | /**
* Generates a SHA-512 hash, Base64 url-safe encoded, from a {@link Signature}.
*/ | Generates a SHA-512 hash, Base64 url-safe encoded, from a <code>Signature</code> | generateSignatureHash | {
"repo_name": "VKCOM/vk-android-sdk",
"path": "core/src/main/java/com/vk/api/sdk/browser/BrowserDescriptor.java",
"license": "mit",
"size": 7425
} | [
"android.content.pm.Signature",
"android.util.Base64",
"androidx.annotation.NonNull",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException"
] | import android.content.pm.Signature; import android.util.Base64; import androidx.annotation.NonNull; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; | import android.content.pm.*; import android.util.*; import androidx.annotation.*; import java.security.*; | [
"android.content",
"android.util",
"androidx.annotation",
"java.security"
] | android.content; android.util; androidx.annotation; java.security; | 2,380,403 |
private void showProgressDialog(){
if(progressDialog==null){
progressDialog=new ProgressDialog(getActivity());
progressDialog.setMessage("正在加载..");
progressDialog.setCanceledOnTouchOutside(false);
}
progressDialog.show();
} | void function(){ if(progressDialog==null){ progressDialog=new ProgressDialog(getActivity()); progressDialog.setMessage(STR); progressDialog.setCanceledOnTouchOutside(false); } progressDialog.show(); } | /***
* show Progressialog
*/ | show Progressialog | showProgressDialog | {
"repo_name": "atVoidYX/heweather",
"path": "app/src/main/java/android/heweather/com/heweather/Fragment/ChooseAreaFragment.java",
"license": "apache-2.0",
"size": 9560
} | [
"android.app.ProgressDialog"
] | import android.app.ProgressDialog; | import android.app.*; | [
"android.app"
] | android.app; | 2,725,168 |
this.conf = conf;
int configuredRetentionSize = conf.getInt(
YarnConfiguration.NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP,
YarnConfiguration
.DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP);
if (configuredRetentionSize <= 0) {
this.retentionSize =
YarnConfig... | this.conf = conf; int configuredRetentionSize = conf.getInt( YarnConfiguration.NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP, YarnConfiguration .DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP); if (configuredRetentionSize <= 0) { this.retentionSize = YarnConfiguration .DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SI... | /**
* Initialize the log file controller.
* @param conf the Configuration
* @param controllerName the log controller class name
*/ | Initialize the log file controller | initialize | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/LogAggregationFileController.java",
"license": "apache-2.0",
"size": 21879
} | [
"org.apache.hadoop.yarn.conf.YarnConfiguration"
] | import org.apache.hadoop.yarn.conf.YarnConfiguration; | import org.apache.hadoop.yarn.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,210,759 |
public MdmLink newMdmLink() {
return myMdmLinkFactory.newMdmLink();
} | MdmLink function() { return myMdmLinkFactory.newMdmLink(); } | /**
* Factory delegation method, whenever you need a new MdmLink, use this factory method.
* //TODO Should we make the constructor private for MdmLink? or work out some way to ensure they can only be instantiated via factory.
*
* @return A new {@link MdmLink}.
*/ | Factory delegation method, whenever you need a new MdmLink, use this factory method. TODO Should we make the constructor private for MdmLink? or work out some way to ensure they can only be instantiated via factory | newMdmLink | {
"repo_name": "aemay2/hapi-fhir",
"path": "hapi-fhir-jpaserver-mdm/src/main/java/ca/uhn/fhir/jpa/mdm/dao/MdmLinkDaoSvc.java",
"license": "apache-2.0",
"size": 12946
} | [
"ca.uhn.fhir.jpa.entity.MdmLink"
] | import ca.uhn.fhir.jpa.entity.MdmLink; | import ca.uhn.fhir.jpa.entity.*; | [
"ca.uhn.fhir"
] | ca.uhn.fhir; | 2,082,317 |
public void setFinancialObject(ObjectCode financialObject) {
this.financialObject = financialObject;
} | void function(ObjectCode financialObject) { this.financialObject = financialObject; } | /**
* Sets the financialObject attribute.
*
* @param financialObject The financialObject to set.
* @deprecated
*/ | Sets the financialObject attribute | setFinancialObject | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionAppointmentFundingReason.java",
"license": "apache-2.0",
"size": 10384
} | [
"org.kuali.kfs.coa.businessobject.ObjectCode"
] | import org.kuali.kfs.coa.businessobject.ObjectCode; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,257,570 |
public ExecutorBuilder setActionInputPrefetcher(ActionInputPrefetcher prefetcher) {
Preconditions.checkState(this.prefetcher == null);
this.prefetcher = Preconditions.checkNotNull(prefetcher);
return this;
} | ExecutorBuilder function(ActionInputPrefetcher prefetcher) { Preconditions.checkState(this.prefetcher == null); this.prefetcher = Preconditions.checkNotNull(prefetcher); return this; } | /**
* Sets the action input prefetcher. Only one module may set the prefetcher. If multiple modules
* set it, this method will throw an {@link IllegalStateException}.
*/ | Sets the action input prefetcher. Only one module may set the prefetcher. If multiple modules set it, this method will throw an <code>IllegalStateException</code> | setActionInputPrefetcher | {
"repo_name": "juhalindfors/bazel-patches",
"path": "src/main/java/com/google/devtools/build/lib/exec/ExecutorBuilder.java",
"license": "apache-2.0",
"size": 3667
} | [
"com.google.devtools.build.lib.util.Preconditions"
] | import com.google.devtools.build.lib.util.Preconditions; | import com.google.devtools.build.lib.util.*; | [
"com.google.devtools"
] | com.google.devtools; | 653,437 |
public static String rewriteViewStatement(PhoenixConnection conn, PTable index, PTable table, String viewStatement) throws SQLException {
if (viewStatement == null) {
return null;
} | static String function(PhoenixConnection conn, PTable index, PTable table, String viewStatement) throws SQLException { if (viewStatement == null) { return null; } | /**
* Rewrite a view statement to be valid against an index
* @param conn
* @param index
* @param table
* @return
* @throws SQLException
*/ | Rewrite a view statement to be valid against an index | rewriteViewStatement | {
"repo_name": "apurtell/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/util/IndexUtil.java",
"license": "apache-2.0",
"size": 45682
} | [
"java.sql.SQLException",
"org.apache.phoenix.jdbc.PhoenixConnection",
"org.apache.phoenix.schema.PTable"
] | import java.sql.SQLException; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.schema.PTable; | import java.sql.*; import org.apache.phoenix.jdbc.*; import org.apache.phoenix.schema.*; | [
"java.sql",
"org.apache.phoenix"
] | java.sql; org.apache.phoenix; | 1,369,864 |
public Media createMediaRecorder(String path) throws IOException {
return createMediaRecorder(path, getAvailableRecordingMimeTypes()[0]);
} | Media function(String path) throws IOException { return createMediaRecorder(path, getAvailableRecordingMimeTypes()[0]); } | /**
* Creates a Media recorder Object which will record from the device mic to
* a file in the given path.
* The output format will be amr-nb if supported by the platform.
*
* @param path a file path to where to store the recording, if the file does
* not exists it will be created.
*... | Creates a Media recorder Object which will record from the device mic to a file in the given path. The output format will be amr-nb if supported by the platform | createMediaRecorder | {
"repo_name": "codenameone/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/Display.java",
"license": "gpl-2.0",
"size": 192339
} | [
"com.codename1.media.Media",
"java.io.IOException"
] | import com.codename1.media.Media; import java.io.IOException; | import com.codename1.media.*; import java.io.*; | [
"com.codename1.media",
"java.io"
] | com.codename1.media; java.io; | 508,955 |
public boolean istPartnerEinAuftragteilnehmer(Integer iIdPartnerI,
Integer iIdAuftragI)
throws
ExceptionLP {
boolean bIstTeilnehmerO = false;
try {
bIstTeilnehmerO = auftragteilnehmerFac.istPartnerEinAuftragteilnehmer(
iIdPartnerI, i... | boolean function(Integer iIdPartnerI, Integer iIdAuftragI) throws ExceptionLP { boolean bIstTeilnehmerO = false; try { bIstTeilnehmerO = auftragteilnehmerFac.istPartnerEinAuftragteilnehmer( iIdPartnerI, iIdAuftragI); } catch (Throwable ex) { handleThrowable(ex); } return bIstTeilnehmerO; } | /**
* Feststellen, ob ein bestimmter Partner bereits in der Teilnehmerliste eines
* bestimmten Auftrags enthalten ist.
* @param iIdPartnerI PK des Partners
* @param iIdAuftragI PK des Auftrags
* @return boolean true, wenn der Partner in der Liste der Teilnehmer enthalten ist
* @throws ExceptionLP Ausn... | Feststellen, ob ein bestimmter Partner bereits in der Teilnehmerliste eines bestimmten Auftrags enthalten ist | istPartnerEinAuftragteilnehmer | {
"repo_name": "erdincay/lpclientpc",
"path": "src/com/lp/client/frame/delegate/AuftragteilnehmerDelegate.java",
"license": "agpl-3.0",
"size": 7367
} | [
"com.lp.client.frame.ExceptionLP"
] | import com.lp.client.frame.ExceptionLP; | import com.lp.client.frame.*; | [
"com.lp.client"
] | com.lp.client; | 2,398,713 |
@Override
public void changeModel(int step) {
if (step >= numberOfSteps) {
return;
}
if (values != null) {
if (singleClass) {
Double refST = (Double) ((Vector) values).get(step);
Distribution distr = (Distribution) stationDef.getServiceTimeDistribution(stationKey, classKey);
distr.s... | void function(int step) { if (step >= numberOfSteps) { return; } if (values != null) { if (singleClass) { Double refST = (Double) ((Vector) values).get(step); Distribution distr = (Distribution) stationDef.getServiceTimeDistribution(stationKey, classKey); distr.setMean(refST.doubleValue()); } else { for (int i = 0; i <... | /**
* Changes the model preparing it for the next step
*
*/ | Changes the model preparing it for the next step | changeModel | {
"repo_name": "chpatrick/jmt",
"path": "src/jmt/gui/common/definitions/parametric/ServiceTimesParametricAnalysis.java",
"license": "gpl-2.0",
"size": 15667
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,086,691 |
@Test
@SmallTest
@Feature({"Navigation"})
public void testLaunchActivity() {
// Launch chrome
mActivityTestRule.startMainActivityFromLauncher();
String currentUrl = ChromeTabUtils.getUrlStringOnUiThread(
mActivityTestRule.getActivity().getActivityTab());
A... | @Feature({STR}) void function() { mActivityTestRule.startMainActivityFromLauncher(); String currentUrl = ChromeTabUtils.getUrlStringOnUiThread( mActivityTestRule.getActivity().getActivityTab()); Assert.assertNotNull(currentUrl); Assert.assertEquals(false, currentUrl.isEmpty()); } | /**
* Launch and verify URL is neither null nor empty.
*/ | Launch and verify URL is neither null nor empty | testLaunchActivity | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/javatests/src/org/chromium/chrome/browser/MainActivityWithURLTest.java",
"license": "bsd-3-clause",
"size": 3584
} | [
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.test.util.ChromeTabUtils",
"org.junit.Assert"
] | import org.chromium.base.test.util.Feature; import org.chromium.chrome.test.util.ChromeTabUtils; import org.junit.Assert; | import org.chromium.base.test.util.*; import org.chromium.chrome.test.util.*; import org.junit.*; | [
"org.chromium.base",
"org.chromium.chrome",
"org.junit"
] | org.chromium.base; org.chromium.chrome; org.junit; | 2,403,824 |
public static byte[] gzip(String input) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
GZIPOutputStream gzos = null;
try {
gzos = new GZIPOutputStream(baos);
gzos.write(input.getBytes("UTF-8"));
} catch (IOException e) {
e.printStackT... | static byte[] function(String input) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gzos = null; try { gzos = new GZIPOutputStream(baos); gzos.write(input.getBytes("UTF-8")); } catch (IOException e) { e.printStackTrace(); } finally { if (gzos != null) try { gzos.close(); } catch (IOExcepti... | /**
* GZip compress a string of bytes
*
* @param input
* @return
*/ | GZip compress a string of bytes | gzip | {
"repo_name": "Jabulba/VGScoreboardPing",
"path": "src/com/jabulba/vgscoreboardping/MetricsLite.java",
"license": "gpl-3.0",
"size": 17458
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.util.zip.GZIPOutputStream"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 190,499 |
synchronized SelectionKey register(SelectableChannel channel,
Object attachment) throws IOException {
SelectionKey key = null;
pendingChannels.add(channel);
pendingAttachments.add(attachment);
channel.configureBlocking(false);
selector.wakeup();
while ... | synchronized SelectionKey register(SelectableChannel channel, Object attachment) throws IOException { SelectionKey key = null; pendingChannels.add(channel); pendingAttachments.add(attachment); channel.configureBlocking(false); selector.wakeup(); while (key == null) { try { wait(); } catch (InterruptedException e) { } k... | /**
* Registers the given channel with our selector.
*
* @return The SelectionKey representing the registration, with the given
* attachment attached to it.
*/ | Registers the given channel with our selector | register | {
"repo_name": "jmaassen/AetherNIO",
"path": "src/nl/esciencecenter/aether/impl/nio/SendReceiveThread.java",
"license": "apache-2.0",
"size": 8090
} | [
"java.io.IOException",
"java.nio.channels.SelectableChannel",
"java.nio.channels.SelectionKey"
] | import java.io.IOException; import java.nio.channels.SelectableChannel; import java.nio.channels.SelectionKey; | import java.io.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,924,691 |
public static ims.core.patient.domain.objects.Patient extractPatient(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.PatientForEDDischargeVo valueObject)
{
return extractPatient(domainFactory, valueObject, new HashMap());
}
| static ims.core.patient.domain.objects.Patient function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.PatientForEDDischargeVo valueObject) { return extractPatient(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractPatient | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/PatientForEDDischargeVoAssembler.java",
"license": "agpl-3.0",
"size": 17520
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,581,117 |
protected void emit_aWireStiff_WSTerminalRuleCall_3_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
| void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); } | /**
* Syntax:
* WS?
*/ | Syntax: WS | emit_aWireStiff_WSTerminalRuleCall_3_q | {
"repo_name": "cooked/NDT",
"path": "sc.ndt.editor.bmodes.bmi/src-gen/sc/ndt/editor/bmodes/serializer/BmodesbmiSyntacticSequencer.java",
"license": "gpl-3.0",
"size": 75631
} | [
"java.util.List",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.nodemodel.INode",
"org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider"
] | import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider; | import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | java.util; org.eclipse.emf; org.eclipse.xtext; | 2,356,532 |
public int pwd() throws IOException
{
return sendCommand(FTPCommand.PWD);
}
/***
* A convenience method to send the FTP LIST command to the server,
* receive the reply, and return the reply code. Remember, it is up
* to you to manage the data connection. If you don't need this low
* level of access, ... | int function() throws IOException { return sendCommand(FTPCommand.PWD); } /*** * A convenience method to send the FTP LIST command to the server, * receive the reply, and return the reply code. Remember, it is up * to you to manage the data connection. If you don't need this low * level of access, use {@link org.netlin... | /***
* A convenience method to send the FTP PWD command to the server,
* receive the reply, and return the reply code.
* <p>
* @return The reply code received from the server.
* @exception FTPConnectionClosedException
* If the FTP server prematurely closes the connection as a result
* of the cli... | A convenience method to send the FTP PWD command to the server, receive the reply, and return the reply code. | pwd | {
"repo_name": "rwinston/netling",
"path": "src/main/java/org/netling/ftp/FTP.java",
"license": "apache-2.0",
"size": 62046
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 42,518 |
public List<ExpressRouteLinkInner> links() {
return this.links;
} | List<ExpressRouteLinkInner> function() { return this.links; } | /**
* Get the set of physical links of the ExpressRoutePort resource.
*
* @return the links value
*/ | Get the set of physical links of the ExpressRoutePort resource | links | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/ExpressRoutePortInner.java",
"license": "mit",
"size": 8879
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 800,096 |
public int readRawInt(int bits) throws IOException {
if (bits == 0) {
return 0;
}
int uval = 0;
for (int i = 0; i < bits; i++) {
uval = readBitToInt(uval);
}
// fix the sign
int val;
int bitsToleft = 32 - bits;
if (bits... | int function(int bits) throws IOException { if (bits == 0) { return 0; } int uval = 0; for (int i = 0; i < bits; i++) { uval = readBitToInt(uval); } int val; int bitsToleft = 32 - bits; if (bitsToleft != 0) { uval <<= bitsToleft; val = uval; val >>= bitsToleft; } else { val = uval; } return val; } | /**
* read bits into a signed integer.
*
* @param bits The number of bits to read
* @return The bits as a signed integer
* @throws IOException Thrown if error reading input stream
*/ | read bits into a signed integer | readRawInt | {
"repo_name": "dubenju/javay",
"path": "src/java/org/kc7bfi/jflac/io/BitInputStream.java",
"license": "apache-2.0",
"size": 26245
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 176,356 |
ImmutableList<SchemaOrgType> getAcquiredFromList(); | ImmutableList<SchemaOrgType> getAcquiredFromList(); | /**
* Returns the value list of property acquiredFrom. Empty list is returned if the property not set
* in current object.
*/ | Returns the value list of property acquiredFrom. Empty list is returned if the property not set in current object | getAcquiredFromList | {
"repo_name": "google/schemaorg-java",
"path": "src/main/java/com/google/schemaorg/core/OwnershipInfo.java",
"license": "apache-2.0",
"size": 7118
} | [
"com.google.common.collect.ImmutableList",
"com.google.schemaorg.SchemaOrgType"
] | import com.google.common.collect.ImmutableList; import com.google.schemaorg.SchemaOrgType; | import com.google.common.collect.*; import com.google.schemaorg.*; | [
"com.google.common",
"com.google.schemaorg"
] | com.google.common; com.google.schemaorg; | 1,500,821 |
public boolean canConnectFenceTo(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
int l = par1IBlockAccess.getBlockId(par2, par3, par4);
if (l != this.blockID && l != Block.fenceGate.blockID)
{
Block block = Block.blocksList[l];
return block != null... | boolean function(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { int l = par1IBlockAccess.getBlockId(par2, par3, par4); if (l != this.blockID && l != Block.fenceGate.blockID) { Block block = Block.blocksList[l]; return block != null && block.blockMaterial.isOpaque() && block.renderAsNormalBlock() ? block... | /**
* Returns true if the specified block can be connected by a fence
*/ | Returns true if the specified block can be connected by a fence | canConnectFenceTo | {
"repo_name": "zDeathKnight/VanillaAddon",
"path": "common/com/VanillaAddon/block/BlockFenceModtest.java",
"license": "gpl-3.0",
"size": 6137
} | [
"net.minecraft.block.Block",
"net.minecraft.block.material.Material",
"net.minecraft.world.IBlockAccess"
] | import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.world.IBlockAccess; | import net.minecraft.block.*; import net.minecraft.block.material.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.world; | 1,117,587 |
protected boolean validRoleNamespace(IdentityManagementRoleDocument roleDoc) {
boolean validRoleNamespace = false;
if(StringUtils.isNotBlank(roleDoc.getRoleNamespace())) {
validRoleNamespace = true;
}
else{
GlobalVariables.getMessageMap().putError("doc... | boolean function(IdentityManagementRoleDocument roleDoc) { boolean validRoleNamespace = false; if(StringUtils.isNotBlank(roleDoc.getRoleNamespace())) { validRoleNamespace = true; } else{ GlobalVariables.getMessageMap().putError(STR, RiceKeyConstants.ERROR_EMPTY_ENTRY, new String[] {STR}); } return validRoleNamespace; } | /**
* Ensures the {@link IdentityManagementRoleDocument} role namespace is not null or an empty string.
* @param roleDoc the {@link IdentityManagementRoleDocument} to validate.
* @return TRUE if the role namespace is not null or an empty string, FALSE otherwise.
*/ | Ensures the <code>IdentityManagementRoleDocument</code> role namespace is not null or an empty string | validRoleNamespace | {
"repo_name": "ricepanda/rice-git3",
"path": "rice-middleware/impl/src/main/java/org/kuali/rice/kim/document/rule/IdentityManagementRoleDocumentRule.java",
"license": "apache-2.0",
"size": 46012
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.util.RiceKeyConstants",
"org.kuali.rice.kim.document.IdentityManagementRoleDocument",
"org.kuali.rice.krad.util.GlobalVariables"
] | import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.util.RiceKeyConstants; import org.kuali.rice.kim.document.IdentityManagementRoleDocument; import org.kuali.rice.krad.util.GlobalVariables; | import org.apache.commons.lang.*; import org.kuali.rice.core.api.util.*; import org.kuali.rice.kim.document.*; import org.kuali.rice.krad.util.*; | [
"org.apache.commons",
"org.kuali.rice"
] | org.apache.commons; org.kuali.rice; | 80,589 |
protected void tearDown() {
// No-op.
}
}
private static class GridPingFutureAdapter<R> extends GridFutureAdapter<R> {
private final UUID nodeId;
private volatile Socket sock;
GridPingFutureAdapter(@Nullable UUID nodeId) {
... | void function() { } } private static class GridPingFutureAdapter<R> extends GridFutureAdapter<R> { private final UUID nodeId; private volatile Socket sock; GridPingFutureAdapter(@Nullable UUID nodeId) { this.nodeId = nodeId; } | /**
* Actions to be done before worker termination.
*/ | Actions to be done before worker termination | tearDown | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java",
"license": "apache-2.0",
"size": 337852
} | [
"java.net.Socket",
"org.apache.ignite.internal.util.future.GridFutureAdapter",
"org.jetbrains.annotations.Nullable"
] | import java.net.Socket; import org.apache.ignite.internal.util.future.GridFutureAdapter; import org.jetbrains.annotations.Nullable; | import java.net.*; import org.apache.ignite.internal.util.future.*; import org.jetbrains.annotations.*; | [
"java.net",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.net; org.apache.ignite; org.jetbrains.annotations; | 718,460 |
@VisibleForTesting
public Builder setSimpleTestingIndexSchema(@Nullable Boolean rollup, final AggregatorFactory... metrics)
{
IncrementalIndexSchema.Builder builder = new IncrementalIndexSchema.Builder().withMetrics(metrics);
this.incrementalIndexSchema = rollup != null ? builder.withRollup(roll... | Builder function(@Nullable Boolean rollup, final AggregatorFactory... metrics) { IncrementalIndexSchema.Builder builder = new IncrementalIndexSchema.Builder().withMetrics(metrics); this.incrementalIndexSchema = rollup != null ? builder.withRollup(rollup).build() : builder.build(); return this; } | /**
* A helper method to set a simple index schema with controllable metrics and rollup, and default values for the
* other parameters. Note that this method is normally used for testing and benchmarking; it is unlikely that you
* would use it in production settings.
*
* @param metrics variable... | A helper method to set a simple index schema with controllable metrics and rollup, and default values for the other parameters. Note that this method is normally used for testing and benchmarking; it is unlikely that you would use it in production settings | setSimpleTestingIndexSchema | {
"repo_name": "knoguchi/druid",
"path": "processing/src/main/java/org/apache/druid/segment/incremental/IncrementalIndex.java",
"license": "apache-2.0",
"size": 52139
} | [
"javax.annotation.Nullable",
"org.apache.druid.query.aggregation.AggregatorFactory"
] | import javax.annotation.Nullable; import org.apache.druid.query.aggregation.AggregatorFactory; | import javax.annotation.*; import org.apache.druid.query.aggregation.*; | [
"javax.annotation",
"org.apache.druid"
] | javax.annotation; org.apache.druid; | 1,302,178 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ProfileInner> listByResourceGroupAsync(String resourceGroupName) {
return new PagedFlux<>(
() -> listByResourceGroupSinglePageAsync(resourceGroupName),
nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ProfileInner> function(String resourceGroupName) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } | /**
* Lists all of the CDN profiles within a resource group.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by ser... | Lists all of the CDN profiles within a resource group | listByResourceGroupAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/ProfilesClientImpl.java",
"license": "mit",
"size": 111257
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.cdn.fluent.models.ProfileInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.cdn.fluent.models.ProfileInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.cdn.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 809,346 |
void runPeriodicStep(String policy, Metadata metadata, IndexMetadata indexMetadata) {
String index = indexMetadata.getIndex().getName();
LifecycleExecutionState lifecycleState = LifecycleExecutionState.fromIndexMetadata(indexMetadata);
final Step currentStep;
try {
curren... | void runPeriodicStep(String policy, Metadata metadata, IndexMetadata indexMetadata) { String index = indexMetadata.getIndex().getName(); LifecycleExecutionState lifecycleState = LifecycleExecutionState.fromIndexMetadata(indexMetadata); final Step currentStep; try { currentStep = getCurrentStep(stepRegistry, policy, ind... | /**
* Run the current step, only if it is an asynchronous wait step. These
* wait criteria are checked periodically from the ILM scheduler
*/ | Run the current step, only if it is an asynchronous wait step. These wait criteria are checked periodically from the ILM scheduler | runPeriodicStep | {
"repo_name": "nknize/elasticsearch",
"path": "x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/IndexLifecycleRunner.java",
"license": "apache-2.0",
"size": 27331
} | [
"org.elasticsearch.cluster.metadata.IndexMetadata",
"org.elasticsearch.cluster.metadata.Metadata",
"org.elasticsearch.xpack.core.ilm.AsyncWaitStep",
"org.elasticsearch.xpack.core.ilm.ErrorStep",
"org.elasticsearch.xpack.core.ilm.LifecycleExecutionState",
"org.elasticsearch.xpack.core.ilm.PhaseCompleteStep... | import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.xpack.core.ilm.AsyncWaitStep; import org.elasticsearch.xpack.core.ilm.ErrorStep; import org.elasticsearch.xpack.core.ilm.LifecycleExecutionState; import org.elasticsearch.xpack.core.ilm.... | import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.xpack.core.ilm.*; | [
"org.elasticsearch.cluster",
"org.elasticsearch.xpack"
] | org.elasticsearch.cluster; org.elasticsearch.xpack; | 1,664,525 |
private void fitImageToView() {
Drawable drawable = getDrawable();
if (drawable == null || drawable.getIntrinsicWidth() == 0 || drawable.getIntrinsicHeight() == 0) {
return;
}
if (matrix == null || prevMatrix == null) {
return;
}
int drawableW... | void function() { Drawable drawable = getDrawable(); if (drawable == null drawable.getIntrinsicWidth() == 0 drawable.getIntrinsicHeight() == 0) { return; } if (matrix == null prevMatrix == null) { return; } int drawableWidth = drawable.getIntrinsicWidth(); int drawableHeight = drawable.getIntrinsicHeight(); float scale... | /**
* If the normalizedScale is equal to 1, then the image is made to fit the screen. Otherwise,
* it is made to fit the screen according to the dimensions of the previous image matrix. This
* allows the image to maintain its zoom after rotation.
*/ | If the normalizedScale is equal to 1, then the image is made to fit the screen. Otherwise, it is made to fit the screen according to the dimensions of the previous image matrix. This allows the image to maintain its zoom after rotation | fitImageToView | {
"repo_name": "dbuscaglia/codepath_project_2",
"path": "app/src/main/java/danbuscaglia/googleimagesearch/components/TouchImageView.java",
"license": "apache-2.0",
"size": 42695
} | [
"android.graphics.Matrix",
"android.graphics.drawable.Drawable"
] | import android.graphics.Matrix; import android.graphics.drawable.Drawable; | import android.graphics.*; import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 864,514 |
public ITokenElement getElement() {
return element;
} | ITokenElement function() { return element; } | /**
* Returns the element which contains the comments.
*/ | Returns the element which contains the comments | getElement | {
"repo_name": "vimaier/conqat",
"path": "org.conqat.engine.text/src/org/conqat/engine/text/comments/Comment.java",
"license": "apache-2.0",
"size": 4195
} | [
"org.conqat.engine.sourcecode.resource.ITokenElement"
] | import org.conqat.engine.sourcecode.resource.ITokenElement; | import org.conqat.engine.sourcecode.resource.*; | [
"org.conqat.engine"
] | org.conqat.engine; | 967,760 |
public static void readFully(
InputStream in, byte[] b, int off, int len) throws IOException {
int read = read(in, b, off, len);
if (read != len) {
throw new EOFException("reached end of stream after reading "
+ read + " bytes; " + len + " bytes expected");
}
} | static void function( InputStream in, byte[] b, int off, int len) throws IOException { int read = read(in, b, off, len); if (read != len) { throw new EOFException(STR + read + STR + len + STR); } } | /**
* Attempts to read {@code len} bytes from the stream into the given array
* starting at {@code off}, with the same behavior as
* {@link DataInput#readFully(byte[], int, int)}. Does not close the
* stream.
*
* @param in the input stream to read from.
* @param b the buffer into which the data is ... | Attempts to read len bytes from the stream into the given array starting at off, with the same behavior as <code>DataInput#readFully(byte[], int, int)</code>. Does not close the stream | readFully | {
"repo_name": "LightSun/android-common-utils",
"path": "common-utils/third_sdks/src/main/java/com/heaven7/third/pay/ByteStreams.java",
"license": "apache-2.0",
"size": 6600
} | [
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.EOFException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,857,310 |
public void unload() throws IOException {
if(!csvParser.isClosed()) {
csvParser.close();
}
} | void function() throws IOException { if(!csvParser.isClosed()) { csvParser.close(); } } | /**
* This method saves the loaded CSV in its file
* @return
*/ | This method saves the loaded CSV in its file | unload | {
"repo_name": "onaio/OpenMapKit",
"path": "app/src/main/java/org/redcross/openmapkit/PullCsvBuilder.java",
"license": "bsd-3-clause",
"size": 9512
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 754,113 |
public final MetaProperty<Tenor> maturityTenor() {
return _maturityTenor;
} | final MetaProperty<Tenor> function() { return _maturityTenor; } | /**
* The meta-property for the {@code maturityTenor} property.
* @return the meta-property, not null
*/ | The meta-property for the maturityTenor property | maturityTenor | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/ircurve/strips/FXForwardNode.java",
"license": "apache-2.0",
"size": 16364
} | [
"com.opengamma.util.time.Tenor",
"org.joda.beans.MetaProperty"
] | import com.opengamma.util.time.Tenor; import org.joda.beans.MetaProperty; | import com.opengamma.util.time.*; import org.joda.beans.*; | [
"com.opengamma.util",
"org.joda.beans"
] | com.opengamma.util; org.joda.beans; | 1,200,584 |
private void verifySerialization(SegmentedTimeline a1) {
SegmentedTimeline a2 = null;
try {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutput out = new ObjectOutputStream(buffer);
out.writeObject(a1);
out.close();
O... | void function(SegmentedTimeline a1) { SegmentedTimeline a2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(a1); out.close(); ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray())); a2 = (Segmente... | /**
* Tests serialization of an instance.
* @param a1 The timeline to verify the serialization
*/ | Tests serialization of an instance | verifySerialization | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/axis/junit/SegmentedTimelineTests.java",
"license": "lgpl-3.0",
"size": 47122
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.ObjectInput",
"java.io.ObjectInputStream",
"java.io.ObjectOutput",
"java.io.ObjectOutputStream",
"org.jfree.chart.axis.SegmentedTimeline"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.jfree.chart.axis.SegmentedTimeline; | import java.io.*; import org.jfree.chart.axis.*; | [
"java.io",
"org.jfree.chart"
] | java.io; org.jfree.chart; | 187,205 |
protected static boolean matches(Class<?>[] types, Object[] instances) {
if (types==null) return instances==null || instances.length==0;
assert(types!=null);
if (instances==null) return types.length==0;
if (types.length==instances.length) {
for(int i=0; i<types.length; ++i) {
// Use the reflection uti... | static boolean function(Class<?>[] types, Object[] instances) { if (types==null) return instances==null instances.length==0; assert(types!=null); if (instances==null) return types.length==0; if (types.length==instances.length) { for(int i=0; i<types.length; ++i) { if (!ReflectionUtil.isInstance(types[i],instances[i])) ... | /** Test if the instances are matching the types.
*
* @param types
* @param instances
* @return <code>true</code> if the instances are matching the types;
* otherwise <code>false</code>.
*/ | Test if the instances are matching the types | matches | {
"repo_name": "tpiotrow/afc",
"path": "ui/swing/src/main/java/org/arakhne/afc/ui/swing/undo/UndoableAction.java",
"license": "apache-2.0",
"size": 5539
} | [
"org.arakhne.afc.vmutil.ReflectionUtil"
] | import org.arakhne.afc.vmutil.ReflectionUtil; | import org.arakhne.afc.vmutil.*; | [
"org.arakhne.afc"
] | org.arakhne.afc; | 2,293,223 |
public void execute(TransformerImpl transformer) throws TransformerException
{
transformer.pushCurrentTemplateRuleIsNull(true);
if (transformer.getDebug())
transformer.getTraceManager().fireTraceEvent(this);//trigger for-each element event
try
{
transformSelectedNodes(tran... | void function(TransformerImpl transformer) throws TransformerException { transformer.pushCurrentTemplateRuleIsNull(true); if (transformer.getDebug()) transformer.getTraceManager().fireTraceEvent(this); try { transformSelectedNodes(transformer); } finally { if (transformer.getDebug()) transformer.getTraceManager().fireT... | /**
* Execute the xsl:for-each transformation
*
* @param transformer non-null reference to the the current transform-time state.
*
* @throws TransformerException
*/ | Execute the xsl:for-each transformation | execute | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/templates/ElemForEach.java",
"license": "gpl-3.0",
"size": 15705
} | [
"javax.xml.transform.TransformerException",
"org.apache.xalan.transformer.TransformerImpl"
] | import javax.xml.transform.TransformerException; import org.apache.xalan.transformer.TransformerImpl; | import javax.xml.transform.*; import org.apache.xalan.transformer.*; | [
"javax.xml",
"org.apache.xalan"
] | javax.xml; org.apache.xalan; | 50,242 |
@GwtIncompatible // reflection
public static Method getListIteratorUnmodifiableMethod() {
return Helpers.getMethod(ListListIteratorTester.class, "testListIterator_unmodifiable");
} | @GwtIncompatible static Method function() { return Helpers.getMethod(ListListIteratorTester.class, STR); } | /**
* Returns the {@link Method} instance for
* {@link #testListIterator_unmodifiable()} so that it can be suppressed in
* GWT tests.
*/ | Returns the <code>Method</code> instance for <code>#testListIterator_unmodifiable()</code> so that it can be suppressed in GWT tests | getListIteratorUnmodifiableMethod | {
"repo_name": "DavesMan/guava",
"path": "guava-testlib/src/com/google/common/collect/testing/testers/ListListIteratorTester.java",
"license": "apache-2.0",
"size": 4600
} | [
"com.google.common.annotations.GwtIncompatible",
"com.google.common.collect.testing.Helpers",
"java.lang.reflect.Method"
] | import com.google.common.annotations.GwtIncompatible; import com.google.common.collect.testing.Helpers; import java.lang.reflect.Method; | import com.google.common.annotations.*; import com.google.common.collect.testing.*; import java.lang.reflect.*; | [
"com.google.common",
"java.lang"
] | com.google.common; java.lang; | 632,410 |
public Collection<HistogramQuestionScoresBean> getPartInfo()
{
return partInfo;
} | Collection<HistogramQuestionScoresBean> function() { return partInfo; } | /**
* the a collection of information for the active part
*
* @return the part info collection
*/ | the a collection of information for the active part | getPartInfo | {
"repo_name": "harfalm/Sakai-10.1",
"path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/HistogramScoresBean.java",
"license": "apache-2.0",
"size": 21829
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,843,165 |
protected boolean persistStringSet(Set<String> values) {
if (shouldPersist()) {
// Shouldn't store null
if (values.equals(getPersistedStringSet(null))) {
// It's already there, so the same as persisting
return true;
}
... | boolean function(Set<String> values) { if (shouldPersist()) { if (values.equals(getPersistedStringSet(null))) { return true; } SharedPreferences.Editor editor = mPreferenceManager.getEditor(); editor.putStringSet(mKey, values); tryCommit(editor); return true; } return false; } | /**
* Attempts to persist a set of Strings to the {@link android.content.SharedPreferences}.
* <p>
* This will check if this Preference is persistent, get an editor from
* the {@link PreferenceManager}, put in the strings, and check if we should commit (and
* commit if so).
*
* @para... | Attempts to persist a set of Strings to the <code>android.content.SharedPreferences</code>. This will check if this Preference is persistent, get an editor from the <code>PreferenceManager</code>, put in the strings, and check if we should commit (and commit if so) | persistStringSet | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/preference/Preference.java",
"license": "apache-2.0",
"size": 64205
} | [
"android.content.SharedPreferences",
"java.util.Set"
] | import android.content.SharedPreferences; import java.util.Set; | import android.content.*; import java.util.*; | [
"android.content",
"java.util"
] | android.content; java.util; | 2,484,024 |
public PhotoList getContactsPhotos(int count, boolean justFriends, boolean singlePhoto, boolean includeSelf)
throws IOException, FlickrException, JSONException {
return getContactsPhotos(count, Extras.MIN_EXTRAS, justFriends, singlePhoto, includeSelf, 0, 0);
} | PhotoList function(int count, boolean justFriends, boolean singlePhoto, boolean includeSelf) throws IOException, FlickrException, JSONException { return getContactsPhotos(count, Extras.MIN_EXTRAS, justFriends, singlePhoto, includeSelf, 0, 0); } | /**
* Get photos from the user's contacts.
*
* This method requires authentication with 'read' permission.
*
* @see com.googlecode.flickrjandroid.photos.Extras
* @param count The number of photos to return
* @param justFriends Set to true to only show friends photos
* @param sing... | Get photos from the user's contacts. This method requires authentication with 'read' permission | getContactsPhotos | {
"repo_name": "0570dev/flickr-glass",
"path": "src/com/googlecode/flickrjandroid/photos/PhotosInterface.java",
"license": "apache-2.0",
"size": 57549
} | [
"com.googlecode.flickrjandroid.FlickrException",
"java.io.IOException",
"org.json.JSONException"
] | import com.googlecode.flickrjandroid.FlickrException; import java.io.IOException; import org.json.JSONException; | import com.googlecode.flickrjandroid.*; import java.io.*; import org.json.*; | [
"com.googlecode.flickrjandroid",
"java.io",
"org.json"
] | com.googlecode.flickrjandroid; java.io; org.json; | 1,101,690 |
@Deprecated
public void writeUnknownGroup(final int fieldNumber,
final MessageLite value)
throws IOException {
writeGroup(fieldNumber, value);
} | void function(final int fieldNumber, final MessageLite value) throws IOException { writeGroup(fieldNumber, value); } | /**
* Write a group represented by an {@link UnknownFieldSet}.
*
* @deprecated UnknownFieldSet now implements MessageLite, so you can just
* call {@link #writeGroup}.
*/ | Write a group represented by an <code>UnknownFieldSet</code> | writeUnknownGroup | {
"repo_name": "spotify/ffwd-java",
"path": "protobuf250/src/main/java/com/spotify/ffwd/protobuf250/CodedOutputStream.java",
"license": "apache-2.0",
"size": 38935
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 417,830 |
Chronology getEffectiveChronology() {
Chronology chrono = currentParsed().chrono;
if (chrono == null) {
chrono = overrideChronology;
if (chrono == null) {
chrono = IsoChronology.INSTANCE;
}
}
return chrono;
} | Chronology getEffectiveChronology() { Chronology chrono = currentParsed().chrono; if (chrono == null) { chrono = overrideChronology; if (chrono == null) { chrono = IsoChronology.INSTANCE; } } return chrono; } | /**
* Gets the effective chronology during parsing.
*
* @return the effective parsing chronology, not null
*/ | Gets the effective chronology during parsing | getEffectiveChronology | {
"repo_name": "jnehlmeier/threetenbp",
"path": "src/main/java/org/threeten/bp/format/DateTimeParseContext.java",
"license": "bsd-3-clause",
"size": 17872
} | [
"org.threeten.bp.chrono.Chronology",
"org.threeten.bp.chrono.IsoChronology"
] | import org.threeten.bp.chrono.Chronology; import org.threeten.bp.chrono.IsoChronology; | import org.threeten.bp.chrono.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 1,909,611 |
private void applyRepresentation(boolean isFlat)
{
page = RequirementHelper.INSTANCE.getUpstreamPage();
if (page != null && !page.getViewer().getControl().isDisposed())
{
page.getUpstreamRequirementContentProvider().setIsFlat(isFlat);
if (page.getViewer() instance... | void function(boolean isFlat) { page = RequirementHelper.INSTANCE.getUpstreamPage(); if (page != null && !page.getViewer().getControl().isDisposed()) { page.getUpstreamRequirementContentProvider().setIsFlat(isFlat); if (page.getViewer() instanceof StructuredViewer) { ((StructuredViewer) page.getViewer()).refresh(false)... | /**
* Applies the right representation of the tree contents
*
* @param isFlat should we use the flat representation or the tree one ?
*/ | Applies the right representation of the tree contents | applyRepresentation | {
"repo_name": "pgaufillet/topcased-req",
"path": "plugins/org.topcased.requirement.core/src/org/topcased/requirement/core/handlers/FlatHandler.java",
"license": "epl-1.0",
"size": 3316
} | [
"org.eclipse.jface.viewers.StructuredViewer",
"org.topcased.requirement.core.utils.RequirementHelper"
] | import org.eclipse.jface.viewers.StructuredViewer; import org.topcased.requirement.core.utils.RequirementHelper; | import org.eclipse.jface.viewers.*; import org.topcased.requirement.core.utils.*; | [
"org.eclipse.jface",
"org.topcased.requirement"
] | org.eclipse.jface; org.topcased.requirement; | 1,317,721 |
public static void reattachStaticPackageSuperTypes(EPackage ePackage) {
if (ePackage.getNsURI().startsWith(IdocPackage.eNS_URI)) {
for (EClassifier eClassifier : ePackage.getEClassifiers()) {
if (eClassifier instanceof EClass) {
EClass eClass = (EClass) eClassifier;
EList<EClass> superTypes = eCla... | static void function(EPackage ePackage) { if (ePackage.getNsURI().startsWith(IdocPackage.eNS_URI)) { for (EClassifier eClassifier : ePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass) eClassifier; EList<EClass> superTypes = eClass.getESuperTypes(); for (int i = 0; i < superTypes.... | /**
* Re-attaches super types of Dynamic types derived from classes defined in static packaged.
* This operation is necessary when loading a
* package from storage since its EClasses reference the stored instance of
* static base package classes instead of static package in runtime.
*
* @param ePackage
*... | Re-attaches super types of Dynamic types derived from classes defined in static packaged. This operation is necessary when loading a package from storage since its EClasses reference the stored instance of static base package classes instead of static package in runtime | reattachStaticPackageSuperTypes | {
"repo_name": "DaemonSu/fuse-master",
"path": "components/camel-sap/org.fusesource.camel.component.sap/src/org/fusesource/camel/component/sap/util/Util.java",
"license": "apache-2.0",
"size": 20902
} | [
"org.eclipse.emf.common.util.EList",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EClassifier",
"org.eclipse.emf.ecore.EPackage",
"org.fusesource.camel.component.sap.model.idoc.IdocPackage",
"org.fusesource.camel.component.sap.model.rfc.RfcPackage"
] | import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; import org.fusesource.camel.component.sap.model.idoc.IdocPackage; import org.fusesource.camel.component.sap.model.rfc.RfcPackage; | import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*; import org.fusesource.camel.component.sap.model.idoc.*; import org.fusesource.camel.component.sap.model.rfc.*; | [
"org.eclipse.emf",
"org.fusesource.camel"
] | org.eclipse.emf; org.fusesource.camel; | 2,246,632 |
private static Transform tokenizeTransformation(String transformation)
throws NoSuchAlgorithmException {
if (transformation == null) {
throw new NoSuchAlgorithmException("No transformation given.");
}
String[] parts = new String[3];
int count = 0;
... | static Transform function(String transformation) throws NoSuchAlgorithmException { if (transformation == null) { throw new NoSuchAlgorithmException(STR); } String[] parts = new String[3]; int count = 0; StringTokenizer parser = new StringTokenizer(transformation, "/"); while (parser.hasMoreTokens() && count < 3) { part... | /**
* Gets the tokens of transformation.
*
* @param transformation the transformation.
* @return the {@link Transform} instance.
* @throws NoSuchAlgorithmException if the transformation is null.
*/ | Gets the tokens of transformation | tokenizeTransformation | {
"repo_name": "kexianda/commons-crypto",
"path": "src/main/java/org/apache/commons/crypto/cipher/OpenSsl.java",
"license": "apache-2.0",
"size": 14180
} | [
"java.security.NoSuchAlgorithmException",
"java.util.StringTokenizer"
] | import java.security.NoSuchAlgorithmException; import java.util.StringTokenizer; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 1,770,074 |
@Test
public void testCompact() {
BytesRef ref = new BytesRef();
int num = atLeast(2);
for (int j = 0; j < num; j++) {
int numEntries = 0;
final int size = 797;
BitSet bits = new BitSet(size);
for (int i = 0; i < size; i++) {
String str;
do {
str = TestU... | void function() { BytesRef ref = new BytesRef(); int num = atLeast(2); for (int j = 0; j < num; j++) { int numEntries = 0; final int size = 797; BitSet bits = new BitSet(size); for (int i = 0; i < size; i++) { String str; do { str = TestUtil.randomRealisticUnicodeString(random(), 1000); } while (str.length() == 0); ref... | /**
* Test method for {@link org.apache.lucene.util.BytesRefHash#compact()}.
*/ | Test method for <code>org.apache.lucene.util.BytesRefHash#compact()</code> | testCompact | {
"repo_name": "williamchengit/TestRepo",
"path": "solr-4.9.0/lucene/core/src/test/org/apache/lucene/util/TestBytesRefHash.java",
"license": "apache-2.0",
"size": 11746
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,880,509 |
@Override public void enterTypeParameter(@NotNull PJParser.TypeParameterContext ctx) { } | @Override public void enterTypeParameter(@NotNull PJParser.TypeParameterContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitPj | {
"repo_name": "Diolor/PJ",
"path": "src/main/java/com/lorentzos/pj/PJBaseListener.java",
"license": "mit",
"size": 73292
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 782,620 |
if (SDK_INT >= N && !registered) {
IntentFilter intentFilter = new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE");
context.getApplicationContext().registerReceiver(new TriggerReceiver(), intentFilter);
registered = true;
}
} | if (SDK_INT >= N && !registered) { IntentFilter intentFilter = new IntentFilter(STR); context.getApplicationContext().registerReceiver(new TriggerReceiver(), intentFilter); registered = true; } } | /**
* "Project Svelte" is just there to f**k things up...
*/ | "Project Svelte" is just there to f**k things up.. | register | {
"repo_name": "microg/android_packages_apps_GmsCore",
"path": "play-services-core/src/main/java/org/microg/gms/gcm/TriggerReceiver.java",
"license": "apache-2.0",
"size": 4616
} | [
"android.content.IntentFilter"
] | import android.content.IntentFilter; | import android.content.*; | [
"android.content"
] | android.content; | 95,620 |
public List<ISuite> dispatch(IConfiguration configuration,
List<XmlSuite> suites, String outputDir, List<ITestListener> testListeners){
List<ISuite> result = Lists.newArrayList();
try
{
//
// Dispatch the suites/tests
//
for (XmlSuite suite : suites) {
suite.setVerbose(m_verbose... | List<ISuite> function(IConfiguration configuration, List<XmlSuite> suites, String outputDir, List<ITestListener> testListeners){ List<ISuite> result = Lists.newArrayList(); try { for (XmlSuite suite : suites) { suite.setVerbose(m_verbose); SuiteRunner suiteRunner = new SuiteRunner(configuration, suite, outputDir); Remo... | /**
* Dispatch test suites
* @return suites result
*/ | Dispatch test suites | dispatch | {
"repo_name": "s2oBCN/testng",
"path": "src/main/java/org/testng/remote/SuiteDispatcher.java",
"license": "apache-2.0",
"size": 5418
} | [
"java.util.Collection",
"java.util.List",
"org.testng.ISuite",
"org.testng.ISuiteResult",
"org.testng.ITestListener",
"org.testng.ITestResult",
"org.testng.SuiteRunner",
"org.testng.collections.Lists",
"org.testng.internal.IConfiguration",
"org.testng.internal.Invoker",
"org.testng.remote.adapte... | import java.util.Collection; import java.util.List; import org.testng.ISuite; import org.testng.ISuiteResult; import org.testng.ITestListener; import org.testng.ITestResult; import org.testng.SuiteRunner; import org.testng.collections.Lists; import org.testng.internal.IConfiguration; import org.testng.internal.Invoker;... | import java.util.*; import org.testng.*; import org.testng.collections.*; import org.testng.internal.*; import org.testng.remote.adapter.*; import org.testng.xml.*; | [
"java.util",
"org.testng",
"org.testng.collections",
"org.testng.internal",
"org.testng.remote",
"org.testng.xml"
] | java.util; org.testng; org.testng.collections; org.testng.internal; org.testng.remote; org.testng.xml; | 378,753 |
private JSONWriter append(String s) throws JSONException {
if (s == null) {
throw new JSONException("Null pointer");
}
if (this.mode == 'o' || this.mode == 'a') {
try {
if (this.comma && this.mode == 'a') {
this.writer.write(',');
... | JSONWriter function(String s) throws JSONException { if (s == null) { throw new JSONException(STR); } if (this.mode == 'o' this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.write(','); } this.writer.write(s); } catch (IOException e) { throw new JSONException(e); } if (this.mode == 'o') { this.... | /**
* Append a value.
*
* @param s A string value.
* @return this.
* @throws JSONException If the value is out of sequence.
*/ | Append a value | append | {
"repo_name": "NetEase-Cloudsearch/streamproxy-sdk-java",
"path": "streamproxy-sdk-java/src/main/java/com/netease/cloud/util/json/JSONWriter.java",
"license": "apache-2.0",
"size": 9523
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,040,549 |
private static String validateOrderItemShipGroupAssoc(Delegator delegator, LocalDispatcher dispatcher, GenericValue orderItem, BigDecimal totalQuantity, GenericValue lastOISGAssoc, GenericValue userLogin, Locale locale)
throws GeneralException {
String result = null;
BigDecimal qty = (Big... | static String function(Delegator delegator, LocalDispatcher dispatcher, GenericValue orderItem, BigDecimal totalQuantity, GenericValue lastOISGAssoc, GenericValue userLogin, Locale locale) throws GeneralException { String result = null; BigDecimal qty = (BigDecimal) orderItem.get(STR); if (UtilValidate.isEmpty(qty)) { ... | /**
* Validate OrderItemShipGroupAssoc quantity
* This service should be called after updateOrderItemShipGroupAssoc
* test if orderItem quantity equals OrderItemShipGroupAssocs quantities
* if not then get the last orderItemShipgroupAssoc estimated shipDate and add quantity to this OrderItemShipGrou... | Validate OrderItemShipGroupAssoc quantity This service should be called after updateOrderItemShipGroupAssoc test if orderItem quantity equals OrderItemShipGroupAssocs quantities if not then get the last orderItemShipgroupAssoc estimated shipDate and add quantity to this OrderItemShipGroupAssoc | validateOrderItemShipGroupAssoc | {
"repo_name": "gehaisong/ofbiz-16.11.02",
"path": "applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java",
"license": "apache-2.0",
"size": 365145
} | [
"java.math.BigDecimal",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.List",
"java.util.Locale",
"java.util.Map",
"org.apache.ofbiz.base.util.Debug",
"org.apache.ofbiz.base.util.GeneralException",
"org.apache.ofbiz.base.util.UtilMisc",
"org.apache.ofbiz.base.util.UtilValidate",
"org.ap... | import java.math.BigDecimal; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Map; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.GeneralException; import org.apache.ofbiz.base.util.UtilMisc; import org.apache.ofbiz.base.... | import java.math.*; import java.util.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.entity.util.*; import org.apache.ofbiz.service.*; | [
"java.math",
"java.util",
"org.apache.ofbiz"
] | java.math; java.util; org.apache.ofbiz; | 2,867,519 |
public static EmbeddableHierarchy createEmbeddableHierarchy(Class<?> embeddableClass, String propertyName, AccessType accessType, AnnotationBindingContext context) {
ClassInfo embeddableClassInfo = context.getClassInfo( embeddableClass.getName() );
if ( embeddableClassInfo == null ) {
throw new AssertionFail... | static EmbeddableHierarchy function(Class<?> embeddableClass, String propertyName, AccessType accessType, AnnotationBindingContext context) { ClassInfo embeddableClassInfo = context.getClassInfo( embeddableClass.getName() ); if ( embeddableClassInfo == null ) { throw new AssertionFailure( String.format( STR, embeddable... | /**
* Builds the configured class hierarchy for a an embeddable class.
*
* @param embeddableClass the top level embedded class
* @param propertyName the name of the property in the entity class embedding this embeddable
* @param accessType the access type inherited from the class in which the embeddable gets ... | Builds the configured class hierarchy for a an embeddable class | createEmbeddableHierarchy | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EmbeddableHierarchy.java",
"license": "mit",
"size": 5102
} | [
"java.util.ArrayList",
"java.util.List",
"javax.persistence.AccessType",
"org.hibernate.AssertionFailure",
"org.hibernate.metamodel.source.annotations.AnnotationBindingContext",
"org.hibernate.metamodel.source.annotations.JPADotNames",
"org.hibernate.metamodel.source.annotations.JandexHelper",
"org.jb... | import java.util.ArrayList; import java.util.List; import javax.persistence.AccessType; import org.hibernate.AssertionFailure; import org.hibernate.metamodel.source.annotations.AnnotationBindingContext; import org.hibernate.metamodel.source.annotations.JPADotNames; import org.hibernate.metamodel.source.annotations.Jand... | import java.util.*; import javax.persistence.*; import org.hibernate.*; import org.hibernate.metamodel.source.annotations.*; import org.jboss.jandex.*; | [
"java.util",
"javax.persistence",
"org.hibernate",
"org.hibernate.metamodel",
"org.jboss.jandex"
] | java.util; javax.persistence; org.hibernate; org.hibernate.metamodel; org.jboss.jandex; | 1,086,487 |
EClass getGradientColorDefinition(); | EClass getGradientColorDefinition(); | /**
* Returns the meta object for class '{@link fr.obeo.dsl.sPrototyper.GradientColorDefinition <em>Gradient Color Definition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Gradient Color Definition</em>'.
* @see fr.obeo.dsl.sPrototyper.GradientColorDef... | Returns the meta object for class '<code>fr.obeo.dsl.sPrototyper.GradientColorDefinition Gradient Color Definition</code>'. | getGradientColorDefinition | {
"repo_name": "glefur/s-prototyper",
"path": "plugins/fr.obeo.dsl.sprototyper/src-gen/fr/obeo/dsl/sPrototyper/SPrototyperPackage.java",
"license": "apache-2.0",
"size": 98928
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,402,571 |
private GamePanel createInventory(ActionListener listener) {
GamePanel result = new GamePanel(true);
result.setLayout(new BorderLayout());
result.setGradientColor(GuiStatics.GRADIENT_COLOR_BLUE);
GamePanel backPackPanel = new GamePanel(true);
backPackPanel.setLayout(new BorderLayout());
b... | GamePanel function(ActionListener listener) { GamePanel result = new GamePanel(true); result.setLayout(new BorderLayout()); result.setGradientColor(GuiStatics.GRADIENT_COLOR_BLUE); GamePanel backPackPanel = new GamePanel(true); backPackPanel.setLayout(new BorderLayout()); backPackPanel.setGradientColor(GuiStatics.GRADI... | /**
* Create Inventory panel
* @param listener ActionListener
* @return GamePanel
*/ | Create Inventory panel | createInventory | {
"repo_name": "tuomount/JHeroes",
"path": "src/org/jheroes/game/GameCharacterSheet.java",
"license": "gpl-2.0",
"size": 41516
} | [
"java.awt.BorderLayout",
"java.awt.GridLayout",
"java.awt.event.ActionListener",
"javax.swing.BoxLayout",
"javax.swing.JScrollPane",
"org.jheroes.gui.ActionCommands",
"org.jheroes.gui.GuiStatics",
"org.jheroes.gui.buttons.GameButton",
"org.jheroes.gui.buttons.ItemButton",
"org.jheroes.gui.labels.G... | import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.ActionListener; import javax.swing.BoxLayout; import javax.swing.JScrollPane; import org.jheroes.gui.ActionCommands; import org.jheroes.gui.GuiStatics; import org.jheroes.gui.buttons.GameButton; import org.jheroes.gui.buttons.ItemButton; im... | import java.awt.*; import java.awt.event.*; import javax.swing.*; import org.jheroes.gui.*; import org.jheroes.gui.buttons.*; import org.jheroes.gui.labels.*; import org.jheroes.gui.lists.*; import org.jheroes.gui.panels.*; import org.jheroes.map.item.*; | [
"java.awt",
"javax.swing",
"org.jheroes.gui",
"org.jheroes.map"
] | java.awt; javax.swing; org.jheroes.gui; org.jheroes.map; | 1,785,131 |
@Override
protected synchronized void startInternal() throws LifecycleException {
super.startInternal();
if (store == null)
log.error("No Store configured, persistence disabled");
else if (store instanceof Lifecycle)
((Lifecycle)store).start();
setState... | synchronized void function() throws LifecycleException { super.startInternal(); if (store == null) log.error(STR); else if (store instanceof Lifecycle) ((Lifecycle)store).start(); setState(LifecycleState.STARTING); } | /**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/ | Start this component and implement the requirements of <code>org.apache.catalina.util.LifecycleBase#startInternal()</code> | startInternal | {
"repo_name": "SourceStudyNotes/Tomcat8",
"path": "src/main/java/org/apache/catalina/session/PersistentManagerBase.java",
"license": "apache-2.0",
"size": 33366
} | [
"org.apache.catalina.Lifecycle",
"org.apache.catalina.LifecycleException",
"org.apache.catalina.LifecycleState"
] | import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,506,069 |
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>POST</code> method | doPost | {
"repo_name": "stoiandan/msg-code",
"path": "Adelina/Project3/DVDLibrary/src/main/java/com/msgsystems/dvdlibrary/SerDVDItem.java",
"license": "mit",
"size": 2945
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 113,929 |
double getCapacityRatio(StorageType storageType) {
// If capacity ratio is set, return the val.
if (capacityRatioMap.containsKey(storageType)) {
return capacityRatioMap.get(storageType);
}
// If capacity ratio is set for counterpart,
// use the rest of capacity of the mount for it.
if (!... | double getCapacityRatio(StorageType storageType) { if (capacityRatioMap.containsKey(storageType)) { return capacityRatioMap.get(storageType); } if (!capacityRatioMap.isEmpty()) { double leftOver = 1; for (Map.Entry<StorageType, Double> e : capacityRatioMap.entrySet()) { leftOver -= e.getValue(); } return leftOver; } if... | /**
* Return configured capacity ratio.
*/ | Return configured capacity ratio | getCapacityRatio | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/MountVolumeInfo.java",
"license": "apache-2.0",
"size": 4935
} | [
"java.util.Map",
"org.apache.hadoop.fs.StorageType"
] | import java.util.Map; import org.apache.hadoop.fs.StorageType; | import java.util.*; import org.apache.hadoop.fs.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,164,360 |
@Override
public String getText(Object object) {
String label = ((InitialNode) object).getComment();
return label == null || label.length() == 0 ? getString("_UI_InitialNode_type") : //$NON-NLS-1$
getString("_UI_InitialNode_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
} | String function(Object object) { String label = ((InitialNode) object).getComment(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "aljoschability/eclipse-stodito",
"path": "bundles/com.aljoschability.eclipse.stodito.edit/src-gen/com/aljoschability/eclipse/stodito/providers/InitialNodeItemProvider.java",
"license": "epl-1.0",
"size": 3370
} | [
"com.aljoschability.eclipse.stodito.InitialNode"
] | import com.aljoschability.eclipse.stodito.InitialNode; | import com.aljoschability.eclipse.stodito.*; | [
"com.aljoschability.eclipse"
] | com.aljoschability.eclipse; | 405,071 |
void recycleViewInternal(View view) {
recycleViewHolderInternal(getChildViewHolderInt(view));
} | void recycleViewInternal(View view) { recycleViewHolderInternal(getChildViewHolderInt(view)); } | /**
* Internally, use this method instead of {@link #recycleView(android.view.View)} to
* catch potential bugs.
* @param view
*/ | Internally, use this method instead of <code>#recycleView(android.view.View)</code> to catch potential bugs | recycleViewInternal | {
"repo_name": "maoProgrammer/Telema",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 438207
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,238,159 |
@Override
public void setShadowGenerator(ShadowGenerator generator) {
setNotify(false);
super.setShadowGenerator(generator);
Iterator iterator = this.subplots.iterator();
while (iterator.hasNext()) {
XYPlot plot = (XYPlot) iterator.next();
plot.setS... | void function(ShadowGenerator generator) { setNotify(false); super.setShadowGenerator(generator); Iterator iterator = this.subplots.iterator(); while (iterator.hasNext()) { XYPlot plot = (XYPlot) iterator.next(); plot.setShadowGenerator(generator); } setNotify(true); } | /**
* Sets the shadow generator for the plot (and all subplots) and sends
* a {@link PlotChangeEvent} to all registered listeners.
*
* @param generator the new generator (<code>null</code> permitted).
*/ | Sets the shadow generator for the plot (and all subplots) and sends a <code>PlotChangeEvent</code> to all registered listeners | setShadowGenerator | {
"repo_name": "sternze/CurrentTopics_JFreeChart",
"path": "source/org/jfree/chart/plot/CombinedRangeXYPlot.java",
"license": "lgpl-2.1",
"size": 27079
} | [
"java.util.Iterator",
"org.jfree.chart.util.ShadowGenerator"
] | import java.util.Iterator; import org.jfree.chart.util.ShadowGenerator; | import java.util.*; import org.jfree.chart.util.*; | [
"java.util",
"org.jfree.chart"
] | java.util; org.jfree.chart; | 436,289 |
public void setResourceIdResolver(ResourceIdResolver resourceIdResolver) {
this.resourceIdResolver = resourceIdResolver;
} | void function(ResourceIdResolver resourceIdResolver) { this.resourceIdResolver = resourceIdResolver; } | /**
* Configures an optional {@link org.springframework.cloud.aws.core.env.ResourceIdResolver} used to resolve a logical name to a
* physical one.
*
* @param resourceIdResolver
* - the resourceIdResolver instance, might be null or not called at all
*/ | Configures an optional <code>org.springframework.cloud.aws.core.env.ResourceIdResolver</code> used to resolve a logical name to a physical one | setResourceIdResolver | {
"repo_name": "sbuettner/spring-cloud-aws",
"path": "spring-cloud-aws-jdbc/src/main/java/org/springframework/cloud/aws/jdbc/rds/AmazonRdsDataSourceFactoryBean.java",
"license": "apache-2.0",
"size": 7896
} | [
"org.springframework.cloud.aws.core.env.ResourceIdResolver"
] | import org.springframework.cloud.aws.core.env.ResourceIdResolver; | import org.springframework.cloud.aws.core.env.*; | [
"org.springframework.cloud"
] | org.springframework.cloud; | 1,527,535 |
private void writeChunkToNBT(Chunk chunkIn, World worldIn, NBTTagCompound compound)
{
compound.setInteger("xPos", chunkIn.xPosition);
compound.setInteger("zPos", chunkIn.zPosition);
compound.setLong("LastUpdate", worldIn.getTotalWorldTime());
compound.setIntArray("HeightMap", chu... | void function(Chunk chunkIn, World worldIn, NBTTagCompound compound) { compound.setInteger("xPos", chunkIn.xPosition); compound.setInteger("zPos", chunkIn.zPosition); compound.setLong(STR, worldIn.getTotalWorldTime()); compound.setIntArray(STR, chunkIn.getHeightMap()); compound.setBoolean(STR, chunkIn.isTerrainPopulate... | /**
* Writes the Chunk passed as an argument to the NBTTagCompound also passed, using the World argument to retrieve
* the Chunk's last update time.
*/ | Writes the Chunk passed as an argument to the NBTTagCompound also passed, using the World argument to retrieve the Chunk's last update time | writeChunkToNBT | {
"repo_name": "Im-Jrotica/forge_latest",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/chunk/storage/AnvilChunkLoader.java",
"license": "lgpl-2.1",
"size": 25079
} | [
"java.util.List",
"net.minecraft.block.Block",
"net.minecraft.entity.Entity",
"net.minecraft.nbt.NBTTagCompound",
"net.minecraft.nbt.NBTTagList",
"net.minecraft.tileentity.TileEntity",
"net.minecraft.util.ResourceLocation",
"net.minecraft.world.NextTickListEntry",
"net.minecraft.world.World",
"net... | import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.NextTickListEntry; import net.mine... | import java.util.*; import net.minecraft.block.*; import net.minecraft.entity.*; import net.minecraft.nbt.*; import net.minecraft.tileentity.*; import net.minecraft.util.*; import net.minecraft.world.*; import net.minecraft.world.chunk.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.nbt",
"net.minecraft.tileentity",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.entity; net.minecraft.nbt; net.minecraft.tileentity; net.minecraft.util; net.minecraft.world; | 1,211,726 |
public static void addOwnerDataToSelectedModuleOptional(ItemStack toolStack, ModuleType moduleType, Entity entity, boolean isPublic)
{
OwnerData data = getOwnerDataFromSelectedModule(toolStack, moduleType);
if (data == null)
{
writeOwnerTagToSelectedModule(toolStack, moduleT... | static void function(ItemStack toolStack, ModuleType moduleType, Entity entity, boolean isPublic) { OwnerData data = getOwnerDataFromSelectedModule(toolStack, moduleType); if (data == null) { writeOwnerTagToSelectedModule(toolStack, moduleType, entity, isPublic); } } | /**
* Adds OwnerData to the selected module in the item, but only if it doesn't exist yet.
*/ | Adds OwnerData to the selected module in the item, but only if it doesn't exist yet | addOwnerDataToSelectedModuleOptional | {
"repo_name": "maruohon/enderutilities",
"path": "src/main/java/fi/dy/masa/enderutilities/util/nbt/OwnerData.java",
"license": "gpl-3.0",
"size": 12699
} | [
"fi.dy.masa.enderutilities.item.base.ItemModule",
"net.minecraft.entity.Entity",
"net.minecraft.item.ItemStack"
] | import fi.dy.masa.enderutilities.item.base.ItemModule; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; | import fi.dy.masa.enderutilities.item.base.*; import net.minecraft.entity.*; import net.minecraft.item.*; | [
"fi.dy.masa",
"net.minecraft.entity",
"net.minecraft.item"
] | fi.dy.masa; net.minecraft.entity; net.minecraft.item; | 1,123,907 |
public void check() {
if (type == null) {
throw new BuildException(
"classname attribute must be set for provider element",
getLocation());
}
if (type.length() == 0) {
throw new BuildException(
"Invalid empty classname",... | void function() { if (type == null) { throw new BuildException( STR, getLocation()); } if (type.length() == 0) { throw new BuildException( STR, getLocation()); } } | /**
* Check if the component has been configured correctly.
*/ | Check if the component has been configured correctly | check | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/types/spi/Provider.java",
"license": "mit",
"size": 2056
} | [
"org.apache.tools.ant.BuildException"
] | import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.*; | [
"org.apache.tools"
] | org.apache.tools; | 1,888,528 |
public void paintComponent(Graphics gx) {
super.paintComponent(gx);
if (m_isEnabled) {
if (m_isNumeric) {
m_oldWidth = -9000; //done so that if change back to nom, it will
//work
this.removeAll();
paintNumeric(gx);
} else {
if (m_Instances != null &&
m_Instances.numInstances() > 0 && ... | void function(Graphics gx) { super.paintComponent(gx); if (m_isEnabled) { if (m_isNumeric) { m_oldWidth = -9000; this.removeAll(); paintNumeric(gx); } else { if (m_Instances != null && m_Instances.numInstances() > 0 && m_Instances.numAttributes() > 0) { if (m_oldWidth != this.getWidth()) { this.removeAll(); m_oldWidth ... | /**
* Renders this component
* @param gx the graphics context
*/ | Renders this component | paintComponent | {
"repo_name": "williamClanton/jbossBA",
"path": "weka/src/main/java/weka/gui/visualize/ClassPanel.java",
"license": "gpl-2.0",
"size": 20162
} | [
"java.awt.Graphics"
] | import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,938,998 |
public String[] getPathName()
{
String[] pathName = new String[path.size()];
int index=0;
for(Group group : path)
pathName[index++] = group.getName();
return pathName;
} | String[] function() { String[] pathName = new String[path.size()]; int index=0; for(Group group : path) pathName[index++] = group.getName(); return pathName; } | /**
* Return the names of the Group instances in the path as a String array, which
* is the way that the Cache usually deals with paths.
* @return
*/ | Return the names of the Group instances in the path as a String array, which is the way that the Cache usually deals with paths | getPathName | {
"repo_name": "VHAINNOVATIONS/Telepathology",
"path": "Source/Java/CacheAPI/main/src/java/gov/va/med/imaging/storage/cache/impl/GroupPath.java",
"license": "apache-2.0",
"size": 1810
} | [
"gov.va.med.imaging.storage.cache.Group"
] | import gov.va.med.imaging.storage.cache.Group; | import gov.va.med.imaging.storage.cache.*; | [
"gov.va.med"
] | gov.va.med; | 2,727,261 |
public void setJmsOperations(JmsOperations jmsOperations) {
this.jmsOperations = jmsOperations;
} | void function(JmsOperations jmsOperations) { this.jmsOperations = jmsOperations; } | /**
* Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface.
* Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs.
*/ | Allows you to use your own implementation of the org.springframework.jms.core.JmsOperations interface. Camel uses JmsTemplate as default. Can be used for testing purpose, but not used much as stated in the spring API docs | setJmsOperations | {
"repo_name": "Fabryprog/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java",
"license": "apache-2.0",
"size": 107870
} | [
"org.springframework.jms.core.JmsOperations"
] | import org.springframework.jms.core.JmsOperations; | import org.springframework.jms.core.*; | [
"org.springframework.jms"
] | org.springframework.jms; | 891,057 |
@RestrictedApi(explanation = "Should only be called in tests", link = "",
allowedOnPath = ".*/src/test/.*")
boolean isStreamUnsupported() {
return streamUnsupported;
} | @RestrictedApi(explanation = STR, link = STR.*/src/test/.*") boolean isStreamUnsupported() { return streamUnsupported; } | /**
* For tests only, returns whether the passed stream is supported
*/ | For tests only, returns whether the passed stream is supported | isStreamUnsupported | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/InputStreamBlockDistribution.java",
"license": "apache-2.0",
"size": 6678
} | [
"com.google.errorprone.annotations.RestrictedApi"
] | import com.google.errorprone.annotations.RestrictedApi; | import com.google.errorprone.annotations.*; | [
"com.google.errorprone"
] | com.google.errorprone; | 1,989,239 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.