buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public Object getJoinValue(Object fieldVal, Column col, JDBCStore store) { Object o = field.getForeignKey().getConstant(col); if (o != null) return o; col = field.getForeignKey().getPrimaryKeyColumn(col); if (col == null) throw new InternalException(); ...
public Object getJoinValue(Object fieldVal, Column col, JDBCStore store) { Object o = field.getForeignKey().getConstant(col); if (o != null) return o; col = field.getForeignKey().getPrimaryKeyColumn(col); if (col == null) throw new InternalException(); ...
protected Object convertValue(String value) throws ConversionException { return value; }
protected Object convertValue(String value) throws ConversionException { return value != null?value.trim():null; }
public void deselect (int index) { checkWidget(); if (0 < index && index < itemCount) { int [] ids = new int [] {index + 1}; deselect (ids, ids.length); } }
public void deselect (int index) { checkWidget(); if (0 <= index && index < itemCount) { int [] ids = new int [] {index + 1}; deselect (ids, ids.length); } }
public String toString() { if (fDescription == null) { String ret = null; switch (fType) { case WILDCARD_ANY: fDescription = SchemaSymbols.ATTVAL_TWOPOUNDANY; break; case WILDCARD_OTHER: fDescription = SchemaSymb...
public String toString() { if (fDescription == null) { String ret = null; switch (fType) { case WILDCARD_ANY: fDescription = SchemaSymbols.ATTVAL_TWOPOUNDANY; break; case WILDCARD_OTHER: fDescription = SchemaSymb...
private void checkAssertions(List<Assertion> assertions, SampleResult parent, JMeterContext threadContext) { Iterator<Assertion> iter = assertions.iterator(); while (iter.hasNext()) { Assertion assertion = iter.next(); TestBeanHelper.prepare((TestElement) assertion); ...
private void checkAssertions(List<Assertion> assertions, SampleResult parent, JMeterContext threadContext) { Iterator<Assertion> iter = assertions.iterator(); while (iter.hasNext()) { Assertion assertion = iter.next(); TestBeanHelper.prepare((TestElement) assertion); ...
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addExpectedChild(title); title.addExpected...
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addExpectedChild(title); title.addExpected...
protected void connectToServiceFromInfo(IServiceInfo svcInfo) { IServiceProperties props = svcInfo.getServiceProperties(); String type = (String) props.getPropertyString(PROP_CONTAINER_TYPE_NAME); if (type == null || type.equals("")) { type = CollabClient.GENERIC_CONTAINER_CLIENT_NAME; } String username =...
protected void connectToServiceFromInfo(IServiceInfo svcInfo) { IServiceProperties props = svcInfo.getServiceProperties(); String type = (String) props.getPropertyString(PROP_CONTAINER_TYPE_NAME); if (type == null || type.equals("")) { type = CollabClient.GENERIC_CONTAINER_CLIENT_NAME; } String username =...
protected void finishPage(final IProgressMonitor monitor) throws InterruptedException, CoreException { mainPage.saveDialogSettings(); URIClientConnectAction client = null; String groupName = mainPage.getJoinGroupText(); String nickName = mainPage.getNicknameText(); ...
protected void finishPage(final IProgressMonitor monitor) throws InterruptedException, CoreException { mainPage.saveDialogSettings(); URIClientConnectAction client = null; String groupName = mainPage.getJoinGroupText(); String nickName = mainPage.getNicknameText(); ...
public static final Object CONTENTS[][] = { // Internal message formatter messages { "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." }, { "FormatFailed", "An internal error occurred while formatting the following message:\n " }, { "NoValidatorFor", "No validato...
public static final Object CONTENTS[][] = { // Internal message formatter messages { "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." }, { "FormatFailed", "An internal error occurred while formatting the following message:\n " }, { "NoValidatorFor", "No validato...
private boolean verifyTypeParameters(ResolvedType baseType,IScope scope, boolean requireExactType) { ResolvedType genericType = baseType.getGenericType(); if (genericType == null) { // issue message "does not match because baseType.getName() is not generic" scope.message(MessageUtil.warn( WeaverMessages...
private boolean verifyTypeParameters(ResolvedType baseType,IScope scope, boolean requireExactType) { ResolvedType genericType = baseType.getGenericType(); if (genericType == null) { // issue message "does not match because baseType.getName() is not generic" scope.message(MessageUtil.warn( WeaverMessages...
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup<?> group = findParent(CheckGro...
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup<?> group = findParent(CheckGro...
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="radio" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "radio"); final RadioGroup group = findParent(RadioGroup....
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="radio" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "radio"); final RadioGroup group = findParent(RadioGroup....
public static byte[] decode(String encoded) { if (encoded == null) return null; char[] base64Data = encoded.toCharArray(); // remove white spaces int len = removeWhiteSpace(base64Data); if (len%FOURBYTE != 0) { return null;//should be divisi...
public static byte[] decode(String encoded) { if (encoded == null) return null; char[] base64Data = encoded.toCharArray(); // remove white spaces int len = removeWhiteSpace(base64Data); if (len%FOURBYTE != 0) { return null;//should be divisi...
public boolean getGrayed() { checkWidget (); if ((style &SWT.CHECK) != 0) return false; return grayed; }
public boolean getGrayed() { checkWidget (); if ((style &SWT.CHECK) == 0) return false; return grayed; }
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.CONFIG_ELEMENTS }); } }
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.CONFIG_ELEMENTS }); } }
public Collection getMenuCategories() { return null; } }
public Collection<String> getMenuCategories() { return null; } }
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.CONTROLLERS }); } }
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.CONTROLLERS }); } }
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.POST_PROCESSORS }); } }
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.POST_PROCESSORS }); } }
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.PRE_PROCESSORS }); } }
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.PRE_PROCESSORS }); } }
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.SAMPLERS }); } }
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.SAMPLERS }); } }
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.TIMERS }); } } No newline at end of file
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.TIMERS }); } } No newline at end of file
public Collection getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.LISTENERS }); } }
public Collection<String> getMenuCategories() { return Arrays.asList(new String[] { MenuFactory.LISTENERS }); } }
public boolean isSelected (int index) { checkWidget (); if (!(0 <= index && index < itemsCount)) return false; return items [index].isSelected (); } void onArrowDown (int stateMask) { if ((stateMask & (SWT.SHIFT | SWT.CTRL)) == 0) { /* Down Arrow with no modifiers */ int newFocusIndex = focusItem.index + 1; i...
public boolean isSelected (int index) { checkWidget (); if (!(0 <= index && index < itemsCount)) return false; return items [index].isSelected (); } void onArrowDown (int stateMask) { if ((stateMask & (SWT.SHIFT | SWT.CTRL)) == 0) { /* Down Arrow with no modifiers */ int newFocusIndex = focusItem.index + 1; i...
public FileStore() { workDir = (File)((WebApplication)Application.get()).getWicketServlet().getServletContext() .getAttribute("javax.servlet.context.tempdir"); }
public FileStore() { workDir = (File)((WebApplication)Application.get()).getServletContext() .getAttribute("javax.servlet.context.tempdir"); }
public void respond(RequestCycle requestCycle) { try { WebResponse webResponse = ((WebRequestCycle)requestCycle).getWebResponse(); final ServletContext context = ((WebApplication)requestCycle.getApplication()) .getWicketServlet().getServletContext(); // Set content type webResponse.setContentTyp...
public void respond(RequestCycle requestCycle) { try { WebResponse webResponse = ((WebRequestCycle)requestCycle).getWebResponse(); final ServletContext context = ((WebApplication)requestCycle.getApplication()) .getServletContext(); // Set content type webResponse.setContentType(context.getMimeTy...
void mount(IRequestTargetUrlCodingStrategy urlCodingStrategy); /* * $Id: IRequestTargetMounter.java 5241 2006-04-02 21:09:16 +0000 (Sun, 02 Apr * 2006) joco01 $ $Revision$ $Date: 2006-04-02 21:09:16 +0000 (Sun, 02 * Apr 2006) $ * * ============================================================================== *...
void mount(IRequestTargetUrlCodingStrategy urlCodingStrategy); /* * $Id: IRequestTargetMounter.java 5241 2006-04-02 21:09:16 +0000 (Sun, 02 Apr * 2006) joco01 $ $Revision$ $Date: 2006-04-02 21:09:16 +0000 (Sun, 02 * Apr 2006) $ * * ============================================================================== *...
public String getContextPath() { // Set the default context path if the context path is not already // set (previous time or by the developer itself) // This all to do missing api in the servlet spec.. You can't get a // context path from the servlet context, which is just stupid. if (contextPath == null &&...
public String getContextPath() { // Set the default context path if the context path is not already // set (previous time or by the developer itself) // This all to do missing api in the servlet spec.. You can't get a // context path from the servlet context, which is just stupid. if (contextPath == null &&...
private void testContentType() { if (contentType == null || contentType.indexOf("unknown") != -1) { Application application = Application.get(); if (application instanceof WebApplication) { // TODO Post 1.2: General: For non webapplication another method // should be implemented (getMimeType on a...
private void testContentType() { if (contentType == null || contentType.indexOf("unknown") != -1) { Application application = Application.get(); if (application instanceof WebApplication) { // TODO Post 1.2: General: For non webapplication another method // should be implemented (getMimeType on a...
public IManageablePage getPage(final String sessionId, final int id) { SerializedPage fromCache = serializedPagesCache.getPage(sessionId, id); if (fromCache != null) { return deserializePage(fromCache.data); } byte[] data = getPageData(sessionId, id); if (data != null) { return deserializePage(da...
public IManageablePage getPage(final String sessionId, final int id) { SerializedPage fromCache = serializedPagesCache.getPage(sessionId, id); if (fromCache != null && fromCache.data != null) { return deserializePage(fromCache.data); } byte[] data = getPageData(sessionId, id); if (data != null) { ...
public byte[] readResponse(SampleResult sampleResult, InputStream in, int length) throws IOException { byte[] readBuffer = getThreadContext().getReadBuffer(); int bufferSize=32;// Enough for MD5 MessageDigest md=null; boolean asMD5 = useMD5(); if (asMD5) { try {...
public byte[] readResponse(SampleResult sampleResult, InputStream in, int length) throws IOException { byte[] readBuffer = new byte[8192]; // 8kB is the (max) size to have the latency ('the first packet') int bufferSize=32;// Enough for MD5 MessageDigest md=null; boolean asMD5 = us...
public static BitSet getPagedFields(Select sel, ClassMapping mapping, JDBCStore store, JDBCFetchState fetchState, int eagerMode, long size) { JDBCFetchConfiguration fetch = fetchState.getJDBCFetchConfiguration(); // if we have a range then we always use paging if there are any ...
public static BitSet getPagedFields(Select sel, ClassMapping mapping, JDBCStore store, JDBCFetchState fetchState, int eagerMode, long size) { JDBCFetchConfiguration fetch = fetchState.getJDBCFetchConfiguration(); // if we have a range then we always use paging if there are any ...
private static void setFetchGroupFields(Broker broker, StateManagerImpl sm, BitSet idxs) { FetchConfiguration fetch = broker.getFetchConfiguration(); FieldMetaData[] fmds = sm.getMetaData().getFields(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].isPrimaryKey() ||...
private static void setFetchGroupFields(Broker broker, StateManagerImpl sm, BitSet idxs) { FetchConfiguration fetch = broker.getFetchConfiguration(); FieldMetaData[] fmds = sm.getMetaData().getFields(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].isPrimaryKey() ||...
public Collection loadAll(Collection sms, PCState state, int load, FetchState fetchState, Object edata);
public Collection loadAll(Collection sms, PCState state, int load, FetchConfiguration fetch, Object edata);
public Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta) { BrokerImpl broker = manager.getBroker(); PersistenceCapable pc = (PersistenceCapable) toAttach; boolean embedded = ...
public Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta) { BrokerImpl broker = manager.getBroker(); PersistenceCapable pc = (PersistenceCapable) toAttach; boolean embedded = ...
public void testJPAHintSetsFetchPlan() { String jpaKey = "javax.persistence.query.timeout"; query.setHint(jpaKey, 5671); assertEquals(5671, query.getFetchPlan().getLockTimeout()); }
public void testJPAHintSetsFetchPlan() { String jpaKey = "javax.persistence.query.timeout"; query.setHint(jpaKey, 5671); assertEquals(5671, query.getFetchPlan().getQueryTimeout()); }
private void normalizeWhitespace(String value, boolean collapse) { boolean skipSpace = collapse; char c; int size = value.length(); // ensure the ch array is big enough if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < size) { fNormalizedStr.ch = new ch...
private void normalizeWhitespace(String value, boolean collapse) { boolean skipSpace = collapse; char c; int size = value.length(); // ensure the ch array is big enough if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < size) { fNormalizedStr.ch = new ch...
public void setUp() { setUp(SimpleEntity.class, CLEAR_TABLES, "openjpa.Log", "SQL=TRACE"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.persist(new SimpleEntity("foo", "bar" + 0)); em.persist(new SimpleEntity("foo", "bar" + 1)); em.pe...
public void setUp() { setUp(SimpleEntity.class, CLEAR_TABLES); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.persist(new SimpleEntity("foo", "bar" + 0)); em.persist(new SimpleEntity("foo", "bar" + 1)); em.persist(new SimpleEntity("foo"...
public void testBadASMforEnums() throws IOException { CompilationResult cR = ajc(baseDir,new String[]{"Rainbow.java","-emacssym","-1.5"}); System.err.println(cR); ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintWriter pw = new PrintWriter(baos); AsmManager.dumptree(pw,AsmManager.getD...
public void testBadASMforEnums() throws IOException { CompilationResult cR = ajc(baseDir,new String[]{"Rainbow.java","-emacssym","-1.5"}); // System.err.println(cR); ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintWriter pw = new PrintWriter(baos); AsmManager.dumptree(pw,AsmManager.g...
public void testBugWithAnnotationsLostOnWovenMethods() throws ClassNotFoundException { CompilationResult cR = ajc(new File(baseDir+File.separator+"attarget"), new String[]{"Program.java","AtTargetAspect.java","-1.5"}); System.err.println(cR.getStandardError()); List expectedInfoMessages = new ArrayList(...
public void testBugWithAnnotationsLostOnWovenMethods() throws ClassNotFoundException { CompilationResult cR = ajc(new File(baseDir+File.separator+"attarget"), new String[]{"Program.java","AtTargetAspect.java","-1.5"}); //System.err.println(cR.getStandardError()); List expectedInfoMessages = new ArrayLis...
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("class", (getIndex() % 2 == 0) ? CLASS_EVEN : CLASS_ODD); }
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.append("class", (getIndex() % 2 == 0) ? CLASS_EVEN : CLASS_ODD, " "); }
protected void setUp() throws Exception { // Create container container = createRestContainer(RestConstants.TEST_TWITTER_TARGET); // Get adapter IRemoteServiceClientContainerAdapter adapter = (IRemoteServiceClientContainerAdapter) getRemoteServiceClientContainerAdapter(container); // Setup authentication in...
protected void setUp() throws Exception { // Create container container = createRestContainer(RestConstants.TEST_TWITTER_TARGET); // Get adapter IRemoteServiceClientContainerAdapter adapter = (IRemoteServiceClientContainerAdapter) getRemoteServiceClientContainerAdapter(container); // Setup authentication in...
public void widgetSelected(SelectionEvent event) { if (!((Button) event.widget).getSelection()) return; setExampleWidgetAlignment (); } }; upButton.addSelectionListener(selectionListener); downButton.addSelectionListener(selectionListener); } /** * Creates the "Example" group. */ void creat...
public void widgetSelected(SelectionEvent event) { if (!((Button) event.widget).getSelection()) return; setExampleWidgetAlignment (); } }; upButton.addSelectionListener(selectionListener); downButton.addSelectionListener(selectionListener); } /** * Creates the "Example" group. */ void creat...
return new String[] {"Editable", "Items", "Selection", "Text", "TextLimit", "ToolTipText", "VisibleItemCount"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials *...
return new String[] {"Editable", "Items", "Selection", "Text", "TextLimit", "ToolTipText", "VisibleItemCount"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials *...
public void widgetSelected(SelectionEvent event) { if ((event.widget.getStyle() & SWT.RADIO) != 0) { if (!((Button) event.widget).getSelection ()) return; } recreateExampleWidgets (); } }; shadowInButton.addSelectionListener (selectionListener); shadowOutButton.addSelectionListener (selecti...
public void widgetSelected(SelectionEvent event) { if ((event.widget.getStyle() & SWT.RADIO) != 0) { if (!((Button) event.widget).getSelection ()) return; } recreateExampleWidgets (); } }; shadowInButton.addSelectionListener (selectionListener); shadowOutButton.addSelectionListener (selecti...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Creates the "Style" group. */ void createStyleGroup () { super.createStyleGroup (); /* Create the extra widgets */ dropDownButton = new Button (styleGroup, SWT.RADIO); dropDownBut...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Creates the "Style" group. */ void createStyleGroup () { super.createStyleGroup (); /* Create the extra widgets */ dropDownButton = new Button (styleGroup, SWT.RADIO); dropDownBut...
public void widgetSelected(SelectionEvent event) { if ((event.widget.getStyle() & SWT.RADIO) != 0) { if (!((Button) event.widget).getSelection ()) return; } recreateExampleWidgets (); } }; shadowInButton.addSelectionListener (selectionListener); shadowOutButton.addSelectionListener (selecti...
public void widgetSelected(SelectionEvent event) { if ((event.widget.getStyle() & SWT.RADIO) != 0) { if (!((Button) event.widget).getSelection ()) return; } recreateExampleWidgets (); } }; shadowInButton.addSelectionListener (selectionListener); shadowOutButton.addSelectionListener (selecti...
return new String[] {"Text", "ToolTipText"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v...
return new String[] {"Text", "ToolTipText"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v...
return new String[] {"Items", "Selection", "ToolTipText", "TopIndex"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of th...
return new String[] {"Items", "Selection", "ToolTipText", "TopIndex"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of th...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Disposes the "Example" widgets. */ void disposeExampleWidgets () { /* store the state of the styledText if applicable */ if (styledText != null) { styleRanges = styledText.getStyleRa...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Disposes the "Example" widgets. */ void disposeExampleWidgets () { /* store the state of the styledText if applicable */ if (styledText != null) { styleRanges = styledText.getStyleRa...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {text}; } /** * Returns a list of set/get API method names (without the set/get prefix...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {text}; } /** * Returns a list of set/get API method names (without the set/get prefix...
protected IRequestTarget resolveBookmarkablePage(final RequestCycle requestCycle, final RequestParameters requestParameters) { String bookmarkablePageClass = requestParameters.getBookmarkablePageClass(); Session session = requestCycle.getSession(); Class pageClass; try { pageClass = session.getClassRe...
protected IRequestTarget resolveBookmarkablePage(final RequestCycle requestCycle, final RequestParameters requestParameters) { String bookmarkablePageClass = requestParameters.getBookmarkablePageClass(); Session session = requestCycle.getSession(); Class pageClass; try { pageClass = session.getClassRe...
private final static Pattern VALIDATE_PATTERN = Pattern .compile("context\\s+([\\[\\]:\\w\\]]+)\\s+[^;]*\\z");
private final static Pattern VALIDATE_PATTERN = Pattern .compile("context\\s+([\\[\\]:\\w\\]]+)(#|\\s+)[^;]*\\z");
public void renderHead(final HtmlHeaderContainer container) { if (isVisible()) { if (this instanceof IHeaderContributor) { ((IHeaderContributor)this).renderHead(container.getHeaderResponse()); } // Ask all behaviors if they have something to contribute to the // header or body onLoad tag. i...
public void renderHead(final HtmlHeaderContainer container) { if (isVisible()) { if (this instanceof IHeaderContributor) { ((IHeaderContributor)this).renderHead(container.getHeaderResponse()); } // Ask all behaviors if they have something to contribute to the // header or body onLoad tag. i...
protected String getSystemJavac() { // This is the most common extension case - exe for windows and OS/2, // nothing for *nix. String extension = Os.isFamily("dos") ? ".exe" : ""; File jExecutable = null; // On AIX using IBM's JDK 1.2 the javac executable is in // ...
protected String getSystemJavac() { // This is the most common extension case - exe for windows and OS/2, // nothing for *nix. String extension = Os.isFamily("dos") ? ".exe" : ""; File jExecutable = null; // On AIX using IBM's JDK 1.2 the javac executable is in // ...
private String getJavaExecutableName() { // This is the most common extension case - exe for windows and OS/2, // nothing for *nix. String extension = Os.isFamily("dos") ? ".exe" : ""; File jExecutable = null; // On AIX using IBM's JDK 1.2 the java executable is in ...
private String getJavaExecutableName() { // This is the most common extension case - exe for windows and OS/2, // nothing for *nix. String extension = Os.isFamily("dos") ? ".exe" : ""; File jExecutable = null; // On AIX using IBM's JDK 1.2 the java executable is in ...
public WebRequestEncoder(AppendingStringBuffer url) { this.url = url; if (url.indexOf("?") > 0) { firstParameter = false; } }
public WebRequestEncoder(AppendingStringBuffer url) { this.url = url; if (url.indexOf("?") >= 0) { firstParameter = false; } }
public String mapJspToJavaName(File jspFile) { String jspUri = jspFile.getAbsolutePath(); int start = jspUri.lastIndexOf(File.separatorChar) + 1; int end = jspUri.length(); StringBuffer modifiedClassName; modifiedClassName = new StringBuffer(jspUri.length() - start); ...
public String mapJspToJavaName(File jspFile) { String jspUri = jspFile.getAbsolutePath(); int start = jspUri.lastIndexOf(File.separatorChar) + 1; int end = jspUri.length(); StringBuffer modifiedClassName; modifiedClassName = new StringBuffer(jspUri.length() - start); ...
public IRequestHandler mapRequest(Request request) { // locale is the first segment in the url List<String> segments = request.getUrl().getSegments(); if (segments != null && segments.size() > 1) { String localeAsString = segments.get(0); if (!Strings.isEmpty(localeAsString)) { Locale locale = Lo...
public IRequestHandler mapRequest(Request request) { // locale is the first segment in the url List<String> segments = request.getUrl().getSegments(); if (segments != null && segments.size() > 1) { String localeAsString = segments.get(0); if (!Strings.isEmpty(localeAsString)) { Locale locale = Lo...
protected PageParameters extractPageParameters(Request request, int segmentsToSkip, IPageParametersEncoder encoder) { Args.notNull(request, "request"); Args.notNull(encoder, "encoder"); // strip the segments and first query parameter from URL Url urlCopy = new Url(request.getUrl()); while (segmentsToSkip...
protected PageParameters extractPageParameters(Request request, int segmentsToSkip, IPageParametersEncoder encoder) { Args.notNull(request, "request"); Args.notNull(encoder, "encoder"); // strip the segments and first query parameter from URL Url urlCopy = new Url(request.getUrl()); while (segmentsToSkip...
public IRequestHandler mapRequest(Request request) { Url url = request.getUrl(); if (escapeSequence.get() != null) { for (int i = 0; i < url.getSegments().size(); i++) { if (url.getSegments().get(i).equals(escapeSequence.get())) { url.getSegments().set(i, ".."); } } } return chai...
public IRequestHandler mapRequest(Request request) { Url url = request.getUrl(); if (escapeSequence.get() != null) { for (int i = 0; i < url.getSegments().size(); i++) { if (url.getSegments().get(i).equals(escapeSequence.get())) { url.getSegments().set(i, ".."); } } } return chai...
private Request dismountRequest(Request request) { Url dismountedUrl = new Url(request.getUrl()); dismountedUrl.removeLeadingSegments(mountSegments.length); return request.requestWithUrl(dismountedUrl); }
private Request dismountRequest(Request request) { Url dismountedUrl = new Url(request.getUrl()); dismountedUrl.removeLeadingSegments(mountSegments.length); return request.cloneWithUrl(dismountedUrl); }
protected UrlRenderer newUrlRenderer() { // All URLs will be rendered relative to current request (can be overriden afterwards) return new UrlRenderer(getRequest().getUrl()); }
protected UrlRenderer newUrlRenderer() { // All URLs will be rendered relative to current request (can be overriden afterwards) return new UrlRenderer(getRequest().getBaseUrl()); }
public IRequestHandler mapRequest(Request request) { Url url = decryptUrl(request, request.getUrl()); if (url == null) { return null; } return wrappedMapper.mapRequest(request.requestWithUrl(url)); }
public IRequestHandler mapRequest(Request request) { Url url = decryptUrl(request, request.getUrl()); if (url == null) { return null; } return wrappedMapper.mapRequest(request.cloneWithUrl(url)); }
public void process() { JMeterContext context = getThreadContext(); Sampler sam = context.getCurrentSampler(); SampleResult res = context.getPreviousResult(); HTTPSamplerBase sampler = null; HTTPSampleResult result = null; if (res == null || !(sam instanceof HTTPSampl...
public void process() { JMeterContext context = getThreadContext(); Sampler sam = context.getCurrentSampler(); SampleResult res = context.getPreviousResult(); HTTPSamplerBase sampler = null; HTTPSampleResult result = null; if (res == null || !(sam instanceof HTTPSampl...
public static String getEncodingFromContentType(String contentType){ String charSet = null; if (contentType != null) { int charSetStartPos = contentType.toLowerCase(java.util.Locale.ENGLISH).indexOf(CHARSET_EQ); if (charSetStartPos >= 0) { charSet = contentTyp...
public static String getEncodingFromContentType(String contentType){ String charSet = null; if (contentType != null) { int charSetStartPos = contentType.toLowerCase(java.util.Locale.ENGLISH).indexOf(CHARSET_EQ); if (charSetStartPos >= 0) { charSet = contentTyp...
public void setReplaceExtension(String oldext, String newext) { if (oldext != null && newext != null) { this.CHANGEEXT = true; if (oldext.indexOf(".") < 0 && newext.indexOf(".") < 0) { this.OLDEXT = "." + oldext; this.NEWEXT = "." + newext; ...
public void setReplaceExtension(String oldext, String newext) { if (oldext != null && newext != null) { this.CHANGEEXT = true; if (oldext.indexOf('.') < 0 && newext.indexOf('.') < 0) { this.OLDEXT = "." + oldext; this.NEWEXT = "." + newext; ...
protected void onComponentRendered() { Response response = getComponent().getResponse(); final String id = getComponent().getMarkupId(); response.write(JavascriptUtils.SCRIPT_OPEN_TAG); response.write("new Wicket.Ajax.AutoComplete('" + id + "','" + getCallbackUrl() + "');"); response.write(JavascriptUtils.S...
protected void onComponentRendered() { Response response = getComponent().getResponse(); final String id = getComponent().getMarkupId(); response.write(JavascriptUtils.SCRIPT_OPEN_TAG); response.write("new Wicket.AutoComplete('" + id + "','" + getCallbackUrl() + "');"); response.write(JavascriptUtils.SCRIPT...
private String[] getBrowsingDomains(IServiceTypeID aServiceTypeId) { Set res = new HashSet(); String[] rrs = new String[] {BnRDnsSdServiceTypeID.BROWSE_DOMAIN, BnRDnsSdServiceTypeID.DEFAULT_BROWSE_DOMAIN}; for (int i = 0; i < rrs.length; i++) { BnRDnsSdServiceTypeID serviceType = new BnRDnsSdServiceTy...
private String[] getBrowsingDomains(IServiceTypeID aServiceTypeId) { Set res = new HashSet(); String[] rrs = new String[] {BnRDnsSdServiceTypeID.BROWSE_DOMAINS, BnRDnsSdServiceTypeID.DEFAULT_BROWSE_DOMAIN}; for (int i = 0; i < rrs.length; i++) { BnRDnsSdServiceTypeID serviceType = new BnRDnsSdServiceT...
public TypeDefinition createTypeDefinition( final Configuration configuration ) throws ConfigurationException { final String roleShorthand = configuration.getName(); if( roleShorthand.equals( "converter" ) ) { // A converter definition final String classNa...
private TypeDefinition createTypeDefinition( final Configuration configuration ) throws ConfigurationException { final String roleShorthand = configuration.getName(); if( roleShorthand.equals( "converter" ) ) { // A converter definition final String classN...
protected final AspectManager getAspectManager() { return m_aspectManager; } }
private final AspectManager getAspectManager() { return m_aspectManager; } }
private Extension createToolsExtension() { return new Extension( "com.sun.tools", "1.0", "com.sun", "1.0", "com.sun", "com.sun", ...
private static Extension createToolsExtension() { return new Extension( "com.sun.tools", "1.0", "com.sun", "1.0", "com.sun", "com.sun", ...
protected void checkPropertyValid( final String name, final Object value ) throws TaskException { if( BASE_DIRECTORY.equals( name ) && !( value instanceof File ) ) { final String message = REZ.getString( "bad-property.error", BASE_DIRECTORY, File.class.getName...
private void checkPropertyValid( final String name, final Object value ) throws TaskException { if( BASE_DIRECTORY.equals( name ) && !( value instanceof File ) ) { final String message = REZ.getString( "bad-property.error", BASE_DIRECTORY, File.class.getName()...
void removeAspectHandler( String name ) /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
void removeAspectHandler( String name ) /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
comboGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of...
comboGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of...
public void widgetSelected (SelectionEvent event) { setUnselectedCloseVisible(); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the CTabFolder */ tabFolderGroup = new Group (exampleGroup, SWT.NONE); tabFolderGr...
public void widgetSelected (SelectionEvent event) { setUnselectedCloseVisible(); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the CTabFolder */ tabFolderGroup = new Group (exampleGroup, SWT.NONE); tabFolderGr...
public void widgetSelected (SelectionEvent event) { setWidgetLocked (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); coolBarGroup = new Group (exampleGroup, SWT.NONE); coolBarGroup.setLayout (new GridLayout ()); coolBarGroup.setLayo...
public void widgetSelected (SelectionEvent event) { setWidgetLocked (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); coolBarGroup = new Group (exampleGroup, SWT.NONE); coolBarGroup.setLayout (new GridLayout ()); coolBarGroup.setLayo...
public void widgetSelected (SelectionEvent event) { buttonStyleSelected (event); } }; okButton.addSelectionListener (buttonStyleListener); cancelButton.addSelectionListener (buttonStyleListener); yesButton.addSelectionListener (buttonStyleListener); noButton.addSelectionListener (buttonStyleListener...
public void widgetSelected (SelectionEvent event) { buttonStyleSelected (event); } }; okButton.addSelectionListener (buttonStyleListener); cancelButton.addSelectionListener (buttonStyleListener); yesButton.addSelectionListener (buttonStyleListener); noButton.addSelectionListener (buttonStyleListener...
public void widgetSelected (SelectionEvent event) { setTitleText (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the Group */ groupGroup = new Group (exampleGroup, SWT.NONE); groupGroup.setLayout (new GridL...
public void widgetSelected (SelectionEvent event) { setTitleText (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the Group */ groupGroup = new Group (exampleGroup, SWT.NONE); groupGroup.setLayout (new GridL...
linkGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of ...
linkGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of ...
listGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of ...
listGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of ...
progressBarGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the te...
progressBarGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the te...
sashFormGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms...
sashFormGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true)); /******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms...
public void widgetSelected (SelectionEvent event) { setWidgetLinesVisible (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the table */ tableGroup = new Group (exampleGroup, SWT.NONE); tableGroup.setLayout (...
public void widgetSelected (SelectionEvent event) { setWidgetLinesVisible (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the table */ tableGroup = new Group (exampleGroup, SWT.NONE); tableGroup.setLayout (...
package org.eclipse.wst.xml.vex.ui.internal.swing; /******************************************************************************* * Copyright (c) 2004, 2008 John Krasnay and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public Licens...
package org.eclipse.wst.xml.vex.ui.internal.swing; /******************************************************************************* * Copyright (c) 2004, 2008 John Krasnay and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public Licens...
package org.eclipse.wst.xml.vex.ui.internal.swing; /******************************************************************************* * Copyright (c) 2004, 2008 John Krasnay and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public Licens...
package org.eclipse.wst.xml.vex.ui.internal.swing; /******************************************************************************* * Copyright (c) 2004, 2008 John Krasnay and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public Licens...
public String toString() { final StringBuffer buffer = new StringBuffer(); buffer.append("[path = "); buffer.append(super.toString()); if (markupStream != null) { buffer.append(", markupStream = " + markupStream); } if (childForName.size() != 0) { buffer.append(", children = " + childForName)...
public String toString() { final StringBuffer buffer = new StringBuffer(); buffer.append("[path = "); buffer.append(super.toString()); if (markupStream != null) { buffer.append(", markupStream = " + markupStream); } if (childForName != null && childForName.size() != 0) { buffer.append(", chil...
public void onValidate(String value) { // If value is non-empty if (!Strings.isEmpty(value)) { // Check value by attempting to convert it final IConverter converter = getComponent().getConverter(); try { converter.convert(value, type); } catch (ConversionException e) { error(message...
public void onValidate(String value) { // If value is non-empty if (!Strings.isEmpty(value)) { // Check value by attempting to convert it final IConverter converter = getFormComponent().getConverter(); try { converter.convert(value, type); } catch (ConversionException e) { error(mes...
public void fatalError(SAXParseException ex) { System.err.print("***** Fatal error "+ ex.getMessage());} // // ThreadParser constructor. Invoked by the threads of the test program // to create parsers. // ThreadParser() { if (gRunInfo.dom) { ...
public void fatalError(SAXParseException ex) { System.err.print("***** Fatal error "+ ex.getMessage());} // // ThreadParser constructor. Invoked by the threads of the test program // to create parsers. // ThreadParser() { if (gRunInfo.dom) { ...
protected String resourceKey() { return "EmailAddressPatternValidator"; }
protected String resourceKey() { return "EmailAddressValidator"; }
public PCClassFileTransformer(MetaDataRepository repos, PCEnhancer.Flags flags, ClassLoader tmpLoader, boolean devscan) { _repos = repos; _tmpLoader = tmpLoader; _log = repos.getConfiguration(). getLog(OpenJPAConfiguration.LOG_ENHANCE); _flags = flags; _...
public PCClassFileTransformer(MetaDataRepository repos, PCEnhancer.Flags flags, ClassLoader tmpLoader, boolean devscan) { _repos = repos; _tmpLoader = tmpLoader; _log = repos.getConfiguration(). getLog(OpenJPAConfiguration.LOG_ENHANCE); _flags = flags; _...
private void parseDetachedState(ClassMetaData meta, DetachedState detached) { if (detached != null) { if (!detached.enabled()) meta.setDetachedState(null); else if (!StringUtils.isEmpty(detached.fieldName())) meta.setDetachedState(ClassMetaData...
private void parseDetachedState(ClassMetaData meta, DetachedState detached) { if (detached != null) { if (!detached.enabled()) meta.setDetachedState(null); else if (StringUtils.isEmpty(detached.fieldName())) meta.setDetachedState(ClassMetaData....
protected XSParticleDecl checkOccurrences(XSParticleDecl particle, String particleName, Element parent, int allContextFlags, long defaultVals) { int min = particle.fMinOccurs; int max = particle.fMaxOccurs; boolean defaultMin = (defaultVals & (1 <...
protected XSParticleDecl checkOccurrences(XSParticleDecl particle, String particleName, Element parent, int allContextFlags, long defaultVals) { int min = particle.fMinOccurs; int max = particle.fMaxOccurs; boolean defaultMin = (defaultVals & (1 <...
private static String normalizedName(String name) { String[] fragments = name.split(SyntaxConstants.NS_DELIM); StringBuffer result = new StringBuffer(name.length()); result.append(fragments[0].replaceAll("\\W", "_")); for (int i = 1; i < fragments.length; i++) { result.append(SyntaxConstants.NS_DELIM); r...
private static String normalizedName(String name) { String[] fragments = name.split(SyntaxConstants.NS_DELIM); StringBuffer result = new StringBuffer(name.length()); result.append(fragments[0].replaceAll("\\W", "_")); for (int i = 1; i < fragments.length; i++) { result.append(SyntaxConstants.NS_DELIM); r...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { JMeterVariables vars = getVariables(); String stringToSplit = ((CompoundVariable) values[0]).execute(); String varNamePrefix = ((CompoundVariable) values[1])...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { JMeterVariables vars = getVariables(); String stringToSplit = ((CompoundVariable) values[0]).execute(); String varNamePrefix = ((CompoundVariable) values[1])...
public void testStarted(String host) { int startIndexAsInt = JMeterUtils.getPropDefault(KEY_STORE_START_INDEX, 0); int endIndexAsInt = JMeterUtils.getPropDefault(KEY_STORE_END_INDEX, 0); if(!StringUtils.isEmpty(this.startIndex)) { try { startIndexAsInt = Integer.p...
public void testStarted(String host) { int startIndexAsInt = JMeterUtils.getPropDefault(KEY_STORE_START_INDEX, 0); int endIndexAsInt = JMeterUtils.getPropDefault(KEY_STORE_END_INDEX, 0); if(!StringUtils.isEmpty(this.startIndex)) { try { startIndexAsInt = Integer.p...
protected final void addResources(FileSet fileset, Resource[] resources, ZipOutputStream zOut) throws IOException { String prefix = ""; String fullpath = ""; int dirMode = ZipFileSet.DEFAULT_DIR_MODE; int fileMode = ZipFileSet.DEFAULT_FI...
protected final void addResources(FileSet fileset, Resource[] resources, ZipOutputStream zOut) throws IOException { String prefix = ""; String fullpath = ""; int dirMode = ZipFileSet.DEFAULT_DIR_MODE; int fileMode = ZipFileSet.DEFAULT_FI...
private static void initializeMenus() { try { List guiClasses = ClassFinder.findClassesThatExtend( JMeterUtils.getSearchPaths(), new Class[] { JMeterGUIComponent.class, TestBean.class }); timers = new LinkedList(); ...
private static void initializeMenus() { try { List guiClasses = ClassFinder.findClassesThatExtend( JMeterUtils.getSearchPaths(), new Class[] { JMeterGUIComponent.class, TestBean.class }); timers = new LinkedList(); ...
protected static Column mergeColumn(MetaDataContext context, String prefix, Column tmplate, boolean compat, Column given, Table table, boolean adapt, boolean fill) { assertTable(context, table); // if not adapting must provide column name at a minimum String colName = (given...
protected static Column mergeColumn(MetaDataContext context, String prefix, Column tmplate, boolean compat, Column given, Table table, boolean adapt, boolean fill) { assertTable(context, table); // if not adapting must provide column name at a minimum String colName = (given...
public int hashCode () { return handle; } void init(Device device, int width, int height) { if (width <= 0 | height <= 0) { SWT.error (SWT.ERROR_INVALID_ARGUMENT); } this.device = device; this.type = SWT.BITMAP; handle = OS.PhCreateImage(null, (short)width, (short)height, OS.Pg_IMAGE_DIRECT_888, 0, 0, 0); i...
public int hashCode () { return handle; } void init(Device device, int width, int height) { if (width <= 0 || height <= 0) { SWT.error (SWT.ERROR_INVALID_ARGUMENT); } this.device = device; this.type = SWT.BITMAP; handle = OS.PhCreateImage(null, (short)width, (short)height, OS.Pg_IMAGE_DIRECT_888, 0, 0, 0); ...
public void execute() throws BuildException { if (extensionPoint == null) { throw new BuildException("extensionPoint required", getLocation()); } if (getOwningTarget() == null || !"".equals(getOwningTarget().getName())) { throw new BuildException( ...
public void execute() throws BuildException { if (extensionPoint == null) { throw new BuildException("extensionPoint required", getLocation()); } if (getOwningTarget() == null || !"".equals(getOwningTarget().getName())) { throw new BuildException( ...