code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public Boolean isStorageVMotionSupported(){
return storageVMotionSupported;
}
| Gets the value of the storageVMotionSupported property. |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case ExpressionsPackage.FLOAT_LITERAL__VALUE:
return value != VALUE_EDEFAULT;
}
return super.eIsSet(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public ToStringBuilder appendSuper(String superToString){
if (superToString != null) {
style.appendSuper(buffer,superToString);
}
return this;
}
| <p>Append the <code>toString</code> from the superclass.</p> <p>This method assumes that the superclass uses the same <code>ToStringStyle</code> as this one.</p> <p>If <code>superToString</code> is <code>null</code>, no change is made.</p> |
public double doOperation() throws OperatorFailedException {
CoalescentSimulator simulator=new CoalescentSimulator();
List<TaxonList> taxonLists=new ArrayList<TaxonList>();
double rootHeight=-1.0;
double oldLikelihood=0.0;
double newLikelihood=0.0;
for (int i=0; i < xo.getChildCount(); i++) {
final Obje... | change the parameter and return the hastings ratio. |
public void hspan(double start,double end,Paint color,String legend){
LegendText legendText=new LegendText(color,legend);
comments.add(legendText);
plotElements.add(new HSpan(start,end,color,legendText));
}
| Draws a horizontal span into the graph and optionally adds a legend. |
public static String extractUsername(SOAPMessageContext smsg){
try {
SOAPHeader header=smsg.getMessage().getSOAPHeader();
if (header != null) {
@SuppressWarnings("unchecked") Iterator<SOAPHeaderElement> headers=header.examineAllHeaderElements();
while (headers.hasNext()) {
SOAPHeaderElemen... | Extracts the username out of the header of a SOAP message |
public FacebookAuthorizationException(String message,Throwable throwable){
super(message,throwable);
}
| Constructs a FacebookAuthorizationException with a message and inner error. |
@Override public boolean matches(O object,QueryOptions queryOptions){
for ( Query<O> query : super.getSimpleQueries()) {
if (query.matches(object,queryOptions)) {
return true;
}
}
for ( Query<O> query : super.getLogicalQueries()) {
if (query.matches(object,queryOptions)) {
return true;
... | Returns true if at least one child query matches the given object, returns false if none match. |
public static HBaseId HBaseIdFromRowKey(byte[] rowkey){
return HBaseId.of(new UUID(Bytes.toLong(rowkey,0),Bytes.toLong(rowkey,8)));
}
| Returns a UUID from the a byte array. |
public static ScheduledExecutorService newSingleThreadScheduledExecutor(ThreadFactory threadFactory){
return wrap(Executors.newSingleThreadScheduledExecutor(threadFactory));
}
| Creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically. (Note however that if this single thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks.) Tasks are guaranteed to e... |
public DelphiClassProperty(){
}
| Default ctor |
public static byte[] decodeChecked(String input) throws ParseException {
byte[] decoded=decode(input);
if (decoded.length < 4) {
throw new ParseException("Input too short",0);
}
byte[] data=Arrays.copyOfRange(decoded,0,decoded.length - 4);
byte[] checksum=Arrays.copyOfRange(decoded,decoded.length - 4,deco... | Decodes the given base58 string into the original data bytes, using the checksum in the last 4 bytes of the decoded data to verify that the rest are correct. The checksum is removed from the returned data. |
@Override public boolean supports(final CloudTrailEvent event){
final CloudTrailEventData eventData=event.getEventData();
final String eventSource=eventData.getEventSource();
final String eventName=eventData.getEventName();
return eventSource.equals(EC2_EVENTS) && eventName.startsWith(DELETE);
}
| We use this as a filter for events. |
public static <E>String serialize(Map<String,E> map,Class<E> jsonObjectClass) throws IOException {
return mapperFor(jsonObjectClass).serialize(map);
}
| Serialize a map of objects to a JSON String. |
public static List<NameValuePair> parseQueryOrdered(String query) throws URISyntaxException {
List<NameValuePair> parameters=new ArrayList<NameValuePair>();
if (query == null) {
return parameters;
}
URIQueryTokenizer uqt=new URIQueryTokenizer(query);
while (uqt.hasMoreTokens()) {
String token=uqt.next... | Parse a URI query string, returning a list of Name/Value pairs in the order they occur in the query and keeping duplicates. |
@Override public String next(){
String result;
result=m_CurrentLeaf.getString();
result=result.substring(0,result.length() - 1);
if (m_CurrentLeaf != m_LastLeaf) {
m_CurrentLeaf=(TrieNode)m_CurrentLeaf.getNextLeaf();
}
else {
m_CurrentLeaf=null;
}
return result;
}
| Returns the next element in the iteration. |
public void removeNode(final NodeType node){
Preconditions.checkArgument(m_nodes.remove(node),String.format("Error: Node '%s' was not part of the graph",node));
m_edges.removeAll(m_nodeToEdges.get(node));
m_nodeToEdges.remove(node);
}
| Removes a node from the graph. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:46.269 -0500",hash_original_method="C2B5C7987B903EB42CE1EDEA1961E0EA",hash_generated_method="DD5283A55E6B6F1BAA391AA5DEE87C6C") private Nickname(){
}
| This utility class cannot be instantiated |
@Override public void characters(char[] ch,int start,int length) throws SAXException {
for (int i=start + length - 1; i >= start; --i) {
if (!Character.isWhitespace(ch[i])) {
this.uh.characters(ch,start,length);
return;
}
}
Arrays.fill(ch,start,start + length,'\u000B');
this.uh.characters(ch... | Replace all-whitespace character blocks with the character '\u000B', which satisfies the following properties: <ol> <li>"\u000B".matches( "\\s" ) == true</li> <li>when parsing XmlMixed content, JAXB does not suppress the whitespace</li> </ol> |
public void addFailedKey(KeyCacheObject key,Throwable e){
if (failedKeys == null) failedKeys=new ArrayList<>();
failedKeys.add(key);
if (err == null) err=new IgniteCheckedException("Failed to update keys on primary node.");
err.addSuppressed(e);
}
| Adds key to collection of failed keys. |
public AttachmentEntry updateAttachment(AttachmentEntry entry,File newFile) throws IOException, ServiceException {
return updateAttachment(entry,newFile,null,null);
}
| Updates an existing attachment with new content. |
public SCXMLGraph(){
setAlternateEdgeStyle("edgeStyle=mxEdgeStyle.ElbowConnector;elbow=vertical");
setAutoSizeCells(true);
setAllowLoops(true);
}
| Custom graph that defines the alternate edge style to be used when the middle control point of edges is double clicked (flipped). |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.177 -0400",hash_original_method="D7947FA233878C6544C57437912F92F2",hash_generated_method="59FC53656E2191F8D96CD6A9F55E8846") public XmlStreamReader(InputStream is,boolean lenient) throws IOException {
this(is,lenient,null);
}
| Creates a Reader for a raw InputStream. <p> It follows the same logic used for files. <p> If lenient detection is indicated and the detection above fails as per specifications it then attempts the following: <p> If the content type was 'text/html' it replaces it with 'text/xml' and tries the detection again. <p> Else i... |
private static int base64toInt(char c,byte[] alphaToInt){
int result=alphaToInt[c];
if (result < 0) throw new IllegalArgumentException("Illegal character " + c);
return result;
}
| Translates the specified character, which is assumed to be in the "Base 64 Alphabet" into its equivalent 6-bit positive integer. |
public final double pctUnclassified(){
return 100 * m_Unclassified / m_WithClass;
}
| Gets the percentage of instances not classified (that is, for which no prediction was made by the classifier). |
private static int findSeparator(String s){
int result=s.indexOf('-');
if (result == -1) {
result=s.indexOf(',');
}
if (result == -1) {
result=s.indexOf(' ');
}
if (result == -1) {
result=s.indexOf('.');
}
return result;
}
| Finds the first occurrence of ' ', '-', ',' or '.' |
@Override public String toString(){
return new String(toByteArray());
}
| Gets the curent contents of this byte stream as a string. |
private void lockUdocsCodeLogic(String[] udocsToLock,ActionMapping mappings,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws ActionNotAllowedException {
if (ArrayUtils.isNotEmpty(udocsToLock)) {
ServiceRepository services=ServiceRepository.getInstance(ServiceClient.create(getAppUser... | Logica ejecutada cuan el action es invocado con parametro method con valor 'lockUdocs'. Se encarga de bloquear las unidades documentales seleccionadas |
protected boolean visitNode(ASTNode node){
return true;
}
| Visits the given type-specific AST node. |
public static String join(String charSeparator,String... strings){
String result=strings[0];
for (int i=1; i < strings.length; i++) result+=charSeparator + strings[i];
return result;
}
| Returns a concatenation of strings separated by charSeparator. |
public boolean rpExportOrchestrationSteps(String stepId){
WorkflowStepCompleter.stepSucceded(stepId);
_log.info("Completed rpExportOrchestrationSteps");
return true;
}
| RP export group orchestration steps. Currently this is a dummy no-op method and all the RP export group assembly are done in the actual export orchestration method. The main reason to have this method is to make sure the roll back of RP export groups happen after the actual export rollbacks. |
public void fireModelUnclear(SessionNode node){
SessionEvent event=new SessionEvent(this.source,node,SessionEvent.MODEL_UNCLEAR);
fireSessionEvent(event);
}
| Fires an event indicating that the model for the given session node in the session has been destroyed. |
public XPathProcessorException(String message,Exception e){
super(message,e);
}
| Create an XPathProcessorException object that holds an error message, and another exception that caused this exception. |
public static void updateForFile(File file){
if (file != null) {
File directory=file.getParentFile();
update(directory);
}
}
| Update CurrentDirectory based on the supplied file. If the file exists then its parent is used. |
@Override public synchronized void destroy(){
LOGGER.info("Destroying server");
executor.shutdown();
try {
if (!executor.awaitTermination(1,TimeUnit.SECONDS)) {
List<Runnable> runningTasks=executor.shutdownNow();
if (runningTasks.size() > 0) {
LOGGER.log(Level.FINE,"Ignoring remaining {0} ... | Destroys the server, i.e., unbinds from all ports and frees all system resources. |
private StackInterval activateNext(){
if (unhandled.isEmpty()) {
return null;
}
StackInterval next=unhandled.poll();
for (int id=next.from(); activePeekId() < id; ) {
finished(active.poll());
}
Debug.log("active %s",next);
active.add(next);
return next;
}
| Gets the next unhandled interval and finishes handled intervals. |
public boolean isAbsolute(){
return scheme != null;
}
| Tells whether or not this URI is absolute. <p> A URI is absolute if, and only if, it has a scheme component. </p> |
@Deprecated public synchronized void clear(){
mPlugins.clear();
}
| Clears the plugin list. |
public static void checkArgument(boolean expression){
if (!expression) {
throw new IllegalArgumentException();
}
}
| Ensures the truth of an expression involving one or more parameters to the calling method. |
@Override protected void start(){
if (Cfg.DEBUG) {
Check.log(TAG + " (actualStart)");
}
try {
myPhoneNumber=readMyPhoneNumber();
if (DEFAULT_LOCAL_NUMBER.equals(myPhoneNumber)) {
enabled=false;
return;
}
ModuleAddressBook.createEvidenceLocal(ModuleAddressBook.WHATSAPP,myPhoneNumber... | Estrae dal file RegisterPhone.xml il numero di telefono |
public boolean isDominator(BlockNode block){
return doms.get(block.getId());
}
| Check if 'block' dominated on this node |
public button addElement(String hashcode,Element element){
addElementToRegistry(hashcode,element);
return (this);
}
| Adds an Element to the element. |
public boolean isZoomable(){
return zoomable;
}
| Returns whether the plot area in the panel can be zoomed. |
@Override public boolean isSubtype(AnnotationMirror rhs,AnnotationMirror lhs){
checkAnnoInGraph(rhs);
checkAnnoInGraph(lhs);
if (AnnotationUtils.areSameIgnoringValues(rhs,lhs)) {
return AnnotationUtils.areSame(rhs,lhs);
}
Set<AnnotationMirror> supermap1=this.supertypesMap.get(rhs);
return AnnotationUtil... | Most qualifiers have no value fields. However, two annotations with values are subtype of each other only if they have the same values. i.e. I(m) is a subtype of I(n) iff m = n When client specifies an annotation, a1, to be a subtype of annotation with values, a2, then a1 is a subtype of all instances of a2 regardless... |
public void renumberLines(int step){
int number=step;
MInvoiceLine[] lines=getLines(false);
for (int i=0; i < lines.length; i++) {
MInvoiceLine line=lines[i];
line.setLine(number);
line.saveEx();
number+=step;
}
m_lines=null;
}
| Renumber Lines |
protected static void addWords(FullTextSettings setting,HashSet<String> set,Reader reader){
StreamTokenizer tokenizer=new StreamTokenizer(reader);
tokenizer.resetSyntax();
tokenizer.wordChars(' ' + 1,255);
char[] whitespaceChars=setting.getWhitespaceChars().toCharArray();
for ( char ch : whitespaceChars) {
... | Add all words in the given text to the hash set. |
public static List<Integer> createRanges(int... startEnds){
assert startEnds.length % 2 == 0;
ArrayList<Integer> ret=new ArrayList<Integer>();
for (int si=0; si < startEnds.length; si++) {
final int start=startEnds[si++];
final int end=startEnds[si];
assert end >= start;
ret.ensureCapacity(ret.siz... | Create a list of integers consisting of the ranges defined by the provided argument e.g.. createRanges(1, 4, 10, 12) means create ranges 1 through 4 and 10 through 12 and should yield the list: 1, 2, 3, 4, 10, 11, 12 |
public void beginShape(int kind){
shape=kind;
}
| Start a new shape. <P> <B>Differences between beginShape() and line() and point() methods.</B> <P> beginShape() is intended to be more flexible at the expense of being a little more complicated to use. it handles more complicated shapes that can consist of many connected lines (so you get joins) or lines mixed with cur... |
public boolean isSetHeader(){
return this.header != null;
}
| Returns true if field header is set (has been assigned a value) and false otherwise |
public boolean hasDateDetected(){
return getDateDetected() != null;
}
| Returns whether it has the value. |
public CartoonSSAO(){
super("CartoonSSAO");
}
| Create a Screen Space Ambient Occlusion Filter |
public void testCargo() throws Exception {
final URL url=new URL("http://localhost:" + System.getProperty("http.port") + "/cargocpc/");
final String expected="Cargo Ping Component";
PingUtils.assertPingTrue(url.getPath() + " not started",expected,url,logger);
}
| Test the CARGO ping component. |
private DSEStats(){
}
| This class cannot be built directly |
void init(IProject project){
fProject=project;
ProjectMarkerProcessor markerProcessor=ProjectMarkerProcessor.get(fProject);
fTaintSourcesMap=markerProcessor.getTaintSourcesMap();
fFilteredTaintSourcesMap=markerProcessor.getFilteredTaintSourcesMap();
fRoots=initializeRoots();
}
| Initializes the taint sources content provider for the given project. |
public void write(String str,int off,int len) throws IOException {
if (_outputStream == null) throw new IOException("Writer closed");
final int off_plus_len=off + len;
for (int i=off; i < off_plus_len; ) {
char c=str.charAt(i++);
if (c < 0x80) {
_bytes[_index]=(byte)c;
if (++_index >= _bytes... | Writes a portion of a string. |
public void onPackagesUnavailable(String[] packageNames){
}
| Called when external storage is removed with an array of packageNames of all apps that are installed on that SD Card, and are therefore no longer available. |
public void pop() throws java.lang.Exception {
if (vstack.empty()) throw new Exception("Internal parser error: pop from empty virtual stack");
vstack.pop();
if (vstack.empty()) get_from_real();
}
| Pop the stack. |
protected void buildListeners(){
super.buildListeners();
LAUNCH_ACTION=new LaunchAction();
LAUNCH_OS_ACTION=new LaunchOSAction();
OPEN_IN_FOLDER_ACTION=new OpenInFolderAction();
CREATE_TORRENT_ACTION=new CreateTorrentAction();
DELETE_ACTION=new RemoveFromPlaylistAction();
SEND_TO_ITUNES_ACTION=new SendAud... | Build some extra listeners |
void optimize(){
calculateBestPlan();
bestPlan.removeUnusableIndexConditions();
TableFilter[] f2=bestPlan.getFilters();
topFilter=f2[0];
for (int i=0; i < f2.length - 1; i++) {
f2[i].addJoin(f2[i + 1],false,false,null);
}
for ( TableFilter f : f2) {
PlanItem item=bestPlan.getItem(f);
f.setPla... | Calculate the best query plan to use. |
public void initTransaction() throws SQLException {
this.currentConection.setAutoCommit(false);
}
| Initilize a transaction in database |
public void putValue(String key,String value) throws NotLeaderException {
if (key.contains(" ")) {
throw new IllegalArgumentException("The key must not contain spaces");
}
try {
recordLock.add(key);
byte[] bytes=(key + " " + value).getBytes();
writeLog(bytes);
logger.info("[{}] Put key {}={}",... | Commits the entry to Raft log. The entries map is not updated; it is updated by the Replicator thread. |
private static boolean dateByMonth(DateTimeFormatterBuilder bld,Collection<DateTimeFieldType> fields,boolean extended,boolean strictISO){
boolean reducedPrec=false;
if (fields.remove(DateTimeFieldType.year())) {
bld.append(Constants.ye);
if (fields.remove(DateTimeFieldType.monthOfYear())) {
if (fields... | Creates a date using the calendar date format. Specification reference: 5.2.1. |
public String toString(){
String sEncoding="";
if (getEncoding() != null) {
sEncoding=getEncoding().toString() + " ";
}
String sSampleRate;
if (getSampleRate() == (float)AudioSystem.NOT_SPECIFIED) {
sSampleRate="unknown sample rate, ";
}
else {
sSampleRate="" + getSampleRate() + " Hz, ";
}
... | Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian". The contents of the string may vary between implementations of Java Sound. |
public boolean reportMissingRequiredSkinPartsAsWarnings(){
return reportMissingRequiredSkinPartsAsWarnings;
}
| Allow the user to configure whether it should be considered an error to not create a required skin part or if it should just be a warning. |
public boolean optBoolean(int index){
return this.optBoolean(index,false);
}
| Get the optional boolean value associated with an index. It returns false if there is no value at that index, or if the value is not Boolean.TRUE or the String "true". |
private static boolean isActionButton(MenuItem item){
if (item instanceof MenuItemImpl) {
return ((MenuItemImpl)item).isActionButton();
}
if (nativeIsActionButton == null) {
try {
Class<?> MenuItemImpl=Class.forName("com.android.internal.view.menu.MenuItemImpl");
nativeIsActionButton=MenuItemI... | Check if an item is showing (not in the overflow menu). |
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. |
@Override public ListIterator<T> listIterator(int index){
return new IteratorImpl(index);
}
| Returns an iterator positioned at <tt>index</tt>. Assuming that the list has a value at that index, calling next() will retrieve and advance the iterator. Assuming that there is a value before <tt>index</tt> in the list, calling previous() will retrieve it (the value at index - 1) and move the iterator to that positi... |
public void updateComponentDumpTemplate(String template) throws SecurityException {
checkWriteAccess();
boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_SETTING);
if (!hasAccess) throw new SecurityException("no access to update component setting");
Element component=_getRootElement("compo... | updates the DebugTemplate |
public static void injectInfoLogger(final Consumer<String> logger){
LogProvider.infoLogger=logger;
}
| Injects an own info logger functionality. Overwrites the previously associated info logger. |
public static File showOpenFile(String extension,File initialDir,Shell parent){
JFileDataStoreChooser dialog=new JFileDataStoreChooser(parent,SWT.OPEN,extension);
FileDialog fileDialogInternal=dialog.getFileDialog();
if (initialDir != null) {
if (initialDir.isDirectory()) {
fileDialogInternal.setFilterP... | Show a file open dialog that filters for files with the given extension. |
public boolean isNodeChild(TreeNode aNode){
boolean retval;
if (aNode == null) {
retval=false;
}
else {
if (getChildCount() == 0) {
retval=false;
}
else {
retval=(aNode.getParent() == this);
}
}
return retval;
}
| Returns true if <code>aNode</code> is a child of this node. If <code>aNode</code> is null, this method returns false. |
private double mapFreeSpeedToClosestChoice(double linkFreeSpeedInKmPerHour){
double[] freeSpeedChoiceSetInKmPerHour={30.0,50.0,60.0,90.0,120};
double minimumSpeedDelta=Double.MAX_VALUE;
int indexOfClosestFreeSpeed=-1;
for (int i=0; i < freeSpeedChoiceSetInKmPerHour.length; i++) {
double currentSpeedDelta=fr... | Only predefined free speed values are allowed (for which the values must be available in the data set) |
@SuppressWarnings("fallthrough") public static int lookup3(int[] k,int offset,int length,int initval){
int a, b, c;
a=b=c=0xdeadbeef + (length << 2) + initval;
int i=offset;
while (length > 3) {
a+=k[i];
b+=k[i + 1];
c+=k[i + 2];
{
a-=c;
a^=(c << 4) | (c >>> -4);
c+=b;
b-=a;
... | A Java implementation of hashword from lookup3.c by Bob Jenkins (<a href="http://burtleburtle.net/bob/c/lookup3.c">original source</a>). |
public boolean hasSecretBackend(String secretBackend){
Assert.hasText(secretBackend,"SecretBackend must not be empty");
Map<String,VaultMount> mounts=adminOperations.getMounts();
return mounts.containsKey(secretBackend) || mounts.containsKey(secretBackend + "/");
}
| Check whether a auth-backend is enabled. |
public SerialMessage createOutPacket(int startBitNum,int endBitNum){
int nBits=endBitNum - startBitNum + 1;
if (nBits > 99) {
log.error("Number of bits for this packet greater than 99 - " + nBits);
return null;
}
int sAdd=1000 + startBitNum;
SerialMessage m=new SerialMessage(14 + nBits);
m.setElemen... | Public Method to create an Transmit packet (SerialMessage) |
private void drawResultPoints(Bitmap barcode,float scaleFactor,Result rawResult){
ResultPoint[] points=rawResult.getResultPoints();
if (points != null && points.length > 0) {
Canvas canvas=new Canvas(barcode);
Paint paint=new Paint();
paint.setColor(getResources().getColor(R.color.result_points));
i... | Superimpose a line for 1D or dots for 2D to highlight the key features of the barcode. |
private static Map<String,Integer> optionArgDefs(){
Map<String,Integer> optionArgDefs=new HashMap<>();
optionArgDefs.put("annotations",1);
optionArgDefs.put("changepreps",0);
return optionArgDefs;
}
| Command-line option specification. |
public static KeyStore loadMsCapiStore(MsCapiStoreType msCapiStoreType) throws CryptoException {
if (!areMsCapiStoresSupported()) {
ApplicationSettings.getInstance().setUseWindowsTrustedRootCertificates(false);
throw new CryptoException(res.getString("MsCapiStoresNotSupported.exception.message"));
}
KeySt... | Load an MS CAPI Store as a KeyStore. The KeyStore is not file based and therefore does not need to be saved. |
@Override protected void updateLocateRegisters(){
int frameOffset=compiledMethod.getUnsignedNonVolatileOffset();
if (frameOffset >= 0) {
Address nonVolArea=framePtr.minus(frameOffset);
int first=compiledMethod.getFirstNonVolatileGPR();
if (first >= 0) {
Address location=nonVolArea;
for (int ... | If any non-volatile GPRs were saved by the method being processed then update the registerLocations array with the locations where the registers were saved. Also, check for special methods that also save the volatile GPRs. |
private int nextPossibleSimpleKey(){
if (!this.possibleSimpleKeys.isEmpty()) {
return this.possibleSimpleKeys.values().iterator().next().getTokenNumber();
}
return -1;
}
| Return the number of the nearest possible simple key. Actually we don't need to loop through the whole dictionary. |
public synchronized CloneableIterator<byte[]> keys(final boolean up,final boolean rotating,final byte[] firstKey,final byte[] secondKey) throws IOException {
return new KeyIterator(up,rotating,firstKey,secondKey);
}
| return an iteration of the keys in the map the keys in the map are de-normalized which means that the fill-character is removed |
public static SqlTemplate create(String template){
return new SqlTemplate(template,ImmutableMap.<String,String>of());
}
| Returns a new immutable SQL template builder object, for query parameter substitution. |
public void bind(PathImpl context){
getWrappedPath().bind(context);
}
| Binds the context to the current path. Later lookups will return the new context instead of the current path. Essentially, this is a software symbolic link. |
@Override public Vertex parseCase(TextStream stream,Map<String,Map<String,Vertex>> elements,boolean debug,Network network){
stream.nextWord();
stream.skipWhitespace();
Vertex expression=network.createInstance(Primitive.CASE);
String next=stream.peekWord();
boolean anyOrNone=false;
if (next.equalsIgnoreCase(... | Parse the CASE condition. |
public void source(File file){
addArg("source",file.getAbsolutePath());
}
| Sets the given file to be the source. |
public boolean isPrinted(){
Object oo=get_Value(COLUMNNAME_IsPrinted);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Printed. |
public boolean isDefaultHasChanged(){
return defaultHasChanged;
}
| True if the default value has changed. |
public static void runTransformThread(Runnable runnable){
ThreadControllerWrapper.runThread(runnable,-1);
}
| Called by CoRoutineSAXParser. Launches the CoroutineSAXParser in a thread, and prepares it to invoke the parser from that thread upon request. |
public void start(){
try {
client.start();
}
catch ( Exception e) {
throw new RuntimeException(e);
}
}
| Start the zookeeper client. |
@Override protected EClass eStaticClass(){
return SGenPackage.Literals.INT_LITERAL;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@DSComment("Package priviledge") @DSBan(DSCat.DEFAULT_MODIFIER) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:09.847 -0500",hash_original_method="DBD2AA47670972F837B77D54B6813996",hash_generated_method="F9D97FC80731E757B1F78DAFBBD554EA") final void reject(Runnable command){
h... | Invokes the rejected execution handler for the given command. Package-protected for use by ScheduledThreadPoolExecutor. |
Marketplace loadMarketplace() throws ObjectNotFoundException {
String marketplaceId=payload.getMarketplaceId();
if (Strings.isEmpty(marketplaceId)) {
return null;
}
Marketplace marketplace=new Marketplace();
marketplace.setMarketplaceId(marketplaceId);
marketplace=(Marketplace)serviceFacade.getDataServi... | Load marketplace if ID is given, or null otherwise |
public void connected(){
synchronized (this) {
if (idleReconnectFuture != null) idleReconnectFuture.cancel(false);
scheduleIdleTask(idleTimeoutMsec.get(),false);
}
}
| To be called when the connector has become connected. |
boolean validateTime(int actionType,float time){
float maxTime=3600;
float minTime=0.020f;
if (time < minTime || time > maxTime) {
String errorNum=" ";
switch (actionType) {
case Conditional.ACTION_DELAYED_TURNOUT:
errorNum="Error39";
break;
case Conditional.ACTION_RESET_DELAYED_TURNOUT:
errorNum=... | Range check time (assumes seconds) |
public Source<Double> fromNegativeInfinityToPositiveInfinity(){
return Compositions.weightWithValues(Doubles.fromNegativeInfinityToPositiveInfinity(),Double.NEGATIVE_INFINITY,Double.POSITIVE_INFINITY,Double.MAX_VALUE);
}
| Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by Double.POSITIVE_INFINITY. The Source is weighted so it is likely to generate Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY and Double.MAX_VALUE one or more times. |
public int[] readRemainingBytes() throws IOException {
int[] value=new int[this.getRemainingBytes() - 1];
log.debug("There are " + value.length + " remaining bytes");
for (int i=0; i < value.length; i++) {
value[i]=this.read("Remaining bytes " + i);
}
return value;
}
| Reads all remaining bytes except for checksum |
public static BoundSize parseBoundSize(String s,boolean isGap,boolean isHor){
if (s.length() == 0 || s.equals("null") || s.equals("n")) return null;
String cs=s;
boolean push=false;
if (s.endsWith("push")) {
push=true;
int l=s.length();
s=s.substring(0,l - (s.endsWith(":push") ? 5 : 4));
if (s... | Parses a single "min:pref:max" value. May look something like <code>"10px:20lp:30%"</code> or <code>"pref!"</code>. |
@Scheduled(initialDelayString="${batch.greeting.initialdelay}",fixedRateString="${batch.greeting.fixedrate}") public void fixedRateJobWithInitialDelay(){
logger.info("> fixedRateJobWithInitialDelay");
counterService.increment("method.invoked.greetingBatchBean.fixedRateJobWithInitialDelay");
final Collection<Greet... | Execute logic beginning at fixed intervals with a delay after the application starts. Use the <code>fixedRate</code> element to indicate how frequently the method is to be invoked. Use the <code>initialDelay</code> element to indicate how long to wait after application startup to schedule the first execution. |
public ArrayDeque(){
elements=new Object[16];
}
| Constructs an empty array deque with an initial capacity sufficient to hold 16 elements. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.