rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; | int primID = state.getPrimitiveID(); | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
float w = 1 - u - v; | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... | |
int index1 = quads[quad + (even ? 1 : 2)]; int index2 = quads[quad + (even ? 2 : 3)]; | int index1 = quads[quad + 1]; int index2 = quads[quad + 2]; int index3 = quads[quad + 3]; | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
Vector3 ng = Point3.normal(v0p, v1p, v2p); if (parent != null) ng = parent.transformNormalObjectToWorld(ng); | Point3 v3p = getPoint(index2); float tanux = (1 - v) * (v1p.x - v0p.x) + v * (v2p.x - v3p.x); float tanuy = (1 - v) * (v1p.y - v0p.y) + v * (v2p.y - v3p.y); float tanuz = (1 - v) * (v1p.z - v0p.z) + v * (v2p.z - v3p.z); float tanvx = (1 - u) * (v3p.x - v0p.x) + u * (v2p.x - v1p.x); float tanvy = (1 - u) * (v3p.y - v0p... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
state.getNormal().x = w * normals[i30 + 0] + u * normals[i31 + 0] + v * normals[i32 + 0]; state.getNormal().y = w * normals[i30 + 1] + u * normals[i31 + 1] + v * normals[i32 + 1]; state.getNormal().z = w * normals[i30 + 2] + u * normals[i31 + 2] + v * normals[i32 + 2]; if (parent != null) state.getNormal().set(parent.t... | state.getNormal().x = k00 * normals[i30 + 0] + k10 * normals[i31 + 0] + k11 * normals[i32 + 0] + k01 * normals[i33 + 0]; state.getNormal().y = k00 * normals[i30 + 1] + k10 * normals[i31 + 1] + k11 * normals[i32 + 1] + k01 * normals[i33 + 1]; state.getNormal().z = k00 * normals[i30 + 2] + k10 * normals[i31 + 2] + k11 * ... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
state.getNormal().x = w * normals[idx + 0] + u * normals[idx + (even ? 3 : 6)] + v * normals[idx + (even ? 6 : 9)]; state.getNormal().y = w * normals[idx + 1] + u * normals[idx + (even ? 4 : 7)] + v * normals[idx + (even ? 7 : 10)]; state.getNormal().z = w * normals[idx + 2] + u * normals[idx + (even ? 5 : 8)] + v * no... | state.getNormal().x = k00 * normals[idx + 0] + k10 * normals[idx + 3] + k11 * normals[idx + 6] + k01 * normals[idx + 9]; state.getNormal().y = k00 * normals[idx + 1] + k10 * normals[idx + 4] + k11 * normals[idx + 7] + k01 * normals[idx + 10]; state.getNormal().z = k00 * normals[idx + 2] + k10 * normals[idx + 5] + k11 *... | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
float uv00 = 0, uv01 = 0, uv10 = 0, uv11 = 0, uv20 = 0, uv21 = 0; | float uv00 = 0, uv01 = 0, uv10 = 0, uv11 = 0, uv20 = 0, uv21 = 0, uv30 = 0, uv31 = 0; | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
uv10 = uvs[idx + (even ? 2 : 4)]; uv11 = uvs[idx + (even ? 3 : 5)]; uv20 = uvs[idx + (even ? 4 : 6)]; uv21 = uvs[idx + (even ? 5 : 7)]; | uv10 = uvs[idx + 2]; uv11 = uvs[idx + 3]; uv20 = uvs[idx + 4]; uv21 = uvs[idx + 5]; uv30 = uvs[idx + 6]; uv31 = uvs[idx + 7]; | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
state.getUV().x = w * uv00 + u * uv10 + v * uv20; state.getUV().y = w * uv01 + u * uv11 + v * uv21; | state.getUV().x = k00 * uv00 + k10 * uv10 + k11 * uv20 + k01 * uv30; state.getUV().y = k00 * uv01 + k10 * uv11 + k11 * uv21 + k01 * uv31; | public void prepareShadingState(ShadingState state) { state.init(); Instance parent = state.getInstance(); int primID = state.getPrimitiveID() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
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() / 2; boolean even = (state.getPrimitiveID() & 1) == 0; float u = state.getU(); float v = state.getV(); float w = 1 - u - v; ... |
final int idx = absPath.lastIndexOf( separatorChar ); | final int idx = absPath.lastIndexOf( SEPARATOR_CHAR ); | public String getBaseName() { if ( baseName == null ) { final int idx = absPath.lastIndexOf( separatorChar ); if ( idx == -1 ) { baseName = absPath; } else { baseName = absPath.substring( idx + 1 ); ... |
jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); | jScrollPane1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); | private void initGUI() { setTitle("Sunflow v" + SunflowAPI.VERSION); setDefaultCloseOperation(EXIT_ON_CLOSE); { desktop = new JDesktopPane(); getContentPane().add(desktop, BorderLayout.CENTER); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); ... |
jScrollPane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); | jScrollPane2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); | private void initGUI() { setTitle("Sunflow v" + SunflowAPI.VERSION); setDefaultCloseOperation(EXIT_ON_CLOSE); { desktop = new JDesktopPane(); getContentPane().add(desktop, BorderLayout.CENTER); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); ... |
String bold_red = "\u001B[1;31m"; String normal = "\u001B[0m"; System.out.println(bold_red + "FATAL ERROR!!!" + normal); System.out.println ((char)27 + "[2J"); | public static void usage(boolean verbose) { System.out.println("Usage: SunflowGUI [options] scenefile"); if (verbose) { System.out.println("Sunflow v" + SunflowAPI.VERSION + " textmode"); System.out.println("Renders the specified scene file"); System.out.println("Optio... | |
PreparedStatement ps = prepareStatement(sql); | ps = prepareStatement(sql); | int executeStatement(final String sql) { try { PreparedStatement ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCou... |
releaseStatement(); | releaseStatement(ps); | int executeStatement(final String sql) { try { PreparedStatement ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCou... |
private void releaseStatement() { | private void releaseStatement(PreparedStatement ps) { | private void releaseStatement() { if (statementCache!=null) { statementCache.closeRemovedStatements(); } params.clear(); IOUtils.closeSilently(converter); //closing resources opened by converter } |
} else { JDBCUtils.closeSilent(ps); | private void releaseStatement() { if (statementCache!=null) { statementCache.closeRemovedStatements(); } params.clear(); IOUtils.closeSilently(converter); //closing resources opened by converter } | |
try { final URL url = new URL( name.getURI() ); return new UrlFileObject( this, name, url ); } catch ( MalformedURLException e ) { throw new FileSystemException( e ); } | return new UrlFileObject( this, name ); | protected FileObject createFile( final FileName name ) throws FileSystemException { try { final URL url = new URL( name.getURI() ); return new UrlFileObject( this, name, url ); } catch ( MalformedURLException e ) { throw new FileSystemException(... |
return new LocalFileSystem(rootName, rootName.getRootFile()); | return new LocalFileSystem(rootName, rootName.getRootFile(), fileSystemOptions); | protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Create the file system final LocalFileName rootName = (LocalFileName) name; return new LocalFileSystem(rootName, rootName.getRootFile()); } |
return Long.getLong(v.toString()); | return Long.decode(v.toString()); | public Number getNumberProperty(String name, Number defaultValue) throws ParseException { Object v = properties.get(name); if (v == null) { return defaultValue; } if (v instanceof Number) { return ((Number) v); } String s = v.toString(); if (s.l... |
} else if (args[i].equals("-quick_prims")) { if (i > args.length - 1) usage(false); shaderOverride = new PrimIDShader(); i++; | public static void main(String[] args) { if (args.length > 0) { boolean showFrame = true; String sampler = "bucket"; boolean noRender = false; String filename = null; String input = null; String accel = null; int i = 0; i... | |
System.out.println(" -quick_prims Renders using a unique color for each primitive"); | public static void usage(boolean verbose) { System.out.println("Usage: SunflowGUI [options] scenefile"); if (verbose) { System.out.println("Sunflow v" + SunflowAPI.VERSION + " textmode"); System.out.println("Renders the specified scene file"); System.out.println("Optio... | |
if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } else if (this.path.startsWith(ResourceLoader.CLASSPATH_URL_PREFIX))... | if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } else if (this.path.startsWith(ResourceLoader.CLASSPATH_URL_PREFIX))... | public URL getURL() throws IOException { URL url = null; if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } ... |
else { url = getResourceFromBundleClasspath(this.path); } if (url == null) { throw new FileNotFoundException(getDescription() + " cannot be resolved to URL because it does not exist"); } return url; } | if (url == null) { throw new FileNotFoundException(getDescription() + " cannot be resolved to URL because it does not exist"); } return url; } | public URL getURL() throws IOException { URL url = null; if (this.path.startsWith(BUNDLE_URL_PREFIX)) { url = getResourceFromBundle(this.path.substring(BUNDLE_URL_PREFIX.length())); } else if (this.path.startsWith(BUNDLE_URL_URL_PREFIX)) { url = new URL(this.path.substring(BUNDLE_URL_URL_PREFIX.length())); } ... |
if ( _finished ) | if ( finished ) | public void close() throws IOException { if ( _finished ) { return; } // Close the stream IOException exc = null; try { super.close(); } catch ( IOException e ) { ... |
_finished = true; | finished = true; | public void close() throws IOException { if ( _finished ) { return; } // Close the stream IOException exc = null; try { super.close(); } catch ( IOException e ) { ... |
if ( _finished ) | if ( finished ) | public int read() throws IOException { if ( _finished ) { return -1; } int ch = super.read(); if ( ch != -1 ) { return ch; } // End-of-stream close(); return -1; ... |
setComplexConcept(constructConceptTreePanel, nounConceptSet); | if (OptionDialog.isConstructComplexWordTree()) { setComplexConcept(constructConceptTreePanel, nounConceptSet); } | public void constructTree() { new Thread() { private void addComplexWordNode(int len, InputWordModel iwModel, TreeNode node) { if (len == iwModel.getComplexWordLength()) { return; } List wordList = iwModel.getWordList(); StringBu... |
DODDLE.STATUS_BAR.addValue(); setComplexConcept(constructPropertyTreePanel, verbIDSet); | DODDLE.STATUS_BAR.addValue(); if (OptionDialog.isConstructComplexWordTree()) { setComplexConcept(constructPropertyTreePanel, verbIDSet); } | public void constructTree() { new Thread() { private void addComplexWordNode(int len, InputWordModel iwModel, TreeNode node) { if (len == iwModel.getComplexWordLength()) { return; } List wordList = iwModel.getWordList(); StringBu... |
setComplexConcept(constructConceptTreePanel, nounConceptSet); | if (OptionDialog.isConstructComplexWordTree()) { setComplexConcept(constructConceptTreePanel, nounConceptSet); } | private TreeModel makeNounConceptTreeModel(Set nounConceptSet) { constructConceptTreePanel.init(); TreeModel nounTreeModel = constructConceptTreePanel.getTreeModel(nounConceptSet); constructConceptTreePanel.setTreeModel(nounTreeModel); ... |
setComplexConcept(constructPropertyTreePanel, verbIDSet); | if (OptionDialog.isConstructComplexWordTree()) { setComplexConcept(constructPropertyTreePanel, verbIDSet); } | private TreeModel makeVerbConceptTreeModel(Set verbIDSet) { constructPropertyTreePanel.init(); TreeModel propertyTreeModel = constructPropertyTreePanel.getTreeModel(constructConceptTreePanel .getAllConceptID(), verbIDSet); ... |
trimmedConceptNum = treeMaker.getTrimmedConceptNum(); DODDLE.getLogger().log(Level.INFO, "剪定プロパティ数: " + trimmedConceptNum); | public TreeModel getTreeModel(Set nounIDSet, Set verbIDSet) { Set<List<Concept>> pathSet = treeMaker.getPathList(verbIDSet); removeNounConceptPath(pathSet); // 移動と行為以外のパスを削除する TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, project); ConceptTreeNode rootNode = (Conce... | |
storable.setCreator(SecurityUtil.getLoggedUser()); | protected void fillStorable(Task storable){ if (storable.getBacklogItem() == null){ BacklogItem backlogItem = backlogItemDAO.get(backlogItemId); if (backlogItem == null){ super.addActionError(super.getText("backlogItem.notFound")); return; } storable.setBacklogItem(backlogItem); backlogItem.getTasks()... | |
for (int i = 0, lambda = 380; lambda < 781; i++, lambda += 10) { | for (int i = 0, lambda = 380; lambda <= 780; i++, lambda += 10) { | private SpectralCurve computeAttenuatedSunlight(float theta, float turbidity) { float[] data = new float[41]; // holds the sunsky curve data final double alpha = 1.3; final double lozone = 0.35; final double w = 2.0; double beta = 0.04608365822050 * turbidity - 0.04586025928522; ... |
updateUI(); | public void actionPerformed(ActionEvent e) { if (e.getSource() == analyzeMorphemeButton) { UpperConceptManager.makeUpperOntologyList(); wordInfoMap.clear(); ListModel listModel = inputDocList.getModel(); for (int i = 0; i < listModel.getSize(); i++) { ... | |
final FileObject file ) | final FileObject file ) throws FileSystemException | public DelegateFileObject( final FileName name, final AbstractFileSystem fileSystem, final FileObject file ) { super( name, fileSystem ); this.file = file; } |
if ( file != null ) { file.getFileSystem().addListener( file, this ); } | public DelegateFileObject( final FileName name, final AbstractFileSystem fileSystem, final FileObject file ) { super( name, fileSystem ); this.file = file; } | |
maybeTypeChanged( oldType ); | public void attachChild( final String baseName ) throws Exception { if ( children.add( baseName ) ) { childrenChanged(); } } | |
file.createFolder(); | ignoreEvent = true; try { file.createFolder(); } finally { ignoreEvent = false; } | protected void doCreateFolder() throws Exception { file.createFolder(); } |
file.delete(); | ignoreEvent = true; try { file.delete(); } finally { ignoreEvent = false; } | protected void doDelete() throws Exception { file.delete(); } |
protected FileType doGetType() throws Exception | protected FileType doGetType() throws FileSystemException | protected FileType doGetType() throws Exception { if ( file != null ) { if ( file.exists() ) { return file.getType(); } } else if ( children.size() > 0 ) { return FileType.FOLDER; } return null; } |
handleCreate( file.getType() ); | if ( !ignoreEvent ) { handleCreate( file.getType() ); } | public void fileCreated( final FileChangeEvent event ) throws Exception { handleCreate( file.getType() ); } |
handleDelete(); | if ( !ignoreEvent ) { handleDelete(); } | public void fileDeleted( final FileChangeEvent event ) throws Exception { handleDelete(); } |
statementCache.close(); statementCache=null; | if (statementCache!=null) { statementCache.close(); statementCache=null; } | public void close() { if (con != null) { try { con.close(); con = null; } catch (SQLException e) { throw new JDBCException("Unable to close a connection", e); } statementCache.close(); statementCache=null; ... |
if (child == null) { if (log.isDebugEnabled()) { log.debug(Messages.getString("vfs.provider.ftp/invalid-directory-entry.debug", new Object[] { new Integer(i), relPath })); } continue; } | private void doGetChildren() throws IOException { if (children != null) { return; } final FtpClient client = ftpFs.getClient(); try { String key = FtpFileSystemConfigBuilder.getInstance().getEntryParser(getFileSystem().getFileSystemOptions()); ... | |
deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } | public String edit(){ deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } sprint = sprintDAO.get(sprintId); if (sprint == null){ super.addActionError(super.getText("sprint.notFound")); return ... | |
deliverable = sprint.getDeliverable(); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } deliverableId = deliverable.getId(); | public String edit(){ deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } sprint = sprintDAO.get(sprintId); if (sprint == null){ super.addActionError(super.getText("sprint.notFound")); return ... | |
sprint = sprintDAO.get(sprintId); | fillable = sprintDAO.get(sprintId); | public String store(){ if (sprint == null){ super.addActionError(super.getText("sprint.missingForm")); return Action.INPUT; } deliverable = deliverableDAO.get(deliverableId); if (deliverable == null){ super.addActionError(super.getText("sprint.deliverableNotFound")); return Action.INPUT; } Sprint fil... |
list[i] = (String) resourceList.get(0); | list[i] = (String) resourceList.get(i); | protected String[] getApplicationContextLocations(Bundle bundle) { Dictionary manifestHeaders = bundle.getHeaders(); String contextLocationsHeader = (String) manifestHeaders.get(CONTEXT_LOCATION_HEADER); if (contextLocationsHeader != null) { String[] locs = StringUtils.tokenizeToStringArray(contextLocationsHeader... |
return state.diffuse(Color.WHITE); | Color lr = Color.black(); for (LightSample sample : state) lr.madd(sample.dot(state.getNormal()), sample.getDiffuseRadiance()); return lr.mul(1.0f / (float) Math.PI); | public Color getRadiance(ShadingState state) { state.faceforward(); state.initCausticSamples(); return state.diffuse(Color.WHITE); } |
public static void configure() { | public static void configure(Handler handler) { | public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... |
l.setLevel(Level.INFO); | l.setLevel(handler.getLevel()); | public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... |
final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuffer sb = new StringBuffer(); final Date d = new Date(); final Object args[] = new Object[3]; args[0] = d; h.setFormatter(new Formatter() { public synchronized String format(final LogRe... | l.addHandler(handler); | public static void configure() { final Logger l = Logger.getLogger("scriptella"); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}"); final StringBuff... |
evaluator.setExtendedType(query ? JaninoQuery.class : JaninoScript.class); | Class<?> type = query ? JaninoQuery.class : JaninoScript.class; evaluator.setExtendedType(type); | private Object compile(final Resource content, final boolean query) { Object ctx = objectCache.get(content); if (ctx == null) { ScriptEvaluator evaluator = new ScriptEvaluator(); //Exception are not required to be handled evaluator.setThrownExceptions(THROWN_EXCEPTIONS... |
evaluator.setMethodName("execute"); evaluator.setClassName(type.getName()+"_Generated"); | private Object compile(final Resource content, final boolean query) { Object ctx = objectCache.get(content); if (ctx == null) { ScriptEvaluator evaluator = new ScriptEvaluator(); //Exception are not required to be handled evaluator.setThrownExceptions(THROWN_EXCEPTIONS... | |
if (this.file.getType() != FileType.FOLDER) | if (!this.file.getType().hasChildren()) | private void check() { this.refresh(); try { // If the file existed and now doesn't if (this.exists && !this.file.exists()) { this.exists = this.file.exists(); this.timestamp = -1; ... |
if (this.file.getType() == FileType.FOLDER) | if (this.file.getType().hasChildren()) | private void checkForNewChildren() { try { if (this.file.getType() == FileType.FOLDER) { FileObject[] newChildren = this.file.getChildren(); if (this.children != null) { // ... |
if (child.getType() == FileType.FOLDER) | if (child.getType().hasChildren()) | private void fireAllCreate(FileObject child) { // Add listener so that it can be triggered if (this.fm.getFileListener() != null) { child.getFileSystem().addListener(child, this.fm.getFileListener()); } ((AbstractFileSystem) child.getF... |
if (this.file.getType() == FileType.FOLDER) | if (this.file.getType().hasChildren()) | private void resetChildrenList() { try { if (this.file.getType() == FileType.FOLDER) { this.children = new HashMap(); FileObject[] childrenList = this.file.getChildren(); for (int i = 0; i < child... |
final String knownHostsPath; | final File sshDir; | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... |
knownHostsPath = "C:\\cygwin\\home\\" + userName + "\\.ssh\\known_hosts"; | sshDir = new File("C:\\cygwin\\home\\" + userName + "\\.ssh" ); | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... |
knownHostsPath = System.getProperty( "user.home") + "/.ssh/known_hosts"; | sshDir = new File( System.getProperty( "user.home" ), ".ssh" ); | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... |
jSch.setKnownHosts( knownHostsPath ); | final File knownHostsFile = new File(sshDir, "known_hosts"); if ( knownHostsFile.isFile() && knownHostsFile.canRead() ) { jSch.setKnownHosts( knownHostsFile.getAbsolutePath() ); } final File privateKeyFile = new File( sshDir, "id_rsa" ); if ( privateKeyFile.isFile() && privateKeyFile.canRead() ) { try { jSch.addIdent... | public void init() throws FileSystemException { // Figure out where the known_hosts file is final String knownHostsPath; if ( Os.isFamily( Os.OS_FAMILY_WINDOWS ) ) { // TODO - this may not be true final String userName = System.getProperty( "user.name" ); ... |
final DelegateFileObject junctionFile = (DelegateFileObject)getFile( junctionName ); if ( junctionFile != null ) { junctionFile.setFile( targetFile ); } | public void addJunction( final String junctionPoint, final FileObject targetFile ) throws FileSystemException { final FileName junctionName = getRootName().resolveName( junctionPoint ); // Check for nested junction - these are not supported yet if ( getJunc... | |
throws FileSystemException | throws Exception | protected FileObject createFile( final FileName name ) throws FileSystemException { // Find the file that the name points to final FileName junctionPoint = getJunctionForFile( name ); final FileObject file; if ( junctionPoint != null ) { // Resolve the real fi... |
FileContentInputStream(final InputStream instr) | FileContentInputStream(final FileObject file, final InputStream instr) | FileContentInputStream(final InputStream instr) { super(instr); } |
this.file = file; | FileContentInputStream(final InputStream instr) { super(instr); } | |
FileContentOutputStream(final OutputStream outstr) | FileContentOutputStream(final FileObject file, final OutputStream outstr) | FileContentOutputStream(final OutputStream outstr) { super(outstr); } |
this.file = file; | FileContentOutputStream(final OutputStream outstr) { super(outstr); } | |
FileRandomAccessContent(final RandomAccessContent content) | FileRandomAccessContent(final FileObject file, final RandomAccessContent content) | FileRandomAccessContent(final RandomAccessContent content) { super(content); } |
this.file = file; | FileRandomAccessContent(final RandomAccessContent content) { super(content); } | |
final InputStream wrappedInstr = new FileContentInputStream(instr); | final InputStream wrappedInstr = new FileContentInputStream(file, instr); | public InputStream getInputStream() throws FileSystemException { /* if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the r... |
this.getThreadData().setRastr(new FileRandomAccessContent(rastr)); | this.getThreadData().setRastr(new FileRandomAccessContent(file, rastr)); | public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* if (getThreadData().getState() != STATE_NONE) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content ... |
if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) | FileObject scratchFolder = getWriteFolder(); if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class) || scratchFolder.getFileSystem() instanceof VirtualFileSystem) | public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
FileObject scratchFolder = getWriteFolder(); | public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | |
FileObject cachedFolder = fs.resolveFile(scratchFolder.getName().getURI()); | FileObject foBase2 = getBaseTestFolder(fs); FileObject cachedFolder = foBase2.resolveFile(scratchFolder.getName().getPath()); | public void testManualCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) | FileObject scratchFolder = getWriteFolder(); if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class) || scratchFolder.getFileSystem() instanceof VirtualFileSystem) | public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
FileObject scratchFolder = getWriteFolder(); | public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | |
FileObject cachedFolder = fs.resolveFile(scratchFolder.getName().getURI()); | FileObject foBase2 = getBaseTestFolder(fs); FileObject cachedFolder = foBase2.resolveFile(scratchFolder.getName().getPath()); | public void testOnCallCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) | FileObject scratchFolder = getWriteFolder(); if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class) || scratchFolder.getFileSystem() instanceof VirtualFileSystem) | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
FileObject scratchFolder = getWriteFolder(); | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... | |
FileObject cachedFolder = fs.resolveFile(scratchFolder.getName().getURI()); | FileObject foBase2 = getBaseTestFolder(fs); FileObject cachedFolder = foBase2.resolveFile(scratchFolder.getName().getPath()); | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
cachedFolder = fs.resolveFile(scratchFolder.getName().getURI()); | cachedFolder = foBase2.resolveFile(scratchFolder.getName().getPath()); | public void testOnResolveCache() throws Exception { if (FileObjectUtils.isInstanceOf(getBaseFolder(), RamFileObject.class)) { // cant check ram filesystem as every manager holds its own ram filesystem data return; } FileObject scratchFolder = getWriteFolder(); ... |
Test test = new Test(false); | new Test(false); | public static void main(String[] args) { try { Test test = new Test(false); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Ett fel i programmet har uppsttt. " + "Informationen om detta sparas i filen error.log.\n" + "Denna fil finns i katalogen dr programmet in... |
PreparedStatement ps = null; | StatementWrapper sw = null; | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... |
ps = prepareStatement(sql); | sw = connection.getStatementCache().prepare(sql, params, converter); int updateCount = -1; if (callback != null) { sw.query(callback, paramsCallback); } else { updateCount = sw.update(); } | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... |
LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } int updateCount = executeStatement(ps); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Statement executed successfully. Update count=" + updateCount); | LOG.fine(" Statement" + sql.trim() + (params.isEmpty() ? "" : ", Parameters: " + params) + " executed. " + (updateCount >= 0 ? "Update count=" + updateCount : "")); | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... |
releaseStatement(ps); | params.clear(); if (sw != null) { connection.getStatementCache().releaseStatement(sw); } | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Executing statement " + sql.trim() + ", Parameters: " + params); } ... |
|| ( baseLen > 1 && path.charAt( baseLen ) != separatorChar ) || path.indexOf( separatorChar, baseLen + 1 ) != -1 ) | || ( baseLen > 1 && path.charAt( baseLen ) != SEPARATOR_CHAR ) || path.indexOf( SEPARATOR_CHAR, baseLen + 1 ) != -1 ) | private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... |
|| ( baseLen > 1 && path.charAt( baseLen ) != separatorChar ) ) | || ( baseLen > 1 && path.charAt( baseLen ) != SEPARATOR_CHAR ) ) | private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... |
&& path.charAt( baseLen ) != separatorChar ) | && path.charAt( baseLen ) != SEPARATOR_CHAR ) | private boolean checkName( final String basePath, final String path, final NameScope scope ) { if ( scope == NameScope.FILE_SYSTEM ) { // All good return true; } if ( !path.startsWith( basePath ) ) ... |
if ( len == 0 || ( len == 1 && absPath.charAt( 0 ) == separatorChar ) ) | if ( len == 0 || ( len == 1 && absPath.charAt( 0 ) == SEPARATOR_CHAR ) ) | public int getDepth() { final int len = absPath.length(); if ( len == 0 || ( len == 1 && absPath.charAt( 0 ) == separatorChar ) ) { return 0; } int depth = 1; for ( int pos = 0; pos > -1 && pos < len; depth++ ) { pos = absPath.indexOf( separa... |
pos = absPath.indexOf( separatorChar, pos + 1 ); | pos = absPath.indexOf( SEPARATOR_CHAR, pos + 1 ); | public int getDepth() { final int len = absPath.length(); if ( len == 0 || ( len == 1 && absPath.charAt( 0 ) == separatorChar ) ) { return 0; } int depth = 1; for ( int pos = 0; pos > -1 && pos < len; depth++ ) { pos = absPath.indexOf( separa... |
final int idx = absPath.lastIndexOf( separatorChar ); | final int idx = absPath.lastIndexOf( SEPARATOR_CHAR ); | public FileName getParent() { final String parentPath; final int idx = absPath.lastIndexOf( separatorChar ); if ( idx == -1 || idx == absPath.length() - 1 ) { // No parent return null; } else if ( idx == 0 ) { // Root is the parent... |
parentPath = separator; | parentPath = SEPARATOR; | public FileName getParent() { final String parentPath; final int idx = absPath.lastIndexOf( separatorChar ); if ( idx == -1 || idx == absPath.length() - 1 ) { // No parent return null; } else if ( idx == 0 ) { // Root is the parent... |
else if ( pos == basePathLen && pos < pathLen && path.charAt( pos ) == separatorChar ) | else if ( pos == basePathLen && pos < pathLen && path.charAt( pos ) == SEPARATOR_CHAR ) | public String getRelativeName( final FileName name ) throws FileSystemException { final String path = name.getPath(); // Calculate the common prefix final int basePathLen = absPath.length(); final int pathLen = path.length(); // Deal with root if ( basePathLen == 1 && pa... |
if ( pathLen > 1 && ( pos < pathLen || absPath.charAt( pos ) != separatorChar ) ) | if ( pathLen > 1 && ( pos < pathLen || absPath.charAt( pos ) != SEPARATOR_CHAR ) ) | public String getRelativeName( final FileName name ) throws FileSystemException { final String path = name.getPath(); // Calculate the common prefix final int basePathLen = absPath.length(); final int pathLen = path.length(); // Deal with root if ( basePathLen == 1 && pa... |
pos = absPath.lastIndexOf( separatorChar, pos ); | pos = absPath.lastIndexOf( SEPARATOR_CHAR, pos ); | public String getRelativeName( final FileName name ) throws FileSystemException { final String path = name.getPath(); // Calculate the common prefix final int basePathLen = absPath.length(); final int pathLen = path.length(); // Deal with root if ( basePathLen == 1 && pa... |
pos = absPath.indexOf( separatorChar, pos + 1 ); | pos = absPath.indexOf( SEPARATOR_CHAR, pos + 1 ); | public String getRelativeName( final FileName name ) throws FileSystemException { final String path = name.getPath(); // Calculate the common prefix final int basePathLen = absPath.length(); final int pathLen = path.length(); // Deal with root if ( basePathLen == 1 && pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.