method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void testCoordinatorChange() throws Exception {
// Start servers.
Ignite srv1 = ignitionStart(serverConfiguration(1));
Ignite srv2 = ignitionStart(serverConfiguration(2));
ignitionStart(serverConfiguration(3, true));
ignitionStart(serverConfiguration(4));
... | void function() throws Exception { Ignite srv1 = ignitionStart(serverConfiguration(1)); Ignite srv2 = ignitionStart(serverConfiguration(2)); ignitionStart(serverConfiguration(3, true)); ignitionStart(serverConfiguration(4)); UUID srv1Id = srv1.cluster().localNode().id(); UUID srv2Id = srv2.cluster().localNode().id(); I... | /**
* Make sure that coordinator migrates correctly between nodes.
*
* @throws Exception If failed.
*/ | Make sure that coordinator migrates correctly between nodes | testCoordinatorChange | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java",
"license": "apache-2.0",
"size": 37675
} | [
"java.util.concurrent.CountDownLatch",
"org.apache.ignite.Ignite",
"org.apache.ignite.Ignition",
"org.apache.ignite.cache.QueryIndex",
"org.apache.ignite.internal.IgniteInternalFuture"
] | import java.util.concurrent.CountDownLatch; import org.apache.ignite.Ignite; import org.apache.ignite.Ignition; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.internal.IgniteInternalFuture; | import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,051,806 |
long getCapacity() throws IOException {
long remaining = usage.getCapacity() - reserved;
return remaining > 0 ? remaining : 0;
} | long getCapacity() throws IOException { long remaining = usage.getCapacity() - reserved; return remaining > 0 ? remaining : 0; } | /**
* Calculate the capacity of the filesystem, after removing any
* reserved capacity.
* @return the unreserved number of bytes left in this filesystem. May be zero.
*/ | Calculate the capacity of the filesystem, after removing any reserved capacity | getCapacity | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FSDataset.java",
"license": "apache-2.0",
"size": 92768
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 718,314 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//processRequest(request, response);
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String nextJSP = STR; try { String action = request.getPathInfo(); if("/".equals(action)) { nextJSP = displayHotelAcceuil(request); }else if(STR.equals(action)) { nextJSP = displayDetailHotel(request); }else i... | /**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | doGet | {
"repo_name": "emmanuelJd/HEBook",
"path": "HEBookingClient/src/java/org/client/servlet/HEBookingServlet.java",
"license": "gpl-2.0",
"size": 43250
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,856,395 |
//-----------------------------------------------------------------------
List<String> performCommand(String[] cmdAttribs, int max, long timeout) throws IOException {
// this method does what it can to avoid the 'Too many open files' error
// based on trial and error and these links:
//... | List<String> performCommand(String[] cmdAttribs, int max, long timeout) throws IOException { List<String> lines = new ArrayList<String>(20); Process proc = null; InputStream in = null; OutputStream out = null; InputStream err = null; BufferedReader inr = null; try { Thread monitor = ThreadMonitor.start(timeout); proc =... | /**
* Performs the os command.
*
* @param cmdAttribs the command line parameters
* @param max The maximum limit for the lines returned
* @param timeout The timout amount in milliseconds or no timeout if the value
* is zero or less
* @return the parsed data
* @throws IOException... | Performs the os command | performCommand | {
"repo_name": "sebastiansemmle/acio",
"path": "src/main/java/org/apache/commons/io/FileSystemUtils.java",
"license": "apache-2.0",
"size": 22181
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.io.OutputStream",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"java.util.Locale"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,720,474 |
public boolean isDisabled()
{
ValueBinding vb = getValueBinding("disabled");
if (vb != null)
{
this.disabled = (Boolean)vb.getValue(getFacesContext());
}
if (this.disabled != null)
{
return this.disabled.booleanValue();
}
else
... | boolean function() { ValueBinding vb = getValueBinding(STR); if (vb != null) { this.disabled = (Boolean)vb.getValue(getFacesContext()); } if (this.disabled != null) { return this.disabled.booleanValue(); } else { return false; } } | /**
* Returns the disabled flag
*
* @return true if the mode list is disabled
*/ | Returns the disabled flag | isDisabled | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/web-client/source/java/org/alfresco/web/ui/common/component/UIModeList.java",
"license": "lgpl-3.0",
"size": 8532
} | [
"javax.faces.el.ValueBinding"
] | import javax.faces.el.ValueBinding; | import javax.faces.el.*; | [
"javax.faces"
] | javax.faces; | 2,377,791 |
public Optional<XmlDocument> merge(
XmlDocument lowerPriorityDocument,
MergingReport.Builder mergingReportBuilder) {
if (getFileType() == Type.MAIN) {
mergingReportBuilder.getActionRecorder().recordDefaultNodeAction(getRootNode());
}
getRootNode().mergeW... | Optional<XmlDocument> function( XmlDocument lowerPriorityDocument, MergingReport.Builder mergingReportBuilder) { if (getFileType() == Type.MAIN) { mergingReportBuilder.getActionRecorder().recordDefaultNodeAction(getRootNode()); } getRootNode().mergeWithLowerPriorityNode( lowerPriorityDocument.getRootNode(), mergingRepo... | /**
* merge this higher priority document with a higher priority document.
* @param lowerPriorityDocument the lower priority document to merge in.
* @param mergingReportBuilder the merging report to record errors and actions.
* @return a new merged {@link com.android.manifmerger.XmlDocument} or
... | merge this higher priority document with a higher priority document | merge | {
"repo_name": "tranleduy2000/javaide",
"path": "aosp/manifest-merger/src/main/java/com/android/manifmerger/XmlDocument.java",
"license": "gpl-3.0",
"size": 23681
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 234,145 |
public Attr getAttributeNodeNS(String namespaceURI, String localName){
if (needsSyncData()) {
synchronizeData();
}
if (attributes == null) {
return null;
}
return (Attr)attributes.getNamedItemNS(namespaceURI, localName);
} // getAttributeNodeNS(S... | Attr function(String namespaceURI, String localName){ if (needsSyncData()) { synchronizeData(); } if (attributes == null) { return null; } return (Attr)attributes.getNamedItemNS(namespaceURI, localName); } | /**
* Retrieves an Attr node by local name and namespace URI.
*
* @param namespaceURI The namespace URI of the attribute to
* retrieve.
* @param localName The local name of the attribute to retrieve.
* @return Attr The Attr node with the specified attribut... | Retrieves an Attr node by local name and namespace URI | getAttributeNodeNS | {
"repo_name": "itgeeker/jdk",
"path": "src/com/sun/org/apache/xerces/internal/dom/ElementImpl.java",
"license": "apache-2.0",
"size": 42962
} | [
"org.w3c.dom.Attr"
] | import org.w3c.dom.Attr; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,476,202 |
public static List<StudentRepoData> fetchSubmissions(Connection connection,
String courseName, String exerciseName, Path targetDirectory)
throws SubmissionFetchingException {
String iliasLocation = connection.getLocation();
String sqlUsername = connection.getUsername();
... | static List<StudentRepoData> function(Connection connection, String courseName, String exerciseName, Path targetDirectory) throws SubmissionFetchingException { String iliasLocation = connection.getLocation(); String sqlUsername = connection.getUsername(); String sqlPassword = connection.getPassword(); String sshUserNam... | /**
* Downloads submissions.
*
* @param courseName
* the name of the course
* @param exerciseName
* the name of the exercise
* @param connection
* the connection to the remote
* @param targetDirectory
* the directory to downl... | Downloads submissions | fetchSubmissions | {
"repo_name": "Gaegamel/grit",
"path": "src/de/teamgrit/grit/preprocess/fetch/IliasFetcher.java",
"license": "gpl-3.0",
"size": 16071
} | [
"de.teamgrit.grit.preprocess.Connection",
"java.nio.file.Path",
"java.util.List"
] | import de.teamgrit.grit.preprocess.Connection; import java.nio.file.Path; import java.util.List; | import de.teamgrit.grit.preprocess.*; import java.nio.file.*; import java.util.*; | [
"de.teamgrit.grit",
"java.nio",
"java.util"
] | de.teamgrit.grit; java.nio; java.util; | 2,639,249 |
public static boolean shouldIncludeLocalSources(
BuildConfiguration config, Label label, boolean isTest) {
return ((config.shouldInstrumentTestTargets() || !isTest)
&& config.getInstrumentationFilter().isIncluded(label.toString()));
}
@Immutable
public static final class InstrumentationSpe... | static boolean function( BuildConfiguration config, Label label, boolean isTest) { return ((config.shouldInstrumentTestTargets() !isTest) && config.getInstrumentationFilter().isIncluded(label.toString())); } public static final class InstrumentationSpec { private final FileTypeSet instrumentedFileTypes; private final C... | /**
* Return whether the sources of the rule in {@code ruleContext} should be instrumented based on
* the --instrumentation_filter and --instrument_test_targets config settings.
*/ | Return whether the sources of the rule in ruleContext should be instrumented based on the --instrumentation_filter and --instrument_test_targets config settings | shouldIncludeLocalSources | {
"repo_name": "dslomov/bazel-windows",
"path": "src/main/java/com/google/devtools/build/lib/analysis/test/InstrumentedFilesCollector.java",
"license": "apache-2.0",
"size": 15648
} | [
"com.google.common.collect.ImmutableList",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.cmdline.Label",
"com.google.devtools.build.lib.util.FileTypeSet",
"java.util.Collection"
] | import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.util.FileTypeSet; import java.util.Collection; | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.util.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,443,959 |
@Deprecated
public void deleteAllObjects(Vector domainObjects) throws DatabaseException, OptimisticLockException {
for (Enumeration objectsEnum = domainObjects.elements(); objectsEnum.hasMoreElements();) {
deleteObject(objectsEnum.nextElement());
}
} | void function(Vector domainObjects) throws DatabaseException, OptimisticLockException { for (Enumeration objectsEnum = domainObjects.elements(); objectsEnum.hasMoreElements();) { deleteObject(objectsEnum.nextElement()); } } | /**
* PUBLIC:
* delete all of the objects and all of their privately owned parts in the database.
* The allows for a group of objects to be deleted as a unit.
* The objects will be deleted through a single transactions.
*
* @exception DatabaseException if an error occurs on the database,
... | delete all of the objects and all of their privately owned parts in the database. The allows for a group of objects to be deleted as a unit. The objects will be deleted through a single transactions | deleteAllObjects | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AbstractSession.java",
"license": "epl-1.0",
"size": 198170
} | [
"java.util.Enumeration",
"java.util.Vector",
"org.eclipse.persistence.exceptions.DatabaseException",
"org.eclipse.persistence.exceptions.OptimisticLockException"
] | import java.util.Enumeration; import java.util.Vector; import org.eclipse.persistence.exceptions.DatabaseException; import org.eclipse.persistence.exceptions.OptimisticLockException; | import java.util.*; import org.eclipse.persistence.exceptions.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 1,015,655 |
public void convertRegexToList(List<String> operatorNames, AffinityRule rule)
{
List<String> operators = new LinkedList<>();
Pattern p = Pattern.compile(rule.getOperatorRegex());
for (String name : operatorNames) {
if (p.matcher(name).matches()) {
operators.add(name);
}
}
rul... | void function(List<String> operatorNames, AffinityRule rule) { List<String> operators = new LinkedList<>(); Pattern p = Pattern.compile(rule.getOperatorRegex()); for (String name : operatorNames) { if (p.matcher(name).matches()) { operators.add(name); } } rule.setOperatorRegex(null); if (operators.size() <= 1) { LOG.wa... | /**
* Convert regex in Affinity Rule to list of operators
* Regex should match at least 2 operators, otherwise rule is not applied
* @param operatorNames
* @param rule
*/ | Convert regex in Affinity Rule to list of operators Regex should match at least 2 operators, otherwise rule is not applied | convertRegexToList | {
"repo_name": "vrozov/incubator-apex-core",
"path": "engine/src/main/java/com/datatorrent/stram/plan/logical/LogicalPlan.java",
"license": "apache-2.0",
"size": 89196
} | [
"com.datatorrent.api.AffinityRule",
"java.util.LinkedList",
"java.util.List",
"java.util.regex.Pattern"
] | import com.datatorrent.api.AffinityRule; import java.util.LinkedList; import java.util.List; import java.util.regex.Pattern; | import com.datatorrent.api.*; import java.util.*; import java.util.regex.*; | [
"com.datatorrent.api",
"java.util"
] | com.datatorrent.api; java.util; | 2,576,612 |
public void setExtensionHeader(ExtensionHeader extensionHeader) {
this.extensionHeader = extensionHeader;
} | void function(ExtensionHeader extensionHeader) { this.extensionHeader = extensionHeader; } | /**
* A custom Header object containing user/application specific details. Must implement the type javax.sip.header.ExtensionHeader
*/ | A custom Header object containing user/application specific details. Must implement the type javax.sip.header.ExtensionHeader | setExtensionHeader | {
"repo_name": "DariusX/camel",
"path": "components/camel-sip/src/main/java/org/apache/camel/component/sip/SipConfiguration.java",
"license": "apache-2.0",
"size": 30227
} | [
"javax.sip.header.ExtensionHeader"
] | import javax.sip.header.ExtensionHeader; | import javax.sip.header.*; | [
"javax.sip"
] | javax.sip; | 2,500,026 |
@Test
public void testPromoteAndDowngradeGroup() throws Exception {
IAdminPrx prx = root.getSession().getAdminService();
String uuid = UUID.randomUUID().toString();
// First create a user in two groups, one rwrw-- and one rwr---
ExperimenterGroup g = new ExperimenterGroupI();
... | void function() throws Exception { IAdminPrx prx = root.getSession().getAdminService(); String uuid = UUID.randomUUID().toString(); ExperimenterGroup g = new ExperimenterGroupI(); g.setName(rstring(uuid)); String representation = STR; g.getDetails().setPermissions(new PermissionsI(representation)); long id = prx.create... | /**
* Tests to promote a group and try to reduce the permission. The
* permissions of the group are initially <code>rw---</code> then upgrade to
* <code>rwr--</code> then back to a <code>rw---</code>. The latest change
* should return an exception. This tests the <code>ChangePermissions</code>
... | Tests to promote a group and try to reduce the permission. The permissions of the group are initially <code>rw---</code> then upgrade to <code>rwr--</code> then back to a <code>rw---</code>. The latest change should return an exception. This tests the <code>ChangePermissions</code> method | testPromoteAndDowngradeGroup | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/AdminServiceTest.java",
"license": "gpl-2.0",
"size": 70144
} | [
"java.util.UUID",
"org.testng.AssertJUnit"
] | import java.util.UUID; import org.testng.AssertJUnit; | import java.util.*; import org.testng.*; | [
"java.util",
"org.testng"
] | java.util; org.testng; | 579,951 |
try {
BPMNAnalyticsHolder bpmnAnalyticsHolder = BPMNAnalyticsHolder.getInstance();
initAnalyticsServer(bpmnAnalyticsHolder);
BPSAnalyticsService bpsAnalyticsService = new BPSAnalyticsService();
bpsAnalyticsService.setBPSAnalyticsServer(bpmnAnalyticsHolder.getBPSAn... | try { BPMNAnalyticsHolder bpmnAnalyticsHolder = BPMNAnalyticsHolder.getInstance(); initAnalyticsServer(bpmnAnalyticsHolder); BPSAnalyticsService bpsAnalyticsService = new BPSAnalyticsService(); bpsAnalyticsService.setBPSAnalyticsServer(bpmnAnalyticsHolder.getBPSAnalyticsServer()); ctxt.getBundleContext().registerServic... | /**
* Activate BPMN analytics component.
*
* @param ctxt ComponentContext
*/ | Activate BPMN analytics component | activate | {
"repo_name": "wso2/carbon-business-process",
"path": "components/bpmn/org.wso2.carbon.bpmn.analytics.publisher/src/main/java/org/wso2/carbon/bpmn/analytics/publisher/internal/BPMNAnalyticsServiceComponent.java",
"license": "apache-2.0",
"size": 5536
} | [
"org.wso2.carbon.bpmn.analytics.publisher.BPMNDataPublisher",
"org.wso2.carbon.bpmn.analytics.publisher.BPSAnalyticsService"
] | import org.wso2.carbon.bpmn.analytics.publisher.BPMNDataPublisher; import org.wso2.carbon.bpmn.analytics.publisher.BPSAnalyticsService; | import org.wso2.carbon.bpmn.analytics.publisher.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,521,840 |
Dimension nativeScreenSize = Toolkit.getDefaultToolkit().getScreenSize();
setIconImage(new ImageIcon(getClass().getResource("/images/planB-27x32.png")).getImage());
mainPanel = new javax.swing.JPanel();
logoLabel = new javax.swing.JLabel();
systemLogoLabel = new javax.swing... | Dimension nativeScreenSize = Toolkit.getDefaultToolkit().getScreenSize(); setIconImage(new ImageIcon(getClass().getResource(STR)).getImage()); mainPanel = new javax.swing.JPanel(); logoLabel = new javax.swing.JLabel(); systemLogoLabel = new javax.swing.JLabel(); usernamePanel = new javax.swing.JPanel(); userIconLabel =... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "The1stAlfa/PlanB_Beta",
"path": "PlanB_Beta/src/main/java/com/lafargeholcim/planb/view/LoginForm.java",
"license": "gpl-3.0",
"size": 20786
} | [
"java.awt.Color",
"java.awt.Dimension",
"java.awt.Font",
"java.awt.Toolkit",
"javax.swing.BorderFactory",
"javax.swing.ImageIcon",
"javax.swing.JButton",
"javax.swing.JLabel",
"javax.swing.JPanel",
"javax.swing.JPasswordField",
"javax.swing.JTextField",
"javax.swing.SwingConstants"
] | import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Toolkit; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; import java... | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,516,626 |
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
// This method will simply draw inventory's name on the screen - you could do without it entirely
// if that's not important to you, since we are overriding the default inventory rather than
// creating a specific type of inven... | void function(int mouseX, int mouseY) { EntityPlayer player = FMLClientHandler.instance().getClientPlayerEntity(); int numOfSockets = player.getCurrentEquippedItem().stackTagCompound.getInteger(STR); for(int i=0;i<numOfSockets;i++){ if(this.inventory.getStackInSlot(i) != null){ int materiaID = Item.getIdFromItem(this.i... | /**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
*/ | Draw the foreground layer for the GuiContainer (everything in front of the items) | drawGuiContainerForegroundLayer | {
"repo_name": "Unrelentless/FantasyCraft",
"path": "main/java/com/unrelentless/fcraft/gui/GuiSocket.java",
"license": "gpl-2.0",
"size": 4091
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.Item",
"net.minecraft.item.ItemStack"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; | import net.minecraft.entity.player.*; import net.minecraft.item.*; | [
"net.minecraft.entity",
"net.minecraft.item"
] | net.minecraft.entity; net.minecraft.item; | 2,733,560 |
public static Element firstChildElement(Element element, String childElementName) {
if (element == null) {
return null;
}
if (UtilValidate.isEmpty(childElementName)) {
return null;
}
// get the first element with the given name
Node node = elem... | static Element function(Element element, String childElementName) { if (element == null) { return null; } if (UtilValidate.isEmpty(childElementName)) { return null; } Node node = element.getFirstChild(); if (node != null) { do { String nodeName = node.getLocalName(); if (nodeName == null){ nodeName = UtilXml.getNodeNam... | /** Return the first child Element with the given name; if name is null
* returns the first element. */ | Return the first child Element with the given name; if name is null | firstChildElement | {
"repo_name": "ilscipio/scipio-erp",
"path": "framework/base/src/org/ofbiz/base/util/UtilXml.java",
"license": "apache-2.0",
"size": 69556
} | [
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import org.w3c.dom.Element; import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,130,037 |
@ServiceMethod(returns = ReturnType.SINGLE)
ContainerServiceInner createOrUpdate(
String resourceGroupName, String containerServiceName, ContainerServiceInner parameters); | @ServiceMethod(returns = ReturnType.SINGLE) ContainerServiceInner createOrUpdate( String resourceGroupName, String containerServiceName, ContainerServiceInner parameters); | /**
* Creates or updates a container service with the specified configuration of orchestrator, masters, and agents.
*
* @param resourceGroupName The name of the resource group.
* @param containerServiceName The name of the container service in the specified subscription and resource group.
* @p... | Creates or updates a container service with the specified configuration of orchestrator, masters, and agents | createOrUpdate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/ContainerServicesClient.java",
"license": "mit",
"size": 24733
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.compute.fluent.models.ContainerServiceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.ContainerServiceInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 328,732 |
public static Set<Path> getXdocsStyleFilePaths(Set<Path> files) {
final Set<Path> xdocs = new HashSet<>();
for (Path entry : files) {
final String fileName = entry.getFileName().toString();
if (fileName.endsWith("_style.xml")) {
xdocs.add(entry);
}... | static Set<Path> function(Set<Path> files) { final Set<Path> xdocs = new HashSet<>(); for (Path entry : files) { final String fileName = entry.getFileName().toString(); if (fileName.endsWith(STR)) { xdocs.add(entry); } } return xdocs; } | /**
* Gets xdocs style file paths.
* @param files list of all xdoc files
* @return a list of xdocs style file paths.
*/ | Gets xdocs style file paths | getXdocsStyleFilePaths | {
"repo_name": "HubSpot/checkstyle",
"path": "src/test/java/com/puppycrawl/tools/checkstyle/internal/XDocUtil.java",
"license": "lgpl-2.1",
"size": 5716
} | [
"java.nio.file.Path",
"java.util.HashSet",
"java.util.Set"
] | import java.nio.file.Path; import java.util.HashSet; import java.util.Set; | import java.nio.file.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 724,556 |
public Map<Integer, Set<Integer>> getControlGraph() {
return this.edges;
}
| Map<Integer, Set<Integer>> function() { return this.edges; } | /**
* Get the edges of the control graph.
*
* @return The edges of the control graph.
*/ | Get the edges of the control graph | getControlGraph | {
"repo_name": "wwu-pi/muggl",
"path": "muggl-core/src/de/wwu/muggl/symbolic/flow/controlflow/ControlGraph.java",
"license": "gpl-3.0",
"size": 7168
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,629,019 |
public NshContextHeader nshCh() {
return nshCh;
} | NshContextHeader function() { return nshCh; } | /**
* Gets the nsh context header.
*
* @return nsh context header
*/ | Gets the nsh context header | nshCh | {
"repo_name": "maheshraju-Huawei/actn",
"path": "drivers/default/src/main/java/org/onosproject/driver/extensions/NiciraSetNshContextHeader.java",
"license": "apache-2.0",
"size": 3073
} | [
"org.onosproject.net.NshContextHeader"
] | import org.onosproject.net.NshContextHeader; | import org.onosproject.net.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 2,333,147 |
void getAccountById(@NotNull String accountId, AsyncRequestCallback<AccountDescriptor> callback); | void getAccountById(@NotNull String accountId, AsyncRequestCallback<AccountDescriptor> callback); | /**
* Get account by id.
*
* @param accountId
* id of account
* @param callback
* the callback to use for the response
*/ | Get account by id | getAccountById | {
"repo_name": "Ori-Libhaber/che-core",
"path": "platform-api-client-gwt/che-core-client-gwt-account/src/main/java/org/eclipse/che/api/account/gwt/client/AccountServiceClient.java",
"license": "epl-1.0",
"size": 1445
} | [
"javax.validation.constraints.NotNull",
"org.eclipse.che.api.account.shared.dto.AccountDescriptor",
"org.eclipse.che.ide.rest.AsyncRequestCallback"
] | import javax.validation.constraints.NotNull; import org.eclipse.che.api.account.shared.dto.AccountDescriptor; import org.eclipse.che.ide.rest.AsyncRequestCallback; | import javax.validation.constraints.*; import org.eclipse.che.api.account.shared.dto.*; import org.eclipse.che.ide.rest.*; | [
"javax.validation",
"org.eclipse.che"
] | javax.validation; org.eclipse.che; | 344,495 |
public boolean loadValue(byte [] family, int foffset, int flength,
byte [] qualifier, int qoffset, int qlength, ByteBuffer dst)
throws BufferOverflowException {
KeyValue kv = getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength);
if (kv == null) {
return false;
}
... | boolean function(byte [] family, int foffset, int flength, byte [] qualifier, int qoffset, int qlength, ByteBuffer dst) throws BufferOverflowException { KeyValue kv = getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength); if (kv == null) { return false; } kv.loadValue(dst); return true; } | /**
* Loads the latest version of the specified column into the provided <code>ByteBuffer</code>.
* <p>
* Does not clear or flip the buffer.
*
* @param family family name
* @param foffset family offset
* @param flength family length
* @param qualifier column qualifier
* @param qoffset qualifi... | Loads the latest version of the specified column into the provided <code>ByteBuffer</code>. Does not clear or flip the buffer | loadValue | {
"repo_name": "daidong/DominoHBase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/client/Result.java",
"license": "apache-2.0",
"size": 23406
} | [
"java.nio.BufferOverflowException",
"java.nio.ByteBuffer",
"org.apache.hadoop.hbase.KeyValue"
] | import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import org.apache.hadoop.hbase.KeyValue; | import java.nio.*; import org.apache.hadoop.hbase.*; | [
"java.nio",
"org.apache.hadoop"
] | java.nio; org.apache.hadoop; | 669,552 |
public void test_BSBM_Q5_pc100() throws Exception {
final TestHelper helper = new TestHelper(//
"rto/BSBM-Q5", // testURI,
"rto/BSBM-Q5.rq",// queryFileURL
"src/test/resources/data/bsbm/dataset_pc100.nt",// dataFileURL
"rto/BSBM-... | void function() throws Exception { final TestHelper helper = new TestHelper( STR, STR, STR, STR ); final List<int[]> expectedOrders = new LinkedList<int[]>(); expectedOrders.add(new int[] { 1, 3, 2, 5, 4, 7, 6 }); expectedOrders.add(new int[] { 1, 3, 5, 4, 2, 7, 6 }); assertSameJoinOrder(expectedOrders, helper); } | /**
* BSBM Q5 on the pc100 data set.
*
* FIXME FAILS if we disallow out of order evaluation when doing cutoff
* joins.
*/ | BSBM Q5 on the pc100 data set. FIXME FAILS if we disallow out of order evaluation when doing cutoff joins | test_BSBM_Q5_pc100 | {
"repo_name": "blazegraph/database",
"path": "bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/eval/rto/TestRTO_BSBM.java",
"license": "gpl-2.0",
"size": 15582
} | [
"java.util.LinkedList",
"java.util.List"
] | import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,549,053 |
public FilterDefinition filter(String language, String expression) {
return filter(new LanguageExpression(language, expression));
} | FilterDefinition function(String language, String expression) { return filter(new LanguageExpression(language, expression)); } | /**
* <a href="http://camel.apache.org/message-filter.html">Message Filter EIP:</a>
* Creates a predicate language expression which only if it is <tt>true</tt> then the
* exchange is forwarded to the destination
*
* @param language language for expression
* @param expression the expr... | Creates a predicate language expression which only if it is true then the exchange is forwarded to the destination | filter | {
"repo_name": "grange74/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 152533
} | [
"org.apache.camel.model.language.LanguageExpression"
] | import org.apache.camel.model.language.LanguageExpression; | import org.apache.camel.model.language.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,797,713 |
public static void carregarMelodias (String nomeArq, LinkedList<String> melodias){
try {
FileReader arq = new FileReader(nomeArq);
if (arq != null){
BufferedReader lerArq = new BufferedReader(arq);
String linha = "";
do{
linha = lerArq.r... | static void function (String nomeArq, LinkedList<String> melodias){ try { FileReader arq = new FileReader(nomeArq); if (arq != null){ BufferedReader lerArq = new BufferedReader(arq); String linha = STRErro na abertura do arquivo: %s.\n", e.getMessage()); } } | /**
* Extrai as melodias registradas do arquivo padrao,
* para tal tarefa
*/ | Extrai as melodias registradas do arquivo padrao, para tal tarefa | carregarMelodias | {
"repo_name": "rodrigofegui/UnB",
"path": "2016.1/Introdução a Computação Sônica/Trabalho 3/src/conversao/ConversorMidiJava.java",
"license": "gpl-3.0",
"size": 20354
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.util.LinkedList"
] | import java.io.BufferedReader; import java.io.FileReader; import java.util.LinkedList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,696,252 |
static void addEventsThroughCoparticipation(ArrayList<SemObject> semEvents,
ArrayList<SemObject> microSemEvents,
ArrayList<SemObject> microSemActors,
ArrayList<SemRelation>... | static void addEventsThroughCoparticipation(ArrayList<SemObject> semEvents, ArrayList<SemObject> microSemEvents, ArrayList<SemObject> microSemActors, ArrayList<SemRelation> semRelations ) { for (int i = 0; i < microSemActors.size(); i++) { SemObject semObject = microSemActors.get(i); for (int j = 0; j < semRelations.si... | /**
* Obtain events and participants through bridging relations
* @param semEvents
* @param microSemEvents
* @param microSemActors
* @param semRelations
*/ | Obtain events and participants through bridging relations | addEventsThroughCoparticipation | {
"repo_name": "newsreader/StreamEventCoreference",
"path": "src/main/java/eu/newsreader/eventcoreference/naf/CreateMicrostory.java",
"license": "apache-2.0",
"size": 25892
} | [
"eu.newsreader.eventcoreference.objects.SemObject",
"eu.newsreader.eventcoreference.objects.SemRelation",
"eu.newsreader.eventcoreference.util.Util",
"java.util.ArrayList"
] | import eu.newsreader.eventcoreference.objects.SemObject; import eu.newsreader.eventcoreference.objects.SemRelation; import eu.newsreader.eventcoreference.util.Util; import java.util.ArrayList; | import eu.newsreader.eventcoreference.objects.*; import eu.newsreader.eventcoreference.util.*; import java.util.*; | [
"eu.newsreader.eventcoreference",
"java.util"
] | eu.newsreader.eventcoreference; java.util; | 970,320 |
void enterStartEPLExpressionRule(@NotNull EsperEPL2GrammarParser.StartEPLExpressionRuleContext ctx);
void exitStartEPLExpressionRule(@NotNull EsperEPL2GrammarParser.StartEPLExpressionRuleContext ctx); | void enterStartEPLExpressionRule(@NotNull EsperEPL2GrammarParser.StartEPLExpressionRuleContext ctx); void exitStartEPLExpressionRule(@NotNull EsperEPL2GrammarParser.StartEPLExpressionRuleContext ctx); | /**
* Exit a parse tree produced by {@link EsperEPL2GrammarParser#startEPLExpressionRule}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>EsperEPL2GrammarParser#startEPLExpressionRule</code> | exitStartEPLExpressionRule | {
"repo_name": "georgenicoll/esper",
"path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java",
"license": "gpl-2.0",
"size": 114105
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,637,101 |
private DisjointRecursiveList<List<Path>> determineResultShape(ColumnConversionInput cci) {
DisjointRecursiveList<List<Path>> retval = new DisjointRecursiveList<List<Path>>();
for (QuerySelectable qs : cci.select) {
boolean done = false;
while (!done) {
if (qs... | DisjointRecursiveList<List<Path>> function(ColumnConversionInput cci) { DisjointRecursiveList<List<Path>> retval = new DisjointRecursiveList<List<Path>>(); for (QuerySelectable qs : cci.select) { boolean done = false; while (!done) { if (qs instanceof QueryObjectPathExpression) { QueryObjectPathExpression qope = (Query... | /**
* Stolen wholesale from the mechanism in Export results iterator, and adapted to return a
* properly typed object rather than a raw collection, and to collect lists of paths rather than
* bothering with the indices.
* @param cci An input object
* @return A list containing items that are eit... | Stolen wholesale from the mechanism in Export results iterator, and adapted to return a properly typed object rather than a raw collection, and to collect lists of paths rather than bothering with the indices | determineResultShape | {
"repo_name": "elsiklab/intermine",
"path": "intermine/web/main/src/org/intermine/webservice/server/core/TableRowIterator.java",
"license": "lgpl-2.1",
"size": 24175
} | [
"java.util.Collections",
"java.util.LinkedList",
"java.util.List",
"org.intermine.objectstore.query.PathExpressionField",
"org.intermine.objectstore.query.QueryCollectionPathExpression",
"org.intermine.objectstore.query.QueryObjectPathExpression",
"org.intermine.objectstore.query.QuerySelectable",
"or... | import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.intermine.objectstore.query.PathExpressionField; import org.intermine.objectstore.query.QueryCollectionPathExpression; import org.intermine.objectstore.query.QueryObjectPathExpression; import org.intermine.objectstore.query.Que... | import java.util.*; import org.intermine.objectstore.query.*; import org.intermine.pathquery.*; | [
"java.util",
"org.intermine.objectstore",
"org.intermine.pathquery"
] | java.util; org.intermine.objectstore; org.intermine.pathquery; | 2,126,675 |
public static void putTicketGrantingTicketInScopes(final RequestContext context, final String ticketValue) {
putTicketGrantingTicketIntoMap(context.getRequestScope(), ticketValue);
putTicketGrantingTicketIntoMap(context.getFlowScope(), ticketValue);
var session = context.getFlowExecutionCon... | static void function(final RequestContext context, final String ticketValue) { putTicketGrantingTicketIntoMap(context.getRequestScope(), ticketValue); putTicketGrantingTicketIntoMap(context.getFlowScope(), ticketValue); var session = context.getFlowExecutionContext().getActiveSession().getParent(); while (session != nu... | /**
* Put ticket granting ticket in request and flow scopes.
*
* @param context the context
* @param ticketValue the ticket value
*/ | Put ticket granting ticket in request and flow scopes | putTicketGrantingTicketInScopes | {
"repo_name": "apereo/cas",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 71894
} | [
"org.springframework.webflow.execution.RequestContext"
] | import org.springframework.webflow.execution.RequestContext; | import org.springframework.webflow.execution.*; | [
"org.springframework.webflow"
] | org.springframework.webflow; | 325,027 |
public ChannelBuffer formatDropCachesV1(final Map<String, String> response) {
throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED,
"The requested API endpoint has not been implemented",
this.getClass().getCanonicalName() +
" has not implemented formatDropCachesV1");
} | ChannelBuffer function(final Map<String, String> response) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, STR, this.getClass().getCanonicalName() + STR); } | /**
* Format a response from the DropCaches call
* @param response A hash map with a response
* @return A ChannelBuffer object to pass on to the caller
* @throws BadRequestException if the plugin has not implemented this method
*/ | Format a response from the DropCaches call | formatDropCachesV1 | {
"repo_name": "pepperdata/opentsdb-deprecated",
"path": "src/tsd/HttpSerializer.java",
"license": "gpl-3.0",
"size": 33560
} | [
"java.util.Map",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.handler.codec.http.HttpResponseStatus"
] | import java.util.Map; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.handler.codec.http.HttpResponseStatus; | import java.util.*; import org.jboss.netty.buffer.*; import org.jboss.netty.handler.codec.http.*; | [
"java.util",
"org.jboss.netty"
] | java.util; org.jboss.netty; | 2,914,236 |
public AzureClient getAzureClient() {
return this.azureClient;
}
private ServiceClientCredentials credentials; | AzureClient function() { return this.azureClient; } private ServiceClientCredentials credentials; | /**
* Gets the {@link AzureClient} used for long running operations.
* @return the azure client;
*/ | Gets the <code>AzureClient</code> used for long running operations | getAzureClient | {
"repo_name": "matt-gibbs/AutoRest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/AutoRestLongRunningOperationTestServiceImpl.java",
"license": "mit",
"size": 6486
} | [
"com.microsoft.rest.AzureClient",
"com.microsoft.rest.credentials.ServiceClientCredentials"
] | import com.microsoft.rest.AzureClient; import com.microsoft.rest.credentials.ServiceClientCredentials; | import com.microsoft.rest.*; import com.microsoft.rest.credentials.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 943,935 |
public int getImageSet(Action a, int currentReachableSet) {
multCPTs = currentReachableSet;
Integer xiprime, xi;
// _context.getGraph(multCPTs).launchViewer();
// System.out.print("\t\t");
for (CString x : _alStateVars) {
// System.out.print(x._string + " ");
xiprime = (Integer) _context._hmVarName2I... | int function(Action a, int currentReachableSet) { multCPTs = currentReachableSet; Integer xiprime, xi; for (CString x : _alStateVars) { xiprime = (Integer) _context._hmVarName2ID .get(_translation._hmPrimeRemap.get(x._string)); xi = (Integer) _context._hmVarName2ID.get(x._string); reduceRemapLeavesCache = new Hashtable... | /**
* Method that returns and ADD representing the image set of (currentReachableSet, a).
* @param a
* @param currentReachableSet
* @return
*/ | Method that returns and ADD representing the image set of (currentReachableSet, a) | getImageSet | {
"repo_name": "felipemartinsss/repository",
"path": "AIPlannersForRDDLSim/src/util/StochasticBisimulationCommons.java",
"license": "gpl-3.0",
"size": 68760
} | [
"java.util.Hashtable"
] | import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 1,937,464 |
@Override public void enterEveryRule(ParserRuleContext ctx) { } | @Override public void enterEveryRule(ParserRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitTil | {
"repo_name": "cnt5bs/nowebdoc-gems",
"path": "src/nowebDocGems/gram/NowebDocGemsParserBaseListener.java",
"license": "gpl-3.0",
"size": 5008
} | [
"org.antlr.v4.runtime.ParserRuleContext"
] | import org.antlr.v4.runtime.ParserRuleContext; | import org.antlr.v4.runtime.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,738,610 |
@Override
public void updateFile(String path) throws IOException {
String prev = locale.getLanguage();
Object status = takeSnapshot();
// default locale
setLocale((Locale) null);
if (prev.equals(Locale.getDefault().getLanguage())) {
// restore snapshot if default locale = current locale
restoreSnap... | void function(String path) throws IOException { String prev = locale.getLanguage(); Object status = takeSnapshot(); setLocale((Locale) null); if (prev.equals(Locale.getDefault().getLanguage())) { restoreSnapshot(status); } super.updateFile(path); for (String lang : getKnownLanguages()) { setLocale(lang); if (lang.equal... | /**
* Create/update the .properties files for each supported language and for
* the default language.
* <p>
* Note: this method is <b>NOT</b> thread-safe.
*
* @param path
* the path where the .properties files are
*
* @throws IOException
* in case of IO errors
*/ | Create/update the .properties files for each supported language and for the default language. Note: this method is NOT thread-safe | updateFile | {
"repo_name": "nikiroo/fanfix",
"path": "src/be/nikiroo/utils/resources/TransBundle.java",
"license": "gpl-3.0",
"size": 10301
} | [
"java.io.IOException",
"java.util.Locale"
] | import java.io.IOException; import java.util.Locale; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 11,885 |
List<JsonSchemaInfo> listSchemas(String organizationName, long limit, long offset); | List<JsonSchemaInfo> listSchemas(String organizationName, long limit, long offset); | /**
* List the schemas for the given organization.
* @param organizationName
* @param limit
* @param offset
* @return
*/ | List the schemas for the given organization | listSchemas | {
"repo_name": "zimingd/Synapse-Repository-Services",
"path": "lib/jdomodels/src/main/java/org/sagebionetworks/repo/model/dbo/schema/JsonSchemaDao.java",
"license": "apache-2.0",
"size": 3570
} | [
"java.util.List",
"org.sagebionetworks.repo.model.schema.JsonSchemaInfo"
] | import java.util.List; import org.sagebionetworks.repo.model.schema.JsonSchemaInfo; | import java.util.*; import org.sagebionetworks.repo.model.schema.*; | [
"java.util",
"org.sagebionetworks.repo"
] | java.util; org.sagebionetworks.repo; | 1,414,611 |
ParserTemplate getParserTemplateById(Long templateId) throws URISyntaxException, IOException; | ParserTemplate getParserTemplateById(Long templateId) throws URISyntaxException, IOException; | /**
* Get parser template by ID
* @param templateId
* @return
* @throws URISyntaxException
*/ | Get parser template by ID | getParserTemplateById | {
"repo_name": "jenkinsci/zephyr-enterprise-test-management-plugin",
"path": "src/main/java/com/thed/service/ParserTemplateService.java",
"license": "apache-2.0",
"size": 685
} | [
"com.thed.model.ParserTemplate",
"java.io.IOException",
"java.net.URISyntaxException"
] | import com.thed.model.ParserTemplate; import java.io.IOException; import java.net.URISyntaxException; | import com.thed.model.*; import java.io.*; import java.net.*; | [
"com.thed.model",
"java.io",
"java.net"
] | com.thed.model; java.io; java.net; | 834,063 |
private void loadBuildConfigurations(BuildConfigurationAudited buildConfigAudited) {
Project project = buildConfigAudited.getProject();
project.getBuildConfigurations().forEach(BuildConfiguration::getId);
} | void function(BuildConfigurationAudited buildConfigAudited) { Project project = buildConfigAudited.getProject(); project.getBuildConfigurations().forEach(BuildConfiguration::getId); } | /**
* Fetch build configurations of project to be able access it outside transaction
*
* @param buildConfigAudited build config for which the build configurations are to be fetched
*/ | Fetch build configurations of project to be able access it outside transaction | loadBuildConfigurations | {
"repo_name": "pkocandr/pnc",
"path": "build-coordinator/src/main/java/org/jboss/pnc/coordinator/builder/datastore/DatastoreAdapter.java",
"license": "apache-2.0",
"size": 23153
} | [
"org.jboss.pnc.model.BuildConfiguration",
"org.jboss.pnc.model.BuildConfigurationAudited",
"org.jboss.pnc.model.Project"
] | import org.jboss.pnc.model.BuildConfiguration; import org.jboss.pnc.model.BuildConfigurationAudited; import org.jboss.pnc.model.Project; | import org.jboss.pnc.model.*; | [
"org.jboss.pnc"
] | org.jboss.pnc; | 315,646 |
public PacketFilterBuilder reporter(@Nonnull ErrorReporter reporter) {
if (reporter == null)
throw new IllegalArgumentException("reporter cannot be NULL.");
this.reporter = reporter;
return this;
}
| PacketFilterBuilder function(@Nonnull ErrorReporter reporter) { if (reporter == null) throw new IllegalArgumentException(STR); this.reporter = reporter; return this; } | /**
* Set the error reporter.
* @param reporter - new error reporter.
* @return This builder, for chaining.
*/ | Set the error reporter | reporter | {
"repo_name": "HolodeckOne-Minecraft/ProtocolLib",
"path": "modules/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PacketFilterBuilder.java",
"license": "gpl-2.0",
"size": 7457
} | [
"com.comphenix.protocol.error.ErrorReporter",
"javax.annotation.Nonnull"
] | import com.comphenix.protocol.error.ErrorReporter; import javax.annotation.Nonnull; | import com.comphenix.protocol.error.*; import javax.annotation.*; | [
"com.comphenix.protocol",
"javax.annotation"
] | com.comphenix.protocol; javax.annotation; | 2,155,704 |
private double maxEdgeThickness(final LPort port) {
return port.getProperty(InternalProperties.MAX_EDGE_THICKNESS);
} | double function(final LPort port) { return port.getProperty(InternalProperties.MAX_EDGE_THICKNESS); } | /**
* Returns the maximum thickness of all edges incident to the port.
*/ | Returns the maximum thickness of all edges incident to the port | maxEdgeThickness | {
"repo_name": "eNBeWe/elk",
"path": "plugins/org.eclipse.elk.alg.layered/src/org/eclipse/elk/alg/layered/intermediate/EndLabelPreprocessor.java",
"license": "epl-1.0",
"size": 20989
} | [
"org.eclipse.elk.alg.layered.graph.LPort",
"org.eclipse.elk.alg.layered.options.InternalProperties"
] | import org.eclipse.elk.alg.layered.graph.LPort; import org.eclipse.elk.alg.layered.options.InternalProperties; | import org.eclipse.elk.alg.layered.graph.*; import org.eclipse.elk.alg.layered.options.*; | [
"org.eclipse.elk"
] | org.eclipse.elk; | 594,354 |
final TkApp app = new TkApp(new MkBase()); | final TkApp app = new TkApp(new MkBase()); | /**
* Launches web server on random port.
* @throws Exception If fails
*/ | Launches web server on random port | launchesOnRandomPort | {
"repo_name": "Nerodesk/nerodesk",
"path": "src/test/java/com/libre/takes/TkAppTest.java",
"license": "bsd-3-clause",
"size": 17158
} | [
"com.libre.om.mock.MkBase"
] | import com.libre.om.mock.MkBase; | import com.libre.om.mock.*; | [
"com.libre.om"
] | com.libre.om; | 1,710,054 |
final ItemInput iinp = userContext.getItemInput();
if (iinp.isEmpty()) { return false; // user has given no answer
}
final String respident = boolElement.attributeValue("respident");
String shouldVal = boolElement.getText(); // the answer is tested against content of elem.
String isVal = iinp.getSingle(resp... | final ItemInput iinp = userContext.getItemInput(); if (iinp.isEmpty()) { return false; } final String respident = boolElement.attributeValue(STR); String shouldVal = boolElement.getText(); String isVal = iinp.getSingle(respident); shouldVal = shouldVal.trim(); isVal = isVal.trim(); final Float fs = new Float(shouldVal)... | /**
* var greater than or equal qti ims 1.2.1 <!ELEMENT vargte (#PCDATA)> <!ATTLIST vargte %I_RespIdent; %I_Index; > e.g. <vargte respident = "NUM01">3.141</vargte>
*/ | var greater than or equal qti ims 1.2.1 e.g. 3.141 | eval | {
"repo_name": "RLDevOps/Demo",
"path": "src/main/java/org/olat/ims/qti/process/elements/QTI_varlte.java",
"license": "apache-2.0",
"size": 1982
} | [
"org.olat.ims.qti.container.ItemInput"
] | import org.olat.ims.qti.container.ItemInput; | import org.olat.ims.qti.container.*; | [
"org.olat.ims"
] | org.olat.ims; | 1,260,792 |
if (WIDTH <= 0) {
return null;
}
// Take image from cache instead of creating a new one if parameters are the same as last time
if (radWidth == WIDTH && radGlowColor.equals(GLOW_COLOR) && radOn == ON && radGaugeType == GAUGE_TYPE && radKnobs == KNOBS && radOrientation == ORIENTATION) {
... | if (WIDTH <= 0) { return null; } if (radWidth == WIDTH && radGlowColor.equals(GLOW_COLOR) && radOn == ON && radGaugeType == GAUGE_TYPE && radKnobs == KNOBS && radOrientation == ORIENTATION) { return radGlowImage; } radGlowImage.flush(); radGlowImage = UTIL.createImage(WIDTH, WIDTH, Transparency.TRANSLUCENT); final Grap... | /**
* Returns an image that simulates a glowing ring which could be used to visualize
* a state of the gauge by a color. The LED might be too small if you are not in front
* of the screen and so one could see the current state more easy.
*
* @param WIDTH
* @param GLOW_COLOR
* @param ON
*... | Returns an image that simulates a glowing ring which could be used to visualize a state of the gauge by a color. The LED might be too small if you are not in front of the screen and so one could see the current state more easy | createRadialGlow | {
"repo_name": "hervegirod/j6dof-flight-sim",
"path": "src/steelseries/eu/hansolo/steelseries/tools/GlowImageFactory.java",
"license": "gpl-3.0",
"size": 30618
} | [
"java.awt.Color",
"java.awt.Graphics2D",
"java.awt.LinearGradientPaint",
"java.awt.Paint",
"java.awt.RadialGradientPaint",
"java.awt.RenderingHints",
"java.awt.Shape",
"java.awt.Transparency",
"java.awt.geom.Arc2D",
"java.awt.geom.Area",
"java.awt.geom.Ellipse2D",
"java.awt.geom.Point2D",
"j... | import java.awt.Color; import java.awt.Graphics2D; import java.awt.LinearGradientPaint; import java.awt.Paint; import java.awt.RadialGradientPaint; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.Transparency; import java.awt.geom.Arc2D; import java.awt.geom.Area; import java.awt.geom.Ellipse2D; ... | import java.awt.*; import java.awt.geom.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,076,175 |
void doNotifyOnConnect() {
synchronized (lockConnect) {
es.setConnectionAvailable(false);
try {
getSocket().shutdownInput();
getSocket().close();
} catch (Exception e) {
System.err.println(e);
}
mSocket = null;
lockConnect.notify();
String TAG = "Lock Connection";
Lo... | void doNotifyOnConnect() { synchronized (lockConnect) { es.setConnectionAvailable(false); try { getSocket().shutdownInput(); getSocket().close(); } catch (Exception e) { System.err.println(e); } mSocket = null; lockConnect.notify(); String TAG = STR; Log.d(TAG, STR); } } | /**
* Notify ConnectionThread to continue
*/ | Notify ConnectionThread to continue | doNotifyOnConnect | {
"repo_name": "proglang/PaM",
"path": "monitor/Monitor/src/monitor/pack/Client.java",
"license": "gpl-2.0",
"size": 13289
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,604,521 |
@SuppressLint("NewApi")
public static void webview_deleteLocalWebStorage(WebView webview) {
//This ensures HTML local storage is deleted before load any page.
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
webview.evaluateJavascript("javascript:localStorage.clear()", n... | @SuppressLint(STR) static void function(WebView webview) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { webview.evaluateJavascript(STR, null); } else { webview.loadUrl(STR); } } | /**
* Deletes web local storage. This prevents any page cache.
* <br><br>
* See Javascript "localStorage" object.
*
* @param webview
*/ | Deletes web local storage. This prevents any page cache. See Javascript "localStorage" object | webview_deleteLocalWebStorage | {
"repo_name": "javocsoft/javocsoft-toolbox",
"path": "src/es/javocsoft/android/lib/toolbox/ToolBox.java",
"license": "gpl-3.0",
"size": 316451
} | [
"android.annotation.SuppressLint",
"android.os.Build",
"android.webkit.WebView"
] | import android.annotation.SuppressLint; import android.os.Build; import android.webkit.WebView; | import android.annotation.*; import android.os.*; import android.webkit.*; | [
"android.annotation",
"android.os",
"android.webkit"
] | android.annotation; android.os; android.webkit; | 227,902 |
@Override()
public void setAuthenticationRequiredOperationTypes(
@Nullable final Collection<OperationType> operationTypes)
throws UnsupportedOperationException
{
throw new UnsupportedOperationException();
} | @Override() void function( @Nullable final Collection<OperationType> operationTypes) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } | /**
* {@inheritDoc} This method will always throw an
* {@code UnsupportedOperationException}.
*
* @throws UnsupportedOperationException To indicate that this object cannot
* be altered.
*/ | This method will always throw an UnsupportedOperationException | setAuthenticationRequiredOperationTypes | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/listener/ReadOnlyInMemoryDirectoryServerConfig.java",
"license": "gpl-2.0",
"size": 17174
} | [
"com.unboundid.ldap.sdk.OperationType",
"com.unboundid.util.Nullable",
"java.util.Collection"
] | import com.unboundid.ldap.sdk.OperationType; import com.unboundid.util.Nullable; import java.util.Collection; | import com.unboundid.ldap.sdk.*; import com.unboundid.util.*; import java.util.*; | [
"com.unboundid.ldap",
"com.unboundid.util",
"java.util"
] | com.unboundid.ldap; com.unboundid.util; java.util; | 1,442,710 |
public void setSapEmployeePersistence(
SapEmployeePersistence sapEmployeePersistence) {
this.sapEmployeePersistence = sapEmployeePersistence;
} | void function( SapEmployeePersistence sapEmployeePersistence) { this.sapEmployeePersistence = sapEmployeePersistence; } | /**
* Sets the sap employee persistence.
*
* @param sapEmployeePersistence the sap employee persistence
*/ | Sets the sap employee persistence | setSapEmployeePersistence | {
"repo_name": "RMarinDTI/CloubityRepo",
"path": "Servicio-portlet/docroot/WEB-INF/src/es/davinciti/liferay/service/base/ConnectionTypesServiceBaseImpl.java",
"license": "unlicense",
"size": 52995
} | [
"es.davinciti.liferay.service.persistence.SapEmployeePersistence"
] | import es.davinciti.liferay.service.persistence.SapEmployeePersistence; | import es.davinciti.liferay.service.persistence.*; | [
"es.davinciti.liferay"
] | es.davinciti.liferay; | 1,344,223 |
ChangePlanItemStateBuilder terminatePlanItemDefinitionIds(List<String> planItemDefinitionIds); | ChangePlanItemStateBuilder terminatePlanItemDefinitionIds(List<String> planItemDefinitionIds); | /**
* Terminate multiple plan items by definition id without terminating another plan item instance.
*/ | Terminate multiple plan items by definition id without terminating another plan item instance | terminatePlanItemDefinitionIds | {
"repo_name": "dbmalkovsky/flowable-engine",
"path": "modules/flowable-cmmn-api/src/main/java/org/flowable/cmmn/api/runtime/ChangePlanItemStateBuilder.java",
"license": "apache-2.0",
"size": 3968
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,382,719 |
public String getName(Locale locale) {
return Messages.getInstance().getText(locale, "settings.timeUnits.pageTitle");
} | String function(Locale locale) { return Messages.getInstance().getText(locale, STR); } | /**
* Returns the localized name of this page. Used e.g. for breadcrumb navigation.
*
* @param locale The locale to be used for the name
*
* @return The localized name of this page
*/ | Returns the localized name of this page. Used e.g. for breadcrumb navigation | getName | {
"repo_name": "otavanopisto/pyramus",
"path": "pyramus/src/main/java/fi/otavanopisto/pyramus/views/settings/TimeUnitsViewController.java",
"license": "gpl-3.0",
"size": 3332
} | [
"fi.otavanopisto.pyramus.I18N",
"java.util.Locale"
] | import fi.otavanopisto.pyramus.I18N; import java.util.Locale; | import fi.otavanopisto.pyramus.*; import java.util.*; | [
"fi.otavanopisto.pyramus",
"java.util"
] | fi.otavanopisto.pyramus; java.util; | 2,617,124 |
protected IOException copyRange(InputStream istream,
ServletOutputStream ostream) {
// Copy the input stream to the output stream
IOException exception = null;
byte buffer[] = new byte[input];
int len = buffer.length;
while (true) {
... | IOException function(InputStream istream, ServletOutputStream ostream) { IOException exception = null; byte buffer[] = new byte[input]; int len = buffer.length; while (true) { try { len = istream.read(buffer); if (len == -1) break; ostream.write(buffer, 0, len); } catch (IOException e) { exception = e; len = -1; break;... | /**
* Copy the contents of the specified input stream to the specified
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
* @param istream The input stream to read from
* @param ostream The output stream to write to
* @ret... | Copy the contents of the specified input stream to the specified output stream, and ensure that both streams are closed before returning (even in the face of an exception) | copyRange | {
"repo_name": "deathspeeder/class-guard",
"path": "apache-tomcat-7.0.53-src/java/org/apache/catalina/servlets/DefaultServlet.java",
"license": "gpl-2.0",
"size": 77933
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.servlet.ServletOutputStream"
] | import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletOutputStream; | import java.io.*; import javax.servlet.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,926,784 |
public static BufferedWriter openBufferedWriter(final File file, final int bufSize,
final boolean append, final Charset charset) {
final int bufSz = (bufSize < DEFAULT_BUFSIZE) ? DEFAULT_BUFSIZE : bufSize;
BufferedWriter out = null; // default bufsize is 8192.
try {
final FileOutputStream fos ... | static BufferedWriter function(final File file, final int bufSize, final boolean append, final Charset charset) { final int bufSz = (bufSize < DEFAULT_BUFSIZE) ? DEFAULT_BUFSIZE : bufSize; BufferedWriter out = null; try { final FileOutputStream fos = new FileOutputStream(file, append); final OutputStreamWriter osw = ne... | /**
* Opens a BufferedWriter wrapped around a FileWriter with a specified file
* and buffer size. If bufSize is less than the default (8192) the default
* will be used. The returned object must be closed by the calling program.
*
* @param file the given file
* @param bufSize if less than 8192 it defau... | Opens a BufferedWriter wrapped around a FileWriter with a specified file and buffer size. If bufSize is less than the default (8192) the default will be used. The returned object must be closed by the calling program | openBufferedWriter | {
"repo_name": "DataSketches/DataSketches.github.io",
"path": "src/main/java/org/apache/datasketches/Files.java",
"license": "apache-2.0",
"size": 37488
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter",
"java.nio.charset.Charset"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,832,598 |
@Test
public void dateConverter()
{
DateConverter converter = new DateConverter();
assertNull(new DateConverter().convertToObject("", Locale.US));
Calendar cal = Calendar.getInstance(DUTCH_LOCALE);
cal.clear();
cal.set(2002, Calendar.OCTOBER, 24);
Date date = cal.getTime();
assertEquals("24-10-02"... | void function() { DateConverter converter = new DateConverter(); assertNull(new DateConverter().convertToObject(STR24-10-02STR24-10-02STR10/24/02STR10/24/02STRwhateverSTRConversion should have thrown an exceptionSTR10/24/02whateverSTRConversion should have thrown an exception"); } catch (ConversionException e) { } } | /**
* Test date locale conversions.
*/ | Test date locale conversions | dateConverter | {
"repo_name": "mafulafunk/wicket",
"path": "wicket-util/src/test/java/org/apache/wicket/util/convert/converters/ConvertersTest.java",
"license": "apache-2.0",
"size": 11619
} | [
"org.apache.wicket.util.convert.ConversionException",
"org.apache.wicket.util.convert.converter.DateConverter"
] | import org.apache.wicket.util.convert.ConversionException; import org.apache.wicket.util.convert.converter.DateConverter; | import org.apache.wicket.util.convert.*; import org.apache.wicket.util.convert.converter.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 973,528 |
@Override
public ResourceLocator getResourceLocator() {
return VisualizacionMetricas3EditPlugin.INSTANCE;
} | ResourceLocator function() { return VisualizacionMetricas3EditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "lfmendivelso10/AppModernization",
"path": "source/i2/VisualizacionMetricas3.edit/src/visualizacionMetricas3/representacion/provider/DependenciaItemProvider.java",
"license": "mit",
"size": 3339
} | [
"org.eclipse.emf.common.util.ResourceLocator"
] | import org.eclipse.emf.common.util.ResourceLocator; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,804,203 |
public static HashedVersion getHashedVersionAppliedAt(
ByteStringMessage<ProtocolAppliedWaveletDelta> appliedDelta) {
if (appliedDelta.getMessage().hasHashedVersionAppliedAt()) {
return WaveletOperationSerializer.deserialize(appliedDelta.getMessage()
.getHashedVersionAppliedAt());
} else... | static HashedVersion function( ByteStringMessage<ProtocolAppliedWaveletDelta> appliedDelta) { if (appliedDelta.getMessage().hasHashedVersionAppliedAt()) { return WaveletOperationSerializer.deserialize(appliedDelta.getMessage() .getHashedVersionAppliedAt()); } else { try { ProtocolWaveletDelta innerDelta = ProtocolWavel... | /**
* Get the hashed version an applied delta was applied at.
*/ | Get the hashed version an applied delta was applied at | getHashedVersionAppliedAt | {
"repo_name": "scrosby/fedone",
"path": "src/org/waveprotocol/wave/examples/fedone/common/HashedVersion.java",
"license": "apache-2.0",
"size": 4869
} | [
"com.google.protobuf.InvalidProtocolBufferException",
"org.waveprotocol.wave.examples.fedone.waveserver.ByteStringMessage",
"org.waveprotocol.wave.federation.Proto"
] | import com.google.protobuf.InvalidProtocolBufferException; import org.waveprotocol.wave.examples.fedone.waveserver.ByteStringMessage; import org.waveprotocol.wave.federation.Proto; | import com.google.protobuf.*; import org.waveprotocol.wave.examples.fedone.waveserver.*; import org.waveprotocol.wave.federation.*; | [
"com.google.protobuf",
"org.waveprotocol.wave"
] | com.google.protobuf; org.waveprotocol.wave; | 2,257,269 |
public PackageInfo getPackageArchiveInfo(String archiveFilePath, int flags) {
PackageParser packageParser = new PackageParser(archiveFilePath);
DisplayMetrics metrics = new DisplayMetrics();
metrics.setToDefaults();
final File sourceFile = new File(archiveFilePath);
PackagePa... | PackageInfo function(String archiveFilePath, int flags) { PackageParser packageParser = new PackageParser(archiveFilePath); DisplayMetrics metrics = new DisplayMetrics(); metrics.setToDefaults(); final File sourceFile = new File(archiveFilePath); PackageParser.Package pkg = packageParser.parsePackage( sourceFile, archi... | /**
* Retrieve overall information about an application package defined
* in a package archive file
*
* @param archiveFilePath The path to the archive file
* @param flags Additional option flags. Use any combination of
* {@link #GET_ACTIVITIES},
* {@link #GET_GIDS},
* {@link #GET... | Retrieve overall information about an application package defined in a package archive file | getPackageArchiveInfo | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/content/pm/PackageManager.java",
"license": "apache-2.0",
"size": 126829
} | [
"android.util.DisplayMetrics",
"java.io.File"
] | import android.util.DisplayMetrics; import java.io.File; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 2,703,924 |
public HashSet<CollectData> selectCollects(int regency, int cid) {
HashSet<SignedObject> c = collects.get(regency);
if (c == null) return null;
return normalizeCollects(getSignedCollects(c), cid, regency);
} | HashSet<CollectData> function(int regency, int cid) { HashSet<SignedObject> c = collects.get(regency); if (c == null) return null; return normalizeCollects(getSignedCollects(c), cid, regency); } | /**
* Fetchs a set of correctly signed and normalized collect data structures
* @param regency the regency from which the collects were stored
* @param cid the CID to which to normalize the collects
* @return a set of correctly signed and normalized collect data structures
*/ | Fetchs a set of correctly signed and normalized collect data structures | selectCollects | {
"repo_name": "bergerch/library",
"path": "src/main/java/bftsmart/tom/leaderchange/LCManager.java",
"license": "apache-2.0",
"size": 32261
} | [
"java.security.SignedObject",
"java.util.HashSet"
] | import java.security.SignedObject; import java.util.HashSet; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 1,340,356 |
public void close() {
try {
is.close();
} catch (Throwable t) {
LOGGER.warn("Failure closing input stream for " + getOriginDesc(),
t);
}
if (streamOrigin instanceof ZipFile) {
try {
((ZipFile) streamOrigin).close();
} catch (Throwable t) {
LOGGER.warn("Failure closing " + getOriginD... | void function() { try { is.close(); } catch (Throwable t) { LOGGER.warn(STR + getOriginDesc(), t); } if (streamOrigin instanceof ZipFile) { try { ((ZipFile) streamOrigin).close(); } catch (Throwable t) { LOGGER.warn(STR + getOriginDesc(), t); } } } | /**
* Close the source input stream and the archive if it came from one.
* <p/>
* This will not throw anything. Any throwable is caught and a warning is logged.
*/ | Close the source input stream and the archive if it came from one. This will not throw anything. Any throwable is caught and a warning is logged | close | {
"repo_name": "smartsquare/cobertura",
"path": "cobertura/src/main/java/net/sourceforge/cobertura/util/Source.java",
"license": "gpl-2.0",
"size": 2271
} | [
"java.util.zip.ZipFile"
] | import java.util.zip.ZipFile; | import java.util.zip.*; | [
"java.util"
] | java.util; | 882,658 |
protected CashDecreaseDocument createNewCashDecreaseDocument(String documentType) {
CashDecreaseDocument newCashDecreaseDocument = null;
try {
newCashDecreaseDocument = (CashDecreaseDocument) documentService.getNewDocument(SpringContext.getBean(TransactionalDocumentDictionaryService... | CashDecreaseDocument function(String documentType) { CashDecreaseDocument newCashDecreaseDocument = null; try { newCashDecreaseDocument = (CashDecreaseDocument) documentService.getNewDocument(SpringContext.getBean(TransactionalDocumentDictionaryService.class).getDocumentClassByName(documentType)); } catch (WorkflowExce... | /**
* Gets a new document of the document type from the workflow using document service.
*
* @param documentType
* @return newCashDecreaseDocument if successfully created a new document else return null
*/ | Gets a new document of the document type from the workflow using document service | createNewCashDecreaseDocument | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/endow/batch/service/impl/ProcessFeeTransactionsServiceImpl.java",
"license": "agpl-3.0",
"size": 72907
} | [
"org.kuali.kfs.module.endow.document.CashDecreaseDocument",
"org.kuali.kfs.sys.context.SpringContext",
"org.kuali.rice.kew.api.exception.WorkflowException",
"org.kuali.rice.kns.service.TransactionalDocumentDictionaryService"
] | import org.kuali.kfs.module.endow.document.CashDecreaseDocument; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.kns.service.TransactionalDocumentDictionaryService; | import org.kuali.kfs.module.endow.document.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.kns.service.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 340,751 |
public static boolean hasMethod(Class clazz, Method method) {
return _hasMethod(clazz, method);
} | static boolean function(Class clazz, Method method) { return _hasMethod(clazz, method); } | /**
* Search the method in the class and it's parent classes.
* @param clazz
* @return
*/ | Search the method in the class and it's parent classes | hasMethod | {
"repo_name": "atlasmapper/atlasmapper",
"path": "src/main/java/au/gov/aims/atlasmapperserver/Utils.java",
"license": "gpl-3.0",
"size": 44200
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 458,844 |
private BigInteger SendChallenge(Masks mask, byte[] message)
{
BigInteger challenge;
byte[] buffer, resume;
MessageDigest hash_function = null;
String tmp = message.toString().concat(mask.getA().toString());
buffer = tmp.getBytes();
try {
hash_function = MessageDigest.getInstance("SHA-256");... | BigInteger function(Masks mask, byte[] message) { BigInteger challenge; byte[] buffer, resume; MessageDigest hash_function = null; String tmp = message.toString().concat(mask.getA().toString()); buffer = tmp.getBytes(); try { hash_function = MessageDigest.getInstance(STR); } catch (NoSuchAlgorithmException e) { e.print... | /**
* Create challenge for the not interactive version for the CCD
* @param mask
* @param message
* @return
*/ | Create challenge for the not interactive version for the CCD | SendChallenge | {
"repo_name": "chafca/p2pEngine",
"path": "src/main/java/model/network/communication/service/sigma/sigmaProtocol/Trent.java",
"license": "lgpl-3.0",
"size": 3474
} | [
"java.math.BigInteger",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException"
] | import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; | import java.math.*; import java.security.*; | [
"java.math",
"java.security"
] | java.math; java.security; | 1,491,881 |
public void setCountDelegate(CountDelegate delegate)
{
if (log.isLoggable(Level.FINEST))
log.log(Level.FINEST, L.l("{0} setting count delegate {1}",
this, delegate));
_countDelegate = delegate;
} | void function(CountDelegate delegate) { if (log.isLoggable(Level.FINEST)) log.log(Level.FINEST, L.l(STR, this, delegate)); _countDelegate = delegate; } | /**
* Sets the count delegate
*/ | Sets the count delegate | setCountDelegate | {
"repo_name": "TheApacheCats/quercus",
"path": "com/caucho/quercus/env/QuercusClass.java",
"license": "gpl-2.0",
"size": 68876
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,258,986 |
private Optional<FunctionExpression> getNextFunctionExpression(
FunctionExpression functionExpression) {
for (Argument arg : functionExpression.getArgs()) {
if (arg.getType() == ArgumentType.EXPRESSION
&& arg.getExpression() instanceof FunctionExpression) {
return Optional.of((Functi... | Optional<FunctionExpression> function( FunctionExpression functionExpression) { for (Argument arg : functionExpression.getArgs()) { if (arg.getType() == ArgumentType.EXPRESSION && arg.getExpression() instanceof FunctionExpression) { return Optional.of((FunctionExpression) arg.getExpression()); } } return Optional.empty... | /**
* Unwrap input {@code functionExpression} to get the next FunctionExpression in the query
*
* @param functionExpression the current function expression
* @return the Optional of the next FunctionExpression in the query
*/ | Unwrap input functionExpression to get the next FunctionExpression in the query | getNextFunctionExpression | {
"repo_name": "cushon/bazel",
"path": "src/main/java/com/google/devtools/build/lib/buildtool/AqueryBuildTool.java",
"license": "apache-2.0",
"size": 10556
} | [
"com.google.devtools.build.lib.query2.engine.FunctionExpression",
"com.google.devtools.build.lib.query2.engine.QueryEnvironment",
"java.util.Optional"
] | import com.google.devtools.build.lib.query2.engine.FunctionExpression; import com.google.devtools.build.lib.query2.engine.QueryEnvironment; import java.util.Optional; | import com.google.devtools.build.lib.query2.engine.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 515,132 |
@MXBeanDescription("Batch size.")
public int getBatchSize(); | @MXBeanDescription(STR) int function(); | /**
* Gets batch size.
*
* @return batch size.
*/ | Gets batch size | getBatchSize | {
"repo_name": "tkpanther/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/cache/eviction/fifo/FifoEvictionPolicyMBean.java",
"license": "apache-2.0",
"size": 2560
} | [
"org.apache.ignite.mxbean.MXBeanDescription"
] | import org.apache.ignite.mxbean.MXBeanDescription; | import org.apache.ignite.mxbean.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,826,405 |
public List<String> getPropertyKeys(String keyprefix) {
String realprefix = this.prefix
+ ((keyprefix != null) ? keyprefix : "");
List<String> result = new ArrayList<>();
for (String key : props.keySet()) {
if (key.startsWith(realprefix)) {
result.... | List<String> function(String keyprefix) { String realprefix = this.prefix + ((keyprefix != null) ? keyprefix : ""); List<String> result = new ArrayList<>(); for (String key : props.keySet()) { if (key.startsWith(realprefix)) { result.add(key.substring(this.prefix.length())); } } return result; } | /**
* Returns a list of property keys which match to the given key prefix.
*
* @param keyprefix
* the prefix of all requested keys
* @return a list with all defined property keys
*/ | Returns a list of property keys which match to the given key prefix | getPropertyKeys | {
"repo_name": "opetrovski/development",
"path": "oscm-app-iaas/javasrc/org/oscm/app/iaas/PropertyReader.java",
"license": "apache-2.0",
"size": 5204
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 280,532 |
private final SerialOutputStream out = new SerialOutputStream();
public OutputStream getOutputStream()
{
if (debug)
z.reportln( "RXTXPort:getOutputStream() called and returning");
return out;
} | final SerialOutputStream out = new SerialOutputStream(); public OutputStream function() { if (debug) z.reportln( STR); return out; } | /**
* get the OutputStream
* @return OutputStream
*/ | get the OutputStream | getOutputStream | {
"repo_name": "neophob/librxtx",
"path": "src/gnu/io/RXTXPort.java",
"license": "lgpl-2.1",
"size": 59080
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,252,344 |
public TermsEnum reset(TermsEnumIndex[] termsEnumsIndex) throws IOException {
assert termsEnumsIndex.length <= top.length;
numSubs = 0;
numTop = 0;
queue.clear();
for(int i=0;i<termsEnumsIndex.length;i++) {
final TermsEnumIndex termsEnumIndex = termsEnumsIndex[i];
assert termsEnumInde... | TermsEnum function(TermsEnumIndex[] termsEnumsIndex) throws IOException { assert termsEnumsIndex.length <= top.length; numSubs = 0; numTop = 0; queue.clear(); for(int i=0;i<termsEnumsIndex.length;i++) { final TermsEnumIndex termsEnumIndex = termsEnumsIndex[i]; assert termsEnumIndex != null; final BytesRef term = termsE... | /** The terms array must be newly created TermsEnum, ie
* {@link TermsEnum#next} has not yet been called. */ | The terms array must be newly created TermsEnum, ie | reset | {
"repo_name": "fogbeam/Heceta_solr",
"path": "lucene/core/src/java/org/apache/lucene/index/MultiTermsEnum.java",
"license": "apache-2.0",
"size": 16015
} | [
"java.io.IOException",
"org.apache.lucene.util.BytesRef"
] | import java.io.IOException; import org.apache.lucene.util.BytesRef; | import java.io.*; import org.apache.lucene.util.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,920,367 |
public final void stopScan(@NonNull final Context context,
@NonNull final PendingIntent callbackIntent,
final int requestCode) {
//noinspection ConstantConditions
if (callbackIntent == null) {
throw new IllegalArgumentException("callbackIntent is null");
}
//noinspection ConstantCondit... | final void function(@NonNull final Context context, @NonNull final PendingIntent callbackIntent, final int requestCode) { if (callbackIntent == null) { throw new IllegalArgumentException(STR); } if (context == null) { throw new IllegalArgumentException(STR); } stopScanInternal(context, callbackIntent, requestCode); } | /**
* Stops an ongoing Bluetooth LE scan.
* <p>
* For apps targeting {@link Build.VERSION_CODES#R} or lower, this requires the
* {@link Manifest.permission#BLUETOOTH_ADMIN} permission which can be gained with a simple
* {@code <uses-permission>} manifest tag.
* For apps targeting {@link Build.VERSION_CODES#... | Stops an ongoing Bluetooth LE scan. For apps targeting <code>Build.VERSION_CODES#R</code> or lower, this requires the <code>Manifest.permission#BLUETOOTH_ADMIN</code> permission which can be gained with a simple manifest tag. For apps targeting <code>Build.VERSION_CODES#S</code> or or higher, this requires the <code>Ma... | stopScan | {
"repo_name": "NordicSemiconductor/Android-Scanner-Compat-Library",
"path": "scanner/src/main/java/no/nordicsemi/android/support/v18/scanner/BluetoothLeScannerCompat.java",
"license": "bsd-3-clause",
"size": 29735
} | [
"android.app.PendingIntent",
"android.content.Context",
"androidx.annotation.NonNull"
] | import android.app.PendingIntent; import android.content.Context; import androidx.annotation.NonNull; | import android.app.*; import android.content.*; import androidx.annotation.*; | [
"android.app",
"android.content",
"androidx.annotation"
] | android.app; android.content; androidx.annotation; | 1,224,262 |
public void incrementRemove(String distributedObjectName) {
getOrPutIfAbsent(eventCounterMap, distributedObjectName, EVENT_COUNTER_CONSTRUCTOR_FN).incrementRemoveCount();
} | void function(String distributedObjectName) { getOrPutIfAbsent(eventCounterMap, distributedObjectName, EVENT_COUNTER_CONSTRUCTOR_FN).incrementRemoveCount(); } | /**
* Increment the number of remove events for the {@code distributedObjectName}.
*/ | Increment the number of remove events for the distributedObjectName | incrementRemove | {
"repo_name": "mdogan/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/wan/WanEventCounters.java",
"license": "apache-2.0",
"size": 5657
} | [
"com.hazelcast.internal.util.ConcurrencyUtil"
] | import com.hazelcast.internal.util.ConcurrencyUtil; | import com.hazelcast.internal.util.*; | [
"com.hazelcast.internal"
] | com.hazelcast.internal; | 2,217,826 |
public Injector createInjector() throws InjectorException {
Injector injector = new TestInjector(modules);
// stores injector for actual thread
InjectorManager manager = (InjectorManager)InjectorManager.getInstance();
manager.set(injector);
return injector;
} | Injector function() throws InjectorException { Injector injector = new TestInjector(modules); InjectorManager manager = (InjectorManager)InjectorManager.getInstance(); manager.set(injector); return injector; } | /**
* Creates injector which may be used in jUnit tests for injecting of mocked dependencies.
*
* @return Created injector.
*
* @throws InjectorException If some error occurs during injector creation.
*/ | Creates injector which may be used in jUnit tests for injecting of mocked dependencies | createInjector | {
"repo_name": "mrfranta/jop",
"path": "jop-test/src/test-helpers/java/cz/zcu/kiv/jop/ioc/ContextUnitSupport.java",
"license": "apache-2.0",
"size": 1961
} | [
"cz.zcu.kiv.jop.ioc.guice.TestInjector"
] | import cz.zcu.kiv.jop.ioc.guice.TestInjector; | import cz.zcu.kiv.jop.ioc.guice.*; | [
"cz.zcu.kiv"
] | cz.zcu.kiv; | 81,619 |
boolean weakThingReferenceUncollected(Object key) {
WeakReference<Thing> weakThing = weakThings.get(key);
return weakThing != null && weakThing.get() != null;
}
}
private static final class ParentAsserts extends ThingAsserts {
final Parent parent;
int expectedCallsForParentUnsc... | boolean weakThingReferenceUncollected(Object key) { WeakReference<Thing> weakThing = weakThings.get(key); return weakThing != null && weakThing.get() != null; } } private static final class ParentAsserts extends ThingAsserts { final Parent parent; int expectedCallsForParentUnscopedThing; int expectedCallsForParentRegul... | /**
* Returns {@code true} if the {@link WeakReference} to the {@link Thing} in the map returned by
* the last call to {@link #assertBindingCallCounts()} for the given key has not been cleared.
*/ | Returns true if the <code>WeakReference</code> to the <code>Thing</code> in the map returned by the last call to <code>#assertBindingCallCounts()</code> for the given key has not been cleared | weakThingReferenceUncollected | {
"repo_name": "ronshapiro/dagger",
"path": "javatests/dagger/functional/ReleasableReferencesComponentsTest.java",
"license": "apache-2.0",
"size": 16080
} | [
"java.lang.ref.WeakReference"
] | import java.lang.ref.WeakReference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 2,651,995 |
List<INaviModule> initializeRawModules(final List<INaviModule> modules,
final List<INaviRawModule> rawModules) {
final List<INaviModule> newModules = new ArrayList<INaviModule>();
for (final INaviRawModule rawModule : rawModules) {
if (!hasModule(modules, rawModule)) {
try {
new... | List<INaviModule> initializeRawModules(final List<INaviModule> modules, final List<INaviRawModule> rawModules) { final List<INaviModule> newModules = new ArrayList<INaviModule>(); for (final INaviRawModule rawModule : rawModules) { if (!hasModule(modules, rawModule)) { try { newModules.add(createModule(rawModule)); } c... | /**
* Creates BinNavi modules for a list of raw modules.
*
* @param modules List of existing modules.
* @param rawModules List of existing raw modules.
*
* @return The created modules.
*/ | Creates BinNavi modules for a list of raw modules | initializeRawModules | {
"repo_name": "hoangcuongflp/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Database/CDatabaseContent.java",
"license": "apache-2.0",
"size": 14453
} | [
"com.google.security.zynamics.binnavi.CUtilityFunctions",
"com.google.security.zynamics.binnavi.Database",
"com.google.security.zynamics.binnavi.disassembly.INaviModule",
"com.google.security.zynamics.binnavi.disassembly.INaviRawModule",
"java.util.ArrayList",
"java.util.List"
] | import com.google.security.zynamics.binnavi.CUtilityFunctions; import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.disassembly.INaviModule; import com.google.security.zynamics.binnavi.disassembly.INaviRawModule; import java.util.ArrayList; import java.util.List; | import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.disassembly.*; import java.util.*; | [
"com.google.security",
"java.util"
] | com.google.security; java.util; | 2,135,410 |
public void write(File file) throws IOException {
FileOutputStream stream = new FileOutputStream(file);
FileChannel chan = stream.getChannel();
// Create ByteBuffer for header in case the start of our
// ByteBuffer isn't actually memory-mapped
ByteBuffer hdr = ByteBuffer.allocate(Header.writtenSize());
h... | void function(File file) throws IOException { FileOutputStream stream = new FileOutputStream(file); FileChannel chan = stream.getChannel(); ByteBuffer hdr = ByteBuffer.allocate(Header.writtenSize()); hdr.order(ByteOrder.LITTLE_ENDIAN); header.write(hdr); hdr.rewind(); chan.write(hdr); buf.position(Header.writtenSize())... | /**
* Writes this TEXImage to the specified file name.
* @param file File object to write to
* @throws java.io.IOException if an I/O exception occurred
*/ | Writes this TEXImage to the specified file name | write | {
"repo_name": "Dahie/DDS-Utils",
"path": "DDSUtils/src/jogl/TEXImage.java",
"license": "gpl-3.0",
"size": 18274
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.nio.ByteBuffer",
"java.nio.ByteOrder",
"java.nio.channels.FileChannel"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.channels.FileChannel; | import java.io.*; import java.nio.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 336,330 |
protected ForkJoinPool getForkJoinPool(){
return pool.getForkJoinPool();
}
/**
* Checks if the JVM-wide, static pool needs to be re-created. Override if a different pool behavior is needed.
*
* @return {@code true} if the current pool is {@code null} or the {@link #getDesiredParallelismLevel} is not
* e... | ForkJoinPool function(){ return pool.getForkJoinPool(); } /** * Checks if the JVM-wide, static pool needs to be re-created. Override if a different pool behavior is needed. * * @return {@code true} if the current pool is {@code null} or the {@link #getDesiredParallelismLevel} is not * equal to the current pool parallel... | /**
* This method verifies and returns a JVM-wide, static FJPool. Override if a different pool behavior is needed.
*
* @return the ForkJoinPool to use for this context instance for execution.
*/ | This method verifies and returns a JVM-wide, static FJPool. Override if a different pool behavior is needed | getForkJoinPool | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/studio/concurrency/internal/AbstractConcurrencyContext.java",
"license": "agpl-3.0",
"size": 12610
} | [
"java.util.concurrent.ForkJoinPool"
] | import java.util.concurrent.ForkJoinPool; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,735,994 |
public synchronized SCPClient createSCPClient() throws IOException
{
if (tm == null)
throw new IllegalStateException("Cannot create SCP client, you need to establish a connection first.");
if (!authenticated)
throw new IllegalStateException("Cannot create SCP client, connection is not authenticated.");
... | synchronized SCPClient function() throws IOException { if (tm == null) throw new IllegalStateException(STR); if (!authenticated) throw new IllegalStateException(STR); return new SCPClient(this); } | /**
* Create a very basic {@link SCPClient} that can be used to copy files
* from/to the SSH-2 server.
* <p>
* Works only after one has passed successfully the authentication step.
* There is no limit on the number of concurrent SCP clients.
* <p>
* Note: This factory method will probably disappear in the... | Create a very basic <code>SCPClient</code> that can be used to copy files from/to the SSH-2 server. Works only after one has passed successfully the authentication step. There is no limit on the number of concurrent SCP clients. Note: This factory method will probably disappear in the future | createSCPClient | {
"repo_name": "getconsole/serialbot",
"path": "src/com/trilead/ssh2/Connection.java",
"license": "apache-2.0",
"size": 55105
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,195,671 |
public static Map<Integer, ItemStack> getItems(ItemStack itemstack){
Map<Integer, ItemStack> map = new HashMap();
for(int metadata = 1; metadata < 10; metadata++){
if(hasToolForMeta(itemstack, metadata)){
map.put(metadata, getToolFromMeta(itemstack, metadata));
}
}
return map;
} | static Map<Integer, ItemStack> function(ItemStack itemstack){ Map<Integer, ItemStack> map = new HashMap(); for(int metadata = 1; metadata < 10; metadata++){ if(hasToolForMeta(itemstack, metadata)){ map.put(metadata, getToolFromMeta(itemstack, metadata)); } } return map; } | /**
* Gets map of tools from itemstack
* @param itemstack = itemstack to take data from
* @return map of tools inside itemstack
*/ | Gets map of tools from itemstack | getItems | {
"repo_name": "elix-x/toolscompressor",
"path": "src/main/java/code/elix_x/mods/toolscompressor/items/ItemCompressedTools.java",
"license": "lgpl-3.0",
"size": 48122
} | [
"java.util.HashMap",
"java.util.Map",
"net.minecraft.item.ItemStack"
] | import java.util.HashMap; import java.util.Map; import net.minecraft.item.ItemStack; | import java.util.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.item"
] | java.util; net.minecraft.item; | 1,654,443 |
public void onZoomIn(View view) {
if (!checkReady()) {
return;
}
changeCamera(CameraUpdateFactory.zoomIn());
} | void function(View view) { if (!checkReady()) { return; } changeCamera(CameraUpdateFactory.zoomIn()); } | /**
* Called when the zoom in button (the one with the +) is clicked.
*/ | Called when the zoom in button (the one with the +) is clicked | onZoomIn | {
"repo_name": "gudnam/bringluck",
"path": "google_play_services/samples/maps/src/com/example/mapdemo/CameraDemoActivity.java",
"license": "apache-2.0",
"size": 9131
} | [
"android.view.View",
"com.google.android.gms.maps.CameraUpdateFactory"
] | import android.view.View; import com.google.android.gms.maps.CameraUpdateFactory; | import android.view.*; import com.google.android.gms.maps.*; | [
"android.view",
"com.google.android"
] | android.view; com.google.android; | 762,743 |
private static void maybeUpdateClusterBlock(String[] actualIndices, ClusterBlocks.Builder blocks, ClusterBlock block, Setting<Boolean> setting, Settings openSettings) {
if (setting.exists(openSettings)) {
final boolean updateReadBlock = setting.get(openSettings);
for (String index : ... | static void function(String[] actualIndices, ClusterBlocks.Builder blocks, ClusterBlock block, Setting<Boolean> setting, Settings openSettings) { if (setting.exists(openSettings)) { final boolean updateReadBlock = setting.get(openSettings); for (String index : actualIndices) { if (updateReadBlock) { blocks.addIndexBloc... | /**
* Updates the cluster block only iff the setting exists in the given settings
*/ | Updates the cluster block only iff the setting exists in the given settings | maybeUpdateClusterBlock | {
"repo_name": "xuzha/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/cluster/metadata/MetaDataUpdateSettingsService.java",
"license": "apache-2.0",
"size": 17840
} | [
"org.elasticsearch.cluster.block.ClusterBlock",
"org.elasticsearch.cluster.block.ClusterBlocks",
"org.elasticsearch.common.settings.Setting",
"org.elasticsearch.common.settings.Settings"
] | import org.elasticsearch.cluster.block.ClusterBlock; import org.elasticsearch.cluster.block.ClusterBlocks; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; | import org.elasticsearch.cluster.block.*; import org.elasticsearch.common.settings.*; | [
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | org.elasticsearch.cluster; org.elasticsearch.common; | 2,149,141 |
@NotNull PsiMethod createConstructor(); | @NotNull PsiMethod createConstructor(); | /**
* Creates an empty constructor.
*
* @return the created constructor instance.
*/ | Creates an empty constructor | createConstructor | {
"repo_name": "joewalnes/idea-community",
"path": "java/openapi/src/com/intellij/psi/PsiElementFactory.java",
"license": "apache-2.0",
"size": 23064
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,765,444 |
public static void readStepRep( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {
try {
String stepXML = rep.getStepAttributeString( id_step, "step-xml" );
ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() );
Document ... | static void function( Object object, Repository rep, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException { try { String stepXML = rep.getStepAttributeString( id_step, STR ); ByteArrayInputStream bais = new ByteArrayInputStream( stepXML.getBytes() ); Document doc = XMLParserFactoryProducer.createSecu... | /**
* Handle reading of the input (object) from the kettle repository by getting the step-xml from the repository step
* attribute string and then re-hydrate the step (object) with our already existing read method.
*
* @param object
* @param rep
* @param id_step
* @param databases
* @param count... | Handle reading of the input (object) from the kettle repository by getting the step-xml from the repository step attribute string and then re-hydrate the step (object) with our already existing read method | readStepRep | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "engine/src/org/pentaho/di/core/util/SerializationHelper.java",
"license": "apache-2.0",
"size": 21916
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.util.List",
"javax.xml.parsers.ParserConfigurationException",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.core.xml.XMLParserFactoryProducer",
"org.pentaho.di.repository.Object... | import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.List; import javax.xml.parsers.ParserConfigurationException; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.xml.XMLParserFactoryProducer; import org.penta... | import java.io.*; import java.util.*; import javax.xml.parsers.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.xml.*; import org.pentaho.di.repository.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"org.pentaho.di",
"org.w3c.dom",
"org.xml.sax"
] | java.io; java.util; javax.xml; org.pentaho.di; org.w3c.dom; org.xml.sax; | 2,182,074 |
public Optional<Integer> getPlateStepRaw(int index) {
if (deviceIsInOffState()) {
return Optional.empty();
}
return device.flatMap(Device::getState).map(State::getPlateStep).flatMap(l -> getOrNull(l, index))
.flatMap(PlateStep::getValueRaw);
} | Optional<Integer> function(int index) { if (deviceIsInOffState()) { return Optional.empty(); } return device.flatMap(Device::getState).map(State::getPlateStep).flatMap(l -> getOrNull(l, index)) .flatMap(PlateStep::getValueRaw); } | /**
* Gets the raw plate power step of the device for the given index.
*
* @param index The index of the device plate for which the power step shall be obtained.
* @return The raw plate power step if available.
*/ | Gets the raw plate power step of the device for the given index | getPlateStepRaw | {
"repo_name": "paulianttila/openhab2",
"path": "bundles/org.openhab.binding.mielecloud/src/main/java/org/openhab/binding/mielecloud/internal/webservice/api/DeviceState.java",
"license": "epl-1.0",
"size": 18906
} | [
"java.util.Optional",
"org.openhab.binding.mielecloud.internal.webservice.api.json.Device",
"org.openhab.binding.mielecloud.internal.webservice.api.json.PlateStep",
"org.openhab.binding.mielecloud.internal.webservice.api.json.State"
] | import java.util.Optional; import org.openhab.binding.mielecloud.internal.webservice.api.json.Device; import org.openhab.binding.mielecloud.internal.webservice.api.json.PlateStep; import org.openhab.binding.mielecloud.internal.webservice.api.json.State; | import java.util.*; import org.openhab.binding.mielecloud.internal.webservice.api.json.*; | [
"java.util",
"org.openhab.binding"
] | java.util; org.openhab.binding; | 1,626,666 |
@Test
public final void testValoration() {
final CostCalculator<SponsorTeam> calculator; // Tested class
final SponsorTeam team; // Team to valorate
final Map<Integer, TeamPlayer> players; // Team players
final TeamPlayer player; // Mocked player
... | final void function() { final CostCalculator<SponsorTeam> calculator; final SponsorTeam team; final Map<Integer, TeamPlayer> players; final TeamPlayer player; team = Mockito.mock(SponsorTeam.class); Mockito.when(team.getCoachingDice()).thenReturn(2); Mockito.when(team.getNastySurpriseCards()).thenReturn(4); Mockito.whe... | /**
* Tests that the valoration is calculated correctly.
*/ | Tests that the valoration is calculated correctly | testValoration | {
"repo_name": "Bernardo-MG/dreadball-model-default",
"path": "src/test/java/com/bernardomg/tabletop/dreadball/model/test/unit/team/calculator/TestSponsorTeamValorationCalculator.java",
"license": "apache-2.0",
"size": 2692
} | [
"com.bernardomg.tabletop.dreadball.model.player.TeamPlayer",
"com.bernardomg.tabletop.dreadball.model.team.SponsorTeam",
"com.bernardomg.tabletop.dreadball.model.team.calculator.CostCalculator",
"com.bernardomg.tabletop.dreadball.model.team.calculator.SponsorTeamValorationCalculator",
"java.util.HashMap",
... | import com.bernardomg.tabletop.dreadball.model.player.TeamPlayer; import com.bernardomg.tabletop.dreadball.model.team.SponsorTeam; import com.bernardomg.tabletop.dreadball.model.team.calculator.CostCalculator; import com.bernardomg.tabletop.dreadball.model.team.calculator.SponsorTeamValorationCalculator; import java.ut... | import com.bernardomg.tabletop.dreadball.model.player.*; import com.bernardomg.tabletop.dreadball.model.team.*; import com.bernardomg.tabletop.dreadball.model.team.calculator.*; import java.util.*; import org.junit.*; import org.mockito.*; | [
"com.bernardomg.tabletop",
"java.util",
"org.junit",
"org.mockito"
] | com.bernardomg.tabletop; java.util; org.junit; org.mockito; | 1,552,393 |
private JLabel getLabelId() {
if (labelId == null) {
labelId = new JLabel();
labelId.setText("ID:");
}
return labelId;
}
| JLabel function() { if (labelId == null) { labelId = new JLabel(); labelId.setText("ID:"); } return labelId; } | /**
* This method initializes labelId
*
* @return javax.swing.JLabel
*/ | This method initializes labelId | getLabelId | {
"repo_name": "lucianait10/BasicVet",
"path": "source_basicvet/cuGestionarVenta/GUIVenta.java",
"license": "gpl-3.0",
"size": 21893
} | [
"javax.swing.JLabel"
] | import javax.swing.JLabel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 881 |
@Override
public void generateBudgetAdjustmentCashTransferTransactions() {
if (LOG.isDebugEnabled()) {
LOG.debug("generateBudgetAdjustmentCashTransferTransactions() started");
}
Date executionDate = dateTimeService.getCurrentSqlDate();
Date runDate = new Date(run... | void function() { if (LOG.isDebugEnabled()) { LOG.debug(STR); } Date executionDate = dateTimeService.getCurrentSqlDate(); Date runDate = new Date(runDateService.calculateRunDate(executionDate).getTime()); int reportBudgetAdjustDocLoaded = 0; int reportOriginEntryGenerated = 0; try { PrintStream OUTPUT_GLE_FILE_ps = new... | /**
* Reads budget adjustment transactions from holding table GL_BUDGET_ADJUST_TRN_T and generates/builds
* a file of budget adjustment cash transfer entries for posting to the General Ledger.
*/ | Reads budget adjustment transactions from holding table GL_BUDGET_ADJUST_TRN_T and generates/builds a file of budget adjustment cash transfer entries for posting to the General Ledger | generateBudgetAdjustmentCashTransferTransactions | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/edu/arizona/kfs/gl/batch/service/impl/BudgetAdjustmentCashTransferServiceImpl.java",
"license": "agpl-3.0",
"size": 26101
} | [
"edu.arizona.kfs.gl.GeneralLedgerConstants",
"java.io.File",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.PrintStream",
"java.sql.Date",
"java.util.List"
] | import edu.arizona.kfs.gl.GeneralLedgerConstants; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintStream; import java.sql.Date; import java.util.List; | import edu.arizona.kfs.gl.*; import java.io.*; import java.sql.*; import java.util.*; | [
"edu.arizona.kfs",
"java.io",
"java.sql",
"java.util"
] | edu.arizona.kfs; java.io; java.sql; java.util; | 915 |
AuthResult permissionGranted(OpType opType, User user, RegionCoprocessorEnvironment e,
Map<byte [], ? extends Collection<?>> families, Action... actions) {
AuthResult result = null;
for (Action action: actions) {
result = permissionGranted(opType.toString(), user, action, e, families);
if (!... | AuthResult permissionGranted(OpType opType, User user, RegionCoprocessorEnvironment e, Map<byte [], ? extends Collection<?>> families, Action... actions) { AuthResult result = null; for (Action action: actions) { result = permissionGranted(opType.toString(), user, action, e, families); if (!result.isAllowed()) { return... | /**
* Check the current user for authorization to perform a specific action
* against the given set of row data.
* @param opType the operation type
* @param user the user
* @param e the coprocessor environment
* @param families the map of column families to qualifiers present in
* the request
* ... | Check the current user for authorization to perform a specific action against the given set of row data | permissionGranted | {
"repo_name": "drewpope/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java",
"license": "apache-2.0",
"size": 101649
} | [
"java.util.Collection",
"java.util.Map",
"org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment",
"org.apache.hadoop.hbase.security.User",
"org.apache.hadoop.hbase.security.access.Permission"
] | import java.util.Collection; import java.util.Map; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; import org.apache.hadoop.hbase.security.User; import org.apache.hadoop.hbase.security.access.Permission; | import java.util.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.hbase.security.access.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,255,021 |
public void addExtendedEmailParameterType(XEmailParameterType xtendedEmailParameterType);
| void function(XEmailParameterType xtendedEmailParameterType); | /**
* <p>Adds an extended email parameter type.</p>
*
* @param xtendedEmailParameterType
*/ | Adds an extended email parameter type | addExtendedEmailParameterType | {
"repo_name": "olw/cdn",
"path": "external/cardme/src/main/java/info/ineighborhood/cardme/vcard/features/EmailFeature.java",
"license": "apache-2.0",
"size": 7004
} | [
"info.ineighborhood.cardme.vcard.types.parameters.XEmailParameterType"
] | import info.ineighborhood.cardme.vcard.types.parameters.XEmailParameterType; | import info.ineighborhood.cardme.vcard.types.parameters.*; | [
"info.ineighborhood.cardme"
] | info.ineighborhood.cardme; | 2,244,086 |
if (stack == null) return -1;
int[] oreIds = OreDictionary.getOreIDs(stack);
for (int ore : oreIds) {
String name = OreDictionary.getOreName(ore);
Integer color = dyes.get(name);
if (color != null) return color;
}
return -1;
}
| if (stack == null) return -1; int[] oreIds = OreDictionary.getOreIDs(stack); for (int ore : oreIds) { String name = OreDictionary.getOreName(ore); Integer color = dyes.get(name); if (color != null) return color; } return -1; } | /** Gets the dye color of the item stack. <br>
* If it's not a dye, it will return -1. */ | Gets the dye color of the item stack. | getDyeColor | {
"repo_name": "copygirl/BetterStorage",
"path": "src/main/java/net/mcft/copy/betterstorage/utils/DyeUtils.java",
"license": "mit",
"size": 2612
} | [
"net.minecraftforge.oredict.OreDictionary"
] | import net.minecraftforge.oredict.OreDictionary; | import net.minecraftforge.oredict.*; | [
"net.minecraftforge.oredict"
] | net.minecraftforge.oredict; | 2,759,199 |
public void putExternalResources(Set<String> locations) {
final Set<ExternalResource> resources = loadExternalResources(locations);
if (areExternalResourcesChanged(resources)) {
reset();
}
fillCacheWithExternalResources(resources);
} | void function(Set<String> locations) { final Set<ExternalResource> resources = loadExternalResources(locations); if (areExternalResourcesChanged(resources)) { reset(); } fillCacheWithExternalResources(resources); } | /**
* Puts external resources in cache.
* If at least one external resource changed, clears the cache.
* @param locations locations of external resources.
*/ | Puts external resources in cache. If at least one external resource changed, clears the cache | putExternalResources | {
"repo_name": "vboerchers/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/PropertyCacheFile.java",
"license": "lgpl-2.1",
"size": 13875
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,812,393 |
@Nullable
Duration getDuration(String name); | Duration getDuration(String name); | /**
* Returns a duration property from the map, or {@code null} if it cannot be found or it has a
* wrong type.
*
* <p>Durations can be of the form "{number}{unit}", where unit is one of:
*
* <ul>
* <li>ms
* <li>s
* <li>m
* <li>h
* <li>d
* </ul>
*
* <p>If no unit is s... | Returns a duration property from the map, or null if it cannot be found or it has a wrong type. Durations can be of the form "{number}{unit}", where unit is one of: ms s m h d If no unit is specified, milliseconds is the assumed duration unit | getDuration | {
"repo_name": "open-telemetry/opentelemetry-java",
"path": "sdk-extensions/autoconfigure-spi/src/main/java/io/opentelemetry/sdk/autoconfigure/spi/ConfigProperties.java",
"license": "apache-2.0",
"size": 3200
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,059,690 |
public Path getAtomicWorkPath() {
return atomicWorkPath;
} | Path function() { return atomicWorkPath; } | /** Get work path for atomic commit. If null, the work
* path would be parentOf(targetPath) + "/._WIP_" + nameOf(targetPath)
*
* @return Atomic work path on the target cluster. Null if not set
*/ | Get work path for atomic commit. If null, the work path would be parentOf(targetPath) + "/._WIP_" + nameOf(targetPath) | getAtomicWorkPath | {
"repo_name": "busbey/hadoop",
"path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java",
"license": "apache-2.0",
"size": 19158
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,845,790 |
public FeatureResultSet queryFeaturesForChunk(boolean distinct, double minX,
double minY, double maxX, double maxY, int limit, long offset) {
return queryFeaturesForChunk(distinct, minX, minY, maxX, maxY,
getPkColumnName(), limit, offset);
} | FeatureResultSet function(boolean distinct, double minX, double minY, double maxX, double maxY, int limit, long offset) { return queryFeaturesForChunk(distinct, minX, minY, maxX, maxY, getPkColumnName(), limit, offset); } | /**
* Query for features within the bounds ordered by id, starting at the
* offset and returning no more than the limit
*
* @param distinct
* distinct rows
* @param minX
* min x
* @param minY
* min y
* @param maxX
* max x
* @param maxY
* ... | Query for features within the bounds ordered by id, starting at the offset and returning no more than the limit | queryFeaturesForChunk | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java",
"license": "mit",
"size": 349361
} | [
"mil.nga.geopackage.features.user.FeatureResultSet"
] | import mil.nga.geopackage.features.user.FeatureResultSet; | import mil.nga.geopackage.features.user.*; | [
"mil.nga.geopackage"
] | mil.nga.geopackage; | 1,962,733 |
void uploadArtifact(String parentId, String groupId, String storageConfigurationId, String versionName,
String recentChanges, String filePath) throws IOException {
File file = new File(filePath);
InputStream stream = new FileInputStream(file);
logger.info("Uploading a... | void uploadArtifact(String parentId, String groupId, String storageConfigurationId, String versionName, String recentChanges, String filePath) throws IOException { File file = new File(filePath); InputStream stream = new FileInputStream(file); logger.info(STR, file.getName(), versionName, serverUrl); uploadArtifact(par... | /**
* Uploads a single artifact (e.g. IPA file) to Knappsack server. Convenience method that accepts full
* artifact file path, parses its name and opens an InputStream.
* @param parentId Application id.
* @param groupId Group id.
* @param storageConfigurationId Storage configuration id.
*... | Uploads a single artifact (e.g. IPA file) to Knappsack server. Convenience method that accepts full artifact file path, parses its name and opens an InputStream | uploadArtifact | {
"repo_name": "ctco/gradle-mobile-plugin",
"path": "src/main/java/lv/ctco/scm/mobile/knappsack/Knappsack.java",
"license": "apache-2.0",
"size": 8398
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,673,483 |
public static void copy(InputStream source, OutputStream target)throws Exception{
copy(source,target,-1, false);
}
| static void function(InputStream source, OutputStream target)throws Exception{ copy(source,target,-1, false); } | /**
* copy input data from the source stream to the target stream
* @param source - input stream to read from
* @param target - output stream to write to
* @throws IOException
*/ | copy input data from the source stream to the target stream | copy | {
"repo_name": "adamfisk/littleshoot-client",
"path": "common/udt/src/main/java/udt/util/Util.java",
"license": "gpl-2.0",
"size": 5482
} | [
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,754,662 |
@Test
public void testValidateFailsIfNoSecretsAreValidYet() {
final AbstractDeviceCredentials creds = getDeviceCredentials("type", "tenant", "identity", true);
final CredentialsObject credentialsOnRecord = getCredentialsObject("type", "identity", "device", true)
.addSecret(Crede... | void function() { final AbstractDeviceCredentials creds = getDeviceCredentials("type", STR, STR, true); final CredentialsObject credentialsOnRecord = getCredentialsObject("type", STR, STR, true) .addSecret(CredentialsObject.emptySecret(Instant.now().plusSeconds(120), null)); assertFalse(creds.validate(credentialsOnReco... | /**
* Verifies that credentials validation fails if none of the secrets on record are
* valid yet.
*/ | Verifies that credentials validation fails if none of the secrets on record are valid yet | testValidateFailsIfNoSecretsAreValidYet | {
"repo_name": "dejanb/hono",
"path": "service-base/src/test/java/org/eclipse/hono/service/auth/device/AbstractDeviceCredentialsTest.java",
"license": "epl-1.0",
"size": 4147
} | [
"java.time.Instant",
"org.eclipse.hono.util.CredentialsObject",
"org.junit.Assert"
] | import java.time.Instant; import org.eclipse.hono.util.CredentialsObject; import org.junit.Assert; | import java.time.*; import org.eclipse.hono.util.*; import org.junit.*; | [
"java.time",
"org.eclipse.hono",
"org.junit"
] | java.time; org.eclipse.hono; org.junit; | 646,731 |
@Override
public void setDefaultLanguage(UUID languageId) throws CantSetDefaultLanguageException {
//TODO METODO NO IMPLEMENTADO AUN - OJO: solo INFORMATIVO de ayuda VISUAL para DEBUG - Eliminar si molesta
} | void function(UUID languageId) throws CantSetDefaultLanguageException { } | /**
* This method let us set the default language for a wallet
*
* @param languageId the identifier of the language to set as default
* @throws CantSetDefaultLanguageException
*/ | This method let us set the default language for a wallet | setDefaultLanguage | {
"repo_name": "fvasquezjatar/fermat-unused",
"path": "DMP/android/sub_app/fermat-dmp-android-sub-app-wallet-factory-bitdubai/src/main/java/com/bitdubai/sub_app/wallet_factory/settings/WalletFactoryPreferenceSettings.java",
"license": "mit",
"size": 3593
} | [
"com.bitdubai.fermat_wpd_api.layer.wpd_middleware.wallet_settings.exceptions.CantSetDefaultLanguageException"
] | import com.bitdubai.fermat_wpd_api.layer.wpd_middleware.wallet_settings.exceptions.CantSetDefaultLanguageException; | import com.bitdubai.fermat_wpd_api.layer.wpd_middleware.wallet_settings.exceptions.*; | [
"com.bitdubai.fermat_wpd_api"
] | com.bitdubai.fermat_wpd_api; | 612,628 |
private ArrayList parseListElement(String str, ValueParser parser)
throws Exception {
StringTokenizer st = new StringTokenizer(str, "/");
int size = st.countTokens();
if (size < 1 || size > 2) {
throw new Exception("syntax error");
}
ArrayList values;
try {
values = parseRange(st.nextToken(), pa... | ArrayList function(String str, ValueParser parser) throws Exception { StringTokenizer st = new StringTokenizer(str, "/"); int size = st.countTokens(); if (size < 1 size > 2) { throw new Exception(STR); } ArrayList values; try { values = parseRange(st.nextToken(), parser); } catch (Exception e) { throw new Exception(STR... | /**
* Parses an element of a list of values of the pattern.
*
* @param str
* The element string.
* @param parser
* The parser used to parse the values.
* @return A list of integers representing the allowed values.
* @throws Exception
* If the supplied pattern part is... | Parses an element of a list of values of the pattern | parseListElement | {
"repo_name": "ZobsDope/bankbot.old",
"path": "src/main/java/it/sauronsoftware/cron4j/SchedulingPattern.java",
"license": "gpl-2.0",
"size": 20868
} | [
"java.util.ArrayList",
"java.util.StringTokenizer"
] | import java.util.ArrayList; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 2,705,125 |
public BudgetPersonnelDetails getNewBudgetPersonnelDetails() {
return newBudgetPersonnelDetails;
} | BudgetPersonnelDetails function() { return newBudgetPersonnelDetails; } | /**
* Gets the newBudgetPersonnelDetails attribute.
* @return Returns the newBudgetPersonnelDetails.
*/ | Gets the newBudgetPersonnelDetails attribute | getNewBudgetPersonnelDetails | {
"repo_name": "sanjupolus/kc-coeus-1508.3",
"path": "coeus-impl/src/main/java/org/kuali/coeus/common/budget/framework/core/BudgetForm.java",
"license": "agpl-3.0",
"size": 37890
} | [
"org.kuali.coeus.common.budget.framework.personnel.BudgetPersonnelDetails"
] | import org.kuali.coeus.common.budget.framework.personnel.BudgetPersonnelDetails; | import org.kuali.coeus.common.budget.framework.personnel.*; | [
"org.kuali.coeus"
] | org.kuali.coeus; | 2,002,852 |
private static INode<IRemoteNode> createMockLocalNode()
{
final IMocksControl mocksControl = EasyMock.createControl();
final INode<IRemoteNode> localNode = mocksControl.createMock( INode.class );
mocksControl.replay();
return localNode;
}
| static INode<IRemoteNode> function() { final IMocksControl mocksControl = EasyMock.createControl(); final INode<IRemoteNode> localNode = mocksControl.createMock( INode.class ); mocksControl.replay(); return localNode; } | /**
* Creates a mock local node for use in the fixture.
*
* @return A mock local node for use in the fixture.
*/ | Creates a mock local node for use in the fixture | createMockLocalNode | {
"repo_name": "gamegineer/dev",
"path": "main/table/org.gamegineer.table.net.impl.tests/src/org/gamegineer/table/internal/net/impl/node/AbstractRemoteNodeTest.java",
"license": "gpl-3.0",
"size": 12811
} | [
"org.easymock.EasyMock",
"org.easymock.IMocksControl"
] | import org.easymock.EasyMock; import org.easymock.IMocksControl; | import org.easymock.*; | [
"org.easymock"
] | org.easymock; | 2,624,894 |
List<Address> expected = new ArrayList<>();
List<Profile> profiles = Arrays.asList(new Profile(new Address("Rostov", "Krasnay", 40, 17)),
new Profile(new Address("Tver", "Lasurnay", 56, 60)),
new Profile(new Address(... | List<Address> expected = new ArrayList<>(); List<Profile> profiles = Arrays.asList(new Profile(new Address(STR, STR, 40, 17)), new Profile(new Address("Tver", STR, 56, 60)), new Profile(new Address(STR, STR, 40, 17))); Profile profile = new Profile(new Address(STR, STR, 40, 17)); List<Address> result = profile.collect(... | /**
* Test convert profile list to address list.
*/ | Test convert profile list to address list | whenListProfilesThenListAddress | {
"repo_name": "sllexa/junior",
"path": "chapter_004/src/test/java/ru/job4j/stream/ProfileTest.java",
"license": "apache-2.0",
"size": 2175
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.hamcrest.core.Is; import org.junit.Assert; | import java.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.util",
"org.hamcrest.core",
"org.junit"
] | java.util; org.hamcrest.core; org.junit; | 485,240 |
@Experimental
public RxTransaction rxTxPlain() {
if (rxTxPlain == null) {
rxTxPlain = new RxTransaction(this);
}
return rxTxPlain;
} | RxTransaction function() { if (rxTxPlain == null) { rxTxPlain = new RxTransaction(this); } return rxTxPlain; } | /**
* The returned {@link RxTransaction} allows DB transactions using Rx Observables without any Scheduler set for
* subscribeOn.
*
* @see #rxTx()
*/ | The returned <code>RxTransaction</code> allows DB transactions using Rx Observables without any Scheduler set for subscribeOn | rxTxPlain | {
"repo_name": "wavinsun/SQLCipherToolkit",
"path": "greendao-sqlcipher/src-core/org/greenrobot/greendao/AbstractDaoSession.java",
"license": "mit",
"size": 8507
} | [
"org.greenrobot.greendao.rx.RxTransaction"
] | import org.greenrobot.greendao.rx.RxTransaction; | import org.greenrobot.greendao.rx.*; | [
"org.greenrobot.greendao"
] | org.greenrobot.greendao; | 600,099 |
public FileObject[] listObjects() {
List<FileObject> result;
List<SortContainer> list;
SortContainer cont;
int i;
result = new ArrayList<>();
m_Stopped = false;
m_StopFileEncountered = false;
if (m_ListFiles || m_ListDirs) {
if (getDebug())
get... | FileObject[] function() { List<FileObject> result; List<SortContainer> list; SortContainer cont; int i; result = new ArrayList<>(); m_Stopped = false; m_StopFileEncountered = false; if (m_ListFiles m_ListDirs) { if (getDebug()) getLogger().info(STR + m_WatchDir + "'"); if (getDebug()) getLogger().info(STR); list = new ... | /**
* Returns the list of files/directories in the watched directory. In case
* the execution gets stopped, this method returns a 0-length array.
*
* @return the list of file/directory wrappers
*/ | Returns the list of files/directories in the watched directory. In case the execution gets stopped, this method returns a 0-length array | listObjects | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/core/io/lister/LocalDirectoryLister.java",
"license": "gpl-3.0",
"size": 13293
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,677,361 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.