rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
Arrays.fill(row, null); | public boolean next() { try { boolean res = resultSet.next(); rowNum++; return res; } catch (SQLException e) { throw new JDBCException("Unable to move cursor to the next row", e); } } | |
jq.setParametersCallback(new ParametersCallback() { public Object getParameter(final String name) { fail("Query provide enough columns - no need to get parameters from parent"); return null; } }); | jq.setParametersCallback(MockParametersCallbacks.UNSUPPORTED); | public void testQuery() { final int[] rows = new int[1]; //just to allow inner classes to modify a variable JaninoQuery jq = new JaninoQuery(); //now check a query exposing a row with one column jq.setParametersCallback(new ParametersCallback() { public Object getParameter(fin... |
constructConceptTreePanel.expandTree(); constructPropertyTreePanel.expandTree(); | public void loadOntology(DODDLEProject currentProject, File file) { InputModuleUI inputModuleUI = currentProject.getInputModuleUI(); ConstructConceptTreePanel constructConceptTreePanel = currentProject.getConstructConceptTreePanel(); ConstructPropertyTreePanel constructPropertyTreePanel = curre... | |
ConstructPropertyTreePanel constructConceptDefinitionPanel = currentProject.getConstructPropertyTreePanel(); | ConstructPropertyTreePanel constructPropertyTreePanel = currentProject.getConstructPropertyTreePanel(); | public void saveProjectInfo(DODDLEProject currentProject, File file) { InputModuleUI inputModuleUI = currentProject.getInputModuleUI(); ConstructConceptTreePanel constructConceptTreePanel = currentProject.getConstructConceptTreePanel(); ConstructPropertyTreePanel constructConceptDefinitionPanel... |
buf.append("プロパティ数: " + constructConceptDefinitionPanel.getAllConceptID().size() + "\n"); | buf.append("プロパティ数: " + constructPropertyTreePanel.getAllConceptID().size() + "\n"); | public void saveProjectInfo(DODDLEProject currentProject, File file) { InputModuleUI inputModuleUI = currentProject.getInputModuleUI(); ConstructConceptTreePanel constructConceptTreePanel = currentProject.getConstructConceptTreePanel(); ConstructPropertyTreePanel constructConceptDefinitionPanel... |
name = GenericFileName.parseUri( "ftp: assertEquals( "ftp", name.getScheme() ); assertEquals( "user:", name.getUserName() ); assertEquals( "@", name.getPassword() ); assertEquals( "hostname", name.getHostName() ); assertEquals( 21, name.getPort() ); assertEquals( "/", name.getPath() ); assertEquals( "ftp: assertEquals(... | public void testParseUri() throws Exception { // Simple name GenericFileName name = GenericFileName.parseUri( "ftp://hostname/file", 21 ); assertEquals( "ftp", name.getScheme() ); assertNull( name.getUserName() ); assertNull( name.getPassword() ); assertEquals( "hostname... | |
if (type == null || type.equals("null")) | if (type == null || type.equals("null") || type.equals("none")) | public static final GIEngine create(Options options) { String type = options.getString("gi.engine", null); if (type == null || type.equals("null")) return null; else if (type.equals("ambocc")) return new AmbientOcclusionGIEngine(options); else if (type.equals("fake"... |
this(null); | super(null); setDisplayName("Root OsgiBundleApplicationContext"); | public AbstractRefreshableOsgiBundleApplicationContext() { this(null); } |
return globalContext.getSqlEngine().getConnection(connectionId) | return getGlobalContext().getSqlEngine().getConnection(connectionId) | public Connection getConnection() { return globalContext.getSqlEngine().getConnection(connectionId) .getConnection(); } |
return globalContext.getSqlEngine().getConnection(connectionId) | return getGlobalContext().getSqlEngine().getConnection(connectionId) | public DialectIdentifier getDialectIdentifier() { return globalContext.getSqlEngine().getConnection(connectionId) .getDialectIdentifier(); } |
return globalContext.getSqlEngine().getConnection(connectionId) | return getGlobalContext().getSqlEngine().getConnection(connectionId) | public Connection getNewConnection() { return globalContext.getSqlEngine().getConnection(connectionId) .newConnection(); } |
p.x += 0.001f * ng.x; p.y += 0.001f * ng.y; p.z += 0.001f * ng.z; | public void getPhoton(double randX1, double randY1, double randX2, double randY2, Point3 p, Vector3 dir, Color power) { double s = Math.sqrt(1 - randX2); float u = (float) (randY2 * s); float v = (float) (1 - s); float w = 1 - u - v; int a, b, c; ... | |
p.x += 0.001f * ng.x; p.y += 0.001f * ng.y; p.z += 0.001f * ng.z; | public void getSample(int i, ShadingState state, LightSample dest) { // random offset on unit square double randX = state.getRandom(i, 0); double randY = state.getRandom(i, 1); float s = (float) Math.sqrt(1 - randX); float u = (float) randY * s; ... | |
for (int i = 0; i < retryTimes; i++) { try { reference = OsgiServiceUtils.getService(this.bundleContext, serviceInterface, filter); | for (int i = 0; i < retryTimes; i++) { try { reference = OsgiServiceUtils.getService(this.bundleContext, getInterface(), getFilterStringForServiceLookup()); | 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;... |
if (logger.isDebugEnabled()) { logger.debug("Resolved service reference: [" + reference + "] after " + (i + 1) + " attempts"); } } catch (NoSuchServiceException nsse) { reference = null; if (!retryOnUnregisteredService) { throw nsse; } } if (reference == null) { Thread.sleep(retryDelayMs); } else { service = bundleCont... | if (logger.isDebugEnabled()) { logger.debug("Resolved service reference: [" + reference + "] after " + (i + 1) + " attempts"); } } catch (NoSuchServiceException nsse) { reference = null; if (!retryOnUnregisteredService) { throw nsse; } } if (reference == null) { Thread.sleep(retryDelayMs); } else { service = bundleCont... | 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;... |
InvocationHandler unavailableServiceHandler = new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { throw new ServiceUnavailableException("Service is currently unavailable", serviceInterface, filter); } }; | Object unavailableService = Proxy.newProxyInstance(serviceInterface.getClassLoader(), new Class[]{serviceInterface}, unavailableServiceHandler); | 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;... |
Object unavailableService = Proxy.newProxyInstance(serviceInterface.getClassLoader(), new Class[]{serviceInterface}, unavailableServiceHandler); | listener = new Listener(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;... |
listener = new Listener(unavailableService); | HotSwappableTargetSource targetSource = new HotSwappableTargetSource(service); listener.setTargetSource(targetSource); | 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;... |
HotSwappableTargetSource targetSource = new HotSwappableTargetSource(service); listener.setTargetSource(targetSource); | ProxyFactory pf = new ProxyFactory(); if (getInterface().isInterface()) { pf.setInterfaces(new Class[]{getInterface()}); } pf.setTargetSource(targetSource); 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;... |
ProxyFactory pf = new ProxyFactory(); if (getInterface().isInterface()) { pf.setInterfaces(new Class[]{getInterface()}); } pf.setTargetSource(targetSource); | interceptor.setMaxRetries(this.timeout != 0 ? this.retryTimes : Integer.MAX_VALUE); interceptor.setRetryIntervalMillis(this.retryDelayMs); | 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;... |
OsgiServiceInterceptor interceptor = new OsgiServiceInterceptor(targetSource, getInterface(), unavailableService); | pf.addAdvice(interceptor); | 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;... |
interceptor.setMaxRetries(this.retryOnUnregisteredService ? this.retryTimes : 0); interceptor.setRetryIntervalMillis(this.retryDelayMs); | switch (contextClassloader) { case ReferenceClassLoadingOptions.CLIENT: pf.addAdvice(new BundleContextClassLoaderAdvice(bundleContext.getBundle())); break; case ReferenceClassLoadingOptions.SERVICE_PROVIDER: pf.addAdvice(new BundleContextClassLoaderAdvice(reference.getBundle())); break; case ReferenceClassLoadingOption... | 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;... |
pf.addAdvice(interceptor); | pf.addAdvice(new LocalBundleContext(bundleContext.getBundle())); | 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;... |
pf.addAdvice(new LocalBundleContext(bundleContext.getBundle())); proxy = pf.getProxy(applicationContext.getClassLoader()); } | proxy = pf.getProxy(applicationContext.getClassLoader()); } | 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;... |
StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = getFilter() != null; if (andFilterWithInterfaceName) { sb.append("(&"); } if (getFilter() != null) { sb.append(getFilter()); } sb.append("("); sb.append(OBJECTCLASS); sb.append("="); sb.append(getInterface().getCanonicalName()); sb.append(")"); ... | StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = ((getFilter() != null) || (getBeanName() != null)); if (andFilterWithInterfaceName) { sb.append("(&"); } if (getFilter() != null) { sb.append(getFilter()); } sb.append("("); sb.append(OBJECTCLASS); sb.append("="); sb.append(getInterface().getCan... | private String getFilterStringForServiceLookup() { StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = getFilter() != null; if (andFilterWithInterfaceName) { sb.append("(&"); } if (getFilter() != null) { sb.append(getFilter()); }... |
this.timeout = timeout; } | this.timeout = timeout; if (timeout > 0) setRetryTimes((int) (timeout / getRetryDelayMs())); } | public void setTimeout(int timeout) { this.timeout = timeout; } |
files.add(new File("script.xml")); | files.add(new File("etl.xml")); | public static void main(final String args[]) { Handler h = new ConsoleHandler(); h.setFormatter(STD_FORMATTER); h.setLevel(Level.INFO); boolean failed = false; List<File> files = new ArrayList<File>(); ConsoleProgressIndicator indicator = new ConsoleProgressIndicator("Scrip... |
t.getCause().printStackTrace(); | t.printStackTrace(); | public static void main(final String args[]) { Handler h = new ConsoleHandler(); h.setFormatter(STD_FORMATTER); h.setLevel(Level.INFO); boolean failed = false; List<File> files = new ArrayList<File>(); ConsoleProgressIndicator indicator = new ConsoleProgressIndicator("Scrip... |
if (cause != null && cause.getMessage() != null) { | if ((lastProvider==null || lastElementLocation==null) && cause != null && cause.getMessage() != null) { | public ScriptsExecutorException(Throwable cause) { super(cause); for (Throwable ex = cause; ex != null; ex = ex.getCause()) { if (isExpression(ex)) { lastExpression = ex; } if (ex instanceof ProviderException) { ProviderException providerE... |
m_manager.addProvider( "zip", new ZipFileSystemProvider() ); | getManager().addProvider( "zip", new ZipFileSystemProvider() ); | protected FileObject getBaseFolder() throws Exception { m_manager.addProvider( "zip", new ZipFileSystemProvider() ); // Locate the base Zip file final String zipFilePath = getTestResource( "nested.zip" ).getAbsolutePath(); String uri = "zip:" + zipFilePath + "!/test.zip"; final... |
final FileObject zipFile = m_manager.resolveFile( uri ); | final FileObject zipFile = getManager().resolveFile( uri ); | protected FileObject getBaseFolder() throws Exception { m_manager.addProvider( "zip", new ZipFileSystemProvider() ); // Locate the base Zip file final String zipFilePath = getTestResource( "nested.zip" ).getAbsolutePath(); String uri = "zip:" + zipFilePath + "!/test.zip"; final... |
final FileObject nestedFS = m_manager.createFileSystem( "zip", zipFile ); | final FileObject nestedFS = getManager().createFileSystem( "zip", zipFile ); | protected FileObject getBaseFolder() throws Exception { m_manager.addProvider( "zip", new ZipFileSystemProvider() ); // Locate the base Zip file final String zipFilePath = getTestResource( "nested.zip" ).getAbsolutePath(); String uri = "zip:" + zipFilePath + "!/test.zip"; final... |
if (onErrorEl != null && onErrorEl.getContent(dialectId) != null) { | if (onErrorEl != null) { | private boolean onError(Throwable t, OnErrorHandler errorHandler, DynamicContext ctx) { OnErrorEl onErrorEl = errorHandler.onError(t); Connection con = ctx.getConnection(); DialectIdentifier dialectId = con.getDialectIdentifier(); if (onErrorEl != null && onErrorEl.getContent(dialectId) ... |
if (content == null) { LOG.log(Level.WARNING, "Script " + getLocation() + " failed and onError handler has no executable content: " + onErrorEl, t); ExceptionUtils.throwUnchecked(t); throw new IllegalStateException("Unexpected condition"); } | private boolean onError(Throwable t, OnErrorHandler errorHandler, DynamicContext ctx) { OnErrorEl onErrorEl = errorHandler.onError(t); Connection con = ctx.getConnection(); DialectIdentifier dialectId = con.getDialectIdentifier(); if (onErrorEl != null && onErrorEl.getContent(dialectId) ... | |
return onError(t, errorHandler, ctx); | return onError(e, errorHandler, ctx); | private boolean onError(Throwable t, OnErrorHandler errorHandler, DynamicContext ctx) { OnErrorEl onErrorEl = errorHandler.onError(t); Connection con = ctx.getConnection(); DialectIdentifier dialectId = con.getDialectIdentifier(); if (onErrorEl != null && onErrorEl.getContent(dialectId) ... |
if (getStatementCache()!=null) { | try { ps.clearParameters(); } catch (Exception e) { LOG.log(Level.FINE, "Failed to clear statement parameters", e); } if (getStatementCache() != null) { | private void releaseStatement(PreparedStatement ps) { if (getStatementCache()!=null) { getStatementCache().closeRemovedStatements(); } else { JDBCUtils.closeSilent(ps); } params.clear(); IOUtils.closeSilently(converter); //clos... |
row = null; | public void close() { if (resultSet != null) { JDBCUtils.closeSilent(resultSet); IOUtils.closeSilently(converter); resultSet = null; row = null; params = null; columnsMap = null; } } | |
public void put(String key, PreparedStatement entry) { if (map!=null) { | private void put(String key, StatementWrapper.Prepared entry) { if (map != null) { | public void put(String key, PreparedStatement entry) { if (map!=null) { map.put(key, entry); } } |
final File baseDir = AbstractVfsTestCase.getTestDirectory(); | final File baseDir = AbstractVfsTestCase.getTestDirectoryFile(); | public void prepare(final DefaultFileSystemManager manager) throws Exception { final File baseDir = AbstractVfsTestCase.getTestDirectory(); manager.addProvider("tmp", new TemporaryFileProvider(baseDir)); } |
cancelButton.setVisible(true); | public void initIndeterminate() { progressBar.setIndeterminate(true); progressBar.setVisible(true); } | |
p.x += 0.001f * ng.x; p.y += 0.001f * ng.y; p.z += 0.001f * ng.z; | public final void faceforward() { cosND = -r.dot(n); // make sure we are on the right side of the material if (cosND < 0.0) { n.negate(); ng.negate(); basis.flipW(); cosND = -cosND; // make sure this value is positive behind = true; ... | |
UserAuthenticator proxyAuth = WebdavFileSystemConfigBuilder.getInstance().getProxyAuthenticator(fileSystemOptions); if (proxyAuth != null) { UserAuthenticationData authData = UserAuthenticatorUtils.authenticate(proxyAuth, new UserAuthenticationData.Type[] { UserAuthenticationData.USERNAME, UserAuthenticationData.PASSWO... | public static HttpClient createConnection(String hostname, int port, char[] username, char[] password, FileSystemOptions fileSystemOptions) throws FileSystemException { // Create an Http client HttpClient client; try { final HttpURL url = new HttpURL( UserAuthenticatorUt... | |
throw new JDBCException("JNDI name must be specified in an url attribute of connection element."); | throw new JndiProviderException("JNDI name must be specified in an url attribute of connection element."); | protected java.sql.Connection getConnection(String url, Properties props) throws SQLException { if (url == null) { throw new JDBCException("JNDI name must be specified in an url attribute of connection element."); } try { InitialContext ctx = new InitialContext(props); ... |
throw new JDBCException("A problem occured while trying to lookup a datasource with name " + url, e); | throw new JndiProviderException("A problem occured while trying to lookup a datasource with name " + url, e); | protected java.sql.Connection getConnection(String url, Properties props) throws SQLException { if (url == null) { throw new JDBCException("JNDI name must be specified in an url attribute of connection element."); } try { InitialContext ctx = new InitialContext(props); ... |
if ( encodedStr == null ) { return null; } | public static String decode( final String encodedStr ) throws FileSystemException { final StringBuffer buffer = new StringBuffer( encodedStr ); decode( buffer, 0, buffer.length() ); return buffer.toString(); } | |
throw new FileSystemException("vfs.provider/get-attributes-no-exist.error", "/"); | throw new FileSystemException("vfs.provider.ftp/change-work-directory.error", "/"); | public static FTPClient createConnection(String hostname, int port, String username, String password, String workingDirectory, FileSystemOptions fileSystemOptions) throws FileSystemException { // Determine the username and password to use if (username == null) { username = "anonym... |
optionDialog.saveOption(new File(saveDir, "option.txt")); | optionDialog.saveOption(new File(saveDir, "option.txt"), disambiguationPanel); | public void saveProject(File saveDir, DODDLEProject currentProject) { OntologySelectionPanel ontSelectionPanel = currentProject.getOntologySelectionPanel(); DisambiguationPanel disambiguationPanel = currentProject.getDisambiguationPanel(); DocumentSelectionPanel docSelectionPanel = currentProje... |
public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { | public void intersectPrimitive(Ray r, int primID, IntersectionState state) { | public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { // intersect in local space float qa = r.dx * r.dx + r.dy * r.dy + r.dz * r.dz; float qb = 2 * ((r.dx * r.ox) + (r.dy * r.oy) + (r.dz * r.oz)); float qc = ((r.ox * r.ox) + (r.oy * r.oy) + (r.oz ... |
state.setIntersection(parent, 0, 0, 0); | state.setIntersection(0, 0, 0); | public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { // intersect in local space float qa = r.dx * r.dx + r.dy * r.dy + r.dz * r.dz; float qb = 2 * ((r.dx * r.ox) + (r.dy * r.oy) + (r.dz * r.oz)); float qc = ((r.ox * r.ox) + (r.oy * r.oy) + (r.oz ... |
public void prepareShadingState(Instance parent, int primID, ShadingState state) { | public void prepareShadingState(ShadingState state) { | public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 localPoint = parent.transformWorldToObject(state.getPoint()); state.getNormal().set(localPoint.x, localPoint.y, localPoint.z); state.g... |
Instance parent = (Instance) state.getObject(); | public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 localPoint = parent.transformWorldToObject(state.getPoint()); state.getNormal().set(localPoint.x, localPoint.y, localPoint.z); state.g... | |
float phi = (float) Math.atan2(state.getNormal().y, state.getNormal().x); if (phi < 0) phi += 2 * Math.PI; float theta = (float) Math.acos(state.getNormal().z); state.getUV().y = theta / (float) Math.PI; state.getUV().x = phi / (float) (2 * Math.PI); Vector3 v = new Vector3(); v.x = -2 * (float) Math.PI * state.getNorm... | public void prepareShadingState(ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 localPoint = state.getInstance().transformWorldToObject(state.getPoint()); localPoint.x -= particles[3 * state.getPrimitiveID() + 0]; localPoint.y -= particles[3 *... | |
v = state.getInstance().transformVectorObjectToWorld(v); | public void prepareShadingState(ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 localPoint = state.getInstance().transformWorldToObject(state.getPoint()); localPoint.x -= particles[3 * state.getPrimitiveID() + 0]; localPoint.y -= particles[3 *... | |
state.setBasis(OrthoNormalBasis.makeFromWV(state.getNormal(), v)); | state.setBasis(OrthoNormalBasis.makeFromW(state.getNormal())); | public void prepareShadingState(ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 localPoint = state.getInstance().transformWorldToObject(state.getPoint()); localPoint.x -= particles[3 * state.getPrimitiveID() + 0]; localPoint.y -= particles[3 *... |
sinNodeListSorter = new SinNodeListSorter(); | private ConceptTreeMaker() { inputConceptSet = new HashSet<Concept>(); mraResultList = new ArrayList<List<ConceptTreeNode>>(); traResultList = new ArrayList<ConceptTreeNode>(); } | |
private void getSINNodeSet(ConceptTreeNode node, Set<ConceptTreeNode> sinNodeSet) { | private void getSINNodeSet(ConceptTreeNode node, List<ConceptTreeNode> sinNodeSet) { | private void getSINNodeSet(ConceptTreeNode node, Set<ConceptTreeNode> sinNodeSet) { for (int i = 0; i < node.getChildCount(); i++) { ConceptTreeNode childNode = (ConceptTreeNode) node.getChildAt(i); if (childNode.isSINNode()) { sinNodeSet.add(childNode); } ... |
Set<ConceptTreeNode> sinNodeSet = new HashSet<ConceptTreeNode>(); getSINNodeSet(rootNode, sinNodeSet); for (ConceptTreeNode sinNode : sinNodeSet) { | List<ConceptTreeNode> sinNodeList = new ArrayList<ConceptTreeNode>(); getSINNodeSet(rootNode, sinNodeList); Collections.sort(sinNodeList, sinNodeListSorter); ConceptTreeNode lastSinNode = null; for (ConceptTreeNode sinNode : sinNodeList) { | private void matchedResultAnalysis(ConceptTreeNode rootNode) { Set<ConceptTreeNode> sinNodeSet = new HashSet<ConceptTreeNode>(); getSINNodeSet(rootNode, sinNodeSet); for (ConceptTreeNode sinNode : sinNodeSet) { List<ConceptTreeNode> stm = new ArrayList<ConceptTreeNode>(); ... |
mraResultList.add(stm); | if (isSameSinNode(sinNode, lastSinNode)) { mraResultList.get(mraResultList.size() - 1).addAll(stm); } else { mraResultList.add(stm); } lastSinNode = sinNode; | private void matchedResultAnalysis(ConceptTreeNode rootNode) { Set<ConceptTreeNode> sinNodeSet = new HashSet<ConceptTreeNode>(); getSINNodeSet(rootNode, sinNodeSet); for (ConceptTreeNode sinNode : sinNodeSet) { List<ConceptTreeNode> stm = new ArrayList<ConceptTreeNode>(); ... |
if (getConcept() == null) { return ""; } | public String toString() { if (OptionDialog.isShowPrefix()) { return getConcept().getPrefix() + ":" + getConcept().getWord(); } return getConcept().getWord(); } | |
while( m_copies.size() > 0 ) { final FileObject file = (FileObject)m_copies.remove( 0 ); try { file.delete( FileConstants.SELECT_ALL ); } catch( final FileSystemException e ) { final String message = REZ.getString( "delete-temp.warn", file.getName() ); getLogger().warn( message, e ); } } | public void dispose() { while( m_copies.size() > 0 ) { final FileObject file = (FileObject)m_copies.remove( 0 ); try { file.delete( FileConstants.SELECT_ALL ); } catch( final FileSystemException e ) { fi... | |
final String basename = m_filecount + "_" + srcFile.getName().getBaseName(); m_filecount++; final File file = new File( m_tempDir, basename ); | final String basename = srcFile.getName().getBaseName(); final File file = generateTempFile( basename, m_tempDir ); | public File replicateFile( final FileObject srcFile, final FileSelector selector ) throws FileSystemException { // TODO - this is awful // Create a unique-ish file name final String basename = m_filecount + "_" + srcFile.getName().getBaseName(); m_... |
destFile.copyFrom( srcFile, selector ); | AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws FileSystemException { destFile.copyFrom( srcFile, selector ); return null; } } ); | public File replicateFile( final FileObject srcFile, final FileSelector selector ) throws FileSystemException { // TODO - this is awful // Create a unique-ish file name final String basename = m_filecount + "_" + srcFile.getName().getBaseName(); m_... |
catch( final FileSystemException e ) | catch( final PrivilegedActionException e ) | public File replicateFile( final FileObject srcFile, final FileSelector selector ) throws FileSystemException { // TODO - this is awful // Create a unique-ish file name final String basename = m_filecount + "_" + srcFile.getName().getBaseName(); m_... |
setURL(u, protocolPart, null, -1, null, null, filePart.toString(), null, null); | setURL(u, protocolPart, "", -1, null, null, filePart.toString(), null, null); | protected void parseURL(final URL u, final String spec, final int start, final int limit) { try { FileObject old = context.resolveFile(u.toExternalForm(), fileSystemOptions); FileObject newURL; ... |
public LRUFilesCache(int lruSize) | public LRUFilesCache() | public LRUFilesCache(int lruSize) { this.lruSize = lruSize; } |
this.lruSize = lruSize; | this(100); | public LRUFilesCache(int lruSize) { this.lruSize = lruSize; } |
pw.println("error codes: " + lastProvider.getErrorCodes()); | pw.println("Error codes: " + lastProvider.getErrorCodes()); | public ScriptsExecutorException(Throwable cause) { super(cause); for (Throwable ex = cause; ex != null; ex = ex.getCause()) { if (isExpression(ex)) { lastExpression = ex; } if (ex instanceof ProviderException) { ProviderException providerE... |
assertFalse(osgiResource.exists()); | assertTrue(osgiResource.exists()); | public void testFileOutsideOSGi() throws Exception { // load file using absolute path ResourceLoader fileLoader = new DefaultResourceLoader(); Resource res = fileLoader.getResource(FileSystemAccessTest.class.getName().replace('.', '/').concat(".class")); String fileLocation = "file://" + res.getFile().getAbsoluteP... |
final FileContentInputStream instr = (FileContentInputStream) getThreadData().removeRastr(0); instr.close(); | final RandomAccessContent ra = (RandomAccessContent) getThreadData().removeRastr(0); try { ra.close(); } catch (IOException e) { throw new FileSystemException(e); } | public void close() throws FileSystemException { try { // Close the input stream while (getThreadData().getInstrsSize() > 0) { final FileContentInputStream instr = (FileContentInputStream) getThreadData().removeInstr(0); instr.close(); ... |
try { zipFile = new ZipFile( this.file ); } catch ( IOException ioe ) { final String message = REZ.getString( "open-zip-file.error", this.file ); throw new FileSystemException( message, ioe ); } | zipFile = createZipFile( this.file ); | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); ... |
if ( entry.isDirectory() ) | if ( entry.isDirectory() && getFile( name ) != null ) | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); ... |
if ( getFile( name ) != null ) { continue; } fileObj = new ZipFileObject( name, true, this ); | fileObj = (ZipFileObject) getFile( name ); fileObj.setZipEntry( entry ); continue; | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); ... |
else { fileObj = new ZipFileObject( name, entry, zipFile, this ); } | fileObj = createZipFileObject( name, entry, zipFile ); | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); ... |
ZipFileObject parent; | ZipFileObject parent = null; | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); ... |
parent = new ZipFileObject( parentName, true, this ); | parent = createZipFileObject( parentName, null, null ); | public ZipFileSystem( final DefaultFileName rootName, final FileObject parentLayer ) throws FileSystemException { super( rootName, parentLayer ); // Make a local copy of the file final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF ); ... |
return new ZipFileObject( name, false, this ); | return new ZipFileObject( name, null, null, this ); | protected FileObject createFile( FileName name ) throws FileSystemException { // This is only called for files which do not exist in the Zip file return new ZipFileObject( name, false, this ); } |
posSet = new HashSet(); | posSet = new HashSet<String>(); | public WordInfo(String w, int dn) { docNum = dn; word = w; posSet = new HashSet(); docTermFreqMap = new HashMap(); inputDocTermFreqMap = new HashMap(); upperConceptSet = new HashSet(); } |
for (Iterator i = posSet.iterator(); i.hasNext();) { String pos = (String) i.next(); | for (String pos : posSet) { | public Vector getRowData() { Vector rowData = new Vector(); rowData.add(word); StringBuffer buf = new StringBuffer(""); for (Iterator i = posSet.iterator(); i.hasNext();) { String pos = (String) i.next(); buf.append(pos + ":"); } rowData.add(buf.toStri... |
rowData.add(new Integer(getTF())); | rowData.add(getTF()); | public Vector getRowData() { Vector rowData = new Vector(); rowData.add(word); StringBuffer buf = new StringBuffer(""); for (Iterator i = posSet.iterator(); i.hasNext();) { String pos = (String) i.next(); buf.append(pos + ":"); } rowData.add(buf.toStri... |
session.setPassword(new String(password)); | if (password != null) { session.setPassword(new String(password)); } | 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... |
assertEquals("global2ValueThree${global}", text); | assertEquals("global2ValueThreeglobalValue", text); | public void testSubstitution() throws ScriptsExecutorException { final Connection c = getConnection("sqlparamstst"); ScriptsExecutor e = newScriptsExecutor(); e.execute(); QueryHelper q = new QueryHelper("select * from test"); q.execute(c, new QueryCallback() { ... |
assertEquals("global2ValueThree${global}", text); | assertEquals("global2ValueThreeglobalValue", text); | public void processRow(final ParametersCallback rowEvaluator) { final Integer id = (Integer) rowEvaluator.getParameter("id"); final String text = (String) rowEvaluator.getParameter( "text"); if (id.eq... |
} if (searchedConcept == null) { searchedConcept = conceptTreeRootNode.getConcept(); | private Concept insertComplexWordConceptTreeNode(String identity, String newWord, ConceptTreeNode conceptTreeRootNode) { searchedConcept = null; if (idConceptMap.get(identity) == null) { searchConcept(identity, conceptTreeRootNode); idConceptMap.put(identity, searchedC... | |
public TreeModel getTreeModel(Set nounIDSet, Set<Concept> verbConceptSet) { | public TreeModel getTreeModel(Set nounIDSet, Set<Concept> verbConceptSet, String type) { | public TreeModel getTreeModel(Set nounIDSet, Set<Concept> verbConceptSet) { Set<List<Concept>> pathSet = treeMaker.getPathList(verbConceptSet); removeNounConceptPath(pathSet); // 移動と行為以外のパスを削除する trimmedConceptNum = 0; TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, p... |
TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, project); | TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, project, type); | public TreeModel getTreeModel(Set nounIDSet, Set<Concept> verbConceptSet) { Set<List<Concept>> pathSet = treeMaker.getPathList(verbConceptSet); removeNounConceptPath(pathSet); // 移動と行為以外のパスを削除する trimmedConceptNum = 0; TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, p... |
ConceptTreeNode rootNode = (ConceptTreeNode) propertyTreeModel.getRoot(); VerbConcept propRoot = new VerbConcept(ConceptTreeMaker.DODDLE_PROPERTY_ROOT_ID, "動詞的概念"); propRoot.addEnWord("Root Property"); propRoot.setPrefix(DODDLE.BASE_PREFIX); rootNode.setConcept(propRoot); rootNode.setIsUserConcept(true); | public TreeModel getTreeModel(Set nounIDSet, Set<Concept> verbConceptSet) { Set<List<Concept>> pathSet = treeMaker.getPathList(verbConceptSet); removeNounConceptPath(pathSet); // 移動と行為以外のパスを削除する trimmedConceptNum = 0; TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, p... | |
public Set getIDSet(String relation, String verbID, List<List<Concept>> trimmedConceptList) { | public Set getIDSet(String verbID, String relation) { | public Set getIDSet(String relation, String verbID, List<List<Concept>> trimmedConceptList) { Map map = (Map) relationMap.get(relation); //System.out.println(relation + " map key size: " + map.keySet().size()); Set idSet = new HashSet(); if (map.get(verbID) != null) { idSet.ad... |
Set idSet = new HashSet(); if (map.get(verbID) != null) { idSet.addAll((Set) map.get(verbID)); } for (List<Concept> list : trimmedConceptList) { for (Concept trimmedConcept : list) { if (map.get(trimmedConcept.getId()) != null) { idSet.addAll((Set) map.get(trimmedConcept.getId())); } } } | Set idSet = (Set) map.get(verbID); | public Set getIDSet(String relation, String verbID, List<List<Concept>> trimmedConceptList) { Map map = (Map) relationMap.get(relation); //System.out.println(relation + " map key size: " + map.keySet().size()); Set idSet = new HashSet(); if (map.get(verbID) != null) { idSet.ad... |
final String message = REZ.getString( "not-absolute-file-name.error", uri ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider.local/not-absolute-file-name.error", uri ); | protected String extractRootPrefix( final String uri, final StringBuffer name ) throws FileSystemException { // TODO - this class isn't generic at all. Need to fix this // Looking for <sep> if ( name.length() == 0 || name.charAt( 0 ) != '/' ) ... |
if (connection.getMaxFileLength()!=null) { setSizeLimit(connection.getMaxFileLength()*1024); | final Long maxFileLength = getMaxFileLength(); if (maxFileLength != null) { setSizeLimit(maxFileLength * 1024); | public LdifIterator(Reader in) { super(in); if (connection.getMaxFileLength()!=null) { setSizeLimit(connection.getMaxFileLength()*1024); } } |
if (connection == null) { throw new IllegalArgumentException("Connection cannot be null"); } | public LdifScript(LdapConnection connection) { this.connection = connection; } | |
LdifIterator it = new LdifIterator(reader); while (it.hasNext()) { in.trackLines(); | for (LdifIterator it = new LdifIterator(in); it.hasNext(); in.trackLines()) { | public void execute(Reader reader, DirContext ctx, ParametersCallback parameters) throws LdapProviderException { SubstitutingLineReader in = new SubstitutingLineReader(reader, parameters); try { in.trackLines(); LdifIterator it = new LdifIterator(reader); while (it.has... |
modify(ctx, e); | if (isReadonly()) { LOG.info("Readonly Mode - "+e+" has been skipped."); } else { modify(ctx, e); } | public void execute(Reader reader, DirContext ctx, ParametersCallback parameters) throws LdapProviderException { SubstitutingLineReader in = new SubstitutingLineReader(reader, parameters); try { in.trackLines(); LdifIterator it = new LdifIterator(reader); while (it.has... |
LOG.fine("Processing entry " + e); | LOG.fine("Processing " + e); | static void modify(DirContext ctx, final Entry e) throws NamingException { //todo add support for renaming if (LOG.isLoggable(Level.FINE)) { LOG.fine("Processing entry " + e); } Attributes atts = e.getAttributes(); final String rootDn = ctx.getNameInNamespace(); ... |
JaninoConnection c = new JaninoConnection(); | JaninoConnection c = new JaninoConnection(MockConnectionParameters.NULL); | public void testQuery() { JaninoConnection c = new JaninoConnection(); field = 0; final List<String> rows = new ArrayList<String>(); c.executeQuery(asResource( "set(\"p\", \"//\"+get(\"p\") );" + "next();" + "next(new String[] {\"p\"}, new Obj... |
JaninoConnection c = new JaninoConnection(); | JaninoConnection c = new JaninoConnection(MockConnectionParameters.NULL); | public void testScript() { JaninoConnection c = new JaninoConnection(); field = 0; c.executeScript(asResource(JaninoConnectionTest.class.getName() + ".field=1;"), null); try { c.executeScript(asResource(JaninoConnectionTest.class.getName() + ".nosuchfield=1;"), null); ... |
public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { | public void intersectPrimitive(Ray r, int primID, IntersectionState state) { | public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { // intersect in local space float rd2x = r.dx * r.dx; float rd2y = r.dy * r.dy; float rd2z = r.dz * r.dz; float ro2x = r.ox * r.ox; float ro2y = r.oy * r.oy; float ro2z = r.... |
state.setIntersection(parent, 0, 0, 0); | state.setIntersection(0, 0, 0); | public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { // intersect in local space float rd2x = r.dx * r.dx; float rd2y = r.dy * r.dy; float rd2z = r.dz * r.dz; float ro2x = r.ox * r.ox; float ro2y = r.oy * r.oy; float ro2z = r.... |
public void prepareShadingState(Instance parent, int primID, ShadingState state) { | public void prepareShadingState(ShadingState state) { | public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 n = parent.transformWorldToObject(state.getPoint()); state.getNormal().set(n.x * (2 * n.x * n.x - 1), n.y * (2 * n.y * n.y - 1), n.z * (2 * n... |
Instance parent = (Instance) state.getObject(); | public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); Point3 n = parent.transformWorldToObject(state.getPoint()); state.getNormal().set(n.x * (2 * n.x * n.x - 1), n.y * (2 * n.y * n.y - 1), n.z * (2 * n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.