bugged
stringlengths
6
599k
fixed
stringlengths
6
40.8M
__index_level_0__
int64
0
3.24M
public long skip(long bytes) throws IOException { if (isStream) { return super.skip(bytes); } long ret = 0; if (bytes > 0 && available() > 0) { ret = available(); outOffset = outLength = 0; } return ret; }
public long skip(long bytes) throws IOException { if (isStream) { return super.skip(bytes); } long ret = 0; if (bytes > 0 && outBuffer != null && outOffset >= outBuffer.length) { ret = available(); outOffset = outLength = 0; } return ret; }
21,719
public long skip(long bytes) throws IOException { if (isStream) { return super.skip(bytes); } long ret = 0; if (bytes > 0 && available() > 0) { ret = available(); outOffset = outLength = 0; } return ret; }
public long skip(long bytes) throws IOException { if (isStream) { return super.skip(bytes); } long ret = 0; if (bytes > 0 && available() > 0) { ret = available(); outOffset = outLength = 0; } return ret; }
21,720
public Object evaluate(Node context, int pos, int len) { Object val = (arg == null) ? null : arg.evaluate(context, pos, len); return _local_name(context, (Collection) val); }
public Object evaluate(Node context, int pos, int len) { Object val = (arg == null) ? Collections.singleton(context) : arg.evaluate(context, pos, len); return _local_name(context, (Collection) val); }
21,721
public synchronized void fireEvent(KeyboardEvent event) { if (event != null) { for (Iterator i = listeners.iterator(); i.hasNext();) { KeyboardListener l = (KeyboardListener) i.next(); if (event.isKeyPressed()) { l.keyPressed(event); } else if (event.isKeyReleased()) { l.keyReleased(event); } ...
public synchronized void fireEvent(KeyboardEvent event) { if (event != null) { for (Iterator i = listeners.iterator(); i.hasNext();) { KeyboardListener l = (KeyboardListener) i.next(); if (event.isKeyPressed()) { l.keyPressed(event); } else if (event.isKeyReleased()) { l.keyReleased(event); } ...
21,723
public String readLine() throws IOException { if (eof) { return null; } do { if (blockReads) { // Use mark and reset to read chunks of bytes final int MIN_LENGTH = 1024; int len, pos; len = in.available(); ...
public String readLine() throws IOException { if (eof) { return null; } do { if (blockReads) { // Use mark and reset to read chunks of bytes final int MAX_LENGTH = 1024; int len, pos; len = in.available(); ...
21,725
public String readLine() throws IOException { if (eof) { return null; } do { if (blockReads) { // Use mark and reset to read chunks of bytes final int MIN_LENGTH = 1024; int len, pos; len = in.available(); ...
public String readLine() throws IOException { if (eof) { return null; } do { if (blockReads) { // Use mark and reset to read chunks of bytes final int MIN_LENGTH = 1024; int len, pos; len = in.available(); ...
21,726
public static String[] read(InputStream input) { StringSeqHolder h = new StringSeqHolder(); h._read(input); return h.value; }
public static String[] read(InputStream input) { StringSeqHolder h = new StringSeqHolder(); h._read(input); return h.value; }
21,727
public static void write(OutputStream output, String[] value) { StringSeqHolder h = new StringSeqHolder(value); h._write(output); }
public static void write(OutputStream output, String[] value) { StringSeqHolder h = new StringSeqHolder(value); h._write(output); }
21,728
public Object clone() { try { return super.clone(); } catch (Exception e) { System.err.println("Huuuhhh, this class implements cloneable !!!!!!"); System.err.println("I think there is a bug in this JVM somewhere"); } return null; }
public Object clone() { try { return super.clone(); } catch (Exception e) { System.err.println("Huuuhhh, this class implements cloneable !!!!!!"); System.err.println("I think there is a bug in this JVM somewhere"); } return null; }
21,729
public char current() { return array[getIndex()]; }
public char current() { return array[getIndex()]; }
21,731
public char first() { offset = getBeginIndex(); return array[offset]; }
public char first() { offset = getBeginIndex(); return array[offset]; }
21,732
public int getBeginIndex() { return offset; }
public int getBeginIndex() { return offset; }
21,733
public int getIndex() { return offset; }
public int getIndex() { return offset; }
21,734
public char last() { offset = getEndIndex() - 1; return array[offset]; }
public char last() { offset = getEndIndex() - 1; return array[offset]; }
21,735
public char next() { offset++; return array[offset]; }
public char next() { offset++; return array[offset]; }
21,736
public char previous() { offset--; return array[offset]; }
public char previous() { offset--; return array[offset]; }
21,737
public char setIndex(int position) { offset = position; return array[offset]; }
public char setIndex(int position) { offset = position; return array[offset]; }
21,738
public String toString() { return new String(array, offset, count); }
public String toString() { return new String(array, offset, count); }
21,739
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); }
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); }
21,740
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); }
public Ext2FileSystem(Device device, boolean readOnly) throws FileSystemException { super(device, readOnly); log.setLevel(Level.INFO); blockCache = new BlockCache(50,(float)0.75); inodeCache = new INodeCache(50,(float)0.75); //groupDescriptorLock = new Object(); //superblockLock = new Object(); }
21,741
protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table INodeTable iNodeTable = iNodeTables[0]; //byte[] iNodeData = new byte[INode.INODE_LENGTH]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INode...
protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table INodeTable iNodeTable = iNodeTables[0]; //byte[] iNodeData = new byte[INode.INODE_LENGTH]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INode...
21,742
protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table INodeTable iNodeTable = iNodeTables[0]; //byte[] iNodeData = new byte[INode.INODE_LENGTH]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INode...
protected FSEntry buildRootEntry() throws IOException { //a free inode has been found: create the inode and write it into the inode table INodeTable iNodeTable = iNodeTables[0]; //byte[] iNodeData = new byte[INode.INODE_LENGTH]; int iNodeNr = Ext2Constants.EXT2_ROOT_INO; INode iNode = new INode(this, new INode...
21,743
private boolean checkPow(int a, int b) { if(a<=1) return true; while (true) { if(a==b) return true; if(a%b==0) { a=a/b; continue; } return false; } }
private boolean checkPow(int a, int b) { if(a<=1) return true; while (true) { if(a==b) return true; if(a%b==0) { a=a/b; continue; } return false; } }
21,744
private boolean checkPow(int a, int b) { if(a<=1) return true; while (true) { if(a==b) return true; if(a%b==0) { a=a/b; continue; } return false; } }
private boolean checkPow(int a, int b) { if(a<=1) return true; while (true) { if(a==b) return true; if(a%b==0) { a=a/b; continue; } return false; } }
21,745
private boolean checkPow(int a, int b) { if(a<=1) return true; while (true) { if(a==b) return true; if(a%b==0) { a=a/b; continue; } return false; } }
private boolean checkPow(int a, int b) { if(a<=1) return true; while (true) { if(a==b) return true; if(a%b==0) { a=a/b; continue; } return false; } }
21,746
public void close() throws IOException { //mark the filesystem clean superblock.setState(Ext2Constants.EXT2_VALID_FS); super.close(); }
public void close() throws IOException { //mark the filesystem clean superblock.setState(Ext2Constants.EXT2_VALID_FS); super.close(); }
21,747
public void close() throws IOException { //mark the filesystem clean superblock.setState(Ext2Constants.EXT2_VALID_FS); super.close(); }
public void close() throws IOException { //mark the filesystem clean superblock.setState(Ext2Constants.EXT2_VALID_FS); super.close(); }
21,748
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
21,749
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
21,750
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
21,751
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
21,752
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
public void create(int blockSize) throws FileSystemException { try{ //create the superblock superblock = new Superblock(); superblock.create(blockSize, this); //create the group descriptors groupCount = (int)Math.ceil((double)superblock.getBlocksCount() / (double)superblock.getBlocksPerGroup()); groupD...
21,753
protected FSDirectory createDirectory(FSEntry entry) throws IOException { Ext2Entry e = (Ext2Entry) entry; return new Ext2Directory(e); }
protected FSDirectory createDirectory(FSEntry entry) throws IOException { Ext2Entry e = (Ext2Entry) entry; return new Ext2Directory(e); }
21,754
protected FSFile createFile(FSEntry entry) throws IOException { Ext2Entry e = (Ext2Entry) entry; return new Ext2File(e.getINode()); }
protected FSFile createFile(FSEntry entry) throws IOException { Ext2Entry e = (Ext2Entry) entry; return new Ext2File(e.getINode()); }
21,755
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr...
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr...
21,756
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr...
protected INode createINode(int preferredBlockBroup, int fileFormat, int accessRights, int uid, int gid) throws FileSystemException, IOException { if(preferredBlockBroup >= superblock.getBlocksCount()) throw new FileSystemException("Block group "+preferredBlockBroup+" does not exist"); int groupNr = preferr...
21,757
public FSEntry createRootEntry() throws IOException { try{ return new Ext2Entry( getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR, this, null ); }catch(FileSystemException e) { throw new IOException(e); } }
public FSEntry createRootEntry() throws IOException { try{ return new Ext2Entry( getINode(Ext2Constants.EXT2_ROOT_INO), "/", Ext2Constants.EXT2_FT_DIR, this, null ); }catch(FileSystemException e) { throw new IOException(e); } }
21,758
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
21,759
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
21,760
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
public BlockReservation findFreeBlocks(int group, long threshold) throws IOException{ GroupDescriptor gdesc = groupDescriptors[group]; //see if it's worth to check the block group at all if( gdesc.getFreeBlocksCount() < threshold) return new BlockReservation(false, -1, -1, gdesc.getFreeBlocksCount()); /* Retur...
21,761
protected INodeReservation findFreeINode(int blockGroup) throws IOException{ GroupDescriptor gdesc = groupDescriptors[blockGroup]; if(gdesc.getFreeInodesCount()> 0) { //synchronize to the blockCache to avoid flushing the block between reading it //and synchronizing to it synchronized(blockCache) { byte[] bi...
protected INodeReservation findFreeINode(int blockGroup) throws IOException{ GroupDescriptor gdesc = groupDescriptors[blockGroup]; if(gdesc.getFreeInodesCount()> 0) { //synchronize to the blockCache to avoid flushing the block between reading it //and synchronizing to it synchronized(blockCache) { byte[] bi...
21,762
public void flush() throws IOException { log.info("Flushing the contents of the filesystem"); //update the inodes synchronized(inodeCache) { try{ log.debug("inodecache size: "+inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while(iterator.hasNext()) { INode iNode = (INode)iter...
public void flush() throws IOException { log.info("Flushing the contents of the filesystem"); //update the inodes synchronized(inodeCache) { try{ log.debug("inodecache size: "+inodeCache.size()); Iterator iterator = inodeCache.values().iterator(); while(iterator.hasNext()) { INode iNode = (INode)iter...
21,763
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
21,764
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
21,765
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
public void freeBlock(long blockNr) throws FileSystemException, IOException{ if(blockNr<0 || blockNr>=superblock.getBlocksCount()) throw new FileSystemException("Attempt to free nonexisting block ("+blockNr+")"); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); GroupDescriptor gde...
21,766
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
21,767
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
21,768
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) ...
21,769
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
protected byte[] getBlock(long nr) throws IOException{ if(isClosed()) throw new IOException("FS closed (fs instance: "+this+")"); //log.debug("blockCache size: "+blockCache.size()); int blockSize = superblock.getBlockSize(); Block result; Integer key=new Integer((int)(nr)); synchronized(blockCache) {...
21,770
protected synchronized BlockCache getBlockCache() { return blockCache; }
protected synchronized BlockCache getBlockCache() { return blockCache; }
21,771
public int getBlockSize() { return superblock.getBlockSize(); }
public int getBlockSize() { return superblock.getBlockSize(); }
21,772
protected int getGroupCount() { return groupCount; }
protected int getGroupCount() { return groupCount; }
21,773
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(iNodeNr); log.debug("iNodeCache size: "+inod...
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(iNodeNr); log.debug("iNodeCache size: "+inod...
21,774
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(iNodeNr); log.debug("iNodeCache size: "+inod...
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(iNodeNr); log.debug("iNodeCache size: "+inod...
21,775
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(iNodeNr); log.debug("iNodeCache size: "+inod...
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(iNodeNr); log.debug("iNodeCache size: "+inod...
21,776
protected synchronized INodeCache getInodeCache() { return inodeCache; }
protected synchronized INodeCache getInodeCache() { return inodeCache; }
21,777
public Superblock getSuperblock() { return superblock; }
public Superblock getSuperblock() { return superblock; }
21,778
protected boolean groupHasDescriptors(int groupNr){ if(hasROFeature(Ext2Constants.EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) return (checkPow(groupNr, 3)||checkPow(groupNr, 5)||checkPow(groupNr, 7)); else return true; }
protected boolean groupHasDescriptors(int groupNr){ if(hasROFeature(Ext2Constants.EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)) return (checkPow(groupNr, 3)||checkPow(groupNr, 5)||checkPow(groupNr, 7)); else return true; }
21,779
protected void handleFSError(Exception e) { //mark the fs as having errors superblock.setState(Ext2Constants.EXT2_ERROR_FS); if(superblock.getErrors()==Ext2Constants.EXT2_ERRORS_RO) setReadOnly(true); //remount readonly if(superblock.getErrors()==Ext2Constants.EXT2_ERRORS_PANIC) throw new RuntimeException(...
protected void handleFSError(Exception e) { //mark the fs as having errors superblock.setState(Ext2Constants.EXT2_ERROR_FS); if(superblock.getErrors()==Ext2Constants.EXT2_ERRORS_RO) setReadOnly(true); //remount readonly if(superblock.getErrors()==Ext2Constants.EXT2_ERRORS_PANIC) throw new RuntimeException(...
21,780
protected boolean hasIncompatFeature(long mask){ return (mask & superblock.getFeatureIncompat()) != 0; }
protected boolean hasIncompatFeature(long mask){ return (mask & superblock.getFeatureIncompat()) != 0; }
21,781
protected boolean hasROFeature(long mask){ return (mask & superblock.getFeatureROCompat()) != 0; }
protected boolean hasROFeature(long mask){ return (mask & superblock.getFeatureROCompat()) != 0; }
21,782
protected void modifyFreeBlocksCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setFreeBlocksCount( gdesc.getFreeBlocksCount()+diff ); superblock.setFreeBlocksCount( superblock.getFreeBlocksCount()+diff ); }
protected void modifyFreeBlocksCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setFreeBlocksCount( gdesc.getFreeBlocksCount()+diff ); superblock.setFreeBlocksCount( superblock.getFreeBlocksCount()+diff ); }
21,783
protected void modifyFreeInodesCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setFreeInodesCount( gdesc.getFreeInodesCount()+diff ); superblock.setFreeInodesCount( superblock.getFreeInodesCount()+diff ); }
protected void modifyFreeInodesCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setFreeInodesCount( gdesc.getFreeInodesCount()+diff ); superblock.setFreeInodesCount( superblock.getFreeInodesCount()+diff ); }
21,784
protected void modifyFreeInodesCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setFreeInodesCount( gdesc.getFreeInodesCount()+diff ); superblock.setFreeInodesCount( superblock.getFreeInodesCount()+diff ); }
protected void modifyFreeInodesCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setFreeInodesCount( gdesc.getFreeInodesCount()+diff ); superblock.setFreeInodesCount( superblock.getFreeInodesCount()+diff ); }
21,785
protected void modifyUsedDirsCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setUsedDirsCount( gdesc.getUsedDirsCount()+diff ); }
protected void modifyUsedDirsCount(int group, int diff) { GroupDescriptor gdesc = groupDescriptors[group]; gdesc.setUsedDirsCount( gdesc.getUsedDirsCount()+diff ); }
21,786
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
21,787
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
21,788
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
21,789
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
public void read() throws FileSystemException { byte data[]; try { data = new byte[Superblock.SUPERBLOCK_LENGTH]; //skip the first 1024 bytes (bootsector) and read the superblock //TODO: the superblock should read itself getApi().read(1024, data, 0, Superblock.SUPERBLOCK_LENGTH); //superblock = new Superb...
21,790
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
21,791
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
21,792
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
21,793
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
21,794
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
public BlockReservation testAndSetBlock(long blockNr) throws IOException{ if(blockNr<superblock.getFirstDataBlock() || blockNr>=superblock.getBlocksCount()) return new BlockReservation(false, -1, -1); int group = translateToGroup(blockNr); int index = translateToIndex(blockNr); /* Return false if the block is no...
21,795
protected int translateToGroup(long i) { return (int)((i-superblock.getFirstDataBlock()) / superblock.getBlocksPerGroup()); }
protected int translateToGroup(long i) { return (int)((i-superblock.getFirstDataBlock()) / superblock.getBlocksPerGroup()); }
21,796
protected int translateToIndex(long i) { return (int)((i-superblock.getFirstDataBlock()) % superblock.getBlocksPerGroup()); }
protected int translateToIndex(long i) { return (int)((i-superblock.getFirstDataBlock()) % superblock.getBlocksPerGroup()); }
21,797
protected void updateFS() throws IOException { //updating one group descriptor updates all its copies for(int i=0; i<groupCount; i++) groupDescriptors[i].updateGroupDescriptor(); superblock.update(); }
protected void updateFS() throws IOException { //updating one group descriptor updates all its copies for(int i=0; i<groupCount; i++) groupDescriptors[i].updateGroupDescriptor(); superblock.update(); }
21,798
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
21,799
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
21,800
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
public void writeBlock(long nr, byte[] data, boolean forceWrite) throws IOException { if(isClosed()) throw new IOException("FS closed"); if(isReadOnly()) throw new ReadOnlyFileSystemException("Filesystem is mounted read-only!"); Block block; Integer key=new Integer((int)nr); int blockSize=superblock.get...
21,801
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name) { super(children, next); this.name = name; }
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name) { super(children, next); this.name = name; }
21,802
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name) { super(children, next); this.name = name; }
ProcessingInstructionNode(TemplateNode children, TemplateNode next, String name) { this.name = name; }
21,803
TemplateNode clone(Stylesheet stylesheet) { return new ProcessingInstructionNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), ...
TemplateNode clone(Stylesheet stylesheet) { return new ProcessingInstructionNode((children == null) ? null : children.clone(stylesheet), (next == null) ? null : next.clone(stylesheet), ...
21,804
public Container getContainer() { View parent = getParent(); if (parent == null) throw new AssertionError("The parent of a View must not be null."); return parent.getContainer(); }
public Container getContainer() { View parent = getParent(); if (parent == null) return null; else return parent.getContainer(); }
21,806
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
21,807
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
21,808
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
protected final Item clone(EmitterContext ec) { final Item res; final AbstractX86Stream os = ec.getStream(); switch (getKind()) { case Kind.REGISTER: final X86RegisterPool pool = ec.getPool(); final Register lsb = pool.request(JvmType.INT); final Register msb = pool.request(JvmType.INT); os.writeMOV(INTSIZ...
21,809
public Class[] getExceptionTypes() { if (exceptionTypes == null) { final VmExceptions exceptions = vmMethod.getExceptions(); final int cnt = exceptions.getLength(); final ArrayList list = new ArrayList(cnt); for (int i = 0; i < cnt; i++) { try { list.add(exceptions.getException(i).getRe...
public Class[] getExceptionTypes() { if (exceptionTypes == null) { final VmExceptions exceptions = vmMethod.getExceptions(); final int cnt = exceptions.getLength(); final ArrayList list = new ArrayList(cnt); for (int i = 0; i < cnt; i++) { try { list.add(exceptions.getException(i).getRe...
21,810
public Class[] getParameterTypes() { if (parameterTypes == null) { int cnt = vmMethod.getNoArguments(); ArrayList list = new ArrayList(cnt); for (int i = 0; i < cnt; i++) { list.add(vmMethod.getArgumentType(i).asClass()); } parameterTypes = list; } return (Class[])parameterTypes.toArray(new Class[param...
public Class[] getParameterTypes() { if (parameterTypes == null) { int cnt = vmMethod.getNoArguments(); ArrayList list = new ArrayList(cnt); for (int i = 0; i < cnt; i++) { list.add(vmMethod.getArgumentType(i).asClass()); } parameterTypes = list; } return (Class[])parameterTypes.toArray(new Class[param...
21,811
public int hashCode() { return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); }
public int hashCode() { return getDeclaringClass().getName().hashCode() ^ getName().hashCode(); }
21,812
public String toString() { // 128 is a reasonable buffer initial size for constructor StringBuffer sb = new StringBuffer(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('...
public String toString() { // 128 is a reasonable buffer initial size for constructor StringBuffer sb = new StringBuffer(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('...
21,813
public String toString() { // 128 is a reasonable buffer initial size for constructor StringBuffer sb = new StringBuffer(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('...
public String toString() { // 128 is a reasonable buffer initial size for constructor StringBuffer sb = new StringBuffer(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(getReturnType().getName()).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('...
21,814
AccessibleJMenuItem(JMenuItem component) { super(component); // TODO } // AccessibleJMenuItem()
AccessibleJMenuItem(JMenuItem component) { super(component); // TODO } // AccessibleJMenuItem()
21,815
public AccessibleRole getAccessibleRole() { return AccessibleRole.MENU_ITEM; } // getAccessibleRole()
public AccessibleRole getAccessibleRole() { return AccessibleRole.MENU_ITEM; } // getAccessibleRole()
21,816
public void stateChanged(ChangeEvent event) { // TODO } // stateChanged()
public void stateChanged(ChangeEvent event) { // TODO } // stateChanged()
21,817
public JMenuItem() { // TODO } // JMenuItem()
public JMenuItem() { // TODO } // JMenuItem()
21,818
public void addMenuDragMouseListener(MenuDragMouseListener listener) { // TODO } // addMenuDragMouseListener()
public void addMenuDragMouseListener(MenuDragMouseListener listener) { // TODO } // addMenuDragMouseListener()
21,819
public void addMenuKeyListener(MenuKeyListener listener) { // TODO } // addMenuKeyListener()
public void addMenuKeyListener(MenuKeyListener listener) { // TODO } // addMenuKeyListener()
21,820
protected void configurePropertiesFromAction(Action action) { // TODO } // configurePropertiesFromAction()
protected void configurePropertiesFromAction(Action action) { // TODO } // configurePropertiesFromAction()
21,821
protected PropertyChangeListener createActionPropertyChangeListener(Action action) { return null; // TODO } // createActionPropertyChangeListener()
protected PropertyChangeListener createActionPropertyChangeListener(Action action) { return null; // TODO } // createActionPropertyChangeListener()
21,822