code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public Object runSafely(Catbert.FastStack stack) throws Exception {
UIManager uiMgr=stack.getUIMgr();
if (uiMgr == null) return new Integer(0);
else {
java.awt.Dimension d=uiMgr.getUIDisplayResolution();
return (d == null) ? new Integer(720) : new Integer(d.width);
}
}
| Returns the width in pixels of the current display resolution set |
public String toString(){
if (m_barcode == null) return super.toString();
return super.toString() + " " + m_barcode.getData();
}
| String Representation |
public void startSpinning(){
isSpinning=true;
postInvalidate();
}
| Puts the view on spin mode |
public static String javaDecode(String s){
int length=s.length();
StringBuilder buff=new StringBuilder(length);
for (int i=0; i < length; i++) {
char c=s.charAt(i);
if (c == '\\') {
if (i + 1 >= s.length()) {
throw getFormatException(s,i);
}
c=s.charAt(++i);
switch (c) {
case 't'... | Decode a text that is encoded as a Java string literal. The Java properties file format and Java source code format is supported. |
public final void testSetMaxPathLength() throws Exception {
KeyStore keyTest=KeyStore.getInstance(KeyStore.getDefaultType());
keyTest.load(null,null);
ByteArrayInputStream certArray=new ByteArrayInputStream(certificate.getBytes());
ByteArrayInputStream certArray2=new ByteArrayInputStream(certificate2.getBytes()... | Test for <code>setMaxPathLength()</code> |
private static <T extends AbstractBlockBase<T>>void computeCodeEmittingOrder(List<T> order,PriorityQueue<T> worklist,BitSet visitedBlocks){
while (!worklist.isEmpty()) {
T nextImportantPath=worklist.poll();
addPathToCodeEmittingOrder(nextImportantPath,order,worklist,visitedBlocks);
}
}
| Iteratively adds paths to the code emission block order. |
public void selectEvent(final Event event){
final XTableModel model=table.getXTableModel();
for (int i=table.getRowCount() - 1; i >= 0; i--) {
final Event e=(Event)model.getValueAt(table.convertRowIndexToModel(i),eventColIdx);
if (e == event) {
programmaticSelection=true;
table.getSelectionModel... | Selects the specified event. |
@Override public String toString(){
if (methOp != null) return methOp.toString();
switch (type) {
case METHOD_ACCESS:
return "<mem loc: methOp is null!>";
case FIELD_ACCESS:
return "<mem loc: " + fieldRef.getType().getName() + "."+ fieldRef.getName()+ ">";
case ARRAY_ACCESS:
return "<mem loc: array " + arrayE... | Returns the string representation of this operand. |
protected void executeTasksUntilEmpty(String queueName,@Nullable FakeClock clock) throws Exception {
while (true) {
ofy().clearSessionCache();
List<QueueStateInfo.TaskStateInfo> taskInfo=taskQueue.getQueueStateInfo().get(queueName).getTaskInfo();
if (taskInfo.isEmpty()) {
break;
}
QueueState... | Executes mapreduce tasks, increment the clock between each task. <p>Incrementing the clock between tasks is important if tasks have transactions inside the mapper or reducer, which don't have access to the fake clock. |
public Vector2i add(Vector2i v){
x+=v.x;
y+=v.y;
return this;
}
| Add <code>v</code> to this vector. |
public static void main(String[] args){
System.out.println("\nFeet Meters | Meters Feet\n" + "----------------------------------------------");
for (double feet=1.0, meters=20.0; feet <= 10.0; feet++, meters+=5) {
System.out.printf("%4.1f ",feet);
System.out.printf("%6.3f",footToMeter(fe... | Main Method |
public Object newTransport(HttpEngine httpEngine) throws IOException {
return (spdyConnection != null) ? new SpdyTransport(httpEngine,spdyConnection) : new HttpTransport(httpEngine,out,in);
}
| Returns the transport appropriate for this connection. |
public boolean isCovered(final Coordinate point){
Envelope e=new Envelope(point);
List<?> gList=spatialIndex.query(e);
PreparedPoint p=new PreparedPoint(geomFactory.createPoint(point));
for (int i=0; i < gList.size(); i++) {
Geometry g1=((MasonGeometry)gList.get(i)).getGeometry();
if (p.intersects(g1)) ... | Returns true if the coordinate is within any geometry in the field. <p> However, it offers no guarantee for points on the boundaries. Use this version if you want to check if an agent is within a geometry; its roughly an order of magnitude faster than using the Geometry version. |
public void showPassiveFocusIndicator(){
if (mFocusRing != null) {
mFocusRing.startPassiveFocus();
}
}
| Show the passive focus indicator. |
public OCSPAndCRLCertificateVerifier(final CRLSource crlSource,final OCSPSource ocspSource,final CertificatePool validationCertPool){
this.crlSource=crlSource;
this.ocspSource=ocspSource;
this.validationCertPool=validationCertPool;
}
| Build a OCSPAndCRLCertificateVerifier that will use the provided CRLSource and OCSPSource |
private void updatePostFailoverCancel(Volume volume) throws InternalException {
_log.info("Setting respective flags after failover of failover");
ProtectionSet protectionSet=_dbClient.queryObject(ProtectionSet.class,volume.getProtectionSet());
List<URI> volumeIDs=new ArrayList<URI>();
for ( String volumeString... | After a failover of a failover (without swap), we need to set specific flags |
public int next(){
int node=_currentNode;
int nodeType=_nodeType;
if (nodeType >= DTM.NTYPES) {
while (true) {
node=node + 1;
if (_sp < 0) {
node=NULL;
break;
}
else if (node >= _stack[_sp]) {
if (--_sp < 0) {
node=NULL;
break;
}
... | Get the next node in the iteration. |
public void disableCompatibilityMode(){
flags|=(FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS | FLAG_SUPPORTS_SMALL_SCREENS| FLAG_RESIZEABLE_FOR_SCREENS| FLAG_SUPPORTS_SCREEN_DENSITIES| FLAG_SUPPORTS_XLARGE_SCREENS);
}
| Disable compatibility mode |
public boolean isGuideLinesVisible(){
return this.guideLinesVisible;
}
| Returns a flag that controls whether or not guide lines are drawn for each data item (the lines are horizontal and vertical "crosshairs" linking the data point to the axes). |
public GridReversedLinesFileReader(final File file,final int blockSize,final Charset charset) throws IOException {
this.blockSize=blockSize;
this.encoding=charset;
randomAccessFile=new RandomAccessFile(file,"r");
totalByteLength=randomAccessFile.length();
int lastBlockLength=(int)(totalByteLength % blockSize)... | Creates a ReverseLineReader with the given block size and encoding. |
public void stop(){
if (mRunning.compareAndSet(true,false)) {
mTargetDataLine.stop();
mTargetDataLine.close();
}
}
| Stops the reader thread |
static public Automaton intersection(Automaton a1,Automaton a2){
if (a1 == a2) {
return a1;
}
if (a1.getNumStates() == 0) {
return a1;
}
if (a2.getNumStates() == 0) {
return a2;
}
Transition[][] transitions1=a1.getSortedTransitions();
Transition[][] transitions2=a2.getSortedTransitions();
... | Returns an automaton that accepts the intersection of the languages of the given automata. Never modifies the input automata languages. <p> Complexity: quadratic in number of states. |
public int computeEdgePoints(List<Object> facevec,List<CoordFloatString> allLLPoints) throws FormatException {
int ring_ptr=((Number)facevec.get(ringIDColumn)).intValue();
List<Object> ring1=new ArrayList<Object>(rings.getColumnCount());
rings.getRow(ring1,ring_ptr);
int fac_id=((Number)ring1.get(faceIDColumn))... | Computes the full set of points that determine the edge of the area. |
public static boolean withinPackage(Tree.Declaration decl){
return container(decl) instanceof com.redhat.ceylon.model.typechecker.model.Package;
}
| Determines whether the declaration's containing scope is a package |
public void encodeSolution(final DataOutputBuffer out,final IBindingSet bset){
out.append(encodeSolution(bset));
}
| Encode the solution on the stream. |
public int exprGetNumChildren(){
return getLength();
}
| Return the number of children the node has. |
public void putElements(K key,Set<E> elements){
synchronized (this) {
removeKey(key);
if (!elements.isEmpty()) {
for ( E element : elements) {
addElement(key,element);
}
}
}
}
| Sets the elements corresponding to a particular key. The existing set for that key (if it exists) is cleared. |
protected void createSubsample(){
for (int i=0; i < m_SampleSize; i++) {
if (m_subSample[i] != null) {
Instance copy=(Instance)m_subSample[i].copy();
push(copy);
}
else {
break;
}
}
m_subSample=null;
}
| Creates a subsample of the current set of input instances. The output instances are pushed onto the output queue for collection. |
protected void parseArgs(String[] args) throws AdeUsageException {
if (args.length == 0) {
usageError("No arguments supplied");
}
m_myArgs=args;
}
| Parse the input arguments |
public void selectNavItem(int selectedId){
if (mRootView != null) {
final LinearLayout navMenu=(LinearLayout)mRootView.findViewById(R.id.library_nav_menu);
for (int i=0; i < navMenu.getChildCount(); i++) {
View v=navMenu.getChildAt(i);
if (v instanceof TextView) {
TextView tv=(TextView)v;
... | Set the state of the selected nav item |
private void createFullCopyForApplicationCGs(Workflow workflow,VolumeGroup volumeGroup,List<URI> fullCopyVolumes,Boolean createInactive,TaskCompleter taskCompleter){
boolean isCG=true;
taskCompleter.addVolumeGroupId(volumeGroup.getId());
List<Volume> allVolumes=ControllerUtils.getVolumeGroupVolumes(_dbClient,volu... | Create Full Copies for volumes in Volume Group (COPY type), Query all volumes belonging to that Volume Group, Group full-copies by Array Replication Group and create workflow step for each Array Group, these steps runs in parallel |
public void onCombineSetup() throws IOException, InterruptedException {
}
| Invoked on the named stage. |
private static int binarySearch(int[] index,double[] vals,double target){
int lo=0, hi=index.length - 1;
while (hi - lo > 1) {
int mid=lo + (hi - lo) / 2;
double midval=vals[index[mid]];
if (target > midval) {
lo=mid;
}
else if (target < midval) {
hi=mid;
}
else {
while (... | performs a binary search |
public VPAttribute(boolean mandatory,boolean isReadOnly,boolean isUpdateable,int WindowNo,MPAttributeLookup lookup,boolean searchOnly){
this(null,mandatory,isReadOnly,isUpdateable,WindowNo,lookup,searchOnly);
}
| Create Product Attribute Set Instance Editor. |
@ExceptionHandler(AccessDeniedException.class) @ResponseBody @ResponseStatus(HttpStatus.FORBIDDEN) public String handleException(final AccessDeniedException cause){
return convertErrorAsJson(cause.getMessage());
}
| Handles an AccessDenied Exception thrown by a REST API web service endpoint, HTTP request handler method. <p/> |
protected void init(Table table,Graph graph,int row){
m_table=table;
m_graph=graph;
m_row=m_table.isValidRow(row) ? row : -1;
}
| Initialize a new Edge backed by an edge table. This method is used by the appropriate TupleManager instance, and should not be called directly by client code, unless by a client-supplied custom TupleManager. |
public boolean aggregateOnly(){
if (this.hasAllCols()) return false;
for ( Column s : columns) if (s.getOp() == Operation.NONE && s.getCalculation() == null) return false;
return true;
}
| Returns if this heading specifies just a count() in which case there is no need to fetch all the data |
public CodedException withPrefix(String... prefixes){
String prefix=StringUtils.join(prefixes,".");
if (!faultCode.startsWith(prefix)) {
faultCode=prefix + "." + faultCode;
}
return this;
}
| Returns the current exception with prefix appended in front of the fault code. |
public void compute(Vertex<LongWritable,DoubleWritable,FloatWritable> vertex,Iterable<DoubleWritable> messages){
if (getSuperstep() == 0) {
vertex.setValue(new DoubleWritable(0d));
}
double count=0d;
for ( DoubleWritable message : messages) {
count+=1d;
}
if (LOG.isDebugEnabled()) {
LOG.debug("... | Compute method |
public void findAll(String sql,Object[] args,Result<Iterable<Cursor>> result){
QueryBuilderKraken builder=QueryParserKraken.parse(this,sql);
if (builder.isTableLoaded()) {
QueryKraken query=builder.build();
findAll(query,args,result);
}
else {
String tableName=builder.getTableName();
_tableServic... | Select query returning multiple results. |
protected final Object applyImplicitConversion(final ConversionType conversionType,final Class<?> dClass,final Class<?> sClass,final Object sourceContent){
if (!conversionType.isAbsent()) {
if (!conversionType.isUndefined()) return getConversion(conversionType,sourceContent);
if (isCastCase(dClass,sClass)... | This method returns the source content modified, analyzing conversion type, destination and source classes. |
public Builder negativeExamples(File negativeExamples){
this.negativeExamples=negativeExamples;
return this;
}
| Sets the negative examples. |
private boolean expressionMatch(){
ArrayList<String> values=new ArrayList<>(Arrays.asList(textField.getText().split("[ ,(,),+,-,/,*]")));
values.removeAll(Arrays.asList("+","-","/","*"," ","(",")",""));
return values.containsAll(cardNumbers);
}
| Returns true if numbers in the expression match the numbers in the set |
public boolean match(T value){
return match(value,blacklist);
}
| Matches value against the set of rules using current white/black list mode. |
public Object lookup(FacesContext facesContext,String name){
Object object=null;
try {
InitialContext context=new InitialContext();
object=context.lookup(name);
}
catch ( NamingException ne) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.log(Level.WARNING,"Unable to lookup: " + name,ne);
... | Look up the given object using its JNDI name. |
private static String normalize(final String str){
char c;
StringBuffer buf=new StringBuffer();
for (int i=0; i < str.length(); i++) {
c=str.charAt(i);
if (Character.isLetter(c)) {
buf.append(Character.toLowerCase(c));
}
}
return buf.toString();
}
| Normalizes String. |
public void dropPcjTable(final Connector accumuloConn,final String pcjTableName) throws PCJStorageException {
checkNotNull(accumuloConn);
checkNotNull(pcjTableName);
try {
accumuloConn.tableOperations().delete(pcjTableName);
}
catch ( AccumuloException|AccumuloSecurityException|TableNotFoundException e) {... | Drops a PCJ index from Accumulo. |
public CSSLangCondition(String lang){
this.lang=lang.toLowerCase();
this.langHyphen=lang + '-';
}
| Creates a new LangCondition object. |
private void renameReplay(){
Path targetFile;
try {
final TemplateEngine engine=new TemplateEngine(Env.APP_SETTINGS.get(Settings.RENAME_NEW_REPS_TEMPLATE));
targetFile=engine.apply(file);
}
catch ( final InvalidTemplateException ite) {
Env.LOGGER.error("Failed to rename new replay, template is inval... | Renames the new replay in its original folder. |
static long toLong(String v){
String buildPart="1";
long buildType=700;
if (v.endsWith("-SNAPSHOT")) {
buildPart="";
v=v.substring(0,v.indexOf("-SNAPSHOT"));
buildType=0;
}
else if (v.contains("-alpha-")) {
buildPart=v.substring(v.lastIndexOf('-') + 1);
v=v.substring(0,v.indexOf("-alpha-"... | Converts a version string on the form x.y.z into an integer which can be compared to other versions converted into integers. |
@SuppressWarnings("unchecked") public LiteralExtensionIV createIV(final Value value){
if (value instanceof Literal == false) throw new IllegalArgumentException();
final Literal lit=(Literal)value;
final AbstractLiteralIV delegate=new XSDNumericIV<BigdataLiteral>(XMLDatatypeUtil.parseFloat(lit.getLabel()));
re... | Attempts to convert the supplied value into an internal representation using BigInteger. |
public StaticNodeSettings build(){
checkNotNull(address,"address");
return new StaticNodeSettings(this);
}
| Builds a static-node settings. |
@Override protected EClass eStaticClass(){
return ImPackage.Literals.SYMBOL_TABLE_ENTRY_IM_ONLY;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void detachSprite(Sprite sprite){
Collection<AttachedSprite> sprites=attachedSprites;
if (sprites != null) {
Iterator<AttachedSprite> it=sprites.iterator();
while (it.hasNext()) {
AttachedSprite as=it.next();
if (as.sprite == sprite) {
it.remove();
break;
}
}
}... | Detach a sprite that has been previously attached to the view. |
public Date lastModified(){
return DateFormat.RESPONSE_DATE_FORMAT.parseDateTime(lastModified).toDate();
}
| Returns last modified time of the object. |
public List<ChallengeHandler> lookup(String location){
List<ChallengeHandler> result=Collections.emptyList();
if (location != null) {
Node<ChallengeHandler,UriElement> resultNode=findBestMatchingNode(location);
if (resultNode != null) {
return resultNode.getValues();
}
}
return result;
}
| Locate all challenge handlers to serve the given location. |
public static <E>List<E> singletonList(E object){
return new SingletonList<E>(object);
}
| Returns a list containing the specified element. The list cannot be modified. The list is serializable. |
public static void fill(int[] a,int val){
fill(a,0,a.length,val);
}
| Assigns the specified int value to each element of the specified array of ints. |
public static void main(String[] argv){
runClassifier(new DecisionStump(),argv);
}
| Main method for testing this class. |
public static void copyRemaining(ByteBuffer src,ByteBuffer dst){
int n=Math.min(src.remaining(),dst.remaining());
copy(src,dst,n);
}
| Copies as much as possible |
public CountProjectionExpression(boolean isDistinct){
this.distinct=isDistinct;
}
| Ctor - for use to create an expression tree, without inner expression |
public synchronized void remove(Aspect transientInstance){
try {
if (null != transientInstance.getId()) {
EntityManager entityManager=EntityManagerHelper.getEntityManager();
entityManager.getTransaction().begin();
Object aspect=entityManager.find(transientInstance.getClass(),transientInstance.ge... | Method remove. |
public static Double[] toObject(final double[] array){
if (array == null) {
return null;
}
else if (array.length == 0) {
return ArrayUtils.EMPTY_DOUBLE_OBJECT_ARRAY;
}
final Double[] result=new Double[array.length];
for (int i=0; i < array.length; i++) {
result[i]=new Double(array[i]);
}
re... | <p>Converts an array of primitive doubles to objects.</p> <p>This method returns <code>null</code> for a <code>null</code> input array.</p> |
public Boolean isRecordReplayEnabled(){
return recordReplayEnabled;
}
| Gets the value of the recordReplayEnabled property. |
public static int randomInt(int lowerThan){
return RANDOM.nextInt(lowerThan);
}
| Get a pseudo random int value between 0 (including and the given value (excluding). The value is not cryptographically secure. |
public void postIdle(final Runnable runnable){
postIdle(runnable,0);
}
| Schedule runnable to run when the queue goes idle. |
public static PortInfoBubble displayPrecheckInputPortDisconnectedWarning(final Port port){
return displayPrecheckInputPortDisconnectedWarning(port,true);
}
| Displays a warning bubble that alerts the user that an input port of an operator expects input but is not connected. The bubble is located at the port and the process view will change to said port. This is a bubble which occurs during the check for errors before process execution so it contains a link button to run the... |
@ExpectWarning("IL") private static void case1(){
case1();
}
| Case1: FB doesn't report Infinite Loop in 'private' 'static' methods |
protected OMGraphic drawFeature(int primitiveID,VPFFeatureWarehouse warehouse,LatLonPoint ll1,LatLonPoint ll2,double dpplat,double dpplon,String currentFeature,int featurePrimID) throws FormatException {
if (aft != null || tft != null || edg != null || ent != null || cnt != null) {
if ((aft != null) && aft.getRow... | Should be called once per feature, after the tables have been set (setTables()), and findYourself() has been called. The appropriate table will use the warehouse to create proper OMGraphic. |
public byte[] reSample(byte[] sourceData,int bitsPerSample,int sourceRate,int targetRate){
int bytePerSample=bitsPerSample / 8;
int numSamples=sourceData.length / bytePerSample;
short[] amplitudes=new short[numSamples];
int pointer=0;
for (int i=0; i < numSamples; i++) {
short amplitude=0;
for (int by... | Do resampling. Currently the amplitude is stored by short such that maximum bitsPerSample is 16 (bytePerSample is 2) |
public static String removeIllegalCharacter(final String text){
final StringBuilder rVal=new StringBuilder();
for (int i=0; i < text.length(); ++i) {
if (!isIllegalFileNameChar(text.charAt(i))) {
rVal.append(text.charAt(i));
}
}
return rVal.toString();
}
| Designed to remove / \b \n \r \t \0 \f ` ? * \ < > | " ' : . , ^ [ ] = + ; |
public Sheep retrieveSheep(){
if (player.hasSlot("#flock")) {
final RPSlot slot=player.getSlot("#flock");
if (slot.size() > 0) {
final RPObject object=slot.getFirst();
slot.remove(object.getID());
player.removeSlot("#flock");
object.put("x",player.getX());
object.put("y",player.g... | Recreate a saved sheep. |
public void sendChunk(ServerConnection servConn) throws IOException {
if (this.sc != servConn) throw new IllegalStateException("this.sc was not correctly set");
sendChunk();
}
| Sends a chunk of this message. |
public boolean isAutoRange(){
return this.autoRange;
}
| Returns the current setting of the auto-range property. |
public void testDeleteOneTracksInMyTracks() throws IOException {
if (!RunConfiguration.getInstance().getRunSyncTest()) {
return;
}
EndToEndTestUtils.createTrackIfEmpty(2,false);
EndToEndTestUtils.SOLO.clickOnMenuItem(EndToEndTestUtils.trackListActivity.getString(R.string.menu_delete));
EndToEndTestUtils.S... | Deletes one track in MyTracks and checks it in Google Drive. |
private void writeObject(final ObjectOutputStream oos) throws IOException {
oos.defaultWriteObject();
}
| Write the content of this URI. |
public static void checkClusterWithCollectionCreations(final MiniSolrCloudCluster cluster,final SSLTestConfig sslConfig) throws Exception {
cluster.uploadConfigSet(SolrTestCaseJ4.TEST_PATH().resolve("collection1").resolve("conf"),CONF_NAME);
checkCreateCollection(cluster,"first_collection");
checkClusterJettys(cl... | General purpose cluster sanity check... <ol> <li>Upload a config set</li> <li>verifies a collection can be created</li> <li>verifies many things that should succeed/fail when communicating with the cluster according to the specified sslConfig</li> <li>shutdown a server & startup a new one in it's place</li> <li>rep... |
public static void pushNamespaces(BindingExpression be,Stack<PrefixMapping> namespaces){
for (int i=0, count=namespaces.size(); i < count; i++) {
PrefixMapping pm=namespaces.get(i);
be.addNamespace(pm.getUri(),pm.getNs());
}
}
| Add all the namespaces to the binding expression. |
private String prefix(){
return configClass.getSimpleName() + "$";
}
| Adds a prefix to distinguish between methods with the same name but belonging to different classes. |
public String optString(int index,String defaultValue){
Object object=this.opt(index);
return JSONObject.NULL.equals(object) ? defaultValue : object.toString();
}
| Get the optional string associated with an index. The defaultValue is returned if the key is not found. |
private static File GetFileFromPath(String path){
boolean ret;
boolean isExist;
boolean isWritable;
File file=null;
if (TextUtils.isEmpty(path)) {
Log.e("Error","The path of Log file is Null.");
return file;
}
file=new File(path);
isExist=file.exists();
isWritable=file.canWrite();
if (isExis... | Get File form the file path.<BR> if the file does not exist, create it and return it. |
public int read(char cbuf[],int off,int len) throws IOException {
if ((off < 0) || (off > cbuf.length) || (len < 0)|| ((off + len) > cbuf.length)|| ((off + len) < 0)) throw new IndexOutOfBoundsException();
if (len == 0) return 0;
if (next >= length) return -1;
int n=Math.min(length - next,len);
text.get... | Reads characters into a portion of an array. |
public static ArrayList<Instruction> recompileHopsDag2Forced(Hop hops,long tid,ExecType et) throws DMLRuntimeException, HopsException, LopsException, IOException {
ArrayList<Instruction> newInst=null;
synchronized (hops) {
LOG.debug("\n**************** Optimizer (Recompile) *************\nMemory Budget = " + Opti... | D) Recompile predicate hop DAG (single root), but forced to CP. This happens always 'inplace', without statistics updates, and without dynamic rewrites. |
public void reset(){
super.reset();
this.V[0]=0x7380166F;
this.V[1]=0x4914B2B9;
this.V[2]=0x172442D7;
this.V[3]=0xDA8A0600;
this.V[4]=0xA96F30BC;
this.V[5]=0x163138AA;
this.V[6]=0xE38DEE4D;
this.V[7]=0xB0FB0E4E;
this.xOff=0;
}
| reset the chaining variables |
public GMLWriter(boolean emitNamespace){
this.setNamespace(emitNamespace);
}
| Creates a writer which may emit the GML namespace prefix declaration in the geometry root element. |
public RMIException(VM vm,String className,String methodName,Throwable cause){
super("While invoking " + className + "."+ methodName+ " in "+ vm,cause);
this.cause=cause;
this.className=className;
this.methodName=methodName;
this.vm=vm;
}
| Creates a new <code>RMIException</code> that was caused by a given <code>Throwable</code> while invoking a given method. |
protected static void checkRectangularShape(Object[][] array){
int columns=-1;
for (int row=array.length; --row >= 0; ) {
if (array[row] != null) {
if (columns == -1) columns=array[row].length;
if (array[row].length != columns) throw new IllegalArgumentException("All rows of array must h... | Checks whether the given array is rectangular, that is, whether all rows have the same number of columns. |
public static SelectResults execute(ExecutablePool pool,String queryPredicate,Object[] queryParams){
AbstractOp op=null;
if (queryParams != null && queryParams.length > 0) {
op=new QueryOpImpl(queryPredicate,queryParams);
}
else {
op=new QueryOpImpl(queryPredicate);
}
return (SelectResults)pool.execu... | Does a region query on a server using connections from the given pool to communicate with the server. |
static String determineSourceHome(){
try {
File file;
try {
file=new File("solr/conf");
if (!file.exists()) {
file=new File(Thread.currentThread().getContextClassLoader().getResource("solr/conf").toURI());
}
}
catch ( Exception e) {
file=new File(".");
}
File ba... | Ugly, ugly hack to determine the example home without depending on the CWD this is needed for example/multicore tests which reside outside the classpath. if the source home can't be determined, this method returns null. |
private static VirtualPoolChangeOperationEnum vplexCommonChecks(Volume volume,VirtualPool currentVpool,VirtualPool newVpool,DbClient dbClient,StringBuffer notSuppReasonBuff,String[] include){
s_logger.info(String.format("Checking vplexCommonChecks from [%s] to [%s]...",currentVpool.getLabel(),newVpool.getLabel()));
... | Common checks for change vpool for all VPLEX volumes |
public static String dateToString(Date date,Resolution resolution){
return timeToString(date.getTime(),resolution);
}
| Converts a Date to a string suitable for indexing. |
void doubleBufferingChanged(JRootPane rootPane){
getPaintManager().doubleBufferingChanged(rootPane);
}
| Invoked when the doubleBuffered or useTrueDoubleBuffering properties of a JRootPane change. This may come in on any thread. |
public MmsException(String message){
super(message);
}
| Creates a new MmsException with the specified detail message. |
public void searchDeclarationsOfAccessedFields(IJavaElement enclosingElement,SearchRequestor requestor,IProgressMonitor monitor) throws JavaModelException {
if (VERBOSE) {
Util.verbose("BasicSearchEngine.searchDeclarationsOfAccessedFields(IJavaElement, SearchRequestor, SearchPattern, IProgressMonitor)");
}
swit... | Searches for all declarations of the fields accessed in the given element. The element can be a compilation unit or a source type/method/field. Reports the field declarations using the given requestor. |
public final String sourceExpression(int index,Instances data){
return "true";
}
| Returns a string containing java source code equivalent to the test made at this node. The instance being tested is called "i". |
public double f1Measure(){
return fMeasure(1.0);
}
| Get the pair-counting F1-Measure. |
public boolean removeNode(Node node){
if (!nodes.contains(node)) {
return false;
}
boolean changed=false;
List<Edge> edgeList1=edgeLists.get(node);
for (Iterator<Edge> i=edgeList1.iterator(); i.hasNext(); ) {
Edge edge=(i.next());
Node node2=edge.getDistalNode(node);
if (node2 != node) {
... | Removes a node from the graph. |
private static IdUrlPair bestSchedulerInfoMatchLikeValue(String value,String schedulerIdField){
String schedulerUrlField;
if (schedulerIdField.equals(AppResult.TABLE.FLOW_DEF_ID)) {
schedulerUrlField=AppResult.TABLE.FLOW_DEF_URL;
}
else if (schedulerIdField.equals(AppResult.TABLE.FLOW_EXEC_ID)) {
sched... | Returns the scheduler info id/url pair for the most recent app result that has an id like value (which can use % and _ SQL wild cards) for the specified field. Note that this is a pair rather than merely an ID/URL because for some schedulers (e.g. Airflow) they are not equivalent and usually the UI wants to display the... |
public static WritableIntegerDataStore makeIntegerStorage(DBIDs ids,int hints){
return DataStoreFactory.FACTORY.makeIntegerStorage(ids,hints);
}
| Make a new storage, to associate the given ids with an object of class dataclass. |
public static int toIntValue(Object o) throws PageException {
if (o instanceof Number) return ((Number)o).intValue();
else if (o instanceof Boolean) return ((Boolean)o).booleanValue() ? 1 : 0;
else if (o instanceof String) return toIntValue(o.toString().trim());
else if (o instanceof Castable) return... | cast a Object to a int value (primitive value type) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.