buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private String removeIndentAndNewLines(String code, IDocument document, ICompilationUnit cu) {
IJavaProject project = cu.getJavaProject();
Map options = project.getOptions(true/*inherit JavaCore options*/);
int tabWidth;
try {
tabWidth = Integer.parseInt((String) options.get(DefaultCodeFormatterConstants.FORMATTE... | private String removeIndentAndNewLines(String code, IDocument document, ICompilationUnit cu) {
IJavaProject project = cu.getJavaProject();
Map options = project.getOptions(true/*inherit JavaCore options*/);
int tabWidth;
try {
tabWidth = Integer.parseInt((String) options.get(DefaultCodeFormatterConstants.FORMATTE... |
private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
// handle the error here
this.constant = Constant.NotAConstant;
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !t... | private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) {
// handle the error here
this.constant = Constant.NotAConstant;
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
if (this.resolvedType != null && !t... |
protected ASTNode generateElementAST(ASTRewrite rewriter, IDocument document, ICompilationUnit cu) throws JavaModelException {
//look for an existing package declaration
IJavaElement[] children = getCompilationUnit().getChildren();
for (int i = 0; i < children.length; i++) {
if (children[i].getElementType() == IJ... | protected ASTNode generateElementAST(ASTRewrite rewriter, IDocument document, ICompilationUnit cu) throws JavaModelException {
//look for an existing package declaration
IJavaElement[] children = getCompilationUnit().getChildren();
for (int i = 0; i < children.length; i++) {
if (children[i].getElementType() == IJ... |
public void setUp(FilterCriteria f) {
criteriaCondition = f.getCriteria();
criteriaAccountUid = f.getInteger("account.uid", -1);
}
| public void setUp(FilterCriteria f) {
criteriaCondition = f.getCriteria();
criteriaAccountUid = f.getIntegerWithDefault("account.uid", -1);
}
|
public boolean contributePropertyPages(PropertyPageManager mng,
IAdaptable element) {
PropertyPageNode node = new PropertyPageNode(this, element);
if(getCategory() == null){
mng.addToRoot(node);
return true;
}
mng.addTo(getCategory(),node);
... | public boolean contributePropertyPages(PropertyPageManager mng,
IAdaptable element) {
PropertyPageNode node = new PropertyPageNode(this, element);
if(getCategory() == null){
mng.addToRoot(node);
return true;
}
mng.addToDeep(getCategory(),node);
... |
public TypeReferencePattern(
char[] qualification,
char[] simpleName,
int matchMode,
boolean isCaseSensitive) {
super(matchMode, isCaseSensitive);
this.qualification = isCaseSensitive ? qualification : CharOperation.toLowerCase(qualification);
this.simpleName = isCaseSensitive ? simpleName : CharOperation.toL... | public TypeReferencePattern(
char[] qualification,
char[] simpleName,
int matchMode,
boolean isCaseSensitive) {
super(matchMode, isCaseSensitive);
this.qualification = isCaseSensitive ? qualification : CharOperation.toLowerCase(qualification);
this.simpleName = isCaseSensitive ? simpleName : CharOperation.toL... |
public DialogCustomize(Shell parentShell, String defaultConfigurationId, String defaultScopeId, SortedSet preferenceBindingSet)
throws IllegalArgumentException {
super(parentShell);
if (defaultConfigurationId == null || defaultScopeId == null || preferenceBindingSet == null)
throw new IllegalArgumentExcept... | public DialogCustomize(Shell parentShell, String defaultConfigurationId, String defaultScopeId, SortedSet preferenceBindingSet)
throws IllegalArgumentException {
super(parentShell);
if (defaultConfigurationId == null || defaultScopeId == null || preferenceBindingSet == null)
throw new IllegalArgumentExcept... |
public JUnit4TestAdapter(final Class<?> newTestClass,
JUnit4TestAdapterCache cache) {
fCache = cache;
fNewTestClass = newTestClass;
fRunner = Request.aClass(newTestClass).getRunner();
}
| public JUnit4TestAdapter(final Class<?> newTestClass,
JUnit4TestAdapterCache cache) {
fCache = cache;
fNewTestClass = newTestClass;
fRunner = Request.classWithoutSuiteMethod(newTestClass).getRunner();
}
|
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
receiverType = receiver.resolveType(scope);
if (receiverType == null){
constant = Not... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
receiverType = receiver.resolveType(scope);
if (receiverType == null){
constant = Not... |
public ImageIcon getCollapsedIcon() {
return remoteIcon;
}
} | public ImageIcon getIcon() {
return remoteIcon;
}
} |
public byte []
getOther() {
return other;
}
byte []
rrToWire(Compression c) throws IOException {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
alg.toWire(ds, null);
long time = timeSigned.getTime() / 1000;
short timeHigh = (short) (time >>... | public byte []
getOther() {
return other;
}
byte []
rrToWire(Compression c, int index) throws IOException {
ByteArrayOutputStream bs = new ByteArrayOutputStream();
CountedDataOutputStream ds = new CountedDataOutputStream(bs);
alg.toWire(ds, null);
long time = timeSigned.getTime() / 1000;
short timeHigh = (shor... |
protected boolean computeChildren(OpenableElementInfo info, Map newElements) throws JavaModelException {
ArrayList vChildren= new ArrayList();
final int JAVA = 0;
final int NON_JAVA = 1;
ZipFile jar= null;
try {
jar= getJar();
HashMap packageFragToTypes= new HashMap();
// always create the de... | protected boolean computeChildren(OpenableElementInfo info, Map newElements) throws JavaModelException {
ArrayList vChildren= new ArrayList();
final int JAVA = 0;
final int NON_JAVA = 1;
ZipFile jar= null;
try {
jar= getJar();
HashMap packageFragToTypes= new HashMap();
// always create the de... |
public void log(IStatus status) {
WorkbenchPlugin.getDefault().getLog().log(status);
}
});
// Get all debug options from Platform
if ("true".equalsIgnoreCase(Platform.getDebugOption("/debug"))) { //$NON-NLS-1$ //$NON-NLS-2$
Policy.DEBUG_DIALOG_NO_PARENT = "true".equalsIgnoreCase(Platform.getDebugOpt... | public void log(IStatus status) {
WorkbenchPlugin.getDefault().getLog().log(status);
}
});
// Get all debug options from Platform
if ("true".equalsIgnoreCase(Platform.getDebugOption("/debug"))) { //$NON-NLS-1$ //$NON-NLS-2$
Policy.DEBUG_DIALOG_NO_PARENT = "true".equalsIgnoreCase(Platform.getDebugOpt... |
public void bufferChanged(BufferChangedEvent event) {
if (event.getBuffer().isClosed()) {
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().remove(this);
getBufferManager().removeBuffer(event.getBuffer());
} else {
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers()... | public void bufferChanged(BufferChangedEvent event) {
if (event.getBuffer().isClosed()) {
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().remove(this);
getBufferManager().removeBuffer(event.getBuffer());
} else {
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers()... |
public String toString() {
return "Unresolved type " + ((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED");
}
| public String toString() {
return "Unresolved type "/*nonNLS*/ + ((compoundName != null) ? CharOperation.toString(compoundName) : "UNNAMED"/*nonNLS*/);
}
|
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
tagAsUnnecessaryCa... | public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
tagAsUnnecessaryCa... |
public int computeSeverity(int problemID){
switch (problemID) {
case IProblem.Task :
return ProblemSeverities.Warning;
case IProblem.VarargsConflict :
return ProblemSeverities.Warning;
case IProblem.TypeCollidesWithPackage :
return ProblemSeverities.Warning;
/*
* Javadoc tags resolved refere... | public int computeSeverity(int problemID){
switch (problemID) {
case IProblem.Task :
return ProblemSeverities.Warning;
case IProblem.VarargsConflict :
return ProblemSeverities.Warning;
case IProblem.TypeCollidesWithPackage :
return ProblemSeverities.Warning;
/*
* Javadoc tags resolved refere... |
public void update(Observable arg0, Object arg1) {
IDefaultItem item = new DefaultItem(element);
int style = item.getInteger("style", 0);
switch (style) {
case 0:
defaultMenuItem.setSelected(true);
break;
case 1:
customMenuItem.setSelected(true);
break;
case 2:
allMenuItem.setSelected(true);... | public void update(Observable arg0, Object arg1) {
IDefaultItem item = new DefaultItem(element);
int style = item.getIntegerWithDefault("style", 0);
switch (style) {
case 0:
defaultMenuItem.setSelected(true);
break;
case 1:
customMenuItem.setSelected(true);
break;
case 2:
allMenuItem.setSele... |
public void computeConstant() {
constant = Constant.NotAConstant;
}
| public void computeConstant() {
this.constant = Constant.NotAConstant;
}
|
private void printFailedAssumptions(Result result) {
printEvents("invalid assumption", "INVALID ASSUMPTION ", result.getFailedAssumptions());
}
| private void printFailedAssumptions(Result result) {
printEvents("invalid assumption", "INVALID ASSUMPTION ", result.getInvalidAssumptions());
}
|
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position;
// labels management
Label actionLabel = new Label(codeStream);
actionLabel.place();
breakLabel.codeStream = codeStream;
if (continueLabel != null) {
cont... | public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0) {
return;
}
int pc = codeStream.position;
// labels management
Label actionLabel = new Label(codeStream);
actionLabel.place();
breakLabel.codeStream = codeStream;
if (continueLabel != null) {
cont... |
public void execute(Worker worker) throws Exception {
Folder folder = (Folder) ( (FolderCommandReference) getReferences()[0] ).getFolder();
Object[] uids = ( (FolderCommandReference) getReferences()[0] ).getUids();
Message message = (Message) folder.getMessage(uids[0], worker);
ColumbaHeader header = (Col... | public void execute(Worker worker) throws Exception {
Folder folder = (Folder) ( (FolderCommandReference) getReferences()[0] ).getFolder();
Object[] uids = ( (FolderCommandReference) getReferences()[0] ).getUids();
Message message = new Message();
ColumbaHeader header = (ColumbaHeader) message.getHeader()... |
private void format() {
int token = 0;
int previousToken = 0;
int previousCompilableToken = 0;
int indentationOffset = 0;
int newLinesInWhitespace = 0;
// number of new lines in the previous whitespace token
// (used to leave blank lines before comments)
int pendingNewLines = 0;
boolean expectingOpenBrace = ... | private void format() {
int token = 0;
int previousToken = 0;
int previousCompilableToken = 0;
int indentationOffset = 0;
int newLinesInWhitespace = 0;
// number of new lines in the previous whitespace token
// (used to leave blank lines before comments)
int pendingNewLines = 0;
boolean expectingOpenBrace = ... |
public boolean doReturnTypesCollide(MethodBinding method, MethodBinding inheritedMethod) {
MethodBinding sub = computeSubstituteMethod(inheritedMethod, method);
return org.eclipse.jdt.core.compiler.CharOperation.equals(method.selector, sub.selector)
&& method.areParameterErasuresEqual(sub)
&& !areReturnTypesEqual... | public boolean doReturnTypesCollide(MethodBinding method, MethodBinding inheritedMethod) {
MethodBinding sub = computeSubstituteMethod(inheritedMethod, method);
return org.eclipse.jdt.core.compiler.CharOperation.equals(method.selector, sub.selector)
&& method.areParameterErasuresEqual(sub)
&& !areReturnTypesEqual... |
public JobErrorDialog(Shell parentShell, String title, String msg, ErrorInfo errorInfo, int displayMask) {
super(parentShell, title == null ? errorInfo.getJob().getName() : title, msg, errorInfo.getErrorStatus(), displayMask);
setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | getDefaultOrientation()); ... | public JobErrorDialog(Shell parentShell, String title, String msg, ErrorInfo errorInfo, int displayMask) {
super(parentShell, title == null ? errorInfo.getJob().getName() : title, msg, errorInfo.getErrorStatus(), displayMask);
setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE |getDefaultOrie... |
public void resolve(BlockScope scope) {
exceptionType = exception.resolveTypeExpecting(scope, scope.getJavaLangThrowable());
if (exceptionType == NullBinding
&& scope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3){
// if compliant with 1.4, this problem will not be reported
sco... | public void resolve(BlockScope scope) {
exceptionType = exception.resolveTypeExpecting(scope, scope.getJavaLangThrowable());
if (exceptionType == NullBinding
&& scope.environment().options.complianceLevel <= ClassFileConstants.JDK1_3){
// if compliant with 1.4, this problem will not be reported
sco... |
public TypeDeclaration updatedTypeDeclaration(){
/* update member types */
if (memberTypeCount > 0){
int existingCount = typeDeclaration.memberTypes == null ? 0 : typeDeclaration.memberTypes.length;
TypeDeclaration[] memberTypeDeclarations = new TypeDeclaration[existingCount + memberTypeCount];
if (existingCou... | public TypeDeclaration updatedTypeDeclaration(){
/* update member types */
if (memberTypeCount > 0){
int existingCount = typeDeclaration.memberTypes == null ? 0 : typeDeclaration.memberTypes.length;
TypeDeclaration[] memberTypeDeclarations = new TypeDeclaration[existingCount + memberTypeCount];
if (existingCou... |
private final byte
getCred(short section, boolean isAuth) {
if (section == Section.ANSWER) {
if (isAuth)
return Credibility.AUTH_ANSWER;
else
return Credibility.NONAUTH_ANSWER;
} else if (section == Section.AUTHORITY) {
if (isAuth)
return Credibility.AUTH_AUTHORITY;
else
return Credibility.NONAUTH... | private final byte
getCred(int section, boolean isAuth) {
if (section == Section.ANSWER) {
if (isAuth)
return Credibility.AUTH_ANSWER;
else
return Credibility.NONAUTH_ANSWER;
} else if (section == Section.AUTHORITY) {
if (isAuth)
return Credibility.AUTH_AUTHORITY;
else
return Credibility.NONAUTH_A... |
private int hashCode(Object[] element, int length) {
int hash = 0;
for (int i = 0; i < length; i++)
hash = Util.combineHashCodes(hash, element[i].hashCode());
return hash & 0x7FFFFFFF;
}
| private int hashCode(Object[] element, int length) {
int hash = 0;
for (int i = length-1; i >= 0; i--)
hash = Util.combineHashCodes(hash, element[i].hashCode());
return hash & 0x7FFFFFFF;
}
|
public void write(Writer writer,
Stack parseStateStack,
int column)
throws Exception
{
ParseState parseState = (ParseState)parseStateStack.peek();
MClass mClass = (MClass)
parseState.newClassifier((new Integer(number)).toString());
if(mClass == null) {
... | public void write(Writer writer,
Stack parseStateStack,
int column)
throws Exception
{
ParseState parseState = (ParseState)parseStateStack.peek();
MClass mClass = (MClass)
parseState.newClassifier((new Integer(number)).toString());
if(mClass == null) {
... |
public String toString(int tab) {
return tabString(tab) + "Recovered local variable:\n" + localDeclaration.toString(tab + 1); //$NON-NLS-1$
}
| public String toString(int tab) {
return tabString(tab) + "Recovered local variable:\n" + localDeclaration.print(tab + 1, new StringBuffer(10)); //$NON-NLS-1$
}
|
public Object run() throws Exception {
return loadClassInternal( lname, lresolve );
}
});
} catch( PrivilegedActionException pex ) {
Exception ex=pex.getException();
if( ex instanceof ClassNotFoundException )
throw (ClassNotFoundException)ex;
// unknown - better display it
ex.pr... | public Object run() throws Exception {
return loadClassInternal1( lname, lresolve );
}
});
} catch( PrivilegedActionException pex ) {
Exception ex=pex.getException();
if( ex instanceof ClassNotFoundException )
throw (ClassNotFoundException)ex;
// unknown - better display it
ex.p... |
public void acceptInterface(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
if ((acceptFlags & ACCEPT_INTERFACES) != 0)
if (enclosingTypeNames == null || enclosingTypeNames.length == 0) // accept only top level types
paths.add(path);
}
};
new Searc... | public void acceptInterface(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
if ((acceptFlags & ACCEPT_INTERFACES) != 0)
if (enclosingTypeNames == null || enclosingTypeNames.length == 0) // accept only top level types
paths.add(path);
}
};
new Searc... |
public ReferenceBinding getType(char[][] compoundName) {
ReferenceBinding referenceBinding;
if (compoundName.length == 1) {
if (defaultPackage == null)
return null;
if ((referenceBinding = defaultPackage.getType0(compoundName[0])) == null) {
PackageBinding packageBinding = getPackage0(compoundName[0]);
... | public ReferenceBinding getType(char[][] compoundName) {
ReferenceBinding referenceBinding;
if (compoundName.length == 1) {
if (defaultPackage == null)
return null;
if ((referenceBinding = defaultPackage.getType0(compoundName[0])) == null) {
PackageBinding packageBinding = getPackage0(compoundName[0]);
... |
public void charsetChanged(CharsetEvent e) {
//((ComposerModel)getModel()).setCharsetName(e.getValue());
}
| public void charsetChanged(CharsetEvent e) {
((ComposerModel)getModel()).setCharsetName(e.getValue());
}
|
public void resetTo(int begin, int end) {
//reset the scanner to a given position where it may rescan again
diet = false;
initialPosition = startPosition = currentPosition = begin;
eofPosition = end + 1;
commentPtr = -1; // reset comment stack
| public void resetTo(int begin, int end) {
//reset the scanner to a given position where it may rescan again
diet = false;
initialPosition = startPosition = currentPosition = begin;
eofPosition = end < Integer.MAX_VALUE ? end + 1 : end;
commentPtr = -1; // reset comment stack
|
public int getNodeType() {
return ENHANCED_FOR_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
EnhancedForStatement result = new EnhancedForStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeading... | public int getNodeType() {
return ENHANCED_FOR_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
EnhancedForStatement result = new EnhancedForStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadin... |
private TypeDeclaration convert(ISourceType sourceType, CompilationResult compilationResult) {
/* create type declaration - can be member type */
TypeDeclaration type = new TypeDeclaration(compilationResult);
if (sourceType.getEnclosingType() == null && sourceType instanceof SourceTypeElementInfo) {
IType typ... | private TypeDeclaration convert(ISourceType sourceType, CompilationResult compilationResult) {
/* create type declaration - can be member type */
TypeDeclaration type = new TypeDeclaration(compilationResult);
if (sourceType.getEnclosingType() == null && sourceType instanceof SourceTypeElementInfo) {
IType typ... |
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("CLOSE")) //$NON-NLS-1$
{
try {
Config.save();
} catch (Exception ex) {
ex.printStackTrace();
}
dialog.setVisible(false);
} else if (action.equals("ADD")) //$NON-NLS-1$
{
System.ou... | public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("CLOSE")) //$NON-NLS-1$
{
try {
Config.save();
} catch (Exception ex) {
ex.printStackTrace();
}
dialog.setVisible(false);
} else if (action.equals("ADD")) //$NON-NLS-1$
{
System.ou... |
protected void processAnnotations() {
int newUnitSize = 0;
int newClassFilesSize = 0;
int bottom = 0;
int top = this.unitsToProcess.length;
ReferenceBinding[] binaryTypeBindingsTemp = this.referenceBindings;
if (top == 0 && binaryTypeBindingsTemp == null) return;
this.referenceBindings = null;
do {
... | protected void processAnnotations() {
int newUnitSize = 0;
int newClassFilesSize = 0;
int bottom = 0;
int top = this.totalUnits;
ReferenceBinding[] binaryTypeBindingsTemp = this.referenceBindings;
if (top == 0 && binaryTypeBindingsTemp == null) return;
this.referenceBindings = null;
do {
// extract ... |
protected void createMenuEntries(JMenu menu, ListIterator it) {
boolean lastWasSeparator = false;
while (it.hasNext()) {
XmlElement next = (XmlElement) it.next();
String name = next.getName();
if (name.equals("menuitem")) {
if (next.getAttribute("action") != null) {
try {
BasicAction acti... | protected void createMenuEntries(JMenu menu, ListIterator it) {
boolean lastWasSeparator = false;
while (it.hasNext()) {
XmlElement next = (XmlElement) it.next();
String name = next.getName();
if (name.equals("menuitem")) {
if (next.getAttribute("action") != null) {
try {
BasicAction acti... |
public IStatus restoreState(
IMemento memento,
IPerspectiveDescriptor activeDescriptor) {
Assert.isNotNull(getShell());
MultiStatus result = new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, WorkbenchMessages.getString("WorkbenchWindow.problemsRestoringWindow"), null); //$NON-NLS-1$
// Read window's bounds... | public IStatus restoreState(
IMemento memento,
IPerspectiveDescriptor activeDescriptor) {
Assert.isNotNull(getShell());
MultiStatus result = new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, WorkbenchMessages.getString("WorkbenchWindow.problemsRestoringWindow"), null); //$NON-NLS-1$
// Read window's bounds... |
public void logAverage(long[] times, long lineCount) {
Arrays.sort(times);
final int length = times.length;
long sum = 0;
for (int i = 1, max = length - 1; i < max; i++) {
sum += times[i];
}
long time = sum / (length - 2);
this.printlnOut(Main.bind(
"compile.averageTime", //$NON-NLS-1$
... | public void logAverage(long[] times, long lineCount) {
Arrays.sort(times);
final int length = times.length;
long sum = 0;
for (int i = 1, max = length - 1; i < max; i++) {
sum += times[i];
}
long time = sum / (length - 2);
this.printlnOut(Main.bind(
"compile.averageTime", //$NON-NLS-1$
... |
public
void addAppender(Appender newAppender) {
if(aai == null) {
aai = new AppenderAttachableImpl();
}
aai.addAppender(newAppender);
repository.fireAddAppenderEvent(this, newAppender);
}
| public
void addAppender(Appender newAppender) {
if(aai == null) {
aai = new AppenderAttachableImpl();
}
aai.addAppender(newAppender);
repository.fireAddAppenderEvent((Logger)this, newAppender);
}
|
public TypeBinding resolveType(BlockScope scope) {
TypeBinding binding = super.resolveType(scope);
if (binding == null || !binding.isValidBinding())
throw new SelectionNodeFound();
else
throw new SelectionNodeFound(binding);
}
| public TypeBinding resolveType(BlockScope scope) {
TypeBinding binding = super.resolveType(scope);
if (binding == null || !binding.isValidBinding())
throw new SelectionNodeFound();
else
throw new SelectionNodeFound(this, binding);
}
|
NUM_STATES = 932,
/*******************************************************************************
* 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 License v1.0
* which accompanies th... | NUM_STATES = 932,
/*******************************************************************************
* 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 License v1.0
* which accompanies th... |
public Menu(FrameController frameController) {
super();
this.frameController = frameController;
menuGenerator =
new MenuBarGenerator(
frameController,
"org/columba/core/action/menu.xml");
menuGenerator.createMenuBar(this);
/*
XmlIO menuXml = new XmlIO();
menuXml.setURL(
DiskIO.getResourc... | public Menu(FrameController frameController) {
super();
this.frameController = frameController;
menuGenerator =
new MenuBarGenerator(
frameController,
"org/columba/core/action/menu.xml");
menuGenerator.createMenuBar(this);
/*
XmlIO menuXml = new XmlIO();
menuXml.setURL(
DiskIO.getResourc... |
private void createChild(MimePart child, MailFolderCommandReference ref)
throws PluginLoadingFailedException, Exception {
printAddress(child.getAddress());
printAddress(ref.getAddress());
MimeHeader parentHeader = child.getHeader();
if (parentHeader.getMimeType()
.equalsIgnoreCase("multipart/alter... | private void createChild(MimePart child, MailFolderCommandReference ref)
throws PluginLoadingFailedException, Exception {
printAddress(child.getAddress());
printAddress(ref.getAddress());
MimeHeader parentHeader = child.getHeader();
if (parentHeader.getMimeType()
.equalsIgnoreCase("multipart/alter... |
public void setName(SimpleName name) {
if (name == null) {
throw new IllegalArgumentException();
}
replaceChild(this.name, name, false);
this.name = name;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
int memSize() {
return BASE_NODE_SIZE + 3 * 4;
}
| public void setName(SimpleName name) {
if (name == null) {
throw new IllegalArgumentException();
}
replaceChild(this.name, name, false);
this.name = name;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
int memSize() {
return BASE_NAME_NODE_SIZE + 2 * 4;
}
|
// abstract private methods cannot occur nor abstract static............
}
if (isMethodUseDeprecated(binding, scope))
scope.problemReporter().deprecatedMethod(binding, this);
// from 1.5 compliance on, array#clone() returns the array type (but binding still shows Object)
if (actualReceiverType.isArrayType()
... | // abstract private methods cannot occur nor abstract static............
}
if (isMethodUseDeprecated(binding, scope, true))
scope.problemReporter().deprecatedMethod(binding, this);
// from 1.5 compliance on, array#clone() returns the array type (but binding still shows Object)
if (actualReceiverType.isArrayTyp... |
public void xtest2() throws Exception {
PatternLayout layout = new PatternLayout("%m\n");
RollingFileAppender rfa = new RollingFileAppender();
rfa.setName("ROLLING");
rfa.setLayout(layout);
FixedWindowRollingPolicy swrp = new FixedWindowRollingPolicy();
FilterBasedTriggeringPolicy fbtp = new ... | public void xtest2() throws Exception {
PatternLayout layout = new PatternLayout("%m\n");
RollingFileAppender rfa = new RollingFileAppender();
rfa.setName("ROLLING");
rfa.setLayout(layout);
FixedWindowRollingPolicy swrp = new FixedWindowRollingPolicy();
FilterBasedTriggeringPolicy fbtp = new ... |
public void test() {
IPluginManager manager = PluginManager.getInstance();
manager.initCorePlugins();
}
| public void test() {
IPluginManager manager = PluginManager.getInstance();
manager.initExternalPlugins();
}
|
public void setLeadingComment(String comment) {
if (comment != null) {
char[] source = comment.toCharArray();
IScanner scanner = ToolFactory.createScanner(true, true, false, false);
scanner.resetTo(0, source.length);
scanner.setSource(source);
try {
int token;
boolean onlyOneComment = false;
... | public void setLeadingComment(String comment) {
if (comment != null) {
char[] source = comment.toCharArray();
IScanner scanner = ToolFactory.createScanner(true, true, false, false, true);
scanner.resetTo(0, source.length);
scanner.setSource(source);
try {
int token;
boolean onlyOneComment = fa... |
public void addPages() {
super.addPages();
mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");//$NON-NLS-1$
mainPage.setTitle(ResourceMessages.getString("NewProject.title")); //$NON-NLS-1$
mainPage.setDescription(ResourceMessages.getString("NewProject.description")); //$NON-NLS-1$
this.addPage(ma... | public void addPages() {
super.addPages();
mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");//$NON-NLS-1$
mainPage.setTitle(ResourceMessages.getString("NewProject.title")); //$NON-NLS-1$
mainPage.setDescription(ResourceMessages.getString("NewProject.description")); //$NON-NLS-1$
this.addPage(ma... |
public void cleanUp() {
if (oos != null) {
try {
oos.close();
} catch (IOException e) {
LogLog.error("Could not close oos.", e);
}
oos = null;
}
if (connector != null) {
//LogLog.debug("Interrupting the connector.");
connector.interrupted = true;
... | public void cleanUp() {
if (oos != null) {
try {
oos.close();
} catch (IOException e) {
LogLog.error("Could not close oos.", e);
}
oos = null;
}
if (connector != null) {
//LogLog.debug("Interrupting the connector.");
connector.interrupted = true;
... |
package org.apache.log4j.helpers;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.APL file.
*/
package org.log4j.helpers... | package org.apache.log4j.helpers;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.APL file.
*/
package org.apache.log4j.... |
protected void initExistsSQL()
{
StringBuffer sql = new StringBuffer(300);
sql.append(SQLUtil.SELECT).append("COUNT(*)").append(SQLUtil.FROM)
.append(entity.getTableName())
.append(SQLUtil.WHERE);
SQLUtil.getWhereClause(entity.getPrimaryKeyFields(), sql);
existsSQL = sql.... | protected void initExistsSQL()
{
StringBuffer sql = new StringBuffer(300);
sql.append(SQLUtil.SELECT).append("COUNT(*)").append(SQLUtil.FROM)
.append(entity.getQualifiedTableName())
.append(SQLUtil.WHERE);
SQLUtil.getWhereClause(entity.getPrimaryKeyFields(), sql);
existsS... |
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// if reachable, request the addition of a synthetic field for caching the class descriptor
SourceTypeBinding sourceType = currentScope.outerMostClassScope().enclosingSourceType();
// see https://bugs.eclip... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// if reachable, request the addition of a synthetic field for caching the class descriptor
SourceTypeBinding sourceType = currentScope.outerMostClassScope().enclosingSourceType();
// see https://bugs.eclip... |
public void end() throws Exception
{
log().debug("(" + getState() + ") activity end()");
if(getState().equals(DBImport.STATE_DB_INSERTION))
{
Activity activity = new Activity();
String description = (String)digester.pop();
AttributeType attributeType =... | public void end() throws Exception
{
log().debug("(" + getState() + ") activity end()");
if(getState().equals(XMLImport.STATE_DB_INSERTION))
{
Activity activity = new Activity();
String description = (String)digester.pop();
AttributeType attributeType ... |
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 TypeBinding convertToRawType(TypeBinding type) {
int dimension;
TypeBinding originalType;
switch(type.kind()) {
case Binding.BASE_TYPE :
case Binding.TYPE_PARAMETER:
case Binding.WILDCARD_TYPE:
case Binding.RAW_TYPE:
return type;
case Binding.ARRAY_TYPE:
dimension = type.dimensions... | public TypeBinding convertToRawType(TypeBinding type) {
int dimension;
TypeBinding originalType;
switch(type.kind()) {
case Binding.BASE_TYPE :
case Binding.TYPE_PARAMETER:
case Binding.WILDCARD_TYPE:
case Binding.RAW_TYPE:
return type;
case Binding.ARRAY_TYPE:
dimension = type.dimensions... |
public final Object execute(final ExecutionEvent event) {
// check if the "Close editors automatically" preference is
// set
IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
if (store
.getBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)
|| ((TabBehavio... | public final Object execute(final ExecutionEvent event) {
// check if the "Close editors automatically" preference is
// set
IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore();
if (store
.getBoolean(IPreferenceConstants.REUSE_EDITORS_BOOLEAN)
|| ((TabBehavio... |
public boolean compare(LoggingEvent event) {
if(operator.isRegex()) {
boolean match = matcher.matches(event.getLoggerName(), rightSidePattern);
if(operator.getCode() == Operator.REGEX_MATCH) {
return match;
} else {
return !match;
}
}
int compResult = rightSide... | public boolean compare(LoggingEvent event) {
if(operator.isRegex()) {
boolean match = matcher.matches(event.getLoggerName(), rightSidePattern);
if(operator.getCode() == Operator.REGEX_MATCH) {
return match;
} else {
return !match;
}
}
int compResult = event.get... |
public Test getTest(String suiteClassName) {
if (suiteClassName.length() <= 0) {
clearStatus();
return null;
}
Class testClass= null;
try {
testClass= loadSuiteClass(suiteClassName);
} catch (ClassNotFoundException e) {
String clazz= e.getMessage();
if (clazz == null)
clazz= suiteClassName... | public Test getTest(String suiteClassName) {
if (suiteClassName.length() <= 0) {
clearStatus();
return null;
}
Class testClass= null;
try {
testClass= loadSuiteClass(suiteClassName);
} catch (ClassNotFoundException e) {
String clazz= e.getMessage();
if (clazz == null)
clazz= suiteClassName... |
protected String extractTypeNameFrom(String sourceLocation) {
for (int j = 0, k = sourceFolders.length; j < k; j++) {
String folderLocation = sourceFolders[j].getLocation().toString() + '/';
if (sourceLocation.startsWith(folderLocation))
return sourceLocation.substring(folderLocation.length(), sourceLocation.le... | protected String extractTypeNameFrom(String sourceLocation) {
for (int j = 0, k = sourceFolders.length; j < k; j++) {
String folderLocation = sourceFolders[j].getLocation().addTrailingSeparator().toString();
if (sourceLocation.startsWith(folderLocation))
return sourceLocation.substring(folderLocation.length(), ... |
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 void initURLs(Context context) {
ServletLoader loader=context.getServletLoader();
if( loader==null) return;
// Add "WEB-INF/classes"
String base = context.getDocBase();
File dir = new File(base + "/WEB-INF/classes");
// GS, Fix for the jar@lib directory problem.
// Thanks for Kevin J... | private void initURLs(Context context) {
ServletLoader loader=context.getServletLoader();
if( loader==null) return;
// Add "WEB-INF/classes"
String base = context.getDocBase();
File dir = new File(base + "/WEB-INF/classes");
// GS, Fix for the jar@lib directory problem.
// Thanks for Kevin J... |
import org.eclipse.ui.commands.ICommandRegistry;
/*******************************************************************************
* 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 Licen... | import org.eclipse.ui.commands.ICommandRegistry;
/*******************************************************************************
* 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 Licen... |
public interface GraphPortHooks 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 with... | public interface GraphPortHooks 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 with... |
private void makeActions() {
// The actions in jface do not have menu vs. enable, vs. disable vs. color
// There are actions in here being passed the workbench - problem
// Get services for notification.
IPartService partService = getWindow().getPartService();
WWinKeyBindingService keyBindingService =
... | private void makeActions() {
// The actions in jface do not have menu vs. enable, vs. disable vs. color
// There are actions in here being passed the workbench - problem
// Get services for notification.
IPartService partService = getWindow().getPartService();
WWinKeyBindingService keyBindingService =
... |
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = receiver.resolveType(scope);
if (this.receiverType == null)... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = receiver.resolveType(scope);
if (this.receiverType == null)... |
private String getKeySequenceString() {
final Command command = commandService
.getCommand(IWorkbenchCommandConstants.WINDOW_SHOWKEYASSIST);
final TriggerSequence[] keyBindings = bindingService
.getActiveBindingsFor(new ParameterizedCommand(command, null));
final int keyBindingsCount = keyBindings.length... | private String getKeySequenceString() {
final Command command = commandService
.getCommand(IWorkbenchCommandConstants.WINDOW_SHOW_KEY_ASSIST);
final TriggerSequence[] keyBindings = bindingService
.getActiveBindingsFor(new ParameterizedCommand(command, null));
final int keyBindingsCount = keyBindings.leng... |
public void actionPerformed (ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
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 (
... |
public void resolve(MethodScope methScope) {
// get method declaration
AbstractMethodDeclaration methDecl = methScope.referenceMethod();
boolean overriding = methDecl == null ? false : (methDecl.binding.modifiers & (AccImplementing | AccOverriding)) != 0;
// @see tags
int seeTagsLength = this.references ... | public void resolve(MethodScope methScope) {
// get method declaration
AbstractMethodDeclaration methDecl = methScope.referenceMethod();
boolean overriding = methDecl == null ? false : (methDecl.binding.modifiers & (AccImplementing | AccOverriding)) != 0;
// @see tags
int seeTagsLength = this.references ... |
public void close() {
tableController.saveColumnConfig();
super.close(); // this saves view settings and closes the view
}
| public void close() {
//tableController.saveColumnConfig();
super.close(); // this saves view settings and closes the view
}
|
public IJavaModelStatus verify() {
IJavaModelStatus status = super.verify();
if (!status.isOK()) {
return status;
}
IPackageFragmentRoot root = (IPackageFragmentRoot)getElementToProcess();
if (root == null || !root.exists()) {
return new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST,... | public IJavaModelStatus verify() {
IJavaModelStatus status = super.verify();
if (!status.isOK()) {
return status;
}
IPackageFragmentRoot root = (IPackageFragmentRoot)getElementToProcess();
if (root == null || !root.exists()) {
return new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST,... |
private boolean readActionDefinition(IConfigurationElement element) {
String description = element.getAttribute(ATTRIBUTE_DESCRIPTION);
String icon = element.getAttribute(ATTRIBUTE_ICON);
String id = element.getAttribute(ATTRIBUTE_ID);
if (id == null) {
logMissingAttribute(element, ATTRIBUTE_ID);
return... | private boolean readActionDefinition(IConfigurationElement element) {
String description = element.getAttribute(ATTRIBUTE_DESCRIPTION);
String icon = element.getAttribute(ATTRIBUTE_ICON);
String id = element.getAttribute(ATTRIBUTE_ID);
if (id == null) {
logMissingAttribute(element, ATTRIBUTE_ID);
return... |
public CompilationResult compilationResult() {
return this.compilationResult;
}
/**
* Bytecode generation for a method
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false; // reset wideMode to false
if (ignoreFur... | public CompilationResult compilationResult() {
return this.compilationResult;
}
/**
* Bytecode generation for a method
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false; // reset wideMode to false
if (ignoreFur... |
protected void executeOperation() throws JavaModelException {
try {
this.runnable.run(fMonitor);
} catch (CoreException ce) {
if (ce instanceof JavaModelException) {
throw (JavaModelException)ce;
} else {
if (ce.getStatus().getCode() == IResourceStatus.OPERATION_FAILED) {
Throwable e= ce.getS... | protected void executeOperation() throws JavaModelException {
try {
this.runnable.run(progressMonitor);
} catch (CoreException ce) {
if (ce instanceof JavaModelException) {
throw (JavaModelException)ce;
} else {
if (ce.getStatus().getCode() == IResourceStatus.OPERATION_FAILED) {
Throwable e= ... |
private Object lhsUnaryOperation(LHS lhs) throws EvalError
{
Interpreter.debug("lhsUnaryOperation");
Object prevalue, postvalue;
prevalue = lhs.getValue();
postvalue = unaryOperation(prevalue, kind);
Object retVal;
if ( postfix )
retVal = prevalue;
else
retVal = post... | private Object lhsUnaryOperation(LHS lhs) throws EvalError
{
if ( Interpreter.DEBUG ) Interpreter.debug("lhsUnaryOperation");
Object prevalue, postvalue;
prevalue = lhs.getValue();
postvalue = unaryOperation(prevalue, kind);
Object retVal;
if ( postfix )
retVal = prevalue... |
public void setActivityBindingDefinitions(List activityBindingDefinitions) {
activityBindingDefinitions =
Util.safeCopy(
activityBindingDefinitions,
IActivityBindingDefinition.class);
if (!activityBindingDefinitions
.equals(this.activityBindingDefinitions)) {
this.activityBindingDefinitions = act... | public void setActivityBindingDefinitions(List activityBindingDefinitions) {
activityBindingDefinitions =
Util.safeCopy(
activityBindingDefinitions,
IContextBindingDefinition.class);
if (!activityBindingDefinitions
.equals(this.activityBindingDefinitions)) {
this.activityBindingDefinitions = acti... |
public void reset() {
}
}
| public void cleanup() {
}
}
|
public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = manager.getIndex(this.containerPath, true, /*reuse index file*/ false /*create if none*/);
if... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = manager.getIndex(this.containerPath, true, /*reuse index file*/ false /*create if none*/);
if... |
public void showBusyForFamily(Object family) {
//ProgressManager.getInstance().addListenerToFamily(family,this);
}
| public void showBusyForFamily(Object family) {
ProgressManager.getInstance().addListenerToFamily(family,this);
}
|
public MemberTypeBinding(char[][] compoundName, ClassScope scope, SourceTypeBinding enclosingType) {
super(compoundName, scope, enclosingType);
this.tagBits |= MemberTypeMask;
}
| public MemberTypeBinding(char[][] compoundName, ClassScope scope, SourceTypeBinding enclosingType) {
super(compoundName, scope, enclosingType);
this.tagBits |= TagBits.MemberTypeMask;
}
|
protected void toStringInfo(int tab, StringBuffer buffer, Object info) {
buffer.append(tabString(tab));
if (info == null) {
String elementName = getElementName();
if (elementName.length() == 0) {
buffer.append("<anonymous #"); //$NON-NLS-1$
buffer.append(this.occurrenceCount);
buffer.append(">"); //$NON-... | protected void toStringInfo(int tab, StringBuffer buffer, Object info, boolean showResolvedInfo) {
buffer.append(tabString(tab));
if (info == null) {
String elementName = getElementName();
if (elementName.length() == 0) {
buffer.append("<anonymous #"); //$NON-NLS-1$
buffer.append(this.occurrenceCount);
b... |
private void processCompilationUnitResource(ICompilationUnit source, IPackageFragment dest) throws JavaModelException {
String newCUName = getNewNameFor(source);
String destName = (newCUName != null) ? newCUName : source.getElementName();
String newContent = updatedContent(source, dest, newCUName); // null if un... | private void processCompilationUnitResource(ICompilationUnit source, IPackageFragment dest) throws JavaModelException {
String newCUName = getNewNameFor(source);
String destName = (newCUName != null) ? newCUName : source.getElementName();
String newContent = updatedContent(source, dest, newCUName); // null if un... |
private int parseCheck(int stck[], int stack_top, int first_token, int buffer_position) {
int max_pos;
int indx;
int ct;
int act;
//
// Initialize pointer for temp_stack and initialize maximum
// position of state stack that is still useful.
//
act = stck[stack_top];
if (first_token > NT_OFFSET) {... | private int parseCheck(int stck[], int stack_top, int first_token, int buffer_position) {
int max_pos;
int indx;
int ct;
int act;
//
// Initialize pointer for temp_stack and initialize maximum
// position of state stack that is still useful.
//
act = stck[stack_top];
if (first_token > NT_OFFSET) {... |
public void addANewTab(String name, JComponent component, Icon icon) {
int selectedIndex = getSelectedIndex();
super.insertTab(name, icon, component, null, 0);
//only select the previously existing tab if there is more than one tab
if (getTabCount() > 1) {
setSelectedIndex(selectedIndex + 1);
}... | public void addANewTab(String name, JComponent component, Icon icon) {
int selectedIndex = getSelectedIndex();
super.insertTab(name, icon, component, null, 0);
//only select the previously existing tab if there is more than one tab
if (getTabCount() > 1) {
setSelectedIndex(Math.min(selectedIndex + ... |
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... |
public void widgetSelected(SelectionEvent e) {
stackPresentationSite.dragStart(display.getCursorLocation(),
true);
}
});
menuItem3.setEnabled(true);
}
| public void widgetSelected(SelectionEvent e) {
stackPresentationSite.dragStart(display.getCursorLocation(),
true);
}
});
menuItem3.setEnabled(stackPresentationSite.isMoveable(null));
}
|
public void actionPerformed(ActionEvent evt) {
// it is safe here to cast to AbstractMailFrameControlller
FolderCommandReference[] r = (FolderCommandReference[]) ((AbstractMailFrameController) frameMediator).getTreeSelection();
// only use the first selected folder
FolderTreeNode ... | public void actionPerformed(ActionEvent evt) {
// it is safe here to cast to AbstractMailFrameControlller
FolderCommandReference[] r = (FolderCommandReference[]) ((AbstractMailFrameController) frameMediator).getTreeSelection();
// only use the first selected folder
FolderTreeNode ... |
public void analyseCode(
ClassScope classScope,
InitializationFlowContext initializerFlowContext,
FlowInfo flowInfo) {
if (ignoreFurtherInvestigation)
return;
try {
ExceptionHandlingFlowContext constructorContext =
new ExceptionHandlingFlowContext(
initializerFlowContext.parent,
this,
... | public void analyseCode(
ClassScope classScope,
InitializationFlowContext initializerFlowContext,
FlowInfo flowInfo) {
if (ignoreFurtherInvestigation)
return;
try {
ExceptionHandlingFlowContext constructorContext =
new ExceptionHandlingFlowContext(
initializerFlowContext.parent,
this,
... |
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... |
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 MElement) ) return null;
if (_target instanceof FigNode)
modelObject = ((FigNode)_target).getOwner();
if (_target instanceof FigEdge)
mo... |
public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
this.tagBits |= TagBits.IsArrayType;
this.leafComponentType = type;
this.dimensions = dimensions;
this.environment = environment;
if (type instanceof UnresolvedReferenceBinding)
((UnresolvedReferenceBinding) type).addWrapper(t... | public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
this.tagBits |= TagBits.IsArrayType;
this.leafComponentType = type;
this.dimensions = dimensions;
this.environment = environment;
if (type instanceof UnresolvedReferenceBinding)
((UnresolvedReferenceBinding) type).addWrapper(t... |
public synchronized Index recreateIndex(IPath path) {
// only called to over write an existing cached index...
try {
Index index = (Index) this.indexes.get(path);
ReadWriteMonitor monitor = index.monitor;
// Path is already canonical
String indexPath = computeIndexName(path);
if (VERBOSE)
JobManager.ver... | public synchronized Index recreateIndex(IPath path) {
// only called to over write an existing cached index...
try {
Index index = (Index) this.indexes.get(path);
ReadWriteMonitor monitor = index == null ? null : index.monitor;
// Path is already canonical
String indexPath = computeIndexName(path);
if (VER... |
public int doComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel) {
assertValidSize(availablePerpendicular);
assertValidSize(availableParallel);
assertValidSize(preferredParallel);
// If one child is invisible, defer to the other chi... | public int doComputePreferredSize(boolean width, int availableParallel, int availablePerpendicular, int preferredParallel) {
assertValidSize(availablePerpendicular);
assertValidSize(availableParallel);
assertValidSize(preferredParallel);
// If one child is invisible, defer to the other chi... |
protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("workingCopy.commit"), 2); //$NON-NLS-1$
CompilationUnit workingCopy = (CompilationUnit)getCompilationUnit();
IFile resource = (IFile)workingCopy.getResource();
ICompilationUnit primary = workingCopy.getPrimary();
... | protected void executeOperation() throws JavaModelException {
try {
beginTask(Util.bind("workingCopy.commit"), 2); //$NON-NLS-1$
CompilationUnit workingCopy = (CompilationUnit)getCompilationUnit();
IFile resource = (IFile)workingCopy.getResource();
ICompilationUnit primary = workingCopy.getPrimary();
... |
public PropPanelSubmachineState() {
// TODO: get the submachine state it's own icon
super("Submachine State", _compositeStateIcon, ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"), nameField);
addField(Argo.localize("UMLMenu", "label.stereotype"... | public PropPanelSubmachineState() {
// TODO: get the submachine state it's own icon
super("Submachine State", _compositeStateIcon, ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"), nameField);
addField(Argo.localize("UMLMenu", "label.stereotype"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.