rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if ( name.length() == 0 || name.charAt( 0 ) != separatorChar ) | if ( name.length() == 0 || name.charAt( 0 ) != SEPARATOR_CHAR ) | public FileName resolveName( final String name, final NameScope scope ) throws FileSystemException { final StringBuffer buffer = new StringBuffer( name ); // Adjust separators UriParser.fixSeparators( buffer ); // Determine whether to prepend the... |
buffer.insert( 0, separatorChar ); | buffer.insert( 0, SEPARATOR_CHAR ); | public FileName resolveName( final String name, final NameScope scope ) throws FileSystemException { final StringBuffer buffer = new StringBuffer( name ); // Adjust separators UriParser.fixSeparators( buffer ); // Determine whether to prepend the... |
List<Pattern[]> compileQueries(final Reader reader) { CSVReader r = new CSVReader(reader); | List<Pattern[]> compileQueries(final CSVReader r) { | List<Pattern[]> compileQueries(final Reader reader) { CSVReader r = new CSVReader(reader);//Parsing rules for queries are always default List<String[]> list; try { list = r.readAll(); } catch (IOException e) { throw new CsvProviderException("Unable to read CSV query... |
throw new CsvProviderException("Illegal regular expression syntax for query.", e, s); | throw new CsvProviderException("Illegal regular expression syntax for query", e, s); | List<Pattern[]> compileQueries(final Reader reader) { CSVReader r = new CSVReader(reader);//Parsing rules for queries are always default List<String[]> list; try { list = r.readAll(); } catch (IOException e) { throw new CsvProviderException("Unable to read CSV query... |
public void execute(Reader queryReader, ParametersCallback parametersCallback, QueryCallback queryCallback) throws IOException { substitutor.setParameters(parametersCallback); List<Pattern[]> patterns = compileQueries(queryReader); columnsMap = new ColumnsMap(); if (headers) { String[] row = reader.readNext(); for (in... | public void execute(CSVReader queryReader, ParametersCallback parametersCallback, QueryCallback queryCallback) throws IOException { try { substitutor.setParameters(parametersCallback); List<Pattern[]> patterns = compileQueries(queryReader); columnsMap = new ColumnsMap(); if (headers) { String[] row = reader.readNext();... | public void execute(Reader queryReader, ParametersCallback parametersCallback, QueryCallback queryCallback) throws IOException { substitutor.setParameters(parametersCallback); List<Pattern[]> patterns = compileQueries(queryReader); columnsMap = new ColumnsMap(); if (headers) { ... |
while ((row = reader.readNext()) != null) { if (matches(patterns, row)) { queryCallback.processRow(this); } } | public void execute(Reader queryReader, ParametersCallback parametersCallback, QueryCallback queryCallback) throws IOException { substitutor.setParameters(parametersCallback); List<Pattern[]> patterns = compileQueries(queryReader); columnsMap = new ColumnsMap(); if (headers) { ... | |
if (name == null) { throw new IllegalArgumentException("Parameter name cannot be null"); } | public Object getParameter(final String name) { if (name == null) { throw new IllegalArgumentException("Parameter name cannot be null"); } if (reader == null) { throw new IllegalStateException("CSV Resultset is closed"); } Integer col = columnsMap.find(name);... | |
OsgiServiceInterceptor interceptor = new OsgiServiceInterceptor(targetSource, getInterface()); | OsgiServiceInterceptor interceptor = new OsgiServiceInterceptor(targetSource, getInterface(), unavailableService); | protected void constructProxy() throws Exception { Object service = null; ServiceReference reference = null; final Class serviceInterface = getInterface(); final String filter = getFilterStringForServiceLookup(); // Lookup the initial service for (int i = 0; i < retryTimes;... |
public StringBuffer formatLocation(StringBuffer sb, Location loc, StrandedFeature.Strand strand) | public String formatLocation(Feature theFeature) | public StringBuffer formatLocation(StringBuffer sb, Location loc, StrandedFeature.Strand strand) { // Using arbitrary leader and wrapwidth wide enough to always // make one line return formatL... |
return formatLocationBlock(sb, loc, strand.getValue(), "", Integer.MAX_VALUE, "join"); | String formattedLocation = null; StrandedFeature.Strand featureStrand = StrandedFeature.POSITIVE; String joinType = "join"; Annotation ann = theFeature.getAnnotation(); if (ann.containsProperty(Feature.PROPERTY_DATA_KEY)) { Map dat = (Map) ann.getProperty(Feature.PROPERTY_DATA_KEY); if (dat.containsKey("JoinType")) ... | public StringBuffer formatLocation(StringBuffer sb, Location loc, StrandedFeature.Strand strand) { // Using arbitrary leader and wrapwidth wide enough to always // make one line return formatL... |
DefaultFileName name = new DefaultFileName( m_parser, zipUri.getRootUri(), "/" ); return new ZipFileSystem( getContext(), name, zipFile ); | try { return (ZipFileSystem)AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws FileSystemException { return new ZipFileSystem( getContext(), name, zipFile ); } } ); } catch( PrivilegedActionException pae ) { throw (FileSystemException) pae.getException(); } | protected FileSystem createFileSystem( final ParsedUri uri ) throws FileSystemException { final ParsedZipUri zipUri = (ParsedZipUri)uri; final FileObject file = zipUri.getZipFile(); // Make a local copy of the file final File zipFile = file.replicateFile( FileConstants.SELECT_S... |
return m.invoke(ProxyAdapter.this, args); | try { return m.invoke(ProxyAdapter.this, args); } catch (InvocationTargetException e) { throw e.getCause(); } | public ProxyAdapter(Class... interfaces) { proxy = (T) Proxy.newProxyInstance(getClass().getClassLoader(), interfaces, new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Method m; try { //De... |
return m.invoke(ProxyAdapter.this, args); | try { return m.invoke(ProxyAdapter.this, args); } catch (InvocationTargetException e) { throw e.getCause(); } | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Method m; try { //Determine if the method has been defined in a subclass m = ProxyAdapter.this.getClass().getMethod(method.getName(), method.getParameterTyp... |
initDb(props); schema.setExternalProperties(props); schema.execute(); | initDb(props); | public void test() throws ScriptsExecutorException, ClassNotFoundException { int n = drivers.length; //just to make sure properties are valid assertTrue(n == urls.length && n == users.length && n == passwords.length); ScriptsExecutor se = newScriptsExecutor(); Map<String,String> p... |
m_baseDir = getCanonicalFile( new File( baseDirProp ) ); | baseDir = getCanonicalFile( new File( baseDirProp ) ); | public AbstractVfsTestCase( final String name ) { super( name ); final String baseDirProp = System.getProperty( "test.basedir" ); m_baseDir = getCanonicalFile( new File( baseDirProp ) ); } |
return m_baseDir; | return baseDir; | protected File getTestDirectory() { return m_baseDir; } |
sunColor = RGBSpace.SRGB.convertXYZtoRGB(sunSpectralRadiance.toXYZ()).constrainRGB(); | sunColor = RGBSpace.SRGB.convertXYZtoRGB(sunSpectralRadiance.toXYZ().mul(1e4f)).constrainRGB(); | private void initSunSky() { // perform all the required initialization of constants sunDirWorld.normalize(); sunDir = basis.untransform(sunDirWorld, new Vector3()); sunDir.normalize(); sunTheta = (float) Math.acos(MathUtils.clamp(sunDir.z, -1, 1)); if (sunDir.z > 0) { ... |
public FileName resolveName(final FileName base, final String name, final NameScope scope) throws FileSystemException | public FileName resolveName(final FileName root, final String path) throws FileSystemException | public FileName resolveName(final FileName base, final String name, final NameScope scope) throws FileSystemException { final FileName realBase; if (base != null && VFS.isUriStyle() && base.getType() == FileType.FILE) { realBase = base.getParent(); } else { realBase = base; } final StringBuffer buffer = ... |
final FileName realBase; if (base != null && VFS.isUriStyle() && base.getType() == FileType.FILE) { realBase = base.getParent(); } else { realBase = base; } final StringBuffer buffer = new StringBuffer(name); UriParser.fixSeparators(buffer); if (name.length() == 0 || name.charAt(0) != FileName.SEPARATOR_CHAR) { i... | return resolveName(root, path, NameScope.FILE_SYSTEM); | public FileName resolveName(final FileName base, final String name, final NameScope scope) throws FileSystemException { final FileName realBase; if (base != null && VFS.isUriStyle() && base.getType() == FileType.FILE) { realBase = base.getParent(); } else { realBase = base; } final StringBuffer buffer = ... |
new ConstructTreeAction(true, DODDLE.getCurrentProject()).constructTree(); | SwingWorker<String, String> worker = new SwingWorker<String, String>() { public String doInBackground() { new ConstructTreeAction(true, DODDLE.getCurrentProject()).constructTree(); return "done"; } }; DODDLE.STATUS_BAR.setSwingWorker(worker); worker.execute(); | public void actionPerformed(ActionEvent e) { new ConstructTreeAction(true, DODDLE.getCurrentProject()).constructTree(); } |
return connection.getCtx().search("", filter, connection.getSearchControls()); | return connection.getCtx().search(connection.getBaseDn(), filter, connection.getSearchControls()); | protected NamingEnumeration<SearchResult> query(final LdapConnection connection, final String filter) throws NamingException { return connection.getCtx().search("", filter, connection.getSearchControls()); } |
parameter("quads", true); | private void createGeometry() { // light source parameter("source", new Point3(-15.5945f, -30.0581f, 45.967f)); parameter("dir", new Vector3(15.5945f, 30.0581f, -45.967f)); parameter("radius", 60.0f); parameter("radiance", Color.white().mul(3)); light("light", new Direction... | |
return new JaninoConnection(); | return new JaninoConnection(connectionParameters); | public Connection connect(ConnectionParameters connectionParameters) { return new JaninoConnection(); } |
manager.addProvider(new String[]{"res", "file"}, new UrlFileProvider()); | manager.addProvider("res", new ResourceFileProvider()); manager.addProvider("file", new UrlFileProvider()); manager.addProvider("jar", new JarFileProvider()); | public void prepare(DefaultFileSystemManager manager) throws Exception { manager.addProvider(new String[]{"res", "file"}, new UrlFileProvider()); } |
con.setAutoCommit(false); } catch (SQLException e) { throw new JDBCException("Unable to set autocommit=false", e); } try { transactable = Connection.TRANSACTION_NONE != con.getTransactionIsolation(); | transactable = con.getTransactionIsolation()>Connection.TRANSACTION_NONE; | public JDBCConnection(Connection con, ConnectionParameters parameters) { super(parameters); if (con == null) { throw new IllegalArgumentException("Connection cannot be null"); } this.con = con; init(parameters); try { con.setAutoCommit(false); }... |
if (transactable) { try { con.setAutoCommit(false); } catch (Exception e) { throw new JDBCException("Unable to set autocommit=false for "+toString(), e); } } | public JDBCConnection(Connection con, ConnectionParameters parameters) { super(parameters); if (con == null) { throw new IllegalArgumentException("Connection cannot be null"); } this.con = con; init(parameters); try { con.setAutoCommit(false); }... | |
initDialectIdentifier(); | protected void init(ConnectionParameters parameters) { String cacheSizeStr = parameters.getProperty(STATEMENT_CACHE_SIZE_KEY); int statementCacheSize = 100; if (cacheSizeStr != null && cacheSizeStr.trim().length() > 0) { try { statementCacheSize = Integer.valueOf(cache... | |
bundleCtrl.reset(); | public void testGetBundleName() { String symbolicName = "symbolic"; bundleCtrl.reset(); bundleCtrl.expectAndReturn(bundle.getSymbolicName(), symbolicName, MockControl.ONE_OR_MORE); bundleCtxCtrl.replay(); bundleCtrl.replay(); // check default createContext(); assertEquals(symbolicName, xmlContext.getBundleName... | |
if (con==null) { | super(parameters); if (con == null) { | public JDBCConnection(Connection con, ConnectionParameters parameters) { if (con==null) { throw new IllegalArgumentException("Connection cannot be null"); } this.con = con; init(parameters); try { con.setAutoCommit(false); } catch (SQLException e) { ... |
prepare(q); | q.setConnection(this); | public void executeQuery(Resource queryContent, ParametersCallback parametersCallback, QueryCallback queryCallback) { Query q = new Query(queryContent); prepare(q); q.execute(con, parametersCallback, queryCallback); } |
prepare(s); | s.setConnection(this); | public void executeScript(Resource scriptContent, ParametersCallback parametersCallback) { Script s = new Script(scriptContent); prepare(s); s.execute(con, parametersCallback); } |
NamedNodeMap attributes = element.getAttributes(); for (int x = 0; x < attributes.getLength(); x++) { Attr attribute = (Attr) attributes.item(x); String name = attribute.getLocalName(); | protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(VirtualBundleFactoryBean.class); NamedNodeMap attributes = element.getAttributes(); for (int x = 0; x < attributes.getLength(); x++) { Attr attrib... | |
} | ParserUtils.parseCustomAttributes(element, builder, new ParserUtils.AttributeCallback() { public void process(Element parent, Attr attribute, BeanDefinitionBuilder builder) { builder.addPropertyValue(Conventions.attributeNameToPropertyName(attribute.getLocalName()), attribute.getValue()); } }); | protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(VirtualBundleFactoryBean.class); NamedNodeMap attributes = element.getAttributes(); for (int x = 0; x < attributes.getLength(); x++) { Attr attrib... |
p.z = maxZ; | p.z = maxZ - 0.001f; | public void getPhoton(double randX1, double randY1, double randX2, double randY2, Point3 p, Vector3 dir, Color power) { p.x = (float) (lxmin * (1 - randX2) + lxmax * randX2); p.y = (float) (lymin * (1 - randY2) + lymax * randY2); p.z = maxZ; double u = 2 * Math.PI * randX1; double... |
p.z = maxZ; | p.z = maxZ - 0.001f; | public void getSample(int i, ShadingState state, LightSample dest) { // random offset on unit square, we use the infinite version of // getRandom // because the light sampling is adaptive double randX = state.getRandom(i, 0); double randY = state.getRandom(i, 1); Point3 p =... |
if (destFile.exists()) | if (destFile.exists() && !isSameFile(destFile)) | 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()}); ... |
FileObject parent = getParent(); | final FileObject parent = getParent(); | public void createFolder() throws FileSystemException { attach(); if ( type == FileType.FOLDER ) { // Already exists as correct type return; } if ( type != null ) { throw new FileSystemException( "vfs.provider/create-folder-mismatched-typ... |
String[] files; | final String[] files; | public FileObject[] getChildren() throws FileSystemException { attach(); if ( type == null ) { throw new FileSystemException( "vfs.provider/list-children-no-exist.error", name ); } if ( type != FileType.FOLDER ) { throw new FileSystemException( "vfs... |
String file = files[ i ]; | final String file = files[ i ]; | public FileObject[] getChildren() throws FileSystemException { attach(); if ( type == null ) { throw new FileSystemException( "vfs.provider/list-children-no-exist.error", name ); } if ( type != FileType.FOLDER ) { throw new FileSystemException( "vfs... |
type = newType; children = EMPTY_FILE_ARRAY; | if ( attached ) { type = newType; children = EMPTY_FILE_ARRAY; onChange(); } | protected void handleCreate( final FileType newType ) throws Exception { // Fix up state type = newType; children = EMPTY_FILE_ARRAY; // Notify parent that its child list may no longer be valid notifyParent(); // Notify subclass onChange(); // Notify the fi... |
onChange(); | protected void handleCreate( final FileType newType ) throws Exception { // Fix up state type = newType; children = EMPTY_FILE_ARRAY; // Notify parent that its child list may no longer be valid notifyParent(); // Notify subclass onChange(); // Notify the fi... | |
type = null; children = null; | if ( attached ) { type = null; children = null; onChange(); } | protected void handleDelete() throws Exception { // Fix up state type = null; children = null; // Notify parent that its child list may no longer be valid notifyParent(); // Notify subclass onChange(); // Notify the file system fs.fireFileDeleted( th... |
onChange(); | protected void handleDelete() throws Exception { // Fix up state type = null; children = null; // Notify parent that its child list may no longer be valid notifyParent(); // Notify subclass onChange(); // Notify the file system fs.fireFileDeleted( th... | |
int samples = p.getNextInt(); | api.parameter("gi.irr-cache.samples", p.getNextInt()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
float tolerance = p.getNextFloat(); | api.parameter("gi.irr-cache.tolerance", p.getNextFloat()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
float min = p.getNextFloat(); float max = p.getNextFloat(); | api.parameter("gi.irr-cache.min_spacing", p.getNextFloat()); api.parameter("gi.irr-cache.max_spacing", p.getNextFloat()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
GlobalPhotonMapInterface gmap = null; | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... | |
int numEmit = p.getNextInt(); String type = p.getNextToken(); int gather = p.getNextInt(); float radius = p.getNextFloat(); if (type.equals("kd")) gmap = new GlobalPhotonMap(numEmit, gather, radius); else if (type.equals("grid")) gmap = new GridPhotonMap(numEmit, gather, radius); else if (type.equals("none")) gmap = nu... | api.parameter("gi.irr-cache.gmap.emit", p.getNextInt()); api.parameter("gi.irr-cache.gmap", p.getNextToken()); api.parameter("gi.irr-cache.gmap.gather", p.getNextInt()); api.parameter("gi.irr-cache.gmap.radius", p.getNextFloat()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
api.giEngine(new IrradianceCacheGIEngine(samples, tolerance, min, max, gmap)); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... | |
int samples = p.getNextInt(); | api.parameter("gi.path.samples", p.getNextInt()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
api.giEngine(new PathTracingGIEngine(samples)); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... | |
Vector3 up = parseVector(); | api.parameter("gi.fake.up", parseVector()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
Color sky = parseColor(); | api.parameter("gi.fake.sky", parseColor()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
Color ground = parseColor(); api.giEngine(new FakeGIEngine(up, sky, ground)); | api.parameter("gi.fake.ground", parseColor()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
int samples = p.getNextInt(); | api.parameter("gi.igi.samples", p.getNextInt()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
int sets = p.getNextInt(); p.checkNextToken("b"); float b = p.getNextFloat(); | api.parameter("gi.igi.sets", p.getNextInt()); if (!p.peekNextToken("b")) p.checkNextToken("c"); api.parameter("gi.igi.c", p.getNextFloat()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
int bias = p.getNextInt(); api.giEngine(new InstantGI(samples, sets, b, bias)); | api.parameter("gi.igi.bias_samples", p.getNextInt()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
Color bright = parseColor(); | api.parameter("gi.ambocc.bright", parseColor()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
Color dark = parseColor(); | api.parameter("gi.ambocc.dark", parseColor()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
int samples = p.getNextInt(); float maxdist = 0; | api.parameter("gi.ambocc.samples", p.getNextInt()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
maxdist = p.getNextFloat(); api.giEngine(new AmbientOcclusionGIEngine(bright, dark, samples, maxdist)); | api.parameter("gi.ambocc.maxdist", p.getNextFloat()); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
api.giEngine(null); | api.parameter("gi.engine", "none"); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
UI.printWarning(Module.API, "Unrecognized gi engine type: %s", p.getNextToken()); | UI.printWarning(Module.API, "Unrecognized gi engine type \"%s\" - ignoring", p.getNextToken()); api.options(SunflowAPI.DEFAULT_OPTIONS); | private void parseGIBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("irr-cache")) { p.checkNextToken("samples"); int samples = p.getNextInt(); p.checkNextToken("tolerance"); ... |
String type; int gather; float radius; | private void parsePhotonBlock(SunflowAPI api) throws ParserException, IOException { String type; int gather; float radius; int numEmit = 0; boolean globalEmit = false; p.checkNextToken("{"); if (p.peekNextToken("emit")) { UI.printWarning(Module.API, "Share... | |
type = p.getNextToken(); gather = p.getNextInt(); radius = p.getNextFloat(); CausticPhotonMapInterface cmap = null; if (type.equals("kd")) cmap = new CausticPhotonMap(numEmit, gather, radius, 1.1f); else if (type.equals("none")) cmap = null; else UI.printWarning(Module.API, "Unrecognized caustic photon map type: %s", t... | api.parameter("caustics.emit", numEmit); api.parameter("caustics", p.getNextToken()); api.parameter("caustics.gather", p.getNextInt()); api.parameter("caustics.radius", p.getNextFloat()); api.options(SunflowAPI.DEFAULT_OPTIONS); | private void parsePhotonBlock(SunflowAPI api) throws ParserException, IOException { String type; int gather; float radius; int numEmit = 0; boolean globalEmit = false; p.checkNextToken("{"); if (p.peekNextToken("emit")) { UI.printWarning(Module.API, "Share... |
public boolean build(AggregateTraceable primitives) { | public boolean build(PrimitiveList primitives) { | public boolean build(AggregateTraceable primitives) { this.primitives = primitives; n = primitives.numPrimitives(); bounds = primitives.getWorldBounds(null); return true; } |
n = primitives.numPrimitives(); | n = primitives.getNumPrimitives(); | public boolean build(AggregateTraceable primitives) { this.primitives = primitives; n = primitives.numPrimitives(); bounds = primitives.getWorldBounds(null); return true; } |
public void intersect(Ray r, Instance parent, IntersectionState state) { | public void intersect(Ray r, IntersectionState state) { | public void intersect(Ray r, Instance parent, IntersectionState state) { for (int i = 0; i < n; i++) primitives.intersectPrimitive(r, parent, i, state); } |
primitives.intersectPrimitive(r, parent, i, state); | primitives.intersectPrimitive(r, i, state); | public void intersect(Ray r, Instance parent, IntersectionState state) { for (int i = 0; i < n; i++) primitives.intersectPrimitive(r, parent, i, state); } |
return this.effortEstimate; | return null; | public AFTime getEffortEstimate() { return this.effortEstimate; //TODO } |
if (parent != null) ng = parent.transformNormalObjectToWorld(ng); | ng = parent.transformNormalObjectToWorld(ng); | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID(); float u = state.getU(); float v = state.getV(); float w = 1 - u - v; state.getRay().getPoint(state.getPoint()); int ... |
if (parent != null) state.getNormal().set(parent.transformNormalObjectToWorld(state.getNormal())); | state.getNormal().set(parent.transformNormalObjectToWorld(state.getNormal())); | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID(); float u = state.getU(); float v = state.getV(); float w = 1 - u - v; state.getRay().getPoint(state.getPoint()); int ... |
if (parent != null) dpdv = parent.transformVectorObjectToWorld(dpdv); | dpdv = parent.transformVectorObjectToWorld(dpdv); | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID(); float u = state.getU(); float v = state.getV(); float w = 1 - u - v; state.getRay().getPoint(state.getPoint()); int ... |
final String message = REZ.getString( "close-zip-file.error", file ); getLogger().warn( message, e ); | getLogger().warn( "vfs.provider.zip/close-zip-file.error :"+ file, e ); | public void close() { // Release the zip file try { if ( zipFile != null ) { zipFile.close(); } } catch ( final IOException e ) { final String message = REZ.getString( "close-zip-file.error", file ); g... |
final String message = REZ.getString( "open-zip-file.error", file ); throw new FileSystemException( message, ioe ); | throw new FileSystemException( "vfs.provider.zip/open-zip-file.error", new Object[]{file}, ioe ); | protected ZipFile createZipFile( File file ) throws FileSystemException { try { return new ZipFile( file ); } catch ( IOException ioe ) { final String message = REZ.getString( "open-zip-file.error", file ); throw new FileSystemException( message... |
this.shaders[i] = api.shader(shaders[i]); | this.shaders[i] = api.lookupShader(shaders[i]); | public boolean update(ParameterList pl, SunflowAPI api) { String[] shaders = pl.getStringArray("shaders"); if (shaders != null) { this.shaders = new Shader[shaders.length]; for (int i = 0; i < shaders.length; i++) this.shaders[i] = api.shader(shaders[i]); } ... |
tmpBuf = null; | public void close() throws IOException { reader.close(); } | |
throw new IllegalArgumentException(ex.getMessage(),ex); | throw (IllegalArgumentException)new IllegalArgumentException(ex.getMessage()).initCause(ex); | public static ServiceReference[] getAllServices(BundleContext context, Class serviceClass, String filter) throws IllegalArgumentException { try { ServiceReference[] serviceReferences = context.getAllServiceReferences(serviceClass.getName(),filter); return serviceReferences; } catch (Inv... |
throw new IllegalArgumentException(ex.getMessage(),ex); | throw (IllegalArgumentException)new IllegalArgumentException(ex.getMessage()).initCause(ex); | public static ServiceReference[] getServices(BundleContext context, Class serviceClass, String filter) throws IllegalArgumentException { try { ServiceReference[] serviceReferences = context.getServiceReferences(serviceClass.getName(),filter); return serviceReferences; } catch (InvalidSyntaxException ex) {... |
Vector selection = listPanel.getSelection(); | public void actionPerformed(ActionEvent e) { ListPanel listPanel = (ListPanel)tab.getSelectedComponent(); Vector selected = listPanel.getSelected(); Vector selection = listPanel.getSelection(); /** sparar snittlistan som webbsida */ if(e.getSource() == saveToHTML) { if(selected.size() != 0) { fileCho... | |
dis = new DataInputStream(mis); | dis = new DataInputStream(new FilterInputStream(mis) { public int read() throws IOException { int ret = super.read(); if (ret > -1) { filePointer++; } return ret; } public int read(byte b[]) throws IOException { int ret = super.read(b); if (ret > -1) { filePointer+=ret; } return ret; } public int read(byte b[], int o... | private void createStream() throws IOException { if (dis != null) { return; } final GetMethod getMethod = new GetMethod(); fileObject.setupMethod(getMethod); getMethod.setRequestHeader("Range", "bytes=" + filePointer + "-"); final int status = fileSyste... |
filePointer += mis.getCount(); | public boolean readBoolean() throws IOException { createStream(); boolean data = dis.readBoolean(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public byte readByte() throws IOException { createStream(); byte data = dis.readByte(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public char readChar() throws IOException { createStream(); char data = dis.readChar(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public double readDouble() throws IOException { createStream(); double data = dis.readDouble(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public float readFloat() throws IOException { createStream(); float data = dis.readFloat(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public void readFully(byte b[]) throws IOException { createStream(); dis.readFully(b); filePointer += mis.getCount(); } | |
filePointer += mis.getCount(); | public int readInt() throws IOException { createStream(); int data = dis.readInt(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public long readLong() throws IOException { createStream(); long data = dis.readLong(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public short readShort() throws IOException { createStream(); short data = dis.readShort(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public String readUTF() throws IOException { createStream(); String data = dis.readUTF(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public int readUnsignedByte() throws IOException { createStream(); int data = dis.readUnsignedByte(); filePointer += mis.getCount(); return data; } | |
filePointer += mis.getCount(); | public int readUnsignedShort() throws IOException { createStream(); int data = dis.readUnsignedShort(); filePointer += mis.getCount(); return data; } | |
if (pos == 0) | if (pos == filePointer) | public void seek(long pos) throws IOException { if (pos == 0) { // no change return; } if (pos < 0) { throw new FileSystemException("vfs.provider/random-access-invalid-position.error", new Object[] { ... |
filePointer += mis.getCount(); | public int skipBytes(int n) throws IOException { createStream(); int data = dis.skipBytes(n); filePointer += mis.getCount(); return data; } | |
throw (IllegalStateException) new IllegalArgumentException("Filter string '" | IllegalArgumentException illArgEx = new IllegalArgumentException("Filter string '" | private Filter getFilter(String serviceInterface, String serviceFilter) { StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = serviceFilter != null; if (andFilterWithInterfaceName) { sb.append("(&"); } if (serviceFilter != null) { sb.append(serviceFilter); } sb.append("("); sb.append... |
+ e.getMessage()).initCause(e); | + e.getMessage()); illArgEx.initCause(e); throw illArgEx; | private Filter getFilter(String serviceInterface, String serviceFilter) { StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = serviceFilter != null; if (andFilterWithInterfaceName) { sb.append("(&"); } if (serviceFilter != null) { sb.append(serviceFilter); } sb.append("("); sb.append... |
if (absPath.endsWith("/")) | if (absPath.length() > 1 && absPath.endsWith("/")) | public AbstractFileName(final String scheme, final String absPath, FileType type) { this.rootUri = null; this.scheme = scheme; this.type = type; if (absPath != null && absPath.length() > 0) { if (absPath.endsWith("/")) { ... |
state.faceforward(); | public Color getRadiance(ShadingState state) { return new Color().set(state.getIrradiance(Color.WHITE)).mul(1.0f / (float) Math.PI); } | |
builtAccel = false; | public Geometry(PrimitiveList primitives) { this.primitives = primitives; accel = null; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.