buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static CompilationUnit convertCompilationUnit(
int level,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration,
char[] source,
Map options,
boolean isResolved,
WorkingCopyOwner workingCopyOwner,
IProgressMonitor monitor) {
ASTConverter converter = new AS... | public static CompilationUnit convertCompilationUnit(
int level,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration compilationUnitDeclaration,
char[] source,
Map options,
boolean isResolved,
WorkingCopyOwner workingCopyOwner,
IProgressMonitor monitor) {
ASTConverter converter = new AS... |
public void failedAssumptionsMeanIgnored() {
Result result= JUnitCore.runClasses(HasFailingAssumption.class);
assertThat(result.getRunCount(), is(0));
assertThat(result.getFailedAssumptionCount(), is(1));
assertThat(result.getFailureCount(), is(0));
| public void failedAssumptionsMeanIgnored() {
Result result= JUnitCore.runClasses(HasFailingAssumption.class);
assertThat(result.getRunCount(), is(0));
assertThat(result.getInvalidAssumptionCount(), is(1));
assertThat(result.getFailureCount(), is(0));
|
public void record(IProblem problem, CompilationResult unitResult, ReferenceContext referenceContext) {
unitResult.record(problem, referenceContext);
requestor.acceptProblem(problem);
}
},
true,
options.assertMode);
this.requestor = requestor;
typeNames = new char[4][];
superTypeNames = new char[4][];
... | public void record(IProblem problem, CompilationResult unitResult, ReferenceContext referenceContext) {
unitResult.record(problem, referenceContext);
requestor.acceptProblem(problem);
}
},
true,
options.sourceLevel >= CompilerOptions.JDK1_4);
this.requestor = requestor;
typeNames = new char[4][];
superT... |
private void selectAndReveal(Object selection) {
TreeViewer viewer = tree.getViewer();
viewer.setSelection(new StructuredSelection(selection), true);
viewer.reveal(selection);
viewer.getTree().setFocus();
}
| private void selectAndReveal(Object selection) {
TreeViewer viewer = tree.getViewer();
viewer.setSelection(new StructuredSelection(selection), false);
viewer.reveal(selection);
viewer.getTree().setFocus();
}
|
public RemoteFolder(FolderItem item, String path) {
super(item, path);
// TODO: move this to MessageFolder constructor
XmlElement filterListElement = node.getElement(FilterList.XML_NAME);
if (filterListElement == null) {
filterListElement = new XmlElement(FilterList.XML... | public RemoteFolder(FolderItem item, String path) {
super(item, path);
// TODO: move this to MessageFolder constructor
XmlElement filterListElement = node.getElement(FilterList.XML_NAME);
if (filterListElement == null) {
filterListElement = new XmlElement(FilterList.XML... |
public SourceJavadocParser(Parser sourceParser) {
super(sourceParser);
this.kind = SOURCE_PARSER | TEXT_PARSE | TEXT_VERIF;
}
| public SourceJavadocParser(Parser sourceParser) {
super(sourceParser);
this.kind = SOURCE_PARSER | TEXT_VERIF;
}
|
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
exception.analyseCode(currentScope, flowContext, flowInfo);
// need to check that exception thrown is actually caught somewhere
flowContext.checkExceptionHandlers(exceptionType, this, flowInfo, currentScope);
re... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
exception.analyseCode(currentScope, flowContext, flowInfo);
// need to check that exception thrown is actually caught somewhere
flowContext.checkExceptionHandlers(exceptionType, this, flowInfo, currentScope);
re... |
private Workbench(Display display, WorkbenchAdvisor advisor) {
super();
if (instance != null) {
throw new IllegalStateException(WorkbenchMessages.getString("Workbench.CreatingWorkbenchTwice")); //$NON-NLS-1$
}
Assert.isNotNull(display);
Assert.isNotNull(advisor);
this.advisor = advisor;
this.display ... | private Workbench(Display display, WorkbenchAdvisor advisor) {
super();
if (instance != null && instance.isRunning()) {
throw new IllegalStateException(WorkbenchMessages.getString("Workbench.CreatingWorkbenchTwice")); //$NON-NLS-1$
}
Assert.isNotNull(display);
Assert.isNotNull(advisor);
this.advisor = ... |
public SelectionScanner(boolean assertMode) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, assertMode /*assert*/, null /*taskTags*/, null/*taskPriorities*/);
}
| public SelectionScanner(boolean assertMode) {
super(false /*comment*/, false /*whitespace*/, false /*nls*/, assertMode /*assert*/, false /*strict comment*/, null /*taskTags*/, null/*taskPriorities*/);
}
|
private void checkAndSetModifiersForVariable(LocalVariableBinding varBinding) {
int modifiers = varBinding.modifiers;
if ((modifiers & ExtraCompilerModifiers.AccAlternateModifierProblem) != 0 && varBinding.declaration != null){
problemReporter().duplicateModifierForVariable(varBinding.declaration, this instanceof M... | private void checkAndSetModifiersForVariable(LocalVariableBinding varBinding) {
int modifiers = varBinding.modifiers;
if ((modifiers & ExtraCompilerModifiers.AccAlternateModifierProblem) != 0 && varBinding.declaration != null){
problemReporter().duplicateModifierForVariable(varBinding.declaration, this instanceof M... |
public boolean complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, boolean didAlreadyComplain) {
// before 1.4, empty statements are tolerated anywhere
if (scope.environment().options.complianceLevel < ClassFileConstants.JDK1_4) {
return false;
}
return super.complainIfUnreachable(flowInfo, scope,... | public boolean complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, boolean didAlreadyComplain) {
// before 1.4, empty statements are tolerated anywhere
if (scope.compilerOptions().complianceLevel < ClassFileConstants.JDK1_4) {
return false;
}
return super.complainIfUnreachable(flowInfo, scope, did... |
public void decodeIndexEntry(IEntryResult entryResult){
char[] word = entryResult.getWord();
int slash = SUPER_REF.length - 1;
decodedSuperSimpleName = CharOperation.subarray(word, slash+1, slash = CharOperation.indexOf(SEPARATOR, word, slash+1));
int oldSlash = slash;
slash = CharOperation.indexOf(SEPARATOR, wor... | public void decodeIndexEntry(IEntryResult entryResult){
char[] word = entryResult.getWord();
int slash = SUPER_REF.length - 1;
decodedSuperSimpleName = CharOperation.subarray(word, slash+1, slash = CharOperation.indexOf(SEPARATOR, word, slash+1));
int oldSlash = slash;
slash = CharOperation.indexOf(SEPARATOR, wor... |
public boolean visit(IResourceProxy proxy) {
int type = proxy.getType();
if ((typeMask & type) != 0) {
if(match(proxy.getName())) {
IResource res = proxy.requestResource();
if (select(res)) {
resources.add(res);
return true;
} else {
return false;
}
}
... | public boolean visit(IResourceProxy proxy) {
int type = proxy.getType();
if ((typeMask & type) != 0) {
if(match(proxy.getName())) {
IResource res = proxy.requestResource();
if (select(res)) {
resources.add(res);
return true;
} else {
return false;
}
}
... |
public
ObjectName addLoggerMBean(String name) {
Logger cat = Logger.exists(name);
if(cat != null) {
return addLoggerMBean(cat);
} else {
return null;
}
}
| public
ObjectName addLoggerMBean(String name) {
Logger cat = LogManager.exists(name);
if(cat != null) {
return addLoggerMBean(cat);
} else {
return null;
}
}
|
protected void addListenersToMBase(MBase mbase) {
UmlModelEventPump.getPump().removeModelEventListener(UmlModelListener.getInstance(), mbase);
UmlModelEventPump.getPump().addModelEventListener(UmlModelListener.getInstance(), mbase);
Collection elements = mbase.getModelElementContents();
if (elemen... | protected void addListenersToMBase(MBase mbase) {
// UmlModelEventPump.getPump().removeModelEventListener(UmlModelListener.getInstance(), mbase);
UmlModelEventPump.getPump().addModelEventListener(UmlModelListener.getInstance(), mbase);
Collection elements = mbase.getModelElementContents();
if (ele... |
public static Hashtable getDefaultOptions(){
Hashtable defaultOptions = new Hashtable(10);
// see #initializeDefaultPluginPreferences() for changing default settings
Preferences preferences = getPlugin().getPluginPreferences();
// get preferences set to their default
String[] defaultPropertyNames = pr... | public static Hashtable getDefaultOptions(){
Hashtable defaultOptions = new Hashtable(10);
// see #initializeDefaultPluginPreferences() for changing default settings
Preferences preferences = getPlugin().getPluginPreferences();
// get preferences set to their default
String[] defaultPropertyNames = pr... |
public void tableChanged(TableChangedEvent event) throws Exception {
ColumbaLogger.log.info("event="+event);
Folder folder = event.getSrcFolder();
if (folder == null) {
if (event.getEventType() == TableChangedEvent.UPDATE)
getHeaderTableModel().update();
fireTableChangedEvent(event);
return;
... | public void tableChanged(TableChangedEvent event) throws Exception {
ColumbaLogger.log.info("event="+event);
Folder folder = (Folder) event.getSrcFolder();
if (folder == null) {
if (event.getEventType() == TableChangedEvent.UPDATE)
getHeaderTableModel().update();
fireTableChangedEvent(event);
r... |
public TypeBinding checkFieldAccess(BlockScope scope) {
FieldBinding fieldBinding = (FieldBinding) binding;
bits &= ~RestrictiveFlagMASK; // clear bits
bits |= FIELD;
if (!((FieldBinding) binding).isStatic()) {
// must check for the static status....
if (scope.methodScope().isStatic) {
scope.problemReport... | public TypeBinding checkFieldAccess(BlockScope scope) {
FieldBinding fieldBinding = (FieldBinding) binding;
bits &= ~RestrictiveFlagMASK; // clear bits
bits |= FIELD;
if (!((FieldBinding) binding).isStatic()) {
// must check for the static status....
if (scope.methodScope().isStatic) {
scope.problemReport... |
public TreeController(
AbstractMailFrameController mailFrameController,
TreeModel model) {
this.model = model;
this.mailFrameController = mailFrameController;
view = new TreeView(mailFrameController, model);
view.addTreeWillExpandListener(this);
mouseListener = new FolderTreeMouseListener(this);
v... | public TreeController(
AbstractMailFrameController mailFrameController,
TreeModel model) {
this.model = model;
this.mailFrameController = mailFrameController;
view = new TreeView(mailFrameController, model);
view.addTreeWillExpandListener(this);
mouseListener = new FolderTreeMouseListener(this);
v... |
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean isSelected, boolean expanded, boolean leaf, int row,
boolean hasFocusVar) {
/* RIYAD: Even though we don't do anything with this value, what it
* is doing is setting up the selection colors and such as i... | public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean isSelected, boolean expanded, boolean leaf, int row,
boolean hasFocusVar) {
/* RIYAD: Even though we don't do anything with this value, what it
* is doing is setting up the selection colors and such as i... |
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
BranchLabel endifLabel, falseLabel;
if (constant != Constant.NotAConstant) {
if (valueRequired)
codeStream.generateConstant(constant, implicitConversion);
codeStream.r... | public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
BranchLabel endifLabel, falseLabel;
if (constant != Constant.NotAConstant) {
if (valueRequired)
codeStream.generateConstant(constant, implicitConversion);
codeStream.r... |
int FORCE_IMMEDIATE_SEARCH = IJob.ForceImmediate;
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public Lice... | int FORCE_IMMEDIATE_SEARCH = IJob.ForceImmediate;
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public Lice... |
public void selectType(ISourceType sourceType, char[] typeName) {
try{
acceptedAnswer = false;
// find the outer most type
ISourceType outerType = sourceType;
ISourceType parent = sourceType.getEnclosingType();
while (parent != null) {
outerType = parent;
parent = parent.getEnclosingType();
}
// ... | public void selectType(ISourceType sourceType, char[] typeName) {
try{
acceptedAnswer = false;
// find the outer most type
ISourceType outerType = sourceType;
ISourceType parent = sourceType.getEnclosingType();
while (parent != null) {
outerType = parent;
parent = parent.getEnclosingType();
}
// ... |
protected void handleInternalException(
Throwable internalException,
CompilationUnitDeclaration unit,
CompilationResult result) {
/* dump a stack trace to the console */
internalException.printStackTrace();
/* find a compilation result */
if ((unit != null)) // basing result upon the current unit if av... | protected void handleInternalException(
Throwable internalException,
CompilationUnitDeclaration unit,
CompilationResult result) {
/* dump a stack trace to the console */
internalException.printStackTrace();
/* find a compilation result */
if ((unit != null)) // basing result upon the current unit if av... |
public void save(IProgressMonitor progress, boolean force) throws JavaModelException {
// determine if saving is required
if (isReadOnly() || fFile == null) {
return;
}
synchronized (fLock) {
if (!hasUnsavedChanges())
return;
byte[] bytes = getContents().getBytes();
ByteArrayInputStream stream = new By... | public void save(IProgressMonitor progress, boolean force) throws JavaModelException {
// determine if saving is required
if (isReadOnly() || fFile == null) {
return;
}
synchronized (fLock) {
if (!hasUnsavedChanges())
return;
byte[] bytes = getContents().getBytes();
BufferedInputStream stream = new Buf... |
public int getSQLDialect() {
return dialectCode;
}
} | public int getSQLDialectCode() {
return dialectCode;
}
} |
public TypeBinding resolveType(BlockScope scope) {
// for code gen, harm the restrictiveFlag
this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
if ((this.codegenBinding = this.binding = scope.getBinding(token, bits & RestrictiveFlagMASK, this)).isValidBinding()) {
switch (bits &... | public TypeBinding resolveType(BlockScope scope) {
// for code gen, harm the restrictiveFlag
this.actualReceiverType = this.receiverType = scope.enclosingSourceType();
if ((this.codegenBinding = this.binding = scope.getBinding(token, bits & RestrictiveFlagMASK, this, true /*resolve*/)).isValidBinding()) {... |
private boolean checkSelection(
char[] source,
int selectionStart,
int selectionEnd) {
Scanner scanner = new Scanner();
scanner.setSource(source);
int lastIdentifierStart = -1;
int lastIdentifierEnd = -1;
char[] lastIdentifier = null;
int token, identCount = 0;
StringBuffer entireSelection = ne... | private boolean checkSelection(
char[] source,
int selectionStart,
int selectionEnd) {
Scanner scanner = new Scanner();
scanner.setSource(source);
int lastIdentifierStart = -1;
int lastIdentifierEnd = -1;
char[] lastIdentifier = null;
int token, identCount = 0;
StringBuffer entireSelection = ne... |
private ASTNode.NodeList parameters =
new ASTNode.NodeList(true, SingleVariableDeclaration.class);;
| private ASTNode.NodeList parameters =
new ASTNode.NodeList(true, SingleVariableDeclaration.class);
|
public void updateComponents(boolean b) {
if (b) {
/*
if ( item.isSavePassword() )
storePasswordCheckBox.setSelected(true);
*/
automaticallyApplyFilterCheckBox.setSelected(item.getBoolean(
"automatically_apply_filter"));
} else {
/*
if ... | public void updateComponents(boolean b) {
if (b) {
/*
if ( item.isSavePassword() )
storePasswordCheckBox.setSelected(true);
*/
automaticallyApplyFilterCheckBox.setSelected(item.getBoolean(
"automatically_apply_filter"));
} else {
/*
if ... |
public String toStringExpression(){
/* slow code */
return qualification.toString(0)+".this"/*nonNLS*/ ;
}
| public String toStringExpression(){
/* slow code */
return qualification.toString(0)+".this" ; //$NON-NLS-1$
}
|
public boolean visit(TypeDeclaration typeDeclaration, BlockScope scope) {
if (result != null) return false;
if ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0) {
if (findAnonymous && ++count == occurenceCount) {
result = typeDeclaration;
}
} else {
if (!findAnonymous && Ch... | public boolean visit(TypeDeclaration typeDeclaration, BlockScope scope) {
if (result != null) return false;
if ((typeDeclaration.bits & ASTNode.IsAnonymousType) != 0) {
if (findAnonymous && ++count == occurenceCount) {
result = typeDeclaration;
}
} else {
if (!findAnonymous && CharOp... |
public IJavaElement getPrimaryElement(boolean checkOwner) {
CompilationUnit cu = (CompilationUnit)fParent;
if (checkOwner && cu.owner == DefaultWorkingCopyOwner.PRIMARY) return this;
return cu.getImportContainer();
}
| public IJavaElement getPrimaryElement(boolean checkOwner) {
CompilationUnit cu = (CompilationUnit)fParent;
if (checkOwner && cu.isPrimary()) return this;
return cu.getImportContainer();
}
|
public AbstractMessage getMessage(
Object uid,
WorkerStatusController worker)
throws Exception {
if (aktMessage != null) {
if (aktMessage.getUID().equals(uid)) {
// this message is already cached
//ColumbaLogger.log.info("using already cached message..");
return aktMessage;
}
}
String s... | public AbstractMessage getMessage(
Object uid,
WorkerStatusController worker)
throws Exception {
if (aktMessage != null) {
if (aktMessage.getUID().equals(uid)) {
// this message is already cached
//ColumbaLogger.log.info("using already cached message..");
return aktMessage;
}
}
String s... |
private final void selectedButtonExport() {
final FileDialog fileDialog = new FileDialog(getShell());
fileDialog.setFilterExtensions(new String[] { "*.csv" }); //$NON-NLS-1$
| private final void selectedButtonExport() {
final FileDialog fileDialog = new FileDialog(getShell(), SWT.SAVE);
fileDialog.setFilterExtensions(new String[] { "*.csv" }); //$NON-NLS-1$
|
public void write(StorableOutput dw) {
dw.writeString("attributes");
dw.writeInt(fMap.size()); // number of attributes
Enumeration k = fMap.keys();
while (k.hasMoreElements()) {
String s = (String) k.nextElement();
Object v = fMap.get(s);
dw.writeString(s);
if (v instanceof String) {
dw... | public void write(StorableOutput dw) {
dw.writeString("attributes");
dw.writeInt(fMap.size()); // number of attributes
Enumeration k = fMap.keys();
while (k.hasMoreElements()) {
String s = (String) k.nextElement();
Object v = fMap.get(s);
dw.writeString(s);
if (v instanceof String) {
dw... |
public String getId() {
return editorReference.getId();
}
| public String getId() {
return editorReference.getId() + editorReference.getTitleToolTip();
}
|
public static String id() {
return "4.4-snapshot-20070629-0646";
}
| public static String id() {
return "4.4-snapshot-20070709-1651";
}
|
protected boolean readElement(IConfigurationElement element) {
if (!element.getName().equals(IWorkbenchRegistryConstants.TAG_EDITOR)) {
return false;
}
String id = element.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
if (id == null) {
logMissingAttribute(element, IWork... | protected boolean readElement(IConfigurationElement element) {
if (!element.getName().equals(IWorkbenchRegistryConstants.TAG_EDITOR)) {
return false;
}
String id = element.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
if (id == null) {
logMissingAttribute(element, IWork... |
public SortElementBuilder(char[] source, int[] positionsToMap, Comparator comparator) {
this.source = source;
this.comparator = comparator;
this.positionsToMap = positionsToMap;
this.scanner = new Scanner(false, false, false, false, false, null, null);
this.ast = new AST();
| public SortElementBuilder(char[] source, int[] positionsToMap, Comparator comparator) {
this.source = source;
this.comparator = comparator;
this.positionsToMap = positionsToMap;
this.scanner = new Scanner(false, false, false, false, null, null);
this.ast = new AST();
|
public static final int ONLY_SUPER_INTERFACES = 1; // used for IMPLEMENTORS
public static final int ONLY_SUPER_CLASSES = 2; // used for hierarachy with a class focus
| public static final int ONLY_SUPER_INTERFACES = 1; // used for IMPLEMENTORS
public static final int ONLY_SUPER_CLASSES = 2; // used for hierarchy with a class focus
|
public ParseState(MClassifier mClassifier)
{
this.mClassifier = mClassifier;
namespace = mClassifier;
newFeatures = new Vector(mClassifier.getFeatures());
newInnerClasses = new Vector(mClassifier.getOwnedElements());
}
/**
Tell the parse state that an inner classifier is found.
@para... | public ParseState(MClassifier mClassifier)
{
this.mClassifier = mClassifier;
namespace = mClassifier;
newFeatures = new Vector(mClassifier.getFeatures());
newInnerClasses = new Vector(mClassifier.getOwnedElements());
}
/**
Tell the parse state that an inner classifier is found.
@para... |
protected CompilationUnitStructureRequestor(ICompilationUnit unit, CompilationUnitElementInfo unitInfo, Map newElements) {
this.unit = unit;
this.unitInfo = unitInfo;
this.newElements = newElements;
this.sourceFileName= unit.getElementName().toCharArray();
}
| protected CompilationUnitStructureRequestor(ICompilationUnit unit, CompilationUnitElementInfo unitInfo, Map newElements) {
this.unit = unit;
this.unitInfo = unitInfo;
this.newElements = newElements;
this.sourceFileName= unit.getPath().toString().toCharArray();
}
|
public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
if (enclosingInstances == null) return null; // is null if no enclosing instances are known
// exact match
for (int i = enclosingInstances.length; --i >= 0;)
if (enclosingInstances[i].type ... | public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
if (enclosingInstances == null) return null; // is null if no enclosing instances are known
// exact match
for (int i = enclosingInstances.length; --i >= 0;)
if (enclosingInstances[i].type ... |
public String toString() {
return Localizer.localize ("Tree", "Package->Diagram");
}
| public String toString() {
return Localizer.localize ("Tree", "misc.package.diagram");
}
|
private Image getImage(IPerspectiveDescriptor perspDesc) {
ImageDescriptor imageDesc = perspDesc.getImageDescriptor();
if (imageDesc == null) {
imageDesc =
WorkbenchImages.getImageDescriptor(
IWorkbenchGraphicConstants.IMG_CTOOL_DEF_PERSPECTIVE_HOVER);
}
if (imageDesc == null) {
return null;
}... | private Image getImage(IPerspectiveDescriptor perspDesc) {
ImageDescriptor imageDesc = perspDesc.getImageDescriptor();
if (imageDesc == null) {
imageDesc =
WorkbenchImages.getImageDescriptor(
IWorkbenchGraphicConstants.IMG_ETOOL_DEF_PERSPECTIVE_HOVER);
}
if (imageDesc == null) {
return null;
}... |
private void locateMatchesInCompilationUnit(char[] source) throws CoreException {
if (this.parsedUnit == null) { // case where no binding resolution is needed
// create match set
this.matchSet = new MatchSet(this.locator);
this.locator.parser.matchSet = this.matchSet;
// diet parse
this.parsedUnit = this... | private void locateMatchesInCompilationUnit(char[] source) throws CoreException {
if (this.parsedUnit == null) { // case where no binding resolution is needed
// create match set
this.matchSet = new MatchSet(this.locator);
this.locator.parser.matchSet = this.matchSet;
// diet parse
this.parsedUnit = this... |
public String individualToString(){
return "Label flow context [label:"+String.valueOf(labelName)+"]";
}
| public String individualToString(){
return "Label flow context [label:"/*nonNLS*/+String.valueOf(labelName)+"]"/*nonNLS*/;
}
|
public static CompilationUnitDeclaration parse(char[] source) {
if (source == null) {
throw new IllegalArgumentException();
}
CompilerOptions compilerOptions = new CompilerOptions(JavaCore.getOptions());
Parser parser =
new Parser(
new ProblemReporter(
DefaultErrorHandlingPolicies.proceedWithAll... | public static CompilationUnitDeclaration parse(char[] source) {
if (source == null) {
throw new IllegalArgumentException();
}
CompilerOptions compilerOptions = new CompilerOptions(JavaCore.getOptions());
Parser parser =
new Parser(
new ProblemReporter(
DefaultErrorHandlingPolicies.proceedWithAll... |
public String getId(IPresentablePart part) {
int index = parts.indexOf(part);
return "" + index;
}
| public String getId(IPresentablePart part) {
int index = parts.indexOf(part);
return "" + index; //$NON-NLS-1$
}
|
public void loadOptionsFromXml(IMailbox folder) {
XmlElement sorting = getConfigNode(folder);
IDefaultItem item = new DefaultItem(sorting);
String column = item.get("column");
if (column == null) {
column = "Date";
}
boolean order = item.getBoolean("ord... | public void loadOptionsFromXml(IMailbox folder) {
XmlElement sorting = getConfigNode(folder);
IDefaultItem item = new DefaultItem(sorting);
String column = item.get("column");
if (column == null) {
column = "Date";
}
boolean order = item.getBooleanWithD... |
private void unableToLoadPerspective(IStatus status) {
String msg = WorkbenchMessages.Perspective_errorLoadingState;
if (status == null) {
IStatus errStatus = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, msg);
StatusManager.getManager().handle(errStatus,
StatusManager.SHOW | StatusManager.LO... | private void unableToLoadPerspective(IStatus status) {
String msg = "Unable to load perspective."; //$NON-NLS-1$
if (status == null) {
IStatus errStatus = new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, msg);
StatusManager.getManager().handle(errStatus,
StatusManager.SHOW | StatusManager.LOG);
... |
this.binding = privateBinding;
}
} else {
if (this.binding.declaringClass == null) {
this.binding.declaringClass = allocatedType;
}
scope.problemReporter().invalidConstructor(this, this.binding);
return this.resolvedType;
}
}
if (isMethodUseDeprecated(this.binding, scope)) {
scope.pro... | this.binding = privateBinding;
}
} else {
if (this.binding.declaringClass == null) {
this.binding.declaringClass = allocatedType;
}
scope.problemReporter().invalidConstructor(this, this.binding);
return this.resolvedType;
}
}
if (isMethodUseDeprecated(this.binding, scope)) {
scope.pro... |
public boolean inContext(Object[] o) {
if (o.length < 2) return false;
if ((o[0] instanceof JMenuItem) &&
("Tools".equals(o[1]))) {
return true;
}
return false;
}
| public boolean inContext(Object[] o) {
if (o.length < 2) return false;
if ((o[0] instanceof JMenuItem) &&
(PluggableMenu.KEY_TOOLS.equals(o[1]))) {
return true;
}
return false;
}
|
public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
if (originalMethod.typeVariables == NoTypeVariables || originalMethod.isStatic()) {
return super.createParameterizedMethod(originalMethod);
}
return new ParameterizedGenericMethodBinding(originalMethod, this, this.envi... | public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
if (originalMethod.typeVariables == Binding.NO_TYPE_VARIABLES || originalMethod.isStatic()) {
return super.createParameterizedMethod(originalMethod);
}
return new ParameterizedGenericMethodBinding(originalMethod, this,... |
public
ARecord(Name name, short dclass, int ttl, InetAddress address)
throws IOException
{
this(name, dclass, ttl);
this.addr = address.getAddress();
}
Record
rrFromWire(Name name, short type, short dclass, int ttl, int length,
DataByteInputStream in)
throws IOException
{
ARecord rec = new ARecord(name, dclass... | public
ARecord(Name name, short dclass, int ttl, InetAddress address)
throws IOException
{
this(name, dclass, ttl);
this.addr = address.getAddress();
}
Record
rrFromWire(Name name, short type, short dclass, int ttl, int length,
DataByteInputStream in)
throws IOException
{
ARecord rec = new ARecord(name, dclass... |
public int beforeBody( Request req, Response res ) {
if( useSessionEncoding ) {
ServerSession sess=req.getSession( false );
if( sess!=null ) {
String charset=res.getCharacterEncoding();
if( charset!=null ) {
sess.setNote( sessionEncodingNote, charset );
if( debug > 0 )
log( "Setting pe... | public int beforeBody( Request req, Response res ) {
if( useSessionEncoding ) {
ServerSession sess=req.getSession( false );
if( sess!=null ) {
String charset=res.getCharacterEncoding(false);
if( charset!=null ) {
sess.setNote( sessionEncodingNote, charset );
if( debug > 0 )
log( "Setti... |
protected void buildStructure(OpenableElementInfo info, IProgressMonitor pm) throws JavaModelException {
// remove existing (old) infos
removeInfo();
HashMap newElements = new HashMap(11);
info.setIsStructureKnown(generateInfos(info, pm, newElements, getUnderlyingResource()));
fgJavaModelManager.getElementsOutOf... | protected void buildStructure(OpenableElementInfo info, IProgressMonitor pm) throws JavaModelException {
// remove existing (old) infos
removeInfo();
HashMap newElements = new HashMap(11);
info.setIsStructureKnown(generateInfos(info, pm, newElements, getUnderlyingResource()));
fgJavaModelManager.getElementsOutOf... |
public
SRVRecord(Name _name, short _dclass, int _ttl,
int length, CountedDataInputStream in, Compression c)
throws IOException
| public
SRVRecord(Name _name, short _dclass, int _ttl,
int length, DataByteInputStream in, Compression c)
throws IOException
|
protected long modificationCount;
/**
* Creates a binding resolver.
*/
BindingResolver() {
}
/**
* Store the number of modifications done using the ast. This is used to validate
* resolveBinding methods. If the number changed, all resolve bindings methods
* simply return null.
*/
void storeModificati... | protected void storeModificationCount(long modificationCount) {
this.modificationCount = modificationCount;
}
/**
* Allows the user to store information about the given old/new pair of
* AST nodes.
* <p>
* The default implementation of this method does nothing.
* Subclasses may reimplement.
* </p>
... |
protected void storeTasksFor(SourceFile sourceFile, IProblem[] tasks) throws CoreException {
if (sourceFile == null || tasks == null || tasks.length == 0) return;
IResource resource = sourceFile.resource;
for (int i = 0, l = tasks.length; i < l; i++) {
IProblem task = tasks[i];
if (task.getID() == IProblem.Task... | protected void storeTasksFor(SourceFile sourceFile, IProblem[] tasks) throws CoreException {
if (sourceFile == null || tasks == null || tasks.length == 0) return;
IResource resource = sourceFile.resource;
for (int i = 0, l = tasks.length; i < l; i++) {
IProblem task = tasks[i];
if (task.getID() == IProblem.Task... |
private static String[] allModelElements = {
"Stereotype",
"TaggedValue"
};
| public void testDeleteComplete() {
CheckUMLModelHelper.deleteComplete(this,
ExtensionMechanismsFactory.getFactory(),
allModelElements);
}
}
|
public static char[] getInputStreamAsCharArray(InputStream stream, int length, String encoding)
throws IOException {
InputStreamReader reader = null;
reader = encoding == null
? new InputStreamReader(stream)
: new InputStreamReader(stream, encoding);
char[] contents;
if (length == -1) {
contents... | public static char[] getInputStreamAsCharArray(InputStream stream, int length, String encoding)
throws IOException {
InputStreamReader reader = null;
reader = encoding == null
? new InputStreamReader(stream)
: new InputStreamReader(stream, encoding);
char[] contents;
if (length == -1) {
contents... |
public boolean performOk() {
if (super.performOk()) {
DecoratorManager manager = getDecoratorManager();
DecoratorDefinition[] definitions = manager.getAllDecoratorDefinitions();
for (int i = 0; i < definitions.length; i++) {
boolean checked = checkboxViewer.getChecked(definitions[i]);
definitions[i]... | public boolean performOk() {
if (super.performOk()) {
DecoratorManager manager = getDecoratorManager();
DecoratorDefinition[] definitions = manager.getAllDecoratorDefinitions();
for (int i = 0; i < definitions.length; i++) {
boolean checked = checkboxViewer.getChecked(definitions[i]);
definitions[i]... |
public void generateCode(BlockScope blockScope, CodeStream codeStream) {
if (hasBeenGenerated) return;
int pc = codeStream.position;
if (binding != null){
((NestedTypeBinding) binding).computeSyntheticArgumentsOffset();
}
generateCode(codeStream.classFile);
codeStream.recordPositionsFrom(pc, this);
}
| public void generateCode(BlockScope blockScope, CodeStream codeStream) {
if (hasBeenGenerated) return;
int pc = codeStream.position;
if (binding != null){
((NestedTypeBinding) binding).computeSyntheticArgumentsOffset();
}
generateCode(codeStream.classFile);
codeStream.recordPositionsFrom(pc, this.sourceStart)... |
private void buildFields() {
boolean hierarchyIsInconsistent = referenceContext.binding.isHierarchyInconsistent();
if (referenceContext.fields == null) {
if (hierarchyIsInconsistent) { // 72468
referenceContext.binding.fields = new FieldBinding[1];
referenceContext.binding.fields[0] =
new FieldBind... | private void buildFields() {
boolean hierarchyIsInconsistent = referenceContext.binding.isHierarchyInconsistent();
if (referenceContext.fields == null) {
if (hierarchyIsInconsistent) { // 72468
referenceContext.binding.fields = new FieldBinding[1];
referenceContext.binding.fields[0] =
new FieldBind... |
protected void append(LoggingEvent event) {
Connection connection = null;
try {
connection = connectionSource.getConnection();
connection.setAutoCommit(false);
PreparedStatement insertStatement = connection
.prepareStatement(insertSQL);
insertStatement.setLong(1, event.getSe... | protected void append(LoggingEvent event) {
Connection connection = null;
try {
connection = connectionSource.getConnection();
connection.setAutoCommit(false);
PreparedStatement insertStatement = connection
.prepareStatement(insertSQL);
insertStatement.setLong(1, event.getSe... |
public static void
main(String [] args) throws Exception {
int type = Type.A;
int start = 0;
if (args.length > 2 && args[0].equals("-t")) {
type = Type.value(args[1]);
if (type < 0)
throw new IllegalArgumentException("invalid type");
start = 2;
}
for (int i = start; i < args.length; i++) {
Lookup l = ne... | public static void
main(String [] args) throws Exception {
int type = Type.A;
int start = 0;
if (args.length > 2 && args[0].equals("-t")) {
type = Type.value(args[1]);
if (type < 0)
throw new IllegalArgumentException("invalid type");
start = 2;
}
for (int i = start; i < args.length; i++) {
Lookup l = ne... |
public void execute(WorkerStatusController worker) throws Exception {
ComposerCommandReference r = (ComposerCommandReference) getReference();
if (!validArguments(r))
return;
// display status message
worker.setDisplayText(MailResourceLoader.getString("statusbar",
"message", "send_message_compose"));
... | public void execute(WorkerStatusController worker) throws Exception {
ComposerCommandReference r = (ComposerCommandReference) getReference();
if (!validArguments(r))
return;
// display status message
worker.setDisplayText(MailResourceLoader.getString("statusbar",
"message", "send_message_compose"));
... |
private synchronized HashtableOfObject readCategoryTable(char[] categoryName, boolean readDocNumbers) throws IOException {
// result will be null if categoryName is unknown
int offset = this.categoryOffsets.get(categoryName);
if (offset == HashtableOfIntValues.NO_VALUE)
return null;
if (this.categoryTables == nu... | private synchronized HashtableOfObject readCategoryTable(char[] categoryName, boolean readDocNumbers) throws IOException {
// result will be null if categoryName is unknown
int offset = this.categoryOffsets.get(categoryName);
if (offset == HashtableOfIntValues.NO_VALUE)
return null;
if (this.categoryTables == nu... |
public Statement convert(org.eclipse.jdt.internal.compiler.ast.Statement statement) {
if (statement instanceof LocalDeclaration) {
throw new IllegalArgumentException("Should not be reached: convert(" + statement.getClass() + ")");//$NON-NLS-1$//$NON-NLS-2$
}
if (statement instanceof org.eclipse.jdt.internal.c... | public Statement convert(org.eclipse.jdt.internal.compiler.ast.Statement statement) {
if (statement instanceof LocalDeclaration) {
return convertToVariableDeclarationStatement((LocalDeclaration)statement);
}
if (statement instanceof org.eclipse.jdt.internal.compiler.ast.AssertStatement) {
return convert((o... |
public WorkingSetNewWizard(WorkingSetDescriptor[] descriptors) {
super();
Assert.isTrue(descriptors != null && descriptors.length > 0);
this.descriptors= descriptors;
setWindowTitle(WorkbenchMessages.getString("WorkingSetNewWizard.title")); //$NON-NLS-1$
}
| public WorkingSetNewWizard(WorkingSetDescriptor[] descriptors) {
super();
Assert.isTrue(descriptors != null && descriptors.length > 0);
this.descriptors= descriptors;
setWindowTitle(WorkbenchMessages.WorkingSetNewWizard_title);
}
|
private FieldBinding resolveTypeFor(FieldBinding field) {
if ((field.modifiers & AccUnresolved) == 0)
return field;
if (fPackage.environment.options.sourceLevel >= ClassFileConstants.JDK1_5) {
if ((field.getAnnotationTagBits() & AnnotationDeprecated) != 0)
field.modifiers |= AccDeprecated;
else if ((field.m... | private FieldBinding resolveTypeFor(FieldBinding field) {
if ((field.modifiers & AccUnresolved) == 0)
return field;
if (fPackage.environment.options.sourceLevel >= ClassFileConstants.JDK1_5) {
if ((field.getAnnotationTagBits() & AnnotationDeprecated) != 0)
field.modifiers |= AccDeprecated;
else if ((field.m... |
public String individualToString(){
return "Looping flow context";
}
| public String individualToString(){
return "Looping flow context"/*nonNLS*/;
}
|
protected ISchedulingRule getSchedulingRule() {
// returns the folder corresponding to the package of the cu
return getParentElement().getResource();
}
| protected ISchedulingRule getSchedulingRule() {
// returns the folder corresponding to the package of the cu
return getParentElement().getSchedulingRule();
}
|
public Member getInnerMostDeclaringMember() {
switch (fParent.getElementType()) {
case COMPILATION_UNIT:
return null;
case TYPE:
Member declaringMember = ((Member)fParent).getInnerMostDeclaringMember();
if (declaringMember == null) {
return this;
} else {
return declaringMember;
}
case INI... | public Member getInnerMostDeclaringMember() {
switch (fParent.getElementType()) {
case COMPILATION_UNIT:
return null;
case TYPE:
Member declaringMember = ((Member)fParent).getInnerMostDeclaringMember();
if (declaringMember == null && getElementType() != TYPE) {
return this;
} else {
return decl... |
public void actionPerformed (ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.getInstance();
Project p = ProjectManager.getManager().getCurrentProject();
if (p != null && p.needsSave() && !active) {
active = true;
String t = MessageFormat.format (
Argo.localize (
... | public void actionPerformed (ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.getInstance();
Project p = ProjectManager.getManager().getCurrentProject();
if (p != null && p.needsSave() && !active) {
active = true;
String t = MessageFormat.format (
Argo.localize (
... |
protected AbstractCommentParser(Parser sourceParser) {
this.sourceParser = sourceParser;
this.scanner = new Scanner(false, false, false, ClassFileConstants.JDK1_3, null, null);
this.identifierStack = new char[20][];
this.identifierPositionStack = new long[20];
this.identifierLengthStack = new int[10];
this... | protected AbstractCommentParser(Parser sourceParser) {
this.sourceParser = sourceParser;
this.scanner = new Scanner(false, false, false, ClassFileConstants.JDK1_3, null, null, true/*taskCaseSensitive*/);
this.identifierStack = new char[20][];
this.identifierPositionStack = new long[20];
this.identifierLength... |
public DetachedWindow(WorkbenchPage workbenchPage) {
super(workbenchPage.getWorkbenchWindow().getShell());
setShellStyle(/* SWT.CLOSE | SWT.MIN | SWT.MAX | */ SWT.RESIZE);
this.page = workbenchPage;
folder = new PartTabFolder();
}
| public DetachedWindow(WorkbenchPage workbenchPage) {
super(workbenchPage.getWorkbenchWindow().getShell());
setShellStyle(/* SWT.CLOSE | SWT.MIN | SWT.MAX | */ SWT.RESIZE);
this.page = workbenchPage;
folder = new PartTabFolder(page);
}
|
public void close() {
if (log != null) {
this.log.close();
}
}
| public void close() {
if (this.log != null) {
this.log.close();
}
}
|
public int getNextToken() throws InvalidInputException {
this.wasAcr = false;
if (this.diet) {
jumpOverMethodBody();
this.diet = false;
return this.currentPosition > this.source.length ? TokenNameEOF : TokenNameRBRACE;
}
int whiteStart = 0;
try {
while (true) { //loop for jumping over comments
this.with... | public int getNextToken() throws InvalidInputException {
this.wasAcr = false;
if (this.diet) {
jumpOverMethodBody();
this.diet = false;
return this.currentPosition > this.source.length ? TokenNameEOF : TokenNameRBRACE;
}
int whiteStart = 0;
try {
while (true) { //loop for jumping over comments
this.with... |
protected JPopupMenu createPopupMenu(
XmlElement menuElement,
JPopupMenu menu) {
List childs = menuElement.getElements();
ListIterator it = childs.listIterator();
while (it.hasNext()) {
XmlElement next = (XmlElement) it.next();
String name = next.getName();
if (name.equals("menuitem")) {
if (n... | protected JPopupMenu createPopupMenu(
XmlElement menuElement,
JPopupMenu menu) {
List childs = menuElement.getElements();
ListIterator it = childs.listIterator();
while (it.hasNext()) {
XmlElement next = (XmlElement) it.next();
String name = next.getName();
if (name.equals("menuitem")) {
if (n... |
public
dnsPTRRecord(dnsName _name, short _dclass, int _ttl, StringTokenizer st)
throws IOException
| public
dnsPTRRecord(dnsName _name, short _dclass, int _ttl, MyStringTokenizer st)
throws IOException
|
public static IContactModel unmarshall(Document document, String id)
throws SyntaxException, IllegalArgumentException {
if (document == null)
throw new IllegalArgumentException("document == null");
if (id == null)
throw new IllegalArgumentException("id == null");
XMLContactDocumentParser parser = new ... | public static IContactModel unmarshall(Document document, String id)
throws SyntaxException {
if (document == null)
throw new IllegalArgumentException("document == null");
if (id == null)
throw new IllegalArgumentException("id == null");
XMLContactDocumentParser parser = new XMLContactDocumentParser(d... |
public String toString() {
return "NamespaceNode("/*nonNLS*/ + fPackage.getName() + ")"/*nonNLS*/;
}
| public String toString() {
return "NamespaceNode(" + fPackage.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
|
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... | 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... |
public StringBuffer printStatement(int tab, StringBuffer output) {
return type.print(tab, output).append(';');
}
| public StringBuffer printStatement(int tab, StringBuffer output) {
return this.type.print(tab, output).append(';');
}
|
private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
// handle the error here
this.constant = NotAConstant;
if (this.didResolve) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !this.resolvedType.isValidBinding... | private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
// handle the error here
this.constant = NotAConstant;
if (this.didResolve) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !this.resolvedType.isValidBinding... |
public void addItemFrom(Object obj, Vector places) {
if (obj == null) {
System.out.println("tried to add null to trash!");
return;
}
if (obj instanceof ModelElement) {
ModelElement me = (ModelElement) obj;
try {
TrashItem ti = new TrashItem(obj, places);
_contents.addElement(ti);... | public void addItemFrom(Object obj, Vector places) {
if (obj == null) {
System.out.println("tried to add null to trash!");
return;
}
if (obj instanceof ModelElement) {
ModelElement me = (ModelElement) obj;
try {
TrashItem ti = new TrashItem(obj, places);
_contents.addElement(ti);... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
VariableDeclarationFragment(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on VariableDeclaration.
* @since 3.1
*/
final SimplePropertyDescriptor internalExtraDimen... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
VariableDeclarationFragment(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on VariableDeclaration.
* @since 3.1
*/
final SimplePropertyDescriptor internalExtraDimen... |
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
return true;
}
if (match != null && (castType.isBoundParameterizedType() || expressionType.isBo... | public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
return true;
}
if (match != null && (castType.isEnclosingTypeBoundParameterizedType() || expres... |
private TypeBinding internalResolveType(Scope scope) {
this.constant = NotAConstant;
if (this.resolvedType != null) // is a shared type reference which was already resolved
return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
if (this.argument != null) {
TypeRefe... | private TypeBinding internalResolveType(Scope scope) {
this.constant = NotAConstant;
if (this.resolvedType != null) // is a shared type reference which was already resolved
return this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error
if (this.argument != null) {
TypeRefe... |
public Object find(Object element) {
for (int i = this.size; --i >= 0;)
if (element.equals(this.elements[i]))
return element;
return null;
}
| public Object find(Object element) {
for (int i = this.size; --i >= 0;)
if (element.equals(this.elements[i]))
return this.elements[i];
return null;
}
|
public String toString() {
return "'this' reference (JThis) to Bsh object: " + namespace.nsName;
}
| public String toString() {
return "'this' reference (JThis) to Bsh object: " + namespace.getName();
}
|
public void actionPerformed(ActionEvent evt) {
// Select INBOX
FolderCommandReference[] refs = new FolderCommandReference[1];
refs[0] = new FolderCommandReference(MainInterface.treeModel.getFolder(101));
getFrameController().getSelectionManager().setSelection("mail.tree", refs);
// Fetch Messages
... | public void actionPerformed(ActionEvent evt) {
// Select INBOX
FolderCommandReference[] refs = new FolderCommandReference[1];
refs[0] = new FolderCommandReference(MainInterface.treeModel.getFolder(101));
getFrameController().getSelectionManager().setSelection("mail.tree", refs);
// Fetch Messages
... |
public RequestDispatcher getNamedDispatcher(String name) {
if (name == null)
return null;
// We need to do the checks
ServletWrapper wrapper = context.getServletByName( name );
if (wrapper == null)
return null;
RequestDispatcherImpl rD=new RequestDispatcherImpl( context );
rD.setName( name )... | public RequestDispatcher getNamedDispatcher(String name) {
if (name == null)
return null;
// We need to do the checks
Handler wrapper = context.getServletByName( name );
if (wrapper == null)
return null;
RequestDispatcherImpl rD=new RequestDispatcherImpl( context );
rD.setName( name );
ret... |
public void mouseMoved(MouseEvent me) {
int index = _list.locationToIndex(me.getPoint());
if (index == -1) return;
String tip = _list.getModel().getElementAt(index).toString();
//System.out.println("tip=" + tip);
_list.setToolTipText(tip);
}
| public void mouseMoved(MouseEvent me) {
int index = _list.locationToIndex(me.getPoint());
if (index == -1) return;
String tip = _list.getModel().getElementAt(index).toString();
//System.out.println("tip=" + tip);
_list.setToolTipText(tip + " ");
}
|
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
CastExpression(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescripto... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
CastExpression(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescripto... |
private String getTimeString() {
Date date = FinishedJobs.getInstance().getFinishDate(info);
if (date != null) {
return DateFormat.getTimeInstance(DateFormat.SHORT).format(date);
}
return null;
}
/**
* Refresh the contents of the receiver.
*
*/
void refresh() {
// Don't refresh if not visible
... | private String getTimeString() {
Date date = FinishedJobs.getInstance().getFinishDate(info);
if (date != null) {
return DateFormat.getTimeInstance(DateFormat.SHORT).format(date);
}
return null;
}
/**
* Refresh the contents of the receiver.
*
*/
void refresh() {
// Don't refresh if not visible
... |
public void done(IJobChangeEvent event) {
statuses[0] = event.getResult();
pendingInfos.remove(info);
refreshDialog();
}
});
openProgressJob.schedule();
try{
job.join();
}
catch (InterruptedException exception){
return ProgressUtil.exceptionStatus(exception);
}
return statuses... | public void done(IJobChangeEvent event) {
statuses[0] = event.getResult();
pendingInfos.remove(info);
refreshDialog();
}
});
openProgressJob.schedule();
try{
job.join();
}
catch (InterruptedException exception){
return ProgressManagerUtil.exceptionStatus(exception);
}
return s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.