buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
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() {
if (isDisposed()) {
return;
... | 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() {
if (isDisposed()) {
return;
... |
public String toString() {
return "ClasspathDirectory " + binaryPath; //$NON-NLS-1$
}
| public String toString() {
return "Binary classpath directory " + binaryPath; //$NON-NLS-1$
}
|
protected Control createDialogArea(Composite parent) {
// icon
Label iconLabel= new Label(parent, SWT.LEFT);
iconLabel.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_CENTER |
GridData.VERTICAL_ALIGN_BEGINNING));
Image i= JFaceResources.getImageRegistry().get(Dialog.DLG_IMG_INFO);
if (i != null)
icon... | protected Control createDialogArea(Composite parent) {
// icon
Label iconLabel= new Label(parent, SWT.LEFT);
iconLabel.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_CENTER |
GridData.VERTICAL_ALIGN_BEGINNING));
Image i= JFaceResources.getImageRegistry().get(Dialog.DLG_IMG_INFO);
if (i != null)
icon... |
protected ReferenceCollection(char[][][] qualifiedNameReferences, char[][] simpleNameReferences) {
this.qualifiedNameReferences = internQualifiedNames(qualifiedNameReferences);
this.simpleNameReferences = internSimpleNames(simpleNameReferences, true);
}
boolean includes(char[] simpleName) {
for (int i = 0, l = simp... | protected ReferenceCollection(char[][][] qualifiedNameReferences, char[][] simpleNameReferences) {
this.qualifiedNameReferences = internQualifiedNames(qualifiedNameReferences);
this.simpleNameReferences = internSimpleNames(simpleNameReferences, true);
}
boolean includes(char[] simpleName) {
for (int i = 0, l = simp... |
public ClassInstanceCreation convert(AnonymousLocalTypeDeclaration expression) {
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
classInstanceCreation.setName(convert(expression.allocation.type));
if (expression.allocation.enclosingInstance != null) {
classInstanceCreation.s... | public ClassInstanceCreation convert(AnonymousLocalTypeDeclaration expression) {
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
classInstanceCreation.setName(convert(expression.allocation.type));
if (expression.allocation.enclosingInstance != null) {
classInstanceCreation.s... |
public Storable readStorable() throws IOException {
Storable storable;
String s = readString();
if (s.equals("NULL")) {
return null;
}
if (s.equals("REF")) {
int ref = readInt();
return (Storable) retrieve(ref);
}
storable = (Storable) makeInstance(s);
map(storable);
storable.read(this);
... | public Storable readStorable() throws IOException {
Storable storable;
String s = readString();
if (s.equals("NULL")) {
return null;
}
if (s.equals("REF")) {
int ref = readInt();
return retrieve(ref);
}
storable = (Storable) makeInstance(s);
map(storable);
storable.read(this);
return st... |
public PackageReferencePattern(char[] pkgName, int matchMode, boolean isCaseSensitive) {
super(matchMode, isCaseSensitive);
this.pkgName = isCaseSensitive ? pkgName : CharOperation.toLowerCase(pkgName);
this.segments = CharOperation.splitOn('.', this.pkgName);
this.mustResolve = this.pkgName != null;
}
| public PackageReferencePattern(char[] pkgName, int matchMode, boolean isCaseSensitive) {
super(PKG_REF_PATTERN, matchMode, isCaseSensitive);
this.pkgName = isCaseSensitive ? pkgName : CharOperation.toLowerCase(pkgName);
this.segments = CharOperation.splitOn('.', this.pkgName);
this.mustResolve = this.pkgName != nu... |
public interface ICommandDefinition extends Comparable {
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Publ... | public interface ICommandDefinition extends Comparable {
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Publ... |
public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
scope.problemReporter().expressionShouldBeAVariable(this.lhs);
return null;
}
TypeBinding lhsType = lhs.resolveType(scope);
TypeBinding expressionType = expression.re... | public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
scope.problemReporter().expressionShouldBeAVariable(this.lhs);
return null;
}
TypeBinding lhsType = lhs.resolveType(scope);
TypeBinding expressionType = expression.re... |
public char[][] getPackageName() { return null; }
};
CompilationResult compilationResult = new CompilationResult(sourceUnit, 1, 1, 0);
CompilationUnitDeclaration unit =
isTopLevelOrMember ?
this.locator.basicParser().dietParse(sourceUnit, compilationResult) :
this.locator.basicParser().parse(sourceUnit... | public char[][] getPackageName() { return null; }
};
CompilationResult compilationResult = new CompilationResult(sourceUnit, 1, 1, 0);
CompilationUnitDeclaration unit =
isTopLevelOrMember ?
this.locator.basicParser().dietParse(sourceUnit, compilationResult) :
this.locator.basicParser().parse(sourceUnit... |
public String toString() {
return Localizer.localize ("Tree", "Stimulus->Action");
}
| public String toString() {
return Localizer.localize ("Tree", "misc.stimulus.action");
}
|
public interface GraphNodeHooks extends java.io.Serializable{
// Copyright (c) 1996-98 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation for educational, research and non-profit
// purposes, without fee, and witho... | public interface GraphNodeHooks extends java.io.Serializable{
// Copyright (c) 1996-98 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation for educational, research and non-profit
// purposes, without fee, and witho... |
public String toString(int tab) {
return tabString(tab) + "Recovered import: "/*nonNLS*/ + importReference.toString();
}
| public String toString(int tab) {
return tabString(tab) + "Recovered import: " + importReference.toString(); //$NON-NLS-1$
}
|
private void reportDeclaration(MethodBinding methodBinding, MatchLocator locator) throws CoreException {
ReferenceBinding declaringClass = methodBinding.declaringClass;
IType type = locator.lookupType(declaringClass);
if (type == null) return; // case of a secondary type
char[] selector = methodBinding.selector;
T... | private void reportDeclaration(MethodBinding methodBinding, MatchLocator locator) throws CoreException {
ReferenceBinding declaringClass = methodBinding.declaringClass;
IType type = locator.lookupType(declaringClass);
if (type == null) return; // case of a secondary type
char[] selector = methodBinding.selector;
T... |
public static String id() {
return "4.5-SNAPSHOT-20080125-0912";
}
| public static String id() {
return "4.5-SNAPSHOT-20080319-0812";
}
|
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameController()).getTableSelection();
r[0].setMarkVariant(MarkMessageCommand.MARK_AS_EXPUNGED);
MarkMessageCommand c = new MarkMessageCommand(r);
MainInterface.processor.addOp(c);
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameMediator()).getTableSelection();
r[0].setMarkVariant(MarkMessageCommand.MARK_AS_EXPUNGED);
MarkMessageCommand c = new MarkMessageCommand(r);
MainInterface.processor.addOp(c);
}
|
private void rehash() {
SimpleLookupTable newLookupTable = new SimpleLookupTable(elementSize);
Object currentKey;
for (int i = keyTable.length; --i >= 0;)
if ((currentKey = keyTable[i]) != null)
newLookupTable.put(currentKey, valueTable[i]);
this.keyTable = newLookupTable.keyTable;
this.valueTable = newLooku... | private void rehash() {
SimpleLookupTable newLookupTable = new SimpleLookupTable(elementSize * 2); // double the number of expected elements
Object currentKey;
for (int i = keyTable.length; --i >= 0;)
if ((currentKey = keyTable[i]) != null)
newLookupTable.put(currentKey, valueTable[i]);
this.keyTable = newLoo... |
public String toStringExpression(){
return "<SelectOnSuper:"/*nonNLS*/+super.toStringExpression()+">"/*nonNLS*/;
}
| public String toStringExpression(){
return "<SelectOnSuper:"+super.toStringExpression()+">"; //$NON-NLS-2$ //$NON-NLS-1$
}
|
public static CompilationUnitDeclaration parse(
org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
NodeSearcher nodeSearcher,
Map settings,
int flags) {
if (sourceUnit == null) {
throw new IllegalStateException();
}
CompilerOptions compilerOptions = new CompilerOptions(settings);
... | public static CompilationUnitDeclaration parse(
org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
NodeSearcher nodeSearcher,
Map settings,
int flags) {
if (sourceUnit == null) {
throw new IllegalStateException();
}
CompilerOptions compilerOptions = new CompilerOptions(settings);
... |
protected void loaderHook( DependManager dm, Context context ) {
// ReloadInterceptor must be configured _after_ LoaderInterceptor
ClassLoader cl=context.getClassLoader();
ClassLoader loader=DependClassLoader.getDependClassLoader( dm, cl,
context.getAttribute( Context.ATTRIB_PROTECTION_DOMAIN));
cont... | protected void loaderHook( DependManager dm, Context context ) {
// ReloadInterceptor must be configured _after_ LoaderInterceptor
ClassLoader cl=context.getClassLoader();
ClassLoader loader=DependClassLoader.getDependClassLoader( dm, cl,
context.getAttribute( Context.ATTRIB_PROTECTION_DOMAIN), debug);... |
public Iterator getAddressIterator() {
Vector<AddressModel> v = new Vector<AddressModel>();
Element child = getParentElement().getChild(VCARD.ADR);
// if not specified return empty iterator
if (child == null)
return v.iterator();
Iterator it = child.getChildren().iterator();
// iterate over all type e... | public Iterator getAddressIterator() {
Vector<AddressModel> v = new Vector<AddressModel>();
Element child = getParentElement().getChild(VCARD.ADR);
// if not specified return empty iterator
if (child == null)
return v.iterator();
Iterator it = child.getChildren().iterator();
// iterate over all type e... |
static final private String INTERNAL_ROOT_NAME = "root";
/**
Read configuration from a file. The existing configuration is not
cleared nor reset. If you require a different call, behaviour,
then call {@link BasicConfigurator#resetConfiguration
resetConfiguration} method before calling
<code>d... | static final private String INTERNAL_ROOT_NAME = "root";
/**
Read configuration from a file. The existing configuration is not
cleared nor reset. If you require a different call, behaviour,
then call {@link BasicConfigurator#resetConfiguration
resetConfiguration} method before calling
<code>d... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new MarkMessageAsHamCommand(r));
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new MarkMessageAsHamCommand(r));
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
... |
public String toStringExpression(){
/* slow code */
return qualification.toString(0)+".super" ; //$NON-NLS-1$
}
| public String toStringExpression(){
/* slow code */
return qualification.toString(0)+".super"/*nonNLS*/ ;
}
|
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
MethodRefParameter(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescr... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
MethodRefParameter(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescr... |
public static IStatus validatePackageName(String name) {
if (name == null) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Util.bind("convention.package.nullName"), null); //$NON-NLS-1$
}
int length;
if ((length = name.length()) == 0) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1,... | public static IStatus validatePackageName(String name) {
if (name == null) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Util.bind("convention.package.nullName"), null); //$NON-NLS-1$
}
int length;
if ((length = name.length()) == 0) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1,... |
public static Hashtable readFormData( Request request ) {
String contentType=request.getContentType();
if (contentType != null) {
if (contentType.indexOf(";")>0)
contentType=contentType.substring(0,contentType.indexOf(";")-1);
contentType = contentType.toLowerCase()... | public static Hashtable readFormData( Request request ) {
String contentType=request.getContentType();
if (contentType != null) {
if (contentType.indexOf(";")>0)
contentType=contentType.substring(0,contentType.indexOf(";"));
contentType = contentType.toLowerCase().t... |
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)
... |
protected String genText() {
//System.out.println("Docstab getting docs for " + _target);
Object modelObject = _target;
if ( !(modelObject instanceof MElementImpl) ) return null;
if (_target instanceof FigNode)
modelObject = ((FigNode)_target).getOwner();
if (_target instanceof FigEdge)
... | protected String genText() {
//System.out.println("Docstab getting docs for " + _target);
Object modelObject = _target;
if ( !(modelObject instanceof MElementImpl) ) return null;
if (_target instanceof FigNode)
modelObject = ((FigNode)_target).getOwner();
if (_target instanceof FigEdge)
... |
public int getExtendedEnd(ASTNode node) {
int end = node.getStartPosition() + node.getLength();
if (this.trailingComments != null) {
int[] range = (int[]) this.trailingComments.get(node);
if (range != null) {
if (range[0] == -1 && range[1] == -1) {
ASTNode parent = node.getParent();
if (parent ... | public int getExtendedEnd(ASTNode node) {
int end = node.getStartPosition() + node.getLength();
if (this.trailingComments != null) {
int[] range = (int[]) this.trailingComments.get(node);
if (range != null) {
if (range[0] == -1 && range[1] == -1) {
ASTNode parent = node.getParent();
if (parent ... |
public void actionPerformed(ActionEvent evt) {
final ComposerController composerController = (ComposerController ) getFrameController();
if (composerController.checkState())
return;
/*
ComposerOperation op =
new ComposerOperation(
Operation.COMPOSER_SEND,
0,
composerInterface.composerCont... | public void actionPerformed(ActionEvent evt) {
final ComposerController composerController = (ComposerController ) getFrameMediator();
if (composerController.checkState())
return;
/*
ComposerOperation op =
new ComposerOperation(
Operation.COMPOSER_SEND,
0,
composerInterface.composerContro... |
public char[][] getPackageName() {
return null;
}
};
CompletionEngine engine = new CompletionEngine(environment, mapper.getCompletionRequestor(requestor), options, project);
engine.complete(sourceUnit, mapper.startPosOffset + completionPosition, 0);
}
| public char[][] getPackageName() {
return null;
}
};
CompletionEngine engine = new CompletionEngine(environment, mapper.getCompletionRequestor(requestor), options, project);
engine.complete(sourceUnit, mapper.startPosOffset + completionPosition, mapper.startPosOffset);
}
|
public String getPatternName(){
return "MethodReferencePattern: ";
}
| public String getPatternName(){
return "MethodReferencePattern: "/*nonNLS*/;
}
|
public Openable createOpenable(String resourcePath, IJavaSearchScope scope) {
int separatorIndex;
if ((separatorIndex= resourcePath.indexOf(IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR)) > -1) {
// path to a class file inside a jar
String jarPath= resourcePath.substring(0, separatorIndex);
// Optimization: c... | public Openable createOpenable(String resourcePath, IJavaSearchScope scope) {
int separatorIndex;
if ((separatorIndex= resourcePath.indexOf(IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR)) > -1) {
// path to a class file inside a jar
String jarPath= resourcePath.substring(0, separatorIndex);
// Optimization: c... |
protected String getMainTaskName() {
return Util.bind("operation.deleteResourceProgress"/*nonNLS*/);
}
| protected String getMainTaskName() {
return Util.bind("operation.deleteResourceProgress"); //$NON-NLS-1$
}
|
public boolean addFile(IndexedFile indexedFile) {
int offset= this.offset;
if (isEmpty()) {
field.putInt4(offset, indexedFile.getFileNumber());
offset += 4;
}
String path= indexedFile.getPath() + indexedFile.propertiesToString();
int prefixLen= prevPath == null ? 0 : Util.prefixLength(prevPath, path);
... | public boolean addFile(IndexedFile indexedFile) {
int offset= this.offset;
if (isEmpty()) {
field.putInt4(offset, indexedFile.getFileNumber());
offset += 4;
}
String path= indexedFile.getPath();
int prefixLen= prevPath == null ? 0 : Util.prefixLength(prevPath, path);
int sizeEstimate= 2 + 2 + (path.l... |
public IMAPStore(ImapItem item, IMAPRootFolder root) {
this.item = item;
this.parent = root;
// create IMAP protocol
imap =
new IMAPProtocol(
item.get("host"),
item.getInteger("port"),
item.getBoolean("enable_ssl", true));
// register interest on status updates
imap.registerInterest((Prog... | public IMAPStore(ImapItem item, IMAPRootFolder root) {
this.item = item;
this.parent = root;
// create IMAP protocol
imap =
new IMAPProtocol(
item.get("host"),
item.getInteger("port"),
item.getBoolean("enable_ssl", false));
// register interest on status updates
imap.registerInterest((Pro... |
public void setSignature(File signature) {
if (signature != null && signature.exists() && signature.isFile()) {
e.addAttribute(Identity.SIGNATURE_FILE, signature.getPath());
} else {
e.getAttributes().remove(Identity.SIGNATURE_FILE);
}
e.notifyObserve... | public void setSignature(File signature) {
if (signature != null && signature.exists() && signature.isFile()) {
e.addAttribute(Identity.SIGNATURE_FILE, signature.getPath());
} else {
e.getAttributes().remove(Identity.SIGNATURE_FILE);
}
e.notifyObserve... |
public NameEnvironmentAnswer findClass(String sourceFileWithoutExtension, String qualifiedPackageName, String qualifiedSourceFileWithoutExtension) {
String sourceFolderPath = this.sourceFolder.getFullPath().toString() + IPath.SEPARATOR;
char[][] javaLikeExtensions = Util.getJavaLikeExtensions();
for (int i = 0, le... | public NameEnvironmentAnswer findClass(String sourceFileWithoutExtension, String qualifiedPackageName, String qualifiedSourceFileWithoutExtension) {
String sourceFolderPath = this.sourceFolder.getFullPath().toString() + IPath.SEPARATOR;
char[][] javaLikeExtensions = Util.getJavaLikeExtensions();
for (int i = 0, le... |
public TypeBinding literalType(BlockScope scope) {
return DoubleBinding;
}
| public TypeBinding literalType(BlockScope scope) {
return TypeBinding.DOUBLE;
}
|
public IMethod[] findMethods(IMethod method) {
try {
return this.findMethods(method, this.getMethods());
} catch (JavaModelException e) {
// if type doesn't exist, no matching method can exist
return null;
}
}
| public IMethod[] findMethods(IMethod method) {
try {
return findMethods(method, getMethods());
} catch (JavaModelException e) {
// if type doesn't exist, no matching method can exist
return null;
}
}
|
public static char[][] getTypeParameters(char[] methodOrTypeSignature) throws IllegalArgumentException {
try {
int length = methodOrTypeSignature.length;
if (length == 0) return CharOperation.NO_CHAR_CHAR;
if (methodOrTypeSignature[0] != C_GENERIC_START) return CharOperation.NO_CHAR_CHAR;
ArrayList paramLis... | public static char[][] getTypeParameters(char[] methodOrTypeSignature) throws IllegalArgumentException {
try {
int length = methodOrTypeSignature.length;
if (length == 0) return CharOperation.NO_CHAR_CHAR;
if (methodOrTypeSignature[0] != C_GENERIC_START) return CharOperation.NO_CHAR_CHAR;
ArrayList paramLis... |
public void resolve() {
SourceTypeBinding sourceType = this.binding;
if (sourceType == null) {
this.ignoreFurtherInvestigation = true;
return;
}
try {
resolveAnnotations(this.annotations, this.staticInitializerScope);
if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
this.scope.problem... | public void resolve() {
SourceTypeBinding sourceType = this.binding;
if (sourceType == null) {
this.ignoreFurtherInvestigation = true;
return;
}
try {
resolveAnnotations(this.staticInitializerScope, this.annotations, sourceType);
if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
this.sc... |
public int getNextToken() throws InvalidInputException {
if(this.pendingTokensPtr > -1) {
return this.pendingTokens[this.pendingTokensPtr--];
}
this.fakeTokenSource = null;
this.precededByRemoved = false;
if(this.data.insertedTokens != null) {
for (int i = 0; i <= this.data.insertedTokensPtr; i++... | public int getNextToken() throws InvalidInputException {
if(this.pendingTokensPtr > -1) {
return this.pendingTokens[this.pendingTokensPtr--];
}
this.fakeTokenSource = null;
this.precededByRemoved = false;
if(this.data.insertedTokens != null) {
for (int i = 0; i <= this.data.insertedTokensPtr; i++... |
protected void getMethodBodies(CompilationUnitDeclaration unit, int place) {
//fill the methods bodies in order for the code to be generated
if (unit.ignoreMethodBodies) {
unit.ignoreFurtherInvestigation = true;
return;
// if initial diet parse did not work, no need to dig into method bodies.
}
if (... | protected void getMethodBodies(CompilationUnitDeclaration unit, int place) {
//fill the methods bodies in order for the code to be generated
if (unit.ignoreMethodBodies) {
unit.ignoreFurtherInvestigation = true;
return;
// if initial diet parse did not work, no need to dig into method bodies.
}
if (... |
protected void resetDefaults() {
// problem default severities defined on IrritantSet
this.errorThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_ERRORS);
this.warningThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_WARNINGS);
// by default only lines and source attributes are generated.
th... | protected void resetDefaults() {
// problem default severities defined on IrritantSet
this.errorThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_ERRORS);
this.warningThreshold = new IrritantSet(IrritantSet.COMPILER_DEFAULT_WARNINGS);
// by default only lines and source attributes are generated.
th... |
public String toString() {
// don't use + with char[]
return new StringBuffer("FieldIndictment(").append(fName).append(")").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
// don't use + with char[]
return new StringBuffer("FieldIndictment("/*nonNLS*/).append(fName).append(")"/*nonNLS*/).toString();
}
|
private void createDetailsArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = layout.marginWidth = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH))... | private void createDetailsArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = layout.marginWidth = 0;
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH))... |
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("CLOSE")) {
updateComponents(false);
setVisible(false);
} else if (action.equals("ADD_CRITERION")) {
criteriaList.add();
} else if (action.equals(... | public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("CLOSE")) {
updateComponents(false);
setVisible(false);
} else if (action.equals("ADD_CRITERION")) {
criteriaList.add();
} else if (action.equals(... |
private final int jjMoveNfa_0(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 74;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (;;)
{
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64)
{
lon... | private final int jjMoveNfa_0(int startState, int curPos)
{
int[] nextStates;
int startsAt = 0;
jjnewStateCnt = 74;
int i = 1;
jjstateSet[0] = startState;
int j, kind = 0x7fffffff;
for (;;)
{
if (++jjround == 0x7fffffff)
ReInitRounds();
if (curChar < 64)
{
lon... |
public void run() {
JobProgressManager provider = JobProgressManager.getInstance();
provider.debug = !provider.debug;
setChecked(provider.debug);
provider.refreshAll();
}
});
}
| public void run() {
ProgressContentProvider provider = (ProgressContentProvider) viewer.getContentProvider();
provider.debug = !provider.debug;
setChecked(provider.debug);
provider.refreshAll();
}
});
}
|
public void updateFromParserState(){
if(this.bodyStartsAtHeaderEnd()){
Parser parser = this.parser();
/* might want to recover arguments or thrown exceptions */
if (parser.listLength > 0 && parser.astLengthPtr > 0){ // awaiting interface type references
/* has consumed the arguments - listed elements must be... | public void updateFromParserState(){
if(this.bodyStartsAtHeaderEnd()){
Parser parser = this.parser();
/* might want to recover arguments or thrown exceptions */
if (parser.listLength > 0 && parser.astLengthPtr > 0){ // awaiting interface type references
/* has consumed the arguments - listed elements must be... |
protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(this.tabString(tab));
buffer.append("package "); //$NON-NLS-1$
buffer.append(getElementName());
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
}
}
| protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(this.tabString(tab));
buffer.append("package "); //$NON-NLS-1$
toStringName(buffer);
if (info == null) {
buffer.append(" (not open)"); //$NON-NLS-1$
}
}
|
public String toString(int tab) {
String s = tabString(tab);
s = s + "throw "/*nonNLS*/;
s = s + exception.toStringExpression();
return s;
}
| public String toString(int tab) {
String s = tabString(tab);
s = s + "throw "; //$NON-NLS-1$
s = s + exception.toStringExpression();
return s;
}
|
public List getPossibleChilds(AbstractFolder parent) {
List list = new LinkedList();
// which parents are possible ?
FolderItem item = parent.getFolderItem();
String parentType = item.get("type");
// the group of the given parent
String parentGroup = getGroup(parent... | public List getPossibleChilds(AbstractFolder parent) {
List list = new LinkedList();
// which parents are possible ?
FolderItem item = parent.getConfiguration();
String parentType = item.get("type");
// the group of the given parent
String parentGroup = getGroup(par... |
private void loadPredefinedPersp(
PerspectiveDescriptor persp)
throws WorkbenchException
{
// Create layout engine.
IPerspectiveFactory factory = null;
try {
factory = persp.createFactory();
} catch (CoreException e) {
throw new WorkbenchException(WorkbenchMessages.format("Perspective.unableToLoad", new Objec... | private void loadPredefinedPersp(
PerspectiveDescriptor persp)
throws WorkbenchException
{
// Create layout engine.
IPerspectiveFactory factory = null;
try {
factory = persp.createFactory();
} catch (CoreException e) {
throw new WorkbenchException(WorkbenchMessages.format("Perspective.unableToLoad", new Objec... |
public String toString() {
// don't use + with char[]
return new StringBuffer("TypeIndictment(").append(fName).append(")").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
| public String toString() {
// don't use + with char[]
return new StringBuffer("TypeIndictment("/*nonNLS*/).append(fName).append(")"/*nonNLS*/).toString();
}
|
public void setDefaultSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
this.alignment_for_argument... | public void setDefaultSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
this.alignment_for_argument... |
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nullReq... | protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nullReq... |
public void widgetSelected(SelectionEvent e) {
ToolItem toolItem = (ToolItem) perspectiveBarMenu.getData();
if (toolItem != null && !toolItem.isDisposed()) {
ActionContributionItem item = (ActionContributionItem) toolItem.getData();
SetPagePerspectiveAction action = (SetPagePerspectiveAction) ... | public void widgetSelected(SelectionEvent e) {
ToolItem toolItem = (ToolItem) perspectiveBarMenu.getData();
if (toolItem != null && !toolItem.isDisposed()) {
ActionContributionItem item = (ActionContributionItem) toolItem.getData();
SetPagePerspectiveAction action = (SetPagePerspectiveAction) ... |
public void execute(WorkerStatusController worker)
throws Exception {
// get references
FolderCommandReference[] references = (FolderCommandReference[]) getReferences();
// use wrapper class to make handling references easier
adapter = new FolderCommandAdapter(references);
... | public void execute(WorkerStatusController worker)
throws Exception {
// get references
FolderCommandReference[] references = (FolderCommandReference[]) getReferences();
// use wrapper class to make handling references easier
adapter = new FolderCommandAdapter(references);
... |
public void addSystemActions(IMenuManager menuManager) {
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(fastViewAction)); //$NON-NLS-1$
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(detachViewAction)); //$NO... | public void addSystemActions(IMenuManager menuManager) {
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(fastViewAction)); //$NON-NLS-1$
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(detachViewAction)); //$NO... |
public String toString() {
return "image"; //$NON-NLS-1$
}
| public String toString() {
return "image"/*nonNLS*/;
}
|
public String getDeclaredName() throws NotPresentException {
return ""/*nonNLS*/;
}
| public String getDeclaredName() throws NotPresentException {
return ""; //$NON-NLS-1$
}
|
public void acceptImport(int declarationStart, int declarationEnd, char[] name, boolean onDemand) {
int[] sourceRange = {declarationStart, declarationEnd};
String importName = new String(name);
/** name is set to contain the '*' */
if (onDemand) {
importName+=".*"/*nonNLS*/;
}
fNode= new DOMImport(fDocument, so... | public void acceptImport(int declarationStart, int declarationEnd, char[] name, boolean onDemand) {
int[] sourceRange = {declarationStart, declarationEnd};
String importName = new String(name);
/** name is set to contain the '*' */
if (onDemand) {
importName+=".*"; //$NON-NLS-1$
}
fNode= new DOMImport(fDocument... |
public void build() {
if (JavaBuilder.DEBUG)
System.out.println("FULL build"); //$NON-NLS-1$
try {
notifier.subTask(Util.bind("build.scrubbingOutput")); //$NON-NLS-1$
JavaBuilder.removeProblemsFor(javaBuilder.currentProject);
scrubOutputFolder();
notifier.updateProgressDelta(0.1f);
notifier.subTask(Util... | public void build() {
if (JavaBuilder.DEBUG)
System.out.println("FULL build"); //$NON-NLS-1$
try {
notifier.subTask(Util.bind("build.scrubbingOutput")); //$NON-NLS-1$
JavaBuilder.removeProblemsAndTasksFor(javaBuilder.currentProject);
scrubOutputFolder();
notifier.updateProgressDelta(0.1f);
notifier.subT... |
public AnalyzeFolderAction(FrameMediator frameMediator) {
super(frameMediator, "Analyze Folder");
// tooltip text
putValue(SHORT_DESCRIPTION, "Analyze all messages of selected Folder");
setEnabled(false);
((MailFrameMediator) frameMediator).registerTableSelectionListener(
this);
}
| public AnalyzeFolderAction(FrameMediator frameMediator) {
super(frameMediator, "Analyze Folder");
// tooltip text
putValue(SHORT_DESCRIPTION, "Analyze all messages of selected Folder");
setEnabled(false);
((MailFrameMediator) frameMediator).registerTreeSelectionListener(
this);
}
|
public final Image getImage(Object element) {
if (element instanceof IPerspectiveDescriptor) {
IPerspectiveDescriptor desc = (IPerspectiveDescriptor) element;
ImageDescriptor imageDescriptor = desc.getImageDescriptor();
if (imageDescriptor == null) {
image... | public final Image getImage(Object element) {
if (element instanceof IPerspectiveDescriptor) {
IPerspectiveDescriptor desc = (IPerspectiveDescriptor) element;
ImageDescriptor imageDescriptor = desc.getImageDescriptor();
if (imageDescriptor == null) {
image... |
public Context getInitialContext(Hashtable env) throws NamingException {
if (TraceCarol.isDebugJndiCarol()) {
TraceCarol.debugJndiCarol("MultiOrbInitialContextFactory.getInitialContext(Hashtable env)");
}
return new MultiOrbInitialContext();
}
| public Context getInitialContext(Hashtable env) throws NamingException {
if (TraceCarol.isDebugJndiCarol()) {
TraceCarol.debugJndiCarol("MultiOrbInitialContextFactory.getInitialContext(Hashtable env)");
}
return new ContextWrapper(env);
}
|
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 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 EditorPresentation(Composite parent, IStackPresentationSite newSite,
int flags) {
super(new CTabFolder(parent, SWT.BORDER), newSite);
CTabFolder tabFolder = getTabFolder();
tabFolder.addCTabFolder2Listener(showListListener);
preferenceStore.addPropertyChangeListene... | public EditorPresentation(Composite parent, IStackPresentationSite newSite,
int flags) {
super(new CTabFolder(parent, SWT.BORDER), newSite);
CTabFolder tabFolder = getTabFolder();
tabFolder.addCTabFolder2Listener(showListListener);
preferenceStore.addPropertyChangeListene... |
private JavaElement getUnresolvedJavaElement() {
IType declaringType = (IType) getDeclaringClass().getJavaElement();
if (declaringType == null) return null;
if (!(this.resolver instanceof DefaultBindingResolver)) return null;
ASTNode node = (ASTNode) ((DefaultBindingResolver) this.resolver).bindingsToAstNodes.... | private JavaElement getUnresolvedJavaElement() {
IType declaringType = (IType) getDeclaringClass().getJavaElement();
if (declaringType == null) return null;
if (!(this.resolver instanceof DefaultBindingResolver)) return null;
ASTNode node = (ASTNode) ((DefaultBindingResolver) this.resolver).bindingsToAstNodes.... |
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
try {
((MethodScope) currentScope).isConstructorCall = true;
int pc = codeStream.position;
codeStream.aload_0();
// handling innerclass constructor invocation
ReferenceBi... | public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
try {
((MethodScope) currentScope).isConstructorCall = true;
int pc = codeStream.position;
codeStream.aload_0();
// handling innerclass constructor invocation
ReferenceBi... |
public IJavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (cu.owner == DefaultWorkingCopyOwner.PRIMARY) return this;
}
IJavaElement parent = fParent.getPrimaryElement(false);
return ((IType)parent).getMethod(fName, fPara... | public IJavaElement getPrimaryElement(boolean checkOwner) {
if (checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (cu.isPrimary()) return this;
}
IJavaElement parent = fParent.getPrimaryElement(false);
return ((IType)parent).getMethod(fName, fParameterTypes);
}
|
public IMAPServer getServer();
} | public IImapServer getServer();
} |
public void handle(final StatusAdapter statusAdapter, int style) {
if (((style & StatusManager.SHOW) == StatusManager.SHOW)
|| ((style & StatusManager.BLOCK) == StatusManager.BLOCK)) {
// INFO status is set in the adapter when the passed adapter has OK
// or CANCEL status
if (statusAdapter.getStatus().... | public void handle(final StatusAdapter statusAdapter, int style) {
if (((style & StatusManager.SHOW) == StatusManager.SHOW)
|| ((style & StatusManager.BLOCK) == StatusManager.BLOCK)) {
// INFO status is set in the adapter when the passed adapter has OK
// or CANCEL status
if (statusAdapter.getStatus().... |
package org.eclipse.ui.commands;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which... | package org.eclipse.ui.commands;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which... |
public String toString () {
Object key;
StringBuffer buffer = new StringBuffer ();
buffer.append ('{');
for (int i=0; i<elementCount; i++) {
if (i != 0) buffer.append (',');
if (buffer.length() > 1000) {
buffer.append("..."); //$NON-NLS-1$
break;
}
buffer.append (orderedList[i]);
buffer.append ('=')... | public String toString () {
Object key;
StringBuffer buffer = new StringBuffer ();
buffer.append ('{');
for (int i=0; i<elementCount; i++) {
if (i != 0) buffer.append (',');
if (buffer.length() > 1000) {
buffer.append("..."/*nonNLS*/);
break;
}
buffer.append (orderedList[i]);
buffer.append ('=');
... |
public void readOptions(String xmlString) throws IOException {
if(fOptions == null)
JavaCore.setOptionsToDefault();
StringReader reader = new StringReader(xmlString);
Element cpElement;
try {
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
cpElement = parser.pars... | public void readOptions(String xmlString) throws IOException {
if(fOptions == null)
JavaCore.resetOptions();
StringReader reader = new StringReader(xmlString);
Element cpElement;
try {
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
cpElement = parser.parse(new I... |
public int getNodeType() {
return SWITCH_CASE;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
SwitchCase result = new SwitchCase(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.setExpr... | public int getNodeType() {
return SWITCH_CASE;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
SwitchCase result = new SwitchCase(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
result.setExp... |
public void execute(Worker worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Folder folder = (Folder) r[0].getFolder();
Object[] uids = r[0].getUids();
Integer[] address = r[0].getAddress();
part = folder.getMimePart(uids[0], address, worker);
Decoder de... | public void execute(Worker worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
Folder folder = (Folder) r[0].getFolder();
Object[] uids = r[0].getUids();
Integer[] address = r[0].getAddress();
part = folder.getMimePart(uids[0], address);
Decoder decoder;
... |
public IJavaElement getElementAtConsideringSibling(int position) throws JavaModelException {
IPackageFragment fragment = (IPackageFragment)getParent();
PackageFragmentRoot root = (PackageFragmentRoot) fragment.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
SourceMapper mapper = root.getSourceMapper();
if (mapper ... | public IJavaElement getElementAtConsideringSibling(int position) throws JavaModelException {
IPackageFragment fragment = (IPackageFragment)getParent();
PackageFragmentRoot root = (PackageFragmentRoot) fragment.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
SourceMapper mapper = root.getSourceMapper();
if (mapper ... |
public int getLongOperationTime() {
return 5000;
}
| public int getLongOperationTime() {
return 800;
}
|
public void setTo(Address[] a) {
for (int i=0; i<a.length; i++) {
HeaderItem item = new HeaderItem(HeaderItem.CONTACT);
String displayName = a[i].getDisplayName();
if( displayName != null ) {
item.add("displayname", displayName);
} else {
... | public void setTo(Address[] a) {
for (int i=0; i<a.length; i++) {
HeaderItem item = new HeaderItem(HeaderItem.CONTACT);
String displayName = a[i].getDisplayName();
if( !displayName.equals("") ) {
item.add("displayname", displayName);
} else {
... |
public void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0)) {
printUsage();
return;
}
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog = 8;
final int InsideRepetition = 16;
fin... | public void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0)) {
printUsage();
return;
}
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog = 8;
final int InsideRepetition = 16;
fin... |
public String getType() {
String extension= file.getFileExtension();
if (extension == null)
return "";
return extension;
}
| public String getType() {
String extension= file.getFileExtension();
if (extension == null)
return ""/*nonNLS*/;
return extension;
}
|
private void buildForProject(JavaProject project, Vector infos, Vector units) throws JavaModelException {
IType focusType = this.getType();
if (focusType != null && focusType.getJavaProject().equals(project)) {
// add focus type
try {
infos.addElement(((JavaElement) focusType).getRawInfo());
} catch (JavaMod... | private void buildForProject(JavaProject project, Vector infos, Vector units) throws JavaModelException {
IType focusType = this.getType();
if (focusType != null && focusType.getJavaProject().equals(project)) {
// add focus type
try {
infos.addElement(((JavaElement) focusType).getRawInfo());
} catch (JavaMod... |
public MessageFolder createFolder(int folderId) {
return new CachedMHFolder("test" + folderId, "CachedMHFolder",
FolderTstHelper.homeDirectory + "/folders/");
}
} | public AbstractMessageFolder createFolder(int folderId) {
return new CachedMHFolder("test" + folderId, "CachedMHFolder",
FolderTstHelper.homeDirectory + "/folders/");
}
} |
public
jnamed(String conffile) throws IOException, ZoneTransferException {
FileInputStream fs;
List ports = new ArrayList();
List addresses = new ArrayList();
try {
fs = new FileInputStream(conffile);
}
catch (Exception e) {
System.out.println("Cannot open " + conffile);
return;
}
caches = new HashMap();... | public
jnamed(String conffile) throws IOException, ZoneTransferException {
FileInputStream fs;
List ports = new ArrayList();
List addresses = new ArrayList();
try {
fs = new FileInputStream(conffile);
}
catch (Exception e) {
System.out.println("Cannot open " + conffile);
return;
}
caches = new HashMap();... |
public final Image getImage(Object element) {
if (element instanceof IPerspectiveDescriptor) {
IPerspectiveDescriptor desc = (IPerspectiveDescriptor) element;
ImageDescriptor imageDescriptor = desc.getImageDescriptor();
if (imageDescriptor == null) {
imageDescriptor =
WorkbenchImages.getImageDescri... | public final Image getImage(Object element) {
if (element instanceof IPerspectiveDescriptor) {
IPerspectiveDescriptor desc = (IPerspectiveDescriptor) element;
ImageDescriptor imageDescriptor = desc.getImageDescriptor();
if (imageDescriptor == null) {
imageDescriptor =
WorkbenchImages.getImageDescri... |
public void setSharedProperty(QualifiedName key, String value)
throws CoreException {
String propertyName = computeSharedPropertyFileName(key);
IFile rscFile = getProject().getFile(propertyName);
InputStream input = new ByteArrayInputStream(value.getBytes());
// update the resource content
if (rscFile.exi... | public void setSharedProperty(QualifiedName key, String value)
throws CoreException {
String propertyName = computeSharedPropertyFileName(key);
IFile rscFile = getProject().getFile(propertyName);
InputStream input = new BufferedInputStream(new ByteArrayInputStream(value.getBytes()));
// update the resource ... |
public void addActionServiceListener(IActionServiceListener actionServiceListener) {
if (actionServiceListeners != null)
actionServiceListeners = new ArrayList();
if (!actionServiceListeners.contains(actionServiceListener))
actionServiceListeners.add(actionServiceListener);
}
| public void addActionServiceListener(IActionServiceListener actionServiceListener) {
if (actionServiceListeners == null)
actionServiceListeners = new ArrayList();
if (!actionServiceListeners.contains(actionServiceListener))
actionServiceListeners.add(actionServiceListener);
}
|
// managing private access
if (!fieldBinding.isStatic()) {
if ((bits & DepthMASK) != 0) {
// internal error, per construction we should have found it
// not yet supported
currentScope.problemReporter().needImplementation();
} else {
generateReceiver(code... | // managing private access
if (!fieldBinding.isStatic()) {
if ((bits & DepthMASK) != 0) {
// internal error, per construction we should have found it
// not yet supported
currentScope.problemReporter().needImplementation();
} else {
generateReceiver(code... |
private String getPreserveEmptyLines(int count) {
if (count == 0) {
// preserve line breaks in wrapping if specified
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198074
if (this.currentAlignment != null && this.memberAlignment != null && !this.formatter.preferences.join_wrapped_lines) {
if (... | private String getPreserveEmptyLines(int count) {
if (count == 0) {
// preserve line breaks in wrapping if specified
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=198074
if (this.currentAlignment != null && this.memberAlignment != null && !this.formatter.preferences.join_wrapped_lines) {
if (... |
public List executeQuery(List params);
} | public List executeQuery(List params) throws PersistenceException;
} |
public
SIGRecord(Name _name, short _dclass, int _ttl,
int length, CountedDataInputStream in, Compression c)
throws IOException
| public
SIGRecord(Name _name, short _dclass, int _ttl,
int length, DataByteInputStream in, Compression c)
throws IOException
|
public void setContainer(ILayoutContainer container) {
ILayoutContainer oldContainer = getContainer();
if (hasFocus) {
if (oldContainer != null && oldContainer instanceof PartStack) {
((PartStack)oldContainer).setActive(StackPresentation.AS_INACTIVE);
}
if (container != null && container instanceo... | public void setContainer(ILayoutContainer container) {
ILayoutContainer oldContainer = getContainer();
if (hasFocus) {
if (oldContainer != null && oldContainer instanceof PartStack) {
((PartStack)oldContainer).setActive(StackPresentation.AS_INACTIVE);
}
if (container != null && container instanceo... |
public String getMainTaskName(){
return Util.bind("operation.createPackageProgress"); //$NON-NLS-1$
}
| public String getMainTaskName(){
return Util.bind("operation.createPackageProgress"/*nonNLS*/);
}
|
public void execute() {
if (view() == null) {
throw new JHotDrawRuntimeException("execute should NOT be getting called when view() == null");
};
}
| public void execute() {
if (view() == null) {
throw new JHotDrawRuntimeException("execute should NOT be getting called when view() == null");
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.