rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
| meta
stringlengths 141
403
|
---|---|---|---|
newResourcePage = new NewWizardNewPage(this, this.workbench, wizardCategories); | newResourcePage = new NewWizardNewPage(this, this.workbench, wizardCategories, primaryWizards); | public void createControl(Composite parent) { IDialogSettings settings = getDialogSettings(); newResourcePage = new NewWizardNewPage(this, this.workbench, wizardCategories); newResourcePage.setDialogSettings(settings); Control control = newResourcePage.createControl(parent); WorkbenchHelp.setHelp(control, IHelpContextIds.NEW_WIZARD_SELECTION_WIZARD_PAGE); setControl(control); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/cdc590064230a8543dcd910f93596ce961da1d7e/NewWizardSelectionPage.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardSelectionPage.java |
return RubyBoolean.newBoolean(runtime, this == other); | return getRuntime().newBoolean(this == other); | public IRubyObject equal(IRubyObject other) { // Symbol table ensures only one instance for every name, // so object identity is enough to compare symbols. return RubyBoolean.newBoolean(runtime, this == other); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java |
return RubyFixnum.newFixnum(runtime, symbol.hashCode()); | return getRuntime().newFixnum(symbol.hashCode()); | public RubyFixnum hash() { return RubyFixnum.newFixnum(runtime, symbol.hashCode()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java |
return RubyString.newString(getRuntime(), ":" + symbol); | return getRuntime().newString(":" + symbol); | public RubyString inspect() { return RubyString.newString(getRuntime(), ":" + symbol); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java |
throw new TypeError(getRuntime(), "can't clone Symbol"); | throw getRuntime().newTypeError("can't clone Symbol"); | public IRubyObject rbClone() { throw new TypeError(getRuntime(), "can't clone Symbol"); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java |
return RubyFixnum.newFixnum(runtime, id); | return getRuntime().newFixnum(id); | public RubyFixnum to_i() { return RubyFixnum.newFixnum(runtime, id); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java |
return RubyString.newString(getRuntime(), symbol); | return getRuntime().newString(symbol); | public RubyString to_s() { return RubyString.newString(getRuntime(), symbol); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/870e1da9b41bfdbae259e1fc5f18fc8b76686998/RubySymbol.java/buggy/src/org/jruby/RubySymbol.java |
short type = guessType(initialValue); | short type = ValueConstants.guessType(initialValue); | private FSDerivedValue valueByName(CSSName cssName) { FSDerivedValue val = _derivedValuesById[cssName.FS_ID]; // but the property may not be defined for this Element if (val == null) { // if it is inheritable (like color) and we are not root, ask our parent // for the value if (CSSName.propertyInherits(cssName) && _parent != null // && (val = _parent.valueByName(cssName)) != null) { val = val.copyOf(cssName); } else { // otherwise, use the initial value (defined by the CSS2 Spec) String initialValue = CSSName.initialValue(cssName); if (initialValue == null) { throw new XRRuntimeException("Property '" + cssName + "' has no initial values assigned. " + "Check CSSName declarations."); } if (initialValue.startsWith("=")) { CSSName ref = CSSName.getByPropertyName(initialValue.substring(1)); val = valueByName(ref); } else { initialValue = Idents.convertIdent(cssName, initialValue); short type = guessType(initialValue); val = DerivedValueFactory.newDerivedValue(this, cssName, type, initialValue, initialValue, null); } } _derivedValuesById[cssName.FS_ID] = val; } return val; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/beb33b535e31b5457b4ff342322f6310ebfa663e/CalculatedStyle.java/buggy/src/java/org/xhtmlrenderer/css/style/CalculatedStyle.java |
Uu.p("still null. failing :("); | protected void executeRenderThread(Context c) { //Uu.p("do render called"); //Uu.p("last render event = " + last_event); // paint the normal swing background first // but only if we aren't printing. Graphics g = c.getGraphics(); if (!(g instanceof PrinterGraphics) && explicitlyOpaque) { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); } // start painting the box tree if (bh != null && bh.box != null) { //Uu.p("not null. doing real painting"); long start = System.currentTimeMillis(); BoxRendering.paint(c, bh.box, false, false);//no restyle demanded on top level long after = System.currentTimeMillis(); if (Configuration.isTrue("xr.incremental.repaint.print-timing", false)) { Uu.p("repaint took ms: " + (after - start)); } } else { Uu.p("still null. failing :("); } if (!c.isStylesAllPopped()) { XRLog.render(Level.SEVERE, "mismatch in style popping and pushing"); } last_event = null; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/5ab8d19beb25fd96c93f800f8de2bacad5331774/BasicPanel.java/clean/src/java/org/xhtmlrenderer/swing/BasicPanel.java |
|
lastMarkers = newMarkers; | public void buildAllMarkers(IProgressMonitor monitor) { building = true; MarkerList newMarkers; try { int markerLimit = view.getMarkerLimit(); monitor.beginTask(MarkerMessages.MarkerView_19, markerLimit == -1 ? 60 : 100); try { monitor.subTask(MarkerMessages.MarkerView_waiting_on_changes); if (monitor.isCanceled()) return; monitor .subTask(MarkerMessages.MarkerView_searching_for_markers); SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 10); newMarkers = MarkerList.compute(view.getEnabledFilters(), subMonitor, true); if (monitor.isCanceled()) return; view.refreshMarkerCounts(monitor); } catch (CoreException e) { Util.log(e); newMarkers = new MarkerList(); return; } if (monitor.isCanceled()) return; ViewerSorter sorter = view.getViewer().getSorter(); if (markerLimit == -1 || isShowingHierarchy()) { sorter.sort(view.getViewer(), newMarkers.toArray()); } else { monitor.subTask(MarkerMessages.MarkerView_18); SubProgressMonitor mon = new SubProgressMonitor(monitor, 40); newMarkers = SortUtil.getFirst(newMarkers, (Comparator) sorter, markerLimit, mon); if (monitor.isCanceled()) { return; } sorter.sort(view.getViewer(), newMarkers.toArray()); } if (newMarkers.getSize() == 0) { categories = new MarkerCategory[0]; monitor.done(); return; } monitor.subTask(MarkerMessages.MarkerView_queueing_updates); if (monitor.isCanceled()) return; if (isShowingHierarchy()) { MarkerCategory[] newCategories = buildHierarchy(newMarkers, 0, newMarkers.getSize() - 1, 0); if (monitor.isCanceled()) return; categories = newCategories; } lastMarkers = newMarkers; monitor.done(); } finally { building = false; } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/58c7b43a84a79355b625af3954e16798861f74c1/MarkerAdapter.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerAdapter.java |
|
throw new FacesException( "Unsupported context type " + context.getClass().getName()); | throw new FacesException("Unsupported context type " + context.getClass().getName()); | public FacesContext getFacesContext( Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException { if (context instanceof PortletContext) { return new MyFacesContextImpl( (PortletContext)context, (PortletRequest)request, (PortletResponse)response); } throw new FacesException( "Unsupported context type " + context.getClass().getName()); } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/609b519a904ba683c07b38e27cec406578e75ffd/MyFacesContextFactoryImpl.java/buggy/util-jsf/src/com/liferay/util/jsf/apache/myfaces/context/MyFacesContextFactoryImpl.java |
public Group addGroup( String className, String classPK, String name, String friendlyURL) | public Group addGroup(String name, String friendlyURL) | public Group addGroup( String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { return GroupLocalServiceUtil.addGroup( getUser().getCompanyId(), className, classPK, name, friendlyURL); } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f3ad9fb1651cda52873ea772c3df0bb9bd03b52f/GroupServiceImpl.java/buggy/portal-ejb/src/com/liferay/portal/service/impl/GroupServiceImpl.java |
getUser().getCompanyId(), className, classPK, name, friendlyURL); | getUserId(), null, null, name, friendlyURL); | public Group addGroup( String className, String classPK, String name, String friendlyURL) throws PortalException, SystemException { return GroupLocalServiceUtil.addGroup( getUser().getCompanyId(), className, classPK, name, friendlyURL); } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f3ad9fb1651cda52873ea772c3df0bb9bd03b52f/GroupServiceImpl.java/buggy/portal-ejb/src/com/liferay/portal/service/impl/GroupServiceImpl.java |
if (dlFileRank.isNew() || dlFileRank.isModified()) { session = openSession(); if (dlFileRank.isNew()) { DLFileRank dlFileRankModel = new DLFileRank(); dlFileRankModel.setCompanyId(dlFileRank.getCompanyId()); dlFileRankModel.setUserId(dlFileRank.getUserId()); dlFileRankModel.setFolderId(dlFileRank.getFolderId()); dlFileRankModel.setName(dlFileRank.getName()); dlFileRankModel.setCreateDate(dlFileRank.getCreateDate()); session.save(dlFileRankModel); session.flush(); } else { DLFileRank dlFileRankModel = (DLFileRank)session.get(DLFileRank.class, dlFileRank.getPrimaryKey()); if (dlFileRankModel != null) { dlFileRankModel.setCreateDate(dlFileRank.getCreateDate()); session.flush(); } else { dlFileRankModel = new DLFileRank(); dlFileRankModel.setCompanyId(dlFileRank.getCompanyId()); dlFileRankModel.setUserId(dlFileRank.getUserId()); dlFileRankModel.setFolderId(dlFileRank.getFolderId()); dlFileRankModel.setName(dlFileRank.getName()); dlFileRankModel.setCreateDate(dlFileRank.getCreateDate()); session.save(dlFileRankModel); session.flush(); } } dlFileRank.setNew(false); dlFileRank.setModified(false); } | session = openSession(); session.saveOrUpdate(dlFileRank); session.flush(); dlFileRank.setNew(false); | public com.liferay.portlet.documentlibrary.model.DLFileRank update( com.liferay.portlet.documentlibrary.model.DLFileRank dlFileRank) throws SystemException { Session session = null; try { if (dlFileRank.isNew() || dlFileRank.isModified()) { session = openSession(); if (dlFileRank.isNew()) { DLFileRank dlFileRankModel = new DLFileRank(); dlFileRankModel.setCompanyId(dlFileRank.getCompanyId()); dlFileRankModel.setUserId(dlFileRank.getUserId()); dlFileRankModel.setFolderId(dlFileRank.getFolderId()); dlFileRankModel.setName(dlFileRank.getName()); dlFileRankModel.setCreateDate(dlFileRank.getCreateDate()); session.save(dlFileRankModel); session.flush(); } else { DLFileRank dlFileRankModel = (DLFileRank)session.get(DLFileRank.class, dlFileRank.getPrimaryKey()); if (dlFileRankModel != null) { dlFileRankModel.setCreateDate(dlFileRank.getCreateDate()); session.flush(); } else { dlFileRankModel = new DLFileRank(); dlFileRankModel.setCompanyId(dlFileRank.getCompanyId()); dlFileRankModel.setUserId(dlFileRank.getUserId()); dlFileRankModel.setFolderId(dlFileRank.getFolderId()); dlFileRankModel.setName(dlFileRank.getName()); dlFileRankModel.setCreateDate(dlFileRank.getCreateDate()); session.save(dlFileRankModel); session.flush(); } } dlFileRank.setNew(false); dlFileRank.setModified(false); } return dlFileRank; } catch (HibernateException he) { throw new SystemException(he); } finally { closeSession(session); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/DLFileRankPersistence.java/buggy/portal-ejb/src/com/liferay/portlet/documentlibrary/service/persistence/DLFileRankPersistence.java |
if (dirs[0].indexOf('*') > -1 || dirs[0].indexOf('?') > -1) { | if (glob2Regexp(dirs[0]) != null) { | private File[] getFiles() { String[] dirs = splitPattern(); File root = new File(dirs[0]); int idx = 1; if (dirs[0].indexOf('*') > -1 || dirs[0].indexOf('?') > -1) { root = new File("."); idx = 0; } for (int size = dirs.length; idx < size; idx++) { if (dirs[idx].indexOf('*') == -1 && dirs[idx].indexOf('?') == -1) { root = new File(root, dirs[idx]); } else { break; } } if (idx == dirs.length) { return new File[] {root}; } ArrayList matchingFiles = new ArrayList(); matchingFiles.add(root); for (int length = dirs.length; idx < length; idx++) { ArrayList currentMatchingFiles = new ArrayList(); for (int i = 0, size = matchingFiles.size(); i < size; i++) { boolean isDirectory = idx + 1 != length; String pattern = dirs[idx]; File parent = (File) matchingFiles.get(i); currentMatchingFiles.addAll(getMatchingFiles(parent, pattern, isDirectory)); } matchingFiles = currentMatchingFiles; } return (File[])matchingFiles.toArray(new File[matchingFiles.size()]); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
if (dirs[idx].indexOf('*') == -1 && dirs[idx].indexOf('?') == -1) { | if (glob2Regexp(dirs[idx]) == null) { | private File[] getFiles() { String[] dirs = splitPattern(); File root = new File(dirs[0]); int idx = 1; if (dirs[0].indexOf('*') > -1 || dirs[0].indexOf('?') > -1) { root = new File("."); idx = 0; } for (int size = dirs.length; idx < size; idx++) { if (dirs[idx].indexOf('*') == -1 && dirs[idx].indexOf('?') == -1) { root = new File(root, dirs[idx]); } else { break; } } if (idx == dirs.length) { return new File[] {root}; } ArrayList matchingFiles = new ArrayList(); matchingFiles.add(root); for (int length = dirs.length; idx < length; idx++) { ArrayList currentMatchingFiles = new ArrayList(); for (int i = 0, size = matchingFiles.size(); i < size; i++) { boolean isDirectory = idx + 1 != length; String pattern = dirs[idx]; File parent = (File) matchingFiles.get(i); currentMatchingFiles.addAll(getMatchingFiles(parent, pattern, isDirectory)); } matchingFiles = currentMatchingFiles; } return (File[])matchingFiles.toArray(new File[matchingFiles.size()]); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
FilenameFilter filter = new GlobFilenameFilter(pattern); /** * @see java.io.FileFilter#accept(File) */ | Pattern p = Pattern.compile(glob2Regexp(pattern)); | private static Collection getMatchingFiles(final File parent, final String pattern, final boolean isDirectory) { FileFilter filter = new FileFilter() { FilenameFilter filter = new GlobFilenameFilter(pattern); /** * @see java.io.FileFilter#accept(File) */ public boolean accept(File pathname) { return (pathname.isDirectory() || !isDirectory) && SelectorUtils.matchPath(pattern, pathname.getName()); } }; File[] matchArray = parent.listFiles(filter); Collection matchingFiles = new ArrayList(); for (int i = 0; i < matchArray.length; i++) { matchingFiles.add(matchArray[i]); if (pattern.equals("**")) { // recurse into dirs if (matchArray[i].isDirectory()) { matchingFiles.addAll(getMatchingFiles(matchArray[i], pattern, isDirectory)); } } } return matchingFiles; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
return (pathname.isDirectory() || !isDirectory) && SelectorUtils.matchPath(pattern, pathname.getName()); | return (pathname.isDirectory() || !isDirectory) && p.matcher(pathname.getName()).matches(); | private static Collection getMatchingFiles(final File parent, final String pattern, final boolean isDirectory) { FileFilter filter = new FileFilter() { FilenameFilter filter = new GlobFilenameFilter(pattern); /** * @see java.io.FileFilter#accept(File) */ public boolean accept(File pathname) { return (pathname.isDirectory() || !isDirectory) && SelectorUtils.matchPath(pattern, pathname.getName()); } }; File[] matchArray = parent.listFiles(filter); Collection matchingFiles = new ArrayList(); for (int i = 0; i < matchArray.length; i++) { matchingFiles.add(matchArray[i]); if (pattern.equals("**")) { // recurse into dirs if (matchArray[i].isDirectory()) { matchingFiles.addAll(getMatchingFiles(matchArray[i], pattern, isDirectory)); } } } return matchingFiles; } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
return (pathname.isDirectory() || !isDirectory) && SelectorUtils.matchPath(pattern, pathname.getName()); | return (pathname.isDirectory() || !isDirectory) && p.matcher(pathname.getName()).matches(); | public boolean accept(File pathname) { return (pathname.isDirectory() || !isDirectory) && SelectorUtils.matchPath(pattern, pathname.getName()); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
String path = pattern.getPath(); StringBuffer sb = new StringBuffer(); for(int i = 0, size = path.length(); i < size; i++) { if (path.charAt(i) == '/' || path.charAt(i) == '\\') { if (sb.length() > 0) { dirs.add(sb.toString()); sb = new StringBuffer(); } if (dirs.size() == 0) { sb.append(path.charAt(i)); } } else { sb.append(path.charAt(i)); } | int i = 0; while (true) { int j = pattern.indexOf(File.separatorChar, i); if (j == -1) { if (i < pattern.length()) { dirs.add(pattern.substring(i)); } break; } if (i < j) { dirs.add(pattern.substring(i, j)); i = j + 1; } | private String[] splitPattern() { ArrayList dirs = new ArrayList(); String path = pattern.getPath(); StringBuffer sb = new StringBuffer(); for(int i = 0, size = path.length(); i < size; i++) { if (path.charAt(i) == '/' || path.charAt(i) == '\\') { if (sb.length() > 0) { dirs.add(sb.toString()); sb = new StringBuffer(); } // to handle /unix/ and \\windows-server\ files if (dirs.size() == 0) { sb.append(path.charAt(i)); } } else { sb.append(path.charAt(i)); } } if (sb.length() > 0) { dirs.add(sb.toString()); } return (String[])dirs.toArray(new String[dirs.size()]); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
if (sb.length() > 0) { dirs.add(sb.toString()); } return (String[])dirs.toArray(new String[dirs.size()]); | return (String[]) dirs.toArray(new String[dirs.size()]); | private String[] splitPattern() { ArrayList dirs = new ArrayList(); String path = pattern.getPath(); StringBuffer sb = new StringBuffer(); for(int i = 0, size = path.length(); i < size; i++) { if (path.charAt(i) == '/' || path.charAt(i) == '\\') { if (sb.length() > 0) { dirs.add(sb.toString()); sb = new StringBuffer(); } // to handle /unix/ and \\windows-server\ files if (dirs.size() == 0) { sb.append(path.charAt(i)); } } else { sb.append(path.charAt(i)); } } if (sb.length() > 0) { dirs.add(sb.toString()); } return (String[])dirs.toArray(new String[dirs.size()]); } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/43608826a44e7cd8213325ce6cf8b348d8ca8f8e/Glob.java/clean/src/org/jruby/util/Glob.java |
throws com.liferay.portal.SystemException { | throws com.liferay.portal.PortalException, com.liferay.portal.SystemException { | public static java.util.List getOrgLabors(java.lang.String organizationId) throws com.liferay.portal.SystemException { try { OrgLaborService orgLaborService = OrgLaborServiceFactory.getService(); return orgLaborService.getOrgLabors(organizationId); } catch (com.liferay.portal.SystemException se) { throw se; } catch (Exception e) { throw new com.liferay.portal.SystemException(e); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f3ad9fb1651cda52873ea772c3df0bb9bd03b52f/OrgLaborServiceUtil.java/clean/portal-ejb/src/com/liferay/portal/service/spring/OrgLaborServiceUtil.java |
} catch (com.liferay.portal.PortalException pe) { throw pe; | public static java.util.List getOrgLabors(java.lang.String organizationId) throws com.liferay.portal.SystemException { try { OrgLaborService orgLaborService = OrgLaborServiceFactory.getService(); return orgLaborService.getOrgLabors(organizationId); } catch (com.liferay.portal.SystemException se) { throw se; } catch (Exception e) { throw new com.liferay.portal.SystemException(e); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f3ad9fb1651cda52873ea772c3df0bb9bd03b52f/OrgLaborServiceUtil.java/clean/portal-ejb/src/com/liferay/portal/service/spring/OrgLaborServiceUtil.java |
|
if(info.editorInput == null) return; | void checkDuplicates(NavigationHistoryEditorInfo info) { NavigationHistoryEditorInfo dup = null; for (Iterator iter = editors.iterator(); iter.hasNext();) { dup = (NavigationHistoryEditorInfo)iter.next(); if(info != dup && info.editorID.equals(dup.editorID) && info.editorInput.equals(dup.editorInput)) break; else dup = null; } if(dup == null) return; for (Iterator iter = history.iterator(); iter.hasNext();) { NavigationHistoryEntry entry = (NavigationHistoryEntry)iter.next(); if(entry.editorInfo == dup) { entry.editorInfo = info; info.refCount++; } } editors.remove(dup);} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/11c3a1951b90a731ff3fb05889fdab5cb6af5bae/NavigationHistory.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/NavigationHistory.java |
|
c.getRootLayer().ensureHasPage(c, child.getMaster()); | private void layoutAbsoluteChildren(LayoutContext c) { List children = getChildren(); if (children.size() > 0) { LayoutState state = c.captureLayoutState(); for (int i = 0; i < children.size(); i++) { Layer child = (Layer)children.get(i); if (child.isRequiresLayout() && ! child.isAlternateFlow()) { layoutAbsoluteChild(c, child); if (child.getMaster().getStyle().isAvoidPageBreakInside() && child.getMaster().crossesPageBreak(c)) { ((BlockBox)child.getMaster()).setNeedPageClear(true); child.getMaster().detach(); layoutAbsoluteChild(c, child); ((BlockBox)child.getMaster()).setNeedPageClear(false); } child.setRequiresLayout(false); child.finish(c); } } c.restoreLayoutState(state); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/868e29fe0bd81b55cbd739f60feedbe5488f9adb/Layer.java/clean/src/java/org/xhtmlrenderer/layout/Layer.java |
|
java.lang.String companyId, java.lang.String name) throws RemoteException { | java.lang.String groupId) throws RemoteException { | public static com.liferay.portal.model.GroupModel getGroup( java.lang.String companyId, java.lang.String name) throws RemoteException { try { com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId, name); return returnValue; } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteException(stackTrace); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/321bc18d7c720086a32b2956af609c3eceb42f4a/GroupServiceSoap.java/clean/portal-ejb/src/com/liferay/portal/service/http/GroupServiceSoap.java |
com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId, name); | com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId); | public static com.liferay.portal.model.GroupModel getGroup( java.lang.String companyId, java.lang.String name) throws RemoteException { try { com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId, name); return returnValue; } catch (Exception e) { String stackTrace = StackTraceUtil.getStackTrace(e); _log.error(stackTrace); throw new RemoteException(stackTrace); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/321bc18d7c720086a32b2956af609c3eceb42f4a/GroupServiceSoap.java/clean/portal-ejb/src/com/liferay/portal/service/http/GroupServiceSoap.java |
private boolean init(Display display) { // setup debug mode if required. if (WorkbenchPlugin.getDefault().isDebugging()) { WorkbenchPlugin.DEBUG = true; ModalContext.setDebugMode(true); } // create workbench window manager windowManager = new WindowManager(); IIntroRegistry introRegistry = WorkbenchPlugin.getDefault() .getIntroRegistry(); if (introRegistry.getIntroCount() > 0) { IProduct product = Platform.getProduct(); if (product != null) { introDescriptor = (IntroDescriptor) introRegistry .getIntroForProduct(product.getId()); } } // begin the initialization of the activity, command, and context // managers workbenchActivitySupport = new WorkbenchActivitySupport(); activityHelper = ActivityPersistanceHelper.getInstance(); // Initialize the command, context and binding services. commandManager = new CommandManager(); final CommandService commandService = new CommandService( commandManager); services.put(ICommandService.class, commandService); commandService.readRegistryAndPreferences(); ContextManager.DEBUG = Policy.DEBUG_CONTEXTS; contextManager = new ContextManager(); final IContextService contextService = new ContextService( contextManager); services.put(IContextService.class, contextService); BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS; bindingManager = new BindingManager(contextManager); final IBindingService bindingService = new BindingService( bindingManager); services.put(IBindingService.class, bindingService); bindingService.readRegistryAndPreferences(commandService); /* * TODO Putting this here is a like a sword in my side. But alas, the * handler support from XML just isn't up to the task yet. */ final Command showViewCommand = commandService .getCommand("org.eclipse.ui.views.showView"); //$NON-NLS-1$ showViewCommand.setHandler(new ShowViewHandler()); final Command showPerspectiveCommand = commandService .getCommand("org.eclipse.ui.perspectives.showPerspective"); //$NON-NLS-1$ showPerspectiveCommand.setHandler(new ShowPerspectiveHandler()); /* * TODO This is the deprecated support. It would be nice to pull out all * of this except for the Workbench*Support constructors. */ workbenchContextSupport = new WorkbenchContextSupport(this, contextManager); workbenchCommandSupport = new WorkbenchCommandSupport(this, bindingManager, commandManager, contextManager, commandService); workbenchContextSupport.initialize(); // deferred key binding support initializeCommandResolver(); addWindowListener(windowListener); // end the initialization of the activity, command, and context // managers initializeImages(); initializeFonts(); initializeColors(); initializeApplicationColors(); // now that the workbench is sufficiently initialized, let the advisor // have a turn. advisor.internalBasicInitialize(getWorkbenchConfigurer()); // configure use of color icons in toolbars boolean useColorIcons = getPreferenceStore().getBoolean( IPreferenceConstants.COLOR_ICONS); ActionContributionItem.setUseColorIconsInToolbars(useColorIcons); // initialize workbench single-click vs double-click behavior initializeSingleClickOption(); // deadlock code boolean avoidDeadlock = true; String[] commandLineArgs = Platform.getCommandLineArgs(); for (int i = 0; i < commandLineArgs.length; i++) { if (commandLineArgs[i].equalsIgnoreCase("-allowDeadlock")) //$NON-NLS-1$ avoidDeadlock = false; } if (avoidDeadlock) { UILockListener uiLockListener = new UILockListener(display); Platform.getJobManager().setLockListener(uiLockListener); display .setSynchronizer(new UISynchronizer(display, uiLockListener)); } // attempt to restore a previous workbench state try { UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$ advisor.preStartup(); if (!advisor.openWindows()) { return false; } } finally { UIStats.end(UIStats.RESTORE_WORKBENCH, this, "Workbench"); //$NON-NLS-1$ } forceOpenPerspective(); isStarting = false; return true; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
||
final IWorkbenchPage page = window.getActivePage(); if (page != null) { final IWorkbenchPart part = page.getActivePart(); if (part != null) { final IWorkbenchPartSite site = part.getSite(); if (site != null) { context.addVariable(ISources.ACTIVE_SITE_NAME, site); final String partId = site.getId(); if (partId != null) { context.addVariable(ISources.ACTIVE_PART_NAME, partId); } } } } } /* * Phase 2 of the initialization of commands. When this phase completes, * all the services and managers will exist, and be accessible via the * getService(Object) method. */ | private boolean init(Display display) { // setup debug mode if required. if (WorkbenchPlugin.getDefault().isDebugging()) { WorkbenchPlugin.DEBUG = true; ModalContext.setDebugMode(true); } // create workbench window manager windowManager = new WindowManager(); IIntroRegistry introRegistry = WorkbenchPlugin.getDefault() .getIntroRegistry(); if (introRegistry.getIntroCount() > 0) { IProduct product = Platform.getProduct(); if (product != null) { introDescriptor = (IntroDescriptor) introRegistry .getIntroForProduct(product.getId()); } } // begin the initialization of the activity, command, and context // managers workbenchActivitySupport = new WorkbenchActivitySupport(); activityHelper = ActivityPersistanceHelper.getInstance(); // Initialize the command, context and binding services. commandManager = new CommandManager(); final CommandService commandService = new CommandService( commandManager); services.put(ICommandService.class, commandService); commandService.readRegistryAndPreferences(); ContextManager.DEBUG = Policy.DEBUG_CONTEXTS; contextManager = new ContextManager(); final IContextService contextService = new ContextService( contextManager); services.put(IContextService.class, contextService); BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS; bindingManager = new BindingManager(contextManager); final IBindingService bindingService = new BindingService( bindingManager); services.put(IBindingService.class, bindingService); bindingService.readRegistryAndPreferences(commandService); /* * TODO Putting this here is a like a sword in my side. But alas, the * handler support from XML just isn't up to the task yet. */ final Command showViewCommand = commandService .getCommand("org.eclipse.ui.views.showView"); //$NON-NLS-1$ showViewCommand.setHandler(new ShowViewHandler()); final Command showPerspectiveCommand = commandService .getCommand("org.eclipse.ui.perspectives.showPerspective"); //$NON-NLS-1$ showPerspectiveCommand.setHandler(new ShowPerspectiveHandler()); /* * TODO This is the deprecated support. It would be nice to pull out all * of this except for the Workbench*Support constructors. */ workbenchContextSupport = new WorkbenchContextSupport(this, contextManager); workbenchCommandSupport = new WorkbenchCommandSupport(this, bindingManager, commandManager, contextManager, commandService); workbenchContextSupport.initialize(); // deferred key binding support initializeCommandResolver(); addWindowListener(windowListener); // end the initialization of the activity, command, and context // managers initializeImages(); initializeFonts(); initializeColors(); initializeApplicationColors(); // now that the workbench is sufficiently initialized, let the advisor // have a turn. advisor.internalBasicInitialize(getWorkbenchConfigurer()); // configure use of color icons in toolbars boolean useColorIcons = getPreferenceStore().getBoolean( IPreferenceConstants.COLOR_ICONS); ActionContributionItem.setUseColorIconsInToolbars(useColorIcons); // initialize workbench single-click vs double-click behavior initializeSingleClickOption(); // deadlock code boolean avoidDeadlock = true; String[] commandLineArgs = Platform.getCommandLineArgs(); for (int i = 0; i < commandLineArgs.length; i++) { if (commandLineArgs[i].equalsIgnoreCase("-allowDeadlock")) //$NON-NLS-1$ avoidDeadlock = false; } if (avoidDeadlock) { UILockListener uiLockListener = new UILockListener(display); Platform.getJobManager().setLockListener(uiLockListener); display .setSynchronizer(new UISynchronizer(display, uiLockListener)); } // attempt to restore a previous workbench state try { UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$ advisor.preStartup(); if (!advisor.openWindows()) { return false; } } finally { UIStats.end(UIStats.RESTORE_WORKBENCH, this, "Workbench"); //$NON-NLS-1$ } forceOpenPerspective(); isStarting = false; return true; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
|
commandService.readRegistryAndPreferences(); | private boolean init(Display display) { // setup debug mode if required. if (WorkbenchPlugin.getDefault().isDebugging()) { WorkbenchPlugin.DEBUG = true; ModalContext.setDebugMode(true); } // create workbench window manager windowManager = new WindowManager(); IIntroRegistry introRegistry = WorkbenchPlugin.getDefault() .getIntroRegistry(); if (introRegistry.getIntroCount() > 0) { IProduct product = Platform.getProduct(); if (product != null) { introDescriptor = (IntroDescriptor) introRegistry .getIntroForProduct(product.getId()); } } // begin the initialization of the activity, command, and context // managers workbenchActivitySupport = new WorkbenchActivitySupport(); activityHelper = ActivityPersistanceHelper.getInstance(); // Initialize the command, context and binding services. commandManager = new CommandManager(); final CommandService commandService = new CommandService( commandManager); services.put(ICommandService.class, commandService); commandService.readRegistryAndPreferences(); ContextManager.DEBUG = Policy.DEBUG_CONTEXTS; contextManager = new ContextManager(); final IContextService contextService = new ContextService( contextManager); services.put(IContextService.class, contextService); BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS; bindingManager = new BindingManager(contextManager); final IBindingService bindingService = new BindingService( bindingManager); services.put(IBindingService.class, bindingService); bindingService.readRegistryAndPreferences(commandService); /* * TODO Putting this here is a like a sword in my side. But alas, the * handler support from XML just isn't up to the task yet. */ final Command showViewCommand = commandService .getCommand("org.eclipse.ui.views.showView"); //$NON-NLS-1$ showViewCommand.setHandler(new ShowViewHandler()); final Command showPerspectiveCommand = commandService .getCommand("org.eclipse.ui.perspectives.showPerspective"); //$NON-NLS-1$ showPerspectiveCommand.setHandler(new ShowPerspectiveHandler()); /* * TODO This is the deprecated support. It would be nice to pull out all * of this except for the Workbench*Support constructors. */ workbenchContextSupport = new WorkbenchContextSupport(this, contextManager); workbenchCommandSupport = new WorkbenchCommandSupport(this, bindingManager, commandManager, contextManager, commandService); workbenchContextSupport.initialize(); // deferred key binding support initializeCommandResolver(); addWindowListener(windowListener); // end the initialization of the activity, command, and context // managers initializeImages(); initializeFonts(); initializeColors(); initializeApplicationColors(); // now that the workbench is sufficiently initialized, let the advisor // have a turn. advisor.internalBasicInitialize(getWorkbenchConfigurer()); // configure use of color icons in toolbars boolean useColorIcons = getPreferenceStore().getBoolean( IPreferenceConstants.COLOR_ICONS); ActionContributionItem.setUseColorIconsInToolbars(useColorIcons); // initialize workbench single-click vs double-click behavior initializeSingleClickOption(); // deadlock code boolean avoidDeadlock = true; String[] commandLineArgs = Platform.getCommandLineArgs(); for (int i = 0; i < commandLineArgs.length; i++) { if (commandLineArgs[i].equalsIgnoreCase("-allowDeadlock")) //$NON-NLS-1$ avoidDeadlock = false; } if (avoidDeadlock) { UILockListener uiLockListener = new UILockListener(display); Platform.getJobManager().setLockListener(uiLockListener); display .setSynchronizer(new UISynchronizer(display, uiLockListener)); } // attempt to restore a previous workbench state try { UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$ advisor.preStartup(); if (!advisor.openWindows()) { return false; } } finally { UIStats.end(UIStats.RESTORE_WORKBENCH, this, "Workbench"); //$NON-NLS-1$ } forceOpenPerspective(); isStarting = false; return true; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
|
workbenchCommandSupport = new WorkbenchCommandSupport(this, bindingManager, commandManager, contextManager, commandService); | workbenchCommandSupport = new WorkbenchCommandSupport(bindingManager, commandManager, contextManager, handlerService); | private boolean init(Display display) { // setup debug mode if required. if (WorkbenchPlugin.getDefault().isDebugging()) { WorkbenchPlugin.DEBUG = true; ModalContext.setDebugMode(true); } // create workbench window manager windowManager = new WindowManager(); IIntroRegistry introRegistry = WorkbenchPlugin.getDefault() .getIntroRegistry(); if (introRegistry.getIntroCount() > 0) { IProduct product = Platform.getProduct(); if (product != null) { introDescriptor = (IntroDescriptor) introRegistry .getIntroForProduct(product.getId()); } } // begin the initialization of the activity, command, and context // managers workbenchActivitySupport = new WorkbenchActivitySupport(); activityHelper = ActivityPersistanceHelper.getInstance(); // Initialize the command, context and binding services. commandManager = new CommandManager(); final CommandService commandService = new CommandService( commandManager); services.put(ICommandService.class, commandService); commandService.readRegistryAndPreferences(); ContextManager.DEBUG = Policy.DEBUG_CONTEXTS; contextManager = new ContextManager(); final IContextService contextService = new ContextService( contextManager); services.put(IContextService.class, contextService); BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS; bindingManager = new BindingManager(contextManager); final IBindingService bindingService = new BindingService( bindingManager); services.put(IBindingService.class, bindingService); bindingService.readRegistryAndPreferences(commandService); /* * TODO Putting this here is a like a sword in my side. But alas, the * handler support from XML just isn't up to the task yet. */ final Command showViewCommand = commandService .getCommand("org.eclipse.ui.views.showView"); //$NON-NLS-1$ showViewCommand.setHandler(new ShowViewHandler()); final Command showPerspectiveCommand = commandService .getCommand("org.eclipse.ui.perspectives.showPerspective"); //$NON-NLS-1$ showPerspectiveCommand.setHandler(new ShowPerspectiveHandler()); /* * TODO This is the deprecated support. It would be nice to pull out all * of this except for the Workbench*Support constructors. */ workbenchContextSupport = new WorkbenchContextSupport(this, contextManager); workbenchCommandSupport = new WorkbenchCommandSupport(this, bindingManager, commandManager, contextManager, commandService); workbenchContextSupport.initialize(); // deferred key binding support initializeCommandResolver(); addWindowListener(windowListener); // end the initialization of the activity, command, and context // managers initializeImages(); initializeFonts(); initializeColors(); initializeApplicationColors(); // now that the workbench is sufficiently initialized, let the advisor // have a turn. advisor.internalBasicInitialize(getWorkbenchConfigurer()); // configure use of color icons in toolbars boolean useColorIcons = getPreferenceStore().getBoolean( IPreferenceConstants.COLOR_ICONS); ActionContributionItem.setUseColorIconsInToolbars(useColorIcons); // initialize workbench single-click vs double-click behavior initializeSingleClickOption(); // deadlock code boolean avoidDeadlock = true; String[] commandLineArgs = Platform.getCommandLineArgs(); for (int i = 0; i < commandLineArgs.length; i++) { if (commandLineArgs[i].equalsIgnoreCase("-allowDeadlock")) //$NON-NLS-1$ avoidDeadlock = false; } if (avoidDeadlock) { UILockListener uiLockListener = new UILockListener(display); Platform.getJobManager().setLockListener(uiLockListener); display .setSynchronizer(new UISynchronizer(display, uiLockListener)); } // attempt to restore a previous workbench state try { UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$ advisor.preStartup(); if (!advisor.openWindows()) { return false; } } finally { UIStats.end(UIStats.RESTORE_WORKBENCH, this, "Workbench"); //$NON-NLS-1$ } forceOpenPerspective(); isStarting = false; return true; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
private boolean init(Display display) { // setup debug mode if required. if (WorkbenchPlugin.getDefault().isDebugging()) { WorkbenchPlugin.DEBUG = true; ModalContext.setDebugMode(true); } // create workbench window manager windowManager = new WindowManager(); IIntroRegistry introRegistry = WorkbenchPlugin.getDefault() .getIntroRegistry(); if (introRegistry.getIntroCount() > 0) { IProduct product = Platform.getProduct(); if (product != null) { introDescriptor = (IntroDescriptor) introRegistry .getIntroForProduct(product.getId()); } } // begin the initialization of the activity, command, and context // managers workbenchActivitySupport = new WorkbenchActivitySupport(); activityHelper = ActivityPersistanceHelper.getInstance(); // Initialize the command, context and binding services. commandManager = new CommandManager(); final CommandService commandService = new CommandService( commandManager); services.put(ICommandService.class, commandService); commandService.readRegistryAndPreferences(); ContextManager.DEBUG = Policy.DEBUG_CONTEXTS; contextManager = new ContextManager(); final IContextService contextService = new ContextService( contextManager); services.put(IContextService.class, contextService); BindingManager.DEBUG = Policy.DEBUG_KEY_BINDINGS; bindingManager = new BindingManager(contextManager); final IBindingService bindingService = new BindingService( bindingManager); services.put(IBindingService.class, bindingService); bindingService.readRegistryAndPreferences(commandService); /* * TODO Putting this here is a like a sword in my side. But alas, the * handler support from XML just isn't up to the task yet. */ final Command showViewCommand = commandService .getCommand("org.eclipse.ui.views.showView"); //$NON-NLS-1$ showViewCommand.setHandler(new ShowViewHandler()); final Command showPerspectiveCommand = commandService .getCommand("org.eclipse.ui.perspectives.showPerspective"); //$NON-NLS-1$ showPerspectiveCommand.setHandler(new ShowPerspectiveHandler()); /* * TODO This is the deprecated support. It would be nice to pull out all * of this except for the Workbench*Support constructors. */ workbenchContextSupport = new WorkbenchContextSupport(this, contextManager); workbenchCommandSupport = new WorkbenchCommandSupport(this, bindingManager, commandManager, contextManager, commandService); workbenchContextSupport.initialize(); // deferred key binding support initializeCommandResolver(); addWindowListener(windowListener); // end the initialization of the activity, command, and context // managers initializeImages(); initializeFonts(); initializeColors(); initializeApplicationColors(); // now that the workbench is sufficiently initialized, let the advisor // have a turn. advisor.internalBasicInitialize(getWorkbenchConfigurer()); // configure use of color icons in toolbars boolean useColorIcons = getPreferenceStore().getBoolean( IPreferenceConstants.COLOR_ICONS); ActionContributionItem.setUseColorIconsInToolbars(useColorIcons); // initialize workbench single-click vs double-click behavior initializeSingleClickOption(); // deadlock code boolean avoidDeadlock = true; String[] commandLineArgs = Platform.getCommandLineArgs(); for (int i = 0; i < commandLineArgs.length; i++) { if (commandLineArgs[i].equalsIgnoreCase("-allowDeadlock")) //$NON-NLS-1$ avoidDeadlock = false; } if (avoidDeadlock) { UILockListener uiLockListener = new UILockListener(display); Platform.getJobManager().setLockListener(uiLockListener); display .setSynchronizer(new UISynchronizer(display, uiLockListener)); } // attempt to restore a previous workbench state try { UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$ advisor.preStartup(); if (!advisor.openWindows()) { return false; } } finally { UIStats.end(UIStats.RESTORE_WORKBENCH, this, "Workbench"); //$NON-NLS-1$ } forceOpenPerspective(); isStarting = false; return true; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
||
workbenchCommandSupport.setProcessing(true); workbenchContextSupport.setProcessing(true); | public final void largeUpdateEnd() { if (--largeUpdates == 0) { workbenchCommandSupport.setProcessing(true); workbenchContextSupport.setProcessing(true); // Perform window-specific blocking. final IWorkbenchWindow[] windows = getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { IWorkbenchWindow window = windows[i]; if (window instanceof WorkbenchWindow) { ((WorkbenchWindow) window).largeUpdateEnd(); } } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
|
workbenchCommandSupport.setProcessing(false); workbenchContextSupport.setProcessing(false); | public final void largeUpdateStart() { if (largeUpdates++ == 0) { workbenchCommandSupport.setProcessing(false); workbenchContextSupport.setProcessing(false); final IWorkbenchWindow[] windows = getWorkbenchWindows(); for (int i = 0; i < windows.length; i++) { IWorkbenchWindow window = windows[i]; if (window instanceof WorkbenchWindow) { ((WorkbenchWindow) window).largeUpdateStart(); } } } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/2aa0965bbe6d7e1c9acd243af620354c7eb93e19/Workbench.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java |
|
log().warn("Remove upload from tablemodel: " + upload); | log().verbose("Remove upload from tablemodel: " + upload); | private int removeUpload(Upload upload) { int index; synchronized (uploads) { index = uploads.indexOf(upload); if (index >= 0) { log().warn("Remove upload from tablemodel: " + upload); uploads.remove(index); } else { log().error( "Unable to remove upload from tablemodel, not found: " + upload); } } return index; } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/ae3d12443e196837c10587186ff3e8ce6e44b6fe/UploadsTableModel.java/clean/src/main/de/dal33t/powerfolder/ui/transfer/UploadsTableModel.java |
assert (new Float(absVal).intValue() > 0); | private float calcFloatProportionalValue(float relVal, short primitiveType, float baseValue, CssContext ctx) { float absVal = Float.MIN_VALUE; // NOTE: absolute datatypes (px, pt, pc, cm, etc.) are converted once and stored. // this could be done on instantiation, but it seems more clear to have all the calcs // in one place. For this reason we use the member field boolean hasAbsCalculated to // track if the calculation is already done. switch (primitiveType) { case CSSPrimitiveValue.CSS_PX: // nothing to do if (_hasAbsCalculated) { absVal = _absoluteLengthAsFloat; } else { absVal = relVal; _absoluteLengthAsFloat = absVal; _hasAbsCalculated = true; } break; case CSSPrimitiveValue.CSS_IN: if (_hasAbsCalculated) { absVal = _absoluteLengthAsFloat; } else { absVal = (((relVal * CM__PER__IN) * MM__PER__CM) / ctx.getMmPerPx()); _absoluteLengthAsFloat = absVal; _hasAbsCalculated = true; } break; case CSSPrimitiveValue.CSS_CM: if (_hasAbsCalculated) { absVal = _absoluteLengthAsFloat; } else { absVal = ((relVal * MM__PER__CM) / ctx.getMmPerPx()); _absoluteLengthAsFloat = absVal; _hasAbsCalculated = true; } break; case CSSPrimitiveValue.CSS_MM: if (_hasAbsCalculated) { absVal = _absoluteLengthAsFloat; } else { absVal = relVal / ctx.getMmPerPx(); _absoluteLengthAsFloat = absVal; _hasAbsCalculated = true; } break; case CSSPrimitiveValue.CSS_PT: if (_hasAbsCalculated) { absVal = _absoluteLengthAsFloat; } else { absVal = (((relVal * PT__PER__IN) * CM__PER__IN) * MM__PER__CM) / ctx.getMmPerPx(); _absoluteLengthAsFloat = absVal; _hasAbsCalculated = true; } break; case CSSPrimitiveValue.CSS_PC: if (_hasAbsCalculated) { absVal = _absoluteLengthAsFloat; } else { absVal = ((((relVal * PC__PER__PT) * PT__PER__IN) * CM__PER__IN) * MM__PER__CM) / ctx.getMmPerPx(); _absoluteLengthAsFloat = absVal; _hasAbsCalculated = true; } break; case CSSPrimitiveValue.CSS_EMS: // EM is equal to font-size of element on which it is used // The exception is when �em� occurs in the value of // the �font-size� property itself, in which case it refers // to the calculated font size of the parent element (spec: 4.3.2) if (_cssName == CSSName.FONT_SIZE) { absVal = relVal * ctx.getFontSize2D(_style.getParent().getFont(ctx)); } else { absVal = relVal * ctx.getFontSize2D(_style.getFont(ctx)); } break; case CSSPrimitiveValue.CSS_EXS: // To convert EMS to pixels, we need the height of the lowercase 'Xx' character in the current // element... // to the font size of the parent element (spec: 4.3.2) if (_cssName == CSSName.FONT_SIZE) { FontSpecification parentFont = _style.getParent().getFont(ctx); float xHeight = ctx.getXHeight(parentFont); xHeight = relVal * xHeight; absVal = _style.getFontSizeForXHeight(ctx, xHeight); } else { FontSpecification font = _style.getFont(ctx); float xHeight = ctx.getXHeight(font); absVal = relVal * xHeight; } break; case CSSPrimitiveValue.CSS_PERCENTAGE: // percentage depends on the property this value belongs to if (_cssName == CSSName.VERTICAL_ALIGN) { relVal = _style.getParent().getFloatPropertyProportionalHeight(CSSName.LINE_HEIGHT, baseValue, ctx); } else if (_cssName == CSSName.FONT_SIZE) { // same as with EM FontSpecification font = _style.getParent().getFont(ctx); baseValue = ctx.getFontSize2D(font); } absVal = (relVal / 100F) * baseValue; break; default: // nothing to do, we only convert those listed above XRLog.cascade(Level.SEVERE, "Asked to convert " + _cssName + " from relative to absolute, " + " don't recognize the datatype " + "'" + ValueConstants.stringForSACPrimitiveType(_lengthPrimitiveType) + "' " + _lengthPrimitiveType + "(" + _domCSSPrimitiveValue.getCssText() + ")"); } assert (new Float(absVal).intValue() > 0); if (_cssName == CSSName.FONT_SIZE) { XRLog.cascade(Level.FINEST, _cssName + ", relative= " + relVal + " (" + _domCSSPrimitiveValue.getCssText() + "), absolute= " + absVal); } else { XRLog.cascade(Level.FINEST, _cssName + ", relative= " + relVal + " (" + _domCSSPrimitiveValue.getCssText() + "), absolute= " + absVal + " using base=" + baseValue); } // round down. (CHECK: Why? Is this always appropriate? - tobe) double d = Math.floor((double) absVal); absVal = new Float(d).floatValue(); return absVal; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/57063c7124e41a59e9002920513c8065d509e17e/DerivedValue.java/buggy/src/java/org/xhtmlrenderer/css/style/DerivedValue.java |
|
public static Message[] createFileListMessages(Folder folder) { List<FileInfo> infos = folder.getFilesAsList(); //filter files that are ignored folder.getBlacklist().applyIgnore(infos); FileInfo[] infosArray = new FileInfo[infos.size()]; return createFileListMessages(folder.getInfo(), infos.toArray(infosArray)); } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/ec858d625f4f686b517266653ac1acab8ed74248/FileList.java/buggy/src/main/de/dal33t/powerfolder/message/FileList.java |
||
return createFileListMessages(folder.getInfo(), infos.toArray(infosArray)); | return createFileListMessages(folder.getInfo(), infos .toArray(infosArray)); | public static Message[] createFileListMessages(Folder folder) { List<FileInfo> infos = folder.getFilesAsList(); //filter files that are ignored folder.getBlacklist().applyIgnore(infos); FileInfo[] infosArray = new FileInfo[infos.size()]; return createFileListMessages(folder.getInfo(), infos.toArray(infosArray)); } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/ec858d625f4f686b517266653ac1acab8ed74248/FileList.java/buggy/src/main/de/dal33t/powerfolder/message/FileList.java |
setModified(true); | public void setGroupId(String groupId) { if (((groupId == null) && (_groupId != null)) || ((groupId != null) && (_groupId == null)) || ((groupId != null) && (_groupId != null) && !groupId.equals(_groupId))) { if (!XSS_ALLOW_GROUPID) { groupId = XSSUtil.strip(groupId); } _groupId = groupId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/OrgGroupRoleModel.java/buggy/portal-ejb/src/com/liferay/portal/model/OrgGroupRoleModel.java |
|
setModified(true); | public void setOrganizationId(String organizationId) { if (((organizationId == null) && (_organizationId != null)) || ((organizationId != null) && (_organizationId == null)) || ((organizationId != null) && (_organizationId != null) && !organizationId.equals(_organizationId))) { if (!XSS_ALLOW_ORGANIZATIONID) { organizationId = XSSUtil.strip(organizationId); } _organizationId = organizationId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/OrgGroupRoleModel.java/buggy/portal-ejb/src/com/liferay/portal/model/OrgGroupRoleModel.java |
|
setModified(true); | public void setRoleId(String roleId) { if (((roleId == null) && (_roleId != null)) || ((roleId != null) && (_roleId == null)) || ((roleId != null) && (_roleId != null) && !roleId.equals(_roleId))) { if (!XSS_ALLOW_ROLEID) { roleId = XSSUtil.strip(roleId); } _roleId = roleId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/OrgGroupRoleModel.java/buggy/portal-ejb/src/com/liferay/portal/model/OrgGroupRoleModel.java |
|
} else if (currentContent instanceof FloatedBlockContent) { bounds.height += new_inline.height; | public static void layoutContent(Context c, Box box, List contentList) { // Uu.p("+ InlineLayout.layoutContent(): " + box); Rectangle bounds = new Rectangle(); bounds.width = c.getExtents().width; bounds.width -= box.margin.left + box.border.left + box.padding.left + box.padding.right + box.border.right + box.margin.right; validateBounds(bounds); bounds.x = 0; bounds.y = 0; bounds.height = 0; // prepare remaining width and first linebox int remaining_width = bounds.width; LineBox curr_line = newLine(box, bounds, null); c.setFirstLine(true); // account for text-indent CalculatedStyle parentStyle = c.getCurrentStyle(); remaining_width = TextIndent.doTextIndent(parentStyle, remaining_width, curr_line); // more setup LineBox prev_line = new LineBox(); prev_line.setParent(box); prev_line.y = bounds.y; prev_line.height = 0; InlineBox prev_inline = null; InlineBox prev_align_inline = null; // adjust the first line for float tabs remaining_width = FloatUtil.adjustForTab(c, prev_line, remaining_width); CalculatedStyle currentStyle = parentStyle; boolean isFirstLetter = true; List pendingPushStyles = null; // loop until no more nodes while (contentList.size() > 0) { Object o = contentList.get(0); contentList.remove(0); if (o instanceof FirstLineStyle) {//can actually only be the first object in list box.firstLineStyle = ((FirstLineStyle) o).getStyle(); continue; } if (o instanceof FirstLetterStyle) {//can actually only be the first or second object in list box.firstLetterStyle = ((FirstLetterStyle) o).getStyle(); continue; } if (o instanceof StylePush) { c.pushStyle(((StylePush) o).getStyle()); if (pendingPushStyles == null) pendingPushStyles = new LinkedList(); pendingPushStyles.add((StylePush) o); continue; } if (o instanceof StylePop) { c.popStyle(); if (pendingPushStyles != null && pendingPushStyles.size() != 0) { pendingPushStyles.remove(pendingPushStyles.size() - 1);//was a redundant one } else { if (prev_inline != null) { if (prev_inline.popstyles == null) prev_inline.popstyles = new LinkedList(); prev_inline.popstyles.add(o); } } continue; } Content currentContent = (Content) o; if (currentContent.getStyle() != null) c.pushStyle(currentContent.getStyle()); // loop until no more text in this node while (true) { if (currentContent instanceof AbsolutelyPositionedContent) { // Uu.p("this might be a problem, but it could just be an absolute block"); // result = new BoxLayout().layout(c,content); Box absolute = Absolute.generateAbsoluteBox(c, currentContent); curr_line.addChild(absolute); break; } // debugging check if (bounds.width < 0) { Uu.p("bounds width = " + bounds.width); Uu.dump_stack(); System.exit(-1); } // the crash warning code if (bounds.width < 1) { Uu.p("warning. width < 1 " + bounds.width); } // test if there is no more text in the current text node // if there is a prev, and if the prev was part of this current node if (prev_inline != null && prev_inline.content == currentContent) { if (isEndOfBlock(prev_inline, currentContent)) { break; } } currentStyle = c.getCurrentStyle(); // look at current inline // break off the longest section that will fit InlineBox new_inline = calculateInline(c, currentContent, remaining_width, bounds.width, prev_inline, prev_align_inline, isFirstLetter, box.firstLetterStyle, box.firstLineStyle); // Uu.p("got back inline: " + new_inline); // skipp empty inlines if (isNormalInline(currentContent)) { if (new_inline.getSubstring().equals("")) break; } // Uu.p("current line = " + curr_line); isFirstLetter = false; // if this inline needs to be on a new line if (new_inline.break_before && !new_inline.floated) { // Uu.p("break before"); remaining_width = bounds.width; saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, false); bounds.height += curr_line.height; prev_line = curr_line; curr_line = newLine(box, bounds, prev_line); remaining_width = FloatUtil.adjustForTab(c, curr_line, remaining_width); //have to discard it and recalculate, particularly if this was the first line //HACK: is my thinking straight? - tobe prev_align_inline.break_after = true; continue; } isFirstLetter = false; new_inline.pushstyles = pendingPushStyles; pendingPushStyles = null; // save the new inline to the list // Uu.p("adding inline child: " + new_inline); curr_line.addInlineChild(c, new_inline); // calc new height of the line // don't count floats, absolutes, and inline-blocks if (isNormalInline(currentContent)) { adjustLineHeight(curr_line, new_inline); } // calc new width of the line curr_line.width += new_inline.width; // reduce the available width remaining_width = remaining_width - new_inline.width; // if the last inline was at the end of a line, then go to next line if (new_inline.break_after) { // Uu.p("break after"); // then remaining_width = max_width remaining_width = bounds.width; // save the line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, false); // increase bounds height to account for the new line bounds.height += curr_line.height; prev_line = curr_line; curr_line = newLine(box, bounds, prev_line); remaining_width = FloatUtil.adjustForTab(c, curr_line, remaining_width); } // set the inline to use for left alignment if (!isOutsideFlow(currentContent)) { prev_align_inline = new_inline; // } } prev_inline = new_inline; } if (currentContent.getStyle() != null) c.popStyle(); } // save the final line saveLine(curr_line, currentStyle, prev_line, bounds.width, bounds.x, c, box, true); finishBlock(box, curr_line, bounds); // Uu.p("- InlineLayout.layoutContent(): " + box); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3f42b421383cc638581563923e0f4301d1a776e8/InlineLayout.java/buggy/src/java/org/xhtmlrenderer/layout/InlineLayout.java |
|
return getBodyNode().eval(ruby, self); | return self.eval(getBodyNode()); | public RubyObject eval(Ruby ruby, RubyObject self) { ruby.setSourceLine(getLine()); if (getConditionNode().eval(ruby, self).isTrue()) { return getBodyNode().eval(ruby, self); } else { return getElseNode().eval(ruby, self); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12748a4b8db7fd4836cd04c81e3cf2343735bfb6/IfNode.java/buggy/org/jruby/nodes/IfNode.java |
return getElseNode().eval(ruby, self); | return self.eval(getElseNode()); | public RubyObject eval(Ruby ruby, RubyObject self) { ruby.setSourceLine(getLine()); if (getConditionNode().eval(ruby, self).isTrue()) { return getBodyNode().eval(ruby, self); } else { return getElseNode().eval(ruby, self); } } | 50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/12748a4b8db7fd4836cd04c81e3cf2343735bfb6/IfNode.java/buggy/org/jruby/nodes/IfNode.java |
getFile().getFolder(getController().getFolderRepository()) .getStatistic().getDownloadCounter().chunkTransferred(chunk); | FolderStatistic stat = getFile().getFolder(getController().getFolderRepository()) .getStatistic(); if (stat != null) { stat.getDownloadCounter().chunkTransferred(chunk); } | public synchronized void addChunk(FileChunk chunk) { if (chunk == null) { return; } if (!isStarted()) { // donwload begins to start setStarted(); } lastTouch.setTime(System.currentTimeMillis()); if (super.isBroken()) { return; } // check tempfile File tempFile = getTempFile(); // create subdirs File subdirs = tempFile.getParentFile(); if (!subdirs.exists()) { // TODO check if works else give warning because of invalid // directory name // and move to blacklist subdirs.mkdirs(); log().verbose("Subdirectory created: " + subdirs); } if (tempFile.exists() && chunk.offset == 0) { // download started from offset 0 new, remove file, // "erase and rewind" ;) if (!tempFile.delete()) { log().error( "Unable to removed broken tempfile for download: " + tempFile.getAbsolutePath()); tempFileError = true; return; } } if (!tempFile.exists()) { try { // TODO check if works else give warning because of invalid // filename or diskfull? // and move to blacklist tempFile.createNewFile(); } catch (IOException e) { log().error( "Unable to create/open tempfile for donwload: " + tempFile.getAbsolutePath() + ". " + e.getMessage()); tempFileError = true; return; } } // log().warn("Tempfile exists ? " + tempFile.exists() + ", " + // tempFile.getAbsolutePath()); if (!tempFile.canWrite()) { log().error( "Unable to write to tempfile for donwload: " + tempFile.getAbsolutePath()); tempFileError = true; return; } try { if (raf == null) { raf = new RandomAccessFile(tempFile, "rw"); } // check chunk validity if (chunk.offset < 0 || chunk.offset > getFile().getSize() || chunk.data == null || (chunk.data.length + chunk.offset > getFile().getSize()) || chunk.offset != raf.length()) { String reason = "unknown"; if (chunk.offset < 0 || chunk.offset > getFile().getSize()) { reason = "Illegal offset " + chunk.offset; } if (chunk.data == null) { reason = "Chunk data null"; } else { if (chunk.data.length + chunk.offset > getFile().getSize()) { reason = "Chunk exceeds filesize"; } if (chunk.offset != raf.length()) { reason = "Offset does not matches the current tempfile size. offset: " + chunk.offset + ", filesize: " + tempFile.length(); } } log().error( "Received illegal chunk. " + chunk + ". Reason: " + reason); // Abort dl abort(); return; } // add bytes to transferred status getCounter().chunkTransferred(chunk); getFile().getFolder(getController().getFolderRepository()) .getStatistic().getDownloadCounter().chunkTransferred(chunk); // FIXME: Parse offset/not expect linar download // FIXME: Don't use a BufferedOutputStream // FIXME: Don't open the file over and over again /* Old code: OutputStream fOut = new BufferedOutputStream(new FileOutputStream( tempFile, true)); fOut.write(chunk.data); fOut.close(); */ // Testing code: raf.seek(chunk.offset); raf.write(chunk.data); // Set lastmodified date of file info /* * log().warn( "Setting lastmodified of tempfile for: " + * getFile().toDetailString()); */ // FIXME: This generates alot of head-jumps on the harddisc! tempFile.setLastModified(getFile().getModifiedDate().getTime()); log().verbose( "Wrote " + chunk.data.length + " bytes to tempfile " + tempFile.getAbsolutePath()); } catch (IOException e) { // TODO: Disk full warning ? log().error( "Error while writing to tempfile for donwload: " + tempFile.getAbsolutePath() + ". " + e.getMessage()); log().verbose(e); tempFileError = true; return; } // FIXME: currently the trigger to stop dl is // the arrival of a chunk which matches exactly to // the last chunk of the file if (!completed) { completed = chunk.data.length + chunk.offset == getFile().getSize(); if (completed) { // Finish download log().debug("Download completed: " + this); // Inform transfer manager getTransferManager().setCompleted(this); } } } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/b4fb3f422a922682069c3b076e76eaf4b8dadac3/Download.java/buggy/src/main/de/dal33t/powerfolder/transfer/Download.java |
categoryIdsQuery.add(new TermQuery(new Term( "categoryId", categoryIds[i])), false, false); | Term term = new Term("categoryId", categoryIds[i]); TermQuery termQuery = new TermQuery(term); categoryIdsQuery.add(termQuery, BooleanClause.Occur.SHOULD); | public Hits search( String companyId, String groupId, String userId, String[] categoryIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.PORTLET_ID, Indexer.PORTLET_ID); if (Validator.isNotNull(groupId)) { LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.GROUP_ID, groupId); } if (Validator.isNotNull(userId)) { LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.USER_ID, userId); } if ((categoryIds != null) && (categoryIds.length > 0)) { BooleanQuery categoryIdsQuery = new BooleanQuery(); for (int i = 0; i < categoryIds.length; i++) { categoryIdsQuery.add(new TermQuery(new Term( "categoryId", categoryIds[i])), false, false); } booleanQuery.add(categoryIdsQuery, true, false); } LuceneUtil.addTerm(booleanQuery, LuceneFields.CONTENT, keywords); Searcher searcher = LuceneUtil.getSearcher(companyId); Query query = QueryParser.parse( booleanQuery.toString(), LuceneFields.CONTENT, LuceneUtil.getAnalyzer()); hits.recordHits(searcher.search(query)); return hits; } catch (IOException ioe) { throw new SystemException(ioe); } catch (ParseException pe) { throw new SystemException(pe); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/fa825e278fff56c5878f6bf4ebfe8e8c47fa5e6f/BlogsEntryLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/blogs/service/impl/BlogsEntryLocalServiceImpl.java |
booleanQuery.add(categoryIdsQuery, true, false); | booleanQuery.add(categoryIdsQuery, BooleanClause.Occur.MUST); | public Hits search( String companyId, String groupId, String userId, String[] categoryIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.PORTLET_ID, Indexer.PORTLET_ID); if (Validator.isNotNull(groupId)) { LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.GROUP_ID, groupId); } if (Validator.isNotNull(userId)) { LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.USER_ID, userId); } if ((categoryIds != null) && (categoryIds.length > 0)) { BooleanQuery categoryIdsQuery = new BooleanQuery(); for (int i = 0; i < categoryIds.length; i++) { categoryIdsQuery.add(new TermQuery(new Term( "categoryId", categoryIds[i])), false, false); } booleanQuery.add(categoryIdsQuery, true, false); } LuceneUtil.addTerm(booleanQuery, LuceneFields.CONTENT, keywords); Searcher searcher = LuceneUtil.getSearcher(companyId); Query query = QueryParser.parse( booleanQuery.toString(), LuceneFields.CONTENT, LuceneUtil.getAnalyzer()); hits.recordHits(searcher.search(query)); return hits; } catch (IOException ioe) { throw new SystemException(ioe); } catch (ParseException pe) { throw new SystemException(pe); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/fa825e278fff56c5878f6bf4ebfe8e8c47fa5e6f/BlogsEntryLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/blogs/service/impl/BlogsEntryLocalServiceImpl.java |
Query query = QueryParser.parse( booleanQuery.toString(), LuceneFields.CONTENT, LuceneUtil.getAnalyzer()); hits.recordHits(searcher.search(query)); | hits.recordHits(searcher.search(booleanQuery)); | public Hits search( String companyId, String groupId, String userId, String[] categoryIds, String keywords) throws SystemException { try { Hits hits = new Hits(); if (Validator.isNull(keywords)) { return hits; } BooleanQuery booleanQuery = new BooleanQuery(); LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.PORTLET_ID, Indexer.PORTLET_ID); if (Validator.isNotNull(groupId)) { LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.GROUP_ID, groupId); } if (Validator.isNotNull(userId)) { LuceneUtil.addRequiredTerm( booleanQuery, LuceneFields.USER_ID, userId); } if ((categoryIds != null) && (categoryIds.length > 0)) { BooleanQuery categoryIdsQuery = new BooleanQuery(); for (int i = 0; i < categoryIds.length; i++) { categoryIdsQuery.add(new TermQuery(new Term( "categoryId", categoryIds[i])), false, false); } booleanQuery.add(categoryIdsQuery, true, false); } LuceneUtil.addTerm(booleanQuery, LuceneFields.CONTENT, keywords); Searcher searcher = LuceneUtil.getSearcher(companyId); Query query = QueryParser.parse( booleanQuery.toString(), LuceneFields.CONTENT, LuceneUtil.getAnalyzer()); hits.recordHits(searcher.search(query)); return hits; } catch (IOException ioe) { throw new SystemException(ioe); } catch (ParseException pe) { throw new SystemException(pe); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/fa825e278fff56c5878f6bf4ebfe8e8c47fa5e6f/BlogsEntryLocalServiceImpl.java/clean/portal-ejb/src/com/liferay/portlet/blogs/service/impl/BlogsEntryLocalServiceImpl.java |
if (element.getName().equals(TAG_KEYWORD_REFERENCE)) { return true; } | public boolean readElement(IConfigurationElement element) { if (element.getName().equals(TAG_PAGE)) { processPageElement(element); readElementChildren(element); return true; } if (element.getName().equals(TAG_FILTER)) { return true; } return false; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/050e3808f129e258f207bc55a906768361d0c2af/PropertyPagesRegistryReader.java/buggy/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PropertyPagesRegistryReader.java |
|
public CascadedStyle getPseudoElementStyle(Element e, String pseudoElement) { | public CascadedStyle getPseudoElementStyle(Node node, String pseudoElement) { Element e = null; if (node.getNodeType() == Node.ELEMENT_NODE) { e = (Element) node; } else { e = (Element) node.getParentNode(); } | public CascadedStyle getPseudoElementStyle(Element e, String pseudoElement) { return _tbStyleMap.getPECascadedStyle(e, pseudoElement); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/810d20da09b135490001c813971ac26af6d13f00/TBStyleReference.java/clean/src/java/org/xhtmlrenderer/css/bridge/TBStyleReference.java |
public static int adjustForTab( Context c, LineBox prev_line, int remaining_width ) { BlockFormattingContext bfc = c.getBlockFormattingContext(); remaining_width -= bfc.getLeftFloatDistance( prev_line ); remaining_width -= bfc.getRightFloatDistance( prev_line ); // Uu.p("adjusting the line by: " + remaining_width); return remaining_width; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3f7f1ad563975d526a941d1eb9629a543d42be24/FloatUtil.java/clean/src/java/org/xhtmlrenderer/layout/inline/FloatUtil.java |
||
public static InlineBox generateFloatedBlockInlineBox( Context c, Content content, int avail, LineBox curr_line ) { // Uu.p("generate floated block inline box: avail = " + avail); //Uu.p("generate floated block inline box"); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents( new Rectangle( oe ) ); //BlockBox block = (BlockBox)layout.layout( c, (Element)node ); InlineBlockBox inline_block = new InlineBlockBox(); inline_block.element = content.getElement(); Boxing.layout( c, inline_block, content ); //HACK: tobe 2004-12-22 - guessing here // calculate the float property if ( c.getCurrentStyle().isIdent( CSSName.FLOAT, IdentValue.NONE ) ) { throw new XRRuntimeException( "Invalid call to generateFloatedBlockInlineBox(); where float: none " ); } inline_block.floated = true; IdentValue ident = c.getCurrentStyle().getIdent( CSSName.FLOAT ); if ( ident == IdentValue.LEFT ) { inline_block.x = 0; } if ( ident == IdentValue.RIGHT ) { inline_block.x = oe.width - inline_block.width; } //HACK: tobe 2004-12-22 end inline_block.y = curr_line.y; //Uu.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle( inline_block.x, inline_block.y, inline_block.width, inline_block.height ); c.setExtents( oe ); //InlineBox box = // Uu.p("before newbox block = " + inline_block); int x = inline_block.x; int y = inline_block.y; CalculatedStyle style = c.getCurrentStyle(); //TODO: check if floats should be affected by vertical alignment inline_block.x = x; inline_block.y = y; inline_block.width = bounds.width; inline_block.height = bounds.height; inline_block.break_after = false; inline_block.floated = true; if ( inline_block.width > avail ) { inline_block.break_before = true; } return inline_block; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3f7f1ad563975d526a941d1eb9629a543d42be24/FloatUtil.java/clean/src/java/org/xhtmlrenderer/layout/inline/FloatUtil.java |
||
public static InlineBox generateFloatedBlockInlineBox( Context c, Content content, int avail, LineBox curr_line ) { // Uu.p("generate floated block inline box: avail = " + avail); //Uu.p("generate floated block inline box"); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents( new Rectangle( oe ) ); //BlockBox block = (BlockBox)layout.layout( c, (Element)node ); InlineBlockBox inline_block = new InlineBlockBox(); inline_block.element = content.getElement(); Boxing.layout( c, inline_block, content ); //HACK: tobe 2004-12-22 - guessing here // calculate the float property if ( c.getCurrentStyle().isIdent( CSSName.FLOAT, IdentValue.NONE ) ) { throw new XRRuntimeException( "Invalid call to generateFloatedBlockInlineBox(); where float: none " ); } inline_block.floated = true; IdentValue ident = c.getCurrentStyle().getIdent( CSSName.FLOAT ); if ( ident == IdentValue.LEFT ) { inline_block.x = 0; } if ( ident == IdentValue.RIGHT ) { inline_block.x = oe.width - inline_block.width; } //HACK: tobe 2004-12-22 end inline_block.y = curr_line.y; //Uu.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle( inline_block.x, inline_block.y, inline_block.width, inline_block.height ); c.setExtents( oe ); //InlineBox box = // Uu.p("before newbox block = " + inline_block); int x = inline_block.x; int y = inline_block.y; CalculatedStyle style = c.getCurrentStyle(); //TODO: check if floats should be affected by vertical alignment inline_block.x = x; inline_block.y = y; inline_block.width = bounds.width; inline_block.height = bounds.height; inline_block.break_after = false; inline_block.floated = true; if ( inline_block.width > avail ) { inline_block.break_before = true; } return inline_block; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3f7f1ad563975d526a941d1eb9629a543d42be24/FloatUtil.java/clean/src/java/org/xhtmlrenderer/layout/inline/FloatUtil.java |
||
inline_block.x = 0; | public static InlineBox generateFloatedBlockInlineBox( Context c, Content content, int avail, LineBox curr_line ) { // Uu.p("generate floated block inline box: avail = " + avail); //Uu.p("generate floated block inline box"); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents( new Rectangle( oe ) ); //BlockBox block = (BlockBox)layout.layout( c, (Element)node ); InlineBlockBox inline_block = new InlineBlockBox(); inline_block.element = content.getElement(); Boxing.layout( c, inline_block, content ); //HACK: tobe 2004-12-22 - guessing here // calculate the float property if ( c.getCurrentStyle().isIdent( CSSName.FLOAT, IdentValue.NONE ) ) { throw new XRRuntimeException( "Invalid call to generateFloatedBlockInlineBox(); where float: none " ); } inline_block.floated = true; IdentValue ident = c.getCurrentStyle().getIdent( CSSName.FLOAT ); if ( ident == IdentValue.LEFT ) { inline_block.x = 0; } if ( ident == IdentValue.RIGHT ) { inline_block.x = oe.width - inline_block.width; } //HACK: tobe 2004-12-22 end inline_block.y = curr_line.y; //Uu.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle( inline_block.x, inline_block.y, inline_block.width, inline_block.height ); c.setExtents( oe ); //InlineBox box = // Uu.p("before newbox block = " + inline_block); int x = inline_block.x; int y = inline_block.y; CalculatedStyle style = c.getCurrentStyle(); //TODO: check if floats should be affected by vertical alignment inline_block.x = x; inline_block.y = y; inline_block.width = bounds.width; inline_block.height = bounds.height; inline_block.break_after = false; inline_block.floated = true; if ( inline_block.width > avail ) { inline_block.break_before = true; } return inline_block; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3f7f1ad563975d526a941d1eb9629a543d42be24/FloatUtil.java/clean/src/java/org/xhtmlrenderer/layout/inline/FloatUtil.java |
|
public static InlineBox generateFloatedBlockInlineBox( Context c, Content content, int avail, LineBox curr_line ) { // Uu.p("generate floated block inline box: avail = " + avail); //Uu.p("generate floated block inline box"); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents( new Rectangle( oe ) ); //BlockBox block = (BlockBox)layout.layout( c, (Element)node ); InlineBlockBox inline_block = new InlineBlockBox(); inline_block.element = content.getElement(); Boxing.layout( c, inline_block, content ); //HACK: tobe 2004-12-22 - guessing here // calculate the float property if ( c.getCurrentStyle().isIdent( CSSName.FLOAT, IdentValue.NONE ) ) { throw new XRRuntimeException( "Invalid call to generateFloatedBlockInlineBox(); where float: none " ); } inline_block.floated = true; IdentValue ident = c.getCurrentStyle().getIdent( CSSName.FLOAT ); if ( ident == IdentValue.LEFT ) { inline_block.x = 0; } if ( ident == IdentValue.RIGHT ) { inline_block.x = oe.width - inline_block.width; } //HACK: tobe 2004-12-22 end inline_block.y = curr_line.y; //Uu.p("got a block box from the sub layout: " + block); Rectangle bounds = new Rectangle( inline_block.x, inline_block.y, inline_block.width, inline_block.height ); c.setExtents( oe ); //InlineBox box = // Uu.p("before newbox block = " + inline_block); int x = inline_block.x; int y = inline_block.y; CalculatedStyle style = c.getCurrentStyle(); //TODO: check if floats should be affected by vertical alignment inline_block.x = x; inline_block.y = y; inline_block.width = bounds.width; inline_block.height = bounds.height; inline_block.break_after = false; inline_block.floated = true; if ( inline_block.width > avail ) { inline_block.break_before = true; } return inline_block; } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/3f7f1ad563975d526a941d1eb9629a543d42be24/FloatUtil.java/clean/src/java/org/xhtmlrenderer/layout/inline/FloatUtil.java |
||
setModified(true); | public void setCompanyId(String companyId) { if (((companyId == null) && (_companyId != null)) || ((companyId != null) && (_companyId == null)) || ((companyId != null) && (_companyId != null) && !companyId.equals(_companyId))) { if (!XSS_ALLOW_COMPANYID) { companyId = XSSUtil.strip(companyId); } _companyId = companyId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setCreateDate(Date createDate) { if (((createDate == null) && (_createDate != null)) || ((createDate != null) && (_createDate == null)) || ((createDate != null) && (_createDate != null) && !createDate.equals(_createDate))) { _createDate = createDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setDescription(String description) { if (((description == null) && (_description != null)) || ((description != null) && (_description == null)) || ((description != null) && (_description != null) && !description.equals(_description))) { if (!XSS_ALLOW_DESCRIPTION) { description = XSSUtil.strip(description); } _description = description; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setExpirationDate(Date expirationDate) { if (((expirationDate == null) && (_expirationDate != null)) || ((expirationDate != null) && (_expirationDate == null)) || ((expirationDate != null) && (_expirationDate != null) && !expirationDate.equals(_expirationDate))) { _expirationDate = expirationDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setGroupId(String groupId) { if (((groupId == null) && (_groupId != null)) || ((groupId != null) && (_groupId == null)) || ((groupId != null) && (_groupId != null) && !groupId.equals(_groupId))) { if (!XSS_ALLOW_GROUPID) { groupId = XSSUtil.strip(groupId); } _groupId = groupId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setLastVoteDate(Date lastVoteDate) { if (((lastVoteDate == null) && (_lastVoteDate != null)) || ((lastVoteDate != null) && (_lastVoteDate == null)) || ((lastVoteDate != null) && (_lastVoteDate != null) && !lastVoteDate.equals(_lastVoteDate))) { _lastVoteDate = lastVoteDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setModifiedDate(Date modifiedDate) { if (((modifiedDate == null) && (_modifiedDate != null)) || ((modifiedDate != null) && (_modifiedDate == null)) || ((modifiedDate != null) && (_modifiedDate != null) && !modifiedDate.equals(_modifiedDate))) { _modifiedDate = modifiedDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setQuestionId(String questionId) { if (((questionId == null) && (_questionId != null)) || ((questionId != null) && (_questionId == null)) || ((questionId != null) && (_questionId != null) && !questionId.equals(_questionId))) { if (!XSS_ALLOW_QUESTIONID) { questionId = XSSUtil.strip(questionId); } _questionId = questionId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setTitle(String title) { if (((title == null) && (_title != null)) || ((title != null) && (_title == null)) || ((title != null) && (_title != null) && !title.equals(_title))) { if (!XSS_ALLOW_TITLE) { title = XSSUtil.strip(title); } _title = title; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setUserId(String userId) { if (((userId == null) && (_userId != null)) || ((userId != null) && (_userId == null)) || ((userId != null) && (_userId != null) && !userId.equals(_userId))) { if (!XSS_ALLOW_USERID) { userId = XSSUtil.strip(userId); } _userId = userId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
setModified(true); | public void setUserName(String userName) { if (((userName == null) && (_userName != null)) || ((userName != null) && (_userName == null)) || ((userName != null) && (_userName != null) && !userName.equals(_userName))) { if (!XSS_ALLOW_USERNAME) { userName = XSSUtil.strip(userName); } _userName = userName; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/PollsQuestionModel.java/clean/portal-ejb/src/com/liferay/portlet/polls/model/PollsQuestionModel.java |
|
public void linkClicked( Box box, MouseEvent evt ) { | public void linkClicked(String uri) { | public void linkClicked( Box box, MouseEvent evt ) { panel.repaint(); try { Element elem = box.element; if ( elem.hasAttribute( "href" ) ) { panel.setDocumentRelative( elem.getAttribute( "href" ) ); } } catch ( Exception ex ) { Uu.p( ex ); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0bcb35d367c0f0b2a89eb6aabedfe9807525ad3a/LinkListener.java/buggy/src/java/org/xhtmlrenderer/swing/LinkListener.java |
try { Element elem = box.element; if ( elem.hasAttribute( "href" ) ) { panel.setDocumentRelative( elem.getAttribute( "href" ) ); } } catch ( Exception ex ) { Uu.p( ex ); } | panel.setDocumentRelative(uri); | public void linkClicked( Box box, MouseEvent evt ) { panel.repaint(); try { Element elem = box.element; if ( elem.hasAttribute( "href" ) ) { panel.setDocumentRelative( elem.getAttribute( "href" ) ); } } catch ( Exception ex ) { Uu.p( ex ); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/0bcb35d367c0f0b2a89eb6aabedfe9807525ad3a/LinkListener.java/buggy/src/java/org/xhtmlrenderer/swing/LinkListener.java |
account.setUserId(StringPool.BLANK); | account.setUserId(User.getDefaultUserId(companyId)); | public Company updateCompany( String companyId, String portalURL, String homeURL, String mx, String name, String legalName, String legalId, String legalType, String sicCode, String tickerSymbol, String industry, String type, String size) throws PortalException, SystemException { // Company Date now = new Date(); validate(portalURL, homeURL, name); Company company = CompanyUtil.findByPrimaryKey(companyId); company.setPortalURL(portalURL); company.setHomeURL(homeURL); if (GetterUtil.getBoolean(PropsUtil.get(PropsUtil.MAIL_MX_UPDATE))) { company.setMx(mx); } CompanyUtil.update(company); // Account String accountId = companyId; Account account = null; try { account = AccountUtil.findByPrimaryKey(accountId); } catch (NoSuchAccountException nsae) { account = AccountUtil.create(accountId); account.setCreateDate(now); account.setCompanyId(companyId); account.setUserId(StringPool.BLANK); account.setUserName(StringPool.BLANK); } account.setModifiedDate(now); account.setName(name); account.setLegalName(legalName); account.setLegalId(legalId); account.setLegalType(legalType); account.setSicCode(sicCode); account.setTickerSymbol(tickerSymbol); account.setIndustry(industry); account.setType(type); account.setSize(size); AccountUtil.update(account); return company; } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f8f4a2d786af7a3d5ae7d85c2a7c4ea88605c61e/CompanyLocalServiceImpl.java/buggy/portal-ejb/src/com/liferay/portal/service/impl/CompanyLocalServiceImpl.java |
resetText(); | setFilterText(initialText); textChanged(); listener = new FocusListener() { public void focusGained(FocusEvent event) { selectAll(); getFilterControl().removeFocusListener(listener); } /* * (non-Javadoc) * * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent) */ public void focusLost(FocusEvent e) { } }; getFilterControl().addFocusListener(listener); | public void setInitialText(String text) { initialText = text; resetText(); } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/185051d95063beb518a0b20ba3a638261ddf0988/FilteredTree.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredTree.java |
if(selection instanceof IStructuredSelection) { Object[] newSelection = ((IStructuredSelection)selection).toArray(); Object[] expandedElements = commonViewer.getExpandedElements(); Object[] newExpandedElements = new Object[newSelection.length + expandedElements.length]; System.arraycopy(expandedElements, 0, newExpandedElements, 0, expandedElements.length); System.arraycopy(newSelection, 0, newExpandedElements, expandedElements.length, newSelection.length); commonViewer.setExpandedElements(newExpandedElements); } | public void selectReveal(ISelection selection) { if (commonViewer != null) { commonViewer.setSelection(selection, true); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/760f9bf6c2e4d21502cb533a888c5fe64e58bdf8/CommonNavigator.java/clean/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java |
|
setModified(true); | public void setCompanyId(String companyId) { if (((companyId == null) && (_companyId != null)) || ((companyId != null) && (_companyId == null)) || ((companyId != null) && (_companyId != null) && !companyId.equals(_companyId))) { if (!XSS_ALLOW_COMPANYID) { companyId = XSSUtil.strip(companyId); } _companyId = companyId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setCreateDate(Date createDate) { if (((createDate == null) && (_createDate != null)) || ((createDate != null) && (_createDate == null)) || ((createDate != null) && (_createDate != null) && !createDate.equals(_createDate))) { _createDate = createDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setDescription(String description) { if (((description == null) && (_description != null)) || ((description != null) && (_description == null)) || ((description != null) && (_description != null) && !description.equals(_description))) { if (!XSS_ALLOW_DESCRIPTION) { description = XSSUtil.strip(description); } _description = description; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setFolderId(String folderId) { if (((folderId == null) && (_folderId != null)) || ((folderId != null) && (_folderId == null)) || ((folderId != null) && (_folderId != null) && !folderId.equals(_folderId))) { if (!XSS_ALLOW_FOLDERID) { folderId = XSSUtil.strip(folderId); } _folderId = folderId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setGroupId(String groupId) { if (((groupId == null) && (_groupId != null)) || ((groupId != null) && (_groupId == null)) || ((groupId != null) && (_groupId != null) && !groupId.equals(_groupId))) { if (!XSS_ALLOW_GROUPID) { groupId = XSSUtil.strip(groupId); } _groupId = groupId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setModifiedDate(Date modifiedDate) { if (((modifiedDate == null) && (_modifiedDate != null)) || ((modifiedDate != null) && (_modifiedDate == null)) || ((modifiedDate != null) && (_modifiedDate != null) && !modifiedDate.equals(_modifiedDate))) { _modifiedDate = modifiedDate; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setName(String name) { if (((name == null) && (_name != null)) || ((name != null) && (_name == null)) || ((name != null) && (_name != null) && !name.equals(_name))) { if (!XSS_ALLOW_NAME) { name = XSSUtil.strip(name); } _name = name; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setParentFolderId(String parentFolderId) { if (((parentFolderId == null) && (_parentFolderId != null)) || ((parentFolderId != null) && (_parentFolderId == null)) || ((parentFolderId != null) && (_parentFolderId != null) && !parentFolderId.equals(_parentFolderId))) { if (!XSS_ALLOW_PARENTFOLDERID) { parentFolderId = XSSUtil.strip(parentFolderId); } _parentFolderId = parentFolderId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
setModified(true); | public void setUserId(String userId) { if (((userId == null) && (_userId != null)) || ((userId != null) && (_userId == null)) || ((userId != null) && (_userId != null) && !userId.equals(_userId))) { if (!XSS_ALLOW_USERID) { userId = XSSUtil.strip(userId); } _userId = userId; setModified(true); } } | 57692 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57692/f4d6afc6707f57fd84bf6b624f0c119657b0a766/IGFolderModel.java/buggy/portal-ejb/src/com/liferay/portlet/imagegallery/model/IGFolderModel.java |
|
log().debug(dirStr); | public void doRequest(HTTPRequest httpRequest) { context.put("controller", getController()); FolderRepository repo = getController().getFolderRepository(); context.put("folderRepository", repo); Map<String, String> params = httpRequest.getQueryParams(); List<Folder> folders = repo.getFoldersAsSortedList(); if (params != null && params.containsKey("FolderID")) { for (Folder folder : folders) { if (folder.getId().equals(params.get("FolderID"))) { context.put("folder", folder); if (params.containsKey("directory")) { try { String dirStr = URLDecoder.decode(params .get("directory"), "UTF-8"); Directory directory = folder.getDirectory(); if (!dirStr.equals("/")) { log().debug(dirStr); directory = directory.getSubDirectory(dirStr); } if (directory == null) { context.put("directory", folder.getDirectory()); } else { context.put("directory", directory); } } catch (UnsupportedEncodingException e) { log().error(e); } } else { context.put("directory", folder.getDirectory()); } log().debug("folder " + params.get("FolderID") + " found"); break; } } } context.put("sortColumn", params.get("sortColumn")); boolean sortAscending = params.get("sortOrder").equals(ASCENDING); if (sortAscending) { context.put("sortOrder", ASCENDING); context.put("nextSortOrder", DESCENDING); } else { context.put("sortOrder", DESCENDING); context.put("nextSortOrder", ASCENDING); } Directory directory = (Directory) context.get("directory"); if (directory != null) { FileInfoComparator comparator = null; String sortColumn = params.get("sortColumn"); if (sortColumn.equals("name")) { comparator = FileInfoComparator .getComparator(FileInfoComparator.BY_NAME); } else if (sortColumn.equals("size")) { comparator = FileInfoComparator .getComparator(FileInfoComparator.BY_SIZE); } else if (sortColumn.equals("date")) { comparator = FileInfoComparator .getComparator(FileInfoComparator.BY_MODIFIED_DATE); } List<FileInfo> files = directory.getValidFiles(); if (sortAscending) { Collections.sort(files, comparator); } else { Collections.sort(files, new ReverseComparator(comparator)); } context.put("files", files); } } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/d9e0749004d8899201bb266b564fc2f584a94e8a/FolderHandler.java/buggy/src/main/de/dal33t/powerfolder/web/FolderHandler.java |
|
log().debug("folder " + params.get("FolderID") + " found"); | public void doRequest(HTTPRequest httpRequest) { context.put("controller", getController()); FolderRepository repo = getController().getFolderRepository(); context.put("folderRepository", repo); Map<String, String> params = httpRequest.getQueryParams(); List<Folder> folders = repo.getFoldersAsSortedList(); if (params != null && params.containsKey("FolderID")) { for (Folder folder : folders) { if (folder.getId().equals(params.get("FolderID"))) { context.put("folder", folder); if (params.containsKey("directory")) { try { String dirStr = URLDecoder.decode(params .get("directory"), "UTF-8"); Directory directory = folder.getDirectory(); if (!dirStr.equals("/")) { log().debug(dirStr); directory = directory.getSubDirectory(dirStr); } if (directory == null) { context.put("directory", folder.getDirectory()); } else { context.put("directory", directory); } } catch (UnsupportedEncodingException e) { log().error(e); } } else { context.put("directory", folder.getDirectory()); } log().debug("folder " + params.get("FolderID") + " found"); break; } } } context.put("sortColumn", params.get("sortColumn")); boolean sortAscending = params.get("sortOrder").equals(ASCENDING); if (sortAscending) { context.put("sortOrder", ASCENDING); context.put("nextSortOrder", DESCENDING); } else { context.put("sortOrder", DESCENDING); context.put("nextSortOrder", ASCENDING); } Directory directory = (Directory) context.get("directory"); if (directory != null) { FileInfoComparator comparator = null; String sortColumn = params.get("sortColumn"); if (sortColumn.equals("name")) { comparator = FileInfoComparator .getComparator(FileInfoComparator.BY_NAME); } else if (sortColumn.equals("size")) { comparator = FileInfoComparator .getComparator(FileInfoComparator.BY_SIZE); } else if (sortColumn.equals("date")) { comparator = FileInfoComparator .getComparator(FileInfoComparator.BY_MODIFIED_DATE); } List<FileInfo> files = directory.getValidFiles(); if (sortAscending) { Collections.sort(files, comparator); } else { Collections.sort(files, new ReverseComparator(comparator)); } context.put("files", files); } } | 51438 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51438/d9e0749004d8899201bb266b564fc2f584a94e8a/FolderHandler.java/buggy/src/main/de/dal33t/powerfolder/web/FolderHandler.java |
|
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
||
public static String capitalizeWords( String text ) { //u.p("start = -"+text+"-"); if ( text.length() == 0 ) { return text; } StringBuffer sb = new StringBuffer(); //u.p("text = -" + text + "-"); // do first letter //u.p("first = " + text.substring(0,1)); /* * if(!text.substring(0,1).equals(" ")) { * sb.append(text.substring(0,1).toUpperCase()); * } */ boolean cap = true; for ( int i = 0; i < text.length(); i++ ) { String ch = text.substring( i, i + 1 ); //u.p("ch = " + ch + " cap = " + cap); if ( cap ) { sb.append( ch.toUpperCase() ); } else { sb.append( ch ); } cap = false; if ( ch.equals( " " ) ) { cap = true; } } //u.p("final = -"+sb.toString()+"-"); if ( sb.toString().length() != text.length() ) { u.p( "error! to strings arent the same length = -" + sb.toString() + "-" + text + "-" ); } return sb.toString(); } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/631ee187cba274ce571d6a7e5b800c58f77b1142/TextUtil.java/clean/src/java/org/xhtmlrenderer/layout/TextUtil.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.