code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
protected void clearOutEvents(){
}
| This method resets the outgoing events. |
public boolean isAlternative(){
return iAlternative;
}
| True, if the request is alternative (alternative request can be assigned instead of a non-alternative course requests, if it is left unassigned) |
public boolean needsOffset(){
if (isEnabled() && isDrawLabelsEnabled() && getLabelPosition() == YAxisLabelPosition.OUTSIDE_CHART) return true;
else return false;
}
| Returns true if this axis needs horizontal offset, false if no offset is needed. |
public boolean hasAttribute(String attName){
if (attName == null) return false;
for ( String key : attributes.keySet()) {
if (key.equalsIgnoreCase(attName)) return true;
}
return false;
}
| Checks existence of specified attribute. |
public String toString(){
return this.getClass().getName() + "(" + alpha+ ","+ lambda+ ")";
}
| Returns a String representation of the receiver. |
public void testOnServerHealthy_reloadsUsersIfNotAvailable(){
when(mTroubleshooter.isServerHealthy()).thenReturn(false);
mController.init();
when(mTroubleshooter.isServerHealthy()).thenReturn(true);
mFakeEventBus.post(new TroubleshootingActionsChangedEvent(ImmutableSet.of(TroubleshootingAction.CHECK_PACKAGE_SER... | Tests that users are reloaded if the server becomes healthy and users are unavailable. |
void visitSubroutine(final Label JSR,final long id,final int nbSubroutines){
Label stack=this;
while (stack != null) {
Label l=stack;
stack=l.next;
l.next=null;
if (JSR != null) {
if ((l.status & VISITED2) != 0) {
continue;
}
l.status|=VISITED2;
if ((l.status & RET) !... | Finds the basic blocks that belong to a given subroutine, and marks these blocks as belonging to this subroutine. This method follows the control flow graph to find all the blocks that are reachable from the current block WITHOUT following any JSR target. |
public void propertyChange(PropertyChangeEvent e){
if (e == null) return;
Object value=e.getNewValue();
if (value == null) return;
log.config(e.getPropertyName() + "=" + value+ " - "+ value.getClass().toString());
if (!(value instanceof MTreeNode)) return;
int nodeID=((MTreeNode)value).getNode_ID();
... | PropertyChange Listener - Tree Panel - node selection |
public int nextInt(){
return nextInt(n,p);
}
| Returns a random number from the distribution. |
public Customers(){
this("CUSTOMERS",null);
}
| Create a <code>PUBLIC.CUSTOMERS</code> table reference |
public final Object lookup(SymbolNode opNode,Context c,TLCState s,boolean cutoff){
boolean isVarDecl=(opNode.getKind() == VariableDeclKind);
Object result=c.lookup(opNode,cutoff && isVarDecl);
if (result != null) return result;
result=opNode.getToolObject(TLCGlobals.ToolId);
if (result != null) return res... | This method gets the value of a symbol from the enviroment. We look up in the context c, its tool object, and the state s. It and the lookup method that follows it were modified by LL on 10 April 2011 to fix the following bug. When a constant definition Foo == ... is overridden to substitute Bar for Foo, the TLC tool ... |
public void nextCharacter(EditorState editorState){
int currentOffset=editorState.getCurrentOffset();
MathSequence currentField=editorState.getCurrentField();
if (currentOffset < currentField.size() && currentField.getArgument(currentOffset) != null && currentField.getArgument(currentOffset) instanceof MathContai... | Next character -> key. |
protected void sequence_IntersectionTypeExpressionOLD_TypeRef(ISerializationContext context,IntersectionTypeExpression semanticObject){
genericSequencer.createSequence(context,semanticObject);
}
| Contexts: TypeRef returns IntersectionTypeExpression TypeArgument returns IntersectionTypeExpression Constraint: (typeRefs+=TypeRefWithoutModifiers typeRefs+=TypeRefWithoutModifiers* undefModifier=UndefModifierToken? nullModifier=NullModifierToken?) |
protected static DataCiteMetadata.Titles convertEmlTitles(Eml eml) throws InvalidMetadataException {
if (!Strings.isNullOrEmpty(eml.getTitle())) {
DataCiteMetadata.Titles titles=FACTORY.createDataCiteMetadataTitles();
DataCiteMetadata.Titles.Title primary=FACTORY.createDataCiteMetadataTitlesTitle();
prima... | Convert list of EML titles into DataCite titles. Only the title is mandatory, the type is optional. EML version 1.1 only contains a single title, with language derived from metadata language. DataCite metadata schema (v3) requires at least one title. |
public Collection<? extends Certificate> engineGenerateCertificates(InputStream inStream) throws CertificateException {
if (inStream == null) {
throw new CertificateException("inStream == null");
}
ArrayList<Certificate> result=new ArrayList<>();
try {
if (!inStream.markSupported()) {
inStream=new... | Generates the collection of the certificates on the base of provided via input stream encodings. |
public Parking(){
super();
}
| Needed by CGLib |
public void finishActivity(){
Activity activity=activityStack.lastElement();
finishActivity(activity);
}
| finish current activity from Stack |
private void drawComposite(){
final Rectangle rect=this.getClientArea();
final Image newImage=new Image(getDisplay(),Math.max(1,rect.width),Math.max(1,rect.height));
final GC gc=new GC(newImage);
final boolean inside=this.insideComposite || this.insideImage || this.insideInstruction|| this.insideText;
if (!in... | Draw the composite |
public void remove(){
try {
removeThrow();
}
catch ( SQLException e) {
closeQuietly();
throw new IllegalStateException("Could not delete " + dataClass + " object "+ last,e);
}
}
| Removes the last object returned by next() by calling delete on the dao associated with the object. |
public boolean isAsciiSuperset(){
return asciiSuperset;
}
| Returns the asciiSuperset. |
public static List<String> stringIds(Collection<? extends DataObjectRestRep> values){
List<String> ids=new ArrayList<String>();
if (values != null) {
for ( DataObjectRestRep value : values) {
ids.add(stringId(value));
}
}
return ids;
}
| Gets the IDs of the resources, as a list of strings. |
public long toNanoseconds(){
return TimeUnit.NANOSECONDS.convert(length,timeUnit);
}
| Returns the Duration converted to nanoseconds. |
public void testCase1(){
byte aBytes[]={1,2,3,4,5,6,7,1,2,3};
byte bBytes[]={10,20,30,40,50,60,70,10,20,30};
int aSign=1;
int bSign=1;
byte rBytes[]={11,22,33,44,55,66,77,11,22,33};
BigInteger aNumber=new BigInteger(aSign,aBytes);
BigInteger bNumber=new BigInteger(bSign,bBytes);
BigInteger result=aNumbe... | Add two positive numbers of the same length |
public final double sampleMax(){
return _activeCountMax.getAndSet(_activeCount.get());
}
| Sample the active count |
private void finishItemListItem(StringBuilder result){
result.append("</div><div class=\"justchildren\"></div></div>");
}
| Called to finish adding an item to an item list. |
public static void addCompleteToIncludePathFromDoc(final FileObject doc){
FileObject ciRoot=getCiRoot(doc);
if (ciRoot == null) {
return;
}
Project project=FileOwnerQuery.getOwner(ciRoot);
if (project == null) {
return;
}
addCompleteToIncludePath(ciRoot,project);
}
| Use the current PHp document as a pointer to add auto completion file into the project path |
private void readSample(ParsableByteArray data){
int bytesToRead=Math.min(data.bytesLeft(),sampleSize - bytesRead);
currentOutput.sampleData(data,bytesToRead);
bytesRead+=bytesToRead;
if (bytesRead == sampleSize) {
currentOutput.sampleMetadata(timeUs,C.SAMPLE_FLAG_SYNC,sampleSize,0,null);
timeUs+=curren... | Reads the rest of the sample |
protected void onClusterRendered(Cluster<T> cluster,Marker marker){
}
| Called after the marker for a Cluster has been added to the map. |
protected void initDispatchServlet(ServletContext servletContext){
AnnotationConfigWebApplicationContext dispatchServletContext=new AnnotationConfigWebApplicationContext();
ServletRegistration.Dynamic servlet=servletContext.addServlet("springMvcServlet",new DispatcherServlet(dispatchServletContext));
servlet.addM... | Initializes the dispatch servlet which is used for Spring MVC REST and UI controllers. |
@NoInline static DynamicLink resolveDynamicInvocation(){
VM.disableGC();
Address callingFrame=Magic.getCallerFramePointer(Magic.getFramePointer());
Address returnAddress=Magic.getReturnAddressUnchecked(callingFrame);
callingFrame=Magic.getCallerFramePointer(callingFrame);
int callingCompiledMethodId=Magic.get... | Discovers a method reference to be invoked via dynamic bridge. The call stack is examined to find the invocation site. |
public static void splitRgb(int rgb,int[] result){
result[ALPHA]=(rgb >> SHIFT_ALPHA) & 0xff;
result[RED]=(rgb >> SHIFT_RED) & 0xff;
result[GREEN]=(rgb >> SHIFT_GREEN) & 0xff;
result[BLUE]=(rgb >> SHIFT_BLUE) & 0xff;
}
| Split ARGB color to its 8 bit color components. |
@Override public void start(Map<String,String> props){
log.info("Start a MqttSourceTask");
mConfig=new MqttSourceConnectorConfig(props);
mMqttClientId=mConfig.getString(MqttSourceConstant.MQTT_CLIENT_ID) != null ? mConfig.getString(MqttSourceConstant.MQTT_CLIENT_ID) : MqttClient.generateClientId();
mKafkaTopic=... | Start the task. |
public static void updateFloat(VisualItem item,String field,float val){
item.setFloat(getStartField(field),item.getFloat(field));
item.setFloat(field,val);
item.setFloat(getEndField(field),val);
}
| Update the values in an interpolated column (a set of three columns representing a current value along with starting and ending values). The current value will become the new starting value, while the given value will become the new current and ending values. |
public boolean isNotIn(){
return notIn;
}
| Returns true for not-in, or false for in-lookup. |
private boolean typesMatch(Class<V> valueType,Class getterType){
if (getterType != valueType) {
if (getterType.isPrimitive()) {
return (getterType == float.class && valueType == Float.class) || (getterType == int.class && valueType == Integer.class) || (getterType == boolean.class && valueType == Boolean.cl... | Utility method to check whether the type of the underlying field/method on the target object matches the type of the Property. The extra checks for primitive types are because generics will force the Property type to be a class, whereas the type of the underlying method/field will probably be a primitive type instead. ... |
public NondominatedPopulation(DominanceComparator comparator){
this(comparator,Settings.getDuplicateMode());
}
| Constructs an empty non-dominated population using the specified dominance relation. |
public T caseEntityPropertySource(EntityPropertySource object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Entity Property Source</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public static <T>JAXBCoder<T> of(Class<T> jaxbClass){
return new JAXBCoder<>(jaxbClass);
}
| Create a coder for a given type of JAXB annotated objects. |
@SuppressWarnings("unused") public boolean isFrozen(){
return (player != null && player.isFrozen());
}
| Returns true if video player is in frozen state |
private static Text newPrimitive(int length){
Text text=new Text(true);
text._count=length;
return text;
}
| Returns a new primitive text instance. |
public IndexSearcher createSearcher(){
MemoryIndexReader reader=new MemoryIndexReader();
IndexSearcher searcher=new IndexSearcher(reader);
searcher.setSimilarity(normSimilarity);
searcher.setQueryCache(null);
return searcher;
}
| Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits. |
@Override public void write(String str) throws IOException {
out.write(str);
}
| Writes directly to the current <code>out</code>. |
public boolean isUseAttr(){
return isUseSearch() && isUseAttrName();
}
| Checks if is use attr. |
private int colToLoc(int col,Vector<MappingPair> vec){
int loc=col;
for (int i=0; (i < vec.size()) && (vec.elementAt(i).col <= col); i++) {
loc=loc + vec.elementAt(i).inc;
}
return loc;
}
| Returns the string position to which the line-mapping defined by MappingPair vec maps the column col. |
public void init(Environment env){
m_nameS=m_name;
m_typeS=m_type;
m_valueS=m_value;
try {
m_nameS=env.substitute(m_nameS);
m_typeS=env.substitute(m_typeS);
m_valueS=env.substitute(m_valueS);
}
catch ( Exception ex) {
}
if (m_typeS.toLowerCase().startsWith("date") && m_typeS.indexOf(":") > 0... | Initialize this attribute spec by resolving any environment variables and setting up the date format (if necessary) |
public static ViewAction swipeRightSlow(){
return actionWithAssertions(new GeneralSwipeAction(Swipe.SLOW,translate(GeneralLocation.CENTER_LEFT,EDGE_FUZZ_FACTOR,0),GeneralLocation.CENTER_RIGHT,Press.FINGER));
}
| Returns an action that performs a swipe left-to-right across the vertical center of the view. The swipe doesn't start at the very edge of the view, but is a bit offset.<br> <br> View constraints: <ul> <li>must be displayed on screen <ul> |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
previousProgress=progress;
previousProgressLabel=progressLabel;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public boolean approveIt(){
log.info("approveIt - " + toString());
setIsApproved(true);
return true;
}
| Approve Document |
public StreamCorruptedException(){
super();
}
| Create a StreamCorruptedException and list no reason why thrown. |
public static byte toByteValue(char c){
return (byte)c;
}
| cast a char value to a byte value (do nothing) |
public int toggle(){
return toggle(ANIMATION_DURATION_MS);
}
| Tell this view to switch states from cross to plus, or back, using the default animation duration. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:20.289 -0500",hash_original_method="EB6FF8B38000E2AA8E5468782EF53260",hash_generated_method="E0067301BC4D95F1F82B6EFF8CAC0C89") public void drawBitmap(Bitmap bitmap,Matrix ... | Draw the bitmap using the specified matrix. |
public void removeConflictModifiedListener(final ConflictCacheListener listener){
Check.notNull(listener,"listener");
synchronized (listenerLock) {
conflictListeners.removeListener(listener,MODIFIED);
}
}
| Remove an existing listener for conflict modified events |
public synchronized void addWatch(String filePath,Function<byte[],Void> onUpdate) throws IOException {
MorePreconditions.checkNotBlank(filePath);
Preconditions.checkNotNull(onUpdate);
File file=new File(filePath);
ByteSource byteSource=Files.asByteSource(file);
onUpdate.apply(byteSource.read());
ConfigFileI... | Adds a watch on the specified file. The file must exist, otherwise a FileNotFoundException is returned. If the file is deleted after a watch is established, the watcher will log errors but continue to monitor it, and resume watching if it is recreated. |
public void resetPolicy(){
mPreferences.putString(PREF_LAST_RESPONSE,Integer.toString(Policy.RETRY));
setRetryUntil(DEFAULT_RETRY_UNTIL);
setMaxRetries(DEFAULT_MAX_RETRIES);
setRetryCount(Long.parseLong(DEFAULT_RETRY_COUNT));
setValidityTimestamp(DEFAULT_VALIDITY_TIMESTAMP);
mPreferences.commit();
}
| We call this to guarantee that we fetch a fresh policy from the server. This is to be used if the URL is invalid. |
public Alert updateAlert(BigInteger alertId,Alert alert) throws IOException {
String requestUrl=RESOURCE + "/" + alertId.toString();
ArgusResponse response=getClient().executeHttpRequest(ArgusHttpClient.RequestType.PUT,requestUrl,alert);
assertValidResponse(response,requestUrl);
return fromJson(response.getResu... | Updates an existing alert. |
Sample acquire(){
Sample acquired=head;
if (acquired == null) {
acquired=new Sample();
}
else {
head=acquired.next;
}
return acquired;
}
| Acquires a sample from the pool. |
public void emit4(int od){
if (!alive) return;
if (cp + 4 > code.length) {
emit1(od >> 24);
emit1(od >> 16);
emit1(od >> 8);
emit1(od);
}
else {
code[cp++]=(byte)(od >> 24);
code[cp++]=(byte)(od >> 16);
code[cp++]=(byte)(od >> 8);
code[cp++]=(byte)od;
}
}
| Emit four bytes of code. |
public boolean isDrawLabels(String graticuleType){
if (graticuleType == null) {
String message=Logging.getMessage("nullValue.StringIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
return getRenderingParams(graticuleType).isDrawLabels();
}
| Returns whether specified graticule labels will be rendered. |
public static String formatPeriodISO(final long startMillis,final long endMillis){
return formatPeriod(startMillis,endMillis,ISO_EXTENDED_FORMAT_PATTERN,false,TimeZone.getDefault());
}
| <p>Formats the time gap as a string.</p> <p>The format used is the ISO 8601 period format.</p> |
public static boolean deleteDir(final File self){
if (!self.exists()) return true;
if (!self.isDirectory()) return false;
File[] files=self.listFiles();
if (files == null) return false;
boolean result=true;
for ( File file : files) {
if (file.isDirectory()) {
if (!deleteDir(file)) res... | Deletes a directory with all contained files and subdirectories. <p>The method returns <ul> <li>true, when deletion was successful</li> <li>true, when it is called for a non existing directory</li> <li>false, when it is called for a file which isn't a directory</li> <li>false, when directory couldn't be deleted</li> </... |
private double[] determineMinMaxDistance(Relation<ParameterizationFunction> relation,int dimensionality){
double[] min=new double[dimensionality - 1];
double[] max=new double[dimensionality - 1];
Arrays.fill(max,Math.PI);
HyperBoundingBox box=new HyperBoundingBox(min,max);
double d_min=Double.POSITIVE_INFINIT... | Determines the minimum and maximum function value of all parameterization functions stored in the specified database. |
public ModbusException(){
super();
}
| Constructs a new <tt>ModbusException</tt> instance. |
public static NbtOutputStream writeDeflated(NbtTag tag,File file,boolean append) throws IOException {
createFile(file);
NbtOutputStream out=new NbtOutputStream(new DeflaterOutputStream(new FileOutputStream(file,append)));
out.write(tag);
return out;
}
| Create new deflated nbt output stream for given file, and write nbt tag to it. |
public void testSpecDoc() throws Exception {
ObjectMapper m=new ObjectMapper();
JsonNode tree=m.readTree(SAMPLE_DOC_JSON_SPEC);
JsonParser jp=tree.traverse();
verifyJsonSpecSampleDoc(jp,true);
}
| Unit test that verifies that we can (re)parse sample document from JSON specification. |
public TreeNode(String name,TreeNode parent){
super();
this.name=name;
this.parent=parent;
if (this.parent != null) this.parent.addChild(this);
}
| Construct a new node with the specified parent. |
protected void handleSpillSlot(Interval interval){
assert interval.location() != null && (interval.canMaterialize() || isStackSlotValue(interval.location())) : "interval not assigned to a stack slot " + interval;
}
| This is called for every interval that is assigned to a stack slot. |
private static boolean parse(XMLTokener x,JSONObject context,String name) throws JSONException {
char c;
int i;
JSONObject jsonobject=null;
String string;
String tagName;
Object token;
token=x.nextToken();
if (token == BANG) {
c=x.next();
if (c == '-') {
if (x.next() == '-') {
x.sk... | Scan the content following the named tag, attaching it to the context. |
public FloatMemberValue(float f,ConstPool cp){
super('F',cp);
setValue(f);
}
| Constructs a float constant value. |
public LabelNode gotoLabel(final LabelNode l){
Instantiation owner=findOwner(instructions.indexOf(l));
return owner.rangeTable.get(l);
}
| Looks up the label <code>l</code> in the <code>gotoTable</code>, thus translating it from a Label in the original code, to a Label in the inlined code that is appropriate for use by an instruction that branched to the original label. |
void start(){
startTime=System.nanoTime();
}
| Start recording time. |
public Executor distributeOnAllCores(){
return distributeOn(Runtime.getRuntime().availableProcessors());
}
| Enables this executor to distribute solution evaluations across all processors on the local host. |
public static String left(String s,int width,char fillChar){
if (s.length() >= width) {
return s;
}
StringBuffer sb=new StringBuffer(width);
sb.append(s);
for (int i=width - s.length(); --i >= 0; ) {
sb.append(fillChar);
}
return sb.toString();
}
| Left justify a string. |
public void addChartSettingsListener(ChartSettingsListener listener){
if (settingsListenerList == null) {
settingsListenerList=new ArrayList<ChartSettingsListener>();
}
settingsListenerList.add(listener);
}
| Add a ChartSettings listener. |
private void visitIndirectInvocation(Tree.InvocationExpression that){
Tree.Term primary=unwrapExpressionUntilTerm(that.getPrimary());
if (primary == null) {
return;
}
Type pt=primary.getTypeModel();
if (!isTypeUnknown(pt)) {
if (that.getNamedArgumentList() != null) {
that.addError("named argumen... | Typecheck an indirect invocation. |
public void append(ExtendedPathIterator epi,boolean connect){
float[] vals=new float[7];
while (!epi.isDone()) {
Arrays.fill(vals,0);
int type=epi.currentSegment(vals);
epi.next();
if (connect && (numVals != 0)) {
if (type == PathIterator.SEG_MOVETO) {
float x=vals[0];
float y=... | Delegates to the enclosed <code>GeneralPath</code>. |
public static long[] parseDateTime(long val){
if ((val != 0) && (val <= 100)) {
throw new InvalidDateFormatException("date",Long.toString(val));
}
if (val < DATETIME_MONTH_SCALE) {
val*=DATETIME_DATE_SCALE;
}
long[] dt=decodeDateTime(val);
if (val != 0) {
dt[YEAR_INDEX]=adjustTwoDigitYear(dt[YEA... | Parse an *external* datetime long (e.g. YYYYMMDDHHMMSS => 20130130) into a array. |
public void buildPanel(){
GridBagLayout gridBagLayout=new GridBagLayout();
gridBagLayout.columnWidths=new int[]{10,89,60,10};
gridBagLayout.rowHeights=new int[]{20,0,15,20,0,0,15,0,0,0};
gridBagLayout.columnWeights=new double[]{0.0,1.0,0.0,0.0};
gridBagLayout.rowWeights=new double[]{0.0,0.0,0.0,0.0,0.0,0.0,0.... | Create the panel. |
String buildUnionSubQuery(String typeDiscriminatorColumn,String[] unionColumns,Set<String> columnsPresentInTable,int computedColumnsOffset,String typeDiscriminatorValue,String selection,String[] selectionArgs,String groupBy,String having){
return null;
}
| Return the SELECT UNION statement for the given parameters. |
public AuthorityKeyIdentifier(byte[] keyIdentifier){
this(keyIdentifier,null,null);
}
| create an AuthorityKeyIdentifier with a precomputed key identifier |
private boolean checkConditions(final List<AcceptabilityCondition> conditions){
for ( AcceptabilityCondition condition : conditions) {
AcceptabilityCondition.Fullfillment fullfillment=condition.getFullfillment(passages);
if (fullfillment.isFullfilled()) {
fullfilledConditions.put(condition,new TripInfo... | Checks conditions, stores results and clean the list of passages. |
protected String url(int zoomLevel,int xTile,int yTile){
StringBuilder sb=new StringBuilder(_url);
sb.append("/");
sb.append(zoomLevel);
sb.append("/");
sb.append(xTile);
sb.append("/");
sb.append(yTile);
sb.append(".png");
return sb.toString();
}
| build a url request for a tile |
public MatrixDrawable(Drawable drawable,Matrix matrix){
super(Preconditions.checkNotNull(drawable));
mMatrix=matrix;
}
| Creates a new MatrixDrawable with given underlying drawable and matrix. |
@OnMessage public void echoPongMessage(PongMessage pm){
}
| Process a received pong. This is a NO-OP. |
public double localScore(int i,int... parents){
for ( int p : parents) if (forbidden.contains(p)) return Double.NaN;
double residualVariance=covariances.get(i,i);
int n=getSampleSize();
int p=parents.length;
Matrix covxx=getSelection1(covariances,parents);
try {
Matrix covxxInv=covxx.inverse();
... | Calculates the sample likelihood and BIC score for i given its parents in a simple SEM model |
public boolean isValidName(){
String _name=this.getName();
boolean _equals=Objects.equal("prototype",_name);
if (_equals) {
return false;
}
return true;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public TextNode textNode(String text){
return TextNode.valueOf(text);
}
| Factory method for constructing a node that represents JSON String value |
void log(Resources resources,int... rules){
final ArrayDeque<Node> roots=findRoots(rules);
for ( Node node : roots) {
printNode(resources,node);
}
}
| Prints the dependency graph for the specified rules. |
public CCAccelDeccelAmplitude(CCIntervalAction action,float d){
super(d);
rate=1.0f;
other=action;
}
| initializes the action with an inner action that has the amplitude property, and a duration time |
public BoolQueryBuilder disableCoord(boolean disableCoord){
this.disableCoord=disableCoord;
return this;
}
| Disables <tt>Similarity#coord(int,int)</tt> in scoring. Defaults to <tt>false</tt>. |
public static boolean isValidIfd(int ifdId){
return ifdId == IfdId.TYPE_IFD_0 || ifdId == IfdId.TYPE_IFD_1 || ifdId == IfdId.TYPE_IFD_EXIF || ifdId == IfdId.TYPE_IFD_INTEROPERABILITY || ifdId == IfdId.TYPE_IFD_GPS;
}
| Returns true if the given IFD is a valid IFD. |
private SignatureLibraryRelease loadTMHMMRelease(){
SignatureLibraryRelease release=null;
final Query releaseQuery=entityManager.createQuery("select r from SignatureLibraryRelease r where r.version = :version and r.library = :signatureLibrary");
releaseQuery.setParameter("version",signatureLibraryRelease.getVersi... | This private method is responsible for retrieving OR persisting (as appropriate) a SignatureLibraryRelease method for the version of TMHMM being handled by this DAO. |
private void addHyperlinkToken(int start,int end,int tokenType){
int so=start + offsetShift;
addToken(zzBuffer,start,end,tokenType,so,true);
}
| Adds the token specified to the current linked list of tokens. |
public static void main(final String[] args){
DOMTestCase.doMain(hasAttributes01.class,args);
}
| Runs this test from the command line. |
public static void enableLodControl(Camera camera,Node rootNode){
Terrain terrain=(Terrain)findTerrain(rootNode);
if (terrain == null) return;
TerrainLodControl control=((Spatial)terrain).getControl(TerrainLodControl.class);
if (control != null) {
control.setCamera(camera);
}
}
| Re-attach the camera to the LOD control. Called when the scene is opened and will only update the control if there is already a terrain present in the scene. |
public EditableOMLine(GraphicAttributes ga){
createGraphic(ga);
}
| Create an EditableOMLine with the lineType and renderType parameters in the GraphicAttributes object. |
private String eFormatString(final double x,final char eChar){
final char[] ca4;
final char[] ca5;
if (Double.isInfinite(x)) {
if (x == Double.POSITIVE_INFINITY) {
if (leadingSign) {
ca4="+Inf".toCharArray();
}
else if (leadingSpace) {
ca4=" Inf".toCharArray();
}
else... | An intermediate routine on the way to creating an e format String. The method decides whether the input double value is an infinity, not-a-number, or a finite double and formats each type of input appropriately. |
private double clipCurrentIndex(double currentIndex){
if (moveRate > 0) {
return Math.min(currentIndex,endIndex);
}
else {
return Math.max(currentIndex,startIndex);
}
}
| Ensure the current position in clipped to the line |
private void updateStateView(CSP csp,Assignment assignment){
Platform.runLater(null);
simPaneCtrl.waitAfterStep();
}
| Caution: While the background thread should be slowed down, updates of the GUI have to be done in the GUI thread! |
public static void updateNextRun(int etlJobId,String cronExprStr,Date startTime) throws Exception {
Time.CronExpression cronExpression=new Time.CronExpression(cronExprStr);
Date nextTime=cronExpression.getNextValidTimeAfter(startTime);
updateNextRun(etlJobId,nextTime);
}
| Update the next run time for the etl job using Quartz cron expression |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.