rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
ParametersCallback pc = new ParametersCallback() { public final Object getParameter(final String name) { return name; } }; | ParametersCallback pc = MockParametersCallbacks.NAME; | public void testScript() { JaninoConnection c = new JaninoConnection(MockConnectionParameters.NULL); ParametersCallback pc = new ParametersCallback() { public final Object getParameter(final String name) { return name; } }; Resource scriptContent = ne... |
if (Math.abs(det) <= 1e-6f) | if (Math.abs(det) <= 1e-9f) | public final Matrix4 inverse() { float A0 = m00 * m11 - m01 * m10; float A1 = m00 * m12 - m02 * m10; float A2 = m00 * m13 - m03 * m10; float A3 = m01 * m12 - m02 * m11; float A4 = m01 * m13 - m03 * m11; float A5 = m02 * m13 - m03 * m12; float B0 = m20 * m31 - m21 * m... |
rowData.add(getIDFString()); rowData.add(getTFIDFString()); | rowData.add(new Double(getIDFString())); rowData.add(new Double(getTFIDFString())); | 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... |
q.eval(); | q.execute(); | public synchronized void executeQuery(Resource queryContent, ParametersCallback parametersCallback, QueryCallback queryCallback) throws ProviderException { JaninoQuery q = null; q = compiler.compileQuery(queryContent); q.setParametersCallback(parametersCallback); q.setQueryCallback(query... |
s.eval(); | s.execute(); | public void executeScript(Resource scriptContent, ParametersCallback parametersCallback) throws ProviderException { JaninoScript s = compiler.compileScript(scriptContent); s.setParametersCallback(parametersCallback); try { s.eval(); } catch (Exception e) { throw gue... |
String config = System.getProperty(GLOBAL_CONFIG_PROP); if (config == null) { config = DEFAULT_GLOBAL_CONFIG; } String[] files = StringUtils.tokenizeToStringArray(config, ","); contexts = new ContextEntry[files.length]; for (int i = 0; i < files.length; i++) { contexts[i] = new ContextEntry(files[i]); } | public ContextLoaderListener() { // load the 'watched' Spring XML file locations String config = System.getProperty(GLOBAL_CONFIG_PROP); if (config == null) { config = DEFAULT_GLOBAL_CONFIG; } String[] files = StringUtils.tokenizeToStringArray(config, ","); contexts = new ContextEntry[files.length]; for (int ... | |
ApplicationContext parent = null; for (int i = 0; i < contexts.length; i++) { contexts[i].lastModified = contexts[i].config.lastModified(); if (contexts[i].config.exists()) { contexts[i].context = contextFactory.createApplicationContextWithBundleContext(parent, context, new String[] { contexts[i].config.toURL().toStrin... | public void start(BundleContext context) throws Exception { this.isKnopflerfish = OsgiPlatformDetector.isKnopflerfish(context); // Collect all previously resolved bundles which have namespace plugins Bundle[] previousBundles = context.getBundles(); for (int i = 0; i < previousBundles.length; i++) { resolveBund... | |
for (int i = 0; i < contexts.length; i++) { if (contexts[i].context != null) { contexts[i].context.close(); } } | public void stop(BundleContext context) throws Exception { for (int i = 0; i < contexts.length; i++) { if (contexts[i].context != null) { contexts[i].context.close(); } } } | |
final String rootFile) | final String rootFile, final FileSystemOptions opts) | public LocalFileSystem(final FileName rootName, final String rootFile) { super(rootName, null, null); this.rootFile = rootFile; } |
super(rootName, null, null); | super(rootName, null, opts); | public LocalFileSystem(final FileName rootName, final String rootFile) { super(rootName, null, null); this.rootFile = rootFile; } |
if (name == null) { throw new IllegalArgumentException("Parameter name cannot be null"); } | public Integer find(String name) { Integer index = map == null ? null : map.get(name); //If name is not a column name and is integer if (index == null && StringUtils.isDecimalInt(name)) { try { index = Integer.valueOf(name); //Try to parse name as index } ca... | |
log.info(s + " - Answer: False"); | public boolean promptPassphrase(String s) { return false; } | |
log.info(s + " - Answer: False"); | public boolean promptPassword(String s) { return false; } | |
log.debug(s + " - Answer: Yes"); | public boolean promptYesNo(String s) { // trust return true; } | |
log.debug(s); | public void showMessage(String s) { } | |
public boolean build(AggregateTraceable primitives) { | public boolean build(PrimitiveList primitives) { | public boolean build(AggregateTraceable primitives) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); UI.printInf... |
int nPrim = primitiveList.numPrimitives(), nSplits = 0; | int nPrim = primitiveList.getNumPrimitives(), nSplits = 0; | public boolean build(AggregateTraceable primitives) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); UI.printInf... |
float ls = primitiveList.getObjectBound(i, 2 * axis + 0); float rs = primitiveList.getObjectBound(i, 2 * axis + 1); | float ls = primitiveList.getPrimitiveBound(i, 2 * axis + 0); float rs = primitiveList.getPrimitiveBound(i, 2 * axis + 1); | public boolean build(AggregateTraceable primitives) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); UI.printInf... |
public void intersect(Ray r, Instance parent, IntersectionState state) { | public void intersect(Ray r, IntersectionState state) { | public void intersect(Ray r, Instance parent, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bound... |
int stackPos = 0; | int stackTop = state.getStackTop(); int stackPos = stackTop; | public void intersect(Ray r, Instance parent, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bound... |
primitiveList.intersectPrimitive(r, parent, primitives[offset], state); | primitiveList.intersectPrimitive(r, primitives[offset], state); | public void intersect(Ray r, Instance parent, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bound... |
if (stackPos == 0) | if (stackPos == stackTop) | public void intersect(Ray r, Instance parent, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bound... |
System.out.println(" -help, -h display help "); System.out.println(" -debug, -d print debugging information"); System.out.println(" -quiet, -q be extra quiet"); | System.out.println(" -help, -h display help "); System.out.println(" -debug, -d print debugging information"); System.out.println(" -quiet, -q be extra quiet"); System.out.println(" -version, -v print version"); | private static void printUsage() { System.out.println("scriptella [-options] [<file 1> ... <file N>]"); System.out.println("Options:"); System.out.println(" -help, -h display help "); System.out.println(" -debug, -d print debugging information"); System.out.pr... |
toolMenu.add(new AutomaticDisambiguationTestAction("自動多義性解消テスト")); | private void makeMenuBar() { JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu(Translator.getString("Component.File.Text")); fileMenu.add(newProjectAction); fileMenu.addSeparator(); fileMenu.add(openProjectAction); JMenu loadMenu = new JMenu(Translator.getString... | |
DODDLE.getLogger().log(Level.INFO, "システムが追加した完全照合 単語数: " + disambiguationPanel.getSystemAddedPerfectMatchedWordCnt()); | public void constructTree() { new Thread() { private boolean isExistNode(TreeNode node, TreeNode childNode, String word, Concept ic) { return childNode.toString().equals(word) || (node.getParent() == null && childNode.toString().equals(ic.getIdentity())); ... | |
DODDLE.getLogger().log(Level.INFO, "システムが追加した完全照合 単語数: " + disambiguationPanel.getSystemAddedPerfectMatchedWordCnt()); | public void run() { DODDLE.STATUS_BAR.setLastMessage(Translator.getString("StatusBar.Message.ConstructHierarchyDone")); DODDLE.STATUS_BAR.initNormal(9); DODDLE.STATUS_BAR.startTime(); if (project.getDisambiguationPanel().getConstruc... | |
Class keyClass, Class valClass, CompressionType compressionType, Progressable progress) throws IOException { | Class keyClass, Class valClass, CompressionType compressionType) throws IOException { | createWriter(FileSystem fs, Configuration conf, Path name, Class keyClass, Class valClass, CompressionType compressionType, Progressable progress) throws IOException { Writer writer = null; if (compressionType == CompressionType.NONE) { writer = new Writer(fs, conf, name, keyClass, valClass,... |
writer = new Writer(fs, conf, name, keyClass, valClass, progress); | writer = new Writer(fs, conf, name, keyClass, valClass); | createWriter(FileSystem fs, Configuration conf, Path name, Class keyClass, Class valClass, CompressionType compressionType, Progressable progress) throws IOException { Writer writer = null; if (compressionType == CompressionType.NONE) { writer = new Writer(fs, conf, name, keyClass, valClass,... |
writer = new RecordCompressWriter(fs, conf, name, keyClass, valClass, new DefaultCodec(), progress); | writer = new RecordCompressWriter(fs, conf, name, keyClass, valClass, new DefaultCodec()); | createWriter(FileSystem fs, Configuration conf, Path name, Class keyClass, Class valClass, CompressionType compressionType, Progressable progress) throws IOException { Writer writer = null; if (compressionType == CompressionType.NONE) { writer = new Writer(fs, conf, name, keyClass, valClass,... |
writer = new BlockCompressWriter(fs, conf, name, keyClass, valClass, new DefaultCodec(), progress); | writer = new BlockCompressWriter(fs, conf, name, keyClass, valClass, new DefaultCodec()); | createWriter(FileSystem fs, Configuration conf, Path name, Class keyClass, Class valClass, CompressionType compressionType, Progressable progress) throws IOException { Writer writer = null; if (compressionType == CompressionType.NONE) { writer = new Writer(fs, conf, name, keyClass, valClass,... |
if (resource == null) { throw new IllegalArgumentException("Resource cannot be null"); } | public SqlExecutor(final Resource resource, final JdbcConnection connection) { if (resource == null) { throw new IllegalArgumentException("Resource cannot be null"); } this.resource = resource; this.connection = connection; converter = new JdbcTypesConverter(); c... | |
Vector selected = klass.getSelected(); Vector selection = klass.getSelection(); | public void actionPerformed(ActionEvent e) { Vector selected = klass.getSelected(); Vector selection = klass.getSelection(); String inputValue; if(e.getSource() == addKlass) { inputValue = JOptionPane.showInputDialog(frame, "Skriv in klassnamnet:"); if(inputValue != null) { if(!inputValue.trim().equ... | |
caps.add( Capability.GET_LAST_MODIFIED ); | protected void addCapabilities( final Collection caps ) { caps.add( Capability.CREATE ); caps.add( Capability.DELETE ); caps.add( Capability.GET_TYPE ); caps.add( Capability.LIST_CHILDREN ); caps.add( Capability.READ_CONTENT ); caps.add( Capability.URI ); caps.add... | |
return simpleName.length() == 0 ? "connection" : simpleName + '{' + dialectIdentifier + '}'; | return simpleName.length() == 0 ? "connection" : simpleName + ", " + dialectIdentifier; | public String toString() { String simpleName = getClass().getSimpleName(); return simpleName.length() == 0 ? "connection" : simpleName + '{' + dialectIdentifier + '}'; } |
m_manager.addProvider( "ftp", new FtpFileSystemProvider() ); return m_manager.resolveFile( uri ); | getManager().addProvider( "ftp", new FtpFileSystemProvider() ); return getManager().resolveFile( uri ); | protected FileObject getBaseFolder() throws Exception { final String uri = System.getProperty( "test.ftp.uri" ) + "/read-tests"; m_manager.addProvider( "ftp", new FtpFileSystemProvider() ); return m_manager.resolveFile( uri ); } |
return m_manager.resolveFile( uri ); | return getManager().resolveFile( uri ); | protected FileObject getWriteFolder() throws Exception { final String uri = System.getProperty( "test.ftp.uri" ) + "/write-tests"; return m_manager.resolveFile( uri ); } |
if (intervalMin > intervalMax) return; | public void intersect(Ray r, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bounds.getMaximum().x ... | |
if (intervalMin > intervalMax) return; } | } if (intervalMin > intervalMax) return; | public void intersect(Ray r, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bounds.getMaximum().x ... |
throw new IllegalStateException("node overlap changed"); | throw new IllegalStateException("invalid node overlap"); | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... |
float d[] = { gridBox[1] - gridBox[0], gridBox[3] - gridBox[2], gridBox[5] - gridBox[4] }; if (d[0] < 0 || d[1] < 0 || d[2] < 0) throw new IllegalStateException("node extents less than 0"); | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | |
UI.printWarning("[BIH] Stuck left with %d", right - left + 1); | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | |
UI.printWarning("[BIH] Stuck right with %d", right - left + 1); | private void subdivide(int left, int right, IntArray tempTree, int[] indices, float[] gridBox, float[] nodeBox, int nodeIndex, int depth, BuildStats stats) { if ((right - left + 1) <= maxPrims || depth >= 64) { // write leaf node stats.updateLeaf(depth, right - left + 1); cre... | |
if (w > screenRes.getWidth() || h > screenRes.getHeight()) { | if (w >= (screenRes.getWidth() - 200) || h >= (screenRes.getHeight() - 200)) { | public void imageBegin(int w, int h, int bucketSize) { if (frame == null) { frame = new RenderFrame(); frame.imagePanel.imageBegin(w, h, bucketSize); Dimension screenRes = Toolkit.getDefaultToolkit().getScreenSize(); boolean needFit = false; if (w > scre... |
public FileObject createVirtualFileSystem(FileObject rootFile) | public FileObject createVirtualFileSystem(String rootUri) | public FileObject createVirtualFileSystem(FileObject rootFile) throws FileSystemException; |
new ConstructTreeAction(false, DODDLE.getCurrentProject()).constructTree(); | SwingWorker<String, String> worker = new SwingWorker<String, String>() { public String doInBackground() { new ConstructTreeAction(false, DODDLE.getCurrentProject()).constructTree(); return "done"; } }; DODDLE.STATUS_BAR.setSwingWorker(worker); worker.execute(); | public void actionPerformed(ActionEvent e) { new ConstructTreeAction(false, DODDLE.getCurrentProject()).constructTree(); } |
i+=seekQuote(sb, '\"'); | i=seekQuote(sb, '\"', i); | public StringBuilder nextStatement() throws IOException { sb.setLength(0); injections.clear(); char prevChar = (char) -1; int n; for (int i = 0; (n = reader.read()) >= 0; i++) { char c = (char) n; if (c==separator) { return sb; } ... |
i+=seekQuote(sb, '\''); | i=seekQuote(sb, '\'', i); | public StringBuilder nextStatement() throws IOException { sb.setLength(0); injections.clear(); char prevChar = (char) -1; int n; for (int i = 0; (n = reader.read()) >= 0; i++) { char c = (char) n; if (c==separator) { return sb; } ... |
private int seekQuote(StringBuilder sb, char q) throws IOException { int i=0; for (int n; (n = reader.read()) >= 0; i++) { | private int seekQuote(StringBuilder sb, char q, int pos) throws IOException { int i=pos+1; for (int n; (n = reader.read()) >= 0;i++) { | private int seekQuote(StringBuilder sb, char q) throws IOException { int i=0; for (int n; (n = reader.read()) >= 0; i++) { sb.append((char) n); if (q == n) { //quote return i+1; } } return i; } |
if (q == n) { return i+1; | if ('$'==n) { injections.add(i); } else if (q == n) { return i; | private int seekQuote(StringBuilder sb, char q) throws IOException { int i=0; for (int n; (n = reader.read()) >= 0; i++) { sb.append((char) n); if (q == n) { //quote return i+1; } } return i; } |
if (bundle.getResource(SPRING_HANDLER_MAPPINGS_LOCATION) != null || bundle.getResource(PluggableSchemaResolver.DEFAULT_SCHEMA_MAPPINGS_LOCATION) != null) { plugins.addHandler(bundle); | if (isKnopflerfish) { if (bundle.getEntry(SPRING_HANDLER_MAPPINGS_LOCATION) != null || bundle.getEntry(PluggableSchemaResolver.DEFAULT_SCHEMA_MAPPINGS_LOCATION) != null) { plugins.addHandler(bundle); } } else { if (bundle.getResource(SPRING_HANDLER_MAPPINGS_LOCATION) != null || bundle.getResource(PluggableSchemaResol... | private void resolveBundle(Bundle bundle) { if (bundle.getResource(SPRING_HANDLER_MAPPINGS_LOCATION) != null || bundle.getResource(PluggableSchemaResolver.DEFAULT_SCHEMA_MAPPINGS_LOCATION) != null) { plugins.addHandler(bundle); } } |
this.isKnopflerfish = OsgiPlatformDetector.isKnopflerfish(context); | public void start(BundleContext context) throws Exception { // Collect all previously resolved bundles which have namespace plugins Bundle[] previousBundles = context.getBundles(); for (int i = 0; i < previousBundles.length; i++) { resolveBundle(previousBundles[i]); } bundleId = context.getBundle().getBundleId(... | |
} else if (e.getSource() == addInputWordSetButton) { addInputWordSet(); | public void actionPerformed(ActionEvent e) { if (e.getSource() == setInputWordSetButton) { setInputWordSet(); } else if (e.getSource() == addInputWordButton) { addInputWords(); } else if (e.getSource() == deleteTableItemButton) { deleteTableItems(); } ... | |
inputWordArea.setText(inputWords.toString()); | inputWordArea.setText(inputWordArea.getText() + inputWords.toString()); | private void addInputWords() { int[] rows = wordInfoTable.getSelectedRows(); StringBuilder inputWords = new StringBuilder(""); for (int i = 0; i < rows.length; i++) { String word = (String) wordInfoTable.getValueAt(rows[i], 0); inputWords.append(word + "\n"); } ... |
Set deleteWordSet = new HashSet(); | Set<String> deleteWordSet = new HashSet<String>(); | private void deleteTableItems() { int[] rows = wordInfoTable.getSelectedRows(); Set deleteWordSet = new HashSet(); for (int i = 0; i < rows.length; i++) { String deleteWord = (String) wordInfoTable.getValueAt(rows[i], 0); deleteWordSet.add(deleteWord); wordInfoM... |
buf.append(getIDF() + "\t"); buf.append(getTFIDF() + "\t"); | buf.append(getIDFString() + "\t"); buf.append(getTFIDFString() + "\t"); | public String toString() { StringBuffer buf = new StringBuffer(); buf.append(word + "\t"); for (Iterator i = posSet.iterator(); i.hasNext();) { String pos = (String) i.next(); buf.append(pos + ":"); } buf.append("\t"); buf.append(getTF() + "\t"); ... |
public void loadInputWordSet(Set<String> ws) { wordSet = ws; perfectMatchedWordJList.clearSelection(); partialMatchedWordJList.clearSelection(); undefinedWordListPanel.clearSelection(); complexConstructTreeOptionMap.clear(); if (DODDLE.IS_USING_DB) { inputModule.initDataWithDB(wordSet); } else { inputModule.initDataWi... | public void loadInputWordSet(File file) { if (!file.exists()) { return; } inputFile = file; Set<String> wordSet = new HashSet<String>(); try { FileInputStream fis = new FileInputStream(inputFile); BufferedReader reader = new BufferedReader(new InputStreamReader(fis, "JISAutoDetect")); String line = ""; while ((line = r... | public void loadInputWordSet(Set<String> ws) { wordSet = ws; perfectMatchedWordJList.clearSelection(); partialMatchedWordJList.clearSelection(); undefinedWordListPanel.clearSelection(); complexConstructTreeOptionMap.clear(); if (DODDLE.IS_USING_DB) { inputModule.... |
initWordList(); | loadInputWordSet(wordSet); | public void loadInputWordSet(Set<String> ws) { wordSet = ws; perfectMatchedWordJList.clearSelection(); partialMatchedWordJList.clearSelection(); undefinedWordListPanel.clearSelection(); complexConstructTreeOptionMap.clear(); if (DODDLE.IS_USING_DB) { inputModule.... |
rowData.add(new Double(getIDF())); rowData.add(new Double(getTFIDF())); | rowData.add(getIDFString()); rowData.add(getTFIDFString()); | 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... |
globalContext = context.globalContext; | this.globalContext = context.getGlobalContext(); | void setContext(final SQLContext context) { this.context = context; globalContext = context.globalContext; } |
public JarFileObject( FileName name, ZipEntry entry, ZipFile zipFile, JarFileSystem fs ) | public JarFileObject( final FileName name, final ZipEntry entry, final ZipFile zipFile, final JarFileSystem fs ) | public JarFileObject( FileName name, ZipEntry entry, ZipFile zipFile, JarFileSystem fs ) { super( name, entry, zipFile, fs ); } |
} | protected Certificate[] doGetCertificates() { if ( entry == null ) return null; return ( (JarEntry)entry ).getCertificates(); } | |
} | Manifest getManifest() throws IOException { if ( file == null ) return null; return ( (JarFile)file ).getManifest(); } | |
} else if (backlog instanceof Iteration){ return "editIteration"; | protected String solveResult(Backlog backlog){ if (backlog == null){ super.addActionError(super.getText("backlog.notFound")); return Action.ERROR; } else if (backlog instanceof Product){ return "editProduct"; } else if (backlog instanceof Deliverable){ return "editDeliverable"; } super.addActionError(supe... | |
alphaY = pl.getFloat("roughnessX", alphaY); | alphaY = pl.getFloat("roughnessY", alphaY); | public boolean update(ParameterList pl, SunflowAPI api) { rhoD = pl.getColor("diffuse", rhoD); rhoS = pl.getColor("specular", rhoS); alphaX = pl.getFloat("roughnessX", alphaX); alphaY = pl.getFloat("roughnessX", alphaY); numRays = pl.getInt("samples", numRays); return true;... |
children = EMPTY_FILE_ARRAY; | protected void handleCreate(final FileType newType) throws Exception { synchronized (this) { if (attached) { // Fix up state injectType(newType); removeChildrenCache(); children = EMPTY_FILE_ARRAY; // N... | |
try { url.openConnection().connect(); } catch ( final FileNotFoundException e ) { return null; } | protected FileType doGetType() throws Exception { // TODO - implement this return FileType.FILE; } | |
long time = effort.getTime(); long days = time / AFTime.WORKDAY_IN_MILLIS; time %= AFTime.WORKDAY_IN_MILLIS; long hours = time / AFTime.HOUR_IN_MILLIS; time %= AFTime.HOUR_IN_MILLIS; long minutes = time / AFTime.MINUTE_IN_MILLIS; time %= AFTime.MINUTE_IN_MILLIS; int worktime = Math.round(days * 24 + hours + (minutes... | if(effort!=null){ long time = effort.getTime(); long days = time / AFTime.WORKDAY_IN_MILLIS; time %= AFTime.WORKDAY_IN_MILLIS; long hours = time / AFTime.HOUR_IN_MILLIS; time %= AFTime.HOUR_IN_MILLIS; long minutes = time / AFTime.MINUTE_IN_MILLIS; time %= AFTime.MINUTE_IN_MILLIS; int worktime = Math.round(days * 24 ... | public String execute(){// Create a time series chart if (taskId > 0){ works = performedWorkDAO.getPerformedWork(taskDAO.get(taskId)); } else if (backlogItemId > 0){ works = performedWorkDAO.getPerformedWork(backlogItemDAO.get(backlogItemId)); } else if (iterationId > 0){ works = performedWorkDAO.getPerfo... |
worksum=worksum+worktime; day_last=day; month_last=month; year_last=year; | public String execute(){// Create a time series chart if (taskId > 0){ works = performedWorkDAO.getPerformedWork(taskDAO.get(taskId)); } else if (backlogItemId > 0){ works = performedWorkDAO.getPerformedWork(backlogItemDAO.get(backlogItemId)); } else if (iterationId > 0){ works = performedWorkDAO.getPerfo... | |
long time = effort.getTime(); long days = time / AFTime.WORKDAY_IN_MILLIS; time %= AFTime.WORKDAY_IN_MILLIS; | public String execute(){// Create a time series chart if (taskId > 0){ works = performedWorkDAO.getPerformedWork(taskDAO.get(taskId)); } else if (backlogItemId > 0){ works = performedWorkDAO.getPerformedWork(backlogItemDAO.get(backlogItemId)); } else if (iterationId > 0){ works = performedWorkDAO.getPerfo... | |
long hours = time / AFTime.HOUR_IN_MILLIS; time %= AFTime.HOUR_IN_MILLIS; long minutes = time / AFTime.MINUTE_IN_MILLIS; time %= AFTime.MINUTE_IN_MILLIS; int worktime = Math.round(days * 24 + hours + (minutes/60)); Date date = performedWork.getCreated(); String dateStr = date.toString(); Calendar calendar = Calendar.... | if(effort!=null){ long time = effort.getTime(); long days = time / AFTime.WORKDAY_IN_MILLIS; time %= AFTime.WORKDAY_IN_MILLIS; long hours = time / AFTime.HOUR_IN_MILLIS; time %= AFTime.HOUR_IN_MILLIS; long minutes = time / AFTime.MINUTE_IN_MILLIS; time %= AFTime.MINUTE_IN_MILLIS; int worktime = Math.round(days * 24... | public String execute(){// Create a time series chart if (taskId > 0){ works = performedWorkDAO.getPerformedWork(taskDAO.get(taskId)); } else if (backlogItemId > 0){ works = performedWorkDAO.getPerformedWork(backlogItemDAO.get(backlogItemId)); } else if (iterationId > 0){ works = performedWorkDAO.getPerfo... |
axis.setDateFormatOverride(new SimpleDateFormat("yyyy-MM-dd")); | axis.setDateFormatOverride(new SimpleDateFormat("yyyy-MM-dd")); XYItemRenderer rend = plot.getRenderer(); XYLineAndShapeRenderer rr = (XYLineAndShapeRenderer)rend; rr.setShapesVisible(true); | public String execute(){// Create a time series chart if (taskId > 0){ works = performedWorkDAO.getPerformedWork(taskDAO.get(taskId)); } else if (backlogItemId > 0){ works = performedWorkDAO.getPerformedWork(backlogItemDAO.get(backlogItemId)); } else if (iterationId > 0){ works = performedWorkDAO.getPerfo... |
public void loadWordConceptMap(File file) { if (!file.exists()) { return; } try { FileInputStream fis = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(fis, "JISAutoDetect")); Set<String> inputWordSet = new HashSet<String>(); while (inputWordModelSet == null) { try { Thread.s... | public void loadWordConceptMap() { JFileChooser chooser = new JFileChooser("."); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval == JFileChooser.APPROVE_OPTION) { loadWordConceptMap(chooser.getSelectedFile()); | public void loadWordConceptMap(File file) { if (!file.exists()) { return; } try { FileInputStream fis = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(fis, "JISAutoDetect")); Set<String> inputWordSet = new HashSet<String>();... |
public void loadWordEvalConceptSet(File file) { if (!file.exists()) { return; } try { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "SJIS")); String line = ""; wordEvalConceptSetMap = new HashMap<String, Set<EvalConcept>>(); while ((line = reader.readLine()) != null) { Stri... | public void loadWordEvalConceptSet() { JFileChooser chooser = new JFileChooser("."); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval == JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); loadWordEvalConceptSet(file); | public void loadWordEvalConceptSet(File file) { if (!file.exists()) { return; } try { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "SJIS")); String line = ""; wordEvalConceptSetMap = new HashMap<String, Set<EvalConcept>>()... |
catch( RuntimeException re ) { throw re; } | private void attach() throws FileSystemException { if( m_attached ) { return; } try { // Attach and determine the file type doAttach(); m_attached = true; m_type = doGetType(); } catch( FileSystemException exc... | |
catch( RuntimeException re ) { throw re; } | private static void copyContent( final FileObject srcFile, final FileObject destFile ) throws FileSystemException { try { final InputStream instr = srcFile.getContent().getInputStream(); try { // Create the o... | |
catch( RuntimeException re ) { throw re; } | public void create( FileType type ) throws FileSystemException { attach(); if( m_type == type ) { // Already exists as correct type return; } if( m_type != null ) { final String message = REZ.getString( "create-mismatched-type.error", typ... | |
catch( RuntimeException re ) { throw re; } | private void deleteSelf() throws FileSystemException { if( isReadOnly() ) { final String message = REZ.getString( "delete-read-only.error", m_name ); throw new FileSystemException( message ); } // Delete the file try { doDelete(); ... | |
catch( RuntimeException re ) { throw re; } | public FileObject[] getChildren() throws FileSystemException { attach(); if( m_type == null ) { final String message = REZ.getString( "list-children-no-exist.error", m_name ); throw new FileSystemException( message ); } if( m_type != FileType.FOLDER ) ... | |
catch( RuntimeException re ) { throw re; } | public OutputStream getOutputStream() throws FileSystemException { attach(); if( isReadOnly() ) { final String message = REZ.getString( "write-read-only.error", m_name ); throw new FileSystemException( message ); } if( m_type == FileType.FOLDER ) { ... | |
StringBuffer buf = new StringBuffer(); return new URL( UriParser.extractScheme( m_name.getURI(), buf ), null, -1, buf.toString(), new DefaultURLStreamHandler( m_fs.getContext() ) ); | final StringBuffer buf = new StringBuffer(); try { return (URL) AccessController.doPrivileged( new PrivilegedExceptionAction() { public Object run() throws MalformedURLException { return new URL( UriParser.extractScheme( m_name.getURI(), buf ), null, -1, buf.toString(), new DefaultURLStreamHandler( m_fs.getContext() ) ... | public URL getURL() throws MalformedURLException { StringBuffer buf = new StringBuffer(); return new URL( UriParser.extractScheme( m_name.getURI(), buf ), null, -1, buf.toString(), new DefaultURLStreamHandler( m_fs.getContext() ) ); } |
r.ox -= 0.002f * n.x; r.oy -= 0.002f * n.y; r.oz -= 0.002f * n.z; | public final Color traceRefraction(Ray r, int i) { return server.traceRefraction(this, r, i); } | |
if (map.allowRefractionBounced()) | if (map.allowRefractionBounced()) { r.ox -= 0.002f * n.x; r.oy -= 0.002f * n.y; r.oz -= 0.002f * n.z; | public final void traceRefractionPhoton(Ray r, Color power) { if (map.allowRefractionBounced()) server.traceRefractionPhoton(this, r, power); } |
} | public final void traceRefractionPhoton(Ray r, Color power) { if (map.allowRefractionBounced()) server.traceRefractionPhoton(this, r, power); } | |
final File zipFile = file.replicateFile( FileConstants.SELECT_SELF ); | protected FileSystem createFileSystem( final ParsedUri uri ) throws FileSystemException { final ParsedZipUri zipUri = (ParsedZipUri)uri; final FileObject file = zipUri.getZipFile(); // Create the file system final DefaultFileName name = new DefaultFileName( parser, zipUri.getRo... | |
return new ZipFileSystem( getContext(), name, zipFile ); | return new ZipFileSystem( getContext(), name, file ); | protected FileSystem createFileSystem( final ParsedUri uri ) throws FileSystemException { final ParsedZipUri zipUri = (ParsedZipUri)uri; final FileObject file = zipUri.getZipFile(); // Create the file system final DefaultFileName name = new DefaultFileName( parser, zipUri.getRo... |
return new ZipFileSystem( getContext(), name, zipFile ); | return new ZipFileSystem( getContext(), name, file ); | public Object run() throws FileSystemException { return new ZipFileSystem( getContext(), name, zipFile ); } |
int stackPos = 0; | int stackTop = state.getStackTop(); int stackPos = stackTop; | public void intersect(Ray r, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bounds.getMaximum().x ... |
if (stackPos == 0) | if (stackPos == stackTop) | public void intersect(Ray r, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bounds.getMaximum().x ... |
public static Set getImplementationNames(Class serviceIF, ClassLoader loader) | public static Set getImplementationNames(Class serviceIF) | public static Set getImplementationNames(Class serviceIF, ClassLoader loader) throws IOException { String serviceName = serviceIF.getName(); Enumeration serviceFiles = loader.getResources("META-INF/services/" + serviceName); Set na... |
String serviceName = serviceIF.getName(); Enumeration serviceFiles = loader.getResources("META-INF/services/" + serviceName); Set names = new HashSet(); while (serviceFiles.hasMoreElements()) { URL serviceFile = (URL) serviceFiles.nextElement(); BufferedReader serviceReader = new BufferedReader(new InputStreamReader(s... | return getImplementationNames(serviceIF, Services.class.getClassLoader()); | public static Set getImplementationNames(Class serviceIF, ClassLoader loader) throws IOException { String serviceName = serviceIF.getName(); Enumeration serviceFiles = loader.getResources("META-INF/services/" + serviceName); Set na... |
q.execute(queryContent.open(), parametersCallback, queryCallback); | q.execute(new CSVReader(queryContent.open()), parametersCallback, queryCallback); | public void executeQuery(Resource queryContent, ParametersCallback parametersCallback, QueryCallback queryCallback) throws ProviderException { if (out != null) { throw new CsvProviderException("Cannot query and update a CSV file simultaneously."); } try { CSVReader in = ne... |
progressCallback.step(1, "Connection "+connection.toString()+" registered"); | String id = connections.size() > 1 ? ("id=" + c.getId() + ", ") : ""; progressCallback.step(1, "Connection " + id + connection.toString() + ", " + connection.getDialectIdentifier() + " registered"); | public void init(final ConfigurationEl configuration, final ScriptsContext ctx) { final List<ConnectionEl> connections = configuration.getConnections(); ProgressCallback progressCallback = ctx.getProgressCallback().fork(50, connections.size()); for (ConnectionEl c : connecti... |
for (String inputWord : wordSet) { | for (InputWordModel inputWordModel : perfectMatchedWordModelSet) { String inputWord = inputWordModel.getMatchedWord(); | private Map<Concept, EvalConcept> getConceptEvalConceptMap() { Map<Concept, EvalConcept> conceptEvalConceptMap = new HashMap<Concept, EvalConcept>(); for (String inputWord : wordSet) { for (Concept c : wordConceptSetMap.get(inputWord)) { if (conceptEvalCon... |
for (String inputWord : wordSet) { | for (InputWordModel inputWordModel : perfectMatchedWordModelSet) { String inputWord = inputWordModel.getMatchedWord(); | public void setWordEvalConceptSetMap(Set<InputWordModel> inputWordSet) { if (inputWordModelSet == null) { return; } wordSet = new HashSet<String>(); for (InputWordModel iwModel : perfectMatchedWordModelSet) { wordSet.add(iwModel.getWord()); } ... |
JaninoQuery jq = new JaninoQuery(); | JaninoQuery jq = new JaninoQuery() { protected void execute() throws Exception { } }; | 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... |
JaninoScript js = new JaninoScript(); | JaninoScript js = new JaninoScript() { protected void execute() throws Exception { } }; | public void testScript() { JaninoScript js = new JaninoScript(); js.setParametersCallback(MockParametersCallbacks.SIMPLE); assertEquals("*1*", js.get("1")); } |
final String name = nameBuf.toString(); | String name = nameBuf.toString(); int linkPos = name.indexOf(" -> "); if (linkPos > -1) { name = name.substring(0, linkPos); } | protected String[] doListChildren() throws Exception { // List the contents of the folder final Vector vector; final ChannelSftp channel = fileSystem.getChannel(); try { vector = channel.ls(getName().getPathDecoded()); } finally { ... |
final File testDir = getTestResource( "../../../test/basedir" ); | final File testDir = getTestResource( "basedir" ); | protected FileObject getBaseFolder() throws Exception { // Cheat a little final File testDir = getTestResource( "../../../test/basedir" ); final File emptyDir = new File( testDir, "emptydir" ); emptyDir.mkdirs(); return m_manager.convert( testDir ); } |
if ( entry == null || entry.isDirectory() ) | if ((entry == null) || ( entry.isDirectory() )) | protected void setZipEntry( final ZipEntry entry ) { if ( this.entry != null ) { return; } if ( entry == null || entry.isDirectory() ) { type = FileType.FOLDER; } else { type = FileType.FILE; } this.e... |
new Thread() { | undefinedWordListModel = new DefaultListModel(); setUndefinedWordSet(); Set<Concept> inputConceptSet = disambiguationPanel.setInputConceptSet(); if (inputConceptSet.size() == 0) { DODDLE.STATUS_BAR.hideProgressBar(); return; } | public void constructTree() { new Thread() { private boolean isExistNode(TreeNode node, TreeNode childNode, String word, Concept ic) { return childNode.toString().equals(word) || (node.getParent() == null && childNode.toString().equals(ic.getIdentity())); ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.