bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
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;... | 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.getByte(ptr); if (inUse) { v |= mask... | 11,010 |
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;... | 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;... | 11,011 |
public final boolean isOpen () { return opened; } | public final boolean isOpen () { return ! closed; } | 11,013 |
public abstract SelectionKey register (Selector sel, int ops, Object att) throws ClosedChannelException; | public abstract SelectionKey register (Selector sel, int ops, Object att) throws ClosedChannelException; | 11,014 |
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 ... | 11,015 |
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 is... | 11,016 |
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 ... | 11,017 |
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 ... | 11,018 |
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 ... | 11,019 |
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 ... | 11,020 |
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 ... | 11,021 |
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 ... | 11,022 |
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 ... | 11,023 |
public void close() throws IOException { flush(); closed = true; //XXX throw new IOException("Yet unimplemented"); } | public void close() throws IOException { flush(); closed = true; //XXX throw new IOException("Yet unimplemented"); } | 11,024 |
public void flush() throws IOException { //XXX throw new IOException("Yet unimplemented"); } | public void flush() throws IOException { //XXX log.info("Filesystem flushed"); } | 11,025 |
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 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(... | 11,026 |
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... | 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... | 11,027 |
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; } | 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; } | 11,028 |
public Superblock() { data = new byte[SUPERBLOCK_LENGTH]; log.setLevel(Level.DEBUG); } | public Superblock() { data = new byte[SUPERBLOCK_LENGTH]; log.setLevel(Level.INFO); } | 11,030 |
public GroupDescriptor() { data = new byte[GROUPDESCRIPTOR_LENGTH]; log.setLevel(Level.DEBUG); } | public GroupDescriptor() { data = new byte[GROUPDESCRIPTOR_LENGTH]; log.setLevel(Level.INFO); } | 11,031 |
public INode(Ext2FileSystem fs, INodeDescriptor desc) { this.fs = fs; this.desc = desc; this.data = new byte[INODE_LENGTH]; log.setLevel(Level.DEBUG); } | public INode(Ext2FileSystem fs, INodeDescriptor desc) { this.fs = fs; this.desc = desc; this.data = new byte[INODE_LENGTH]; log.setLevel(Level.INFO); } | 11,032 |
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); } } | protected synchronized 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); } } | 11,033 |
public void flush() { if (!dirty) return; //XXX... log.error("BLOCK FLUSHED FROM CACHE"); } | public void flush() { if (!dirty) return; //XXX... log.error("BLOCK FLUSHED FROM CACHE"); } | 11,034 |
public void flush() { if (!dirty) return; //XXX... log.error("BLOCK FLUSHED FROM CACHE"); } | public void flush() { if (!dirty) return; //XXX... fs.writeBlock(blockNr, data, true); log.debug("BLOCK FLUSHED FROM CACHE"); } | 11,035 |
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; } | private boolean containsKey(Integer key) { boolean result = super.containsKey(key); if(result) log.debug("CACHE HIT, size:"+size()); else log.debug("CACHE MISS"); return result; } | 11,036 |
public Block(byte[] data) { this.data = data; } | public Block(byte[] data) { this.data = data; } | 11,037 |
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 Ext2Entry(INode iNode, String name, int type, Ext2FileSystem fs) { 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 ":"")); } | 11,038 |
public RenderContext(AffineTransform xform) { this(xform, null, null); } | public RenderContext(AffineTransform xform, Shape aoi, RenderingHints hints) { this(xform, null, null); } | 11,040 |
public RenderContext(AffineTransform xform) { this(xform, null, null); } | public RenderContext(AffineTransform xform) { this.xform = xform; this.aoi = aoi; this.hints = hints; } | 11,041 |
public String replaceAll(String replacement) { throw new InternalError("Not implemented yet"); } | public String replaceAll(String replacement) { reset(); return pattern.getRE().substituteAll(input, replacement, position); } | 11,042 |
public String replaceFirst(String replacement) { throw new InternalError("Not implemented yet"); } | public String replaceFirst(String replacement) { reset(); return pattern.getRE().substitute(input, replacement, position); } | 11,043 |
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 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); } | 11,044 |
public void setArc(Rectangle2D r, double start, double extent, int type) { setArc(r.getX(), r.getY(), r.getWidth(), r.getHeight(), start, extent, type); } | public void setArc(Rectangle2D r, double start, double extent, int type) { setArc(r.getX(), r.getY(), r.getWidth(), r.getHeight(), start, extent, type); } | 11,045 |
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... | 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... | 11,046 |
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... | 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... | 11,047 |
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... | 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... | 11,048 |
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... | 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... | 11,049 |
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... | 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... | 11,050 |
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... | 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... | 11,051 |
public ObjectAlreadyActive(String why) { super(why); } | public ObjectAlreadyActive() { super(why); } | 11,052 |
public ObjectAlreadyActive(String why) { super(why); } | public ObjectAlreadyActive(String why) { } | 11,053 |
private UnicodeBlock(char start, char end, String name) { super(name); this.start = start; this.end = end; } | private UnicodeBlock(int start, int end, String name, String canonicalName) { super(name); this.start = start; this.end = end; } | 11,054 |
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) >>... | 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) >>... | 11,056 |
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... | 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... | 11,057 |
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 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()); } ... | 11,058 |
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 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()); } ... | 11,059 |
public _NamingContextExtStub(Delegate delegate) { super(delegate); } | public _NamingContextExtStub() { super(delegate); } | 11,060 |
public _NamingContextExtStub(Delegate delegate) { super(delegate); } | public _NamingContextExtStub(Delegate delegate) { super(); } | 11,061 |
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (editorComponent instanceof JTextField) ... | public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { if (editorComponent instanceof JTextField) ... | 11,062 |
protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... | protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... | 11,063 |
protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... | protected EntityReferenceImpl(Location location, //EntityDeclaration decl, String name, String baseUri, String publicId, String systemId, String replacementText) { super(location); //this... | 11,065 |
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... | public AbstractFileSystem(Device device, boolean readOnly) throws FileSystemException { if (device == null) throw new IllegalArgumentException("null device!"); this.device = device; try { api = device.getAPI(BlockDeviceAPI.class); } catch (ApiNotFoundException e) { ... | 11,066 |
public void flush() throws IOException { log.debug("<<< BEGIN flush >>>"); flushFiles(); flushDirectories(); log.debug("<<< END flush >>>"); } | public void flush() throws IOException { flushFiles(); flushDirectories(); log.debug("<<< END flush >>>"); } | 11,067 |
public void flush() throws IOException { log.debug("<<< BEGIN flush >>>"); flushFiles(); flushDirectories(); log.debug("<<< END flush >>>"); } | public void flush() throws IOException { log.debug("<<< BEGIN flush >>>"); flushFiles(); flushDirectories(); } | 11,068 |
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] = ... | 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] = ... | 11,069 |
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] = ... | 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] = ... | 11,070 |
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;... | public FSEntry getRootEntry() throws IOException { if(isClosed()) throw new IOException("FileSystem is closed"); if(rootEntry == null) { rootEntry = createRootEntry(); } log.debug("<<< END getRootEntry >>>"); return rootEntry; } | 11,071 |
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;... | public FSEntry getRootEntry() throws IOException { log.debug("<<< BEGIN getRootEntry >>>"); if(isClosed()) throw new IOException("FileSystem is closed"); if(rootEntry == null) { rootEntry = createRootEntry(); } return rootEntry; } | 11,072 |
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 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... | 11,073 |
public LongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); } | public LongSeqHolder() { value = initial_value; typecode.setLength(value.length); } | 11,074 |
public LongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); } | public LongSeqHolder(int[] initial_value) { value = initial_value; typecode.setLength(value.length); } | 11,075 |
public ServantAlreadyActive(String why) { super(why); } | public ServantAlreadyActive() { super(why); } | 11,076 |
public ServantAlreadyActive(String why) { super(why); } | public ServantAlreadyActive(String why) { } | 11,077 |
JRootPane createRootPane() { return new JRootPane(); } | public JRootPane createRootPane() { return new JRootPane(); } | 11,078 |
Component getGlassPane() { return getRootPane().getGlassPane(); } | public Component getGlassPane() { return getRootPane().getGlassPane(); } | 11,079 |
JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); } | public JLayeredPane getLayeredPane() { return getRootPane().getLayeredPane(); } | 11,080 |
JRootPane getRootPane() { if (rootPane == null) setRootPane(createRootPane()); return rootPane; } | public JRootPane getRootPane() { if (rootPane == null) setRootPane(createRootPane()); return rootPane; } | 11,081 |
void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); } | public void setGlassPane(Component glassPane) { getRootPane().setGlassPane(glassPane); } | 11,082 |
void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); } | public void setLayeredPane(JLayeredPane layeredPane) { getRootPane().setLayeredPane(layeredPane); } | 11,083 |
void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); } | public void setRootPane(JRootPane root) { if (rootPane != null) remove(rootPane); rootPane = root; add(rootPane, BorderLayout.CENTER); } | 11,084 |
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... | 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 g... | 11,085 |
private void dumpMarks() { System.err.print("positionMarks: "); for (int i = 0; i < positionMarks.length; i++) System.err.print(positionMarks[i] + ", "); System.err.println(); } | private void dumpMarks() { System.err.print("positionMarks: "); for (int i = 0; i < numMarks; i++) System.err.print(positionMarks[i] + ", "); System.err.println(); } | 11,086 |
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 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... | 11,087 |
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... | private byte[] 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++) { fin... | 11,088 |
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... | private short[] getCursor(HardwareCursor cursor) { final HardwareCursorImage img = cursor.getImage(32, 32); if (img == null) { return null; } final int w = img.getWidth(); final int h = img.getHeight(); horzOffset = 64 - w; vertOffset = 64 - h; byte[] res = (byte[]) cursorCache.get(img); if (res == null) { ... | 11,089 |
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... | 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 byte[1024]; final int[] argb = img.getImage(); for (int i = 0; i < 1024; i++) { fin... | 11,090 |
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... | 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... | 11,091 |
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... | 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... | 11,092 |
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); } } | public void setCursorImage(HardwareCursor cursor) { // Background color io.setReg32(CUR_CLR0, 0xffffff); // Foreground color io.setReg32(CUR_CLR1, 0); // Set shape final byte[] cur = getCursor(cursor); if (cur != null) { cursorMem.setShorts(cur, 0, 0, 1024); } } | 11,093 |
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); } } | 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) { io.setReg32(CUR_HORZ_VERT_OFF, vertOffset + (horzOffset << ... | 11,094 |
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; ... | 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; ... | 11,095 |
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(); ... | 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. calculateGeometry(); ... | 11,096 |
protected void paintComponent(Graphics g) { super.paintComponent(g); awtComponent.update(g); } | protected void paintComponent(Graphics g) { super.paintComponent(g); } | 11,097 |
public AbstractAction(String name) { this(name, null); // TODO: default icon?? } // AbstractAction() | public AbstractAction(String name) { this(name, null); // TODO: default icon?? } // AbstractAction() | 11,098 |
public void setContentAreaFilled(boolean b) { //Sets whether the button should paint the content area or leave it transparent. } | public void setContentAreaFilled(boolean b) { //Sets whether the button should paint the content area or leave it transparent. } | 11,099 |
protected void installDefaults() { super.installDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); checkIcon = defaults.getIcon("CheckBoxMenuItem.checkIcon"); } | protected void installDefaults() { super.installDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); checkIcon = defaults.getIcon("CheckBoxMenuItem.checkIcon"); } | 11,101 |
static public int[] getScanline (Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read (); if (ch == '0') { in.read (); // 'x' byteStr[0] = (char) in.read (); byteStr[1] = (char) in.read... | public static int[] getScanline (Reader in, int len) throws IOException { char byteStr[] = new char[2]; int scanline[] = new int[len]; int x = 0; while (x < len) { int ch = in.read (); if (ch == '0') { in.read (); // 'x' byteStr[0] = (char) in.read (); byteStr[1] = (char) in.read... | 11,104 |
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new MessageNode(terminate); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; } | TemplateNode clone(Stylesheet stylesheet) TemplateNode ret = new MessageNode(terminate); if (children != null) ret.children = children.clone(stylesheet); } if (next != null) ret.next = next.clone(stylesheet); } return ret; } | 11,105 |
TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new MessageNode(terminate); if (children != null) { ret.children = children.clone(stylesheet); } if (next != null) { ret.next = next.clone(stylesheet); } return ret; } | TemplateNode clone(Stylesheet stylesheet) { TemplateNode ret = new MessageNode(terminate); if (children != null) { ret.children = children.clone(stylesheet); if (next != null) { ret.next = next.clone(stylesheet); return ret; | 11,106 |
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); ... | void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); ... | 11,107 |
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); ... | void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException if (children != null) Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); ... | 11,108 |
void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); ... | void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) throws TransformerException { if (children != null) { Document doc = (parent instanceof Document) ? (Document) parent : parent.getOwnerDocument(); ... | 11,109 |
private static int countSelections(ListSelectionModel lsm) { int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; ... | private static int countSelections(ListSelectionModel lsm) { int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; ... | 11,110 |
private static int countSelections(ListSelectionModel lsm) { int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; ... | private static int countSelections(ListSelectionModel lsm) { int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int sum = 0; if (lo != -1 && hi != -1) { switch (lsm.getSelectionMode()) { case ListSelectionModel.SINGLE_SELECTION: sum = 1; ... | 11,111 |
private static int[] getSelections(ListSelectionModel lsm) { int sz = countSelections(lsm); int [] ret = new int[sz]; int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int j = 0; java.util.ArrayList ls = new java.util.ArrayList(); if (lo != -1 && hi != -1) { s... | private static int[] getSelections(ListSelectionModel lsm) { int sz = countSelections(lsm); int [] ret = new int[sz]; int lo = lsm.getMinSelectionIndex(); int hi = lsm.getMaxSelectionIndex(); int j = 0; java.util.ArrayList ls = new java.util.ArrayList(); if (lo != -1 && hi != -1) { s... | 11,112 |
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((FEATURES + "is-standalone").equals(name)) return xmlStandalone ? Boolean.TRUE : Boolean.FAL... | public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((FEATURES + "is-standalone").equals(name)) return xmlStandalone ? Boolean.TRUE : Boolean.FAL... | 11,114 |
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, ... | public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, ... | 11,116 |
public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, ... | public synchronized void parse(InputSource input) throws IOException, SAXException { reset(); String systemId = input.getSystemId(); InputStream in = input.getByteStream(); boolean opened = false; if (in != null) parser = new XMLParser(in, systemId, validating, ... | 11,119 |
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (parser != null) throw new IllegalStateException("parsing in progress"); String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((... | public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { if (parser != null) throw new IllegalStateException("parsing in progress"); String FEATURES = "http://xml.org/sax/features/"; String PROPERTIES = "http://xml.org/sax/properties/"; if ((... | 11,121 |
public JNodePolicy(ExtensionPoint permissionsEp) { this.policyFile = new PolicyFile(ClassLoader .getSystemResource("/org/jnode/security/jnode.policy")); this.codeSource2Permissions = new HashMap<CodeSource, PermissionCollection>(); this.permissionsEp = permissionsEp; loadE... | public JNodePolicy(ExtensionPoint permissionsEp) { this.policyFile = new PolicyFile(ClassLoader .getSystemResource("/org/jnode/security/jnode.policy")); this.codeSource2Permissions = new HashMap<CodeSource, PermissionCollection>(); this.permissionsEp = permissionsEp; loadE... | 11,123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.