code
stringlengths
10
174k
nl
stringlengths
3
129k
public static PcRunner serializableInstance(){ return PcRunner.serializableInstance(); }
Generates a simple exemplar of this class to test serialization.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public void testGetF19(){ AbstractThrottle instance=new AbstractThrottleImpl(); boolean expResult=false; boolean result=instance.getF19(); assertEquals(expResult,result); }
Test of getF19 method, of class AbstractThrottle.
@Override public void windowLostFocus(WindowEvent e){ timer.restart(); }
Invoked when the Window is no longer the focused Window, which means that keyboard events will no longer be delivered to the Window or any of its subcomponents.
public static void writeSingleByte(OutputStream out,int b) throws IOException { byte[] buffer=new byte[1]; buffer[0]=(byte)(b & 0xff); out.write(buffer); }
Implements OutputStream.write(int) in terms of OutputStream.write(byte[], int, int). OutputStream assumes that you implement OutputStream.write(int) and provides default implementations of the others, but often the opposite is more efficient.
public final boolean hasDataSchemeSpecificPart(String data){ if (mDataSchemeSpecificParts == null) { return false; } final int numDataSchemeSpecificParts=mDataSchemeSpecificParts.size(); for (int i=0; i < numDataSchemeSpecificParts; i++) { final PluginPatternMatcher pe=mDataSchemeSpecificParts.get(i); ...
Is the given data scheme specific part included in the filter? Note that if the filter does not include any scheme specific parts, false will <em>always</em> be returned.
protected boolean dontEscape(Element element){ return props.isUseCdataFor(element.getNodeName()) && (!element.hasChildNodes() || element.getTextContent() == null || element.getTextContent().trim().length() == 0); }
encapsulate content with <[CDATA[ ]]> for things like script and style elements
private void zzDoEOF(){ if (!zzEOFDone) { zzEOFDone=true; switch (zzLexicalState) { case SCRIPT: case COMMENT: case SCRIPT_COMMENT: case STYLE: case STYLE_COMMENT: case SINGLE_QUOTED_STRING: case DOUBLE_QUOTED_STRING: case END_TAG_TAIL_EXCLUDE: case END_TAG_TAIL_SUBSTITUTE: case START_TAG_TAIL_EXCLUDE: case SERVE...
Contains user EOF-code, which will be executed exactly once, when the end of file is reached
public static void main(String[] args){ if (args.length != 1) { System.out.println("Usage = java com.aceva.devtool.ClassName <full class name>"); System.exit(1); } else { try { Class<?> aClass=Class.forName(args[0]); ClassName className=new ClassName(aClass); System.out.println("Entir...
This method exists strictly to test this class
public ClassCastException(){ super(); }
Constructs a <code>ClassCastException</code> with no detail message.
public static Thread scheduleCollectorContext(CollectorContext item){ return model.scheduleCollectorContext(item); }
Create and start a new collector thread running a particular code sequence. Used to schedule unit tests in collector context.
public void notify(int id,Notification notification){ notify(null,id,notification); }
Post a notification to be shown in the status bar. If a notification with the same id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.
public static String replaceEscapedRightAngle(String s){ StringBuilder buf=new StringBuilder(); int i=0; while (i < s.length()) { char c=s.charAt(i); if (c == '<' && s.substring(i).startsWith("<\\\\>")) { buf.append("<\\\\>"); i+="<\\\\>".length(); continue; } if (c == '>' && s.s...
Replace &gt;\&gt; with &gt;&gt; in s. Replace \&gt;&gt; unless prefix of \&gt;&gt;&gt; with &gt;&gt;. Do NOT replace if it's &lt;\\&gt;
public MatsimEventsReader(final EventsManager events){ this.events=events; }
Creates a new reader for MATSim events files.
public DefaultVirtualTerminal(){ this(new TerminalSize(80,24)); }
Creates a new virtual terminal with an initial size set
@Override public void layerChanged(final MapLayerListEvent event){ if (layerTable != null) { layerTable.repaint(event.getElement()); } redrawBaseImage=true; final int reason=event.getMapLayerEvent().getReason(); if (reason == MapLayerEvent.DATA_CHANGED) { setFullExtent(); } if (reason != MapLayerE...
Called when a map layer has changed, e.g. features added to a displayed feature collection
public void testTableAccept() throws ReplicatorException, InterruptedException { ReplicateFilter rf=new ReplicateFilter(); rf.setTungstenSchema("tungsten_foo"); rf.setDo("foo.*,bar.test1,bar.wild*,bar.w?"); filterHelper.setFilter(rf); verifyStmtAccept(filterHelper,0,"bar","insert into foo.test values(1)"); ...
Verify that we handle table acceptance including cases where the table names are wildcarded.
public SqeNotification(String type,Object source,long sequenceNumber,long timeStamp){ super(type,source,sequenceNumber,timeStamp); }
Creates a new instance of SqeNotification
void enableButtons(){ boolean enable=true; confirmPanel.getOKButton().setEnabled(true); if (hasHistory()) confirmPanel.getHistoryButton().setEnabled(enable); if (hasZoom()) confirmPanel.getZoomButton().setEnabled(enable); }
Enable OK, History, Zoom if row selected
public static LogMessage read(final DataInputStream inputStream) throws IOException { LogMessage entry=new LogMessage(); int svclen=inputStream.read(); if (svclen > 0) { byte[] svcArr=new byte[svclen]; inputStream.readFully(svcArr); entry.setService(svcArr); } int fnameOffset=inputStream.readShort...
read object back from buffer refer to the serialization format in the write method.
public void focusGained(FocusEvent e){ if (m_combo == null || m_combo.getEditor() == null) return; if ((e.getSource() != m_combo && e.getSource() != m_combo.getEditor().getEditorComponent()) || e.isTemporary() || m_haveFocus|| m_lookup == null) return; if (m_lookup.isValidated() && m_lookup.isLoaded()) { ...
Focus Listener for ComboBoxes with missing Validation or invalid entries - Requery listener for updated list
public void forgetRenderedImage(){ plotnum=-1; plot=null; }
Free memory used by rendered image.
public Request send(){ validateBeforeSending(); if (CoAP.COAP_SECURE_URI_SCHEME.equals(getScheme())) { EndpointManager.getEndpointManager().getDefaultSecureEndpoint().sendRequest(this); } else { EndpointManager.getEndpointManager().getDefaultEndpoint().sendRequest(this); } return this; }
Sends the request over the default endpoint to its destination and expects a response back.
private static void log(int logLevel,String tag,String msg){ switch (logLevel) { case Log.DEBUG: if (debugLoggingEnabled) { Log.d(tag,msg); } break; case Log.ERROR: Log.e(tag,msg); break; default : break; } }
<p>Default log statement called by other convenience methods.</p>
public void connect(String eventSourceUrl) throws IOException { LOG.entering(CLASS_NAME,"connect",eventSourceUrl); _getDelegate().connect(eventSourceUrl); }
Connects the EventSource instance to the stream location.
public byte[] toRecordBytes(){ if (getNumUserRecords() == 0) { return new byte[0]; } byte[] messageBody=this.aggregatedRecordBuilder.build().toByteArray(); this.md5.reset(); byte[] messageDigest=this.md5.digest(messageBody); ByteArrayOutputStream baos=new ByteArrayOutputStream(getSizeBytes()); baos.wr...
Serialize this record to bytes. Has no side effects (i.e. does not affect the contents of this record object).
@Override public Result decode(BinaryBitmap image,Map<DecodeHintType,?> hints) throws NotFoundException { setHints(hints); return decodeInternal(image); }
Decode an image using the hints provided. Does not honor existing state.
public static boolean exists(String test){ if (test == null) return false; return test.length() > 0; }
Does Test exist
public static void fill(long[] a,int fromIndex,int toIndex,long val){ rangeCheck(a.length,fromIndex,toIndex); for (int i=fromIndex; i < toIndex; i++) a[i]=val; }
Assigns the specified long value to each element of the specified range of the specified array of longs. The range to be filled extends from index <tt>fromIndex</tt>, inclusive, to index <tt>toIndex</tt>, exclusive. (If <tt>fromIndex==toIndex</tt>, the range to be filled is empty.)
private static Method findOverloadedMethod(Class baseClass,String methodName,Class[] types,boolean publicOnly){ if (Interpreter.DEBUG) Interpreter.debug("Searching for method: " + StringUtil.methodString(methodName,types) + " in '"+ baseClass.getName()+ "'"); Method[] methods=getCandidateMethods(baseClass,methodN...
Get the candidate methods by searching the class and interface graph of baseClass and resolve the most specific.
static final LinkedVertexHull mergeHulls(LinkedVertexHull left,LinkedVertexHull right){ LinkedVertexHull hull=new LinkedVertexHull(); hull.leftMost=left.leftMost; hull.rightMost=right.rightMost; LinkedVertex lu=left.rightMost; LinkedVertex ru=right.leftMost; Vector2 upper=lu.point.to(ru.point); for (int i...
Performs a merge of the left and right hulls into one hull.
public CloudObjectConsole(){ initComponents(); }
Creates new form CloudObjectConsole
public MessageDialog(Fragment fragment){ super(fragment,DEFAULT_REQUEST_CODE); ShareInternalUtility.registerStaticShareCallback(DEFAULT_REQUEST_CODE); }
Constructs a MessageDialog.
public VmPipeConnector(){ this(null); }
Creates a new instance.
public synchronized CloseableReference<Bitmap> convertToBitmapReference(){ Preconditions.checkNotNull(mBitmapReference,"Cannot convert a closed static bitmap"); return detachBitmapReference(); }
Convert this object to a CloseableReference&lt;Bitmap&gt;. <p>You cannot call this method on an object that has already been closed. <p>The reference count of the bitmap is preserved. After calling this method, this object can no longer be used and no longer points to the bitmap.
public DTN2Reporter(){ super.init(); DTN2Manager.setReporter(this); }
Creates a new reporter object.
private int measureShort(int measureSpec){ int result; int specMode=MeasureSpec.getMode(measureSpec); int specSize=MeasureSpec.getSize(measureSpec); if (specMode == MeasureSpec.EXACTLY) { result=specSize; } else { result=(int)(2 * mRadius + getPaddingTop() + getPaddingBottom() + 1); if (specMode ...
Determines the height of this view
public LDAPCertStore(CertStoreParameters params) throws InvalidAlgorithmParameterException { super(params); if (!(params instanceof LDAPCertStoreParameters)) throw new InvalidAlgorithmParameterException("parameters must be LDAPCertStoreParameters"); LDAPCertStoreParameters lparams=(LDAPCertStoreParameters)param...
Creates a <code>CertStore</code> with the specified parameters. For this class, the parameters object must be an instance of <code>LDAPCertStoreParameters</code>.
public PlatformUserHistory(PlatformUser c){ super(c); setOrganizationObjKey(c.getOrganization().getKey()); }
Constructs PlatformUserHistory from a PlatformUser domain object
public static JdbcConnectionPool create(ConnectionPoolDataSource dataSource){ return new JdbcConnectionPool(dataSource); }
Constructs a new connection pool.
public synchronized void logAddOrRemoveRow(Session session,int tableId,Row row,boolean add){ if (logMode != LOG_MODE_OFF) { if (!recoveryRunning) { log.logAddOrRemoveRow(session,tableId,row,add); } } }
A record is added to a table, or removed from a table.
public void printString(String v,int offset,int length) throws IOException { for (int i=0; i < length; i++) { char ch=v.charAt(i + offset); if (ch == '<') { os.write('&'); os.write('#'); os.write('6'); os.write('0'); os.write(';'); } else if (ch == '&') { os.write(...
Prints a string to the stream, encoded as UTF-8
protected boolean hasAttemptRemaining(){ return mCurrentRetryCount <= mMaxNumRetries; }
Returns true if this policy has attempts remaining, false otherwise.
static void removeChannelIfDisconnected(org.jboss.netty.channel.Channel ch){ if (ch != null && !ch.isConnected()) { CHANNEL_MAP.remove(ch); } }
Description: <br>
@DSSafe(DSCat.SAFE_OTHERS) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:00.252 -0500",hash_original_method="501AA426592E66DB320F694568AF73E3",hash_generated_method="8C779D41B6773A6B4924C7A9509A8B3E") public AuthenticationInfo(){ super(NAME); parameters.setSeparator(COMMA);...
Default contstructor.
private void scoreTrackResults(Collection<Track> tracks,SearchQuery query,Collection<ScoredResult> output){ for ( Track track : tracks) { double score=scoreTrackResult(query,track); output.add(new ScoredResult(track,score)); } }
Scores a collection of track results.
private void labelIsolatedNode(Node n,int targetIndex){ int loc=ptLocator.locate(n.getCoordinate(),arg[targetIndex].getGeometry()); n.getLabel().setAllLocations(targetIndex,loc); }
Label an isolated node with its relationship to the target geometry.
public void add_apps(@NonNull List<InstalledApp> to_add){ add_apps(to_add,true); }
Adds applications to the AppAdapter's list. In order to display a nice insertion animation, the new index of each app to insert is computed.
public DateTimeValueImpl(int year,int month,int day,int hour,int minute,int second){ super(year,month,day); this.hour=hour; this.minute=minute; this.second=second; }
Creates a new date-time value.
public synchronized void rollback() throws ReplicatorException { assertWritable(); }
Rollback transactions stored in the log.
public StrBuilder deleteCharAt(int index){ if (index < 0 || index >= size) { throw new StringIndexOutOfBoundsException(index); } deleteImpl(index,index + 1,1); return this; }
Deletes the character at the specified index.
public PullParams withImage(@NotNull String image){ requireNonNull(image); this.image=image; return this; }
Adds image to this parameters.
public SignatureVisitor visitInterfaceBound(){ return this; }
Visits an interface bound of the last visited formal type parameter.
public DrawerBuilder withStickyHeader(@NonNull View stickyHeader){ this.mStickyHeaderView=stickyHeader; return this; }
Add a sticky header below the DrawerBuilder ListView. This can be any view
private ClientSession newSession(){ ClientSession session=new ClientSession(transport.client(),selector,ioContext,connectionStrategy); if (changeListener != null) changeListener.close(); changeListener=session.onStateChange(null); eventListeners.forEach(null); return session; }
Creates a new child session.
Item newFloat(final float value){ key.set(value); Item result=get(key); if (result == null) { pool.putByte(FLOAT).putInt(key.intVal); result=new Item(index++,key); put(result); } return result; }
Adds a float to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item.
private boolean isJsFileIsInScope(IFile file,ITsconfigBuildPath tsContainer) throws CoreException { if (TypeScriptResourceUtil.isEmittedFile(file)) { return false; } IFile jsconfigFile=JsonConfigResourcesManager.getInstance().findJsconfigFile(file); if (jsconfigFile != null) { return true; } IDETsco...
Returns true if the given js, jsx file can be validated and false otherwise.
public static void installProblemMarkers(Vector<TLAMarkerInformationHolder> detectedErrors,IProgressMonitor monitor){ if (detectedErrors == null || detectedErrors.isEmpty()) { return; } for (int i=0; i < detectedErrors.size(); i++) { TLAMarkerInformationHolder holder=(TLAMarkerInformationHolder)detectedEr...
Installs the error markers from the vector of MarkerInformationHolders
protected void update(){ Attr attr=element.getAttributeNodeNS(namespaceURI,localName); if (attr == null) { baseVal=defaultValue; } else { baseVal=attr.getValue().equals("true"); } valid=true; }
Updates the base value from the attribute.
public static String renderProgram(Block program){ StringBuilder sb=new StringBuilder(); TokenConsumer tc=program.makeRenderer(sb,null); program.renderBody(new RenderContext(tc)); tc.noMoreTokens(); return sb.toString(); }
Returns a source code string for the given program without surrounding curly braces.
protected int computeRelevance(CompletionProposal proposal){ final int baseRelevance=proposal.getRelevance() * 16; switch (proposal.getKind()) { case CompletionProposal.PACKAGE_REF: return baseRelevance + 0; case CompletionProposal.LABEL_REF: return baseRelevance + 1; case CompletionProposal.KEYWORD: return bas...
Computes the relevance for a given <code>CompletionProposal</code>. <p> Subclasses may replace, but usually should not need to. </p>
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:10.261 -0500",hash_original_method="7AFE6EE6D4C15EE2C452A64798BB4D96",hash_generated_method="F882DF3E0B42A2F33ACCDD3DBBCA5BAB") public void onSensorChanged(SensorEvent event){ assert (event.values.length =...
SensorEventListener implementation. Callbacks happen on the thread on which we registered - the WebCore thread.
static Class lookUpFactoryClass(String factoryId) throws ConfigurationError { return lookUpFactoryClass(factoryId,null,null); }
Finds the implementation Class object in the specified order. The specified order is the following: <ol> <li>query the system property using <code>System.getProperty</code> <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file <li>read <code>META-INF/services/<i>factoryId</i></code> file <li>use fallback...
public void persist(SequenceLoadListener sequenceLoadListener,Map<String,SignatureLibraryRelease> analysisJobMap){ lookupProteins(analysisJobMap); persistBatch(); final Long bottomNewProteinId=bottomProteinId; final Long topNewProteinId=topProteinId; resetBounds(); for ( Protein precalculatedProtein : prec...
Following persistence of proteins, calls the SequenceLoadListener with the bounds of the proteins added, so analyses (StepInstance) can be created appropriately.
public boolean isItemEscaped(){ return (Boolean)getStateHelper().eval(PropertyKeys.itemEscaped,true); }
<p>Return the escape setting for the label of this selection item.</p>
public static void readStream(InputStream is) throws IOException { byte[] inputBuffer=new byte[256]; while (is.read(inputBuffer) != -1) { } is.close(); }
Reads the contents of an InputStream and does nothing with it.
private static Parameter buildParameter(final Map<String,GenericsType> genericFromReceiver,final Map<String,GenericsType> placeholdersFromContext,final Parameter methodParameter,final ClassNode paramType){ if (genericFromReceiver.isEmpty() && (placeholdersFromContext == null || placeholdersFromContext.isEmpty())) { ...
Given a parameter, builds a new parameter for which the known generics placeholders are resolved.
public static void writeByteArrayToFile(File file,byte[] data) throws IOException { writeByteArrayToFile(file,data,false); }
Writes a byte array to a file creating the file if it does not exist. <p> NOTE: As from v1.3, the parent directories of the file will be created if they do not exist.
public static int cs_droptol(Scs A,float tol){ return (Scs_fkeep.cs_fkeep(A,new Cs_tol(),tol)); }
Removes entries from a matrix with absolute value <= tol.
protected void clearEvents(){ sCInterface.clearEvents(); }
This method resets the incoming events (time events included).
public void clearFontChecksum(){ this.fontChecksumSet=false; }
Clears the font checksum to be used when calculating the the checksum adjustment for the header table during build time. The font checksum is the sum value of all tables but the font header table. If the font checksum has been set then further setting will be ignored until the font check sum has been cleared.
public void list(){ System.out.println(toString()); if (m_columnSet != null) m_columnSet.list(); System.out.println(); if (m_lineSet != null) m_lineSet.list(); }
List Info
@Override public boolean execute(int edMode,byte[] inputText,int offset,int len){ int needBytesForResult=-1; String KEY_ALGORITHM="AES"; try { if (Cipher.ENCRYPT_MODE == edMode) { ci.init(Cipher.ENCRYPT_MODE,new SecretKeySpec(key.getEncoded(),KEY_ALGORITHM)); iv=ci.getParameters().getParameterSpec...
Perform encryption/decryption operation (depending on the specified edMode) on the same byte buffer. Compare result with the result at an allocated buffer. If both results are equal - return true, otherwise return false.
public void runTest() throws Throwable { Document doc; NodeList elementList; Node nameNode; CharacterData child; String badString; doc=(Document)load("hc_staff",false); elementList=doc.getElementsByTagName("acronym"); nameNode=elementList.item(0); child=(CharacterData)nameNode.getFirstChild(); { b...
Runs the test case.
public void addSslPort(String newSslPort){ String newSslPorts=StringUtils.addToList(newSslPort,getSslPorts(),10); setSslPorts(newSslPorts); }
Add a new SSL port to start of current list of ports. Maximum number is 10. If port is already in list, it is brought to the first position.
public void primitivePaint(Graphics2D g2d){ if (count == 0) { return; } Thread currentThread=Thread.currentThread(); for (int i=0; i < count; ++i) { if (HaltingThread.hasBeenHalted(currentThread)) return; GraphicsNode node=children[i]; if (node == null) { continue; } node.paint...
Paints this node without applying Filter, Mask, Composite, and clip.
public void openPopupMenu(MenuLockLayer menuLockLayer){ int x=element.getAbsoluteLeft(); int y=0; popupMenu=new PopupMenu(group,actionManager,place,presentationFactory,menuLockLayer,this,keyBindingAgent,"topmenu/" + title); menuLockLayer.add(popupMenu,x,y); }
Open sub Popup Menu
void cancelDisplayTaskFor(ImageAware imageAware){ cacheKeysForImageAwares.remove(imageAware.getId()); }
Cancels the task of loading and displaying image for incoming <b>imageAware</b>.
public Builder addFileComment(String fileComment){ this.fileComment=fileComment; return this; }
Adds a file level comment. <p>This is useful to add a copyright notice, for instance.
public void endDocument() throws org.xml.sax.SAXException { }
Receive notification of the end of a document. <p>The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.</p>
protected void addShingledPhraseQueries(final BooleanQuery.Builder mainQuery,final List<Clause> clauses,final Collection<FieldParams> fields,int shingleSize,final float tiebreaker,final int slop) throws SyntaxError { if (null == fields || fields.isEmpty() || null == clauses || clauses.size() < shingleSize) return; ...
Modifies the main query by adding a new optional Query consisting of shingled phrase queries across the specified clauses using the specified field =&gt; boost mappings.
public static void main(final String[] args){ DOMTestCase.doMain(nodereplacechildinvalidnodetype.class,args); }
Runs this test from the command line.
public void deleteArc(String sParent,String sChild) throws Exception { int nParent=getNode(sParent); int nChild=getNode(sChild); deleteArc(nParent,nChild); }
Delete arc between two nodes. Distributions are updated by condensing for the parent node taking its first value.
private boolean doBasicMirrorValidation(FileShare fs,VirtualPool currentVpool,StringBuffer notSuppReasonBuff){ if (!VirtualPool.vPoolSpecifiesFileReplication(currentVpool)) { notSuppReasonBuff.append(String.format("File replication is not enabled in virtual pool - %s" + " of the requested file system -%s ",curren...
Checks to see if the file replication change is supported.
public ReplDBMSHeader lastCommitSeqno() throws ReplicatorException { String fname=commitSeqno.getPrefix() + "." + taskId; return commitSeqno.retrieve(fname); }
Fetches header data for last committed transaction for a particular channel. This is a client call to get the restart position.
private void prepareTechnicalProduct(TechnicalProduct tProd) throws NonUniqueBusinessKeyException { ParameterDefinition pd=TechnicalProducts.addParameterDefinition(ParameterValueType.INTEGER,"intParam",ParameterType.SERVICE_PARAMETER,tProd,mgr,null,null,true); ParameterOption option=new ParameterOption(); option....
Creates a parameter definition for the technical product and also an option for it. Furthermore an event definition for the technical product is created.
private boolean isValidPath(String path){ if (path == null) { return false; } if (!PATH_PATTERN.matcher(path).matches()) { return false; } int slash2Count=countToken("//",path); int slashCount=countToken("/",path); int dot2Count=countToken("..",path); return (dot2Count <= 0) || ((slashCount - sl...
Returns true if the path is valid. A <code>null</code> value is considered invalid.
public Partial addToCopy(int valueToAdd){ int[] newValues=iPartial.getValues(); newValues=getField().add(iPartial,iFieldIndex,newValues,valueToAdd); return new Partial(iPartial,newValues); }
Adds to the value of this field in a copy of this Partial. <p> The value will be added to this field. If the value is too large to be added solely to this field then it will affect larger fields. Smaller fields are unaffected. <p> If the result would be too large, beyond the maximum year, then an IllegalArgumentExcepti...
public static void appendZeroPadded(StringBuilder buff,int length,long positiveValue){ if (length == 2) { if (positiveValue < 10) { buff.append('0'); } buff.append(positiveValue); } else { String s=Long.toString(positiveValue); length-=s.length(); while (length > 0) { buff.appen...
Append a zero-padded number to a string builder.
public static void document(ClassDoc c,PrintWriter pw) throws IOException { pw.println(c.qualifiedName()); { String comment=c.commentText(); if (comment != null && !comment.equals("")) { pw.println(""); indent(comment,4,pw); pw.println(""); } } MethodDoc[] methods=getTestMethods(c); ...
Summarizes the test methods of the given class
public DocFlavor(String mimeType,String className){ if (className == null) { throw new NullPointerException(); } myMimeType=new MimeType(mimeType); myClassName=className; }
Constructs a new doc flavor object from the given MIME type and representation class name. The given MIME type is converted into canonical form and stored internally.
public void updateSpatialIndex(){ if (needToRebuildIndex) { spatialIndex=new Quadtree(); for (int i=0; i < geometries.size(); i++) { spatialIndex.insert(((MasonGeometry)geometries.get(i)).geometry.getEnvelopeInternal(),geometries.get(i)); } needToRebuildIndex=false; } }
Rebuild the spatial index from the current set of geometry <p> If the objects contained in this field have moved, then the spatial index will have to be updated. This is done by replacing the current spatial index with an entirely new one built from the same stored geometry.
public static Intent buildLaunchIntent(Context context,String title,ArrayList<VideoType.Cast> castArrayList){ return new Intent(context,AllCastActivity.class).putExtra(EXTRA_TITLE,title).putParcelableArrayListExtra(EXTRA_CAST_LIST,castArrayList); }
Returns an intent that can be used to start this activity, with all the correct parameters
public MalformedChunkCodingException(final String message){ super(message); }
Creates a MalformedChunkCodingException with the specified detail message.
public int read() throws IOException { int c=in.read(); if (c == -1) return -1; if ((c & ~0xff) != 0) { System.out.println("MD5InputStream.read() got character with (c & ~0xff) != 0)!"); } else { md5.Update(c); } return c; }
Read a byte of data.
@SuppressWarnings("unchecked") @Test public void removeLabelTypeAction() throws BusinessException { AbstractStorageLabelType<Object> labelType=mock(AbstractStorageLabelType.class); when(storageService.getLabelSuggestions(labelType)).thenReturn(Collections.<AbstractStorageLabel<Object>>emptyList()); removeLabelMan...
Remove label type.
public void hyperlinkUpdate(HyperlinkEvent e){ if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { linkActivated(e.getURL()); } }
Notification of a change relative to a hyperlink.
public Object runSafely(Catbert.FastStack stack) throws Exception { String q=(String)stack.pop(); Agent a=(Agent)stack.pop(); if (Permissions.hasPermission(Permissions.PERMISSION_RECORDINGSCHEDULE,stack.getUIMgr())) { Carny.getInstance().setRecordingQuality(a,q); Scheduler.getInstance().kick(false); } ...
Sets the name of the recording quality that should be used when recording this Favorite.
public Mapping next(){ if (iterator > top) { return null; } else { return stack[iterator++]; } }
Return the next namespace mapping in the top frame.
public static boolean extractSystem(File outputFolder,LoggerPan logger){ AdbUtils.killServer(); AdbUtils.startServer(); String[] remoteFiles={"/app","/priv-app","/framework","/build.prop","/vendor","/odex.app.sqsh","/odex.priv-app.sqsh","/odex.framework.sqsh","/vendor","/plugin","/data-app"}; int[] exitStatus=n...
extract /system from device to the given location the method uses adb host native binary to extract we test fail from the exit code of adb