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
protected List<Charset> getAcceptedCharsets() { return this.availableCharsets; }
List<Charset> function() { return this.availableCharsets; }
/** * Return the list of supported {@link Charset}. * * <p>By default, returns {@link Charset#availableCharsets()}. Can be overridden in subclasses. * * @return the list of accepted charsets */
Return the list of supported <code>Charset</code>. By default, returns <code>Charset#availableCharsets()</code>. Can be overridden in subclasses
getAcceptedCharsets
{ "repo_name": "anylineorg/anyline", "path": "anyline-mvc/src/main/java/org/anyline/plugin/springmvc/HttpCharsetConvert.java", "license": "apache-2.0", "size": 4125 }
[ "java.nio.charset.Charset", "java.util.List" ]
import java.nio.charset.Charset; import java.util.List;
import java.nio.charset.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
691,761
public void testSimpleWorkflowAction() { this.nodeService.addAspect(this.nodeRef, ContentModel.ASPECT_LOCKABLE, null); Map<String, Serializable> params = new HashMap<String, Serializable>(1); params.put(SimpleWorkflowActionExecuter.PARAM_APPROVE_STEP, "approveStep"); par...
void function() { this.nodeService.addAspect(this.nodeRef, ContentModel.ASPECT_LOCKABLE, null); Map<String, Serializable> params = new HashMap<String, Serializable>(1); params.put(SimpleWorkflowActionExecuter.PARAM_APPROVE_STEP, STR); params.put(SimpleWorkflowActionExecuter.PARAM_APPROVE_FOLDER, this.rootNodeRef); para...
/** * Test: * rule type: inbound * condition: no-condition * action: simple-workflow */
Test: rule type: inbound condition: no-condition action: simple-workflow
testSimpleWorkflowAction
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/test-java/org/alfresco/repo/rule/RuleServiceCoverageTest.java", "license": "lgpl-3.0", "size": 94492 }
[ "java.io.Serializable", "java.util.HashMap", "java.util.Map", "org.alfresco.model.ApplicationModel", "org.alfresco.model.ContentModel", "org.alfresco.repo.action.evaluator.NoConditionEvaluator", "org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter", "org.alfresco.service.cmr.repository.Node...
import java.io.Serializable; import java.util.HashMap; import java.util.Map; import org.alfresco.model.ApplicationModel; import org.alfresco.model.ContentModel; import org.alfresco.repo.action.evaluator.NoConditionEvaluator; import org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter; import org.alfresco.serv...
import java.io.*; import java.util.*; import org.alfresco.model.*; import org.alfresco.repo.action.evaluator.*; import org.alfresco.repo.action.executer.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.rule.*; import org.alfresco.service.namespace.*;
[ "java.io", "java.util", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service" ]
java.io; java.util; org.alfresco.model; org.alfresco.repo; org.alfresco.service;
1,911,718
Board board = new Board(); String result = board.paint(3, 3); // final String line = System.getProperty("line.separator"); final String line = "\r\n"; String expected = String.format("x x%s x %sx x", line, line); assertThat(result, is(expected)); }
Board board = new Board(); String result = board.paint(3, 3); final String line = "\r\n"; String expected = String.format(STR, line, line); assertThat(result, is(expected)); }
/** * Test of 3*3 board. */
Test of 3*3 board
whenPaintBoardWithWidthThreeAndHeightThreeThenStringWithThreeColsAndThreeRows
{ "repo_name": "Ravmouse/vvasilyev", "path": "chapter_001/src/test/java/ru/job4j/loop/BoardTest.java", "license": "apache-2.0", "size": 1174 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
1,794,657
public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException { serializer = null; }
void function(boolean fragment) throws IOException, SAXException, XMLStreamException { serializer = null; }
/** * Called at the very end. * * @param fragment * false if we are writing the whole document. */
Called at the very end
endDocument
{ "repo_name": "FauxFaux/jdk9-jaxws", "path": "src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XmlOutputAbstractImpl.java", "license": "gpl-2.0", "size": 4690 }
[ "java.io.IOException", "javax.xml.stream.XMLStreamException", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.stream.XMLStreamException; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.stream.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.xml.sax" ]
java.io; javax.xml; org.xml.sax;
2,572,241
public static Errata createNewErrata() { return ErrataFactory.createUnpublishedErrata(); }
static Errata function() { return ErrataFactory.createUnpublishedErrata(); }
/** * Creates a new (Unpublished) Errata object. * @return Returns a fresh errata */
Creates a new (Unpublished) Errata object
createNewErrata
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java", "license": "gpl-2.0", "size": 52839 }
[ "com.redhat.rhn.domain.errata.Errata", "com.redhat.rhn.domain.errata.ErrataFactory" ]
import com.redhat.rhn.domain.errata.Errata; import com.redhat.rhn.domain.errata.ErrataFactory;
import com.redhat.rhn.domain.errata.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,683,793
@ServiceMethod(returns = ReturnType.SINGLE) public PollerFlux<PollResult<Void>, Void> beginCreateAsync( String resourceGroupName, String serverName, TdeCertificate parameters) { Mono<Response<Flux<ByteBuffer>>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters); re...
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> function( String resourceGroupName, String serverName, TdeCertificate parameters) { Mono<Response<Flux<ByteBuffer>>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters); return this .client .<Void, Void>getLroResult(mon...
/** * Creates a TDE certificate for a given server. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param parameters A T...
Creates a TDE certificate for a given server
beginCreateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/TdeCertificatesClientImpl.java", "license": "mit", "size": 16898 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.sql.models.TdeCertificate", "java....
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.sql.models.TdeCe...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.sql.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,375,794
public void putTagsForMetric(final String metricName, final Map<String, String> tags) { metricTags.put(metricName, tags); }
void function(final String metricName, final Map<String, String> tags) { metricTags.put(metricName, tags); }
/** * Adds tags for the Metric with name. * * @param metricName the name of the metric * @param tags map containing the tag name and value */
Adds tags for the Metric with name
putTagsForMetric
{ "repo_name": "ohr/metrics", "path": "metrics-influxdb/src/main/java/com/codehale/metrics/influxdb/InfluxDbReporter.java", "license": "apache-2.0", "size": 11086 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,420,341
public synchronized void connected(BluetoothSocket socket, BluetoothDevice device, final String socketType) { if (D) Log.d(TAG, "connected, Socket Type:" + socketType); // Cancel the thread that completed the connection if (mConnectThread != null) {mConnectThread.cancel(); mConn...
synchronized void function(BluetoothSocket socket, BluetoothDevice device, final String socketType) { if (D) Log.d(TAG, STR + socketType); if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;} if (mConnectedThread != null) {mConnectedThread.cancel(); mConnectedThread = null;} if (mSecureAcceptTh...
/** * Start the ConnectedThread to begin managing a Bluetooth connection * @param socket The BluetoothSocket on which the connection was made * @param device The BluetoothDevice that has been connected */
Start the ConnectedThread to begin managing a Bluetooth connection
connected
{ "repo_name": "mrmdgeorge/shopping-navigator", "path": "wImuConsole/src/nrec/basil/wimuconsole/BluetoothService.java", "license": "mit", "size": 24068 }
[ "android.bluetooth.BluetoothDevice", "android.bluetooth.BluetoothSocket", "android.os.Bundle", "android.os.Message", "android.util.Log" ]
import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.os.Bundle; import android.os.Message; import android.util.Log;
import android.bluetooth.*; import android.os.*; import android.util.*;
[ "android.bluetooth", "android.os", "android.util" ]
android.bluetooth; android.os; android.util;
2,392,117
public static String getRequestUserName() { User user = getRequestUser(); if (user != null) { return user.getShortName(); } return null; }
static String function() { User user = getRequestUser(); if (user != null) { return user.getShortName(); } return null; }
/** * Returns the username for any user associated with the current RPC * request or <code>null</code> if no user is set. */
Returns the username for any user associated with the current RPC request or <code>null</code> if no user is set
getRequestUserName
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java", "license": "apache-2.0", "size": 3916 }
[ "org.apache.hadoop.hbase.security.User" ]
import org.apache.hadoop.hbase.security.User;
import org.apache.hadoop.hbase.security.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,638,588
public Object get(int index, Scriptable start) { Object ret_val = NOT_FOUND; if(index >= 0 && index < length.intValue()) ret_val = routes[index]; return ret_val; }
Object function(int index, Scriptable start) { Object ret_val = NOT_FOUND; if(index >= 0 && index < length.intValue()) ret_val = routes[index]; return ret_val; }
/** * Get the value of the named function. If no function object is * registex for this name, the method will return null. * * @param name The index into the array * @param start The object where the lookup began * @return the corresponding function object or null */
Get the value of the named function. If no function object is registex for this name, the method will return null
get
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/web3d/vrml/scripting/ecmascript/x3d/RouteArray.java", "license": "gpl-2.0", "size": 3101 }
[ "org.mozilla.javascript.Scriptable" ]
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
890,634
public static <V, T extends Throwable> hudson.remoting.Callable<V, T> wrapWithLock(hudson.remoting.Callable<V, T> callable) { final Jenkins jenkins = Jenkins.getInstanceOrNull(); // TODO confirm safe to assume non-null and use getInstance() final Queue queue = jenkins == null ? null : jenkin...
static <V, T extends Throwable> hudson.remoting.Callable<V, T> function(hudson.remoting.Callable<V, T> callable) { final Jenkins jenkins = Jenkins.getInstanceOrNull(); final Queue queue = jenkins == null ? null : jenkins.getQueue(); return queue == null ? callable : new LockedHRCallable<>(callable); }
/** * Wraps a {@link hudson.remoting.Callable} with the {@link Queue} lock held. * * @param callable the operation to wrap. * @since 1.618 */
Wraps a <code>hudson.remoting.Callable</code> with the <code>Queue</code> lock held
wrapWithLock
{ "repo_name": "stephenc/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 116868 }
[ "java.util.concurrent.Callable" ]
import java.util.concurrent.Callable;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
974,078
public void testDoesNotRetainToArray() { String[] strings = { "a", "b", "c" }; List<String> asList = Arrays.asList(strings); assertEquals(String[].class, asList.toArray().getClass()); CopyOnWriteArrayList<Object> objects = new CopyOnWriteArrayList<Object>(asList); objects.add...
void function() { String[] strings = { "a", "b", "c" }; List<String> asList = Arrays.asList(strings); assertEquals(String[].class, asList.toArray().getClass()); CopyOnWriteArrayList<Object> objects = new CopyOnWriteArrayList<Object>(asList); objects.add(Boolean.TRUE); }
/** * Test that we don't retain the array returned by toArray() on the copy * constructor. That array may not be of the required type! */
Test that we don't retain the array returned by toArray() on the copy constructor. That array may not be of the required type
testDoesNotRetainToArray
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "luni/src/test/java/libcore/java/util/concurrent/CopyOnWriteArrayListTest.java", "license": "gpl-2.0", "size": 16476 }
[ "java.util.Arrays", "java.util.List", "java.util.concurrent.CopyOnWriteArrayList" ]
import java.util.Arrays; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
256,112
//----------------------------------------------------------------------- public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>natur...
static <O extends Comparable<? super O>> List<O> function(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); }
/** * Merges two sorted Collections, a and b, into a single, sorted List * such that the natural ordering of the elements is retained. * <p> * Uses the standard O(n) merge algorithm for combining two sorted lists. * * @param <O> the element type * @param a the first collection, must...
Merges two sorted Collections, a and b, into a single, sorted List such that the natural ordering of the elements is retained. Uses the standard O(n) merge algorithm for combining two sorted lists
collate
{ "repo_name": "gonmarques/commons-collections", "path": "src/main/java/org/apache/commons/collections4/CollectionUtils.java", "license": "apache-2.0", "size": 92921 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,546,402
private void nothingToDisplay(@Nullable Revision revision) { displayCommitA(revision); displayCommitB(null); view.setCompareType(constant.historyNothingToDisplay()); view.setDiffContext(""); }
void function(@Nullable Revision revision) { displayCommitA(revision); displayCommitB(null); view.setCompareType(constant.historyNothingToDisplay()); view.setDiffContext(""); }
/** * Clear the comparance result, when there is nothing to compare. * * @param revision */
Clear the comparance result, when there is nothing to compare
nothingToDisplay
{ "repo_name": "riuvshin/che-plugins", "path": "plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/history/HistoryPresenter.java", "license": "epl-1.0", "size": 17291 }
[ "org.eclipse.che.api.git.shared.Revision", "org.eclipse.che.commons.annotation.Nullable" ]
import org.eclipse.che.api.git.shared.Revision; import org.eclipse.che.commons.annotation.Nullable;
import org.eclipse.che.api.git.shared.*; import org.eclipse.che.commons.annotation.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,647,412
public Action getAction(String key) throws MissingListenerException { return (Action)listeners.get(key); } ////////////////////////////////////////////////////////////////////////// // Action implementation //////////////////////////////////////////////////////////////////////////
Action function(String key) throws MissingListenerException { return (Action)listeners.get(key); }
/** * Returns the action associated with the given string * or null on error * @param key the key mapped with the action to get * @throws MissingListenerException if the action is not found */
Returns the action associated with the given string or null on error
getAction
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/apps/svgbrowser/FindDialog.java", "license": "apache-2.0", "size": 13831 }
[ "javax.swing.Action", "org.apache.batik.util.gui.resource.MissingListenerException" ]
import javax.swing.Action; import org.apache.batik.util.gui.resource.MissingListenerException;
import javax.swing.*; import org.apache.batik.util.gui.resource.*;
[ "javax.swing", "org.apache.batik" ]
javax.swing; org.apache.batik;
720,999
public VpnServerConfigurationInner withVpnClientRevokedCertificates( List<VpnServerConfigVpnClientRevokedCertificate> vpnClientRevokedCertificates) { this.vpnClientRevokedCertificates = vpnClientRevokedCertificates; return this; }
VpnServerConfigurationInner function( List<VpnServerConfigVpnClientRevokedCertificate> vpnClientRevokedCertificates) { this.vpnClientRevokedCertificates = vpnClientRevokedCertificates; return this; }
/** * Set the vpnClientRevokedCertificates property: VPN client revoked certificate of VpnServerConfiguration. * * @param vpnClientRevokedCertificates the vpnClientRevokedCertificates value to set. * @return the VpnServerConfigurationInner object itself. */
Set the vpnClientRevokedCertificates property: VPN client revoked certificate of VpnServerConfiguration
withVpnClientRevokedCertificates
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/VpnServerConfigurationInner.java", "license": "mit", "size": 17216 }
[ "com.azure.resourcemanager.network.models.VpnServerConfigVpnClientRevokedCertificate", "java.util.List" ]
import com.azure.resourcemanager.network.models.VpnServerConfigVpnClientRevokedCertificate; import java.util.List;
import com.azure.resourcemanager.network.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
885,247
private static Course makeCourse(final Record rec) { return new Course( rec.getValue(Courses.COURSES.COURSE_ID), rec.getValue(Courses.COURSES.NAME), rec.getValue(Courses.COURSES.DESCRIPTION) ); }
static Course function(final Record rec) { return new Course( rec.getValue(Courses.COURSES.COURSE_ID), rec.getValue(Courses.COURSES.NAME), rec.getValue(Courses.COURSES.DESCRIPTION) ); }
/** * Makes Course. * * @param rec Record * @return Course */
Makes Course
makeCourse
{ "repo_name": "Vovas11/courses", "path": "src/main/java/com/devproserv/courses/model/NestCourses.java", "license": "mit", "size": 4046 }
[ "com.devproserv.courses.jooq.tables.Courses", "org.jooq.Record" ]
import com.devproserv.courses.jooq.tables.Courses; import org.jooq.Record;
import com.devproserv.courses.jooq.tables.*; import org.jooq.*;
[ "com.devproserv.courses", "org.jooq" ]
com.devproserv.courses; org.jooq;
907,586
private void bindExistingChildrenAddAndRemoveButtons() { categoryTagPresenter .bindPossibleChildrenListButtonClicks( new GetExistingCollectionCallback<RESTTagInCategoryV1, RESTTagInCategoryCollectionV1, RESTTagInCategoryCollectionItemV1>() {
void function() { categoryTagPresenter .bindPossibleChildrenListButtonClicks( new GetExistingCollectionCallback<RESTTagInCategoryV1, RESTTagInCategoryCollectionV1, RESTTagInCategoryCollectionItemV1>() {
/** * Bind the logic to add and remove possible children. */
Bind the logic to add and remove possible children
bindExistingChildrenAddAndRemoveButtons
{ "repo_name": "pressgang-ccms/PressGangCCMSUI", "path": "src/main/java/org/jboss/pressgang/ccms/ui/client/local/mvp/presenter/category/CategoriesFilteredResultsAndDetailsPresenter.java", "license": "gpl-3.0", "size": 30967 }
[ "org.jboss.pressgang.ccms.rest.v1.collections.items.join.RESTTagInCategoryCollectionItemV1", "org.jboss.pressgang.ccms.rest.v1.collections.join.RESTTagInCategoryCollectionV1", "org.jboss.pressgang.ccms.rest.v1.entities.join.RESTTagInCategoryV1", "org.jboss.pressgang.ccms.ui.client.local.mvp.presenter.base.chi...
import org.jboss.pressgang.ccms.rest.v1.collections.items.join.RESTTagInCategoryCollectionItemV1; import org.jboss.pressgang.ccms.rest.v1.collections.join.RESTTagInCategoryCollectionV1; import org.jboss.pressgang.ccms.rest.v1.entities.join.RESTTagInCategoryV1; import org.jboss.pressgang.ccms.ui.client.local.mvp.present...
import org.jboss.pressgang.ccms.rest.v1.collections.items.join.*; import org.jboss.pressgang.ccms.rest.v1.collections.join.*; import org.jboss.pressgang.ccms.rest.v1.entities.join.*; import org.jboss.pressgang.ccms.ui.client.local.mvp.presenter.base.children.*;
[ "org.jboss.pressgang" ]
org.jboss.pressgang;
1,688,982
protected void initResources() throws IOException, ServletException { if ((pathnames == null) || (pathnames.length() <= 0)) { return; } StringTokenizer st = new StringTokenizer(pathnames, RESOURCE_DELIM); List urlList = new ArrayList(); try { ...
void function() throws IOException, ServletException { if ((pathnames == null) (pathnames.length() <= 0)) { return; } StringTokenizer st = new StringTokenizer(pathnames, RESOURCE_DELIM); List urlList = new ArrayList(); try { while (st.hasMoreTokens()) { String validatorRules = st.nextToken().trim(); if (log.isInfoEnabl...
/** * Initialize the validator resources for this module. * * @throws IOException if an input/output error is encountered * @throws ServletException if we cannot initialize these resources */
Initialize the validator resources for this module
initResources
{ "repo_name": "davcamer/clients", "path": "projects-for-testing/struts/core/src/main/java/org/apache/struts/validator/ValidatorPlugIn.java", "license": "apache-2.0", "size": 8546 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.StringTokenizer", "javax.servlet.ServletException", "org.apache.commons.validator.ValidatorResources", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import javax.servlet.ServletException; import org.apache.commons.validator.ValidatorResources; import org.xml.sax.SAXException;
import java.io.*; import java.util.*; import javax.servlet.*; import org.apache.commons.validator.*; import org.xml.sax.*;
[ "java.io", "java.util", "javax.servlet", "org.apache.commons", "org.xml.sax" ]
java.io; java.util; javax.servlet; org.apache.commons; org.xml.sax;
2,118,174
char getChar(final String token) { Preconditions.checkNotNull(token); final Character character = tokenMap.get(token); Preconditions.checkNotNull(character); return character.charValue(); }
char getChar(final String token) { Preconditions.checkNotNull(token); final Character character = tokenMap.get(token); Preconditions.checkNotNull(character); return character.charValue(); }
/** * Look up the character used to represent the transition or state denoted by * the given token. * * @param token the transition or state to look up * @return the character used to represent that transition or state */
Look up the character used to represent the transition or state denoted by the given token
getChar
{ "repo_name": "pwong-mapr/incubator-drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/compile/FsmDescriptor.java", "license": "apache-2.0", "size": 5709 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,348,170
@VisibleForTesting static void scrapeNodes( NodeList nodes, String stringsFilePath, Map<String, NativeResourceInfo> nativeStrings, Map<String, Integer> resourceNameToIdMap) { for (int i = 0; i < nodes.getLength(); ++i) { Node node = nodes.item(i); String resourceName = node.g...
static void scrapeNodes( NodeList nodes, String stringsFilePath, Map<String, NativeResourceInfo> nativeStrings, Map<String, Integer> resourceNameToIdMap) { for (int i = 0; i < nodes.getLength(); ++i) { Node node = nodes.item(i); String resourceName = node.getAttributes().getNamedItem("name").getNodeValue(); if (!resour...
/** * Scrapes string resource names and values from the list of xml nodes passed and populates {@code * stringsMap}, ignoring resource names that are already present in the map. * * @param nodes A list of XML nodes. * @param nativeStrings Collection of native strings, only new ones will be added to it. ...
Scrapes string resource names and values from the list of xml nodes passed and populates stringsMap, ignoring resource names that are already present in the map
scrapeNodes
{ "repo_name": "marcinkwiatkowski/buck", "path": "src/com/facebook/buck/android/GenStringSourceMapStep.java", "license": "apache-2.0", "size": 8751 }
[ "com.google.common.base.Preconditions", "java.util.Map", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import com.google.common.base.Preconditions; import java.util.Map; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import com.google.common.base.*; import java.util.*; import org.w3c.dom.*;
[ "com.google.common", "java.util", "org.w3c.dom" ]
com.google.common; java.util; org.w3c.dom;
2,715,868
public void setColumnName(int columnIndex, String theColumnName) throws SQLException;
void function(int columnIndex, String theColumnName) throws SQLException;
/** * Sets the column name for a specified column in the {@code RowSet}. * * @param columnIndex * the index number for the column; the first column's index is * 1. * @param theColumnName * the column's label. * @throws SQLException * ...
Sets the column name for a specified column in the RowSet
setColumnName
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/javax/sql/RowSetMetaData.java", "license": "apache-2.0", "size": 11018 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,747,525
private void writeWavHeader(File fileToConvert) throws IOException { long mySubChunk1Size = 16; int myBitsPerSample = 16; int myFormat = 1; long myChannels = iSampleDimension; long mySampleRate = iSampleRate; long myByteRate = mySampleRate * myChannels * myBitsPer...
void function(File fileToConvert) throws IOException { long mySubChunk1Size = 16; int myBitsPerSample = 16; int myFormat = 1; long myChannels = iSampleDimension; long mySampleRate = iSampleRate; long myByteRate = mySampleRate * myChannels * myBitsPerSample / 8; int myBlockAlign = (int) (myChannels * myBitsPerSample / 8...
/** * Writes a PCM Wav header at the start of the provided file * code taken from : http://stackoverflow.com/questions/9179536/writing-pcm-recorded-data-into-a-wav-file-java-android * by: Oliver Mahoney, Oak Bytes * @param fileToConvert File */
Writes a PCM Wav header at the start of the provided file code taken from : HREF by: Oliver Mahoney, Oak Bytes
writeWavHeader
{ "repo_name": "toni1991/ssj", "path": "libssj/src/main/java/hcm/ssj/audio/WavWriter.java", "license": "gpl-3.0", "size": 13779 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.DataOutputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
511,618
@Override public String toString() { if (schema == null) { return metadata.toString(); } final StringBuilder b = new StringBuilder(); b.append(schema.toString()); b.append("\n"); b.append("numRows : " + numRows + "\n"); fixedSizeData.position(0); for (int rowId = 0; rowId < nu...
String function() { if (schema == null) { return metadata.toString(); } final StringBuilder b = new StringBuilder(); b.append(schema.toString()); b.append("\n"); b.append(STR + numRows + "\n"); fixedSizeData.position(0); for (int rowId = 0; rowId < numRows; rowId++) { for (int colId = 0; colId < numCols; colId++) { fin...
/** * To string representation of datatable, contains the content of fixed data * size buffer */
To string representation of datatable, contains the content of fixed data size buffer
toString
{ "repo_name": "tkao1000/pinot", "path": "pinot-common/src/main/java/com/linkedin/pinot/common/utils/DataTable.java", "license": "apache-2.0", "size": 22029 }
[ "com.linkedin.pinot.common.data.FieldSpec" ]
import com.linkedin.pinot.common.data.FieldSpec;
import com.linkedin.pinot.common.data.*;
[ "com.linkedin.pinot" ]
com.linkedin.pinot;
1,313,639
@JdkConstants.InputEventMask public int getModifiers() { return myModifiers; }
@JdkConstants.InputEventMask int function() { return myModifiers; }
/** * Returns the modifier keys held down during this action event. * @return the modifier keys. */
Returns the modifier keys held down during this action event
getModifiers
{ "repo_name": "android-ia/platform_tools_idea", "path": "platform/platform-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java", "license": "apache-2.0", "size": 6021 }
[ "org.intellij.lang.annotations.JdkConstants" ]
import org.intellij.lang.annotations.JdkConstants;
import org.intellij.lang.annotations.*;
[ "org.intellij.lang" ]
org.intellij.lang;
433,954
public static void setUrlDrawable(final ImageView imageView, final String url, final Drawable defaultDrawable, final long cacheDurationMs, final UrlImageViewCallback callback) { setUrlDrawable(imageView.getContext(), imageView, url, defaultDrawable, cacheDurationMs, callback); }
static void function(final ImageView imageView, final String url, final Drawable defaultDrawable, final long cacheDurationMs, final UrlImageViewCallback callback) { setUrlDrawable(imageView.getContext(), imageView, url, defaultDrawable, cacheDurationMs, callback); }
/** * Download and shrink an Image located at a specified URL, and display it * in the provided {@link ImageView}. * * @param imageView The {@link ImageView} to display the image to after it * is loaded. * @param url The URL of the image that should be loaded. * @param defa...
Download and shrink an Image located at a specified URL, and display it in the provided <code>ImageView</code>
setUrlDrawable
{ "repo_name": "Shaojia/ZHCarPocket", "path": "MaintainService/src/com/coortouch/android/urlimagehelper/UrlImageViewHelper.java", "license": "mit", "size": 35580 }
[ "android.graphics.drawable.Drawable", "android.widget.ImageView" ]
import android.graphics.drawable.Drawable; import android.widget.ImageView;
import android.graphics.drawable.*; import android.widget.*;
[ "android.graphics", "android.widget" ]
android.graphics; android.widget;
2,533,672
List<Type> parquetFields = new ArrayList<Type>(); for (HAWQField hawqField : hawqSchema.getFields()) { parquetFields.add(convertField(hawqField.asPrimitive())); } return new MessageType(hawqSchema.getName(), parquetFields); }
List<Type> parquetFields = new ArrayList<Type>(); for (HAWQField hawqField : hawqSchema.getFields()) { parquetFields.add(convertField(hawqField.asPrimitive())); } return new MessageType(hawqSchema.getName(), parquetFields); }
/** * Convert from HAWQ schema to Parquet schema. * * @param hawqSchema schema to be converted. * @return corresponding Parquet schema. */
Convert from HAWQ schema to Parquet schema
convertToParquet
{ "repo_name": "hornn/interviews", "path": "contrib/hawq-hadoop/hawq-mapreduce-parquet/src/main/java/com/pivotal/hawq/mapreduce/parquet/util/HAWQSchemaConverter.java", "license": "apache-2.0", "size": 2724 }
[ "com.pivotal.hawq.mapreduce.schema.HAWQField", "java.util.ArrayList", "java.util.List" ]
import com.pivotal.hawq.mapreduce.schema.HAWQField; import java.util.ArrayList; import java.util.List;
import com.pivotal.hawq.mapreduce.schema.*; import java.util.*;
[ "com.pivotal.hawq", "java.util" ]
com.pivotal.hawq; java.util;
201,078
@HippoEssentialsGenerated(internalName = "hippoonspringboot:source") public String getSource() { return getProperty(SOURCE); }
@HippoEssentialsGenerated(internalName = STR) String function() { return getProperty(SOURCE); }
/** * Get the source of the document. * * @return the source */
Get the source of the document
getSource
{ "repo_name": "woonsanko/hippo-on-spring-boot", "path": "site/components/src/main/java/com/github/woonsanko/examples/hippoboot/beans/NewsDocument.java", "license": "apache-2.0", "size": 3876 }
[ "org.onehippo.cms7.essentials.dashboard.annotations.HippoEssentialsGenerated" ]
import org.onehippo.cms7.essentials.dashboard.annotations.HippoEssentialsGenerated;
import org.onehippo.cms7.essentials.dashboard.annotations.*;
[ "org.onehippo.cms7" ]
org.onehippo.cms7;
2,287,866
public void startElement (String uri, String localName, String qName, Attributes atts) throws SAXException { stateStack.push(SEEN_ELEMENT); state = SEEN_NOTHING; if (depth > 0) { super.characters("\n"); } doIndent(); ...
void function (String uri, String localName, String qName, Attributes atts) throws SAXException { stateStack.push(SEEN_ELEMENT); state = SEEN_NOTHING; if (depth > 0) { super.characters("\n"); } doIndent(); super.startElement(uri, localName, qName, atts); depth++; }
/** * Write a start tag. * * <p>Each tag will begin on a new line, and will be * indented by the current indent step times the number * of ancestors that the element has.</p> * * <p>The newline and indentation will be passed on down * the filter chain through regular characters e...
Write a start tag. Each tag will begin on a new line, and will be indented by the current indent step times the number of ancestors that the element has. The newline and indentation will be passed on down the filter chain through regular characters events
startElement
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/xml/internal/bind/marshaller/DataWriter.java", "license": "gpl-2.0", "size": 12086 }
[ "org.xml.sax.Attributes", "org.xml.sax.SAXException" ]
import org.xml.sax.Attributes; import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,608,584
@Nonnull public DeviceComplianceScheduledActionForRuleRequestBuilder scheduledActionsForRule(@Nonnull final String id) { return new DeviceComplianceScheduledActionForRuleRequestBuilder(getRequestUrlWithAdditionalSegment("scheduledActionsForRule") + "/" + id, getClient(), null); }
DeviceComplianceScheduledActionForRuleRequestBuilder function(@Nonnull final String id) { return new DeviceComplianceScheduledActionForRuleRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id, getClient(), null); }
/** * Gets a request builder for the DeviceComplianceScheduledActionForRule item * * @return the request builder * @param id the item identifier */
Gets a request builder for the DeviceComplianceScheduledActionForRule item
scheduledActionsForRule
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/AndroidWorkProfileCompliancePolicyRequestBuilder.java", "license": "mit", "size": 8997 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,199,778
@Test public void chmodRecursively() throws IOException, AlluxioException { clearLoginUser(); FileSystemTestUtils.createByteFile(mFileSystem, "/testDir/testFile", WriteType.MUST_CACHE, 10); mFsShell.run("chmod", "-R", "777", "/testDir"); int permission = mFileSystem.getStatus(new AlluxioURI("/testDi...
void function() throws IOException, AlluxioException { clearLoginUser(); FileSystemTestUtils.createByteFile(mFileSystem, STR, WriteType.MUST_CACHE, 10); mFsShell.run("chmod", "-R", "777", STR); int permission = mFileSystem.getStatus(new AlluxioURI(STR)).getMode(); Assert.assertEquals((short) 0777, permission); permissi...
/** * Tests -R option for chmod recursively. */
Tests -R option for chmod recursively
chmodRecursively
{ "repo_name": "yuluo-ding/alluxio", "path": "tests/src/test/java/alluxio/shell/command/ChmodCommandTest.java", "license": "apache-2.0", "size": 2812 }
[ "java.io.IOException", "org.junit.Assert" ]
import java.io.IOException; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
836,738
public String toString() { String EOL = System.getProperty("line.separator"); String r = "[" + EOL; Iterator<OpenERPRecord> i = records.iterator(); while (i.hasNext()) { OpenERPRecord n = i.next(); r += " " + n.toString() + EOL; } r += "]" + EOL; return r; }
String function() { String EOL = System.getProperty(STR); String r = "[" + EOL; Iterator<OpenERPRecord> i = records.iterator(); while (i.hasNext()) { OpenERPRecord n = i.next(); r += " " + n.toString() + EOL; } r += "]" + EOL; return r; }
/** * get string representation */
get string representation
toString
{ "repo_name": "rgv151/Paracel-POS", "path": "src/com/bremskerl/de/interfaces/openerp/OpenERPRecordSet.java", "license": "gpl-3.0", "size": 12514 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
835,821
public void setP2(Vector p2) { this.p2 = p2; }
void function(Vector p2) { this.p2 = p2; }
/** * Setter for point 2. * Is used to move the line with the mouse * * @param p2 the new point */
Setter for point 2. Is used to move the line with the mouse
setP2
{ "repo_name": "hneemann/Digital", "path": "src/main/java/de/neemann/digital/draw/elements/Wire.java", "license": "gpl-3.0", "size": 11822 }
[ "de.neemann.digital.draw.graphics.Vector" ]
import de.neemann.digital.draw.graphics.Vector;
import de.neemann.digital.draw.graphics.*;
[ "de.neemann.digital" ]
de.neemann.digital;
163,663
public static List<Method> findMethodsWithAnnotation(Class<?> type, Class<? extends Annotation> annotationType) { return findMethodsWithAnnotation(type, annotationType, false); }
static List<Method> function(Class<?> type, Class<? extends Annotation> annotationType) { return findMethodsWithAnnotation(type, annotationType, false); }
/** * Returns a list of methods which are annotated with the given annotation * * @param type the type to reflect on * @param annotationType the annotation type * @return a list of the methods found */
Returns a list of methods which are annotated with the given annotation
findMethodsWithAnnotation
{ "repo_name": "ramonmaruko/camel", "path": "camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java", "license": "apache-2.0", "size": 66337 }
[ "java.lang.annotation.Annotation", "java.lang.reflect.Method", "java.util.List" ]
import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.List;
import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
503,322
public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) { LOG.d(TAG, "showWebPage(%s, %b, %b, HashMap", url, openExternal, clearHistory); // If clearing history if (clearHistory) { this.getNavigationHistory().clear(); ...
void function(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) { LOG.d(TAG, STR, url, openExternal, clearHistory); if (clearHistory) { this.getNavigationHistory().clear(); } if (!openExternal) { if (url.startsWith(STRshowWebPage: Cannot load URL into webview since it is not in whi...
/** * Load the specified URL in the Cordova webview or a new browser instance. * * NOTE: If openExternal is false, only URLs listed in whitelist can be loaded. * * @param url The url to load. * @param openExternal Load url in browser instead of Cordova webview. * @param cle...
Load the specified URL in the Cordova webview or a new browser instance
showWebPage
{ "repo_name": "Diaosir/WeX5", "path": "Native/templates/advanced/platforms/android/CordovaLib-crosswalk/src/org/apache/cordova/CordovaWebView.java", "license": "apache-2.0", "size": 31583 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
465,200
public static Pair<Integer> findLenient(String content, String text, int start) { // Note: these edits do not change the offsets content = StrUtils.normalise(content, KErrorPolicy.RETURN_NULL); text = StrUtils.normalise(text, KErrorPolicy.RETURN_NULL); content = content.toLowerCase(); text = text.toLowe...
static Pair<Integer> function(String content, String text, int start) { content = StrUtils.normalise(content, KErrorPolicy.RETURN_NULL); text = StrUtils.normalise(text, KErrorPolicy.RETURN_NULL); content = content.toLowerCase(); text = text.toLowerCase(); String regex = content.replace("\\STR\\\\"); String SPECIAL = ST...
/** * Find the position of content within text -- ignoring whitespace and * unicode issues. * * @param content * @param text * @param start * Go from here. 0 is the normal value. * @return [start, end) position, or null if not found */
Find the position of content within text -- ignoring whitespace and unicode issues
findLenient
{ "repo_name": "sodash/open-code", "path": "winterwell.utils/src/com/winterwell/utils/StrUtils.java", "license": "mit", "size": 51954 }
[ "com.winterwell.utils.containers.Pair", "com.winterwell.utils.log.KErrorPolicy", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import com.winterwell.utils.containers.Pair; import com.winterwell.utils.log.KErrorPolicy; import java.util.regex.Matcher; import java.util.regex.Pattern;
import com.winterwell.utils.containers.*; import com.winterwell.utils.log.*; import java.util.regex.*;
[ "com.winterwell.utils", "java.util" ]
com.winterwell.utils; java.util;
116,460
public Set<UserParticipant> joinRoom(String userName, String roomName, boolean dataChannels, boolean webParticipant, KurentoClientSessionInfo kcSessionInfo, String participantId) throws RoomException { log.debug("Request [JOIN_ROOM] user={}, room={}, web={} " + "kcSessionInfo.room={} ({})", us...
Set<UserParticipant> function(String userName, String roomName, boolean dataChannels, boolean webParticipant, KurentoClientSessionInfo kcSessionInfo, String participantId) throws RoomException { log.debug(STR + STR, userName, roomName, webParticipant, kcSessionInfo != null ? kcSessionInfo.getRoomName() : null, particip...
/** * Represents a client's request to join a room. The room must exist in order to perform the * join.<br/> * <strong>Dev advice:</strong> Send notifications to the existing participants in the room to * inform about the new peer. * * @param userName name or identifier of the user in the room. ...
Represents a client's request to join a room. The room must exist in order to perform the join. Dev advice: Send notifications to the existing participants in the room to inform about the new peer
joinRoom
{ "repo_name": "AntimatterResearch/kurento-room", "path": "kurento-room-sdk/src/main/java/org/kurento/room/RoomManager.java", "license": "apache-2.0", "size": 40413 }
[ "java.util.Set", "org.kurento.room.api.KurentoClientSessionInfo", "org.kurento.room.api.pojo.UserParticipant", "org.kurento.room.exception.RoomException", "org.kurento.room.internal.Room" ]
import java.util.Set; import org.kurento.room.api.KurentoClientSessionInfo; import org.kurento.room.api.pojo.UserParticipant; import org.kurento.room.exception.RoomException; import org.kurento.room.internal.Room;
import java.util.*; import org.kurento.room.api.*; import org.kurento.room.api.pojo.*; import org.kurento.room.exception.*; import org.kurento.room.internal.*;
[ "java.util", "org.kurento.room" ]
java.util; org.kurento.room;
1,897,252
public static SABRInterestRateParameters createSABR1RhoBumped(final double shift) { return createSABR1RhoBumped(new SABRHaganVolatilityFunction(), shift); }
static SABRInterestRateParameters function(final double shift) { return createSABR1RhoBumped(new SABRHaganVolatilityFunction(), shift); }
/** * Create a set of SABR parameter surface (linearly interpolated) with Hagan volatility function. Alpha data is bumped by a given shift with respect to SABR1. * @param shift The shift. * @return The SABR parameters parameters. */
Create a set of SABR parameter surface (linearly interpolated) with Hagan volatility function. Alpha data is bumped by a given shift with respect to SABR1
createSABR1RhoBumped
{ "repo_name": "DevStreet/FinanceAnalytics", "path": "projects/OG-Analytics/src/test/java/com/opengamma/analytics/financial/interestrate/TestsDataSetsSABR.java", "license": "apache-2.0", "size": 31233 }
[ "com.opengamma.analytics.financial.model.option.definition.SABRInterestRateParameters", "com.opengamma.analytics.financial.model.volatility.smile.function.SABRHaganVolatilityFunction" ]
import com.opengamma.analytics.financial.model.option.definition.SABRInterestRateParameters; import com.opengamma.analytics.financial.model.volatility.smile.function.SABRHaganVolatilityFunction;
import com.opengamma.analytics.financial.model.option.definition.*; import com.opengamma.analytics.financial.model.volatility.smile.function.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
2,761,170
protected boolean checkLiteral(String literal) throws IOException { int length = literal.length(); for (int i = 0; i < length; i += 1) { if (this.readChar() != literal.charAt(i)) { return false; } } return true; }
boolean function(String literal) throws IOException { int length = literal.length(); for (int i = 0; i < length; i += 1) { if (this.readChar() != literal.charAt(i)) { return false; } } return true; }
/** * Scans the data for literal text. * <p> * Scanning stops when a character does not match or after the complete * text has been checked, whichever comes first. * * @param literal the literal to check. * * <dl><dt><b>Preconditions:</b></dt><dd> * <ul><li>{@code literal !=...
Scans the data for literal text. Scanning stops when a character does not match or after the complete text has been checked, whichever comes first
checkLiteral
{ "repo_name": "GITNE/icedtea-web", "path": "netx/net/sourceforge/nanoxml/XMLElement.java", "license": "gpl-2.0", "size": 43465 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,056,668
@Override public Class<Patient> getResourceType() { return Patient.class; }
Class<Patient> function() { return Patient.class; }
/** * The getResourceType method comes from IResourceProvider, and must be overridden to indicate what type of resource this provider supplies. */
The getResourceType method comes from IResourceProvider, and must be overridden to indicate what type of resource this provider supplies
getResourceType
{ "repo_name": "dhf0820/hapi-fhir-1.2", "path": "restful-server-example/src/main/java/ca/uhn/example/provider/PatientResourceProvider.java", "license": "apache-2.0", "size": 9466 }
[ "ca.uhn.fhir.model.dstu2.resource.Patient" ]
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.resource.*;
[ "ca.uhn.fhir" ]
ca.uhn.fhir;
2,533,369
@Test public void testCreate() throws SQLException { DataColumnConstraintsUtils.testCreate(geoPackage); }
void function() throws SQLException { DataColumnConstraintsUtils.testCreate(geoPackage); }
/** * Test creating * * @throws SQLException */
Test creating
testCreate
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/androidTest/java/mil/nga/geopackage/schema/constraints/DataColumnConstraintsImportTest.java", "license": "mit", "size": 1092 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,220,248
public Map<String, String> getCommands() { return descs; }
Map<String, String> function() { return descs; }
/** * Get a list of command descriptions. This is only for root commands. * * @return a map of commands */
Get a list of command descriptions. This is only for root commands
getCommands
{ "repo_name": "RainbowKiwiFOX/WorldEditRus", "path": "worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/CommandsManager.java", "license": "gpl-3.0", "size": 21704 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,371,937
public Object draw(Graphics2D g2, Rectangle2D area, Object params) { Rectangle2D target = (Rectangle2D) area.clone(); target = trimMargin(target); if (this.backgroundPaint != null) { g2.setPaint(this.backgroundPaint); g2.fill(target); } BlockFra...
Object function(Graphics2D g2, Rectangle2D area, Object params) { Rectangle2D target = (Rectangle2D) area.clone(); target = trimMargin(target); if (this.backgroundPaint != null) { g2.setPaint(this.backgroundPaint); g2.fill(target); } BlockFrame border = getFrame(); border.draw(g2, target); border.getInsets().trim(targe...
/** * Draws the block within the specified area. * * @param g2 the graphics device. * @param area the area. * @param params ignored (<code>null</code> permitted). * * @return An {@link org.jfree.chart.block.EntityBlockResult} or * <code>null</code>. */
Draws the block within the specified area
draw
{ "repo_name": "integrated/jfreechart", "path": "source/org/jfree/chart/title/LegendTitle.java", "license": "lgpl-2.1", "size": 21435 }
[ "java.awt.Graphics2D", "java.awt.geom.Rectangle2D", "org.jfree.chart.block.BlockContainer", "org.jfree.chart.block.BlockFrame" ]
import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.block.BlockContainer; import org.jfree.chart.block.BlockFrame;
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.block.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,676,254
public Builder putAllExtraParam(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; }
Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; }
/** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original * map. See {@link TokenCreateParams.Person.AddressKanji#extraParams} for the field * documentation. ...
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>TokenCreateParams.Person.AddressKanji#extraParams</code> for the field documentation
putAllExtraParam
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/TokenCreateParams.java", "license": "mit", "size": 191322 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
987,522
@Test public void testSwitchDetailSelectionListener() { testExecutionDialog.createDialogArea(shell); Composite composite = new Composite(shell, SWT.NORMAL); composite.setLayout(new GridLayout()); testExecutionDialog.createButtonsForButtonBar(composite); Point originalSize = shell.getSize(); SelectionLis...
void function() { testExecutionDialog.createDialogArea(shell); Composite composite = new Composite(shell, SWT.NORMAL); composite.setLayout(new GridLayout()); testExecutionDialog.createButtonsForButtonBar(composite); Point originalSize = shell.getSize(); SelectionListener listener = testExecutionDialog.getSwitchDetailSe...
/** * Test the detail switcher selection listener. * */
Test the detail switcher selection listener
testSwitchDetailSelectionListener
{ "repo_name": "franzbecker/test-editor", "path": "ui/org.testeditor.ui.test/src/org/testeditor/ui/reporting/TestExecutionProgressDialogTest.java", "license": "epl-1.0", "size": 4255 }
[ "org.eclipse.swt.events.SelectionListener", "org.eclipse.swt.graphics.Point", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Composite", "org.junit.Assert" ]
import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.junit.Assert;
import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.junit.*;
[ "org.eclipse.swt", "org.junit" ]
org.eclipse.swt; org.junit;
1,119,153
public static Object max(Comparable c1, Comparable c2) { if (c1 != null && c2 != null) { return c1.compareTo(c2) >= 0 ? c1 : c2; } else { return c1 != null ? c1 : c2; } } // Null //-----------------------------------------------------------------...
static Object function(Comparable c1, Comparable c2) { if (c1 != null && c2 != null) { return c1.compareTo(c2) >= 0 ? c1 : c2; } else { return c1 != null ? c1 : c2; } } public static class Null implements Serializable { private static final long serialVersionUID = 7092611880189329093L; Null() { super(); }
/** * Null safe comparison of Comparables. * * @param c1 the first comparable, may be null * @param c2 the second comparable, may be null * @return * <ul> * <li>If both objects are non-null and unequal, the greater object. * <li>If both objects are non-null and eq...
Null safe comparison of Comparables
max
{ "repo_name": "glorycloud/GloryMail", "path": "CloudyMail/lib_src/org/apache/commons/lang/ObjectUtils.java", "license": "apache-2.0", "size": 13724 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,468,633
default void preTruncateTable(final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws IOException {}
default void preTruncateTable(final ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName) throws IOException {}
/** * Called before {@link org.apache.hadoop.hbase.master.HMaster} truncates a * table. Called as part of truncate table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table */
Called before <code>org.apache.hadoop.hbase.master.HMaster</code> truncates a table. Called as part of truncate table RPC call
preTruncateTable
{ "repo_name": "apurtell/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/MasterObserver.java", "license": "apache-2.0", "size": 74501 }
[ "java.io.IOException", "org.apache.hadoop.hbase.TableName" ]
import java.io.IOException; import org.apache.hadoop.hbase.TableName;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
923,020
private void initAWSAuthConnection(final String host, final String user, final String pass) { // Default to isSecure=true m_authConn = new AWSAuthConnection(user, pass, true, host); }
void function(final String host, final String user, final String pass) { m_authConn = new AWSAuthConnection(user, pass, true, host); }
/** * Initialize the Amazon S3 connection. * * @param host * the S3 host * @param user * the Amazon Access Key ID * @param pass * the Amazon Secret Access Key */
Initialize the Amazon S3 connection
initAWSAuthConnection
{ "repo_name": "treeder/jsh3ll", "path": "src/com/silvasoftinc/jsh3ll/jSh3ll.java", "license": "mit", "size": 63494 }
[ "com.amazon.s3.AWSAuthConnection" ]
import com.amazon.s3.AWSAuthConnection;
import com.amazon.s3.*;
[ "com.amazon.s3" ]
com.amazon.s3;
409,531
public boolean isControllerLeft(int controller) { if (controller >= getControllerCount()) { return false; } if (controller == ANY_CONTROLLER) { for (int i=0;i<controllers.size();i++) { if (isControllerLeft(i)) { return true; } } return false; } return ((Controller) contro...
boolean function(int controller) { if (controller >= getControllerCount()) { return false; } if (controller == ANY_CONTROLLER) { for (int i=0;i<controllers.size();i++) { if (isControllerLeft(i)) { return true; } } return false; } return ((Controller) controllers.get(controller)).getXAxisValue() < -0.5f ((Controller) co...
/** * Check if the controller has the left direction pressed * * @param controller The index of the controller to check * @return True if the controller is pressed to the left */
Check if the controller has the left direction pressed
isControllerLeft
{ "repo_name": "ScottSWu/opsu", "path": "src/org/newdawn/slick/Input.java", "license": "gpl-3.0", "size": 45136 }
[ "org.lwjgl.input.Controller" ]
import org.lwjgl.input.Controller;
import org.lwjgl.input.*;
[ "org.lwjgl.input" ]
org.lwjgl.input;
1,437,583
String getShapeID(Shape shape, Stroke stroke){ float[] bounds = shape.getBounds2D(); float x = bounds[0]; float y = bounds[1]; StringBuilder sb = new StringBuilder(); PathIterator it = shape.getPathIterator(); float[] buf = new float[6]; ...
String getShapeID(Shape shape, Stroke stroke){ float[] bounds = shape.getBounds2D(); float x = bounds[0]; float y = bounds[1]; StringBuilder sb = new StringBuilder(); PathIterator it = shape.getPathIterator(); float[] buf = new float[6]; float tx, ty, tx2, ty2, tx3, ty3; if ( stroke != null ){ sb.append(stroke.hashCode...
/** * Generates a key to be used in the texture map for a given shape/stroke. * Shapes that are identical but just translated will have identical keys. * The bounds will be adjusted as part of the {@link #get} method. * @param shape The shape for which to retrieve the mask. ...
Generates a key to be used in the texture map for a given shape/stroke. Shapes that are identical but just translated will have identical keys. The bounds will be adjusted as part of the <code>#get</code> method
getShapeID
{ "repo_name": "Firethunder/CodenameOne", "path": "Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java", "license": "gpl-2.0", "size": 293693 }
[ "com.codename1.ui.Stroke", "com.codename1.ui.geom.PathIterator", "com.codename1.ui.geom.Shape" ]
import com.codename1.ui.Stroke; import com.codename1.ui.geom.PathIterator; import com.codename1.ui.geom.Shape;
import com.codename1.ui.*; import com.codename1.ui.geom.*;
[ "com.codename1.ui" ]
com.codename1.ui;
2,501,584
public String getIsimIst() { try { IPhoneSubInfo info = getSubscriberInfo(); if (info == null) return null; return info.getIsimIst(); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { //...
String function() { try { IPhoneSubInfo info = getSubscriberInfo(); if (info == null) return null; return info.getIsimIst(); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) { return null; } }
/** * Returns the IMS Service Table (IST) that was loaded from the ISIM. * @return IMS Service Table or null if not present or not loaded * @hide */
Returns the IMS Service Table (IST) that was loaded from the ISIM
getIsimIst
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/telephony/TelephonyManager.java", "license": "gpl-3.0", "size": 165169 }
[ "android.os.RemoteException", "com.android.internal.telephony.IPhoneSubInfo" ]
import android.os.RemoteException; import com.android.internal.telephony.IPhoneSubInfo;
import android.os.*; import com.android.internal.telephony.*;
[ "android.os", "com.android.internal" ]
android.os; com.android.internal;
228,145
private static void addAPIDocuments(String pathToArchive, API importedApi, APIProvider apiProvider) { String jsonContent = null; String pathToYamlFile = pathToArchive + APIImportExportConstants.YAML_DOCUMENT_FILE_LOCATION; String pathToJsonFile = pathToArchive + APIImportExportConstants.JSO...
static void function(String pathToArchive, API importedApi, APIProvider apiProvider) { String jsonContent = null; String pathToYamlFile = pathToArchive + APIImportExportConstants.YAML_DOCUMENT_FILE_LOCATION; String pathToJsonFile = pathToArchive + APIImportExportConstants.JSON_DOCUMENT_FILE_LOCATION; APIIdentifier apiI...
/** * This method adds the documents to the imported API. * * @param pathToArchive location of the extracted folder of the API * @param importedApi the imported API object */
This method adds the documents to the imported API
addAPIDocuments
{ "repo_name": "harsha89/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/importexport/utils/APIImportUtil.java", "license": "apache-2.0", "size": 55735 }
[ "com.google.gson.Gson", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "org.apache.commons.io.FileUtils", "org.apache.commons.io.FilenameUtils", "org.apache.commons.io.IOUtils", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbo...
import com.google.gson.Gson; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.wso2.carbon.apimgt.api.APIManagementExc...
import com.google.gson.*; import java.io.*; import org.apache.commons.io.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.importexport.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "com.google.gson", "java.io", "org.apache.commons", "org.wso2.carbon" ]
com.google.gson; java.io; org.apache.commons; org.wso2.carbon;
984,167
public static Font getFont(String name, int size, int style, boolean strikeout, boolean underline) { String fontName = name + '|' + size + '|' + style + '|' + strikeout + '|' + underline; Font font = m_fontMap.get(fontName); if (font == null) { FontData fontData = new FontData(name, size, style); if (str...
static Font function(String name, int size, int style, boolean strikeout, boolean underline) { String fontName = name + ' ' + size + ' ' + style + ' ' + strikeout + ' ' + underline; Font font = m_fontMap.get(fontName); if (font == null) { FontData fontData = new FontData(name, size, style); if (strikeout underline) { t...
/** * Returns a {@link Font} based on its name, height and style. Windows-specific strikeout and underline * flags are also supported. * * @param name * the name of the font * @param size * the size of the font * @param style * the style of the font * @param strikeo...
Returns a <code>Font</code> based on its name, height and style. Windows-specific strikeout and underline flags are also supported
getFont
{ "repo_name": "capitalone/Hydrograph", "path": "hydrograph.ui/hydrograph.ui.common/src/main/java/hydrograph/ui/common/util/SWTResourceManager.java", "license": "apache-2.0", "size": 15614 }
[ "org.eclipse.swt.graphics.Font", "org.eclipse.swt.graphics.FontData", "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,132,636
protected synchronized void addStackIndex(final int index) { if (stackIndexes == null) { stackIndexes = new int[] { index }; } else { int count = stackIndexes.length; stackIndexes = Arrays.copyOf(stackIndexes, count + 1); stackIndexes[count] = index; } }
synchronized void function(final int index) { if (stackIndexes == null) { stackIndexes = new int[] { index }; } else { int count = stackIndexes.length; stackIndexes = Arrays.copyOf(stackIndexes, count + 1); stackIndexes[count] = index; } }
/** * Called by the RootProcedureState on procedure execution. * Each procedure store its stack-index positions. */
Called by the RootProcedureState on procedure execution. Each procedure store its stack-index positions
addStackIndex
{ "repo_name": "mahak/hbase", "path": "hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java", "license": "apache-2.0", "size": 40672 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,603,430
int insert(Branch record);
int insert(Branch record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table p_branch * * @mbg.generated Tue Jun 13 20:24:59 CST 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table p_branch
insert
{ "repo_name": "freeman0432/ssmfw", "path": "src/main/java/com/freeman/project/sm/dao/BranchMapper.java", "license": "apache-2.0", "size": 3779 }
[ "com.freeman.project.sm.po.Branch" ]
import com.freeman.project.sm.po.Branch;
import com.freeman.project.sm.po.*;
[ "com.freeman.project" ]
com.freeman.project;
72,309
@GET @Path("delta/ports") @Produces(MediaType.APPLICATION_JSON) public Response getPortDeltaStatistics() { final DeviceService service = get(DeviceService.class); final Iterable<Device> devices = service.getDevices(); final ObjectNode root = mapper().createObjectNode(); f...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) Response function() { final DeviceService service = get(DeviceService.class); final Iterable<Device> devices = service.getDevices(); final ObjectNode root = mapper().createObjectNode(); final ArrayNode rootArrayNode = root.putArray(STR); for (final Device device : device...
/** * Gets port delta statistics of all devices. * @onos.rsModel StatisticsPorts * @return 200 OK with JSON encoded array of port delta statistics */
Gets port delta statistics of all devices
getPortDeltaStatistics
{ "repo_name": "kuujo/onos", "path": "web/api/src/main/java/org/onosproject/rest/resources/StatisticsWebResource.java", "license": "apache-2.0", "size": 15107 }
[ "com.fasterxml.jackson.databind.node.ArrayNode", "com.fasterxml.jackson.databind.node.ObjectNode", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onosproject.net.Device", "org.onosproject.net.device.DeviceService", "org.onosproject.net.dev...
import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.net.Device; import org.onosproject.net.device.DeviceService; impo...
import com.fasterxml.jackson.databind.node.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.net.*; import org.onosproject.net.device.*;
[ "com.fasterxml.jackson", "javax.ws", "org.onosproject.net" ]
com.fasterxml.jackson; javax.ws; org.onosproject.net;
2,732,351
@Override public void register(final Identifier id, final InetSocketAddress addr) throws Exception { // needed to keep threads from reading the wrong response // TODO: better fix matches replies to threads with a map after REEF-198 synchronized (this) { LOG.log(Level.FINE, "Register {0} : {1}", ...
void function(final Identifier id, final InetSocketAddress addr) throws Exception { synchronized (this) { LOG.log(Level.FINE, STR, new Object[]{id, addr}); final Link<NamingMessage> link = this.transport.open( this.serverSocketAddr, this.codec, new LoggingLinkListener<NamingMessage>()); link.write(new NamingRegisterReq...
/** * Registers an (identifier, address) mapping. * * @param id an identifier * @param addr an Internet socket address */
Registers an (identifier, address) mapping
register
{ "repo_name": "taegeonum/incubator-reef", "path": "lang/java/reef-io/src/main/java/org/apache/reef/io/network/naming/NameRegistryClient.java", "license": "apache-2.0", "size": 8087 }
[ "java.net.InetSocketAddress", "java.util.concurrent.TimeUnit", "java.util.logging.Level", "org.apache.reef.io.network.naming.exception.NamingException", "org.apache.reef.io.network.naming.serialization.NamingMessage", "org.apache.reef.io.network.naming.serialization.NamingRegisterRequest", "org.apache.r...
import java.net.InetSocketAddress; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import org.apache.reef.io.network.naming.exception.NamingException; import org.apache.reef.io.network.naming.serialization.NamingMessage; import org.apache.reef.io.network.naming.serialization.NamingRegisterRequest;...
import java.net.*; import java.util.concurrent.*; import java.util.logging.*; import org.apache.reef.io.network.naming.exception.*; import org.apache.reef.io.network.naming.serialization.*; import org.apache.reef.wake.*; import org.apache.reef.wake.remote.transport.*; import org.apache.reef.wake.remote.transport.netty....
[ "java.net", "java.util", "org.apache.reef" ]
java.net; java.util; org.apache.reef;
564,630
public static void putText(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType, boolean bottomLeftOrigin) { putText_0(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineTyp...
static void function(Mat img, String text, Point org, int fontFace, double fontScale, Scalar color, int thickness, int lineType, boolean bottomLeftOrigin) { putText_0(img.nativeObj, text, org.x, org.y, fontFace, fontScale, color.val[0], color.val[1], color.val[2], color.val[3], thickness, lineType, bottomLeftOrigin); r...
/** * <p>Draws a text string.</p> * * <p>The function <code>putText</code> renders the specified text string in the * image. * Symbols that cannot be rendered using the specified font are replaced by * question marks. See "getTextSize" for a text rendering code example.</p> * * @param img Image. * @param text ...
Draws a text string. The function <code>putText</code> renders the specified text string in the image. Symbols that cannot be rendered using the specified font are replaced by question marks. See "getTextSize" for a text rendering code example
putText
{ "repo_name": "jitendraAndroid/signatureAuth", "path": "openCVLibrary24131/src/main/java/org/opencv/core/Core.java", "license": "gpl-3.0", "size": 337963 }
[ "java.lang.String" ]
import java.lang.String;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,337,286
@Test(timeout = 10000) public void pickResultTest() { click(getNotNullClickPoint()); PickResult pr = click(getNullClickPoint()); Assert.assertNull("MouseEvent save last result", pr.getIntersectedNode()); }
@Test(timeout = 10000) void function() { click(getNotNullClickPoint()); PickResult pr = click(getNullClickPoint()); Assert.assertNull(STR, pr.getIntersectedNode()); }
/** * Test check that PickResult not save last result. */
Test check that PickResult not save last result
pickResultTest
{ "repo_name": "teamfx/openjfx-8u-dev-tests", "path": "functional/3DTests/test/test/scenegraph/fx3d/picking/PickingTestOverall.java", "license": "gpl-2.0", "size": 6819 }
[ "junit.framework.Assert", "org.junit.Test" ]
import junit.framework.Assert; import org.junit.Test;
import junit.framework.*; import org.junit.*;
[ "junit.framework", "org.junit" ]
junit.framework; org.junit;
2,812,062
protected void cascadeAfterSave(EventSource source, EntityPersister persister, Object entity, Object anything) throws HibernateException { }
void function(EventSource source, EntityPersister persister, Object entity, Object anything) throws HibernateException { }
/** * Cascade behavior is redefined by this subclass, disable superclass behavior */
Cascade behavior is redefined by this subclass, disable superclass behavior
cascadeAfterSave
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java", "license": "epl-1.0", "size": 24779 }
[ "org.hibernate.HibernateException", "org.hibernate.event.EventSource", "org.hibernate.persister.entity.EntityPersister" ]
import org.hibernate.HibernateException; import org.hibernate.event.EventSource; import org.hibernate.persister.entity.EntityPersister;
import org.hibernate.*; import org.hibernate.event.*; import org.hibernate.persister.entity.*;
[ "org.hibernate", "org.hibernate.event", "org.hibernate.persister" ]
org.hibernate; org.hibernate.event; org.hibernate.persister;
1,700,923
public ArrayList<Menu> getMenus() { menus = new ArrayList<Menu>(); try { //Get the menus ids this.finderService = new MenuFinderService(); MenuFinder finderPort = finderService.getMenuFinderPort(); List<XMLGregorianCalendar> menusIds = finderPort.getA...
ArrayList<Menu> function() { menus = new ArrayList<Menu>(); try { this.finderService = new MenuFinderService(); MenuFinder finderPort = finderService.getMenuFinderPort(); List<XMLGregorianCalendar> menusIds = finderPort.getAllMenuReferences(); this.crudService = new MenuCRUDService(); MenuCRUD crudPort = crudService.ge...
/** * Get the menus * @return a list of the menus */
Get the menus
getMenus
{ "repo_name": "malaverdiere/jseduite", "path": "hci/WebAdmin/src/java/webadmin/menus/MenuManagedBean.java", "license": "lgpl-3.0", "size": 13374 }
[ "fr.unice.i3s.modalis.jseduite.technical.restaurant.Menu", "fr.unice.i3s.modalis.jseduite.technical.restaurant.MenuCRUD", "fr.unice.i3s.modalis.jseduite.technical.restaurant.MenuCRUDService", "fr.unice.i3s.modalis.jseduite.technical.restaurant.MenuFinder", "fr.unice.i3s.modalis.jseduite.technical.restaurant...
import fr.unice.i3s.modalis.jseduite.technical.restaurant.Menu; import fr.unice.i3s.modalis.jseduite.technical.restaurant.MenuCRUD; import fr.unice.i3s.modalis.jseduite.technical.restaurant.MenuCRUDService; import fr.unice.i3s.modalis.jseduite.technical.restaurant.MenuFinder; import fr.unice.i3s.modalis.jseduite.techni...
import fr.unice.i3s.modalis.jseduite.technical.restaurant.*; import java.util.*; import javax.xml.datatype.*;
[ "fr.unice.i3s", "java.util", "javax.xml" ]
fr.unice.i3s; java.util; javax.xml;
170,495
void setWidows( String value ) throws SemanticException;
void setWidows( String value ) throws SemanticException;
/** * Sets the widows property. A 'widow' occurs when the last line of a * multi-line paragraph appears on its own at the top of a page due to a * page break. The input value is either an integer as as string or one of * constants defined in <code>DesignChoiceConstants</code>: * <ul> * <li><code>WIDOWS_INHE...
Sets the widows property. A 'widow' occurs when the last line of a multi-line paragraph appears on its own at the top of a page due to a page break. The input value is either an integer as as string or one of constants defined in <code>DesignChoiceConstants</code>: <code>WIDOWS_INHERIT</code>
setWidows
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/simpleapi/IStyle.java", "license": "epl-1.0", "size": 39595 }
[ "org.eclipse.birt.report.model.api.activity.SemanticException" ]
import org.eclipse.birt.report.model.api.activity.SemanticException;
import org.eclipse.birt.report.model.api.activity.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,948,526
Map<String, Long> tableCounts = managementService.getTableCount(); CloseableHttpResponse response = executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLES_COLLECTION)), HttpStatus.SC_OK); // Check table array JsonNode responseNode = objectMapper.r...
Map<String, Long> tableCounts = managementService.getTableCount(); CloseableHttpResponse response = executeRequest(new HttpGet(SERVER_URL_PREFIX + RestUrls.createRelativeResourceUrl(RestUrls.URL_TABLES_COLLECTION)), HttpStatus.SC_OK); JsonNode responseNode = objectMapper.readTree(response.getEntity().getContent()); clo...
/** * Test getting tables. GET management/tables */
Test getting tables. GET management/tables
testGetTables
{ "repo_name": "robsoncardosoti/flowable-engine", "path": "modules/flowable-rest/src/test/java/org/flowable/rest/service/api/management/TableResourceTest.java", "license": "apache-2.0", "size": 3049 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.node.ObjectNode", "java.util.Map", "org.apache.http.HttpStatus", "org.apache.http.client.methods.CloseableHttpResponse", "org.apache.http.client.methods.HttpGet", "org.flowable.rest.service.api.RestUrls" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import java.util.Map; import org.apache.http.HttpStatus; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.flowable.rest.service.api.RestUrls;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import java.util.*; import org.apache.http.*; import org.apache.http.client.methods.*; import org.flowable.rest.service.api.*;
[ "com.fasterxml.jackson", "java.util", "org.apache.http", "org.flowable.rest" ]
com.fasterxml.jackson; java.util; org.apache.http; org.flowable.rest;
1,725,489
@Override public void completeScope(StaticTypedScope<JSType> staticScope) { TypedScope scope = (TypedScope) staticScope; for (TypedVar var : scope.getVarIterable()) { if (var.isTypeInferred()) { JSType type = var.getType(); if (type == null || type.isUnknownType()) { JSType f...
void function(StaticTypedScope<JSType> staticScope) { TypedScope scope = (TypedScope) staticScope; for (TypedVar var : scope.getVarIterable()) { if (var.isTypeInferred()) { JSType type = var.getType(); if (type == null type.isUnknownType()) { JSType flowType = getSlot(var.getName()).getType(); var.setType(flowType); } ...
/** * Look through the given scope, and try to find slots where it doesn't * have enough type information. Then fill in that type information * with stuff that we've inferred in the local flow. */
Look through the given scope, and try to find slots where it doesn't have enough type information. Then fill in that type information with stuff that we've inferred in the local flow
completeScope
{ "repo_name": "Medium/closure-compiler", "path": "src/com/google/javascript/jscomp/LinkedFlowScope.java", "license": "apache-2.0", "size": 16821 }
[ "com.google.javascript.rhino.jstype.JSType", "com.google.javascript.rhino.jstype.StaticTypedScope" ]
import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.StaticTypedScope;
import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
127,940
public EList<TransformerTank> getTransformerTanks() { if (transformerTanks == null) { transformerTanks = new BasicInternalEList<TransformerTank>(TransformerTank.class); } return transformerTanks; }
EList<TransformerTank> function() { if (transformerTanks == null) { transformerTanks = new BasicInternalEList<TransformerTank>(TransformerTank.class); } return transformerTanks; }
/** * Returns the value of the '<em><b>Transformer Tanks</b></em>' reference list. * The list contents are of type {@link CIM15.IEC61970.Wires.TransformerTank}. * It is bidirectional and its opposite is '{@link CIM15.IEC61970.Wires.TransformerTank#getPowerTransformer <em>Power Transformer</em>}'. * <!-- begin-u...
Returns the value of the 'Transformer Tanks' reference list. The list contents are of type <code>CIM15.IEC61970.Wires.TransformerTank</code>. It is bidirectional and its opposite is '<code>CIM15.IEC61970.Wires.TransformerTank#getPowerTransformer Power Transformer</code>'. If the meaning of the 'Transformer Tanks' refer...
getTransformerTanks
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61970/Wires/PowerTransformer.java", "license": "apache-2.0", "size": 14397 }
[ "org.eclipse.emf.common.util.EList", "org.eclipse.emf.ecore.util.BasicInternalEList" ]
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.util.BasicInternalEList;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,871,538
@Override public boolean rowDeleted() throws SQLException { throw SQLError.createSQLFeatureNotSupportedException(); }
boolean function() throws SQLException { throw SQLError.createSQLFeatureNotSupportedException(); }
/** * JDBC 2.0 Determine if this row has been deleted. A deleted row may leave * a visible "hole" in a result set. This method can be used to detect holes * in a result set. The value returned depends on whether or not the result * set can detect deletions. * * @return true if deleted and...
JDBC 2.0 Determine if this row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not the result set can detect deletions
rowDeleted
{ "repo_name": "scopej/mysql-connector-j", "path": "src/com/mysql/jdbc/UpdatableResultSet.java", "license": "gpl-2.0", "size": 96615 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
13,417
private void applyConsistencyConstraints(List<PHYTree> trees) { //ArrayList<PHYTree> toBeRemoved = new ArrayList<PHYTree>(); for(int i = 0; i < trees.size(); i++) { if(!checkConsistencyConstraints(trees.get(i))) { //toBeRemoved.add(t); logger.info("Top tree " + i + " did not pass the QP consistency ch...
void function(List<PHYTree> trees) { for(int i = 0; i < trees.size(); i++) { if(!checkConsistencyConstraints(trees.get(i))) { logger.info(STR + i + STR); } } }
/** * Applies the global consistency constraints to all the spanning trees * and removes the trees that don't pass the constraints */
Applies the global consistency constraints to all the spanning trees and removes the trees that don't pass the constraints
applyConsistencyConstraints
{ "repo_name": "viq854/lichee", "path": "LICHeE/src/lineage/PHYNetwork.java", "license": "mit", "size": 26134 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
701,463
public void saveImage(String mimeType, Image image, OutputStream os) throws Exception { BufferedImage rendImage = null; // Create a BufferedImage if (image instanceof BufferedImage) { rendImage = (BufferedImage) image; } else { MediaTracker track...
void function(String mimeType, Image image, OutputStream os) throws Exception { BufferedImage rendImage = null; if (image instanceof BufferedImage) { rendImage = (BufferedImage) image; } else { MediaTracker tracker = new MediaTracker(this); tracker.addImage(image, 0); tracker.waitForAll(); rendImage = new BufferedImage...
/** * Save an image. * @param mimeType the mime-type of the format to save the image * @param image the image to save * @param os the stream to write to * @exception Exception if an error prevents image encoding */
Save an image
saveImage
{ "repo_name": "hugosato/apache-axis", "path": "src/org/apache/axis/components/image/JDK13IO.java", "license": "apache-2.0", "size": 2855 }
[ "java.awt.Graphics", "java.awt.Image", "java.awt.MediaTracker", "java.awt.image.BufferedImage", "java.io.IOException", "java.io.OutputStream", "org.apache.axis.utils.Messages" ]
import java.awt.Graphics; import java.awt.Image; import java.awt.MediaTracker; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import org.apache.axis.utils.Messages;
import java.awt.*; import java.awt.image.*; import java.io.*; import org.apache.axis.utils.*;
[ "java.awt", "java.io", "org.apache.axis" ]
java.awt; java.io; org.apache.axis;
1,911,551
@Test public void testHandle() throws Exception { LinkedBlockingQueue<Object> results = new LinkedBlockingQueue<Object>(); String currentThreadName = Thread.currentThread().getName(); AtomicInteger failureCount = new AtomicInteger(); BiFunction<Integer, Throwable, Integer> incre...
void function() throws Exception { LinkedBlockingQueue<Object> results = new LinkedBlockingQueue<Object>(); String currentThreadName = Thread.currentThread().getName(); AtomicInteger failureCount = new AtomicInteger(); BiFunction<Integer, Throwable, Integer> increment = (count, failure) -> { if (failure != null) count ...
/** * Verify the handle method and both forms of handleAsync. */
Verify the handle method and both forms of handleAsync
testHandle
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.concurrent.mp_fat/test-applications/MPConcurrentApp/src/concurrent/mp/fat/web/MPConcurrentTestServlet.java", "license": "epl-1.0", "size": 277091 }
[ "java.util.concurrent.CompletableFuture", "java.util.concurrent.CompletionException", "java.util.concurrent.ExecutionException", "java.util.concurrent.LinkedBlockingQueue", "java.util.concurrent.TimeUnit", "java.util.concurrent.atomic.AtomicInteger", "java.util.function.BiFunction", "javax.naming.Init...
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.ExecutionException; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiFunction; i...
import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.function.*; import javax.naming.*; import org.junit.*;
[ "java.util", "javax.naming", "org.junit" ]
java.util; javax.naming; org.junit;
2,023,528
private void openUploadWithFiles(JavaScriptObject files) { JsArray<CmsFileInfo> cmsFiles = files.cast(); List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>(); for (int i = 0; i < cmsFiles.length(); ++i) { fileObjects.add(cmsFiles.get(i)); } CmsDialogUploa...
void function(JavaScriptObject files) { JsArray<CmsFileInfo> cmsFiles = files.cast(); List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>(); for (int i = 0; i < cmsFiles.length(); ++i) { fileObjects.add(cmsFiles.get(i)); } CmsDialogUploadButtonHandler buttonHandler = new CmsDialogUploadButtonHandler( new Supplie...
/** * Opens the upload dialog with the given file references to upload.<p> * * @param files the file references */
Opens the upload dialog with the given file references to upload
openUploadWithFiles
{ "repo_name": "gallardo/opencms-core", "path": "src-gwt/org/opencms/ui/client/CmsUploadAreaConnector.java", "license": "lgpl-2.1", "size": 7026 }
[ "com.google.common.base.Supplier", "com.google.gwt.core.client.JavaScriptObject", "com.google.gwt.core.client.JsArray", "java.util.ArrayList", "java.util.List", "org.opencms.ade.upload.client.ui.CmsDialogUploadButtonHandler", "org.opencms.gwt.client.ui.input.upload.CmsFileInfo" ]
import com.google.common.base.Supplier; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.JsArray; import java.util.ArrayList; import java.util.List; import org.opencms.ade.upload.client.ui.CmsDialogUploadButtonHandler; import org.opencms.gwt.client.ui.input.upload.CmsFileInfo;
import com.google.common.base.*; import com.google.gwt.core.client.*; import java.util.*; import org.opencms.ade.upload.client.ui.*; import org.opencms.gwt.client.ui.input.upload.*;
[ "com.google.common", "com.google.gwt", "java.util", "org.opencms.ade", "org.opencms.gwt" ]
com.google.common; com.google.gwt; java.util; org.opencms.ade; org.opencms.gwt;
2,245,950
public static void putOpenIdLocalUserId(final RequestContext context, final String user) { if (StringUtils.isBlank(user)) { context.getFlowScope().remove("openIdLocalId"); } else { context.getFlowScope().put("openIdLocalId", user); } }
static void function(final RequestContext context, final String user) { if (StringUtils.isBlank(user)) { context.getFlowScope().remove(STR); } else { context.getFlowScope().put(STR, user); } }
/** * Put open id local user id. * * @param context the context * @param user the user */
Put open id local user id
putOpenIdLocalUserId
{ "repo_name": "fogbeam/cas_mirror", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 67337 }
[ "org.apache.commons.lang3.StringUtils", "org.springframework.webflow.execution.RequestContext" ]
import org.apache.commons.lang3.StringUtils; import org.springframework.webflow.execution.RequestContext;
import org.apache.commons.lang3.*; import org.springframework.webflow.execution.*;
[ "org.apache.commons", "org.springframework.webflow" ]
org.apache.commons; org.springframework.webflow;
825,899
public static List<ClientProtocol> getProxiesForAllNameNodesInNameservice( Configuration conf, String nsId) throws IOException { Map<String, InetSocketAddress> nnAddresses = DFSUtil.getRpcAddressesForNameserviceId(conf, nsId, null); List<ClientProtocol> namenodes = new ArrayList<ClientProto...
static List<ClientProtocol> function( Configuration conf, String nsId) throws IOException { Map<String, InetSocketAddress> nnAddresses = DFSUtil.getRpcAddressesForNameserviceId(conf, nsId, null); List<ClientProtocol> namenodes = new ArrayList<ClientProtocol>(); for (InetSocketAddress nnAddress : nnAddresses.values()) {...
/** * Get an RPC proxy for each NN in an HA nameservice. Used when a given RPC * call should be made on every NN in an HA nameservice, not just the active. * * @param conf configuration * @param nsId the nameservice to get all of the proxies for. * @return a list of RPC proxies for each NN in the nam...
Get an RPC proxy for each NN in an HA nameservice. Used when a given RPC call should be made on every NN in an HA nameservice, not just the active
getProxiesForAllNameNodesInNameservice
{ "repo_name": "yelshater/hadoop-2.3.0", "path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/HAUtil.java", "license": "apache-2.0", "size": 13897 }
[ "java.io.IOException", "java.net.InetSocketAddress", "java.util.ArrayList", "java.util.List", "java.util.Map", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.protocol.ClientProtocol", "org.apache.hadoop.security.UserGroupInformation" ]
import java.io.IOException; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.protocol.ClientProtocol; import org.apache.hadoop.security.UserGroupInformation;
import java.io.*; import java.net.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.security.*;
[ "java.io", "java.net", "java.util", "org.apache.hadoop" ]
java.io; java.net; java.util; org.apache.hadoop;
1,122,223
public ResourceLocalService getResourceLocalService() { return resourceLocalService; }
ResourceLocalService function() { return resourceLocalService; }
/** * Returns the resource local service. * * @return the resource local service */
Returns the resource local service
getResourceLocalService
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-guiadiscussao-portlet/src/main/java/br/gov/camara/edemocracia/portlets/guiadiscussao/service/base/ConfiguracaoLocalServiceBaseImpl.java", "license": "lgpl-2.1", "size": 21581 }
[ "com.liferay.portal.service.ResourceLocalService" ]
import com.liferay.portal.service.ResourceLocalService;
import com.liferay.portal.service.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,078,561
public void handleUpdateLayout(ReactShadowNode node) { if (!ENABLED) { mUIViewOperationQueue.enqueueUpdateLayout( Assertions.assertNotNull(node.getParent()).getReactTag(), node.getReactTag(), node.getScreenX(), node.getScreenY(), node.getScreenWidth(), ...
void function(ReactShadowNode node) { if (!ENABLED) { mUIViewOperationQueue.enqueueUpdateLayout( Assertions.assertNotNull(node.getParent()).getReactTag(), node.getReactTag(), node.getScreenX(), node.getScreenY(), node.getScreenWidth(), node.getScreenHeight()); return; } applyLayoutBase(node); }
/** * Handles an updateLayout call. All updateLayout calls are collected and dispatched at the end * of a batch because updateLayout calls to layout-only nodes can necessitate multiple * updateLayout calls for all its children. */
Handles an updateLayout call. All updateLayout calls are collected and dispatched at the end of a batch because updateLayout calls to layout-only nodes can necessitate multiple updateLayout calls for all its children
handleUpdateLayout
{ "repo_name": "dggriffin/react-native-mariomakely", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyOptimizer.java", "license": "mit", "size": 16374 }
[ "com.facebook.infer.annotation.Assertions" ]
import com.facebook.infer.annotation.Assertions;
import com.facebook.infer.annotation.*;
[ "com.facebook.infer" ]
com.facebook.infer;
2,317,770
public boolean convert(KanjiInput input, Writer output) throws IOException { int ch = input.get(); if (ch < 0) { return false; } Character.UnicodeBlock pblock = Character.UnicodeBlock.of((char)ch); while (true) { input.consume(1); o...
boolean function(KanjiInput input, Writer output) throws IOException { int ch = input.get(); if (ch < 0) { return false; } Character.UnicodeBlock pblock = Character.UnicodeBlock.of((char)ch); while (true) { input.consume(1); output.write((char)ch); ch = input.get(); if (ch < 0) { break; } Character.UnicodeBlock block; ...
/** * Converts the string form the specified input object * and output the result to the specified writer. * * @param input the input object. * @param output the output writer object. * @return false if no character is converted, otherwise true. * @exception IOException if an I/O...
Converts the string form the specified input object and output the result to the specified writer
convert
{ "repo_name": "rrobek/JapanMapTranslate", "path": "src/kanaconv/DefaultConverter.java", "license": "gpl-2.0", "size": 2577 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,424,806
public static IDialogSettings getDialogBoundSettings(final Class<?> clazz) { return getDialogSettings(clazz.getName() + ".dialogBounds"); //$NON-NLS-1$ }
static IDialogSettings function(final Class<?> clazz) { return getDialogSettings(clazz.getName() + STR); }
/** * Get dialog bound settings for given class using standard section name * * @param clazz * @return dialog setting */
Get dialog bound settings for given class using standard section name
getDialogBoundSettings
{ "repo_name": "chalstrick/egit", "path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIUtils.java", "license": "epl-1.0", "size": 18937 }
[ "org.eclipse.jface.dialogs.IDialogSettings" ]
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
144,518
protected void paintSome(Graphics2D g2d, int pageNum) { //Paint a bounding box g2d.drawRect(0, 0, 400, 200); //A few rectangles rotated and with different color Graphics2D copy = (Graphics2D)g2d.create(); int c = 12; for (int i = 0; i < c; i++) { float f ...
void function(Graphics2D g2d, int pageNum) { g2d.drawRect(0, 0, 400, 200); Graphics2D copy = (Graphics2D)g2d.create(); int c = 12; for (int i = 0; i < c; i++) { float f = ((i + 1) / (float)c); Color col = new Color(0.0f, 1 - f, 0.0f); copy.setColor(col); copy.fillRect(70, 90, 50, 50); copy.rotate(-2 * Math.PI / (double...
/** * Paints a few things on a Graphics2D instance. * @param g2d the Graphics2D instance * @param pageNum a page number */
Paints a few things on a Graphics2D instance
paintSome
{ "repo_name": "apache/xml-graphics-commons", "path": "examples/java/image/writer/ImageWriterExample1.java", "license": "apache-2.0", "size": 5319 }
[ "java.awt.Color", "java.awt.Font", "java.awt.Graphics2D", "java.awt.font.TextAttribute", "java.text.AttributedString" ]
import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.font.TextAttribute; import java.text.AttributedString;
import java.awt.*; import java.awt.font.*; import java.text.*;
[ "java.awt", "java.text" ]
java.awt; java.text;
1,543,867
public void dto2Components() throws Throwable { wnfVersteckterAufschlag.setDouble(tpAuftrag.getAuftragDto() .getFVersteckterAufschlag()); wnfAllgemeinerRabatt.setDouble(tpAuftrag.getAuftragDto() .getFAllgemeinerRabattsatz()); wnfProjektierungsrabatt.setDouble(tpAuftrag.getAuftragDto() .getFProjekti...
void function() throws Throwable { wnfVersteckterAufschlag.setDouble(tpAuftrag.getAuftragDto() .getFVersteckterAufschlag()); wnfAllgemeinerRabatt.setDouble(tpAuftrag.getAuftragDto() .getFAllgemeinerRabattsatz()); wnfProjektierungsrabatt.setDouble(tpAuftrag.getAuftragDto() .getFProjektierungsrabattsatz()); wtfLieferarto...
/** * Einen existierenden Lieferschein zur Anzeige bringen. * * @throws Throwable */
Einen existierenden Lieferschein zur Anzeige bringen
dto2Components
{ "repo_name": "erdincay/lpclientpc", "path": "src/com/lp/client/auftrag/PanelAuftragKonditionen2.java", "license": "agpl-3.0", "size": 34321 }
[ "com.lp.client.frame.delegate.DelegateFactory", "com.lp.server.auftrag.service.AuftragServiceFac", "com.lp.server.auftrag.service.AuftragbegruendungDto", "java.math.BigDecimal" ]
import com.lp.client.frame.delegate.DelegateFactory; import com.lp.server.auftrag.service.AuftragServiceFac; import com.lp.server.auftrag.service.AuftragbegruendungDto; import java.math.BigDecimal;
import com.lp.client.frame.delegate.*; import com.lp.server.auftrag.service.*; import java.math.*;
[ "com.lp.client", "com.lp.server", "java.math" ]
com.lp.client; com.lp.server; java.math;
1,793,186
public CSVRegistryEntryProvider<Entry> getProvider( String name ) { final CSVRegistryEntryProvider<Entry> provider = providerRegistry.get( name ); if( provider == null ) throw new CSVConfigurationException( "There is no provider registred with name " + name ); ...
CSVRegistryEntryProvider<Entry> function( String name ) { final CSVRegistryEntryProvider<Entry> provider = providerRegistry.get( name ); if( provider == null ) throw new CSVConfigurationException( STR + name ); return provider; }
/** * Returns the provider associated to the given key * if any, otherwise returns {@code null}. * * @param name name to use to reference the provider. * @return the provider associated to the given key. */
Returns the provider associated to the given key if any, otherwise returns null
getProvider
{ "repo_name": "nerd4j/nerd4j-csv", "path": "src/main/java/org/nerd4j/csv/registry/CSVAbstractRegistry.java", "license": "lgpl-3.0", "size": 5754 }
[ "org.nerd4j.csv.exception.CSVConfigurationException" ]
import org.nerd4j.csv.exception.CSVConfigurationException;
import org.nerd4j.csv.exception.*;
[ "org.nerd4j.csv" ]
org.nerd4j.csv;
2,679,762
public Locale getLocale() { UI currentUI = UI.getCurrent(); Locale locale = (currentUI == null ? null : currentUI.getLocale()); if (locale == null) { locale = Locale.getDefault(); } return locale; }
Locale function() { UI currentUI = UI.getCurrent(); Locale locale = (currentUI == null ? null : currentUI.getLocale()); if (locale == null) { locale = Locale.getDefault(); } return locale; }
/** * Gets the locale of the current Vaadin UI. If the locale can not be determinted, the default locale * is returned instead. * * @return the current locale, never {@code null}. * @see com.vaadin.ui.UI#getLocale() * @see java.util.Locale#getDefault() */
Gets the locale of the current Vaadin UI. If the locale can not be determinted, the default locale is returned instead
getLocale
{ "repo_name": "GJRTimmer/vaadin4spring", "path": "addons/i18n/src/main/java/org/vaadin/spring/i18n/I18N.java", "license": "apache-2.0", "size": 6668 }
[ "com.vaadin.ui.UI", "java.util.Locale" ]
import com.vaadin.ui.UI; import java.util.Locale;
import com.vaadin.ui.*; import java.util.*;
[ "com.vaadin.ui", "java.util" ]
com.vaadin.ui; java.util;
170,664
@Test public void readXML() throws Exception { File xmlCollectionConfig = getSourceFile(); assertTrue(XmlDataCollectionConfig.XML_DATACOLLECTION_CONFIG_FILE + " is readable", xmlCollectionConfig.canRead()); XmlDataCollectionConfig exampleXmldcc = JaxbUtils.unmarshal(XmlDataCollectionCon...
void function() throws Exception { File xmlCollectionConfig = getSourceFile(); assertTrue(XmlDataCollectionConfig.XML_DATACOLLECTION_CONFIG_FILE + STR, xmlCollectionConfig.canRead()); XmlDataCollectionConfig exampleXmldcc = JaxbUtils.unmarshal(XmlDataCollectionConfig.class, xmlCollectionConfig); assertTrue(STR, xmldcc....
/** * Read XML. * * @throws Exception the exception */
Read XML
readXML
{ "repo_name": "qoswork/opennmszh", "path": "protocols/xml/src/test/java/org/opennms/protocols/xml/config/XmlDataCollectionConfigTest.java", "license": "gpl-2.0", "size": 9402 }
[ "java.io.File", "org.junit.Assert", "org.opennms.core.xml.JaxbUtils" ]
import java.io.File; import org.junit.Assert; import org.opennms.core.xml.JaxbUtils;
import java.io.*; import org.junit.*; import org.opennms.core.xml.*;
[ "java.io", "org.junit", "org.opennms.core" ]
java.io; org.junit; org.opennms.core;
1,618,082
@FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.EncodedIssuer) public byte[] getEncodedIssuer() { return getSafeInstrument().getEncodedIssuer(); }
@FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.EncodedIssuer) byte[] function() { return getSafeInstrument().getEncodedIssuer(); }
/** * Message field getter. * @return field value */
Message field getter
getEncodedIssuer
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/DontKnowTradeMsg.java", "license": "gpl-3.0", "size": 48781 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,086,087
public double totalCount() { if (!dirty) { return cacheTotal; } double total = 0.0; for (Map.Entry<E, Double> entry : entries.entrySet()) { total += entry.getValue(); } cacheTotal = total; dirty = false; return total; }
double function() { if (!dirty) { return cacheTotal; } double total = 0.0; for (Map.Entry<E, Double> entry : entries.entrySet()) { total += entry.getValue(); } cacheTotal = total; dirty = false; return total; }
/** * Finds the total of all counts in the counter. This implementation * iterates through the entire counter every time this method is called. * * @return the counter's total */
Finds the total of all counts in the counter. This implementation iterates through the entire counter every time this method is called
totalCount
{ "repo_name": "tberg12/murphy", "path": "src/tberg/murphy/counter/Counter.java", "license": "apache-2.0", "size": 15303 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,857,209
private void addCreatedBarriers () { myCreatedTempBarriers = new JScrollPane(myScrollPanel); myCreatedTempBarriers.getViewport().setOpaque(false); myCreatedTempBarriers.setOpaque(false); myCreatedTempBarriers.setPreferredSize(PANEL_DIMENSION); myCreatedTempBarriers.setBorder(...
void function () { myCreatedTempBarriers = new JScrollPane(myScrollPanel); myCreatedTempBarriers.getViewport().setOpaque(false); myCreatedTempBarriers.setOpaque(false); myCreatedTempBarriers.setPreferredSize(PANEL_DIMENSION); myCreatedTempBarriers.setBorder(BorderFactory .createTitledBorder(StyleConstants.DEFAULT_PANEL...
/** * Adds ScrollPanel to display created barriers */
Adds ScrollPanel to display created barriers
addCreatedBarriers
{ "repo_name": "myhgew/JGame_oogasalad", "path": "src/gameAuthoring/view/TempBarrierDesignTab.java", "license": "mit", "size": 11934 }
[ "javax.swing.BorderFactory", "javax.swing.JScrollPane", "javax.swing.border.TitledBorder" ]
import javax.swing.BorderFactory; import javax.swing.JScrollPane; import javax.swing.border.TitledBorder;
import javax.swing.*; import javax.swing.border.*;
[ "javax.swing" ]
javax.swing;
728,272
public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException { throw new IOException("Har: completeLocalOutput not allowed"); }
void function(Path fsOutputFile, Path tmpLocalFile) throws IOException { throw new IOException(STR); }
/** * not implemented. */
not implemented
completeLocalOutput
{ "repo_name": "hanhlh/hadoop-0.20.2_FatBTree", "path": "src/core/org/apache/hadoop/fs/HarFileSystem.java", "license": "apache-2.0", "size": 28247 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,686,345
private void init(File UtFile, File SFile, File rowFile, File colFile, File dfFile, int dim, boolean rescaleIdf, boolean normalize) throws IOException { this.dim = dim; // read term index logger.info("reading term index from " + rowFile + "..."); termIndex = new Index()...
void function(File UtFile, File SFile, File rowFile, File colFile, File dfFile, int dim, boolean rescaleIdf, boolean normalize) throws IOException { this.dim = dim; logger.info(STR + rowFile + "..."); termIndex = new Index(); termIndex.read(new InputStreamReader(new FileInputStream(rowFile), "UTF-8")); logger.info(STR ...
/** * Constructs a <code>AbstractLSI</code> object. */
Constructs a <code>AbstractLSI</code> object
init
{ "repo_name": "dkmfbk/utils", "path": "utils-lsa/src/main/java/eu/fbk/utils/lsa/AbstractLSI.java", "license": "apache-2.0", "size": 11509 }
[ "eu.fbk.utils.lsa.io.DenseBinaryMatrixFileReader", "eu.fbk.utils.lsa.io.DenseTextVectorFileReader", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader" ]
import eu.fbk.utils.lsa.io.DenseBinaryMatrixFileReader; import eu.fbk.utils.lsa.io.DenseTextVectorFileReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader;
import eu.fbk.utils.lsa.io.*; import java.io.*;
[ "eu.fbk.utils", "java.io" ]
eu.fbk.utils; java.io;
242,262
private void readMethods() throws IOException, ClassFormatException { int methods_count = dataInputStream.readUnsignedShort(); for (int i = 0; i < methods_count; i++) { Utility.swallowFieldOrMethod(dataInputStream); } }
void function() throws IOException, ClassFormatException { int methods_count = dataInputStream.readUnsignedShort(); for (int i = 0; i < methods_count; i++) { Utility.swallowFieldOrMethod(dataInputStream); } }
/** * Read information about the methods of the class. * @throws IOException * @throws ClassFormatException */
Read information about the methods of the class
readMethods
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-7.0.63-sourcecode/target/classes/org/apache/tomcat/util/bcel/classfile/ClassParser.java", "license": "apache-2.0", "size": 9423 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,693,402
void setStatsCallback(@Nullable PendingCheckpointStats trackerCallback) { this.statsCallback = trackerCallback; }
void setStatsCallback(@Nullable PendingCheckpointStats trackerCallback) { this.statsCallback = trackerCallback; }
/** * Sets the callback for tracking this pending checkpoint. * * @param trackerCallback Callback for collecting subtask stats. */
Sets the callback for tracking this pending checkpoint
setStatsCallback
{ "repo_name": "fanzhidongyzby/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java", "license": "apache-2.0", "size": 18637 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,706,927
public TransactionId transactionId() { return transactionId; }
TransactionId function() { return transactionId; }
/** * Returns the transaction identifier. * @return transaction id */
Returns the transaction identifier
transactionId
{ "repo_name": "maheshraju-Huawei/actn", "path": "core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentMapCommands.java", "license": "apache-2.0", "size": 15261 }
[ "org.onosproject.store.primitives.TransactionId" ]
import org.onosproject.store.primitives.TransactionId;
import org.onosproject.store.primitives.*;
[ "org.onosproject.store" ]
org.onosproject.store;
1,178,031
public boolean checkIfProjectExists(long projectId) { Project project = projectManager.getProjectByID(projectId); if (project != null) return true; else return false; }//end method...
boolean function(long projectId) { Project project = projectManager.getProjectByID(projectId); if (project != null) return true; else return false; }
/** * Method checks if project exist. * @param projectId * @return */
Method checks if project exist
checkIfProjectExists
{ "repo_name": "bonprix/solidsearch-bot", "path": "src/main/java/de/solidsearch/bot/dao/restservices/CrawlingJobRestManager.java", "license": "apache-2.0", "size": 4396 }
[ "de.solidsearch.bot.data.Project" ]
import de.solidsearch.bot.data.Project;
import de.solidsearch.bot.data.*;
[ "de.solidsearch.bot" ]
de.solidsearch.bot;
2,101,759
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "peterkir/org.eclipse.oomph", "path": "plugins/org.eclipse.oomph.projectconfig.edit/src/org/eclipse/oomph/projectconfig/provider/ExclusionPredicateItemProvider.java", "license": "epl-1.0", "size": 7439 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,543,095
public static Point3D_F64 mean(List<Point3D_F64> points, int num, @Nullable Point3D_F64 mean) { if (mean == null) mean = new Point3D_F64(); double x = 0, y = 0, z = 0; for (int i = 0; i < num; i++) { Point3D_F64 p = points.get(i); x += p.x; y += p.y; z += p.z; } mean.x = x / num; mean.y...
static Point3D_F64 function(List<Point3D_F64> points, int num, @Nullable Point3D_F64 mean) { if (mean == null) mean = new Point3D_F64(); double x = 0, y = 0, z = 0; for (int i = 0; i < num; i++) { Point3D_F64 p = points.get(i); x += p.x; y += p.y; z += p.z; } mean.x = x / num; mean.y = y / num; mean.z = z / num; return...
/** * Computes the mean of the list of points up to element num. * * @param points List of points * @param num use points up to num, exclusive. * @param mean (Optional) storage for the mean. Can be null * @return Mean */
Computes the mean of the list of points up to element num
mean
{ "repo_name": "lessthanoptimal/GeoRegression", "path": "main/src/georegression/geometry/UtilPoint3D_F64.java", "license": "apache-2.0", "size": 8801 }
[ "java.util.List", "org.jetbrains.annotations.Nullable" ]
import java.util.List; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
2,071,915
@Override public Config getOwnConfig(ConfigKeyPath configKey) { return this.cs.getOwnConfig(configKey, this.version); } /** * {@inheritDoc}. * * <p> * This implementation simply delegate the functionality to the internal {@link ConfigStore}/version * if the internal {@link ConfigStore} i...
Config function(ConfigKeyPath configKey) { return this.cs.getOwnConfig(configKey, this.version); } /** * {@inheritDoc}. * * <p> * This implementation simply delegate the functionality to the internal {@link ConfigStore}/version * if the internal {@link ConfigStore} is {@link ConfigStoreWithBatchFetches}, otherwise, wil...
/** * {@inheritDoc}. * * <p> * This implementation simply delegate the functionality to the internal {@link ConfigStore}/version * </p> */
. This implementation simply delegate the functionality to the internal <code>ConfigStore</code>/version
getOwnConfig
{ "repo_name": "jinhyukchang/gobblin", "path": "gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/common/impl/ConfigStoreBackedValueInspector.java", "license": "apache-2.0", "size": 6651 }
[ "com.typesafe.config.Config", "java.util.Map", "org.apache.gobblin.config.store.api.ConfigKeyPath", "org.apache.gobblin.config.store.api.ConfigStore", "org.apache.gobblin.config.store.api.ConfigStoreWithBatchFetches" ]
import com.typesafe.config.Config; import java.util.Map; import org.apache.gobblin.config.store.api.ConfigKeyPath; import org.apache.gobblin.config.store.api.ConfigStore; import org.apache.gobblin.config.store.api.ConfigStoreWithBatchFetches;
import com.typesafe.config.*; import java.util.*; import org.apache.gobblin.config.store.api.*;
[ "com.typesafe.config", "java.util", "org.apache.gobblin" ]
com.typesafe.config; java.util; org.apache.gobblin;
1,700,623
public Entry getTotal(Entry recycle, HashSet<String> limitIface) { return getTotal(recycle, limitIface, UID_ALL, false); }
Entry function(Entry recycle, HashSet<String> limitIface) { return getTotal(recycle, limitIface, UID_ALL, false); }
/** * Return total of all fields represented by this snapshot object matching * the requested {@link #iface}. */
Return total of all fields represented by this snapshot object matching the requested <code>#iface</code>
getTotal
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/core/java/android/net/NetworkStats.java", "license": "gpl-3.0", "size": 27360 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
1,383,909
@Test public void testIsOverlappingParallelRight() { Node start = new Node(1, 1, new Date(), null, 0, 1.0, 5.0); Node testStart = new Node(2, 1, new Date(), null, 0, 1.00001, 5.0); Node end = new Node(3, 1, new Date(), null, 0, 1.0, 10.0); Node afterEnd = new Node(4, 1...
void function() { Node start = new Node(1, 1, new Date(), null, 0, 1.0, 5.0); Node testStart = new Node(2, 1, new Date(), null, 0, 1.00001, 5.0); Node end = new Node(3, 1, new Date(), null, 0, 1.0, 10.0); Node afterEnd = new Node(4, 1, new Date(), null, 0, 1.0, 20.0); Node testEnd = new Node(5, 1, new Date(), null, 0, ...
/** * Test method for getDistance(node, start,end). */
Test method for getDistance(node, start,end)
testIsOverlappingParallelRight
{ "repo_name": "xafero/travelingsales", "path": "libosm/src/test/java/org/openstreetmap/osm/data/WayHelperTest.java", "license": "gpl-3.0", "size": 17469 }
[ "java.util.ArrayList", "java.util.Date", "java.util.List", "org.openstreetmap.osmosis.core.domain.v0_6.Node" ]
import java.util.ArrayList; import java.util.Date; import java.util.List; import org.openstreetmap.osmosis.core.domain.v0_6.Node;
import java.util.*; import org.openstreetmap.osmosis.core.domain.v0_6.*;
[ "java.util", "org.openstreetmap.osmosis" ]
java.util; org.openstreetmap.osmosis;
654,124
public Translog.Durability getTranslogDurability() { return durability; }
Translog.Durability function() { return durability; }
/** * Returns the translog durability for this index. */
Returns the translog durability for this index
getTranslogDurability
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/IndexSettings.java", "license": "apache-2.0", "size": 49494 }
[ "org.elasticsearch.index.translog.Translog" ]
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.index.translog.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
2,239,236
@Override public ExpNode deepCopy() { ExpNode newNode = new ExpNode(getReference()); for (TreeNode<Exp> child : getChildren()) { newNode.addChild(child.deepCopy()); } return newNode; }
ExpNode function() { ExpNode newNode = new ExpNode(getReference()); for (TreeNode<Exp> child : getChildren()) { newNode.addChild(child.deepCopy()); } return newNode; }
/** * deep copy (clone) * * @return copy of TreeNode * @see org.pivot4j.util.TreeNode#deepCopy() */
deep copy (clone)
deepCopy
{ "repo_name": "seddikouiss/pivo4j", "path": "pivot4j-core/src/main/java/org/pivot4j/mdx/ExpNode.java", "license": "epl-1.0", "size": 3050 }
[ "org.pivot4j.util.TreeNode" ]
import org.pivot4j.util.TreeNode;
import org.pivot4j.util.*;
[ "org.pivot4j.util" ]
org.pivot4j.util;
2,735,172
EReference getScenarioDef_ParentScenarios();
EReference getScenarioDef_ParentScenarios();
/** * Returns the meta object for the reference list '{@link ucm.scenario.ScenarioDef#getParentScenarios <em>Parent Scenarios</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Parent Scenarios</em>'. * @see ucm.scenario.ScenarioDef#getParentScenari...
Returns the meta object for the reference list '<code>ucm.scenario.ScenarioDef#getParentScenarios Parent Scenarios</code>'.
getScenarioDef_ParentScenarios
{ "repo_name": "gmussbacher/seg.jUCMNav", "path": "src/ucm/scenario/ScenarioPackage.java", "license": "epl-1.0", "size": 41212 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
203,753
@SuppressWarnings("ResultOfMethodCallIgnored") private static void delete(String file) { if (file != null) { new File(file).delete(); assertFalse(new File(file).exists()); } }
@SuppressWarnings(STR) static void function(String file) { if (file != null) { new File(file).delete(); assertFalse(new File(file).exists()); } }
/** * Utility method to delete file. * * @param file the file path to delete. */
Utility method to delete file
delete
{ "repo_name": "ptupitsyn/ignite", "path": "modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java", "license": "apache-2.0", "size": 19750 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,697,517
public FileSourceDto setSrcHash(@Nullable String srcHash) { this.srcHash = srcHash; return this; }
FileSourceDto function(@Nullable String srcHash) { this.srcHash = srcHash; return this; }
/** * Hash of file content. Value is computed by batch. */
Hash of file content. Value is computed by batch
setSrcHash
{ "repo_name": "jblievremont/sonarqube", "path": "sonar-core/src/main/java/org/sonar/core/source/db/FileSourceDto.java", "license": "lgpl-3.0", "size": 7759 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
345,567