code
stringlengths
10
174k
nl
stringlengths
3
129k
protected Pair(ThrowableSet caught,ThrowableSet uncaught){ this.caught=caught; this.uncaught=uncaught; }
Constructs a <code>ThrowableSet.Pair</code>.
public void unscheduleAllTimers(){ assert false : "Not implemented. Use unscheduleAllSelectors"; }
unschedule all timers. You should NEVER call this method, unless you know what you are doing.
private boolean isCacheValid(){ long now=CurrentTime.currentTime(); if ((now - _lastTime < 100) && !CurrentTime.isTest()) return true; long oldLastModified=_lastModified; long oldLength=_length; long newLastModified=getBacking().getLastModified(); long newLength=getBacking().length(); _lastTime=now; i...
Returns the last modified time for the path.
public ASN1Primitive toASN1Primitive(){ ASN1EncodableVector v=new ASN1EncodableVector(); if (keyidentifier != null) { v.add(new DERTaggedObject(false,0,keyidentifier)); } if (certissuer != null) { v.add(new DERTaggedObject(false,1,certissuer)); } if (certserno != null) { v.add(new DERTaggedObjec...
Produce an object suitable for an ASN1OutputStream.
public void removeTagDefinition(int tagId){ getTagInfo().delete(tagId); }
Removes a tag definition for given defined tag constant.
ItemTypeDescription(BaseEntry owner){ this.owner=owner; }
Creates an ItemTypeDescription.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-08-13 13:14:17.028 -0400",hash_original_method="0BA5737D802F499B64A85853275E3368",hash_generated_method="B9078954865C695972CAFFD384122A35") public int hashCode(){ return rp == null ? m : m + rp.hashCode(); }
Returns the hashcode value for this finite field.
public void providesSingletonInScope(){ isProvidingSingletonInScope=true; }
to provide a singleton using the binding's scope and reuse it inside the binding's scope
public static boolean isRowIndexMin(AggregateUnaryOperator uaggOp){ return (uaggOp.aggOp.increOp.fn instanceof Builtin && (((Builtin)(uaggOp.aggOp.increOp.fn)).bFunc == Builtin.BuiltinCode.MININDEX)); }
This will return if uaggOp is of type RowIndexMin
@NotNull private static Direction extractDirection(int directionKey){ if (directionKey == 0) { return Out; } else if (directionKey == 1) { return NullableOut; } else if (directionKey == 2) { return Pure; } else { int paramKey=directionKey - 3; int paramId=paramKey / 8; int subDire...
Converts int to Direction object.
public static Object invoke(String apiName,ApiProtocol apiProtocol){ Class<?> classname; Object classObject; Constructor constructor; Method method; Object result=null; Api api=ApiRoute.apiMap.get(apiName); if (api == null) { return ErrorHandler.error(StatusCode.API_NOT_FOUND); } if (apiProtocol.g...
invoke api resource method by apiName, but the request apiProtocol should observe routeMap regulations
public static Object[] findMethodWithListParameters(Object service,String methodName,Object[] args){ Method method=null; try { method=service.getClass().getMethod(methodName,ConversionUtils.convertParams(args)); log.debug("Exact method found (skipping list): {}",methodName); return new Object[]{method,a...
Returns (method, params) for the given service or (null, null) if not method was found.
private void buildHierarchy(Relation<V> database,Clustering<SubspaceModel> clustering,List<Cluster<SubspaceModel>> clusters,int dimensionality){ StringBuilder msg=LOG.isDebugging() ? new StringBuilder() : null; final int db_dim=RelationUtil.dimensionality(database); Hierarchy<Cluster<SubspaceModel>> hier=clusteri...
Builds the cluster hierarchy.
public EchoRequestMessage(EchoRequestMessage other){ if (other.isSetHeader()) { this.header=new AsyncMessageHeader(other.header); } }
Performs a deep copy on <i>other</i>.
@Override public void run(){ amIActive=true; String inputFilesString=null; String[] imageFiles=null; String outputName=null; String workingDirectory=null; WhiteboxRasterInfo[] images=null; int nCols=0; int nRows=0; double z; int numImages; int progress=0; int col, row; int a, i, j; double[] ...
Used to execute this plugin tool.
public int tileXToX(int tx){ return tx * tileWidth + tileGridXOffset; }
Converts a horizontal tile index into the X coordinate of its upper left pixel. This is a convenience method. No attempt is made to detect out-of-range indices.
public boolean match(Element e,String pseudoE){ Node n=e.getParentNode(); if (n != null && n.getNodeType() == Node.ELEMENT_NODE) { return ((ExtendedSelector)getAncestorSelector()).match((Element)n,null) && ((ExtendedSelector)getSimpleSelector()).match(e,pseudoE); } return false; }
Tests whether this selector matches the given element.
@Override protected void finalize() throws Throwable { mView=null; super.finalize(); }
dealloc methods
public void addIncomingEdge(final EdgeType edge){ Preconditions.checkNotNull(edge,"Error: Edge argument can't be null"); m_incomingEdges.add(edge); }
Adds an incoming edge to the node.
public static String[] delimitedListToStringArray(String str,String delimiter){ return delimitedListToStringArray(str,delimiter,null); }
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 <K,V>boolean compare(Map<K,V> mapA,Map<K,V> mapB){ if (mapA == mapB) return true; if (mapA == null || mapB == null || mapA.size() != mapB.size()) return false; for ( K key : mapA.keySet()) { V value1=mapA.get(key); V value2=mapB.get(key); if (value1 == null && value2 == null) { ...
Compares maps for value-equality: 1. Check that the maps are the same size 2. Get the set of keys from one map 3. For each key from that set you retrieved, check that the value retrieved from each map for that key is the same (if the key is absent from one map, that's a total failure of equality).
public static final XPATHErrorResources loadResourceBundle(String className) throws MissingResourceException { Locale locale=Locale.getDefault(); String suffix=getResourceSuffix(locale); try { return (XPATHErrorResources)ResourceBundle.getBundle(className + suffix,locale); } catch ( MissingResourceExcepti...
Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle().
private void createTheUserForSingleUserMode(){ if (!isInSingleUserMode()) { return; } try { final User user=dbLogic.getOrCreateUser(singleUserName); if (user == null) { logger.log(Level.SEVERE,"Could not create single user user"); return; } if (!user.getIsSingleUser()) { user...
Creates the user for single user mode.
@SuppressWarnings("unused") public static byte[] select_position_hri(byte n){ byte[] result=new byte[3]; result[0]=GS; result[1]=72; result[2]=n; return result; }
select position_hri Selects the print position of Human Readable Interpretation (HRI) characters when printing a barcode, using n as follows:
public LinearComponentExtracter(Collection lines){ this.lines=lines; }
Constructs a LineExtracterFilter with a list in which to store LineStrings found.
public QueueNode(Object contents){ m_Contents=contents; next(null); }
Creates a queue node with the given contents
@Override protected EClass eStaticClass(){ return MappingPackage.Literals.SOURCE; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static void iterate(Iterator iterator,Command command) throws Exception { while (iterator.hasNext()) { command.execute(iterator.next()); } }
Iterate passing each Command each Object that is being iterated
public Object runSafely(Catbert.FastStack stack) throws Exception { return Wizard.getInstance().searchByExactPerson(getPerson(stack)); }
Returns all Airings in the database that refer to content that is NOT a music file and includes the specified person in the list of people involved (i.e. actors, directors, producers, etc.)
public void addPostalAddress(final String addressItem){ if (postalAddress != null) { postalAddress=new ArrayList<String>(); } postalAddress.add(addressItem); }
Adds an address item to the complete address.
public final void writeInt(int val) throws IOException { Memory.pokeInt(scratch,0,val,ByteOrder.BIG_ENDIAN); write(scratch,0,SizeOf.INT); }
Writes a big-endian 32-bit integer to this file, starting at the current file pointer.
public InvitationProjectsExample(InvitationProjectsObject sample){ oredCriteria=new ArrayList<Criteria>(); Criteria criteria=this.or(); if (sample.getInvitationId() != null) { criteria.andInvitationIdEqualTo(sample.getInvitationId()); } if (sample.getProjectId() != null) { criteria.andProjectIdEqualTo...
This method was generated by MyBatis Generator. This method corresponds to the database table invitation_projects
public double calcScoreWithReversedParent(int nNode,int nCandidateParent) throws Exception { ParentSet oParentSet=m_BayesNet.getParentSet(nNode); ParentSet oParentSet2=m_BayesNet.getParentSet(nCandidateParent); Instances instances=m_BayesNet.m_Instances; if (!oParentSet.contains(nCandidateParent)) { return ...
Calc Node Score With Arrow reversed
private boolean checkTaskCanExecute(){ FileDownloadStatusFailReason failReason=null; String url=getUrl(); if (mTaskParamInfo == null) { failReason=new OnFileDownloadStatusFailReason(url,"init param is null pointer !",OnFileDownloadStatusFailReason.TYPE_NULL_POINTER); } if (failReason == null && !UrlUtil.i...
check whether the task can execute
@Override protected void onPause(){ super.onPause(); Log.d(TAG,"onPause() - another activity is taking focus (this activity " + "is about to be \"paused\")"); }
Hook method called when an Activity loses focus but is still visible in background. May be followed by onStop() or onResume(). Delegate more CPU intensive operation to onStop for seamless transition to next activity. Save persistent state (onSaveInstanceState()) in case app is killed. Often used to release exclusive re...
public static void clearAll(){ SharedPreferences sp=context.getSharedPreferences(APP_ID,Context.MODE_PRIVATE); SharedPreferences.Editor editor=sp.edit(); editor.clear().commit(); }
Clear all cache
@Override public void printMessage(final String message){ printMessage(message,preferenceStore.getBoolean(UIPreferenceConstants.CONSOLE_SHOW_ON_NEW_MESSAGE)); }
Prints a message to the console. The console is not raised.
private void computeMinDistancePolygonRings(PlanarPolygon3D poly,Polygon ringPoly,boolean flip){ computeMinDistancePolygonLine(poly,ringPoly.getExteriorRing(),flip); if (isDone) return; int nHole=ringPoly.getNumInteriorRing(); for (int i=0; i < nHole; i++) { computeMinDistancePolygonLine(poly,ringPoly.get...
Compute distance between a polygon and the rings of another.
private void recursiveCompatibleEnvironemntCollector(IN4JSSourceContainerAware sourceContainer,Collection<String> collection,Predicate<IN4JSProject> predicate,List<IN4JSProject> allRuntimeEnv){ IN4JSProject project=(extractProject(sourceContainer)); if (predicate.test(project)) { com.google.common.base.Optional...
recursively searches given source container for provided runtime environments
@Override public KeyParameter deriveKey(CharSequence password) throws KeyCrypterException { byte[] passwordBytes=null; try { passwordBytes=convertToByteArray(password); byte[] salt=new byte[0]; if (scryptParameters.getSalt() != null) { salt=scryptParameters.getSalt().toByteArray(); } else { ...
Generate AES key. This is a very slow operation compared to encrypt/ decrypt so it is normally worth caching the result.
protected boolean reverseArcMakesSense(BayesNet bayesNet,Instances instances,int iAttributeHead,int iAttributeTail){ if (iAttributeHead == iAttributeTail) { return false; } if (!isArc(bayesNet,iAttributeHead,iAttributeTail)) { return false; } int nNodes=instances.numAttributes(); boolean[] bDone=new...
reverseArcMakesSense checks whether the arc from iAttributeTail to iAttributeHead exists and reversing does not introduce a cycle
public Jerry each(JerryFunction function){ for (int i=0; i < nodes.length; i++) { Node node=nodes[i]; Jerry $this=new Jerry(this,node); if (function.onNode($this,i) == false) { break; } } return this; }
Iterates over a jQuery object, executing a function for each matched element.
@Override public void eSet(int featureID,Object newValue){ switch (featureID) { case TypesPackage.ARRAY_TYPE_SPECIFIER__SIZE: setSize((Integer)newValue); return; } super.eSet(featureID,newValue); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static StringBuffer replaceString(StringBuffer buffer,String[] parameters){ int placeHolderPosition=-1; String placeHolder=null; for (int i=0; i < parameters.length; i++) { if (parameters[i] == null) { break; } placeHolder="%" + (i + 1) + "%"; placeHolderPosition=buffer.indexOf(placeH...
Replaces the place holders by parameters
public static Map<String,Integer> parseBlastOutputFile(String pathToFile) throws IOException { Map<String,Integer> pirsfIdHitNumberMap=new HashMap<String,Integer>(); File blastOutputFile=new File(pathToFile); if (blastOutputFile == null) { throw new NullPointerException("Blast output file resource is null"); ...
Parses all PIRSF IDs out of the BLAST standard output (line by line) and counts the occurrence of each ID. The result is stored in a hash map. <p/> Example blast results file: <p/> 3 A1FUJ0 41.40 314 180 3 3 315 20 330 3.5e-55 218.4 3 Q0I9F4-SF000729 35.99 364 225 3 7 363 5 367 4.5e-55 218.0 3 Q011Y4 43.01 286 157 4 6 ...
public Expirer(){ expirerThread=new Thread(this,"ExpiringMapExpirer-" + expirerCount++); expirerThread.setDaemon(true); }
Creates a new instance of Expirer.
public void init(StreamImpl source){ _isDisableClose=false; _isDisableCloseSource=false; if (_source != null && _source != source) { try { close(); } catch ( IOException e) { } } if (source == null) throw new IllegalArgumentException(); if (_tempWrite == null) { _tempWrite=TempBu...
Initializes the stream with a given source.
public boolean removeEntry(Entry e,int dataSetIndex){ if (e == null || dataSetIndex >= mDataSets.size()) return false; boolean removed=mDataSets.get(dataSetIndex).removeEntry(e.getXIndex()); if (removed) { float val=e.getVal(); mYValCount-=1; mYValueSum-=val; calcMinMax(mDataSets); } return ...
Removes the given Entry object from the DataSet at the specified index.
public static boolean isConnected(Context context){ NetworkInfo info=getNetworkInfo(context); return (info != null && info.isConnected()); }
Check if there is any connectivity
public static void logError(final Logger logger,final Error e){ logger.logError(Level.SEVERE,"Unexpected Error",e); }
Logs an error.
public static boolean isTimeSeries(Class<? extends TaggedLogAPIEntity> clazz){ TimeSeries ts=clazz.getAnnotation(TimeSeries.class); return ts != null && ts.value(); }
Check whether the entity class is time series, false by default
public ErrorMessage(int status,String message){ this.status=status; this.message=message; }
Creates a new ErrorMessage object.
public NTRUSigningPublicKeyParameters(InputStream is,NTRUSigningParameters params) throws IOException { super(false); h=IntegerPolynomial.fromBinary(is,params.N,params.q); this.params=params; }
Reads a polynomial <code>h</code> from an input stream and constructs a new public key
public void add(Item item){ Node oldfirst=first; first=new Node(); first.item=item; first.next=oldfirst; n++; }
Adds the item to this bag.
public CipherParameters generateDerivedMacParameters(int keySize){ return generateDerivedParameters(keySize); }
Generate a key parameter for use with a MAC derived from the password, salt, and iteration count we are currently initialised with.
public void testAD_OrgBP_ID_Issue() throws Exception { MBPartner bp=new MBPartner(getCtx(),50004,getTrxName()); final int old_org_id=bp.getAD_OrgBP_ID_Int(); int new_org_id=50005; if (old_org_id == new_org_id) { new_org_id=12; } bp.setAD_OrgBP_ID(new_org_id); bp.getAD_OrgBP_ID_Int(); bp.saveEx(); }
BF [ 2859125 ] Can't set AD_OrgBP_ID https://sourceforge.net/tracker/index.php?func=detail&aid=2859125&group_id=176962&atid=879332#
public Builder permitDiskReads(){ return disable(DETECT_DISK_READ); }
Disable detection of disk reads.
@Override public double distance(NumberVector v1,NumberVector v2){ final double pcc=PearsonCorrelation.coefficient(v1,v2); return 1 - pcc * pcc; }
Computes the squared Pearson correlation distance for two given feature vectors. The squared Pearson correlation distance is computed from the Pearson correlation coefficient <code>r</code> as: <code>1-r</code><sup> <code>2</code></sup>. Hence, possible values of this distance are between 0 and 1.
public final void replaceAll(Object from,Object to,boolean onlyIfSameObject){ final int width=this.width; final int height=this.height; Object[] fieldx=null; for (int x=0; x < width; x++) { fieldx=field[x]; for (int y=0; y < height; y++) { Object obj=fieldx[y]; if ((obj == null && from == nu...
Replace instances of one value to another. Equality is measured as follows. (1) if onlyIfSameObject is true, then objects must be "== from" to one another to be considered equal. (2) if onlyIfSameObject is false, then objects in the field must be "equals(from)". In either case, null is considered equal to null.
private void highlightExpression(boolean highlight){ expressionHighlighted=highlight; if (highlight) { expressionPanel.setBorder(BorderFactory.createMatteBorder(1,1,1,1,SwingTools.RAPIDMINER_ORANGE)); expressionPanel.setBackground(Color.LIGHT_GRAY); } else { expressionPanel.setBorder(BorderFactory.cr...
Highlights the part to select, if the user wants to insert the evaluated expression of the macro
@Override protected EClass eStaticClass(){ return ImPackage.Literals.SYMBOL_TABLE_ENTRY; }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected void fail(String string){ lastPrint=0; if (string.length() > 100) { char[] data=string.toCharArray(); for (int i=0; i < data.length; i++) { char c=data[i]; if (c >= 128 || c < 32) { data[i]=(char)('a' + (c & 15)); string=null; } } if (string == null) { ...
Called if the test reached a point that was not expected.
public static void main(String[] args){ Log.printLine("Starting NetworkExample3..."); try { int num_user=2; Calendar calendar=Calendar.getInstance(); boolean trace_flag=false; CloudSim.init(num_user,calendar,trace_flag); Datacenter datacenter0=createDatacenter("Datacenter_0"); Datacenter dat...
Creates main() to run this example
public static synchronized ComponentUI createUI(JComponent label){ if (instance == null) { instance=new StyledLabelUI(StyleUtil.getStyle()); } return instance; }
Create StyledLabelUI for a label.
@Override public CompilerPhase newExecution(IR ir){ return this; }
Return this instance of this phase. This phase contains no per-compilation instance fields.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:22.053 -0500",hash_original_method="EEDFE0453AAAF2A630A301400F88A0DB",hash_generated_method="E90D1453F700D1C14BCE902B1840D5A8") public static void register(){ DdmServer.registerHandler(CHUNK_HELO,mInstance); DdmServer.registerHa...
Register for the messages we're interested in.
public static TypeReference newTypeParameterBoundReference(int sort,int paramIndex,int boundIndex){ return new TypeReference((sort << 24) | (paramIndex << 16) | (boundIndex << 8)); }
Returns a reference to a type parameter bound of a generic class or method.
private void createGui(){ for ( final IResultsPanel panel : m_factory) { m_tabbedPane.addTab(panel.getTitle(),panel.getComponent()); } add(m_tabbedPane,BorderLayout.CENTER); m_tabbedPane.setVisible(true); }
Creates the sub-components of the panel.
public CacheServerImpl(AdminDistributedSystemImpl system,GemFireVM vm) throws AdminException { super(system,vm); this.config=new CacheServerConfigImpl(vm); }
Creates a new <code>CacheServerImpl</code> that represents an existing dedicated cache server in a given distributed system.
public static AVList extractRasterParameters(Dataset ds,AVList params,boolean quickReadingMode) throws IllegalArgumentException, WWRuntimeException { if (null == params) { params=new AVListImpl(); } if (!gdalIsAvailable.get()) { String message=Logging.getMessage("gdal.GDALNotAvailable"); Logging.logge...
Extracts raster parameters to an AVList
public void measure(int reactTag,Callback callback){ mOperationsQueue.enqueueMeasure(reactTag,callback); }
Determines the location on screen, width, and height of the given view relative to the root view and returns the values via an async callback.
public void add(Make make){ if (make == this) throw new IllegalArgumentException("Can't add self as a dependency."); int p=_makeList.indexOf(make); if (p >= 0) { Make oldMake=_makeList.get(p); if (oldMake != make) _makeList.add(p,make); } else _makeList.add(make); }
Adds a dependency.
public void defineDictionary(String name,Map<String,Object> mapping){ dictionaries.put(name,mapping); }
Define a map for this group. <p> Not thread safe...do not keep adding these while you reference them.</p>
public synchronized static void removeComp(String component){ skinSpecs.remove(component); }
Remove the specified componenet from the SkinSpecs map.
protected void initLST(){ logger.fine("initializing Library Selection Table (LST)"); try { if (lst == null) { if (libraryBeanName != null) { LibraryBean libraryBean=null; BeanContext beanContext=getBeanContext(); if (beanContext == null) { return; } for ( ...
initialize the library selection table.
protected boolean isShortClassName(){ return useShortClassName; }
<p>Gets whether to output short or long class names.</p>
public synchronized void disconnect(){ if (connection != null && connection.isOpen()) { connection.close(); transaction=null; setTransaction(null); } }
Disconnects this <tt>ModbusSerialMaster</tt> from the slave.
public InputStream openClassfile(String classname){ String jarname="/" + classname.replace('.','/') + ".class"; return thisClass.getResourceAsStream(jarname); }
Obtains a class file by <code>getResourceAsStream()</code>.
public void notifyAdapter(){ try { if (mSidePanelHandler.profileAdapter != null) mSidePanelHandler.profileAdapter.notifyDataSetChanged(); mSidePanelHandler.reloadProfileAdapter(); } catch ( NullPointerException e) { e.printStackTrace(); } }
Notify the side panel adapters, check for null if they're not available yet (rare case)
public void dropAllCTFItems(Player player){ int amount; for ( String ctfItemName : ctfItemNames) { amount=player.getNumberOfEquipped(ctfItemName); if (amount > 0) { player.drop(ctfItemName,amount); } } }
drop anything the player is carrying that is ctf-related TODO: probably goes elsewhere - more general support class
@Override protected void configure(){ bind(AuditDAO.class).to(AuditDAOImpl.class).in(Singleton.class); bind(EventsDAO.class).to(EventsDAOImpl.class).in(Singleton.class); bind(StateMachinesDAO.class).to(StateMachinesDAOImpl.class).in(Singleton.class); bind(StatesDAO.class).to(StatesDAOImpl.class).in(Singleton.cl...
Performs concrete bindings for interfaces
@Override public void onBackup(ParcelFileDescriptor oldState,BackupDataOutput data,ParcelFileDescriptor newState) throws IOException { mDispatcher.performBackup(oldState,data,newState); }
Run the backup process on each of the configured handlers.
public Iterator lookupName(Identifier name){ List methodList=(List)lookupMap.get(name); if (methodList == null) { return Collections.emptyIterator(); } return methodList.iterator(); }
Returns an Iterator of all methods contained in the MethodSet which have a given name.
@Deprecated public boolean isBackingStoreEnabled(){ return scrollMode == BACKINGSTORE_SCROLL_MODE; }
Returns <code>true</code> if this viewport is maintaining an offscreen image of its contents.
public static boolean wildmatch(String str,String pat){ return wildmatch(str,pat,0,str.length(),0,pat.length()); }
Match a string against a shell-style pattern. The only pattern characters recognized are <code>?</code>, standing for any one character, and <code>*</code>, standing for any string of characters, including the empty string.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:37:58.963 -0500",hash_original_method="C2CB13972600F76BB48639CA034B1C26",hash_generated_method="BE93D2D64BA5AB54040206A47E6A751C") final synchronized void _sendDo(int option) throws IOException { if (debug || debugoptions) { Syst...
Sends a DO. <p>
public static Address fromP2SHScript(NetworkParameters params,Script scriptPubKey){ checkArgument(scriptPubKey.isPayToScriptHash(),"Not a P2SH script"); return fromP2SHHash(params,scriptPubKey.getPubKeyHash()); }
Returns an Address that represents the script hash extracted from the given scriptPubKey
public boolean isStandardPeriod(){ return PERIODTYPE_StandardCalendarPeriod.equals(getPeriodType()); }
Standard Period
@Override public boolean eIsSet(int featureID){ switch (featureID) { case UmplePackage.INVARIANT___ANONYMOUS_INVARIANT_11: return anonymous_invariant_1_1 != null && !anonymous_invariant_1_1.isEmpty(); case UmplePackage.INVARIANT___ANONYMOUS_INVARIANT_21: return anonymous_invariant_2_1 != null && !anonymous_invari...
<!-- begin-user-doc --> <!-- end-user-doc -->
@Override public void announceSeeds(){ BufferedReader reader=new BufferedReader(textSource.obtainReader()); try { announceSeedsFromReader(reader); } finally { IOUtils.closeQuietly(reader); } }
Announce all seeds from configured source to SeedListeners (including nonseed lines mixed in).
private boolean indexExists(String table) throws SQLException { return indexExists(table,null); }
Checks if some index (besides the PRIMARY-Index) exists in a given table.
public boolean hasAllSource(){ boolean yes=false; int expect=getSourceExpectedCount(); int have=getSourceCount(); if (expect == -1 && isSwdLoading()) yes=false; else if (expect == have) yes=true; else yes=false; return yes; }
This method returns true once we have all the scripts that we expect to ever have. We can get the information about how many scripts we should get from two sources, 1) we may get an InSwfInfo message from the player which contains this value and 2) we may get a InNumScript message which contains a script count. A sma...
public void removeVariables(Set<String> variables){ for ( String var : variables) { range.remove(var); } }
Remove the variables from the value range
public ContentObserver(Handler handler){ mHandler=handler; }
Creates a content observer.
private int instrumentNotNull(File dir,final InstrumentationClassFinder finder){ int instrumented=0; final File[] files=dir.listFiles(); for (int i=0; i < files.length; i++) { File file=files[i]; final String name=file.getName(); if (name.endsWith(".class")) { final String path=file.getPath(); ...
Instrument classes with NotNull annotations
public void run(){ List<SsaInsn> useList=ssaMeth.getUseListForRegister(regV); for ( SsaInsn insn : useList) { nextFunction=NextFunction.DONE; if (insn instanceof PhiInsn) { PhiInsn phi=(PhiInsn)insn; for ( SsaBasicBlock pred : phi.predBlocksForReg(regV,ssaMeth)) { blockN=pred; ...
From Appel algorithm 19.17.
private boolean isAtom(){ return "application".equals(type) && "atom+xml".equals(subType); }
Returns true if this is an atom content type.
@Override public void eUnset(int featureID){ switch (featureID) { case RegularExpressionPackage.REGULAR_EXPRESSION_FLAGS__FLAGS: getFlags().clear(); return; } super.eUnset(featureID); }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected boolean calculateSize(){ p_width=0; p_height=0; if (m_barcode == null) return true; p_width=m_barcode.getWidth(); p_height=m_barcode.getHeight(); if (p_width * p_height == 0) return true; m_scaleFactor=1f; if (p_maxWidth != 0 && p_width > p_maxWidth) m_scaleFactor=p_maxWidth / p_width; ...
Layout and Calculate Size Set p_width & p_height
private void tryGrow(Object[] array,int oldCap){ lock.unlock(); Object[] newArray=null; if (allocationSpinLock == 0 && UNSAFE.compareAndSwapInt(this,allocationSpinLockOffset,0,1)) { try { int newCap=oldCap + ((oldCap < 64) ? (oldCap + 2) : (oldCap >> 1)); if (newCap - MAX_ARRAY_SIZE > 0) { ...
Tries to grow array to accommodate at least one more element (but normally expand by about 50%), giving up (allowing retry) on contention (which we expect to be rare). Call only while holding lock.