code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
protected FormalParameterImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override public void processSubToken(String subtok){
if (skey.isEmpty()) {
skey=subtok;
}
else if (sval.isEmpty()) {
sval=subtok;
}
}
| first subtoken is the key, the next is the val. No error is flagged for third token as yet. |
Region(int start,int end){
this.start=start;
this.end=end;
updateAvailable();
}
| Creates a region containing the given range of values (inclusive). |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-24 14:42:09.085 -0500",hash_original_method="7CD774B1E9CE336DC45F8F4C393FF983",hash_generated_method="FD20BB14DD5208672DF9D0E4314121FC") @DSVerified @DSSafe(DSCat.SAFE_LIST) public IdentityHashMap(int maxSize){
super();
super.requestCapa... | Creates an IdentityHashMap with the specified maximum size parameter. |
public boolean isMustCoerce(){
return isMustCoerce;
}
| Returns true if numeric coercion is required, or false if not |
public void runTest() throws Throwable {
Document doc;
Element root;
NodeList elementList;
Node firstChild;
NodeList textList;
CharacterData textNode;
String data;
doc=(Document)load("staff",false);
root=doc.getDocumentElement();
root.normalize();
elementList=root.getElementsByTagName("name");
f... | Runs the test case. |
private void logSlowRequests(long requestLifetime,Request<?> request,byte[] responseContents,StatusLine statusLine){
if (DEBUG || requestLifetime > SLOW_REQUEST_THRESHOLD_MS) {
VolleyLog.d("HTTP response for request=<%s> [lifetime=%d], [size=%s], " + "[rc=%d], [retryCount=%s]",request,requestLifetime,responseCont... | Logs requests that took over SLOW_REQUEST_THRESHOLD_MS to complete. |
public static AuthToken custom(String principal,String credentials,String realm,String scheme){
return new InternalAuthToken(parameters("scheme",scheme,"principal",principal,"credentials",credentials,"realm",realm).asMap(Values.ofValue()));
}
| A custom authentication token used for doing custom authentication on the server side. |
@Override public String toString(){
return toString(false);
}
| Converts this offset to its ISO string representation using "basic" format. |
public void updateBoolean(int columnIndex,boolean x) throws SQLException {
checkUpdatable();
getField(columnIndex).setBoolean(x);
}
| Updates the designated column with a <code>boolean</code> value. The <code>updateXXX</code> methods are used to update column values in the current row or the insert row. The <code>updateXXX</code> methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are c... |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:33.797 -0500",hash_original_method="2C829A46E677D5FF63843A6B74A54E87",hash_generated_method="E70428BC7F81D405D012426240F6C46E") private long jitterize(long minValue,long maxV... | Return a random value v that satisfies minValue <= v < maxValue. The difference between maxValue and minValue must be less than Integer.MAX_VALUE. |
public void addSequence(final Array datum,final Array weights){
QL.require(datum.size() == weights.size(),INCOMPATIBLE_ARRAY_SIZES);
for (int i=0; i < datum.size(); i++) {
add(datum.get(i),weights.get(i));
}
}
| adds a sequence of data to the set, each with its weight |
public static Decimal negativeZero(int scale,MathContext mc){
return new NegativeZero(scale,mc);
}
| Returns a negative-zero decimal value, with the given number of significant digits (zeros) and given context. |
private static void swap(int[] x,int a,int b){
int t=x[a];
x[a]=x[b];
x[b]=t;
}
| Swaps x[a] with x[b]. |
public boolean isUnconfirmed(){
return UNKNOWN_ID.equals(getId());
}
| Indicates that the message hasn't been confirmed by the server. This is generally when the message has been sent, but a confirmation has not yet been received form the server. |
public ArithmeticCondition(String cond){
String value;
int multiplier=1;
if (cond.length() < 2) {
throw new SettingsError("Invalid condition \"" + cond + "\"");
}
operator=cond.charAt(0);
value=cond.substring(1);
if (value.endsWith("k")) {
multiplier=1000;
}
else if (value.endsWith("M")) {
... | Creates a new condition based on the given string. |
private boolean isAnyCall(final List<INaviInstruction> instructions,final Set<INaviInstruction> calls){
for ( final INaviInstruction naviInstruction : instructions) {
if (calls.contains(naviInstruction)) {
return true;
}
}
return false;
}
| Determines whether any of the given instructions is a function call. |
public ToggleLineNumbersAction(Application app,View view){
super(app,view);
labels.configureAction(this,ID);
setPropertyName("lineNumbersVisible");
}
| Creates a new instance. |
public void pick(MotionEvent event){
this.pickedObject=null;
PickedObjectList pickList=getWorldWindow().pick(event.getX(),event.getY());
PickedObject topPickedObject=pickList.topPickedObject();
if (topPickedObject != null) {
this.pickedObject=topPickedObject.getUserObject();
}
}
| Performs a pick at the tap location. |
public static void storagePortsJson(String id){
List<StoragePortInfo> items=Lists.newArrayList();
CachedResources<StorageSystemRestRep> storageSystems=StorageSystemUtils.createCache();
List<StoragePortRestRep> storagePorts=StoragePortUtils.getStoragePortsByVirtualArray(uri(id));
Map<URI,String> networks=Network... | Renders the list of storage ports for a given virtual array as JSON. |
final V putVal(int hash,K key,V value,boolean onlyIfAbsent,boolean evict){
Node<K,V>[] tab;
Node<K,V> p;
int n, i;
if ((tab=table) == null || (n=tab.length) == 0) n=(tab=resize()).length;
if ((p=tab[i=(n - 1) & hash]) == null) tab[i]=newNode(hash,key,value,null);
else {
Node<K,V> e;
K k;
if (... | Implements Map.put and related methods |
public ComputeCooccurrenceMatrixPairs(){
}
| Creates an instance of this tool. |
protected boolean doPrompt(){
return true;
}
| Provide a subclass-specific method to handle the request to fix the problem. This is a dummy implementation, intended to be overloaded. |
public boolean rowDeleted() throws SQLException {
throw new UnsupportedOperationException();
}
| Indicates whether the current row has been deleted. A deleted row may leave a visible "hole" in a rowset. This method can be used to detect such holes if the rowset can detect deletions. This method will always return <code>false</code> if this rowset cannot detect deletions. |
@Override public void writeByteStream(InputStream is) throws IOException {
while (true) {
int len=SIZE - _offset - 3;
if (len < 16) {
flushBuffer();
len=SIZE - _offset - 3;
}
len=is.read(_buffer,_offset + 3,len);
if (len <= 0) {
_buffer[_offset++]=BC_BINARY_DIRECT;
return;
... | Writes a full output stream. |
private boolean journalRebuildRequired(){
final int redundantOpCompactThreshold=2000;
return redundantOpCount >= redundantOpCompactThreshold && redundantOpCount >= lruEntries.size();
}
| We only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 ops. |
public void update(boolean simulateConnections){
if (!isRadioActive()) {
tearDownAllConnections();
return;
}
if (simulateConnections) {
for ( NetworkInterface i : net) {
i.update();
}
}
this.router.update();
}
| Updates node's network layer and router. |
public static Document createXMLTable(AxSf axsf,AxSfQueryResults queryResults,Locale locale,Integer autoDist,Integer distPerm,boolean canModify,boolean canOpenReg,String caseSensitive,String orderByTable,FieldFormat fieldFormat){
String data=axsf.getFormat().getData();
TableFormat tableFormat=new TableFormat(data);... | Public methods |
private void addAcquisitionLinks(Book book,Element entry){
if (!currentProfile.getGenerateOpdsDownloads()) {
if (logger.isTraceEnabled()) logger.trace("addAcquisitionLinks: exit: download links suppressed");
return;
}
if (logger.isTraceEnabled()) logger.trace("addAcquisitionLinks: links to the ebook... | Add the aquisition links These are used to specify where a book can be downloaded from. They will not be needed if generation of download links is suppressed. |
public void login(Account account){
loggedAccount=account;
}
| Perform login using an Account object to be used as logged Account during the application lifecycle. |
public int size(){
return eventQueue.size();
}
| Returns the current queue size. |
@Deprecated public static CallSite bootstrapCurrentSafe(Lookup caller,String name,MethodType type){
return realBootstrap(caller,name,CALL_TYPES.METHOD.ordinal(),type,true,true,false);
}
| bootstrap method for method calls with "this" as receiver safe |
static public Automaton repeat(Automaton a,int min,int max){
if (min > max) {
return Automata.makeEmpty();
}
Automaton b;
if (min == 0) {
b=Automata.makeEmptyString();
}
else if (min == 1) {
b=new Automaton();
b.copy(a);
}
else {
List<Automaton> as=new ArrayList<>();
for (int i=0... | Returns an automaton that accepts between <code>min</code> and <code>max</code> (including both) concatenated repetitions of the language of the given automaton. <p> Complexity: linear in number of states and in <code>min</code> and <code>max</code>. |
private void testManyEvents(int nodes) throws Throwable {
createServers(nodes);
CopycatClient client=createClient();
client.onEvent("test",null);
for (int i=0; i < 10; i++) {
client.submit(new TestEvent(true)).thenAccept(null);
await(30000,2);
}
}
| Tests submitting a linearizable event that publishes to all sessions. |
public static void addWhitelistedBlock(Block block){
whitelist.add(block);
}
| Add a block to the whitelist. |
public LoggingFraction fileHandler(String name,String path,Level level,String formatter){
Map<Object,Object> fileProperties=new HashMap<>();
fileProperties.put("path",path);
fileProperties.put("relative-to","jboss.server.log.dir");
fileHandler(new FileHandler(name).level(level).formatter(formatter).file(filePro... | Add a FileHandler to the list of handlers for this logger |
public RandomizedCollection(){
list=new ArrayList<Integer>();
r=new Random();
}
| Initialize your data structure here. |
public JSONArray(String source) throws JSONException {
this(new JSONTokener(source));
}
| Construct a JSONArray from a source JSON text. |
public void disabledPeriodic(){
if (dpFirstRun) {
System.out.println("NerdyIterativeRobot IterativeRobot.disabledPeriodic() method... Overload me!");
dpFirstRun=false;
}
Timer.delay(0.001);
}
| Periodic code for disabled mode should go here. Users should override this method for code which will be called periodically at a regular rate while the robot is in disabled mode. |
public final void shiftColumnDown(int row,int col,int numRowsShifted){
if (row >= getNumRows() || col >= getNumColumns()) {
throw new IllegalArgumentException("Out of range: row = " + row + " col = "+ col);
}
int lastRow=-1;
for (int i=getNumRows() - 1; i >= row; i--) {
if (dataBox.get(i,col) != null) ... | Shifts the given column |
public void emitDirect(int taskId,String streamId,Tuple anchor,List<Object> tuple){
emitDirect(taskId,streamId,Arrays.asList(anchor),tuple);
}
| Emits a tuple directly to the specified task id on the specified stream. If the target bolt does not subscribe to this bolt using a direct grouping, the tuple will not be sent. If the specified output stream is not declared as direct, or the target bolt subscribes with a non-direct grouping, an error will occur at runt... |
@PUT @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("/{id}/endpoints") @CheckPermission(roles={Role.SYSTEM_ADMIN,Role.RESTRICTED_SYSTEM_ADMIN}) @Deprecated public NetworkRestRep updateNetworkEndpoints(@PathParam("id") URI id,Netw... | Add or remove end-point(s) to network. <p> For fiber channel, some Networks may be automatically created by discovering Network Systems. These Networks will have endpoints that were discovered by a Network System, including endpoints that represent host initiator port WWNs as well as end points that represent storage a... |
@Override public boolean containsKey(final Object k){
if (!(k instanceof byte[])) return false;
assert k != null;
if (this.cache == null) return false;
final byte[] key=normalizeKey((byte[])k);
boolean h;
synchronized (this) {
h=this.cache.containsKey(key) || this.blob.containsKey(key);
}
return h... | check if a specific key is in the database |
public static void begin(ServletRequest request,ServletResponse response,String serviceName,String objectId) throws ServletException {
ServiceContext context=(ServiceContext)_localContext.get();
if (context == null) {
context=new ServiceContext();
_localContext.set(context);
}
context._request=request;
... | Sets the request object prior to calling the service's method. |
public School beginDate(SafeCalendar beginDate){
this.beginDate=beginDate;
return this;
}
| Sets the start date. |
public final void yybegin(int newState){
zzLexicalState=newState;
}
| Enters a new lexical state |
public double evaluateClustering(Database db,Relation<O> rel,Clustering<?> cl){
final DistanceQuery<O> dq=rel.getDistanceQuery(distanceFunction);
List<? extends Cluster<?>> clusters=cl.getAllClusters();
final int numc=clusters.size();
@SuppressWarnings("unchecked") final Relation<? extends SpatialComparable> vr... | Evaluate a single clustering. |
public JCMethodDecl MethodDef(MethodSymbol m,JCBlock body){
return MethodDef(m,m.type,body);
}
| Create a method definition from a method symbol and a method body. |
public static FormatDateTimeFormatter forPattern(String input,Locale locale){
if (Strings.hasLength(input)) {
input=input.trim();
}
if (input == null || input.length() == 0) {
throw new IllegalArgumentException("No date pattern provided");
}
DateTimeFormatter formatter;
if ("basicDate".equals(input)... | Parses a joda based pattern, including some named ones (similar to the built in Joda ISO ones). |
private void initializeLastNameEditText(){
lastNameEditText=(EditText)findViewById(R.id.last_name_edit_text);
lastNameEditText.addValidator(Validators.minLength(this,R.string.min_length_validator_error_message,MIN_NAME_LENGTH));
lastNameEditText.addValidator(Validators.beginsWithUppercaseLetter(this,R.string.begi... | Initializes the edit text, which allows to enter a last name. |
protected double estimateEigenvalue(double[][] mat,double[] in){
double de=0., di=0.;
for (int d1=0; d1 < in.length; d1++) {
final double[] row=mat[d1];
double t=0.;
for (int d2=0; d2 < in.length; d2++) {
t+=row[d2] * in[d2];
}
final double s=in[d1];
de+=t * s;
di+=s * s;
}
ret... | Estimate the (singed!) Eigenvalue for a particular vector. |
@SuppressWarnings("unchecked") @Override public void write(BinaryRawWriterEx writer,Object obj,Throwable err){
Collection<EventAdapter> events=(Collection<EventAdapter>)obj;
writer.writeInt(events.size());
for ( EventAdapter e : events) platformCtx.writeEvent(writer,e);
}
| <inheritDoc /> |
private void onTrigger4(){
final CharSequence targetName=mAppsAdapter.getLabel(TARGET_POSITION);
addInstruction(R.string.accessibility_tutorial_lesson_1_text_5,true,targetName);
mAllApps.setAccessibilityDelegate(mTargetIconLoseFocusDelegate);
mAllApps.setOnItemClickListener(mTargetIconClickListener);
}
| Triggered when the target application icon receives accessibility focus. |
public static void init(long max,long minorTick,long majorTick){
maxVal=max;
minorTickVal=(long)Math.ceil(max / 100.0 * minorTick);
majorTickVal=(long)Math.ceil(max / 100.0 * majorTick);
counter=new AtomicLong(0);
System.out.print("\tProgress: 0%");
}
| Initializes the progress logger. |
public void addFconst(float f){
if (f == 0.0f || f == 1.0f || f == 2.0f) addOpcode(11 + (int)f);
else addLdc(constPool.addFloatInfo(f));
}
| Appends FCONST or FCONST_<n> |
public void uninstall(StatusListener listener){
logger.debug("Uninstalling the Data Hub from MarkLogic");
AppConfig config=getAppConfig();
HubAppDeployer deployer=new HubAppDeployer(client,adminManager,listener);
deployer.setCommands(getCommands(config));
deployer.undeploy(config);
}
| Uninstalls the data hub configuration and server-side modules from MarkLogic |
public static void main(String... a) throws Exception {
TestBase test=TestBase.createCaller().init();
test.test();
}
| Run just this test. |
public void clearPoints(){
synchronized (locations) {
locations.clear();
pendingLocations.clear();
}
}
| Clears the locations. |
public final AssertSubscriber<T> requestedFusionMode(int requestMode){
this.requestedFusionMode=requestMode;
return this;
}
| Setup what fusion mode should be requested from the incomining Subscription if it happens to be QueueSubscription |
private static BigInteger toUnsignedBigInteger(long i){
if (i >= 0L) {
return BigInteger.valueOf(i);
}
else {
int upper=(int)(i >>> 32);
int lower=(int)i;
return (BigInteger.valueOf(Integers.toUnsignedLong(upper))).shiftLeft(32).add(BigInteger.valueOf(Integers.toUnsignedLong(lower)));
}
}
| Return a BigInteger equal to the unsigned value of the argument. |
private FilterExpression buildIsNullOperator(List<Predicate.PathElement> path,List<String> arguments){
Operator elideOP;
try {
boolean argBool=(boolean)CoerceUtil.coerce(arguments.get(0),boolean.class);
if (argBool) {
elideOP=Operator.ISNULL;
}
else {
elideOP=Operator.NOTNULL;
}
ret... | Returns Predicate for '=isnull=' case depending on its arguments. NOTE: Filter Expression builder specially for '=isnull=' case. |
public String toString(){
String[] theTable=getStringTable();
int theIndex=value - getOffset();
return theTable != null && theIndex >= 0 && theIndex < theTable.length ? theTable[theIndex] : Integer.toString(value);
}
| Returns a string value corresponding to this enumeration value. |
public final TextBuilder append(boolean b){
return b ? append("true") : append("false");
}
| Appends the textual representation of the specified <code>boolean</code> argument. |
public String docType(Properties ctx,int WindowNo,GridTab mTab,GridField mField,Object value){
Integer C_DocType_ID=(Integer)value;
if (C_DocType_ID == null || C_DocType_ID.intValue() == 0) return "";
String sql="SELECT d.DocBaseType, d.IsDocNoControlled, s.CurrentNext, " + "s.AD_Sequence_ID, s.StartNewYear, s.... | InOut - DocType. - sets MovementType - gets DocNo |
protected Double wrap(double k){
return new Double(k);
}
| Wraps a value |
public static void recordAction(int action){
assert action >= 0;
assert action < NUM_ACTIONS;
switch (action) {
case ACTION_OPENED_MOST_VISITED_ENTRY:
RecordUserAction.record("MobileNTPMostVisited");
break;
case ACTION_OPENED_RECENTLY_CLOSED_ENTRY:
RecordUserAction.record("MobileNTPRecentlyClosed");
break;
ca... | Records an action taken by the user on the NTP. |
public CarouselImageView(Context context,AttributeSet attrs){
this(context,attrs,0);
}
| Instantiates a new carousel image view. |
public boolean isContainedWithin(UUIDSet other){
if (other == null) return false;
if (!this.getUUID().equalsIgnoreCase(other.getUUID())) {
return false;
}
if (this.intervals.isEmpty()) return true;
if (other.intervals.isEmpty()) return false;
assert this.intervals.size() > 0;
assert other.interv... | Determine if the set of transaction numbers from this server is completely within the set of transaction numbers from the set of transaction numbers in the supplied set. |
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
doGet(request,response);
}
| The doPost method of the servlet. <br> This method is called when a form has its tag value method equals to post. |
public void addObservations(double[][] source,double[][] destination,double[][] destinationPast) throws Exception {
if (destinationPast.length != destination.length) {
throw new Exception(String.format("Destination past and destination lengths (%d and %d) must match!",destinationPast.length,destination.length));
... | Add observations of the joint source and destinations |
public SolarisNumericUserPrincipal(long name){
this.name=(new Long(name)).toString();
}
| Create a <code>SolarisNumericUserPrincipal</code> using a long representation of the user's identification number (UID). <p> |
@SuppressWarnings("unchecked") public Iterable<TClassifier> createTClassifierIterableFromString(EDataType eDataType,String initialValue){
return (Iterable<TClassifier>)super.createFromString(initialValue);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
protected List<BeanPropertyWriter> filterBeanProperties(SerializationConfig config,BasicBeanDescription beanDesc,List<BeanPropertyWriter> props){
AnnotationIntrospector intr=config.getAnnotationIntrospector();
AnnotatedClass ac=beanDesc.getClassInfo();
String[] ignored=intr.findPropertiesToIgnore(ac);
if (ignor... | Overridable method that can filter out properties. Default implementation checks annotations class may have. |
public static String scdnl(){
return scdnl;
}
| Returns a semicolon followed by two new lines character as defined by the <code>nl(String)</code> function. |
private void zzScanError(int errorCode){
String message;
try {
message=ZZ_ERROR_MSG[errorCode];
}
catch ( ArrayIndexOutOfBoundsException e) {
message=ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
}
throw new Error(message);
}
| Reports an error that occured while scanning. In a wellformed scanner (no or only correct usage of yypushback(int) and a match-all fallback rule) this method will only be called with things that "Can't Possibly Happen". If this method is called, something is seriously wrong (e.g. a JFlex bug producing a faulty scanner ... |
public boolean on_fly_cg(){
return soot.PhaseOptions.getBoolean(options,"on-fly-cg");
}
| On Fly Call Graph -- Build call graph as receiver types become known. When this option is set to true, the call graph is computed on-the-fly as points-to information is computed. Otherwise, an initial CHA approximation to the call graph is used. |
static <T,R1,R>AnyMValue<R> each2(final MonadicValue<? extends T> monadicValue,final Function<? super T,? extends MonadicValue<R1>> value2,final BiFunction<? super T,? super R1,Boolean> filterFunction,final BiFunction<? super T,? super R1,? extends R> yieldingFunction){
return AnyM.ofValue(For.iterable(monadicValue).... | Perform a two level nested internal iteration over the provided MonadicValues |
public CurrencyException(){
}
| Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized. |
@Override public void eUnset(int featureID){
switch (featureID) {
case GamlPackage.SSPECIES__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public Macro(File file) throws EOFException, FileNotFoundException, IOException {
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
DocumentBuilder db=null;
Document doc=null;
try {
db=dbf.newDocumentBuilder();
InputSource is=new InputSource(new UnicodeReader(new FileInputStream(file),FIL... | Loads a macro from a file on disk. |
public void addAllListeners(PropertyChangeListener listener,Object newObject,Set updateSet){
addListeners(listener,newObject,updateSet);
if ((children != null) && (children.length > 0)) {
try {
Object newValue=null;
if (newObject != null) {
updateSet.add(newObject);
newValue=extractN... | Adds all the listeners to the objects in the bind path. This assumes that we are not added as listeners to any of them, hence it is not idempotent. |
@Override protected boolean isPrepared(final Player player){
if (player.isEquipped("flask")) {
return true;
}
else {
player.sendPrivateText("You need a flask to fill some water up.");
return false;
}
}
| Decides if the activity can be done. |
public PrintOptions(JSONObject configOpts,PrintOutput output){
if (configOpts == null) {
return;
}
if (!configOpts.isNull("altPrinting")) {
try {
rawOptions.altPrinting=configOpts.getBoolean("altPrinting");
}
catch ( JSONException e) {
warn("boolean","altPrinting",configOpts.opt("altPr... | Parses the provided JSON Object into relevant Pixel and Raw options |
public void testReceive_UnconnectedBufEmpty() throws Exception {
this.channel1.configureBlocking(false);
assertFalse(this.channel1.isConnected());
ByteBuffer dst=ByteBuffer.allocateDirect(CAPACITY_NORMAL);
assertNull(this.channel1.receive(dst));
}
| Test method for 'DatagramChannelImpl.receive(ByteBuffer)' |
public static int[] add(int[] input1,int[] input2) throws Exception {
if (input1.length != input2.length) {
throw new Exception("Lengths of arrays are not equal");
}
int[] returnValues=new int[input1.length];
for (int i=0; i < returnValues.length; i++) {
returnValues[i]=input1[i] + input2[i];
}
retu... | Adds two arrays together |
protected Caret createCaret(){
return new WindowsTextUI.WindowsCaret();
}
| Creates the object to use for a caret. By default an instance of WindowsCaret is created. This method can be redefined to provide something else that implements the InputPosition interface or a subclass of DefaultCaret. |
public void persistTradingday(final Tradingday transientInstance) throws PersistentModelException {
try {
m_tradingdayHome.persist(transientInstance);
}
catch ( OptimisticLockException ex1) {
throw new PersistentModelException("Error saving Tradingday please refresh before save.");
}
catch ( Exception ... | Method persistTradingday. |
MysqlParameterMetadata(int count){
this.parameterCount=count;
this.returnSimpleMetadata=true;
}
| Used for "fake" basic metadata for client-side prepared statements when we don't know the parameter types. |
@CalledOnlyBy(AmidstThread.FRAGMENT_LOADER) public boolean update(Dimension dimension){
boolean isEnabled=calculateIsEnabled(dimension,enableAllLayersSetting.get());
boolean isVisible=isEnabled && isVisibleSetting.get();
boolean reload=isVisible == true && this.isVisible == false;
this.isVisible=isVisible;
re... | Updates the isVisible and isEnabled fields to the current setting values. Returns whether the layer becomes visible. |
public final boolean readBoolean() throws java.io.IOException {
int temp=in.read();
if (temp < 0) {
throw new EOFException();
}
return temp != 0;
}
| See the general contract of the readBoolean method of DataInput. Bytes for this operation are read from the contained input stream. |
public DailyTimeIntervalScheduleBuilder startingDailyAt(TimeOfDay timeOfDay){
if (timeOfDay == null) throw new IllegalArgumentException("Start time of day cannot be null!");
this.startTimeOfDay=timeOfDay;
return this;
}
| Set the trigger to begin firing each day at the given time. |
public Class toClass() throws CannotCompileException {
return getClassPool().toClass(this);
}
| Converts this class to a <code>java.lang.Class</code> object. Once this method is called, further modifications are not allowed any more. To load the class, this method uses the context class loader of the current thread. If the program is running on some application server, the context class loader might be inappropr... |
public Builder maxCheckPointCount(int maxCheckPointCount){
this.maxCheckPointCount=maxCheckPointCount;
return this;
}
| Sets the largest increment the subscription will checkpoint. If this value is reached the subscription will immediately write a checkpoint. As such this value should normally be reasonably large so as not to cause too many writes to occur in the subscription. <p> It is important to tweak checkpointing for high performa... |
@Override public boolean dragTo(String obj,Selector destObj,int steps) throws UiObjectNotFoundException, NotImplementedException {
return dragTo(getUiObject(obj),destObj,steps);
}
| Drags this object to a destination UiObject. The number of steps specified in your input parameter can influence the drag speed, and varying speeds may impact the results. Consider evaluating different speeds when using this method in your tests. |
public static Uri scaleDownBitmapForUri(Context ctx,Uri uri,int newHeight) throws FileNotFoundException, IOException {
if (uri == null) throw new NullPointerException(ERROR_URI_NULL);
if (!MediaUtils.isMediaContentUri(uri)) return null;
Bitmap original=Media.getBitmap(ctx.getContentResolver(),uri);
Bitmap b... | Scales the image independently of the screen density of the device. Maintains image aspect ratio. |
public Vec2 mix(Vec2 vector,double weight){
if (vector == null) {
throw new IllegalArgumentException(Logger.logMessage(Logger.ERROR,"Vec2","mix","missingVector"));
}
double w0=1 - weight;
double w1=weight;
this.x=this.x * w0 + vector.x * w1;
this.y=this.y * w0 + vector.y * w1;
return this;
}
| Mixes (interpolates) a specified vector with this vector, modifying this vector. |
public DefaultTableCellRenderer(){
super();
setOpaque(true);
setBorder(getNoFocusBorder());
setName("Table.cellRenderer");
}
| Creates a default table cell renderer. |
private void drop(ItemStack itemStack){
getPlayer().getWorld().dropItem(getPlayer().getLocation(),itemStack);
}
| Drops an Item. |
public static String findCNBForClass(@Nonnull Class<?> cls){
String absolutePath;
absolutePath=cls.getName().replaceFirst("(^|\\.)[^.]+$","");
return absolutePath.replace('.','-');
}
| Returns the name of the package for the class in a format that is treated as a single token. |
public void clearBatch() throws SQLException {
synchronized (checkClosed().getConnectionMutex()) {
if (this.batchedArgs != null) {
this.batchedArgs.clear();
}
}
}
| JDBC 2.0 Make the set of commands in the current batch empty. This method is optional. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.