code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void pushPairCurrentMatched(ElemTemplateElement template,int child){
m_currentMatchTemplates.push(template);
m_currentMatchedNodes.push(child);
}
| Push both the current xsl:template or xsl:for-each onto the stack, along with the child node that was matched. (Note: should this only be used for xsl:templates?? -sb) |
public LwM2mPath(int objectId,int objectInstanceId,int resourceId){
this.objectId=objectId;
this.objectInstanceId=objectInstanceId;
this.resourceId=resourceId;
this.resourceInstanceId=null;
}
| Create a path to a resource of a given object instance |
public void testSealedObject2() throws Exception {
try {
new SealedObject(null){
}
;
fail("NullPointerException should be thrown in the case " + "of null SealedObject.");
}
catch ( NullPointerException e) {
}
String secret="secret string";
Cipher cipher=new NullCipher();
SealedObject so1=new S... | SealedObject(SealedObject so) method testing. Tests if the NullPointerException is thrown in the case of null SealedObject. |
public static boolean assertProbabilities(final double[] da){
for ( final double d : da) {
Exam.assertProbability(d);
}
return true;
}
| Assert that the array contains valid probabilities. |
public EntityQuery(Delegator delegator){
this.delegator=delegator;
}
| Construct an EntityQuery object for use against the specified Delegator |
public CSVReaderBuilder withCSVParser(final CSVParser csvParser){
this.csvParser=csvParser;
return this;
}
| Sets the parser to use to parse the input. |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:43.609 -0500",hash_original_method="10415454EB24D9D06B07AD8A5863D117",hash_generated_method="10415454EB24D9D06B07AD8A5863D117") void removeCache(String url){
assert !... | Remove a cache item. |
public static MGRSCoord fromLatLon(Angle latitude,Angle longitude,Globe globe,int precision){
if (latitude == null || longitude == null) {
String message=Logging.getMessage("nullValue.LatitudeOrLongitudeIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
final MG... | Create a MGRS coordinate from a pair of latitude and longitude <code>Angle</code> with the given precision or number of digits (1 to 5). |
public void testMoveMessages() throws Exception {
final int QUEUE_SIZE=30000;
final String MOVE_TO_DESTINATION_NAME=getDestinationString() + ".dest";
final long TEST_TIMEOUT=20000;
Connection conn=createConnection();
try {
conn.start();
Session session=conn.createSession(true,Session.SESSION_TRANSACTE... | The test queue is filled with QUEUE_SIZE test messages, each with a numeric id property beginning at 0. Once the queue is filled, the last message (id = QUEUE_SIZE-1) is moved to another queue. The test succeeds if the move completes within TEST_TIMEOUT milliseconds. |
public void runAfter(long delta){
long now=CurrentTime.getExactTime();
boolean isNotify=_clock.queueAt(this,now + delta);
if (isNotify) {
_coordinatorThread.wake();
}
}
| Queue the alarm for wakeup. |
public static boolean isSupplementaryCodePoint(int codePoint){
return (MIN_SUPPLEMENTARY_CODE_POINT <= codePoint && MAX_CODE_POINT >= codePoint);
}
| <p> A test for determining if the <code>codePoint</code> is within the supplementary code point range. </p> |
public void sendToDimension(IMessage message,int dimensionId){
netHandler.sendToDimension(message,dimensionId);
}
| Send this message to everyone within the supplied dimension. |
public static int write(Sequence in,int type,File out) throws IOException {
List providers=getMidiFileWriters();
int bytesWritten=-2;
for (int i=0; i < providers.size(); i++) {
MidiFileWriter writer=(MidiFileWriter)providers.get(i);
if (writer.isFileTypeSupported(type,in)) {
bytesWritten=writer.writ... | Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided. |
@POST @Path("/run-notifier") @CheckPermission(roles={Role.SECURITY_ADMIN,Role.RESTRICTED_SECURITY_ADMIN}) public Response runMailNotifier(){
_notificationManager.runMailNotifierNow();
return Response.ok().build();
}
| run mail notifier on-demand, it will send mail to users whose password to be expired. for internal use |
public void saveChannel(CumulusChannel jsonChannel){
String jsonString=jsonChannel.toString();
Intent i=new Intent();
i.setClassName("com.felkertech.n.cumulustv","com.felkertech.n.plugins.DataReceiver");
i.setAction(ACTION_RECEIVER);
i.putExtra(INTENT_EXTRA_JSON,jsonString);
if (proprietary) {
i.putExtr... | Writes the data to the local file and then forces a data sync. Then the app closes. |
public boolean isGround(){
if (s() instanceof VarNode) return false;
if (p() instanceof VarNode) return false;
if (o() instanceof VarNode) return false;
if (c() instanceof VarNode) return false;
return true;
}
| Return <code>true</code> if none of s, p, o, or c is a variable. |
public void testBug11663() throws Exception {
if (versionMeetsMinimum(4,1,0) && ((com.mysql.jdbc.Connection)this.conn).getUseServerPreparedStmts()) {
Connection testcaseGenCon=null;
PrintStream oldErr=System.err;
try {
createTable("testBug11663","(field1 int)");
Properties props=new Properties... | Tests fix for BUG#11663, autoGenerateTestcaseScript uses bogus parameter names for server-side prepared statements. |
@SideEffectFree public void log(LogRecord record){
throw new RuntimeException();
}
| Log a LogRecord. <p> All the other logging methods in this class call through this method to actually perform any logging. Subclasses can override this single method to capture all log activity. |
public Object convert(Object valueToConvert) throws IllegalArgumentException {
if (valueToConvert instanceof java.sql.Date) {
return ((Date)valueToConvert).toString();
}
throw new IllegalArgumentException("The source object must be of type: " + getSourceType().getName());
}
| This method is used by the JavaTypeTranslator to convert a source object of type java.sql.Date to an instance of type java.lang.String. Conversion is done using the toString() method of the java.sql.Date class. |
public static int parseTitleMap(String s) throws NumberFormatException {
int titleCase=MAP_UNDEFINED;
int length=s.length();
if (length >= 4 && length <= 6) {
titleCase=Integer.parseInt(s,16);
}
else if (s.length() != 0) {
throw new NumberFormatException();
}
return titleCase;
}
| Parse the titlecase mapping attribute for a Unicode character. If there is a titlecase mapping attribute and the parse succeeds, then the hasTitleMap field is set to true, the titleMap field of this UnicodeSpec object is updated, and false is returned. If the titlecase mapping attribute is an empty string, the parse s... |
private void mergeUnknownNode(Node node) throws IIOInvalidTreeException {
MarkerSegment newGuy=new MarkerSegment(node);
int lastUnknown=findLastUnknownMarkerSegmentPosition();
boolean hasJFIF=(findMarkerSegment(JFIFMarkerSegment.class,true) != null);
int firstAdobe=findMarkerSegmentPosition(AdobeMarkerSegment.c... | Merge the given Unknown node into the marker sequence. A new Unknown marker segment is created and added to the sequence as follows: If there already exist Unknown marker segments, the new one is inserted after the last one. If there are no Unknown marker segments, the new Unknown marker segment is inserted after the J... |
public void put(Object type,V value){
putClass(type.getClass(),value);
}
| Adds the given Object with all its implementing interfaces to the mapping. |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
public static <T extends BlockObject>List<UnManagedExportMask> findMatchingExportMaskForHost(T volume,List<UnManagedExportMask> unManagedMasks,Set<String> initiatorUris,Map<String,Set<String>> iniByProtocol,DbClient dbClient,URI vArray,URI vPoolURI,boolean hostPartOfCluster,Set<String> initiatorsPartOfCluster,URI clust... | Find matching UnManagedExportMasks for a Host. |
public static CGPoint ccpLerp(CGPoint a,CGPoint b,float alpha){
return ccpAdd(ccpMult(a,1.f - alpha),ccpMult(b,alpha));
}
| Linear Interpolation between two points a and b |
public void requestEmoticons(boolean forcedUpdate){
if (forcedUpdate || !emoticonManager.loadEmoticons(false)) {
String url="https://api.twitch.tv/kraken/chat/emoticons";
url="https://api.twitch.tv/kraken/chat/emoticon_images";
if (attemptRequest(url,forcedUpdate ? "update" : "")) {
TwitchApiRequest... | Request to get the emoticons list from the API. If the list is already available in a local file and is recent, that one is used. Otherwise a request is issued and the emoticons are received and parsed when that request is answered. |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
protected boolean accept(Component aComponent){
return fitnessTestPolicy.accept(aComponent);
}
| Determines whether a Component is an acceptable choice as the new focus owner. By default, this method will accept a Component if and only if it is visible, displayable, enabled, and focusable. |
public void clearListeners(){
listeners=new ArrayList<T>();
}
| Clear all listeners |
default B generation(final BookMeta src){
this.meta().setGeneration(src.getGeneration());
return this.getBuilder();
}
| Set generation of book. <br> 0 = original, 1 = copy of original, 2 = copy of copy, 3 = tattered |
public static void readyGoWithAnimatorForResult(Activity activity,Class<?> className,@NonNull ActivityOptionsCompat option,int requestCode){
ActivityCompat.startActivityForResult(activity,getIntent(activity,className),requestCode,option.toBundle());
}
| start activity with animation |
public int size(){
return boundsPerInfVar.size();
}
| Returns the number of type bounds in this bound set. |
public static void dumpUpdateParams(String prefix,Object[] newData,Object[] oldData){
if (!log.isDebugEnabled()) {
return;
}
StringWriter buffer=new StringWriter();
PrintWriter writer=new PrintWriter(buffer);
if (newData == null) {
writer.println(prefix + " newData=null ");
}
else {
writer.prin... | Convenience method for logging the parameters passed to the update method. Only logs if debug is enabled. |
public static Map<Id<MyZone>,Integer> parseHouseholdCountFromControlTotals(String file){
Map<Id<MyZone>,Integer> map=new HashMap<>();
BufferedReader br=IOUtils.getBufferedReader(file);
try {
String line=br.readLine();
while ((line=br.readLine()) != null) {
int count=0;
String[] sa=line.split("... | Assuming the control totals file have 17 columns (tab-separated), of which columns indices 10 - 16 contain the number of households in each income class. |
static public void isolateIndex(long startTime,String name){
if (log.isInfoEnabled()) log.info("tx=" + startTime + ", name="+ name);
}
| Report the isolation of a named index by a transaction. |
@SuppressWarnings("ConstantConditions") public static boolean deleteRecursively(File file){
if (file.isDirectory()) {
boolean success=true;
File[] children=file.listFiles();
for ( File child : children) {
success&=deleteRecursively(child);
}
return success && file.delete();
}
else {
... | Deletes the given file or directory. In case of a directory, all its content is deleted recursively. |
@Override public String toString(){
return new StringBuilder("StartElement: ").append(this.element).toString();
}
| The event representation. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case TypesPackage.ACCESSIBLE_TYPE_ELEMENT__DECLARED_TYPE_ACCESS_MODIFIER:
return getDeclaredTypeAccessModifier();
case TypesPackage.ACCESSIBLE_TYPE_ELEMENT__DECLARED_PROVIDED_BY_RUNTIME:
return isDeclaredProvidedByR... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public Note withRandomData(){
this.setText(SampleDataService.getRandomComment());
this.setDate(SampleDataService.getRandomDate());
return this;
}
| Method withRandomData handle current Note object filling it with random data and return this edited object |
public RegisterPriority registerPriority(int index){
return RegisterPriority.VALUES[list.get((index << 1) + 1)];
}
| Gets the register priority for the use position at a specified index in this list. |
public static org.smpte_ra.schemas.st0429_9_2007.AM.AssetMapType constructAssetMapType_2007(){
org.smpte_ra.schemas.st0429_9_2007.AM.AssetMapType amType_2007=new org.smpte_ra.schemas.st0429_9_2007.AM.AssetMapType();
IMFDocumentsObjectFieldsFactory.constructObjectFields(amType_2007);
return amType_2007;
}
| A factory method that constructs a 2007 Schema compliant PackingListType object and recursively constructs all of its constituent fields. Note: Fields that are either Java primitives, wrapperTypes or a subclass of Collection are not constructed by this method for the reason that the field's accessor methods would do so... |
private static int limitInt(final int value,final int bitlength){
return Integer.parseInt(Integer.toBinaryString(value).substring(0,bitlength),2);
}
| Returns the first <code>bitlength</code> bits of the given int. |
@Override protected EClass eStaticClass(){
return GamlPackage.Literals.UNARY;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static Date parse(String date,ParsePosition pos) throws ParseException {
Exception fail=null;
try {
int offset=pos.getIndex();
int year=parseInt(date,offset,offset+=4);
if (checkOffset(date,offset,'-')) {
offset+=1;
}
int month=parseInt(date,offset,offset+=2);
if (checkOffset(da... | Parse a date from ISO-8601 formatted string. It expects a format [yyyy-MM-dd|yyyyMMdd][T(hh:mm[:ss[.sss]]|hhmm[ss[.sss]])]?[Z|[+-]hh:mm]] |
public boolean isSetStore(){
return this.store != null;
}
| Returns true if field store is set (has been assigned a value) and false otherwise |
private static boolean isXPointerId(String uri){
if (uri.startsWith(XP) && uri.endsWith("))")) {
String idPlusDelim=uri.substring(XP_LENGTH,uri.length() - 2);
int idLen=idPlusDelim.length() - 1;
if (((idPlusDelim.charAt(0) == '"') && (idPlusDelim.charAt(idLen) == '"')) || ((idPlusDelim.charAt(0) == '\'') ... | Method isXPointerId |
@Override public void firePropertyChange(String propertyName,boolean oldValue,boolean newValue){
}
| Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for more information. |
public Message send(Message query) throws IOException {
if (Options.check("verbose")) System.err.println("Sending to " + address.getAddress().getHostAddress() + ":"+ address.getPort());
if (query.getHeader().getOpcode() == Opcode.QUERY) {
Record question=query.getQuestion();
if (question != null && questi... | Sends a message to a single server and waits for a response. No checking is done to ensure that the response is associated with the query. |
protected boolean allowSearch(String pattern){
return !TextUtils.isEmpty(pattern);
}
| Tell if the search is allowed for a dedicated pattern |
protected void addToken(String token){
synchronized (sessionTokens) {
sessionTokens.add(token);
}
}
| Adds the token. |
@SuppressWarnings("unchecked") public static void register(String className){
JavaUtils.checkRegisterPermission();
try {
Class<ResourceResolverSpi> resourceResolverClass=(Class<ResourceResolverSpi>)Class.forName(className);
register(resourceResolverClass,false);
}
catch ( ClassNotFoundException e) {
... | Registers a ResourceResolverSpi class. This method logs a warning if the class cannot be registered. |
public NodesStatsRequest fs(boolean fs){
this.fs=fs;
return this;
}
| Should the node file system stats be returned. |
public static void dropTable(SQLiteDatabase db,boolean ifExists){
String sql="DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'NOTE'";
db.execSQL(sql);
}
| Drops the underlying database table. |
public final void divScalar(double s){
for (int i=0; i < NDIM; i++) {
data[i]/=s;
}
}
| Divide each element of the vector by a scalar value. |
public static ReferenceRanges<String> createFullReferenceRanges(SequencesReader sequencesReader) throws IOException {
final ReferenceRanges<String> rangeMap=new ReferenceRanges<>(false);
final Map<String,Integer> idMap=new HashMap<>();
for (int k=0; k < sequencesReader.numberSequences(); k++) {
final int rlen... | Make a reference range list corresponding to the full length of all reference sequences |
@Override public void run(){
amIActive=true;
try {
Long startTime=System.currentTimeMillis();
int progress, oldProgress, col, row, colN, rowN, r, c;
int numSolvedCells=0;
int dir, numCellsInPath, i, n;
boolean needsFilling=false;
double z, zN, zTest, zN2, lowestNeighbour, breachDepth, maxPat... | Used to execute this plugin tool. |
public static int findMatchingBracket(Document doc,int offset) throws BadLocationException {
if (doc.getLength() == 0) return -1;
char c=doc.getText(offset,1).charAt(0);
char cprime;
boolean direction;
switch (c) {
case '(':
cprime=')';
direction=false;
break;
case ')':
cprime='(';
direction=true;
break... | Returns the offset of the bracket matching the one at the specified offset of the document, or -1 if the bracket is unmatched (or if the character is not a bracket). |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
private <T>T doInvokeAny(Collection<? extends Callable<T>> tasks,boolean timed,long nanos) throws InterruptedException, ExecutionException, TimeoutException {
if (tasks == null) throw new NullPointerException();
int ntasks=tasks.size();
if (ntasks == 0) throw new IllegalArgumentException();
ArrayList<Future... | the main mechanics of invokeAny. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:32.926 -0500",hash_original_method="1EEDE20F378BB56816783AF0AAE8D8C5",hash_generated_method="2AE5A6AC1EB7B311A9443C8F45DCAEBC") public final void readResponse() throws IOException {
if (hasResponse()) {
return;
}
if (respo... | Flushes the remaining request header and body, parses the HTTP response headers and starts reading the HTTP response body if it exists. |
public boolean isCancelled(){
AsyncHttpRequest _request=request.get();
return _request == null || _request.isCancelled();
}
| Returns true if this task was cancelled before it completed normally. |
private void bol(){
column=0;
collectingIndent=(maxIndent != 0);
indent=0;
}
| Indicates that output is at the beginning of a line. |
public long lastModified(){
final IHistoryEntry<T> sample=minutes.getSample();
if (sample == null) return -1L;
return sample.lastModified();
}
| Return the timestamp associated with the last value. |
public double minX(){
return Math.min(p0.x,p1.x);
}
| Gets the minimum X ordinate. |
@SuppressWarnings("UnusedReturnValue") @Override public final boolean openPdfFileFromInputStream(final InputStream is,final boolean supportLinearized) throws PdfException {
final String rawFileName="inputstream" + System.currentTimeMillis() + '-'+ fileAccess.getObjectStore().getKey()+ ".pdf";
preOpen();
final boo... | routine to open PDF file via InputStream and extract key info from pdf file so we can decode any pages - Does not actually decode the pages themselves - <br> You must explicitly close any open files with closePdfFile() to Java will not release all the memory IMPORTANT NOTE: If the stream does not contain enough bytes, ... |
@Override public void invokeCommand(int argLength,String[] args,String command){
Toast.log().error("Goodbye cruel world!");
CrashHandler.handle(new Exception("Invoked Debug Crash"));
}
| Invoke the command if the name matches the one to be triggered |
public DefaultTableColumn addPropertyColumn(Object headerValue,String property,Class type){
return addColumn(headerValue,property,new PropertyModel(rowModel,property,type));
}
| Adds a property model column to the table |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"REV");
translateAll(environment,instruction,"REV... | REV{<cond>} Rd, Rm Operation: if ConditionPassed(cond) then Rd[31:24] = Rm[ 7: 0] Rd[23:16] = Rm[15: 8] Rd[15: 8] = Rm[23:16] Rd[ 7: 0] = Rm[31:24] |
public void add(final Array datum,final double weight){
if (dimension_ == 0) {
final int dimension=datum.size();
QL.require(dimension > 0,NULL_DIMENSION);
reset(dimension);
}
QL.require(datum.size() == dimension_,SAMPLE_SIZE_MISMATCH);
quadraticSum.addAssign(datum.outerProduct(datum).mulAssign(weigh... | adds a sequence of data to the set, each with its weight |
public boolean is_set_pedigree(){
return this.pedigree != null;
}
| Returns true if field pedigree is set (has been assigned a value) and false otherwise |
protected void validateAssociatedId(BaseStorageEntity[] param){
}
| validate the array for AssociatedId |
private void addReference(final int sourcePosition,final int referencePosition){
if (srcAndRefPositions == null) {
srcAndRefPositions=new int[6];
}
if (referenceCount >= srcAndRefPositions.length) {
int[] a=new int[srcAndRefPositions.length + 6];
System.arraycopy(srcAndRefPositions,0,a,0,srcAndRefPosi... | Adds a forward reference to this label. This method must be called only for a true forward reference, i.e. only if this label is not resolved yet. For backward references, the offset of the reference can be, and must be, computed and stored directly. |
public small addElement(String element){
addElementToRegistry(element);
return (this);
}
| Adds an Element to the element. |
public UkrainianMorfologikAnalyzer(CharArraySet stopwords){
this(stopwords,CharArraySet.EMPTY_SET);
}
| Builds an analyzer with the given stop words. |
protected void processIndirection(ForeignReferenceMapping mapping){
boolean usesIndirection=usesIndirection();
String actualAttributeType=getAttributeType();
if (getAccessibleObject() != null) {
actualAttributeType=getAccessibleObject().getType();
}
if (usesIndirection && usesPropertyAccess()) {
mappi... | INTERNAL: Process the indirection (aka fetch type) |
public JavaLock(String name){
super(name);
this.timeout=Harness.lockTimeout.getValue() * NANOS_IN_SECOND;
}
| Create a new lock (with given name) |
public SimpleNodeView(){
}
| Creates a new instance of SimpleNodeView |
public static void main(final String[] args){
DOMTestCase.doMain(hc_characterdataindexsizeerrreplacedataoffsetnegative.class,args);
}
| Runs this test from the command line. |
private boolean shouldSkipChildren(CCFGNode node,Set<CCFGEdge> handledBackEdges,Set<CCFGNode> children,boolean handleLoops){
if (node == null || children == null) return true;
boolean skipChildren=false;
if (handleLoops) {
for ( CCFGNode child : children) {
CCFGEdge currentEdge=ccfg.getEdge(node,ch... | When we go back to previously visited nodes we do not have to visit nodes after our current node again. If we follow backEdges we do that so we find all intra-method pairs within loops, so we go through loops twice so to speak. however the possible activeDefs are already determined after the first walk through the loop... |
public Enumeration<Instance> enumerateInstances(){
return new WekaEnumeration<Instance>(m_Instances);
}
| Returns an enumeration of all instances in the dataset. |
public float[] mult(float[] source,float[] target){
if (target == null || target.length < 3) {
target=new float[3];
}
if (source == target) {
throw new RuntimeException("The source and target vectors used in " + "PMatrix3D.mult() cannot be identical.");
}
if (target.length == 3) {
target[0]=m00 * ... | Multiply a three or four element vector against this matrix. If out is null or not length 3 or 4, a new float array (length 3) will be returned. |
public SQLTransientException(String reason,String sqlState,Throwable cause){
super(reason,sqlState,cause);
}
| Creates an SQLTransientException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the cause Throwable object is set to the given cause Throwable object. |
public boolean quitApplication(){
if (myQuitEntered) {
return false;
}
myQuitEntered=true;
try {
options.setWindowPosition(getX(),getY());
options.setWindowSize(getWidth(),getHeight());
options.setUIConfiguration(myUIConfiguration);
options.save();
if (getProjectUIFacade().ensureProjectS... | Quit the application |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public StringBuffer append(int i){
IntegralToString.appendInt(this,i);
return this;
}
| Adds the string representation of the specified integer to the end of this StringBuffer. |
public BatchInterruptedException(IFeed feed,IBatchInterrupted interrupted){
super("Batch Interrupted (some operations might have succeeded) : " + interrupted.getReason());
this.feed=feed;
this.interrupted=interrupted;
}
| Creates a BatchInterrupted exception. |
public Boolean isJumboFramesEnabled(){
return jumboFramesEnabled;
}
| Gets the value of the jumboFramesEnabled property. |
final boolean resumeTopActivityLocked(ActivityRecord prev){
return resumeTopActivityLocked(prev,null);
}
| Ensure that the top activity in the stack is resumed. |
public void detach(){
if (m_allowDetach) {
if (m_axis > -1) m_iterator=null;
super.detach();
}
}
| Detaches the iterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After<code>detach</code> has been invoked, calls to <code>nextNode</code> or<code>previousNode</code> will raise the exception INVALID_STATE_ERR. |
public SIPHeader parse() throws ParseException {
if (debug) dbg_enter("OrganizationParser.parse");
Organization organization=new Organization();
try {
headerName(TokenTypes.ORGANIZATION);
organization.setHeaderName(SIPHeaderNames.ORGANIZATION);
this.lexer.SPorHT();
String value=this.lexer.getRes... | parse the String header |
@Override public Object clone() throws CloneNotSupportedException {
DefaultXYDataset clone=(DefaultXYDataset)super.clone();
clone.seriesKeys=new java.util.ArrayList(this.seriesKeys);
clone.seriesList=new ArrayList(this.seriesList.size());
for (int i=0; i < this.seriesList.size(); i++) {
double[][] data=(dou... | Creates an independent copy of this dataset. |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case UmplePackage.ANONYMOUS_STATE_1__STATE_INTERNAL_1:
return stateInternal_1 != null && !stateInternal_1.isEmpty();
}
return super.eIsSet(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static boolean isPrime(int number){
for (int divisor=2; divisor <= number / 2; divisor++) {
if (number % divisor == 0) {
return false;
}
}
return true;
}
| Check whether number is prime |
public void mergeSortFromTo(int from,int to,java.util.Comparator c){
if (size == 0) return;
checkRangeFromTo(from,to,size);
java.util.Arrays.sort(elements,from,to + 1,c);
}
| Sorts the receiver according to the order induced by the specified comparator. All elements in the range must be <i>mutually comparable</i> by the specified comparator (that is, <tt>c.compare(e1, e2)</tt> must not throw a <tt>ClassCastException</tt> for any elements <tt>e1</tt> and <tt>e2</tt> in the range).<p> This s... |
public boolean isDisplayed(){
Object oo=get_Value(COLUMNNAME_IsDisplayed);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Displayed. |
public static void moveRect(Rectangle box,int dx,int dy){
box.x=box.x + dx;
box.y=box.y + dy;
}
| Moves a Rectangle by modifying the x and y attributes. |
public void testHugeFile() throws IOException {
DenseRAMFile f=new DenseRAMFile();
RAMOutputStream out=new RAMOutputStream(f,true);
byte b1[]=new byte[RAMOutputStream.BUFFER_SIZE];
byte b2[]=new byte[RAMOutputStream.BUFFER_SIZE / 3];
for (int i=0; i < b1.length; i++) {
b1[i]=(byte)(i & 0x0007F);
}
for... | Test huge RAMFile with more than Integer.MAX_VALUE bytes. (LUCENE-957) |
private final void appendContents(StringBuffer buf,CharacterIterator iterator){
int index=iterator.getBeginIndex();
int end=iterator.getEndIndex();
while (index < end) {
iterator.setIndex(index++);
buf.append(iterator.current());
}
}
| Appends the contents of the CharacterIterator iterator into the StringBuffer buf. |
public boolean isGroupingUsed(){
return (this.groupingUsed != null ? this.groupingUsed : true);
}
| <p>Return <code>true</code> if <code>getAsString</code> should include grouping separators if necessary. If not modified, the default value is <code>true</code>.</p> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.