buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected Object startup(IApplicationContext context) throws Exception {
// Get BundleContext
bundleContext = Activator.getContext();
// Process Arguments
final String[] args = mungeArguments((String[]) context.getArguments()
.get("application.args")); //$NON-NLS-1$
processArgs(args);
// Create e... | protected Object startup(IApplicationContext context) throws Exception {
// Get BundleContext
bundleContext = Activator.getContext();
// Process Arguments
final String[] args = mungeArguments((String[]) context.getArguments()
.get("application.args")); //$NON-NLS-1$
processArgs(args);
// Create e... |
private EndpointDescription createEndpointDescription(IServiceID serviceId,
IServiceInfo serviceInfo, boolean discovered) {
// Get activator
Activator activator = Activator.getDefault();
if (activator == null)
return null;
// Get IEndpointDescriptionFactory
IEndpointDescriptionFactory factory = activat... | private EndpointDescription createEndpointDescription(IServiceID serviceId,
IServiceInfo serviceInfo, boolean discovered) {
// Get activator
Activator activator = Activator.getDefault();
if (activator == null)
return null;
// Get IEndpointDescriptionFactory
IEndpointDescriptionFactory factory = activat... |
protected void appendDefaultButtonField(final MarkupStream markupStream,
final ComponentTag openTag)
{
AppendingStringBuffer buffer = new AppendingStringBuffer();
// div that is not visible (but not display:none either)
buffer.append("<div style=\"width:0px;height:0px;position:absolute;left:-100px;top:-100p... | protected void appendDefaultButtonField(final MarkupStream markupStream,
final ComponentTag openTag)
{
AppendingStringBuffer buffer = new AppendingStringBuffer();
// div that is not visible (but not display:none either)
buffer.append("<div style=\"width:0px;height:0px;position:absolute;left:-100px;top:-100p... |
public Class[][] getSupportedParameterTypesForCreateInstance() {
return new Class[][] { { String.class }, { String.class, String.class } };
}
} | public Class[][] getSupportedParameterTypes() {
return new Class[][] { { String.class }, { String.class, String.class } };
}
} |
protected void execP4Command(String command, P4Handler handler) throws BuildException {
try {
Commandline commandline = new Commandline();
commandline.setExecutable("p4");
//Check API for these - it's how CVS does it...
if (P4Port != null && P4Port.length() ... | protected void execP4Command(String command, P4Handler handler) throws BuildException {
try {
Commandline commandline = new Commandline();
commandline.setExecutable("p4");
//Check API for these - it's how CVS does it...
if (P4Port != null && P4Port.length() ... |
public static void main(String [] args) throws Exception{
if (args.length < MINARGS){
System.out.println("Please provide "+MINARGS+" or more arguments:");
System.out.println("serverhost serverport filename [arg1 arg2 ...]");
System.out.println("e.g. ");
System... | public static void main(String [] args) throws Exception{
if (args.length < MINARGS){
System.out.println("Please provide "+MINARGS+" or more arguments:");
System.out.println("serverhost serverport filename [arg1 arg2 ...]");
System.out.println("e.g. ");
System... |
public static void main(String[] args) {
if (args.length < 1) {
System.out.println("You must specify a comma-delimited list of paths to search " + "for unit tests");
System.exit(1);
}
String home=new File(System.getProperty("user.dir")).getParent();
System.out... | public static void main(String[] args) {
if (args.length < 1) {
System.out.println("You must specify a comma-delimited list of paths to search " + "for unit tests");
return;
}
String home=new File(System.getProperty("user.dir")).getParent();
System.out.println... |
protected final void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "checkbox");
final String value = getValue();
if (value != null)
{
try
{
if (Strings.isTrue(value))
{
tag.put("checked", "checked");
}
else
{... | protected final void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "checkbox");
final String value = getValue();
if (value != null)
{
try
{
if (Strings.isTrue(value))
{
tag.put("checked", "checked");
}
else
{... |
public String getString(final String key, final Component<?> component, final IModel<?> model,
final String defaultValue) throws MissingResourceException
{
final IResourceSettings resourceSettings = Application.get().getResourceSettings();
boolean addedToPage = false;
if (component != null)
{
if ((compo... | public String getString(final String key, final Component<?> component, final IModel<?> model,
final String defaultValue) throws MissingResourceException
{
final IResourceSettings resourceSettings = Application.get().getResourceSettings();
boolean addedToPage = false;
if (component != null)
{
if ((compo... |
public void buildFinished(BuildEvent event) {
long totalTime = System.currentTimeMillis() - buildElement.startTime;
buildElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime));
if (event.getException() != null) {
buildElement.element.setAttribute(ERROR_ATTR... | public void buildFinished(BuildEvent event) {
long totalTime = System.currentTimeMillis() - buildElement.startTime;
buildElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime));
if (event.getException() != null) {
buildElement.element.setAttribute(ERROR_ATTR... |
public final Repository resolve() {
if (getRefid() == null) {
return this;
} else {
Repository repository = (Repository) getCheckedRef(this.getClass(),
"Repository");
return repository;
}
}
| public final Repository resolve() {
if (getRefid() == null) {
return this;
} else {
Repository repository = (Repository) getCheckedRef(Repository.class,
"Repository");
return repository;
}
}
|
public UnauthorizedInstantiationException(final Class componentClass)
{
super("Not authorized to instantiate class " + componentClass);
this.componentClass = componentClass;
}
| public UnauthorizedInstantiationException(final Class componentClass)
{
super("Not authorized to instantiate class " + componentClass.getName());
this.componentClass = componentClass;
}
|
public void handleEvent (Event event) {
handleEvents (event);
}
};
addListener (SWT.Paint, listener);
addListener (SWT.MouseDown, listener);
addListener (SWT.MouseUp, listener);
addListener (SWT.MouseDoubleClick, listener);
addListener (SWT.Dispose, listener);
addListener (SWT.Resize, listener);
addList... | public void handleEvent (Event event) {
handleEvents (event);
}
};
addListener (SWT.Paint, listener);
addListener (SWT.MouseDown, listener);
addListener (SWT.MouseUp, listener);
addListener (SWT.MouseDoubleClick, listener);
addListener (SWT.Dispose, listener);
addListener (SWT.Resize, listener);
addList... |
public void installStrategy(FieldMapping field) {
FieldStrategy strategy = null;
ClassMapping owner = getOutermostDefiningMapping(field);
if (owner != null && !owner.isEmbeddable())
strategy = repos.namedStrategy(field, true);
if (strategy == null) {
try {
... | public void installStrategy(FieldMapping field) {
FieldStrategy strategy = null;
ClassMapping owner = getOutermostDefiningMapping(field);
if (owner != null && !owner.isEmbeddable() && !owner.isAbstract())
strategy = repos.namedStrategy(field, true);
if (strategy == null)... |
private boolean pushLockProperties(LockModeType mode,
Map<String, Object> properties) {
boolean fcPushed = false;
// handle properties in map first
if (properties != null) {
fcPushed = setFetchConfigProperty(new FetchConfigProperty[] {
FetchConfigProperty.... | private boolean pushLockProperties(LockModeType mode,
Map<String, Object> properties) {
boolean fcPushed = false;
// handle properties in map first
if (properties != null) {
fcPushed = setFetchConfigProperty(new FetchConfigProperty[] {
FetchConfigProperty.... |
private URL fileToURL() {
String message = null;
if (!(file.exists())) {
message = "File " + file + " does not exist";
}
if (message == null && !(file.isFile())) {
message = "File " + file + " is not a file";
}
try {
if (message == ... | private URL fileToURL() {
String message = null;
if (!(file.exists())) {
message = "File " + file + " does not exist";
}
if (message == null && !(file.isFile())) {
message = "File " + file + " is not a file";
}
try {
if (message == ... |
public void modifyTestElement(TestElement plan) {
super.configureTestElement(plan);
if (plan instanceof TestPlan) {
TestPlan tp = (TestPlan) plan;
tp.setFunctionalMode(functionalMode.isSelected());
tp.setSerialized(serializedMode.isSelected());
tp.setUserDefinedVariables((Arguments) argsPanel.createTes... | public void modifyTestElement(TestElement plan) {
super.configureTestElement(plan);
if (plan instanceof TestPlan) {
TestPlan tp = (TestPlan) plan;
tp.setFunctionalMode(functionalMode.isSelected());
tp.setSerialized(serializedMode.isSelected());
tp.setUserDefinedVariables((Arguments) argsPanel.createTes... |
public void assertResultPage(final String expectedDocument) throws Exception
{
// Validate the document
String document = getServletResponse().getDocument();
Assert.assertTrue(document.equals(expectedDocument));
}
| public void assertResultPage(final String expectedDocument) throws Exception
{
// Validate the document
String document = getServletResponse().getDocument();
Assert.assertEquals(expectedDocument, document);
}
|
public void addContent( final String blah )
{
System.out.println( "String: " + blah );
}
| public void addContent( final String blah )
{
System.out.println( "String content: " + blah );
}
|
public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
owner._setUseTimestamp(false);
return true;
}
| public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
owner.setUseTimestamp(false);
return true;
}
|
public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
owner._setUseTimestamp(true);
return true;
}
| public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
owner.setUseTimestamp(true);
return true;
}
|
private void setName(String namespaceURI, String qname){
String prefix;
// DOM Level 3: namespace URI is never empty string.
this.namespaceURI = namespaceURI;
if (namespaceURI !=null) {
this.namespaceURI = (namespaceURI.length() == 0)? null
... | private void setName(String namespaceURI, String qname){
String prefix;
// DOM Level 3: namespace URI is never empty string.
this.namespaceURI = namespaceURI;
if (namespaceURI !=null) {
this.namespaceURI = (namespaceURI.length() == 0)? null
... |
public UpdateMessage transformIncomingMessage(final UpdateMessage remoteMsg) {
if (!(remoteMsg instanceof ColaUpdateMessage)) {
throw new IllegalArgumentException("UpdateMessage is incompatible with Cola SynchronizationStrategy");
}
ColaUpdateMessage transformedRemote = (ColaUpdateMessage) remoteMsg;
// TOD... | public UpdateMessage transformIncomingMessage(final UpdateMessage remoteMsg) {
if (!(remoteMsg instanceof ColaUpdateMessage)) {
throw new IllegalArgumentException("UpdateMessage is incompatible with Cola SynchronizationStrategy"); //$NON-NLS-1$
}
ColaUpdateMessage transformedRemote = (ColaUpdateMessage) remot... |
public XSLoader createXSLoader(StringList versions) throws XSException {
XSLoader loader = new XMLSchemaLoader();
if (versions == null){
return loader;
}
for (int i=0; i<versions.getLength();i++){
if (!versions.item(i).equals("1.0")){
String msg =
DOMMessageFormatter.formatMess... | public XSLoader createXSLoader(StringList versions) throws XSException {
XSLoader loader = new XSLoaderImpl();
if (versions == null){
return loader;
}
for (int i=0; i<versions.getLength();i++){
if (!versions.item(i).equals("1.0")){
String msg =
DOMMessageFormatter.formatMessage... |
public void handleEvent(Event event) {
if (checkButton != null) checkValue[0] = checkButton.getSelection() ? 1 : 0;
shell.close();
}
});
shell.pack();
shell.open();
Display display = parent.getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
}
... | public void handleEvent(Event event) {
if (checkButton != null) checkValue[0] = checkButton.getSelection() ? 1 : 0;
shell.close();
}
});
shell.pack();
shell.open();
Display display = parent.getDisplay();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
}
... |
public static void main(String[] args) {
JNIGeneratorApp gen = new JNIGeneratorApp ();
if (args.length == 1 && args[0].equals("*")) {
gen.generateAll();
return;
}
if (args.length > 0) {
gen.setMainClassName(args[0]);
if (args.length > 1) gen.setOutputDir(args[1]);
if (args.length > 2) gen.setClasspath(arg... | public static void main(String[] args) {
JNIGeneratorApp gen = new JNIGeneratorApp ();
if (args.length == 1 && (args[0].equals("*") || args[0].equals("all"))) {
gen.generateAll();
return;
}
if (args.length > 0) {
gen.setMainClassName(args[0]);
if (args.length > 1) gen.setOutputDir(args[1]);
if (args.lengt... |
public DOMParser() {
super(new NonValidatingConfiguration(new SchemaSymbols.SchemaSymbolTable()));
try {
// use our own document implementation
setProperty(DOCUMENT_CLASS, "org.apache.xerces.impl.xs.dom.DocumentImpl");
// don't defer DOM expansion
setF... | public DOMParser() {
super(new NonValidatingConfiguration());
try {
// use our own document implementation
setProperty(DOCUMENT_CLASS, "org.apache.xerces.impl.xs.dom.DocumentImpl");
// don't defer DOM expansion
setFeature(DEFER_EXPANSION, false);
... |
public Iterator iterator() {
if (isReference()) {
return ((ResourceCollection) (getRef(getProject()))).iterator();
}
if (src == null) {
return super.iterator();
}
ArchiveScanner as = (ArchiveScanner) getDirectoryScanner(getProject());
return as... | public Iterator iterator() {
if (isReference()) {
return ((ResourceCollection) (getRef(getProject()))).iterator();
}
if (src == null) {
return super.iterator();
}
ArchiveScanner as = (ArchiveScanner) getDirectoryScanner(getProject());
return as... |
public Iterator iterator() {
if (isReference()) {
return ((DirSet) getRef(getProject())).iterator();
}
return new FileResourceIterator(getDir(getProject()),
getDirectoryScanner(getProject()).getIncludedDirectories());
}
| public Iterator iterator() {
if (isReference()) {
return ((DirSet) getRef(getProject())).iterator();
}
return new FileResourceIterator(getProject(), getDir(getProject()),
getDirectoryScanner(getProject()).getIncludedDirectories());
}
|
public Iterator iterator() {
if (isReference()) {
return ((FileList) getRef(getProject())).iterator();
}
return new FileResourceIterator(dir,
(String[]) (filenames.toArray(new String[filenames.size()])));
}
| public Iterator iterator() {
if (isReference()) {
return ((FileList) getRef(getProject())).iterator();
}
return new FileResourceIterator(getProject(), dir,
(String[]) (filenames.toArray(new String[filenames.size()])));
}
|
public Iterator iterator() {
if (isReference()) {
return ((FileSet) getRef(getProject())).iterator();
}
return new FileResourceIterator(getDir(getProject()),
getDirectoryScanner(getProject()).getIncludedFiles());
}
| public Iterator iterator() {
if (isReference()) {
return ((FileSet) getRef(getProject())).iterator();
}
return new FileResourceIterator(getProject(), getDir(getProject()),
getDirectoryScanner(getProject()).getIncludedFiles());
}
|
public Iterator iterator() {
if (isReference()) {
return ((FileSet) getRef(getProject())).iterator();
}
FileResourceIterator result = new FileResourceIterator(getDir());
result.addFiles(getDirectoryScanner().getIncludedFiles());
result.addFiles(getDirectoryScanner... | public Iterator iterator() {
if (isReference()) {
return ((FileSet) getRef(getProject())).iterator();
}
FileResourceIterator result = new FileResourceIterator(getProject(), getDir());
result.addFiles(getDirectoryScanner().getIncludedFiles());
result.addFiles(getDi... |
public synchronized Iterator iterator() {
if (isReference()) {
return getRef().iterator();
}
ensureDirectoryScannerSetup();
ds.scan();
int fct = ds.getIncludedFilesCount();
int dct = ds.getIncludedDirsCount();
if (fct + dct == 0) {
retu... | public synchronized Iterator iterator() {
if (isReference()) {
return getRef().iterator();
}
ensureDirectoryScannerSetup();
ds.scan();
int fct = ds.getIncludedFilesCount();
int dct = ds.getIncludedDirsCount();
if (fct + dct == 0) {
retu... |
private JPanel createCloseConnectionPanel() {
JLabel label = new JLabel(JMeterUtils.getResString("closeconnection")); // $NON-NLS-1$
closeConnection = new JCheckBox("", false);
label.setLabelFor(closeConnection);
JPanel closeConnectionPanel = new JPanel(new FlowLayout());
c... | private JPanel createCloseConnectionPanel() {
JLabel label = new JLabel(JMeterUtils.getResString("closeconnection")); // $NON-NLS-1$
closeConnection = new JCheckBox("", TCPSampler.CLOSE_CONNECTION_DEFAULT);
label.setLabelFor(closeConnection);
JPanel closeConnectionPanel = new JPane... |
public ColorDialog (Shell parent, int style) {
super (parent, style);
checkSubclass ();
}
| public ColorDialog (Shell parent, int style) {
super (parent, checkStyle (parent, style));
checkSubclass ();
}
|
public DirectoryDialog (Shell parent, int style) {
super (parent, style);
checkSubclass ();
}
| public DirectoryDialog (Shell parent, int style) {
super (parent, checkStyle (parent, style));
checkSubclass ();
}
|
public FileDialog (Shell parent, int style) {
super (parent, style);
checkSubclass ();
}
| public FileDialog (Shell parent, int style) {
super (parent, checkStyle (parent, style));
checkSubclass ();
}
|
public FontDialog (Shell parent, int style) {
super (parent, style);
checkSubclass ();
}
| public FontDialog (Shell parent, int style) {
super (parent, checkStyle (parent, style));
checkSubclass ();
}
|
private Object[] extractSelectExecutor(Object result) {
if (result instanceof ResultList == false)
return new Object[]{null, _loc.get("exclude-not-result")};
Object userObject = ((ResultList<?>)result).getUserObject();
if (userObject == null || !userObject.getClass().isArray() ||... | private Object[] extractSelectExecutor(Object result) {
if (result instanceof ResultList == false)
return new Object[]{null, _loc.get("exclude-not-result")};
Object userObject = ((ResultList<?>)result).getUserObject();
if (userObject == null || !userObject.getClass().isArray() ||... |
public void testStatelessComponentPageWithMount() throws Exception
{
tester.getApplication().mountBookmarkablePage("/stateless", StatelessComponentPage.class);
// test is always the home page. it doesn't work then
// executeTest(StatelessComponentPage.class,
// "StatelessComponentPage_mount_result.html");
t... | public void testStatelessComponentPageWithMount() throws Exception
{
tester.getApplication().mountBookmarkablePage("/stateless", StatelessComponentPage.class);
// test is always the home page. it doesn't work then
// executeTest(StatelessComponentPage.class,
// "StatelessComponentPage_mount_result.html");
t... |
public SampleResult sample(Entry e) {
SampleResult res = new SampleResult();
res.setSampleLabel(getName());
res.sampleStart();
StringBuilder sb = new StringBuilder(100);
StringBuilder rd = new StringBuilder(20); // for request Data
if (isDisplayJMeterVariables()){
... | public SampleResult sample(Entry e) {
SampleResult res = new SampleResult();
res.setSampleLabel(getName());
res.sampleStart();
StringBuilder sb = new StringBuilder(100);
StringBuilder rd = new StringBuilder(20); // for request Data
if (isDisplayJMeterVariables()){
... |
public void execute()
throws BuildException {
validate();
NetCommand command = new NetCommand(this, "WSDL", "wsdl");
command.setFailOnError(failOnError);
//fill in args
command.addArgument("/nologo");
command.addArgument("/out:" + destFile);
comma... | public void execute()
throws BuildException {
validate();
NetCommand command = new NetCommand(this, "WSDL", "wsdl");
command.setFailOnError(failOnError);
//fill in args
command.addArgument("/nologo");
command.addArgument("/out:" + destFile);
comma... |
public enum NonpolymorphicType {
EXACT,
JOINABLE,
FALSE
};
No newline at end of file | public enum NonpolymorphicType {
EXACT,
JOINABLE,
FALSE
}
No newline at end of file |
private static void writeFileStart(PrintWriter writer, SampleSaveConfiguration saveConfig) {
if (saveConfig.saveAsXml()) {
writer.println(XML_HEADER);
writer.println(TESTRESULTS_START_V1_1);
} else if (saveConfig.saveFieldNames()) {
writer.println(OldSaveService.printableFieldNamesToString());
}
}
| private static void writeFileStart(PrintWriter writer, SampleSaveConfiguration saveConfig) {
if (saveConfig.saveAsXml()) {
writer.println(XML_HEADER);
writer.println(TESTRESULTS_START_V1_1);
} else if (saveConfig.saveFieldNames()) {
writer.println(OldSaveService.printableFieldNamesToString(saveConfig));
... |
protected void mergeIn(TestElement element) {
PropertyIterator iter = element.propertyIterator();
while (iter.hasNext()) {
JMeterProperty prop = iter.next();
addProperty(prop, true);
}
}
| protected void mergeIn(TestElement element) {
PropertyIterator iter = element.propertyIterator();
while (iter.hasNext()) {
JMeterProperty prop = iter.next();
addProperty(prop, false);
}
}
|
public Object getValue(Discriminator discrim, boolean adapt) {
if (discrim.getValue() != null)
return discrim.getValue();
if (StringUtils.isEmpty(_value)) {
return discrim.getMappingRepository().getMappingDefaults().
getDiscriminatorValue(discrim, adapt);
... | public Object getValue(Discriminator discrim, boolean adapt) {
if (discrim.getValue() != null)
return discrim.getValue();
if (StringUtils.isEmpty(_value)) {
return discrim.getMappingRepository().getMappingDefaults().
getDiscriminatorValue(discrim, adapt);
... |
private void findLabel(View v) throws BuildException {
Label[] allLabels = v.getLabels();
for (int i = 0; i < allLabels.length; i++) {
Label stLabel = allLabels[i];
log("checking label " + stLabel.getName(), Project.MSG_DEBUG);
if (stLabel.getName().equals(this.la... | private void findLabel(View v) throws BuildException {
Label[] allLabels = v.getLabels();
for (int i = 0; i < allLabels.length; i++) {
Label stLabel = allLabels[i];
log("checking label " + stLabel.getName(), Project.MSG_DEBUG);
if (stLabel != null && !stLabel.isDe... |
public void setLocale(Locale locale) {
// REVISIT when error handling is settled
}
| public void setLocale(Locale locale) {
fLocale = locale;
}
|
public Url mapHandler(IRequestHandler requestHandler)
{
PageComponentInfo info = null;
if (requestHandler instanceof RenderPageRequestHandler)
{
IRequestablePage page = ((RenderPageRequestHandler)requestHandler).getPage();
PageInfo i = new PageInfo(page.getPageId());
info = new PageComponentInfo(i, n... | public Url mapHandler(IRequestHandler requestHandler)
{
PageComponentInfo info = null;
if (requestHandler instanceof RenderPageRequestHandler)
{
IRequestablePage page = ((RenderPageRequestHandler)requestHandler).getPage();
PageInfo i = new PageInfo(page.getPageId());
info = new PageComponentInfo(i, n... |
public ID getContainerID();
}
| public ID getLocalContainerID();
}
|
public AbstractToolbar(final IModel<?> model, final DataTable<?> table)
{
super("$toolbar$" + counter++, model);
this.table = table;
}
| public AbstractToolbar(final IModel<?> model, final DataTable<?> table)
{
super("" + (counter++), model);
this.table = table;
}
|
protected void onComponentTag(final ComponentTag tag)
{
// Default handling for component tag
super.onComponentTag(tag);
try
{
String value = getValue();
if (value != null && !"".equals(value))
{
tag.put("value", value);
}
}
catch (Exception e)
{
// ignore.
}
// If the subclass ... | protected void onComponentTag(final ComponentTag tag)
{
// Default handling for component tag
super.onComponentTag(tag);
try
{
String value = getModelObjectAsString();
if (value != null && !"".equals(value))
{
tag.put("value", value);
}
}
catch (Exception e)
{
// ignore.
}
// If... |
public static String formNotImplemented() {
return formError("501 Method not implemented", "Service not implemented, programer was lazy");
}
| public static String formNotImplemented() {
return formError("501 Method not implemented", "Service not implemented");
}
|
protected void runRequest() throws Exception {
int code = -1;
try {
setupProxies();
setupAuthentication();
setupTimeouts();
URLConnection urlConnection = (URLConnection) directoryOrFile.openConnection();
// set cache to off if using jar protocol
// this is for addressing bug https://bugs.eclipse.... | protected void runRequest() throws Exception {
int code = -1;
try {
setupProxies();
setupAuthentication();
setupTimeouts();
URLConnection urlConnection = directoryOrFile.openConnection();
// set cache to off if using jar protocol
// this is for addressing bug https://bugs.eclipse.org/bugs/show_bu... |
public ExplainPanel(MarkupContainer<?> parent,String html, String code)
{
super(parent,"explainPanel");
add(new MultiLineLabel(this,"html", html));
add(new MultiLineLabel(this,"code", code).setEscapeModelStrings(false));
}
} | public ExplainPanel(MarkupContainer parent,String html, String code)
{
super(parent,"explainPanel");
add(new MultiLineLabel(this,"html", html));
add(new MultiLineLabel(this,"code", code).setEscapeModelStrings(false));
}
} |
public static BookmarkablePageLink link(MarkupContainer<?> parent,final String name, final Book book,
final String noBookTitle)
{
final BookmarkablePageLink link = new BookmarkablePageLink(parent,name, BookDetails.class);
if (book != null)
{
link.setParameter("id", book.getId());
link.add(new Label(li... | public static BookmarkablePageLink link(MarkupContainer parent,final String name, final Book book,
final String noBookTitle)
{
final BookmarkablePageLink link = new BookmarkablePageLink(parent,name, BookDetails.class);
if (book != null)
{
link.setParameter("id", book.getId());
link.add(new Label(link,... |
BreadCrumbPanel create(MarkupContainer parent,String componentId, IBreadCrumbModel breadCrumbModel);
/*
* $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar
* 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17
* Mar 2006) $
*
* =====================================... | BreadCrumbPanel create(MarkupContainer parent,String componentId, IBreadCrumbModel breadCrumbModel);
/*
* $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar
* 2006) eelco12 $ $Revision: 5004 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17
* Mar 2006) $
*
* =====================================... |
public Component getHeader(MarkupContainer<?> parent, String componentId)
{
return new Label(parent,componentId, getDisplayModel());
}
} | public Component getHeader(MarkupContainer parent, String componentId)
{
return new Label(parent,componentId, getDisplayModel());
}
} |
Component getHeader(MarkupContainer parent, String componentId);
/*
* $Id$ $Revision$
* $Date$
*
* ==================================================================== Licensed
* under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obt... | Component getHeader(MarkupContainer parent, String componentId);
/*
* $Id$ $Revision$
* $Date$
*
* ==================================================================== Licensed
* under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obt... |
Component getFilter(MarkupContainer parent,String componentId, FilterForm form);
/*
* $Id$
* $Revision$
* $Date$
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Li... | Component getFilter(MarkupContainer parent,String componentId, FilterForm form);
/*
* $Id$
* $Revision$
* $Date$
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Li... |
public abstract Panel getPanel(MarkupContainer<?> parent,final String panelId);
}
| public abstract Panel getPanel(MarkupContainer parent,final String panelId);
}
|
Panel getPanel(MarkupContainer parent,final String panelId);
/*
* $Id$
* $Revision$
* $Date$
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... | Panel getPanel(MarkupContainer parent,final String panelId);
/*
* $Id$
* $Revision$
* $Date$
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... |
public Panel getPanel(MarkupContainer<?> parent, final String panelId)
{
if (panel == null)
{
panel = delegate.getPanel(parent,panelId);
}
return panel;
}
}
| public Panel getPanel(MarkupContainer parent, final String panelId)
{
if (panel == null)
{
panel = delegate.getPanel(parent,panelId);
}
return panel;
}
}
|
public BoxBorder(MarkupContainer<?> parent, final String id)
{
super(parent,id);
}
}
| public BoxBorder(MarkupContainer parent, final String id)
{
super(parent,id);
}
}
|
public ComponentFeedbackPanel(MarkupContainer<?> parent,String id, Component filter)
{
super(parent,id, new ComponentFeedbackMessageFilter(filter));
}
} | public ComponentFeedbackPanel(MarkupContainer parent,String id, Component filter)
{
super(parent,id, new ComponentFeedbackMessageFilter(filter));
}
} |
public AjaxTestBorder(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
} | public AjaxTestBorder(MarkupContainer parent,String id)
{
super(parent,id);
}
} |
public SimpleTestPanelBase(MarkupContainer<?> parent,String name)
{
super(parent,name);
baseSpan = new WebMarkupContainer(this,"baseSpan");
add(baseSpan);
}
} | public SimpleTestPanelBase(MarkupContainer parent,String name)
{
super(parent,name);
baseSpan = new WebMarkupContainer(this,"baseSpan");
add(baseSpan);
}
} |
public MarkupInheritanceBasePanel_6(MarkupContainer<?> parent,final String id)
{
super(parent,id);
add(new Label(this,"panelLabel1", "label 1"));
add(new Label(this,"panelLabel2", "label 2"));
}
} | public MarkupInheritanceBasePanel_6(MarkupContainer parent,final String id)
{
super(parent,id);
add(new Label(this,"panelLabel1", "label 1"));
add(new Label(this,"panelLabel2", "label 2"));
}
} |
public MarkupInheritanceBasePanel_9(MarkupContainer<?> parent,final String id)
{
super(parent,id);
add(new Label(this,"panelLabel1", "label 1"));
add(new Label(this,"panelLabel2", "label 2"));
}
} | public MarkupInheritanceBasePanel_9(MarkupContainer parent,final String id)
{
super(parent,id);
add(new Label(this,"panelLabel1", "label 1"));
add(new Label(this,"panelLabel2", "label 2"));
}
} |
public MarkupInheritanceExtensionPanel_6(MarkupContainer<?> parent,final String id)
{
super(parent,id);
add(new Label(this,"extendLabel", "extension label"));
}
} | public MarkupInheritanceExtensionPanel_6(MarkupContainer parent,final String id)
{
super(parent,id);
add(new Label(this,"extendLabel", "extension label"));
}
} |
public MarkupInheritanceExtensionPanel_9(MarkupContainer<?> parent,final String id)
{
super(parent,id);
add(new Label(this,"extendLabel", "extension label"));
}
} | public MarkupInheritanceExtensionPanel_9(MarkupContainer parent,final String id)
{
super(parent,id);
add(new Label(this,"extendLabel", "extension label"));
}
} |
public TestContainer(MarkupContainer<?> parent,String id)
{
super(parent,id);
add(new Label(this,"test", "myTest"));
}
}
} | public TestContainer(MarkupContainer parent,String id)
{
super(parent,id);
add(new Label(this,"test", "myTest"));
}
}
} |
public BorderComponent1(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
}
| public BorderComponent1(MarkupContainer parent,String id)
{
super(parent,id);
}
}
|
public BorderComponent2(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
}
| public BorderComponent2(MarkupContainer parent,String id)
{
super(parent,id);
}
}
|
public MyApplicationBorder(MarkupContainer<?> parent,final String id)
{
super(parent,id);
Border border = new BoxBorder(this,"boxBorder");
add(border);
}
}
| public MyApplicationBorder(MarkupContainer parent,final String id)
{
super(parent,id);
Border border = new BoxBorder(this,"boxBorder");
add(border);
}
}
|
public BasePanel(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
} | public BasePanel(MarkupContainer parent,String id)
{
super(parent,id);
}
} |
public PanelA(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
} | public PanelA(MarkupContainer parent,String id)
{
super(parent,id);
}
} |
public PanelB(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
} | public PanelB(MarkupContainer parent,String id)
{
super(parent,id);
}
} |
public MyPanel(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
} | public MyPanel(MarkupContainer parent,String id)
{
super(parent,id);
}
} |
public MyPanel2(MarkupContainer<?> parent,String id)
{
super(parent,id);
}
} | public MyPanel2(MarkupContainer parent,String id)
{
super(parent,id);
}
} |
public TestBasePanel(MarkupContainer<?> parent)
{
super(parent,"panel");
}
} | public TestBasePanel(MarkupContainer parent)
{
super(parent,"panel");
}
} |
public TestExtendedPanel(MarkupContainer<?> parent)
{
super(parent);
}
} | public TestExtendedPanel(MarkupContainer parent)
{
super(parent);
}
} |
public InlineTestPanel(MarkupContainer<?> parent, String id, Page page)
{
super(parent,id);
Fragment child = new Fragment(this,"child", "child-frag", page);
add(child);
}
} | public InlineTestPanel(MarkupContainer parent, String id, Page page)
{
super(parent,id);
Fragment child = new Fragment(this,"child", "child-frag", page);
add(child);
}
} |
public PanelWithHeaderPart(MarkupContainer<?> parent,String id)
{
super(parent,id);
add(new Label(this,"body"));
add(new StyleSheetReference(this,"testlink", PanelWithHeaderPart.class,"test.css"));
add(new JavaScriptReference(this,"testscript", PanelWithHeaderPart.class, "test.js"));
}
} | public PanelWithHeaderPart(MarkupContainer parent,String id)
{
super(parent,id);
add(new Label(this,"body"));
add(new StyleSheetReference(this,"testlink", PanelWithHeaderPart.class,"test.css"));
add(new JavaScriptReference(this,"testscript", PanelWithHeaderPart.class, "test.js"));
}
} |
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim(x, y, width, height);
NSRect rect = new NSRect ();
rect.x = trim.x;
rect.y = trim.y;
rect.width = trim.width;
rect.height = trim.height;
rect = NSWindow.static_frameRectForContentRect_styleMask... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim(x, y, width, height);
NSRect rect = new NSRect ();
rect.x = trim.x;
rect.y = trim.y;
rect.width = trim.width;
rect.height = trim.height;
rect = NSWindow.static_frameRectForContentRect_styleMask... |
public void paste () {
checkWidget();
if ((style & SWT.READ_ONLY) != 0) return;
boolean paste = true;
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
String oldText = getClipboardText ();
if (oldText != null) {
Point selection = getSelection ();
String newText = verifyText (oldText, selection.x, selecti... | public void paste () {
checkWidget();
if ((style & SWT.READ_ONLY) != 0) return;
boolean paste = true;
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
String oldText = getClipboardText ();
if (oldText != null) {
Point selection = getSelection ();
String newText = verifyText (oldText, selection.x, selecti... |
protected EndpointDescription createEndpointDescriptionFromDiscovery(
IServiceInfo discoveredServiceInfo) {
DiscoveredEndpointDescription ded = endpointDescriptionFactory.createDiscoveredEndpointDescription(discoveryLocator, discoveredServiceInfo);
assertNotNull(ded);
return ded.getEndpointDescription();
}
... | protected org.osgi.service.remoteserviceadmin.EndpointDescription createEndpointDescriptionFromDiscovery(
IServiceInfo discoveredServiceInfo) {
DiscoveredEndpointDescription ded = endpointDescriptionFactory.createDiscoveredEndpointDescription(discoveryLocator, discoveredServiceInfo);
assertNotNull(ded);
retur... |
public void endElement(QName element, Augmentations augs) throws XNIException {
if (DEBUG_EVENTS) {
System.out.println("==>endElement: " + element);
}
ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
if (elementPSVI != null) {
ElementImpl elementNode = (ElementImpl) fCurrent... | public void endElement(QName element, Augmentations augs) throws XNIException {
if (DEBUG_EVENTS) {
System.out.println("==>endElement: " + element);
}
ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
if (elementPSVI != null) {
ElementImpl elementNode = (ElementImpl) fCurrent... |
private List findMatchesHelper(
IProgramElement node,
String pattern,
IProgramElement.Kind kind,
List matches) {
if (node != null && node.getName().indexOf(pattern) != -1) {
if (kind == null || node.getKind().equals(kind)) {
matches.add(node);
}
}
if (node.getChildren() != null) {
fo... | private List findMatchesHelper(
IProgramElement node,
String pattern,
IProgramElement.Kind kind,
List matches) {
if (node != null && node.getName().indexOf(pattern) != -1) {
if (kind == null || node.getKind().equals(kind)) {
matches.add(node);
}
}
if (node != null && node.getChildren() ... |
protected final void renderHeadFromAssociatedMarkupFile(final HtmlHeaderContainer htmlContainer)
{
// Gracefully getAssociateMarkupStream. Throws no exception in case
// markup is not found
final MarkupStream markupStream = container.getAssociatedMarkupStream(false);
// No associated markup => no header sect... | protected final void renderHeadFromAssociatedMarkupFile(final HtmlHeaderContainer htmlContainer)
{
// Gracefully getAssociateMarkupStream. Throws no exception in case
// markup is not found
final MarkupStream markupStream = container.getAssociatedMarkupStream(false);
// No associated markup => no header sect... |
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
setItemCount (null, count);
}
void setItemCount (TreeItem parentItem, int count) {
int itemCount = getItemCount (parentItem);
if (count == itemCount) return;
setRedraw (false);
int [] top = new int [1], left = new int [1];
O... | public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
setItemCount (null, count);
}
void setItemCount (TreeItem parentItem, int count) {
int itemCount = getItemCount (parentItem);
if (count == itemCount) return;
setRedraw (false);
int [] top = new int [1], left = new int [1];
O... |
public DatatypeValidator createDatatypeValidator(String typeName, Vector validators) {
DatatypeValidator simpleType = null;
if ( validators!=null ) {
simpleType = new UnionDatatypeValidator(validators);
}
if ( simpleType !=null ) {
registerUserDefinedValidator... | public DatatypeValidator createDatatypeValidator(String typeName, Vector validators) {
DatatypeValidator simpleType = null;
if ( validators!=null ) {
simpleType = new UnionDatatypeValidator(validators, null);
}
if ( simpleType !=null ) {
registerUserDefinedVal... |
public void close () {
checkWidget ();
closeWidget ();
}
void createHandle () {
if (shellHandle != 0) {
scrolledHandle = OS.ContentControl_Content (shellHandle);
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
int children = OS.Panel_Children (scrolledHandle);
handle = OS.UIElementCollection_default ... | public void close () {
checkWidget ();
closeWidget ();
}
void createHandle () {
if (shellHandle != 0) {
scrolledHandle = OS.ContentControl_Content (shellHandle);
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
int children = OS.Panel_Children (scrolledHandle);
handle = OS.UIElementCollection_default ... |
public void renderHead(IHeaderResponse response)
{
YuiLib.load(response, getConfigureYUIBasePath());
| public void renderHead(IHeaderResponse response)
{
YuiLib.load(response);
|
private void process() throws Exception {
String manifest = "Manifest-Version: 1.0\n\n";
for (int i = 0; i < descriptors.length; ++i) {
String descriptorName = descriptors[i];
File descriptorFile = new File(descriptorDirectory, descriptorName);
if (is... | private void process() throws Exception {
String manifest = "Manifest-Version: 1.0\n\n";
for (int i = 0; i < descriptors.length; ++i) {
String descriptorName = descriptors[i];
File descriptorFile = new File(descriptorDirectory, descriptorName);
if (is... |
public byte[] weaveClass (String name, byte[] bytes) throws IOException {
if (enabled) {
try {
delegateForCurrentClass=null; // TODO will need stack if going recursive...
if (trace.isTraceEnabled()) trace.enter("weaveClass",this,new Object[] {name,bytes});
if (shouldWeave(name, bytes)) {
info(... | public byte[] weaveClass (String name, byte[] bytes) throws IOException {
if (enabled) {
try {
delegateForCurrentClass=null;
if (trace.isTraceEnabled()) trace.enter("weaveClass",this,new Object[] {name,bytes});
if (shouldWeave(name, bytes)) {
info("weaving '" + name + "'");
bytes = getWov... |
protected boolean matchesSubtypes(ResolvedType type) {
//System.out.println("matching: " + this + " to " + type);
if (matchesExactly(type)) {
//System.out.println(" true");
return true;
}
// FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
for (Iterator i = type.getDirectSupertypes(); i.hasNext(); ... | protected boolean matchesSubtypes(ResolvedType type) {
//System.out.println("matching: " + this + " to " + type);
if (matchesExactly(type)) {
//System.out.println(" true");
return true;
}
// FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
for (Iterator i = type.getDirectSupertypes(); i.hasNext(); ... |
public Index()
{
// normal link instead of an autolink as it looks a bit weird to refer
// to PageWithCustomLoading.html while the template has got a very
// different name (CustomLoadedTemplate.html)
add(new BookmarkablePageLink("customLoadingPageLink", PageWithCustomLoading.class));
}
| public Index()
{
// normal link instead of an autolink as it looks a bit weird to refer
// to PageWithCustomLoading.html while the template has got a very
// different name (CustomLoadedTemplate.html)
add(new BookmarkablePageLink(this, "customLoadingPageLink", PageWithCustomLoading.class));
}
|
public static void main (String [] args) {
Display display = new Display ();
Program p = Program.findProgram (".txt");
if (p != null) p.execute ("c:\\autoexec.bat");
display.dispose ();
}
| public static void main (String [] args) {
Display display = new Display ();
Program p = Program.findProgram (".txt");
if (p != null) p.execute ("c:\\autoexec.bat"); // Windows-specific filename
display.dispose ();
}
|
private static final int MAX_PARAMETER_COUNT = 6;
static {
desc.add(JMeterUtils.getResString("regexfunc_param_1"));// regex //$NON-NLS-1$
desc.add(JMeterUtils.getResString("regexfunc_param_2"));// template //$NON-NLS-1$
desc.add(JMeterUtils.getResString("regexfunc_param_3"));// which match //$NON-NLS-1$
desc.... | private static final int MAX_PARAMETER_COUNT = 6;
static {
desc.add(JMeterUtils.getResString("regexfunc_param_1"));// regex //$NON-NLS-1$
desc.add(JMeterUtils.getResString("regexfunc_param_2"));// template //$NON-NLS-1$
desc.add(JMeterUtils.getResString("regexfunc_param_3"));// which match //$NON-NLS-1$
desc.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.