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
@ManyToMany(mappedBy = "hybridizations", targetEntity = AbstractArrayData.class, fetch = FetchType.LAZY) @Where(clause = "discriminator = '" + DerivedArrayData.DISCRIMINATOR + "'") @Cascade({ CascadeType.DELETE, CascadeType.SAVE_UPDATE }) public Set<DerivedArrayData> getDerivedDataCollection() { ...
@ManyToMany(mappedBy = STR, targetEntity = AbstractArrayData.class, fetch = FetchType.LAZY) @Where(clause = STR + DerivedArrayData.DISCRIMINATOR + "'") @Cascade({ CascadeType.DELETE, CascadeType.SAVE_UPDATE }) Set<DerivedArrayData> function() { return this.derivedDataCollection; }
/** * Gets the derivedDatas. * * @return the derivedDatas */
Gets the derivedDatas
getDerivedDataCollection
{ "repo_name": "NCIP/caarray", "path": "software/caarray-common.jar/src/main/java/gov/nih/nci/caarray/domain/hybridization/Hybridization.java", "license": "bsd-3-clause", "size": 18173 }
[ "gov.nih.nci.caarray.domain.data.AbstractArrayData", "gov.nih.nci.caarray.domain.data.DerivedArrayData", "java.util.Set", "javax.persistence.FetchType", "javax.persistence.ManyToMany", "org.hibernate.annotations.Cascade", "org.hibernate.annotations.CascadeType", "org.hibernate.annotations.Where" ]
import gov.nih.nci.caarray.domain.data.AbstractArrayData; import gov.nih.nci.caarray.domain.data.DerivedArrayData; import java.util.Set; import javax.persistence.FetchType; import javax.persistence.ManyToMany; import org.hibernate.annotations.Cascade; import org.hibernate.annotations.CascadeType; import org.hibernate.a...
import gov.nih.nci.caarray.domain.data.*; import java.util.*; import javax.persistence.*; import org.hibernate.annotations.*;
[ "gov.nih.nci", "java.util", "javax.persistence", "org.hibernate.annotations" ]
gov.nih.nci; java.util; javax.persistence; org.hibernate.annotations;
2,537,321
public void setParentAuthor(AccountName parentAuthor) { if (parentAuthor == null) { this.parentAuthor = new AccountName(""); } else { this.parentAuthor = parentAuthor; } }
void function(AccountName parentAuthor) { if (parentAuthor == null) { this.parentAuthor = new AccountName(""); } else { this.parentAuthor = parentAuthor; } }
/** * Set the author of the parent article you want to comment on. If you want * to create a new post, set this field to null or an empty account name. * * @param parentAuthor * The author of the parent article you want to comment on. * @throws InvalidParameterException * ...
Set the author of the parent article you want to comment on. If you want to create a new post, set this field to null or an empty account name
setParentAuthor
{ "repo_name": "marvin-we/steem-java-api-wrapper", "path": "core/src/main/java/eu/bittrade/libs/steemj/protocol/operations/CommentOperation.java", "license": "gpl-3.0", "size": 14234 }
[ "eu.bittrade.libs.steemj.protocol.AccountName" ]
import eu.bittrade.libs.steemj.protocol.AccountName;
import eu.bittrade.libs.steemj.protocol.*;
[ "eu.bittrade.libs" ]
eu.bittrade.libs;
220,650
preRenderScale((EntityBear) par1EntityLiving, par2); }
preRenderScale((EntityBear) par1EntityLiving, par2); }
/** * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: * entityLiving, partialTickTime */
Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: entityLiving, partialTickTime
preRenderCallback
{ "repo_name": "bsun0000/TerraFirmaCraft", "path": "src/Common/com/bioxx/tfc/Render/RenderBear.java", "license": "gpl-3.0", "size": 2472 }
[ "com.bioxx.tfc.Entities" ]
import com.bioxx.tfc.Entities;
import com.bioxx.tfc.*;
[ "com.bioxx.tfc" ]
com.bioxx.tfc;
1,207,154
public ExpressRoutePortsClient getExpressRoutePorts() { return this.expressRoutePorts; } private final ExpressRouteLinksClient expressRouteLinks;
ExpressRoutePortsClient function() { return this.expressRoutePorts; } private final ExpressRouteLinksClient expressRouteLinks;
/** * Gets the ExpressRoutePortsClient object to access its operations. * * @return the ExpressRoutePortsClient object. */
Gets the ExpressRoutePortsClient object to access its operations
getExpressRoutePorts
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java", "license": "mit", "size": 182764 }
[ "com.azure.resourcemanager.network.fluent.ExpressRouteLinksClient", "com.azure.resourcemanager.network.fluent.ExpressRoutePortsClient" ]
import com.azure.resourcemanager.network.fluent.ExpressRouteLinksClient; import com.azure.resourcemanager.network.fluent.ExpressRoutePortsClient;
import com.azure.resourcemanager.network.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,355,220
public FancyMessage achievementTooltip(final Achievement which) { try { final Object achievement = Reflection.getMethod(Reflection.getOBCClass("CraftStatistic"), "getNMSAchievement", Achievement.class).invoke(null, which); return achievementTooltip((String) Reflection.getField(Reflec...
FancyMessage function(final Achievement which) { try { final Object achievement = Reflection.getMethod(Reflection.getOBCClass(STR), STR, Achievement.class).invoke(null, which); return achievementTooltip((String) Reflection.getField(Reflection.getNMSClass(STR), "name").get(achievement)); } catch (final IllegalAccessExce...
/** * Set the behavior of the current editing component to display information about an achievement when the client hovers over the text. * <p>Tooltips do not inherit display characteristics, such as color and styles, from the message component on which they are applied.</p> * @param which The achievemen...
Set the behavior of the current editing component to display information about an achievement when the client hovers over the text. Tooltips do not inherit display characteristics, such as color and styles, from the message component on which they are applied
achievementTooltip
{ "repo_name": "SilverCory/PlotSquared", "path": "Bukkit/src/main/java/com/plotsquared/bukkit/chat/FancyMessage.java", "license": "gpl-3.0", "size": 41847 }
[ "java.lang.reflect.InvocationTargetException", "java.util.logging.Level", "org.bukkit.Achievement", "org.bukkit.Bukkit" ]
import java.lang.reflect.InvocationTargetException; import java.util.logging.Level; import org.bukkit.Achievement; import org.bukkit.Bukkit;
import java.lang.reflect.*; import java.util.logging.*; import org.bukkit.*;
[ "java.lang", "java.util", "org.bukkit" ]
java.lang; java.util; org.bukkit;
958,116
@Deprecated public void sendBlockChange(Location loc, int material, byte data);
void function(Location loc, int material, byte data);
/** * Send a block change. This fakes a block change packet for a user at a * certain location. This will not actually change the world in any way. * * @param loc The location of the changed block * @param material The new block ID * @param data The block data * @deprecated Magic valu...
Send a block change. This fakes a block change packet for a user at a certain location. This will not actually change the world in any way
sendBlockChange
{ "repo_name": "dentmaged/Bukkit", "path": "src/main/java/org/bukkit/entity/Player.java", "license": "gpl-3.0", "size": 37034 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
1,816,627
private static boolean stackEqualExact(ItemStack stack1, ItemStack stack2) { return stack1.getItem() == stack2.getItem() && (!stack1.getHasSubtypes() || stack1.getMetadata() == stack2.getMetadata()) && ItemStack.areItemStackTagsEqual(stack1, stack2); }
static boolean function(ItemStack stack1, ItemStack stack2) { return stack1.getItem() == stack2.getItem() && (!stack1.getHasSubtypes() stack1.getMetadata() == stack2.getMetadata()) && ItemStack.areItemStackTagsEqual(stack1, stack2); }
/** * Checks item, NBT, and meta if the item is not damageable */
Checks item, NBT, and meta if the item is not damageable
stackEqualExact
{ "repo_name": "DuelMonster/SuperMiner", "path": "src/main/java/duelmonster/superminer/objects/Globals.java", "license": "gpl-3.0", "size": 13217 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
2,169,510
@Test public void testGetMaxDataEncoding() { int[] expectedMaxForLevelL = new int[] { 17, 32, 53, 78, 106, 134, 154, 192, 230, 271, 321, 367, 425, 458, 520, 586, 644, 718, 792, 858, 929, 1003, 1091, 1171, 1273, 1367, 1465, 1528, 1628, 1732, 1840, 1952, 2068, 2188, 2303, 2431, 256...
void function() { int[] expectedMaxForLevelL = new int[] { 17, 32, 53, 78, 106, 134, 154, 192, 230, 271, 321, 367, 425, 458, 520, 586, 644, 718, 792, 858, 929, 1003, 1091, 1171, 1273, 1367, 1465, 1528, 1628, 1732, 1840, 1952, 2068, 2188, 2303, 2431, 2563, 2699, 2809, 2953 }; int[] expectedMaxForLevelH = new int[] { 7, ...
/** * Compare maximum QR code payload to maximums listed * in the QR standard, ISO/IEC 18004:2006. */
Compare maximum QR code payload to maximums listed in the QR standard, ISO/IEC 18004:2006
testGetMaxDataEncoding
{ "repo_name": "creswick/StreamingQR", "path": "development/qrlib/src/test/java/com/galois/qrstream/qrpipe/TransmitTest.java", "license": "apache-2.0", "size": 14096 }
[ "com.google.zxing.qrcode.decoder.ErrorCorrectionLevel" ]
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.google.zxing.qrcode.decoder.*;
[ "com.google.zxing" ]
com.google.zxing;
1,629,407
private void doEditButtonPressed() { List<JavadocLinkRef> selected= fListDialogField.getSelectedElements(); if (selected.isEmpty()) { return; } JavadocLinkRef obj= selected.get(0); if (obj != null) { JavadocPropertyDialog jdialog= new JavadocPropertyDialog(getShell(), obj); if (jdialog.open() == ...
void function() { List<JavadocLinkRef> selected= fListDialogField.getSelectedElements(); if (selected.isEmpty()) { return; } JavadocLinkRef obj= selected.get(0); if (obj != null) { JavadocPropertyDialog jdialog= new JavadocPropertyDialog(getShell(), obj); if (jdialog.open() == Window.OK) { fListDialogField.refresh(); }...
/** * Method doEditButtonPressed. */
Method doEditButtonPressed
doEditButtonPressed
{ "repo_name": "brunyuriy/quick-fix-scout", "path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/ui/javadocexport/JavadocStandardWizardPage.java", "license": "mit", "size": 22315 }
[ "java.util.List", "org.eclipse.jdt.internal.ui.preferences.JavadocConfigurationBlock", "org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener", "org.eclipse.jface.dialogs.StatusDialog", "org.eclipse.jface.window.Window", "org.eclipse.swt.widgets.Shell" ]
import java.util.List; import org.eclipse.jdt.internal.ui.preferences.JavadocConfigurationBlock; import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener; import org.eclipse.jface.dialogs.StatusDialog; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell;
import java.util.*; import org.eclipse.jdt.internal.ui.preferences.*; import org.eclipse.jdt.internal.ui.wizards.*; import org.eclipse.jface.dialogs.*; import org.eclipse.jface.window.*; import org.eclipse.swt.widgets.*;
[ "java.util", "org.eclipse.jdt", "org.eclipse.jface", "org.eclipse.swt" ]
java.util; org.eclipse.jdt; org.eclipse.jface; org.eclipse.swt;
747,868
EDataType getBundleException();
EDataType getBundleException();
/** * Returns the meta object for data type '{@link org.osgi.framework.BundleException <em>Bundle Exception</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for data type '<em>Bundle Exception</em>'. * @see org.osgi.framework.BundleException * @model instanceClass="o...
Returns the meta object for data type '<code>org.osgi.framework.BundleException Bundle Exception</code>'.
getBundleException
{ "repo_name": "Nasdanika/server", "path": "org.nasdanika.osgi.model/src/org/nasdanika/osgi/model/ModelPackage.java", "license": "epl-1.0", "size": 29859 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,492,445
@Override public VirtualMachineOSImageUpdateResponse update(String imageName, VirtualMachineOSImageUpdateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerException, URISyntaxException { // Valida...
VirtualMachineOSImageUpdateResponse function(String imageName, VirtualMachineOSImageUpdateParameters parameters) throws InterruptedException, ExecutionException, ServiceException, IOException, ParserConfigurationException, SAXException, TransformerException, URISyntaxException { if (imageName == null) { throw new NullP...
/** * The Update OS Image operation updates an OS image that in your image * repository. (see * http://msdn.microsoft.com/en-us/library/windowsazure/jj157198.aspx for * more information) * * @param imageName Required. The name of the virtual machine image to be * updated. * @param param...
The Update OS Image operation updates an OS image that in your image repository. (see HREF for more information)
update
{ "repo_name": "flydream2046/azure-sdk-for-java", "path": "service-management/azure-svc-mgmt-compute/src/main/java/com/microsoft/windowsazure/management/compute/VirtualMachineOSImageOperationsImpl.java", "license": "apache-2.0", "size": 149693 }
[ "com.microsoft.windowsazure.core.utils.BOMInputStream", "com.microsoft.windowsazure.core.utils.XmlUtility", "com.microsoft.windowsazure.exception.ServiceException", "com.microsoft.windowsazure.management.compute.models.VirtualMachineOSImageUpdateParameters", "com.microsoft.windowsazure.management.compute.mo...
import com.microsoft.windowsazure.core.utils.BOMInputStream; import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.compute.models.VirtualMachineOSImageUpdateParameters; import com.microsoft.windowsazure.managem...
import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.compute.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.net.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import ja...
[ "com.microsoft.windowsazure", "java.io", "java.net", "java.text", "java.util", "javax.xml", "org.apache.http", "org.w3c.dom", "org.xml.sax" ]
com.microsoft.windowsazure; java.io; java.net; java.text; java.util; javax.xml; org.apache.http; org.w3c.dom; org.xml.sax;
254,088
public static synchronized List<String> getFieldNames() { if (fieldNames == null) { fieldNames = new ArrayList<String>(); fieldNames.add("ObjectID"); fieldNames.add("Name"); fieldNames.add("Label"); fieldNames.add("Description"); ...
static synchronized List<String> function() { if (fieldNames == null) { fieldNames = new ArrayList<String>(); fieldNames.add(STR); fieldNames.add("Name"); fieldNames.add("Label"); fieldNames.add(STR); fieldNames.add("Index"); fieldNames.add(STR); fieldNames.add("Uuid"); fieldNames = Collections.unmodifiableList(fieldNa...
/** * Generate a list of field names. * * @return a list of field names */
Generate a list of field names
getFieldNames
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTScreenTab.java", "license": "gpl-3.0", "size": 39316 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,491,747
private int getNumberOfResponses(Map<String, Integer> answerFrequency) { int numChoicesSelected = answerFrequency.values().stream().mapToInt(Integer::intValue).sum(); // we will only show stats if there is at least one nonempty response if (numChoicesSelected == 0) { return -1; ...
int function(Map<String, Integer> answerFrequency) { int numChoicesSelected = answerFrequency.values().stream().mapToInt(Integer::intValue).sum(); if (numChoicesSelected == 0) { return -1; } return numChoicesSelected; }
/** * Returns number of non-empty responses.<br> * <p> * <em>Note:</em> Response can be empty when <b>'None of the above'</b> option is selected. * We don't count responses that select 'None of the above' option.</p> */
Returns number of non-empty responses. Note: Response can be empty when 'None of the above' option is selected. We don't count responses that select 'None of the above' option
getNumberOfResponses
{ "repo_name": "LiHaoTan/teammates", "path": "src/main/java/teammates/common/datatransfer/questions/FeedbackMsqQuestionDetails.java", "license": "gpl-2.0", "size": 51457 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
64,685
@Test public void whenUpdateThenTrackerHasUpdatedValue() { Tracker tracker = new Tracker(); Item item = new Item("1", "2", 3); tracker.add(item); Input input = new StubInput(new String[]{"2", item.getId(), "test name", "desc", "6"}, new int[]{0, 1, 2, 3, 4, 5, 6}); new St...
void function() { Tracker tracker = new Tracker(); Item item = new Item("1", "2", 3); tracker.add(item); Input input = new StubInput(new String[]{"2", item.getId(), STR, "desc", "6"}, new int[]{0, 1, 2, 3, 4, 5, 6}); new StartUI(input, tracker).init(); assertThat(tracker.findById(item.getId()).getName(), is(STR)); }
/** * Test update method. */
Test update method
whenUpdateThenTrackerHasUpdatedValue
{ "repo_name": "KDanila/KDanila", "path": "chapter_002/src/test/java/ru/job4j/tracker/StartUITest.java", "license": "apache-2.0", "size": 3000 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
1,529,978
public static void set(final HttpServletRequest request, final HttpServletResponse response) { REQUEST_HOLDER.set(request); RESPONSE_HOLDER.set(response); }
static void function(final HttpServletRequest request, final HttpServletResponse response) { REQUEST_HOLDER.set(request); RESPONSE_HOLDER.set(response); }
/** * Set the current request and response. * @param request the request * @param response the response */
Set the current request and response
set
{ "repo_name": "justinedelson/grails-acegi", "path": "src/java/org/codehaus/groovy/grails/plugins/springsecurity/SecurityRequestHolder.java", "license": "apache-2.0", "size": 1962 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,028,250
protected boolean checkCreditCardVendorNumber() { String ccvNumber = newCreditCardVendor.getFinancialDocumentCreditCardVendorNumber(); if (ccvNumber == null) { return false; } else if (!StringUtils.isNumeric(ccvNumber)) { putFieldError("financialDocumentCreditCardVen...
boolean function() { String ccvNumber = newCreditCardVendor.getFinancialDocumentCreditCardVendorNumber(); if (ccvNumber == null) { return false; } else if (!StringUtils.isNumeric(ccvNumber)) { putFieldError(STR, KFSKeyConstants.ERROR_NUMERIC, STR); return false; } else if (ccvNumber.length() < 5) { String errorMessage[...
/** * Returns true if credit card vendor number is valid (i.e. numeric and at least 5 digits) * * @return true if credit card vendor number is valid (i.e. numeric and at least 5 digits) */
Returns true if credit card vendor number is valid (i.e. numeric and at least 5 digits)
checkCreditCardVendorNumber
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/validation/impl/CreditCardVendorRule.java", "license": "agpl-3.0", "size": 17990 }
[ "org.apache.commons.lang.StringUtils", "org.kuali.kfs.sys.KFSKeyConstants" ]
import org.apache.commons.lang.StringUtils; import org.kuali.kfs.sys.KFSKeyConstants;
import org.apache.commons.lang.*; import org.kuali.kfs.sys.*;
[ "org.apache.commons", "org.kuali.kfs" ]
org.apache.commons; org.kuali.kfs;
1,552,060
public SubResource backendAddressPool() { return this.backendAddressPool; }
SubResource function() { return this.backendAddressPool; }
/** * Get backend address pool resource of URL path map path rule. * * @return the backendAddressPool value */
Get backend address pool resource of URL path map path rule
backendAddressPool
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/ApplicationGatewayPathRule.java", "license": "mit", "size": 7089 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
281,469
public boolean isConstantMetadata() { return false; } static enum SpecialArtifactType { FILESET, CONSTANT_METADATA, } @Immutable @VisibleForTesting public static final class SpecialArtifact extends Artifact { private final SpecialArtifactType type; SpecialArtifact(Path path, R...
boolean function() { return false; } static enum SpecialArtifactType { FILESET, CONSTANT_METADATA, } public static final class SpecialArtifact extends Artifact { private final SpecialArtifactType type; SpecialArtifact(Path path, Root root, PathFragment execPath, ArtifactOwner owner, SpecialArtifactType type) { super(pa...
/** * Returns true iff metadata cache must return constant metadata for the * given artifact. */
Returns true iff metadata cache must return constant metadata for the given artifact
isConstantMetadata
{ "repo_name": "joshua0pang/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java", "license": "apache-2.0", "size": 26737 }
[ "com.google.devtools.build.lib.vfs.Path", "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
2,269,406
private void executeAgencyDailyStatisticsWithError(Object[] params, String errorMsg) throws MalformedURLException { try { execute(AGENCY_DAILY_STATISTICS_METHOD, params); fail(AGENCY_DAILY_STATISTICS_METHOD + " executed successfully, but it shouldn't."); } catch (XmlRpcException e) { assertEqual...
void function(Object[] params, String errorMsg) throws MalformedURLException { try { execute(AGENCY_DAILY_STATISTICS_METHOD, params); fail(AGENCY_DAILY_STATISTICS_METHOD + STR); } catch (XmlRpcException e) { assertEquals(ErrorMessage.WRONG_ERROR_MESSAGE, errorMsg, e .getMessage()); } }
/** * Execute test method with error * * @param params - * parameters for test method * @param errorMsg - * true error messages * @throws MalformedURLException */
Execute test method with error
executeAgencyDailyStatisticsWithError
{ "repo_name": "adqio/revive-adserver", "path": "www/api/v2/xmlrpc/tests/unit/src/test/java/org/openx/agency/TestAgencyDailyStatistics.java", "license": "gpl-2.0", "size": 6641 }
[ "java.net.MalformedURLException", "org.apache.xmlrpc.XmlRpcException", "org.openx.utils.ErrorMessage" ]
import java.net.MalformedURLException; import org.apache.xmlrpc.XmlRpcException; import org.openx.utils.ErrorMessage;
import java.net.*; import org.apache.xmlrpc.*; import org.openx.utils.*;
[ "java.net", "org.apache.xmlrpc", "org.openx.utils" ]
java.net; org.apache.xmlrpc; org.openx.utils;
1,343,771
@Test public void betweenAtStart() { final Date yesterdayToo = new Date(yesterday.getTime()); final boolean expected = false; final boolean actual = Dates.between(yesterday, tomorrow).apply(yesterdayToo); Assert.assertEquals(expected, actual); }
void function() { final Date yesterdayToo = new Date(yesterday.getTime()); final boolean expected = false; final boolean actual = Dates.between(yesterday, tomorrow).apply(yesterdayToo); Assert.assertEquals(expected, actual); }
/** * Tests {@link Dates#between(Date, Date)} with an input at exactly the start. */
Tests <code>Dates#between(Date, Date)</code> with an input at exactly the start
betweenAtStart
{ "repo_name": "cosmocode/cosmocode-commons", "path": "src/test/java/de/cosmocode/commons/DatesTest.java", "license": "apache-2.0", "size": 11382 }
[ "java.util.Date", "junit.framework.Assert" ]
import java.util.Date; import junit.framework.Assert;
import java.util.*; import junit.framework.*;
[ "java.util", "junit.framework" ]
java.util; junit.framework;
1,725,021
public T lastPageFooter(ComponentBuilder<?, ?> ...components) { return addLastPageFooter(components); }
T function(ComponentBuilder<?, ?> ...components) { return addLastPageFooter(components); }
/** * Adds components to the last page footer band. * The band is printed only on the last page at the bottom of the page. * * @param components the last page footer components * @return a report builder */
Adds components to the last page footer band. The band is printed only on the last page at the bottom of the page
lastPageFooter
{ "repo_name": "robcowell/dynamicreports", "path": "dynamicreports-core/src/main/java/net/sf/dynamicreports/report/builder/ReportBuilder.java", "license": "lgpl-3.0", "size": 61004 }
[ "net.sf.dynamicreports.report.builder.component.ComponentBuilder" ]
import net.sf.dynamicreports.report.builder.component.ComponentBuilder;
import net.sf.dynamicreports.report.builder.component.*;
[ "net.sf.dynamicreports" ]
net.sf.dynamicreports;
2,876,432
Stream<Answer> orderStream(Stream<Answer> stream);
Stream<Answer> orderStream(Stream<Answer> stream);
/** * Order the stream * @param stream the stream to order */
Order the stream
orderStream
{ "repo_name": "alexandraorth/grakn", "path": "grakn-graql/src/main/java/ai/grakn/graql/internal/query/match/MatchOrder.java", "license": "gpl-3.0", "size": 1146 }
[ "ai.grakn.graql.admin.Answer", "java.util.stream.Stream" ]
import ai.grakn.graql.admin.Answer; import java.util.stream.Stream;
import ai.grakn.graql.admin.*; import java.util.stream.*;
[ "ai.grakn.graql", "java.util" ]
ai.grakn.graql; java.util;
2,077,465
public void close() { if(mDiskCache!=null) mDiskCache.close(); } public static class ImageCacheParams { public int memCacheSize = DEFAULT_MEM_CACHE_SIZE; public int diskCacheSize = DEFAULT_DISK_CACHE_SIZE; public int diskCacheCount = DEFAULT_DISK_CACHE_COUNT...
void function() { if(mDiskCache!=null) mDiskCache.close(); } public static class ImageCacheParams { public int memCacheSize = DEFAULT_MEM_CACHE_SIZE; public int diskCacheSize = DEFAULT_DISK_CACHE_SIZE; public int diskCacheCount = DEFAULT_DISK_CACHE_COUNT; public File diskCacheDir; public boolean memoryCacheEnabled = DE...
/** * Closes the disk cache associated with this ImageCache object. Note that this includes * disk access so this should not be executed on the main/UI thread. */
Closes the disk cache associated with this ImageCache object. Note that this includes disk access so this should not be executed on the main/UI thread
close
{ "repo_name": "selecterskyandroid/framework", "path": "src/main/java/net/tsz/afinal/bitmap/core/BitmapCache.java", "license": "apache-2.0", "size": 7748 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,553,260
public void print(char ch) throws IOException { _writer.print(ch); }
void function(char ch) throws IOException { _writer.print(ch); }
/** * Prints a character. */
Prints a character
print
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/java/gen/JavaWriterWrapper.java", "license": "gpl-2.0", "size": 5994 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,096,384
@Override protected void postProcessTemplateLoaders(List<TemplateLoader> templateLoaders) { templateLoaders.add(new ClassTemplateLoader(FreeMarkerConfigurer.class, "")); logger.info("ClassTemplateLoader for Spring macros added to FreeMarker configuration"); }
void function(List<TemplateLoader> templateLoaders) { templateLoaders.add(new ClassTemplateLoader(FreeMarkerConfigurer.class, STRClassTemplateLoader for Spring macros added to FreeMarker configuration"); }
/** * This implementation registers an additional ClassTemplateLoader * for the Spring-provided macros, added to the end of the list. */
This implementation registers an additional ClassTemplateLoader for the Spring-provided macros, added to the end of the list
postProcessTemplateLoaders
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.web.reactive/org/springframework/web/reactive/result/view/freemarker/FreeMarkerConfigurer.java", "license": "mit", "size": 4088 }
[ "freemarker.cache.ClassTemplateLoader", "freemarker.cache.TemplateLoader", "java.util.List" ]
import freemarker.cache.ClassTemplateLoader; import freemarker.cache.TemplateLoader; import java.util.List;
import freemarker.cache.*; import java.util.*;
[ "freemarker.cache", "java.util" ]
freemarker.cache; java.util;
2,158,596
public Book[] getSelectedPrayers() { final int bookSetting = isCursing() ? 1582 : 1395; final List<Book> activePrayers = new LinkedList<Book>(); for (Book prayer : isCursing() ? Curses.values() : Normal.values()) { if ((methods.settings.getSetting(bookSetting) & (prayer.getSettings())) == prayer.get...
Book[] function() { final int bookSetting = isCursing() ? 1582 : 1395; final List<Book> activePrayers = new LinkedList<Book>(); for (Book prayer : isCursing() ? Curses.values() : Normal.values()) { if ((methods.settings.getSetting(bookSetting) & (prayer.getSettings())) == prayer.getSettings()) activePrayers.add(prayer)...
/** * Returns an array of all current active prayers. * * @return an array of all current active prayers. */
Returns an array of all current active prayers
getSelectedPrayers
{ "repo_name": "Latency/UtopianBot", "path": "src/org/rsbot/script/methods/Prayer.java", "license": "lgpl-3.0", "size": 8946 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,266,155
public static boolean updateSettings(Map<String, String> settings, String serverUrl, String account, char[] password) throws IOException { return doAction(RpcRequest.EDIT_SETTINGS, null, settings, serverUrl, account, password); }
static boolean function(Map<String, String> settings, String serverUrl, String account, char[] password) throws IOException { return doAction(RpcRequest.EDIT_SETTINGS, null, settings, serverUrl, account, password); }
/** * Update the settings on the Gitblit server. * * @param settings * the settings to update * @param serverUrl * @param account * @param password * @return true if the action succeeded * @throws IOException */
Update the settings on the Gitblit server
updateSettings
{ "repo_name": "heavenlyhash/gitblit", "path": "src/main/java/com/gitblit/utils/RpcUtils.java", "license": "apache-2.0", "size": 20704 }
[ "com.gitblit.Constants", "java.io.IOException", "java.util.Map" ]
import com.gitblit.Constants; import java.io.IOException; import java.util.Map;
import com.gitblit.*; import java.io.*; import java.util.*;
[ "com.gitblit", "java.io", "java.util" ]
com.gitblit; java.io; java.util;
1,571,928
public DataNode setRotation_speedScalar(Double rotation_speed);
DataNode function(Double rotation_speed);
/** * chopper rotation speed * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_FREQUENCY * </p> * * @param rotation_speed the rotation_speed */
chopper rotation speed Type: NX_FLOAT Units: NX_FREQUENCY
setRotation_speedScalar
{ "repo_name": "belkassaby/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXfermi_chopper.java", "license": "epl-1.0", "size": 11611 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode;
import org.eclipse.dawnsci.analysis.api.tree.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
543,216
public static void readExtents(ObjectInputStream stream) throws IOException, ClassNotFoundException { allExtents = (Hashtable) stream.readObject(); }
static void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { allExtents = (Hashtable) stream.readObject(); }
/** * Reads all extents from the given stream (a utility class method). * @throws IOException * @throws ClassNotFoundException */
Reads all extents from the given stream (a utility class method)
readExtents
{ "repo_name": "s9989/MAS", "path": "archorganizer/src/lib/ObjectPlus.java", "license": "mit", "size": 2733 }
[ "java.io.IOException", "java.io.ObjectInputStream", "java.util.Hashtable" ]
import java.io.IOException; import java.io.ObjectInputStream; import java.util.Hashtable;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,508,901
public void unmount() { boolean force = true; IMountService mountService = getMountService(); String extStoragePath = Environment.getExternalStorageDirectory().toString(); // try { // mountService.unmountVolume(extStoragePath, force); // } cat...
void function() { boolean force = true; IMountService mountService = getMountService(); String extStoragePath = Environment.getExternalStorageDirectory().toString(); }
/** * unmount external storage */
unmount external storage
unmount
{ "repo_name": "BaiduQA/Cafe", "path": "testservice/src/com/baidu/cafe/remote/SystemLib.java", "license": "apache-2.0", "size": 87756 }
[ "android.os.Environment", "android.os.storage.IMountService" ]
import android.os.Environment; import android.os.storage.IMountService;
import android.os.*; import android.os.storage.*;
[ "android.os" ]
android.os;
2,232,042
XMLInputFactory inputFactory = XMLInputFactory.newInstance(); String namespace = XMLConstants.NULL_NS_URI; String prefix = null; try (InputStream input = schema.getInputSupplier().getInput()) { XMLStreamReader reader = inputFactory.createXMLStreamReader(input); while (reader.hasNext()) { ...
XMLInputFactory inputFactory = XMLInputFactory.newInstance(); String namespace = XMLConstants.NULL_NS_URI; String prefix = null; try (InputStream input = schema.getInputSupplier().getInput()) { XMLStreamReader reader = inputFactory.createXMLStreamReader(input); while (reader.hasNext()) { reader.next(); if (reader.isSta...
/** * Load XML schema information for a schema. * * @param schema the schema * @return the XML schema information * @throws IOException * @throws XMLStreamException */
Load XML schema information for a schema
loadInfo
{ "repo_name": "wetransform-os/hale-project-generator", "path": "src/main/groovy/to/wetf/hale/progen/schema/xml/XmlSchemaHelper.java", "license": "apache-2.0", "size": 2391 }
[ "java.io.InputStream", "javax.xml.XMLConstants", "javax.xml.stream.XMLInputFactory", "javax.xml.stream.XMLStreamReader" ]
import java.io.InputStream; import javax.xml.XMLConstants; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader;
import java.io.*; import javax.xml.*; import javax.xml.stream.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
119,157
@Test public void testRepeatedListInRepeatedList() { TupleMetadata schema = new SchemaBuilder() .addRepeatedList("x") .addDimension() .addArray(MinorType.VARCHAR) .resumeList() .resumeSchema() .buildSchema(); assertEquals(1, schema.size()); C...
void function() { TupleMetadata schema = new SchemaBuilder() .addRepeatedList("x") .addDimension() .addArray(MinorType.VARCHAR) .resumeList() .resumeSchema() .buildSchema(); assertEquals(1, schema.size()); ColumnMetadata outerList = schema.metadata(0); assertEquals("x", outerList.name()); assertEquals(StructureType.MUL...
/** * Test that repeated lists can be nested to provide 3D or * higher dimensions. */
Test that repeated lists can be nested to provide 3D or higher dimensions
testRepeatedListInRepeatedList
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/rowSet/TestSchemaBuilder.java", "license": "apache-2.0", "size": 26144 }
[ "org.apache.drill.common.types.TypeProtos", "org.apache.drill.exec.record.metadata.ColumnMetadata", "org.apache.drill.exec.record.metadata.SchemaBuilder", "org.apache.drill.exec.record.metadata.TupleMetadata", "org.junit.Assert" ]
import org.apache.drill.common.types.TypeProtos; import org.apache.drill.exec.record.metadata.ColumnMetadata; import org.apache.drill.exec.record.metadata.SchemaBuilder; import org.apache.drill.exec.record.metadata.TupleMetadata; import org.junit.Assert;
import org.apache.drill.common.types.*; import org.apache.drill.exec.record.metadata.*; import org.junit.*;
[ "org.apache.drill", "org.junit" ]
org.apache.drill; org.junit;
2,828,567
private String deriveCollectorName(Collector c) { String s = c.getClass().getSimpleName(); // MutiCollector which wraps multiple BucketCollectors is generated // via an anonymous class, so this corrects the lack of a name by // asking the enclosingClass if (s.equals("")) { ...
String function(Collector c) { String s = c.getClass().getSimpleName(); if (s.equals(STR: [STR]"; } return s; }
/** * Creates a human-friendly representation of the Collector name. * * InternalBucket Collectors use the aggregation name in their toString() method, * which makes the profiled output a bit nicer. * * @param c The Collector to derive a name from * @return A (hopefully) prettier nam...
Creates a human-friendly representation of the Collector name. InternalBucket Collectors use the aggregation name in their toString() method, which makes the profiled output a bit nicer
deriveCollectorName
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/profile/query/InternalProfileCollector.java", "license": "apache-2.0", "size": 4477 }
[ "org.apache.lucene.search.Collector" ]
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,670,178
public static void initializeStatics(final PyStringMap builtins) { for (final Field f : PConstants.class.getDeclaredFields()) { final int mods = f.getModifiers(); if (Modifier.isPublic(mods) || Modifier.isStatic(mods)) { try { builtins.__setitem__(f.getName(), Py.java2py(f.get(null))...
static void function(final PyStringMap builtins) { for (final Field f : PConstants.class.getDeclaredFields()) { final int mods = f.getModifiers(); if (Modifier.isPublic(mods) Modifier.isStatic(mods)) { try { builtins.__setitem__(f.getName(), Py.java2py(f.get(null))); } catch (final Exception e) { e.printStackTrace(); }...
/** * Populate the Python builtins namespace with PConstants. */
Populate the Python builtins namespace with PConstants
initializeStatics
{ "repo_name": "tildebyte/processing.py", "path": "runtime/src/jycessing/PAppletJythonDriver.java", "license": "apache-2.0", "size": 40087 }
[ "java.lang.reflect.Field", "java.lang.reflect.Modifier", "org.python.core.Py", "org.python.core.PyStringMap" ]
import java.lang.reflect.Field; import java.lang.reflect.Modifier; import org.python.core.Py; import org.python.core.PyStringMap;
import java.lang.reflect.*; import org.python.core.*;
[ "java.lang", "org.python.core" ]
java.lang; org.python.core;
998,474
@Override public boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySource glpeSource) { boolean success = true; // we must clear them first before creating new ones glpeSource.clearAnyGeneralLedgerPendingEntries(); if (LOG.isDebugEnabled()) { LOG....
boolean function(GeneralLedgerPendingEntrySource glpeSource) { boolean success = true; glpeSource.clearAnyGeneralLedgerPendingEntries(); if (LOG.isDebugEnabled()) { LOG.debug(STR + glpeSource.getDocumentHeader().getDocumentNumber()); } delete(glpeSource.getDocumentHeader().getDocumentNumber()); if (LOG.isDebugEnabled()...
/** * Invokes generateEntries method on the financial document. * * @param document - document whose pending entries need generated * @return whether the business rules succeeded */
Invokes generateEntries method on the financial document
generateGeneralLedgerPendingEntries
{ "repo_name": "bhutchinson/kfs", "path": "kfs-core/src/main/java/org/kuali/kfs/sys/service/impl/GeneralLedgerPendingEntryServiceImpl.java", "license": "agpl-3.0", "size": 59141 }
[ "org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper", "org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySourceDetail", "org.kuali.kfs.sys.document.GeneralLedgerPendingEntrySource" ]
import org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySequenceHelper; import org.kuali.kfs.sys.businessobject.GeneralLedgerPendingEntrySourceDetail; import org.kuali.kfs.sys.document.GeneralLedgerPendingEntrySource;
import org.kuali.kfs.sys.businessobject.*; import org.kuali.kfs.sys.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,497,255
@Override public ActionForward close(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward actionForward = mapping.findForward(KRADConstants.MAPPING_PORTAL); if (getBatchCorrespondenceDetailAuthori...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward actionForward = mapping.findForward(KRADConstants.MAPPING_PORTAL); if (getBatchCorrespondenceDetailAuthorizationService().hasPermission(PermissionConstants.MODIFY_BAT...
/** * * This method is called when closing the correspondence templates. * @param mapping * @param form * @param request * @param response * @return action forward * @throws Exception */
This method is called when closing the correspondence templates
close
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/irb/correspondence/BatchCorrespondenceDetailAction.java", "license": "apache-2.0", "size": 15882 }
[ "java.util.ArrayList", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.commons.lang.StringUtils", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kra.infrastructure.Perm...
import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali....
import java.util.*; import javax.servlet.http.*; import org.apache.commons.lang.*; import org.apache.struts.action.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.core.api.util.*; import org.kuali.rice.kns.question.*; import org.kuali.rice.krad.util.*;
[ "java.util", "javax.servlet", "org.apache.commons", "org.apache.struts", "org.kuali.kra", "org.kuali.rice" ]
java.util; javax.servlet; org.apache.commons; org.apache.struts; org.kuali.kra; org.kuali.rice;
1,101,082
public static List<FieldSchema> createSchema(@Nullable List<String> params) { if (params == null || params.isEmpty()) { return Collections.emptyList(); } return params.stream() .map(Util::param2Schema) .collect(Collectors.toList()); }
static List<FieldSchema> function(@Nullable List<String> params) { if (params == null params.isEmpty()) { return Collections.emptyList(); } return params.stream() .map(Util::param2Schema) .collect(Collectors.toList()); }
/** * Create table schema from parameters. * * @param params list of parameters. Each parameter can be either a simple name or * name:type for non-String types. * @return table schema description */
Create table schema from parameters
createSchema
{ "repo_name": "sankarh/hive", "path": "standalone-metastore/metastore-tools/tools-common/src/main/java/org/apache/hadoop/hive/metastore/tools/Util.java", "license": "apache-2.0", "size": 20149 }
[ "java.util.Collections", "java.util.List", "java.util.stream.Collectors", "org.apache.hadoop.hive.metastore.api.FieldSchema", "org.jetbrains.annotations.Nullable" ]
import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.jetbrains.annotations.Nullable;
import java.util.*; import java.util.stream.*; import org.apache.hadoop.hive.metastore.api.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.hadoop", "org.jetbrains.annotations" ]
java.util; org.apache.hadoop; org.jetbrains.annotations;
2,528,848
public synchronized int drawInsert( LinkInsertedEvent event, Stack<Activation> activationStack, int lastYValue, Activation lastAct) { MAssociation ass = event.getAssociation(); String key = ""; for (MObject object : event.getParticipants()) { ...
synchronized int function( LinkInsertedEvent event, Stack<Activation> activationStack, int lastYValue, Activation lastAct) { MAssociation ass = event.getAssociation(); String key = ""; for (MObject object : event.getParticipants()) { key += object.name(); } key += ass.name(); AssLifeline ll = (AssLifeline) fLifelines.g...
/** * Creates the activations following from a insert command and calculates * the y-position of this activation in the sequence diagram. * * @param event * the insert command for which the activations should be created * @param activationStack * the Stack of al...
Creates the activations following from a insert command and calculates the y-position of this activation in the sequence diagram
drawInsert
{ "repo_name": "vnu-dse/rtl", "path": "src/gui/org/tzi/use/gui/views/seqDiag/SequenceDiagram.java", "license": "gpl-2.0", "size": 156112 }
[ "java.util.Stack", "org.tzi.use.uml.mm.MAssociation", "org.tzi.use.uml.sys.MObject", "org.tzi.use.uml.sys.events.LinkInsertedEvent" ]
import java.util.Stack; import org.tzi.use.uml.mm.MAssociation; import org.tzi.use.uml.sys.MObject; import org.tzi.use.uml.sys.events.LinkInsertedEvent;
import java.util.*; import org.tzi.use.uml.mm.*; import org.tzi.use.uml.sys.*; import org.tzi.use.uml.sys.events.*;
[ "java.util", "org.tzi.use" ]
java.util; org.tzi.use;
1,672,506
public static AccessControlList getAdminAcls(Configuration conf, String configKey) { try { AccessControlList adminAcl = new AccessControlList(conf.get(configKey, " ")); adminAcl.addUser(UserGroupInformation.getCurrentUser(). getShortUserName()); return admi...
static AccessControlList function(Configuration conf, String configKey) { try { AccessControlList adminAcl = new AccessControlList(conf.get(configKey, " ")); adminAcl.addUser(UserGroupInformation.getCurrentUser(). getShortUserName()); return adminAcl; } catch (Exception ex) { throw new RuntimeException(ex); } }
/** * Get the ACL object representing the cluster administrators * The user who starts the daemon is automatically added as an admin * @param conf * @param configKey the key that holds the ACL string in its value * @return AccessControlList instance */
Get the ACL object representing the cluster administrators The user who starts the daemon is automatically added as an admin
getAdminAcls
{ "repo_name": "ulmon/hadoop1.2.1", "path": "src/core/org/apache/hadoop/security/SecurityUtil.java", "license": "apache-2.0", "size": 22719 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.security.authorize.AccessControlList" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.authorize.AccessControlList;
import org.apache.hadoop.conf.*; import org.apache.hadoop.security.authorize.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,444,572
@SuppressWarnings("unchecked") public synchronized void removeApplication(RMApp app) { ApplicationState appState = new ApplicationState( app.getSubmitTime(), app.getStartTime(), app.getApplicationSubmissionContext(), app.getUser()); for(RMAppAttempt appAttempt : app.getAppAttempts()....
@SuppressWarnings(STR) synchronized void function(RMApp app) { ApplicationState appState = new ApplicationState( app.getSubmitTime(), app.getStartTime(), app.getApplicationSubmissionContext(), app.getUser()); for(RMAppAttempt appAttempt : app.getAppAttempts().values()) { Credentials credentials = getCredentialsFromAppA...
/** * Non-blocking API * ResourceManager services call this to remove an application from the state * store * This does not block the dispatcher threads * There is no notification of completion for this operation. */
Non-blocking API ResourceManager services call this to remove an application from the state store This does not block the dispatcher threads There is no notification of completion for this operation
removeApplication
{ "repo_name": "songweijia/fffs", "path": "sources/hadoop-2.4.1-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java", "license": "apache-2.0", "size": 28329 }
[ "org.apache.hadoop.security.Credentials", "org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp", "org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt" ]
import org.apache.hadoop.security.Credentials; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,821,168
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { boolean flag = worldIn.isBlockPowered(pos) || worldIn.isBlockPowered(pos.up()); boolean flag1 = ((Boolean)state.getValue(TRIGGERED)).booleanValue(); if (flag && !flag1) { ...
void function(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { boolean flag = worldIn.isBlockPowered(pos) worldIn.isBlockPowered(pos.up()); boolean flag1 = ((Boolean)state.getValue(TRIGGERED)).booleanValue(); if (flag && !flag1) { worldIn.scheduleUpdate(pos, this, this.tickRate(worldIn)); worldIn....
/** * Called when a neighboring block changes. */
Called when a neighboring block changes
onNeighborBlockChange
{ "repo_name": "TorchPowered/CraftBloom", "path": "src/net/minecraft/block/BlockDispenser.java", "license": "mit", "size": 10330 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.util.BlockPos", "net.minecraft.world.World" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World;
import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.util; net.minecraft.world;
2,533,427
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<DiskInner> createOrUpdateAsync( String resourceGroupName, String labName, String username, String name, DiskInner disk, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, disk, context) ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<DiskInner> function( String resourceGroupName, String labName, String username, String name, DiskInner disk, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, labName, username, name, disk, context) .last() .flatMap(this.client::getLroFinalResultOrErr...
/** * Create or replace an existing disk. This operation can take a while to complete. * * @param resourceGroupName The name of the resource group. * @param labName The name of the lab. * @param username The name of the user profile. * @param name The name of the disk. * @param disk A...
Create or replace an existing disk. This operation can take a while to complete
createOrUpdateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/devtestlabs/azure-resourcemanager-devtestlabs/src/main/java/com/azure/resourcemanager/devtestlabs/implementation/DisksClientImpl.java", "license": "mit", "size": 103311 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.devtestlabs.fluent.models.DiskInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.devtestlabs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,376,381
public SubstitutionCursor query(ContentResolver contentResolver) { return query(contentResolver, null); }
SubstitutionCursor function(ContentResolver contentResolver) { return query(contentResolver, null); }
/** * Equivalent of calling {@code query(contentResolver, null)}. */
Equivalent of calling query(contentResolver, null)
query
{ "repo_name": "P0T4T0x/AKGBensheim", "path": "backend/src/main/java/de/tobiaserthal/akgbensheim/backend/provider/substitution/SubstitutionSelection.java", "license": "mit", "size": 15393 }
[ "android.content.ContentResolver" ]
import android.content.ContentResolver;
import android.content.*;
[ "android.content" ]
android.content;
1,835,490
public int createMultiRegions(HTable table, byte[] columnFamily) throws IOException { return createMultiRegions(getConfiguration(), table, columnFamily); } public static final byte[][] KEYS = { HConstants.EMPTY_BYTE_ARRAY, Bytes.toBytes("bbb"), Bytes.toBytes("ccc"), Bytes.toBytes("ddd"), Bytes.toBy...
int function(HTable table, byte[] columnFamily) throws IOException { return createMultiRegions(getConfiguration(), table, columnFamily); } public static final byte[][] KEYS = { HConstants.EMPTY_BYTE_ARRAY, Bytes.toBytes("bbb"), Bytes.toBytes("ccc"), Bytes.toBytes("ddd"), Bytes.toBytes("eee"), Bytes.toBytes("fff"), Byte...
/** * Creates many regions names "aaa" to "zzz". * * @param table The table to use for the data. * @param columnFamily The family to insert the data into. * @return count of regions created. * @throws IOException When creating the regions fails. */
Creates many regions names "aaa" to "zzz"
createMultiRegions
{ "repo_name": "matteobertozzi/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 79792 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.HTable", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,571,843
public void setTitle(int titleId) { verifyMethodCalledFromDelegate("setTitle(Integer)"); ((CallVoid1<Integer>) mSuperListeners.pop()).call(titleId); }
void function(int titleId) { verifyMethodCalledFromDelegate(STR); ((CallVoid1<Integer>) mSuperListeners.pop()).call(titleId); }
/** * Change the title associated with this activity. If this is a * top-level activity, the title for its window will change. If it * is an embedded activity, the parent can do whatever it wants * with it. */
Change the title associated with this activity. If this is a top-level activity, the title for its window will change. If it is an embedded activity, the parent can do whatever it wants with it
setTitle
{ "repo_name": "passsy/CompositeAndroid", "path": "activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityPlugin.java", "license": "apache-2.0", "size": 278532 }
[ "com.pascalwelsch.compositeandroid.core.CallVoid1" ]
import com.pascalwelsch.compositeandroid.core.CallVoid1;
import com.pascalwelsch.compositeandroid.core.*;
[ "com.pascalwelsch.compositeandroid" ]
com.pascalwelsch.compositeandroid;
1,717,983
@Test @DisplayName("Test Orthogonality") void testOrthogonality() { final double increment = 0.25e-2; final double n_max = 5; for (int n1=1;n1<=n_max;n1++) { for (int m1=0; m1<=n1;m1++) { for (int n2=1;n2<=n_max;n2++) { for (int m2=0;m2...
@DisplayName(STR) void testOrthogonality() { final double increment = 0.25e-2; final double n_max = 5; for (int n1=1;n1<=n_max;n1++) { for (int m1=0; m1<=n1;m1++) { for (int n2=1;n2<=n_max;n2++) { for (int m2=0;m2<=n2;m2++) { if (((n1-Math.abs(m1)) % 2 == 0) && ((n2-Math.abs(m2)) % 2 == 0)) { Complex result = new Compl...
/** * Tests if orthogonality relation that exists between two Zernike Polynoms holds true * for all n between 1 and 5. */
Tests if orthogonality relation that exists between two Zernike Polynoms holds true for all n between 1 and 5
testOrthogonality
{ "repo_name": "silvanheller/cineast", "path": "tests/org/vitrivr/cineast/tests/util/math/functions/ZernikePolynomialsTest.java", "license": "mit", "size": 3874 }
[ "org.apache.commons.math3.complex.Complex", "org.apache.commons.math3.util.FastMath", "org.junit.jupiter.api.Assertions", "org.junit.jupiter.api.DisplayName", "org.vitrivr.cineast.core.util.MathHelper", "org.vitrivr.cineast.core.util.math.functions.ZernikeBasisFunction" ]
import org.apache.commons.math3.complex.Complex; import org.apache.commons.math3.util.FastMath; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.DisplayName; import org.vitrivr.cineast.core.util.MathHelper; import org.vitrivr.cineast.core.util.math.functions.ZernikeBasisFunction;
import org.apache.commons.math3.complex.*; import org.apache.commons.math3.util.*; import org.junit.jupiter.api.*; import org.vitrivr.cineast.core.util.*; import org.vitrivr.cineast.core.util.math.functions.*;
[ "org.apache.commons", "org.junit.jupiter", "org.vitrivr.cineast" ]
org.apache.commons; org.junit.jupiter; org.vitrivr.cineast;
950,774
@Deprecated public PagedCallSettings.Builder< ListSuggestionsRequest, ListSuggestionsResponse, ListSuggestionsPagedResponse> listSuggestionsSettings() { return getStubSettingsBuilder().listSuggestionsSettings(); }
PagedCallSettings.Builder< ListSuggestionsRequest, ListSuggestionsResponse, ListSuggestionsPagedResponse> function() { return getStubSettingsBuilder().listSuggestionsSettings(); }
/** * Returns the builder for the settings used for calls to listSuggestions. * * @deprecated This method is deprecated and will be removed in the next major version update. */
Returns the builder for the settings used for calls to listSuggestions
listSuggestionsSettings
{ "repo_name": "googleapis/java-dialogflow", "path": "google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/ParticipantsSettings.java", "license": "apache-2.0", "size": 12910 }
[ "com.google.api.gax.rpc.PagedCallSettings", "com.google.cloud.dialogflow.v2beta1.ParticipantsClient" ]
import com.google.api.gax.rpc.PagedCallSettings; import com.google.cloud.dialogflow.v2beta1.ParticipantsClient;
import com.google.api.gax.rpc.*; import com.google.cloud.dialogflow.v2beta1.*;
[ "com.google.api", "com.google.cloud" ]
com.google.api; com.google.cloud;
223,469
protected VirtualFileSystemInode getInode() throws FileNotFoundException { return VirtualFileSystem.getVirtualFileSystem().getInodeByPath(_path); }
VirtualFileSystemInode function() throws FileNotFoundException { return VirtualFileSystem.getVirtualFileSystem().getInodeByPath(_path); }
/** * Call the lowest level of the VFS and ask it to search the Inode. * @return a VirtualFileSystemInode object. * @throws FileNotFoundException if the inode does not exist. */
Call the lowest level of the VFS and ask it to search the Inode
getInode
{ "repo_name": "dr3plus/dr3", "path": "src/master/src/org/drftpd/vfs/InodeHandle.java", "license": "gpl-2.0", "size": 17294 }
[ "java.io.FileNotFoundException" ]
import java.io.FileNotFoundException;
import java.io.*;
[ "java.io" ]
java.io;
1,620,242
void postChannelCommand(ChannelUID channelUID, Command value);
void postChannelCommand(ChannelUID channelUID, Command value);
/** * A new value got published on a configured MQTT topic associated with the given channel uid. * The channel is configured to post the new state as command. * * @param channelUID The channel uid * @param value The new value. Doesn't necessarily need to be different than the value before. ...
A new value got published on a configured MQTT topic associated with the given channel uid. The channel is configured to post the new state as command
postChannelCommand
{ "repo_name": "gerrieg/openhab2", "path": "addons/binding/org.openhab.binding.mqtt.generic/src/main/java/org/openhab/binding/mqtt/generic/internal/generic/ChannelStateUpdateListener.java", "license": "epl-1.0", "size": 1858 }
[ "org.eclipse.smarthome.core.thing.ChannelUID", "org.eclipse.smarthome.core.types.Command" ]
import org.eclipse.smarthome.core.thing.ChannelUID; import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.core.thing.*; import org.eclipse.smarthome.core.types.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
111,531
public static Object resolveBean(CamelContext camelContext, String name, Object value) throws Exception { // resolve placeholders if (value != null) { value = camelContext.resolvePropertyPlaceholders(value.toString()); } if (value.toString().startsWith("#class:")) { ...
static Object function(CamelContext camelContext, String name, Object value) throws Exception { if (value != null) { value = camelContext.resolvePropertyPlaceholders(value.toString()); } if (value.toString().startsWith(STR)) { String className = value.toString().substring(7); String factoryMethod = null; String paramet...
/** * Resolves the value as either a class, type or bean. * * @param camelContext the camel context * @param name the name of the bean * @param value how to resolve the bean with a prefix of either #class:, #type: or #bean: * @return the resolve bean * @...
Resolves the value as either a class, type or bean
resolveBean
{ "repo_name": "gnodet/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java", "license": "apache-2.0", "size": 84502 }
[ "java.util.Set", "org.apache.camel.CamelContext", "org.apache.camel.util.StringHelper" ]
import java.util.Set; import org.apache.camel.CamelContext; import org.apache.camel.util.StringHelper;
import java.util.*; import org.apache.camel.*; import org.apache.camel.util.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
736,562
@Test public void testGetBooleanArrayProperty() { TestJsonObject testJsonObject = JsonObjectFactory.get().createJsonObject(TestJsonObject.class); JsonBooleanArray testBooleanArrayProperty = JsonObjectFactory.get().createJsonArray(JsonBooleanArray.class); testJsonObject.setObjectProperty("testBoolea...
void function() { TestJsonObject testJsonObject = JsonObjectFactory.get().createJsonObject(TestJsonObject.class); JsonBooleanArray testBooleanArrayProperty = JsonObjectFactory.get().createJsonArray(JsonBooleanArray.class); testJsonObject.setObjectProperty(STR, testBooleanArrayProperty); assertEquals(testBooleanArrayPro...
/** * Test the retrieval of the boolean array value of a property. * <p> * This test asserts that the retrieved boolean array value of a property * matches the value of the corresponding property of the underlying * JSON object. */
Test the retrieval of the boolean array value of a property. This test asserts that the retrieved boolean array value of a property matches the value of the corresponding property of the underlying JSON object
testGetBooleanArrayProperty
{ "repo_name": "kjots/json-toolkit", "path": "json-object.shared/src/test/java/org/kjots/json/object/shared/JsonObjectGeneratorBooleanTestBase.java", "license": "apache-2.0", "size": 19200 }
[ "junit.framework.Assert" ]
import junit.framework.Assert;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,278,332
@Deprecated List<RichUser> getDirectRichAdmins(PerunSession perunSession, Vo vo) throws InternalErrorException;
List<RichUser> getDirectRichAdmins(PerunSession perunSession, Vo vo) throws InternalErrorException;
/** * Get list of Vo administrators directly assigned to VO like RichUsers without attributes. * * @param perunSession * @param vo * @return List of users, who are administrators of the Vo. Returns empty list if there is no VO admin. * @throws InternalErrorException */
Get list of Vo administrators directly assigned to VO like RichUsers without attributes
getDirectRichAdmins
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/VosManagerBl.java", "license": "bsd-2-clause", "size": 15341 }
[ "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.RichUser", "cz.metacentrum.perun.core.api.Vo", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "java.util.List" ]
import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.RichUser; import cz.metacentrum.perun.core.api.Vo; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,255,224
static public void removeExceptionListener(ExceptionListener l) { exceptionListeners.remove(l); }
static void function(ExceptionListener l) { exceptionListeners.remove(l); }
/** Removes exception listener * * @param l the listener */
Removes exception listener
removeExceptionListener
{ "repo_name": "viktorbahr/jaer", "path": "src/net/sf/jaer/hardwareinterface/HardwareInterfaceException.java", "license": "lgpl-2.1", "size": 2660 }
[ "net.sf.jaer.util.ExceptionListener" ]
import net.sf.jaer.util.ExceptionListener;
import net.sf.jaer.util.*;
[ "net.sf.jaer" ]
net.sf.jaer;
973,113
@Test public void testGfci() throws IOException { Path dataFile = Paths.get("test", "data", "diff_delim", "sim_data_20vars_100cases.csv"); String algorithm = "gfcic"; String data = dataFile.toAbsolutePath().toString(); String delimiter = ","; String dirOut = tmpDir.newFo...
void function() throws IOException { Path dataFile = Paths.get("test", "data", STR, STR); String algorithm = "gfcic"; String data = dataFile.toAbsolutePath().toString(); String delimiter = ","; String dirOut = tmpDir.newFolder(algorithm).toString(); String outputPrefix = algorithm; String[] args = { STR, algorithm, STR...
/** * Test of main method, of class CausalCmdApplication. * * @throws IOException */
Test of main method, of class CausalCmdApplication
testGfci
{ "repo_name": "ekummerfeld/GdistanceP", "path": "causal-cmd/src/test/java/edu/cmu/tetrad/cli/CausalCmdApplicationTest.java", "license": "gpl-2.0", "size": 3806 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.LinkOption", "java.nio.file.Path", "java.nio.file.Paths", "org.junit.Assert" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.Paths; import org.junit.Assert;
import java.io.*; import java.nio.file.*; import org.junit.*;
[ "java.io", "java.nio", "org.junit" ]
java.io; java.nio; org.junit;
1,175,598
public boolean writeHeader(OutputStream os) { try { writeInt(os, VolleyConfig.CACHE_MAGIC); writeString(os, key); writeString(os, etag == null ? "" : etag); writeLong(os, serverDate); writeLong(os, ttl); ...
boolean function(OutputStream os) { try { writeInt(os, VolleyConfig.CACHE_MAGIC); writeString(os, key); writeString(os, etag == null ? STR%s", e.toString()); return false; } } } private static class CountingInputStream extends FilterInputStream { private int bytesRead = 0; private CountingInputStream(InputStream in) { ...
/** * Writes the contents of this CacheHeader to the specified OutputStream. */
Writes the contents of this CacheHeader to the specified OutputStream
writeHeader
{ "repo_name": "dim1989/zhangzhoujun.github.io", "path": "MyVolley/app/src/main/java/com/android/myvolley/volley/toolbox/DiskBasedCache.java", "license": "epl-1.0", "size": 17555 }
[ "java.io.FilterInputStream", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.FilterInputStream; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,491,559
protected void unregisterClientInterest(String regionName, List keysOfInterest, boolean isClosing) { // only unregister durable interest if isClosing and !keepalive if (!isClosing || !getDurableKeepAlive() ) { this.cils[RegisterInterestTracker.durableInterestListIndex] .unregist...
void function(String regionName, List keysOfInterest, boolean isClosing) { if (!isClosing !getDurableKeepAlive() ) { this.cils[RegisterInterestTracker.durableInterestListIndex] .unregisterClientInterestList(regionName, keysOfInterest); } this.cils[RegisterInterestTracker.interestListIndex].unregisterClientInterestList(...
/** * Unregisters interest in the input region name and list of keys * * @param regionName The fully-qualified name of the region in which to unregister interest * @param keysOfInterest The list of keys in which to unregister interest * @param isClosing Whether the caller is closing */
Unregisters interest in the input region name and list of keys
unregisterClientInterest
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java", "license": "apache-2.0", "size": 111933 }
[ "java.util.List", "org.apache.geode.cache.client.internal.RegisterInterestTracker" ]
import java.util.List; import org.apache.geode.cache.client.internal.RegisterInterestTracker;
import java.util.*; import org.apache.geode.cache.client.internal.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
441,952
public ContractsAndGrantsAgency getAgency() { return agency = (ContractsAndGrantsAgency) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(ContractsAndGrantsAgency.class).retrieveExternalizableBusinessObjectIfNecessary(this, agency, "agency"); }
ContractsAndGrantsAgency function() { return agency = (ContractsAndGrantsAgency) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(ContractsAndGrantsAgency.class).retrieveExternalizableBusinessObjectIfNecessary(this, agency, STR); }
/** * Gets the agency attribute. * * @return Returns the agency. */
Gets the agency attribute
getAgency
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/cam/businessobject/AssetGlobal.java", "license": "apache-2.0", "size": 40652 }
[ "org.kuali.kfs.integration.cg.ContractsAndGrantsAgency", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.rice.krad.service.KualiModuleService" ]
import org.kuali.kfs.integration.cg.ContractsAndGrantsAgency; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.krad.service.KualiModuleService;
import org.kuali.kfs.integration.cg.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.krad.service.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
14,553
@ManagedOperation(description = "Gets the value of a Camel global option") String getGlobalOption(String key) throws Exception;
@ManagedOperation(description = STR) String getGlobalOption(String key) throws Exception;
/** * Gets the value of a CamelContext global option * * @param key the global option key * @return the global option value * @throws Exception when an error occurred */
Gets the value of a CamelContext global option
getGlobalOption
{ "repo_name": "tlehoux/camel", "path": "camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java", "license": "apache-2.0", "size": 17024 }
[ "org.apache.camel.api.management.ManagedOperation" ]
import org.apache.camel.api.management.ManagedOperation;
import org.apache.camel.api.management.*;
[ "org.apache.camel" ]
org.apache.camel;
937,059
public static ObjectMapper createObjectMapper() { ObjectMapper objectMapper = new ObjectMapper(); configure(objectMapper, null); return objectMapper; }
static ObjectMapper function() { ObjectMapper objectMapper = new ObjectMapper(); configure(objectMapper, null); return objectMapper; }
/** * Create a default Jackson object mapper for this class * * @return The object mapper */
Create a default Jackson object mapper for this class
createObjectMapper
{ "repo_name": "javagl/JglTF", "path": "jgltf-model/src/main/java/de/javagl/jgltf/model/io/JacksonUtils.java", "license": "mit", "size": 9689 }
[ "com.fasterxml.jackson.databind.ObjectMapper" ]
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
675,246
@Generated @Selector("DictionaryRepresentation") public native NSDictionary<?, ?> DictionaryRepresentation();
@Selector(STR) native NSDictionary<?, ?> function();
/** * DictionaryRepresentation * <p> * Convenience method to return a NSDictionary representation of this metric. * * @return An NSDictionary object containing the dictionary representation */
DictionaryRepresentation Convenience method to return a NSDictionary representation of this metric
DictionaryRepresentation
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metrickit/MXMetric.java", "license": "apache-2.0", "size": 6031 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,199,393
if (GcmHelper.sLoggingEnabled) { GcmUtils.Logger.d("Received token refresh broadcast"); } final int resultCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this); if (resultCode != ConnectionResult.SUCCESS) { GcmUtils.Logger.e("Token replaced but P...
if (GcmHelper.sLoggingEnabled) { GcmUtils.Logger.d(STR); } final int resultCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this); if (resultCode != ConnectionResult.SUCCESS) { GcmUtils.Logger.e(STR + resultCode); return; } GcmHelper.getInstance().registerInBackground(this, null); }
/** * Called if InstanceID token is updated. This may occur if the security of * the previous token had been compromised. This call is initiated by the * InstanceID provider. */
Called if InstanceID token is updated. This may occur if the security of the previous token had been compromised. This call is initiated by the InstanceID provider
onTokenRefresh
{ "repo_name": "Epholl/easygcm", "path": "easygcm-lib/src/main/java/eu/inloop/easygcm/EasyInstanceIDListenerService.java", "license": "apache-2.0", "size": 1729 }
[ "com.google.android.gms.common.ConnectionResult", "com.google.android.gms.common.GoogleApiAvailability" ]
import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.*;
[ "com.google.android" ]
com.google.android;
1,185,387
public boolean isLineCommandLine(String text) { String txt = text.trim(); Matcher m = simpleCommandPattern.matcher(txt); if (m.matches()) { return true; } return false; }
boolean function(String text) { String txt = text.trim(); Matcher m = simpleCommandPattern.matcher(txt); if (m.matches()) { return true; } return false; }
/** * Checks if the target text begins with a LaTeX command. * @param text source string * @return <code>true</code> if the line contains the latex command word, * <code>false</code> otherwise */
Checks if the target text begins with a LaTeX command
isLineCommandLine
{ "repo_name": "kolovos/texlipse", "path": "net.sourceforge.texlipse/src/net/sourceforge/texlipse/editor/TexEditorTools.java", "license": "epl-1.0", "size": 16659 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,021,558
private Node tryFoldLiteralConstructor(Node n) { Preconditions.checkArgument(n.isCall() || n.isNew()); Node constructorNameNode = n.getFirstChild(); Node newLiteralNode = null; // We require the AST to be normalized to ensure that, say, // Object() really refers to the built-in Object c...
Node function(Node n) { Preconditions.checkArgument(n.isCall() n.isNew()); Node constructorNameNode = n.getFirstChild(); Node newLiteralNode = null; if (isASTNormalized() && Token.NAME == constructorNameNode.getToken()) { String className = constructorNameNode.getString(); if (STR.equals(className)) { return tryFoldReg...
/** * Replaces a new Array, Object, or RegExp node with a literal, unless the * call is to a local constructor function with the same name. */
Replaces a new Array, Object, or RegExp node with a literal, unless the call is to a local constructor function with the same name
tryFoldLiteralConstructor
{ "repo_name": "Pimm/closure-compiler", "path": "src/com/google/javascript/jscomp/PeepholeSubstituteAlternateSyntax.java", "license": "apache-2.0", "size": 25921 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
1,064,524
private void setLocation(Node node, com.jme.scene.Node lightNode) { Node locationNode = node.getAttributes().getNamedItem("location"); String[] split = locationNode.getNodeValue().trim().split( WHITESPACE_REGEX); if (split.length >= 3) { float x = getFloat(split[0...
void function(Node node, com.jme.scene.Node lightNode) { Node locationNode = node.getAttributes().getNamedItem(STR); String[] split = locationNode.getNodeValue().trim().split( WHITESPACE_REGEX); if (split.length >= 3) { float x = getFloat(split[0], 0); float y = getFloat(split[1], 0); float z = getFloat(split[2], 0); l...
/** * Retrieves the location from the given X3D light node and sets the * translation of the given jME light node accordingly * * @param node * The X3D light node * @param lightNode * The jME light node */
Retrieves the location from the given X3D light node and sets the translation of the given jME light node accordingly
setLocation
{ "repo_name": "tectronics/xenogeddon", "path": "src/com/jmex/model/converters/X3dToJme.java", "license": "gpl-2.0", "size": 86719 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,165,260
private void setOffset(int p_76711_1_, int p_76711_2_, int p_76711_3_) throws IOException { this.offsets[p_76711_1_ + p_76711_2_ * 32] = p_76711_3_; this.dataFile.seek((long)((p_76711_1_ + p_76711_2_ * 32) * 4)); this.dataFile.writeInt(p_76711_3_); }
void function(int p_76711_1_, int p_76711_2_, int p_76711_3_) throws IOException { this.offsets[p_76711_1_ + p_76711_2_ * 32] = p_76711_3_; this.dataFile.seek((long)((p_76711_1_ + p_76711_2_ * 32) * 4)); this.dataFile.writeInt(p_76711_3_); }
/** * args: x, z, offset - sets the chunk's offset in the region file */
args: x, z, offset - sets the chunk's offset in the region file
setOffset
{ "repo_name": "CheeseL0ver/Ore-TTM", "path": "build/tmp/recompSrc/net/minecraft/world/chunk/storage/RegionFile.java", "license": "lgpl-2.1", "size": 12372 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,266,759
protected void checkAndDropBlock(World world, BlockPos pos, IBlockState state) { if (!this.canBlockStay(world, pos, state)) { world.setBlockToAir(pos); } }
void function(World world, BlockPos pos, IBlockState state) { if (!this.canBlockStay(world, pos, state)) { world.setBlockToAir(pos); } }
/** * checks if the block can stay, if not drop as item */
checks if the block can stay, if not drop as item
checkAndDropBlock
{ "repo_name": "Stormister/Rediscovered-Mod-1.8", "path": "src/main/java/com/stormister/rediscovered/BlockEmptyRoseBush.java", "license": "gpl-3.0", "size": 8556 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.util.BlockPos", "net.minecraft.world.World" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World;
import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.util; net.minecraft.world;
1,981,827
public Set<String> getSynchronizationLabels() { return synchronizationLabels; }
Set<String> function() { return synchronizationLabels; }
/** * Returns synchronization labels * * @return synchronization labels */
Returns synchronization labels
getSynchronizationLabels
{ "repo_name": "CvO-Theory/apt", "path": "src/module/uniol/apt/analysis/snet/SNetResult.java", "license": "gpl-2.0", "size": 2264 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
468,737
public void setDocumentLocator (Locator locator) { this.locator = locator; if (contentHandler != null) { contentHandler.setDocumentLocator(locator); } }
void function (Locator locator) { this.locator = locator; if (contentHandler != null) { contentHandler.setDocumentLocator(locator); } }
/** * Adapter implementation method; do not call. * Adapt a SAX1 document locator event. * * @param locator A document locator. * @see org.xml.sax.ContentHandler#setDocumentLocator */
Adapter implementation method; do not call. Adapt a SAX1 document locator event
setDocumentLocator
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java", "license": "gpl-2.0", "size": 29938 }
[ "org.xml.sax.Locator" ]
import org.xml.sax.Locator;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
10,640
public static Message create(final String to, final String from, final String text, final MediaFile media) throws Exception { final Map<String, Object> params = new HashMap<String, Object>(); params.put("to", to); params.put("from", from); params.put("text", text); params.put("...
static Message function(final String to, final String from, final String text, final MediaFile media) throws Exception { final Map<String, Object> params = new HashMap<String, Object>(); params.put("to", to); params.put("from", from); params.put("text", text); params.put("media", media.getContent()); return create(para...
/** * Convenience factory method to send MMS messages. Create a MediaFile object using the Media upload method * and pass that in. * * @param to the from number * @param from the to number * @param text the text * @param media the media * @return the message * @throws Except...
Convenience factory method to send MMS messages. Create a MediaFile object using the Media upload method and pass that in
create
{ "repo_name": "bandwidthcom/java-bandwidth", "path": "src/main/java/com/bandwidth/sdk/model/Message.java", "license": "mit", "size": 8936 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,754,405
public void sourceNindoWithoutModifyingHtml(Nindo nindo) { clearAffectHtml(); try { // NOTE(user): SelectionMaintainer does not know how to save selection // when the DOM is already modified, so don't try to save and restore the // selection here. // Typing extractor already places the...
void function(Nindo nindo) { clearAffectHtml(); try { dontSaveSelectionNindoSink.consumeAndReturnInvertible(nindo); } finally { setAffectHtml(); } }
/** * "Sources" an operation, which means applying it locally and sending it out * on the wire. * * This variant does not affect the html, or move the selection. */
"Sources" an operation, which means applying it locally and sending it out on the wire. This variant does not affect the html, or move the selection
sourceNindoWithoutModifyingHtml
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/client/editor/content/ContentDocument.java", "license": "apache-2.0", "size": 61597 }
[ "org.waveprotocol.wave.model.document.operation.Nindo" ]
import org.waveprotocol.wave.model.document.operation.Nindo;
import org.waveprotocol.wave.model.document.operation.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
2,705,117
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<RouteTableInner>, RouteTableInner> beginCreateOrUpdate( String resourceGroupName, String routeTableName, RouteTableInner parameters);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<RouteTableInner>, RouteTableInner> beginCreateOrUpdate( String resourceGroupName, String routeTableName, RouteTableInner parameters);
/** * Create or updates a route table in a specified resource group. * * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param parameters Parameters supplied to the create or update route table operation. * @throws IllegalArg...
Create or updates a route table in a specified resource group
beginCreateOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteTablesClient.java", "license": "mit", "size": 23551 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.network.fluent.models.RouteTableInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.RouteTableInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,144,872
@Factory public static <T> Matcher<Alert> alert(String topic, AlertSeverity severity) { return new AlertMatcher(topic, severity); }
static <T> Matcher<Alert> function(String topic, AlertSeverity severity) { return new AlertMatcher(topic, severity); }
/** * Constructs an {@link AlertMatcher} that will match any * {@link AlertMessage}s with the specified topic and severity. * * @param topic * @param severity * @return */
Constructs an <code>AlertMatcher</code> that will match any <code>AlertMessage</code>s with the specified topic and severity
alert
{ "repo_name": "elastisys/scale.cloudpool", "path": "kubernetes/src/test/java/com/elastisys/scale/cloudpool/kubernetes/AlertMatcher.java", "license": "apache-2.0", "size": 2128 }
[ "com.elastisys.scale.commons.net.alerter.Alert", "com.elastisys.scale.commons.net.alerter.AlertSeverity", "org.hamcrest.Matcher" ]
import com.elastisys.scale.commons.net.alerter.Alert; import com.elastisys.scale.commons.net.alerter.AlertSeverity; import org.hamcrest.Matcher;
import com.elastisys.scale.commons.net.alerter.*; import org.hamcrest.*;
[ "com.elastisys.scale", "org.hamcrest" ]
com.elastisys.scale; org.hamcrest;
1,964,311
public Hls hls() { return this.hls; }
Hls function() { return this.hls; }
/** * Get the HLS configuration. * * @return the hls value */
Get the HLS configuration
hls
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/mediaservices/mgmt-v2018_03_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_03_30_preview/implementation/LiveOutputInner.java", "license": "mit", "size": 6469 }
[ "com.microsoft.azure.management.mediaservices.v2018_03_30_preview.Hls" ]
import com.microsoft.azure.management.mediaservices.v2018_03_30_preview.Hls;
import com.microsoft.azure.management.mediaservices.v2018_03_30_preview.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,250,921
@VisibleForTesting static void deleteRMStateStore(Configuration conf) throws Exception { RMStateStore rmStore = RMStateStoreFactory.getStore(conf); rmStore.setResourceManager(new ResourceManager()); rmStore.init(conf); rmStore.start(); try { LOG.info("Deleting ResourceManager state store.....
static void deleteRMStateStore(Configuration conf) throws Exception { RMStateStore rmStore = RMStateStoreFactory.getStore(conf); rmStore.setResourceManager(new ResourceManager()); rmStore.init(conf); rmStore.start(); try { LOG.info(STR); rmStore.deleteStore(); LOG.info(STR); } finally { rmStore.stop(); } }
/** * Deletes the RMStateStore * * @param conf * @throws Exception */
Deletes the RMStateStore
deleteRMStateStore
{ "repo_name": "legend-hua/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java", "license": "apache-2.0", "size": 55755 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore", "org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStoreFactory" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore; import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStoreFactory;
import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.server.resourcemanager.recovery.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,858,499
public static double getErfc(final double x) { double ret = 0; if (x <= s_xsml) { return 2.d; } if (x > s_xmax) { throw new MathsExceptionUnderflow("x is so large that ERFC underflows"); } double y = Math.abs(x); if (y <= 1d) { if (y < s_sqeps) { return (1d - 2d *...
static double function(final double x) { double ret = 0; if (x <= s_xsml) { return 2.d; } if (x > s_xmax) { throw new MathsExceptionUnderflow(STR); } double y = Math.abs(x); if (y <= 1d) { if (y < s_sqeps) { return (1d - 2d * x / SQRTPI); } if (y >= s_sqeps) { return (1d - x * (1d + DCSEVL.getDCSEVL(2.d * x * x - 1.d, ...
/** * Gets the complimentary error function at position 'x' * @param x the position at which to evaluate the complimentary error function * @return the complimentary error function value at position 'x' */
Gets the complimentary error function at position 'x'
getErfc
{ "repo_name": "charles-cooper/idylfin", "path": "src/com/opengamma/maths/lowlevelapi/slatec/fnlib/DERFC.java", "license": "apache-2.0", "size": 8517 }
[ "com.opengamma.analytics.math.statistics.distribution.fnlib.DCSEVL", "com.opengamma.maths.commonapi.exceptions.MathsExceptionUnderflow" ]
import com.opengamma.analytics.math.statistics.distribution.fnlib.DCSEVL; import com.opengamma.maths.commonapi.exceptions.MathsExceptionUnderflow;
import com.opengamma.analytics.math.statistics.distribution.fnlib.*; import com.opengamma.maths.commonapi.exceptions.*;
[ "com.opengamma.analytics", "com.opengamma.maths" ]
com.opengamma.analytics; com.opengamma.maths;
1,124,622
public synchronized List<Item> getItems(Task t) { List<Item> result =new ArrayList<Item>(); result.addAll(blockedProjects.getAll(t)); result.addAll(buildables.getAll(t)); result.addAll(pendings.getAll(t)); for (Item item : waitingList) { if (item.task == t) ...
synchronized List<Item> function(Task t) { List<Item> result =new ArrayList<Item>(); result.addAll(blockedProjects.getAll(t)); result.addAll(buildables.getAll(t)); result.addAll(pendings.getAll(t)); for (Item item : waitingList) { if (item.task == t) result.add(item); } return result; } /** * Left for backward compatib...
/** * Gets the information about the queue item for the given project. * * @return null if the project is not in the queue. */
Gets the information about the queue item for the given project
getItems
{ "repo_name": "jtnord/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 59609 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,296,353
public EList<ThermalGeneratingUnit> getThermalGeneratingUnits() { if (thermalGeneratingUnits == null) { thermalGeneratingUnits = new BasicInternalEList<ThermalGeneratingUnit>(ThermalGeneratingUnit.class); } return thermalGeneratingUnits; }
EList<ThermalGeneratingUnit> function() { if (thermalGeneratingUnits == null) { thermalGeneratingUnits = new BasicInternalEList<ThermalGeneratingUnit>(ThermalGeneratingUnit.class); } return thermalGeneratingUnits; }
/** * Returns the value of the '<em><b>Thermal Generating Units</b></em>' reference list. * The list contents are of type {@link CIM15.IEC61970.Generation.Production.ThermalGeneratingUnit}. * It is bidirectional and its opposite is '{@link CIM15.IEC61970.Generation.Production.ThermalGeneratingUnit#getCogeneration...
Returns the value of the 'Thermal Generating Units' reference list. The list contents are of type <code>CIM15.IEC61970.Generation.Production.ThermalGeneratingUnit</code>. It is bidirectional and its opposite is '<code>CIM15.IEC61970.Generation.Production.ThermalGeneratingUnit#getCogenerationPlant Cogeneration Plant</co...
getThermalGeneratingUnits
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61970/Generation/Production/CogenerationPlant.java", "license": "apache-2.0", "size": 27244 }
[ "org.eclipse.emf.common.util.EList", "org.eclipse.emf.ecore.util.BasicInternalEList" ]
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.util.BasicInternalEList;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,471,055
@Override public NodePK createNode(NodeDetail nd, NodeDetail fatherDetail) { try { if (!NodeDetail.FILE_LINK_TYPE.equals(nd.getNodeType())) { nd.setPath(fatherDetail.getPath() + fatherDetail.getNodePK().getId() + "/"); } nd.setLevel(fatherDetail.getLevel() + 1); nd.setFatherPK(fa...
NodePK function(NodeDetail nd, NodeDetail fatherDetail) { try { if (!NodeDetail.FILE_LINK_TYPE.equals(nd.getNodeType())) { nd.setPath(fatherDetail.getPath() + fatherDetail.getNodePK().getId() + "/"); } nd.setLevel(fatherDetail.getLevel() + 1); nd.setFatherPK(fatherDetail.getNodePK()); if (nd.getLanguage() == null) { nd...
/** * Create a new Node object * * @param nd the NodeDetail which contains data * @param fatherDetail the PK of the user who have create this node * @return the NodePK of the new Node * @see NodeDetail * @since 1.0 */
Create a new Node object
createNode
{ "repo_name": "SilverDav/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/node/service/DefaultNodeService.java", "license": "agpl-3.0", "size": 27556 }
[ "org.silverpeas.core.i18n.I18NHelper", "org.silverpeas.core.node.model.NodeDetail", "org.silverpeas.core.node.model.NodePK", "org.silverpeas.core.node.model.NodeRuntimeException" ]
import org.silverpeas.core.i18n.I18NHelper; import org.silverpeas.core.node.model.NodeDetail; import org.silverpeas.core.node.model.NodePK; import org.silverpeas.core.node.model.NodeRuntimeException;
import org.silverpeas.core.i18n.*; import org.silverpeas.core.node.model.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
2,885,236
void processChatMessage(CPacketChatMessage packetIn);
void processChatMessage(CPacketChatMessage packetIn);
/** * Process chat messages (broadcast back to clients) and commands (executes) */
Process chat messages (broadcast back to clients) and commands (executes)
processChatMessage
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/network/play/INetHandlerPlayServer.java", "license": "gpl-3.0", "size": 6338 }
[ "net.minecraft.network.play.client.CPacketChatMessage" ]
import net.minecraft.network.play.client.CPacketChatMessage;
import net.minecraft.network.play.client.*;
[ "net.minecraft.network" ]
net.minecraft.network;
2,184,964
return parse(IOUtils.toString(responseStream)); }
return parse(IOUtils.toString(responseStream)); }
/** * Do not override this method. Use the **abstract** {@link #parse(String)} * * This method is used for parsing text from the server. can be used for * anything that can be converted out of a string * * @param responseStream * The JSON string needed for parsing. * @return Object of...
Do not override this method. Use the **abstract** <code>#parse(String)</code> This method is used for parsing text from the server. can be used for anything that can be converted out of a string
parse
{ "repo_name": "darko1002001/android-rest-client", "path": "android-rest-lib-additions/src/main/java/com/dg/libs/rest/parsers/StringHttpResponseParser.java", "license": "apache-2.0", "size": 1076 }
[ "org.apache.commons.io.IOUtils" ]
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.*;
[ "org.apache.commons" ]
org.apache.commons;
1,923,189
private static SharedPreferences getPreferences(Context context) { return PreferenceManager.getDefaultSharedPreferences(context); }
static SharedPreferences function(Context context) { return PreferenceManager.getDefaultSharedPreferences(context); }
/** * Get the {@link android.content.SharedPreferences} used for saving/restoring data. * * @param context a {@link android.content.Context}. * @return the {@link android.content.SharedPreferences} used for saving/restoring data. */
Get the <code>android.content.SharedPreferences</code> used for saving/restoring data
getPreferences
{ "repo_name": "Learn-Android-app/CameraColorPicker", "path": "CameraColorPicker/app/src/main/java/fr/tvbarthel/apps/cameracolorpicker/data/Palettes.java", "license": "apache-2.0", "size": 7601 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager" ]
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager;
import android.content.*; import android.preference.*;
[ "android.content", "android.preference" ]
android.content; android.preference;
2,063,104
public SeleniumWEmailFieldWebElement findWEmailField(final By by) { return new SeleniumWEmailFieldWebElement(findElementImmediate(by), this); }
SeleniumWEmailFieldWebElement function(final By by) { return new SeleniumWEmailFieldWebElement(findElementImmediate(by), this); }
/** * Find a WEmailField by the given criteria. * * @param by the By selector. * @return the SeleniumWEmailFieldWebElement or null if not found. */
Find a WEmailField by the given criteria
findWEmailField
{ "repo_name": "marksreeves/wcomponents", "path": "wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/driver/SeleniumWComponentsWebDriver.java", "license": "gpl-3.0", "size": 20486 }
[ "com.github.bordertech.wcomponents.test.selenium.element.SeleniumWEmailFieldWebElement", "org.openqa.selenium.By" ]
import com.github.bordertech.wcomponents.test.selenium.element.SeleniumWEmailFieldWebElement; import org.openqa.selenium.By;
import com.github.bordertech.wcomponents.test.selenium.element.*; import org.openqa.selenium.*;
[ "com.github.bordertech", "org.openqa.selenium" ]
com.github.bordertech; org.openqa.selenium;
286,069
public String getViewDefinition(String viewName) throws HecataeusException{ String statement = ""; try { Statement stm = this._connection.createStatement(); ResultSet res = stm.executeQuery(String.format(this._dbSettings.getQueryForViews(),viewName)); while (res.next()) { statement = res....
String function(String viewName) throws HecataeusException{ String statement = STRVIEW_DEFINITION"); } res.close(); }catch( Exception e ) { throw new HecataeusException(e.getMessage()); } return this._dbSettings.formatViewDefinition(statement, viewName); }
/*** * Gets a view name and returns the definition of the view * @param tableName * @return */
Gets a view name and returns the definition of the view
getViewDefinition
{ "repo_name": "pmanousis/Hecataeus", "path": "src/edu/ntua/dblab/hecataeus/dao/HecataeusDatabase.java", "license": "gpl-3.0", "size": 14036 }
[ "edu.ntua.dblab.hecataeus.gui.HecataeusException" ]
import edu.ntua.dblab.hecataeus.gui.HecataeusException;
import edu.ntua.dblab.hecataeus.gui.*;
[ "edu.ntua.dblab" ]
edu.ntua.dblab;
594,496
public void setXmlContentTypeManager(CmsXmlContentTypeManager manager) { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_XML_CONTENT_FINISHED_0)); } m_xmlContentTypeManager = manager; }
void function(CmsXmlContentTypeManager manager) { if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_XML_CONTENT_FINISHED_0)); } m_xmlContentTypeManager = manager; }
/** * Sets the generated XML content type manager.<p> * * @param manager the generated XML content type manager to set */
Sets the generated XML content type manager
setXmlContentTypeManager
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/configuration/CmsVfsConfiguration.java", "license": "lgpl-2.1", "size": 38541 }
[ "org.opencms.main.CmsLog", "org.opencms.xml.CmsXmlContentTypeManager" ]
import org.opencms.main.CmsLog; import org.opencms.xml.CmsXmlContentTypeManager;
import org.opencms.main.*; import org.opencms.xml.*;
[ "org.opencms.main", "org.opencms.xml" ]
org.opencms.main; org.opencms.xml;
907,062
Update withParameters(String parametersJson) throws IOException;
Update withParameters(String parametersJson) throws IOException;
/** * Specifies the parameters as a JSON string. * * @param parametersJson the JSON string * @return the next stage of the deployment update * @throws IOException exception thrown from serialization/deserialization */
Specifies the parameters as a JSON string
withParameters
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/Deployment.java", "license": "mit", "size": 19995 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
557,825
public int startElement(final QName qname, final Attributes attributes) { final int nodeNr = doc.addNode(Node.ELEMENT_NODE, level, qname); if(attributes != null) { // parse attributes for(int i = 0; i < attributes.getLength(); i++) { final String attrQName =...
int function(final QName qname, final Attributes attributes) { final int nodeNr = doc.addNode(Node.ELEMENT_NODE, level, qname); if(attributes != null) { for(int i = 0; i < attributes.getLength(); i++) { final String attrQName = attributes.getQName(i); if(!(attrQName.startsWith(XMLConstants.XMLNS_ATTRIBUTE))) { final in...
/** * Create a new element. * * @param qname DOCUMENT ME! * @param attributes DOCUMENT ME! * @return the node number of the created element */
Create a new element
startElement
{ "repo_name": "windauer/exist", "path": "exist-core/src/main/java/org/exist/dom/memtree/MemTreeBuilder.java", "license": "lgpl-2.1", "size": 17300 }
[ "javax.xml.XMLConstants", "org.exist.dom.QName", "org.exist.xquery.Constants", "org.w3c.dom.Node", "org.xml.sax.Attributes" ]
import javax.xml.XMLConstants; import org.exist.dom.QName; import org.exist.xquery.Constants; import org.w3c.dom.Node; import org.xml.sax.Attributes;
import javax.xml.*; import org.exist.dom.*; import org.exist.xquery.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "javax.xml", "org.exist.dom", "org.exist.xquery", "org.w3c.dom", "org.xml.sax" ]
javax.xml; org.exist.dom; org.exist.xquery; org.w3c.dom; org.xml.sax;
1,286,528
@ServiceMethod(returns = ReturnType.SINGLE) public Response<ListQueueServicesInner> listWithResponse( String resourceGroupName, String accountName, Context context) { return listWithResponseAsync(resourceGroupName, accountName, context).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) Response<ListQueueServicesInner> function( String resourceGroupName, String accountName, Context context) { return listWithResponseAsync(resourceGroupName, accountName, context).block(); }
/** * List all queue services for the storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names ...
List all queue services for the storage account
listWithResponse
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/QueueServicesClientImpl.java", "license": "mit", "size": 33746 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.storage.fluent.models.ListQueueServicesInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.storage.fluent.models.ListQueueServicesInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
425,698
protected void buildProfiles() { mCurrentProfileView.setVisibility(View.INVISIBLE); mAccountHeaderTextSection.setVisibility(View.INVISIBLE); mAccountHeaderTextSection.setOnClickListener(onSelectionClickListener); mAccountSwitcherArrow.setVisibility(View.INVISIBLE); mProfileFi...
void function() { mCurrentProfileView.setVisibility(View.INVISIBLE); mAccountHeaderTextSection.setVisibility(View.INVISIBLE); mAccountHeaderTextSection.setOnClickListener(onSelectionClickListener); mAccountSwitcherArrow.setVisibility(View.INVISIBLE); mProfileFirstView.setVisibility(View.INVISIBLE); mProfileFirstView.se...
/** * helper method to build the views for the ui */
helper method to build the views for the ui
buildProfiles
{ "repo_name": "GaneshRepo/Material-Drawer", "path": "library/src/main/java/com/mikepenz/materialdrawer/accountswitcher/AccountHeader.java", "license": "apache-2.0", "size": 42602 }
[ "android.text.TextUtils", "android.view.View", "com.mikepenz.materialdrawer.model.interfaces.IProfile" ]
import android.text.TextUtils; import android.view.View; import com.mikepenz.materialdrawer.model.interfaces.IProfile;
import android.text.*; import android.view.*; import com.mikepenz.materialdrawer.model.interfaces.*;
[ "android.text", "android.view", "com.mikepenz.materialdrawer" ]
android.text; android.view; com.mikepenz.materialdrawer;
1,485,831
private void runCommon(IEndpointPublisher publisher, CnsSubscriptionProtocol protocol, String endpoint, String subArn, boolean rawDelivery) throws Exception { long ts1 = System.currentTimeMillis(); publisher.setEndpoint(endpoint); publisher.setRawMessageDelivery(rawDelivery); ...
void function(IEndpointPublisher publisher, CnsSubscriptionProtocol protocol, String endpoint, String subArn, boolean rawDelivery) throws Exception { long ts1 = System.currentTimeMillis(); publisher.setEndpoint(endpoint); publisher.setRawMessageDelivery(rawDelivery); publisher.setMessage(message); publisher.setSubject(...
/** * Send the notification and let any exceptions bubble up * @param publisher * @param protocol * @param endpoint * @param subArn * @throws Exception */
Send the notification and let any exceptions bubble up
runCommon
{ "repo_name": "Comcast/cmb", "path": "src/com/comcast/cns/tools/CNSPublishJob.java", "license": "apache-2.0", "size": 15118 }
[ "com.comcast.cmb.common.controller.CMBControllerServlet", "com.comcast.cmb.common.util.ValueAccumulator", "com.comcast.cns.io.IEndpointPublisher", "com.comcast.cns.model.CNSSubscription" ]
import com.comcast.cmb.common.controller.CMBControllerServlet; import com.comcast.cmb.common.util.ValueAccumulator; import com.comcast.cns.io.IEndpointPublisher; import com.comcast.cns.model.CNSSubscription;
import com.comcast.cmb.common.controller.*; import com.comcast.cmb.common.util.*; import com.comcast.cns.io.*; import com.comcast.cns.model.*;
[ "com.comcast.cmb", "com.comcast.cns" ]
com.comcast.cmb; com.comcast.cns;
1,623,976
public List<String> getAllWelcomeFile();
List<String> function();
/** * Returns all <code>welcome-file</code> elements * @return list of <code>welcome-file</code> */
Returns all <code>welcome-file</code> elements
getAllWelcomeFile
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/webcommon31/WelcomeFileListType.java", "license": "epl-1.0", "size": 2525 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
143,164
public BigDecimal getMeasureTarget () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MeasureTarget); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MeasureTarget); if (bd == null) return Env.ZERO; return bd; }
/** Get Measure Target. @return Target value for measure */
Get Measure Target
getMeasureTarget
{ "repo_name": "sumairsh/adempiere", "path": "base/src/org/compiere/model/X_PA_SLA_Goal.java", "license": "gpl-2.0", "size": 9059 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
1,972,249
Map<LogicalTypeRoot, Class<?>> conversions = new HashMap<>(); conversions.put(LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE, Timestamp.class); conversions.put(LogicalTypeRoot.TIME_WITHOUT_TIME_ZONE, Time.class); conversions.put(LogicalTypeRoot.DATE, Date.class); return new DataTypeConversi...
Map<LogicalTypeRoot, Class<?>> conversions = new HashMap<>(); conversions.put(LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE, Timestamp.class); conversions.put(LogicalTypeRoot.TIME_WITHOUT_TIME_ZONE, Time.class); conversions.put(LogicalTypeRoot.DATE, Date.class); return new DataTypeConversionClassTransformation(conversion...
/** * Returns a type transformation that transforms data type to a new data type whose conversion * class is {@link java.sql.Timestamp}/{@link java.sql.Time}/{@link java.sql.Date} if the * original data type is TIMESTAMP/TIME/DATE. */
Returns a type transformation that transforms data type to a new data type whose conversion class is <code>java.sql.Timestamp</code>/<code>java.sql.Time</code>/<code>java.sql.Date</code> if the original data type is TIMESTAMP/TIME/DATE
timeToSqlTypes
{ "repo_name": "aljoscha/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeTransformations.java", "license": "apache-2.0", "size": 3506 }
[ "java.sql.Date", "java.sql.Time", "java.sql.Timestamp", "java.util.HashMap", "java.util.Map", "org.apache.flink.table.types.inference.transforms.DataTypeConversionClassTransformation", "org.apache.flink.table.types.logical.LogicalTypeRoot" ]
import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.HashMap; import java.util.Map; import org.apache.flink.table.types.inference.transforms.DataTypeConversionClassTransformation; import org.apache.flink.table.types.logical.LogicalTypeRoot;
import java.sql.*; import java.util.*; import org.apache.flink.table.types.inference.transforms.*; import org.apache.flink.table.types.logical.*;
[ "java.sql", "java.util", "org.apache.flink" ]
java.sql; java.util; org.apache.flink;
1,673,773
private synchronized void activateOnePartition(DbusPartitionInfo partition) throws DatabusClientException { _log.info("Trying to activate partition :" + partition); try { if ( regMap.containsKey(partition)) { _log.info("Partition (" + partition + ") is already added ...
synchronized void function(DbusPartitionInfo partition) throws DatabusClientException { _log.info(STR + partition); try { if ( regMap.containsKey(partition)) { _log.info(STR + partition + STR + regMap.get(partition).getState() + STR); return; } Collection<DatabusCombinedConsumer> consumers = _consumerFactory.createPart...
/** * Callback to activate one partition that was added * @param partition * @throws DatabusException */
Callback to activate one partition that was added
activateOnePartition
{ "repo_name": "rahuljoshi123/databus", "path": "databus-client/databus-client-http/src/main/java/com/linkedin/databus/client/registration/DatabusV2ClusterRegistrationImpl.java", "license": "apache-2.0", "size": 33714 }
[ "com.linkedin.databus.client.pub.CheckpointPersistenceProvider", "com.linkedin.databus.client.pub.ClusterCheckpointPersistenceProvider", "com.linkedin.databus.client.pub.DatabusClientException", "com.linkedin.databus.client.pub.DatabusCombinedConsumer", "com.linkedin.databus.client.pub.DbusPartitionInfo", ...
import com.linkedin.databus.client.pub.CheckpointPersistenceProvider; import com.linkedin.databus.client.pub.ClusterCheckpointPersistenceProvider; import com.linkedin.databus.client.pub.DatabusClientException; import com.linkedin.databus.client.pub.DatabusCombinedConsumer; import com.linkedin.databus.client.pub.DbusPar...
import com.linkedin.databus.client.pub.*; import com.linkedin.databus.client.pub.mbean.*; import com.linkedin.databus.core.monitoring.mbean.*; import com.linkedin.databus2.core.*; import com.linkedin.databus2.core.filter.*; import java.util.*;
[ "com.linkedin.databus", "com.linkedin.databus2", "java.util" ]
com.linkedin.databus; com.linkedin.databus2; java.util;
1,672,140
protected Entity findPlayerToAttack() { EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D); return var1 != null && this.canEntityBeSeen(var1) ? var1 : null; }
Entity function() { EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D); return var1 != null && this.canEntityBeSeen(var1) ? var1 : null; }
/** * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking * (Animals, Spiders at day, peaceful PigZombies). */
Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking (Animals, Spiders at day, peaceful PigZombies)
findPlayerToAttack
{ "repo_name": "mviitanen/marsmod", "path": "mcp/src/minecraft/net/minecraft/entity/monster/EntityMob.java", "license": "gpl-2.0", "size": 7014 }
[ "net.minecraft.entity.Entity", "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.*; import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,773,917
private final void saveConfig(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fileName = request.getParameter("config"); File file = new File(userFileFolder, URLDecoder.decode(fileName, "UTF-8")); response.setContentType(Me...
final void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String fileName = request.getParameter(STR); File file = new File(userFileFolder, URLDecoder.decode(fileName, "UTF-8")); response.setContentType(MediaType.APPLICATION_JSON); class Response { public Boole...
/** * Save config file send by editor * * @param request * @param response * @throws ServletException * @throws IOException */
Save config file send by editor
saveConfig
{ "repo_name": "steand/openhab2-addons", "path": "addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/servlet/CometVisuServlet.java", "license": "epl-1.0", "size": 45138 }
[ "java.io.File", "java.io.IOException", "java.net.URLDecoder", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.ws.rs.core.MediaType" ]
import java.io.File; import java.io.IOException; import java.net.URLDecoder; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.MediaType;
import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import javax.ws.rs.core.*;
[ "java.io", "java.net", "javax.servlet", "javax.ws" ]
java.io; java.net; javax.servlet; javax.ws;
2,109,756
private void setMetadataRule(OpenstackNode osNode, boolean install) { TrafficSelector selector = DefaultTrafficSelector.builder() .matchEthType(Ethernet.TYPE_IPV4) .matchIPProtocol(IPv4.PROTOCOL_TCP) .matchIPDst(IpPrefix.valueOf( ...
void function(OpenstackNode osNode, boolean install) { TrafficSelector selector = DefaultTrafficSelector.builder() .matchEthType(Ethernet.TYPE_IPV4) .matchIPProtocol(IPv4.PROTOCOL_TCP) .matchIPDst(IpPrefix.valueOf( IpAddress.valueOf(METADATA_SERVER_IP), PREFIX_LENGTH)) .matchTcpDst(TpPort.tpPort(HTTP_SERVER_PORT)) .bui...
/** * Installs metadata rule for receiving all metadata request packets. * * @param osNode openstack node * @param install installation flag */
Installs metadata rule for receiving all metadata request packets
setMetadataRule
{ "repo_name": "oplinkoms/onos", "path": "apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackMetadataProxyHandler.java", "license": "apache-2.0", "size": 32067 }
[ "org.onlab.packet.Ethernet", "org.onlab.packet.IPv4", "org.onlab.packet.IpAddress", "org.onlab.packet.IpPrefix", "org.onlab.packet.TpPort", "org.onosproject.net.flow.DefaultTrafficSelector", "org.onosproject.net.flow.DefaultTrafficTreatment", "org.onosproject.net.flow.TrafficSelector", "org.onosproj...
import org.onlab.packet.Ethernet; import org.onlab.packet.IPv4; import org.onlab.packet.IpAddress; import org.onlab.packet.IpPrefix; import org.onlab.packet.TpPort; import org.onosproject.net.flow.DefaultTrafficSelector; import org.onosproject.net.flow.DefaultTrafficTreatment; import org.onosproject.net.flow.TrafficSel...
import org.onlab.packet.*; import org.onosproject.net.flow.*; import org.onosproject.openstacknode.api.*;
[ "org.onlab.packet", "org.onosproject.net", "org.onosproject.openstacknode" ]
org.onlab.packet; org.onosproject.net; org.onosproject.openstacknode;
377,392
ModelJAXBContextFactory getModelJAXBContextFactory();
ModelJAXBContextFactory getModelJAXBContextFactory();
/** * Returns the JAXB Context factory used to create Models. * * @return the JAXB Context factory used to create Models. */
Returns the JAXB Context factory used to create Models
getModelJAXBContextFactory
{ "repo_name": "christophd/camel", "path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java", "license": "apache-2.0", "size": 29137 }
[ "org.apache.camel.spi.ModelJAXBContextFactory" ]
import org.apache.camel.spi.ModelJAXBContextFactory;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
2,479,393
static byte[] takeBufferedMessage(Context context) { SharedPreferences preferences = getPreferences(context); String message = preferences.getString(BUFFERED_MSG_PREF, null); if (message == null) { // No message was buffered. return null; } // There is a message to return. Remove the s...
static byte[] takeBufferedMessage(Context context) { SharedPreferences preferences = getPreferences(context); String message = preferences.getString(BUFFERED_MSG_PREF, null); if (message == null) { return null; } SharedPreferences.Editor editor = preferences.edit(); editor.remove(BUFFERED_MSG_PREF); if (!editor.commit(...
/** * Removes and returns the buffered Ticl message, if any. If no message was buffered, returns * {@code null}. */
Removes and returns the buffered Ticl message, if any. If no message was buffered, returns null
takeBufferedMessage
{ "repo_name": "Teamxrtc/webrtc-streaming-node", "path": "third_party/webrtc/src/chromium/src/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidChannelPreferences.java", "license": "mit", "size": 7926 }
[ "android.content.Context", "android.content.SharedPreferences", "android.util.Base64" ]
import android.content.Context; import android.content.SharedPreferences; import android.util.Base64;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
2,716,903
private void generateTree(int x, int y, int z) { setBlock(x, y, z, (byte) Material.BRICK.getId()); }
void function(int x, int y, int z) { setBlock(x, y, z, (byte) Material.BRICK.getId()); }
/** * Plants a normal tree, as with all tree types, the actual generation * is done in the block populator and this method just adds a place holder. * @param x - position of the bottom of the tree, not the block below it * @param y - position of the bottom of the tree, not the block below it * @param z - posi...
Plants a normal tree, as with all tree types, the actual generation is done in the block populator and this method just adds a place holder
generateTree
{ "repo_name": "samyratchet/test", "path": "src/me/physika/SkyStone/Island.java", "license": "mit", "size": 43520 }
[ "org.bukkit.Material" ]
import org.bukkit.Material;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
2,751,386
public static interface ManagesGroupPredicate { public boolean shouldManageGroup(GitLabGroupInfo group) throws GitLabApiException; }
static interface ManagesGroupPredicate { public boolean function(GitLabGroupInfo group) throws GitLabApiException; }
/** * Checks whether a group should be included by the folder manager. * * @param group the group * @return true if the group should be included * @throws GitLabApiException */
Checks whether a group should be included by the folder manager
shouldManageGroup
{ "repo_name": "enil/gitlab-auth-plugin", "path": "src/main/java/com/sonymobile/jenkins/plugins/gitlab/gitlabauth/folder/GroupFolderManager.java", "license": "mit", "size": 13253 }
[ "com.sonymobile.gitlab.exceptions.GitLabApiException", "com.sonymobile.gitlab.model.GitLabGroupInfo" ]
import com.sonymobile.gitlab.exceptions.GitLabApiException; import com.sonymobile.gitlab.model.GitLabGroupInfo;
import com.sonymobile.gitlab.exceptions.*; import com.sonymobile.gitlab.model.*;
[ "com.sonymobile.gitlab" ]
com.sonymobile.gitlab;
2,026,883