code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static boolean isMetaEndOfTrack(MidiMessage midiMsg){
if (midiMsg.getLength() != 3 || midiMsg.getStatus() != MetaMessage.META) {
return false;
}
byte[] msg=midiMsg.getMessage();
return ((msg[1] & 0xFF) == META_END_OF_TRACK_TYPE) && (msg[2] == 0);
}
| return true if the passed message is Meta End Of Track |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:20.785 -0500",hash_original_method="109E9B4E15544A79F6C06A99B1C7962C",hash_generated_method="F8A29B37E60DA9F012391F770E71A270") public static String readAsciiLine(InputStream in) throws IOException {
StringBuilder result=new Strin... | Returns the ASCII characters up to but not including the next "\r\n", or "\n". |
@Override protected void onMethodEnter(){
Type type=Type.getType(ResolveClassController.class);
Method method=new Method("onResolveClass","(Ljava/io/ObjectStreamClass;)V");
loadArg(0);
invokeStatic(type,method);
}
| Fire off our sensor at the beginning of ObjectInputStream#resolveClass(java.io.ObjectStreamClass). |
public final double distanceSquared(IMovingAgent agent){
return location.distanceSquared(agent.getLocation());
}
| Return the squared distance to an other agent. This method saves some execution time by not applying the square root so a squared distance is returned. |
synchronized void cancel(){
if (HttpLog.LOGV) {
HttpLog.v("Request.cancel(): " + getUri());
}
mLoadingPaused=false;
notify();
mCancelled=true;
if (mConnection != null) {
mConnection.cancel();
}
}
| Data will not be sent to or received from server after cancel() call. Does not close connection--use close() below for that. Called by RequestHandle from non-network thread |
static boolean exists(String name){
if (FileUtils.exists(name + Constants.SUFFIX_PAGE_FILE)) {
return true;
}
return FileUtils.exists(name + Constants.SUFFIX_MV_FILE);
}
| Check if a database with the given name exists. |
@Override public List<JToolBar> createToolBars(Application app,@Nullable View p){
return Collections.emptyList();
}
| Creates toolbars for the application. This class returns an empty list - we don't want toolbars in a text editor. |
public JSONObject(Object bean){
this();
populateMap(bean);
}
| Construct a JSONObject from an Object using bean getters. It reflects on all of the public methods of the object. For each of the methods with unknown parameters and a name starting with <code>"get"</code> or <code>"is"</code> followed by an uppercase letter, the method is invoked, and a key and the value returned from... |
protected boolean isEqualKey(AbstractHashedMap.HashEntry entry,Object key1,Object key2,Object key3,Object key4){
MultiKey multi=(MultiKey)entry.getKey();
return multi.size() == 4 && (key1 == null ? multi.getKey(0) == null : key1.equals(multi.getKey(0))) && (key2 == null ? multi.getKey(1) == null : key2.equals(multi... | Is the key equal to the combined key. |
private static int min(int a,int b,int c){
return a <= b ? (a <= c ? a : c) : (b <= c ? b : c);
}
| Three-way integer minimum. |
public String typeName(){
return "string";
}
| Returns a String description of what kind of entry this is. |
public static void removeArchive(String sourcePath,String destPath,ConsolFun consolFun,int steps) throws IOException {
if (Util.sameFilePath(sourcePath,destPath)) {
throw new IllegalArgumentException(SOURCE_AND_DESTINATION_PATHS_ARE_THE_SAME);
}
RrdDb rrdSource=new RrdDb(sourcePath);
try {
RrdDef rrdDef... | Creates a new RRD file with one archive removed. RRD file is created based on the existing one (the original RRD file is not modified at all). All relevant data from the original RRD file is copied to the new one. |
public synchronized void centerViewPort(final float[] transformedPts,final View view){
Matrix save=new Matrix();
save.set(mMatrixTouch);
final float x=transformedPts[0] - offsetLeft();
final float y=transformedPts[1] - offsetTop();
save.postTranslate(-x,-y);
refresh(save,view,false);
}
| Centers the viewport around the specified position (x-index and y-value) in the chart. Centering the viewport outside the bounds of the chart is not possible. Makes most sense in combination with the setScaleMinima(...) method. |
public synchronized boolean markPending(){
if (!pending) {
pending=true;
return true;
}
return false;
}
| Marks this processing runnable as pending. If this was not already marked as pending, true is returned. |
private boolean hasDate(){
return getDate() != null;
}
| Determines if the date component is set. |
public LinkedHashSet(int initialCapacity,float loadFactor){
super(initialCapacity,loadFactor,true);
}
| Constructs a new, empty linked hash set with the specified initial capacity and load factor. |
void dispose(){
}
| As we recycle the <code>Window</code>, we don't want to dispose it, thus this method does nothing, instead use <code>_dipose</code> which will handle the disposing. |
void appletInfo(){
String str=panel.applet.getAppletInfo();
if (str == null) {
str=amh.getMessage("appletinfo.applet");
}
str+="\n\n";
String atts[][]=panel.applet.getParameterInfo();
if (atts != null) {
for (int i=0; i < atts.length; i++) {
str+=atts[i][0] + " -- " + atts[i][1]+ " -- "+ atts[... | Show the applet info. |
private static Date parseDate(String string){
try {
return new SimpleDateFormat(ISO_8601_DATE_FORMAT).parse(string);
}
catch ( ParseException e) {
return null;
}
}
| Parse an ISO 8601 date converting ParseExceptions to a null result; |
public boolean isSetAnnotation_type(){
return this.annotation_type != null;
}
| Returns true if field annotation_type is set (has been assigned a value) and false otherwise |
public Setting(String key,String value){
this.key=key;
this.value=value;
}
| Constructs a setting with the given key and value. |
public static boolean isPubid(int c){
return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0;
}
| Returns true if the specified character is a valid Pubid character as defined by production [13] in the XML 1.0 specification. |
Frame loadNextFrame(Frame top,Frame frame) throws IOException {
if (!canRewind(frame)) {
return null;
}
while (!frame.arc.isLast()) {
frame.arc=fst.readNextRealArc(frame.arc,fstReader);
frame.state=fsa.step(top.state,frame.arc.label);
if (frame.state != -1) {
break;
}
}
if (frame.sta... | Load frame for sibling arc(node) on fst |
public double smooth(DoubleMatrix1D parIn,DoubleMatrix1D gradOutVec){
MGMParams par=new MGMParams(parIn,p,lsum);
MGMParams gradOut=new MGMParams();
for (int i=0; i < par.betad.size(); i++) {
if (par.betad.get(i) < 0) return Double.POSITIVE_INFINITY;
}
upperTri(par.beta,1);
par.beta.assign(alg.transp... | non-penalized -log(pseudolikelihood) this is the smooth function g(x) in prox gradient this overloaded version calculates both nll and the smooth gradient at the same time any value in gradOut will be replaced by the new calculations |
private double fixToRange(double x,double minX,double maxX){
if (minX > maxX) {
throw new IllegalArgumentException("Requires 'minX' <= 'maxX'.");
}
if (x < minX) {
return minX;
}
else if (x > maxX) {
return maxX;
}
else {
return x;
}
}
| A utility method that adjusts a value, if necessary, to be within a specified range. |
public final List append1(Object value){
ConsCell cell=this.first;
if (cell == null) return new List(value);
List newList=new List(cell.value);
cell=cell.next;
while (cell != null) {
ConsCell newCell=new ConsCell(cell.value,null);
newList.last.next=newCell;
newList.last=newCell;
cell=cell.ne... | This method returns a new list that appends one element at the end of this list. |
public final CC span(int... cells){
if (cells == null || cells.length == 0) {
setSpanX(LayoutUtil.INF);
setSpanY(1);
}
else if (cells.length == 1) {
setSpanX(cells[0]);
setSpanY(1);
}
else {
setSpanX(cells[0]);
setSpanY(cells[1]);
}
return this;
}
| Same functionality as <code>spanX(cellsX).spanY(cellsY)</code> which means this cell will span cells in both x and y. This method returns <code>this</code> for chaining multiple calls. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. Since 3.7... |
public boolean systemShouldAdvance(){
return !isAtRest() || !wasAtRest();
}
| Check if this spring should be advanced by the system. * The rule is if the spring is currently at rest and it was at rest in the previous advance, the system can skip this spring |
@SuppressWarnings("unchecked") public static <K extends Comparable<?>,V>ImmutableRangeMap<K,V> of(){
return (ImmutableRangeMap<K,V>)EMPTY;
}
| Returns an empty immutable range map. |
public static boolean isNotEmpty(Object[] array){
return (array != null && array.length != 0);
}
| <p>Checks if an array of Objects is not empty or not <code>null</code>.</p> |
static synchronized void reset(){
caches.clear();
}
| For testing. |
protected final void checkStateOfPartitioner(DocumentPartitioner partitioner,String partitioning){
}
| Checks the state for the given partitioner and stops the active rewrite session. |
private void trimToSize(int maxSize){
while (true) {
String key;
Bitmap value;
synchronized (this) {
if (size < 0 || (map.isEmpty() && size != 0)) {
throw new IllegalStateException(getClass().getName() + ".sizeOf() is reporting inconsistent results!");
}
if (size <= maxSize || map.is... | Remove the eldest entries until the total of remaining entries is at or below the requested size. |
public static final void drawVerticalText(Graphics graphics,String text,int x,int y,boolean upToDown){
try {
if (SWT.getPlatform().startsWith("rap")) throw new Exception();
try {
graphics.pushState();
graphics.translate(x,y);
if (upToDown) {
graphics.rotate(90);
graphics.... | Draw vertical text. |
private void validateWill(String dest,Object payload){
if ((dest == null) || (payload == null)) {
throw new IllegalArgumentException();
}
MqttAsyncClient.validateTopic(dest);
}
| Validates the will fields. |
public void updateMethod(RVMMethod m){
if (VM.VerifyAssertions) VM._assert(isResolved());
if (VM.VerifyAssertions) VM._assert(m.getDeclaringClass() == this);
if (m.isClassInitializer()) return;
if (m.isStatic() || m.isObjectInitializer()) {
updateJTOCEntry(m);
}
else {
updateVirtualMethod(m);
... | Given a method declared by this class, update all dispatching tables to refer to the current compiled code for the method. |
public boolean isProcessed(){
Object oo=get_Value(COLUMNNAME_Processed);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Processed. |
@Override public Long zremrangeByScore(final byte[] key,final double start,final double end){
return zremrangeByScore(key,toByteArray(start),toByteArray(end));
}
| Remove all the elements in the sorted set at key with a score between min and max (including elements with score equal to min or max). <p> <b>Time complexity:</b> <p> O(log(N))+O(M) with N being the number of elements in the sorted set and M the number of elements removed by the operation |
@SuppressLint("InlinedApi") private void createCameraSource(boolean autoFocus,boolean useFlash){
Context context=getApplicationContext();
}
| Creates and starts the camera. Note that this uses a higher resolution in comparison to other detection examples to enable the ocr detector to detect small text samples at long distances. Suppressing InlinedApi since there is a check that the minimum version is met before using the constant. |
private void unregisterChildListeners(){
Iterator<PropertyChangeListener> iter=fChildListeners.iterator();
while (iter.hasNext()) {
PropertyChangeListener listener=iter.next();
listener.unregister();
}
}
| Unregister the child listeners from the child preference stores. |
private static AbstractMessage receiveMsgProto(){
try {
int msgType=din.readUnsignedByte();
if (msgType == MsgType.REGISTRATION_RESP) {
RegistrationResp regResp=RegistrationResp.parseDelimitedFrom(din);
if (!regResp.hasInitEpoch() || !regResp.hasEpochInterval()) {
Logging.error("Malformed ... | Receives a protobuf message from the server the client is currently connected to, and checks that the message is correctly formatted for the expected message type. The caller is responsible for handling the exact message type(s). |
void insert(DynamicAABBTreeNode item){
if (this.root == null) {
this.root=item;
return;
}
AABB itemAABB=item.aabb;
DynamicAABBTreeNode node=this.root;
while (!node.isLeaf()) {
AABB aabb=node.aabb;
double perimeter=aabb.getPerimeter();
AABB union=aabb.getUnion(itemAABB);
double unionPer... | Internal method to insert a node into the tree. |
public synchronized boolean export(Swc swc) throws FileNotFoundException, IOException {
try {
if (!swc.save()) {
return false;
}
if (Trace.swc) {
Trace.trace("Exported SWC " + swc.getLocation() + "("+ swc.getLastModified()+ ")");
}
if (!(swc.getArchive() instanceof SwcWriteOnlyArchive)... | Saves the given SWC to disk and adds to the cache |
private void handleSpecialTypes(){
switch (type) {
case BEGIN_GROUP:
transformer=BEGIN_GROUP_TNAME;
break;
case END_GROUP:
transformer=END_GROUP_TNAME;
break;
case OR:
transformer=OR_TNAME;
break;
case NOT:
transformer=NOT_TNAME;
break;
}
}
| Provide convenience for certain types. |
public void removeGraphModelListener(GraphListener listnr){
m_listeners.remove(listnr);
}
| Remove a listener from this graph. |
protected JButton createArrowButton(){
XPStyle xp=XPStyle.getXP();
if (xp != null) {
return new XPComboBoxButton(xp);
}
else {
return super.createArrowButton();
}
}
| Creates an button which will be used as the control to show or hide the popup portion of the combo box. |
public boolean isSet(_Fields field){
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SESSION_IDS:
return isSetSessionIDs();
case PACKET:
return isSetPacket();
}
throw new IllegalStateException();
}
| Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise |
public static <Item extends IItem>void restoreSubItemSelectionStatesForAlternativeStateManagement(Item item,List<String> selectedItems){
if (item instanceof IExpandable && !((IExpandable)item).isExpanded() && ((IExpandable)item).getSubItems() != null) {
List<Item> subItems=(List<Item>)((IExpandable<Item,?>)item).... | internal method to restore the selection state of subItems |
public FI_EscapeSummary simpleEscapeAnalysis(IR ir){
final boolean DEBUG=false;
if (DEBUG) {
VM.sysWrite("ENTER Simple Escape Analysis " + ir.method + "\n");
}
if (DEBUG) {
ir.printInstructions();
}
RVMMethod m=ir.method;
MethodSummary summ=SummaryDatabase.findOrCreateMethodSummary(m);
summ.setI... | Performs the escape analysis for a method. <p> Side effect: updates method summary database to hold escape analysis result for parameters |
public void abort() throws IOException {
completeEdit(this,false);
}
| Aborts this edit. This releases the edit lock so another edit may be started on the same key. |
public static void doMain(String[] args){
String job="java:saveWithQueryBuilder";
String keyspaceName="test";
String inputTableName="tweetsbig";
final String outputTableName="copy_tweetsbig";
ContextProperties p=new ContextProperties(args);
DeepSparkContext deepContext=new DeepSparkContext(p.getCluster(),jo... | This is the method called by both main and tests. |
public static boolean fileExists(final String path){
final String path_=normalisePath(path);
final boolean exists=new File(path_).exists();
return exists;
}
| This method checks if the file with the given path exists. |
public Entry editEntry(User user,String id,String note,String quotation,boolean isPublic,Long modTime,boolean isAdmin,Errors errors){
if (modTime == null) {
Errors.add(errors,errorMessages.errorModTimeIsNull());
return null;
}
if (user == null) {
Errors.add(errors,errorMessages.errorUserIsNull());
... | API method. Change values for the entry entry. |
public boolean isEmpty(){
final boolean result=addedAnnotations.isEmpty() && removedAnnotations.isEmpty() && changedAnnotations.isEmpty();
Log.debug(getClass(),"result",result);
return result;
}
| Returns whether this annotation model event is empty or not. If this event represents a world change, this method returns <code>false</code> although the event does not carry any added, removed, or changed annotations. |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
private Set<ObjectName> queryObjectNames(String queryStr,Object... params) throws MalformedObjectNameException {
Set<ObjectName> queried=Collections.emptySet();
queryStr=MessageFormat.format(queryStr,params);
ObjectName queryExp=ObjectName.getInstance(queryStr);
queried=agent.getMBeanServer().queryNames(null,qu... | Queries the MBean server with the string formed using placing the params in the parameterized string passed as queryStr. |
public void calculateTextPosition(int canvasW,int canvasH,ShowcaseView showcaseView,boolean shouldCentreText){
Rect showcase=showcaseView.hasShowcaseView() ? calculator.getShowcaseRect() : new Rect();
int[] areas=new int[4];
areas[0]=showcase.left * canvasH;
areas[1]=showcase.top * canvasW;
areas[2]=(canvasW ... | Calculates the best place to position text |
private void processALoad(Instruction s){
Operand index=ALoad.getIndex(s);
if (index.isConstant()) {
findOrCreateVertex((ConstantOperand)index);
}
}
| Update the value graph to account for a given ALOAD instruction. <p><b>PRECONDITION:</b> <code> ALoad.conforms(s); </code> Make sure we have value graph nodes for a constant value |
@Deprecated public AsyncUserStoreClient createUserStoreClient() throws TTransportException {
if (EvernoteSession.getInstance() == null || EvernoteSession.getInstance().getAuthenticationResult() == null) {
throw new IllegalStateException();
}
return createUserStoreClient(EvernoteSession.getInstance().getAuthen... | Create a new UserStore client. Each call to this method will return a new UserStore.Client instance. The returned client can be used for any number of API calls, but is NOT thread safe. |
public boolean isDrawVerticals(){
return this.drawVerticals;
}
| Indicates whether shape vertical outlines are enabled. Not all shapes display vertical outlines. Those that do not ignore this property. When enabled, those that do display vertical lines extending from the shape's specified positions to the ground. |
public void populateDetails(Map<Installment,BigDecimal> breakup){
for ( Map.Entry<Installment,BigDecimal> pair : breakup.entrySet()) {
this.addReceiptDetail(new ReceiptDetail(pair.getKey(),pair.getValue(),REASON_CODE_NA));
}
}
| Takes a number of installment-amount pairs and adds a receiptDetail for each. NOTE: the "reasonCode" field is set to "N/A" - this method should be used when you're only interested in one amount per installment. If there are multiple reasons per installment, then the input breakup should contain cumulative amounts for ... |
public StringLiteral createStringLiteral(){
StringLiteralImpl stringLiteral=new StringLiteralImpl();
return stringLiteral;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void addPreferredLocale(Locale locale){
this.locales.add(0,locale);
}
| Add a new preferred locale, before any existing locales. |
public static String toString(ByteBuffer bb){
return bb == null ? null : toString(bb.array(),bb.arrayOffset() + bb.position(),bb.remaining());
}
| This method will convert utf8 encoded bytes into a string. If an UnsupportedEncodingException occurs, this method will eat it and return null instead. |
public QualityIndicator(Problem problem,NondominatedPopulation referenceSet){
this.problem=problem;
this.referenceSet=referenceSet;
normalizer=new Normalizer(problem,referenceSet);
normalizedReferenceSet=normalizer.normalize(referenceSet);
}
| Constructs a quality indicator evaluator for the specified problem and corresponding reference set. |
public RandomGroupsHDU(Header header,RandomGroupsData data){
super(header,data);
}
| Create an HDU from the given header and data . |
public SparseFloatVector(float[] values) throws IllegalArgumentException {
this.dimensionality=values.length;
int size=0;
{
for (int i=0; i < values.length; i++) {
if (values[i] != 0.0f) {
size++;
}
}
}
this.indexes=new int[size];
this.values=new float[size];
{
int pos=0;
f... | Create a SparseFloatVector consisting of double values according to the specified mapping of indices and values. |
public CSSConditionFactory(String cns,String cln,String idns,String idln){
classNamespaceURI=cns;
classLocalName=cln;
idNamespaceURI=idns;
idLocalName=idln;
}
| Creates a new condition factory. |
public QueryParserHelper(QueryConfigHandler queryConfigHandler,SyntaxParser syntaxParser,QueryNodeProcessor processor,QueryBuilder builder){
this.syntaxParser=syntaxParser;
this.config=queryConfigHandler;
this.processor=processor;
this.builder=builder;
if (processor != null) {
processor.setQueryConfigHand... | Creates a query parser helper object using the specified configuration, text parser, processor and builder. |
protected void select(T item){
if (TextUtils.isEmpty(item.toString()) || item.toString().equalsIgnoreCase("--")) {
showHint();
}
else {
setText(item.toString());
setTextColor(getResources().getColor(R.color.grey_text));
setContentDescription(getResources().getString(R.string.dropdown_list_prefix) +... | Call this function when a value is selected in the Dialog for custom select |
@SuppressWarnings("ConstantConditions") public static void testDoGenerateForClass(final RandomGenerator randomGenerator,final Class<?> type){
Affirm.affirmTrue(String.format("Failed to get the requested type=[%s] from [%s] received=[%s] instead",type,randomGenerator,randomGenerator.doGenerate(type)),type.isInstance(r... | Utility method to assist with testing all non-Primitive classes. |
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
log.config("");
doGet(request,response);
}
| Process the HTTP Post request - perform Get |
public BridgeException(BridgeContext ctx,Element e,String code,Object[] params){
this.e=e;
this.code=code;
this.params=params;
if (e != null && ctx != null) {
this.line=ctx.getDocumentLoader().getLineNumber(e);
}
}
| Constructs a new <tt>BridgeException</tt> with the specified parameters. |
@SuppressLint("InlinedApi") public static boolean isAndroidTv(Context context){
return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK);
}
| Returns whether the device is an AndroidTV. |
private void validateAttributes(Class type,Order order) throws Exception {
if (order != null) {
for ( String name : order.attributes()) {
if (!isAttribute(name)) {
throw new AttributeException("Ordered attribute '%s' missing in %s",name,type);
}
}
}
}
| This is used to validate the configuration of the scanned class. If an ordered attribute is specified but does not refer to an existing attribute then this will throw an exception. |
public boolean isDeviceRooted(){
if (checkRootBySuAccess()) {
return true;
}
if (checkRootBySuperUserApk()) {
return true;
}
if (checkRootByBuildTags()) {
return true;
}
return false;
}
| Returns true if the device is rooted (if any of the root methods returns true). |
public XmlFriendlyNameCoder(final String dollarReplacement,final String escapeCharReplacement,final String hexPrefix){
this.dollarReplacement=dollarReplacement;
this.escapeCharReplacement=escapeCharReplacement;
this.hexPrefix=hexPrefix;
readResolve();
}
| Construct a new XmlFriendlyNameCoder with custom replacement strings for dollar, the escape character and the prefix for hexadecimal encoding of invalid characters in XML names. |
public void writeStatus(final Status s) throws IOException {
FileOutputStream fileOutput=null;
ObjectOutputStream objectOutput=null;
try {
fileOutput=new FileOutputStream(new File(workingDir,statusName));
objectOutput=new ObjectOutputStream(fileOutput);
objectOutput.writeObject(s);
objectOutput.fl... | Sets the status of a cache server by serializing a <code>Status</code> instance to a file in the server's working directory. |
public String format(int number,int decimalPlaces){
StringBuilder sb=new StringBuilder();
int paddingRequired=decimalPlaces - (String.valueOf(number).length());
for (int x=0; x < paddingRequired; x++) {
sb.append("0");
}
sb.append(number);
return sb.toString();
}
| Pads an integer value with additional zeroes to make it decimalPlaces long |
public boolean cancelDiscovery(){
return mBluetoothAdapter.cancelDiscovery();
}
| Cancel the current device discovery process. |
public String toString(){
StringBuffer buffer=new StringBuffer(nbits);
String separator="";
buffer.append('{');
for (int i=0; i < nbits; i++) {
if (get(i)) {
buffer.append(separator);
separator=", ";
buffer.append(i);
}
}
buffer.append('}');
return buffer.toString();
}
| Returns a string representation of the receiver. For every index for which the receiver contains a bit in the "set" (<tt>true</tt>) state, the decimal representation of that index is included in the result. Such indeces are listed in order from lowest to highest, separated by ", " (a comma and a space) and sur... |
public void enterSlaveMode(){
CoreCmd ccmd=getQueue.peek();
while (ccmd != null) {
ccmd=getQueue.remove();
ccmd.update(Command.STATUS_SLAVE_MODE,cmember.leaderId);
ccmd=getQueue.peek();
}
}
| Throws an exception to any waiters for log entries. |
protected boolean beforeSave(boolean newRecord){
if (isSummary() && getAction() != null) setAction(null);
String action=getAction();
if (action == null) action="";
if (getAD_Window_ID() != 0 && !action.equals(ACTION_Window)) setAD_Window_ID(0);
if (getAD_Form_ID() != 0 && !action.equals(ACTION_Form)) ... | Before Save |
public boolean isCompressed(){
return compressed;
}
| Returns whether the current PDF document is compressed. |
protected boolean afterSave(boolean newRecord,boolean success){
if (isActive()) {
setDataToLevel();
listChildRecords();
}
return true;
}
| After Save |
public Result compile(String[] args,Context context,List<JavaFileObject> fileObjects,Iterable<? extends Processor> processors){
return compile(args,null,context,fileObjects,processors);
}
| Programmatic interface for main function. |
private ExpandCollapseClickListener(Context context,TextView header,View content){
this.context=context;
this.header=header;
this.content=content;
}
| Creates a new OnClickListener for expanding/collapsing a content section. |
public synchronized void engineSetKeyEntry(String alias,Key key,char[] password,Certificate[] chain) throws KeyStoreException {
token.ensureValid();
checkWrite();
if (!(key instanceof PrivateKey) && !(key instanceof SecretKey)) {
throw new KeyStoreException("key must be PrivateKey or SecretKey");
}
else ... | Assigns the given key to the given alias, protecting it with the given password. <p>If the given key is of type <code>java.security.PrivateKey</code>, it must be accompanied by a certificate chain certifying the corresponding public key. <p>If the given alias already exists, the keystore information associated with it ... |
void initialize(CharSequence title,Drawable icon){
setClickable(true);
setFocusable(true);
if (mTextAppearance != -1) {
setTextAppearance(mTextAppearanceContext,mTextAppearance);
}
setTitle(title);
setIcon(icon);
}
| Initializes with the provided title and icon |
public boolean isFlappingStarted(){
return flappingStarted;
}
| Checks if is flapping started. |
public GroundSlot(StendhalRPZone zone,Entity item){
this.zone=zone;
this.item=item;
this.x=item.getX();
this.y=item.getY();
}
| creates a new GroundSlot with an item. |
private void jumpToPrevTarget(){
Entity targ=getPrevTarget();
if (targ == null) {
return;
}
showTargetChoice=false;
clientgui.bv.centerOnHex(targ.getPosition());
clientgui.getBoardView().select(targ.getPosition());
showTargetChoice=true;
target(targ);
}
| Jump to our next target. If there isn't one, well, don't do anything. |
public SelectionInputDialog(Window owner,String key,Collection<T> selectionValues,T initialSelectionValue,Object... keyArguments){
this(owner,key,selectionValues,initialSelectionValue,null,keyArguments);
}
| Create a SelectionInputDialog. |
private JCustomerFinder(java.awt.Dialog parent,boolean modal){
super(parent,modal);
}
| Creates new form JCustomerFinder |
public FacesException(String message,Throwable cause){
super(message);
this.cause=cause;
}
| <p>Construct a new exception with the specified detail message and root cause.</p> |
public static Path fromString(String path){
return ROOT.newPath(path);
}
| Create new path. |
public String encode(){
String dayString;
if (day < 10) {
dayString="0" + day;
}
else dayString="" + day;
String hourString;
if (hour < 10) {
hourString="0" + hour;
}
else hourString="" + hour;
String minuteString;
if (minute < 10) {
minuteString="0" + minute;
}
else minuteString=... | Get canonical string representation. |
public static UpdateStatement orAbort(CharSequence table){
return produce(table,"ABORT");
}
| Producing an "UPDATE OR ABORT ..." statement. <p/> When an applicable constraint violation occurs, the ABORT resolution algorithm aborts the current SQL statement with an SQLITE_CONSTRAINT error and backs out any changes made by the current SQL statement, but changes caused by prior SQL statements within the same trans... |
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response){
processPostRequest(request,response);
}
| Handles the HTTP <code>POST</code> method. |
private void addToUses(SsaInsn insn){
RegisterSpecList rl=insn.getSources();
int sz=rl.size();
for (int i=0; i < sz; i++) {
useList[rl.get(i).getReg()].add(insn);
}
}
| Adds specified insn to the uses list for all of its sources. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.