code
stringlengths
10
174k
nl
stringlengths
3
129k
public Pattern ipMustMatchPattern(){ if (this.crawleripmustmatch == null) { final String r=get(CrawlAttribute.CRAWLER_IP_MUSTMATCH.key); try { this.crawleripmustmatch=(r == null || r.equals(CrawlProfile.MATCH_ALL_STRING)) ? CrawlProfile.MATCH_ALL_PATTERN : Pattern.compile(r,Pattern.CASE_INSENSITIVE); ...
Gets the regex which must be matched by IPs in order to be crawled.
public PostAddToViewEvent(FacesContext facesContext,UIComponent component){ super(facesContext,component); }
<p class="changed_added_2_3">Instantiate a new <code>PostAddToViewEvent</code> that indicates the argument <code>component</code> was just added to the view.</p>
@Override protected void reset() throws AdeException { super.reset(); m_trained=false; m_rawScores=null; }
Reset scorer state to the equivalent of a newly created object.
public Builder cacheInMemory(){ cacheInMemory=true; return this; }
Loaded image will be cached in memory
public static <E>Set<E> of(E e1,E e2,E e3){ return new ImmutableCollections.SetN<E>(e1,e2,e3); }
Returns an immutable set containing three elements. See <a href="#immutable">Immutable Set Static Factory Methods</a> for details.
public MockResultSetMetaData(Class clazz) throws SQLException { this.clazz=clazz; try { descriptors=Introspector.getBeanInfo(clazz).getPropertyDescriptors(); } catch ( Exception e) { throw new SQLException(e.getMessage()); } }
<p> Construct a new <code>ResultSetMetaData</code> object wrapping the properties of the specified Java class.</p>
public int readBits(int n){ return (int)readBitsLong(n); }
Reads up to 32 bits.
@POST @Path("internal/wakeup/") public Response wakeupManager(@QueryParam("type") String managerType){ if (managerType == null) { managerType="all"; } switch (managerType) { case "upgrade": _upgradeManager.wakeup(); break; case "secrets": _secretsManager.wakeup(); break; case "property": _propertyManager....
*Internal API, used only between nodes <p> Wake up node
public String toString(){ return "[Style: foreground: " + foreground + ", background: "+ background+ ", underline: "+ underline+ ", font: "+ font+ "]"; }
Returns a string representation of this style.
public AttrContextEnv(JCTree tree,AttrContext info){ super(tree,info); }
Create an outermost environment for a given (toplevel)tree, with a given info field.
public static void start(String[] args){ log.info("Starting HSQL database in server mode"); System.out.println("*** STARTING DATABASE ***"); startHsqlServer(); try { hsql.stop(); while (true) { hsql.checkRunning(false); Thread.sleep(200); } } catch ( Exception ex) { startHsqlServ...
Start Spring application.
public void addExtraParameter(String key,String value){ put(key,value,extraParameters); }
Sets a parameter related to OAuth (but not used when generating the signature).
public PutIndexTemplateRequest source(XContentBuilder templateBuilder){ try { return source(templateBuilder.bytes()); } catch ( Exception e) { throw new IllegalArgumentException("Failed to build json for template request",e); } }
The template source definition.
void waitIfStalled(){ stallControl.waitIfStalled(); }
This method will block if too many DWPT are currently flushing and no checked out DWPT are available
@Override Object implRegister(Path obj,Set<? extends WatchEvent.Kind<?>> events,WatchEvent.Modifier... modifiers){ WindowsPath dir=(WindowsPath)obj; boolean watchSubtree=false; for ( WatchEvent.Modifier modifier : modifiers) { if (modifier == ExtendedWatchEventModifier.FILE_TREE) { watchSubtree=true; ...
Register a directory for changes as follows: 1. Open directory 2. Read its attributes (and check it really is a directory) 3. Assign completion key and associated handle with completion port 4. Call ReadDirectoryChangesW to start (async) read of changes 5. Create or return existing key representing registration
public void addFlower(@Nonnull Block flower,int meta){ addFlower(new BlockKey(flower,meta),new GenericFlowerBlockEntry(flower,meta)); }
Adds a custom flower the mod. NOTE: This is meta-sensitive.
public void accept(final AnnotationVisitor av){ if (av != null) { if (values != null) { for (int i=0; i < values.size(); i+=2) { String name=(String)values.get(i); Object value=values.get(i + 1); accept(av,name,value); } } av.visitEnd(); } }
Makes the given visitor visit this annotation.
static public float floatValue(String val) throws java.text.ParseException { return java.text.NumberFormat.getInstance().parse(val).floatValue(); }
Parse a number. Use as a locale-aware replacement for Float.valueOf("1").floatValue() and Float.parseFloat("1").floatValue().
@Override public ImmutableSetMultimap<K,V> build(){ if (keyComparator != null) { Multimap<K,V> sortedCopy=MultimapBuilder.linkedHashKeys().linkedHashSetValues().<K,V>build(); List<Map.Entry<K,Collection<V>>> entries=Ordering.from(keyComparator).<K>onKeys().immutableSortedCopy(builderMultimap.asMap().entrySet(...
Returns a newly-created immutable set multimap.
public void encode(OutputStream out) throws IOException { DerOutputStream tmp=new DerOutputStream(); if (extensionValue == null) { extensionId=PKIXExtensions.IssuerAlternativeName_Id; critical=false; encodeThis(); } super.encode(tmp); out.write(tmp.toByteArray()); }
Write the extension to the OutputStream.
@Override public void reload() throws Exception { String coreName=(String)evaluateXPath(adminQuery("/admin/cores?action=STATUS"),"//lst[@name='status']/lst[1]/str[@name='name']",XPathConstants.STRING); String xml=checkAdminResponseStatus("/admin/cores?action=RELOAD&core=" + coreName,"0"); if (null != xml) { t...
Reloads the first core listed in the response to the core admin handler STATUS command
static <T>T first(T... ts){ for ( T t : ts) { if (t != null) { return t; } } return null; }
Returns the first non-null value, or null if all were null.
private void checkArchiveExists(DbConnection dbConn) throws Exception { int count; ArchivesTable table=new ArchivesTable(); DirsTable tableNode=new DirsTable(); if (_logger.isDebugEnabled()) _logger.debug("checkArchiveExists"); try { count=DbSelectFns.selectCount(dbConn,table.getArchHdrTableName(),table...
Verifica si existe un archivador con ese nombre y el mismo padre antes de insertarlo.
public JSONObject put(String key,Object value) throws JSONException { if (key == null) { throw new NullPointerException("Null key."); } if (value != null) { testValidity(value); this.map.put(key,value); } else { this.remove(key); } return this; }
Put a key/value pair in the JSONObject. If the value is null, then the key will be removed from the JSONObject if it is present.
public <Type>Type finishLoading(final String assetPath,final Class<Type> assetClass){ return finishLoading(assetPath,assetClass,null); }
Immediately loads the chosen asset. Schedules loading of the asset if it wasn't selected to be loaded already.
private void checkOpen(){ Assert.state(references.get() > 0,"commit not open"); }
Checks whether the commit is open and throws an exception if not.
public LinuxSyslogMessageReader(AdeInputStream stream,String parseReportFilename,LinuxAdeExtProperties adeExtProperties) throws AdeException { super(stream); m_dataFactory=Ade.getAde().getDataFactory(); m_textClusteringComponentModel=Ade.getAde().getActionsFactory().getTextClusteringModel(true); m_messageTextPr...
Constructs a reader for a given input stream and initializes member variables.
public static void assertArrayEqual(Object[] expected,Object[] actual){ if (verbose) { log("assertArrayEqual(" + arrayToString(expected) + ", "+ arrayToString(actual)+ ")"); } if (expected.length != actual.length) { TestUtils.assertBool(false); } for (int index=0; index < expected.length; ++index) { ...
Asserts that the given object arrays are equal
public String toString(){ return super.toString() + "<" + lowValue+ ":"+ highValue+ ">"; }
Reasonable extension to toString() method.
public static int dp2px(Context context,int dp){ return (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,dp,context.getResources().getDisplayMetrics()); }
DP TO PX
public void register(Class type,Label label) throws Exception { Label cache=new CacheLabel(label); registerElement(type,cache); registerText(cache); }
This is used to register a label based on the name. This is done to ensure the label instance can be dynamically found during the deserialization process by providing the name.
public Checkpoint(String partitionId,String offset,long sequenceNumber){ this.partitionId=partitionId; this.offset=offset; this.sequenceNumber=sequenceNumber; }
Create a checkpoint with the given offset and sequenceNumber.
public static boolean installNormal(Context context,String filePath){ Intent i=new Intent(Intent.ACTION_VIEW); File file=new File(filePath); if (file == null || !file.exists() || !file.isFile() || file.length() <= 0) { return false; } i.setDataAndType(Uri.parse("file://" + filePath),"application/vnd.andro...
install package normal by system intent
public static String formatStringOrNull(String formatString,Object... args){ for ( Object o : args) { if (o == null) { return null; } } return String.format(formatString,args); }
Return the formatted string unless one of the args is null in which case null is returned
@Override protected void finalize() throws Throwable { dispose(); super.finalize(); }
Closes all files for termination
@Override default <C extends Comparable<? super C>>Optional<T> maxBy(final Function<? super T,? extends C> f){ return reactiveSeq().maxBy(f); }
Extract the maximum as determined by the supplied function
private static Recharge buildTextRecharge(String title){ Recharge.Amount amount=new Recharge.Amount(50,PlanConstants.TEXT_STEP_AMOUNT); Recharge.MetaData metaData=new Recharge.MetaData(title,PlanConstants.TEXT_UNIT,R.drawable.text_dark_gray); return new Recharge(amount,PlanConstants.TEXT_DOLLARS_PER_STEP,metaData...
Construct and return a text recharge.
public ListenableFuture<PaymentIncrementAck> incrementPayment(Coin size,@Nullable ByteString info,@Nullable KeyParameter userKey) throws ValueOutOfRangeException, IllegalStateException { return channelClient.incrementPayment(size,info,userKey); }
Increments the total value which we pay the server.
@Override public void actionPerformed(ActionEvent event){ String group=null; if (Beans.hasProperty(wi,RosterGroupSelector.SELECTED_ROSTER_GROUP)) { group=(String)Beans.getProperty(wi,RosterGroupSelector.SELECTED_ROSTER_GROUP); } if (group == null) { group=(String)JOptionPane.showInputDialog(_who,"<html>...
Call setParameter("group", oldName) prior to calling actionPerformed(event) to bypass the roster group selection dialog if the name of the group to be copied is already known and is not the selectedRosterGroup property of the WindowInterface.
private void checkSetTimes(IgfsPath path) throws Exception { if (timesSupported()) { IgfsFile info=igfs.info(path); T2<Long,Long> secondaryTimes=dual ? igfsSecondary.times(path.toString()) : null; assert info != null; igfs.setTimes(path,-1,-1); IgfsFile newInfo=igfs.info(path); assert newInfo ...
Check setTimes logic for path.
public void copy(){ build(); isCut=false; }
Processes objects placed into the clipboard so that it was "copy" transaction
public static void markBoth(HalfEdge e){ ((MarkHalfEdge)e).mark(); ((MarkHalfEdge)e.sym()).mark(); }
Marks the edges in a pair.
public void afterDataRegionCreated(final String indexName,final Analyzer analyzer,final String dataRegionPath,final Map<String,Analyzer> fieldAnalyzers,final String... fields){ LuceneIndexImpl index=createIndexRegions(indexName,dataRegionPath); index.setSearchableFields(fields); index.setAnalyzer(analyzer); ind...
Finish creating the lucene index after the data region is created . Public because this is called by the Xml parsing code
public Builder notificationIcon(String value){ notificationParams.put("icon",value); return this; }
Sets the notification icon.
public String serialize(){ return toLockId(socketAddress,shard); }
Serialize the write proxy identifier to string.
@Deprecated public static void write(StringBuffer data,Writer output) throws IOException { if (data != null) { output.write(data.toString()); } }
Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
private static Path createTempDirectory(Configuration conf) throws IOException { Path tmpRoot=new Path(conf.get(ConfigurationKeys.DEST_HDFS_TMP)); String uuid=String.format("reair_%d_%s",System.currentTimeMillis(),UUID.randomUUID().toString()); Path tmpDir=new Path(tmpRoot,uuid); FileSystem fs=tmpDir.getFileSys...
Creates a new temporary directory under the temporary directory root.
public void addMatrix(double[][] m){ assert (m.length == dim); assert (m[0].length == dim); inv=null; double[][] ht=new double[dim + 1][dim + 1]; for (int i=0; i < dim; i++) { for (int j=0; j < dim; j++) { ht[i][j]=m[i][j]; } } ht[dim][dim]=1.0; trans=times(ht,trans); }
Add a matrix operation to the matrix. Be careful to use only invertible matrices if you want an invertible affine transformation.
public static String[] explode(String s,String delimiter){ int delimiterLength; int stringLength=s.length(); if (delimiter == null || (delimiterLength=delimiter.length()) == 0) { return new String[]{s}; } int count=0; int start=0; int end; while ((end=s.indexOf(delimiter,start)) != -1) { count++...
Splits a string into an array with the specified delimiter. Original code Copyright (C) 2001,2002 Stephen Ostermiller http://ostermiller.org/utils/StringHelper.java.html <p> This method is meant to be similar to the split function in other programming languages but it does not use regular expressions. Rather the String...
private void reflectParametersInView(){ if (frontImageHolder != null) { frontImageHolder.setImageBitmap(null); frontImageHolder.setImageBitmap(frontImage); } if (backImageHolder != null) { backImageHolder.setImageBitmap(null); backImageHolder.setImageBitmap(backImage); } if (textHolder != null...
Updates the UI of this ParallaxPage to reflect the current member variables
public boolean isReadOnly() throws SQLException { return isReadOnly(true); }
Tests to see if the connection is in Read Only Mode. Note that prior to 5.6, we cannot really put the database in read only mode, but we pretend we can by returning the value of the readOnly flag
public CDialogEditFunctionNodeComment(final CGraphModel model,final INaviFunctionNode node,final InitialTab initialTab){ super(model.getParent(),"Edit Function Node Comments",true); new CDialogEscaper(this); setLayout(new BorderLayout()); m_commentsPanel=new CFunctionCommentsPanel(node.getFunction(),node); ad...
Creates a new dialog object.
public void removeIntersectedLocations(){ repositoryLocations=RepositoryLocation.removeIntersectedLocations(repositoryLocations); }
Removes locations from list, which are already included in others. If there are any problems requesting a repository, the input is returned. Example: [/1/2/3, /1, /1/2] becomes [/1].
public static Icon iconStream(String path,String name,String type){ checkNotNull(path); checkNotNull(name); checkNotNull(type); return new Icon(null); }
Gets an image stream for an icon.
public DropDownListView(Context context,boolean hijackFocus){ super(context,null,com.android.internal.R.attr.dropDownListViewStyle); mHijackFocus=hijackFocus; setCacheColorHint(0); }
<p>Creates a new list view wrapper.</p>
public int convertPosition(int position){ return position; }
Convert position to the position in the adapter been proxied to, by default returns to the position given.
public RandomPolicyLength(){ super(Harness.options,"Random Policy Length","Sequence length for the random scheduler policy",Integer.valueOf(System.getProperty("mmtk.harness.yieldpolicy.random.length","10"))); }
Create the option.
private void validateAndReport(){ if (mapping.getSource() == null) { return; } ExtensionMappingValidator validator=new ExtensionMappingValidator(); ValidationStatus v=validator.validate(mapping,resource,peek,columns); if (v != null && !v.isValid()) { if (v.getIdProblem() != null) { addActionWarn...
Validate the mapping and report any warning or errors, shown on the mapping page.
public void paintRootPaneBackground(SynthContext context,Graphics g,int x,int y,int w,int h){ }
Paints the background of a root pane.
public static void createTable(SQLiteDatabase db,boolean ifNotExists){ String constraint=ifNotExists ? "IF NOT EXISTS " : ""; db.execSQL("CREATE TABLE " + constraint + "'ADDRESS_ITEM' ("+ "'_id' INTEGER PRIMARY KEY ,"+ "'NAME' TEXT,"+ "'ADDRESS' TEXT,"+ "'CITY' TEXT,"+ "'STATE' TEXT,"+ "'PHONE' INTEGER);"); }
Creates the underlying database table.
public void onInsnsChanged(){ definitionList=null; useList=null; unmodifiableUseList=null; }
Indicates that the instruction list has changed or the SSA register count has increased, so that internal datastructures that rely on it should be rebuild. In general, the various other on* methods should be called in preference when changes occur if they are applicable.
public BuildImageParams withForceRemoveIntermediateContainers(boolean forceRemoveIntermediateContainers){ this.forceRemoveIntermediateContainers=forceRemoveIntermediateContainers; return this; }
Always remove intermediate containers (includes removeIntermediateContainer).
@Override public int hashCode(){ return mainAttributes.hashCode() ^ getEntries().hashCode(); }
Returns the hash code for this instance.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:12.114 -0500",hash_original_method="7094DD5A86271DA7E952B216F4C46CCD",hash_generated_method="39D9BB8A59FFD02C0A407B280CB1B697") private void transitionToCommitted(int loadTyp...
native callback Indicates the WebKit has committed to the new load
public static IStatus validatePackageName(String name){ return validatePackageName(name,CompilerOptions.VERSION_1_3,CompilerOptions.VERSION_1_3); }
Validate the given package name. <p> The syntax of a package name corresponds to PackageName as defined by PackageDeclaration (JLS2 7.4). For example, <code>"java.lang"</code>. <p> Note that the given name must be a non-empty package name (that is, attempting to validate the default package will return an error status....
protected final void checkMainThread(){ if (Looper.getMainLooper().getThread() != Thread.currentThread()) { throw new RuntimeException("Should run on main thread."); } }
Check if it is running on main thread, keep thread-safe.
public Graph<T> toWorker(){ return to(new ThreadNode<>(false)); }
Transfers the execution to a worker thread.
static private int assertEntryCount(final long entryCount){ if (entryCount >= Integer.MAX_VALUE) throw new UnsupportedOperationException("More than GT MAX_INT tuples: n=" + entryCount); return (int)entryCount; }
Dynamic sharding operations are not currently supported for indices with more than MAX_INT tuples. It is not really a use case for scale-out, and that is what the SplitUtility is designed to support. Various methods in this class therefore will cast to an int32 value.
public void testConstrCharMathContext(){ char[] biCA="12345678901234567890123456789012345.0E+10".toCharArray(); char[] nbiCA="-12345678901234567890123456789012345.E+10".toCharArray(); BigDecimal bd; MathContext mc; mc=new MathContext(31,RoundingMode.UP); bd=new BigDecimal(biCA,mc); assertEquals("incorrect...
new BigDecimal(char[] value, MathContext mc);
@Override public void addTouchables(@NonNull ArrayList<View> views){ for (int i=0; i < getChildCount(); i++) { final View child=getChildAt(i); if (child.getVisibility() == VISIBLE) { ItemInfo ii=infoForChild(child); if (ii != null && ii.position == currentItem) { child.addTouchables(views)...
We only want the current page that is being shown to be touchable.
public ServiceCompatibilityException(){ }
Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized.
public SingleParentMemorySubjectData(PermissionService service){ super(service); }
Creates a new subject data instance, using the provided service to request instances of permission subjects.
public void printContext(PrintStream out){ out.println(getMessage()); out.print(context); }
Prints the message and context.
void handleError(@NotNull Throwable throwable,StatusNotification notification,GitOutputConsole console){ notification.setStatus(FAIL); if (throwable instanceof UnauthorizedException) { console.printError(constant.messagesNotAuthorized()); notification.setTitle(constant.messagesNotAuthorized()); return; ...
Handler some action whether some exception happened.
@SuppressWarnings("unchecked") private void mergeAt(int i){ if (DEBUG) assert stackSize >= 2; if (DEBUG) assert i >= 0; if (DEBUG) assert i == stackSize - 2 || i == stackSize - 3; int base1=runBase[i]; int len1=runLen[i]; int base2=runBase[i + 1]; int len2=runLen[i + 1]; if (DEBUG) assert len1 >...
Merges the two runs at stack indices i and i+1. Run i must be the penultimate or antepenultimate run on the stack. In other words, i must be equal to stackSize-2 or stackSize-3.
public void removeDivider(int divId) throws Exception { checkDividerNoHasChildren(divId); m_dividers.removeNode(divId); }
Elimina un clasificador (lo marca como eliminado)
public static InputStream streamFromString(String location) throws IOException { InputStream is=null; URL url=urlFromString(location,null,false); if (url != null) { is=url.openStream(); } else { File f=new File(location); if (f.exists()) is=new FileInputStream(f); } if (is == null) { re...
Get an input string corresponding to the given location string. The string will first be resolved to a URL and an input stream will be requested from the URL connection. If this fails, the location will be resolved against the file system. Also, if a gzip file is found, the input stream will also be wrapped by a GZipIn...
public void requestUpdateFromLayout(){ }
Request an update on status by sending CBUS message. <p> There is no known way to do this, so the request is just ignored.
public ComparisonFailure(String message,String expected,String actual){ super(message); fExpected=expected; fActual=actual; }
Constructs a comparison failure.
protected void paintHorizontalPartOfLeg(Graphics g,Rectangle clipBounds,Insets insets,Rectangle bounds,TreePath path,int row,boolean isExpanded,boolean hasBeenExpanded,boolean isLeaf){ if (!paintLines) { return; } int depth=path.getPathCount() - 1; if ((depth == 0 || (depth == 1 && !isRootVisible())) && !ge...
Paints the horizontal part of the leg. The receiver should NOT modify <code>clipBounds</code>, or <code>insets</code>.<p> NOTE: <code>parentRow</code> can be -1 if the root is not visible.
@Override public void onEntered(final ActiveEntity entity,final StendhalRPZone zone,final int newX,final int newY){ if (entity instanceof Player) { if (entity.isGhost()) { return; } final Player occupant=getOccupant(); if ((occupant != null) && (occupant != entity)) { if (occupant.isGhost(...
Invoked when an entity enters the object area.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case N4JSPackage.ITERATION_STATEMENT__STATEMENT: return getStatement(); case N4JSPackage.ITERATION_STATEMENT__EXPRESSION: return getExpression(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public FieldAction(String name){ super(I18n.tr(name)); }
Constructs a new FieldAction looking up the name from the MessagesBundles.
public static long[] toLongArray(int[] array){ long[] result=new long[array.length]; for (int i=0; i < array.length; i++) { result[i]=(long)array[i]; } return result; }
Coverts given ints array to array of longs.
public TaskAttemptID attemptId(){ TaskID tid=new TaskID(jobCtx.getJobID(),taskType(taskInfo().type()),taskInfo().taskNumber()); return new TaskAttemptID(tid,taskInfo().attempt()); }
Creates Hadoop attempt ID.
public boolean hasContentType(){ return getContentType() != null; }
Returns whether it has the MIME type for the content of the error message contained in this element.
protected void fireSettingsEvent(EventType type){ fireSettingsEvent(new SettingsGroupEvent(type,this)); }
Fires a SettingsEvent
static int findBestSampleSize(int actualWidth,int actualHeight,int desiredWidth,int desiredHeight){ double wr=(double)actualWidth / desiredWidth; double hr=(double)actualHeight / desiredHeight; double ratio=Math.min(wr,hr); float n=1.0f; while ((n * 2) <= ratio) { n*=2; } return (int)n; }
Returns the largest power-of-two divisor for use in downscaling a bitmap that will not result in the scaling past the desired dimensions.
static boolean validateServiceOptions(ServiceHost host,Service service,Operation post){ for ( ServiceOption o : service.getOptions()) { String error=Utils.validateServiceOption(service.getOptions(),o); if (error != null) { host.log(Level.WARNING,error); post.fail(new IllegalArgumentException(erro...
Infrastructure use only
public void testFindAppDeployments() throws Exception { WAR war=createWar(); testConfigWar(); List<Element> l=deployer.selectAppDeployments(war,domain); assertEquals(1,l.size()); deployer.removeDeployableFromDomain(war,domain); l=deployer.selectAppDeployments(war,domain); assertEquals(0,l.size()); }
Test deployments analysis in config.xml.
private final void treeifyBin(Node<V>[] tab,int index){ Node<V> b; int n, sc; if (tab != null) { if ((n=tab.length) < MIN_TREEIFY_CAPACITY) tryPresize(n << 1); else if ((b=tabAt(tab,index)) != null && b.hash >= 0) { synchronized (b) { if (tabAt(tab,index) == b) { TreeNode<V> hd=null...
Replaces all linked nodes in bin at given index unless table is too small, in which case resizes instead.
public void loadByteArray(){ int length=0; for (int i=0; i < ops.size(); i++) { length+=ops.get(i).totalLength(); } buffer=new byte[length]; log.debug("create buffer of length " + length); resetIndex(); for (int i=0; i < ops.size(); i++) { ops.get(i).loadByteArray(this); } if (index != length)...
Reload the byte buffer from the contained instruction objects
public void endDocument() throws IOException { writer.flush(); }
Output the text for the end of a document.
public void refine(RVMMethod target){ this.target=target; setPreciseTarget(); }
Refines the target information. Used to reduce the set of targets for an invokevirtual.
@SuppressWarnings("PMD.AvoidCatchingThrowable") private void print(final Request req,final OutputStream output) throws IOException { try { new RsPrint(this.take.act(req)).print(output); } catch ( final HttpException ex) { new RsPrint(BkBasic.failure(ex,ex.code())).print(output); } catch ( final Throwab...
Print response to output stream, safely.
public void append(Value v){ if (length == items.length) { Value[] t=new Value[length * 2]; System.arraycopy(items,0,t,0,length); items=t; } items[length++]=v; }
Appends an item to the list.
public static String parseCharset(Map<String,String> headers,String defaultCharset){ String contentType=headers.get(HTTP.CONTENT_TYPE); if (contentType != null) { String[] params=contentType.split(";"); for (int i=1; i < params.length; i++) { String[] pair=params[i].trim().split("="); if (pair.l...
Retrieve a charset from headers
public synchronized long time(){ if (startNanoTime == 0) { return 0; } if (time >= 0) { return time; } return Math.max(0,TimeValue.nsecToMSec(System.nanoTime() - startNanoTime)); }
Returns elapsed time in millis, or 0 if timer was not started
public Subtract(){ super(Number.class,Number.class,Number.class); }
Constructs a new node for subtracting two numbers.