language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public static <T, K extends Enum<K>, A, D> Collector<T, ?, EnumMap<K, D>> groupingByEnum(Class<K> enumClass, Function<? super T, K> classifier, Collector<? super T, A, D> downstream) { return groupingBy(classifier, EnumSet.allOf(enumClass), () -> new EnumMap<>(enumClass), downstream); }
java
public static <T> CloseableIterator<List<T>> partition(final CloseableIterator<T> iterator, final int size) { return wrap(Iterators.partition(iterator, size), iterator); }
python
def size(self): """ Return directory size in bytes. :rtype: int :return: Total directory size in bytes. """ dir_size = 0 for f in self.iterfiles(abspath=True): dir_size += os.path.getsize(f) return dir_size
java
public final void startAddingEdges() { if (numEdges_ > 0) { for (int i = 0; i < height_; i++) { for (Edge e = ySortedEdges_[i]; e != null;) { Edge p = e; e = e.next; p.next = null; } ySortedEdges_[i] = null; } activeEdgesTable_ = null; } minY_ = height_; maxY_ = -1; ...
java
public void close() throws IOException, QdbException { this.compoundRegistry.close(); this.propertyRegistry.close(); this.descriptorRegistry.close(); this.modelRegistry.close(); this.predictionRegistry.close(); try { this.storage.close(); } finally { this.storage = null; } try { if(this.tem...
java
public final JSType resolve(ErrorReporter reporter) { if (resolved) { if (resolveResult == null) { // If there is a circular definition, keep the NamedType around. This is not ideal, // but is still a better type than unknown. return this; } return resolveResult; } ...
java
public static short computeSeedHash(final long seed) { final long[] seedArr = {seed}; final short seedHash = (short)((hash(seedArr, 0L)[0]) & 0xFFFFL); if (seedHash == 0) { throw new SketchesArgumentException( "The given seed: " + seed + " produced a seedHash of zero. " + "You ...
python
def from_xml(xml): """ Pick informations from :class:`.MARCXMLRecord` object and use it to build :class:`.SemanticInfo` structure. Args: xml (str/MARCXMLRecord): MarcXML which will be converted to SemanticInfo. In case of str, ``<record>`` tag is required. ...
python
def _generate_ffmpeg_cmd( self, cmd: List[str], input_source: Optional[str], output: Optional[str], extra_cmd: Optional[str] = None, ) -> None: """Generate ffmpeg command line.""" self._argv = [self._ffmpeg] # start command init if input_sourc...
java
void closeConnection(Connection con) { if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[CLOSE_CONNECTION], "closing " + con); } try { ...
python
def unmount(self): """Unmounts the sftp system if it's currently mounted.""" if not self.mounted: return # Try to unmount properly. cmd = 'fusermount -u %s' % self.mount_point_local shell_exec(cmd) # The filesystem is probably still in use. # kill ss...
python
def create_queues(self): ''' Updates the in memory list of the redis queues Creates new throttled queue instances if it does not have them ''' # new config could have loaded between scrapes newConf = self.check_config() self.queue_keys = self.redis_conn.keys(self...
java
public static <T> T readJson(File file) { try { return objectMapper.readValue(new String(Files.readAllBytes(file.toPath())), new TypeReference<T>() { }); } catch (IOException e) { throw new RuntimeException(e); } }
python
def lagrange(pairs): """ Waring-Lagrange interpolator function. Parameters ---------- pairs : Iterable with pairs (tuples with two values), corresponding to points ``(x, y)`` of the function. Returns ------- A function that returns the interpolator result for a given ``x``. """ prod = lam...
python
def path(self, path): """ Path of the IOU executable. :param path: path to the IOU image executable """ self._path = self.manager.get_abs_image_path(path) log.info('IOU "{name}" [{id}]: IOU image updated to "{path}"'.format(name=self._name, id=self._id, path=self._path)...
java
public int[] get(ReadablePeriod period, long duration) { int size = period.size(); int[] values = new int[size]; if (duration != 0) { long current = 0; for (int i = 0; i < size; i++) { DurationField field = period.getFieldType(i).getField(this); ...
python
def dict(self): """ converts the class to a dictionary object """ return_obj = {} for attr in dir(self): if not attr.startswith('__') and attr not in self.__reserved: if isinstance(getattr(self, attr), list): return_val = [] for...
python
def historical_identifier(self): """Scopus IDs of previous profiles now compromising this profile.""" hist = chained_get(self._json, ["coredata", 'historical-identifier'], []) return [d['$'].split(":")[-1] for d in hist] or None
java
public byte[] dumpClass(Class<?> cl) throws IOException { // get class fileName // Using File.separatorChar in Windows fails. paths for // Class#getResource() must be forward slashes in order to work // correctly. // See: // https://blogs.atlassian.com/2006/12/how_to_use_...
java
public static String encodeAuthAmqPlain(String username, char[] password) { Logger logger = LoggerFactory.getLogger(SERVICE_AMQP_PROXY_LOGGER); if (logger.isDebugEnabled()) { logger.debug(CLASS_NAME + ".encodeAuthAmqPlain(): Username - " + username); } int size = 1 + ...
python
def calculate_orbits(self, primary=None, jacobi_masses=False, heliocentric=None, barycentric=None): """ Calculate orbital parameters for all partices in the simulation. By default this functions returns the orbits in Jacobi coordinates. If MEGNO is enabled, variational particles will ...
java
public CMFolder addChild( String id, String name ) { CMFolder childFolder = new CMFolder( id, name ); childFolder.parent = this; this.children.put( name, childFolder ); return childFolder; }
python
def async_raise(self, exc_type): """Raise the exception.""" # Should only be called on a started thread, so raise otherwise. assert self.ident is not None, 'Only started threads have thread identifier' # If the thread has died we don't want to raise an exception so log. if not self.is_alive(): ...
java
public static <V> V doWorkInPoolNicely(final Pool<Jedis> pool, final PoolWork<Jedis, V> work) { final V result; try { result = doWorkInPool(pool, work); } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new RuntimeException(e); ...
java
public String getConceptualTranslation() { if (codons == null) { return ""; } StringBuilder translation = new StringBuilder(); for (int i = 0 ; i < conceptualTranslationCodons ; ++i) { Codon codon = codons.get(i); translation.append(codon.getAm...
java
public void visitPropertyMap(PropertyMap<S, D> propertyMap) { String propertyMapClassName = propertyMap.getClass().getName(); try { ClassReader cr = new ClassReader(propertyMap.getClass().getClassLoader().getResourceAsStream( propertyMapClassName.replace('.', '/') + ".class")); Expl...
python
def patch(self, delta): "Applies remote delta to local file." # Create a temp file in which to store our synced copy. We will handle # deleting it manually, since we may move it instead. with (tempfile.NamedTemporaryFile(prefix='.sync', suffix=os.path.basename(self.path), ...
java
public CopyProductRequest withSourceProvisioningArtifactIdentifiers( java.util.Collection<java.util.Map<String, String>> sourceProvisioningArtifactIdentifiers) { setSourceProvisioningArtifactIdentifiers(sourceProvisioningArtifactIdentifiers); return this; }
python
def del_record(self, dns_record_type, host): """Remove a DNS record""" rec = self.get_record(dns_record_type, host) if rec: self._entries = list(set(self._entries) - set([rec])) return True
python
def _is_version_duplicate(self): """ Define should new version be created for object or no. Reasons to provide custom check instead of default `ignore_revision_duplicates`: - no need to compare all revisions - it is OK if right object version exists in any revision; - need...
python
def extract_archive(archive_path, destination_path): """Extracts an archive somewhere on the filesystem.""" tar = tarfile.open(archive_path) tar.errorlevel = 1 tar.extractall(destination_path)
java
private Peer getPeer(HFClient client, String peerName) throws InvalidArgumentException { Peer peer = null; Node p = peers.get(peerName); if (p != null) { peer = client.newPeer(p.getName(), p.getUrl(), p.getProperties()); } return peer; }
python
def transmute_route(app, fn, context=default_context): """ this is the main interface to transmute. It will handle adding converting the python function into the a flask-compatible route, and adding it to the application. """ transmute_func = TransmuteFunction(fn) routes, handler = create_ro...
java
private Object processElement(byte[] source, int offset, int currentColumnIndex) { byte[] temp; int length = columnsDataLength.get(currentColumnIndex); if (columns.get(currentColumnIndex).getType() == Number.class) { temp = Arrays.copyOfRange(source, offset + (int) (long) columnsData...
java
public static <E> double max(Counter<E> c) { double max = Double.NEGATIVE_INFINITY; for (double v : c.values()) { max = Math.max(max, v); } return max; }
java
public void configure( CameraPinholeBrown intrinsic , Se3_F64 planeToCamera , double centerX, double centerY, double cellSize , int overheadWidth , int overheadHeight ) { this.overheadWidth = overheadWidth; this.overheadHeight = overheadHeight; Point2Transform2_F64 normToPixel = LensD...
python
def NewMemory(self, buffer, size, URL, encoding, options): """Setup an xmltextReader to parse an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. This reuses the existing @reader xmlTextReader. """ ret = libxml2mod.xmlReaderNewMemory...
python
def search(self, **kwargs): """ Method to search ipv4's based on extends search. :param search: Dict containing QuerySets to find ipv4's. :param include: Array containing fields to include on response. :param exclude: Array containing fields to exclude on response. :para...
java
private Object convert(Object value, String type) { if (EnumRuleType.STRING.equals(type)) { if (!(value instanceof String)) { return String.valueOf(value); } } else if (EnumRuleType.DOUBLE.equals(type)) { if (!(value instanceof Double)) { ...
java
public void setColSize1(Integer newColSize1) { Integer oldColSize1 = colSize1; colSize1 = newColSize1; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.COLOR_SPECIFICATION__COL_SIZE1, oldColSize1, colSize1)); }
java
public Checkbox setChecked(boolean checked) { if (checked) { String valueEnabledString = this.getEnabledValueString(); this.setValue(valueEnabledString); } else { this.setValue(""); } return this; }
python
def naturalsortkey(s): """Natural sort order""" return [int(part) if part.isdigit() else part for part in re.split('([0-9]+)', s)]
python
def relabel(self, qubits: Qubits) -> 'State': """Return a copy of this state with new qubits""" return State(self.vec.tensor, qubits, self._memory)
java
public double[] perform(double[] buffer, int len) { int size = (int)((double)F/f * len); double signal[] = new double[size]; double dx = 1./(double)f; double dX = 1./(double)F; signal[0] = buffer[0]; double k = 0; for (int i = 1; i < size - 1; i++) { ...
java
public ConfusionMessage createCNF(int cic) { ConfusionMessage msg = createCNF(); CircuitIdentificationCode code = this.parameterFactory.createCircuitIdentificationCode(); code.setCIC(cic); msg.setCircuitIdentificationCode(code); return msg; }
python
def get_collection_documents_generator(client, database_name, collection_name, spec, latest_n, sort_key): """ This is a python generator that yields tweets stored in a mongodb collection. Tweet "created_at" field is assumed to have been stored in the format supported by MongoDB. Inputs: - client: A py...
python
def translate(self, addr): """ Reverse DNS the public broadcast_address, then lookup that hostname to get the AWS-resolved IP, which will point to the private IP address within the same datacenter. """ # get family of this address so we translate to the same family = sock...
java
@Override public CommerceNotificationTemplate fetchByG_E_Last(long groupId, boolean enabled, OrderByComparator<CommerceNotificationTemplate> orderByComparator) { int count = countByG_E(groupId, enabled); if (count == 0) { return null; } List<CommerceNotificationTemplate> list = findByG_E(groupId, enab...
python
def parse_requirements(filename): """ load requirements from a pip requirements file """ lineiter = (line.strip() for line in open(filename)) return (line for line in lineiter if line and not line.startswith("#"))
java
public static boolean delete(File file) { boolean result = true; if (file == null) { return false; } if (file.exists()) { if (file.isDirectory()) { // 1. delete content of directory: File[] children = file.listFiles(); ...
java
public static Collection<String> listFiles(String filesString, String delimiter) { ValidationUtils.validateNotEmpty(filesString, "fileStr"); List<String> files = new ArrayList<String>(); for (String fileString : filesString.split(delimiter)) { File file = new File(fileString); if (!file.getName...
python
def download_file(url, file_path, mkdir=False): """Write a string of data to file. Args: url: A string to a valid URL. file_path: Full path to intended download location (e.g. c:/ladybug/testPts.pts) mkdir: Set to True to create the directory if doesn't exist (Default: False) """ ...
java
public EClass getGSGCH() { if (gsgchEClass == null) { gsgchEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(463); } return gsgchEClass; }
java
protected void doCleanupAfterCompletion(Object transaction) { ContextSourceAndDataSourceTransactionObject actualTransactionObject = (ContextSourceAndDataSourceTransactionObject) transaction; super.doCleanupAfterCompletion(actualTransactionObject .getDataSourceTransactionObject()); ...
python
def data(self, *keys): """ Return the keys and values of this record as a dictionary, optionally including only certain values by index or key. Keys provided in the items that are not in the record will be inserted with a value of :const:`None`; indexes provided that are out of b...
java
public boolean compare(XObject obj2, Comparator comparator) throws javax.xml.transform.TransformerException { boolean result = false; int type = obj2.getType(); if (XObject.CLASS_NODESET == type) { // %OPT% This should be XMLString based instead of string based... // From http...
java
private final java.util.Map getSubMap(final Object key) { // Defend against systematically changing hashcodes, for examples where consecutive // Integers are presented as keys. If we dont shuffle the hashcode then we may get a // bunch of requests that hit the same submap. int index ...
python
def process_network_proto(caffe_root, deploy_proto): """ Runs the caffe upgrade tool on the prototxt to create a prototxt in the latest format. This enable us to work just with latest structures, instead of supporting all the variants :param caffe_root: link to caffe root folder, where the upgrade tool...
python
def _add_point_scalar(self, scalars, name, set_active=False, deep=True): """ Adds point scalars to the mesh Parameters ---------- scalars : numpy.ndarray Numpy array of scalars. Must match number of points. name : str Name of point scalars to ad...
java
public boolean process( List<Point2D_I32> list , GrowQueue_I32 vertexes ) { this.contour = list; this.minimumSideLengthPixel = minimumSideLength.computeI(contour.size()); splits.reset(); boolean result = _process(list); // remove reference so that it can be freed this.contour = null; vertexes.setTo(spli...
python
def afw_nonemptiness_check(afw: dict) -> bool: """ Checks if the input AFW reads any language other than the empty one, returning True/False. The afw is translated into a nfa and then its nonemptiness is checked. :param dict afw: input AFW. :return: *(bool)*, True if input afw is nonempty, Fal...
java
private List<CmsSelectWidgetOption> createNavOpts(CmsSiteBean currSite) { List<CmsSite> sites = new ArrayList<CmsSite>(); for (CmsSite site : OpenCms.getSiteManager().getAvailableSites(getCms(), true)) { if (site.getSiteMatcher() != null) { sites.add(site); } ...
python
def distance(p1, p2): """ Cartesian distance between two PoseStamped or PoseLists :param p1: point 1 (list, Pose or PoseStamped) :param p2: point 2 (list, Pose or PoseStamped) :return: cartesian distance (float) """ def xyz(some_pose): if isinstance(some_pose, PoseStamped): ...
java
private String calculateStringToSignV1(Map<String, List<String>> parameters) { StringBuilder data = new StringBuilder(); SortedMap<String, List<String>> sorted = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER); sorted.putAll(parameters); for (Map.Entry<Strin...
java
public Collection<String> wordsNearestSum(String word, int n) { return modelUtils.wordsNearestSum(word, n); }
java
public NotificationFilter[] readNotificationFilters(InputStream in) throws ConversionException, IOException, ClassNotFoundException { return readNotificationFiltersInternal(parseArray(in)); }
python
def class_balance(y_train, y_test=None, ax=None, labels=None, **kwargs): """Quick method: One of the biggest challenges for classification models is an imbalance of classes in the training data. This function vizualizes the relationship of the support for each class in both the training and test data b...
java
@Override @SuppressWarnings({ "unchecked" }) protected void append(final LoggingEvent event) { if (null == this.client) { try { connectToAerospike(); } catch (UnknownHostException e) { throw new RuntimeException(e.getMessage(), e); } } List<Bin> binList = new ArrayList<Bin>(); StringBuilder k...
python
async def set_ventilation(self, pct, timeout=OTGW_DEFAULT_TIMEOUT): """ Configure a ventilation setpoint override value (0-100%). Return the newly accepted value, or None on failure. @pct :int: Must be between 0 and 100. This method is a coroutine """ if not 0 <=...
java
public static MozuUrl deletePriceListEntryUrl(String currencyCode, String priceListCode, String productCode, DateTime startDate) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}"); formatter.formatUrl("...
java
public static String getProperty(String name) { return System.getProperty(name, System.getenv(name)); }
java
public static LooseConfig convertToLooseConfig(File looseFile) throws Exception { //make sure the file exists, can be read and is an xml if (looseFile.exists() && looseFile.isFile() && looseFile.canRead() && looseFile.getName().toLowerCase().endsWith(".xml")) { LooseConfig root = new LooseCo...
java
public ServiceFuture<ProjectTaskInner> createOrUpdateAsync(String groupName, String serviceName, String projectName, String taskName, ProjectTaskInner parameters, final ServiceCallback<ProjectTaskInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(groupName, servic...
python
def to_dict(self): """ Return this ModuleDoc as a dict. In addition to `CommentDoc` defaults, this has: - **name**: The module name. - **dependencies**: A list of immediate dependencies. - **all_dependencies**: A list of all dependencies. """ ...
java
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit(); for (ResourceRoot resourceRoot : DeploymentUtils.allResourceRoots(deploymentUnit)) { ResourceRootIndexer.indexResourceRoo...
python
def force_delete_key(address): """ Delete the key from the keyring and the Key and Address objects from the database """ address_object = Address.objects.get(address=address) address_object.key.delete() address_object.delete()
java
public boolean printControl(PrintWriter out, int iPrintOptions) { boolean bFieldsFound = super.printControl(out, iPrintOptions); if (!bFieldsFound) { int iNumCols = this.getSFieldCount(); for (int iIndex = 0; iIndex < iNumCols; iIndex++) { ...
java
public long count(final Bson filter, final RemoteCountOptions options) { return operations.count(filter, options).execute(service); }
python
def _get_result_paths(self, data): """ Set the result paths """ # Swarm OTU map (mandatory output) return {'OtuMap': ResultPath(Path=self.Parameters['-o'].Value, IsWritten=True)}
python
def resolve_resource_type(self, resource_dict): """Returns the Resource class corresponding to the 'Type' key in the given resource dict. :param dict resource_dict: the resource dict to resolve :returns: the resolved Resource class :rtype: class """ if not self.can_resol...
python
def _prepare_transformation_recipe(pattern: str, reduction: str, axes_lengths: Tuple) -> TransformRecipe: """ Perform initial parsing of pattern and provided supplementary info axes_lengths is a tuple of tuples (axis_name, axis_length) """ left, right = pattern.split('->') identifiers_left, composit...
python
def client_tokens(self): """try and get Oauth 2.0 client id and secret first from basic auth header, then from GET or POST parameters return -- tuple -- client_id, client_secret """ client_id, client_secret = self.get_auth_basic() if not client_id and not client_secret: ...
java
private boolean isLetter(final char paramInput) { return (paramInput >= '0' && paramInput <= '9') || (paramInput >= 'a' && paramInput <= 'z') || (paramInput >= 'A' && paramInput <= 'Z') || (paramInput == '_') || (paramInput == '-') || (paramInput == '.'); }
python
def _get_cache_dir(): ''' Get pillar cache directory. Initialize it if it does not exist. ''' cache_dir = os.path.join(__opts__['cachedir'], 'pillar_s3fs') if not os.path.isdir(cache_dir): log.debug('Initializing S3 Pillar Cache') os.makedirs(cache_dir) return cache_dir
python
def invalidate_and_update_screen(self, screen_id): """Redraw the specified VM screen. in screen_id of type int The guest screen to redraw. """ if not isinstance(screen_id, baseinteger): raise TypeError("screen_id can only be an instance of type baseinteger") ...
java
public static void writeCustomAttributes(Collection<List<ExtensionAttribute>> attributes, XMLStreamWriter xtw, Map<String, String> namespaceMap, List<ExtensionAttribute>... blackLists) throws XMLStreamException { for (List<ExtensionAttribute> attributeList : attributes) { if (attributeList != null && !...
java
@Override public void setupValueChangedListeners() { super.setupValueChangedListeners(); field.itemsProperty().addListener((observable, oldValue, newValue) -> { createCheckboxes(); setupCheckboxBindings(); setupCheckboxEventHandlers(); }); field.selectionProperty().addListener((obs...
python
def getFeature(self, compoundId): """ find a feature and return ga4gh representation, use compoundId as featureId """ feature = self._getFeatureById(compoundId.featureId) feature.id = str(compoundId) return feature
python
def show_homecoming(request): """Show homecoming ribbon / scores """ return {'show_homecoming': settings.HOCO_START_DATE < datetime.date.today() and datetime.date.today() < settings.HOCO_END_DATE}
java
public static void deleteAllFiles(final File file) throws IOException { String error = null; if (!file.exists()) { return; } final Exception ex = checkFile(file); if (ex != null) { try { throw ex; } catch (final Exception e) { e.printStackTrace(); } } DeleteFileExtensions...
python
def df2plotshape(dlen,xlabel_unit,ylabel_unit, suptitle='',fix='h',xlabel_skip=[], test=False): """ _xlen: _ylen: title: """ dlen['xlabel']=dlen.apply(lambda x : f"{x['_xlen']}" if not x['title'] in xlabel_skip else '',axis=1) dlen['ylabel']=dlen.apply(lamb...
java
public static boolean refreshConfigIfNeeded(HttpServletRequest request, JawrConfig jawrConfig) { boolean refreshed = false; if (request.getAttribute(JawrConstant.JAWR_BUNDLE_REFRESH_CHECK) == null) { request.setAttribute(JawrConstant.JAWR_BUNDLE_REFRESH_CHECK, Boolean.TRUE); if (jawrConfig.getRefreshKey()....
java
@Override public void addActionPressed(Integer key, EventAction action) { final List<EventAction> list; if (actionsPressed.get(key) == null) { list = new ArrayList<>(); actionsPressed.put(key, list); } else { list = actionsPress...
java
@Override public void alarm(DeployService2Impl<I> deploy, Result<I> result) { LifecycleState state = deploy.getState(); if (! state.isActive()) { result.ok(deploy.get()); } else if (deploy.isModifiedNow()) { // baratine/801g deploy.logModified(deploy.getLog()); deploy.re...
java
public String getExcerpt(String id, int maxFragments, int maxFragmentSize) throws IOException { StringBuilder text = new StringBuilder(); try { ItemData node = ism.getItemData(id); String separator = ""; List<PropertyData> childs = ism.getChildPropertiesData((NodeData)nod...
java
@Override public synchronized void registerSynchronizationCallback(SynchronizationCallback sync) throws NotSupportedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "registerSynchronizationCallback", sync); // Disallow registration of null syncs ...
python
def _check_denied_group(self): """ Returns True if the negative group requirement (AUTH_LDAP_DENY_GROUP) is met. Always returns True if AUTH_LDAP_DENY_GROUP is None. """ denied_group_dn = self.settings.DENY_GROUP if denied_group_dn is not None: is_member = se...
java
@PublicEvolving @Deprecated public <ACC> QueryableStateStream<KEY, ACC> asQueryableState( String queryableStateName, FoldingStateDescriptor<T, ACC> stateDescriptor) { transform("Queryable state: " + queryableStateName, getType(), new QueryableAppendingStateOperator<>(queryableStateName, stateDescript...
java
public void setVmServerAddressList(java.util.Collection<VmServerAddress> vmServerAddressList) { if (vmServerAddressList == null) { this.vmServerAddressList = null; return; } this.vmServerAddressList = new java.util.ArrayList<VmServerAddress>(vmServerAddressList); }
python
def tidy_html(html_buffer, cleaning_lib='utidylib'): """ Tidy up the input HTML using one of the installed cleaning libraries. @param html_buffer: the input HTML to clean up @type html_buffer: string @param cleaning_lib: chose the preferred library to clean the HTML. One of: ...