code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
SensorSelectionModel(final VisionWorld visionWorld){
if (visionWorld == null) {
throw new IllegalArgumentException("visionWorld must not be null");
}
this.visionWorld=visionWorld;
selection=new HashSet<Sensor>();
listenerList=new EventListenerList();
}
| Create a new sensor selection model with the specified vision world. |
protected boolean matchFoundInZip(Part part) throws MessagingException, IOException {
ZipInputStream zis=new ZipInputStream(part.getInputStream());
try {
while (true) {
ZipEntry zipEntry=zis.getNextEntry();
if (zipEntry == null) {
break;
}
String fileName=zipEntry.getName();
... | Checks if <I>part</I> is a zip containing a file that matches with at least one of the <CODE>masks</CODE>. |
protected final void parseArgs(String[] args) throws AdeException {
final Options options=new Options();
OptionBuilder.withArgName(OPTION_DUMP_PARSE_REPORT);
OptionBuilder.isRequired(false);
OptionBuilder.withDescription("Specify this option to generate parse report");
options.addOption(OptionBuilder.create(O... | Method to parse specific arguments for "Upload". |
public void addObjectsToLocation(final Bag objs,final int x,final int y,final int z){
if (objs == null) return;
Bag[] fieldxy=field[x][y];
if (fieldxy[z] == null) buildBag(fieldxy,z);
fieldxy[z].addAll(objs);
}
| Adds an object to a given location. |
public static String abbreviate(String str,FontMetrics fm,int width){
int lastblank=0, nchars=0, cumx=0;
while (cumx < width && nchars < str.length()) {
if (Character.isWhitespace(str.charAt(nchars))) {
lastblank=nchars;
}
cumx+=fm.charWidth(str.charAt(nchars));
nchars++;
}
if (nchars < st... | Abbreviate a String by simply truncating it. |
private void createSceneSSBO(){
this.ssbo=glCreateBuffers();
ByteBuffer ssboData=BufferUtils.createByteBuffer(4 * (4 + 4 + 4) * boxes.length / 2);
FloatBuffer fv=ssboData.asFloatBuffer();
for (int i=0; i < boxes.length; i+=2) {
Vector3f min=boxes[i];
Vector3f max=boxes[i + 1];
fv.put(min.x).put(min.... | Create a Shader Storage Buffer Object which will hold our boxes to be read by our Compute Shader. |
public void renameSpec(Spec spec,final String newName,final IProgressMonitor aMonitor){
this.lifecycleManager.sendEvent(new SpecRenameEvent(spec,newName));
specStorage.remove(spec.getName());
IProject project=ResourceHelper.projectRename(spec.getProject(),newName,aMonitor);
spec=new Spec(project);
spec.setLas... | Renames the given spec to the given name |
public void dontAllowNull(){
setIsNullAllowed(false);
}
| PUBLIC: If <em>all</em> the fields in the database row for the aggregate object are NULL, then, by default, the mapping will place a null in the appropriate source object (as opposed to an aggregate object filled with nulls). This behavior can be explicitly set by calling #allowNull(). To change this behavior, call #do... |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
private void updateWeatherStates(){
boolean changed=temperature.update();
changed|=rain.update();
changed|=fog.update();
changed|=thunder.update();
if (changed) {
updateZones();
}
}
| Update the zone weather states. |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public boolean isMoreSpecific(MemberDefinition best,MemberDefinition other) throws ClassNotFound {
Type bestType=best.getClassDeclaration().getType();
Type otherType=other.getClassDeclaration().getType();
boolean result=isMoreSpecific(bestType,otherType) && isApplicable(other,best.getType().getArgumentTypes());
... | Returns true if "best" is in every argument at least as good as "other" |
public static IgfsException newIgfsException(Class<? extends IgfsException> cls,String msg,Throwable cause){
try {
Constructor<? extends IgfsException> ctor=cls.getConstructor(String.class,Throwable.class);
return ctor.newInstance(msg,cause);
}
catch ( ReflectiveOperationException e) {
throw new Ignit... | Construct new IGFS exception passing specified message and cause. |
@Nullable private void handlePopAnim(SupportFragment preFragment,SupportFragment from,SupportFragment to){
if (preFragment != null) {
View view=preFragment.getView();
handlePopAnim(from,view,to);
}
}
| hack anim |
public TDoubleObjectIterator(TDoubleObjectHashMap<V> map){
super(map);
_map=map;
}
| Creates an iterator over the specified map |
public String[] validBaudRates(){
return new String[]{"9,600 bps"};
}
| Get an array of valid baud rates. This is currently only 19,200 bps |
public @Test final void testCreationNegative2(){
thrown.expect(IllegalArgumentException.class);
new User("",TEST_PASSWORD);
}
| Test that it is not possible to create invalid User instances. |
public static File findModule(String root,String extension){
File r=new File(root);
if (r.exists() && r.isDirectory()) {
r=new File(r,"ceylon");
if (r.exists() && r.isDirectory()) {
r=new File(r,"language");
}
if (r.exists() && r.isDirectory()) {
File which=null;
for ( File s ... | This is a convenience method to find either the JS language module or the .src file for the Ceylon Language Module. |
public boolean enabled(){
return soot.PhaseOptions.getBoolean(options,"enabled");
}
| Enabled -- . |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String outputHeader=null;
double minVal=Double.MAX_VALUE;
double maxVal=-Double.MAX_VALUE;
int progress=0;
double z=0;
int row, col;
int rows=0;
int cols=0;
if (args.length <= 0) {
showFeedback("Plugin parameters have not be... | Used to execute this plugin tool. |
public static void splice(QuadEdge a,QuadEdge b){
QuadEdge alpha=a.oNext().rot();
QuadEdge beta=b.oNext().rot();
QuadEdge t1=b.oNext();
QuadEdge t2=a.oNext();
QuadEdge t3=beta.oNext();
QuadEdge t4=alpha.oNext();
a.setNext(t1);
b.setNext(t2);
alpha.setNext(t3);
beta.setNext(t4);
}
| Splices two edges together or apart. Splice affects the two edge rings around the origins of a and b, and, independently, the two edge rings around the left faces of <tt>a</tt> and <tt>b</tt>. In each case, (i) if the two rings are distinct, Splice will combine them into one, or (ii) if the two are the same ring, Spli... |
void initOrResetVelocityTracker(){
if (mVelocityTracker == null) {
mVelocityTracker=VelocityTracker.obtain();
}
else {
mVelocityTracker.clear();
}
}
| Velocity tracker helpers |
public boolean contains(Node node){
int low=0;
int high=nodes.size() - 1;
while (low <= high) {
int mid=(low + high) >>> 1;
Node midVal=nodes.get(mid);
if (midVal.ID < node.ID) {
low=mid + 1;
}
else if (midVal.ID > node.ID) {
high=mid - 1;
}
else {
return true;
}
... | Checks for membership of a node to the NodeSet. Checking is done with binary search on the candidates, assuming an ordered list. |
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException {
String s1=m_arg0.execute(xctxt).str();
String s2=m_arg1.execute(xctxt).str();
if (s1.length() == 0 && s2.length() == 0) return XBoolean.S_TRUE;
int index=s1.indexOf(s2);
return (index > -1) ? XBoolean.S_TRUE : XBool... | Execute the function. The function must return a valid object. |
public AnnotationVisitor visitTypeAnnotation(int typeRef,TypePath typePath,String desc,boolean visible){
if (api < Opcodes.ASM5) {
throw new RuntimeException();
}
if (fv != null) {
return fv.visitTypeAnnotation(typeRef,typePath,desc,visible);
}
return null;
}
| Visits an annotation on the type of the field. |
static void photo(long id,long restaurantId,Place place) throws IOException {
String url=RestaurantPhotos.url(place,res().getDimensionPixelSize(R.dimen.restaurant_photo_width),res().getDimensionPixelSize(R.dimen.restaurant_photo_height));
String etag=photo(id,restaurantId,url);
if (id > 0 && !TextUtils.isEmpty(et... | Download a photo for the place and save it to disk. |
private Object writeReplace(){
return new UnmodifiableList<E>(list);
}
| Replaces this UnmodifiableRandomAccessList with an UnmodifiableList so that JREs before 1.4 can deserialize this object without any problems. This is necessary since RandomAccess API was introduced only in 1.4. <p> |
public TimeParser(String dateString){
scanner=new TimeScanner(dateString);
spec=new TimeSpec(dateString);
}
| Constructs TimeParser instance from the given input string. |
public PriorityHeader createPriorityHeader(String priority) throws ParseException {
if (priority == null) throw new NullPointerException("bad priority arg");
Priority p=new Priority();
p.setPriority(priority);
return p;
}
| Creates a new PriorityHeader based on the newly supplied priority value. |
protected FetchRequest(ParameterList params){
_parameters=params;
}
| Constructs a FetchRequest from a parameter list. <p> The parameter list can be extracted from a received message with the getExtensionParams method of the Message class, and MUST NOT contain the "openid.<extension_alias>." prefix. |
public Class<K> keyType(){
return keyType;
}
| Returns the associated key type. |
protected void initGlobalToolbar(){
if (Toolbar.isGlobalToolbar()) {
setToolbar(new Toolbar());
}
}
| Allows subclasses to disable the global toolbar for a specific form by overriding this method |
public long writeStream(InputStream source) throws IOException {
if (source == null) return 0;
int len;
int length=_writeBuffer.length;
long outputLength=0;
if (length <= _writeLength) {
int tmplen=_writeLength;
_writeLength=0;
_source.write(_writeBuffer,0,tmplen,false);
_position+=tmplen;
... | Writes the contents of a JDK stream. Essentially this will copy <code>source</code> to the current stream. |
public boolean parse(String line){
if (line.startsWith(IDENTIFIER) && line.contains(REQUEST_TAKE_BACK)) {
if (LOG.isDebugEnabled()) {
LOG.debug("Processing takeback offer.");
}
TakebackMessage message=new TakebackMessage();
RaptorStringTokenizer tok=new RaptorStringTokenizer(line," ",true);
... | Returns true if line is a take back accepted message. |
public boolean isSetDeleteResponse(){
return this.deleteResponse != null;
}
| Returns true if field deleteResponse is set (has been assigned a value) and false otherwise |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.730 -0400",hash_original_method="9BC06F7377A0DB1FDB0822C77016180F",hash_generated_method="FB48DC1C3391AF406BD5DE4EBC9D775D") protected EmptyFileFilter(){
}
| Restrictive consructor. |
public CryptoException(final String message,final Throwable cause){
super(message,cause);
}
| Creates a new crypto exception. |
private static boolean isSubstitutable(XSType _base,XSType derived){
if (_base.isComplexType()) {
XSComplexType base=_base.asComplexType();
for (; base != derived; derived=derived.getBaseType()) {
if (base.isSubstitutionProhibited(derived.getDerivationMethod())) return false;
}
return true... | Implements <code>Validation Rule: Schema-Validity Assessment (Element) 1.2.1.2.4</code> |
public int start(){
return matcher.start();
}
| Returns the start index of the previous match. |
@Override protected void visit(final Object obj){
set[0]=(ITuple<?>)obj;
}
| Set the tuple for the first source each time it advances. |
public boolean removeFromReplicationGroup(URI storage,URI consistencyGroup,String repGroupName,List<URI> addVolumesList,String opId) throws ControllerException {
TaskCompleter taskCompleter=new BlockConsistencyGroupUpdateCompleter(consistencyGroup,opId);
try {
List<String> lockKeys=new ArrayList<>();
lockKe... | Orchestration method for removing members from a replication group. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
@NotNull default B append(@NotNull CharSequence cs) throws BufferOverflowException {
return append(cs,0,cs.length());
}
| Append a characters in UTF-8 |
public static String join(List<?> list,String delim){
return join((Collection<?>)list,delim);
}
| Creates a single string from a List of strings seperated by a delimiter. |
public PaletteListCellRenderer(){
super();
setOpaque(true);
setBorder(getNoFocusBorder());
setName("List.cellRenderer");
}
| Constructs a default renderer object for an item in a list. |
@Override public void addWarning(String message){
ast.printMessage(Diagnostic.Kind.WARNING,message,this,null,false);
}
| Generates a compiler warning focused on the AST node represented by this node object. |
public void addAccessibleSelection(int i){
List.this.select(i);
}
| Adds the specified selected item in the object to the object's selection. If the object supports multiple selections, the specified item is added to any existing selection, otherwise it replaces any existing selection in the object. If the specified item is already selected, this method has no effect. |
public static void assertColumnTypes(ResultSet rs,int[] expectedTypes) throws SQLException {
ResultSetMetaData rsmd=rs.getMetaData();
int actualCols=rsmd.getColumnCount();
assertEquals("Unexpected column count:",expectedTypes.length,rsmd.getColumnCount());
for (int i=0; i < actualCols; i++) {
assertEquals("... | Test Method from Apache Derby Project Class org.apache.derbyTesting.functionTests.tests.jdbcapi.DatabaseMetaDataTest Takes a result set and an array of expected column types from java.sql.Types and asserts that the column types in the result set metadata match the number, order, and names of those in the array. No leng... |
public PipelineConfigurationJson savePipeline(String pipelineName,PipelineConfigurationJson pipeline,String rev,String description) throws ApiException {
Object postBody=pipeline;
byte[] postBinaryBody=null;
if (pipelineName == null) {
throw new ApiException(400,"Missing the required parameter 'pipelineName' ... | Update an existing Pipeline Configuration by name |
@SuppressLint("LongLogTag") private void refreshRoomMembersList(final String aSearchedPattern,boolean aIsRefreshForced){
if (null != mAdapter) {
mProgressView.setVisibility(View.VISIBLE);
mAdapter.setSearchedPattern(aSearchedPattern,mSearchListener,aIsRefreshForced);
}
else {
Log.w(LOG_TAG,"## refreshR... | Perform a search request: the adapter is asked to filter the display according to the search pattern. The pattern to search is given in aSearchedPattern. To cancel the search, and display the room members without any criteria, set aSearchedPattern to NO_PATTERN_FILTER. |
public static List<List<Object>> parsePrimaryKeys(String pkList,Index primaryKey){
final List<IndexColumn> keyColumns=primaryKey.getKeyColumns();
final int columnCount=keyColumns.size();
List<List<Object>> results=new ArrayList<>();
String[] allPKs=pkList.split(";");
for ( String pk : allPKs) {
String[] ... | Parse a string containing a semi-colon separated list of PRIMARY KEYs. <p> PRIMARY KEY: Comma separated list COLUMNs<br/> COLUMN: URL encoded field value OR URL encoded name=value pairs<br/> </p> <p> For example, <ul> <li>Single entity:</li> <ul> <li>/1</li> <li>/id=1</li> </ul> <li>Multiple entities:</li> <ul> <li>/1;... |
public void propertyChange(PropertyChangeEvent evt){
if (evt.getPropertyName().equals(org.compiere.model.GridField.PROPERTY)) setValue(evt.getNewValue());
}
| Property Change Listener |
public static void dismissKeyboard(Activity activity){
InputMethodManager imm=(InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);
View currentFocus=activity.getCurrentFocus();
if (currentFocus != null) {
imm.hideSoftInputFromWindow(currentFocus.getWindowToken(),0);
}
}
| Hides soft keyboard if it's opened. |
@Override public void reset(){
resetState();
updateNAC(null);
updateSite(null);
updateSystem(null);
}
| Performs a full reset to prepare this object for reuse on a new channel |
public boolean isSameIgnoresHash(AuthTime old){
return client.equals(old.client) && server.equals(old.server) && ctime == old.ctime && cusec == old.cusec;
}
| Compares with a possibly old style object. Used in DflCache$Storage#loadAndCheck. |
public void removeTableModelListener(TableModelListener l){
if (getModel() != null) ((ArffTableModel)getModel()).removeTableModelListener(l);
}
| removes a listener from the list that is notified each time a change to the data model occurs |
@Override public boolean hasOverlappingRendering(){
return false;
}
| Allows for smoother animation. |
public static boolean isIndependentPooledStouffer(List<IndependenceTest> independenceTests,Node x,Node y,List<Node> condSet){
double alpha=independenceTests.get(0).getAlpha();
double ts=0.0;
for ( IndependenceTest independenceTest : independenceTests) {
List<Node> localCondSet=new ArrayList<>();
for ( ... | Checks independence from pooled samples using Stouffer et al.'s method <p> See S. A. Stouffer, E. A. Suchman, L. C. Devinney, S. A. Star, and R. M. Williams. The American Soldier: Vol. 1. Adjustment During Army Life. Princeton University Press, 1949. |
public void warmupMovementModel(double time){
if (time <= 0) {
return;
}
while (SimClock.getTime() < -updateInterval) {
moveHosts(updateInterval);
simClock.advance(updateInterval);
}
double finalStep=-SimClock.getTime();
moveHosts(finalStep);
simClock.setTime(0);
}
| Moves hosts in the world for the time given time initialize host positions properly. SimClock must be set to <CODE>-time</CODE> before calling this method. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case N4mfPackage.INIT_MODULES__INIT_MODULES:
return getInitModules();
}
return super.eGet(featureID,resolve,coreType);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public AlchemyLanguage(){
super();
}
| Instantiates a new alchemy data news service. |
public MultiConfirmDialog(Window owner,String i18nKey,int mode,Object... i18nArgs){
super(owner,i18nKey,mode,false,i18nArgs);
}
| Creates a confirm dialog where the user can select that his selection should apply to all cases. |
private static void saveAttributes(AnnotationAttributes source,RestorableSupport restorableSupport,RestorableSupport.StateObject context){
if (source == null || restorableSupport == null) throw new IllegalArgumentException();
if (source.frameShape != null) restorableSupport.addStateValueAsString(context,"frameS... | Save the attributes specified by <code>source</code> in the specified <code>restorableSupport</code>. Only attributes that have been set by the application (attributes not pointing to their default value) will be saved. If <code>context</code> is not null, attributes will be saved beneath it. Otherwise, they will be sa... |
public XCardDocument(File file) throws SAXException, IOException {
this(XmlUtils.toDocument(file));
}
| Parses an xCard document from a file. |
private static String determineWindowsLibrary(final String library,final String osName,final String osArch){
String resourceName;
String platform;
String fileExtension="dll";
switch (osArch) {
case "i386":
case "x86":
platform="windows-x32";
break;
case "amd64":
case "x86_64":
platform="windows-x64";
break;... | Determine the right windows library depending on the architecture. |
public Matrix4f invertOrtho(){
return invertOrtho(this);
}
| Invert <code>this</code> orthographic projection matrix. <p> This method can be used to quickly obtain the inverse of an orthographic projection matrix. |
private void enchantRandomly(Random rand,ItemStack itemStack,int itemEnchantability,int modStr){
int remainStr=(modStr + 1) / 2;
List<?> enchantments=EnchantmentHelper.buildEnchantmentList(rand,itemStack,itemEnchantability);
if (enchantments != null) {
Iterator<?> iter=enchantments.iterator();
while (iter... | Custom Enchanting Helper |
public boolean canScrollDown(){
return mScroll > mMinScroll;
}
| Check if can scroll down to show top |
public ReaderComponent(String name){
super(name);
world=ReaderWorld.createReaderWorld();
init();
}
| Creates a new frame of type TextWorld. |
public void zoomIn(){
if (sourceImage == null) return;
Rectangle rect=getClientArea();
int w=rect.width, h=rect.height;
double dx=((double)w) / 2;
double dy=((double)h) / 2;
centerZoom(dx,dy,ZOOMIN_RATE,transform);
}
| Zoom in around the center of client Area. |
void removePendingTransaction(String txCoordinatorLink){
boolean toggleTransactionPending=false;
synchronized (this.context) {
if (this.context.txCoordinatorLinks == null) {
return;
}
this.context.txCoordinatorLinks.remove(txCoordinatorLink);
toggleTransactionPending=this.context.txCoordinatorLi... | Removes the specified coordinator link from this service' pending transactions |
private long downloadToFile(String downloadUrl,File file,long maxSize,long minSize){
if (file.exists() && file.length() > 0) return file.length();
if (checkCancelRequested()) return 0;
long byteWritten=0;
boolean error=false;
InputStream is=null;
try (FileOutputStream fos=new FileOutputStream(file)){
... | Downloads a given URL directly to a file, when maxSize bytes are reached the download is stopped and the file is deleted. |
protected Character isWFXMLChar(String chardata){
Character refInvalidChar;
if (chardata == null || (chardata.length() == 0)) {
return null;
}
char[] dataarray=chardata.toCharArray();
int datalength=dataarray.length;
if (fIsXMLVersion11) {
int i=0;
while (i < datalength) {
if (XML11Char.is... | Checks if a XML character is well-formed. If there is a problem with the character a non-null Character is returned else null is returned. |
public boolean uninstallCounters(){
return debugCounterService.removeCounterHierarchy(COUNTER_MODULE,dpidAndConnIdString);
}
| Remove all counters from the IDebugCounterService. Should be done if the switch connection disconnects from the controller, in which case all the counters will be invalid. |
public void addFilter(Filter filter){
int size=filters.size();
if (size == 0 || filter.type == FilterType.SHOW || filters.get(size - 1).type != FilterType.SHOW) {
filters.add(filter);
}
else {
for (int i=0; i < size; i++) {
if (filters.get(i).type == FilterType.SHOW) {
filters.add(i,filter)... | Adds the given filter to the list of filters. Maintains the invariant that all 'show' filters are listed after other types of filters. |
public static String toJavaName(String classname){
return classname.replace('/','.');
}
| Converts a class name from the internal representation used in the JVM to the normal one used in Java. This method does not deal with an array type name such as "[Ljava/lang/Object;" and "[I;". For such names, use <code>toClassName()</code>. |
public static String timestampToHumanDateAndTime(long timestamp){
return m_dateAndTime.get().format(new Date(timestamp));
}
| Convert a timestamp to a humanly readable date and time. |
AddressAttribute(char attributeType){
super(attributeType);
}
| Constructs an address attribute with the specified type. |
public boolean isCovering(){
return covering.size() > 0;
}
| Check if the current tile is covering more detailed tiles that are currently being loaded. |
public ListModelTable(Collection collection){
super(collection);
m_noColumns=0;
for ( Object row : getInnerList()) {
if (row instanceof List) {
m_noColumns=Math.max(m_noColumns,((List)row).size());
}
else {
throw new IllegalArgumentException("The collection must contain list of objects");
... | Construct the ListModel with a collection of objects. A copy is made of the collection. The objects should be vectors of objects |
boolean deleteRow(@NotNull ResultSetRow row){
if (row.getState() == ResultSetRow.STATE_ADDED) {
cleanupRow(row);
return true;
}
else {
row.setState(ResultSetRow.STATE_REMOVED);
changesCount++;
return false;
}
}
| Removes row with specified index from data |
public int open(){
Shell shell=getShell();
if (shell == null || shell.isDisposed()) {
shell=null;
create();
shell=getShell();
}
adjustBounds();
constrainShellSize();
setTabOrder((Composite)getContents());
listenToDeactivate=false;
listenToParentDeactivate=false;
if (takeFocusOnOpen) {
... | Opens this window, creating it first if it has not yet been created. <p> This method is reimplemented for special configuration of PopupDialogs. It never blocks on open, immediately returning <code>OK</code> if the open is successful, or <code>CANCEL</code> if it is not. It provides framework hooks that allow subclasse... |
@Override public void init(Context context){
super.init(context);
String s;
s=context.getResolvedEntityAttribute(ACCEPT_LINE_REGEX);
if (s != null) {
acceptLineRegex=Pattern.compile(s);
}
s=context.getResolvedEntityAttribute(SKIP_LINE_REGEX);
if (s != null) {
skipLineRegex=Pattern.compile(s);
}
... | Parses each of the entity attributes. |
void removeHelper(RightThreadedBinaryNode<T> target,RightThreadedBinaryNode<T> parent){
RightThreadedBinaryNode<T> lnode=target.getLeftSon();
RightThreadedBinaryNode<T> rnode=target.getRightSon();
if (lnode == null && rnode == null) {
if (parent == null) {
root=null;
return;
}
if (parent.g... | Helper method to properly handle the multiple subcases when removing a node from the tree. |
private void addSpiDependency(GridTestNode node){
node.addAttribute(IgniteNodeAttributes.ATTR_SPI_CLASS,JobStealingCollisionSpi.class.getName());
}
| Adds Failover SPI attribute. |
public ContentFilter createContentFilter(){
ContentFilterImpl contentFilter=new ContentFilterImpl();
return contentFilter;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static boolean checkParenthesis(String str){
boolean result=true;
if (str != null) {
int open=0;
int closed=0;
int i=0;
while ((i=str.indexOf('(',i)) >= 0) {
i++;
open++;
}
i=0;
while ((i=str.indexOf(')',i)) >= 0) {
i++;
closed++;
}
result=open == c... | Examine the supplied string and ensure that all parends appear as matching pairs. |
public static void f(String tag,String msg){
if (sLevel > LEVEL_FATAL) {
return;
}
Log.wtf(tag,msg);
}
| Send a FATAL ERROR log message |
public void logDebug(String message){
logDebug(message,null);
}
| Writes a string into some debugging place |
public void mouseWheelMoved(MouseWheelEvent e){
if (getFirstLine() + e.getUnitsToScroll() > 0) {
if (getFirstLine() + getVisibleLines() + e.getUnitsToScroll() <= getLineCount()) {
setFirstLine(getFirstLine() + e.getUnitsToScroll());
}
else {
setFirstLine(getLineCount() - getVisibleLines());
}... | mouse wheel action to be able to scroll the jedit area by mouse wheel. |
public RoundBorder shadowSpread(int shadowSpread,boolean mm){
this.shadowMM=mm;
this.shadowSpread=shadowSpread;
return this;
}
| Sets the spread in pixels of the shadow i.e how much bigger is it than the actual circle/rectangle |
public List<FCEndpoint> showFcnsDatabase(Integer vsanId) throws NetworkDeviceControllerException {
Map<Integer,String> vsanToWwns=getVsanWwns(vsanId);
List<FCEndpoint> connections=new ArrayList<FCEndpoint>();
SSHPrompt[] prompts={SSHPrompt.MDS_POUND,SSHPrompt.MDS_GREATER_THAN};
StringBuilder buf=new StringBuild... | Generates a set of FCPortConnection entries for the specified vsan id (or all Vsans if vsanId is null). |
public T caseNumExpr_(NumExpr_ object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Num Expr </em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public static void recomputeCovarianceMatrices(Relation<? extends NumberVector> relation,WritableDataStore<double[]> probClusterIGivenX,List<? extends EMClusterModel<?>> models){
for ( EMClusterModel<?> m : models) {
m.beginEStep();
}
double[] wsum=new double[models.size()];
for (DBIDIter iditer=relation.i... | Recompute the covariance matrixes. |
public double[][] similarityMatrix(){
return m_hat;
}
| Returns the similarity matrix (M_hat) of this LocalPCA. |
private void updateVolumeHLU(StorageSystem system,Collection<URI> initiatorURIs,Map<URI,Integer> volumeMap){
boolean findHLU=false;
for ( Entry<URI,Integer> volumeMapEntry : volumeMap.entrySet()) {
if (volumeMapEntry.getValue() == -1) {
findHLU=true;
break;
}
}
if (findHLU) {
BlockStora... | Finds Next available HLU for the Host/Hosts (Cluster) and updates the volume Map to the next HLU reference if user has chosen system to decide on HLU number |
@Override public Object clone(){
return new BinominalAttribute(this);
}
| Clones this attribute. |
public URI relativize(URI uri){
if (isOpaque() || uri.isOpaque()) {
return uri;
}
if (getScheme() == null || uri.getScheme() == null || getScheme().equals(uri.getScheme()) == false) {
return uri;
}
String thisAuthority=null;
String thatAuthority=null;
String thisPath=null;
String thatPath=null;
... | Create a relative URI object against this URI, given the uri parameter. |
public void ensureCapacity(int minCapacity){
this.elements.ensureCapacity(minCapacity);
}
| Ensures that the receiver can hold at least the specified number of non-zero cells without needing to allocate new internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver. <p> This method never need be called; it is for performance tuning only. Calling this method before ... |
public void writeMLE(XMLWriter writer,MarginalLikelihoodEstimationOptions options){
if (options.performMLE) {
writer.writeComment("Define marginal likelihood estimator (PS/SS) settings");
List<Attribute> attributes=new ArrayList<Attribute>();
attributes.add(new Attribute.Default<Integer>(MarginalLikelihoo... | Write the marginalLikelihoodEstimator, pathSamplingAnalysis and steppingStoneSamplingAnalysis blocks. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.