code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void addAlias(Alias alias){
if (alias != null) {
for ( AliasID aliasID : alias.getId()) {
addAliasID(aliasID,alias);
}
}
}
| Adds the alias to this list |
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 boolean isUseAlternateEndpointsEnabled(){
return useAlternateEndpoints;
}
| Alternate endpoints - allow choose alternate endpoint on auth - disabled be default |
public static long[] make(int bits,long init){
long[] v=new long[((bits - 1) >>> LONG_LOG2_SIZE) + 1];
v[0]=init;
return v;
}
| Allocate a new long[]. |
@Override public View onCreateFloatView(int position){
View v=mListView.getChildAt(position + mListView.getHeaderViewsCount() - mListView.getFirstVisiblePosition());
if (v == null) {
return null;
}
v.setPressed(false);
v.setDrawingCacheEnabled(true);
mFloatBitmap=Bitmap.createBitmap(v.getDrawingCache())... | This simple implementation creates a Bitmap copy of the list item currently shown at ListView <code>position</code>. |
public int MPV_frame_start(){
int i;
AVFrame pic;
this.mb_skipped=0;
if (true) {
for (i=0; i < MAX_PICTURE_COUNT; i++) {
if (this.picture[i].data_base[0] != null && 0 == this.picture[i].reference && this.picture[i].type != FF_BUFFER_TYPE_SHARED) {
free_frame_buffer(this.picture[i]);
}
... | generic function for encode/decode called after coding/decoding the header and before a frame is coded/decoded |
public SendablePhotoMessage.SendablePhotoMessageBuilder caption(String caption){
this.caption=caption;
return this;
}
| *Optional Sets the caption that you want to send with the Message |
public EcuCodeItem(String code,String description){
put(FID_CODE,code);
put(FID_DESCRIPT,description);
}
| Creates a new instance of EcuCodeItem |
protected boolean isBottom(final AnnotatedTypeMirror subtype){
final AnnotationMirror bottom=qualifierHierarchy.getBottomAnnotation(currentTop);
if (bottom == null) {
return false;
}
switch (subtype.getKind()) {
case TYPEVAR:
return isBottom(((AnnotatedTypeVariable)subtype).getUpperBound());
case WILDCARD... | Checks to see if subtype is bottom (if a bottom exists) If there is no explicit bottom then false is returned |
public boolean hasNext(){
if (nextItem != null) return true;
noNext();
return false;
}
| For performance reasons, we would like not to acquire a lock in hasNext in the common case. To allow for this, we only access fields (i.e. nextItem) that are not modified by update operations triggered by queue modifications. |
final public void computeTimeLimit(SearchParams sPar){
minTimeLimit=-1;
maxTimeLimit=-1;
maxDepth=-1;
maxNodes=-1;
if (sPar.infinite) {
minTimeLimit=-1;
maxTimeLimit=-1;
maxDepth=-1;
}
else if (sPar.depth > 0) {
maxDepth=sPar.depth;
}
else if (sPar.mate > 0) {
maxDepth=sPar.mate ... | Compute thinking time for current search. |
public EmptyImportCustomizerProvider(final ImportCustomizerProvider baseCustomizer,final Set<String> extraImports,final Set<String> extraStaticImports){
this(extraImports,extraStaticImports);
this.extraImports.addAll(baseCustomizer.getImports());
this.extraImports.addAll(baseCustomizer.getExtraImports());
this.... | Utilizes imports defined by the supplied arguments. |
@Override public void eSet(int featureID,Object newValue){
switch (featureID) {
case TypesPackage.TFIELD__CONST:
setConst((Boolean)newValue);
return;
case TypesPackage.TFIELD__HAS_EXPRESSION:
setHasExpression((Boolean)newValue);
return;
case TypesPackage.TFIELD__TYPE_REF:
setTypeRef((TypeRef)newValue);
return;
}
... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public String generateKey() throws Exception {
return RandomStringUtils.random(KEY_LENGTH,0,charsForKey.length - 1,true,true,charsForKey,SecureRandom.getInstance(SecurityUtil.getSecuredRandomAlgorithm()));
}
| generate a 64-byte key for IPsec |
private static <T>int gallopLeft(T key,T[] a,int base,int len,int hint,Comparator<? super T> c){
if (DEBUG) assert len > 0 && hint >= 0 && hint < len;
int lastOfs=0;
int ofs=1;
if (c.compare(key,a[base + hint]) > 0) {
int maxOfs=len - hint;
while (ofs < maxOfs && c.compare(key,a[base + hint + ofs]) > ... | Locates the position at which to insert the specified key into the specified sorted range; if the range contains an element equal to key, returns the index of the leftmost equal element. |
public NGramFilterFactory(Map<String,String> args){
super(args);
minGramSize=getInt(args,"minGramSize",NGramTokenFilter.DEFAULT_MIN_NGRAM_SIZE);
maxGramSize=getInt(args,"maxGramSize",NGramTokenFilter.DEFAULT_MAX_NGRAM_SIZE);
if (!args.isEmpty()) {
throw new IllegalArgumentException("Unknown parameters: " + ... | Creates a new NGramFilterFactory |
protected void fillBuffer() throws IOException {
count=inputStream.read(buffer,0,BUFFER_SIZE);
position=0;
}
| Fills the input buffer. |
@Override public synchronized void initialize(){
if (!mRootDirectory.exists()) {
if (!mRootDirectory.mkdirs()) {
VolleyLog.e("Unable to create cache dir %s",mRootDirectory.getAbsolutePath());
}
return;
}
File[] files=mRootDirectory.listFiles();
if (files == null) {
return;
}
for ( Fil... | Initializes the DiskBasedCache by scanning for all files currently in the specified root directory. Creates the root directory if necessary. |
private boolean findAndRemove(Object e){
if (e != null) {
for (Node pred=null, p=head; p != null; ) {
Object item=p.item;
if (p.isData) {
if (item != null && item != p && e.equals(item) && p.tryMatchData()) {
unsplice(pred,p);
return true;
}
}
else if (... | Main implementation of remove(Object) |
private float spacing(WrapMotionEvent event){
double x=event.getX(0) - event.getX(1);
double y=event.getY(0) - event.getY(1);
return (float)Math.sqrt((x * x + y * y));
}
| Determine the space between the first two fingers |
public static byte[] decrypt(byte[] key,byte[] nonce,byte[] a,byte[] c,int numAuthenticationBytes) throws GeneralSecurityException {
byte[] T;
byte[] m;
byte[] mac;
long lengthM=c.length - numAuthenticationBytes;
Cipher cipher=Cipher.getInstance(BLOCK_CIPHER);
cipher.init(Cipher.ENCRYPT_MODE,new SecretKeySp... | See <a href="http://tools.ietf.org/html/rfc3610#section-2.5">RFC 3610</a> for details. |
public static void main(String[] args) throws AuthenticationException {
SimpleCommandLineParser parser=new SimpleCommandLineParser(args);
String username=parser.getValue("username","user","u");
String password=parser.getValue("password","pass","p");
boolean help=parser.containsKey("help","h");
if (help || use... | Runs the demo. |
public PdfPTable createTenderTotalTable(){
final PdfPTable tenderTotalTable=new PdfPTable(3);
tenderTotalTable.getDefaultCell().setBorderWidth(1);
tenderTotalTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
tenderTotalTable.getDefaultCell().setColspan(3);
tenderTotalTable.addCell(pdfLabel.... | start for first footer row |
public boolean onKeyUp(int keyCode,KeyEvent event){
if (keyCode == KeyEvent.KEYCODE_BACK && mSlidingMenu.isMenuShowing()) {
showContent();
return true;
}
return false;
}
| On key up. |
public KMLContainerTreeNode(KMLAbstractContainer container){
super(container);
}
| Creates a new <code>KMLContainerTreeNode</code> from the specified <code>container</code>. The node's name is set to the feature's name, and the node's hierarchy is populated from the container's KML features. |
public void testFsyncWorks() throws Exception {
Path dir=wrap(createTempDir());
FileChannel file=FileChannel.open(dir.resolve("file"),StandardOpenOption.CREATE_NEW,StandardOpenOption.READ,StandardOpenOption.WRITE);
byte bytes[]=new byte[128];
random().nextBytes(bytes);
file.write(ByteBuffer.wrap(bytes));
fi... | Test that we don't corrumpt fsync: it just doesnt happen |
@Override protected void free(){
try {
device.deletePortMapping(getTransportAddress().getPort(),"UDP");
}
catch ( Exception e) {
}
IceSocketWrapper socket=getIceSocketWrapper();
if (socket != null) {
socket.close();
}
device=null;
}
| Frees resources allocated by this candidate such as its <tt>DatagramSocket</tt>, for example. The <tt>socket</tt> of this <tt>LocalCandidate</tt> is closed only if it is not the <tt>socket</tt> of the <tt>base</tt> of this <tt>LocalCandidate</tt>. |
@Override protected Instance process(Instance instance) throws Exception {
Instance result;
int i;
result=(Instance)instance.copy();
for (i=0; i < getFilters().length; i++) {
if (getFilter(i).input(result)) {
result=getFilter(i).output();
}
else {
result=null;
break;
}
}
retur... | processes the given instance (may change the provided instance) and returns the modified version. |
public MethodProposalInfo(IJavaProject project,CompletionProposal proposal){
super(project,proposal);
}
| Creates a new proposal info. |
public boolean isAdjacent(MonotoneVertex<E> vertex){
return vertex == this.previous || vertex == this.next;
}
| Returns true if the given vertex is adjacent to this vertex. |
private Bitmap doResponse(byte[] byteArray) throws OutOfMemoryError {
BitmapFactory.Options decodeOptions=new BitmapFactory.Options();
Bitmap bitmap;
if (mMaxWidth == 0 && mMaxHeight == 0) {
decodeOptions.inPreferredConfig=mDecodeConfig;
bitmap=BitmapFactory.decodeByteArray(byteArray,0,byteArray.length,de... | The real guts of AnalyzeResponse. Broken out for readability. |
public Builder addVarint(final long value){
if (result.varint == null) {
result.varint=new ArrayList<Long>();
}
result.varint.add(value);
return this;
}
| Add a varint value. |
public boolean grabPixels() throws InterruptedException {
return grabPixels(0);
}
| Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered. |
public static boolean isFile(IPath classpathRelativePath,IJavaProject javaProject) throws JavaModelException {
return ClasspathResourceUtilities.resolveFile(classpathRelativePath,javaProject) instanceof IFile;
}
| Determines whether the given path is a source file (not in a JAR). |
@Override public boolean isActive(){
return amIActive;
}
| Used by the Whitebox GUI to tell if this plugin is still running. |
private void consolidateLayouts(){
logger.info("consolidate layouts ");
List<Layout> origList=new LinkedList<Layout>();
for ( Layout layout : layouts) {
logger.info("layout.name {}, layout.view.id {} ",layout.name,layout.view.id);
if (layout.view.children.size() > 0) {
if (layout.name != null) {
... | consolidate layouts: Will go through differnt versions of layouts |
public static boolean canDelete(DownloadFileInfo downloadFileInfo){
if (!DownloadFileUtil.isLegal(downloadFileInfo)) {
return false;
}
if (isDownloadingStatus(downloadFileInfo)) {
return false;
}
return true;
}
| whether the download file can delete |
@Override public void process() throws MigrationCallbackException {
DbClient dbClient=getDbClient();
try {
List<URI> networkUris=dbClient.queryByType(Network.class,true);
Iterator<Network> networks=dbClient.queryIterativeObjects(Network.class,networkUris);
List<Network> updated=new ArrayList<Network>();... | Add assigned virtual arrays to connected virtual arrays. Starting 2.0, connected virtual arrays includes assigned, connected via port-virtualArray associations, and connected via routed networks |
private void populateSystemVocabulary(){
final Vocabulary tmVocab=sa.getVocabulary();
IntStream.range(0,tmVocab.size()).parallel().forEach(null);
}
| Inject the TM vocabulary into the system vocabulary. |
public void incrementOffset(int n){
offset+=n;
availLen-=n;
if (availLen < 0) throw new PngjOutputException("Anomalous situation");
if (availLen == 0) {
flush();
}
}
| triggers an flush+reset if appropiate |
public void write(int b) throws IOException {
tempBuf[0]=(byte)b;
write(tempBuf,0,1);
}
| Writes one byte to be compressed. |
public static void toggleAutomaticLayouting(final ZyGraph graph){
Preconditions.checkNotNull(graph,"IE01748: Graph argument can not be null");
graph.getSettings().getLayoutSettings().setAutomaticLayouting(!graph.getSettings().getLayoutSettings().getAutomaticLayouting());
}
| Toggles the state of automatic layouting in the graph. |
private void assignZeroMatrix(int m,int n){
numRows=m;
numColumns=n;
length=(n + 31) >>> 5;
matrix=new int[numRows][length];
for (int i=0; i < numRows; i++) {
for (int j=0; j < length; j++) {
matrix[i][j]=0;
}
}
}
| Create the mxn zero matrix. |
void createDepthTexture(){
depthTexture=glGenTextures();
glBindTexture(GL_TEXTURE_2D,depthTexture);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
glTexParame... | Create the texture storing the depth values of the light-render. |
public char charValue(){
return ' ';
}
| Returns the value of this Character object. |
private void processLeaveRequest(LeaveRequestMessage incomingRequest){
logger.info("received leave request from {} for {}",incomingRequest.getSender(),incomingRequest.getMemberID());
NetView v=currentView;
if (v == null) {
recordViewRequest(incomingRequest);
return;
}
InternalDistributedMember mbr=inc... | Process a Leave request from another member. This may cause this member to become the new membership coordinator. If this is the coordinator a new view will be triggered. |
protected void handleElementAdded(CompositeGraphicsNode gn,Node parent,Element childElt){
GVTBuilder builder=ctx.getGVTBuilder();
GraphicsNode childNode=builder.build(ctx,childElt);
if (childNode == null) {
return;
}
int idx=-1;
for (Node ps=childElt.getPreviousSibling(); ps != null; ps=ps.getPreviousSi... | Rebuild the graphics tree. |
public List<ContainerListEntry> listContainers() throws IOException {
return listContainers(ListContainersParams.create().withAll(true));
}
| Method returns list of docker containers, include non-running ones. |
public static Pattern glob2Pattern(String... globs){
final StringBuilder regex=new StringBuilder();
boolean needOr=false;
for ( String glob : globs) {
if (needOr) {
regex.append('|');
}
int i=0, len=glob.length();
while (i < len) {
char c=glob.charAt(i++);
switch (c) {
case '*':
... | Returns a regex pattern that matches on any of the globs on class names (e.g., "sun.misc.**") |
public static void updateRpSystemConnectivity(ProtectionSystem rpSystem,DbClient dbClient){
if (rpSystem.getInactive()) {
return;
}
if (rpSystem.getVirtualArrays() == null) {
rpSystem.setVirtualArrays(new StringSet());
}
rpSystem.getVirtualArrays().replace(StringSetUtil.uriListToSet(getRPSystemVirtual... | Refreshes the list of connected varrays for an RP system. |
public synchronized boolean add(OMGraphic g){
boolean ret=super.add(g);
String id=((LinkProperties)g.getAttribute(OMGraphic.APP_OBJECT)).getProperty(LPC_GRAPHICID);
if (Debug.debugging("linkdetail")) {
Debug.output("LinkOMGraphicList: Adding graphic, id(" + id + ")");
}
if (id != null) {
hash.put(id.i... | Add an OMGraphic to the GraphicList. The OMGraphic must not be null. |
@Override public void init(Processor processor){
super.init(processor);
if (((ExpressionBasedAction)getAction()).getExpression() != null) {
try {
expression=ExpressionHandlerFactory.getHandler(((ExpressionBasedAction)getAction()).getExpression());
expression.init(processor,getAction(),false);
... | This method initialises the process action handler. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:00:09.390 -0400",hash_original_method="167D6058217CAE2D9314E19221D90CE8",hash_generated_method="1DB101F683AB5E18DE11500B4664D09F") public LoginException(){
super();
}
| Creates a new exception instance and initializes it with default values. |
private ListenableFuture sendSingleGetData(GetDataMessage getdata){
Preconditions.checkArgument(getdata.getItems().size() == 1);
GetDataRequest req=new GetDataRequest();
req.future=SettableFuture.create();
req.hash=getdata.getItems().get(0).hash;
getDataFutures.add(req);
sendMessage(getdata);
return req.f... | Sends a getdata with a single item in it. |
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){
switch (featureID) {
case GamlPackage.EXPRESSION_LIST__EXPRS:
return ((InternalEList<?>)getExprs()).basicRemove(otherEnd,msgs);
}
return super.eInverseRemove(otherEnd,featureID,msgs);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public DellSCMirroring(){
this.connectionManager=DellSCConnectionManager.getInstance();
}
| Initialize the instance. |
protected ResolveResult(){
resolvedObj=null;
remainingName=null;
}
| Constructs an instance of ResolveResult with the resolved object and remaining name both initialized to null. |
public static org.oscm.internal.vo.VOCustomerService convertToUp(org.oscm.vo.VOCustomerService oldVO){
if (oldVO == null) {
return null;
}
org.oscm.internal.vo.VOCustomerService newVO=new org.oscm.internal.vo.VOCustomerService();
newVO.setKey(oldVO.getKey());
newVO.setVersion(oldVO.getVersion());
newVO.... | Convert source version VO to target version VO. |
private void updateProgress(String progressLabel,int progress){
if (myHost != null) {
myHost.updateProgress(progressLabel,progress);
}
else {
System.out.println(progressLabel + " " + progress+ "%");
}
}
| Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
public synchronized Iterator<Long> handles() throws IOException {
return NaturalOrder.LongIterator(this.stack.keys(true,false));
}
| Iterate all handles from the stack as Long numbers |
boolean findClass(String className) throws Exception {
ClassLoaderReference cl=targetClass.classLoader();
Iterator vci=cl.visibleClasses().iterator();
while (vci.hasNext()) {
ReferenceType rt=(ReferenceType)vci.next();
println(rt.name() + " - " + rt.classLoader());
if (rt.name().equals(className)) {
... | test assist |
public boolean isPersistent(){
return (null != cookieExpiryDate);
}
| Returns <tt>false</tt> if the cookie should be discarded at the end of the "session"; <tt>true</tt> otherwise. |
public Property property(DateTimeFieldType fieldType){
if (fieldType == null) {
throw new IllegalArgumentException("The DateTimeFieldType must not be null");
}
if (isSupported(fieldType) == false) {
throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
}
return new Property... | Gets the property object for the specified type, which contains many useful methods. |
static public void removeNotificationListener(JMXConnector jmxConnector,Class<?> mbeanClass,NotificationListener notificationListener) throws Exception {
MBeanServerConnection mbsc=jmxConnector.getMBeanServerConnection();
ObjectName objectName=generateMBeanObjectName(mbeanClass);
mbsc.removeNotificationListener(o... | Remove NotificationListener from this MBean. |
public void sortMoviesInMovieSet(MovieSet movieSet){
if (movieSet.getMovies().size() > 1) {
movieSet.sortMovies();
}
firePropertyChange("sortedMovieSets",null,movieSetList);
}
| Sort movies in movie set. |
private String prepareDirs(String dirType,int numDirs){
File[] dirs=new File[numDirs];
String dirsString="";
for (int i=0; i < numDirs; i++) {
dirs[i]=new File(testWorkDir,MiniYARNCluster.this.getName() + "-" + dirType+ "Dir-nm-"+ index+ "_"+ i);
dirs[i].mkdirs();
LOG.info("Created " + dirType + "Dir ... | Create local/log directories |
public DateColumn withRange(Date low,Date high){
this.low=low;
this.high=high;
return this;
}
| With range. |
public GPUImageSmoothToonFilter(){
blurFilter=new GPUImageGaussianBlurFilter();
addFilter(blurFilter);
toonFilter=new GPUImageToonFilter();
addFilter(toonFilter);
getFilters().add(blurFilter);
setBlurSize(0.5f);
setThreshold(0.2f);
setQuantizationLevels(10.0f);
}
| Setup and Tear down |
public LongsSketch(final int maxMapSize){
this(toLog2(maxMapSize,"maxMapSize"),LG_MIN_MAP_SIZE);
}
| Construct this sketch with the parameter maxMapSize and the default initialMapSize (8). |
public ArrayDeque(){
this(DEFAULT_SIZE);
}
| Constructs a new empty instance of ArrayDeque big enough for 16 elements. |
@Override public void updateNString(String columnLabel,String x) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("updateNString(" + quote(columnLabel) + ", "+ quote(x)+ ");");
}
update(columnLabel,x == null ? ValueNull.INSTANCE : ValueString.get(x));
}
catch ( Exception e) {
th... | Updates a column in the current or insert row. |
public void testMergeMultipleSecurityConstraintsForDifferentPatterns() throws Exception {
String srcXml="<web-app>" + " <security-constraint>" + " <web-resource-collection>"+ " <web-resource-name>resource1</web-resource-name>"+ " <url-pattern>/s1/*</url-pattern>"+ " </web-resource-collection>"+ " ... | Tests the merging of multiple security constraints of different patterns. |
private void logMandatoryWarning(DiagnosticPosition pos,String msg,Object... args){
if (enforceMandatory) log.mandatoryWarning(lintCategory,pos,msg,args);
else log.warning(lintCategory,pos,msg,args);
}
| Reports a mandatory warning to the log. If mandatory warnings are not being enforced, treat this as an ordinary warning. |
public void init(SecureRandom random) throws IllegalArgumentException {
}
| Initialise the padder. |
private void addHullFixtureAction(){
TreePath path=this.tree.getSelectionPath();
if (path != null) {
DefaultMutableTreeNode node=(DefaultMutableTreeNode)path.getLastPathComponent();
if (node.getUserObject() instanceof SandboxBody) {
BodyFixture fixture=AddConvexHullFixtureDialog.show(ControlUtilities.... | Shows the add new convex hull fixture dialog. <p> If the user clicks the add button, the shape and fixture are created and added to the selected body. |
private void checkIfAnimationIsRunning(){
if (animatorThread != null) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT,null,"Can not change this value when an animation is running");
}
}
| Check if the animation is running |
public void testUnspecifiedProperties() throws InterruptedException {
NetworkClientFilter ncf=new NetworkClientFilter();
ncf.setTungstenSchema("tungsten_foo");
try {
filterHelper.setContext(replicatorContext);
filterHelper.setFilter(ncf);
filterHelper.done();
fail("Exception not thrown during conf... | Verify that the filter raises exception if no definitions file is provided. |
public void delete(String name) throws IOException {
if (name.equalsIgnoreCase(SKIP_CERTS)) throw new IOException("Attribute " + SKIP_CERTS + " may not be deleted.");
else throw new IOException("Attribute name not recognized by " + "CertAttrSet:InhibitAnyPolicy.");
}
| Delete the attribute value. |
public DAWGTestResultSetParseException(String msg,Throwable cause){
super(msg,cause);
}
| Creates a new DAWGTestResultSetParseException wrapping another exception. |
public void parseLandUseAndBuildings(String file) throws FileNotFoundException {
File f=new File(file);
if (!f.exists()) {
throw new FileNotFoundException("Could not find " + file);
}
LandUseBuildingSink landUseBuildingSink=new LandUseBuildingSink(this.ct,this.osmLandUseToMatsimTypeMap,this.osmBuildingToMat... | Parses a given <i>OpenStreetMap</i> file for land use. |
public boolean equals(Object obj){
if (obj instanceof NtlmPasswordAuthentication) {
NtlmPasswordAuthentication ntlm=(NtlmPasswordAuthentication)obj;
if (ntlm.domain.toUpperCase().equals(domain.toUpperCase()) && ntlm.username.toUpperCase().equals(username.toUpperCase())) {
if (hashesExternal && ntlm.hash... | Compares two <tt>NtlmPasswordAuthentication</tt> objects for equality. Two <tt>NtlmPasswordAuthentication</tt> objects are equal if their caseless domain and username fields are equal and either both hashes are external and they are equal or both internally supplied passwords are equal. If one <tt>NtlmPasswordAuthentic... |
public static ProcessOutputReader fg(Class main,String[] vmArgs,String[] mainArgs) throws IOException {
File javabindir=new File(System.getProperty("java.home"),"bin");
File javaexe=new File(javabindir,"java");
int bits=Integer.getInteger("sun.arch.data.model",0).intValue();
String vmKindArg=(bits == 64) ? "-d6... | Creates a java process that executes the given main class and waits for the process to terminate. |
public boolean isDefault(){
return this == DEFAULT;
}
| Return true if this policy is the default. |
public JBBPOut Double(final double... value) throws IOException {
assertNotEnded();
assertArrayNotNull(value);
if (this.processCommands) {
for ( final double d : value) {
_writeLong(Double.doubleToLongBits(d));
}
}
return this;
}
| Write a double value array as long bits into the stream. |
private void paint(SeaGlassPainter p,SynthContext ctx,Graphics g,int x,int y,int w,int h,AffineTransform transform){
if (p != null) {
if (g instanceof Graphics2D) {
Graphics2D gfx=(Graphics2D)g;
if (transform != null) {
gfx.transform(transform);
}
gfx.translate(x,y);
p.paint(... | Paint the provided painter using the provided transform at the specified position and size. Handles if g is a non 2D Graphics by painting via a BufferedImage. |
public boolean matchRecipient(MailAddress recipient){
if (recipient.getDomain().equals(listservAddress.getDomain())) {
if (recipient.getLocalPart().startsWith(listservAddress.getLocalPart() + "-")) {
return true;
}
}
return false;
}
| This doesn't perform an exact match, but checks to see if the request is at least intended to go to the list serv manager. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:56.319 -0500",hash_original_method="7B6C844E67A0CC9BDD3E050A8ACE8852",hash_generated_method="75305BFFFD74A8F7A8CA4190E9D9C1C4") protected int processCdmaWapPdu(byte[] pdu,int referenceNumber,String address){
int index=0;
int msg... | Processes inbound messages that are in the WAP-WDP PDU format. See wap-259-wdp-20010614-a section 6.5 for details on the WAP-WDP PDU format. WDP segments are gathered until a datagram completes and gets dispatched. |
public EncryptionService(){
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
Security.addProvider(new BouncyCastleProvider());
}
}
| Creates a new instance of EncryptionService. Adds BouncyCastle as a SecurityProvider. |
public static int min(int a,int b,int c){
int mi;
mi=a;
if (b < mi) {
mi=b;
}
if (c < mi) {
mi=c;
}
return mi;
}
| Returns the minimum of three int values. |
@After public void clearSourceAndTargetFolder(){
deleteFiles(sourceFolder);
deleteFiles(targetFolder);
}
| Method to clear source and target folders. This ensures that source and target folder are ready to use for next JUnit Test case. |
public RDN(ASN1ObjectIdentifier oid,ASN1Encodable value){
ASN1EncodableVector v=new ASN1EncodableVector();
v.add(oid);
v.add(value);
this.values=new DERSet(new DERSequence(v));
}
| Create a single valued RDN. |
protected String handleResourceAccessException(final ResourceAccessException e){
stop();
return String.format("The connection to the GemFire Manager's HTTP service @ %1$s failed with: %2$s. " + "Please try reconnecting or see the GemFire Manager's log file for further details.",getBaseUrl(),e.getMessage());
}
| Handles resource access errors such as ConnectExceptions when the server-side process/service is not listening for client connections, or the connection to the server/service fails. |
CacheServerCreation(InternalCache cache){
super(cache);
}
| Creates a new <code>BridgeServerCreation</code> with the default configuration. |
private Object loadSpringContextBean(Object appCtx,String beanName){
try {
IgniteSpringHelper spring=IgniteComponentType.SPRING.create(false);
return spring.loadBeanFromAppContext(appCtx,beanName);
}
catch ( Exception e) {
throw new IgniteException("Failed to load bean in application context [beanName... | Loads bean from Spring ApplicationContext. |
protected boolean hasOutstandingChanges(){
return (fAmtFrom.hasChanged() || fAmtTo.hasChanged() || fBPartner_ID.hasChanged()|| fDescription.hasChanged()|| fDocumentNo.hasChanged()|| fDateFrom.hasChanged()|| fDateTo.hasChanged()|| fIsDelivered.hasChanged()|| fIsSOTrx.hasChanged()|| fPOReference.hasChanged());
}
| Does the parameter panel have outstanding changes that have not been used in a query? |
public static void addPrecisionSawmillRecipe(ItemStack input,ItemStack primaryOutput){
addRecipe(Recipe.PRECISION_SAWMILL,new SawmillRecipe(input,primaryOutput));
}
| Add a Precision Sawmill recipe with no chance output |
public FacebookGraphObjectException(Throwable throwable){
super(throwable);
}
| Constructs a new FacebookGraphObjectException. |
private void addProjectPath(final Path path){
addToClassPool(path);
if (path.toFile().isFile() && path.toString().endsWith(".jar")) {
addJarClasses(path);
}
else if (path.toFile().isDirectory()) {
addDirectoryClasses(path,Paths.get(""));
}
else {
throw new IllegalArgumentException("The project p... | Adds the project paths and loads all classes. |
public AdeInternal(String inputPropertyPath) throws AdeException {
String propertyPath=inputPropertyPath;
if (propertyPath == null) {
propertyPath=System.getProperty(ADE_SETUP_FILE_PATH_PROPERTY);
if ("".equals(propertyPath) || propertyPath == null) {
throw new AdeUsageException("Missing property: " +... | Sets ade setup file path. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case EipPackage.METADATA__KEY:
return getKey();
case EipPackage.METADATA__VALUES:
return getValues();
}
return super.eGet(featureID,resolve,coreType);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.