buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public short
getPriority() {
return priority;
}
byte []
rrToWire(Compression c) throws IOException {
if (target == null)
return null;
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
ds.writeShort(priority);
target.toWire(ds, null);
return... | public short
getPriority() {
return priority;
}
byte []
rrToWire(Compression c, int index) throws IOException {
if (target == null)
return null;
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
ds.writeShort(priority);
target.toWire(ds, nul... |
public
RollingFileAppenderBeanInfo() {
Class clazz = RollingFileAppender.class;
try {
// the magic is here
BeanInfo bi = Introspector.getBeanInfo(clazz,
Introspector.IGNORE_ALL_BEANINFO);
props = bi.getPropertyDescriptors();
if(props != null) {
for(int i = 0; i < props.le... | public
RollingFileAppenderBeanInfo() {
Class clazz = RollingFileAppender.class;
try {
// the magic is here
BeanInfo bi = Introspector.getBeanInfo(clazz,
Introspector.IGNORE_ALL_BEANINFO);
props = bi.getPropertyDescriptors();
if(props != null) {
for(int i = 0; i < props.le... |
public int getNodeType() {
return SUPER_FIELD_ACCESS;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
SuperFieldAccess result = new SuperFieldAccess(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setName((SimpleName) AS... | public int getNodeType() {
return SUPER_FIELD_ACCESS;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
SuperFieldAccess result = new SuperFieldAccess(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setName((SimpleName) A... |
public
static
void main(String argv[]) {
Layout layout = new PatternLayout("%p [%t] %C %F - %m\n");
Appender out = new FileAppender(layout, System.out);
CategoryWrapper w1 = new CategoryWrapper("c1");
w1.addAppender(out);
w1.print("hello");
}
| public
static
void main(String argv[]) {
Layout layout = new PatternLayout("%p [%t] %C %F - %m\n");
Appender out = new ConsoleAppender(layout, ConsoleAppender.SYSTEM_OUT);
CategoryWrapper w1 = new CategoryWrapper("c1");
w1.addAppender(out);
w1.print("hello");
}
|
public int
getOpcode() {
return (flags >> 11) & 0xF;
}
void
setCount(int field, int value) {
if (value < 0 || value > 0xFF)
throw new IllegalArgumentException("DNS section count " +
value + " is out of range");
counts[field] = value;
}
void
incCount(int field) {
if (counts[field] == 0xFF)
throw new I... | public int
getOpcode() {
return (flags >> 11) & 0xF;
}
void
setCount(int field, int value) {
if (value < 0 || value > 0xFF)
throw new IllegalArgumentException("DNS section count " +
value + " is out of range");
counts[field] = value;
}
void
incCount(int field) {
if (counts[field] == 0xFF)
throw new I... |
public URL getResource(String rpath) throws MalformedURLException {
URL url = null;
if ("".equals(rpath))
return getDocumentBase();
if (rpath == null)
return null;
if ( ! rpath.startsWith("/")) {
rpath="/" + rpath;
}
// Create a Sub-Request, do the request processing stage
... | public URL getResource(String rpath) throws MalformedURLException {
URL url = null;
if ("".equals(rpath))
return getDocumentBase();
if (rpath == null)
return null;
if ( ! rpath.startsWith("/")) {
rpath="/" + rpath;
}
// Create a Sub-Request, do the request processing stage
... |
public SplashScreen(String title, String iconName) {
//super(title);
ImageIcon splashImage = loadIconResource(iconName, iconName);
int imgWidth = splashImage.getIconWidth();
int imgHeight = splashImage.getIconHeight();
Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
setCursor(... | public SplashScreen(String title, String iconName) {
super(title);
ImageIcon splashImage = loadIconResource(iconName, iconName);
int imgWidth = splashImage.getIconWidth();
int imgHeight = splashImage.getIconHeight();
Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
setCursor(Cu... |
public Vector rowObjectsFor(Object t) {
if (!(t instanceof UMLClassDiagram)) return new Vector();
UMLClassDiagram d = (UMLClassDiagram) t;
Vector edges = d.getGraphModel().getEdges();
Vector res = new Vector();
int size = edges.size();
for (int i = 0; i < size; i++) {
Object edge = edges... | public Vector rowObjectsFor(Object t) {
if (!(t instanceof UMLClassDiagram)) return new Vector();
UMLClassDiagram d = (UMLClassDiagram) t;
Vector edges = d.getEdges();
Vector res = new Vector();
int size = edges.size();
for (int i = 0; i < size; i++) {
Object edge = edges.elementAt(i);
... |
private void setEditorAreaVisible(boolean visible) {
ArrayList workbooks = ((EditorArea)editorArea).getEditorWorkbooks();
for (Iterator iter = workbooks.iterator(); iter.hasNext();) {
EditorWorkbook workbook = (EditorWorkbook) iter.next();
workbook.setVisible(visible);
EditorPane pane = workbook.getVisibleEdito... | private void setEditorAreaVisible(boolean visible) {
ArrayList workbooks = ((EditorArea)editorArea).getEditorWorkbooks();
for (Iterator iter = workbooks.iterator(); iter.hasNext();) {
EditorWorkbook workbook = (EditorWorkbook) iter.next();
workbook.setVisible(visible);
EditorPane pane = workbook.getVisibleEdito... |
public ComposerController(ComposerModel model, ViewItem viewItem) {
super(viewItem);
// init model (defaults to empty plain text message)
composerModel = model;
// init controllers for different parts of the composer
attachmentController = new AttachmentController(this);
headerController = new HeaderCont... | public ComposerController(ComposerModel model, ViewItem viewItem) {
super(viewItem);
// init model (defaults to empty plain text message)
composerModel = model;
// init controllers for different parts of the composer
attachmentController = new AttachmentController(this);
headerController = new HeaderCont... |
public ImageDescriptor computeImageDescriptor() {
ImageDescriptor descriptor = super.computeImageDescriptor();
if (!isPinned()) {
return descriptor;
}
// Check if the pinned preference is set
IPreferenceStore prefStore = WorkbenchPlugin.getDefault()
.getPreferen... | public ImageDescriptor computeImageDescriptor() {
ImageDescriptor descriptor = super.computeImageDescriptor();
if (!isPinned()) {
return descriptor;
}
// Check if the pinned preference is set
IPreferenceStore prefStore = WorkbenchPlugin.getDefault()
.getPreferen... |
public int getNodeType() {
return QUALIFIED_NAME;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
QualifiedName result = new QualifiedName(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setQualifier((Name) getQualifier(... | public int getNodeType() {
return QUALIFIED_NAME;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
QualifiedName result = new QualifiedName(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setQualifier((Name) getQualifier... |
public void recordReturnFrom(FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
if (initsOnReturn == FlowInfo.DEAD_END) {
initsOnReturn = flowInfo.copy().unconditionalInits();
} else {
initsOnReturn.mergedWith(flowInfo.unconditionalInits());
}
}
| public void recordReturnFrom(FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
if (initsOnReturn == FlowInfo.DEAD_END) {
initsOnReturn = flowInfo.copy().unconditionalInits();
} else {
initsOnReturn = initsOnReturn.mergedWith(flowInfo.unconditionalInits());
}
}
|
protected INameEnvironment getBuildNameEnvironment() throws JavaModelException {
if (JavaModelManager.USING_NEW_BUILDER){
return new NameEnvironment(getProject(), false);
} else {
IProject project = getProject().getProject();
StateImpl state= (StateImpl) JavaModelManager.getJavaModelManager().getLastBuiltStat... | protected INameEnvironment getBuildNameEnvironment() throws JavaModelException {
if (JavaModelManager.USING_NEW_BUILDER){
return new NameEnvironment(getProject());
} else {
IProject project = getProject().getProject();
StateImpl state= (StateImpl) JavaModelManager.getJavaModelManager().getLastBuiltState(proje... |
public final Map getCurrentState() {
final Map currentState = new HashMap(4);
final Shell newActiveShell = display.getActiveShell();
currentState.put(ISources.ACTIVE_SHELL_NAME, newActiveShell);
/*
* We will fallback to the workbench window, but only if a dialog is not
* open.
*/
final IContextSer... | public final Map getCurrentState() {
final Map currentState = new HashMap(4);
final Shell newActiveShell = display.getActiveShell();
currentState.put(ISources.ACTIVE_SHELL_NAME, newActiveShell);
/*
* We will fallback to the workbench window, but only if a dialog is not
* open.
*/
final IContextSer... |
private static StringManager sm = StringManager.
getManager("org.apache.tomcat.core");
| private static StringManager sm = StringManager.
getManager("org.apache.tomcat.resources");
|
public static void main( String[] argv) {
String type = null;
if(argv.length == 1)
type = argv[0];
else
Usage("Wrong number of arguments.");
if(type.equals("basic")) {
System.out.println("System property \""+
BasicConfigurator.DISABLE_OVERRIDE_KEY +
"\" is set to ... | public static void main( String[] argv) {
String type = null;
if(argv.length == 1)
type = argv[0];
else
Usage("Wrong number of arguments.");
if(type.equals("basic")) {
System.out.println("System property \""+
BasicConfigurator.DISABLE_OVERRIDE_KEY +
"\" is set to ... |
public
CERTRecord(Name name, int dclass, long ttl, int certType, int keyTag,
int alg, byte [] cert)
{
this(name, dclass, ttl);
checkU16("certType", certType);
checkU16("keyTag", keyTag);
checkU8("alg", alg);
this.certType = certType;
this.keyTag = keyTag;
this.alg = alg;
this.cert = cert;
}
Record
rrFromW... | public
CERTRecord(Name name, int dclass, long ttl, int certType, int keyTag,
int alg, byte [] cert)
{
this(name, dclass, ttl);
checkU16("certType", certType);
checkU16("keyTag", keyTag);
checkU8("alg", alg);
this.certType = certType;
this.keyTag = keyTag;
this.alg = alg;
this.cert = cert;
}
Record
rrFromW... |
protected boolean isAffectedByOpenable(IJavaElementDelta delta, IJavaElement element) {
// ignore changes to working copies
if (element instanceof CompilationUnit && ((CompilationUnit)element).isWorkingCopy()) {
return false;
}
// if no focus, hierarchy is affected if the element is part of the region
if (fType... | protected boolean isAffectedByOpenable(IJavaElementDelta delta, IJavaElement element) {
// ignore changes to working copies
if (element instanceof CompilationUnit && ((CompilationUnit)element).isWorkingCopy()) {
return false;
}
// if no focus, hierarchy is affected if the element is part of the region
if (this.... |
public Object lookupData() {
return pluginHandler;
}
});
WizardModel model = new DefaultWizardModel(new Step[]{
new PluginStep(data),
new LocationStep(data)
... | public Object lookupData() {
return pluginHandler;
}
});
WizardModel model = new DefaultWizardModel(new Step[]{
new PluginStep(data),
new LocationStep(data)
... |
public boolean visit(Argument argument, BlockScope scope) {
if (argument.modifiers != NO_MODIFIERS) {
this.scribe.printComment();
this.scribe.printModifiers(argument.annotations, this);
this.scribe.space();
}
/*
* Argument type
*/
if (argument.type != null) {
argument.type.traverse... | public boolean visit(Argument argument, BlockScope scope) {
if (argument.modifiers != NO_MODIFIERS) {
this.scribe.printComment();
this.scribe.printModifiers(argument.annotations, this);
this.scribe.space();
}
/*
* Argument type
*/
if (argument.type != null) {
argument.type.traverse... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
IIndex index = manager.getIndex(this.indexPath, true, /*reuse index file*/ true /*create if none*/);
if (index == null) return ... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
IIndex index = manager.getIndex(this.indexPath, true, /*reuse index file*/ true /*create if none*/);
if (in... |
public URL[] getParentURLs(ClassLoader cl){
SimpleClassLoader scl=(SimpleClassLoader)cl;
return ((SimpleClassLoader)cl.getParent()).getURLs();
}
| public URL[] getParentURLs(ClassLoader cl){
SimpleClassLoader scl=(SimpleClassLoader)cl;
return ((SimpleClassLoader)scl.getParent()).getURLs();
}
|
public void notationChanged(ArgoNotationEvent event) {
Argo.log.info("NotationComboBox.notationChanged(" + event + ")");
refresh();
}
| public void notationChanged(ArgoNotationEvent event) {
Notation.cat.debug("NotationComboBox.notationChanged(" + event + ")");
refresh();
}
|
public Command getCommand(FilterAction filterAction,
IFolder srcFolder, Object[] uids) throws Exception {
MailFolderCommandReference r = new MailFolderCommandReference(
srcFolder, uids);
String variant = ((MailFilterAction) filterAction).getMarkVariant();
if (variant.equals("read")) {
r.setMarkVarian... | public Command getCommand(FilterAction filterAction,
IFolder srcFolder, Object[] uids) throws Exception {
MailFolderCommandReference r = new MailFolderCommandReference(
srcFolder, uids);
String variant = filterAction.get("markvariant");
if (variant.equals("read")) {
r.setMarkVariant(MarkMessageComman... |
protected int errorPage( Request req, Response response ) {
System.out.println("Wrong user/password");
return 0;
}
| protected int errorPage( Request req, Response response ) {
// System.out.println("Wrong user/password");
return 0;
}
|
public void testNamespace() {
Object o = getFactory().create(Uml.ACTOR);
assertNotNull("Didn't create object", o);
assertTrue("Should be a base", ModelFacade.isABase(o));
assertTrue("Should be a actor", ModelFacade.isAActor(o));
runTruthTests(o);
}
| public void testNamespace() {
Object o = ModelFacade.getFacade().create(Uml.ACTOR);
assertNotNull("Didn't create object", o);
assertTrue("Should be a base", ModelFacade.isABase(o));
assertTrue("Should be a actor", ModelFacade.isAActor(o));
runTruthTests(o);
}
|
AbstractMessageFolder createFolder(int folderId);
// The contents of this file are subject to the Mozilla Public License Version
// 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed und... | AbstractMessageFolder createFolder(int folderId);
// The contents of this file are subject to the Mozilla Public License Version
// 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed und... |
public boolean visit(WildcardType node) {
this.result.append('?');
ASTNode bound = getChildNode(node, WildcardType.BOUND_PROPERTY);
if (bound != null) {
if (getBooleanAttribute(node, WildcardType.BOUND_PROPERTY)) {
this.result.append(" extends ");//$NON-NLS-1$
} else {
this.result.append(" super ")... | public boolean visit(WildcardType node) {
this.result.append('?');
ASTNode bound = getChildNode(node, WildcardType.BOUND_PROPERTY);
if (bound != null) {
if (getBooleanAttribute(node, WildcardType.UPPER_BOUND_PROPERTY)) {
this.result.append(" extends ");//$NON-NLS-1$
} else {
this.result.append(" su... |
public void findIndexMatches(Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor progressMonitor) throws IOException {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
this.resetQuery();
SimpleSet int... | public void findIndexMatches(Index index, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor progressMonitor) throws IOException {
if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
this.resetQuery();
SimpleSet int... |
private void updateMessage() {
if (refreshJob.setMessage(getDisplayString()))
refreshJob.schedule(100);
}
| private void updateMessage() {
if (PlatformUI.isWorkbenchRunning() && refreshJob.setMessage(getDisplayString()))
refreshJob.schedule(100);
}
|
public void generateSyntheticFieldInitializationsIfNecessary(
MethodScope scope,
CodeStream codeStream,
| public void generateSyntheticFieldInitializationsIfNecessary(
MethodScope methodScope,
CodeStream codeStream,
|
private void initialize() {
nameField = new UMLTextField2(this, new UMLModelElementNameDocument(this));
stereotypeBox = new UMLComboBox2(stereotypeComboBoxModel, ActionSetModelElementStereotype.SINGLETON);
namespaceComboBox = new UMLComboBox2(namespaceComboBoxModel, ActionSetModelElementName... | private void initialize() {
nameField = new UMLTextField2(this, new UMLModelElementNameDocument());
stereotypeBox = new UMLComboBox2(stereotypeComboBoxModel, ActionSetModelElementStereotype.SINGLETON);
namespaceComboBox = new UMLComboBox2(namespaceComboBoxModel, ActionSetModelElementNamespac... |
public interface IType extends IMember, IAnnotatable {
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public... | public interface IType extends IMember, IAnnotatable {
/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public... |
public
DSRecord(Name name, short dclass, int ttl, int footprint, int alg,
int digestid, byte [] digest)
{
this(name, dclass, ttl);
this.footprint = footprint;
this.alg = (byte) alg;
this.digestid = (byte) digestid;
this.digest = digest;
}
Record
rrFromWire(Name name, short type, short dclass, int ttl, int leng... | public
DSRecord(Name name, short dclass, int ttl, int footprint, int alg,
int digestid, byte [] digest)
{
this(name, dclass, ttl);
this.footprint = footprint;
this.alg = (byte) alg;
this.digestid = (byte) digestid;
this.digest = digest;
}
Record
rrFromWire(Name name, short type, short dclass, int ttl, int leng... |
private TreeNode createTreeStructure() throws Exception {
ListInfo[] lsub = store.fetchSubscribedFolders();
// Create list of unsubscribed folders
List subscribedFolders = new ArrayList(Arrays.asList(lsub));
// INBOX is always subscribed
subscribedFolders.add(new ListInfo("INBOX",null,0));
List unsub... | private TreeNode createTreeStructure() throws Exception {
ListInfo[] lsub = store.fetchSubscribedFolders();
// Create list of unsubscribed folders
List subscribedFolders = new ArrayList(Arrays.asList(lsub));
// INBOX is always subscribed
subscribedFolders.add(new ListInfo("INBOX",null,0));
List unsub... |
private void initComponents() {
nameLabel = new JLabel(AddressbookResourceLoader.getString("dialog",
"editgroupdialog", "name")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
nameTextField = new JTextField();
descriptionLabel = new JLabel(AddressbookResourceLoader.getString... | private void initComponents() {
nameLabel = new JLabel(AddressbookResourceLoader.getString("dialog",
"editgroupdialog", "name")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
nameTextField = new JTextField();
descriptionLabel = new JLabel(AddressbookResourceLoader.getString... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = receiver.analyseCode(currentScope, flowContext, flowInfo);
receiver.checkNullStatus(currentScope, flowInfo, FlowInfo.NON_NULL);
return position.analyseCode(currentScope, flowContext, flowInfo);
... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
flowInfo = receiver.analyseCode(currentScope, flowContext, flowInfo);
receiver.checkNullStatus(currentScope, flowContext, flowInfo, FlowInfo.NON_NULL);
return position.analyseCode(currentScope, flowContext,... |
public PropPanelEvent(
String name,
ImageIcon icon,
Orientation orientation) {
super(name, icon, orientation);
JList paramList =
new UMLLinkedList(this, new UMLEventParameterListModel());
paramScroll = new JScrollPane(paramList);
new PropPanelButto... | public PropPanelEvent(
String name,
ImageIcon icon,
Orientation orientation) {
super(name, icon, orientation);
JList paramList =
new UMLLinkedList(new UMLEventParameterListModel());
paramScroll = new JScrollPane(paramList);
new PropPanelButton(
... |
public boolean shouldBeEnabled(Object target) {
return _target != null;
}
| public boolean shouldBeEnabled(Object target) {
return _target != null && _target instanceof ToDoItem;
}
|
public String debugName() {
if (this.wildcard != null) {
return String.valueOf(TypeConstants.WILDCARD_CAPTURE_NAME) + this.wildcard.debugName(); //$NON-NLS-1$
}
return super.debugName();
}
| public String debugName() {
if (this.wildcard != null) {
return String.valueOf(TypeConstants.WILDCARD_CAPTURE_NAME) + this.wildcard.debugName();
}
return super.debugName();
}
|
public static Record []
getRecords(Resolver res, String name, short type, short dclass) {
Message query = new Message();
Message response;
Record question;
Record [] answers;
int answerCount = 0, i = 0;
Enumeration e;
if (res == _res && _res == null) {
try {
_res = new Resolver();
}
catch (UnknownHostE... | public static Record []
getRecords(Resolver res, String name, short type, short dclass) {
Message query = new Message();
Message response;
Record question;
Record [] answers;
int answerCount = 0, i = 0;
Enumeration e;
if (res == _res && _res == null) {
try {
res = _res = new Resolver();
}
catch (Unknow... |
protected SendableHeader initHeader() {
SendableHeader header = new SendableHeader();
EncodedWordEncoder encoder = new EncodedWordEncoder();
// RFC822 - Header
// TODO : Add EncodedWord-Support to TO,CC,FROM -> like Subject!
if (model.getToList().size() > 0)
header.set("To", ListParser.parse(model.ge... | protected SendableHeader initHeader() {
SendableHeader header = new SendableHeader();
EncodedWordEncoder encoder = new EncodedWordEncoder();
// RFC822 - Header
// TODO : Add EncodedWord-Support to TO,CC,FROM -> like Subject!
if (model.getToList().size() > 0)
header.set("To", ListParser.parse(model.ge... |
public LoggingEvent(String fqnOfCategoryClass, Category category,
Priority priority, String message, Throwable throwable) {
this.fqnOfCategoryClass = fqnOfCategoryClass;
this.category = category;
this.categoryName = category.getName();
this.priority = priority;
this.message = message;
... | public LoggingEvent(String fqnOfCategoryClass, Category category,
Priority priority, Object message, Throwable throwable) {
this.fqnOfCategoryClass = fqnOfCategoryClass;
this.category = category;
this.categoryName = category.getName();
this.priority = priority;
this.message = message;
... |
public void run() {
if (part != null) {
// the site doesn't give access to the page or the active editor,
// so we need to reach
IWorkbenchWindow window = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page !=... | public void run() {
if (part != null) {
// the site doesn't give access to the page or the active editor,
// so we need to reach
IWorkbenchWindow window = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page !=... |
GlobalVariable[] variables;
/*******************************************************************************
* Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Publi... | GlobalVariable[] variables;
/*******************************************************************************
* Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Publi... |
public static AnimationManager getInstance() {
if (singleton == null)
singleton = new AnimationManager();
return singleton;
}
/**
* Get the background color to be used.
*
* @param control
* The source of the display.
* @return Color
*/
static Color getItemBackgroundColor(Control cont... | public static AnimationManager getInstance() {
if (singleton == null)
singleton = new AnimationManager();
return singleton;
}
/**
* Get the background color to be used.
*
* @param control
* The source of the display.
* @return Color
*/
static Color getItemBackgroundColor(Control cont... |
public void setContents(Vector x) throws PropertyVetoException {
if (_contents == null) _contents = new Vector();
fireVetoableChange("contents", _contents, x);
_contents = x;
}
| public void setContents(Vector x) throws PropertyVetoException {
if (_contents == null) _contents = new Vector();
fireVetoableChangeNoCompare("contents", _contents, x);
_contents = x;
}
|
public boolean addItem(HeaderInterface header) {
boolean result = true;
boolean result2 = false;
//boolean result3 = true;
boolean flags1 = false;
boolean flags2 = false;
Flags flags = ((ColumbaHeader) header).getFlags();
if (flags == null) {
System.out.println("flags is null");
return false;
}... | public boolean addItem(HeaderInterface header) {
boolean result = true;
boolean result2 = false;
//boolean result3 = true;
boolean flags1 = false;
boolean flags2 = false;
Flags flags = ((ColumbaHeader) header).getFlags();
if (flags == null) {
System.out.println("flags is null");
return false;
}... |
private ActionCollaborationDiagram() {
super(Translator.localize("CoreMenu", "CollaborationDiagram"));
}
| private ActionCollaborationDiagram() {
super("CollaborationDiagram");
}
|
public void load()
throws IOException {
Reader reader = new BufferedReader(new FileReader(file));
try {
IMemento memento = XMLMemento.createReadRoot(reader);
activeKeyConfigurations = Collections.unmodifiableList(Persistence.readActiveKeyConfigurations(memento, Persistence.TAG_ACTIVE_KEY_CONFIGURATION... | public void load()
throws IOException {
Reader reader = new BufferedReader(new FileReader(file));
try {
IMemento memento = XMLMemento.createReadRoot(reader);
activeKeyConfigurations = Collections.unmodifiableList(Persistence.readActiveKeyConfigurations(memento, Persistence.TAG_ACTIVE_KEY_CONFIGURATION... |
public void myDoubleClick(Object src) {
int row = _resultsTable.getSelectionModel().getMinSelectionIndex();
Object sel = null;
Diagram d = null;
if (src == _resultsTable) {
sel = _results.elementAt(row);
d = (Diagram) _diagrams.elementAt(row);
}
else {
_numJumpToRelated++;
... | public void myDoubleClick(Object src) {
int row = _resultsTable.getSelectionModel().getMinSelectionIndex();
Object sel = null;
Diagram d = null;
if (src == _resultsTable) {
sel = _results.elementAt(row);
d = (Diagram) _diagrams.elementAt(row);
}
else {
_numJumpToRelated++;
... |
protected void createTreeItemFor(Widget parent, IPreferenceNode node) {
IObjectActivityManager propManager =
WorkbenchPlugin.getDefault().getWorkbench().getObjectActivityManager(
IWorkbenchConstants.PL_PROPERTY_PAGES,
false);
if (propManager != null) {
Collection activeContributions = propManager.get... | protected void createTreeItemFor(Widget parent, IPreferenceNode node) {
IObjectActivityManager propManager =
WorkbenchPlugin.getDefault().getWorkbench().getObjectActivityManager(
IWorkbenchConstants.PL_PROPERTY_PAGES,
false);
if (propManager != null) {
Collection activeContributions = propManager.get... |
public CompilationResult compilationResult(){
return scope.referenceCompilationUnit().compilationResult;
}
/**
* Bytecode generation for a method
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false; // reset wideMode to false
if (... | public CompilationResult compilationResult(){
return scope.referenceCompilationUnit().compilationResult;
}
/**
* Bytecode generation for a method
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false; // reset wideMode to false
if (... |
public void createPage() {
IWorkbenchPreferencePage page;
try {
page =
(IWorkbenchPreferencePage) WorkbenchPlugin.createExtension(
configurationElement,
ATT_CONTRIBUTOR_CLASS);
} catch (CoreException e) {
// Just inform the user about the error. The details are
// written to the log by now... | public void createPage() {
IWorkbenchPreferencePage page;
try {
page =
(IWorkbenchPreferencePage) WorkbenchPlugin.createExtension(
configurationElement,
ATT_CONTRIBUTOR_CLASS);
} catch (CoreException e) {
// Just inform the user about the error. The details are
// written to the log by now... |
public
static
void main(String argv[]) throws Exception {
if(argv.length == 1)
init(argv[0]);
else
usage("Wrong number of arguments.");
test();
}
static
void usage(String msg) {
System.err.println(msg);
System.err.println( "Usage: java "+ FQCNTest.class.getName()+"outpu... | public
static
void main(String argv[]) throws Exception {
if(argv.length == 1)
init(argv[0]);
else
usage("Wrong number of arguments.");
test();
}
static
void usage(String msg) {
System.err.println(msg);
System.err.println( "Usage: java "+ FQCNTest.class.getName()+"outpu... |
public int getNodeType() {
return TYPE_LITERAL;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
TypeLiteral result = new TypeLiteral(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setType((Type) getType().clone(target))... | public int getNodeType() {
return TYPE_LITERAL;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
TypeLiteral result = new TypeLiteral(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setType((Type) getType().clone(target)... |
public
NAPTRRecord(Name _name, short _dclass, int _ttl, int _order, int _preference,
String _flags, String _service, String _regexp, Name _replacement)
{
super(_name, Type.NAPTR, _dclass, _ttl);
order = (short) _order;
preference = (short) _preference;
flags = _flags;
service = _service;
regexp = _regexp;
r... | public
NAPTRRecord(Name _name, short _dclass, int _ttl, int _order, int _preference,
String _flags, String _service, String _regexp, Name _replacement)
{
super(_name, Type.NAPTR, _dclass, _ttl);
order = (short) _order;
preference = (short) _preference;
flags = _flags;
service = _service;
regexp = _regexp;
r... |
protected IPerspectiveDescriptor[] getOpenedPerspectives() {
Perspective opened[] = perspList.getSortedPerspectives();
IPerspectiveDescriptor[] result =
new IPerspectiveDescriptor[opened.length];
for (int i = 0; i < result.length; i++) {
result[i] = opened[i].getDesc();
}
return result;
}
| protected IPerspectiveDescriptor[] getOpenedPerspectives() {
Perspective opened[] = perspList.getOpenedPerspectives();
IPerspectiveDescriptor[] result =
new IPerspectiveDescriptor[opened.length];
for (int i = 0; i < result.length; i++) {
result[i] = opened[i].getDesc();
}
return result;
}
|
public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding tb = type.resolveType(scope);
checkModifiers();
if (tb != null) {
if (tb == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
return;
}
if (tb.isArrayType() && ((ArrayBinding... | public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding tb = type.resolveType(scope);
checkModifiers();
if (tb != null) {
if (tb == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
return;
}
if (tb.isArrayType() && ((ArrayBinding... |
public SystemMenuMaximize(IStackPresentationSite site) {
super(site, WorkbenchMessages.getString("PartPane.maximize"), //$NON-NLS-1$
IStackPresentationSite.STATE_MAXIMIZED);
}
| public SystemMenuMaximize(IStackPresentationSite site) {
super(site, WorkbenchMessages.PartPane_maximize,
IStackPresentationSite.STATE_MAXIMIZED);
}
|
public void recycle() {
name.recycle();
value.recycle();
comment.recycle();
maxAge=-1;
path.recycle();
version=0;
secure=false;
}
| public void recycle() {
name.recycle();
value.recycle();
comment.recycle();
maxAge=-1;
// path.recycle();
version=0;
secure=false;
}
|
public String toString(int tab){
/* slow code */
String s = tabString(tab);
s = s + "case " + constantExpression.toStringExpression() + " : " ;
return s;}
| public String toString(int tab){
/* slow code */
String s = tabString(tab);
s = s + "case "/*nonNLS*/ + constantExpression.toStringExpression() + " : "/*nonNLS*/ ;
return s;}
|
protected ClassLoader parent;
final static int debug=10;
DependManager dependM;
| protected ClassLoader parent;
final static int debug=0;
DependManager dependM;
|
public int authenticate(Request request, Response response) {
return 0;
}
| public int authenticate(Request request, Response response) {
return DECLINED;
}
|
public boolean openAndWait(File file) {
return activeDesktop.open(file);
}
| public boolean openAndWait(File file) {
return activeDesktop.openAndWait(file);
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
boolean valueRequired) {
boolean nonStatic = !binding.isStatic();
receiver.analyseCode(currentScope, flowContext, flowInfo, nonStatic);
if (nonStatic) receiver.checkNullStatus(currentScope, flowInfo, FlowIn... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo,
boolean valueRequired) {
boolean nonStatic = !binding.isStatic();
receiver.analyseCode(currentScope, flowContext, flowInfo, nonStatic);
if (nonStatic) receiver.checkNullStatus(currentScope, flowContext, flo... |
public PotentialMatch(MatchLocator locator, IResource resource, Openable openable) {
this.locator = locator;
this.resource = resource;
this.openable = openable;
if (openable instanceof CompilationUnit) {
this.buildTypeBindings(this.getSource());
} else if (openable instanceof org.eclipse.jdt.internal.core.ClassF... | public PotentialMatch(MatchLocator locator, IResource resource, Openable openable) {
this.locator = locator;
this.resource = resource;
this.openable = openable;
if (openable instanceof CompilationUnit) {
this.buildTypeBindings(this.getSource());
} else if (openable instanceof org.eclipse.jdt.internal.core.ClassF... |
public Command getCommand(FilterAction filterAction, IFolder srcFolder,
Object[] uids) throws Exception {
int rgb = filterAction.getInteger("rgb", Color.black.getRGB());
// create reference
MailFolderCommandReference r = new MailFolderCommandReference(srcFolder, uids);
r.set... | public Command getCommand(FilterAction filterAction, IFolder srcFolder,
Object[] uids) throws Exception {
int rgb = filterAction.getIntegerWithDefault("rgb", Color.black.getRGB());
// create reference
MailFolderCommandReference r = new MailFolderCommandReference(srcFolder, uids);
... |
protected void fullBuild(JavaDevelopmentContextImpl dc, IProgressMonitor monitor) throws CoreException {
IProject project = getProject();
//System.out.println("FULL build of: "+project.getName());
/* create problem reporter and clear all problems */
IProblemReporter problemReporter= new MarkerProblemReport... | protected void fullBuild(JavaDevelopmentContextImpl dc, IProgressMonitor monitor) throws CoreException {
IProject project = getProject();
//System.out.println("FULL build of: "+project.getName());
/* create problem reporter and clear all problems */
IProblemReporter problemReporter= new MarkerProblemReport... |
public
String filter(String in) throws UnexpectedFormatException{
int len = allowedPatterns.length;
for(int i = 0; i < len; i++) {
//System.out.println("["+allowedPatterns[i]+"]");
if(util.match("/"+allowedPatterns[i]+"/", in)) {
//System.out.println("["+in+"] matched ["+allowedPatterns[i]);
... | public
String filter(String in) throws UnexpectedFormatException{
int len = allowedPatterns.length;
for(int i = 0; i < len; i++) {
//System.out.println("["+allowedPatterns[i]+"]");
if(util.match("/"+allowedPatterns[i]+"/", in)) {
//System.out.println("["+in+"] matched ["+allowedPatterns[i]);
... |
protected boolean parseReference(boolean plain) throws InvalidInputException {
Object typeRef = null;
Object reference = null;
int previousPosition = -1;
int typeRefStartPosition = -1;
nextToken : while (this.index < this.scanner.eofPosition) {
previousPosition = this.index;
int token = readToken();
... | protected boolean parseReference(boolean plain) throws InvalidInputException {
Object typeRef = null;
Object reference = null;
int previousPosition = -1;
int typeRefStartPosition = -1;
nextToken : while (this.index < this.scanner.eofPosition) {
previousPosition = this.index;
int token = readToken();
... |
public MethodBinding findExactMethod(
ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite) {
CompilationUnitScope unitScope = compilationUnitScope();
unitScope.recordTypeReferences(argumentTypes);
MethodBinding exactMethod = receiverType.getExactMet... | public MethodBinding findExactMethod(
ReferenceBinding receiverType,
char[] selector,
TypeBinding[] argumentTypes,
InvocationSite invocationSite) {
CompilationUnitScope unitScope = compilationUnitScope();
unitScope.recordTypeReferences(argumentTypes);
MethodBinding exactMethod = receiverType.getExactMet... |
public String toStringExpression(){
/* slow code */
return qualification.toString(0)+".this" ;
}
| public String toStringExpression(){
/* slow code */
return qualification.toString(0)+".this"/*nonNLS*/ ;
}
|
public int compare(Object o1, Object o2) {
return ((String) o2).length() - ((String) o1).length();
}
};
Arrays.sort(encodedDirs, comparator);
}
for (int i = 0; i < compileList.length; i++) {
String arg = compileList[i].getAbsolutePath();
boolean encoded = false;
if (encodedFiles != null... | public int compare(Object o1, Object o2) {
return ((String) o2).length() - ((String) o1).length();
}
};
Arrays.sort(encodedDirs, comparator);
}
for (int i = 0; i < compileList.length; i++) {
String arg = compileList[i].getAbsolutePath();
boolean encoded = false;
if (encodedFiles != null... |
private void findVariableName(char[] token, char[] qualifiedPackageName, char[] qualifiedSourceName, char[] sourceName, char[][] excludeNames){
if(sourceName == null || sourceName.length == 0)
return;
if(CharOperation.endsWith(sourceName, new char[]{'[' ,']'})) {
sourceName = CharOperation.subarray(s... | private void findVariableName(char[] token, char[] qualifiedPackageName, char[] qualifiedSourceName, char[] sourceName, char[][] excludeNames){
if(sourceName == null || sourceName.length == 0)
return;
if(CharOperation.endsWith(sourceName, new char[]{'[' ,']'})) {
sourceName = CharOperation.subarray(s... |
public void enableThreadedView(boolean b) {
if (b == true) {
//tree.setRootVisible(true);
TableColumn tc = null;
try {
tc = getColumn("Subject");
tc.setCellRenderer(null);
} catch (Exception ex) {
System.out.println(
"headerTable->registerRenderer: " + ex.getMessage());
}
setTr... | public void enableThreadedView(boolean b) {
if (b == true) {
//tree.setRootVisible(true);
TableColumn tc = null;
try {
tc = getColumn("Subject");
tc.setCellRenderer(null);
} catch (Exception ex) {
System.out.println(
"headerTable->registerRenderer: " + ex.getMessage());
}
setTr... |
public static ClasspathContainerInitializer getClasspathContainerInitializer(String containerID) {
HashMap containerInitializersCache = JavaModelManager.getJavaModelManager().containerInitializersCache;
ClasspathContainerInitializer initializer = (ClasspathContainerInitializer) containerInitializersCache.get(conta... | public static ClasspathContainerInitializer getClasspathContainerInitializer(String containerID) {
Hashtable containerInitializersCache = JavaModelManager.getJavaModelManager().containerInitializersCache;
ClasspathContainerInitializer initializer = (ClasspathContainerInitializer) containerInitializersCache.get(con... |
private int headerEndPosition = -1;
String commentIndentation; // indentation requested in comments (usually in javadoc root tags description)
// Class to store previous line comment information
class LineComment {
boolean contiguous = false;
int currentIndentation, indentation;
int lines;
char[] leadingSpa... | private int headerEndPosition = -1;
String commentIndentation; // indentation requested in comments (usually in javadoc root tags description)
// Class to store previous line comment information
static class LineComment {
boolean contiguous = false;
int currentIndentation, indentation;
int lines;
char[] lea... |
public void init(ServletConfig conf)
throws ServletException
{
System.out.println("Try to init ");
attempt++;
if( attempt < 2 )
throw new UnavailableException( 10, this, "Testing " );
System.out.println("Init ok ");
}
| public void init(ServletConfig conf)
throws ServletException
{
System.out.println("Try to init ");
attempt++;
if( attempt < 2 )
throw new UnavailableException("Testing ", 10);
System.out.println("Init ok ");
}
|
public void save(DBConnection dbcon)
throws Exception
{
if ( isModified() )
{
checkTransaction("Cannot save a value outside a Transaction");
// Save activity record
Activity activity = new Activity();
String desc = getActivityDescription()... | public void save(DBConnection dbcon)
throws Exception
{
if ( isModified() && !getIssue().isTemplate() )
{
checkTransaction("Cannot save a value outside a Transaction");
// Save activity record
Activity activity = new Activity();
String desc... |
protected synchronized AbstractFilter getFilter(String type) {
// try to re-use already instanciated class
if (filterCache.containsKey(type) == true) {
return (AbstractFilter) filterCache.get(type);
}
ColumbaLogger.log.debug("loading new instance =" + type);
Abs... | protected synchronized AbstractFilter getFilter(String type) {
// try to re-use already instanciated class
if (filterCache.containsKey(type) == true) {
return (AbstractFilter) filterCache.get(type);
}
ColumbaLogger.log.info("loading new instance =" + type);
Abst... |
public TypeBinding resolveType(BlockScope scope) {
// implicit this
constant = NotAConstant;
if (this != ThisImplicit && !checkAccess(scope.methodScope()))
return null;
return this.expressionType = scope.enclosingSourceType();
}
| public TypeBinding resolveType(BlockScope scope) {
// implicit this
constant = NotAConstant;
if (this != ThisImplicit && !checkAccess(scope.methodScope()))
return null;
return this.resolvedType = scope.enclosingSourceType();
}
|
public static String id() {
return "4.5";
}
| public static String id() {
return "4.6-SNAPSHOT-20080908-1523";
}
|
public UMLElementOwnershipSpecificationCheckBox(UMLUserInterfaceContainer container) {
super(container,
Argo.localize("UMLMenu", "label.specialization"),
ActionSetElementOwnershipSpecification.SINGLETON);
}
| public UMLElementOwnershipSpecificationCheckBox(UMLUserInterfaceContainer container) {
super(container,
Argo.localize("UMLMenu", "label.specialization"),
ActionSetElementOwnershipSpecification.SINGLETON, "specification");
}
|
protected void reportDeclaration(ReferenceBinding typeBinding, int maxType, MatchLocator locator, SimpleSet knownTypes) throws CoreException {
IType type = locator.lookupType(typeBinding);
if (type == null) return; // case of a secondary type
IResource resource = type.getResource();
boolean isBinary = type.isBinar... | protected void reportDeclaration(ReferenceBinding typeBinding, int maxType, MatchLocator locator, SimpleSet knownTypes) throws CoreException {
IType type = locator.lookupType(typeBinding);
if (type == null) return; // case of a secondary type
IResource resource = type.getResource();
boolean isBinary = type.isBinar... |
private void printJavadocImmutableText(FormatJavadocText text, FormatJavadocBlock block, boolean textOnNewLine) {
try {
// Iterate on text line separators
int textLineStart = text.lineStart;
this.scanner.tokenizeWhiteSpace = false;
String newLineString = null;
for (int idx=0, max=text.separatorsPtr; ... | private void printJavadocImmutableText(FormatJavadocText text, FormatJavadocBlock block, boolean textOnNewLine) {
try {
// Iterate on text line separators
int textLineStart = text.lineStart;
this.scanner.tokenizeWhiteSpace = false;
String newLineString = null;
for (int idx=0, max=text.separatorsPtr; ... |
private File[] processCommandLine(String[] argsArray) {
ArrayList args = new ArrayList();
for (int i = 0; i < argsArray.length; i++) {
args.add(argsArray[i]);
}
int index = 0;
final int argCount = argsArray.length;
final int DEFAULT_MODE = 0;
final int CONFIG_MODE = 1;
int mode = DEFAULT_MODE;
... | private File[] processCommandLine(String[] argsArray) {
ArrayList args = new ArrayList();
for (int i = 0; i < argsArray.length; i++) {
args.add(argsArray[i]);
}
int index = 0;
final int argCount = argsArray.length;
final int DEFAULT_MODE = 0;
final int CONFIG_MODE = 1;
int mode = DEFAULT_MODE;
... |
private void resolveReference(Expression reference, Scope scope) {
// Perform resolve
switch (scope.kind) {
case Scope.METHOD_SCOPE:
reference.resolveType((MethodScope)scope);
break;
case Scope.CLASS_SCOPE:
reference.resolveType((ClassScope)scope);
break;
}
// Verify field references
... | private void resolveReference(Expression reference, Scope scope) {
// Perform resolve
switch (scope.kind) {
case Scope.METHOD_SCOPE:
reference.resolveType((MethodScope)scope);
break;
case Scope.CLASS_SCOPE:
reference.resolveType((ClassScope)scope);
break;
}
// Verify field references
... |
public void add(IJavaElement element) throws JavaModelException {
IPackageFragmentRoot root = null;
switch (element.getElementType()) {
case IJavaElement.JAVA_MODEL:
// a workspace sope should be used
break;
case IJavaElement.JAVA_PROJECT:
this.add((IJavaProject)element, true, new HashSet(2));
break;... | public void add(IJavaElement element) throws JavaModelException {
IPackageFragmentRoot root = null;
switch (element.getElementType()) {
case IJavaElement.JAVA_MODEL:
// a workspace sope should be used
break;
case IJavaElement.JAVA_PROJECT:
this.add((IJavaProject)element, true, new HashSet(2));
break;... |
protected ActionGenerateProjectCode() {
super("Generate Code for Project", NO_ICON);
}
| protected ActionGenerateProjectCode() {
super("action.generate-code-for-project", NO_ICON);
}
|
public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "continue "; //$NON-NLS-1$
if (label != null )
s = s + new String(label) ;
return s;
}
| public String toString(int tab){
/* slow code */
String s = tabString(tab) ;
s = s + "continue "/*nonNLS*/;
if (label != null )
s = s + new String(label) ;
return s;
}
|
public String getQualifiedName() {
if (isAnonymous() || isLocal()) {
return null;
}
StringBuffer buffer = new StringBuffer();
buffer.append(getName());
buffer.insert(0, '.');
if (isMember()) {
// handle member type
ITypeBinding declaringClass = getDeclaringClass();
while(declaringClass != null)... | public String getQualifiedName() {
if (isAnonymous() || isLocal() || isPrimitive() || isArray() || isNullType()) {
return null;
}
StringBuffer buffer = new StringBuffer();
buffer.append(getName());
buffer.insert(0, '.');
if (isMember()) {
// handle member type
ITypeBinding declaringClass = getDecl... |
public synchronized void doFakeProgress(String s, int work) {
_statusText = s;
showStatus(_statusText + "...");
_progress.setMaximum(work);
_progress.setValue(0);
Thread t = new Thread(this);
t.start();
}
| public synchronized void doFakeProgress(String s, int work) {
_statusText = s;
showStatus(_statusText + "... not implemented yet ...");
_progress.setMaximum(work);
_progress.setValue(0);
Thread t = new Thread(this);
t.start();
}
|
public void run()
{
try
{
list = new PluginList();
dispose();
}
catch(XmlException xe)
{
dispose();
int line = xe.getLine();
String path = jEdit.getProperty("plugin-manager.url");
String message = xe.getMessage();
Log.log(Log.ERROR,this,path + ":" + line
+ ": " + mes... | public void run()
{
try
{
list = new PluginList();
dispose();
}
catch(XmlException xe)
{
dispose();
int line = xe.getLine();
String path = jEdit.getProperty("plugin-manager.export-url");
String message = xe.getMessage();
Log.log(Log.ERROR,this,path + ":" + line
+ ": ... |
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if (command.equals("CREATE_SUBFOLDER")) {
EditFolderDialog dialog = new EditFolderDialog("New Folder");
dialog.showDialog();
String name;
if (dialog.success() == true) {
// ok pressed
name = dialog.getName(... | public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if (command.equals("CREATE_SUBFOLDER")) {
EditFolderDialog dialog = new EditFolderDialog("New Folder");
dialog.showDialog();
String name;
if (dialog.success() == true) {
// ok pressed
name = dialog.getName(... |
public boolean accept(ParseEventListener listener, JspReader reader,
Parser parser) throws JasperException
{
if (reader.peekChar() != '<')
return false;
Mark start = reader.mark();
reader.nextChar();
String tag = reader.p... | public boolean accept(ParseEventListener listener, JspReader reader,
Parser parser) throws JasperException
{
if (reader.peekChar() != '<')
return false;
Mark start = reader.mark();
reader.nextChar();
String tag = reader.p... |
private Object[] computeNonJavaResources(IResource resource) {
Object[] nonJavaResources = new IResource[5];
int nonJavaResourcesCounter = 0;
try{
IResource[] members = ((IContainer) resource).members();
for (int i = 0, max = members.length; i < max; i++) {
IResource child = members[i];
if (child.getType()... | private Object[] computeNonJavaResources(IResource resource) {
Object[] nonJavaResources = new IResource[5];
int nonJavaResourcesCounter = 0;
try{
IResource[] members = ((IContainer) resource).members();
for (int i = 0, max = members.length; i < max; i++) {
IResource child = members[i];
if (child.getType()... |
public static Issue getIssueById(Issue.FederatedId fid)
{
return getManager().getIssueByIdImpl(fid);
}
| public static Issue getIssueById(Issue.FederatedId fid)
{
return IssueManager.getIssueByIdImpl(fid);
}
|
public byte []
getSignature() {
return signature;
}
byte []
rrToWire(Compression c) throws IOException {
if (signature == null)
return null;
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
ds.writeShort(covered);
ds.writeByte(alg);
ds.wri... | public byte []
getSignature() {
return signature;
}
byte []
rrToWire(Compression c, int index) throws IOException {
if (signature == null)
return null;
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
ds.writeShort(covered);
ds.writeByte(al... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.