code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public T headers(String value){
return attr("headers",value);
}
| Sets the <code>headers</code> attribute on the last started tag that has not been closed. |
public static List propertyDescriptors(int apiLevel){
return PROPERTY_DESCRIPTORS;
}
| Returns a list of structural property descriptors for this node type. Clients must not modify the result. |
public NullChange(){
this(RefactoringCoreMessages.NullChange_name);
}
| Creates a new <code>NullChange</code> with a default name. |
public Object runSafely(Catbert.FastStack stack) throws Exception {
String methName=getString(stack);
sage.jep.function.PostfixMathCommandI compMeth=null;
if (methName != null) compMeth=(sage.jep.function.PostfixMathCommandI)Catbert.getAPI().get(methName);
Comparable criteria=(Comparable)stack.pop();
Object... | Searches a sorted list of data to find the index that the specified criteria exists at; or if it doesn't exist in the data it will use the index that would be the appropriate insertion point for the criteria in the data in order to maintain sort order. The element at that index is what is returned |
@POST @Path("") @Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public ScheduledEventRestRep createEvent(ScheduledEventCreateParam createParam){
StorageOSUser user=getUserFromContext();
URI tenantId=createParam.getOrderCreateParam()... | Create a scheduled event for one or a series of future orders. Also a latest order is created and set to APPROVAL or SCHEDULED status |
private void addCSSClasses(SVGPlot svgp){
if (!svgp.getCSSClassManager().contains(KMEANSBORDER)) {
final StyleLibrary style=context.getStyleLibrary();
CSSClass cls=new CSSClass(this,KMEANSBORDER);
cls=new CSSClass(this,KMEANSBORDER);
cls.setStatement(SVGConstants.CSS_STROKE_PROPERTY,SVGConstants.CSS_B... | Adds the required CSS-Classes. |
public static void main(String[] args) throws Exception {
UpdateSigner signer=new UpdateSigner();
for ( String filename : args) {
String signature=signer.sign(filename);
System.out.println("file-signature." + new File(filename).getName() + "="+ signature);
}
}
| signs files |
public static double ACCmaxFitness(GEPIndividual ind){
return (1000.0);
}
| The max value for this type of fitness is always 1000. |
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. |
public ConcurrentCache(){
concurrentMap=new ConcurrentHashMap<K,Future<V>>();
}
| Creates a new instance of ConcurrentCache. |
public void translate(int x,int y){
mGraphics.translate(x,y);
}
| Translates the origin of the graphics context to the point (<i>x</i>, <i>y</i>) in the current coordinate system. Modifies this graphics context so that its new origin corresponds to the point (<i>x</i>, <i>y</i>) in this graphics context's original coordinate system. All coordinates used in subsequent rende... |
public void beforeInsert(int index,short element){
if (index > size || index < 0) throw new IndexOutOfBoundsException("Index: " + index + ", Size: "+ size);
ensureCapacity(size + 1);
System.arraycopy(elements,index,elements,index + 1,size - index);
elements[index]=element;
size++;
}
| Inserts the specified element before the specified position into the receiver. Shifts the element currently at that position (if any) and any subsequent elements to the right. |
public static <S extends HasCellOutHandlers & HasHandlers>void fire(S source,JavaScriptObject jsObj){
if (TYPE != null) {
CellOutEvent event=new CellOutEvent(jsObj);
source.fireEvent(event);
}
}
| Fires a open event on all registered handlers in the handler manager.If no such handlers exist, this method will do nothing. |
private int scanByte(int bitnum,int bytenum,int toscan,byte[] map){
int count=0, mask;
if (VM.TraceStkMaps) {
VM.sysWrite(" scanByte- inputs bitnum = ",bitnum);
VM.sysWrite(" bytenum = ",bytenum);
VM.sysWriteln(" toscan = ",toscan);
VM.sysWriteln(" stackmap byte = ",map[bytenum]);
}
mask=(... | Scans for a reference in a byte. |
protected int nextInAttributeValue() throws IOException, XMLException {
if (current == -1) {
return LexicalUnits.EOF;
}
if (current == '&') {
return readReference();
}
else {
loop: for (; ; ) {
switch (current) {
case '&':
case '<':
case -1:
break loop;
case '"':
case '\'':
if (cu... | Returns the next lexical unit in the context of an attribute value. |
public static AllocationId cancelRelocation(AllocationId allocationId){
assert allocationId.getRelocationId() != null;
return new AllocationId(allocationId.getId(),null);
}
| Creates a new allocation id representing a cancelled relocation. <p/> Note that this is expected to be called on the allocation id of the *source* shard |
public UnweightedGraph(List<Edge> edges,int numberOfVertices){
super(edges,numberOfVertices);
}
| Construct a graph for integer vertices 0, 1, 2 and edge list |
public void childrenRemoved(BeanContextMembershipEvent bcme){
Iterator<Object> it=bcme.iterator();
Object someObj;
while (it.hasNext()) {
someObj=it.next();
if (someObj instanceof Tool) {
logger.fine("ToolPanel removing tool Object");
remove(((Tool)someObj).getKey());
}
}
}
| BeanContextMembershipListener method. Called when objects have been removed from the parent BeanContext. If the ToolPanel finds a Tool in the list, it removes it from the ToolPanel. |
public Rectangle2D reserved(Rectangle2D area,RectangleEdge edge){
Rectangle2D result=null;
if (edge == RectangleEdge.TOP) {
result=new Rectangle2D.Double(area.getX(),area.getY(),area.getWidth(),this.top);
}
else if (edge == RectangleEdge.BOTTOM) {
result=new Rectangle2D.Double(area.getX(),area.getMaxY(... | Calculates the reserved area. |
public boolean isRepeatUpload(){
return mRepeatUpload;
}
| Check if upload repeat task is running. |
public final void yyclose() throws java.io.IOException {
zzAtEOF=true;
zzEndRead=zzStartRead;
if (zzReader != null) zzReader.close();
}
| Closes the input stream. |
public static boolean isAllOrientationsEqual(Coordinate[] pts){
int[] orient=new int[3];
orient[0]=RobustDeterminant.orientationIndex(pts[0],pts[1],pts[2]);
orient[1]=RobustDeterminant.orientationIndex(pts[1],pts[2],pts[0]);
orient[2]=RobustDeterminant.orientationIndex(pts[2],pts[0],pts[1]);
return orient[0] ... | Tests whether the orientations around a triangle of points are all equal (as is expected if the orientation predicate is correct) |
protected String makeGenericURLCachePath(URL url,String contentType){
String host=WWIO.replaceIllegalFileNameCharacters(url.getHost());
String path=WWIO.replaceIllegalFileNameCharacters(url.getPath());
String filename=path;
if (!WWUtil.isEmpty(url.getQuery())) {
String query=this.removePrivateQueryParameter... | Makes a path to the file in the cache from the file's generic URL and content type. If the URL has a non-empty query string, then this returns a path name formatted as follows: <p/> <code>host/hashCode/path_query.suffix</code> <p/> Otherwise, this returns a path name formatted as follows: <p/> <code>host/hashCode/path.... |
public PutIndexedScriptRequest scriptLang(String scriptLang){
this.scriptLang=scriptLang;
return this;
}
| Sets the type of the indexed document. |
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. |
public DimensionMismatchException(int wrong,int expected){
this(LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE,wrong,expected);
}
| Construct an exception from the mismatched dimensions. |
public String Field_Clear(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value,Object oldValue){
Object A_Depreciation_ID=value;
try {
String SQL="SELECT DepreciationType " + "FROM A_Depreciation " + "WHERE A_Depreciation_ID="+ A_Depreciation_ID;
PreparedStatement pstmt=DB.prepareStatement... | Field_Clear. Used to set the Manual Period Field. This allows the Spread Field to be displayed when there is a code that has been setup as Yearly. The string in the Callout field is: <code>com.compiere.custom.CalloutEngine.Table_Period</code> |
public void clear(){
oredCriteria.clear();
orderByClause=null;
distinct=false;
}
| This method was generated by MyBatis Generator. This method corresponds to the database table collection |
protected boolean afterSave(boolean newRecord,boolean success){
setHeader();
return success;
}
| After Save |
static public final float random(float start,float end){
return start + random.nextFloat() * (end - start);
}
| Returns a random number between start (inclusive) and end (exclusive). |
public int[][] lookup(char[] chars,int off,int len) throws IOException {
TreeMap<Integer,int[]> result=new TreeMap<>();
boolean found=false;
final FST.BytesReader fstReader=fst.getBytesReader();
FST.Arc<Long> arc=new FST.Arc<>();
int end=off + len;
for (int startOffset=off; startOffset < end; startOffset++)... | Lookup words in text |
private synchronized void updateMinMaxReqRspMs(int val){
if (_minReqRspMs == 0 || _maxReqRspMs == 0) {
_minReqRspMs=_minReqRspMs == 0 ? val : _minReqRspMs;
_maxReqRspMs=_maxReqRspMs == 0 ? val : _maxReqRspMs;
}
else if (val < _minReqRspMs) {
_minReqRspMs=val;
}
else if (val > _maxReqRspMs) {
... | Updates the min and max response time indicators |
public void onMessage(String string) throws IOException {
log.debug("Received from client: {}",string);
try {
this.onMessage(this.connection.getObjectMapper().readTree(string));
}
catch ( JsonProcessingException pe) {
log.warn("Exception processing \"{}\"\n{}",string,pe.getMessage());
this.sendError... | Process a JSON string and handle appropriately. Currently JSON strings in four different forms are handled by this method:<ul> <li>list requests in the form: <code>{"type":"list","list":"trains"}</code> or <code>{"list":"trains"}</code> that are passed to the JsonUtil for handling.</li> <li>individual item state reques... |
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case DomPackage.STRUCTURED_TEXT__ROOT_ELEMENT:
setRootElement((EObject)newValue);
return;
}
super.eSet(featureID,newValue);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public boolean sameRecipient(Uri uri,Context context){
int size=mRecipients.size();
if (size > 1) {
return false;
}
if (uri == null) {
return size == 0;
}
ContactList incomingRecipient=null;
if (uri.getPathSegments().size() >= 2) {
Conversation otherConv=get(context,uri,false);
if (otherCo... | Returns true if the recipient in the uri matches the recipient list in this conversation. |
public void put(String key,int value){
if (key != null) {
urlParams.put(key,String.valueOf(value));
}
}
| Adds a int value to the request. |
public static IDownloaderService CreateProxy(Messenger msg){
return new Proxy(msg);
}
| Returns a proxy that will marshall calls to IDownloaderService methods |
public Cursor query(SQLiteDatabase db,String[] projectionIn,String selection,String[] selectionArgs,String groupBy,String having,String sortOrder){
return query(db,projectionIn,selection,selectionArgs,groupBy,having,sortOrder,null);
}
| Perform a query by combining all current settings and the information passed into this method. |
public TreeNode(){
this(1,null,null);
}
| Create a tree node given the two children. The initial node value is 1. |
public static void addToolTipDescription(JComponent component,String description){
SettingsTabs.tooltipDescriptions.put(component,description);
}
| Adds a tool tip description for a component |
public boolean isWrapperType(){
return WRAPPER_TYPES.contains(rawClass);
}
| Return true if type of variable is a primitive wrapper |
private void report(Throwable e){
DebugPrinter.print(e);
}
| Debugging support |
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. |
@SuppressWarnings("deprecation") public void testBug21438() throws Exception {
createTable("testBug21438","(t_id int(10), test_date timestamp NOT NULL,primary key t_pk (t_id));");
assertEquals(1,this.stmt.executeUpdate("insert into testBug21438 values (1,NOW());"));
if (this.versionMeetsMinimum(4,1)) {
this.p... | Tests BUG#21438, server-side PS fails when using jdbcCompliantTruncation. If either is set to FALSE (&useServerPrepStmts=false or &jdbcCompliantTruncation=false) test succedes. |
public static void main(String[] args){
Gui gui=new Gui();
gui.startGui(new Migrate());
}
| Class entry point |
public static String toString(boolean[] array){
if (array == null) {
return NULL;
}
StringBuilder sb=new StringBuilder();
for (int i=0; i < array.length; i++) {
if (i != 0) {
sb.append(',');
}
sb.append(array[i]);
}
return sb.toString();
}
| Converts an array to string. Elements are separated by comma. Returned string contains no brackets. |
protected Element writeBooleanToXML(Element parent,boolean o,String name) throws Exception {
Element node;
if (DEBUG) {
trace(new Throwable(),name);
}
m_CurrentNode=parent;
node=addElement(parent,name,Boolean.TYPE.getName(),true);
node.appendChild(node.getOwnerDocument().createTextNode(new Boolean(o).to... | adds the given primitive to the DOM structure. |
@Override public String toString(){
if (eIsProxy()) return super.toString();
StringBuffer result=new StringBuffer(super.toString());
result.append(" (name_1: ");
result.append(name_1);
result.append(')');
return result.toString();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static byte[] encodeInteger(final BigInteger bigInt){
if (bigInt == null) {
throw new NullPointerException("encodeInteger called with null parameter");
}
return encodeBase64(toIntegerBytes(bigInt),false);
}
| Encodes to a byte64-encoded integer according to crypto standards such as W3C's XML-Signature. |
@Override public final Uri insert(final Uri uri,final ContentValues values){
Log.d(TAG,"Uri " + uri.toString());
switch (uriMatcher.match(uri)) {
case Schema.URI_CODE_CELLS:
return insertCellMeasurement(uri,values);
case Schema.URI_CODE_WIFIS:
return insertWifiMeasurement(uri,values);
case Schema.URI_CODE_POSIT... | INSERT Statements |
public void recoverWork(){
if (DEBUG) {
CLog.d(LOG_TAG,"work_status: recoverWork %s",this);
}
mExitTasksEarly=false;
setPause(false);
Iterator<Entry<String,LoadImageTask>> it=(Iterator<Entry<String,LoadImageTask>>)mLoadWorkList.entrySet().iterator();
while (it.hasNext()) {
Entry<String,LoadImageTask... | Recover the from the work list |
public void clear(){
final ReentrantLock lock=this.lock;
lock.lock();
try {
for ( TenantQueue q : qs.values()) {
q.clear();
}
}
finally {
lock.unlock();
}
}
| Atomically removes all of the elements from this delay queue. The queue will be empty after this call returns. Elements with an unexpired delay are not waited for; they are simply discarded from the queue. |
public T caseAnonymous_numExpr_2_(Anonymous_numExpr_2_ object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Anonymous num Expr 2</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public static String normalizePath(String path){
Objects.requireNonNull(path,"path must not be null");
return path.isEmpty() || path.equals("/*") ? "" : ensureNotEndingSlash(ensureStartingSlash(path));
}
| Returns a normalized path. If the path is empty or "/*", then an empty string is returned. Otherwise, the path returned always starts with a "/" but does not end with one. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:30.262 -0500",hash_original_method="B81137E6BD6C07F65D7774D0D377E124",hash_generated_method="0BE63B09E527B1405383654C0D2144C9") public static long lowestOneBit(long v){
r... | Determines the lowest (rightmost) bit of the specified long value that is 1 and returns the bit mask value for that bit. This is also referred to as the Least Significant 1 Bit. Returns zero if the specified long is zero. |
public Ping(){
super();
}
| Ping responder |
public static long toLong(byte[] bytes,int start){
return toLong(bytes[start],bytes[start + 1],bytes[start + 2],bytes[start + 3],bytes[start + 4],bytes[start + 5],bytes[start + 6],bytes[start + 7]);
}
| Returns long from given array of bytes. <br> Array must have at least start + 8 elements in it. |
public static boolean isDetached(Object entity){
Preconditions.checkNotNullArgument(entity,"entity is null");
if (entity instanceof BaseGenericIdEntity && BaseEntityInternalAccess.isDetached((BaseGenericIdEntity)entity)) {
return true;
}
return false;
}
| Determines whether the instance is <em>Detached</em>, i.e. stored in database but not attached to a persistence context at the moment. |
public int read(final int numBits){
int bits=0;
for (int i=numBits - 1; i >= 0; i--) {
if (currentBitIndex < 0) {
readCurrentByte();
}
boolean bit=(currentByte >> currentBitIndex & 1) != 0;
if (bit) {
bits|=(1 << i);
}
--currentBitIndex;
}
return bits;
}
| Reads a sequence of bits from the stream. |
public double normalDistance(final Vector v){
return Math.sqrt(normalDistanceSquared(v));
}
| Compute the normal (perpendicular) distance to a vector described by a vector taken from the origin. Monotonically increasing for arc distances up to PI/2. |
public List<NamespaceVO> findNamespaces(String appId,Env env,String clusterName){
List<NamespaceDTO> namespaces=namespaceAPI.findNamespaceByCluster(appId,env,clusterName);
if (namespaces == null || namespaces.size() == 0) {
throw new BadRequestException("namespaces not exist");
}
List<NamespaceVO> namespace... | load cluster all namespace info with items |
public boolean isAvailable(){
return available;
}
| Whether or not the module is available in the source path or the repository |
public static void testReportEmpty(final String headerMessage,final SpeedTestReport report,final boolean isRepeat){
Assert.assertEquals(headerMessage + "progress incorrect",report.getProgressPercent(),0,0);
Assert.assertNotEquals(headerMessage + "time incorrect",report.getReportTime(),0);
if (!isRepeat) {
Ass... | Test report empty. |
public void drawSeries(Canvas canvas,Paint paint,float[] points,int[] colors,SimpleSeriesRenderer seriesRenderer,float yAxisValue,int seriesIndex,int startIndex){
XYSeriesRenderer renderer=(XYSeriesRenderer)seriesRenderer;
paint.setColor(renderer.getColor());
if (renderer.isFillPoints()) {
paint.setStyle(Styl... | The graphical representation of a series. |
public void show(){
if (comboBox instanceof CComboBox && !((CComboBox)comboBox).displayPopup()) return;
if (comboBox instanceof CField && !((CField)comboBox).displayPopup()) return;
super.show();
}
| Conditionally show the Popup. If the combo is a CComboBox/CField, the return value of the method displayPopup determines if the popup is actually displayed |
public CubeDesc reloadCubeDescLocal(String name) throws IOException {
CubeDesc ndesc=loadCubeDesc(CubeDesc.concatResourcePath(name),false);
cubeDescMap.putLocal(ndesc.getName(),ndesc);
Cuboid.reloadCache(name);
CubeManager cubeManager=CubeManager.getInstance(config);
for ( CubeInstance cube : cubeManager.get... | Reload CubeDesc from resource store It will be triggered by an desc update event. |
@Override public void addMatch(Hmmer2HmmPfamSearchRecord methodMatches,Map<String,RawProtein<TigrFamHmmer2RawMatch>> rawResults) throws IOException {
for ( String sequenceId : methodMatches.getSequenceMatches().keySet()) {
Hmmer2HmmPfamSequenceMatch sequenceMatch=methodMatches.getSequenceMatches().get(sequenceId... | Implemented for specific member databases. Different databases use different specific model classes and may need to filter the matches at this point, based upon different criteria. <p/> This responsibility is delegated to the sub-class. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-05 00:22:07.166 -0400",hash_original_method="BDF3AD667A71B37AE55F3E2E0F794D61",hash_generated_method="B0634B256FEDF3B0793C38EB1552F5F9") public static int interfaceModifiers(){
return PUBLIC | PROTECTED | PRIVATE| ABSTRACT| STATIC| STRICT;... | Returns a mask of all the modifiers that may be applied to interfaces. |
@Override public String toString(){
return "CUDA_ARRAY3D_DESCRIPTOR[" + "Width=" + Width + ","+ "Height="+ Height+ ","+ "CUarray_format_Format="+ Format+ ","+ "NumChannels="+ NumChannels+ "]";
}
| Returns a String representation of this object. |
public static URL resolveLocation(String location) throws MalformedURLException {
return resolveLocation(location,null);
}
| Resolves the gives location into a URL object for use in various ways. The general format of the location is like a URL: {locationType}://location/path/file.ext Supports standard locationTypes like http, https, ftp, jar, & file Supports a classpath location type for when desired to be used like any other URL Supports O... |
public String toString(){
StringBuffer result=new StringBuffer();
result.append("{\n");
for (Enumeration e=all(); e.hasMoreElements(); ) {
result.append(" " + (lalr_item)e.nextElement() + "\n");
}
result.append("}");
return result.toString();
}
| Convert to string. |
public nobr addElement(String hashcode,Element element){
addElementToRegistry(hashcode,element);
return (this);
}
| Adds an Element to the element. |
public static Rectangle calculateInnerArea(JComponent c,Rectangle r){
if (c == null) {
return null;
}
Rectangle rect=r;
Insets insets=c.getInsets();
if (rect == null) {
rect=new Rectangle();
}
rect.x=insets.left;
rect.y=insets.top;
rect.width=c.getWidth() - insets.left - insets.right;
rect.h... | Stores the position and size of the inner painting area of the specified component in <code>r</code> and returns <code>r</code>. The position and size specify the bounds of the component, adjusted so as not to include the border area (the insets). This method is useful for classes that implement painting code. |
public OFNetmaskSetVendorData(byte tableIndex,int netMask){
super(BSN_SET_IP_MASK_ENTRY,tableIndex,netMask);
}
| Construct a get network mask vendor data for a specific table entry |
public long session(){
return session;
}
| Returns the session ID. |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-01-27 09:54:40.366 -0500",hash_original_method="B1F6BB5033A022FAFBEA87494F8412EB",hash_generated_method="F555FC379CC33F661BA067D214FC3E04") public long keyAt(int index){
if (mGarbage) {
gc();
}
return mKeys[in... | Given an index in the range <code>0...size()-1</code>, returns the key from the <code>index</code>th key-value mapping that this LongSparseArray stores. |
private static String caller(){
try {
StackTraceElement[] stack=Thread.currentThread().getStackTrace();
for ( StackTraceElement elem : stack) {
String c=elem.getClassName();
if (c.startsWith(sAppPackage) && !c.equals(Log.class.getName())) {
return "[" + elem.getClassName().replace(sAppP... | Returns the caller information from the stack trace |
public DefaultActivityModel(Object owner,String title,String note,boolean isIndeterminate){
this(owner,title,note,0,100,isIndeterminate);
}
| Creates a new DefaultActivityModel. |
private LazyQueryContainer createContainer(){
final Map<String,Object> queryConfig=prepareQueryConfigFilters();
final BeanQueryFactory<CustomTargetBeanQuery> targetQF=new BeanQueryFactory<>(CustomTargetBeanQuery.class);
targetQF.setQueryConfiguration(queryConfig);
final LazyQueryContainer targetTableContainer=n... | Create a empty HierarchicalContainer. |
public AnimationBuilder scaleY(float... scaleY){
return property("scaleY",scaleY);
}
| Scale y animation builder. |
public static void main(String[] args){
TestMultiInheritence tester=new TestMultiInheritence();
run(tester,ARGS,TEST,NEGATED_TEST);
tester.printSummary();
}
| The entry point of the test. |
@Override public Object clone(){
EgdmCollectedReceipt clone=null;
try {
clone=(EgdmCollectedReceipt)super.clone();
}
catch ( CloneNotSupportedException e) {
throw new InternalError(e.toString());
}
clone.setId(null);
clone.setEgdemandDetail(null);
return clone;
}
| Returns a copy that can be associated with another EgDemandDetails. The copy has the same receipt number, date, amount, status and time stamp. (Note: making it public instead of protected to allow any class to use it.) |
public boolean isWantClientAuth(){
return wantClientAuth;
}
| Returns <tt>true</tt> if the engine will <em>request</em> client authentication. This option is only useful to engines in the server mode. |
public XmlHandler addGlobal(Class<?> aClass,Global global){
try {
xml.addGlobal(aClass,global);
xml.write();
}
catch ( Exception e) {
JmapperLog.ERROR(e);
}
return this;
}
| Adds global mapping to the existent Class in the Xml configuration. |
public static <T>T checkNotNull(T reference,@Nullable Object errorMessage){
if (reference == null) {
throw new NullPointerException(String.valueOf(errorMessage));
}
return reference;
}
| Ensures that an object reference passed as a parameter to the calling method is not null. |
public DefaultSignedAttributeTableGenerator(){
table=new Hashtable();
}
| Initialise to use all defaults |
public static boolean isIntegerDatatype(IRI datatype){
return datatype.equals(XMLSchema.INTEGER) || datatype.equals(XMLSchema.LONG) || datatype.equals(XMLSchema.INT)|| datatype.equals(XMLSchema.SHORT)|| datatype.equals(XMLSchema.BYTE)|| datatype.equals(XMLSchema.NON_POSITIVE_INTEGER)|| datatype.equals(XMLSchema.NEGAT... | Checks whether the supplied datatype is equal to xsd:integer or one of the built-in datatypes that is derived from xsd:integer. |
@SuppressLint("HandlerLeak") public void handleState(AttachmentTask photoTask,int state){
switch (state) {
case TASK_COMPLETE:
if (photoTask.isCacheEnabled()) {
if (photoTask != null && photoTask.getImage() != null) {
mPhotoCache.put(photoTask.getMessage().getKeyString(),photoTask.getImage());
}... | Handles state messages for a particular task object |
public static short obtain(){
return (short)uigen.obtain();
}
| Obtains a message id. Callers of this must call release when finished with the id. |
public void putShardRoutingState(final String index,final ShardRoutingState shardRoutingState) throws JsonGenerationException, JsonMappingException, IOException {
this.discoveryService.putShardRoutingState(index,shardRoutingState);
}
| Set index shard state in the gossip endpoint map (must be synchronized). |
public DHParameters generateParameters(){
BigInteger[] safePrimes=DHParametersHelper.generateSafePrimes(size,certainty,random);
BigInteger p=safePrimes[0];
BigInteger q=safePrimes[1];
BigInteger g=DHParametersHelper.selectGenerator(p,q,random);
return new DHParameters(p,g,q,TWO,null);
}
| which generates the p and g values from the given parameters, returning the DHParameters object. <p> Note: can take a while... |
public String diffNormalized(final Sentence other){
final SentenceBuilder ret=new SentenceBuilder();
final Iterator<Expression> it1=expressions.iterator();
final Iterator<Expression> it2=other.expressions.iterator();
while (true) {
final Expression e1=nextValid(it1);
final Expression e2=nextValid(it2);
... | Compare two sentences and return the difference as String. |
public InputStream openStreamRaw() throws IOException {
return data.openStreamRaw(userAgent,null);
}
| Attempt to open the stream, does no checking for compression types. |
public static <T>void ensureCapacityWithEmptyObject(ArrayList<T> arrayList,int capacity,Class<T> clazz){
if (arrayList == null) {
arrayList=new ArrayList<T>();
}
int delta=capacity - arrayList.size();
if (delta <= 0) {
return;
}
arrayList.ensureCapacity(capacity);
try {
for (; delta > 0; delta... | ArrayList Tool Method |
public static void dftProduct(double[] Xr,double[] Xi,double[] Yr,double[] Yi,double sign){
if (Xr.length != Yr.length || Xi.length != Yi.length || Xr.length != Xi.length) throw new IllegalArgumentException("Transform array lengths are not equal");
double tmp;
for (int i=0; i < Xr.length; i++) {
tmp=Xr[i] *... | Convenience method to multiply two complex transforms of the same size. |
private void addToSuspendedInTransactionList(long subKey){
if (sessionCtx == null || sessionCtx.getContextData() == null || sessionCtx.getContextData().get(SUSPENDED_SUBSCRIPTIONS_IN_TRANSACTION) == null) {
return;
}
List<Long> list=new ArrayList<Long>();
if (sessionCtx.getContextData().get(SUSPENDED_SUBSCR... | add new Subscription Key into the list from session when it is just set as suspended/suspended_upd for paymenttype in Customers/Service configuration |
@Override protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
| Provide an implementation of the clone() method. This does not deeply copy all of the underlying data, just providing a copy of the references to it all. This is enough to protect the integrity of the kernel estimator however if the clone is supplied different data (though the clone should not alter the data). |
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method,JavaClassAndMethodChooser chooser) throws ClassNotFoundException {
return findMethod(method.getJavaClass().getSuperClasses(),method.getMethod().getName(),method.getMethod().getSignature(),chooser);
}
| Visit all superclass methods which the given method overrides. |
public static ClientTombstoneMessage gc(LocalRegion region,Set<Object> removedKeys,EventID eventId){
return new ClientTombstoneMessage(TOperation.GC_PR,region,removedKeys,eventId);
}
| GC operation for partitioned regions |
public boolean isValid(){
return valid;
}
| Is the siteMapURL under the base url ? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.