code
stringlengths
10
174k
nl
stringlengths
3
129k
public static int expectedSizeOfCategoricalDistribution(RandomVariable... vars){ return expectedSizeOfProbabilityTable(vars); }
Calculated the expected size of a CategoricalDistribution for the provided random variables.
public void onPartitionEvicted(int part){ for ( CacheContinuousQueryListener lsnr : lsnrs.values()) lsnr.onPartitionEvicted(part); for ( CacheContinuousQueryListener lsnr : intLsnrs.values()) lsnr.onPartitionEvicted(part); }
Partition evicted callback.
public static int convertFromSimplelevel(int simpleTechLvl,boolean isClan){ int legalLevel; switch (simpleTechLvl) { case TechConstants.T_SIMPLE_INTRO: legalLevel=TechConstants.T_INTRO_BOXSET; break; case TechConstants.T_SIMPLE_STANDARD: if (isClan) { legalLevel=TechConstants.T_CLAN_TW; } else { legalLevel...
Given a simple tech level and a tech base, convert to the lvl+base format
public AffineTransformOp(AffineTransform xform,int interpolationType){ validateTransform(xform); this.xform=(AffineTransform)xform.clone(); switch (interpolationType) { case TYPE_NEAREST_NEIGHBOR: case TYPE_BILINEAR: case TYPE_BICUBIC: break; default : throw new IllegalArgumentException("Unknown interpolation...
Constructs an <CODE>AffineTransformOp</CODE> given an affine transform and the interpolation type.
public final void yyclose() throws java.io.IOException { zzAtEOF=true; zzEndRead=zzStartRead; if (zzReader != null) zzReader.close(); }
Closes the input stream.
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value="SF_SWITCH_NO_DEFAULT",justification="covers all possible values") static void appendClockMessage(MrcMessage m,StringBuilder txt){ int clockModeBits=m.getElement(2) & 0xC0; switch (clockModeBits) { case 0x00: txt.append((m.getElement(2) & 0x1F) + Bundle.ge...
Adds the description of the clock's mode to a message being built
public JobCpeBuilder(String name,File yamlFile) throws BaleenException { super(name,yamlFile); }
Initiate a CpeBuilder with a YAML configuration file
private void writeTasks(CSVPrinter writer) throws IOException { writeTaskHeaders(writer); Map<String,BooleanOption> options=csvOptions.getTaskOptions(); List<CustomPropertyDefinition> customFields=myProject.getTaskCustomColumnManager().getDefinitions(); for ( Task task : myProject.getTaskManager().getTasks()) ...
Write all tasks.
@Override public void endWindow(){ if (!mergedTuple.isEmpty()) { mergedport.emit(mergedTuple); mergedTuple=new HashMap<K,Integer>(); } }
emits mergedTuple on mergedport if it is not empty
public static void printState(TLCState currentState,TLCState lastState,int num){ String stateString; if (lastState != null && TLCGlobals.printDiffsOnly) { stateString=currentState.toString(lastState); } else { stateString=currentState.toString(); } MP.printState(EC.TLC_STATE_PRINT1,new String[]{Strin...
Prints the state information if the TLC runs in print-diff-only mode and the last state is set, it will print the diff only
protected void startClient(int port){ t=new Thread(new SSClient(port),"SSClient"); t.start(); try { Thread.sleep(1000); } catch ( InterruptedException e) { System.out.println("Exception during startClinet()" + e.toString()); } }
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.
private void handleClosedMembers(HashMap<InternalDistributedMember,RegionCommitList> msgMap){ for ( InternalDistributedMember member : getCacheClosedMembers()) { RegionCommitList rcl=msgMap.get(member); for ( RegionCommit region : rcl) { markMemberOffline(member,region); } } }
Mark peers as offline that returned a cache closed exception
private void configureClassReInitializer(){ ExecutionTrace execTrace=ExecutionTracer.getExecutionTracer().getTrace(); final List<String> initializedClasses=execTrace.getInitializedClasses(); ClassReInitializer.getInstance().addInitializedClasses(initializedClasses); final boolean reset_all_classes=Properties.RE...
Reports the initialized classes during class initialization to the ClassReInitializater and configures the ClassReInitializer accordingly
public String toString(){ return this.getClass().getName() + "(" + mean+ ")"; }
Returns a String representation of the receiver.
public static void logError(ILog log,String message,Object... args){ logError(log,null,message,args); }
Log the specified error.
public MemcacheClientBuilder<V> withSRVRecord(final String srvRecord){ this.srvRecord=checkNotNull(srvRecord); return this; }
Use SRV to lookup nodes instead of a fixed set of addresses. This means that the set of nodes can change dynamically over time.
@Override public boolean onClear(){ for ( Set<ObjectChangeListener> listenerset : map.values()) { for ( ObjectChangeListener listener : listenerset) { listener.deleted(); } } map.clear(); return false; }
call deleted() on every Listener and resets this.
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:41.078 -0500",hash_original_method="3B1E2223EF9E382987FDA8605560E6C8",hash_generated_method="D66AB9153BDBC7F8146A05E91D86891E") public boolean drawEdgeGlows(Canvas canvas){ final int s...
Draw the glow effect along the sides of the widget. mEdgeGlow* must be non-null.
private void createTunnel() throws IOException, InterruptedException { while (true) { MockResponse connect=responseQueue.peek(); if (!processOneRequest(raw.getInputStream(),raw.getOutputStream(),raw)) { throw new IllegalStateException("Tunnel without any CONNECT!"); } if (connect.getSocketPolicy...
Respond to CONNECT requests until a SWITCH_TO_SSL_AT_END response is dispatched.
public boolean deleteBook(Book book){ int row=mBookshelfManager.deleteById(book); if (row != -1) { boolean deleted=mBookFileManager.deleteBookFile(book.getTitle()); if (deleted) { mBookmarkManager.deleteByBookId(book); return true; } } return false; }
Delete a book.
public byte[] toByteArray(){ try { ByteArrayOutputStream array=new ByteArrayOutputStream(); DataOutputStream out=new DataOutputStream(array); out.writeShort(width); out.writeShort(height); out.writeByte(palette.length); int plen=palette.length; for (int iter=0; iter < plen; iter++) { ...
This method allows us to store a package image into a persistent stream easily thus allowing us to store the image in RMS.
private static void compressLongestRunOfZeroes(int[] hextets){ int bestRunStart=-1; int bestRunLength=-1; int runStart=-1; for (int i=0; i < hextets.length + 1; i++) { if (i < hextets.length && hextets[i] == 0) { if (runStart < 0) { runStart=i; } } else if (runStart >= 0) { ...
Identify and mark the longest run of zeroes in an IPv6 address. <p>Only runs of two or more hextets are considered. In case of a tie, the leftmost run wins. If a qualifying run is found, its hextets are replaced by the sentinel value -1.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:10.480 -0500",hash_original_method="C478053468A8ECCA4C801EC7C4CA3211",hash_generated_method="AC4E2B54F11003706D3423743D1E5DA8") public static Metrics isBoring(CharSequence text,TextPaint paint,TextDirectionHeuristic textDir,Metrics ...
Returns null if not boring; the width, ascent, and descent in the provided Metrics object (or a new one if the provided one was null) if boring.
public void finished(int tenantclass,Operation op,long latency){ finished(op,tenantclass,0,latency); }
Indicate that the given tenantclass has finished an HDFS request that performed the specified operation
public void write(byte[] bytes) throws IOException { flushBits(); if (bytes != null && bytes.length > 0) { out.write(bytes); bytesWritten+=bytes.length; } }
Write the given bytes to the output stream
public TextLayout nextLayout(float wrappingWidth,int offsetLimit,boolean requireNextWord){ if (pos < limit) { int layoutLimit=nextOffset(wrappingWidth,offsetLimit,requireNextWord); if (layoutLimit == pos) { return null; } TextLayout result=measurer.getLayout(pos,layoutLimit); pos=layoutLimit...
Returns the next layout, and updates the current position.
public void update(byte[] m,int off,int length){ if (hashAlg == null) { throw new IllegalStateException("Call initSign or initVerify first!"); } hashAlg.update(m,off,length); }
Adds data to sign or verify.
@Interruptible public static void initForTool(String classpath){ if (VM.VerifyAssertions) VM._assert(!VM.runningVM); if (VM.VerifyAssertions) VM._assert(!VM.writingBootImage); runningTool=true; init(classpath,null); }
Prepare VM classes for use by tools.
public RoundedToolItem(final RoundedToolbar parent){ this(parent,SWT.NONE); }
Constructs a new instance of this class given its parent (which must be a <code>ToolBar</code>) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which i...
public static FixedBordersDiscretizer create(double[] samples,int size){ TDoubleArrayList borders; double min=Double.MAX_VALUE; double max=-Double.MAX_VALUE; TDoubleIntHashMap hist=new TDoubleIntHashMap(samples.length); for (int i=0; i < samples.length; i++) { hist.adjustOrPutValue(samples[i],1,1); mi...
Creates a new discretizer with bin borders defined such that each bin would contain approximately <tt>size</tt> samples from <tt>samples</tt>. Samples are sorted into bins in ascending order. If there are not sufficient (less than <tt>size</tt>) samples to fill a further bin, the remaining samples are sorted into the l...
private static String convertToken(final String token,final String arg1){ if (!StringUtils.isNumber(arg1)) { return ""; } final double value=Double.parseDouble(arg1); int decimalPoints=-1, minWidth=0; char decimal='.'; boolean padd=false, floatDecimal=false; final StringBuilder sValue=new StringBuilde...
for the use of the printf commend
private List<InstrumentHeader> populateInstrumentHeaderForChequeDD(final List<InstrumentHeader> instrumentHeaderList,final List<InstrumentHeader> instrumentProxyList){ for ( final InstrumentHeader instrumentHeader : instrumentProxyList) { if (getInstrumentType().equals(CollectionConstants.INSTRUMENTTYPE_CHEQUE))...
This instrument creates instrument header instances for the receipt, when the instrument type is Cheque or DD. The created <code>InstrumentHeader</code> instance is persisted
private static boolean show(View view,CharSequence text){ if (TextUtils.isEmpty(text)) { return false; } final int[] screenPos=new int[2]; final Rect displayFrame=new Rect(); view.getLocationOnScreen(screenPos); view.getWindowVisibleDisplayFrame(displayFrame); final Context context=view.getContext(); ...
Internal helper method to show the cheat sheet toast.
private List<E> createBulkDirectoryNodes(List<E> nodes){ int minEntries=dirMinimum; int maxEntries=dirCapacity - 1; ArrayList<E> result=new ArrayList<>(); List<List<E>> partitions=settings.bulkSplitter.partition(nodes,minEntries,maxEntries); for ( List<E> partition : partitions) { N dirNode=createNewDire...
Creates and returns the directory nodes for bulk load.
public void preventHandlingCurrentSelectionModification(){ mShouldHandleSelectionModification=false; }
Temporarily prevents the controller from handling selection modification events on the current selection. Handling will be re-enabled when a new selection is made through either a tap or long press.
TransactionInput(NetworkParameters params,Transaction parentTransaction,TransactionOutput output){ super(params); long outputIndex=output.getIndex(); outpoint=new TransactionOutPoint(params,outputIndex,output.parentTransaction); scriptBytes=EMPTY_ARRAY; sequence=NO_SEQUENCE; this.parentTransaction=parentTra...
Creates an UNSIGNED input that links to the given output
private boolean isChildOfCheck(final String bestSuperFamModelId,final String parentFamModelId){ if (bestSuperFamModelId != null && parentFamModelId != null) { if (bestSuperFamModelId.equals(parentFamModelId)) { return true; } } return false; }
Checks if parent model Id is the same as best super family model Id.
public static double nextUp(double d){ if (d == Double.POSITIVE_INFINITY) return d; else { d+=0.0d; return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d >= 0.0d) ? +1L : -1L)); } }
Replacement for the Math.nextUp(...) method that is only available in HONEYCOMB and higher. Dat's some seeeeek sheeet.
public static boolean isPermissionGranted(final Context context,final String permission){ return ContextCompat.checkSelfPermission(context,permission) == PackageManager.PERMISSION_GRANTED; }
Test if the specific user permission has been already granted.
private static void checkValidJavaIdentifier(String identifier,boolean split,String msg,String type) throws IllegalStateException { if (identifier.isEmpty()) throw new IllegalStateException(msg + " could not be empty!"); String[] parts=split ? identifier.split("\\.") : new String[]{identifier}; if (parts.length...
Checks if string is a valid java identifier.
public UseCaseCall onSuccess(OnSuccessCallback onSuccessCallback){ if (onSuccessCallback == null) { throw new IllegalArgumentException("OnSuccessCallback is null. You can not invoke it with" + " null callback."); } this.onSuccessCallback=onSuccessCallback; return this; }
The OnSuccessCallback passed as argument in this method will be referenced as a WeakReference inside RosieUseCase and UseCaseParams to avoid memory leaks during the Activity lifecycle pause-destroy stage. Remember to keep a strong reference of your OnSuccessCallback instance if needed.
private void handleOnNext(Flow.Subscriber<? super T> s,Throwable ex){ BiConsumer<? super Flow.Subscriber<? super T>,? super Throwable> h; if ((h=onNextHandler) != null) { try { h.accept(s,ex); } catch ( Throwable ignore) { } } onError(ex); }
Processes exception in Subscriber.onNext.
public int next(){ int node=_currentNode; _currentNode=m_traverser.next(_startNode,_currentNode); return returnNode(node); }
Get the next node in the iteration.
public static void main(String[] args) throws IOException { final String prefix="src/test/junit/framework/"; final int expected=30996; OutputStream os=new BufferedOutputStream(new FileOutputStream(prefix + "test-entity-2.bin",false)); Random r=new Random(); for (int i=0; i < expected; i++) { byte b=(byte)...
Test helper generates the binary entity read by one of the test cases above.
public Agent(){ }
Creates an empty agent property.
private void checkConfigurationMatchesResource(String configuration,Resource resource){ String pathToResource="//" + NS_PREFIX + "resource["+ NS_PREFIX+ "jndi-name='"+ resource.getName()+ "']"; try { if (resource.getClassName() != null) { XMLAssert.assertXpathEvaluatesTo(resource.getClassName(),pathToReso...
Check configuration for a matching resource.
public LeatherArmorMetaBuilder start(final LeatherArmorMeta meta){ return new LeatherArmorMetaBuilder(meta); }
Returns new builder of item meta data, based on given one.
public void test_initializeLjava_security_spec_AlgorithmParameterSpecLjava_security_SecureRandom() throws Exception { KeyPairGenerator keyPairGenerator=KeyPairGenerator.getInstance("DSA"); keyPairGenerator.initialize(1024); DSAPublicKey key=(DSAPublicKey)keyPairGenerator.genKeyPair().getPublic(); DSAParams para...
java.security.KeyPairGenerator#initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)
@Override public int weight(){ return term.weight() + 1; }
the length attribute of a term shows if rewritten terms (using rules of replacement as allowed for propositional logic) are shorter and therefore more efficient.
private synchronized void resumeTrackDataHub(){ trackDataHub=((TrackDetailActivity)getActivity()).getTrackDataHub(); trackDataHub.registerTrackDataListener(this,EnumSet.of(TrackDataType.TRACKS_TABLE,TrackDataType.SAMPLED_IN_TRACK_POINTS_TABLE,TrackDataType.SAMPLED_OUT_TRACK_POINTS_TABLE,TrackDataType.PREFERENCE)); ...
Resumes the trackDataHub. Needs to be synchronized because trackDataHub can be accessed by multiple threads.
public void addWeapon(Mounted w){ weapons.add(w); fireIntervalAdded(this,weapons.size() - 1,weapons.size() - 1); }
Add a new weapon to the list.
public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException { JSONArray ja=new JSONArray(); for (; ; ) { String value=getValue(x); char c=x.next(); if (value == null || (ja.length() == 0 && value.length() == 0 && c != ',')) { return null; } ja.put(value); for (; ; ) { ...
Produce a JSONArray of strings from a row of comma delimited values.
public float dot(Vector2f vec){ if (null == vec) { logger.warning("Provided vector is null, 0 returned."); return 0; } return x * vec.x + y * vec.y; }
<code>dot</code> calculates the dot product of this vector with a provided vector. If the provided vector is null, 0 is returned.
public static void runFilter(Filter filter,String[] options){ try { if (Utils.getFlag('b',options)) { Filter.batchFilterFile(filter,options); } else { Filter.filterFile(filter,options); } } catch ( Exception e) { if ((e.toString().indexOf("Help requested") == -1) && (e.toString().inde...
runs the filter instance with the given options.
public static short[] toShortArray(byte[] array){ short[] result=new short[array.length]; for (int i=0; i < array.length; i++) { result[i]=(short)array[i]; } return result; }
Coverts given bytes array to array of shorts.
public DefaultDrawingSupplier(Paint[] paintSequence,Paint[] fillPaintSequence,Paint[] outlinePaintSequence,Stroke[] strokeSequence,Stroke[] outlineStrokeSequence,Shape[] shapeSequence){ this.paintSequence=paintSequence; this.fillPaintSequence=fillPaintSequence; this.outlinePaintSequence=outlinePaintSequence; th...
Creates a new supplier.
public T proxy(String host,int port){ proxy=new HttpHost(host,port); return self(); }
Apply the proxy info to next ajax request.
public void suspendEncoding() throws java.io.IOException { flushBase64(); this.suspendEncoding=true; }
Suspends encoding of the stream. May be helpful if you need to embed a piece of base64-encoded data in a stream.
private void injectViews(View view){ ButterKnife.inject(this,view); }
ButterKnife injection
@Override public void updateBinaryStream(String columnLabel,InputStream x,int length) throws SQLException { updateBinaryStream(columnLabel,x,(long)length); }
Updates a column in the current or insert row.
public StrBuilder insert(final int index,final Object obj){ if (obj == null) { return insert(index,nullText); } return insert(index,obj.toString()); }
Inserts the string representation of an object into this builder. Inserting null will use the stored null text value.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:36:29.498 -0500",hash_original_method="568E659DC654AF7F82B3FE327FE2A97B",hash_generated_method="F153B60BE1575A843B5EC2EC8D1A33BE") public static String toString(int state){ switch (state) { case READY_TO_CALL: ...
Converts the state to string.
public UTFDataFormatException(){ }
Constructs a UTFDataFormatException with null as its error detail message.
public Tree<String> extractBestParse(int goal,int start,int end,List<String> sentence){ grammar.logarithmMode(); lexicon.logarithmMode(); double bestScore=iScore[start][end][goal]; String goalStr=(String)tagNumberer.object(goal); if (end - start == 1) { if (!grammar.isGrammarTag[goal]) { List<Tree<S...
Return all best parses (except no ties allowed on POS tags?). Note that the returned tree may be missing intermediate nodes in a unary chain because it parses with a unary-closed grammar.
public static boolean isRightTurn(Point p1,Point p2,Point p3){ if (p1.equals(p2) || p2.equals(p3)) { return false; } double val=(p2.x * p3.y + p1.x * p2.y + p3.x * p1.y) - (p2.x * p1.y + p3.x * p2.y + p1.x * p3.y); return val > 0; }
Returns true, if the three given points make a right turn.
public SamFilterParamsBuilder requireUnsetFlags(final int flags){ mRequireUnsetFlags=flags; return this; }
Specify mask indicating SAM flags that must be unset. Any record with any of these flags set will be excluded. Default is not checking any of these flags.
protected Locale parseLocale(String language,String country,String variant){ if (language == null && country == null && variant == null) { return Locale.ROOT; } else if (language != null && country == null && variant != null) { throw new IllegalArgumentException("To specify variant, country is required")...
parse a locale from a language+country+variant spec
private void replacePlaceholders(){ Properties result=new Properties(); for ( Object keyValue : props.keySet()) { String key=(String)keyValue; String value=props.getProperty(key); Pattern pattern=Pattern.compile("[$]\\{[\\w.]+\\}"); Matcher matcher=pattern.matcher(value); if (matcher.find()) { ...
Sets the environment variable values in the properties, where required.
public Device(Device device,Entity newEntity,int insertionpoint){ this.deviceManager=device.deviceManager; this.deviceKey=device.deviceKey; this.dhcpClientName=device.dhcpClientName; this.entities=new Entity[device.entities.length + 1]; if (insertionpoint < 0) { insertionpoint=-(Arrays.binarySearch(device...
Construct a new device consisting of the entities from the old device plus an additional entity. The caller needs to ensure that the additional entity is not already present in the array
public boolean isHighlightAreas(){ return null == highlightAreas ? _highlightAreas : highlightAreas.get(); }
Returns true if areas should be highlighted in case they contain the current time.
public void capturePhoto(ActionListener response){ impl.capturePhoto(response); }
This method tries to invoke the device native camera to capture images. The method returns immediately and the response will be sent asynchronously to the given ActionListener Object The image is saved as a jpeg to a file on the device. use this in the actionPerformed to retrieve the file path String path = (String) ev...
public static DBIDVar newVar(DBIDRef val){ return DBIDFactory.FACTORY.newVar(val); }
Make a new DBID variable.
public Object runSafely(Catbert.FastStack stack) throws Exception { return stack.getUIComponent(); }
Returns the UI component that this execution originated from. For 'green' process chains; this will correspond to the UI component that received the event. For 'blue' UI chains; this will correspond to the UI component who's conditionality is being determined or who's data is being evaluated. This will be null if there...
protected <T>T mapFromJson(String json,Class<T> clazz) throws JsonParseException, JsonMappingException, IOException { ObjectMapper mapper=new ObjectMapper(); return mapper.readValue(json,clazz); }
Maps a String of JSON into an instance of a Class of type T. Uses a Jackson ObjectMapper.
public static void initNube(String apiToken,String appContainerIdentifier,DroidNubeKitConstants.kEnvironmentType environmentType,Context context){ DroidNubeKit.getInstance().apiToken=apiToken; DroidNubeKit.getInstance().environmentType=environmentType; DroidNubeKit.getInstance().appContainerIdentifier=appContaine...
The method to initialize the library
public HdfsWrapper(HdfsConnection connection){ this.connection=connection; }
Creates a new instance.
@DSSink({DSSinkKind.IO}) @DSSpec(DSCat.IO) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:51.773 -0400",hash_original_method="E5A50F6C55F59DD4142D90322431FA35",hash_generated_method="739960DEFBE1047F365B92CD8C757715") @Override public void write(String str,int st,int len) throws...
Invokes the delegate's <code>write(String)</code> method.
public float nextTabStop(float x,int tabOffset){ if (tabSize == 0) return x; int ntabs=((int)x - tabBase) / tabSize; return tabBase + ((ntabs + 1) * tabSize); }
Returns the next tab stop position after a given reference position. This implementation does not support things like centering so it ignores the tabOffset argument.
public Location(final String rack,final String dataCenter){ this.rack=rack; this.dataCenter=dataCenter; }
Constructs a Location.
public void removeParameters(){ this.uriParms=new NameValueList(); }
Remove the URI parameters.
public Object remove(final Object key){ return parameters.remove(key); }
Remove a key from the parameter set.
public static Ignite start(URL springCfgUrl,@Nullable String gridName,@Nullable GridSpringResourceContext springCtx,@Nullable ClassLoader ldr) throws IgniteCheckedException { A.notNull(springCfgUrl,"springCfgUrl"); boolean isLog4jUsed=U.gridClassLoader().getResource("org/apache/log4j/Appender.class") != null; Ign...
Starts all grids specified within given Spring XML configuration file URL. If grid with given name is already started, then exception is thrown. In this case all instances that may have been started so far will be stopped too. <p> Usually Spring XML configuration file will contain only one Grid definition. Note that Gr...
protected void internalTransform(Body b,String phaseName,Map options){ UnitGraph g=new ExceptionalUnitGraph(b); LocalDefs sld=new SmartLocalDefs(g,new SimpleLiveLocals(g)); NaiveSideEffectTester nset=new NaiveSideEffectTester(); LoopFinder lf=new LoopFinder(); lf.internalTransform(b,phaseName,options); Coll...
this one uses the side effect tester
public InterestResultPolicyImpl(String name){ super(name); }
Should only be called by static field initialization in InterestResultPolicy
private SchemaColumn createSchemaColumn(SchemaColumnEntity schemaColumnEntity){ SchemaColumn schemaColumn=new SchemaColumn(); schemaColumn.setName(schemaColumnEntity.getName()); schemaColumn.setType(schemaColumnEntity.getType()); schemaColumn.setSize(schemaColumnEntity.getSize()); schemaColumn.setRequired(sch...
Creates a schema column from a schema column entity.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case N4JSPackage.PARAMETERIZED_ACCESS__TYPE_ARGS: return getTypeArgs(); } return super.eGet(featureID,resolve,coreType); }
<!-- begin-user-doc --> <!-- end-user-doc -->
private void sendProgressPatch(com.vmware.xenon.common.TaskState state,TaskState.TaskStage stage,TaskState.SubStage subStage){ switch (state.stage) { case FINISHED: TaskUtils.sendSelfPatch(this,buildPatch(stage,subStage)); break; case CANCELLED: TaskUtils.sendSelfPatch(this,buildPatch(TaskState.TaskStage.CANCELLE...
This method sends a progress patch depending of the taskState of the provided state.
public boolean isEnforceClientSecurity(){ Object oo=get_Value(COLUMNNAME_EnforceClientSecurity); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Enforce Client Security.
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value="EI_EXPOSE_REP") public String[] validBaudRates(){ return validSpeeds; }
Get an array of valid baud rates as strings. This allows subclasses to change the arrays of speeds.
@Override public boolean isTextModified(){ return burpEditor.isTextModified(); }
Check if the text is modified.
@Override public void modifyInstanceAttribute(AmazonEC2Client ec2Client,ModifyInstanceAttributeRequest modifyInstanceAttributeRequest){ ec2Client.modifyInstanceAttribute(modifyInstanceAttributeRequest); }
Modify EC2 instance attributes
public static _Fields findByName(String name){ return byName.get(name); }
Find the _Fields constant that matches name, or null if its not found.
protected boolean processMsg(int msgId) throws IOException { if (msgId == -1) return false; switch (msgId) { case TICK_PRICE: { int version=readInt(); int tickerId=readInt(); int tickType=readInt(); double price=readDouble(); int size=0; if (version >= 2) { size=readInt()...
Overridden in subclass.
public boolean isTopLevelPage(URL url){ String path=getPathWithoutSuffix(url).replaceAll("/+$",""); return path.length() == 0 && url.getQuery() == null; }
Calculates whether a URL is a top level page
@Override public void onDestroy(){ Log_OC.v(TAG,"Destroying service"); mBinder=null; mServiceHandler=null; mServiceLooper.quit(); mServiceLooper=null; mNotificationManager=null; AccountManager am=AccountManager.get(getApplicationContext()); am.removeOnAccountsUpdatedListener(this); super.onDestroy(); ...
Service clean up
public void addBoolean(int o,boolean x,boolean d){ if (force_defaults || x != d) { addBoolean(x); slot(o); } }
Add a `boolean` to a table at `o` into its vtable, with value `x` and default `d`.
public final LC minHeight(String height){ setHeight(LayoutUtil.derive(getHeight(),ConstraintParser.parseUnitValue(height,false),null,null)); return this; }
The minimum height for the container. The value will override any value that is set on the container itself. <p> For a more thorough explanation of what this constraint does see the white paper or Cheat Sheet at www.migcontainers.com.
public void triangulate(Polygon polygon){ _triangulations.clear(); _triangulations.add(polygon); start(); }
Triangulate a Polygon
public static byte[] encodeMod3Tight(int[] intArray){ BigInteger sum=BigInteger.ZERO; for (int i=intArray.length - 1; i >= 0; i--) { sum=sum.multiply(BigInteger.valueOf(3)); sum=sum.add(BigInteger.valueOf(intArray[i] + 1)); } int size=(BigInteger.valueOf(3).pow(intArray.length).bitLength() + 7) / 8; b...
Encodes an <code>int</code> array whose elements are between <code>-1</code> and <code>1</code>, to a byte array.
public AffineTransform3D(){ m00=m11=m22=1; m01=m02=m03=0; m10=m12=m13=0; m20=m21=m23=0; }
Creates a new affine transform3D set to identity