rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (accel != null) | if (builtAccel) | private synchronized void build() { // check accel if (accel != null) return; int n = primitives.getNumPrimitives(); if (n >= 10) UI.printInfo("[GEO] Building acceleration structure for %d primitives ...", n); if (n > 20000000) accel = new UniformG... |
builtAccel = true; | private synchronized void build() { // check accel if (accel != null) return; int n = primitives.getNumPrimitives(); if (n >= 10) UI.printInfo("[GEO] Building acceleration structure for %d primitives ...", n); if (n > 20000000) accel = new UniformG... | |
if (accel == null) | if (!builtAccel) | void intersect(Ray r, IntersectionState state) { if (accel == null) build(); accel.intersect(r, state); } |
localMavenArtifact("org.springframework.osgi", "spring-jmx", "2.1-SNAPSHOT"), localMavenArtifact("org.knopflerfish.bundles", "commons-logging_all", "2.0.0"), | localMavenArtifact("org.springframework.osgi", "spring-jmx", "2.1-SNAPSHOT"), | protected String[] getBundleLocations() { return new String[]{ localMavenArtifact("org.springframework.osgi", "aopalliance.osgi", "1.0-SNAPSHOT"), localMavenArtifact("org.springframework.osgi", "commons-collections.osgi", "3.2-SNAPSHOT"), localMavenArtifact("org.s... |
final Map<String, String> props = ctx.getProperties(); assertEquals("1", props.get("a")); assertEquals("bar", props.get("foo")); assertEquals("1", props.get("var")); assertEquals("1|1|1|1|1|1", props.get("b")); assertEquals("jdbc:hsqldb:mem", props.get("url.prefix")); assertEquals("propertiestest", props.get("dbname"))... | assertEquals("1", ctx.getParameter("a")); assertEquals("bar", ctx.getParameter("foo")); assertEquals("1", ctx.getParameter("var")); assertEquals("1|1|1|1|1|1", ctx.getParameter("b")); assertEquals("jdbc:hsqldb:mem", ctx.getParameter("url.prefix")); assertEquals("propertiestest", ctx.getParameter("dbname")); assertEqual... | public void test() throws ScriptsExecutorException { final ScriptsExecutor se = newScriptsExecutor("PropertiesTest.xml"); se.execute(); assertEquals("jdbc:hsqldb:mem:propertiestest", params.getUrl()); assertEquals("sa", params.getUser()); assertEquals("", params.getPassword()); ... |
} | final OptionsMethod optionsMethod = new OptionsMethod(getName().getPath()); optionsMethod.setFollowRedirects(true); final int status = fileSystem.getClient().executeMethod(optionsMethod); if (status < 200 || status > 299) { injectType(FileType.IMAGINARY); return; } resource.getHttpURL().setPath(optionsMethod.getPath()... | protected void doAttach() throws Exception { final GenericFileName name = (GenericFileName) getName(); url = new HttpURL(name.getUserName(), name.getPassword(), name.getHostName(), name.getPort(), name.getPath()); resource = new WebdavResource(fileSystem.getClient()) { }; ... |
this.domain = domain; | protected SmbFileName( final String scheme, final String hostName, final int port, final String userName, final String password, final String share, final String path) { super(scheme, hostName, port, DEFAULT_PORT, userName, password, path); this.shar... | |
domain, | public FileName createName(final String path) { return new SmbFileName( getScheme(), getHostName(), getPort(), getUserName(), getPassword(), share, path); } | |
Assert.notNull(bundleUrl, "BundleUrl is required"); | Assert.notNull(bundleUrl, "location is required"); | public Bundle getBundle() throws Exception { Assert.notNull(bundleUrl, "BundleUrl is required"); Assert.notNull(bundleContext, "BundleContext is required"); if (bundle == null) { bundle = bundleContext.installBundle(bundleUrl.getURL().toString()); classloader = new BundleDelegatingClassLoader(bundle); bundleC... |
System.out.println("URL set to:" + url); | public void setLocation(Resource url) throws Exception { bundleUrl = url; } | |
return ""; | return "dc=scriptella"; | public String getNameInNamespace() { return ""; } |
final BasicAttribute oc = new BasicAttribute("objectclass"); | final BasicAttribute oc = new BasicAttribute("objectClass"); | public void testModifyAdd() throws NamingException { final Entry e = readEntry( "dn: cn=ldap,dc=scriptella\n" + "cn: ldap\n" + "objectClass: top\n" + "objectClass: driver\n" + "envVars:"); ... |
exp.put("envvars", null); | exp.put("envVars", null); | public void testModifyAdd() throws NamingException { final Entry e = readEntry( "dn: cn=ldap,dc=scriptella\n" + "cn: ldap\n" + "objectClass: top\n" + "objectClass: driver\n" + "envVars:"); ... |
final BasicAttribute oc = new BasicAttribute("objectclass"); | final BasicAttribute oc = new BasicAttribute("objectClass"); | public DirContext createSubcontext(Name name, Attributes attrs) throws InvalidNameException { assertEquals(newName("cn=ldap"), name); BasicAttributes exp = new BasicAttributes(true); //TODO check why to lowercase attribute names exp.put("cn", "ldap... |
exp.put("envvars", null); | exp.put("envVars", null); | public DirContext createSubcontext(Name name, Attributes attrs) throws InvalidNameException { assertEquals(newName("cn=ldap"), name); BasicAttributes exp = new BasicAttributes(true); //TODO check why to lowercase attribute names exp.put("cn", "ldap... |
SI.class | SI.class, new Object() | private void createInterceptor() { this.interceptor = new OsgiServiceInterceptor( this.tgtSource, SI.class ); } |
final FileInfo code = base.addChild( "code", FileType.FOLDER ); code.addChild( "ClassToLoad.class", FileType.FILE ); final FileInfo sealed = code.addChild( "sealed", FileType.FOLDER ); sealed.addChild( "AnotherClass.class", FileType.FILE ); | private FileInfo buildExpectedStructure() { // Build the expected structure final FileInfo base = new FileInfo( getReadFolder().getName().getBaseName(), FileType.FOLDER ); base.addChild( "file1.txt", FileType.FILE ); base.addChild( "empty.txt", FileType.FILE ); base.addChild( "... | |
type = doGetType(); | private void attach() throws FileSystemException { if (attached) { return; } try { // Attach and determine the file type doAttach(); attached = true; type = doGetType(); if (type == null) { ... | |
type = FileType.IMAGINARY; | type = doGetType(); if (type == null) { type = FileType.IMAGINARY; } | private void attach() throws FileSystemException { if (attached) { return; } try { // Attach and determine the file type doAttach(); attached = true; type = doGetType(); if (type == null) { ... |
} catch (RuntimeException re) { throw re; | private void attach() throws FileSystemException { if (attached) { return; } try { // Attach and determine the file type doAttach(); attached = true; type = doGetType(); if (type == null) { ... | |
} catch (RuntimeException re) { throw re; | public FileObject[] getChildren() throws FileSystemException { attach(); if (!type.hasChildren()) { throw new FileSystemException("vfs.provider/list-children-not-folder.error", name); } // Use cached info, if present if (children != null) { r... | |
caps.add( Capability.LAST_MODIFIED ); | caps.add( Capability.SET_LAST_MODIFIED ); caps.add( Capability.GET_LAST_MODIFIED ); | protected void addCapabilities( final Collection caps ) { caps.add( Capability.CREATE ); caps.add( Capability.DELETE ); caps.add( Capability.GET_TYPE ); caps.add( Capability.LIST_CHILDREN ); caps.add( Capability.READ_CONTENT ); caps.add( Capability.LAST_MODIFIED ); ... |
final String message = REZ.getString( "missing-share-name.error", uriStr ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider.smb/missing-share-name.error", uriStr ); | public ParsedUri parseSmbUri( final String uriStr ) throws FileSystemException { final ParsedSmbUri uri = new ParsedSmbUri(); final StringBuffer name = new StringBuffer(); // Extract the scheme and authority parts extractToPath( uriStr, name, uri ); // Convert the hostna... |
log.info("done initializing spring application context"); | log.info("done initializing spring"); | private static AbstractApplicationContext getAgilefantSpringContext() { if(agilefantContext == null) { // get the static logger Log log = LogFactory.getLog(ExplicitSpringSupport.class); // inform that we're initializing spring log.info("initializing spring"); // create the context agilefantContex... |
protected void doRename(FileObject newfile) throws Exception | protected void doRename(final FileObject newfile) throws Exception | protected void doRename(FileObject newfile) throws Exception { if (!file.renameTo(((LocalFile) newfile).getLocalFile())) { throw new FileSystemException("vfs.provider.local/rename-file.error", new String[]{file.toString(), newfile.toString()}); } } |
if (!file.renameTo(((LocalFile) newfile).getLocalFile())) | LocalFile newLocalFile = (LocalFile) FileObjectUtils.getAbstractFileObject(newfile); if (!file.renameTo(newLocalFile.getLocalFile())) | protected void doRename(FileObject newfile) throws Exception { if (!file.renameTo(((LocalFile) newfile).getLocalFile())) { throw new FileSystemException("vfs.provider.local/rename-file.error", new String[]{file.toString(), newfile.toString()}); } } |
Concept c = path.get(1); | Concept c = path.get(2); | private void removeNounConceptPath(Set<List<Concept>> pathSet) { Set<List<Concept>> removeSet = new HashSet<List<Concept>>(); for (List<Concept> path : pathSet) { Concept c = path.get(1); if (!(c.getId().equals("30f801") || c.getId().equals("30f83e"))) { removeSet.... |
public GenbankProcessor(SequenceBuilder theDelegate) | public GenbankProcessor(SequenceBuilder theDelegate, String theSource) | public GenbankProcessor(SequenceBuilder theDelegate) { super(theDelegate); features = new FeatureTableParser(this, "GenBank"); } |
features = new FeatureTableParser(this, "GenBank"); | features = new FeatureTableParser(this, theSource); | public GenbankProcessor(SequenceBuilder theDelegate) { super(theDelegate); features = new FeatureTableParser(this, "GenBank"); } |
public FileSystemException( final String message ) | public FileSystemException( final String code ) | public FileSystemException( final String message ) { this( message, null ); } |
this( message, null ); | this( code, null , null); | public FileSystemException( final String message ) { this( message, null ); } |
String[] children = new String[ children.length ]; for ( int i = 0; i < this.children.length; i++ ) | String[] childNames = new String[ children.length ]; for ( int i = 0; i < children.length; i++ ) | protected String[] doListChildren() throws Exception { if ( children == null ) { // List the children of this file children = ftpFs.getClient().listFiles( getName().getPath() ); if ( children == null ) { children = EMPTY_FTP_FILE_ARR... |
FTPFile child = this.children[ i ]; children[ i ] = child.getName(); | FTPFile child = children[ i ]; childNames[ i ] = child.getName(); | protected String[] doListChildren() throws Exception { if ( children == null ) { // List the children of this file children = ftpFs.getClient().listFiles( getName().getPath() ); if ( children == null ) { children = EMPTY_FTP_FILE_ARR... |
return children; | return childNames; | protected String[] doListChildren() throws Exception { if ( children == null ) { // List the children of this file children = ftpFs.getClient().listFiles( getName().getPath() ); if ( children == null ) { children = EMPTY_FTP_FILE_ARR... |
else if (accel.equals("bvh")) accel(new BoundingVolumeHierarchy()); | public final void accel(String accel) { if (accel.equals("uniformgrid")) accel(new UniformGrid()); else if (accel.equals("null")) accel(new NullAccelerator()); else if (accel.equals("bvh")) accel(new BoundingVolumeHierarchy()); else if (accel.equals("kdtr... | |
else if (accel.equals("kdtree_old")) accel(new KDTreeOld()); | public final void accel(String accel) { if (accel.equals("uniformgrid")) accel(new UniformGrid()); else if (accel.equals("null")) accel(new NullAccelerator()); else if (accel.equals("bvh")) accel(new BoundingVolumeHierarchy()); else if (accel.equals("kdtr... | |
api = (SunflowAPI) ClassBodyEvaluator.createFastClassBodyEvaluator(new Scanner(filename, stream), SunflowAPI.class, (ClassLoader) null); | api = (SunflowAPI) ClassBodyEvaluator.createFastClassBodyEvaluator(new Scanner(filename, stream), SunflowAPI.class, ClassLoader.getSystemClassLoader()); | public static SunflowAPI create(String filename) { if (filename == null) return new SunflowAPI(); SunflowAPI api = null; if (filename.endsWith(".java")) { Timer t = new Timer(); UI.printInfo("[API] Compiling \"" + filename + "\" ..."); t.start(); ... |
primitive(instance); | instance(instance); | public final void mesh(Mesh mesh) { if (mesh instanceof MeshLight) mesh.init(this); else { Geometry geo = new Geometry(mesh); Instance instance = new Instance(mesh.getShaders(), null, geo); primitive(instance); } } |
primitive(new Instance(new Shader[] { currentShader }, transform, geo)); | instance(new Instance(new Shader[] { currentShader }, transform, geo)); | public final void sphere(float x, float y, float z, float radius) { Sphere sphere = new Sphere(); Geometry geo = new Geometry(sphere); Matrix4 transform = Matrix4.translation(x, y, z).multiply(Matrix4.scale(radius)); primitive(new Instance(new Shader[] { currentShader }, transform, geo))... |
public TreeModel getDefaultConceptTreeModel(Set pathSet) { return treeMaker.getDefaultConceptTreeModel(pathSet, project); | public TreeModel getDefaultConceptTreeModel(Set pathSet, String type) { return treeMaker.getDefaultConceptTreeModel(pathSet, project, type); | public TreeModel getDefaultConceptTreeModel(Set pathSet) { return treeMaker.getDefaultConceptTreeModel(pathSet, project); } |
final String message = REZ.getString( "unknown-provider.error", scheme ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.impl/unknown-provider.error", scheme ); | public FileObject createFileSystem( final String scheme, final FileObject file ) throws FileSystemException { FileProvider provider = (FileProvider)providers.get( scheme ); if ( provider == null ) { final String message = ... |
final String message = REZ.getString( "no-local-file-provider.error" ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.impl/no-local-file-provider.error" ); | private LocalFileProvider getLocalFileProvider() throws FileSystemException { if ( localFileProvider == null ) { final String message = REZ.getString( "no-local-file-provider.error" ); throw new FileSystemException( message ); } return local... |
final String message = REZ.getString( "no-replicator.error" ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.impl/no-replicator.error" ); | public FileReplicator getReplicator() throws FileSystemException { if ( fileReplicator == null ) { final String message = REZ.getString( "no-replicator.error" ); throw new FileSystemException( message ); } return fileReplicator; } |
if (getType() == FileType.FOLDER) | if (getType().hasChildren()) | public void createFolder() throws FileSystemException { synchronized (fs) { if (getType() == FileType.FOLDER) { // Already exists as correct type return; } if (getType() != FileType.IMAGINARY) { thro... |
if (((destFile.getType() == FileType.FILE && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE)) || (destFile.getType() == FileType.FOLDER && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER))) && | if (((destFile.getType().hasContent() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE)) || (destFile.getType().hasChildren() && destFile.getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FOLDER))) && | public void moveTo(FileObject destFile) throws FileSystemException { if (canRenameTo(destFile)) { if (!getParent().isWriteable()) { throw new FileSystemException("vfs.provider/rename-parent-read-only.error", new FileName[]{getName(), getParent().getName()}); ... |
public void testExecuteActionKeep() | public void testExecuteActionKeep() throws MessagingException | public void testExecuteActionKeep() { boolean isTestPassed = false; Mail aMail = new MailImpl(); MailetContext aMailetContext = new MockMailetContext(); Action action = new ActionKeep(); try { ActionDispatcher.getInstance().execute(action, aMail, ... |
aMail.setRecipients(Arrays.asList(new MailAddress[] { new MailAddress("a","a.com")})); MimeMessage mimeMessage = new MimeMessage(Session.getDefaultInstance(new Properties())); mimeMessage.setText("TEST"); aMail.setMessage(mimeMessage); | public void testExecuteActionKeep() { boolean isTestPassed = false; Mail aMail = new MailImpl(); MailetContext aMailetContext = new MockMailetContext(); Action action = new ActionKeep(); try { ActionDispatcher.getInstance().execute(action, aMail, ... | |
final File baseDir = AbstractVfsTestCase.getTestDirectory(); | final File baseDir = AbstractVfsTestCase.getTestDirectoryFile(); | public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception { final File baseDir = AbstractVfsTestCase.getTestDirectory(); final URL url = baseDir.toURL(); return manager.resolveFile(url.toExternalForm()); } |
config.setProperty("compression.s2c", strictHostKeyChecking); config.setProperty("compression.c2s", strictHostKeyChecking); | config.setProperty("compression.s2c", compression); config.setProperty("compression.c2s", compression); | public static Session createConnection(String hostname, int port, char[] username, char[] password, FileSystemOptions fileSystemOptions) throws FileSystemException { JSch jsch = new JSch(); File sshDir = null; // new style - user passed File knownHostsFile = SftpFileSystemConfigBuilde... |
SftpFileObject fo = (SftpFileObject) getFileSystem() | FileObject fo = getFileSystem() | protected FileObject[] doListChildrenResolved() throws Exception { // List the contents of the folder final Vector vector; final ChannelSftp channel = fileSystem.getChannel(); try { vector = channel.ls(relPath); } finally { fileSystem.putChannel(channel); } if (vector == null) { throw new FileSystemEx... |
fo.setStat(stat.getAttrs()); | ((SftpFileObject) FileObjectUtils.getAbstractFileObject(fo)).setStat(stat.getAttrs()); | protected FileObject[] doListChildrenResolved() throws Exception { // List the contents of the folder final Vector vector; final ChannelSftp channel = fileSystem.getChannel(); try { vector = channel.ls(relPath); } finally { fileSystem.putChannel(channel); } if (vector == null) { throw new FileSystemEx... |
return (SftpFileObject[]) children.toArray(new SftpFileObject[children | return (FileObject[]) children.toArray(new FileObject[children | protected FileObject[] doListChildrenResolved() throws Exception { // List the contents of the folder final Vector vector; final ChannelSftp channel = fileSystem.getChannel(); try { vector = channel.ls(relPath); } finally { fileSystem.putChannel(channel); } if (vector == null) { throw new FileSystemEx... |
rootEDRConcept.setPrefix(DODDLE.BASE_PREFIX); | public TreeNode getConceptTreeRoot(DODDLEProject currentProject, Model model, Resource rootResource) { supSubSetMap = new HashMap(); for (ResIterator i = model.listSubjectsWithProperty(RDF.type); i.hasNext();) { Resource resource = i.nextResource(); for (StmtIterator j = resource... | |
rootConcept.setPrefix(DODDLE.BASE_PREFIX); | public TreeModel getDefaultConceptTreeModel(Set pathSet, DODDLEProject project) { Concept rootConcept = new VerbConcept(ConceptTreeMaker.DODDLE_CLASS_ROOT_ID, "名詞的概念"); ConceptTreeNode rootNode = new ConceptTreeNode(rootConcept, project); rootNode.setdepth(0); for (Iterator i = pathSet.i... | |
trimTree((DefaultMutableTreeNode) treeModel.getRoot()); if (root.getConcept().getId().equals(DODDLE_CLASS_ROOT_ID)) { DODDLE.getLogger().log(Level.INFO, "剪定クラス数: " + trimmedConceptSet.size()); } else if (root.getConcept().getId().equals(DODDLE_PROPERTY_ROOT_ID)) { DODDLE.getLogger().log(Level.INFO, "剪定プロパティ数: " + trimm... | trimTree((DefaultMutableTreeNode) treeModel.getRoot()); | public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project); ConceptTreeNode root = (ConceptTreeNode) treeModel.getRoot(); trimmedConceptSet.clear(); root.setdepth(0); setDefaultDepth(root); // トリミング... |
if (inputConceptSet == null) { return false; } | public boolean isInputConcept(Concept c) { for (Concept ic : inputConceptSet) { if (ic.getIdentity().equals(c.getIdentity())) { return true; } } return false; // return inputConceptSet.contains(EDRDic.getEDRConcept(c.getId())); } | |
p = parametersParser.evaluate(name, paramsCallback); | p = getParametersParser().evaluate(name, paramsCallback); | protected String handleParameter(final String name, final boolean expression, boolean jdbcParam) { Object p; if (expression) { p = parametersParser.evaluate(name, paramsCallback); } else { p = paramsCallback.g... |
StatementCache statementCache = getStatementCache(); | PreparedStatement prepareStatement(final String sql) throws SQLException { //Check if statement has been cached PreparedStatement ps = statementCache != null ? statementCache.get(sql) : null; if (ps == null) { //If not cached ps = con.prepareStatement(sql); ... | |
if (statementCache!=null) { statementCache.closeRemovedStatements(); | if (getStatementCache()!=null) { getStatementCache().closeRemovedStatements(); | private void releaseStatement(PreparedStatement ps) { if (statementCache!=null) { statementCache.closeRemovedStatements(); } else { JDBCUtils.closeSilent(ps); } params.clear(); IOUtils.closeSilently(converter); //closing resour... |
public ParametersParser getParametersParser() { return parametersParser; | ParametersParser getParametersParser() { return connection==null?null:connection.getParametersParser(); | public ParametersParser getParametersParser() { return parametersParser; } |
public StatementCache getStatementCache() { return statementCache; | StatementCache getStatementCache() { return connection==null?null:connection.getStatementCache(); | public StatementCache getStatementCache() { return statementCache; } |
synchronized (this.monitorMap) | _addFile(file); try | public void addFile(final FileObject file) { synchronized (this.monitorMap) { if (this.monitorMap.get(file.getName()) == null) { this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try { ... |
if (this.monitorMap.get(file.getName()) == null) | if (file.getType().hasChildren()) | public void addFile(final FileObject file) { synchronized (this.monitorMap) { if (this.monitorMap.get(file.getName()) == null) { this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try { ... |
this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try | final FileObject[] children = file.getChildren(); for (int i = 0; i < children.length; i++) | public void addFile(final FileObject file) { synchronized (this.monitorMap) { if (this.monitorMap.get(file.getName()) == null) { this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try { ... |
if (this.listener != null) { file.getFileSystem().addListener(file, this.listener); } if (file.getType().hasChildren() && this.recursive) { final FileObject[] children = file.getChildren(); for (int i = 0; i < children.length; i++) { this.addFile(children[i]); } } | _addFile(children[i]); | public void addFile(final FileObject file) { synchronized (this.monitorMap) { if (this.monitorMap.get(file.getName()) == null) { this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try { ... |
catch (FileSystemException fse) { log.error(fse.getLocalizedMessage(), fse); } | public void addFile(final FileObject file) { synchronized (this.monitorMap) { if (this.monitorMap.get(file.getName()) == null) { this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try { ... | |
catch (FileSystemException fse) { log.error(fse.getLocalizedMessage(), fse); } | public void addFile(final FileObject file) { synchronized (this.monitorMap) { if (this.monitorMap.get(file.getName()) == null) { this.monitorMap.put(file.getName(), new FileMonitorAgent(this, file)); try { ... | |
final XMLElement fallbackElement = element.getChild("fallback"); if (fallbackElement!=null) { fallbackEl=new FallbackEl(fallbackElement); } | public void configure(final XMLElement element) { url = element.getDocumentURL(); setRequiredProperty(element, "href"); final String enc = element.getAttribute("encoding"); if (enc == null) { charset = Charset.defaultCharset(); } else { if (!Charset.isSupport... | |
throw (IOException) new IOException( "Unable to open referenced resource " + href).initCause(e); | throw (IOException) new IOException("Malformed include url: " + href).initCause(e); } catch (IOException e) { if (fallbackEl!=null) { LOG.log(Level.FINE, e.getMessage()); return fallbackEl.open(); } else { throw e; } | public Reader open() throws IOException { try { URL u = new URL(url, href); return new InputStreamReader(u.openStream(), charset); } catch (MalformedURLException e) { throw (IOException) new IOException( "Unable to open referenced resource " + href).... |
float sine = (1 - cosTheta * cosTheta) * 0.5f; | float sin2 = (1 - cosTheta * cosTheta); float sine = sin2 > 0 ? (float) Math.sqrt(sin2) * 0.5f : 0; | public Color getIrradiance(ShadingState state, Color diffuseReflectance) { float cosTheta = Vector3.dot(up, state.getNormal()); float sine = (1 - cosTheta * cosTheta) * 0.5f; if (cosTheta > 0) return Color.blend(sky, ground, sine); else return Color.blend(ground, sk... |
if (p.peekNextToken("subdivs")) | boolean hasTesselationArguments = false; if (p.peekNextToken("subdivs")) { | private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); String[] shaders = null; boolean multiShader = false; if (p.peekNextToken("shaders")) { int n = p.getNextInt(); shaders = new String[n]; for (int i ... |
if (p.peekNextToken("smooth")) | hasTesselationArguments = true; } if (p.peekNextToken("smooth")) { | private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); String[] shaders = null; boolean multiShader = false; if (p.peekNextToken("shaders")) { int n = p.getNextInt(); shaders = new String[n]; for (int i ... |
api.geometry(name, new Teapot()); | hasTesselationArguments = true; } if (hasTesselationArguments) api.geometry(name, (Tesselatable) new Teapot()); else api.geometry(name, (PrimitiveList) new Teapot()); | private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); String[] shaders = null; boolean multiShader = false; if (p.peekNextToken("shaders")) { int n = p.getNextInt(); shaders = new String[n]; for (int i ... |
api.geometry(name, new Gumbo()); | hasTesselationArguments = true; } if (hasTesselationArguments) api.geometry(name, (Tesselatable) new Gumbo()); else api.geometry(name, (PrimitiveList) new Gumbo()); | private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); String[] shaders = null; boolean multiShader = false; if (p.peekNextToken("shaders")) { int n = p.getNextInt(); shaders = new String[n]; for (int i ... |
final String message = REZ.getString( "close-instr.error" ); throw new FileSystemException( message, ioe ); | throw new FileSystemException( "vfs.provider/close-instr.error", null, ioe ); | public void close() throws FileSystemException { try { // Close the input stream if ( instr != null ) { try { instr.close(); } catch ( IOException ioe ) { ... |
final String message = REZ.getString( "close-outstr.error" ); throw new FileSystemException( message, ioe ); | throw new FileSystemException( "vfs.provider/close-outstr.error", null, ioe ); | public void close() throws FileSystemException { try { // Close the input stream if ( instr != null ) { try { instr.close(); } catch ( IOException ioe ) { ... |
final String message = REZ.getString( "get-certificates-no-exist.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/get-certificates-no-exist.error", file ); | public Certificate[] getCertificates() throws FileSystemException { if( !file.exists() ) { final String message = REZ.getString( "get-certificates-no-exist.error", file ); throw new FileSystemException( message ); } return file.doGetCertificates(); } |
final String message = REZ.getString( "read-folder.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/read-folder.error", file ); | public InputStream getInputStream() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "read-folder.error", file ); throw new FileSystemException( message ); } if ( !file.exists() ) { final String message ... |
final String message = REZ.getString( "read-no-exist.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/read-no-exist.error", file ); | public InputStream getInputStream() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "read-folder.error", file ); throw new FileSystemException( message ); } if ( !file.exists() ) { final String message ... |
final String message = REZ.getString( "read-in-use.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/read-in-use.error", file ); | public InputStream getInputStream() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "read-folder.error", file ); throw new FileSystemException( message ); } if ( !file.exists() ) { final String message ... |
final String message = REZ.getString( "read.error", file ); throw new FileSystemException( message, exc ); | throw new FileSystemException( "vfs.provider/read.error", new Object[]{file}, exc ); | public InputStream getInputStream() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "read-folder.error", file ); throw new FileSystemException( message ); } if ( !file.exists() ) { final String message ... |
final String message = REZ.getString( "get-last-modified-no-exist.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/get-last-modified-no-exist.error", file ); | public long getLastModifiedTime() throws FileSystemException { if( !file.exists() ) { final String message = REZ.getString( "get-last-modified-no-exist.error", file ); throw new FileSystemException( message ); } return file.doGetLastModifiedTime(); } |
final String message = REZ.getString( "write-folder.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/write-folder.error", file ); | public OutputStream getOutputStream() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "write-folder.error", file ); throw new FileSystemException( message ); } if ( state != STATE_NONE ) { final String ... |
final String message = REZ.getString( "write-in-use.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/write-in-use.error", file ); | public OutputStream getOutputStream() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "write-folder.error", file ); throw new FileSystemException( message ); } if ( state != STATE_NONE ) { final String ... |
final String message = REZ.getString( "get-size-folder.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/get-size-folder.error", file ); | public long getSize() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "get-size-folder.error", file ); throw new FileSystemException( message ); } // Do some checking if ( !file.exists() ) { fina... |
final String message = REZ.getString( "get-size-no-exist.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/get-size-no-exist.error", file ); | public long getSize() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "get-size-folder.error", file ); throw new FileSystemException( message ); } // Do some checking if ( !file.exists() ) { fina... |
final String message = REZ.getString( "get-size-write.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/get-size-write.error", file ); | public long getSize() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "get-size-folder.error", file ); throw new FileSystemException( message ); } // Do some checking if ( !file.exists() ) { fina... |
final String message = REZ.getString( "get-size.error", file ); throw new FileSystemException( message, exc ); | throw new FileSystemException( "vfs.provider/get-size.error", new Object[]{file}, exc ); | public long getSize() throws FileSystemException { if( file.isFolder() ) { final String message = REZ.getString( "get-size-folder.error", file ); throw new FileSystemException( message ); } // Do some checking if ( !file.exists() ) { fina... |
final String message = REZ.getString( "set-last-modified-no-exist.error", file ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/set-last-modified-no-exist.error", file ); | public void setLastModifiedTime( long modTime ) throws FileSystemException { if( !file.exists() ) { final String message = REZ.getString( "set-last-modified-no-exist.error", file ); throw new FileSystemException( message ); } file.doSetLastModifiedTime( modTime )... |
url = new URL(urlStr); | url = new URL(connectionParameters.getContext().getBaseURL(), urlStr); | public Connection connect(ConnectionParameters connectionParameters) { //TODO: Add support for output file encoding String urlStr = connectionParameters.getUrl(); String outEnc = connectionParameters.getProperty(OUTPUT_ENCODING); URL url; try { url = new URL(urlStr); ... |
final File testDir = AbstractVfsTestCase.getTestDirectory(); | final File testDir = AbstractVfsTestCase.getTestDirectoryFile(); | public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception { final File testDir = AbstractVfsTestCase.getTestDirectory(); return manager.toFileObject(testDir); } |
final URL url = new URL(uri); | StringBuffer buf = new StringBuffer(80); String scheme = UriParser.extractScheme(uri, buf); final URL url; if ("res".equals(scheme)) { String resourceName = buf.toString(); ClassLoader cl = UrlFileSystemConfigBuilder.getInstance().getClassLoader(fileSystemOptions); if (cl == null) { cl = getClass().getClassLoader(); ... | public FileObject findFile(final FileObject baseFile, final String uri, final FileSystemOptions fileSystemOptions) throws FileSystemException { try { final URL url = new URL(uri); final URL rootUrl = new URL(ur... |
private static void addComplexWord(String complexWord, List complexWordList, List tokenList, Set complexWordSet) { | private static void addComplexWord(String complexWord, List<String> complexWordElementList, List<String> tokenList, Set complexWordSet) { | private static void addComplexWord(String complexWord, List complexWordList, List tokenList, Set complexWordSet) { for (int i = 0; i < tokenList.size(); i++) { List complexWordSizeList = new ArrayList(); for (int j = 0; complexWordSizeList.size() != complexWordList.size(); j++) { ... |
List complexWordSizeList = new ArrayList(); for (int j = 0; complexWordSizeList.size() != complexWordList.size(); j++) { | List<String> complexWordSizeList = new ArrayList<String>(); for (int j = 0; complexWordSizeList.size() != complexWordElementList.size(); j++) { | private static void addComplexWord(String complexWord, List complexWordList, List tokenList, Set complexWordSet) { for (int i = 0; i < tokenList.size(); i++) { List complexWordSizeList = new ArrayList(); for (int j = 0; complexWordSizeList.size() != complexWordList.size(); j++) { ... |
String nw = (String) tokenList.get(i + j); | String nw = tokenList.get(i + j); | private static void addComplexWord(String complexWord, List complexWordList, List tokenList, Set complexWordSet) { for (int i = 0; i < tokenList.size(); i++) { List complexWordSizeList = new ArrayList(); for (int j = 0; complexWordSizeList.size() != complexWordList.size(); j++) { ... |
if (complexWordList.size() == complexWordSizeList.size()) { | if (complexWordElementList.size() == complexWordSizeList.size()) { | private static void addComplexWord(String complexWord, List complexWordList, List tokenList, Set complexWordSet) { for (int i = 0; i < tokenList.size(); i++) { List complexWordSizeList = new ArrayList(); for (int j = 0; complexWordSizeList.size() != complexWordList.size(); j++) { ... |
for (int j = 0; j < complexWordList.size(); j++) { if (!complexWordList.get(j).equals(complexWordSizeList.get(j))) { | for (int j = 0; j < complexWordElementList.size(); j++) { if (!complexWordElementList.get(j).equals(complexWordSizeList.get(j))) { | private static void addComplexWord(String complexWord, List complexWordList, List tokenList, Set complexWordSet) { for (int i = 0; i < tokenList.size(); i++) { List complexWordSizeList = new ArrayList(); for (int j = 0; complexWordSizeList.size() != complexWordList.size(); j++) { ... |
protected SmbFileObject( final String fileName, final FileName name, | protected SmbFileObject( final FileName name, | protected SmbFileObject( final String fileName, final FileName name, final SmbFileSystem fileSystem ) { super( name, fileSystem ); this.fileName = fileName; } |
this.fileName = fileName; | this.fileName = name.getURI(); | protected SmbFileObject( final String fileName, final FileName name, final SmbFileSystem fileSystem ) { super( name, fileSystem ); this.fileName = fileName; } |
final String s = f.format(args, sb, null).toString(); | f.format(args, sb, null).toString(); final Throwable err = record.getThrown(); if (err!=null) { sb.append('\n'); sb.append(err.getMessage()); } final String s = sb.toString(); | public synchronized String format(final LogRecord record) { d.setTime(record.getMillis()); args[1] = record.getLevel().getLocalizedName(); args[2] = record.getMessage(); final String s = f.format(args, sb, null).toString(); sb.setLen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.