code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public boolean isValid(DrawContext dc){
return this.verticalExaggeration == dc.getVerticalExaggeration() && (this.globeStateKey != null && globeStateKey.equals(dc.getGlobe().getGlobeStateKey(dc)));
}
| Indicates whether this shape data's globe state and vertical exaggeration are the same as that in the current draw context. |
public AuthenticationException(String message,Throwable cause){
super(message,cause);
}
| Creates a new AuthenticationException with the specified detail message and cause. |
public void clear(){
if (size() == 0) return;
buffer=new byte[buffer.length];
root.next=null;
pos=0;
length=0;
curr=root;
}
| clear the content of the buffer |
public ReilFunction(final com.google.security.zynamics.reil.ReilFunction function){
m_function=function;
m_graph=ReilGraphConverter.createReilGraph(function.getGraph());
}
| Creates a new API REIL function object. |
public void removeHostFromVcenterCluster(URI hostId,String stepId){
log.info("removeHostFromVcenterCluster {}",hostId);
Host host=null;
try {
WorkflowStepCompleter.stepExecuting(stepId);
host=_dbClient.queryObject(Host.class,hostId);
if (NullColumnValueGetter.isNullURI(host.getVcenterDataCenter())) {
... | This will attempt to remove host from vCenter cluster. |
private void broadcastNewFile(LocalFilesystemURL inputURL){
File file=new File(this.filesystemPathForURL(inputURL));
if (file.exists()) {
Activity activity=this.cordova.getActivity();
Context context=activity.getApplicationContext();
Uri uri=Uri.fromFile(file);
Intent intent=new Intent(Intent.ACTION... | Send broadcast of new file so files appear over MTP |
public boolean contains(JsonElement element){
return elements.contains(element);
}
| Returns true if this array contains the specified element. |
public final int compareTo(EntryFile o){
if (timestampMillis < o.timestampMillis) return -1;
if (timestampMillis > o.timestampMillis) return 1;
if (file != null && o.file != null) return file.compareTo(o.file);
if (o.file != null) return -1;
if (file != null) return 1;
if (this == o) return 0;
... | Sorts earlier EntryFile instances before later ones. |
public boolean isEmpty(){
return size == 0;
}
| Returns <tt>true</tt> if this list contains no elements. |
private void zInternalSetLastValidTimeAndNotifyListeners(LocalTime newTime){
LocalTime oldTime=lastValidTime;
lastValidTime=newTime;
if (!PickerUtilities.isSameLocalTime(oldTime,newTime)) {
for ( TimeChangeListener timeChangeListener : timeChangeListeners) {
TimeChangeEvent timeChangeEvent=new TimeCh... | zInternalSetLastValidTimeAndNotifyListeners, This should be called whenever we need to change the last valid time variable. This will store the supplied last valid time. If needed, this will notify all time change listeners that the time has been changed. This does not perform any other tasks besides those described he... |
private void retreat(final Creature creature,final Entity enemy){
creature.clearPath();
creature.faceToward(enemy);
creature.setDirection(creature.getDirection().oppositeDirection());
if (creature.getZone().collides(creature,creature.getX() + creature.getDirection().getdx(),creature.getY() + creature.getDirecti... | Run away from an enemy. |
static public List<String> readFile(File aFile){
List<String> contents=new ArrayList<String>();
BufferedReader input=null;
try {
input=new BufferedReader(new FileReader(aFile));
String line=null;
while ((line=input.readLine()) != null) {
if (!line.startsWith("@") && !line.startsWith("%") && !"".... | Read lines from the given file. |
public ListenableFuture<PaymentIncrementAck> incrementPayment(Coin size) throws ValueOutOfRangeException, IllegalStateException {
return incrementPayment(size,null,null);
}
| Increments the total value which we pay the server. Note that the amount of money sent may not be the same as the amount of money actually requested. It can be larger if the amount left over in the channel would be too small to be accepted by the Bitcoin network. ValueOutOfRangeException will be thrown, however, if the... |
public void distribute(int start,int remainder,int blockSize,int value){
if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(remainder <= blockSize);
if (value <= remainder) {
data[start]+=value;
}
else {
data[start]+=remainder;
value-=remainder;
start++;
while (value >= blockSize) {
data... | Distribute a value across a sequence of tiles. This handles the case when when an object spans two or more tiles and its value is to be attributed to each tile proportionally. |
public EnumDeclaration addEnum(String name){
return addEnum(name,Modifier.PUBLIC);
}
| Add a public enum to the types of this compilation unit |
public List<String> copy(){
return new ArrayList<String>(warnings);
}
| Creates a copy of this warnings list. |
public FreeTextSuggester(Analyzer indexAnalyzer,Analyzer queryAnalyzer,int grams){
this(indexAnalyzer,queryAnalyzer,grams,DEFAULT_SEPARATOR);
}
| Instantiate, using the provided indexing and lookup analyzers, with the specified model (2 = bigram, 3 = trigram, etc.). |
public static void escapeRegex(CharSequence s,boolean asciiOnly,boolean embeddable,Appendable out) throws IOException {
new Escaper(s,embeddable ? REGEX_LITERAL_EMBEDDABLE_ESCAPES : REGEX_LITERAL_ESCAPES,asciiOnly ? NO_NON_ASCII : ALLOW_NON_ASCII,JS_ENCODER,out).escape();
}
| Given a plain text string, write to out unquoted regular expression text that would match that substring and only that substring. |
private void updateProgress(int progress){
if (myHost != null) {
myHost.updateProgress(progress);
}
else {
System.out.println("Progress: " + progress + "%");
}
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public Criteria or(){
Criteria criteria=createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
| This method was generated by MyBatis Generator. This method corresponds to the database table project_todo_status |
@Override protected EClass eStaticClass(){
return N4JSPackage.Literals.IMPORT_DECLARATION;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private Support_TestWebData(String path,String type){
File file=new File(path);
testLength=file.length();
testLastModified=file.lastModified();
testName=file.getName();
testType=type;
testDir=file.isDirectory();
ByteArrayOutputStream out=new ByteArrayOutputStream();
FileInputStream in=null;
try {
... | Creates a data package with information used by the server when responding to requests |
public void clear(){
count=0;
indices=new HashMap<String,Integer>();
}
| Remove all entries. |
protected void updatePage(){
setValid(isValid());
updateMessage();
updateValidationMessages();
}
| Updates the page valid status, message and error table if needed. |
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. |
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
s.defaultWriteObject();
for (Node<K,V> n=findFirst(); n != null; n=n.next) {
V v=n.getValidValue();
if (v != null) {
s.writeObject(n.key);
s.writeObject(v);
}
}
s.writeObject(null);
}
| Saves this map to a stream (that is, serializes it). |
public void highlightLastRow(int row){
int lastrow=m_tableModel.getRowCount();
if (row == lastrow - 1) {
m_table.setRowSelectionInterval(lastrow - 1,lastrow - 1);
}
else {
m_table.setRowSelectionInterval(row + 1,row + 1);
}
m_table.setColumnSelectionInterval(0,0);
}
| Highlight the last row in the table |
private void print(String amt){
try {
System.out.println(amt + " = " + getAmtInWords(amt));
}
catch ( Exception e) {
e.printStackTrace();
}
}
| Test Print |
public Floor(){
super(Number.class,Number.class);
}
| Constructs a new node for calculating the largest integer value that is less than or equal to a number. |
public StochasticOscillatorSeries(Strategy strategy,String name,String type,String description,Boolean displayOnChart,Integer chartRGBColor,Boolean subChart){
super(strategy,name,type,description,displayOnChart,chartRGBColor,subChart);
}
| Creates a new empty series. By default, items added to the series will be sorted into ascending order by period, and duplicate periods will not be allowed. |
public final int size(){
return m_firstFree;
}
| Get the length of the list. |
public boolean fillIfLive(long timeout) throws IOException {
StreamImpl source=_source;
byte[] readBuffer=_readBuffer;
if (readBuffer == null || source == null) {
_readOffset=0;
_readLength=0;
return false;
}
if (_readOffset > 0) {
System.arraycopy(readBuffer,_readOffset,readBuffer,0,_readLeng... | Fills the buffer with a timed read, testing for the end of file. Used for cases like comet to test if the read stream has closed. |
public boolean isRange(){
Object oo=get_Value(COLUMNNAME_IsRange);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Range. |
protected void doCreatePointSymbols(FeatureMap featureMap,Collection<VPFSymbol> outCollection){
for ( Map.Entry<VPFSymbolKey,CombinedFeature> entry : featureMap.entrySet()) {
CombinedFeature feature=entry.getValue();
for ( VPFSymbolAttributes attr : this.getSymbolAttributes(feature,entry.getKey())) {
swit... | From MIL-DTL-89045A, section 3.5.3.1.1: A point feature may be symbolized as either a point symbol or as a text label or both. <p/> From MIL-HDBK-857A, section 6.5.3.1: For point features (e.g., buoys, beacons, lights) that are composed of several symbol components, displaying the components according to the row ids in... |
public void init(SecureRandom random) throws IllegalArgumentException {
if (random != null) {
this.random=random;
}
else {
this.random=new SecureRandom();
}
}
| Initialise the padder. |
@Override public String toString(){
return " at " + this.index + " [character "+ this.character+ " line "+ this.line+ "]";
}
| Make a printable string of this JSONTokener. |
public LimitTokenPositionFilter(TokenStream in,int maxTokenPosition,boolean consumeAllTokens){
super(in);
if (maxTokenPosition < 1) {
throw new IllegalArgumentException("maxTokenPosition must be greater than zero");
}
this.maxTokenPosition=maxTokenPosition;
this.consumeAllTokens=consumeAllTokens;
}
| Build a filter that limits the maximum position of tokens to emit. |
public static String format(String format,Object... args){
return new Substituter(String.format(format,args)).toString();
}
| Apply String.format first, and then pass through Substituter. |
public void enableBasicProgress(long totalJobs){
mTotalJobs=totalJobs;
mBasicProgress=true;
Diagnostic.progress(mThreadPoolName + ": Starting " + mTotalJobs+ " Jobs");
}
| Enable the basic progress output with the total number of jobs that this thread pool will process. |
public static NetworkInfo fromVersion(final byte version){
for ( final NetworkInfo info : KNOWN_NETWORKS) {
if (version == info.getVersion()) {
return info;
}
}
throw new IllegalArgumentException(String.format("Invalid version '%d' is not a known network version",version));
}
| Gets the network info from the version. |
private void leaveBusy(){
}
| Leave busy state. |
public CoreDescriptor(String coreName,CoreDescriptor other){
this.coreContainer=other.coreContainer;
this.cloudDesc=other.cloudDesc;
this.instanceDir=other.instanceDir;
this.originalExtraProperties.putAll(other.originalExtraProperties);
this.originalCoreProperties.putAll(other.originalCoreProperties);
this.... | Create a new CoreDescriptor using the properties of an existing one |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String outputHeader=null;
int row, col, x, y;
int progress=0;
double slope;
double z, z2;
int i, n;
int[] dX={1,1,1,0,-1,-1,-1,0};
int[] dY={-1,0,1,1,1,0,-1,-1};
int[] dX2={2,2,2,2,2,1,0,-1,-2,-2,-2,-2,-2,-1,0,1};
int[] dY2={-... | Used to execute this plugin tool. |
public void AddMobileDevice(String DeviceId,String SenderId,MobileDeviceReceiver receiver){
MobileDeviceParser parser=new MobileDeviceParser(receiver);
String url=mDomoticzUrls.constructGetUrl(DomoticzValues.Json.Url.Request.ADD_MOBILE_DEVICE);
url+="&uuid=" + DeviceId;
url+="&senderid=" + SenderId;
RequestUt... | Register you device on Domoticz |
public SchemeMap(){
_schemeMap.set(new ConcurrentHashMap<String,SchemeRoot>(),null);
}
| Create an empty SchemeMap. |
protected void emit_FunctionDeclaration_SemiParserRuleCall_1_q(EObject semanticObject,ISynNavigable transition,List<INode> nodes){
acceptNodes(transition,nodes);
}
| Ambiguous syntax: Semi? This ambiguous syntax occurs at: (rule start) 'function' '(' ')' (ambiguity) (rule start) body=Block (ambiguity) (rule end) declaredAsync?='async' NO_LINE_TERMINATOR? 'function' '(' ')' (ambiguity) (rule end) declaredModifiers+=N4Modifier 'function' '(' ')' (ambiguity) (rule end) fpars+=FormalPa... |
public Pair NE(){
int r2=row - 1;
if (r2 < 0) return null;
return new Pair(diagonal,r2);
}
| Return NE location or null if invalid. |
public InlineQueryResultDocument build(){
return new InlineQueryResultDocument(id,title,caption,document_url,mime_type,description,reply_markup,input_message_content,thumb_url,thumb_width,thumb_height);
}
| Builds the InlineQueryResultDocument object |
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 clear(){
parameters=null;
}
| Removes all parameters from this collection. |
public void freeMemory(){
getInnerSources().freeMemory();
getInnerSinks().freeMemory();
}
| Frees memory used by inner sinks. |
private static void drawHandle(final Graphics g,final int x,int y){
g.setColor(ourColor1);
g.drawRect(x,y,HANDLE_ATOM_WIDTH - 1,HANDLE_ATOM_HEIGHT - 1);
UIUtil.drawLine(g,x + HANDLE_ATOM_WIDTH / 2,y + HANDLE_ATOM_HEIGHT,x + HANDLE_ATOM_WIDTH / 2,y + HANDLE_ATOM_HEIGHT + HANDLE_ATOM_SPACE - 1);
y+=HANDLE_ATOM_HE... | Paints small spacer's haldle. <code>(x,y)</code> is a top left point of a handle. |
public boolean isAddressedModePossible(){
return true;
}
| Debug programmer does provide Ops Mode |
public static byte[] serializeToBlob(Object obj) throws IOException {
return serializeToBlob(obj,null);
}
| A blob is a serialized Object. This method serializes the object into a blob and returns the byte array that contains the blob. |
public File parallelCorpus(){
return parallelCorpus;
}
| Gets the parallel corpus. |
public Object clone(){
return (html.clone());
}
| Allows the XhtmlFrameSetDocument to be cloned. Doesn't return an instanceof XhtmlFrameSetDocument returns instance of html. |
private void handleHtmlDoUserRestore(RequestAndResponse requestAndResponse) throws IOException, ServletException {
final Errors errors=new Errors();
final Part part=requestAndResponse.request.getPart("file");
final boolean reuseIds=getCheckBoxValue(requestAndResponse,"reuseIds");
final boolean msWordListFormat=... | Part of the HTML API. Handle a restore. |
private boolean adjustInstruction() throws IOException {
pos=c.localPosition();
newPos=map[pos];
int opcode=c.readU1();
if (Inject.verbose) {
traceln();
traceFixedWidthInt(pos,4);
traceFixedWidthInt(newPos,4);
trace(" ");
}
if (opcode == opc_wide) {
int wopcode=c.readU1();
int lvInde... | Walk one instruction adjusting for insertions |
public void createDir(String fspath) throws IsilonException {
createDir(fspath,false);
}
| Create a directory with the path specified, will fail if parent does not exist |
protected void appendHTML(final StringBuilder sbuf,final String text){
final StringCharacterIterator ci=new StringCharacterIterator(text);
char ch=ci.current();
while (ch != CharacterIterator.DONE) {
appendHTML(sbuf,ch);
ch=ci.next();
}
}
| Escape text as HTML, escaping meta-characters. |
public void registerTableNodes(SnmpMib mib,MBeanServer server){
}
| Register the group's SnmpMibTable objects with the meta-data. |
public static List<? extends Element> childElementList(Element element){
if (element == null) return null;
List<Element> elements=new LinkedList<Element>();
Node node=element.getFirstChild();
if (node != null) {
do {
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element childElement=(Elemen... | Return a List of Element objects that are children of the given element |
public JPAStreamingMailboxMessage(JPAMailbox mailbox,MessageUid uid,long modSeq,MailboxMessage message) throws MailboxException {
super(mailbox,uid,modSeq,message);
try {
this.content=new SharedByteArrayInputStream(IOUtils.toByteArray(message.getFullContent()));
this.header=getHeaderContent();
this.body... | Create a copy of the given message |
@Override public void agg(double newVal){
valueSet.add(newVal);
firstTime=false;
}
| just need to add the unique values to agg set |
private CodePattern buildCodePattern_RANDOM_CODE(Attribute classLabel) throws OperatorException {
double multiplicator=getParameterAsDouble(PARAMETER_RANDOM_CODE_MULTIPLICATOR);
int numberOfClasses=classLabel.getMapping().size();
CodePattern codePattern=new CodePattern(numberOfClasses,(int)(numberOfClasses * mult... | Builds a code pattern according to the "random code" classification scheme. |
protected void prepare(){
ProcessInfoParameter[] para=getParameter();
for (int i=0; i < para.length; i++) {
String name=para[i].getParameterName();
if (para[i].getParameter() == null) ;
else log.log(Level.SEVERE,"Unknown Parameter: " + name);
}
p_Record_ID=getRecord_ID();
}
| Prepare - e.g., get Parameters. |
@Override public V put(K key,V value){
if (key == null) return putForNullKey(value);
int hash=hash(key);
int i=indexFor(hash,table.length);
for (Entry<K,V> e=table[i]; e != null; e=e.next) {
Object k;
if (e.hash == hash && ((k=e.key) == key || key.equals(k))) {
V oldValue=e.value;
e.value=... | Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced. |
protected InnerBuilder addHeaders(Map<String,String> headers){
String url=NULL_KEY_FOR_URL;
addHeadersWithUrl(url,headers);
return this;
}
| add the custom headers for download |
public static String escapeJS(String str,char quotesUsed,CharsetEncoder enc){
char[] arr=str.toCharArray();
StringBuilder rtn=new StringBuilder(arr.length);
rtn.append(quotesUsed);
for (int i=0; i < arr.length; i++) {
if (arr[i] < 128) {
switch (arr[i]) {
case '\\':
rtn.append("\\\\");
break;
... | escapes JS sensitive characters |
private void checkOffsetOrImageTag(ExifTag tag){
if (tag.getComponentCount() == 0) {
return;
}
short tid=tag.getTagId();
int ifd=tag.getIfd();
if (tid == TAG_EXIF_IFD && checkAllowed(ifd,ExifInterface.TAG_EXIF_IFD)) {
if (isIfdRequested(IfdId.TYPE_IFD_EXIF) || isIfdRequested(IfdId.TYPE_IFD_INTEROPERAB... | Check the tag, if the tag is one of the offset tag that points to the IFD or image the caller is interested in, register the IFD or image. |
public static boolean hasGetAndSetMethods(JField field,JClassType clazz){
return hasGetMethod(field,clazz) && hasSetMethod(field,clazz);
}
| Returns <code>true</code> is the given field has both a "get" and a "set" methods. |
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 IndicesOptions indicesOptions(){
return indicesOptions;
}
| Returns indices option flags |
private static boolean isSorted(Comparable[] a){
for (int i=1; i < a.length; i++) if (less(a[i],a[i - 1])) return false;
return true;
}
| Check if array is sorted - useful for debugging. |
public RevisionMetadata processMetadata(RevisionHistory revisionHistory,List<Revision> revs,@Nullable MetadataScrubberConfig sc,@Nullable Revision fromRevision){
ImmutableList.Builder<RevisionMetadata> rmBuilder=ImmutableList.builder();
for ( Revision rev : revs) {
RevisionMetadata rm=revisionHistory.getMetada... | Get and scrub RevisionMetadata based on the given MetadataScrubberConfig. |
public <T>void write(T obj,String localName,String uri,Class<T> cls) throws XMLStreamException {
_xml.add(obj,localName,uri,cls);
}
| Writes the specified object as a fully qualified nested element of actual type known (<code>null</code> objects are ignored). |
public void debug(String msg,Object arg0,Object arg1,Object arg2){
innerLog(Level.DEBUG,null,msg,arg0,arg1,arg2,null);
}
| Log a debug message. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:46.477 -0500",hash_original_method="7F43853CDED9232ACA3765709B5C5CC7",hash_generated_method="5C9DEEA3F7D329A789B5C65180A72B7C") private Im(){
}
| This utility class cannot be instantiated |
public IgniteTxOptimisticCheckedException(String msg,Throwable cause){
super(msg,cause);
}
| Creates new optimistic exception with given error message and optional nested exception. |
@Override public void initializeAfterLoading(){
super.initializeAfterLoading();
Utils.removeEmptyStringsFromList(tags);
Utils.removeEmptyStringsFromList(genres);
for ( String genre : new ArrayList<>(genres)) {
addGenre(MediaGenres.getGenre(genre));
}
if (movieSetId != null) {
movieSet=MovieList.get... | Initialize after loading. |
@Override public void writeMetadata(XDROutputBuffer xdr,IGangliaMetadataMessage decl){
}
| NOP. The metadata was sent with each metric message in this version of the protocol. |
public DOMXMLSignature(Element sigElem,XMLCryptoContext context,Provider provider) throws MarshalException {
localSigElem=sigElem;
ownerDoc=localSigElem.getOwnerDocument();
id=DOMUtils.getAttributeValue(localSigElem,"Id");
Element siElem=DOMUtils.getFirstChildElement(localSigElem,"SignedInfo");
si=new DOMSign... | Creates a <code>DOMXMLSignature</code> from XML. |
public static void load(){
Context gcon=Context.getGlobalContext();
Context.ContextSymbolEnumeration Enum=gcon.getContextSymbolEnumeration();
while (Enum.hasMoreElements()) {
SymbolNode sn=Enum.nextElement();
Data d=(Data)LevelData.get(sn.getName().toString());
if (d != null) {
OpDefNode opDef=(... | Set up level data for built-in operators using LevelData. |
public double predict_char_prob(String pre,int n){
if (n < 0 || n > predicted_chars) {
return 0;
}
if (pre.equals(" ")) {
pre="<w>";
}
String key=pre + n;
Double prob=context_prob.get(key);
if (prob != null) {
prob=Math.pow(10,prob);
}
return prob;
}
| Method which returns the probability of the nth most likely character, given a preceeding character (pre). Use in combination with the predict_char methods. |
public static boolean removeBeanOrFolder(String path){
return removePath(path.split(PATH_SEPARATOR),s_directory,0) > 0;
}
| Removes a bean or tree from the directory. |
private int nextChunk() throws IOException {
int available=super.available();
if (available <= 0) {
available=1;
}
if (available > inBuf.length) {
available=super.read(inBuf,0,inBuf.length);
}
else {
available=super.read(inBuf,0,available);
}
if (available < 0) {
if (finalized) {
re... | grab the next chunk of input from the underlying input stream |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:28:12.987 -0500",hash_original_method="F5040E07E9B927EF44F79345AA20F61D",hash_generated_method="8D33E80FC3E9A75B712A1E7DBCB79447") public DynamicLayout(CharSequence base,CharSequence display,TextPaint paint,int width,Alignment align,fl... | Make a layout for the transformed text (password transformation being the primary example of a transformation) that will be updated as the base text is changed. If ellipsize is non-null, the Layout will ellipsize the text down to ellipsizedWidth. |
public boolean equals(Object objectToCompare){
if (super.equals(objectToCompare)) return true;
if (objectToCompare instanceof Decimal) {
if (CoreUtils.nullSafeComparator(((Decimal)objectToCompare).getBigDecimalValue(),this.getBigDecimalValue()) == 0) return true;
}
return false;
}
| Method equals. |
public Boolean isAllowCreate(){
return allowCreate;
}
| Gets the value of the allowCreate property. |
protected String[] diff_halfMatch(String text1,String text2){
if (Diff_Timeout <= 0) {
return null;
}
String longtext=text1.length() > text2.length() ? text1 : text2;
String shorttext=text1.length() > text2.length() ? text2 : text1;
if (longtext.length() < 4 || shorttext.length() * 2 < longtext.length()) ... | Do the two texts share a substring which is at least half the length of the longer text? This speedup can produce non-minimal diffs. |
public static void normal(Vector3fc v0,Vector3fc v1,Vector3fc v2,Vector3f dest){
normal(v0.x(),v0.y(),v0.z(),v1.x(),v1.y(),v1.z(),v2.x(),v2.y(),v2.z(),dest);
}
| Calculate the normal of a surface defined by points <code>v1</code>, <code>v2</code> and <code>v3</code> and store it in <code>dest</code>. |
public void onExit(Context cx,boolean byThrow,Object resultOrException){
if (dim.breakOnReturn && !byThrow) {
dim.handleBreakpointHit(this,cx);
}
contextData.popFrame();
}
| Called when the stack frame has been left. |
private static int uariminGe(double value,double[] bv,int[] bvi,BinaryOperator bOp) throws DMLRuntimeException {
int ixMin=1;
if (value <= bv[0] || value > bv[bv.length - 1]) return ixMin;
int ix=Arrays.binarySearch(bv,value);
if (ix < 0) ix=Math.abs(ix) - 1;
ixMin=bvi[ix - 1] + 1;
return ixMin;
}
| Find out rowIndexMin for GreaterThanEqual operator. |
private void createACSComponent(Composite container){
Group acsGrp=new Group(container,SWT.SHADOW_ETCHED_IN);
GridLayout groupGridLayout=new GridLayout();
GridData groupGridData=new GridData();
groupGridData.grabExcessHorizontalSpace=true;
groupGridData.horizontalIndent=10;
groupGridData.verticalIndent=10;
... | Method creates ACS Authentication Endpoint component. |
public void push(final float value){
int bits=Float.floatToIntBits(value);
if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) {
mv.visitInsn(Opcodes.FCONST_0 + (int)value);
}
else {
mv.visitLdcInsn(new Float(value));
}
}
| Generates the instruction to push the given value on the stack. |
void __deleteDataList(List<GenericDataDB> dataDBList){
genericDataDao.deleteInTx(dataDBList);
log.debug(Thread.currentThread().toString() + "##__deleteDataList(dataDBList.size()=[" + dataDBList.size()+ "])");
}
| delete the data list |
private boolean hasSimiliarMapping(final String fontName){
final Set<String> keySet=fontMappings.keySet();
final Set<String> candidates=new HashSet<String>();
for ( final String key : keySet) {
final String lcKey=key.toLowerCase();
final String lcFont=fontName.toLowerCase();
if (lcKey.equals(lcFont))... | Search mappings for a one that sounds close. |
public void combine(AnalysisResult<A,S> other){
for ( Entry<Node,A> e : other.nodeValues.entrySet()) {
nodeValues.put(e.getKey(),e.getValue());
}
for ( Entry<Tree,Node> e : other.treeLookup.entrySet()) {
treeLookup.put(e.getKey(),e.getValue());
}
for ( Entry<Block,TransferInput<A,S>> e : other.stor... | Combine with another analysis result. |
public static void addDirToClasspath(File directory) throws IOException {
if (directory.exists()) {
File[] files=directory.listFiles();
for (int i=0; i < files.length; i++) {
File file=files[i];
addURL(file.toURI().toURL());
}
}
else {
System.err.println("The directory \"" + directory +... | Adds the jars in the given directory to classpath |
public void centerOn(@NonNull View source){
centerOn=source;
}
| Center the reveal or conceal on this view. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.