rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
final int len43 = len * 4 / 3; final byte[] outBuff = new byte[len43 + ((len % 3) > 0 ? 4 : 0) + (breakLines ? (len43 / MAX_LINE_LENGTH) : 0)]; int d = 0; int e = 0; final int len2 = len - 2; int lineLength = 0; for (; d < len2; d += 3, e += 4) { encode3to4(src, d + off, 3, outBuff, e); lineLength += 4; if (breakLines ... | return encode(src, 0, src.length, true); | public static final String encode(final byte[] src, final int off, final int len, final boolean breakLines) { final int len43 = len * 4 / 3; final byte[] outBuff = new byte[len43 // Main 4:3 + ((len % 3) > 0 ? 4 : 0) // Account for padding ... |
Unsafe.die(); | Unsafe.debug("total blocks"); Unsafe.debug(blockCount); | static final Address allocateBlock(int blockSize) { if (!initialized) { initialize(); } enter(); try { // Calculate the number of blocks needed final int reqBlockCount = (int)(blockAlign(blockSize, true) >>> BLOCK_SIZE_SHIFT); // Find a large enough series of blocks final long nr = findFreeBlocks(reqBloc... |
for (long i = 0; i < reqBlockCount; i++) { | for (int i = 0; i < reqBlockCount; i++) { | static final Address allocateBlock(int blockSize) { if (!initialized) { initialize(); } enter(); try { // Calculate the number of blocks needed final int reqBlockCount = (int)(blockAlign(blockSize, true) >>> BLOCK_SIZE_SHIFT); // Find a large enough series of blocks final long nr = findFreeBlocks(reqBloc... |
Unsafe.debug("clear"); Unsafe.debug(size); | private static void clear(Address ptr, long size) { Unsafe.debug("clear"); Unsafe.debug(size); while (size != 0) { final int part = (int)Math.min(size, 0x7fffffffL); Unsafe.debug(size); Unsafe.clear(ptr, part); ptr = Unsafe.add(ptr, part); size -= part; } } | |
Unsafe.debug(size); | private static void clear(Address ptr, long size) { Unsafe.debug("clear"); Unsafe.debug(size); while (size != 0) { final int part = (int)Math.min(size, 0x7fffffffL); Unsafe.debug(size); Unsafe.clear(ptr, part); ptr = Unsafe.add(ptr, part); size -= part; } } | |
Unsafe.debug("initialize."); | private final static void initialize() { Unsafe.debug("initialize."); startPtr = blockAlign(Unsafe.addressToLong(Unsafe.getMemoryStart()), true); endPtr = blockAlign(Unsafe.addressToLong(Unsafe.getMemoryEnd()), false); final long size = endPtr - startPtr; Unsafe.debug(size); blockCount = (size >>> BLOCK_SIZE_S... | |
Unsafe.debug("Block count "); Unsafe.debug(blockCount); | private final static void initialize() { Unsafe.debug("initialize."); startPtr = blockAlign(Unsafe.addressToLong(Unsafe.getMemoryStart()), true); endPtr = blockAlign(Unsafe.addressToLong(Unsafe.getMemoryEnd()), false); final long size = endPtr - startPtr; Unsafe.debug(size); blockCount = (size >>> BLOCK_SIZE_S... | |
final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); | final long offset = blockNr >>> 3; final int mask = (1 << (blockNr & 7)); | private static final boolean isInUse(long blockNr) { // 32-bits per int, so shift=5, mask=31 final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); final Address ptr = Unsafe.add(bitmapPtr, Unsafe.longToAddress(offset)); final int v = Unsafe.getInt(ptr); return ((v & mask) == mask); } |
final int v = Unsafe.getInt(ptr); | final int v = Unsafe.getByte(ptr) & 0xFF; | private static final boolean isInUse(long blockNr) { // 32-bits per int, so shift=5, mask=31 final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); final Address ptr = Unsafe.add(bitmapPtr, Unsafe.longToAddress(offset)); final int v = Unsafe.getInt(ptr); return ((v & mask) == mask); } |
final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); | final long offset = blockNr >>> 3; final int mask = (1 << (blockNr & 7)); | private static final void setInUse(long blockNr, boolean inUse) { // 32-bits per int, so shift=5, mask=31 final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); final Address ptr = Unsafe.add(bitmapPtr, Unsafe.longToAddress(offset)); int v = Unsafe.getInt(ptr); if (inUse) { v |= mask;... |
int v = Unsafe.getInt(ptr); | int v = Unsafe.getByte(ptr); | private static final void setInUse(long blockNr, boolean inUse) { // 32-bits per int, so shift=5, mask=31 final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); final Address ptr = Unsafe.add(bitmapPtr, Unsafe.longToAddress(offset)); int v = Unsafe.getInt(ptr); if (inUse) { v |= mask;... |
Unsafe.setInt(ptr, v); | Unsafe.setByte(ptr, (byte)v); | private static final void setInUse(long blockNr, boolean inUse) { // 32-bits per int, so shift=5, mask=31 final long offset = blockNr >>> 5; final int mask = (1 << (int) (blockNr & 31)); final Address ptr = Unsafe.add(bitmapPtr, Unsafe.longToAddress(offset)); int v = Unsafe.getInt(ptr); if (inUse) { v |= mask;... |
if (blocking) throw new IllegalBlockingModeException(); | public final SelectionKey register(Selector selin, int ops, Object att) throws ClosedChannelException { if (! isOpen()) throw new ClosedChannelException(); if ((ops & ~validOps()) != 0) throw new IllegalArgumentException(); SelectionKey key = null; AbstractSelector selector = (AbstractSe... | |
return opened; | return ! closed; | public final boolean isOpen () { return opened; } |
public abstract SelectionKey register (Selector sel, int ops, Object att) throws ClosedChannelException; | public final SelectionKey register(Selector sel, int ops) throws ClosedChannelException { return register(sel, ops, null); } | public abstract SelectionKey register (Selector sel, int ops, Object att) throws ClosedChannelException; |
public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { | public Ext2FileSystem(Device device) throws FileSystemException{ if(device==null) | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
} | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... | |
try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device is not a partition", ex); } | this.api=null; | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
long byteIndex; | blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); groupDescriptorLock = new Object(); superblockLock = new Object(); | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
cache = new BlockCache(50, (float) 0.75); | setMode(RW); try{ api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); }catch(ApiNotFoundException e) { throw new FileSystemException("Device is not a partition!"); } | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
byteIndex = 1024; api.read(byteIndex, data, 0, Superblock.SUPERBLOCK_LENGTH); byteIndex += Superblock.SUPERBLOCK_LENGTH; superblock = new Superblock(data); | api.read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); superblock = new Superblock(data, this); | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
for (int i = 0; i < groupCount; i++) { data = new byte[GroupDescriptor.GROUPDESCRIPTOR_LENGTH]; api.read(byteIndex + i * GroupDescriptor.GROUPDESCRIPTOR_LENGTH, data, 0, GroupDescriptor.GROUPDESCRIPTOR_LENGTH); groupDescriptors[i] = new GroupDescriptor(data); | for(int i=0; i<groupCount; i++) { data=getBlock(superblock.getFirstDataBlock()+1); groupDescriptors[i] = new GroupDescriptor(data, this, i); } /* for(int i=0; i<groupCount; i++) { groupDescriptors[i]=new GroupDescriptor(i, this); | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
byteIndex += superblock.getBlockSize(); | */ | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
} log.debug("Ext2fs filesystem constructed sucessfully"); log.debug( " superblock: #blocks: " + superblock.getBlocksCount() + "\n" + " #blocks/group: " + superblock.getBlocksPerGroup() + "\n" + " #block groups: " + groupCount + "\n" + " block size: " + superblock.getBlockSize() + "\n" + " #inodes: " + s... | } log.info( "Ext2fs filesystem constructed sucessfully"); log.debug( " superblock: #blocks: "+superblock.getBlocksCount()+"\n"+ " #blocks/group: "+superblock.getBlocksPerGroup()+"\n"+ " #block groups: "+groupCount+"\n"+ " block size: "+superblock.getBlockSize()+"\n"+ " #inodes: "+superblock.getINodesCo... | public Ext2FileSystem(Device device) throws FileSystemException { if (device == null) { throw new FileSystemException("null device!"); } this.device = device; try { this.api = (FSBlockDeviceAPI) device.getAPI(FSBlockDeviceAPI.class); } catch (ApiNotFoundException ex) { throw new FileSystemException("Device ... |
closed = true; throw new IOException("Yet unimplemented"); | public void close() throws IOException { flush(); closed = true; //XXX throw new IOException("Yet unimplemented"); } | |
throw new IOException("Yet unimplemented"); | log.info("Filesystem flushed"); | public void flush() throws IOException { //XXX throw new IOException("Yet unimplemented"); } |
Integer key = new Integer((int) nr); if (cache.containsKey(key)) result = (Block) cache.get(key); else { byte[] data = new byte[blockSize]; api.read(nr * blockSize, data, 0, blockSize); result = new Block(data); cache.put(key, result); | Integer key=new Integer((int)(nr)); synchronized(blockCache) { if(blockCache.containsKey(key)) result=(Block)blockCache.get(key); else{ byte[] data = new byte[blockSize]; timedRead(nr, data); result=new Block(this, nr, data); blockCache.put(key, result); } | public byte[] getBlock(long nr) throws IOException { int blockSize = superblock.getBlockSize(); Block result; Integer key = new Integer((int) nr); //check if the block has already been retrieved if (cache.containsKey(key)) result = (Block) cache.get(key); else { byte[] data = new byte[blockSize]; api.read(... |
public INode getINode(int iNodeNr) throws IOException, FileSystemException { if (iNodeNr < 1) throw new IOException("INode number must be greater than 0"); int group = (int) ((iNodeNr - 1) / superblock.getINodesPerGroup()); int index = (int) ((iNodeNr - 1) % superblock.getINodesPerGroup()); long iNodeTableBlock = gr... | public INode getINode(int iNodeNr) throws IOException, FileSystemException{ if((iNodeNr<1)||(iNodeNr>superblock.getINodesCount())) throw new FileSystemException("INode number ("+iNodeNr+") out of range (0-"+superblock.getINodesCount()+")"); Integer key=new Integer((int)iNodeNr); synchronized(inodeCache) { if(inode... | public INode getINode(int iNodeNr) throws IOException, FileSystemException { if (iNodeNr < 1) throw new IOException("INode number must be greater than 0"); int group = (int) ((iNodeNr - 1) / superblock.getINodesPerGroup()); int index = (int) ((iNodeNr - 1) % superblock.getINodesPerGroup()); //get the part of the... |
log.debug("Ext2FileSystem.getRootEntry()"); try { if (!closed) { return new Ext2Entry(getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR); | try{ if(!closed) { return new Ext2Entry( getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR, this ); | public FSEntry getRootEntry() throws IOException { log.debug("Ext2FileSystem.getRootEntry()"); try { if (!closed) { return new Ext2Entry(getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR); } } catch (FileSystemException e) { throw new IOException(e); } return null; } |
cacheListeners = new Vector(); | public BlockCache(int initialCapacity, float loadFactor) { super(initialCapacity, loadFactor, true); } | |
log.setLevel(Level.DEBUG); | log.setLevel(Level.INFO); | public Superblock() { data = new byte[SUPERBLOCK_LENGTH]; log.setLevel(Level.DEBUG); } |
log.setLevel(Level.DEBUG); | log.setLevel(Level.INFO); | public GroupDescriptor() { data = new byte[GROUPDESCRIPTOR_LENGTH]; log.setLevel(Level.DEBUG); } |
log.setLevel(Level.DEBUG); | log.setLevel(Level.INFO); | public INode(Ext2FileSystem fs, INodeDescriptor desc) { this.fs = fs; this.desc = desc; this.data = new byte[INODE_LENGTH]; log.setLevel(Level.DEBUG); } |
protected void update() throws IOException{ | protected synchronized void update() throws IOException{ | protected void update() throws IOException{ try{ if(dirty) { log.debug(" ** updating inode **"); desc.getINodeTable().writeInodeData( desc.getIndex(), data ); dirty=false; } }catch(FileSystemException fs) { throw new IOException(fs); } } |
public void flush() { if (!dirty) | public void flush() throws IOException{ if(!dirty) | public void flush() { if (!dirty) return; //XXX... log.error("BLOCK FLUSHED FROM CACHE"); } |
log.error("BLOCK FLUSHED FROM CACHE"); | fs.writeBlock(blockNr, data, true); log.debug("BLOCK FLUSHED FROM CACHE"); | public void flush() { if (!dirty) return; //XXX... log.error("BLOCK FLUSHED FROM CACHE"); } |
public boolean containsKey(Integer key) { | private boolean containsKey(Integer key) { | public boolean containsKey(Integer key) { boolean result = super.containsKey(key); if(result) log.debug("CACHE HIT, size:"+size()); else log.debug("CACHE MISS"); return result; } |
public Block(byte[] data) { this.data = data; | public Block(Ext2FileSystem fs, long blockNr, byte[] data) { this.data=data; this.fs=fs; this.blockNr=blockNr; log.setLevel(Level.DEBUG); | public Block(byte[] data) { this.data = data; } |
public Ext2Entry(INode iNode, String name, int type) { | public Ext2Entry(INode iNode, String name, int type, Ext2FileSystem fs) { | public Ext2Entry(INode iNode, String name, int type) { this.iNode = iNode; this.name = name; this.type = type; this.valid = true; log.debug("Ext2Entry(iNode, name): name="+name+ (isDirectory()?" is a directory ":"")+ (isFile()?" is a file ":"")); } |
this.fs = fs; log.setLevel(Level.INFO); | public Ext2Entry(INode iNode, String name, int type) { this.iNode = iNode; this.name = name; this.type = type; this.valid = true; log.debug("Ext2Entry(iNode, name): name="+name+ (isDirectory()?" is a directory ":"")+ (isFile()?" is a file ":"")); } | |
public RenderContext(AffineTransform xform) | public RenderContext(AffineTransform xform, Shape aoi, RenderingHints hints) | public RenderContext(AffineTransform xform) { this(xform, null, null); } |
this(xform, null, null); | this.xform = xform; this.aoi = aoi; this.hints = hints; | public RenderContext(AffineTransform xform) { this(xform, null, null); } |
throw new InternalError("Not implemented yet"); | reset(); return pattern.getRE().substituteAll(input, replacement, position); | public String replaceAll(String replacement) { throw new InternalError("Not implemented yet"); } |
throw new InternalError("Not implemented yet"); | reset(); return pattern.getRE().substitute(input, replacement, position); | public String replaceFirst(String replacement) { throw new InternalError("Not implemented yet"); } |
Action action = new AbstractAction(){ public void actionPerformed(ActionEvent e) { } }; action.putValue(Action.NAME, item.getLabel()); ((JPopupMenu)jComponent).add(action); | item.addNotify(); jComponent.add(((SwingMenuItemPeer)item.getPeer()).jComponent); | public void addItem(MenuItem item) { Action action = new AbstractAction(){ public void actionPerformed(ActionEvent e) { //todo implement it } }; action.putValue(Action.NAME, item.getLabel()); ((JPopupMenu)jComponent).add(action); } |
public void setArc(Rectangle2D r, double start, double extent, int type) { setArc(r.getX(), r.getY(), r.getWidth(), r.getHeight(), start, extent, type); } | public abstract void setArc(double x, double y, double w, double h, double start, double extent, int type); | public void setArc(Rectangle2D r, double start, double extent, int type) { setArc(r.getX(), r.getY(), r.getWidth(), r.getHeight(), start, extent, type); } |
log.info("PLLInfo:" + fbinfo.getPllInfo()); | log.debug("PLLInfo:" + fbinfo.getPllInfo()); | final RadeonSurface open(RadeonConfiguration config) throws ResourceNotFreeException { // Get the best matching config config = fbinfo.getBestConfiguration(config); log.info("BestConfig:" + config); // Calculate new configuration final DisplayMode mode = config.getDisplayMode(); final int width = mode.getW... |
log.info("Screen at 0x" + NumberUtils.hex(screen.getOffset()) | log.debug("Screen at 0x" + NumberUtils.hex(screen.getOffset()) | final RadeonSurface open(RadeonConfiguration config) throws ResourceNotFreeException { // Get the best matching config config = fbinfo.getBestConfiguration(config); log.info("BestConfig:" + config); // Calculate new configuration final DisplayMode mode = config.getDisplayMode(); final int width = mode.getW... |
log.info("oldState:" + oldVgaState); | log.debug("oldState:" + oldVgaState); | final RadeonSurface open(RadeonConfiguration config) throws ResourceNotFreeException { // Get the best matching config config = fbinfo.getBestConfiguration(config); log.info("BestConfig:" + config); // Calculate new configuration final DisplayMode mode = config.getDisplayMode(); final int width = mode.getW... |
log.info("NewState: " + currentState); | log.debug("NewState: " + currentState); | final RadeonSurface open(RadeonConfiguration config) throws ResourceNotFreeException { // Get the best matching config config = fbinfo.getBestConfiguration(config); log.info("BestConfig:" + config); // Calculate new configuration final DisplayMode mode = config.getDisplayMode(); final int width = mode.getW... |
log.info("Set LVDS_GEN_CTRL to 0x" + NumberUtils.hex(lvds_gen_cntl)); | log.debug("Set LVDS_GEN_CTRL to 0x" + NumberUtils.hex(lvds_gen_cntl)); | final void setDpms(DpmsState state) { int crtc_ext_cntl = vgaIO.getReg32(CRTC_EXT_CNTL); int lvds_gen_cntl = vgaIO.getReg32(LVDS_GEN_CNTL);// log.info("Get LVDS_GEN_CTRL 0x" + NumberUtils.hex(lvds_gen_cntl)); crtc_ext_cntl &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS | CRTC_VSYNC_DIS); lvds_gen_cntl &= ~(LVDS_DISPLA... |
log.info("Set CRTC_EXT_CNTL to 0x" + NumberUtils.hex(crtc_ext_cntl)); | log.debug("Set CRTC_EXT_CNTL to 0x" + NumberUtils.hex(crtc_ext_cntl)); | final void setDpms(DpmsState state) { int crtc_ext_cntl = vgaIO.getReg32(CRTC_EXT_CNTL); int lvds_gen_cntl = vgaIO.getReg32(LVDS_GEN_CNTL);// log.info("Get LVDS_GEN_CTRL 0x" + NumberUtils.hex(lvds_gen_cntl)); crtc_ext_cntl &= ~(CRTC_DISPLAY_DIS | CRTC_HSYNC_DIS | CRTC_VSYNC_DIS); lvds_gen_cntl &= ~(LVDS_DISPLA... |
public ObjectAlreadyActive(String why) | public ObjectAlreadyActive() | public ObjectAlreadyActive(String why) { super(why); } |
super(why); | public ObjectAlreadyActive(String why) { super(why); } | |
private UnicodeBlock(char start, char end, String name) | private UnicodeBlock(int start, int end, String name, String canonicalName) | private UnicodeBlock(char start, char end, String name) { super(name); this.start = start; this.end = end; } |
this.canonicalName = canonicalName; | private UnicodeBlock(char start, char end, String name) { super(name); this.start = start; this.end = end; } | |
if (ch == '\uFEFF') return SPECIALS; int low = 0; int hi = sets.length - 1; while (low <= hi) { int mid = (low + hi) >> 1; UnicodeBlock b = sets[mid]; if (ch < b.start) hi = mid - 1; else if (ch > b.end) low = mid + 1; else return b; } return null; | return of((int) ch); | public static UnicodeBlock of(char ch) { // Special case, since SPECIALS contains two ranges. if (ch == '\uFEFF') return SPECIALS; // Simple binary search for the correct block. int low = 0; int hi = sets.length - 1; while (low <= hi) { int mid = (low + hi) >>... |
throw new DomEx(DomEx.NOT_SUPPORTED_ERR, name, null, 0); | throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, name, null, 0); | public Object getParameter(String name) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { return cdataSections ? Boolean.TRUE : Boolean.FALSE; } else if ("comments".equals(name)) { return comments ? Boolean.TRUE : Boolean.FALSE; } e... |
throw new DomEx(DomEx.TYPE_MISMATCH_ERR, | throw new DomDOMException(DOMException.TYPE_MISMATCH_ERR, | public void setParameter(String name, Object value) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { cdataSections = "true".equals(value.toString()); } else if ("comments".equals(name)) { comments = "true".equals(value.toString()); } ... |
throw new DomEx(DomEx.NOT_SUPPORTED_ERR, name, null, 0); | throw new DomDOMException(DOMException.NOT_SUPPORTED_ERR, name, null, 0); | public void setParameter(String name, Object value) throws DOMException { name = name.toLowerCase(); if ("cdata-sections".equals(name)) { cdataSections = "true".equals(value.toString()); } else if ("comments".equals(name)) { comments = "true".equals(value.toString()); } ... |
public _NamingContextExtStub(Delegate delegate) | public _NamingContextExtStub() | public _NamingContextExtStub(Delegate delegate) { super(delegate); } |
super(delegate); | super(); | public _NamingContextExtStub(Delegate delegate) { super(delegate); } |
if (editorComponent instanceof JTextField) { ((JTextField)editorComponent).setText(value.toString()); delegate = new EditorDelegate(); ((JTextField)editorComponent).addActionListener(delegate); } else if (editorComponent instanceof JCheckBox) { ((JCheckBox)editorComponent).setText(value.toString()); delegate = new Edit... | delegate.setValue(value); | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (editorComponent instanceof JTextField) ... |
String name, String baseUri, String publicId, String systemId, String replacementText) | EntityDeclaration decl, String name) | protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... |
this.decl = decl; | protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... | |
this.baseUri = baseUri; this.publicId = publicId; this.systemId = systemId; this.replacementText = replacementText; | protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... | |
api = (BlockDeviceAPI) device.getAPI(BlockDeviceAPI.class); | api = device.getAPI(BlockDeviceAPI.class); | public AbstractFileSystem(Device device, boolean readOnly) throws FileSystemException { if (device == null) throw new IllegalArgumentException("null device!"); this.device = device; try { api = (BlockDeviceAPI) device.getAPI(BlockDeviceAPI.class); } catch (ApiNotFou... |
log.debug("<<< BEGIN flush >>>"); | public void flush() throws IOException { log.debug("<<< BEGIN flush >>>"); flushFiles(); flushDirectories(); log.debug("<<< END flush >>>"); } | |
log.debug("<<< END flush >>>"); | public void flush() throws IOException { log.debug("<<< BEGIN flush >>>"); flushFiles(); flushDirectories(); log.debug("<<< END flush >>>"); } | |
int idx = i * 2; | int idx = i << 1; | public synchronized void write(BlockDeviceAPI device, long offset) throws IOException { byte[] data = new byte[nrSectors * sectorSize]; for (int i = 0; i < entries.length; i++) { long v = entries[i]; switch (bitSize) { case 12 : { int idx = (int) (i * 1.5); if ((i % 2) == 0) { data[idx] = ... |
int idx = i * 4; | int idx = i << 2; | public synchronized void write(BlockDeviceAPI device, long offset) throws IOException { byte[] data = new byte[nrSectors * sectorSize]; for (int i = 0; i < entries.length; i++) { long v = entries[i]; switch (bitSize) { case 12 : { int idx = (int) (i * 1.5); if ((i % 2) == 0) { data[idx] = ... |
log.debug("<<< BEGIN getRootEntry >>>"); | public FSEntry getRootEntry() throws IOException { log.debug("<<< BEGIN getRootEntry >>>"); if(isClosed()) throw new IOException("FileSystem is closed"); if(rootEntry == null) { rootEntry = createRootEntry(); } log.debug("<<< END getRootEntry >>>"); return rootEntry;... | |
log.debug("<<< END getRootEntry >>>"); | public FSEntry getRootEntry() throws IOException { log.debug("<<< BEGIN getRootEntry >>>"); if(isClosed()) throw new IOException("FileSystem is closed"); if(rootEntry == null) { rootEntry = createRootEntry(); } log.debug("<<< END getRootEntry >>>"); return rootEntry;... | |
g.fill(gp); | public void render(Graphics2D g, String text, int x, int y) { try { final GeneralPath gp = new GeneralPath(); gp.moveTo(x, y); final TTFGlyphTable glyphTable = fontData.getGlyphTable(); final TTFCMapTable cmapTable = fontData.getCMapTable(); final TTFHorizontalHeaderTable hheadTable = fontData.getHorizon... | |
public LongSeqHolder(int[] initial_value) | public LongSeqHolder() | public LongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); } |
value = initial_value; typecode.setLength(value.length); | public LongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); } | |
public ServantAlreadyActive(String why) | public ServantAlreadyActive() | public ServantAlreadyActive(String why) { super(why); } |
super(why); | public ServantAlreadyActive(String why) { super(why); } | |
JRootPane createRootPane() | public JRootPane createRootPane() | JRootPane createRootPane() { return new JRootPane(); } |
Component getGlassPane() | public Component getGlassPane() | Component getGlassPane() { return getRootPane().getGlassPane(); } |
JLayeredPane getLayeredPane() | public JLayeredPane getLayeredPane() | JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); } |
JRootPane getRootPane() | public JRootPane getRootPane() | JRootPane getRootPane() { if (rootPane == null) setRootPane(createRootPane()); return rootPane; } |
void setGlassPane(Component glassPane) | public void setGlassPane(Component glassPane) | void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); } |
void setLayeredPane(JLayeredPane layeredPane) | public void setLayeredPane(JLayeredPane layeredPane) | void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); } |
void setRootPane(JRootPane root) | public void setRootPane(JRootPane root) | void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); } |
mid = (low + hi) >> 1; | mid = (low + hi) >>> 1; | int binarySearch(int[] a, int key, int maxIndex) { int low = 0; int hi = maxIndex - 1; int mid = 0; while (low <= hi) { mid = (low + hi) >> 1; final int d = a[mid]; if (d == key) return mid; else if (d > key) hi = mid - 1; else // This ge... |
for (int i = 0; i < positionMarks.length; i++) | for (int i = 0; i < numMarks; i++) | private void dumpMarks() { System.err.print("positionMarks: "); for (int i = 0; i < positionMarks.length; i++) System.err.print(positionMarks[i] + ", "); System.err.println(); } |
if (p.index > start || p.index <= end) p.index = start; else if (p.index > end) | if (p.index > startIndex || p.index <= endIndex) p.index = startIndex; else if (p.index > endIndex) | private void setPositionsInRange(int start, int end, boolean toStart) { // We slump together all the GapContentPositions to point to // one mark. So this is implemented as follows: // 1. Remove all the marks in the specified range. // 2. Insert one new mark at the correct location. // 3. Adjust all af... |
private short[] getCursor(HardwareCursor cursor) { | private byte[] getCursor(HardwareCursor cursor) { | private short[] getCursor(HardwareCursor cursor) { final HardwareCursorImage img = cursor.getImage(32, 32); if (img == null) { return null; } short[] res = (short[]) cursorCache.get(img); if (res == null) { res = new short[1024]; final int[] argb = img.getImage(); for (int i = 0; i < 1024; i++) { fi... |
short[] res = (short[]) cursorCache.get(img); | final int w = img.getWidth(); final int h = img.getHeight(); horzOffset = 64 - w; vertOffset = 64 - h; byte[] res = (byte[]) cursorCache.get(img); | private short[] getCursor(HardwareCursor cursor) { final HardwareCursorImage img = cursor.getImage(32, 32); if (img == null) { return null; } short[] res = (short[]) cursorCache.get(img); if (res == null) { res = new short[1024]; final int[] argb = img.getImage(); for (int i = 0; i < 1024; i++) { fi... |
res = new short[1024]; | res = new byte[1024]; | private short[] getCursor(HardwareCursor cursor) { final HardwareCursorImage img = cursor.getImage(32, 32); if (img == null) { return null; } short[] res = (short[]) cursorCache.get(img); if (res == null) { res = new short[1024]; final int[] argb = img.getImage(); for (int i = 0; i < 1024; i++) { fi... |
for (int i = 0; i < 1024; i++) { final int v = argb[i]; final int a = (v >>> 24) & 0xFF; final int r = ((v >> 16) & 0xFF) >> 3; final int g = ((v >> 8) & 0xFF) >> 3; final int b = (v & 0xFF) >> 3; | for (int row = 0; row < h; row++) { final int imgOfs = row * w; final int resOfs = row * 16; for (int x = 0; x < w; x++) { final int resRowIdx = resOfs + (((64 - w) + x) >> 3); final int resRowBit = 1 << (7 - (((64 - w) + x) & 7)); | private short[] getCursor(HardwareCursor cursor) { final HardwareCursorImage img = cursor.getImage(32, 32); if (img == null) { return null; } short[] res = (short[]) cursorCache.get(img); if (res == null) { res = new short[1024]; final int[] argb = img.getImage(); for (int i = 0; i < 1024; i++) { fi... |
res[i] = (short) ((r << 10) | (g << 5) | b); if (a != 0) { res[i] |= 0x8000; | final int v = argb[imgOfs + x]; final int a = (v >>> 24) & 0xFF; final int r = ((v >> 16) & 0xFF); final int g = ((v >> 8) & 0xFF); final int b = (v & 0xFF); if (a != 0) { if (((r + g + b) / 3) >= 128) { } else { res[resRowIdx+8] |= resRowBit; } } else { res[resRowIdx] |= resRowBit; } | private short[] getCursor(HardwareCursor cursor) { final HardwareCursorImage img = cursor.getImage(32, 32); if (img == null) { return null; } short[] res = (short[]) cursorCache.get(img); if (res == null) { res = new short[1024]; final int[] argb = img.getImage(); for (int i = 0; i < 1024; i++) { fi... |
final short[] cur = getCursor(cursor); | final byte[] cur = getCursor(cursor); | public void setCursorImage(HardwareCursor cursor) { // Background color io.setReg32(CUR_CLR0, 0xffffff); // Foreground color io.setReg32(CUR_CLR1, 0); // Set shape final short[] cur = getCursor(cursor); if (cur != null) { cursorMem.setShorts(cur, 0, 0, 1024); } } |
cursorMem.setShorts(cur, 0, 0, 1024); | io.setReg32(CUR_HORZ_VERT_OFF, vertOffset + (horzOffset << 16)); cursorMem.setBytes(cur, 0, 0, 1024); | public void setCursorImage(HardwareCursor cursor) { // Background color io.setReg32(CUR_CLR0, 0xffffff); // Foreground color io.setReg32(CUR_CLR1, 0); // Set shape final short[] cur = getCursor(cursor); if (cur != null) { cursorMem.setShorts(cur, 0, 0, 1024); } } |
| (xorigin << 16) | yorigin ); | | ((xorigin + horzOffset) << 16) | (yorigin + vertOffset)); | public void setCursorPosition(int x, int y) { // if upper-left corner of cursor is outside of // screen, we have to use special registers to clip it int xorigin = 0; int yorigin = 0; if( x < 0 ) { xorigin = -x; } if( y < 0 ) { yorigin = -y; ... |
calculateThumbLocation(); | calculateGeometry(); | public void paint(Graphics g, JComponent c) { // FIXME: Move this to propertyChangeEvent handler, when we get those. leftToRightCache = slider.getComponentOrientation() != ComponentOrientation.RIGHT_TO_LEFT; // FIXME: This next line is only here because the above line is here. calculateThumbLocation(); ... |
awtComponent.update(g); | protected void paintComponent(Graphics g) { super.paintComponent(g); awtComponent.update(g); } | |
public AbstractAction(String name) { this(name, null); } | public AbstractAction() { this(""); } | public AbstractAction(String name) { this(name, null); // TODO: default icon?? } // AbstractAction() |
public void setContentAreaFilled(boolean b) { } | public void setContentAreaFilled(boolean b) { boolean old = content_area_filled; content_area_filled = b; if (b != old) { firePropertyChange(CONTENT_AREA_FILLED_CHANGED_PROPERTY, old, b); revalidate(); repaint(); } } | public void setContentAreaFilled(boolean b) { //Sets whether the button should paint the content area or leave it transparent. } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.