code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void paintSplitPaneBackground(SynthContext context,Graphics g,int x,int y,int w,int h){
}
| Paints the background of a split pane. |
public void endKeySetSend(long startTime,boolean failed){
long duration=getStatTime() - startTime;
endClientOpSend(duration,failed);
this.sendStats.incInt(keySetSendInProgressId,-1);
int endKeySetSendId;
if (failed) {
endKeySetSendId=keySetSendFailedId;
}
else {
endKeySetSendId=keySetSendId;
}
... | Records that the send part of the keySet has completed |
protected void applyLoadDataLocal(LoadDataFileQuery data,File temporaryFile) throws ReplicatorException {
data.setLocalFile(temporaryFile);
applyStatementData(data);
}
| applyLoadDataLocal executes the LoadDataFileQuery. This method is most likely to be database specific. See for example : |
public static LogoutResponse createSamlLogoutResponse(String inResponseTo){
String tenantName=ServerConfig.getTenant(0);
String rpName=ServerConfig.getRelyingParty(tenantName,1);
String issuerUrl=ServerConfig.getRelyingPartyUrl(rpName);
String destination=ServerConfig.getTenantEntityId(tenantName).replace("/Met... | Creates Saml Logout response from RP 1 |
public final CC gapY(String before,String after){
if (before != null) ver.setGapBefore(ConstraintParser.parseBoundSize(before,true,false));
if (after != null) ver.setGapAfter(ConstraintParser.parseBoundSize(after,true,false));
return this;
}
| The vertical gap before (normally above) and/or after (normally below) the component. The gap is towards cell bounds and/or other component bounds. <p> For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. |
public static byte[] encrypt(final SecretKeySpec key,final byte[] iv,final byte[] message) throws GeneralSecurityException {
final Cipher cipher=Cipher.getInstance(AES_MODE);
IvParameterSpec ivSpec=new IvParameterSpec(iv);
cipher.init(Cipher.ENCRYPT_MODE,key,ivSpec);
byte[] cipherText=cipher.doFinal(message);
... | More flexible AES encrypt that doesn't encode |
public AsyncMap(Vertx vertx,String name){
this.vertx=vertx;
ClusterManager clusterManager=((VertxInternal)vertx).getClusterManager();
if (clusterManager == null) {
syncMap=new LocalMapWrapper<>(vertx.sharedData().<K,V>getLocalMap(name));
}
else {
syncMap=clusterManager.getSyncMap(name);
}
}
| Creates a new async map. |
private void throwErrorResponse(HttpStatusException e,boolean isVerbose){
if (e.getStatus() == HttpStatus.SC_FORBIDDEN) {
throw new JsonPatchExtensionException(isVerbose ? e.getVerboseErrorResponse() : e.getErrorResponse());
}
ObjectNode errorContainer=getErrorContainer();
ArrayNode errorList=(ArrayNode)err... | Turn an exception into a proper error response from patch extension. |
@Override public String toString(){
StringBuffer sb=new StringBuffer("DLockRemoteToken@");
sb.append(Integer.toHexString(hashCode()));
sb.append(", name: ").append(this.name);
sb.append(", lesseeThread: ").append(this.lesseeThread);
sb.append(", leaseId: ").append(this.leaseId);
sb.append(", leaseExpireTime... | Returns a string representation of this object. |
public DTMException(String message,Throwable e){
super(((message == null) || (message.length() == 0)) ? e.getMessage() : message);
this.containedException=e;
this.locator=null;
}
| Wrap an existing exception in a DTMException. <p>This is used for throwing processor exceptions before the processing has started.</p> |
public OdbcResponse handle(long reqId,OdbcRequest req){
assert req != null;
if (!busyLock.enterBusy()) return new OdbcResponse(OdbcResponse.STATUS_FAILED,"Failed to handle ODBC request because node is stopping: " + req);
try {
switch (req.command()) {
case HANDSHAKE:
return performHandshake(reqId,(OdbcHan... | Handle request. |
public boolean equals(Object obj){
if (obj == this) return true;
if (obj == null || obj instanceof Annotation == false) return false;
Annotation other=(Annotation)obj;
if (getTypeName().equals(other.getTypeName()) == false) return false;
LinkedHashMap otherMembers=other.members;
if (members == otherMe... | Returns true if the given object represents the same annotation as this object. The equality test checks the member values. |
public static long parseLong(CharSequence csq,int radix,Cursor cursor){
final int start=cursor.getIndex();
final int end=csq.length();
boolean isNegative=false;
long result=0;
int i=start;
for (; i < end; i++) {
char c=csq.charAt(i);
int digit=(c <= '9') ? c - '0' : ((c <= 'Z') && (c >= 'A')) ? c - ... | Parses the specified character sequence from the specified position as a signed <code>long</code> in the specified radix. |
CloseableIteration<BigdataStatement,QueryEvaluationException> computeClosure(CloseableIteration<BigdataStatement,QueryEvaluationException> src) throws QueryEvaluationException {
int nrounds=0;
final Set<IV<?,?>> bnodes_tm1=new LinkedHashSet<IV<?,?>>();
final Set<BigdataStatement> stmts=new LinkedHashSet<BigdataSt... | The description of the original resource(s) is expanded for each blank node encountered in the constructed statements until no new blank nodes are encountered. The resulting set of statements is then reported as the description for the resources identified either as constants in the projection of the original query or ... |
private void showClassPicker(){
TreeJavaClassChooserDialog dialog=new TreeJavaClassChooserDialog("Pick up component",project_);
dialog.setModal(true);
dialog.show();
PsiClass selectedClass=dialog.getSelected();
updateComponent(selectedClass);
}
| Shows up class picker dialog from current project |
protected void removeLinkFromStorage(Link lt){
String id=getLinkId(lt);
storageSourceService.deleteRowAsync(LINK_TABLE_NAME,id);
}
| Removes a link from storage using an asynchronous call. |
public void clear(){
launchedTask=null;
declinedOffer=null;
}
| Clears launched task. |
@SuppressWarnings({"unchecked","rawtypes"}) final public IVariableOrConstant<IV> c(){
return (IVariableOrConstant<IV>)get(3);
}
| The variable or constant for the context position (required iff in quads mode). |
public OrientedPortrayal2D(SimplePortrayal2D child){
this(child,DEFAULT_OFFSET,DEFAULT_SCALE,Color.red);
}
| Draw a line of length scale = 0.5, offset = 0, in red. If child is null, then the underlying model object is presumed to be a Portrayal2D and will be used. |
public void createKillAndGen(){
BBKillSet=new LiveSet();
firstPEIKillSet=new LiveSet();
gen=new LiveSet();
}
| creates (allocates) the Gen and Kill Sets |
@Override public void mouseEntered(MouseEvent e){
if (!this.ownToolTipDelaysActive) {
ToolTipManager ttm=ToolTipManager.sharedInstance();
this.originalToolTipInitialDelay=ttm.getInitialDelay();
ttm.setInitialDelay(this.ownToolTipInitialDelay);
this.originalToolTipReshowDelay=ttm.getReshowDelay();
... | Handles a 'mouse entered' event. This method changes the tooltip delays of ToolTipManager.sharedInstance() to the possibly different values set for this chart panel. |
public CurrencyValue convertTo(ExchangeRateProvider exchangeRates,String targetCurrencyCode){
return new CurrencyValue(convertAmount(exchangeRates,this.getCurrencyCode(),this.getAmount(),targetCurrencyCode),targetCurrencyCode);
}
| Returns a new CurrencyValue that is the conversion of this CurrencyValue to the specified currency. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:02.924 -0500",hash_original_method="06342840B51BA72C757680F9FE102AFC",hash_generated_method="D6FFC4235218375704698D3AC22AB6DF") public Socket createSocket(InetAddress address,int port) throws IOException {
return new Socket(addres... | Creates a Socket connected to the given host and port. <p> |
public V remove(K key){
kvUtil.verifyKeyNotNull(key);
AccessTimeObjectHolder<V> oldHolder=this.objects.remove(key);
AccessTimeObjectHolder<V> gh=gatedHolder(oldHolder);
boolean validBeforeInvalidate=gh != null;
V releasedValue=releaseHolder(oldHolder);
return validBeforeInvalidate ? releasedValue : null;
}
| Removes the object with given key, and returns the value that was stored for it. Returns null if there was no value for the key stored. |
@Override public void execute(MetricTimeSeries timeSeries,FunctionValueMap functionValueMap){
if (timeSeries.size() <= 0) {
functionValueMap.add(this,Double.NaN);
return;
}
int size=timeSeries.size();
double sum=0;
for (int i=1; i < size; i++) {
sum+=timeSeries.getValue(i);
}
functionValueMap.... | Calculates the sum of the values of the given time series |
public ActiveMQRAObjectMessage(final ObjectMessage message,final ActiveMQRASession session){
super(message,session);
if (ActiveMQRAObjectMessage.trace) {
ActiveMQRALogger.LOGGER.trace("constructor(" + message + ", "+ session+ ")");
}
}
| Create a new wrapper |
private Shard updateShardCatalog(String eventShard,String shardService) throws ReplicatorException {
if (logger.isDebugEnabled()) logger.debug("Creating unknown shard " + eventShard + " for home "+ shardService);
ShardManager manager=new ShardManager(service,url,user,password,schemaName,tableType,context);
List... | updateShardCatalog both update the shards hold in memory as well as in shard table in database. |
public Request alwaysAttemptResume(){
alwaysResume=true;
return this;
}
| Always attempt to resume the download, regardless of whether the server returns a Etag header or not. **CAUTION** if the file has changed then this flag will result in undefined behaviour. |
@Override public void executeAction(Agent a,Action action){
}
| Does nothing (don't ask me why...). |
private synchronized void saveClassFile(){
if (classfile == null || hasMemberCache() != null) return;
ByteArrayOutputStream barray=new ByteArrayOutputStream();
DataOutputStream out=new DataOutputStream(barray);
try {
classfile.write(out);
barray.close();
rawClassfile=barray.toByteArray();
clas... | Converts a ClassFile object into a byte array for saving memory space. |
public Label(){
}
| Constructs a new label. |
public RuntimeCopyException(String s){
super(s);
}
| Constructs an exception. |
public boolean allItemsAvailable(){
return readCompleted.isDone();
}
| Determines if all items have been returned to the client. |
public static boolean grOrEq(double a,double b){
return (b - a < SMALL);
}
| Tests if a is greater or equal to b. |
protected BigDecimalStringType(SqlType sqlType,Class<?>[] classes){
super(sqlType,classes);
}
| Here for others to subclass. |
public static ServerLocator createServerLocator(final String url) throws Exception {
ServerLocatorParser parser=new ServerLocatorParser();
return parser.newObject(new URI(url),null);
}
| Creates an ActiveMQConnectionFactory; |
public MultiViewParallaxTransformer withParallaxView(final int id,final float parallaxFactor){
parallaxFactors.put(id,parallaxFactor);
return this;
}
| Applies a parallax effect to all Views with the provided resource ID. The parallax factor determines how fast the affected views are translated, relative to a View with no parallax effect. It is recommended that this method not be called while the Views are being transformed. <p/> Parallax factors less than 1 cause the... |
public boolean optBoolean(String key){
return this.optBoolean(key,false);
}
| Get an optional boolean associated with a key. It returns false if there is no such key, or if the value is not Boolean.TRUE or the String "true". |
private void writeHourlyCausedDelayForEachPerson(){
SortedMap<Double,Map<Id<Person>,Double>> timeBin2CausingPerson2Delay=getCausingPersonDelay(noOfTimeBins);
BufferedWriter writer=IOUtils.getBufferedWriter(runDir + "/analysis/timeBin2Person2UserGroup2CausedDelay_" + pricingScenario+ suffixForSoring+ ".txt");
try ... | Writes timeBin2PersonId2UserGroup2CausedDelay |
@Override public void serializeWithType(Object value,JsonGenerator jgen,SerializerProvider provider,TypeSerializer typeSer) throws IOException, JsonGenerationException {
typeSer.writeTypePrefixForScalar(value,jgen);
serialize(value,jgen,provider);
typeSer.writeTypeSuffixForScalar(value,jgen);
}
| Default implementation will write type prefix, call regular serialization method (since assumption is that value itself does not need JSON Array or Object start/end markers), and then write type suffix. This should work for most cases; some sub-classes may want to change this behavior. |
@Override public String toString(){
if (eIsProxy()) return super.toString();
StringBuffer result=new StringBuffer(super.toString());
result.append(" (ownedMembersByNameAndAccess: ");
result.append(ownedMembersByNameAndAccess);
result.append(')');
return result.toString();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
void toggleSearch(){
if (mNodeSearch.isActive()) {
cancelSearch();
}
else {
startSearch();
}
}
| Toggle search mode. |
public void write(char[] cbuf,int off,int len) throws IOException {
internalOut.write(cbuf,off,len);
}
| Writes a portion of an array of characters. |
public PartialConverter addPartialConverter(PartialConverter converter) throws SecurityException {
checkAlterPartialConverters();
if (converter == null) {
return null;
}
PartialConverter[] removed=new PartialConverter[1];
iPartialConverters=iPartialConverters.add(converter,removed);
return removed[0];
}... | Adds a converter to the set of converters. If a matching converter is already in the set, the given converter replaces it. If the converter is exactly the same as one already in the set, no changes are made. <p> The order in which converters are added is not relevent. The best converter is selected by examining the obj... |
public static void assertNotEquals(String itemName,float notExpected,float actual,float delta){
try {
if (Float.isInfinite(notExpected) && notExpected == actual || Math.abs(notExpected - actual) <= delta) {
Assert.fail(itemName + " should not be equal:<" + notExpected+ '>');
}
}
catch ( AssertionErr... | Asserts that two floats are not equal concerning a delta. If the expected value is infinity then the delta value is ignored. |
public TraceDirective_ createTraceDirective_(){
TraceDirective_Impl traceDirective_=new TraceDirective_Impl();
return traceDirective_;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private byte[] updateMinMaxForNoDictionary(byte[] valueWithLength){
ByteBuffer buffer=ByteBuffer.wrap(valueWithLength);
byte[] actualValue=new byte[buffer.getShort()];
buffer.get(actualValue);
return actualValue;
}
| Below method will be used to update the min or max value by removing the length from it |
@Override void basicDestroy(){
this.dlock.destroyAndRemove();
}
| Destroys the underlying lock service in this member |
private void finishReturnInstance(){
FormController formController=Collect.getInstance().getFormController();
String action=getIntent().getAction();
if (Intent.ACTION_PICK.equals(action) || Intent.ACTION_EDIT.equals(action)) {
String selection=InstanceColumns.INSTANCE_FILE_PATH + "=?";
String[] selectionA... | Returns the instance that was just filled out to the calling activity, if requested. |
public boolean isDefault(Context context){
if (mForceDefault) {
return true;
}
try {
final Resources res=context.createPackageContext(getPackageName(),0).getResources();
return res.getBoolean(getIsDefaultResourceId());
}
catch ( NameNotFoundException e) {
return false;
}
}
| Return whether or not this ime is a default ime or not. |
@Field(28) public __VARIANT_NAME_3_union ppdispVal(Pointer<Pointer<IDispatch>> ppdispVal){
this.io.setPointerField(this,28,ppdispVal);
return this;
}
| VT_BYREF|VT_DISPATCH<br> C type : IDispatch |
public LVQLLC(DistanceMetric dm,int iterations,Classifier localClasifier){
super(dm,iterations);
setLocalClassifier(localClasifier);
}
| Creates a new LVQ-LLC instance |
public NoTalkbackSlimException(String message){
this(null,ErrorType.INFO_ERROR,message);
}
| Report program failure to user |
public static boolean checkCGHasGroupRelationship(StorageSystem storage,URI cgURI,DbClient dbClient){
List<Volume> volumes=ControllerUtils.getVolumesPartOfCG(cgURI,dbClient);
boolean isVNX=storage.deviceIsType(Type.vnxblock);
for ( Volume volume : volumes) {
if (NullColumnValueGetter.isNotNullValue(volume.ge... | Check if CG has any group relationship Note - on array side, if replica has been removed from replication group, but source volume has not been removed from CG yet, the CG will not have group relationship until the source volume get removed from the CG. As a result, getting associator names cannot be used to check if C... |
public long virtualOffset(){
return mVirtualOffset;
}
| Gives the virtual offset used by BAM index for current alignment |
public static ImFactory init(){
try {
ImFactory theImFactory=(ImFactory)EPackage.Registry.INSTANCE.getEFactory(ImPackage.eNS_URI);
if (theImFactory != null) {
return theImFactory;
}
}
catch ( Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ImFactoryImpl();
}
| Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> |
private void printModifiers(List<IExtendedModifier> ext){
for (Iterator<IExtendedModifier> it=ext.iterator(); it.hasNext(); ) {
ASTNode p=(ASTNode)it.next();
p.accept(this);
this.fBuffer.append(" ");
}
}
| Appends the text representation of the given modifier flags, followed by a single space. Used for 3.0 modifiers and annotations. |
public static String quoteStringSQL(String s){
if (s == null) {
return "NULL";
}
int length=s.length();
StringBuilder buff=new StringBuilder(length + 2);
buff.append('\'');
for (int i=0; i < length; i++) {
char c=s.charAt(i);
if (c == '\'') {
buff.append(c);
}
else if (c < ' ' || ... | Convert a string to a SQL literal. Null is converted to NULL. The text is enclosed in single quotes. If there are any special characters, the method STRINGDECODE is used. |
public String readFragmentedUTF() throws IOException {
StringBuffer result=new StringBuffer(super.readUTF());
boolean fragmentFlag=super.readBoolean();
while (fragmentFlag != END_REACHED) {
result.append(super.readUTF());
fragmentFlag=super.readBoolean();
}
return result.toString();
}
| Read a fragmented UTF-8 String |
public AddAndScaleMultiImage(){
initComponents();
initSpinner(veryLowWidth,"veryLowWidthSpinner",28);
initSpinner(veryLowHeight,"veryLowHeightSpinner",28);
initSpinner(lowWidth,"lowWidthSpinner",36);
initSpinner(lowHeight,"lowHeightSpinner",36);
initSpinner(mediumWidth,"mediumWidthSpinner",48);
initSpinne... | Creates new form AddAndScaleMultiImage |
@Override public void runTool(String... args) throws SQLException {
String dir=".";
String db=null;
for (int i=0; args != null && i < args.length; i++) {
String arg=args[i];
if ("-dir".equals(arg)) {
dir=args[++i];
}
else if ("-db".equals(arg)) {
db=args[++i];
}
else if ("-re... | Dumps the contents of a database file to a human readable text file. This text file can be used to recover most of the data. This tool does not open the database and can be used even if the database files are corrupted. A database can get corrupted if there is a bug in the database engine or file system software, or if... |
@Override public AppConfigurationEntry[] engineGetAppConfigurationEntry(String applicationName){
List<AppConfigurationEntry> list=null;
synchronized (configuration) {
list=configuration.get(applicationName);
}
if (list == null || list.size() == 0) {
return null;
}
AppConfigurationEntry[] entries=new A... | Retrieve an entry from the Configuration using an application name as an index. |
public void test_unwrap_ByteBuffer_ByteBuffer_01() throws InterruptedException, IOException {
prepareEngines();
doHandshake();
ByteBuffer bbs=ByteBuffer.allocate(100);
ByteBuffer bbd=ByteBuffer.allocate(100);
try {
SSLEngineResult unwrap=clientEngine.engine.unwrap(bbs,bbd);
fail("SSLException wasn't t... | javax.net.ssl.SSLEngine#unwrap(ByteBuffer src, ByteBuffer dst) SSLException should be thrown. |
public ServiceStateException(ServiceStatus current,String expected,String serviceId){
super("Service operation tried on the service " + serviceId + " with invalid status",new Object[]{expected,current.name(),serviceId});
}
| Constructs a new exception with a pre-defined detail message that includes the given message parameters. |
public boolean validateWith(@NonNull METValidator validator){
CharSequence text=getText();
boolean isValid=validator.isValid(text,text.length() == 0);
if (!isValid) {
setError(validator.getErrorMessage());
}
postInvalidate();
return isValid;
}
| Run validation on a single validator instance |
public void regenerate(Projection proj){
Debug.message("eomg","EditableOMRect.regenerate()");
if (rect != null) rect.regenerate(proj);
setGrabPoints(rect);
generate(proj);
}
| Given a new projection, the grab points may need to be repositioned off the current position of the graphic. Called when the projection changes. |
public String toString(){
StringBuffer buffer=new StringBuffer();
buffer.append("ArchiveToken[");
buffer.append("m_archHdr = ").append(m_archHdr);
buffer.append(", m_flds = ").append(m_flds);
buffer.append(", m_dividers = ").append(m_dividers);
buffer.append(", m_validations = ").append(m_validations);
bu... | Devuelve una representacion en forma de String del objeto |
private void recursiveLogResult(StringBuilder buf,Hierarchy<Result> hier,Result result,int depth){
if (result == null) {
buf.append("null");
LOG.warning("null result!");
return;
}
if (depth > 50) {
LOG.warning("Probably infinitely nested results, aborting!");
return;
}
for (int i=0; i < de... | Recursively walk through the result tree. |
private void seekPrivate(long pos) throws IOException {
int n=(int)(real_pos - pos);
if (n >= 0 && n <= buf_end) {
buf_pos=buf_end - n;
}
else {
super.seek(pos);
invalidate();
}
}
| Moves the internal pointer to the passed (byte) position in the file. |
private void addSystemMenuItems(JPopupMenu menu){
JMenuItem mi=(JMenuItem)menu.add(restoreAction);
mi.setMnemonic('R');
mi=(JMenuItem)menu.add(moveAction);
mi.setMnemonic('M');
mi=(JMenuItem)menu.add(sizeAction);
mi.setMnemonic('S');
mi=(JMenuItem)menu.add(iconifyAction);
mi.setMnemonic('n');
mi=(JMen... | Add the items to the system menu. |
@Override public void printGeneralUserData(IStructuredOutputWriter out) throws Exception {
out.simpleChild("intervalCount",m_totalIntervalCount);
out.simpleChild("uniqueMsgIds",m_msgData.size());
}
| Print out general summary of the model. |
public NotificationChain basicSetDeclaredTypeRef(TypeRef newDeclaredTypeRef,NotificationChain msgs){
TypeRef oldDeclaredTypeRef=declaredTypeRef;
declaredTypeRef=newDeclaredTypeRef;
if (eNotificationRequired()) {
ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,N4JSPackage.METHOD_DECL... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public static void putDataPrefixToLayerList(Layer layer,Properties props,String layerListProperty){
String dataPrefix=(String)layer.getAttribute(Layer.DataPathPrefixProperty);
if (dataPrefix != null && dataPrefix.length() > 0) {
putDataPrefixToLayerList(dataPrefix,props,layerListProperty);
}
}
| If the layer has a dataPathPrefix attribute set, that attribute value can be used as a common path to prepend to any layer's data path. This allows you to set a relative path to files in the layer's properties, and then prepend the absolute path later at runtime. <p> The dataPathPrefix can be set in the properties for ... |
public static long invokeGetter(Object obj,String methodName,long defaultValue){
try {
Method method=obj.getClass().getMethod(methodName,new Class[0]);
Object result=method.invoke(obj,new Object[0]);
return ((Long)result).longValue();
}
catch ( NoSuchMethodException e) {
return defaultValue;
}
c... | Invokes the specified getter method if it exists. |
public QuotedStringTokenizer(String text,String separators){
this(text,separators,false);
}
| Constructs a <code>QuotedStringTokenizer</code>. |
@Before public void onBefore(){
entityManager.persist(new Role("ROLE_ADMIN"));
entityManager.persist(new Role("ROLE_USER"));
entityManager.flush();
entityManager.clear();
}
| Setting up some test data. |
public boolean verify(X509Certificate cert) throws IOException {
if (cert == null) {
throw new IOException("Certificate is null");
}
if (!minMaxValid) {
calcMinMax();
}
if (hasMin) {
throw new IOException("Non-zero minimum BaseDistance in" + " name constraints not supported");
}
if (hasMax) {
... | check whether a certificate conforms to these NameConstraints. This involves verifying that the subject name and subjectAltName extension (critical or noncritical) is consistent with the permitted subtrees state variables. Also verify that the subject name and subjectAltName extension (critical or noncritical) is cons... |
public boolean equals(Object object){
if (this == object) {
return true;
}
if (object instanceof Key) {
byte[] b1;
if (encodedKey != null) {
b1=encodedKey;
}
else {
b1=getEncoded();
}
byte[] b2=((Key)object).getEncoded();
int i;
if (b1.length != b2.length) return f... | Compares two private keys. This returns false if the object with which to compare is not of type <code>Key</code>. Otherwise, the encoding of this key object is compared with the encoding of the given key object. |
private void createFlashableZip(){
initFilesList();
S.ZIP_OUTPUT.mkdirs();
File zipFile=new File(S.ZIP_OUTPUT + File.separator + this.systemFolder+ ".zip");
FilesUtils.copyFile(S.DUMMY_ZIP,zipFile);
System.out.println("zip file to be created : " + zipFile.getAbsolutePath());
for ( File f : this.fileToAdd) ... | this will create the flashable zip |
public String importTranslations(){
if (excel == null || excel.getName() == null) {
addMessage(null,FacesMessage.SEVERITY_ERROR,ERROR_SHOP_TRANSLATIONS_FILEFORMAT);
return OUTCOME_ERROR;
}
try {
InputStream excelStream=excel.getInputStream();
Workbook wb=new HSSFWorkbook(excelStream);
Map<Stri... | Read the translations from the uploaded excel file and store them in the database for the current supplier. Translations for unknown locales will be ignored. |
public static List<Graph> generate(Graph graph){
if (graph.existsDirectedCycle()) {
throw new IllegalArgumentException("Input must not contain cycles.");
}
List<Graph> graphs=new LinkedList<>();
Set<Edge> allEdges=graph.getEdges();
List<Node> allNodes=graph.getNodes();
for ( Edge allEdge1 : allEdges) {... | This method takes an acyclic graph as input and returns a list of graphs each of which is a modification of the original graph with either an edge deleted, added or reversed. Edges are not added or reversed if a cycle would result. |
public void testUsernameAndPassword(){
RuntimeConfiguration configuration=new Jonas4xRuntimeConfiguration();
configuration.setProperty(RemotePropertySet.USERNAME,"foo");
configuration.setProperty(RemotePropertySet.PASSWORD,"bar");
Hashtable<String,Object> connectionOptions=factory.readConfiguration(configuratio... | Test username and password. |
public NamespaceId concat(final NamespaceIdPart part){
final NamespaceIdPart[] parts=new NamespaceIdPart[this.namespaceIdParts.length + 1];
System.arraycopy(this.namespaceIdParts,0,parts,0,this.namespaceIdParts.length);
parts[this.namespaceIdParts.length]=part;
return new NamespaceId(parts);
}
| Creates a new namespace id by concatenating the given namespace id part to this namespace id. |
public void runTest() throws Throwable {
Document doc;
DocumentType docType;
NamedNodeMap entities;
Node entityNode;
String entityValue;
doc=(Document)load("staff",false);
docType=doc.getDoctype();
assertNotNull("docTypeNotNull",docType);
entities=docType.getEntities();
assertNotNull("entitiesNotNul... | Runs the test case. |
boolean contains(int n){
return ints.get(encode(n));
}
| Determines if an integer is contained within the set. |
public static Stats of(Iterable<? extends Number> values){
StatsAccumulator accumulator=new StatsAccumulator();
accumulator.addAll(values);
return accumulator.snapshot();
}
| Returns statistics over a dataset containing the given values. |
@Override public void onSaveOrUpdate(final SaveOrUpdateEvent event) throws HibernateException {
final EventSource session=event.getSession();
final Object object=event.getObject();
if (object instanceof BaseModel && !session.getPersistenceContext().reassociateIfUninitializedProxy(object)) {
final Date current... | For new objects that are created, this event is used to set the audit properties. This is done here instead of the pre-insert event because Hibernate checks for not-null constraints before the pre-update and pre-insert are fired. |
public void testMultivariateMIforNoisyDependentVariablesFromFile() throws Exception {
ArrayFileReader afr=new ArrayFileReader("demos/data/4ColsPairedNoisyDependence-1.txt");
double[][] data=afr.getDouble2DMatrix();
int[] kNNs={1,2,3,4,5,6,10,15};
double[] expectedFromMILCA_2={0.31900665,0.37304998,0.37213228,0.... | Test the computed multivariate MI against that calculated by Kraskov's own MILCA tool on the same data. To run Kraskov's tool (http://www.klab.caltech.edu/~kraskov/MILCA/) for this data, run: ./MIhigherdim <dataFile> 4 1 1 3000 <kNearestNeighbours> 0 |
public static void round(RectF rect){
if (rect == null) {
return;
}
float left=Math.round(rect.left);
float top=Math.round(rect.top);
float right=Math.round(rect.right);
float bottom=Math.round(rect.bottom);
rect.set(left,top,right,bottom);
}
| Round the float coordinates in the given rect, and store the rounded value back in the rect. |
public void start(){
Log.i("kyson","Start ReleaseViewManager");
end();
mHandView=new HandView(mContext);
mLineView=new LineView(mContext);
mBalloonGroup=new BalloonGroup(mContext);
mHiderView=new HiderView(mContext);
int y=ViewUtil.getStatusBarHeight(mContext) + BalloonPerformer.getInstance().getConfig().... | start show views ,actually only handview |
public void statisticsAvailable(StatisticsNotificationEvent e){
for ( AbstractExperimenterTab tab : m_Tabs) {
if (tab instanceof StatisticsNotificationListener) ((StatisticsNotificationListener)tab).statisticsAvailable(e);
}
}
| Gets called if new statistics have become available. |
public boolean isSetErrorCode(){
return EncodingUtils.testBit(__isset_bitfield,__ERRORCODE_ISSET_ID);
}
| Returns true if field errorCode is set (has been assigned a value) and false otherwise |
String createPath(File... files){
StringBuilder sb=new StringBuilder();
for ( File f : files) {
if (sb.length() > 0) sb.append(File.pathSeparatorChar);
sb.append(f.getPath());
}
return sb.toString();
}
| Create a path value from a list of directories and jar files. |
static synchronized void computePRF_SSLv3(byte[] out,byte[] secret,byte[] seed){
if (sha == null) {
init();
}
int pos=0;
int iteration=1;
byte[] digest;
while (pos < out.length) {
byte[] pref=new byte[iteration];
Arrays.fill(pref,(byte)(64 + iteration++));
sha.update(pref);
sha.update(se... | Computes the value of SSLv3 pseudo random function. |
public final void applyOptions() throws IOException {
_paneManager.applyOptions();
SettingsGroupManager.instance().save();
}
| Applies the current settings in the options windows, storing them to disk. This method delegates to the <tt>OptionsPaneManager</tt>. |
private static boolean isPrintable(char c){
return c > 31 && c < 127;
}
| Check wether a character is printable. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:54:53.643 -0500",hash_original_method="DA29AB595B7A4A125EF99100FA337502",hash_generated_method="EB7FE71751A7FA292A28A3D6E4687565") public String encode(){
return headerName + COLON + SP+ encodeBody()+ NEWLINE;
}
| Encode the header into a String. |
protected void drawImpl(PGraphics g){
if (family == GROUP) {
drawGroup(g);
}
else if (family == PRIMITIVE) {
drawPrimitive(g);
}
else if (family == GEOMETRY) {
drawPath(g);
}
else if (family == PATH) {
drawPath(g);
}
}
| Draws the SVG document. |
public static void main(final String[] args){
DOMTestCase.doMain(getElementsByTagNameNS13.class,args);
}
| Runs this test from the command line. |
public void startDocument() throws SAXException {
if (contentHandler != null) {
contentHandler.startDocument();
}
}
| Adapter implementation method; do not call. Adapt a SAX1 start document event. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.