buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Iterate through choices final List choices = getChoices(); // Buffer to hold generated body final AppendingStringBuffer buffer = new AppendingStringBuffer((choices.size() + 1) * 70); // The selecte...
protected final void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Iterate through choices final List choices = getChoices(); // Buffer to hold generated body final AppendingStringBuffer buffer = new AppendingStringBuffer((choices.size() + 1) * 70); // The selecte...
private boolean isMultiPart() { try { Field multiPart = Form.class.getDeclaredField("multiPart"); multiPart.setAccessible(true); return multiPart.getBoolean(workingForm); } catch (SecurityException e) {
private boolean isMultiPart() { try { Field multiPart = Form.class.getDeclaredField("multiPart"); multiPart.setAccessible(true); return multiPart.getShort(workingForm) != 0; } catch (SecurityException e) {
public synchronized XSObject item(int index) { if (fArray == null) { // calculate the total number of elements getLength(); fArray = new XSObject[fLength]; int pos = 0; // get components from all SymbolHash's for (int i = 0; i < fNSNum;...
public synchronized XSObject item(int index) { if (fArray == null) { // calculate the total number of elements getLength(); fArray = new XSObject[fLength]; int pos = 0; // get components from all SymbolHash's for (int i = 0; i < fNSNum;...
private TypeX parameterize(TypeX aType, Map typeVariableMap) { if (aType instanceof TypeVariableReferenceType) { String variableName = ((TypeVariableReferenceType)aType).getTypeVariable().getName(); if (!typeVariableMap.containsKey(variableName)) { throw new IllegalStateException("Type variable " + variabl...
private TypeX parameterize(TypeX aType, Map typeVariableMap) { if (aType instanceof TypeVariableReferenceType) { String variableName = ((TypeVariableReferenceType)aType).getTypeVariable().getName(); if (!typeVariableMap.containsKey(variableName)) { return aType; // if the type variable comes from the metho...
protected void renderChild(final Component child) { child.render(); }
protected void renderChild(final Component child) { child.render(getMarkupStream()); }
protected void renderItem(final ListItem item) { item.render(); }
protected void renderItem(final ListItem item) { item.render(getMarkupStream()); }
protected void renderItem(final LoopItem item) { item.render(); } }
protected void renderItem(final LoopItem item) { item.render(getMarkupStream()); } }
public void validate(final FormComponent formComponent) { formComponent.convertAndValidate(); } });
public void validate(final FormComponent formComponent) { formComponent.validateTypeConversion(); } });
protected final CharSequence getEventHandler() { return getCallbackScript(new AppendingStringBuffer("wicketAjaxPost('").append( getCallbackUrl()).append("', wicketSerialize(this)"), null, null); }
protected final CharSequence getEventHandler() { return getCallbackScript(new AppendingStringBuffer("wicketAjaxPost('").append( getCallbackUrl()).append("', wicketSerialize(document.getElementById('"+getComponent().getMarkupId()+"'))"), null, null); }
protected ClassLoader getClassLoader() { return Thread.currentThread().getContextClassLoader(); } /** * This is Wicket's main method to execute a request * * @param request * @param response * @param chain * @return false, if the request could not be processed * @throws IOException * @throws Ser...
protected ClassLoader getClassLoader() { return Thread.currentThread().getContextClassLoader(); } /** * This is Wicket's main method to execute a request * * @param request * @param response * @param chain * @return false, if the request could not be processed * @throws IOException * @throws Ser...
public void testSend() throws Exception { testSendForFile(outputFile.toURL(), inputFile); waitForDone(5000); assertEquals(outputFile.length(), inputFile.length()); }
public void testSend() throws Exception { testSendForFile(outputFile.toURL(), inputFile); waitForDone(10000); assertEquals(outputFile.length(), inputFile.length()); }
public boolean isLayoutDeferred () { checkWidget (); return findDeferredControl () != null; } boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { return region == null && background != null && background[3] == 1 && !isObscured (); } } return super.isOpaq...
public boolean isLayoutDeferred () { checkWidget (); return findDeferredControl () != null; } boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { return region == null && background != null && background[3] == 1 && !isObscured (); } } return super.isOpaq...
public synchronized boolean eval() throws BuildException { validate(); if (substring.length() == 0) { if (getProject() != null) { getProject().log("Substring is empty; returning true", Project.MSG_VERBOSE); } retur...
public synchronized boolean eval() throws BuildException { validate(); if (substring.length() == 0) { if (getProject() != null) { getProject().log("Substring is empty; returning true", Project.MSG_VERBOSE); } retur...
public String[] mapFileName(String sourceFileName) { try { Reader stringReader = new StringReader(sourceFileName); ChainReaderHelper helper = new ChainReaderHelper(); helper.setBufferSize(8192); helper.setPrimaryReader(stringReader); helper.setProj...
public String[] mapFileName(String sourceFileName) { try { Reader stringReader = new StringReader(sourceFileName); ChainReaderHelper helper = new ChainReaderHelper(); helper.setBufferSize(8192); helper.setPrimaryReader(stringReader); helper.setProj...
private void readSource(Reader reader, String name) { BufferedReader in = null; try { in = new BufferedReader(reader); script += FileUtils.readFully(in); } catch (IOException ex) { throw new BuildException("Failed to read " + name, ex); } finally {...
private void readSource(Reader reader, String name) { BufferedReader in = null; try { in = new BufferedReader(reader); script += FileUtils.safeReadFully(in); } catch (IOException ex) { throw new BuildException("Failed to read " + name, ex); } final...
public void storePage(String sessionId, Page page) { File sessionDir = new File(getWorkDir(), sessionId); sessionDir.mkdirs(); File pageFile = getPageFile(page.getNumericId(), page.getCurrentVersionNumber(), sessionDir); // currently, we always have to write, as we don't know whether // it is a new version...
public void storePage(String sessionId, Page page) { File sessionDir = new File(getWorkDir(), sessionId); sessionDir.mkdirs(); File pageFile = getPageFile(page.getNumericId(), page.getCurrentVersionNumber(), sessionDir); // currently, we always have to write, as we don't know whether // it is a new version...
public void resolve() { if (binding == null || ignoreFurtherInvestigation) { ignoreFurtherInvestigation = true; return; } if (typeX != null) typeX.checkPointcutDeclarations(); super.resolve(); }
public void resolve() { if (binding == null) { ignoreFurtherInvestigation = true; return; } if (typeX != null) typeX.checkPointcutDeclarations(); super.resolve(); }
public boolean munge(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); if (!gen.getType().equals(cflowStackField.getDeclaringType())) return false; Field f = new FieldGen(cflowStackField.getModifiers(), BcelWorld.makeBcelType(cflowStackField.getReturnType()), cflowStackField.get...
public boolean munge(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); if (!gen.getType().equals(cflowStackField.getDeclaringType())) return false; Field f = new FieldGen(cflowStackField.getModifiers(), BcelWorld.makeBcelType(cflowStackField.getReturnType()), cflowStackField.get...
public String getId() { return id; } void setId(final String id) { this.id = id; } }
protected void setId(final String id) { this.id = id; } }
public ComponentFeedbackPanel(String id, Component filter) { super(id, new ComponentFeedbackMessageFilter(filter)); } }
public ComponentFeedbackPanel(String id, Component<?> filter) { super(id, new ComponentFeedbackMessageFilter(filter)); } }
public XPath(String xpath, SymbolTable symbolTable, NamespaceContext context) throws XPathException { // NOTE: We have to prefix the field XPath with "./" in // order to handle selectors such as "@attr" that // select th...
public XPath(String xpath, SymbolTable symbolTable, NamespaceContext context) throws XPathException { // NOTE: We have to prefix the field XPath with "./" in // order to handle selectors such as "@attr" that // select th...
private boolean containsQName(XSSimpleType type) { if (type.getVariety() == XSSimpleType.VARIETY_ATOMIC) { short primitive = type.getPrimitiveKind(); return (primitive == XSSimpleType.PRIMITIVE_QNAME || primitive == XSSimpleType.PRIMITIVE_NOTATION); } ...
private boolean containsQName(XSSimpleType type) { if (type.getVariety() == XSSimpleType.VARIETY_ATOMIC) { short primitive = type.getPrimitiveKind(); return (primitive == XSSimpleType.PRIMITIVE_QNAME || primitive == XSSimpleType.PRIMITIVE_NOTATION); } ...
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XST...
private XSSimpleType findDTValidator(Element elm, String refName, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) { if (baseTypeStr == null) return null; XSTypeDefinition baseType = (XST...
public int indexOf (CoolItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); int answer = 0; for (int row = 0; row < items.length; row++) { for (int i = 0; i < items[row].length; i++) { if (items[row][i].equals(item)) { r...
public int indexOf (CoolItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); int answer = 0; for (int row = 0; row < items.length; row++) { for (int i = 0; i < items[row].length; i++) { if (items[row][i].equals(item)) { r...
protected IContainer[] getContainers(IServiceID serviceID, IRemoteServiceEndpointDescription endpointDescription) { // Get all containers available IContainer[] allContainers = getAllContainers(); // If none then return null if (allContainers == null) return null; List results = new ArrayList(); fo...
protected IContainer[] getContainers(IServiceID serviceID, IRemoteServiceEndpointDescription endpointDescription) { // Get all containers available IContainer[] allContainers = getContainers(); // If none then return null if (allContainers == null) return null; List results = new ArrayList(); for (...
private String massageResponseHeaders(SampleResult res) { String headers = res.getResponseHeaders(); String [] headerLines=headers.split(NEW_LINE,-1); // keep empty trailing content int contentLengthIndex=-1; boolean fixContentLength = false; for (int i=0;i<headerLines.length;i++){ String line=headerLines...
private String massageResponseHeaders(SampleResult res) { String headers = res.getResponseHeaders(); String [] headerLines=headers.split(NEW_LINE, 0); // drop empty trailing content int contentLengthIndex=-1; boolean fixContentLength = false; for (int i=0;i<headerLines.length;i++){ String line=headerLines...
private Object readResolve() throws ObjectStreamException{ log.info("Using HoldSampleSender for this test run, ensure you have configured enough memory (-Xmx) for your test"); // server return this; }
private Object readResolve() throws ObjectStreamException{ log.warn("Using HoldSampleSender for this test run, ensure you have configured enough memory (-Xmx) for your test"); // server return this; }
public void paste () { checkWidget(); if ((style & SWT.READ_ONLY) != 0) return; boolean paste = true; String oldText = null; if (hooks (SWT.Verify) || filters (SWT.Verify)) { oldText = getClipboardText (); if (oldText != null) { Point selection = getSelection (); String newText = verifyText (oldText, sel...
public void paste () { checkWidget(); if ((style & SWT.READ_ONLY) != 0) return; boolean paste = true; String oldText = null; if (hooks (SWT.Verify) || filters (SWT.Verify)) { oldText = getClipboardText (); if (oldText != null) { Point selection = getSelection (); String newText = verifyText (oldText, sel...
public void doTraverseSchema(Element root, StringPool stringPool, SchemaGrammar schemaGrammar, GrammarResolver grammarResolver) throws Exception { fNamespacesScope = new NamespacesScope(this); fSchemaRootElement = root; fStringPool = s...
public void doTraverseSchema(Element root, StringPool stringPool, SchemaGrammar schemaGrammar, GrammarResolver grammarResolver) throws Exception { fNamespacesScope = new NamespacesScope(this); fSchemaRootElement = root; fStringPool = s...
protected MarkupStream chooseMarkupStream(final MarkupStream markupStream) { MarkupStream stream = null; // TODO Post 1.3: Cleanup this after deprecated constructors are removed if (markupProvider == null) { stream = markupStream; } else { stream = markupProvider.getAssociatedMarkupStream(false);...
protected MarkupStream chooseMarkupStream(final MarkupStream markupStream) { MarkupStream stream = null; // TODO Post 1.3: Cleanup this after deprecated constructors are removed if (markupProvider == null) { stream = markupStream; } else { stream = markupProvider.getAssociatedMarkupStream(false);...
public void testJunit() { executeTarget("test-junit"); } }
public void testJUnit() { executeTarget("test-junit"); } }
private static Collection getObjects(Class extendsClass) throws Exception { String exName = extendsClass.getName(); Object myThis = ""; Iterator classes = ClassFinder .findClassesThatExtend( JMeterUtils.getSearchPaths(), new C...
private static Collection getObjects(Class extendsClass) throws Exception { String exName = extendsClass.getName(); Object myThis = ""; Iterator classes = ClassFinder .findClassesThatExtend( JMeterUtils.getSearchPaths(), new C...
private int getScore(Pointcut p) { if (p.couldMatchKinds().isEmpty()) return MATCHES_NOTHING; if (p instanceof WithinPointcut) return WITHIN; if (p instanceof WithinAnnotationPointcut) return ATWITHIN; if (p instanceof KindedPointcut) { KindedPointcut kp = (KindedPointcut) p; Shadow.Kind kind = kp.getKin...
private int getScore(Pointcut p) { if (p.couldMatchKinds()==Shadow.NO_SHADOW_KINDS_BITS) return MATCHES_NOTHING; if (p instanceof WithinPointcut) return WITHIN; if (p instanceof WithinAnnotationPointcut) return ATWITHIN; if (p instanceof KindedPointcut) { KindedPointcut kp = (KindedPointcut) p; Shadow.Ki...
public void setDelimitReservedWords(boolean delimitReservedWords) { delimitReservedWords = _delimitReservedWords; }
public void setDelimitReservedWords(boolean delimitReservedWords) { _delimitReservedWords = delimitReservedWords; }
public StringBufferWriter() { buffer = new StringBuffer(2048); }
public StringBufferWriter() { buffer = new StringBuffer(4096); }
private PublishedGraphTracker getTracker(ISharedObjectContainer container) throws ECFException { ID id = IDFactory.makeStringID(PublishedGraphTracker.class.getName()); PublishedGraphTracker tracker = (PublishedGraphTracker) container .getSharedObjectManager().getSharedObj...
private PublishedGraphTracker getTracker(ISharedObjectContainer container) throws ECFException { ID id = IDFactory.makeStringID(PublishedGraphTracker.class.getName()); PublishedGraphTracker tracker = (PublishedGraphTracker) container .getSharedObjectManager().getSharedObj...
public synchronized IDataGraphSharing getInstance( ISharedObjectContainer container) throws ECFException { ISharedObjectManager mgr = container.getSharedObjectManager(); ID id = IDFactory.makeStringID(DataGraphSharing.DATA_GRAPH_SHARING_ID); DataGraphSharing result = (DataGraphSh...
public synchronized IDataGraphSharing getInstance( ISharedObjectContainer container) throws ECFException { ISharedObjectManager mgr = container.getSharedObjectManager(); ID id = IDFactory.makeStringID(DataGraphSharing.DATA_GRAPH_SHARING_ID); DataGraphSharing result = (DataGraphSh...
public void createStages() throws Exception { if (sharedObjectClassNames != null) { for(int j=0; j < clientCount; j++) { ISharedObjectContainer scg = sm[j]; for(int i=0; i < sharedObjectClassNames.length; i++) { System.out.println("Creating sharedObject: "+sharedObjectClassNames[i]+" for client "+scg...
public void createStages() throws Exception { if (sharedObjectClassNames != null) { for(int j=0; j < clientCount; j++) { ISharedObjectContainer scg = sm[j]; for(int i=0; i < sharedObjectClassNames.length; i++) { System.out.println("Creating sharedObject: "+sharedObjectClassNames[i]+" for client "+scg...
protected void addSharedObjectToContainer(ID remote) throws SharedObjectAddException { getSharedObjectManager().addSharedObject(sharedObjectID, sharedObject, new HashMap(), null); }
protected void addSharedObjectToContainer(ID remote) throws SharedObjectAddException { getSharedObjectManager().addSharedObject(sharedObjectID, sharedObject, new HashMap()); }
protected void addSharedObjectToContainer(ID remote) throws SharedObjectAddException { getSharedObjectManager().addSharedObject(sharedObjectID, sharedObject, new HashMap(), null); }
protected void addSharedObjectToContainer(ID remote) throws SharedObjectAddException { getSharedObjectManager().addSharedObject(sharedObjectID, sharedObject, new HashMap()); }
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
protected void doReplace(File f, int options) throws IOException { File temp = fileUtils.createTempFile("replace", ".txt", null); temp.deleteOnExit(); Reader r = null; Writer w = null; try { if (encoding == null) { r = new FileReader(f);...
protected void doReplace(File f, int options) throws IOException { File temp = fileUtils.createTempFile("replace", ".txt", null); temp.deleteOnExit(); Reader r = null; Writer w = null; try { if (encoding == null) { r = new FileReader(f);...
protected boolean supportsDeferredUniqueConstraints() { return supportsUniqueConstraints; }
protected boolean supportsDeferredUniqueConstraints() { return supportsDeferredConstraints; }
private void parseNodes(final NodeIterator e, final URLPointer baseUrl, final URLCollection urls) throws HTMLParseException, ParserException { while(e.hasMoreNodes()) { Node node = e.nextNode(); // a url is always in a Tag. if (!(node instanceof Tag)) ...
private void parseNodes(final NodeIterator e, final URLPointer baseUrl, final URLCollection urls) throws HTMLParseException, ParserException { while(e.hasMoreNodes()) { Node node = e.nextNode(); // a url is always in a Tag. if (!(node instanceof Tag)) ...
public Mapper createMapper() throws TaskException { if( mapperElement != null ) { throw new TaskException( "Cannot define more than one mapper" ); } mapperElement = new Mapper( getProject() ); return mapperElement; }
public Mapper createMapper() throws TaskException { if( mapperElement != null ) { throw new TaskException( "Cannot define more than one mapper" ); } mapperElement = new Mapper(); return mapperElement; }
public Path createClasspath() throws TaskException { if( this.classpath == null ) { this.classpath = new Path( getProject() ); } return this.classpath.createPath(); }
public Path createClasspath() throws TaskException { if( this.classpath == null ) { this.classpath = new Path(); } return this.classpath.createPath(); }
protected Commandline setupGCJCommand() throws TaskException { Commandline cmd = new Commandline(); Path classpath = new Path( m_project ); // gcj doesn't support bootclasspath dir (-bootclasspath) // so we'll emulate it for compatibility and convenience. if( m_b...
protected Commandline setupGCJCommand() throws TaskException { Commandline cmd = new Commandline(); Path classpath = new Path(); // gcj doesn't support bootclasspath dir (-bootclasspath) // so we'll emulate it for compatibility and convenience. if( m_bootclasspat...
public boolean execute() throws TaskException { getLogger().debug( "Using jvc compiler" ); Path classpath = new Path( m_project ); // jvc doesn't support bootclasspath dir (-bootclasspath) // so we'll emulate it for compatibility and convenience. if( m_bootclass...
public boolean execute() throws TaskException { getLogger().debug( "Using jvc compiler" ); Path classpath = new Path(); // jvc doesn't support bootclasspath dir (-bootclasspath) // so we'll emulate it for compatibility and convenience. if( m_bootclasspath != nul...
protected Commandline setupKjcCommand() throws TaskException { Commandline cmd = new Commandline(); // generate classpath, because kjc does't support sourcepath. Path classpath = getCompileClasspath(); if( m_deprecation == true ) { cmd.createArgument...
protected Commandline setupKjcCommand() throws TaskException { Commandline cmd = new Commandline(); // generate classpath, because kjc does't support sourcepath. Path classpath = getCompileClasspath(); if( m_deprecation == true ) { cmd.createArgument...
public Path createPath() throws TaskException { if( m_path == null ) { m_path = new Path( null ); } return m_path.createPath(); }
public Path createPath() throws TaskException { if( m_path == null ) { m_path = new Path(); } return m_path.createPath(); }
public Mapper createMapper() throws TaskException { if( mapper != null ) { throw new TaskException( "Cannot define more than one mapper" ); } mapper = new Mapper( getProject() ); return mapper; }
public Mapper createMapper() throws TaskException { if( mapper != null ) { throw new TaskException( "Cannot define more than one mapper" ); } mapper = new Mapper(); return mapper; }
public Path createClasspath() throws TaskException { if( dependClasspath == null ) { dependClasspath = new Path( getProject() ); } return dependClasspath.createPath(); }
public Path createClasspath() throws TaskException { if( dependClasspath == null ) { dependClasspath = new Path(); } return dependClasspath.createPath(); }
public void setReferenceFiles( Path path ) throws TaskException { //demand create pathlist if( _referenceFiles == null ) _referenceFiles = new Path( this.getProject() ); _referenceFiles.append( path ); }
public void setReferenceFiles( Path path ) throws TaskException { //demand create pathlist if( _referenceFiles == null ) _referenceFiles = new Path(); _referenceFiles.append( path ); }
public void execute() throws TaskException { if( descriptorDirectory == null || !descriptorDirectory.isDirectory() ) { throw new TaskException( "descriptors directory " + descriptorDirectory.getPath() + " is not valid" ); ...
public void execute() throws TaskException { if( descriptorDirectory == null || !descriptorDirectory.isDirectory() ) { throw new TaskException( "descriptors directory " + descriptorDirectory.getPath() + " is not valid" ); ...
public Path createClasspath() { if( config.classpath == null ) { config.classpath = new Path( getProject() ); } return config.classpath.createPath(); }
public Path createClasspath() { if( config.classpath == null ) { config.classpath = new Path(); } return config.classpath.createPath(); }
public void execute() throws TaskException { if( descriptorDirectory == null || !descriptorDirectory.isDirectory() ) { throw new TaskException( "descriptors directory " + descriptorDirectory.getPath() + " is not valid" ); ...
public void execute() throws TaskException { if( descriptorDirectory == null || !descriptorDirectory.isDirectory() ) { throw new TaskException( "descriptors directory " + descriptorDirectory.getPath() + " is not valid" ); ...
public Path createClasspath() { if( classpath == null ) { classpath = new Path( getProject() ); } return classpath.createPath(); }
public Path createClasspath() { if( classpath == null ) { classpath = new Path(); } return classpath.createPath(); }
public Path createClasspath() throws TaskException { if( classpath == null ) classpath = new Path( getProject() ); return classpath.createPath(); }
public Path createClasspath() throws TaskException { if( classpath == null ) classpath = new Path(); return classpath.createPath(); }
protected Path getCompileClasspath() throws TaskException { // add dest dir to classpath so that previously compiled and // untouched classes are on classpath Path classpath = new Path( attributes.getProject() ); classpath.setLocation( attributes.getBase() ); // ...
protected Path getCompileClasspath() throws TaskException { // add dest dir to classpath so that previously compiled and // untouched classes are on classpath Path classpath = new Path(); classpath.setLocation( attributes.getBase() ); // Combine the build classpa...
public Path createClasspath( Project p ) { if( classpath == null ) { classpath = new Path( p ); } return classpath; }
public Path createClasspath( Project p ) { if( classpath == null ) { classpath = new Path(); } return classpath; }
protected void validateAttributes() throws BuildException { if (file == null && filesets.size() == 0) { throw new BuildException("Specify at least one source " + "- a file or a fileset."); } if (destFile != null && destDir != null) { ...
protected void validateAttributes() throws BuildException { if (file == null && filesets.size() == 0) { throw new BuildException("Specify at least one source " + "- a file or a fileset."); } if (destFile != null && destDir != null) { ...
public boolean incrementalBuild(AjBuildConfig buildConfig, IMessageHandler messageHandler) throws CoreException, IOException { if (javaBuilder == null || javaBuilder.currentProject == null) { return batchBuild(buildConfig, messageHandler); } final CountingMessageHandl...
public boolean incrementalBuild(AjBuildConfig buildConfig, IMessageHandler messageHandler) throws CoreException, IOException { if (javaBuilder == null || javaBuilder.currentProject == null || javaBuilder.lastState == null) { return batchBuild(buildConfig, messageHandler); } ...
public void handleEvent(Event event) { handleHorizontalScroll(event); } }); } } void internalRedrawRange(int start, int length) { if (length <= 0) return; int end = start + length; int startLine = content.getLineAtOffset(start); int endLine = content.getLineAtOffset(end); int partialBottomIndex = getP...
public void handleEvent(Event event) { handleHorizontalScroll(event); } }); } } void internalRedrawRange(int start, int length) { if (length <= 0) return; int end = start + length; int startLine = content.getLineAtOffset(start); int endLine = content.getLineAtOffset(end); int partialBottomIndex = getP...
protected final File getMetamataJar(File home){ return new File(home.getAbsoluteFile(), "lib/metamata.jar"); }
protected final File getMetamataJar(File home){ return new File(new File(home.getAbsolutePath()), "lib/metamata.jar"); }
protected XMLErrorReporter fErrorReporter = null; //REVISIT: should we add global fSchemaGrammar field XSDAbstractTraverser (XSDHandler handler, XMLErrorReporter errorReporter, XSAttributeChecker attrChecker) { fSchemaHandler = handl...
protected XMLErrorReporter fErrorReporter = null; //REVISIT: should we add global fSchemaGrammar field XSDAbstractTraverser (XSDHandler handler, XMLErrorReporter errorReporter, XSAttributeChecker attrChecker) { fSchemaHandler = handl...
public static String readString(IResourceStream resourceStream, Charset charset) { try { InputStream stream = resourceStream.getInputStream(); try { byte[] bytes = IOUtils.toByteArray(stream); if (charset == null) charset = Charset.defaultCharset(); return new String(bytes, charset); ...
public static String readString(IResourceStream resourceStream, Charset charset) { try { InputStream stream = resourceStream.getInputStream(); try { byte[] bytes = IOUtils.toByteArray(stream); if (charset == null) charset = Charset.defaultCharset(); return new String(bytes, charset.na...
private BitSet getUnloadedInternal(FetchConfiguration fetch, int mode, BitSet exclude) { if (exclude == StoreContext.EXCLUDE_ALL) return null; BitSet fields = null; FieldMetaData[] fmds = _meta.getFields(); Set fgs = null; boolean load; ...
private BitSet getUnloadedInternal(FetchConfiguration fetch, int mode, BitSet exclude) { if (exclude == StoreContext.EXCLUDE_ALL) return null; BitSet fields = null; FieldMetaData[] fmds = _meta.getFields(); Set fgs = null; boolean load; ...
public void assertEmpty() { assertTrue("MockBuilListener is not empty", buffer.isEmpty()); }
public void assertEmpty() { assertTrue("MockBuildListener is not empty", buffer.isEmpty()); }
public final void respond(final Attributes attributes) { // Get a "new" ResourceResponse to write a response ResourceResponse data = newResourceResponse(attributes); setResponseHeaders(data, attributes); if (!data.dataNeedsToBeWritten(attributes)) { return; } if (data.getWriteCallback() == null) ...
public final void respond(final Attributes attributes) { // Get a "new" ResourceResponse to write a response ResourceResponse data = newResourceResponse(attributes); setResponseHeaders(data, attributes); if (!data.dataNeedsToBeWritten(attributes) || data.getErrorCode() != null) { return; } if (data...
protected org.apache.wicket.protocol.http.IRequestLogger getRequestLogger() { if (application instanceof WebApplication) { return ((WebApplication)application).getRequestLogger(); } return null; }
protected org.apache.wicket.protocol.http.IRequestLogger getRequestLogger() { if (application instanceof WebApplication) { return application.getRequestLogger(); } return null; }
public PageInfo() { this((Integer)null); }
public PageInfo() { this(null); }
public Class< ? > getBeanType() { Class< ? > clazz = beanTypeCache == null ? null : (Class< ? >)beanTypeCache.get(); if (clazz == null) { beanTypeCache = new WeakReference<Class< ? >>(clazz = WicketObjects .resolveClass(beanTypeName)); if (clazz == null) { throw new RuntimeException("SpringBea...
public Class< ? > getBeanType() { Class< ? > clazz = beanTypeCache == null ? null : beanTypeCache.get(); if (clazz == null) { beanTypeCache = new WeakReference<Class< ? >>(clazz = WicketObjects .resolveClass(beanTypeName)); if (clazz == null) { throw new RuntimeException("SpringBeanLocator cou...
public Date convertToObject(final String value, Locale locale) { if (value == null || Strings.isEmpty(value)) { return null; } else { return new Date(((java.util.Date)parse(getDateFormat(locale), value, locale)).getTime()); } }
public Date convertToObject(final String value, Locale locale) { if (value == null || Strings.isEmpty(value)) { return null; } else { return new Date(parse(getDateFormat(locale), value, locale).getTime()); } }
public void warning(SAXParseException e) throws SAXException { throw e; } }); InputSource is = new InputSource(inputStream); Document doc = db.parse(is); NodeList entries = ((Element)doc.getChildNodes().item(1)).getChildNodes(); int len = entries.getLength(); for (int i = (len > 0 && ...
public void warning(SAXParseException e) throws SAXException { throw e; } }); InputSource is = new InputSource(inputStream); Document doc = db.parse(is); NodeList entries = doc.getChildNodes().item(1).getChildNodes(); int len = entries.getLength(); for (int i = (len > 0 && entries.ite...
public void detach(Component c) { if (model instanceof IDetachable) { ((IDetachable)model).detach(); } }
public void detach(Component c) { if (model instanceof IDetachable) { model.detach(); } }
public CancelEventIfNoAjaxDecorator() { this((IAjaxCallDecorator)null); }
public CancelEventIfNoAjaxDecorator() { this(null); }
public final void renderHeadFromAssociatedMarkupFile(final HtmlHeaderContainer htmlContainer) { // Gracefully getAssociateMarkupStream. Throws no exception in case // markup is not found final MarkupStream markupStream = container.getAssociatedMarkupStream(false); if (markupStream == null) { return; } ...
public final void renderHeadFromAssociatedMarkupFile(final HtmlHeaderContainer htmlContainer) { // Gracefully getAssociateMarkupStream. Throws no exception in case // markup is not found final MarkupStream markupStream = container.getAssociatedMarkupStream(false); if (markupStream == null) { return; } ...
public Border(final String id) { this(id, (IModel<?>)null); }
public Border(final String id) { this(id, null); }
public WebClientInfo getClientInfo() { if (clientInfo == null) { RequestCycle requestCycle = RequestCycle.get(); if (getApplication().getRequestCycleSettings().getGatherExtendedBrowserInfo()) { if (getMetaData(BROWSER_WAS_POLLED_KEY) == null) { // we haven't done the redirect yet; record th...
public WebClientInfo getClientInfo() { if (clientInfo == null) { RequestCycle requestCycle = RequestCycle.get(); if (getApplication().getRequestCycleSettings().getGatherExtendedBrowserInfo()) { if (getMetaData(BROWSER_WAS_POLLED_KEY) == null) { // we haven't done the redirect yet; record th...
public HeaderSectionPage_9a() { add(new HeaderSectionPanel_2("panel")); ((MarkupContainer)get("panel")).get("cssHref").setVisible(false); }
public HeaderSectionPage_9a() { add(new HeaderSectionPanel_2("panel")); get("panel").get("cssHref").setVisible(false); }
public void respond(RequestCycle requestCycle) { Response response = requestCycle.getResponse(); response.reset(); if (redirectUrl.startsWith("/")) { // context-absolute url RequestContext rc = RequestContext.get(); String continueTo = null; if (rc.isPortletRequest() && ((PortletRequestContext)rc...
public void respond(RequestCycle requestCycle) { Response response = requestCycle.getResponse(); response.reset(); if (redirectUrl.startsWith("/")) { // context-absolute url RequestContext rc = RequestContext.get(); String continueTo = null; if (rc.isPortletRequest() && ((PortletRequestContext)rc...
public void remove (int start, int end) { checkWidget(); if (start > end) return; int [] argList = {OS.XmNitemCount, 0}; OS.XtGetValues (handle, argList, argList.length / 2); if (!(0 <= start && start <= end && end < argList [1])) { error (SWT.ERROR_INVALID_RANGE); } if (argList [1] == 1) { removeAll (); } ...
public void remove (int start, int end) { checkWidget(); if (start > end) return; int [] argList = {OS.XmNitemCount, 0}; OS.XtGetValues (handle, argList, argList.length / 2); if (!(0 <= start && start <= end && end < argList [1])) { error (SWT.ERROR_INVALID_RANGE); } if (argList [1] == (end - start + 1)) { r...
public Session newSession(Request request, Response response) { return new RolesSession(this, request, response); }
public Session newSession(Request request, Response response) { return new RolesSession(this, request); }
public Session newSession(Request request, Response response) { return new HangmanSession(HangmanApplication.this, request, response); }
public Session newSession(Request request, Response response) { return new HangmanSession(HangmanApplication.this, request); }
public Session newSession(Request request, Response response) { return new LibrarySession(LibraryApplication.this, request, response); }
public Session newSession(Request request, Response response) { return new LibrarySession(LibraryApplication.this, request); }
public Session newSession(Request request, Response response) { return new SignInSession(SignInApplication.this, request, response); }
public Session newSession(Request request, Response response) { return new SignInSession(SignInApplication.this, request); }
public Session newSession(Request request, Response response) { return new SignIn2Session(SignIn2Application.this, request, response); }
public Session newSession(Request request, Response response) { return new SignIn2Session(SignIn2Application.this, request); }
protected void runStatements(Reader reader, PrintStream out) throws SQLException, IOException { StringBuffer sql = new StringBuffer(); String line; BufferedReader in = new BufferedReader(reader); while ((line = in.readLine()) != null) { if (!keepformat) { ...
protected void runStatements(Reader reader, PrintStream out) throws SQLException, IOException { StringBuffer sql = new StringBuffer(); String line; BufferedReader in = new BufferedReader(reader); while ((line = in.readLine()) != null) { if (!keepformat) { ...
public void onComponentTag(final Component component, final ComponentTag tag) { tag.put("id", component.getMarkupId()); tag.put("onfocus", getFocusTrackingHandler(component)); super.onComponentTag(component, tag); } }); }
public void onComponentTag(final Component component, final ComponentTag tag) { component.setOutputMarkupId(true); tag.put("onfocus", getFocusTrackingHandler(component)); super.onComponentTag(component, tag); } }); }
private JPanel createRegexpTasksPanel() { JPanel regexpActionPanel = new JPanel(); regexpField = new JLabeledTextField(JMeterUtils.getResString("regexp_tester_field"), 30); // $NON-NLS-1$ regexpActionPanel.add(regexpField, BorderLayout.WEST); JButton regexpTester = new JButton(JMete...
private JPanel createRegexpTasksPanel() { JPanel regexpActionPanel = new JPanel(); regexpField = new JLabeledTextField(JMeterUtils.getResString("regexp_tester_field")); // $NON-NLS-1$ regexpActionPanel.add(regexpField, BorderLayout.WEST); JButton regexpTester = new JButton(JMeterUti...
protected JPanel createOptionalTasksPanel() { JPanel optionalTasksPanel = super.createOptionalTasksPanel(); // Add a new field source ip address sourceIpAddr = new JLabeledTextField(JMeterUtils .getResString("web_testing2_source_ip"), 15); // $NON-NLS-1$ optionalTasks...
protected JPanel createOptionalTasksPanel() { JPanel optionalTasksPanel = super.createOptionalTasksPanel(); // Add a new field source ip address sourceIpAddr = new JLabeledTextField(JMeterUtils .getResString("web_testing2_source_ip")); // $NON-NLS-1$ optionalTasksPane...
public void setItems (String [] items) { checkWidget (); if (items == null) error (SWT.ERROR_NULL_ARGUMENT); for (int i=0; i<items.length; i++) { if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT); } int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC); OS.SetWindowLong (handle, OS.GWL_WNDPROC, ListPr...
public void setItems (String [] items) { checkWidget (); if (items == null) error (SWT.ERROR_NULL_ARGUMENT); for (int i=0; i<items.length; i++) { if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT); } int oldProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC); OS.SetWindowLong (handle, OS.GWL_WNDPROC, ListPr...
protected void scandir(File dir, String vpath, boolean fast) { if (dir == null) { throw new BuildException("dir must not be null."); } else if (!dir.exists()) { throw new BuildException(dir + " doesn't exists."); } else if (!dir.isDirectory()) { throw new ...
protected void scandir(File dir, String vpath, boolean fast) { if (dir == null) { throw new BuildException("dir must not be null."); } else if (!dir.exists()) { throw new BuildException(dir + " doesn't exist."); } else if (!dir.isDirectory()) { throw new B...
protected IContainer createServer() throws Exception { return ContainerFactory.getDefault().createContainer(getServerContainerName(), new Object[] {getServerCreateID()}); }
protected IContainer createServer() throws Exception { return ContainerFactory.getDefault().createContainer(getServerContainerName(), new Object[] {serverID}); }
protected void validateAttributes() throws BuildException { if (file == null && filesets.size() == 0) { throw new BuildException("Specify at least one source - a file or a fileset."); } if (destFile != null && destDir != null) { throw new BuildException("Only one of ...
protected void validateAttributes() throws BuildException { if (file == null && filesets.size() == 0) { throw new BuildException("Specify at least one source - a file or a fileset."); } if (destFile != null && destDir != null) { throw new BuildException("Only one of ...
public Object getContainerResponse() { return null; }
public Object getContainerResponse() { return this; }
public void testFrameworkVersion() { Settings settings = new Settings(new DummyApplication()); assertFalse("n/a".equalsIgnoreCase(settings.getVersion())); }
public void testFrameworkVersion() { Settings settings = new Settings(new DummyApplication()); assertEquals("n/a", settings.getVersion()); }
package org.apache.ant.common.logger; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are me...
package org.apache.ant.common.logger; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are me...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale if ((locale != null && !locale.equals(component.getLocale())) || (style != null && !style.equals(component.getS...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale if ((locale != null && !locale.equals(component.getLocale())) || (style != null && !style.equals(component.getS...
Project build( String source ) /* * 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 file. */ package org.apache.myrmidon.compon...
Project build( String source ) /* * 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 file. */ package org.apache.myrmidon.compon...