code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void updateAsciiStream(String columnLabel,java.io.InputStream x,long length) throws SQLException {
throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString());
}
| Updates the designated column with an ascii stream value, which will have the specified number of bytes.. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> me... |
public void addField(String name,Object value,float boost){
SolrInputField field=_fields.get(name);
if (field == null || field.value == null) {
setField(name,value,boost);
}
else {
field.addValue(value,boost);
}
}
| Adds a field with the given name, value and boost. If a field with the name already exists, then the given value is appended to the value of that field, with the new boost. If the value is a collection, then each of its values will be added to the field. The class type of value and the name parameter should match sche... |
public void read(org.apache.thrift.protocol.TProtocol iprot,Task struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true) {
schemeField=iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
b... | Description: <br> |
private StoragePort findExistingPort(String portGuid,DbClient dbClient){
URIQueryResultList results=new URIQueryResultList();
StoragePort port=null;
dbClient.queryByConstraint(AlternateIdConstraint.Factory.getStoragePortByNativeGuidConstraint(portGuid),results);
Iterator<URI> iter=results.iterator();
while (i... | Find the port for given portGuid |
@Override public void run(int connId,String[] args){
int countbad=0;
for ( Entity entity : server.getGame().getEntitiesVector()) {
if (entity.fixElevation()) {
Building bldg=server.getGame().getBoard().getBuildingAt(entity.getPosition());
if (bldg != null) {
server.checkForCollapse(bldg,ser... | Run this command with the arguments supplied |
public static Mapping<String> text(Constraint... constraints){
return new FieldMapping(InputMode.SINGLE,mkSimpleConverter(Function.identity()),new MappingMeta("string",String.class)).constraint(constraints);
}
| (convert to String) mapping |
public void testBitLengthNegative1(){
byte aBytes[]={12,56,100,-2,-76,89,45,91,3,-15,35,26,3,91};
int aSign=-1;
BigInteger aNumber=new BigInteger(aSign,aBytes);
assertEquals(108,aNumber.bitLength());
}
| bitLength() of a negative number. |
ServerSessionContext resendEvents(long index){
clearEvents(index);
for ( EventHolder event : events) {
sendEvent(event);
}
return this;
}
| Resends events from the given sequence. |
public boolean isTaxIncluded(){
Object oo=get_Value(COLUMNNAME_IsTaxIncluded);
if (oo != null) {
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
| Get Price includes Tax. |
public static int tileXToX(int tx,int tileGridXOffset,int tileWidth){
return tx * tileWidth + tileGridXOffset;
}
| Converts a horizontal tile index into the X coordinate of its upper left pixel relative to a given tile grid layout specified by its X offset and tile width. |
@Deprecated public static GridAbsClosure noop(){
return NOOP;
}
| Creates an absolute (no-arg) closure that does nothing. |
private void showFeedback(String message){
if (myHost != null) {
myHost.showFeedback(message);
}
else {
System.out.println(message);
}
}
| Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface. |
public IntStream filterNot(final IntPredicate predicate){
return filter(IntPredicate.Util.negate(predicate));
}
| Returns a stream consisting of the elements of this stream that don't match the given predicate. <p> This is an intermediate operation. |
public Map<String,String> removeZonesStrategy(WBEMClient client,List<Zone> zones,String fabricId,String fabricWwn,boolean activateZones) throws NetworkDeviceControllerException {
long start=System.currentTimeMillis();
Map<String,String> removedZoneResults=new HashMap<String,String>();
CIMInstance zoneServiceIns=n... | This function removed one or more zones from the active zoneset. This function will not error if a zone to be removed was not found. <p> Removing zones typical flow is: <ol> <li>find the zones that can be deleted</li> <li>get the session lock</li> <li>delete the zones</li> <li>commit which releases the lock</li> <li>ac... |
@Override public boolean isCellEditable(int rowIndex,int columnIndex){
if (!isInitialized()) return false;
else return getUnsortedModel().isCellEditable(getActualRow(rowIndex),columnIndex);
}
| Returns true if the cell at rowIndex and columnIndex is editable. |
public boolean isDuplex(){
return duplex;
}
| Gets the value of the duplex property. |
public void attributeAsClass(){
ArffSortedTableModel model;
if (m_CurrentCol == -1) {
return;
}
model=(ArffSortedTableModel)m_TableArff.getModel();
if (model.getAttributeAt(m_CurrentCol) == null) {
return;
}
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
model.attributeAsClassAt(m_Cu... | sets the current attribute as class attribute, i.e. it moves it to the end of the attributes |
public void loadAndInit(String configStr){
config=loadDataConfig(new InputSource(new StringReader(configStr)));
}
| Used by tests |
public final Message obtainMessage(int what,Object obj){
return Message.obtain(mSmHandler,what,obj);
}
| Get a message and set Message.target state machine handler, what and obj. Note: The handler can be null if the state machine has quit, which means target will be null and may cause a AndroidRuntimeException in MessageQueue#enqueMessage if sent directly or if sent using StateMachine#sendMessage the message will just be ... |
public TerminalPosition withRow(int row){
if (row == 0 && this.column == 0) {
return TOP_LEFT_CORNER;
}
return new TerminalPosition(this.column,row);
}
| Creates a new TerminalPosition object representing a position with the same column index as this but with a supplied row index. |
public void clean(){
if (getEntityType().equals("D") && getStatusCode().equals(MMigration.STATUSCODE_Applied)) {
log.log(Level.CONFIG,"Cleaning migration: " + this.toString());
this.setProcessed(true);
for ( MMigrationStep step : getSteps(false)) {
log.log(Level.CONFIG," Deleting step: " + step... | Clean the migration of data. Only the header will be left. The migration should be applied and have the entity type for Dictionary 'D'. Steps and Step data will be deleted and the migration marked as "processed". The goal is to leave a record of the applied migration but reduce the database size. |
@SuppressWarnings("WeakerAccess") public static AWTTerminalFontConfiguration newInstance(Font... fontsInOrderOfPriority){
return new AWTTerminalFontConfiguration(true,BoldMode.EVERYTHING_BUT_SYMBOLS,fontsInOrderOfPriority);
}
| Creates a new font configuration from a list of fonts in order of priority. This works by having the terminal attempt to draw each character with the fonts in the order they are specified in and stop once we find a font that can actually draw the character. For ASCII characters, it's very likely that the first font wil... |
@AfterClass public static void tearDownAfterClass() throws Exception {
}
| Method tearDownAfterClass. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:49.467 -0400",hash_original_method="FE5F2D56D7E3E4B2BC0C9F62A9CCE451",hash_generated_method="002098531688D57D20DFE7C9587694C6") private boolean conditionCH1(String value,int index){
return ((contains(value,0,4,"VAN ","VON ") || co... | Complex condition 1 for 'CH' |
private void localizeTimestamp(HttpServerRequest request,String header){
String timestamp=request.headers().get(header);
if (timestamp != null && timestamp.toUpperCase().endsWith("Z")) {
try {
DateTime dt=isoDateTimeParser.parseDateTime(timestamp);
request.headers().set(header,dfISO8601.print(dt));
... | Transform a timestamp header to local time timestamp header it is UTC. If the header is absent or not parsable, do nothing. |
public AnchorHandlerFX(String id){
super(id,false,false,false,false);
}
| Creates a new instance. |
static private String INT_Max_Plus(){
long tempValue=Integer.MAX_VALUE + 1;
return String.valueOf(tempValue);
}
| Get the max value plus one for an int |
protected ColumnPreferenceHandler createDefaultColumnPreferencesHandler(){
return new SearchColumnPreferenceHandler(TABLE);
}
| Creates the specialized column preference handler for search columns. |
protected final int returnNode(final int node){
_position++;
return node;
}
| Do any final cleanup that is required before returning the node that was passed in, and then return it. The intended use is <br /> <code>return returnNode(node);</code> %REVIEW% If we're calling it purely for side effects, should we really be bothering with a return value? Something like <br /> <code> accept(node); ret... |
public UnsolicitedNotificationEvent(Object src,UnsolicitedNotification notice){
super(src);
this.notice=notice;
}
| Constructs a new instance of <tt>UnsolicitedNotificationEvent</tt>. |
public static File findFileUnderCommunityHome(String relativePath){
File file=new File(getCommunityHomePath(),toSystemDependentName(relativePath));
if (!file.exists()) {
throw new IllegalArgumentException("Cannot find file '" + relativePath + "' under '"+ getCommunityHomePath()+ "' directory");
}
return fil... | Find file by its path relative to 'community' directory irrespective of current project |
private boolean isAutoCommitNonDefaultOnServer() throws SQLException {
boolean overrideDefaultAutocommit=false;
String initConnectValue=this.serverVariables.get("init_connect");
if (versionMeetsMinimum(4,1,2) && initConnectValue != null && initConnectValue.length() > 0) {
if (!getElideSetAutoCommits()) {
... | Has the default autocommit value of 0 been changed on the server via init_connect? |
private boolean checkInterface(@Nonnull ClassProto other){
boolean isResolved=true;
boolean isInterface=true;
try {
isInterface=isInterface();
}
catch ( UnresolvedClassException ex) {
isResolved=false;
}
if (isInterface) {
try {
if (other.implementsInterface(getType())) {
return ... | This is a helper method for getCommonSuperclass <p/> It checks if this class is an interface, and if so, if other implements it. <p/> If this class is undefined, we go ahead and check if it is listed in other's interfaces. If not, we throw an UndefinedClassException <p/> If the interfaces of other cannot be fully resol... |
public void displayApng(String uri,ImageView imageView,DisplayImageOptions options,ApngConfig config){
super.displayImage(uri,imageView,options,new ApngImageLoadingListener(context,Uri.parse(uri),getAutoPlayHandler(config,null)));
}
| Load and display APNG in specific ImageView object with DisplayImageOptions and ApngConfig |
@SuppressWarnings("unused") public static void bindToRegister(int value){
}
| Forces a value to be kept in a register. |
public static float smooth(float prevValue,float newValue,float a){
return a * newValue + (1 - a) * prevValue;
}
| Exponential smoothing (Holt - Winters). |
public static String lineDelimiter(IXtextDocument doc,int offset) throws BadLocationException {
String nl=doc.getLineDelimiter(doc.getLineOfOffset(offset));
if (nl == null) {
if (doc instanceof AbstractDocument) {
nl=((AbstractDocument)doc).getDefaultLineDelimiter();
}
}
return nl;
}
| Determine the current Line delimiter at the given offset. |
public boolean isSetData(){
return this.data != null;
}
| Returns true if field data is set (has been assigned a value) and false otherwise |
public void paste(){
invokeAction(TransferHandler.getPasteAction());
}
| "Pastes" the bytes in the clipboard into the current selection in the hex editor. |
public void update(){
if (!guild.isAvailable()) {
throw new GuildUnavailableException();
}
if (name != null || region != null || timeout != null || icon != null || !StringUtils.equals(afkChannelId,guild.getAfkChannelId()) || verificationLevel != null) {
checkPermission(Permission.MANAGE_SERVER);
JSONO... | This method will apply all accumulated changes received by setters |
public void suppressNameUpdate(boolean set){
for (int i=0; i < mBlockEntries.size(); i++) {
Block b=mBlockEntries.get(i);
LayoutBlock lb=jmri.InstanceManager.getDefault(jmri.jmrit.display.layoutEditor.LayoutBlockManager.class).getByUserName(b.getUserName());
if (lb != null) {
lb.setSuppressNameUpdat... | This function suppresses the update of a memory variable when a block goes to unoccupied, so the text set above doesn't get wiped out. |
void start(){
ResourcesPlugin.getWorkspace().addResourceChangeListener(this,IResourceChangeEvent.POST_CHANGE);
}
| Starts tracking resource changes. |
public void saveFingerprintAsFile(byte[] fingerprint,String filename){
FileOutputStream fileOutputStream;
try {
fileOutputStream=new FileOutputStream(filename);
fileOutputStream.write(fingerprint);
fileOutputStream.close();
}
catch ( FileNotFoundException e1) {
e1.printStackTrace();
}
catch ( ... | Save fingerprint to a file |
public Intent(String action){
setAction(action);
}
| Create an intent with a given action. All other fields (data, type, class) are null. Note that the action <em>must</em> be in a namespace because Intents are used globally in the system -- for example the system VIEW action is android.intent.action.VIEW; an application's custom action would be something like com.goog... |
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. |
public static void notNullOrEmpty(String value,String name){
notNull(value,name);
if (value.trim().length() == 0) throw new IllegalArgumentException(INVALID_ARG_MSG_PREFIX + name + NOT_NULL_OR_EMPTY_SUFFIX);
}
| Checks that a String is not null or empty. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:18.111 -0500",hash_original_method="05CFFFBF5E08267473584C7C9C8831C7",hash_generated_method="58824DA46BB8DAB7F26513A055B540C8") private void sendResponse(SIPResponse transact... | Send a response. |
private final void inferCallerELKI(){
needToInferCaller=false;
StackTraceElement[] stack=(new Throwable()).getStackTrace();
int ix=0;
while (ix < stack.length) {
StackTraceElement frame=stack[ix];
final String cls=frame.getClassName();
if (cls.equals(START_TRACE_AT)) {
break;
}
ix++;
... | Infer a caller, ignoring logging-related classes. |
public void insert(String s){
char[] arr=s.toCharArray();
TrieNode node=root;
for (int i=0; i < arr.length; i++) {
char c=arr[i];
if (!node.children.containsKey(c)) {
node.children.put(c,new TrieNode());
}
node=node.children.get(c);
if (i == arr.length - 1) {
node.isEnd=true;
... | Trie section |
public static _Fields findByThriftId(int fieldId){
switch (fieldId) {
case 1:
return HEADER;
case 2:
return STORE;
case 3:
return KEYS;
default :
return null;
}
}
| Find the _Fields constant that matches fieldId, or null if its not found. |
protected final long startTime(){
return startTime;
}
| Return the time when the action started. |
@Override public boolean hasOverlappingRendering(){
return false;
}
| Allows for smoother animations. |
public static void saveCommanders(Context context,List<CommanderItem> items){
SharedPreferences.Editor editor=getSharedPreferences(context).edit();
for (int i=0; i < items.size(); i++) {
CommanderItem item=items.get(i);
String data=item.getGpioName() + "," + item.getDesc()+ ","+ item.getHighDesc()+ ","+ ite... | Save user define command blocks |
public InputLexerSource(InputStream input) throws IOException {
super(new BufferedReader(new InputStreamReader(input)),true);
}
| Creates a new Source for lexing the given Reader. Preprocessor directives are honoured within the file. |
public boolean equals(Object obj){
if (obj instanceof Primitive) return ((Primitive)obj).value.equals(this.value);
else return false;
}
| Primitives compare equal with other Primitives containing an equal wrapped value. |
public boolean hasExtendedProperties(){
return hasRepeatingExtension(ExtendedProperty.class);
}
| Returns whether it has the contact extended properties. |
public int hashCode(){
return this.credentialClass.hashCode();
}
| Returns the hash code value for this object. |
public GautengUtilityOfMoney(Scenario scenario,double baseValueOfTime_h,double valueOfTimeMultiplier){
this.sc=scenario;
log.warn("Value of Time (VoT) used as base: " + baseValueOfTime_h);
log.warn("Value of Time multiplier: " + valueOfTimeMultiplier);
this.baseValueOfTime_h=baseValueOfTime_h;
this.commercial... | Class to calculate the marginal utility of money (beta_money) for different vehicle types given the value of time (VoT). |
private void updateProgress(int progress){
if (myHost != null && progress != previousProgress) {
myHost.updateProgress(progress);
}
previousProgress=progress;
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public AvailableExpression find(Instruction inst){
Operator opr=inst.operator();
Operand[] ops=null;
LocationOperand location=null;
switch (inst.operator().format) {
case InstructionFormat.GetField_format:
if (VM.VerifyAssertions) VM._assert(doMemory);
ops=new Operand[]{GetField.getRef(inst)};
location=... | Find and return a matching available expression. |
private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter,java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
java.lang.String prefix=xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix=generatePrefix(namespace);
while (xmlWriter.getNamespaceContext().g... | Register a namespace prefix |
public static boolean isHasSdcard(){
String status=Environment.getExternalStorageState();
if (status.equals(Environment.MEDIA_MOUNTED)) {
return true;
}
else {
return false;
}
}
| sdcard check |
public final CC minHeight(String size){
ver.setSize(LayoutUtil.derive(ver.getSize(),ConstraintParser.parseUnitValue(size,false),null,null));
return this;
}
| The minimum size for the component. The value will override any value that is set on the component itself. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. |
public SignCsrAction(KseFrame kseFrame){
super(kseFrame);
putValue(LONG_DESCRIPTION,res.getString("SignCsrAction.statusbar"));
putValue(NAME,res.getString("SignCsrAction.text"));
putValue(SHORT_DESCRIPTION,res.getString("SignCsrAction.tooltip"));
putValue(SMALL_ICON,new ImageIcon(Toolkit.getDefaultToolkit().c... | Construct action. |
public RestoreSnapshotRequest indexSettings(String source){
this.indexSettings=Settings.settingsBuilder().loadFromSource(source).build();
return this;
}
| Sets settings that should be added/changed in all restored indices |
private static String urlEncode(final String text) throws UnsupportedEncodingException {
return URLEncoder.encode(text,"UTF-8");
}
| Encode text as UTF-8 |
@SuppressWarnings("unchecked") @Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case UmplePackage.ANONYMOUS_PROGRAM_1__COMMENT_1:
getComment_1().clear();
getComment_1().addAll((Collection<? extends Comment_>)newValue);
return;
case UmplePackage.ANONYMOUS_PROGRAM_1__DIRECTIVE_1:
getD... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public GridClientException(String msg,Throwable cause){
super(msg,cause);
}
| Constructs client exception. |
private void resizeVertical(Event e,FormData sashData){
Rectangle sashRect=sash.getBounds();
Rectangle shellRect=Sasher.this.getBounds();
int right=shellRect.width - sashRect.width - limit;
e.x=Math.max(Math.min(e.x,right),limit);
if (e.x != sashRect.x) {
sashData.top=new FormAttachment(0,e.x);
Sasher... | Handle an vertical resize event. |
public static ComponentUI createUI(JComponent c){
return new ScrollBarUI();
}
| Creates a new UI deligate for the given component. It is a standard method that all UI deligates must have. |
private Map<String,Type> findTypesIn(Object model){
final Map<String,Type> map=new HashMap<>();
findTypesIn(requireNonNull(model),map);
return map;
}
| Returns a map with all the types found in the specified model. The model can be anything, but it will only find types if it inherits from any of the supported traits. <p> The key of the map will be the name of the type. |
private static List<Territory> findFontier(final Territory start,final Match<Territory> endCondition,final Match<Territory> routeCondition,final int distance,final GameData data){
final Match<Territory> canGo=new CompositeMatchOr<>(endCondition,routeCondition);
final IntegerMap<Territory> visited=new IntegerMap<>()... | Finds list of territories at exactly distance from the start |
private void checkPeriod(ReadablePeriod period){
if (period == null) {
throw new IllegalArgumentException("Period must not be null");
}
}
| Checks whether the period is non-null. |
@Override public String toString(){
if (eIsProxy()) return super.toString();
StringBuffer result=new StringBuffer(super.toString());
result.append(" (name_1: ");
result.append(name_1);
result.append(')');
return result.toString();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static Validator<CharSequence> minLength(@NonNull final CharSequence errorMessage,final int minLength){
return new MinLengthValidator(errorMessage,minLength);
}
| Creates and returns a validator, which allows to validate texts to ensure, that they have at least a specific length. |
public void addConsistencyGroupTypes(String... cgTypes){
if (types == null) {
setTypes(new StringSet());
}
for ( String type : cgTypes) {
types.add(type);
}
}
| Convenience method to add a consistency group type. |
public static void signalShutdown(){
shutdown=true;
signalAllControllers();
}
| Called by any portion of the tool who wishes to initiate a global shutdown. |
public void loadSelfFile(File file,String encoding,boolean debug){
try {
loadSelfFile(new FileInputStream(file),encoding,MAX_FILE_SIZE,debug,true);
}
catch ( IOException exception) {
throw new SelfParseException("Parsing error occurred",exception);
}
}
| Load, compile, and add the state machine from the .self file. |
private void processTSBKChannelGrant(TSBKMessage message){
String channel=null;
String from=null;
String to=null;
switch (message.getOpcode()) {
case GROUP_DATA_CHANNEL_GRANT:
GroupDataChannelGrant gdcg=(GroupDataChannelGrant)message;
channel=gdcg.getChannel();
from=gdcg.getSourceAddress();
to=gdcg.getGroup... | Process a traffic channel allocation message |
public static boolean cs_updown(Dcs L,int sigma,Dcs C,int[] parent){
int n, p, f, j, Lp[], Li[], Cp[], Ci[];
double Lx[], Cx[], alpha, beta=1, delta, gamma, w1, w2, w[], beta2=1;
if (!Dcs_util.CS_CSC(L) || !Dcs_util.CS_CSC(C) || parent == null) return (false);
Lp=L.p;
Li=L.i;
Lx=L.x;
n=L.n;
Cp=C.p;
... | Sparse Cholesky rank-1 update/downdate, L*L' + sigma*w*w' (sigma = +1 or -1) |
public boolean isValidName(){
return true;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override protected void tearDown() throws Exception {
setFixture(null);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private double squaredError(int k){
double squaredError=0.0;
for (int i=0; i < data.rows(); i++) {
if (clusters.get(i) == k) {
TetradVector datum=data.getRow(i);
TetradVector center=centers.getRow(k);
squaredError+=metric.dissimilarity(datum,center);
}
}
return squaredError;
}
| The squared error of the kth cluster. |
protected void chooseDataSourceFileTypeFromComboBox(){
this.showFileDataSourceComboBox=false;
String oldFileType=fileDataSourceFactory != null ? fileDataSourceFactory.getI18NKey() : "unknown";
this.fileDataSourceFactory=(FileDataSourceFactory<?>)factoryDropDownComboBox.getSelectedItem();
String newFileType=file... | Applies the file type selection made by the user in the file type combobox. |
public static ColumnFamily removeDeletedCF(ColumnFamily cf,int gcBefore){
cf.purgeTombstones(gcBefore);
return !cf.hasColumns() && !cf.isMarkedForDelete() ? null : cf;
}
| Purges gc-able top-level and range tombstones, returning `cf` if there are any columns or tombstones left, null otherwise. |
Class<?> javaxToolsJavac(String packageName,String className,String source){
String fullClassName=packageName + "." + className;
StringWriter writer=new StringWriter();
JavaFileManager fileManager=new ClassFileManager(JAVA_COMPILER.getStandardFileManager(null,null,null));
ArrayList<JavaFileObject> compilationUn... | Compile using the standard java compiler. |
public static void forceDump(Object object,String format,Object... args){
DebugConfig config=getConfig();
if (config != null) {
String message=String.format(format,args);
for ( DebugDumpHandler dumpHandler : config.dumpHandlers()) {
dumpHandler.dump(object,message);
}
}
else {
TTY.printl... | This method exists mainly to allow a debugger (e.g., Eclipse) to force dump a graph. |
@GET @Controller @Produces("text/html") @Path("view1/{id}") public String view1(@PathParam("id") String id){
models.put("book",catalog.getBook(id));
return "book.xhtml";
}
| MVC controller to render a book in HTML. Uses the models map to bind a book instance. |
public boolean execute(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
return true;
}
| If this rule has been matched and has not been "stolen" by another rule then process the request. If you return true then the filter chain will NOT continue. |
public SortedListModel(){
super();
set=new TreeSet<T>();
}
| Constructs a new sorted list model. |
protected DiscreteCalcAndArguments assignCalcObjectDiscrete() throws Exception {
String kPropValueStr, basePropValueStr;
try {
kPropValueStr=propertyValues.get(DISCRETE_PROPNAME_K);
}
catch ( Exception ex) {
JOptionPane.showMessageDialog(this,ex.getMessage());
resultsLabel.setText("Cannot find a val... | Method to assign and initialise our discrete calculator class |
protected DistributedSystemHealthConfig createDistributedSystemHealthConfig(){
return new DistributedSystemHealthConfigImpl();
}
| A "template factory" method for creating a <code>DistributedSystemHealthConfig</code>. It can be overridden by subclasses to produce instances of different <code>DistributedSystemHealthConfig</code> implementations. |
public ClusterInfo configureConnectEmcEmailParams(ConnectEmcEmail emailParams){
return client.post(ClusterInfo.class,emailParams,CONFIG_CONNECT_EMC_EMAIL_URL);
}
| Configure ConnectEMC SMTP/Email transport related properties. <p> API Call: POST /config/connectemc/email |
private String _serializeArray(Array array,Map<Object,String> done,String id) throws ConverterException {
return _serializeList(array.toList(),done,id);
}
| serialize a Array |
synchronized void thaw(ThreadReference resumingThread){
if (cache != null) {
if ((vm.traceFlags & VirtualMachine.TRACE_OBJREFS) != 0) {
vm.printTrace("Clearing VM suspended cache");
}
disableCache();
}
processVMAction(new VMAction(vm,resumingThread,VMAction.VM_NOT_SUSPENDED));
}
| Tell listeners to invalidate suspend-sensitive caches. If resumingThread != null, then only that thread is being resumed. |
public static GeneralizedSemImWrapper serializableInstance(){
return new GeneralizedSemImWrapper(GeneralizedSemPmWrapper.serializableInstance());
}
| Generates a simple exemplar of this class to test serialization. |
protected DelegatingMemberImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public Duration toStandardDuration(){
checkYearsAndMonths("Duration");
long millis=getMillis();
millis+=(((long)getSeconds()) * ((long)DateTimeConstants.MILLIS_PER_SECOND));
millis+=(((long)getMinutes()) * ((long)DateTimeConstants.MILLIS_PER_MINUTE));
millis+=(((long)getHours()) * ((long)DateTimeConstants.MIL... | Converts this period to a duration assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. <p> This method allows you to convert from a period to a duration. However to achieve this it makes the assumption that all weeks are 7 days, all days are 24 hours, all hours are 60 minutes and all minutes are 60... |
public void addArguments(String key,String... value){
if (value.length == 1) {
addArgument(key,value[0]);
}
else {
addArgument(key,(String[])value);
}
}
| Add an argument to the request response as an array of elements, this will trigger multiple request entries with the same key |
public SortControl(String sortBy,boolean criticality) throws IOException {
super(OID,criticality,null);
super.value=setEncodedValue(new SortKey[]{new SortKey(sortBy)});
}
| Constructs a control to sort on a single attribute in ascending order. Sorting will be performed using the ordering matching rule defined for use with the specified attribute. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.