code
stringlengths
10
174k
nl
stringlengths
3
129k
XPath createMatchPatternXPath(String str,ElemTemplateElement owningTemplate) throws javax.xml.transform.TransformerException { ErrorListener handler=m_stylesheetProcessor.getErrorListener(); XPath xpath=new XPath(str,owningTemplate,this,XPath.MATCH,handler,m_funcTable); xpath.callVisitors(xpath,new ExpressionVisi...
Process an expression string into an XPath.
@Override public int hashCode(){ int hash=5; hash=89 * hash + (this.clientId != null ? this.clientId.hashCode() : 0); return hash; }
Hash code.
public void putLong(String key,long value){ if (key != null && value > -1) { mPreferences.edit().putLong(key,value).apply(); } }
Stores a int in preferences
public void close() throws NamingException { }
Does nothing.
public boolean remove(K key,V value){ key=sanitizeKey(key); List<V> values=map.get(key); if (values == null) { return false; } boolean success=values.remove(value); if (values.isEmpty()) { map.remove(key); } return success; }
Removes a particular value.
public Pcd(IndependenceTest independenceTest){ if (independenceTest == null) { throw new NullPointerException(); } this.independenceTest=independenceTest; }
Constructs a new PC search using the given independence test as oracle.
public TDoubleLongHashMap(int initialCapacity,float loadFactor){ super(initialCapacity,loadFactor); }
Creates a new <code>TDoubleLongHashMap</code> instance with a prime capacity equal to or greater than <tt>initialCapacity</tt> and with the specified load factor.
private void rDeterminePartitioningCandidates(String var,ArrayList<StatementBlock> asb,List<PDataPartitionFormat> C) throws LanguageException { for ( StatementBlock sb : asb) for ( Statement s : sb._statements) { if (s instanceof ForStatement) { ForStatement fs=(ForStatement)s; List<DataIdentifier...
This method recursively determines partitioning candidates for input variables. Candidates are defined as index reads of non-local variables.
public void addAllSurfaceObjects(List<SurfaceRenderable> c,Sector sector){ if (this.intersectingObjects == null) this.intersectingObjects=new ArrayList<SurfaceRenderable>(); this.intersectingObjects.addAll(c); this.objectSector=(this.objectSector != null) ? this.objectSector.union(sector) : sector; }
Adds the specified collection of surface renderables to the tile's list of intersecting objects.
protected void firePropertyChange(PropertyChangeEvent event){ if (listenerList == null) return; PropertyChangeListener listener; Iterator<PropertyChangeListener> it=listenerList.iterator(); while (it.hasNext()) { listener=it.next(); listener.propertyChange(event); } }
Notifies all registered listeners about the event.
private void checkANTSensorsStatus(int viewID){ TextView sensorValueText=((TextView)EndToEndTestUtils.SOLO.getCurrentActivity().findViewById(viewID)); assertNotNull(sensorValueText); String realValue=sensorValueText.getText().toString(); String noneValue=trackListActivity.getString(R.string.value_none); asser...
Checks whether the ANT+ sensor is connected with MyTracks.
private void validateNodesStatus(){ nodeCount=coordinator.getNodeCount(); if (aliveNodes.size() == nodeCount) { markRecoveryCancelled(); log.warn("All nodes are alive, no need to do recovery"); throw new IllegalStateException("No need to do recovery"); } else if (aliveNodes.size() < (nodeCount / 2 ...
Validate cluster is in minority node corrupted scenario
public static void addJavaDOptions(List<String> javaOpts,CommandLine line) throws Error { java.util.Properties properties=line.getOptionProperties("D"); Set<String> propertyNames=new HashSet<>(Properties.getParameters()); for ( String propertyName : properties.stringPropertyNames()) { if (!propertyNames.cont...
Add all the properties that were set with -D
public SVGApplicationModel(){ gridConstrainer=new GridConstrainer(12,12); }
Creates a new instance.
public void createScheduler(String schedulerName,String schedulerInstanceId,ThreadPool threadPool,JobStore jobStore,Map<String,SchedulerPlugin> schedulerPluginMap,String rmiRegistryHost,int rmiRegistryPort,long idleWaitTime,long dbFailureRetryInterval,boolean jmxExport,String jmxObjectName) throws SchedulerException { ...
Creates a scheduler using the specified thread pool, job store, and plugins, and binds it to RMI.
public ExponentialExponentialModel(Parameter N0Parameter,Parameter growthRateParameter,Parameter ancestralGrowthRateParameter,Parameter transitionTimeParameter,Type units){ this(ExponentialExponentialModelParser.EXPONENTIAL_EXPONENTIAL_MODEL,N0Parameter,growthRateParameter,ancestralGrowthRateParameter,transitionTimeP...
Construct demographic model with default settings
public byte[] toBytes() throws UnsupportedEncodingException { StringBuilder result=new StringBuilder(256); result.append(requestLine).append("\r\n"); for (int i=0; i < namesAndValues.size(); i+=2) { result.append(namesAndValues.get(i)).append(": ").append(namesAndValues.get(i + 1)).append("\r\n"); } resul...
Returns bytes of a request header for sending on an HTTP transport.
@Override public <T>MappingIterator<T> readValues(JsonParser jp,TypeReference<?> valueTypeRef) throws IOException, JsonProcessingException { return readValues(jp,_typeFactory.constructType(valueTypeRef)); }
Method for reading sequence of Objects from parser stream.
public DEREncodedKeyValue itemDEREncodedKeyValue(int i) throws XMLSecurityException { Element e=XMLUtils.selectDs11Node(this.constructionElement.getFirstChild(),Constants._TAG_DERENCODEDKEYVALUE,i); if (e != null) { return new DEREncodedKeyValue(e,this.baseURI); } return null; }
Method itemDEREncodedKeyValue
public Bundler putByte(String key,byte value){ bundle.putByte(key,value); return this; }
Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.
public Secret transform(SecretSeriesAndContent seriesAndContent){ checkNotNull(seriesAndContent); SecretSeries series=seriesAndContent.series(); SecretContent content=seriesAndContent.content(); return new Secret(series.id(),series.name(),series.description(),null,content.hmac(),series.createdAt(),series.create...
Transform DB content to a Secret model.
public EventBinder<E> withPriority(int priority){ this.priority=priority; return this; }
Sets the event's numeric priority. Numeric priority overrules named priority.
@Bean @Order(100) public FilterRegistrationBean eTagFilter(){ final FilterRegistrationBean filterRegBean=new FilterRegistrationBean(); filterRegBean.setFilter(new ExcludePathAwareShallowETagFilter("/rest/v1/softwaremodules/{smId}/artifacts/{artId}/download","/{tenant}/controller/artifacts/**","/{targetid}/softwarem...
Filter registration bean for spring etag filter.
public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { int zzInput; int zzAction; int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL=zzEndRead; char[] zzBufferL=zzBuffer; char[] zzCMapL=ZZ_CMAP; int[] zzTransL=ZZ_TRANS; int[] zzRowMapL=ZZ_ROWMAP; int[] zzAttrL=ZZ_ATTRIBUTE; ...
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
public Task<FileSnapshotRestRep> deactivate(URI id){ return doDeactivateWithTask(id); }
Begins deactivating a file snapshot by ID. <p> API Call: <tt>POST /file/snapshots/{id}/deactivate</tt>
public void addRoleOverride(String roleId,PermissionOverride override){ roleOverrides.put(roleId,override); }
CACHES a permissions override for a role in this channel.
private void receivedClientFinished(Finished message) throws HandshakeException { message.verifyData(session.getMasterSecret(),true,handshakeHash); sessionEstablished(); handshakeCompleted(); }
Verifies the client's Finished message. If valid, encrypted application data can be sent, otherwise an Alert must be sent.
public UIOptions(){ initComponents(); hideAllUnsedComponents(); String path=System.getProperty("user.home") + "/EsPReSSO"; String decoded_path=null; try { if (path != null) { decoded_path=URLDecoder.decode(path,"UTF-8"); if (decoded_path != null) { File file=new File(decoded_path); ...
Creates new form UIOptions
private void resetCatalog(boolean isSource,String newCatalog){ String name=getCatalogName(isSource,newCatalog); ArrayList<String> databaseCatalogs=getCatalogNames(isSource); if (isSource) { m_sourceCatalog.removeAllItems(); } else { m_targetCatalog.removeAllItems(); } if (databaseCatalogs != null &...
reload catalog combo box
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
private void add(final String name,final int index,final int[] frameIndexes,final int[] frameDelays){ acquire(name).add(index,frameIndexes,frameDelays); }
Add a mapping of a tile index to animation frame indexes. <strong>NOTE: The array of frame indexes/delays passed is not copied, and should not be altered after this is called.</strong>
private void internalOnControlAcquired(int streamType){ LogUtils.log(this,Log.VERBOSE,"Acquired control of stream %d",streamType); mHandler.releaseControlDelayed(); }
Called after control of a particular volume stream has been acquired and the audio stream has had a chance to quiet down.
public void testIsReadOnly(){ try { assertFalse(rsmd.isReadOnly(1)); } catch ( SQLException e1) { fail("ResultSetMetaDataTest.isReadOnly" + e1.getMessage()); e1.printStackTrace(); } try { rsmd.isReadOnly(0); fail("SQLException is not thrown"); } catch ( SQLException e) { } }
Cannot know from blackbox test if readonly or writable. Exceptions fail, Feature only partially implemented.
public MapObject(Object id,Drawable drawable,Point position,Point pivotPoint,boolean isTouchable){ this(id,drawable,position.x,position.y,pivotPoint.x,pivotPoint.y,isTouchable,true); }
Creates new MapObject.
public void onCancelContractDetails(Contract contract){ if (m_client.isConnected()) { if (m_contractRequests.contains(contract.getId())) synchronized (m_contractRequests) { m_contractRequests.remove(contract.getId()); } } }
Method onCancelContractDetails.
public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,Object data) throws VisitorException { return visitor.visit(this,data); }
Accept the visitor.
public static String asString(Field field){ return new RecordWriter().append(field).toString(); }
Obtain a JSON string representation of the specified field.
public static double uniform(){ return random.nextDouble(); }
Returns a random real number uniformly in [0, 1).
private String readQuotedId(boolean returnText) throws IOException, XmlPullParserException { int quote=peekCharacter(); char[] delimiter; if (quote == '"') { delimiter=DOUBLE_QUOTE; } else if (quote == '\'') { delimiter=SINGLE_QUOTE; } else { throw new XmlPullParserException("Expected a quoted...
Reads a quoted string, performing no entity escaping of the contents.
private void initializeLiveAttributes(){ cx=createLiveAnimatedLength(null,SVG_CX_ATTRIBUTE,SVG_ELLIPSE_CX_DEFAULT_VALUE,SVGOMAnimatedLength.HORIZONTAL_LENGTH,false); cy=createLiveAnimatedLength(null,SVG_CY_ATTRIBUTE,SVG_ELLIPSE_CY_DEFAULT_VALUE,SVGOMAnimatedLength.VERTICAL_LENGTH,false); rx=createLiveAnimatedLeng...
Initializes the live attribute values of this element.
public static boolean isVariable(String s){ for (int i=0; i < s.length(); i++) { if (!Character.isUpperCase(s.charAt(i))) { return false; } } return true; }
Check if we have a variable, as they are uppercase strings.
public void modifyShare(String id,IsilonSMBShare s) throws IsilonException { modify(_baseUrl.resolve(URI_SMB_SHARES),id,"share",s); }
Modify SMB share
public BufferedImage createShadow(final BufferedImage image){ if (hints.get(KEY_BLUR_QUALITY) == VALUE_BLUR_QUALITY_HIGH) { BufferedImage subject=prepareImage(image); BufferedImage shadow=new BufferedImage(subject.getWidth(),subject.getHeight(),BufferedImage.TYPE_INT_ARGB); BufferedImage shadowMask=create...
<p>Generates the shadow for a given picture and the current properties of the factory.</p> <p>The generated shadow image dimensions are computed as follow: <ul> <li>new width = original width + 2 * shadow size</li> <li>new height = original height + 2 * shadow size</li> </ul></p> <p>The time taken by a call to this met...
synchronized void addExtendedStyle(Style attr){ insertAttributeSetAt(attr,getAttributes().length); }
Adds <code>s</code> as one of the AttributeSets to look up attributes in. It will be the AttributeSet last checked.
void actionCommandImpl(Command cmd){ actionCommandImpl(cmd,new ActionEvent(cmd,ActionEvent.Type.Command)); }
Invoked to allow subclasses of form to handle a command from one point rather than implementing many command instances
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
public String sprintf(final Object x) throws IllegalArgumentException { final Iterator<ConversionSpecification> e=vFmt.iterator(); ConversionSpecification cs; char c; final StringBuilder sb=new StringBuilder(); while (e.hasNext()) { cs=e.next(); c=cs.getConversionCharacter(); if (c == '\0') { ...
Format an Object. Convert wrapper types to their primitive equivalents and call the appropriate internal formatting method. Convert Strings using an internal formatting method for Strings. Otherwise use the default formatter (use toString).
private void checkLockExpressionInGuardedByAnnotation(AnnotationTree tree,AnnotationMirror guardedByAnnotation){ List<String> guardedByValue=AnnotationUtils.getElementValueArray(guardedByAnnotation,"value",String.class,true); if (guardedByValue.isEmpty()) { return; } TreePath path=getCurrentPath(); Method...
Check that the lock expression in a GuardedBy annotation is a valid flow expression and is effectively final
void determineCurrentRegion(SchellingGeometry poly){ ArrayList<SchellingGeometry> checked=new ArrayList<SchellingGeometry>(); ArrayList<SchellingGeometry> toCheck=new ArrayList<SchellingGeometry>(); checked.add(poly); toCheck.addAll(poly.neighbors); while (toCheck.size() > 0) { SchellingGeometry p=toCheck...
breadth first search on the polygons to determine current location relative to SchellingPolygons
public static boolean isEmpty(String str){ return isEmpty(str,false); }
Is String Empty
public String outputDistributionTipText(){ return "Whether to add attributes with the distribution for all classes " + "(for numeric classes this will be identical to the attribute output " + "with 'outputClassification')."; }
Returns the tip text for this property.
public Object removeFirst(){ Object first=header.next.element; remove(header.next); return first; }
Removes and returns the first element from this list.
public SnmpCachedData(long lastUpdated,TreeMap<SnmpOid,Object> indexMap){ this(lastUpdated,indexMap,true); }
Constructs a new instance of SnmpCachedData. Instances are immutable.
public RuleOutput ground(Assignment grounding){ RuleOutput groundCase=new RuleOutput(type); for ( Effect e : effects.keySet()) { Effect groundedEffect=e.ground(grounding); if (!groundedEffect.getSubEffects().isEmpty() || e.getSubEffects().isEmpty()) { Parameter param=effects.get(e); if (param i...
Returns a grounded version of the rule output, based on the grounding assignment.
@RequestMapping(value="/{entity}/{cacheKey}/{event}",method={RequestMethod.PUT}) @ResponseBody public void wipeCache(@PathVariable String entity,@PathVariable String event,@PathVariable String cacheKey) throws IOException { cacheService.notifyMetadataChange(entity,Broadcaster.Event.getEvent(event),cacheKey); }
Wipe cache on this node
public boolean isEmptyWriteSet(){ return writeSet.getEntryCount() == 0; }
True iff there are no writes on this isolated index.
private void readLockedThread(){ final long thisThreadId=Thread.currentThread().getId(); final Integer entry=threadLockMap.get(thisThreadId); final Integer newVal=entry == null ? 1 : 1 + entry.intValue(); threadLockMap.put(thisThreadId,newVal); }
Track the #of read locks by thread IFF this is a read/write index view.
final public void print(double v){ try { _out.print(v); } catch ( IOException e) { log.log(Level.FINE,e.toString(),e); } }
Prints a double followed by a newline.
public PerThreadTagHandlerPool(){ super(); perThreadDataVector=new Vector<PerThreadData>(); }
Constructs a tag handler pool with the default capacity.
public boolean onScrollChanged(int scrollY){ boolean isPullingDownNow=scrollY < lastScrollY; latestPullingDown.offer(isPullingDownNow); if (latestPullingDown.size() > PULLING_DOWN_TIME_MAX) { latestPullingDown.poll(); } lastScrollY=scrollY; return getPullingDownTime() >= PULLING_DOWN_TIME_THRESHOLD; }
Call this when scroll changed
public SerialVersionDefaultOperation(ICompilationUnit unit,ASTNode[] nodes){ super(unit,nodes); }
Creates a new serial version default proposal.
public synchronized void truncate(long offset){ terms.tailMap(offset,false).clear(); }
Truncates the index to the given offset.
public DataPoint(Vec numericalValues,double weight){ this(numericalValues,emptyInt,emptyData,weight); }
Creates a new data point that has no categorical variables
public String toFormattedString(){ return "3D memory copy setup:\n " + createString("\n "); }
Creates and returns a formatted (aligned, multi-line) String representation of this object
public final int yystate(){ return zzLexicalState; }
Returns the current lexical state.
public void testDefaultsDynamic() throws Exception { Similarity sim=getSimilarity("text_sim3"); assertEquals(DefaultSimilarity.class,sim.getClass()); }
... and for a dynamic field
public static boolean isDistinctRow(char[][] s){ for (int i=0; i < s.length; i++) { int[] counts=new int[s.length]; for (int j=0; j < s[i].length; j++) { counts[s[i][j] - 65]++; if (counts[s[i][j] - 65] > 1) return false; } } return true; }
isDistinctRow returns true if Latin letters, each occur exactly once in each row
public void snap(int position,int strategy){ if (mIgnoreIfCompletelyVisible && isCompletelyVisible(position)) { return; } if (mIgnoreIfVisible && isVisible(position)) { return; } if (position < 0) { scrollToPosition(0); return; } int diffFirst=getFirstVisiblePosition() - position; int di...
Snaps a view at the given position to a closer end, top or bottom (left or right).
public boolean isColorExtracted(){ return isColorExtracted; }
flag to show if color extracted in xml
public Map<String,Object> convertDataToObjects(Map<String,String> data){ Map<String,Object> results=new HashMap<>(); if (data != null) { for ( String key : data.keySet()) { results.put(key,data.get(key)); } } return results; }
Internal conversion. This is needed to support the current SpringBoot actuator AuditEventRepository interface
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value={"UC_USELESS_CONDITION","RpC_REPEATED_CONDITIONAL_TEST"},justification="isChanged value is dependent on which user button is activated") private void runCustomSwitchLists(boolean isChanged){ if (!Setup.isGenerateCsvSwitchListEnabled()) { return; } log....
Creates custom switch lists using an external program like MS Excel. Switch lists are created for locations that have switch lists enabled.
public static void registerEntity(String serviceName,EntityDefinition entityDef){ final String table=entityDef.getTable(); if (entityServiceMap.containsKey(serviceName)) { final EntityDefinition existing=entityServiceMap.get(serviceName); if (entityDef.getClass().equals(existing.getClass())) { return;...
it is allowed that user can register their own entity definition
public void startShakeDetection(ShakeListener shakeListener){ startLibrarySensorDetection(new ShakeDetector(shakeListener),shakeListener); }
Start shake detection.
public void visitAttribute(Attribute attr){ if (cv != null) { cv.visitAttribute(attr); } }
Visits a non standard attribute of the class.
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:18.444 -0500",hash_original_method="AB3CC143C94AF212348DFB5018C60850",hash_generated_method="B2EF44B3A7B822E184164B205FA8E5FC") void drawDivider(Canvas canvas,Rect boun...
Draws a divider for the given child in the given bounds.
public Set<String> allowableTags(TextAnnotation ta,int tokenId){ String form=ta.getToken(tokenId); Set<String> result=allowableTags(form); if (result.size() > 0) return result; if (WordHelpers.isCapitalized(ta,tokenId)) { HashMap<String,TreeMap<String,Integer>> t; int headOfSentence=ta.getSentence(ta....
Returns the set of tags that the given word's suffix has been observed with, or a reasonable default if the suffix has never been observed.
public boolean parseFlags(MoeOptions options){ CmdLineParser parser=new CmdLineParser(options); try { parser.parseArgument(preprocessedArgs); if (options.shouldDisplayHelp()) { parser.printUsage(System.err); } return true; } catch ( CmdLineException e) { logger.log(Level.SEVERE,e.getMe...
Parses command-line flags, returning true if the parse was successful and no flags errors were found.
public CropTransformation(int width,int height){ this(width,height,GravityHorizontal.CENTER,GravityVertical.CENTER); }
Crops to the given width and height (in pixels), defaulting gravity to CENTER/CENTER. If either width or height is zero then the original image's dimension is used.
public boolean equals(Object p){ if (!(p instanceof URLPermission)) { return false; } URLPermission that=(URLPermission)p; if (!this.scheme.equals(that.scheme)) { return false; } if (!this.getActions().equals(that.getActions())) { return false; } if (!this.authority.equals(that.authority)) {...
Returns true if, this.getActions().equals(p.getActions()) and p's url equals this's url. Returns false otherwise.
public boolean isOwned(){ Object oo=get_Value(COLUMNNAME_IsOwned); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Owned.
protected void export(){ int retVal; File file; AbstractFileSaver saver; if (m_FileChooser == null) m_FileChooser=GUIHelper.newConverterFileChooser(); retVal=m_FileChooser.showSaveDialog(this); if (retVal != ConverterFileChooser.APPROVE_OPTION) return; file=m_FileChooser.getSelectedFile(); saver=m_F...
Exports the data to a file.
private InitializeDeploymentMigrationWorkflowService.State buildValidPatchState(TaskState.TaskStage patchStage,InitializeDeploymentMigrationWorkflowService.TaskState.SubStage patchSubStage){ InitializeDeploymentMigrationWorkflowService.State patchState=new InitializeDeploymentMigrationWorkflowService.State(); patch...
This method creates a patch State object which is sufficient to patch a InitializeDeploymentMigrationWorkflowService instance.
public void displayNodeInfo(String nodeID){ if (!nodeID.equals(selNodeID)) { int nAdd=Integer.parseInt(nodeID); SerialNode s=null; for (int k=0; k < numConfigNodes; k++) { if (nAdd == configNodeAddresses[k]) { s=configNodes[k]; } } if (s == null) { log.error("Cannot find ...
Method to handle selection of a Node for info display
public int size(){ return content.size(); }
Returns the number of elements in this list.
public void testConstrCharIntIntMathContext(){ char value[]={'-','1','2','3','8','0','.','4','7','3','8','E','-','4','2','3'}; int offset=3; int len=12; int precision=4; RoundingMode rm=RoundingMode.CEILING; MathContext mc=new MathContext(precision,rm); BigDecimal result=new BigDecimal(value,offset,len,mc...
new BigDecimal(char[] value, int offset, int len, MathContext mc);
public static Notification error(String title,String message,boolean clear){ return show(title,message,MessageType.ERROR,clear ? 10000 : 0); }
Show an error notification
public void deleteRootPathMap() throws WikiApiException { File rootPathFile=new File(this.rootPathMapFilename + "_" + wiki.getLanguage()+ "_"+ wiki.getMetaData().getVersion()); rootPathFile.delete(); }
Deleted the root path map file.
public static void registerDefaultResolvers(){ synchronized (resolverList) { resolverList.add(new ResourceResolver(new ResolverFragment())); resolverList.add(new ResourceResolver(new ResolverLocalFilesystem())); resolverList.add(new ResourceResolver(new ResolverXPointer())); resolverList.add(new Resourc...
This method registers the default resolvers.
private void injectDependencies(){ ((BaseActivity)getActivity()).inject(this); }
Dagger injection using activity graph scope
public void displayApng(String uri,ImageView imageView,ApngConfig config){ super.displayImage(uri,imageView,new ApngImageLoadingListener(context,Uri.parse(uri),getAutoPlayHandler(config,null))); }
Load and display APNG in specific ImageView object with ApngConfig
public SQLTimeoutException(String reason,Throwable cause){ super(reason,cause); }
Creates an SQLTimeoutException object. The Reason string is set to the given and the cause Throwable object is set to the given cause Throwable object.
public void testFieldDoc() throws Exception { Directory dir=newDirectory(); RandomIndexWriter writer=new RandomIndexWriter(random(),dir); Document doc=new Document(); doc.add(newStringField("value","foo",Field.Store.NO)); writer.addDocument(doc); doc=new Document(); doc.add(newStringField("value","bar",Fi...
Tests sorting on internal docid order
public Relationship mostConsciousRelationship(Primitive type,float correctness){ return nextMostConsciousRelationship(this.network.createVertex(type),(Vertex)null,correctness,false); }
Return the relationship related by the type, with the high consciousness level.
private boolean zzRefill() throws java.io.IOException { return true; }
Refills the input buffer.
@Override public boolean equals(Object o){ if (o == null) { return false; } if (!(o instanceof ImmutablePair)) { return false; } ImmutablePair<?,?> other=(ImmutablePair<?,?>)o; return Objects.equals(first,other.first) && Objects.equals(second,other.second); }
Returns whether some other object "is equal" to this object.
public static String encode(String source){ StringBuffer dest=new StringBuffer(); int sourceLen=source.length(); for (int i=0; i < sourceLen; i++) { int runLength=1; final char currentChar=source.charAt(i); while (i + 1 < sourceLen && currentChar == source.charAt(i + 1)) { runLength++; i++...
Returns encoded string. For example, converts "WWWWWWWWWWWWBWWWWWWWWWWWWBBB" to "12W1B12W3B"
public Folder createFoldersRecursively() throws RepositoryException { Entry entry=locateEntry(); if (entry == null) { Folder folder=parent().createFoldersRecursively(); Folder child=folder.createFolder(getName()); return child; } else { if (entry instanceof Folder) { return (Folder)entry; ...
Creates this folder and its parents.
public EditorWindow(JPanel editor,String title,String buttonName,boolean cancellable,Component centeringComp){ super(title,true,true,true,false); if (editor == null) { throw new NullPointerException("Editor must not be null."); } this.buttonName=buttonName; doSetup(editor,cancellable); this.centeringCom...
Pops a new editor window up from a dialog.
public void initializeLogging(){ LogWrapper logWrapper=new LogWrapper(); Log.setLogNode(logWrapper); Log.i(TAG,"Ready"); }
Set up targets to receive log data
public void jjtReplaceWith(Node newNode){ if (parent != null) { parent.jjtReplaceChild(this,newNode); } for ( Node childNode : children) { childNode.jjtSetParent(newNode); } }
Replaces this node with the supplied one in the AST.