code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public JSONStringer(){
super(new StringWriter());
}
| Make a fresh JSONStringer. It can be used to build one JSON text. |
public static void f(String tag,String msg,Throwable throwable){
if (sLevel > LEVEL_FATAL) {
return;
}
Log.wtf(tag,msg,throwable);
}
| Send a FATAL ERROR log message |
public String numThreadsTipText(){
return "The number of threads to use ; -1 = number of CPUs/cores; 0 or 1 = sequential execution.";
}
| Returns the tip text for this property. |
private boolean checkStorageFileSystemExistsInDB(String nativeGuid,DbClient dbClient) throws IOException {
URIQueryResultList result=new URIQueryResultList();
dbClient.queryByConstraint(AlternateIdConstraint.Factory.getFileSystemNativeGUIdConstraint(nativeGuid),result);
if (result.iterator().hasNext()) {
retu... | check Storage fileSystem exists in DB |
public XMLBuilder addBinary(java.io.InputStream stream,int length) throws java.io.IOException {
switch (state) {
case STATE_ELEM_OPENED:
writer.write('>');
case STATE_TEXT_ADDED:
case STATE_NOTHING:
break;
default :
break;
}
Base64.encode(stream,length,writer);
state=STATE_TEXT_ADDED;
return this;
}
| Adds content of specified stream as Base64 encoded text |
@Override public DSSDocument signDocument(final byte[] signatureValue) throws DSSException {
if (!built) {
build();
}
final EncryptionAlgorithm encryptionAlgorithm=params.getEncryptionAlgorithm();
final byte[] signatureValueBytes=DSSSignatureUtils.convertToXmlDSig(encryptionAlgorithm,signatureValue);
fina... | Adds signature value to the signature and returns XML signature (InMemoryDocument) |
public TaskInfo reconfigureVirtualMachine(VMPropertyHandler paramHandler) throws Exception {
LOG.debug("instanceName: " + instanceName);
VimPortType service=vmw.getConnection().getService();
VirtualMachineConfigSpec vmConfigSpec=new VirtualMachineConfigSpec();
vmConfigSpec.setMemoryMB(Long.valueOf(paramHandler.... | Reconfigures VMware instance. Memory, CPU, disk space and network adapter. The VM has been created and must be stopped to reconfigure the hardware. |
public ThreadGroup(ThreadGroup parent,String name){
super();
if (Thread.currentThread() != null) {
parent.checkAccess();
}
this.name=name;
this.setParent(parent);
if (parent != null) {
this.setMaxPriority(parent.getMaxPriority());
if (parent.isDaemon()) {
this.setDaemon(true);
}
}
}
| Constructs a new ThreadGroup with the name provided, as child of the ThreadGroup <code>parent</code> |
public void checkPermission(String namespace,NamespacePermissionEnum[] permissions){
if (!isAuthenticated() || StringUtils.isBlank(namespace)) {
return;
}
String namespaceTrimmed=namespace.trim();
ApplicationUser applicationUser=getApplicationUser();
if (!isAuthorized(applicationUser,namespaceTrimmed,perm... | Checks the current user's permissions against the given namespace. |
public Cursor query(SQLiteDatabase db,String[] projectionIn,String selection,String[] selectionArgs,String groupBy,String having,String sortOrder,String limit,CancellationSignal cancellationSignal){
if (mTables == null) {
return null;
}
if (mStrict && selection != null && selection.length() > 0) {
String ... | Perform a query by combining all current settings and the information passed into this method. |
public List<ScannerToken<? extends Object>> lookAhead(int iLookAheadAmount) throws IOException {
int iTokensToRead=iLookAheadAmount - fNumberOfBufferedTokens;
for (; iTokensToRead > 0; iTokensToRead--, fNumberOfBufferedTokens++) {
ScannerToken<? extends Object> currToken=fScanner.readNextTerminal();
fTokenQ... | lookAhead(number of tokens to look ahead in the input) lookAhead maintains the number of buffered tokens fNumberOfBufferedTokens. If not sufficient tokens are buffered for the look ahead, read more tokens from the input. When reading after end of input there may be an IOException (depending on the concrete implementat... |
static public void stepSuspendedError(String stepId,ServiceCoded coded) throws WorkflowException {
WorkflowService.completerStepSuspendedError(stepId,coded);
}
| Sets the step state to suspended |
public boolean equals(Object other){
if (other == this) return true;
if (other == null) return false;
if (other.getClass() != this.getClass()) return false;
Interval1D that=(Interval1D)other;
return this.min == that.min && this.max == that.max;
}
| Compares this transaction to the specified object. |
public long findIndexOf(final long commitTime){
if (commitTime < 0L) throw new IllegalArgumentException();
long pos=indexOf(getKey(commitTime));
if (pos < 0) {
pos=-(pos + 1);
if (pos == 0) {
return -1;
}
pos--;
return pos;
}
else {
return pos;
}
}
| Find the index of the entry associated with the largest commitTime that is less than or equal to the given timestamp. |
@Override public void perform(IR ir){
final boolean DEBUG=false;
if (!ir.HIRInfo.dominatorsAreComputed) {
return;
}
if (ir.HIRInfo.dominatorTree == null) {
return;
}
DominatorTree tree=ir.HIRInfo.dominatorTree;
for (Enumeration<TreeNode> x=tree.getBottomUpEnumerator(); x.hasMoreElements(); ) {
... | Calculate the dominance frontier for each basic block in the CFG. Stores the result in the DominatorTree for the governing IR. <p> NOTE: The dominator tree MUST be calculated BEFORE calling this routine. |
public final void printUsage(String applicationName,String errorMsg,Options options,OutputStream out){
final PrintWriter writer=new PrintWriter(out);
final HelpFormatter usageFormatter=new HelpFormatter();
writer.println(errorMsg);
usageFormatter.printUsage(writer,PRINT_USAGE_WIDTH,applicationName,options);
u... | <p>Prints the usage statement for the specified application.</p> |
public void updateTimestamp(String columnName,java.sql.Timestamp x) throws SQLException {
updateTimestamp(findColumn(columnName),x);
}
| Updates the designated column with a <code>java.sql.Timestamp</code> value. The <code>updateXXX</code> methods are used to update column values in the current row or the insert row. The <code>updateXXX</code> methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> me... |
public static boolean isWindows(){
return _isWindows;
}
| Returns whether or not the OS is some version of Windows. |
public void __setDaoSession(DaoSession daoSession){
this.daoSession=daoSession;
myDao=daoSession != null ? daoSession.getContactDao() : null;
}
| called by internal mechanisms, do not call yourself. |
@Override public String toString(){
double maxval=0;
boolean fractional=false;
for (int i=0; i < getRowDimension(); i++) {
for (int j=0; j < getColumnDimension(); j++) {
double current=get(i,j);
if (current < 0) {
current*=-11;
}
if (current > maxval) {
maxval=current;
... | Converts a matrix to a string. (FracPete: taken from old weka.core.Matrix class) |
public void reloadSessions(Activity fromActivity){
ArrayList<MXSession> sessions=getMXSessions(fromActivity);
for ( MXSession session : sessions) {
CommonActivityUtils.logout(fromActivity,session,false);
}
clearSessions(fromActivity,false);
synchronized (LOG_TAG) {
ArrayList<HomeserverConnectionConfig>... | Reload the matrix sessions. The session caches are cleared before being reloaded. Any opened activity is closed and the application switches to the splash screen. |
public void elementEnded(String name,String systemId,int lineNr) throws Exception {
this.delegate.elementEnded(name,systemId,lineNr);
}
| Indicates that the current element has ended. |
public CSVInputAdapter(CSVInputAdapterSpec adapterSpec){
this(null,adapterSpec);
}
| Ctor for adapters that will be passed to an AdapterCoordinator. |
public static String trimOrPad(String str,int length,char padChar){
String result;
if (str == null) {
result="";
}
else {
result=str;
}
if (result.length() > length) {
return result.substring(0,length);
}
while (result.length() < length) {
result+=padChar;
}
return result;
}
| Trims or pads this string, so it has this exact length. |
public static float svgLengthToUserSpace(String s,String attr,short d,Context ctx){
float v=svgToUserSpace(s,attr,d,ctx);
if (v < 0) {
throw new BridgeException(getBridgeContext(ctx),ctx.getElement(),ErrorConstants.ERR_LENGTH_NEGATIVE,new Object[]{attr,s});
}
else {
return v;
}
}
| Returns the specified length with the specified direction in user units. A length must be greater than 0. |
private Group runCreateGroupTest() throws Exception {
when(membersInsert.execute()).thenReturn(expectedOwner);
connection.createGroup("spamlovers@hormel.com");
Group expected=createExpectedGroup("spamlovers@hormel.com");
verify(directoryGroups).insert(eq(expected));
verify(groupsInsert).execute();
verify(me... | Runs a full test to create a group and returns the expected Group. |
public boolean isAutoplay(){
return autoplay;
}
| Sets playback to start automatically |
public static String encodeWebSafe(byte[] source,boolean doPadding){
return encode(source,0,source.length,WEBSAFE_ALPHABET,doPadding);
}
| Encodes a byte array into web safe Base64 notation. |
public List<ValidationMessage> validateModel(Universe universe){
List<ValidationMessage> messages=new LinkedList<ValidationMessage>();
List<Space> spaces;
try {
spaces=universe.S();
}
catch ( ScopeException e) {
messages.add(new ValidationMessage(e.getLocalizedMessage(),universe.getProject().getId()))... | main method to perform a project validation |
private int insertDetailsDistribution(){
String sql="UPDATE M_DistributionRunLine SET MinQty = 0 WHERE MinQty IS NULL";
int no=DB.executeUpdate(sql,get_TrxName());
sql="UPDATE M_DistributionListLine SET MinQty = 0 WHERE MinQty IS NULL";
no=DB.executeUpdate(sql,get_TrxName());
sql="DELETE FROM T_DistributionRu... | Insert Details |
public final void makeSEEMove(Move move,UndoInfo ui){
ui.capturedPiece=squares[move.to];
int p=squares[move.from];
if (move.to == epSquare) {
if (p == Piece.WPAWN) {
setSEEPiece(move.to - 8,Piece.EMPTY);
}
else if (p == Piece.BPAWN) {
setSEEPiece(move.to + 8,Piece.EMPTY);
}
}
setS... | Apply a move to the current position. Special version that only updates enough of the state for the SEE function to be happy. |
@SuppressWarnings("unchecked") public static <K extends Comparable<? super K>,V>ImmutableSortedMap<K,V> of(K k1,V v1,K k2,V v2,K k3,V v3){
return ofEntries(entryOf(k1,v1),entryOf(k2,v2),entryOf(k3,v3));
}
| Returns an immutable sorted map containing the given entries, sorted by the natural ordering of their keys. |
private CNodeUpdaterFactory(){
}
| You are not supposed to instantiate this. |
public VcfSampleStripper(Set<String> sampleList,boolean keep){
mRemoveAll=false;
mKeepMode=keep;
mSamples=sampleList;
}
| Keep or remove a selected set of samples from header and records |
public AdaDelta(double rho){
setRho(rho);
}
| Creates a new AdaDelta updater |
public boolean equalSignature(Assignment obj){
if (this == obj) return true;
if (obj == null) return false;
if (label == null) {
if (obj.label != null) return false;
}
else if (!label.equals(obj.label)) return false;
return (params.length == obj.params.length);
}
| compares if the signature (label and the number of parameters matches) |
public MessageCreateEvent(int from,int to,String id,int size,int responseSize,double time){
super(from,to,id,time);
this.size=size;
this.responseSize=responseSize;
}
| Creates a message creation event with a optional response request |
public static long microsec2ticks(long us,double tempoMPQ,int resolution){
return (long)((((double)us) * resolution) / tempoMPQ);
}
| convert tempo to microsecond with given tempo Does not take tempo changes into account. Does not work for SMPTE timing! |
@Override public void fireLayoutCompleteEvent(LayoutCompleteEvent e){
if (layoutCompleteListeners != null && layoutCompleteListeners.size() != 0) {
LayoutCompleteEventListener l;
for (int i=0; i < layoutCompleteListeners.size(); i++) {
l=layoutCompleteListeners.get(i);
l.layoutCompleted(e);
}
... | Fires a LayoutCompleteEvent. |
private void readMessages() throws SyntaxError, SemanticError {
while (provider.advance()) {
Lifeline caller=null;
if (fragmentManager.readFragments()) {
continue;
}
if (!noteManager.step()) {
MessageData data=provider.nextMessage();
noteManager.closeNote(data.getCaller());
Str... | Reads lines in which messages exchanged between objects are described. Draws for each message a corresponding arrow (and before that, possibly several return arrows) on the diagram just after the message has been successfully read. Stops when there is nothing left to read. |
public void cache(String identifier,Object resource){
verifyState();
if (!cacheLocked.get()) {
resourceCache.get().put(identifier,resource);
}
}
| Adds resource to cache. |
public void start(Handler handler,ClusterProperties props) throws Exception {
if (server == null) {
server=new Server();
ServerConnector connector=new ServerConnector(server);
connector.setHost(props.httpServerHost());
connector.setPort(props.httpServerPort());
connector.setIdleTimeout(props.idleT... | Starts jetty server. |
public static String urlToolTip(final URL url){
if (url == null || !LEnv.LAUNCHER_SETTINGS.get(LSettings.DISPLAY_LINK_TOOL_TIPS)) return null;
return "<html>" + ("mailto".equals(url.getProtocol()) ? "Write e-mail to <a href=\"#\">" + url.getPath() : "Open <a href=\"#\">" + url) + "</a></html>";
}
| Returns a proper tool tip text for the specified url. |
public static String[] delimitedListToStringArray(String str,String delimiter,String charsToDelete){
if (str == null) {
return new String[0];
}
if (delimiter == null) {
return new String[]{str};
}
List<String> result=new ArrayList<>();
if ("".equals(delimiter)) {
for (int i=0; i < str.length(); ... | Take a String which is a delimited list and convert it to a String array. <p>A single delimiter can consists of more than one character: It will still be considered as single delimiter string, rather than as bunch of potential delimiter characters - in contrast to <code>tokenizeToStringArray</code>. |
public static void wtf(String tag,Throwable tr){
wtf(tag,null,tr);
}
| Prints a message at ASSERT priority. |
Map<Long,List<Long>> determineBillingPeriods(List<BillingSubscriptionData> subscriptionList){
Map<Long,List<Long>> billingPeriodMap=new HashMap<>();
for ( BillingSubscriptionData billingSubData : subscriptionList) {
long startOfBillingPeriod;
if (billingSubData.getEndOfLastBilledPeriod() != null) {
s... | Determine the billing periods, that must be processed in the current billing run and store the affected subscription ID's for the billing periods. |
public void add(short element){
if (size == elements.length) {
ensureCapacity(size + 1);
}
elements[size++]=element;
}
| Appends the specified element to the end of this list. |
public void engineSetProperty(String key,String value){
if (properties == null) {
properties=new HashMap<String,String>();
}
properties.put(key,value);
}
| Method engineSetProperty |
public void log(Level level,String sourceclass,String message){
log(level,sourceclass,"",message);
}
| prints the given message with the specified level |
public boolean nodeExists(String nodeId){
return nodes.containsKey(nodeId);
}
| Determine if a given node exists |
private void dispatchErrorNotification(String message,ReplDBMSEvent event,Throwable t){
logInfo("Dispatching error event: " + message,null);
try {
if (event == null) {
eventDispatcher.put(new ErrorNotification(message,t));
}
else {
eventDispatcher.put(new ErrorNotification(message,event.getSeqn... | Utility routine to generate an error notification while trapping interrupts. This is a terminal call and the caller thread *MUST* exit unconditionally after making it. Interrupt suppression allows the caller to complete any logging that may be necessary to diagnose the failure or provide user-visible information. |
@Override public void visit(NodeVisitor v){
if (v.visit(this)) {
getTarget().visit(v);
getProperty().visit(v);
}
}
| Visits this node, the target expression, and the property name. |
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
stream.defaultReadObject();
this.paint=SerialUtilities.readPaint(stream);
}
| Provides serialization support. |
public static byte[] toByteArray(Reader input,String encoding) throws IOException {
return toByteArray(input,Charsets.toCharset(encoding));
}
| Get the contents of a <code>Reader</code> as a <code>byte[]</code> using the specified character encoding. <p/> Character encoding names can be found at <a href="http://www.iana.org/assignments/character-sets">IANA</a>. <p/> This method buffers the input internally, so there is no need to use a <code>BufferedReader</co... |
private void teleportAway(final Player player){
if (player != null) {
final IRPZone playerZone=player.getZone();
if (playerZone.equals(zone)) {
player.teleport(zone,15,16,Direction.DOWN,player);
if (player.hasQuest(QUEST_SLOT)) {
player.setQuest(QUEST_SLOT,"done");
}
}
}
}
| Finishes the time and teleports the player out. |
public static String executeFunction(String[] values){
try {
if (values[2].equalsIgnoreCase("randompositive")) return MonetaryFunctions.randomPositiveMonetary(Integer.valueOf(values[3]));
else if (values[2].equalsIgnoreCase("randomnegative")) return MonetaryFunctions.randomNegativeMonetary(Integer.va... | Process the numeric request |
public void waitForInvocation(long msecWait,int numberOfNewEvents){
long startTime=System.currentTimeMillis();
while (true) {
if ((System.currentTimeMillis() - startTime) > msecWait) {
throw new RuntimeException("No events or less then the number of expected events received, expected " + numberOfNewEvents... | Wait for the listener invocation for up to the given number of milliseconds. |
public BuildingTarget(Coords coords,IBoard board,boolean ignite){
init(coords,board,ignite ? Targetable.TYPE_BLDG_IGNITE : Targetable.TYPE_BUILDING);
}
| Target a single hex of a building. |
static public String[] _getAttNames(){
return dcValidAttributeNames;
}
| Used by unit tests. |
void put(int key,CacheEntry entry){
cache.put(key,entry);
}
| Put value into the cache |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:36.242 -0500",hash_original_method="47F27C3C5B072C1921CEA8CD2618865D",hash_generated_method="9D8CFACFF8E35C4B4371E245059063AE") public PKCS10CertificationRequest(String signatureAlgorithm,X500Principal subject,PublicKey key,ASN1Set ... | create a PKCS10 certfication request using the named provider. |
public void normalize() throws URIException {
if (isAbsPath()) {
_path=normalize(_path);
setURI();
}
}
| Normalizes the path part of this URI. Normalization is only meant to be performed on URIs with an absolute path. Calling this method on a relative path URI will have no effect. |
private static boolean shouldRenderAttribute(Object attributeVal){
if (attributeVal instanceof String) {
return true;
}
else if (attributeVal instanceof Boolean && Boolean.FALSE.equals(attributeVal)) {
return false;
}
else if (attributeVal instanceof Integer && (Integer)attributeVal == Integer.MIN_V... | <p>Determines if an attribute should be rendered based on the specified #attributeVal.</p> |
public IdentityArrayList(final K a[],final int offset,final int length){
this(length);
System.arraycopy(a,offset,this.a,0,length);
size=length;
}
| Creates a new array list and fills it with the elements of a given array. |
public static String[] values(){
return ALL_VALUES;
}
| Returns an array of all values defined in this class. |
public void commissionReport(CommissionReport commsReport){
try {
TWSBrokerModel.logCommissionReport(commsReport);
TradeOrderfill transientInstance=m_tradePersistentModel.findTradeOrderfillByExecId(commsReport.m_execId);
if (null != transientInstance) {
TradeOrder tradeOrder=m_tradePersistentModel.f... | Method commissionReport. This will only ever be called when an execution occurs or when OnRequestExecutions is called for this clientID. |
private static void compressTable(String tableName,boolean compressInPlace) throws AdeInternalException {
logger.trace(String.format("compressTable( %s, %b ) -->entry",tableName,compressInPlace));
logger.warn(String.format("compressTable( %s ) suppressed (currently unsafe!)",tableName));
logger.trace(String.forma... | Method for invoking a known database prepared statement to compress a designated table. Typically this is done after a nontrivial number of deletions from a table have occurred, and the current database implementation is know to be a lazy space reclaimer (e.g., Derby). NOTES: At this time, Apache Derby is the databas... |
public static boolean isUserDefinedNode(String name){
return !(name.equalsIgnoreCase(NODE_ENCOUNTER_ENCOUNTER_DATETIME) || name.equalsIgnoreCase(NODE_ENCOUNTER_LOCATION_ID) || name.equalsIgnoreCase(NODE_ENCOUNTER_PROVIDER_ID)|| name.equalsIgnoreCase(NODE_PATIENT_MIDDLE_NAME)|| name.equalsIgnoreCase(NODE_PATIENT_GIVEN... | Checks if a node is a user defined one. That is not one of the standard openmrs nodes. |
Source popImportSource(){
return (Source)m_importSourceStack.pop();
}
| Pop a Source from a user provided URIResolver, corresponding to the URL popped from the m_importStack. |
@Override public void updateDouble(String columnLabel,double x) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("updateDouble(" + quote(columnLabel) + ", "+ x+ "d);");
}
update(columnLabel,ValueDouble.get(x));
}
catch ( Exception e) {
throw logAndConvert(e);
}
}
| Updates a column in the current or insert row. |
@Override public void onInstructionExit(){
clearTemporaryRegisters(m_taintedRegs);
clearTemporaryRegisters(m_newlyTaintedRegs);
clearTemporaryRegisters(m_untaintedRegs);
clearTemporaryRegisters(m_readRegs);
clearTemporaryRegisters(m_updatedRegs);
m_nativeNewlyTaintedRegs=ImmutableSet.copyOf(m_newlyTaintedRe... | Function to be called if a native instruction exit edge is traversed. Moves all internal state to the external visible native state. Also clears the temporary registers from all of the sets to prevent tracking REIL temporary registers past native instruction boundaries. |
public void add(WXDomObject child,int index){
if (child == null || index < -1 || sDestroy.get()) {
return;
}
if (children == null) {
children=new ArrayList<>();
}
int count=children.size();
index=index >= count ? -1 : index;
if (index == -1) {
children.add(child);
super.addChildAt(child,su... | Add the given WXDomObject as this object's child at specified index. |
@Override public void doInit() throws ResourceException {
super.doInit();
if (isExisting()) {
fieldNamePattern=(String)getRequestAttributes().get(IndexSchema.NAME);
try {
fieldNamePattern=null == fieldNamePattern ? "" : urlDecode(fieldNamePattern.trim()).trim();
}
catch ( UnsupportedEncodingEx... | Gets the field name pattern from the request attribute where it's stored by Restlet. |
public static XMethod createXMethod(PreorderVisitor visitor){
JavaClass javaClass=visitor.getThisClass();
Method method=visitor.getMethod();
XMethod m=createXMethod(javaClass,method);
return m;
}
| Create an XMethod object from the method currently being visited by the given PreorderVisitor. |
public void testPipelineWithNoEvents() throws Exception {
TungstenProperties config=helper.createSimpleRuntimeWithXacts(0);
ReplicatorRuntime runtime=new ReplicatorRuntime(config,new MockOpenReplicatorContext(),ReplicatorMonitor.getInstance());
runtime.configure();
runtime.prepare();
Pipeline pipeline=runtime... | Verify that pipelines with no events return default values. |
boolean expansionFilesDelivered(){
for ( XAPKFile xf : xAPKS) {
String fileName=Helpers.getExpansionAPKFileName(this,xf.mIsMain,xf.mFileVersion);
if (!Helpers.doesFileExist(this,fileName,xf.mFileSize,false)) return false;
}
return true;
}
| Go through each of the APK Expansion files defined in the structure above and determine if the files are present and match the required size. Free applications should definitely consider doing this, as this allows the application to be launched for the first time without having a network connection present. Paid applic... |
public Jerry empty(){
for ( Node node : nodes) {
node.removeAllChilds();
}
return this;
}
| Removes all child nodes of the set of matched elements from the DOM. |
public List<? extends ShardRouting> startedShards(){
return startedShards;
}
| Get started shards |
public void updateActiveProviderDetailsInDbSystem(Map<String,StorageSystemViewObject> scannedSystemsNativeGuidsMap,List<StorageSystem> systemsToPersist,Set<URI> initialScanList,Map<URI,List<String>> providersToUpdate){
Iterator<URI> storageSystemUrisInDb;
StorageSystem storageSystemInDb=null;
try {
storageSys... | Finds & update the storage systems in the following scenarios. 1. Query all systems from db. 2. If the system is not vnxblock or vmaxblock, then continue. 3. Verify each system whether it is in the scanned list or not. 4. If it is in the scannedList then update the activeprovider details. 5. If it is not in the scanned... |
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value="BC_UNCONFIRMED_CAST",justification="") @Override public void paint(final Graphics g){
final Graphics2D g2d=(Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
g2d.setRenderingHint(RenderingHint... | Paints the value. The background is filled based on selected color. |
private static void usage(){
System.out.println("Usage: BloggerClient --username <username>" + " --password <password>");
System.out.println("\nA simple application that creates, queries,\n" + "updates and deletes posts and comments on the\n" + "specified blog using the provided username and\n"+ "password for authe... | Prints the command line usage of this sample application. |
public String skipStdDevTipText(){
return "If enabled, the standard deviation is skipped, ie not output.";
}
| Describes this property. |
public void addNode(final Object node){
if (indexOutInHash.get(node) != null) return;
allNodes.add(node);
IndexOutIn ioih=new IndexOutIn(allNodes.numObjs - 1,null,null);
indexOutInHash.put(node,ioih);
}
| Add a node |
private TransferResult<CFValue,CFStore> handleMatcherGroupCount(Node possibleMatcher,Node possibleConstant,boolean isAlsoEqual,TransferInput<CFValue,CFStore> in,TransferResult<CFValue,CFStore> resultIn){
if (!(possibleMatcher instanceof MethodInvocationNode)) {
return resultIn;
}
if (!(possibleConstant instan... | See whether possibleMatcher is a call of groupCount on a Matcher and possibleConstant is a constant. If so, annotate the matcher as constant + 1 if !isAlsoEqual constant if isAlsoEqual |
@Override public void onGuiClosed(){
Keyboard.enableRepeatEvents(false);
}
| "Called when the screen is unloaded. Used to disable keyboard repeat events." |
public LocalVariableAttribute(ConstPool cp){
super(cp,tag,new byte[2]);
ByteArray.write16bit(0,info,0);
}
| Constructs an empty LocalVariableTable. |
public long readVarLong() throws IOException {
long x=readByte();
if (x >= 0) {
return x;
}
x&=0x7f;
for (int s=7; ; s+=7) {
long b=readByte();
x|=(b & 0x7f) << s;
if (b >= 0) {
return x;
}
}
}
| Read a variable size long. |
public TransformerHandler newTransformerHandler(Source src) throws TransformerConfigurationException {
Templates templates=newTemplates(src);
if (templates == null) return null;
return newTransformerHandler(templates);
}
| Get a TransformerHandler object that can process SAX ContentHandler events into a Result, based on the transformation instructions specified by the argument. |
public boolean contains(Mention mention){
return mentions.contains(mention);
}
| Returns true if this cluster contains the specified mention |
protected void onListItemClick(ListView l,View v,int position,long id){
}
| This method will be called when an item in the list is selected. Subclasses should override. Subclasses can call getListView().getItemAtPosition(position) if they need to access the data associated with the selected item. |
public static XmlFormatter createXmlFormatter(){
return new DefaultXmlFormatter();
}
| Create the default XML formatter. |
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. |
protected static long remoteGetConId(){
return InternalDistributedSystem.getAnyInstance().getId();
}
| Accessed via reflection. DO NOT REMOVE |
protected ExpressionAST createRangeExpression(DimensionIndex root,IntervalleObject innerRange) throws ScopeException {
ExpressionAST def=root.getAxis().getDefinition();
ExpressionAST lower=ExpressionMaker.LESSOREQUAL(def,innerRange.getLowerBoundExpression());
ExpressionAST upper=ExpressionMaker.LESSOREQUAL(innerR... | build an expression to filter outside of the innerRange |
public PrincipalUser(String userName,String email){
this(null,userName,email);
}
| Creates a new PrincipalUser object. |
void merge(Method m,Edge edge,Map<Integer,Block> blocks,Map<Block,FrameState> states,int pos,Expr[] frame,int sp,int scopep){
addTraceAttr("Edge",edge);
if (!blocks.containsKey(pos)) {
Block b=createBlock(m,edge,states,frame,sp,scopep);
blocks.put(pos,b);
}
else if (edge != null) {
edge.to=blocks.g... | merge state with block at position pos. If the target block doesn't exist, create it first. |
public void testCase12(){
byte bBytes[]={15,48,-29,7,98,-1,39,-128};
int bSign=-1;
byte rBytes[]={0};
BigInteger aNumber=BigInteger.ZERO;
BigInteger bNumber=new BigInteger(bSign,bBytes);
BigInteger result=aNumber.divide(bNumber);
byte resBytes[]=new byte[rBytes.length];
resBytes=result.toByteArray();
... | Divide ZERO by a negative number. |
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
if (lagGraph == null) {
throw new NullPointerException();
}
}
| Adds semantic checks to the default deserialization method. This method must have the standard signature for a readObject method, and the body of the method must begin with "s.defaultReadObject();". Other than that, any semantic checks can be specified and do not need to stay the same from version to version. A readObj... |
public void destroy(){
log.fine("");
}
| Clean up resources |
void handleSubscriberException(Throwable e,SubscriberExceptionContext context){
checkNotNull(e);
checkNotNull(context);
try {
exceptionHandler.handleException(e,context);
}
catch ( Throwable e2) {
logger.log(Level.SEVERE,String.format(Locale.ROOT,"Exception %s thrown while handling exception: %s",e2,e... | Handles the given exception thrown by a subscriber with the given context. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.