bugged stringlengths 6 599k | fixed stringlengths 10 599k | __index_level_0__ int64 0 1.13M |
|---|---|---|
void moveTo(FileObject destFile) throws FileSystemException; | public void moveTo(FileObject destFile) throws FileSystemException; | 1,100,973 |
FileObject resolveFile(String name, NameScope scope) throws FileSystemException; | public FileObject resolveFile(String name, NameScope scope) throws FileSystemException; | 1,100,974 |
public void test() throws EtlExecutorException { EtlExecutor etlExecutor = newEtlExecutor(); Connection c = getConnection("cancelTest"); final Thread etlThread = Thread.currentThread(); interrupted = false; new Thread() { public void run() { try { ... | public void test() throws EtlExecutorException { EtlExecutor etlExecutor = newEtlExecutor(); Connection c = getConnection("cancelTest"); final Thread etlThread = Thread.currentThread(); interrupted = false; new Thread() { public void run() { try { ... | 1,100,975 |
public void testUnix() throws MalformedURLException { URL base = new URL("file:/var/script.xml"); String s = "1.jar: lib/second.jar :third.jar:;http://5.jar; ::; "; UrlPathTokenizer tok = new UrlPathTokenizer(base); URL[] actual = tok.split(s); String[] expected = new String[] {... | public void testUnix() throws MalformedURLException { URL base = new URL("file:/var/etl.xml"); String s = "1.jar: lib/second.jar :third.jar:;http://5.jar; ::; "; UrlPathTokenizer tok = new UrlPathTokenizer(base); URL[] actual = tok.split(s); String[] expected = new String[] {"fi... | 1,100,977 |
public void testWin() throws MalformedURLException { URL base = new URL("file:/c:/docs/script.xml"); String s = " 1.jar;;;:::: lib/second.jar ;../third.jar:http://5.jar; file:/file name ; "; UrlPathTokenizer tok = new UrlPathTokenizer(base); URL[] actual = tok.split(s); Stri... | public void testWin() throws MalformedURLException { URL base = new URL("file:/c:/docs/etl.xml"); String s = " 1.jar;;;:::: lib/second.jar ;../third.jar:http://5.jar; file:/file name ; "; UrlPathTokenizer tok = new UrlPathTokenizer(base); URL[] actual = tok.split(s); String[... | 1,100,978 |
public Object getAttribute( String attrName ) throws FileSystemException { final String message = REZ.getString( "get-attribute-not-supported.error" ); throw new FileSystemException( message ); } | public Object getAttribute( String attrName ) throws FileSystemException { final String message = REZ.getString( "get-attribute-not-supported.error" ); throw new FileSystemException( message ); } | 1,100,979 |
public void setAttribute( String attrName, Object value ) throws FileSystemException { final String message = REZ.getString( "set-attribute-not-supported.error" ); throw new FileSystemException( message ); } | public void setAttribute( String attrName, Object value ) throws FileSystemException { final String message = REZ.getString( "set-attribute-not-supported.error" ); throw new FileSystemException( message ); } | 1,100,980 |
void toRamFileObject(FileObject fo, FileObject root) throws FileSystemException { RamFileObject memFo = (RamFileObject) this.resolveFile(fo.getName() .getPath().substring(root.getName().getPath().length())); if (fo.getType().equals(FileType.FOLDER)) { // Create Folder memFo.createFolder(); // Import recu... | void toRamFileObject(FileObject fo, FileObject root) throws FileSystemException { RamFileObject memFo = (RamFileObject) this.resolveFile(fo.getName() .getPath().substring(root.getName().getPath().length())); if (fo.getType().hasChildren()) { // Create Folder memFo.createFolder(); // Import recursively ... | 1,100,981 |
public static UserAuthenticationData authenticate(FileSystemOptions opts, UserAuthenticationData.Type[] authenticatorTypes) { UserAuthenticator auth = DefaultFileSystemConfigBuilder.getInstance().getUserAuthenticator(opts); if (auth == null) { return null; } return auth.requestAuthentication(authenticatorTypes)... | public static UserAuthenticationData authenticate(FileSystemOptions opts, UserAuthenticationData.Type[] authenticatorTypes) { UserAuthenticator auth = DefaultFileSystemConfigBuilder.getInstance().getUserAuthenticator(opts); if (auth == null) { return null; } return auth.requestAuthentication(authenticatorTypes)... | 1,100,982 |
public XYZColor(float X, float Y, float Z) { this.X = X; this.Y = Y; this.Z = Z; } | public XYZColor(float X, float Y, float Z) { this.X = X; this.Y = Y; this.Z = Z; } | 1,100,983 |
public void test() throws ScriptsExecutorException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); testURLHandler = new TestURLHandler() { public InputStream getInputStream(final URL u) { return new ByteArrayInputStream("f1,f2,f3\n1,2,3\n4,5,6\n7,8,9".getByte... | public void test() throws ScriptsExecutorException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); testURLHandler = new TestURLHandler() { public InputStream getInputStream(final URL u) { return new ByteArrayInputStream("f1,f2,f3\n1,2,3\nCol4,5,6\n7,8,9".getB... | 1,100,984 |
public void test() throws ScriptsExecutorException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); testURLHandler = new TestURLHandler() { public InputStream getInputStream(final URL u) { return new ByteArrayInputStream("f1,f2,f3\n1,2,3\n4,5,6\n7,8,9".getByte... | public void test() throws ScriptsExecutorException { final ByteArrayOutputStream out = new ByteArrayOutputStream(); testURLHandler = new TestURLHandler() { public InputStream getInputStream(final URL u) { return new ByteArrayInputStream("f1,f2,f3\n1,2,3\n4,5,6\n7,8,9".getByte... | 1,100,985 |
public InputStream getInputStream(final URL u) { return new ByteArrayInputStream("f1,f2,f3\n1,2,3\n4,5,6\n7,8,9".getBytes()); } | public InputStream getInputStream(final URL u) { return new ByteArrayInputStream("f1,f2,f3\n1,2,3\nCol4,5,6\n7,8,9".getBytes()); } | 1,100,987 |
public String[] getTableData() { String[] str = new String[2]; str[0] = toConcept; str[1] = relationValue.toString(); return str; } | public String[] getTableData() { String[] str = new String[2]; str[0] = toConcept; str[1] = String.format("%.3f", Double.parseDouble(relationValue.toString())); return str; } | 1,100,988 |
public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project, String type) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project, type); beforeTrimmingConceptNum = Utils.getAllConcept(treeModel).size(); ConceptTreeNode rootNode = (ConceptTreeNode) treeModel.getRoot(); ... | public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project, String type) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project, type); beforeTrimmingConceptNum = Utils.getAllConcept(treeModel).size(); ConceptTreeNode rootNode = (ConceptTreeNode) treeModel.getRoot(); ... | 1,100,989 |
private void handleResultInput() { boolean good = true; boolean goodValues = true; boolean startNbrAdded = false; int nbrRoundsToRead = 0; int nbrReadableInputs = 0; int prioNr = Integer.MAX_VALUE; int startNr = -1; String licenseNr = "null"; int[] results = new int[nbrRounds]; StringTokenizer str = new Stri... | private void handleResultInput() { boolean good = true; boolean goodValues = true; boolean startNbrAdded = false; int nbrRoundsToRead = 0; int nbrReadableInputs = 0; int prioNr = Integer.MAX_VALUE; int startNr = -1; String licenseNr = "null"; int[] results = new int[nbrRounds]; StringTokenizer str = new Stri... | 1,100,990 |
public void setup(CompareFile compareFile) { this.compareFile = compareFile; this.cols = 3; board.removeAll(); label = new JLabel[65][cols]; setLabelLayout(label); board.repaint(); if(compareFile.size() != 0) { updateMean(true); } } | public void setup(CompareFile compareFile) { this.compareFile = compareFile; this.cols = 3; board.removeAll(); label = new JLabel[65][cols]; setLabelLayout(label); board.repaint(); if(compareFile.size() != 0) { updateMean(true); } } | 1,100,991 |
public void changeNameAndClub(Integer personID, String newName, String newClub) { String newIdentity = newName + newClub; if(IDMap.containsKey(personID)) { PersonResult pr = (PersonResult) IDMap.get(personID); pr.changeNameAndClub(newName, newClub); } } | public void changeNameAndClub(Integer personID, String newName, String newClub) { if(IDMap.containsKey(personID)) { PersonResult pr = (PersonResult) IDMap.get(personID); pr.changeNameAndClub(newName, newClub); } } | 1,100,992 |
private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | 1,100,993 |
private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | 1,100,994 |
private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | 1,100,995 |
public final Color set(Color c) { r = c.r; g = c.g; b = c.b; return this; } | public final Color set(Color c) { r = c.r; g = c.g; b = c.b; return this; } | 1,100,996 |
public void tstPublish() throws Exception { this.exporter.setBeanFactory(this.beanFactory); this.exporter.setBundleContext(this.bundleContext); MockControl mc = MockControl.createControl(OsgiServicePropertiesResolver.class); OsgiServicePropertiesResolver resolver = (OsgiServicePropertiesResolver) mc.getMock(); th... | public void tstPublish() throws Exception { this.exporter.setBeanFactory(this.beanFactory); this.exporter.setBundleContext(this.bundleContext); MockControl mc = MockControl.createControl(OsgiServicePropertiesResolver.class); OsgiServicePropertiesResolver resolver = (OsgiServicePropertiesResolver) mc.getMock(); th... | 1,100,998 |
public void intersectPrimitive(Ray r, int primID, IntersectionState state) { int quad = 4 * primID; int a = 3 * quads[quad + 0]; int b = 3 * quads[quad + 1]; int c = 3 * quads[quad + 2]; int d = 3 * quads[quad + 3]; intersectTriangleKensler(r, 2 * primID + 0, a, b, c, state... | public void intersectPrimitive(Ray r, int primID, IntersectionState state) { int quad = 4 * primID; int a = 3 * quads[quad + 0]; int b = 3 * quads[quad + 1]; int c = 3 * quads[quad + 2]; int d = 3 * quads[quad + 3]; intersectTriangleKensler(r, 2 * primID + 0, a, b, c, state... | 1,100,999 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,000 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); state.getRay(... | 1,101,001 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,002 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,003 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,004 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,005 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,006 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,007 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,008 |
public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | 1,101,009 |
public String getBaseName() { if ( baseName == null ) { final int idx = absPath.lastIndexOf( separatorChar ); if ( idx == -1 ) { baseName = absPath; } else { baseName = absPath.substring( idx + 1 ); ... | public String getBaseName() { if ( baseName == null ) { final int idx = absPath.lastIndexOf( SEPARATOR_CHAR ); if ( idx == -1 ) { baseName = absPath; } else { baseName = absPath.substring( idx + 1 ); ... | 1,101,010 |
private void initGUI() { setTitle("Sunflow v" + SunflowAPI.VERSION); setDefaultCloseOperation(EXIT_ON_CLOSE); { desktop = new JDesktopPane(); getContentPane().add(desktop, BorderLayout.CENTER); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); ... | private void initGUI() { setTitle("Sunflow v" + SunflowAPI.VERSION); setDefaultCloseOperation(EXIT_ON_CLOSE); { desktop = new JDesktopPane(); getContentPane().add(desktop, BorderLayout.CENTER); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); ... | 1,101,011 |
private void initGUI() { setTitle("Sunflow v" + SunflowAPI.VERSION); setDefaultCloseOperation(EXIT_ON_CLOSE); { desktop = new JDesktopPane(); getContentPane().add(desktop, BorderLayout.CENTER); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); ... | private void initGUI() { setTitle("Sunflow v" + SunflowAPI.VERSION); setDefaultCloseOperation(EXIT_ON_CLOSE); { desktop = new JDesktopPane(); getContentPane().add(desktop, BorderLayout.CENTER); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); ... | 1,101,012 |
int executeStatement(final String sql) { try { PreparedStatement ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCou... | int executeStatement(final String sql) { try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCount = executeStatem... | 1,101,014 |
int executeStatement(final String sql) { try { PreparedStatement ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCou... | int executeStatement(final String sql) { try { PreparedStatement ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCou... | 1,101,015 |
private void releaseStatement() { if (statementCache!=null) { statementCache.closeRemovedStatements(); } params.clear(); IOUtils.closeSilently(converter); //closing resources opened by converter } | private void releaseStatement(PreparedStatement ps) { if (statementCache!=null) { statementCache.closeRemovedStatements(); } params.clear(); IOUtils.closeSilently(converter); //closing resources opened by converter } | 1,101,016 |
protected FileObject createFile( final FileName name ) throws FileSystemException { try { final URL url = new URL( name.getURI() ); return new UrlFileObject( this, name, url ); } catch ( MalformedURLException e ) { throw new FileSystemException(... | protected FileObject createFile( final FileName name ) throws FileSystemException { try { final URL url = new URL( name.getURI() ); return new UrlFileObject( this, name, url ); } catch ( MalformedURLException e ) { throw new FileSystemException(... | 1,101,018 |
protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Create the file system final LocalFileName rootName = (LocalFileName) name; return new LocalFileSystem(rootName, rootName.getRootFile()); } | protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Create the file system final LocalFileName rootName = (LocalFileName) name; return new LocalFileSystem(rootName, rootName.getRootFile(), fileSystemOp... | 1,101,019 |
public Number getNumberProperty(String name, Number defaultValue) throws ParseException { Object v = properties.get(name); if (v == null) { return defaultValue; } if (v instanceof Number) { return ((Number) v); } String s = v.toString(); if (s.l... | public Number getNumberProperty(String name, Number defaultValue) throws ParseException { Object v = properties.get(name); if (v == null) { return defaultValue; } if (v instanceof Number) { return ((Number) v); } String s = v.toString(); if (s.l... | 1,101,020 |
public URL getURL() throws IOException { URL url = null; if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } ... | public URL getURL() throws IOException { URL url = null; if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } ... | 1,101,023 |
public URL getURL() throws IOException { URL url = null; if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } ... | public URL getURL() throws IOException { URL url = null; if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } ... | 1,101,024 |
public void close() throws IOException { if ( _finished ) { return; } // Close the stream IOException exc = null; try { super.close(); } catch ( IOException e ) { ... | public void close() throws IOException { if ( finished ) { return; } // Close the stream IOException exc = null; try { super.close(); } catch ( IOException e ) { ... | 1,101,025 |
public void close() throws IOException { if ( _finished ) { return; } // Close the stream IOException exc = null; try { super.close(); } catch ( IOException e ) { ... | public void close() throws IOException { if ( _finished ) { return; } // Close the stream IOException exc = null; try { super.close(); } catch ( IOException e ) { ... | 1,101,026 |
public int read() throws IOException { if ( _finished ) { return -1; } int ch = super.read(); if ( ch != -1 ) { return ch; } // End-of-stream close(); return -1; ... | public int read() throws IOException { if ( finished ) { return -1; } int ch = super.read(); if ( ch != -1 ) { return ch; } // End-of-stream close(); return -1; ... | 1,101,027 |
public void constructTree() { new Thread() { private void addComplexWordNode(int len, InputWordModel iwModel, TreeNode node) { if (len == iwModel.getComplexWordLength()) { return; } List wordList = iwModel.getWordList(); StringBu... | public void constructTree() { new Thread() { private void addComplexWordNode(int len, InputWordModel iwModel, TreeNode node) { if (len == iwModel.getComplexWordLength()) { return; } List wordList = iwModel.getWordList(); StringBu... | 1,101,028 |
public void constructTree() { new Thread() { private void addComplexWordNode(int len, InputWordModel iwModel, TreeNode node) { if (len == iwModel.getComplexWordLength()) { return; } List wordList = iwModel.getWordList(); StringBu... | public void constructTree() { new Thread() { private void addComplexWordNode(int len, InputWordModel iwModel, TreeNode node) { if (len == iwModel.getComplexWordLength()) { return; } List wordList = iwModel.getWordList(); StringBu... | 1,101,029 |
private TreeModel makeNounConceptTreeModel(Set nounConceptSet) { constructConceptTreePanel.init(); TreeModel nounTreeModel = constructConceptTreePanel.getTreeModel(nounConceptSet); constructConceptTreePanel.setTreeModel(nounTreeModel); ... | private TreeModel makeNounConceptTreeModel(Set nounConceptSet) { constructConceptTreePanel.init(); TreeModel nounTreeModel = constructConceptTreePanel.getTreeModel(nounConceptSet); constructConceptTreePanel.setTreeModel(nounTreeModel); ... | 1,101,030 |
private TreeModel makeVerbConceptTreeModel(Set verbIDSet) { constructPropertyTreePanel.init(); TreeModel propertyTreeModel = constructPropertyTreePanel.getTreeModel(constructConceptTreePanel .getAllConceptID(), verbIDSet); ... | private TreeModel makeVerbConceptTreeModel(Set verbIDSet) { constructPropertyTreePanel.init(); TreeModel propertyTreeModel = constructPropertyTreePanel.getTreeModel(constructConceptTreePanel .getAllConceptID(), verbIDSet); ... | 1,101,031 |
private SpectralCurve computeAttenuatedSunlight(float theta, float turbidity) { float[] data = new float[41]; // holds the sunsky curve data final double alpha = 1.3; final double lozone = 0.35; final double w = 2.0; double beta = 0.04608365822050 * turbidity - 0.04586025928522; ... | private SpectralCurve computeAttenuatedSunlight(float theta, float turbidity) { float[] data = new float[41]; // holds the sunsky curve data final double alpha = 1.3; final double lozone = 0.35; final double w = 2.0; double beta = 0.04608365822050 * turbidity - 0.04586025928522; ... | 1,101,034 |
public DelegateFileObject( final FileName name, final AbstractFileSystem fileSystem, final FileObject file ) { super( name, fileSystem ); this.file = file; } | public DelegateFileObject( final FileName name, final AbstractFileSystem fileSystem, final FileObject file ) throws FileSystemException { super( name, fileSystem ); this.file = file; } | 1,101,036 |
protected void doCreateFolder() throws Exception { file.createFolder(); } | protected void doCreateFolder() throws Exception { ignoreEvent = true; try { file.createFolder(); } finally { ignoreEvent = false; } } | 1,101,039 |
protected void doDelete() throws Exception { file.delete(); } | protected void doDelete() throws Exception { ignoreEvent = true; try { file.delete(); } finally { ignoreEvent = false; } } | 1,101,040 |
protected FileType doGetType() throws Exception { if ( file != null ) { if ( file.exists() ) { return file.getType(); } } else if ( children.size() > 0 ) { return FileType.FOLDER; } return null; } | protected FileType doGetType() throws FileSystemException { if ( file != null ) { if ( file.exists() ) { return file.getType(); } } else if ( children.size() > 0 ) { return FileType.FOLDER; } return null; ... | 1,101,041 |
public void fileCreated( final FileChangeEvent event ) throws Exception { handleCreate( file.getType() ); } | public void fileCreated( final FileChangeEvent event ) throws Exception { if ( !ignoreEvent ) { handleCreate( file.getType() ); } } | 1,101,042 |
public void fileDeleted( final FileChangeEvent event ) throws Exception { handleDelete(); } | public void fileDeleted( final FileChangeEvent event ) throws Exception { if ( !ignoreEvent ) { handleDelete(); } } | 1,101,043 |
public void close() { if (con != null) { try { con.close(); con = null; } catch (SQLException e) { throw new JDBCException("Unable to close a connection", e); } statementCache.close(); statementCache=null; ... | public void close() { if (con != null) { try { con.close(); con = null; } catch (SQLException e) { throw new JDBCException("Unable to close a connection", e); } statementCache.close(); statementCache=null; ... | 1,101,044 |
public String edit(){ deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } sprint = sprintDAO.get(sprintId); if (sprint == null){ super.addActionError(super.getText("sprint.notFound")); return ... | public String edit(){ deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } sprint = sprintDAO.get(sprintId); if (sprint == null){ super.addActionError(super.getText("sprint.notFound")); return ... | 1,101,046 |
public String store(){ if (sprint == null){ super.addActionError(super.getText("sprint.missingForm")); return Action.INPUT; } deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } Sprint fil... | public String store(){ if (sprint == null){ super.addActionError(super.getText("sprint.missingForm")); return Action.INPUT; } deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } Sprint fil... | 1,101,048 |
protected String[] getApplicationContextLocations(Bundle bundle) { Dictionary manifestHeaders = bundle.getHeaders(); String contextLocationsHeader = (String) manifestHeaders.get(CONTEXT_LOCATION_HEADER); if (contextLocationsHeader != null) { String[] locs = StringUtils.tokenizeToStringArray(contextLocationsHeader... | protected String[] getApplicationContextLocations(Bundle bundle) { Dictionary manifestHeaders = bundle.getHeaders(); String contextLocationsHeader = (String) manifestHeaders.get(CONTEXT_LOCATION_HEADER); if (contextLocationsHeader != null) { String[] locs = StringUtils.tokenizeToStringArray(contextLocationsHeader... | 1,101,049 |
public Color getRadiance(ShadingState state) { state.faceforward(); state.initCausticSamples(); return state.diffuse(Color.WHITE); } | public Color getRadiance(ShadingState state) { state.faceforward(); state.initCausticSamples(); Color lr = Color.black(); for (LightSample sample : state) lr.madd(sample.dot(state.getNormal()), sample.getDiffuseRadiance()); return lr.mul(1.0f / (float) Math.PI); } | 1,101,050 |
public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... | public static void configure(Handler handler) { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); f... | 1,101,051 |
public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... | public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(handler.getLevel()); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final St... | 1,101,052 |
public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... | public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... | 1,101,053 |
private Object compile(final Resource content, final boolean query) { Object ctx = objectCache.get(content); if (ctx == null) { ScriptEvaluator evaluator = new ScriptEvaluator(); //Exception are not required to be handled evaluator.setThrownExceptions(THROWN_EXCEPTIONS... | private Object compile(final Resource content, final boolean query) { Object ctx = objectCache.get(content); if (ctx == null) { ScriptEvaluator evaluator = new ScriptEvaluator(); //Exception are not required to be handled evaluator.setThrownExceptions(THROWN_EXCEPTIONS... | 1,101,054 |
private void check() { this.refresh(); try { // If the file existed and now doesn't if (this.exists && !this.file.exists()) { this.exists = this.file.exists(); this.timestamp = -1; ... | private void check() { this.refresh(); try { // If the file existed and now doesn't if (this.exists && !this.file.exists()) { this.exists = this.file.exists(); this.timestamp = -1; ... | 1,101,056 |
private void checkForNewChildren() { try { if (this.file.getType() == FileType.FOLDER) { FileObject[] newChildren = this.file.getChildren(); if (this.children != null) { // ... | private void checkForNewChildren() { try { if (this.file.getType().hasChildren()) { FileObject[] newChildren = this.file.getChildren(); if (this.children != null) { // See w... | 1,101,057 |
private void fireAllCreate(FileObject child) { // Add listener so that it can be triggered if (this.fm.getFileListener() != null) { child.getFileSystem().addListener(child, this.fm.getFileListener()); } ((AbstractFileSystem) child.getF... | private void fireAllCreate(FileObject child) { // Add listener so that it can be triggered if (this.fm.getFileListener() != null) { child.getFileSystem().addListener(child, this.fm.getFileListener()); } ((AbstractFileSystem) child.getF... | 1,101,058 |
private void resetChildrenList() { try { if (this.file.getType() == FileType.FOLDER) { this.children = new HashMap(); FileObject[] childrenList = this.file.getChildren(); for (int i = 0; i < child... | private void resetChildrenList() { try { if (this.file.getType().hasChildren()) { this.children = new HashMap(); FileObject[] childrenList = this.file.getChildren(); for (int i = 0; i < childrenLi... | 1,101,059 |
public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | public void init() throws FileSystemException { // Figure out where the known_hosts file is final File sshDir; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); knownH... | 1,101,060 |
public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | 1,101,061 |
public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | 1,101,062 |
public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... | 1,101,063 |
protected FileObject createFile( final FileName name ) throws FileSystemException { // Find the file that the name points to final FileName junctionPoint = getJunctionForFile( name ); final FileObject file; if ( junctionPoint != null ) { // Resolve the real fi... | protected FileObject createFile( final FileName name ) throws Exception { // Find the file that the name points to final FileName junctionPoint = getJunctionForFile( name ); final FileObject file; if ( junctionPoint != null ) { // Resolve the real file ... | 1,101,065 |
FileContentInputStream(final InputStream instr) { super(instr); } | FileContentInputStream(final FileObject file, final InputStream instr) { super(instr); } | 1,101,066 |
FileContentOutputStream(final OutputStream outstr) { super(outstr); } | FileContentOutputStream(final FileObject file, final OutputStream outstr) { super(outstr); } | 1,101,068 |
FileRandomAccessContent(final RandomAccessContent content) { super(content); } | FileRandomAccessContent(final FileObject file, final RandomAccessContent content) { super(content); } | 1,101,070 |
public InputStream getInputStream() throws FileSystemException { /* if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the r... | public InputStream getInputStream() throws FileSystemException { /* if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the r... | 1,101,072 |
public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* if (getThreadData().getState() != STATE_NONE) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content ... | public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* if (getThreadData().getState() != STATE_NONE) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content ... | 1,101,073 |
public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testManualCache() throws Exception { FileObject scratchFolder = getWriteFolder(); if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class) || scratchFolder.getFileSystem() instanceof VirtualFileSystem) { // cant check ram filesystem as every manager holds its ow... | 1,101,074 |
public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } scratchFolder.delete(Selectors.EXCLUDE_SEL... | 1,101,075 |
public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | 1,101,076 |
public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnCallCache() throws Exception { FileObject scratchFolder = getWriteFolder(); if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class) || scratchFolder.getFileSystem() instanceof VirtualFileSystem) { // cant check ram filesystem as every manager holds its ow... | 1,101,077 |
public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } scratchFolder.delete(Selectors.EXCLUDE_SEL... | 1,101,078 |
public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | 1,101,079 |
public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnResolveCache() throws Exception { FileObject scratchFolder = getWriteFolder(); if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class) || scratchFolder.getFileSystem() instanceof VirtualFileSystem) { // cant check ram filesystem as every manager holds its... | 1,101,080 |
public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } scratchFolder.delete(Selectors.EXCLUDE_... | 1,101,081 |
public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | 1,101,082 |
public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | 1,101,083 |
public static void main(String[] args) { try { Test test = new Test(false); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Ett fel i programmet har uppsttt. " + "Informationen om detta sparas i filen error.log.\n" + "Denna fil finns i katalogen dr programmet in... | public static void main(String[] args) { try { new Test(false); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Ett fel i programmet har uppsttt. " + "Informationen om detta sparas i filen error.log.\n" + "Denna fil finns i katalogen dr programmet installerades,... | 1,101,084 |
int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | int executeStatement(final String sql) { StatementWrapper sw = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | 1,101,085 |
int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | int executeStatement(final String sql) { PreparedStatement ps = null; try { sw = connection.getStatementCache().prepare(sql, params, converter); int updateCount = -1; if (callback != null) { sw.query(callback, paramsCallback); } else { updateCount = sw.update(); } ... | 1,101,086 |
int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | 1,101,087 |
int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... | 1,101,088 |
private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... | private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... | 1,101,089 |
private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... | private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... | 1,101,090 |
private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... | private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... | 1,101,091 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.