code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static List<NotificationDto> transformToDto(List<Notification> notifications){
if (notifications == null) {
throw new WebApplicationException("Null entity object cannot be converted to Dto object.",Status.INTERNAL_SERVER_ERROR);
}
List<NotificationDto> result=new ArrayList<NotificationDto>();
for ( ... | Converts list of notification entity objects to list of notificationDto objects. |
public void add(ITicket ticket){
if (tickets.contains(ticket)) {
return;
}
tickets.add(ticket);
tick|=ticket.shouldTick();
}
| Add a ticket to this tickets |
public boolean isBoolean(){
return type == BOOLEAN;
}
| Checks whether the value of this NSNumber is a boolean. |
public static void checkForDuplicateNames(Map<String,Boolean> isDuplicateName,Cursor cursor,int nameIndex){
isDuplicateName.clear();
cursor.moveToPosition(-1);
while (cursor.moveToNext()) {
String displayName=cursor.getString(nameIndex);
if (displayName != null) {
isDuplicateName.put(displayName,isD... | Scan through a cursor of calendars and check if names are duplicated. This travels a cursor containing calendar display names and fills in the provided map with whether or not each name is repeated. |
Object processNMTOKEN(StylesheetHandler handler,String uri,String name,String rawName,String value,ElemTemplateElement owner) throws org.xml.sax.SAXException {
if (getSupportsAVT()) {
try {
AVT avt=new AVT(handler,uri,name,rawName,value,owner);
if ((avt.isSimple()) && (!XML11Char.isXML11ValidNmtoken(v... | Process an attribute string of type T_NMTOKEN into a String value. |
public boolean isStableNumber(){
return true;
}
| Tell if this expression returns a stable number that will not change during iterations within the expression. This is used to determine if a proximity position predicate can indicate that no more searching has to occur. |
public String toString(){
StringBuffer retval=new StringBuffer("CDS:");
retval.append(vals.length).append("[");
for (int i=0; i < vals.length; i++) {
retval.append("(");
for (int j=0; j < vals[i].length; j++) retval.append(vals[i][j]).append(", ");
retval.append(") ");
}
retval.append("]");
... | A pretty formatter for the doublestring |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
protected void paintText(SeaGlassContext ss,Graphics g,int tabPlacement,Font font,FontMetrics metrics,int tabIndex,String title,Rectangle textRect,boolean isSelected){
g.setFont(font);
View v=getTextViewForTab(tabIndex);
if (v != null) {
v.paint(g,textRect);
}
else {
int mnemIndex=tabPane.getDisplayedM... | Paint the label text for a tab. |
public static GT gt(final BackendKey key){
return new GT(key);
}
| Match keys strictly greater than the given key. |
public NotificationChain basicSetEntryAction(Step newEntryAction,NotificationChain msgs){
Step oldEntryAction=entryAction;
entryAction=newEntryAction;
if (eNotificationRequired()) {
ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,SexecPackage.EXECUTION_FLOW__ENTRY_ACTION,oldEntryAct... | <!-- begin-user-doc --> <!-- end-user-doc --> |
protected final void readBorder(final Element element){
final Element borderElement=LwXmlReader.getRequiredChild(element,UIFormXmlConstants.ELEMENT_BORDER);
setBorderType(BorderType.valueOf(LwXmlReader.getRequiredString(borderElement,UIFormXmlConstants.ATTRIBUTE_TYPE)));
StringDescriptor descriptor=LwXmlReader.ge... | 'border' is required subtag |
@Override public void activeBecomeBackup() throws IOException {
synchronized (metaRef) {
logger.info("[becomeBackup]");
ReplicationStoreMeta metaDup=dupReplicationStoreMeta();
metaDup.setBeginOffset(metaDup.getKeeperBeginOffset());
metaDup.setMasterRunid(metaDup.getKeeperRunid());
metaDup.setKeeperS... | RedisMaster, ActiveKeeper and BackupKeeper each has its own offset coordinate(determined by beginOffset and keeperBeginOffset). When Keeper send Psync to RedisMaster or Keeper, it will use begingOffet + cmdFileSize |
private List<Quadrant> findContainingQuadrants(Rect firstRect,Rect secondRect){
List<Quadrant> quadrants=new ArrayList<>();
int radiusX=(firstRect.right - firstRect.left) / 2;
int radiusY=(firstRect.bottom - firstRect.top) / 2;
for ( Quadrant quadrant : Quadrant.values()) {
int x=firstRect.centerX() + quad... | Returns the quadrants which the second rect contains in itself fully. |
@Override public Builder<K,V> putAll(K key,Iterable<? extends V> values){
super.putAll(key,values);
return this;
}
| Stores a collection of values with the same key in the built multimap. |
public static JSONObject toJSONObject(String string) throws JSONException {
JSONObject jo=new JSONObject();
XMLTokener x=new XMLTokener(string);
while (x.more() && x.skipPast("<")) {
parse(x,jo,null);
}
return jo;
}
| Convert a well-formed (but not necessarily valid) XML string into a JSONObject. Some information may be lost in this transformation because JSON is a data format and XML is a document format. XML uses elements, attributes, and content text, while JSON uses unordered collections of name/value pairs and arrays of values.... |
public boolean isPhantomClass(){
return Scene.v().getPhantomClasses().contains(this);
}
| Convenience method returning true if this class is a phantom class. |
public void updateStatus(JobContext jobContext) throws Exception {
JobStatus jobStatus=getJobStatus();
try {
DbClient dbClient=jobContext.getDbClient();
if (jobStatus == Job.JobStatus.IN_PROGRESS) {
return;
}
else if (jobStatus == JobStatus.SUCCESS) {
String opId=_metaVolumeTaskComplete... | Called to update the job status when the create meta volume job completes. |
private void handleInterruption(){
}
| Called whenver the thread is interrupted. Currently this is a placeholder, but could hold cleanup methods and user interaction |
public ImageException(String message,ImageExceptionBean bean){
super(message,bean);
this.bean=bean;
}
| Constructs a new exception with the specified detail message and bean for JAX-WS exception serialization. |
public NonreceiverTerm(Type type,Object value){
if (type == null) {
throw new IllegalArgumentException("type should not be null.");
}
if (type.isVoid()) {
throw new IllegalArgumentException("type should not be void.");
}
if (type.isPrimitive() || type.isBoxedPrimitive()) {
if (value == null) {
... | Constructs a NonreceiverTerm with type t and value o. |
@POST @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("/{id}/protection/snapshots") @CheckPermission(roles={Role.TENANT_ADMIN},acls={ACL.ANY}) public TaskList createSnapshot(@PathParam("id") URI id,VolumeSnapshotParam param) throw... | A snapshot is a point-in-time copy of a volume. Snapshots are intended for short-term operational recovery and are typically implemented using lightweight, fast capabilities native to the underlying storage platforms. Like a volume, a snapshot can be exported to initiators, and you can delete it. A snapshots lifetime i... |
public void emitLdc(int od){
if (od <= 255) {
emitop1(ldc1,od);
}
else {
emitop2(ldc2,od);
}
}
| Emit a ldc (or ldc_w) instruction, taking into account operand size |
private long computeEndTime(long timeout){
long endTime=U.currentTimeMillis() + timeout;
if (endTime < 0) endTime=Long.MAX_VALUE;
return endTime;
}
| Computes end time based on timeout value passed in. |
public final void cdata(char ch[],int start,int length) throws org.xml.sax.SAXException {
if ((null != m_elemContext.m_elementName) && (m_elemContext.m_elementName.equalsIgnoreCase("SCRIPT") || m_elemContext.m_elementName.equalsIgnoreCase("STYLE"))) {
try {
if (m_elemContext.m_startTagOpen) {
closeS... | Receive notification of cdata. <p>The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so tha... |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case N4JSPackage.EXPRESSION_STATEMENT__EXPRESSION:
return expression != null;
}
return super.eIsSet(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public boolean supportsBearing(){
return mProperties.mSupportsBearing;
}
| Returns true if the provider is able to provide bearing information, false otherwise. A provider that reports bearing under most circumstances but may occassionally not report it should return true. |
public static void main(final String[] args){
DOMTestCase.doMain(hc_characterdatareplacedatamiddle.class,args);
}
| Runs this test from the command line. |
@SuppressWarnings("unchecked") public <T extends Actor>T createProxyActor(T base){
checkNotNull(base);
if (base instanceof Player) {
Player player=(Player)base;
Player permActor=queryCapability(Capability.PERMISSIONS).matchPlayer(player);
if (permActor == null) {
permActor=player;
}
Player... | Given an actor, return a new one that may use a different platform for permissions and world editing. |
public SortedEigenPairs copy(){
SortedEigenPairs cp=new SortedEigenPairs();
cp.eigenPairs=this.eigenPairs.clone();
return cp;
}
| Returns a deep copy of this object |
@Override public String toAscii(){
checkIntegrity();
if (columns.isEmpty()) {
if (titles != null && titles.isEmpty()) {
return "";
}
if (titles == null) {
return "";
}
}
String computeBorder=getBorderLine();
String beginBorderLine;
String endBorderLine;
if (computeBorder != nul... | Transform the given data into an ascii array |
public void addDataSources(final int numDataSources){
int currentIndex=dataset.getColumnCount();
for (int i=0; i < numDataSources; i++) {
addColumn(currentIndex + i);
}
}
| Create specified number of set of data sources. Adds these two existing data sources. |
protected void drawArrow(Canvas canvas){
if (jumpPoint.x != -1) {
canvas.drawCircle(jumpPoint.x,jumpPoint.y,smallRadius,smallPaint);
}
if (bezier) {
arrowPath.reset();
arrowPath.moveTo(c.x,c.y);
arrowPath.quadTo(e.x,e.y,d.x,d.y);
canvas.drawPath(arrowPath,arrowPaint);
}
else if (isLoading... | the method do such things: 1.draw arrow. 2.when animate was completed, let the small ball jump. |
public NoiseTagLdaModel(InputStream in) throws IOException {
GZIPInputStream zipin=new GZIPInputStream(in);
BufferedInputStream bin=new BufferedInputStream(zipin);
DataInputStream datain=new DataInputStream(bin);
numTopics=datain.readInt();
int numWords=datain.readInt();
alpha=datain.readDouble();
beta=da... | Load an existing model. |
public static mxFibonacciHeap union(mxFibonacciHeap h1,mxFibonacciHeap h2){
mxFibonacciHeap h=new mxFibonacciHeap();
if ((h1 != null) && (h2 != null)) {
h.min=h1.min;
if (h.min != null) {
if (h2.min != null) {
h.min.right.left=h2.min.left;
h2.min.left.right=h.min.right;
h.min.r... | Joins two Fibonacci heaps into a new one. No heap consolidation is performed at this time. The two root lists are simply joined together. <p> Running time: O(1) actual </p> |
public Term withOption(String optionName,String optionValue){
Map<String,String> newOptions=ImmutableMap.<String,String>builder().putAll(options).put(optionName,optionValue).build();
return new Term(identifier,newOptions);
}
| Add an option name-value pair to the Term, e.g. "myRepo" -> "myRepo(revision=4)". |
public double phi(double element){
this.sort();
return cern.jet.stat.Descriptive.rankInterpolated(buffer,element) / this.size();
}
| Returns how many percent of the elements contained in the receiver are <tt><= element</tt>. Does linear interpolation if the element is not contained but lies in between two contained elements. |
public static int initTex(){
if (DEBUG) Log.v(TAG,"initTex:");
return genSurfaceTextureID();
}
| create external texture |
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private int queueInputBuffer(MediaCodec codec,ByteBuffer[] inputBuffers,int index,SpeechRecord speechRecord){
if (speechRecord == null || speechRecord.getRecordingState() != SpeechRecord.RECORDSTATE_RECORDING) {
return -1;
}
if (Build.VERSION.SDK_INT >= Build.VERSION... | Copy audio from the recorder into the encoder. |
@Override public Object createFromString(EDataType eDataType,String initialValue){
switch (eDataType.getClassifierID()) {
case N4JSPackage.VARIABLE_STATEMENT_KEYWORD:
return createVariableStatementKeywordFromString(eDataType,initialValue);
case N4JSPackage.PROPERTY_NAME_KIND:
return createPropertyNameKindFromStri... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public void actionPerformed(ActionEvent e){
JTextComponent target=getTextComponent(e);
if (target != null) {
int offs=target.getCaretPosition();
boolean failed=false;
try {
Element curPara=Utilities.getParagraphElement(target,offs);
offs=Utilities.getPreviousWord(target,offs);
if (offs... | The operation to perform when this action is triggered. |
public long maxTransferTime(long size,long kBps){
long transferTout=((size) / kBps) * 8 * 1000;
return transferTout > 3000 ? transferTout : 3000;
}
| Calculates maximum transfer time of <tt>size</tt> bytes for specified transfer rate |
public float aspectRatio(){
return (float)width / height;
}
| Returns width/height. |
public List<FileHandler> fileHandlers(){
return subresources().fileHandlers();
}
| Get the list of FileHandlers configured on this logger |
private void paintForeground(SynthContext ctx,Graphics g,int x,int y,int w,int h,AffineTransform transform){
SeaGlassPainter foregroundPainter=style.getForegroundPainter(ctx);
if (foregroundPainter != null) {
paint(foregroundPainter,ctx,g,x,y,w,h,transform);
}
}
| Paint the object's foreground. |
public int discretizeX(double position){
int i=(int)(position * oneOverSpaceWidth * trapGridWidth);
if (toroidalWorld) return (i + trapGridWidth) % trapGridWidth;
i+=2 * trapGridWidth;
i%=(2 * trapGridWidth);
if (i < trapGridWidth) return i;
return trapGridWidth - i;
}
| determines on what trap a certain location belongs to |
public static Test suite(){
return new TestSuite(TestPolynomial.class);
}
| This method uses reflection to collect up all of the test methods from this class and return them to the test runner. |
public boolean add(E e){
if (offer(e)) return true;
else throw new IllegalStateException("Queue full");
}
| Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning <tt>true</tt> upon success and throwing an <tt>IllegalStateException</tt> if no space is currently available. <p>This implementation returns <tt>true</tt> if <tt>offer</tt> succeeds, e... |
public void testBug73070() throws Exception {
if (!this.isSetForFabricTest) {
return;
}
this.conn=(FabricMySQLConnection)getNewDefaultDataSource().getConnection(this.username,this.password);
this.conn.setServerGroupName("fabric_test1_global");
this.conn.createStatement().executeUpdate("drop procedure if e... | Test for Bug#73070 - prepareCall() throws NPE To test this, we create a basic stored procedure with a parameter, call it and check the result. |
public String toString(boolean freq){
String result=m_attribute.name() + "=" + m_attribute.value(m_valueIndex);
if (freq) {
result+=":" + m_frequency;
}
return result;
}
| A string representation of this item, (i.e. <attribute name> <comparison operator> <item value>). This default implementation just prints the attribute name and (optionally) frequency information. |
private boolean acceptsTypeArguments(Declaration dec,Type receiverType,List<Type> typeArguments,Tree.TypeArguments tas,Node parent){
boolean explicit=tas instanceof Tree.TypeArgumentList;
boolean typeExpression=parent instanceof Tree.SimpleType;
if (explicit && !typeExpression) {
Tree.TypeArgumentList tal=(Tr... | Checks the types of the given type arguments against the type parameters of the given declaration, and adds errors to the arguments that don't satisfy the constraints. Also adds an error if there were explicit type arguments and the declaration is not generic, or if there are the wrong number of type arguments for a ... |
public StoreContext(ByteBuffer frameworkId,List<ByteBuffer> taskIds,List<ByteBuffer> taskNodes,List<ByteBuffer> pendingTasks,List<ByteBuffer> stagingTasks,List<ByteBuffer> activeTasks,List<ByteBuffer> lostTasks,List<ByteBuffer> killableTasks){
this.frameworkId=frameworkId;
this.taskIds=taskIds;
this.taskNodes=tas... | Accept list of ByteBuffers and re-create the SchedulerState maps. |
public long count(){
return xStats.count();
}
| Returns the number of pairs in the dataset. |
int balance(){
switch (opc) {
case opc_dead:
case opc_label:
case opc_iinc:
case opc_arraylength:
case opc_laload:
case opc_daload:
case opc_nop:
case opc_ineg:
case opc_fneg:
case opc_lneg:
case opc_dneg:
case opc_i2f:
case opc_f2i:
case opc_l2d:
case opc_d2l:
case opc_i2b:
case opc_i2c:
case opc_i2s:
case opc_jsr:
ca... | Balance the stack |
public void ifPresent(Consumer<? super T> consumer){
if (value != null) consumer.accept(value);
}
| Invokes consumer function with value if present. |
public boolean isSet(){
return true;
}
| Returns true if the current value of the reader is not null |
public static void logout(Context context,String accessToken,AsyncHttpResponseHandler responseHandler){
List<Header> headerList=new ArrayList<Header>();
headerList.add(new BasicHeader(ApiKey.HeadKey.ACCESS_TOKEN,accessToken));
try {
post(context,getApiServerUrl() + USER_LOGOUT,headerList,null,responseHandler)... | user logout (/v1/users/logout) |
private void applyAttachedObject(FaceletContext ctx,UIComponent parent,String eventName){
ClientBehaviorHolder bHolder=(ClientBehaviorHolder)parent;
if (null == eventName) {
eventName=bHolder.getDefaultEventName();
if (null == eventName) {
throw new TagException(this.tag,"Event attribute could not be ... | <p class="changed_added_2_0"></p> |
private static File findShmemJar(Collection<Throwable> errs,String igniteHome){
File libs=new File(igniteHome,"libs");
if (!libs.exists() || libs.isFile()) {
errs.add(new IllegalStateException("Failed to find libs folder in resolved IGNITE_HOME: " + igniteHome));
return null;
}
for ( File lib : libs.li... | Tries to find shmem jar in IGNITE_HOME/libs folder. |
protected Double wrapKey(double k){
return new Double(k);
}
| Wraps a key |
private void connectTxHsc2SerialDevices(SerialInterface serialInterface,St950x0 eeprom,LcdDriver lcdDriver,IoPort[] txIoPorts){
SpiBus bus=new SpiBus("bus",serialInterface);
bus.addSlaveDevice(eeprom);
bus.addSlaveDevice(lcdDriver);
bus.connect();
Pin.interconnect(txIoPorts[IoPort.PORT_4].getPin(6),eeprom.get... | Connect Tx serial interface HSC2 with the eeprom and the lcd driver via a SPI bus |
public void updateThroughput(long currentTime){
throughputCalculationLock.lock();
try {
int interval=(int)(currentTime - lastThroughputCalculationTime);
long minInterval=getThroughputCalculationIntervalInMillis();
if ((minInterval == 0) || (interval < minInterval)) {
return;
}
long readByt... | Updates the throughput counters. |
private static Object add(final Object array,final int index,final Object element,final Class<?> clss){
if (array == null) {
if (index != 0) {
throw new IndexOutOfBoundsException("Index: " + index + ", Length: 0");
}
final Object joinedArray=Array.newInstance(clss,1);
Array.set(joinedArray,0,ele... | Underlying implementation of add(array, index, element) methods. The last parameter is the class, which may not equal element.getClass for primitives. |
@Override public boolean touchOver(Object sender){
if (!mIsInteractionLocked && mTouchStatus != PLSceneElementTouchStatus.PLSceneElementTouchStatusOver) {
mTouchStatus=PLSceneElementTouchStatus.PLSceneElementTouchStatusOver;
return true;
}
return false;
}
| touch methods |
public Transaction(NetworkParameters params,byte[] msg,int offset,@Nullable Message parent,boolean parseLazy,boolean parseRetain,int length) throws ProtocolException {
super(params,msg,offset,parent,parseLazy,parseRetain,length);
}
| Creates a transaction by reading payload starting from offset bytes in. Length of a transaction is fixed. |
private static HadoopFileBlock split(boolean igfs,String file,long start,long len,String... hosts){
URI uri=URI.create((igfs ? "igfs://igfs@" : "hdfs://") + file);
return new HadoopFileBlock(hosts,uri,start,len);
}
| Create split. |
static JSONObject readJsonFromUrlWithCmsHeader(String url) throws MalformedURLException, IOException, JSONException {
InputStream is=null;
JSONObject jObj=new JSONObject();
try {
HttpURLConnection.setFollowRedirects(false);
HttpURLConnection con=(HttpURLConnection)new URL(url).openConnection();
con.se... | removed header (only used for authorization for PP) 2015.08 |
public void test_getInstanceLjava_lang_String02(){
try {
KeyManagerFactory.getInstance(null);
fail("NoSuchAlgorithmException or NullPointerException should be thrown (algorithm is null");
}
catch ( NoSuchAlgorithmException e) {
}
catch ( NullPointerException e) {
}
for (int i=0; i < invalidValues.l... | Test for <code>getInstance(String algorithm)</code> method Assertion: throws NullPointerException when algorithm is null; throws NoSuchAlgorithmException when algorithm is not correct; |
public long headerChecksum(){
return this.header().checksum();
}
| Get the checksum for the table from the record header. |
public Matrix3f m21(float m21){
this.m21=m21;
return this;
}
| Set the value of the matrix element at column 2 and row 1 |
public static ConditionOperand LESS(){
return new ConditionOperand(LESS);
}
| Create the condition code operand for LESS |
public static void register(){
GameRegistry.registerBlock(BasicBlock,ItemBlockBasic.class,"BasicBlock");
GameRegistry.registerBlock(BasicBlock2,ItemBlockBasic.class,"BasicBlock2");
GameRegistry.registerBlock(MachineBlock,ItemBlockMachine.class,"MachineBlock");
GameRegistry.registerBlock(MachineBlock2,ItemBlockM... | Adds and registers all blocks. |
public static Matrix4 tangoPoseToMatrix(TangoPoseData tangoPose){
Vector3 v=new Vector3(tangoPose.translation[0],tangoPose.translation[1],tangoPose.translation[2]);
Quaternion q=new Quaternion(tangoPose.rotation[3],tangoPose.rotation[0],tangoPose.rotation[1],tangoPose.rotation[2]);
q.conjugate();
Matrix4 m=new ... | Converts from TangoPoseData to a Matrix4 for transformations. |
@Override public int hashCode(){
return (int)((this.latlon & Integer.MAX_VALUE) >> 1) + (int)(this.latlon >> 33);
}
| compute the hash code of a coordinate this produces identical hash codes for locations that are close to each other |
public boolean isScriptingEnabled(){
return scriptingEnabled;
}
| Whether the parser considers scripting to be enabled for noscript treatment. |
private void filterKnownVolumes(StorageSystem system,DbClient dbClient,XtremIOClient xtremIOClient,String xioClusterName,Set<String> igVolumes) throws Exception {
Iterator<String> itr=igVolumes.iterator();
while (itr.hasNext()) {
String volumeName=itr.next();
XtremIOVolume xioVolume=xtremIOClient.getVolumeD... | Filter the known volumes in DB, as the preferredPools list in Host needs to have pools of unmanaged volumes alone. |
public boolean isShadowEnabled(){
if (shadowMap == null) {
return (false);
}
return (shadowMap.getEnabled());
}
| Find out if shadows are visible |
public void resumeTraceSession(int traceSessionId) throws SQLException {
try (FbService service=attachServiceManager()){
service.startServiceAction(getTraceSPB(service,isc_action_svc_trace_resume,traceSessionId));
queueService(service);
}
catch ( IOException ioe) {
throw new SQLException(ioe);
}
}
| Resumes a trace session with the given trace session ID |
public static String value(){
if (_value == null) {
_value=computeValue();
}
return _value;
}
| Try to return a non-loopback hostname for this host, which other hosts can use to contact it. |
private void parseRecord(Element unitNode){
NodeList nl=unitNode.getChildNodes();
for (int i=0; i < nl.getLength(); i++) {
Node currNode=nl.item(i);
if (currNode.getParentNode() != unitNode) {
continue;
}
int nodeType=currNode.getNodeType();
if (nodeType == Node.ELEMENT_NODE) {
Strin... | Parse a Unit tag. Unit tags will contain a list of Entity tags. |
public boolean isCellEditable(int screenRow,int screenCol){
CellEntry cell=getCell(screenRow + 1,screenCol + 1);
if (cell == null) {
return true;
}
else {
return cell.getEditLink() != null;
}
}
| Tells Swing whether the cell is editable. |
public Message sendMessage(Chat chat,SendableMessage message){
HttpResponse<String> response;
JSONObject jsonResponse=null;
Message messageResponse=null;
switch (message.getType()) {
case TEXT:
{
SendableTextMessage textMessage=(SendableTextMessage)message;
try {
MultipartBody request=Unirest.... | This will send the provided SendableMessage object to the Chat that the Chat object represents |
public boolean isAnnotationMatch(StringBuilder annotationClassName){
int activeCount=0;
for (int i=_listeners.length - 1; i >= 0; i--) {
ScanListenerByteCode listener=_currentListeners[i];
if (listener == null) continue;
if (listener.isScanMatchAnnotation(annotationClassName)) {
_currentListen... | Returns true if the annotation class is a match. |
public long readLong(){
return ((buf[position++] & 0xff) + ((long)(buf[position++] & 0xff) << 8) + ((long)(buf[position++] & 0xff) << 16)+ ((long)(buf[position++] & 0xff) << 24)+ ((long)(buf[position++] & 0xff) << 32)+ ((long)(buf[position++] & 0xff) << 40)+ ((long)(buf[position++] & 0xff) << 48)+ ((long)(buf[positio... | Read a long (8 bytes) from the buffer. |
private int[] maxIntegerDigits(double[][] values){
int[] digits=new int[values[0].length];
for (int j=0; j < values[0].length; j++) {
for ( double[] value : values) {
digits[j]=Math.max(digits[j],integerDigits(value[j]));
}
}
return digits;
}
| Returns the maximum integer digits in each column of the specified values. |
public void executeTest(GridTestLog4jLogger log) throws Exception {
counter.incrementAndGet();
File workDir=U.resolveWorkDirectory("marshaller",false);
final MarshallerContextImpl.ContinuousQueryListener queryListener=new MarshallerContextImpl.ContinuousQueryListener(log,workDir);
final ArrayList evts=new Array... | Executes onUpdated |
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){
switch (featureID) {
case N4JSPackage.POSTFIX_EXPRESSION__EXPRESSION:
return basicSetExpression(null,msgs);
}
return super.eInverseRemove(otherEnd,featureID,msgs);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public boolean equals(Object obj){
if (!(obj instanceof BurlapRemote)) return false;
BurlapRemote remote=(BurlapRemote)obj;
return this.url.equals(remote.url);
}
| Defines equality |
private void checkCompatibleVersion(){
if (!_dbClient.checkGeoCompatible(EXPECTED_GEO_VERSION)) {
throw APIException.badRequests.incompatibleGeoVersions(EXPECTED_GEO_VERSION,FEATURE_NAME);
}
}
| Check if all the VDCs in the federation are in the same expected or minimum supported version for this API. |
protected void addConditionPropertyDescriptor(Object object){
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),getResourceLocator(),getString("_UI_ConditionalRoute_condition_feature"),getString("_UI_PropertyDescriptor_description","_UI_Condit... | This adds a property descriptor for the Condition feature. <!-- begin-user-doc --> <!-- end-user-doc --> |
public MekaDialog(Frame owner,boolean modal){
this(owner,"",modal);
}
| Creates a dialog with the specified owner Frame, modality and an empty title. |
public static PersonFull person(String idPerson,String profile,String filter) throws NetworkException {
String params=ServiceSecurity.construireParams(false,AllocineService.CODE,idPerson,AllocineService.PROFILE,profile,AllocineService.FILTER,filter);
String sed=ServiceSecurity.getSED();
String sig=ServiceSecurity... | Informations sur une personne |
protected void initModules(Collection<IFloodlightModule> moduleSet) throws FloodlightModuleException {
for ( IFloodlightModule module : moduleSet) {
Map<Class<? extends IFloodlightService>,IFloodlightService> simpls=module.getServiceImpls();
if (simpls != null) {
for ( Entry<Class<? extends IFlood... | Allocate service implementations and then init all the modules |
@Override public String toString(){
return "AssignmentFailure{" + "resource=" + resource + ", asking="+ asking+ ", used="+ used+ ", available="+ available+ ", message="+ message+ '}';
}
| Returns a String representation of this assignment failure, with details about the resource that caused the failure and its current level of allocation and availability on the target. |
public MeasurementGroup addMeasure(String name,double val,double min,double max,double exp,boolean lowerisbetter){
measurements.add(new Measurement(name,val,min,max,exp,lowerisbetter));
return this;
}
| Add a single measurement. |
private static List createList(Object obj0,Object obj1){
List list=new ArrayList();
list.add(obj0);
list.add(obj1);
return list;
}
| Creates a list from two items |
@DSComment("Potential intent to trigger other processing") @DSSafe(DSCat.INTENT_EXCHANGE) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:09.458 -0500",hash_original_method="983951350B18B30CD357EFC4A5F8C533",hash_generated_method="369EAA9A7D333C9805FC57A65750D36F") public Intent ... | Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll". |
public Builder maxConcurrentOperations(int maxConcurrentOperations){
this.maxConcurrentOperations=maxConcurrentOperations;
return this;
}
| Sets the maximum number of allowed asynchronous operations to be in process. |
public static IgniteUuid randomTrashId(){
return TRASH_IDS[ThreadLocalRandom.current().nextInt(TRASH_CONCURRENCY)];
}
| Get random trash ID. |
public static String convertStringToHexString(String data){
return conventBytesToHexString(data.getBytes());
}
| Convert the string to hex string value. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.