code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public JFileDataStoreChooser(Shell parent,int style,final String[] extensions){
this(parent,style,associations(Arrays.asList(extensions)));
}
| Create a dialog that filters for files with the specified extensions. |
protected SnmpCachedData updateCachedDatas(Object userData){
final String[] path=JvmRuntimeImpl.getLibraryPath(userData);
final long time=System.currentTimeMillis();
final int len=path.length;
SnmpOid indexes[]=new SnmpOid[len];
for (int i=0; i < len; i++) {
indexes[i]=new SnmpOid(i + 1);
}
return new... | Return a table handler containing the Thread indexes. Indexes are computed from the ThreadId. |
@Override protected EClass eStaticClass(){
return SexecPackage.Literals.STATE_CASE;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
protected Connection createSendConnection() throws Exception {
return createConnection();
}
| Creates a connection. |
public ParameterizedLinkedHashMap(int initialCapacity,float loadFactor,Equality keyEquality){
super(initialCapacity,loadFactor,keyEquality);
accessOrder=false;
}
| Constructs an empty insertion-ordered <tt>ParameterizedLinkedHashMap</tt> instance with the specified initial capacity, load factor, and key equality. |
private void applyAdapterNameToStoragePortRestRep(StoragePortRestRep storagePortRestRep,StoragePort resource){
if (dbClient == null) {
return;
}
if (resource != null && resource.getStorageHADomain() != null) {
StorageHADomain tempObj=dbClient.queryObject(StorageHADomain.class,resource.getStorageHADomain()... | Adds StorageHADomain name into StoragePortRestRep object, if the StoragePort's HADomain is not set, then StoragePort's PortGroup value will be assigned to StoragePortRestRep adapterName attribute StoragePort is not set for Isilon and DataDomain devices. |
@Override public void put(String name,Object object){
ResourceId resourceId=new ResourceId(resourcePoolId,name);
Resource resource=new Resource(resourceId,object);
resources.put(resourceId,resource);
}
| Put resource into the pull |
public void waitForIvrZonesetActivate() throws NetworkDeviceControllerException {
_log.info(MessageFormat.format("Host: {0}, Port: {1} - BEGIN waitForIvrZonesetActivate",new Object[]{getSession().getSession().getHost(),getSession().getSession().getPort()}));
_log.info("Waiting for ivr zoneset to activate");
SSHPr... | Wait for activation finish processing |
public int dimensionality(DBIDRef id){
return storage.get(id).getCorrelationDimension();
}
| Get the correlation dimensionality of a single object. |
@SuppressWarnings("unchecked") public Object readMetaBean(Element node) throws Exception {
Object result;
Vector<Element> children;
Element child;
int i;
String name;
Vector<Integer> inputs;
Vector<Integer> outputs;
Vector<Point> coords;
MetaBean bean;
if (DEBUG) {
trace(new Throwable(),node.get... | builds the MetaBean from the given DOM node. |
public Vertex decompileEquation(Vertex equation,Network network){
if (equation.getData() instanceof BinaryData) {
try {
return parseEquationByteCode(equation,(BinaryData)equation.getData(),network);
}
catch ( IOException exception) {
throw new SelfExecutionException(equation,exception);
}
... | Check if the equation is bytecode and decompile. |
public void unsetMatchColumn(String[] columnIdxes) throws SQLException {
for (int j=0; j < columnIdxes.length; j++) {
if (!columnIdxes[j].equals(strMatchColumns.get(j))) {
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols").toString());
}
}
for (int i=0; i < columnIdxes.le... | Unsets the designated parameter to the given String array. This was set using <code>setMatchColumn</code> as the column which will form the basis of the join. <P> The parameter value unset by this method should be same as was set. |
protected void drawContentDirect(DrawContext dc){
GL gl=dc.getGL();
try {
gl.glEnable(GL.GL_SCISSOR_TEST);
gl.glScissor(this.contentBounds.x,this.contentBounds.y - 1,this.contentBounds.width + 1,this.contentBounds.height);
this.contents.renderScrollable(dc,this.scrollContentBounds.getLocation(),this.scr... | Draw the frame contents directly (not using previously generated tiles). |
private void writeQNameAttribute(java.lang.String namespace,java.lang.String attName,javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace=qname.getNamespaceURI();
java.lang.String attributePrefix=xmlWriter.getPre... | Util method to write an attribute without the ns prefix |
protected PduHeaders parseHeaders(ByteArrayInputStream pduDataStream){
if (pduDataStream == null) {
return null;
}
boolean keepParsing=true;
PduHeaders headers=new PduHeaders();
while (keepParsing && (pduDataStream.available() > 0)) {
pduDataStream.mark(1);
int headerField=extractByteValue(pduData... | Parse pdu headers. |
private V putForNullKey(V value){
for (Entry<K,V> e=table[0]; e != null; e=e.next) {
if (e.key == null) {
V oldValue=e.value;
e.value=value;
e.recordAccess(this);
return oldValue;
}
}
modCount++;
addEntry(0,null,value,0);
return null;
}
| Offloaded version of put for null keys |
public int shrinkCycles(){
return this.shrinkCycles;
}
| Returns the maximum number of shrink cycles that will occur |
public AggregateSwitch(String name,int level,NetworkDatacenter dc){
super(name,level,dc);
downlinkswitchpktlist=new HashMap<Integer,List<NetworkPacket>>();
uplinkswitchpktlist=new HashMap<Integer,List<NetworkPacket>>();
uplinkbandwidth=NetworkConstants.BandWidthAggRoot;
downlinkbandwidth=NetworkConstants.Band... | Instantiates a Aggregate Switch specifying the switches that are connected to its downlink and uplink ports and corresponding bandwidths. |
public TextKeyListener(Capitalize cap,boolean autotext){
mAutoCap=cap;
mAutoText=autotext;
}
| Creates a new TextKeyListener with the specified capitalization and correction properties. |
protected void writeIndex(IndexOutput out,long[] leafBlockFPs,byte[] splitPackedValues) throws IOException {
CodecUtil.writeHeader(out,CODEC_NAME,VERSION_CURRENT);
out.writeVInt(numDims);
out.writeVInt(maxPointsInLeafNode);
out.writeVInt(bytesPerDim);
assert leafBlockFPs.length > 0;
out.writeVInt(leafBlockF... | Subclass can change how it writes the index. |
@Override public void renderAxisLabels(Canvas c){
if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled()) return;
float[] positions=new float[mYAxis.mEntryCount * 2];
for (int i=0; i < positions.length; i+=2) {
positions[i + 1]=mYAxis.mEntries[i / 2];
}
mTrans.pointValuesToPixel(positions);
mAxisLab... | draws the y-axis labels to the screen |
private void reset(){
dirty=false;
vatEnabled=null;
defaultVat=null;
countryVats=null;
countries=null;
customerVats=null;
customers=null;
vatStrings=null;
}
| Load the VAT rates from the service |
private Object readResolve(){
if (list instanceof RandomAccess) {
return new UnmodifiableRandomAccessList<E>(list);
}
return this;
}
| Resolves UnmodifiableList instances to UnmodifiableRandomAccessList instances if the underlying list is a Random Access list. <p> This is necessary since UnmodifiableRandomAccessList instances are replaced with UnmodifiableList instances during serialization for compliance with JREs before 1.4. <p> |
@SuppressWarnings("unchecked") protected void receiveEntityUpdate(Packet c){
int eindex=c.getIntValue(0);
Entity entity=(Entity)c.getObject(1);
Vector<UnitLocation> movePath=(Vector<UnitLocation>)c.getObject(2);
game.setEntity(eindex,entity,movePath);
}
| Loads entity update data from the data in the net command. |
public static double exp(double x){
return pow2(expPowConst * x);
}
| Exponentiates the given input value |
private void addBOMLine(MPPProductBOMLine line,BigDecimal qty){
log.fine(line.toString());
String bomType=line.getComponentType();
if (bomType == null) bomType=MPPProductBOMLine.COMPONENTTYPE_Component;
BigDecimal lineQty=line.getQty();
MProduct product=line.getProduct();
if (product == null) return;
... | Add BOM Line to this. Calls addBOMLines if added product is a BOM |
public String globalInfo(){
return "A filter that removes a range of" + " attributes from the dataset. Will " + "re-order the remaining attributes "+ "if invert matching sense is turned "+ "on and the attribute column indices "+ "are not specified in ascending order.";
}
| Returns a string describing this filter |
private void notifyAdditionalOnScrolledListener(RecyclerView recyclerView,int dx,int dy){
if (mAdditionalOnScrollListener != null) {
mAdditionalOnScrollListener.onScrolled(recyclerView,dx,dy);
}
}
| Notifies the OnScrollListener of an onScroll event, since JazzyListView is the primary listener for onScroll events. |
public void wifiTestInit(){
mWifiManager.setWifiEnabled(true);
Log.v(LOG_TAG,"Clear Wifi before we start the test.");
sleep(SHORT_TIMEOUT);
removeConfiguredNetworksAndDisableWifi();
}
| Additional initialization needed for wifi related tests. |
void notifyError(int errorId,String tag,String attribute,String value,String description){
if (parserCallback != null) {
boolean cont=parserCallback.parsingError(errorId,tag,attribute,value,description);
if (!cont) {
throw new IllegalArgumentException(description);
}
}
}
| A utility method used to notify an error to the ParserCallback and throw an IllegalArgumentException if parsingError returned false |
protected PrivateKey engineGeneratePrivate(KeySpec keySpec) throws InvalidKeySpecException {
if (keySpec != null) {
if (keySpec instanceof DSAPrivateKeySpec) {
return new DSAPrivateKeyImpl((DSAPrivateKeySpec)keySpec);
}
if (keySpec instanceof PKCS8EncodedKeySpec) {
return new DSAPrivateKeyImpl... | This method generates a DSAPrivateKey object from the provided key specification. |
private void saveStringSettings(){
for ( String settingName : stringSettings.keySet()) {
StringSetting setting=stringSettings.get(settingName);
String value=setting.getSettingValue();
if (settings.setString(settingName,value) == Setting.CHANGED) {
changed(settingName);
}
}
}
| Saves all settings of type String |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:19.011 -0500",hash_original_method="39AF7BF095F0C2B1607F33D11417DF97",hash_generated_method="F376D4A493B2A43313AC5AD7B7320ED8") static private boolean createCacheDirectory(){... | Create the cache directory if it does not already exist. |
public Distribution(Distribution toMerge){
totaL=toMerge.totaL;
m_perClass=new double[toMerge.numClasses()];
System.arraycopy(toMerge.m_perClass,0,m_perClass,0,toMerge.numClasses());
m_perClassPerBag=new double[1][0];
m_perClassPerBag[0]=new double[toMerge.numClasses()];
System.arraycopy(toMerge.m_perClass,... | Creates distribution with only one bag by merging all bags of given distribution. |
public MissingDataException(Throwable cause){
super(cause);
}
| Creates a new MissingDataException object. |
private int stepOverGroup(){
ArrayList<FormIndex> indicies=new ArrayList<FormIndex>();
GroupDef gd=(GroupDef)mFormEntryController.getModel().getForm().getChild(getFormIndex());
FormIndex idxChild=mFormEntryController.getModel().incrementIndex(getFormIndex(),true);
for (int i=0; i < gd.getChildren().size(); i++)... | If using a view like HierarchyView that doesn't support multi-question per screen, step over the group represented by the FormIndex. |
public void onDrawerOpened(View drawerView){
super.onDrawerOpened(drawerView);
}
| Called when a drawer has settled in a completely open state. |
public MoreOp_ createMoreOp_(){
MoreOp_Impl moreOp_=new MoreOp_Impl();
return moreOp_;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:52.410 -0400",hash_original_method="F031365D6E829A45B7583B6D22A26F0A",hash_generated_method="28DDBA1338EE51F6D648E2EE894551B2") @Override public int available() throws IOException {
throw exception;
}
| Throws the configured exception. |
public void add(PGPData pgpdata){
this.constructionElement.appendChild(pgpdata.getElement());
XMLUtils.addReturnToElement(this.constructionElement);
}
| Method addPGPData |
@Deprecated public final IOContainer run(final IOContainer input,final boolean unused) throws OperatorException {
return run(input,LogService.UNKNOWN_LEVEL);
}
| Starts the process with the given input. The process uses a default log verbosity. The boolean flag indicates if some static initializations should be cleaned before the process is started. This should usually be true but it might be useful to set this to false if, for example, several process runs uses the same object... |
private void knock(final Player player,final HousePortal houseportal){
String message=player.getName() + " is outside knocking on the door!";
final StendhalRPZone zone=SingletonRepository.getRPWorld().getZone(houseportal.getDestinationZone());
if (zone != null) {
for ( Player houseplayer : zone.getPlayers(... | Knocks on the door. |
private void decorateBlockObjectWithSRDFProperties(BlockObject blockObject,UnManagedVolume unManagedVolume){
Volume volume=(Volume)blockObject;
StringSetMap unManagedVolumeInformation=unManagedVolume.getVolumeInformation();
String type=PropertySetterUtil.extractValueFromStringSet(SupportedVolumeInformation.REMOTE... | Decorates the block objects with srdf properties. |
private boolean doSomeHaveErrors(){
for ( Conversation conversation : mAdapter.getSelectedItems().values()) {
if (conversation.hasError()) {
return true;
}
}
return false;
}
| Returns whether or not any of the selected conversations have errors |
public Request<Version> current(){
final Invocation request=getWebTarget().request().accept(APPLICATION_JSON).build("OPTIONS");
return new SimpleRequest<Version>(request,DefaultVersion.class,getAuthenticationManager());
}
| Returns the current user. |
public Bay(double space,int doors,int bayNumber){
totalSpace=space;
currentSpace=space;
this.doors=doors;
doorsNext=doors;
this.bayNumber=bayNumber;
}
| Create a space for the given tonnage of troops. For this class, only the weight of the troops (and their equipment) are considered; if you'd like to think that they are stacked like lumber, be my guest. |
private void addMirrorToVolume(Volume volume,BlockMirror mirror){
StringSet mirrors=volume.getMirrors();
if (mirrors == null) {
mirrors=new StringSet();
}
mirrors.add(mirror.getId().toString());
volume.setMirrors(mirrors);
_dbClient.updateObject(volume);
}
| Adds a Mirror structure to a Volume's mirror set. |
public static void main(String... args) throws SQLException {
new Shell().runTool(args);
}
| Options are case sensitive. Supported options are: <table> <tr><td>[-help] or [-?]</td> <td>Print the list of options</td></tr> <tr><td>[-url "<url>"]</td> <td>The database URL (jdbc:h2:...)</td></tr> <tr><td>[-user <user>]</td> <td>The user name</td></tr> <tr><td>[-password <pwd>]</td> <td>The passwo... |
public void updateViewAttributes(){
if (frameProvider != null) {
frameProvider.setViewAttributes(getViewAttributes());
}
}
| This only needs to be called if the frame provider is not local. In that case, updates to the view attributes object will not be reflected on the server side. This will update the parameters. |
public String(java.lang.String value){
}
| Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string. value - a String. |
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:34:20.329 -0500",hash_original_method="BBB121FCAE128F1EC35D041163A72498",hash_generated_method="FE6DD563D7BEBC354DFA48CAF6847CF0") public void drawTextOnPath(String text,Path ... | Draw the text, with origin at (x,y), using the specified paint, along the specified path. The paint's Align setting determins where along the path to start the text. |
public static Sha256Hash hashFileContents(File f) throws IOException {
FileInputStream in=new FileInputStream(f);
try {
return create(ByteStreams.toByteArray(in));
}
finally {
in.close();
}
}
| Returns a hash of the given files contents. Reads the file fully into memory before hashing so only use with small files. |
public T caseFunctionOrFieldAccessor(FunctionOrFieldAccessor object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Function Or Field Accessor</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public boolean isExpressCheckoutPermitted(){
return expressCheckoutPermitted;
}
| Gets the value of the expressCheckoutPermitted property. |
public NamePrefix(String value){
this();
setValue(value);
}
| Constructs a new instance with the given value. |
public static boolean hashDeclarationWrapper(PsiBuilder b,int l){
PsiBuilder.Marker m=b.mark();
boolean r=false;
assert b instanceof PerlBuilder;
boolean flagBackup=((PerlBuilder)b).setSpecialVariableNamesAllowed(false);
if (PerlParserImpl.hash_variable(b,l)) {
m.done(VARIABLE_DECLARATION_WRAPPER);
r=... | Parses and wraps declaration of scalar variable; NB: special variable names suppressed |
public SVGPath relativeEllipticalArc(double rx,double ry,double ar,double la,double sp,double[] xy){
append(PATH_ARC_RELATIVE,rx,ry,ar,la,sp,xy[0],xy[1]);
return this;
}
| Elliptical arc curve to the given relative coordinates. |
public boolean parseWord(BashPsiBuilder builder,boolean enableRemapping,TokenSet reject,TokenSet accept){
int processedTokens=0;
int parsedStringParts=0;
boolean firstStep=true;
boolean isOk=true;
PsiBuilder.Marker marker=builder.mark();
while (isOk) {
final IElementType rawCurrentToken=builder.rawLooku... | Parses a word token. Several word tokens not seperated by whitespace are read as a single word token. <br> It accepts whitespace tokens in the beginning of the stream. <br> A word can be a combination of several tokens, words are seperated by whitespace. |
public ThreadRegisters(final long tid,final List<RegisterValue> registers){
threadId=tid;
threadRegisterValues=new ArrayList<>(registers);
}
| Creates a new thread registers object. |
public static boolean isConnectionOpen(HttpServletRequest request){
return isConnectionOpen(request," ".getBytes());
}
| Casts the request to a Jetty API and tries to write a space character to the output stream of the socket. <p> This space character might confuse the HTTP client. The Cling transports for Jetty Client and Apache HttpClient have been tested to work with space characters. Unfortunately, Sun JDK's HttpURLConnection does no... |
public boolean isMandatory(){
return mandatory;
}
| Recupera la obligatoriedad del documento en el procedimiento. |
public void begin(String namespace,String name,Attributes attributes) throws Exception {
assert digester.peek() instanceof ListEntriesHolder : "Assertion Error: Expected ListEntriesHolder to be at the top of the stack";
if (digester.getLogger().isDebugEnabled()) {
digester.getLogger().debug("[ListEntriesRule]{"... | <p>Create an empty instance of <code>ListEntriesBean</code> and push it on to the object stack.</p> |
protected String leafString(Tree parent) throws Exception {
if (m_Info.classAttribute().isNumeric()) {
double classMean;
if (m_ClassProbs == null) {
classMean=parent.m_ClassProbs[0];
}
else {
classMean=m_ClassProbs[0];
}
StringBuffer buffer=new StringBuffer();
buffer.append(" : " ... | Outputs description of a leaf node. |
public static IngredientsFragment newInstance(Recipe recipe,int sectionNumber){
IngredientsFragment fragment=new IngredientsFragment();
fragment.recipe=recipe;
Bundle args=new Bundle();
args.putInt(ARG_SECTION_NUMBER,sectionNumber);
fragment.setArguments(args);
return fragment;
}
| Returns a new instance of this fragment for the given section number. |
public void stem(){
k=i - 1;
if (k > 1) {
step1();
step2();
step3();
step4();
step5();
step6();
}
i_end=k + 1;
i=0;
}
| Stem the word placed into the Stemmer buffer through calls to add(). Returns true if the stemming process resulted in a word different from the input. You can retrieve the result with getResultLength()/getResultBuffer() or toString(). |
@Override public void drawDomainMarker(Graphics2D g2,XYPlot plot,ValueAxis domainAxis,Marker marker,Rectangle2D dataArea){
if (marker instanceof ValueMarker) {
ValueMarker vm=(ValueMarker)marker;
double value=vm.getValue();
Range range=domainAxis.getRange();
if (!range.contains(value)) {
return;... | Draws a line on the chart perpendicular to the x-axis to mark a value or range of values. |
private static void emitArgs(int argNumber,ArgumentType argEncoding){
String op=getOperand(argNumber);
switch (argEncoding) {
case LabelOrImmediate:
emit("getImm(" + op + "), getLabel("+ op+ ")");
break;
case RegisterDisplacement:
emit("getBase(" + op + "), getDisp("+ op+ ")");
break;
case Absolute:
emit("getDi... | Generate code to fetch all the arguments needed for a given operand number and encoding. The different argument encodings of the Assembler need different arguments to be passed to the emitter function. For instance, a register-displacement mode operand needs to be given a base register and an immediate displacement. Th... |
@SuppressWarnings({"rawtypes","unchecked"}) public static void assertWriteXml(String expectedInnerXml,ICalProperty propertyToWrite,ICalPropertyScribe marshaller){
Document actual=xcalProperty(marshaller);
marshaller.writeXml(propertyToWrite,actual.getDocumentElement(),new WriteContext(V2_0,new TimezoneInfo(),null))... | Tests to see if an xCal property was marshalled correctly. |
public void updateClassifier(Instance instance) throws Exception {
if (!instance.classIsMissing()) {
Enumeration<Attribute> enumAtts=m_Instances.enumerateAttributes();
int attIndex=0;
while (enumAtts.hasMoreElements()) {
Attribute attribute=enumAtts.nextElement();
if (!instance.isMissing(attri... | Updates the classifier with the given instance. |
static boolean verifyDigest(Element digAlgAndValueElement,byte[] data) throws NoSuchAlgorithmException, IOException, OperatorCreationException {
String digestMethod=((Element)digAlgAndValueElement.getFirstChild()).getAttribute(ALGORITHM_ATTRIBUTE);
String digestValue=digAlgAndValueElement.getLastChild().getTextCont... | Verifies the digest contained in the digest algorithm and value element against the provided data. |
private void enlargeCapacity(int key){
int diff=offCount - offset;
int minCapacity=Math.max(arr.length,key + offset + diff+ 1);
if (minCapacity > arr.length) {
int oldCapacity=arr.length;
int newCapacity=oldCapacity + (oldCapacity >> 1);
if (newCapacity - minCapacity < 0) newCapacity=minCapacity;
... | !!! all methods that use this method must be sync enlarge the inner array to given size |
private double calculateMA(String calcType,LinkedList<Double> yyValues,LinkedList<Long> volValues,Double sum){
double ma=0;
if (CalculationType.LINEAR.equals(calcType)) {
ma=sum / getLength();
}
else if (CalculationType.EXPONENTIAL.equals(calcType)) {
if (multiplyer == 0) {
ma=sum / getLength();
... | Method calculateMA. |
@SuppressWarnings("unchecked") public PathAndLeafHolder makeDeepHierachy(Organization org,int depth,PathAndLeafHolder pathAndLeafHolder) throws CommandException {
assertNotNull("organization may not be null",org);
assertFalse("organization may not be empty",org.getChildren().isEmpty());
Group<CnATreeElement> asse... | Builds one deep hierarchy and put exactly one child at the end. |
public JCustomTooltip(JComponent src,JComponent content,boolean inter){
this.setLayout(new BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
this.setComponent(src);
this.add(content);
setPersistent(inter);
}
| Create a new JCustomTooltip |
public void addAllContexts(){
matchAllContexts=true;
}
| Add all contexts with a boost of 1f |
public static void onOperatorError(BiFunction<? super Throwable,Object,? extends Throwable> f){
log.info("Hooking new default : onOperatorError");
onOperatorErrorHook=Objects.requireNonNull(f,"onOperatorErrorHook");
}
| Override global operator error mapping which by default add as suppressed exception either data driven exception or error driven exception. |
public File createPDF(){
try {
File temp=File.createTempFile(get_TableName() + get_ID() + "_",".pdf");
return createPDF(temp);
}
catch ( Exception e) {
log.severe("Could not create PDF - " + e.getMessage());
}
return null;
}
| Create PDF |
@Override public void toXML(final StringBuilder builder,final ConfigVerification errors){
long tasksizeRevisions=-1, tasksizeDiffs=-1, maxAllowedPacket=-1;
String text=this.articleTaskLimitField.getText();
if (text.length() == 0) {
errors.add(new ConfigItem(ConfigItemTypes.ERROR,ConfigErrorKeys.MISSING_VALUE,... | Adds the xml description of the panels content to the StringBuilder. Errors which occur during the xml transformation will be added to the ConfigVerification. |
public static DeckViewConfig reinitialize(Context context){
if (sInstance == null) {
sInstance=new DeckViewConfig(context);
}
int configHashCode=context.getResources().getConfiguration().hashCode();
if (sPrevConfigurationHashCode != configHashCode) {
sInstance.update(context);
sPrevConfigurationHash... | Updates the configuration to the current context |
public boolean deleteCloudFile(String fileId){
if (CloudPersona.getCurrentPersona().getToken() == null) {
CloudPersona.createAnonymous();
}
ConnectionRequest req=new ConnectionRequest();
req.setPost(false);
req.setFailSilently(true);
req.setUrl(SERVER_URL + "/fileStoreDelete");
req.addArgument("i",fil... | Deletes a file from the cloud storage |
public void addItemListener(ItemListener listener){
m_combo.addItemListener(listener);
}
| Item Listener Interface |
public boolean isRootNode(){
return this.parent == null;
}
| Is this node the root node? |
public static String generateResetKey(){
return RandomStringUtils.randomNumeric(DEF_COUNT);
}
| Generates a reset key. |
public void testWrapperClassWrapsPublicAndProtectedMethods(){
for ( Class<?> wrapper : wrapperClasses) {
if (wrapper.isInterface()) {
continue;
}
List<Method> wrapperMethods=getPublicAndProtectedMethods(wrapper);
List<Method> methodsToWrap=getPublicAndProtectedMethods(wrapper.getSuperclass());
... | The main goal of this TestSuite: unit test to assert all classes implementing FacesWrapper do wrap all public and protected methods of the wrapped class. |
public Builder maxItemsPerRequest(Integer maxItemsPerRequest){
this.maxItemsPerRequest=maxItemsPerRequest;
return this;
}
| Sets the number of Tweets returned per request for the CollectionTimeline. |
public static byte[] encode(byte[] binaryData){
if (binaryData == null) binaryData=EMPTY_BYTE_ARRAY;
int lengthDataBits=binaryData.length * EIGHTBIT;
int fewerThan24bits=lengthDataBits % TWENTYFOURBITGROUP;
int numberTriplets=lengthDataBits / TWENTYFOURBITGROUP;
byte encodedData[]=null;
if (fewerThan24bit... | Encodes hex octects into Base64 |
public StackFrame(Env env,CompiledMethod method,Address base){
this.method=method;
this.size=method.frameSize();
this.values=new Value[size];
this.base=base;
this.env=env;
for ( Declaration d : method.getDecls()) {
setInternal(d.getSlot(),d.getInitial(),true);
}
}
| Create a stack frame, given a list of declarations and a quantity of temporaries |
private Map<String,String> checkForErrorsAndReturnResponse(HttpsURLConnection connection){
try {
if (connection.getResponseCode() >= SC_MULTIPLE_CHOICES) {
String message;
if (connection.getErrorStream() != null) {
message=readResponse(connection.getErrorStream());
}
else {
mess... | Method to check the connection response for errors. Returns the response if the response code is less than 300. Throws MCOpenApiRuntimeException is connection errors. |
public void sort(){
_app_adapter.sort();
}
| Causes the adapter to sort the app list based on the comparator selected in the user preferences. |
public @Test final void testAddGrantNegative(){
Role role=new Role(TEST_ROLE);
thrown.expect(IllegalArgumentException.class);
role.addGrant(null);
}
| Adding null to the list of grants must fail. |
private BFINode<E> insert(BFINode<E> current,BFINode<E> newChild,InsDelUpdateStatistics stat){
stat.nbBFNodesAccessed++;
if (!current.isLeaf()) {
current.value.orBloomFilter(newChild.value);
stat.nbBFAccessed+=2;
BFINode<E> closestChild=newChild.findClosest(current.children,stat);
BFINode<E> newSibl... | Insert a new child into sub-tree rooted at "current" node Return null of pointer to new child if split occurred |
public boolean validSystemNameConfig(String systemName){
return (SerialAddress.validSystemNameConfig(systemName,'L'));
}
| Public method to validate system name for configuration returns 'true' if system name has a valid meaning in current configuration, else returns 'false' |
public static boolean isEntityAnti(EntityLivingBase par1){
return par1 instanceof IAntiEntity;
}
| Checks if the Entity is immune to Antimatter |
public Modifier newModifier(Modifier.ModifierKeyword keyword){
Modifier result=new Modifier(this);
result.setKeyword(keyword);
return result;
}
| Creates and returns a new unparented modifier node for the given modifier. |
public boolean isExternal(){
return false;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public CF2(int numberOfVariables){
super(numberOfVariables,2,1);
}
| Constructs a CF2 test problem with the specified number of decision variables. |
void put(final MethodWriter owner,final ByteVector out,final int source,final boolean wideOffset){
if ((status & RESOLVED) == 0) {
if (wideOffset) {
addReference(-1 - source,out.length);
out.putInt(-1);
}
else {
addReference(source,out.length);
out.putShort(-1);
}
}
else {
... | Puts a reference to this label in the bytecode of a method. If the position of the label is known, the offset is computed and written directly. Otherwise, a null offset is written and a new forward reference is declared for this label. |
protected void releaseBlock(OBlock block,int idx){
_idxLastOrder=idx;
firePropertyChange("blockRelease",null,block);
for (int i=idx; i > -1; i--) {
boolean dealloc=true;
OBlock prevBlock=getBlockAt(i);
for (int j=i + 1; j < _orders.size(); j++) {
if (prevBlock.equals(getBlockAt(j))) {
de... | Deallocates all blocks prior to and including block |
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 Iterator<IPoint> points(){
return points.iterator();
}
| Return the points in this Partial Hull as an Iterator. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.