rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
event.notify(listener); | event.notify(fileListener); | private void fireEvent(final AbstractFileChangeEvent event) { synchronized (listenerMap) { final FileObject file = event.getFile(); final ArrayList listeners = (ArrayList) listenerMap.get(file.getName()); if (listeners != null) { final int ... |
new Thread() { public void run() { try { DODDLE.STATUS_BAR.setLastMessage(Translator.getString("StatusBar.Message.OpenProjectDone")); DODDLE.STATUS_BAR.startTime(); DODDLE.STATUS_BAR.initNormal(17); DODDLE.STATUS_BAR.lock(); DODDLEProject project = new DODDLEProject(openDir.getAbsolutePath(), DODDLE.projectMenu); DODD... | SwingWorker worker = new SwingWorker<String, String>() { public String doInBackground() { openProject(); return "done"; | public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(DODDLE.PROJECT_DIR); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval != JFileChooser.APPROVE_OPTION) { return; } openD... |
}.start(); | }; DODDLE.STATUS_BAR.setSwingWorker(worker); worker.execute(); | public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(DODDLE.PROJECT_DIR); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval != JFileChooser.APPROVE_OPTION) { return; } openD... |
Point3 v0p = getPoint(triangles[3 * tri + 0]); Point3 v1p = getPoint(triangles[3 * tri + 1]); Point3 v2p = getPoint(triangles[3 * tri + 2]); | int a, b, c; if (triangles == null) { a = tri3 + 0; b = tri3 + 1; c = tri3 + 2; } else { a = triangles[tri3 + 0]; b = triangles[tri3 + 1]; c = triangles[tri3 + 2]; } Point3 v0p = getPoint(a); Point3 v1p = getPoint(b); Point3 v2p = getPoint(c); | TriangleLight(int tri) { tri3 = 3 * tri; Point3 v0p = getPoint(triangles[3 * tri + 0]); Point3 v1p = getPoint(triangles[3 * tri + 1]); Point3 v2p = getPoint(triangles[3 * tri + 2]); ng = Vector3.cross(Point3.sub(v1p, v0p, new Vector3()), Point3.sub(v2p, v0p... |
int index0 = 3 * triangles[tri3 + 0]; int index1 = 3 * triangles[tri3 + 1]; int index2 = 3 * triangles[tri3 + 2]; | int a, b, c; if (triangles == null) { a = tri3 + 0; b = tri3 + 1; c = tri3 + 2; } else { a = triangles[tri3 + 0]; b = triangles[tri3 + 1]; c = triangles[tri3 + 2]; } int index0 = 3 * a; int index1 = 3 * b; int index2 = 3 * c; | 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 index0 = 3 * triang... |
int index0 = 3 * triangles[tri3 + 0]; int index1 = 3 * triangles[tri3 + 1]; int index2 = 3 * triangles[tri3 + 2]; | int a, b, c; if (triangles == null) { a = tri3 + 0; b = tri3 + 1; c = tri3 + 2; } else { a = triangles[tri3 + 0]; b = triangles[tri3 + 1]; c = triangles[tri3 + 2]; } int index0 = 3 * a; int index1 = 3 * b; int index2 = 3 * c; | 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; ... |
Point3 v0p = getPoint(triangles[tri3 + 0]); | int a, b, c; if (triangles == null) { a = tri3 + 0; b = tri3 + 1; c = tri3 + 2; } else { a = triangles[tri3 + 0]; b = triangles[tri3 + 1]; c = triangles[tri3 + 2]; } Point3 v0p = getPoint(a); | public boolean isVisible(ShadingState state) { Point3 p = state.getPoint(); Vector3 n = state.getNormal(); Vector3 sub = new Vector3(); Point3 v0p = getPoint(triangles[tri3 + 0]); Point3.sub(v0p, p, sub); if ((Vector3.dot(sub, n) > 0.0) || (Vecto... |
Point3 v1p = getPoint(triangles[tri3 + 1]); | Point3 v1p = getPoint(b); | public boolean isVisible(ShadingState state) { Point3 p = state.getPoint(); Vector3 n = state.getNormal(); Vector3 sub = new Vector3(); Point3 v0p = getPoint(triangles[tri3 + 0]); Point3.sub(v0p, p, sub); if ((Vector3.dot(sub, n) > 0.0) || (Vecto... |
Point3 v2p = getPoint(triangles[tri3 + 2]); | Point3 v2p = getPoint(c); | public boolean isVisible(ShadingState state) { Point3 p = state.getPoint(); Vector3 n = state.getNormal(); Vector3 sub = new Vector3(); Point3 v0p = getPoint(triangles[tri3 + 0]); Point3.sub(v0p, p, sub); if ((Vector3.dot(sub, n) > 0.0) || (Vecto... |
if (LOG.isLoggable(Level.FINE)) { LOG.fine(" Statement executed successfully. Update count="+updateCount); } | int executeStatement(final String sql) { PreparedStatement ps = null; try { ps = prepareStatement(sql); int updateCount = executeStatement(ps); executedCount++; return updateCount; } catch (SQLException e) { ... | |
Shader s = api.shader("ra3shader"); | Shader s = api.lookupShader("ra3shader"); | public boolean parse(String filename, SunflowAPI api) { try { UI.printInfo("[RA3] Reading geometry: \"%s\" ...", filename); File file = new File(filename); FileInputStream stream = new FileInputStream(filename); MappedByteBuffer map = stream.getChannel().map(FileCh... |
rows.clear(); | protected void tearDown() throws Exception { for (Connection connection : connections) { JdbcUtils.closeSilent(connection); } } | |
type = FileType.FILE; this.entry = entry; | setZipEntry( entry ); | public ZipFileObject( FileName name, ZipEntry entry, ZipFile zipFile, ZipFileSystem fs ) { super( name, fs ); type = FileType.FILE; this.entry = entry; file = zipFile; } |
if ( file == null ) { type = null; } | public ZipFileObject( FileName name, ZipEntry entry, ZipFile zipFile, ZipFileSystem fs ) { super( name, fs ); type = FileType.FILE; this.entry = entry; file = zipFile; } | |
assertEquals("SQL $v1 ?v2 /*+ HINT */ \n '$v3' ?v4",tok.nextStatement().toString()); assertEquals(Arrays.asList(new Integer[] {4,8,27,32}),tok.getInjections()); | assertEquals("SQL $v1 ?v2 /*+ HINT */ \n'$v3' ?v4",tok.nextStatement().toString()); assertEquals(Arrays.asList(new Integer[] {4,8,26,31}),tok.getInjections()); | public void testOracleHint() throws IOException { String original = "SQL /*+ HINT */ --NOTAHINT \n\r /* +NOTAHINT*/"; SqlTokenizer tok = new SqlTokenizer(new StringReader(original)); assertEquals("SQL /*+ HINT */ \n ",tok.nextStatement().toString()); assertNull(tok.nextStatement()); ... |
assertEquals(Arrays.asList(new Integer[] {4,8,41,61}),tok.getInjections()); | assertEquals(Arrays.asList(new Integer[] {4,8,40,60}),tok.getInjections()); | public void testOracleHint() throws IOException { String original = "SQL /*+ HINT */ --NOTAHINT \n\r /* +NOTAHINT*/"; SqlTokenizer tok = new SqlTokenizer(new StringReader(original)); assertEquals("SQL /*+ HINT */ \n ",tok.nextStatement().toString()); assertNull(tok.nextStatement()); ... |
if (platformName.contains(FELIX_PLATFORM)) return new FelixPlatform(); if (platformName.contains(KNOPFLERFISH_PLATFORM)) | if (platformName.contains(FELIX_PLATFORM)) { log.info("Creating Felix Platform"); return new FelixPlatform(); } if (platformName.contains(KNOPFLERFISH_PLATFORM)) { log.info("Creating Knopflerfish Platform"); | protected OsgiPlatform createPlatform() { String platformName = getPlatformName(); if (platformName != null) { platformName = platformName.toLowerCase(); if (platformName.contains(FELIX_PLATFORM)) return new FelixPlatform(); if (platformName.contains(KNOPFLERFISH_PLATFORM)) return new KnopflerfishPlatfor... |
} | } } | protected OsgiPlatform createPlatform() { String platformName = getPlatformName(); if (platformName != null) { platformName = platformName.toLowerCase(); if (platformName.contains(FELIX_PLATFORM)) return new FelixPlatform(); if (platformName.contains(KNOPFLERFISH_PLATFORM)) return new KnopflerfishPlatfor... |
log.info("Creating Equinox Platform"); | protected OsgiPlatform createPlatform() { String platformName = getPlatformName(); if (platformName != null) { platformName = platformName.toLowerCase(); if (platformName.contains(FELIX_PLATFORM)) return new FelixPlatform(); if (platformName.contains(KNOPFLERFISH_PLATFORM)) return new KnopflerfishPlatfor... | |
for (int i = 0; i < undefinedWordListModel.getSize(); i++) { String word = (String) undefinedWordListModel.getElementAt(i); if (word.equals(addWord)) { return; } | if (0 < addWord.length()) { for (int i = 0; i < undefinedWordListModel.getSize(); i++) { String word = (String) undefinedWordListModel.getElementAt(i); if (word.equals(addWord)) { return; } } ((DefaultListModel) undefinedWordListModel).addElement(addWord); if (getViewModel() != null && addWord.matches(getSearchRegex())... | public void actionPerformed(ActionEvent e) { if (e.getSource() == searchField || e.getSource() == searchButton) { String searchRegex = searchField.getText(); if (searchRegex.length() == 0) { undefinedWordJList.setModel(undefinedWordListModel); } else { ... |
((DefaultListModel) undefinedWordListModel).addElement(addWord); if (getViewModel() != null && addWord.matches(getSearchRegex())) { getViewModel().addElement(addWord); } setTitleWithSize(); | public void actionPerformed(ActionEvent e) { if (e.getSource() == searchField || e.getSource() == searchButton) { String searchRegex = searchField.getText(); if (searchRegex.length() == 0) { undefinedWordJList.setModel(undefinedWordListModel); } else { ... | |
System.out.println("found local maven artifact " + path + " for " + artifactId + "|" + version); return path; | if (log.isDebugEnabled()) { log.debug("found local maven artifact " + path + " for " + artifactId + "|" + version); } return path; | protected String localMavenBuildArtifact(String artifactId, String version) { try { File found = new MavenPackagedArtifactFinder(artifactId, version).findPackagedArtifact(new File(".")); String path = found.toURL().toExternalForm(); System.out.println("found local maven artifact " + path + " for " + artifactId ... |
InputWordModel iwModel = setInputWord(word, project); | InputWordModel iwModel = project.getDisambiguationPanel().makeInputWordModel(word, wordConceptSetMap); | public void initDataWithDB(Set<String> iwSet, DODDLEProject p) { project = p; wordSet = iwSet; inputWordModelSet = new TreeSet<InputWordModel>(); undefinedWordSet = new TreeSet<String>(); wordConceptSetMap = new HashMap<String, Set<Concept>>(); TransactionRunner runner = ne... |
System.out.println(inputWordModelSet.size()); | public void initDataWithDB(Set<String> iwSet, DODDLEProject p) { project = p; wordSet = iwSet; inputWordModelSet = new TreeSet<InputWordModel>(); undefinedWordSet = new TreeSet<String>(); wordConceptSetMap = new HashMap<String, Set<Concept>>(); TransactionRunner runner = ne... | |
InputWordModel iwModel = setInputWord(word, project); | InputWordModel iwModel = project.getDisambiguationPanel().makeInputWordModel(word, wordConceptSetMap); | public void doWork() throws Exception { DODDLE.STATUS_BAR.startTime(); DODDLE.STATUS_BAR.initNormal(wordSet.size()); Set<String> matchedWordSet = new HashSet<String>(); for (String word : wordSet) { InputW... |
System.out.println(inputWordModelSet.size()); | public void doWork() throws Exception { DODDLE.STATUS_BAR.startTime(); DODDLE.STATUS_BAR.initNormal(wordSet.size()); Set<String> matchedWordSet = new HashSet<String>(); for (String word : wordSet) { InputW... | |
runner.setProperties(System.getProperties()); | runner.setProperties((Map)System.getProperties()); | 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("Execu... |
public void loadOption(File file) { | public void loadOption(File file, DisambiguationPanel disambiguationPanel) { | public void loadOption(File file) { if (!file.exists()) { return; } try { InputStream is = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "SJIS")); String option = reader.readLine(); String[] ambiguityOptions ... |
trimInternalComplexWordConceptBox.setSelected(option.equals("Trim Internal Complex Word Concept Node")); | String[] perfectMatchedConstructionOption = option.split(","); if (perfectMatchedConstructionOption.length == 2) { PerfectMatchedOptionPanel perfectMatchedOptionPanel = disambiguationPanel .getPerfectMatchedOptionPanel(); perfectMatchedOptionPanel.setConstruction(perfectMatchedConstructionOption[0].equals("true")); per... | public void loadOption(File file) { if (!file.exists()) { return; } try { InputStream is = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "SJIS")); String option = reader.readLine(); String[] ambiguityOptions ... |
addAbstractInternalComplexWordConceptBox.setSelected(option .equals("Add Abstract Internal Complex Word Concept")); } option = reader.readLine(); if (option != null) { constructComplexWordTreeBox.setSelected(option.equals("Construct Complex Word Tree")); | String[] partialMatchedConstructionOption = option.split(","); if (partialMatchedConstructionOption.length == 3) { PartialMatchedOptionPanel partialMatchedOptionPanel = disambiguationPanel .getPartialMatchedOptionPanel(); partialMatchedOptionPanel.setConstruction(partialMatchedConstructionOption[0].equals("true")); par... | public void loadOption(File file) { if (!file.exists()) { return; } try { InputStream is = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "SJIS")); String option = reader.readLine(); String[] ambiguityOptions ... |
public void saveOption(File file) { | public void saveOption(File file, DisambiguationPanel disambiguationPanel) { | public void saveOption(File file) { try { OutputStream os = new FileOutputStream(file); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "SJIS")); StringBuffer buf = new StringBuffer(); buf.append(ambiguitySiblingCheckBox.isSelected() + ","); ... |
if (trimInternalComplexWordConceptBox.isSelected()) { buf.append("Trim Internal Complex Word Concept Node\n"); } else { buf.append("Keep Internal Complex Word Concept Node\n"); } if (addAbstractInternalComplexWordConceptBox.isSelected()) { buf.append("Add Abstract Internal Complex Word Concept\n"); } if (constructCompl... | PerfectMatchedOptionPanel perfectMatchedOptionPanel = disambiguationPanel.getPerfectMatchedOptionPanel(); buf.append(perfectMatchedOptionPanel.isConstruction() + ","); buf.append(perfectMatchedOptionPanel.isTrimming() + "\n"); PartialMatchedOptionPanel partialMatchedOptionPanel = disambiguationPanel.getPartialMatchedO... | public void saveOption(File file) { try { OutputStream os = new FileOutputStream(file); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "SJIS")); StringBuffer buf = new StringBuffer(); buf.append(ambiguitySiblingCheckBox.isSelected() + ","); ... |
AFTime time = (AFTime)value; | if(value == null) return null; AFTime time = (AFTime)value; | public Object deepCopy(Object value) { AFTime time = (AFTime)value; return new AFTime(time.getTime()); } |
PropertiesSubstitutor ps = new PropertiesSubstitutor(new ParametersCallback() { public Object getParameter(final String name) { return name; } }); | PropertiesSubstitutor ps = new PropertiesSubstitutor(MockParametersCallbacks.NAME); | public void test() { PropertiesSubstitutor ps = new PropertiesSubstitutor(new ParametersCallback() { public Object getParameter(final String name) { return name; } }); char [] fillC = new char[1000]; Arrays.fill(fillC,'-'); String fill = new St... |
DODDLE.STATUS_BAR.initNormal(16); | DODDLE.STATUS_BAR.initNormal(17); | public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(DODDLE.PROJECT_DIR); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval != JFileChooser.APPROVE_OPTION) { return; } openD... |
DODDLE.STATUS_BAR.addProjectValue(); ontSelectionPanel.loadOntologyInfo(new File(openDir, "OntologyInfo.txt")); | public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(DODDLE.PROJECT_DIR); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval != JFileChooser.APPROVE_OPTION) { return; } openD... | |
DODDLE.STATUS_BAR.initNormal(16); | DODDLE.STATUS_BAR.initNormal(17); | public void run() { try { DODDLE.STATUS_BAR.setLastMessage("プロジェクト復元完了"); DODDLE.STATUS_BAR.startTime(); DODDLE.STATUS_BAR.initNormal(16); DODDLE.STATUS_BAR.lock(); DODDLEProject project = new DODDL... |
DODDLE.STATUS_BAR.addProjectValue(); ontSelectionPanel.loadOntologyInfo(new File(openDir, "OntologyInfo.txt")); | public void run() { try { DODDLE.STATUS_BAR.setLastMessage("プロジェクト復元完了"); DODDLE.STATUS_BAR.startTime(); DODDLE.STATUS_BAR.initNormal(16); DODDLE.STATUS_BAR.lock(); DODDLEProject project = new DODDL... | |
assertEquals(e.getCause().getCause().getClass(), NumberFormatException.class); | assertEquals(((InvocationTargetException) e.getCause()).getTargetException().getClass(), NumberFormatException.class); | public void testDelegatingBad() throws Throwable { FileSystemOptions opts = new FileSystemOptions(); DelegatingFileSystemOptionsBuilder delgate = new DelegatingFileSystemOptionsBuilder(fsm); try { delgate.setConfigString(opts, "http", "proxyPort", "wrong_port"); ... |
final String message = REZ.getString( "delete-temp.warn", file.getName() ); getLogger().warn( message, e ); | getLogger().warn( "vfs.impl/delete-temp.warn", e ); | public void close() { // Delete the temporary files while ( copies.size() > 0 ) { final FileObject file = (FileObject)copies.remove( 0 ); try { file.delete( FileConstants.SELECT_ALL ); } catch ( final FileSystemException e... |
caps.add( Capability.LAST_MODIFIED ); | caps.add( Capability.GET_LAST_MODIFIED ); caps.add( Capability.SET_LAST_MODIFIED ); | protected void addCapabilities( final Collection caps ) { caps.add( Capability.CREATE ); caps.add( Capability.DELETE ); caps.add( Capability.GET_TYPE ); caps.add( Capability.LAST_MODIFIED ); caps.add( Capability.LIST_CHILDREN ); caps.add( Capability.READ_CONTENT ); ... |
ontSelectionPanel.saveOntologyInfo(new File(saveDir, "OntologyInfo.txt")); | public void saveProject(File saveDir, DODDLEProject currentProject) { DisambiguationPanel disambiguationPanel = currentProject.getDisambiguationPanel(); DocumentSelectionPanel docSelectionPanel = currentProject.getDocumentSelectionPanel(); InputWordSelectionPanel inputWordSelectionPanel = curre... | |
return m_manager.convert( testDir ); | return getManager().convert( testDir ); | protected FileObject getBaseFolder() throws Exception { final File testDir = getTestResource( "basedir" ); final File emptyDir = new File( testDir, "emptydir" ); emptyDir.mkdirs(); return m_manager.convert( testDir ); } |
return m_manager.convert( testDir ); | return getManager().convert( testDir ); | protected FileObject getWriteFolder() throws Exception { final File testDir = getTestDirectory( "write-tests" ); return m_manager.convert( testDir ); } |
FileObject absFile = m_manager.resolveFile( fileName ); | FileObject absFile = getManager().resolveFile( fileName ); | public void testAbsoluteFileName() throws Exception { // Locate file by absolute file name String fileName = new File( "testdir" ).getAbsolutePath(); FileObject absFile = m_manager.resolveFile( fileName ); // Locate file by URI String uri = "file://" + fileName.replace( File.se... |
FileObject uriFile = m_manager.resolveFile( uri ); | FileObject uriFile = getManager().resolveFile( uri ); | public void testAbsoluteFileName() throws Exception { // Locate file by absolute file name String fileName = new File( "testdir" ).getAbsolutePath(); FileObject absFile = m_manager.resolveFile( fileName ); // Locate file by URI String uri = "file://" + fileName.replace( File.se... |
protected URL createURL(final FileName name) throws MalformedURLException | protected URL createURL(final FileName name) throws MalformedURLException, FileSystemException, URIException | protected URL createURL(final FileName name) throws MalformedURLException { return new URL(getName().getURI()); } |
if (name instanceof URLFileName) { URLFileName urlName = (URLFileName) getName(); return new URL(urlName.getURIEncoded(null)); } | protected URL createURL(final FileName name) throws MalformedURLException { return new URL(getName().getURI()); } | |
X *= 1e-9f * WAVELENGTH_STEP; Y *= 1e-9f * WAVELENGTH_STEP; Z *= 1e-9f * WAVELENGTH_STEP; | public final XYZColor toXYZ() { float X = 0, Y = 0, Z = 0; for (int i = 0, w = WAVELENGTH_MIN; i < CIE_xbar.length; i++, w += WAVELENGTH_STEP) { float s = sample(w); X += s * CIE_xbar[i]; Y += s * CIE_ybar[i]; Z += s * CIE_zbar[i]; } return new... | |
JaninoConnection c = new JaninoConnection(); | JaninoConnection c = new JaninoConnection(MockConnectionParameters.NULL); | public void testQuery() { JaninoConnection c = new JaninoConnection(); final int[] r = new int[] {0}; Resource queryContent = JaninoConnectionTest.asResource( "for (int i=0;i<1000000;i++) {" + "set(\"p\", \"value\"+i );" + "next();" + ... |
JaninoConnection c = new JaninoConnection(); | JaninoConnection c = new JaninoConnection(MockConnectionParameters.NULL); | public void testScript() { JaninoConnection c = new JaninoConnection(); ParametersCallback pc = new ParametersCallback() { public final Object getParameter(final String name) { return name; } }; Resource scriptContent = JaninoConnectionTest.asResource... |
super.close(); | public void close() throws FileSystemException { if (file != null) { file.close(); } } | |
localMavenArtifact("org.springframework.osgi", "commons-collections.osgi", "3.2-SNAPSHOT"), localMavenArtifact("org.knopflerfish.bundles", "commons-logging_all", "2.0.0"), | localMavenArtifact("org.springframework.osgi", "commons-collections.osgi", "3.2-SNAPSHOT"), | protected String[] getBundleLocations() { return new String[]{ localMavenArtifact("org.springframework.osgi", "aopalliance.osgi", "1.0-SNAPSHOT"), localMavenArtifact("org.springframework.osgi", "commons-collections.osgi", "3.2-SNAPSHOT"), localMavenArtifact("org.knopflerfish.... |
public TreeModel getDefaultConceptTreeModel(Set pathSet, DODDLEProject project) { Concept rootConcept = new VerbConcept(ConceptTreeMaker.DODDLE_CLASS_ROOT_ID, "名詞的概念"); rootConcept.addEnWord("Root Class"); rootConcept.setPrefix(DODDLE.BASE_PREFIX); | public TreeModel getDefaultConceptTreeModel(Set pathSet, DODDLEProject project, String type) { Concept rootConcept = null; if (type.equals(ConceptTreeMaker.DODDLE_CLASS_ROOT_ID)) { rootConcept = new VerbConcept(ConceptTreeMaker.DODDLE_CLASS_ROOT_ID, "名詞的概念"); rootConcept.addEnWord("Root Class"); rootConcept.setPrefix(D... | public TreeModel getDefaultConceptTreeModel(Set pathSet, DODDLEProject project) { Concept rootConcept = new VerbConcept(ConceptTreeMaker.DODDLE_CLASS_ROOT_ID, "名詞的概念"); rootConcept.addEnWord("Root Class"); rootConcept.setPrefix(DODDLE.BASE_PREFIX); ConceptTreeNode rootNode = new ConceptT... |
public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project); | public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project, String type) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project, type); | public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project); beforeTrimmingConceptNum = Utils.getAllConcept(treeModel).size(); ConceptTreeNode rootNode = (ConceptTreeNode) treeModel.getRoot(); trimmedConcep... |
trimTree(rootNode); removeSameNode(rootNode); conceptDriftManagement(treeModel); | if (project.getDisambiguationPanel().getPerfectMatchedOptionPanel().isTrimming()) { trimTree(rootNode); removeSameNode(rootNode); conceptDriftManagement(treeModel); } | public TreeModel getTrimmedTreeModel(Set pathSet, DODDLEProject project) { TreeModel treeModel = getDefaultConceptTreeModel(pathSet, project); beforeTrimmingConceptNum = Utils.getAllConcept(treeModel).size(); ConceptTreeNode rootNode = (ConceptTreeNode) treeModel.getRoot(); trimmedConcep... |
return contextFactory.createApplicationContextWithBundleContext(parent, context, | return contextFactory.createApplicationContextWithBundleContext(context, | public Object getObject() throws Exception { return contextFactory.createApplicationContextWithBundleContext(parent, context, new String[]{configLocation.getURL().toString()}, ContextLoaderListener.plugins(), false); } |
toolBar.add(showPrefixCheckBox); | public ConceptTreePanel(String title, UndefinedWordListPanel panel, DODDLEProject p) { project = p; undefinedWordListPanel = panel; abstractLabelSet = new HashSet<String>(); idConceptMap = new HashMap<String, Concept>(); conceptSameConceptTreeNodeMap = new HashMap<Concept, Set<Con... | |
new Thread() { public void run() { | SwingWorker<String, String> worker = new SwingWorker<String, String>() { public String doInBackground() { | public void doDisAmbiguation() { new Thread() { public void run() { setWordEvalConceptSetMap(getInputWordModelSet()); } }.start(); } |
}.start(); | }; DODDLE.STATUS_BAR.setSwingWorker(worker); worker.execute(); | public void doDisAmbiguation() { new Thread() { public void run() { setWordEvalConceptSetMap(getInputWordModelSet()); } }.start(); } |
int n = ((Integer)classMap.get(klass)).intValue(); classMap.put(klass, new Integer(n--)); | if (classMap.containsKey(klass)) { int n = ((Integer)classMap.get(klass)).intValue(); classMap.put(klass, new Integer(n--)); } | private void removeFromKlass(String klass) { int n = ((Integer)classMap.get(klass)).intValue(); classMap.put(klass, new Integer(n--)); } |
return new HashSet<String>(JdbcUtils.getColumn( | return new HashSet<String>(getColumn( | private static Set<String> getTableColumns(Connection con, ConnectionParameters params, final String tableName) { try { return new HashSet<String>(JdbcUtils.getColumn( con.getMetaData() .getColumns(params.getCatalog(), params.getSchema(), tableName, nu... |
return JdbcUtils.getColumn(con.getMetaData() | return getColumn(con.getMetaData() | private static List<String> getTables(Connection con, ConnectionParameters params) { try { return JdbcUtils.getColumn(con.getMetaData() .getTables(con.getCatalog(), params.getSchema(), null, new String[]{"TABLE"}), 3); } catch (SQLException e) { ... |
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()); // get local point Point3 p = parent.transformWorldToObject(state.getPoint()); // compute local normal float deriv = p.x * p.x + p.y *... |
Instance parent = (Instance) state.getObject(); | public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); state.getRay().getPoint(state.getPoint()); // get local point Point3 p = parent.transformWorldToObject(state.getPoint()); // compute local normal float deriv = p.x * p.x + p.y *... | |
ConsoleProgressIndicator indicator = new ConsoleProgressIndicator("Scripts execution"); | ConsoleProgressIndicator indicator = new ConsoleProgressIndicator("Execution Progress"); | 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... |
public SftpOutputStream( final File file ) throws IOException | public SftpOutputStream( final ChannelSftp channel ) | public SftpOutputStream( final File file ) throws IOException { super( new FileOutputStream( file ) ); this.file = file; } |
super( new FileOutputStream( file ) ); this.file = file; | super( new ByteArrayOutputStream() ); this.channel = channel; | public SftpOutputStream( final File file ) throws IOException { super( new FileOutputStream( file ) ); this.file = file; } |
putContent( file ); | try { final ByteArrayOutputStream outstr = (ByteArrayOutputStream)out; channel.put( new ByteArrayInputStream( outstr.toByteArray() ), getName().getPath() ); } catch ( final SftpException e ) { throw new FileSystemException( e ); } finally { fileSystem.putChannel( channel ); } | protected void onClose() throws IOException { // TODO - need to delete the file putContent( file ); } |
final SftpFileSystem fileSystem, final TemporaryFileStore tempFileStore ) | final SftpFileSystem fileSystem ) | public SftpFileObject( final FileName name, final SftpFileSystem fileSystem, final TemporaryFileStore tempFileStore ) { super( name, fileSystem ); this.fileSystem = fileSystem; this.tempFileStore = tempFileStore; } |
this.tempFileStore = tempFileStore; | public SftpFileObject( final FileName name, final SftpFileSystem fileSystem, final TemporaryFileStore tempFileStore ) { super( name, fileSystem ); this.fileSystem = fileSystem; this.tempFileStore = tempFileStore; } | |
final boolean ok = channel.mkdir( getName().getPath() ); if ( !ok ) { throw new FileSystemException( "vfs.provider.sftp/create-folder.error" ); } | channel.mkdir( getName().getPath() ); | protected void doCreateFolder() throws Exception { final ChannelSftp channel = fileSystem.getChannel(); try { final boolean ok = channel.mkdir( getName().getPath() ); if ( !ok ) { throw new FileSystemException( "vfs.provider.sftp/create-folder.... |
final boolean ok; | protected void doDelete() throws Exception { final ChannelSftp channel = fileSystem.getChannel(); try { final boolean ok; if ( getType() == FileType.FILE ) { ok = channel.rm( getName().getPath() ); } else { ... | |
ok = channel.rm( getName().getPath() ); | channel.rm( getName().getPath() ); | protected void doDelete() throws Exception { final ChannelSftp channel = fileSystem.getChannel(); try { final boolean ok; if ( getType() == FileType.FILE ) { ok = channel.rm( getName().getPath() ); } else { ... |
ok = channel.rmdir( getName().getPath() ); } if ( !ok ) { throw new FileSystemException( "vfs.provider.sftp/delete.error" ); | channel.rmdir( getName().getPath() ); | protected void doDelete() throws Exception { final ChannelSftp channel = fileSystem.getChannel(); try { final boolean ok; if ( getType() == FileType.FILE ) { ok = channel.rm( getName().getPath() ); } else { ... |
final File file = tempFileStore.allocateFile( getName().getBaseName() ); final boolean ok = channel.get( getName().getPath(), '/' + file.getAbsolutePath() ); if ( !ok ) { throw new FileSystemException( "vfs.provider.sftp/get-file.error" ); } return new FileInputStream( file ); | final ByteArrayOutputStream outstr = new ByteArrayOutputStream(); channel.get( getName().getPath(), outstr ); outstr.close(); return new ByteArrayInputStream( outstr.toByteArray() ); | protected InputStream doGetInputStream() throws Exception { final ChannelSftp channel = fileSystem.getChannel(); try { // TODO - this is a dud, need to add stream based methods to Jsch // TODO - reuse the cached file // TODO - delete the file on end-of-stream... |
final File file = tempFileStore.allocateFile( getName().getBaseName() ); return new SftpOutputStream( file ); | final ChannelSftp channel = fileSystem.getChannel(); return new SftpOutputStream( channel ); | protected OutputStream doGetOutputStream() throws Exception { // TODO - this is a dud, need to add stream based methods to Jsch // TODO - reuse the same file for all content operations final File file = tempFileStore.allocateFile( getName().getBaseName() ); return new SftpOutputStream... |
catch ( final SftpException e ) { attrs = null; } | private void statSelf() throws Exception { final ChannelSftp channel = fileSystem.getChannel(); try { attrs = channel.stat( getName().getPath() ); } finally { fileSystem.putChannel( channel ); } } | |
url = new URL(getName().getURI()); | url = createURL(getName()); | protected void doAttach() throws Exception { if (url == null) { url = new URL(getName().getURI()); } } |
= "(&(objectClass=org.springframework.osgi.service.OsgiServiceProxyFactoryBeanTest.MyServiceInterface)(org.springframework.osgi.beanname=myBean))"; | = "(&(objectClass=org.springframework.osgi.service.OsgiServiceProxyFactoryBeanTest$MyServiceInterface)(org.springframework.osgi.beanname=myBean))"; | public void testClientClassloader() throws Exception { this.serviceFactoryBean.setBundleContext(this.bundleContext); this.serviceFactoryBean.setInterface(MyServiceInterface.class); this.serviceFactoryBean.setBeanName("myBean"); this.serviceFactoryBean.setContextClassloader("client"); String fullFilter = "(&(obj... |
this.bundleContext.getServiceReferences(MyServiceInterface.class.getCanonicalName(), fullFilter); | this.bundleContext.getServiceReferences(MyServiceInterface.class.getName(), fullFilter); | public void testClientClassloader() throws Exception { this.serviceFactoryBean.setBundleContext(this.bundleContext); this.serviceFactoryBean.setInterface(MyServiceInterface.class); this.serviceFactoryBean.setBeanName("myBean"); this.serviceFactoryBean.setContextClassloader("client"); String fullFilter = "(&(obj... |
= "(&(beanName=myBean)(objectClass=org.springframework.osgi.service.OsgiServiceProxyFactoryBeanTest.MyServiceInterface))"; | = "(&(beanName=myBean)(objectClass=org.springframework.osgi.service.OsgiServiceProxyFactoryBeanTest$MyServiceInterface))"; | public void testGetObjectWithFilterOnly() throws Exception { // OsgiServiceUtils are tested independently in error cases, here we // test the // correct behaviour of the ProxyFactoryBean when OsgiServiceUtils // succesfully // finds the service. this.serviceFactoryBean.setBundleContext(this.bundleContext); this... |
this.bundleContext.getServiceReferences(MyServiceInterface.class.getCanonicalName(), fullFilter); | this.bundleContext.getServiceReferences(MyServiceInterface.class.getName(), fullFilter); | public void testGetObjectWithFilterOnly() throws Exception { // OsgiServiceUtils are tested independently in error cases, here we // test the // correct behaviour of the ProxyFactoryBean when OsgiServiceUtils // succesfully // finds the service. this.serviceFactoryBean.setBundleContext(this.bundleContext); this... |
= "(&(objectClass=org.springframework.osgi.service.OsgiServiceProxyFactoryBeanTest.MyServiceInterface)(org.springframework.osgi.beanname=myBean))"; | = "(&(objectClass=org.springframework.osgi.service.OsgiServiceProxyFactoryBeanTest$MyServiceInterface)(org.springframework.osgi.beanname=myBean))"; | public void testServerClassloader() throws Exception { this.serviceFactoryBean.setBundleContext(this.bundleContext); this.serviceFactoryBean.setInterface(MyServiceInterface.class); this.serviceFactoryBean.setBeanName("myBean"); this.serviceFactoryBean.setContextClassloader("service-provider"); String fullFilter ... |
this.bundleContext.getServiceReferences(MyServiceInterface.class.getCanonicalName(), fullFilter); | this.bundleContext.getServiceReferences(MyServiceInterface.class.getName(), fullFilter); | public void testServerClassloader() throws Exception { this.serviceFactoryBean.setBundleContext(this.bundleContext); this.serviceFactoryBean.setInterface(MyServiceInterface.class); this.serviceFactoryBean.setBeanName("myBean"); this.serviceFactoryBean.setContextClassloader("service-provider"); String fullFilter ... |
if (StringUtils.isDecimalInt(name)) { | String str = name; if (str != null && str.startsWith(COLUMN_PREFIX)) { str = name.substring(COLUMN_PREFIX.length()); } if (StringUtils.isDecimalInt(str)) { | public Object getParameter(final String name) { if (StringUtils.isDecimalInt(name)) { try { int ind = Integer.parseInt(name); if (ind >= 0 && ind <= result.groupCount()) { return result.group(ind); } } catch (NumberFormatEx... |
int ind = Integer.parseInt(name); | int ind = Integer.parseInt(str); | public Object getParameter(final String name) { if (StringUtils.isDecimalInt(name)) { try { int ind = Integer.parseInt(name); if (ind >= 0 && ind <= result.groupCount()) { return result.group(ind); } } catch (NumberFormatEx... |
if (args[i].equalsIgnoreCase("-sp")) { | if (args[i].equalsIgnoreCase("-progress")) { | public static void main(final String args[]) { boolean failed = false; List<File> files = new ArrayList<File>(); ConsoleProgressIndicator indicator = null; for (int i = 0; i < args.length; i++) { if (args[i].startsWith("-h")) { printUsage(); retur... |
System.out.println(" -sp show execution progress"); | System.out.println(" -progress show execution progress"); | private static void printUsage() { System.out.println("Usage java " + ScriptsRunner.class.getName() + " [-options] [<file 1> ... <file N>]"); System.out.println("where options include:"); System.out.println(" -sp show execution progress"); System.out.println(" -h displ... |
throw (IllegalStateException)new IllegalArgumentException("Invalid or missing update method for bean " + reference + "; requires signature (java.lang.String, java.util.Map)").initCause(e); | IllegalArgumentException illArgEx = new IllegalArgumentException("Invalid or missing update method for bean " + reference + "; requires signature (java.lang.String, java.util.Map)"); illArgEx.initCause(e); throw illArgEx; | void resolve(BeanFactory beanFactory, boolean isFactory) { bean = beanFactory.getBean(reference); if (isFactory) { try { bean.getClass().getMethod(updateMethod, new Class[]{String.class, Map.class}); } catch (NoSuchMethodException e) { throw (IllegalStateException)new IllegalArgumentException("In... |
throw (IllegalStateException) new IllegalArgumentException("Invalid or missing update method for bean " + reference + "; requires signature (java.util.Map)").initCause(e); | IllegalArgumentException illArgEx = new IllegalArgumentException("Invalid or missing update method for bean " + reference + "; requires signature (java.util.Map)"); illArgEx.initCause(e); throw illArgEx; | void resolve(BeanFactory beanFactory, boolean isFactory) { bean = beanFactory.getBean(reference); if (isFactory) { try { bean.getClass().getMethod(updateMethod, new Class[]{String.class, Map.class}); } catch (NoSuchMethodException e) { throw (IllegalStateException)new IllegalArgumentException("In... |
throw (IllegalStateException)new IllegalArgumentException("Invalid or missing deleted method for bean " + reference + "; requires signature (java.lang.String)").initCause(e); | IllegalArgumentException illArgEx = new IllegalArgumentException("Invalid or missing deleted method for bean " + reference + "; requires signature (java.lang.String)"); illArgEx.initCause(e); throw illArgEx; | void resolve(BeanFactory beanFactory, boolean isFactory) { bean = beanFactory.getBean(reference); if (isFactory) { try { bean.getClass().getMethod(updateMethod, new Class[]{String.class, Map.class}); } catch (NoSuchMethodException e) { throw (IllegalStateException)new IllegalArgumentException("In... |
final String message = REZ.getString( "not-layered-fs.error", scheme ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider/not-layered-fs.error", scheme ); | public FileObject createFileSystem( final String scheme, final FileObject file ) throws FileSystemException { // Can't create a layered file system final String message = REZ.getString( "not-layered-fs.error", scheme ); throw new FileSystemException( message ); } |
final String message = REZ.getString( "invalid-absolute-uri.error", uri ); throw new FileSystemException( message, exc ); | throw new FileSystemException( "vfs.provider/invalid-absolute-uri.error", new Object[]{uri}, exc ); | public FileObject findFile( final FileObject baseFile, final String uri ) throws FileSystemException { // Parse the URI ParsedUri parsedUri; try { parsedUri = parseUri( baseFile, uri ); } catch ( FileSystemException exc ) ... |
Enumeration enum = jar.entries(); enum.nextElement(); | Enumeration entriesEnum = jar.entries(); entriesEnum.nextElement(); | public void testJarCreation() throws Exception { final Manifest mf = new Manifest(); Map entries = mf.getEntries(); Attributes attrs = new Attributes(); attrs.putValue("rocco-ventrella", "winelight"); entries.put("test", attrs); String location = OnTheFlyBundleCreatorTestsTest.class.getName().replace('.', '/') +... |
final String message = REZ.getString( "connect-rejected.error", hostname ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider.ftp/connect-rejected.error", hostname ); | public FtpFileSystem( final FileName rootName, final String hostname, final String username, final String password ) throws FileSystemException { super( rootName, null ); try { client = new FTPClient... |
final String message = REZ.getString( "login.error", hostname, username ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider.ftp/login.error", new Object[]{hostname, username}, null ); | public FtpFileSystem( final FileName rootName, final String hostname, final String username, final String password ) throws FileSystemException { super( rootName, null ); try { client = new FTPClient... |
final String message = REZ.getString( "set-binary.error", hostname ); throw new FileSystemException( message ); | throw new FileSystemException( "vfs.provider.ftp/set-binary.error", hostname ); | public FtpFileSystem( final FileName rootName, final String hostname, final String username, final String password ) throws FileSystemException { super( rootName, null ); try { client = new FTPClient... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.