code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
final public void enable_tracing(){
}
| Enable tracing. |
@Override public void endElement(String uri,String localName,String qName){
try {
this.handler.endElement();
}
catch ( RuntimeException exception) {
handleException(exception);
}
finally {
this.handler=this.handler.getParent();
}
}
| Parses closing tag of XML element using corresponding element handler. |
public void init(CredentialInfo info,APIAccessCallBack apiAccessCallBack,Context context){
IdentityProxy.clientID=info.getClientID();
IdentityProxy.clientSecret=info.getClientSecret();
this.apiAccessCallBack=apiAccessCallBack;
this.context=context;
SharedPreferences mainPref=context.getSharedPreferences(Const... | Initializing the IDP plugin and obrtaining the access token. |
static TemplateModelException newMethodArgInvalidValueException(String methodName,int argIdx,Object... details){
return new _TemplateModelException(methodName,"(...) argument #",Integer.valueOf(argIdx + 1)," had invalid value: ",details);
}
| The type of the argument was good, but it's value wasn't. |
public static Typeface androidNation(Context context){
return FontSourceProcessor.process(R.raw.androidnation,context);
}
| Android Nation font face |
public static boolean[] toBooleanArray(double[] array){
boolean[] result=new boolean[array.length];
for (int i=0; i < array.length; i++) {
result[i]=array[i] > 0;
}
return result;
}
| Coverts given doubles array to array of booleans. |
@SuppressWarnings({"rawtypes","unchecked"}) private static Object convertArray(Object array,Class<?> fieldType,Class<?> itemType){
int len=Array.getLength(array);
if (fieldType.equals(List.class)) {
List list=new ArrayList();
for (int i=0; i < len; i++) {
list.add(Array.get(array,i));
}
return... | Converts the array to the appropriate type for binding. |
private final int addStdMove(GameTree gt,String moveStr){
return gt.addMove(moveStr,"",0,"","");
}
| Add a move to the game tree, with no comments or annotations. |
public BasicStroke(Cap cap,Join join,float miter,float[] intervals,float phase){
mCap=cap;
mJoin=join;
mMiter=miter;
mIntervals=intervals;
}
| Build a new basic stroke style. |
public BasicArchImpl(){
_id=ISicresAdminDefsKeys.NULL_ID;
_name="";
}
| Construye un objeto de la clase. |
public Notification(String title){
this(title,null,null,null);
}
| Creates notification object with specified title. |
synchronized void ensureValid(){
if (isClosed()) {
throw new ClosedException();
}
}
| Validates that the bytebuffer instance is valid (aka not closed). If it is closed, then we raise a ClosedException This doesn't really need to be synchronized, but lint won't shut up otherwise |
static public Boolean isPortMetricsAllocationEnabled(StorageSystem.Type systemType){
Boolean portMetricsAllocationEnabled=true;
try {
portMetricsAllocationEnabled=Boolean.valueOf(customConfigHandler.getComputedCustomConfigValue(CustomConfigConstants.PORT_ALLOCATION_METRICS_ENABLED,getStorageSystemTypeName(syste... | Check whether port metrics allocation is enabled. |
private void syncEmlWithResource(Resource resource){
resource.getEml().setEmlVersion(resource.getEmlVersion());
if (resource.getKey() != null) {
resource.getEml().setGuid(resource.getKey().toString());
}
else {
resource.getEml().setGuid(cfg.getResourceGuid(resource.getShortname()));
}
updateKeywordsW... | Updates the EML version and EML GUID. The GUID is set to the Registry UUID if the resource is registered, otherwise it is set to the resource URL. </br> This method also updates the EML list of KeywordSet with the dataset type and subtype. </br> This method must be called before persisting the EML file to ensure that t... |
private double[] prepareExtendedBatch(ExampleSet extendedBatch){
int[] classCount=new int[2];
Iterator<Example> reader=extendedBatch.iterator();
while (reader.hasNext()) {
Example example=reader.next();
example.setWeight(1);
classCount[(int)example.getLabel()]++;
}
double[] classPriors=new double[... | Similar to prepareBatch, but for extended batches. |
public synchronized void returnBuf(byte[] buf){
if (buf == null || buf.length > mSizeLimit) {
return;
}
mBuffersByLastUse.add(buf);
int pos=Collections.binarySearch(mBuffersBySize,buf,BUF_COMPARATOR);
if (pos < 0) {
pos=-pos - 1;
}
mBuffersBySize.add(pos,buf);
mCurrentSize+=buf.length;
trim();... | Returns a buffer to the pool, throwing away old buffers if the pool would exceed its allotted size. |
public void readFully(byte[] b,int off,int len){
if (SysProperties.CHECK && (len < 0 || len % Constants.FILE_BLOCK_SIZE != 0)) {
DbException.throwInternalError("unaligned read " + name + " len "+ len);
}
checkPowerOff();
try {
FileUtils.readFully(file,ByteBuffer.wrap(b,off,len));
}
catch ( IOExcepti... | Read a number of bytes. |
private void findValidation(Class<?> vaultClass,Class<?> assetClass,Class<?> idClass){
for ( Method method : vaultClass.getMethods()) {
if (!method.getName().startsWith("find")) {
continue;
}
if (!Modifier.isAbstract(method.getModifiers())) {
continue;
}
TypeRef resultRef=findResult(m... | Validate the find methods. |
public boolean isReadable(){
return true;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void testD() throws IOException {
SimilarityBase sim=new DFRSimilarity(new BasicModelD(),new AfterEffect.NoAfterEffect(),new Normalization.NoNormalization());
double totalTermFreqNorm=TOTAL_TERM_FREQ + FREQ + 1;
double p=1.0 / (NUMBER_OF_DOCUMENTS + 1);
double phi=FREQ / totalTermFreqNorm;
double D=phi... | Correctness test for the D DFR model (basic model only). |
public ActionErrors validate(ActionMapping mapping,HttpServletRequest request){
ActionErrors errors=new ActionErrors();
if (StringUtils.isBlank(nombre)) {
errors.add(ActionErrors.GLOBAL_MESSAGE,new ActionError(Constants.ERROR_REQUIRED,Messages.getString(DescripcionConstants.DESCRIPCION_LISTADESCRIPTORAS_NOMBRE,... | Valida el formulario |
private void allocatePort(StoragePort allocatedPort,Set<String> allocatedPorts,Set<String> allocatedEngines,Set<String> allocatedDirectorTypes,Set<String> allocatedDirectors,Set<String> allocatedCpus,Set<String> allocatedSwitches,List<StoragePort> allocatedStoragePorts,PortAllocationContext context){
allocatedPorts.a... | Handles the book-keeping of allocating a port. Called in two places - once for ports already allocated, and once for ports that are being allocated. |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public void writeStatement(Statement oldStat){
if (oldStat == null) {
throw new NullPointerException();
}
Statement newStat=createNewStatement(oldStat);
try {
newStat.execute();
}
catch ( Exception e) {
listener.exceptionThrown(new Exception("failed to write statement: " + oldStat,e));
}
}
| Write a statement of old objects. <p> A new statement is created by using the new versions of the target and arguments. If any of the objects do not have its new copy yet, <code>writeObject()</code> is called to create one. </p> <p> The new statement is then executed to change the state of the new object. </p> |
public TourGuide playInSequence(Sequence sequence){
setSequence(sequence);
next();
return this;
}
| Sequence related method |
@ReactMethod public void showPopupMenu(int reactTag,ReadableArray items,Callback error,Callback success){
assertViewExists(reactTag,"showPopupMenu");
mOperationsQueue.enqueueShowPopupMenu(reactTag,items,error,success);
}
| Show a PopupMenu. |
public static DateTime fromBigqueryTimestampString(String timestampString){
return BIGQUERY_TIMESTAMP_FORMAT.parseDateTime(timestampString);
}
| Returns the DateTime for a given human-readable string-formatted BigQuery timestamp. |
public boolean isRejectRemoteReceivedHeaderInvalid(){
return fieldRejectRemoteReceivedHeaderInvalid;
}
| Returns the rejectRemoteReceivedHeaderInvalid. |
public static void addFileDependencyCondition(ParameterType parameter,ParameterHandler parameterHandler,PortProvider portProvider){
parameter.registerDependencyCondition(new PortConnectedCondition(parameterHandler,portProvider,true,false));
}
| Adds a new (file-)OutputPortNotConnectedCondition for a given parameter. |
public static void main(String[] args){
Scanner input=new Scanner(System.in);
String[][] statesAndCapitals=getData();
int count=0;
for (int i=0; i < statesAndCapitals.length; i++) {
System.out.print("What is the capital of " + statesAndCapitals[i][0] + "? ");
String capital=input.nextLine();
if (isE... | Main method |
public void compressBlockDXT3(ColorBlock4x4 colorBlock,DXTCompressionAttributes attributes,BlockDXT3 dxtBlock){
if (colorBlock == null) {
String message=Logging.getMessage("nullValue.ColorBlockIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (attributes == ... | Compress the 4x4 color block into a DXT2/DXT3 block using 16 4 bit alpha values, and four colors. This method compresses the color block exactly as a DXT1 compressor, except that it guarantees that the DXT1 block will use four colors. <p/> Access to this method must be synchronized by the caller. This method is frequen... |
public static Tree fromString(String ptbStr){
PennTreeReader reader=new PennTreeReader(new StringReader(ptbStr));
return reader.next();
}
| This is a convenience function for producing a fragment from its string representation. |
public void unregisterVASACertificate(String existingCertificate) throws InvalidCertificate, InvalidSession, StorageFault {
final String methodName="unregisterVASACertificate(): ";
log.info(methodName + "Entry with existingCertificate[" + (existingCertificate != null ? "****" : null)+ "]");
contextManager.unregis... | Unregisters (removes) VASA provider from vCenter server |
public T archive(String value){
return attr("archive",value);
}
| Sets the <code>archive</code> attribute on the last started tag that has not been closed. |
public void enableMobileProvisioning(String url){
if (DBG) log("enableMobileProvisioning(url=" + url + ")");
final AsyncChannel channel=mDataConnectionTrackerAc;
if (channel != null) {
Message msg=Message.obtain();
msg.what=DctConstants.CMD_ENABLE_MOBILE_PROVISIONING;
msg.setData(Bundle.forPair(DctC... | Inform DCT mobile provisioning has started, it ends when provisioning completes. |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String outputHeader=null;
int row, col, x, y;
double z, min, max;
float progress=0;
int a;
int filterSizeX=3;
int filterSizeY=3;
int dX[];
int dY[];
int midPointX;
int midPointY;
int numPixelsInFilter;
boolean filterRoun... | Used to execute this plugin tool. |
public int size(){
return feature2Id.size();
}
| The number of features in this lexicon |
public SerialNode(){
}
| Creates a new instance of AbstractNode |
private boolean tryPublicKey(final Connection c,final String keyPath){
try {
final File file=new File(keyPath);
if (file.exists()) {
String passphrase=null;
char[] text=FileUtilRt.loadFileText(file);
if (isEncryptedKey(text)) {
int i;
for (i=0; i < myHost.getNumberOfPasswordP... | Try public key |
public List<String> command(){
return command;
}
| Returns this process builder's current program and arguments. Note that the returned list is not a copy and modifications to it will change the state of this instance. |
public boolean isBlocked(String permissionName){
return !doCanPerform(permissionName,false,true);
}
| True if the user is blocked from using this permission. |
protected synchronized void clearBuffers(){
while (m_firstBuffer.size() > 0 && m_secondBuffer.size() > 0) {
m_throughput.updateStart();
Instance newInst=processBuffers();
m_throughput.updateEnd(m_log);
if (newInst != null) {
m_ie.setInstance(newInst);
m_ie.setStatus(InstanceEvent.INSTANCE_... | Clear remaining instances in the buffers |
public static RegionSizeRequest create(){
RegionSizeRequest m=new RegionSizeRequest();
return m;
}
| Returns a <code>ObjectNamesRequest</code> to be sent to the specified recipient. |
@Override public int size(){
return this._map.size();
}
| Returns the number of entries in the map. |
public TaskResourceRep restoreSnapshotSession(URI snapSessionURI){
s_logger.info("START restore snapshot session {}",snapSessionURI);
BlockSnapshotSession snapSession=BlockSnapshotSessionUtils.querySnapshotSession(snapSessionURI,_uriInfo,_dbClient,true);
BlockObject snapSessionSourceObj=null;
List<BlockObject> ... | Restores the data on the array snapshot point-in-time copy represented by the BlockSnapshotSession instance with the passed URI, to the snapshot session source object. |
public LayersMenu(LayerHandler lHandler){
this(lHandler,"Layers",LAYERS_ON_OFF);
}
| Construct LayersMenu. |
private Individual searchBest(){
try {
return Collections.max(individuals,PERFORMANCE_COMPARATOR);
}
catch ( NullPointerException e) {
return null;
}
catch ( NoSuchElementException e) {
return null;
}
}
| Finds the current generation's best individual. Returns null, if there are unevaluated individuals. Probably you will want to use <tt>bestEver()</tt> or <tt>lastBest()</tt> because they don't cause comparisons. |
private void emitDeserializer(List<Method> getters,StringBuilder builder){
builder.append(" public static ").append(getImplClassName()).append(" fromJsonElement(JsonElement jsonElem) {\n");
builder.append(" return fromJsonElement(jsonElem, true);\n");
builder.append(" }\n");
builder.append(" publi... | Generates a static factory method that creates a new instance based on a JsonElement. |
public boolean isInAllowed(int x,int y){
for ( Shape r : arrivingBarriers) {
if (r.contains(x,y)) {
return false;
}
}
return true;
}
| Check if teleporting to a location is allowed. |
public void write(byte[] b) throws IOException {
write(b,0,b.length);
}
| Writes <code>b.length</code> bytes from the specified byte array to this output stream. <p> The <code>write</code> method of <code>CipherOutputStream</code> calls the <code>write</code> method of three arguments with the three arguments <code>b</code>, <code>0</code>, and <code>b.length</code>. |
public Accumulator(){
data=new HashMap<String,List<Serializable>>();
}
| Constructs an empty accumulator. |
public DbManagerOps(MBeanServerConnection mbsc) throws IOException, MalformedObjectNameException {
initMbean(mbsc);
}
| Create an DbManagerOps object using given MBeanServerConnection. The connection is built outside of this object's control. |
public void testSharedMode() throws Exception {
processSharedModeTest(DeploymentMode.SHARED);
}
| Test GridDeploymentMode.SHARED mode. |
public SystemWebViewEngine(Context context,CordovaPreferences preferences){
this(new SystemWebView(context));
}
| Used when created via reflection. |
public Affiliation(String jid,String node,Type affiliation){
this.jid=jid;
this.node=node;
type=affiliation;
}
| Constructs an affiliation. |
public void testCreateIdForEAR() throws Exception {
EAR ear=createEAR();
String name=deployer.createIdForDeployable(ear);
assertEquals("cargo.war",name);
}
| Test EAR identifier creation. |
public boolean sameAs(Cache other){
boolean sameConfig=other.getLockLease() == this.getLockLease() && other.getLockTimeout() == this.getLockTimeout() && other.getSearchTimeout() == this.getSearchTimeout() && other.getMessageSyncInterval() == this.getMessageSyncInterval() && other.getCopyOnRead() == this.getCopyOnRead... | Returns whether or not this <code>CacheCreation</code> is equivalent to another <code>Cache</code>. |
protected void writeModelRetriever() throws IOException {
out("require('",JsCompiler.scriptPath(module),"-model').$CCMM$");
}
| Write the function to retrieve or define the model JSON map. |
@Override public boolean supportsSchemasInProcedureCalls(){
debugCodeCall("supportsSchemasInProcedureCalls");
return true;
}
| Returns whether the schema name in procedure calls is supported. |
public void fillInNotifierBundle(Bundle bundleToFill){
bundleToFill.putInt("baseStationId",this.mBaseStationId);
bundleToFill.putInt("baseStationLatitude",this.mBaseStationLatitude);
bundleToFill.putInt("baseStationLongitude",this.mBaseStationLongitude);
bundleToFill.putInt("systemId",this.mSystemId);
bundleT... | Fill the cell location data into the intent notifier Bundle based on service state |
public String write(Enum value) throws Exception {
return value.name();
}
| This method is used to convert the provided value into an XML usable format. This is used in the serialization process when there is a need to convert a field value in to a string so that that value can be written as a valid XML entity. |
public static double[] f(double[] M,Function func){
double[] fM=new double[M.length];
for (int i=0; i < fM.length; i++) fM[i]=func.f(M[i]);
return fM;
}
| Apply a scalar function to every element of an array. Must import groovySci.math.array.util.*; to get Function interface. Example:<br> <code> double[] b = {1,2,3,4};<br> Function inverse = new Function() { public double f(double x) { return 1/x; }};<br> double[] z = f(b, inverse);<br> Result is: <br> 1.00 0.50 0.33 0.2... |
private void deleteNode(BFINode<E> childNode,InsDelUpdateStatistics stat){
if (this.root.children.size() < 2) {
System.err.println("ERROR: nb children of root is " + this.root.children.size());
System.err.println(this.toString());
assert false;
}
BFINode<E> node=childNode.parent;
boolean ok=node.chi... | Delete the given node from the index. The deletion moves bottom up |
public void writeFormatted(Geometry geometry,Writer writer) throws IOException {
writeFormatted(geometry,true,writer);
}
| Same as <code>write</code>, but with newlines and spaces to make the well-known text more readable. |
public NegativeResponseException(int commandStatus){
super("Negative response " + IntUtil.toHexString(commandStatus) + " found");
this.commandStatus=commandStatus;
}
| Construct with specified command_status. |
public void addOptionIfValueNonEmpty(String option,String value){
if (value != null && !value.isEmpty()) {
addOption(option,value);
}
}
| Adds the option only if value is a non-null, non-empty String |
public void executeCallback(SceKernelThreadInfo thread,int address,IAction afterAction,boolean returnVoid,int registerA0){
if (log.isDebugEnabled()) {
log.debug(String.format("Execute callback 0x%08X($a0=0x%08X), afterAction=%s, returnVoid=%b",address,registerA0,afterAction,returnVoid));
}
callAddress(thread,... | Trigger a call to a callback in the context of a thread. This call can return before the completion of the callback. Use the "afterAction" parameter to trigger some actions that need to be executed after the callback (e.g. to evaluate a return value in cpu.gpr[2]). |
protected JavacElements(Context context){
setContext(context);
}
| Public for use only by JavacProcessingEnvironment |
public void write(BufferedImage img) throws IOException {
super.write(img);
String fileExtension=getExtension(destinationFile);
String formatName=outputFormat;
if (formatName != null && (fileExtension == null || !isMatchingFormat(formatName,fileExtension))) {
destinationFile=new File(destinationFile.getAbso... | Writes the resulting image to a file. |
K lowestKey(){
Comparator<? super K> cmp=m.comparator;
ConcurrentSkipListMap.Node<K,V> n=loNode(cmp);
if (isBeforeEnd(n,cmp)) return n.key;
else throw new NoSuchElementException();
}
| Returns lowest absolute key (ignoring directonality). |
private void exportFolderToText(String folderId,PrintStream ps){
Cursor notesCursor=mContext.getContentResolver().query(Notes.CONTENT_NOTE_URI,NOTE_PROJECTION,NoteColumns.PARENT_ID + "=?",new String[]{folderId},null);
if (notesCursor != null) {
if (notesCursor.moveToFirst()) {
do {
ps.println(Stri... | Export the folder identified by folder id to text |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:18.877 -0500",hash_original_method="B472369E445B34AFDD84E5B389A9601D",hash_generated_method="7E96FE508A65015DCC33416C426C9ABB") protected final RectF rect(){
return mRect... | Returns the RectF that defines this rectangle's bounds. |
public void putAsString(String key,double value){
String strValue=Double.toString(value);
super.put(key,strValue);
}
| <p> Adds the given <code>double</code> value as a string version to the <code>Job</code>'s data map. </p> |
public ZebraJTree(javax.swing.tree.TreeModel newModel){
super(newModel);
}
| Instantiates a new zebra j tree. |
public Node nextNode(){
if (!hasNext()) {
return null;
}
currentNode=nodes.pop();
currentChildren=currentNode.getChildNodes();
int childLen=(currentChildren != null) ? currentChildren.getLength() : 0;
for (int i=childLen - 1; i >= 0; i--) {
nodes.add(currentChildren.item(i));
}
return currentNod... | <p> Returns the next <code>Node</code> on the stack and pushes all of its children onto the stack, allowing us to walk the node tree without the use of recursion. If there are no more nodes on the stack then null is returned. </p> |
public DefaultPseudoStateContext(PseudoState<S,E> pseudoState,PseudoAction pseudoAction){
this.pseudoState=pseudoState;
this.pseudoAction=pseudoAction;
}
| Instantiates a new default pseudo state context. |
public void initView(Context context,EditableImage editableImage){
this.editableImage=editableImage;
selectionView=new SelectionView(context,lineWidth,cornerWidth,cornerLength,lineColor,cornerColor,shadowColor,editableImage);
imageView=new ImageView(context);
imageView.setLayoutParams(new LayoutParams(LayoutPar... | update view with editable image |
@Override public boolean doesMaxRowSizeIncludeBlobs(){
debugCodeCall("doesMaxRowSizeIncludeBlobs");
return false;
}
| Returns whether the maximum row size includes blobs. |
public DocumentExportEntry insert(URL exportFeedUrl,List<QueryParameter> params) throws IOException, ServiceException {
DocumentExportEntry entry=new DocumentExportEntry();
for ( QueryParameter param : params) {
entry.addQuery(param);
}
return insert(exportFeedUrl,entry);
}
| Start a new request to download the documents that match all search criteria as a zip file. |
public AttributeTagTestCase(String name){
super(name);
}
| Construct a new instance of this test case. |
public static Short toShort(CharSequence self){
return Short.valueOf(self.toString().trim());
}
| Parse a CharSequence into a Short |
public AllCapsTransformationMethod(Context context){
mLocale=context.getResources().getConfiguration().locale;
}
| Uses current locale. |
@LargeTest public void testThumbnailH264AnIFrame() throws Exception {
final String videoItemFilename=INPUT_FILE_PATH + "H264_BP_1080x720_30fps_800kbps_1_17.mp4";
final int outWidth=1080;
final int outHeight=720;
final int atTime=3000;
int renderingMode=MediaItem.RENDERING_MODE_BLACK_BORDER;
final String[] l... | To test ThumbnailList for H264 |
@DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:52.757 -0500",hash_original_method="79DF1B5079137D62C29C5EAC0F3F40E2",hash_generated_method="A015978186413157B4AD18DBEEDB9864") public Socket createSocket(InetAddress address,int por... | Creates a new Socket, binds it to myAddress:myPort and connects it to address:port. |
protected void initializeTerminalSize(){
slotsTall=6;
slotsAcross=9;
startX=69;
startY=0;
playerInventoryOffsetX=0;
playerInventoryOffsetY=37;
hasCraftingMatrix=true;
}
| If overridden, <b>do not call super</b>. |
private void logWarning(String msg,Throwable e){
EnvironmentStream.logStderr(msg,e);
}
| error messages from the log itself |
public static float[] cmykFromRgb(int rgbColor){
int red=(0xff0000 & rgbColor) >> 16;
int green=(0xff00 & rgbColor) >> 8;
int blue=(0xff & rgbColor);
float black=Math.min(1.0f - red / 255.0f,Math.min(1.0f - green / 255.0f,1.0f - blue / 255.0f));
float cyan=1.0f;
float magenta=1.0f;
float yellow=1.0f;
if... | Convert RGB color to CMYK color. |
public void updateCheckout(final Checkout checkout,final Callback<Checkout> callback){
buyClient.updateCheckout(checkout,wrapCheckoutCallback(callback));
}
| Update a checkout. |
public static void applyDecidedIconOrSetGone(ImageHolder imageHolder,ImageView imageView,int iconColor,boolean tint,int paddingDp){
if (imageHolder != null && imageView != null) {
Drawable drawable=ImageHolder.decideIcon(imageHolder,imageView.getContext(),iconColor,tint,paddingDp);
if (drawable != null) {
... | decides which icon to apply or hide this view |
public static String toStream(String channel){
if (channel == null) {
return null;
}
if (channel.startsWith("#")) {
return channel.substring(1);
}
return channel;
}
| Removes a leading # from the channel, if present. |
@SuppressWarnings({"MagicConstant","TypeMayBeWeakened"}) public static IgniteProductVersion fromString(String verStr){
assert verStr != null;
if (verStr.endsWith("-DEV") || verStr.endsWith("-n/a")) verStr=verStr.substring(0,verStr.length() - 4);
Matcher match=VER_PATTERN.matcher(verStr);
if (match.matches()) ... | Tries to parse product version from it's string representation. |
public static synchronized TypeReference findOrCreate(ClassLoader cl,Atom tn) throws IllegalArgumentException {
TypeDescriptorParsing.validateAsTypeDescriptor(tn);
ClassLoader bootstrapCL=BootstrapClassLoader.getBootstrapClassLoader();
if (cl == null) {
cl=bootstrapCL;
}
else if (cl != bootstrapCL) {
... | Find or create the canonical TypeReference instance for the given pair. |
public void clear(){
oredCriteria.clear();
orderByClause=null;
distinct=false;
}
| This method was generated by MyBatis Generator. This method corresponds to the database table user_groups |
public Response handle(final String rawRequest){
final Request req=requestParser.parse(rawRequest);
return handleRequest(req);
}
| Handle the request by first parsing the string then evaluating the request method and uri |
public ReferenceQueue(){
}
| Creates a new empty reference queue. |
public double[] update(JunctionTreeNode node){
if (node.m_P == null) {
return null;
}
double[] fi=new double[m_nCardinality];
int[] values=new int[node.m_nNodes.length];
int[] order=new int[m_bayesNet.getNrOfNodes()];
for (int iNode=0; iNode < node.m_nNodes.length; iNode++) {
order[node.m_nNodes[iNo... | marginalize junciontTreeNode node over all nodes outside the separator set |
public void process(NodeWorkList workList){
assert !(start instanceof Invoke);
workList.addAll(start.successors());
for ( Node current : workList) {
assert current.isAlive();
if (current instanceof Invoke) {
nodeRelevances.put((FixedNode)current,computeInvokeRelevance((Invoke)current));
workL... | Processes all invokes in this scope by starting at the scope's start node and iterating all fixed nodes. Child loops are skipped by going from loop entries directly to the loop exits. Processing stops at loop exits of the current loop. |
public void runTest() throws Throwable {
Document doc;
Element root;
String tagname;
doc=(Document)load("staff",false);
root=doc.getDocumentElement();
tagname=root.getTagName();
if (("image/svg+xml".equals(getContentType()))) {
assertEquals("svgTagName","svg",tagname);
}
else {
assertEquals("el... | Runs the test case. |
private void determineCoverageGoals(){
List<InputCoverageTestFitness> goals=new InputCoverageFactory().getCoverageGoals();
for ( InputCoverageTestFitness goal : goals) {
inputCoverageMap.add(goal);
if (Properties.TEST_ARCHIVE) TestsArchive.instance.addGoalToCover(this,goal);
}
}
| Initialize the set of known coverage goals |
public static void unregisterFieldPrefix(final String prefix){
fieldPrefixes.remove(prefix);
}
| If a prefix is no longer needed unregister it here. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.