code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
private boolean checkZoningRequired(String token,URI varrayURI){
if (!isZoningRequired(varrayURI)) {
WorkflowStepCompleter.stepSucceded(token);
return false;
}
else {
WorkflowStepCompleter.stepExecuting(token);
return true;
}
}
| Returns true if zoning required; sets Workflow Step status to executing or suceeded depending. |
@Ignore("NaN behavior TBD") @Test public void testLinearDistance_WithNaN() throws Exception {
Location begin=new Location(Double.NaN,Double.NaN);
Location end=new Location(34.2,-119.2);
double distance=begin.linearDistance(end);
assertTrue("expecting NaN",Double.isNaN(distance));
}
| Ensures linear distance is NaN when NaN members are used. |
public SqlOperation parse(String statement,String dbmsType){
SqlOperationMatcher matcher=matchers.get(dbmsType);
if (matcher == null) matcher=new MySQLOperationMatcher();
return matcher.match(statement);
}
| Parse a SQL statement. |
protected void preorder(TreeNode<E> root){
if (root == null) return;
System.out.print(root.element + " ");
preorder(root.left);
preorder(root.right);
}
| Preorder traversal from a subtree |
public String line(){
return line(false);
}
| Get text from the current position until the end of the line. After return, the current position is the start of the next line. |
public static boolean removeGlobalPreferences(String namespace){
try {
getGlobalPreferences(namespace).removeNode();
return true;
}
catch ( BackingStoreException e) {
return false;
}
}
| Deletes certain global preferences for MASON, with the given additional prefix as a namespace. |
private Map<String,Object> handleMiscProcessorError(Transaction transaction){
logger.warningfmt("Error processing transaction: %s %s %s",transaction.getStatus(),transaction.getProcessorResponseCode(),transaction.getProcessorResponseText());
return JsonResponseHelper.create(ERROR,"Payment failure: " + firstNonNull(e... | Handles a miscellaneous transaction processing error response. |
public Iterator<Entry<Double,Double>> weightedValuesIterator(){
return valueMap.entrySet().iterator();
}
| Returns an iterator over entries each consisting of a value and its weight. |
public HgTestRepository cloneRepository() throws Exception {
final TempDirTestFixture dirFixture=createFixtureDir();
final ProcessOutput processOutput=myTest.runHg(null,"clone",getDirFixture().getTempDirPath(),dirFixture.getTempDirPath());
AbstractVcsTestCase.verify(processOutput);
return new HgTestRepository(m... | Clones a repository from this one. New repository is located in a new temporary test directory. |
public static String b64Hash2hexHash(final String b64Hash){
if (b64Hash.length() > 12) {
return "";
}
return Digest.encodeHex(Base64Order.enhancedCoder.decode(b64Hash));
}
| <code>12 * 6 bit = 72 bit = 18</code> characters hex-hash |
private void addTestData(){
User adminUser=User.findByLoginId("admin");
User lazielUser=User.findByLoginId("laziel");
Project project=Project.findByOwnerAndProjectName("yobi","projectYobi");
ct1=addTestThread1(adminUser,lazielUser,project);
ct2=addTestThread2(adminUser,lazielUser,project);
ct3=addTestThread... | Adds test data. |
public ServiceOperationException(String message,ApplicationExceptionBean bean,Throwable cause){
super(message,bean,cause);
}
| Constructs a new exception with the specified detail message, cause, and bean for JAX-WS exception serialization. |
private Object writeReplace(){
return new SynchronizedList(list);
}
| Allows instances to be deserialized in pre-1.4 JREs (which do not have SynchronizedRandomAccessList). SynchronizedList has a readResolve method that inverts this transformation upon deserialization. |
public static boolean isEmpty(String str){
return (str == null || str.length() == 0);
}
| is null or its length is 0 |
synchronized void transactionResumed() throws InvalidSessionHandleStateException {
TransactionContextStateHandler nextState=state.transactionResumed();
setState(nextState);
}
| Notification that the branch has been resumed. |
public static Date parseDateDay(String dateString) throws ParseException {
return getSimplDateFormat(DF_DEF).parse(dateString);
}
| Returns date parsed from string in format: yyyy.MM.dd. |
public Variable define(String name) throws IllegalStateException, IllegalArgumentException {
validateIsNotKeyword(name);
Variable value=new Variable(name,this);
this.namedVariables.put(name,value);
return value;
}
| Define a name in this scope. If it is a global name, then throw IllegalArgumentException. |
static void unregister(final Object value){
Set<IDKey> registry=getRegistry();
if (registry != null) {
registry.remove(new IDKey(value));
synchronized (HashCodeBuilder.class) {
registry=getRegistry();
if (registry != null && registry.isEmpty()) {
REGISTRY.remove();
}
}
}
}
| <p> Unregisters the given object. </p> <p> Used by the reflection methods to avoid infinite loops. |
private void onAirplaneModeChanged(){
mCheckBoxPref.setChecked(isAirplaneModeOn(mContext));
}
| Called when we've received confirmation that the airplane mode was set. TODO: We update the checkbox summary when we get notified that mobile radio is powered up/down. We should not have dependency on one radio alone. We need to do the following: - handle the case of wifi/bluetooth failures - mobile does not send failu... |
public boolean isGeneric(){
return true;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
protected void print(Object s) throws IOException {
out.write(Convert.escapeUnicode(s.toString()));
}
| Print string, replacing all non-ascii character with unicode escapes. |
public void clearAccessibleSelection(){
synchronized (List.this) {
int selectedIndexes[]=List.this.getSelectedIndexes();
if (selectedIndexes == null) return;
for (int i=selectedIndexes.length - 1; i >= 0; i--) {
List.this.deselect(selectedIndexes[i]);
}
}
}
| Clears the selection in the object, so that nothing in the object is selected. |
private static boolean isContactUri(Uri uri){
return ContactsContract.AUTHORITY.equals(uri.getAuthority()) && !uri.getPath().startsWith(DISPLAY_PHOTO_PATH);
}
| Checks if the given URI is a general Contact URI, and not a specific display photo. |
public Vector3f multLocal(float scalar){
x*=scalar;
y*=scalar;
z*=scalar;
return this;
}
| MultLocal multiplies this vector by a scalar internally, and returns a handle to this vector for easy chaining of calls. |
public CRectFEvaluator(RectF reuseRect){
mRectF=reuseRect;
}
| Constructs a RectEvaluator that modifies and returns <code>reuseRect</code> in #evaluate(float, android.graphics.RectF, android.graphics.Rect) calls. The value returned from #evaluate(float, android.graphics.RectF, android.graphics.Rect) should not be cached because it will change over time as the object is reused on e... |
public void dump_json(PrintStream fp,String indent){
fp.printf("%s{ %s,\n",indent,json_field("type",type));
fp.printf("%s %s,\n",indent,json_field("link",link));
fp.printf("%s %s,\n",indent,json_field("signature",method.getSignature()));
SourceLocationTag slt=(stmt == null) ? SootUtils.getMethodLocation(metho... | Dumps out the call chain in json format |
@Override public boolean isConnectionBased(){
return false;
}
| Returns <tt>false</tt>. Digest authentication scheme is request based. |
public void mouseWheelMoved(MouseWheelEvent e){
boolean accepted=checkModifiers(e);
if (accepted == true) {
VisualizationViewer<?,?> vv=(VisualizationViewer<?,?>)e.getSource();
Point2D mouse=e.getPoint();
Point2D center=vv.getCenter();
int amount=e.getWheelRotation();
if (zoomAtMouse) {
if... | zoom the display in or out, depending on the direction of the mouse wheel motion. |
@Override public String toString(){
return m_Matrix.toString();
}
| Converts a matrix to a string |
public static void registerMetadata(MetadataRegistry registry){
if (registry.isRegistered(KEY)) {
return;
}
ElementCreator builder=registry.build(KEY);
builder.addAttribute(ABSOLUTE_TIME);
builder.addAttribute(DAYS);
builder.addAttribute(HOURS);
builder.addAttribute(METHOD);
builder.addAttribute(MIN... | Registers the metadata for this element. |
public String select(){
String value=(String)getAccountId().getValue();
int rowIndex=Integer.parseInt(value);
getCustomers().setRowIndex(rowIndex);
return (null);
}
| <p>Select the customer whose account id was specified.</p> |
public HeaderIterator iterator(final String name){
return new BasicListHeaderIterator(this.headers,name);
}
| Returns an iterator over the headers with a given name in this group. |
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. |
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 ProjectExample(){
oredCriteria=new ArrayList<Criteria>();
}
| This method was generated by MyBatis Generator. This method corresponds to the database table project |
public int compareTo(Short object){
return compare(value,object.value);
}
| Compares this object to the specified short object to determine their relative order. |
public boolean isResolved(){
return fIsResolved;
}
| Returns <code>true</code> if the variable has been resolved, <code>false</code> otherwise. |
public String type(){
return type;
}
| gets the type of the socket. |
private boolean zzRefill() throws java.io.IOException {
return true;
}
| Refills the input buffer. |
public static StandardEvaluationContext createStandardEvaluationContext(BeanFactory beanFactory){
if (beanFactory == null) {
logger.warn("Creating EvaluationContext with no beanFactory",new RuntimeException("No beanfactory"));
}
return doCreateContext(beanFactory);
}
| Obtains the context from the beanFactory if not null; emits a warning if the beanFactory is null. |
public void enqueue(Collection<MetricDatumWithKey<KeyType>> data){
synchronized (queue) {
if (shuttingDown) {
LOG.warn("Dropping metrics {} because CWPublisherRunnable is shutting down.",data);
return;
}
if (LOG.isDebugEnabled()) {
LOG.debug("Enqueueing {} datums for publication",data.size... | Enqueues metric data for publication. |
private void extract() throws Exception {
Extractor extractor=factory.getInstance();
if (extractor != null) {
extract(extractor);
}
}
| This is used to extract the labels associated with the group. Extraction will instantiate a <code>Label</code> object for an individual annotation declared within the union. Each of the label instances is then registered by both name and type. |
public static byte floatToByte315(float f){
int bits=Float.floatToRawIntBits(f);
int smallfloat=bits >> (24 - 3);
if (smallfloat <= ((63 - 15) << 3)) {
return (bits <= 0) ? (byte)0 : (byte)1;
}
if (smallfloat >= ((63 - 15) << 3) + 0x100) {
return -1;
}
return (byte)(smallfloat - ((63 - 15) << 3));... | floatToByte(b, mantissaBits=3, zeroExponent=15) <br>smallest non-zero value = 5.820766E-10 <br>largest value = 7.5161928E9 <br>epsilon = 0.125 |
public static XPath2FilterContainer04 newInstance(Element element,String BaseURI) throws XMLSecurityException {
return new XPath2FilterContainer04(element,BaseURI);
}
| Creates a XPath2FilterContainer04 from an existing Element; needed for verification. |
public Matrix4(float[] values){
this.set(values);
}
| Constructs a matrix from the given float array. The array must have at least 16 elements; the first 16 will be copied. |
public void testTxPartitionedOptimisticSerializable() throws Exception {
checkTx(PARTITIONED,OPTIMISTIC,SERIALIZABLE);
}
| Test TRANSACTIONAL PARTITIONED cache with OPTIMISTIC/SERIALIZABLE transaction. |
@NoInline static void compileMethod(DynamicLink dynamicLink,RVMMethod targetMethod){
RVMClass targetClass=targetMethod.getDeclaringClass();
if (!targetMethod.isCompiled()) {
targetMethod.compile();
if (!(targetMethod.isObjectInitializer() || targetMethod.isStatic())) {
targetClass.updateTIBEntry(targe... | Compile (if necessary) targetMethod and patch the appropriate dispatch tables. |
public ColorRange(FloatRange hue,FloatRange sat,FloatRange bri,FloatRange alpha,FloatRange black,FloatRange white,String name){
super();
hueConstraint=new GenericSet<FloatRange>(hue != null ? hue : new FloatRange(0,1));
saturationConstraint=new GenericSet<FloatRange>(sat != null ? sat : new FloatRange(0,1));
br... | Constructs a new range with the supplied constraints (if an HSV argument is null, a range of 0.0 ... 1.0 is created automatically for that constraint). If alpha is left undefined, it'll be initialized to fully opaque only. You can also specify ranges for possible black and white points which are used if the range is la... |
public Message(Address sender,Address recipient,String type){
if (sender == null) throw new IllegalArgumentException("sender mustn't be null in Message constructor");
if (recipient == null) throw new IllegalArgumentException("recipient mustn't be null in Message constructor");
if (type == null) throw new Il... | Constructs a Message using the values of the fields. The binary content is set to null. |
public IComment editGlobalComment(final IComment comment,final String newComment){
try {
m_node.getComments().editGlobalCodeNodeComment(comment,newComment);
}
catch ( final CouldntSaveDataException exception) {
CUtilityFunctions.logException(exception);
}
return null;
}
| Edit a global code node comment. |
public void saveLaunchConfiguration(ILaunchConfigurationWorkingCopy configuration) throws CoreException {
LaunchConfigurationUpdater configurator=getLaunchConfigurator(configuration);
if (configurator != null) {
configurator.update();
}
}
| Save the Launch configuration. |
public void decrement(){
mCount--;
if (mCount == 0 && !mLastDecRunnables.isEmpty()) {
int numRunnables=mLastDecRunnables.size();
for (int i=0; i < numRunnables; i++) {
mLastDecRunnables.get(i).run();
}
}
else if (mCount < 0) {
if (mErrorRunnable != null) {
mErrorRunnable.run();
... | Decrements the ref count |
private void onSchemaComplexType(Element schemaComplexType,DatatypeElementFactory elementFactory){
Iterator<Element> iter=schemaComplexType.elementIterator(XSD_ATTRIBUTE);
while (iter.hasNext()) {
Element xsdAttribute=iter.next();
String name=xsdAttribute.attributeValue("name");
QName qname=getQName(nam... | processes an XML Schema <complexTypegt; tag |
protected byte[] pickleMetrics(List<MetricTuple> metrics) throws IOException {
ByteArrayOutputStream out=new ByteArrayOutputStream(metrics.size() * 75);
Writer pickled=new OutputStreamWriter(out,charset);
pickled.append(MARK);
pickled.append(LIST);
for ( MetricTuple tuple : metrics) {
pickled.append(MARK... | See: http://readthedocs.org/docs/graphite/en/1.0/feeding-carbon.html |
public Deathdate(Date date,boolean hasTime){
super(date,hasTime);
}
| Creates a deathdate property. |
public void displayCursor(Cursor cursor){
mCursor=cursor;
mCursorAdapter.changeCursor(cursor);
}
| Display the contents of the cursor as a ListView. |
public final void yybegin(int newState){
zzLexicalState=newState;
}
| Enters a new lexical state |
private int computeFlags(int curFlags){
curFlags&=~(WindowManager.LayoutParams.FLAG_IGNORE_CHEEK_PRESSES | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS| WindowManager... | I'm NOT completely sure how all this bitwise things work... |
public void unplaceVolumeFromMask(URI volumeURI,URI exportMaskURI){
Map<URI,Volume> map=maskToVolumes.get(exportMaskURI);
if (map != null) {
map.remove(volumeURI);
if (map.isEmpty()) {
maskToVolumes.remove(exportMaskURI);
}
}
}
| Remove the placement of the volume from the mappings for the ExportMask and also remove the maskToVolumes entry if we remove the last volume for that ExportMask URI key. |
protected void performTest(){
Instances icopy=new Instances(m_Instances);
Instances result=null;
try {
m_Filter.setInputFormat(icopy);
}
catch ( Exception ex) {
ex.printStackTrace();
fail("Exception thrown on setInputFormat(): \n" + ex.getMessage());
}
try {
result=Filter.useFilter(icopy,m... | performs the actual test |
private void addSharedExternalDependencies(){
Map<String,SortedSet<ExternalDependency>> sharedDependencies=new HashMap<>();
for ( String module : interModuleExternalCompileScopeDependencies.keySet()) {
TreeSet<ExternalDependency> deps=new TreeSet<>();
sharedDependencies.put(module,deps);
Set<String> mo... | For each module that includes other modules' external dependencies via including all files under their ".../lib/" dirs in their (test.)classpath, add the other modules' dependencies to its set of external dependencies. |
public boolean isBlockRemark(){
return blockRemark;
}
| If currently inside a remark, this method tells if it is a block comment (true) or single line comment (false) |
public void withdraw(double amount){
balance-=amount;
}
| Decrease balance by amount |
public static void register(){
CommandCenter.register(FORSAKE,new ForsakeAction());
}
| registers an action |
private int paramNumberFromMoveParam(NormalSsaInsn ndefInsn){
CstInsn origInsn=(CstInsn)ndefInsn.getOriginalRopInsn();
return ((CstInteger)origInsn.getConstant()).getValue();
}
| Returns the parameter number that this move-param insn refers to |
public static int jacobi(BigInteger A,BigInteger B){
BigInteger a, b, v;
long k=1;
k=1;
if (B.equals(ZERO)) {
a=A.abs();
return a.equals(ONE) ? 1 : 0;
}
if (!A.testBit(0) && !B.testBit(0)) {
return 0;
}
a=A;
b=B;
if (b.signum() == -1) {
b=b.negate();
if (a.signum() == -1) {
... | Computes the value of the Jacobi symbol (A|B). The following properties hold for the Jacobi symbol which makes it a very efficient way to evaluate the Legendre symbol <p> (A|B) = 0 IF gcd(A,B) > 1<br> (-1|B) = 1 IF n = 1 (mod 1)<br> (-1|B) = -1 IF n = 3 (mod 4)<br> (A|B) (C|B) = (AC|B)<br> (A|B) (A|C) = (A|CB)<br> (... |
@Override public void writeEntityToNBT(NBTTagCompound tagCompound){
tagCompound.setShort("xTile",(short)this.blockPos.getX());
tagCompound.setShort("yTile",(short)this.blockPos.getY());
tagCompound.setShort("zTile",(short)this.blockPos.getZ());
tagCompound.setFloat("damage",this.damage);
tagCompound.setIntege... | (abstract) Protected helper method to write subclass entity data to NBT. |
@Override protected void onReset(){
super.onReset();
onStopLoading();
if (mPackageObserver != null) {
getContext().unregisterReceiver(mPackageObserver);
mPackageObserver=null;
}
}
| Handles a request to completely reset the Loader. |
@Override public void updateCharacterStream(int columnIndex,Reader x,int length) throws SQLException {
updateCharacterStream(columnIndex,x,(long)length);
}
| Updates a column in the current or insert row. |
public void test_setFormatILjava_text_Format(){
try {
MessageFormat f1=(MessageFormat)format1.clone();
f1.setFormat(0,DateFormat.getTimeInstance());
f1.setFormat(1,DateFormat.getTimeInstance());
f1.setFormat(2,NumberFormat.getInstance());
f1.setFormat(3,new ChoiceFormat("0#off|1#on"));
f1.setF... | java.text.MessageFormat#setFormat(int, Format) Test of method java.text.MessageFormat#setFormat(int, Format). Case 1: Compare getFormats() results after calls to setFormat(). Case 2: Try to call setFormat() using incorrect index. |
public short[][] reduce_table(){
return _reduce_table;
}
| Access to <code>reduce_goto</code> table. |
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter,java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
java.lang.String prefix=xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix=generatePrefix(namespace);
while (xmlWriter.getNamespaceContext().g... | Register a namespace prefix |
private static boolean isNotNullInteresado(InteresadoVO interesado){
boolean result=true;
if (StringUtils.isEmpty(interesado.getId()) && StringUtils.isEmpty(interesado.getNombre())) {
return false;
}
return result;
}
| Metodo que comprueba si un interesado es nulo |
public final boolean checkTag(int identifier){
return this.id == identifier || this.constrId == identifier;
}
| Tests provided identifier. |
public boolean isReady(){
return true;
}
| A sample method. |
public String toHuman(String prefix,String header){
StringBuilder sb=new StringBuilder(100);
int size=size();
sb.append(prefix);
sb.append(header);
sb.append("catch ");
for (int i=0; i < size; i++) {
Entry entry=get(i);
if (i != 0) {
sb.append(",\n");
sb.append(prefix);
sb.append("... | Get the human form of this instance, prefixed on each line with the string. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
@SuppressWarnings("unchecked") private P byteBufferToPage(ByteBuffer buffer){
try (InputStream bais=new ByteBufferInputStream(buffer);ObjectInputStream ois=new ObjectInputStream(bais)){
int type=ois.readInt();
if (type == EMPTY_PAGE) {
return null;
}
else if (type == FILLED_PAGE) {
return... | Reconstruct a serialized object from the specified byte array. |
public void clear(){
oredCriteria.clear();
orderByClause=null;
distinct=false;
}
| This method was generated by MyBatis Generator. This method corresponds to the database table iteration |
private SVGConstants(){
}
| Prevents instance creation. |
private void testCountMessagesInMailbox() throws Exception {
LOG.info("countMessagesInMailbox");
long messageCount=messageMapper.countMessagesInMailbox(MBOXES.get(1));
assertEquals(MESSAGE_NO.size(),messageCount);
}
| Test of countMessagesInMailbox method, of class HBaseMessageMapper. |
private void filterClusterHosts(AssetOptionsContext context,URI datacenter,String storageType,List<HostRestRep> esxHosts){
if (esxHosts != null && !esxHosts.isEmpty() && storageType.equalsIgnoreCase(BlockProvider.SHARED_STORAGE.toString())) {
List<HostRestRep> misfitEsxHosts=api(context).hosts().getByDataCenter(d... | Filter out hosts in the cluster when other hosts in that cluster have failed discovery or are incompatible. |
public ZoneInfoProvider(String resourcePath) throws IOException {
this(resourcePath,null,false);
}
| ZoneInfoProvider searches the given ClassLoader resource path for compiled data files. Resources are loaded from the ClassLoader that loaded this class. |
@Override public ImmutableRangeSet<C> subRangeSet(Range<C> range){
if (!isEmpty()) {
Range<C> span=span();
if (range.encloses(span)) {
return this;
}
else if (range.isConnected(span)) {
return new ImmutableRangeSet<C>(intersectRanges(range));
}
}
return of();
}
| Returns a view of the intersection of this range set with the given range. |
public String toString(){
StringBuffer sb=new StringBuffer("MReport[").append(get_ID()).append(" - ").append(getName());
if (getDescription() != null) sb.append("(").append(getDescription()).append(")");
sb.append(" - C_AcctSchema_ID=").append(getC_AcctSchema_ID()).append(", C_Calendar_ID=").append(getC_Calenda... | String Representation |
public void requestMessage(InfoDisplayEvent event){
fireRequestMessage(new InfoDisplayEvent(this,event.getInformation()));
}
| Request to have a message displayed in a dialog window. |
public static Pair<String,String> cellMethodSplit(String name){
return split(name,"::",true);
}
| Split to a class name and a method name by double colons. |
public void sendData(byte[][] data,int offset,int count,String targetHostName,int targetPort,long interval){
if ((data == null) || (data.length <= 0)) {
if (__IEsptouchTask.DEBUG) {
Log.e(TAG,"sendData(): data == null or length <= 0");
}
return;
}
for (int i=offset; !mIsStop && i < offset + coun... | send the data by UDP |
private static void sendPatchToEnumerationTask(StatelessService service,URI taskLink,Throwable t){
ResourceEnumerationTaskState enumerationTaskBody=new ResourceEnumerationTaskState();
TaskState taskInfo=new TaskState();
if (t == null) {
taskInfo.stage=TaskState.TaskStage.FINISHED;
}
else {
taskInfo.fai... | Sends patch to the enumeration task. |
@Override public void itemStateChanged(ItemEvent e){
JRadioButtonMenuItem c=(JRadioButtonMenuItem)e.getSource();
if (c.getActionCommand().equals("Size 24")) {
changeFontSize(24);
}
else if (c.getActionCommand().equals("Size 22")) {
changeFontSize(22);
}
else if (c.getActionCommand().equals("Size 2... | Performs the action associated with the ItemEvent. |
public ImmutableMap<Service,Long> startupTimes(){
return state.startupTimes();
}
| Returns the service load times. This value will only return startup times for services that have finished starting. |
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 void initializeLocations(){
for ( V v : getGraph().getVertices()) {
Point2D coord=delegate.apply(v);
if (!dontmove.contains(v)) initializeLocation(v,coord);
}
}
| This method calls <tt>initialize_local_vertex</tt> for each vertex, and also adds initial coordinate information for each vertex. (The vertex's initial location is set by calling <tt>initializeLocation</tt>. |
public LegHistogram(final int binSize,final int nofBins){
super();
this.binSize=binSize;
this.nofBins=nofBins;
reset(0);
}
| Creates a new LegHistogram with the specified binSize and the specified number of bins. |
public static boolean[] nullToEmpty(final boolean[] array){
if (array == null || array.length == 0) {
return ArrayUtils.EMPTY_BOOLEAN_ARRAY;
}
return array;
}
| <p>Defensive programming technique to change a <code>null</code> reference to an empty one.</p> <p>This method returns an empty array for a <code>null</code> input array.</p> <p>As a memory optimizing technique an empty array passed in will be overridden with the empty <code>public static</code> references in this cla... |
public void clearPieSegments(){
mPieSegmentList.clear();
}
| Clears the pie segments list. |
@RequestMapping(value=STORAGE_POLICIES_URI_PREFIX + "/namespaces/{namespace}/storagePolicyNames/{storagePolicyName}",method=RequestMethod.PUT,consumes={"application/xml","application/json"}) @Secured(SecurityFunctions.FN_STORAGE_POLICIES_PUT) public StoragePolicy updateStoragePolicy(@PathVariable("namespace") String na... | Updates an existing storage policy by key. <p>Requires WRITE permission on namespace and READ permission on filter namespace</p> |
@Override public boolean willNotMoveInCurrentCollection(ObjectReference object){
return !Space.isInSpace(MC.MARK_COMPACT,object);
}
| Will this object move from this point on, during the current trace ? |
private JsonToken advance() throws IOException {
peek();
JsonToken result=token;
token=null;
value=null;
name=null;
return result;
}
| Advances the cursor in the JSON stream to the next token. |
public boolean isEmptyBorder(){
return emptyType;
}
| Indicates whether this is an empty border |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.