buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public boolean getEnabled() {
return getBoolean("enabled");
}
| public boolean getEnabled() {
return getBoolean("enabled", true);
}
|
public void end(ExecutionContext ec, String tagName) {
getLogger().debug("entering end method");
// pop the action data object pushed in isApplicable() method call
// we assume that each this begin
ActionData actionData = (ActionData) actionDataStack.pop();
if (actionData.inError) {
return... | public void end(ExecutionContext ec, String tagName) {
getLogger().debug("entering end method");
// pop the action data object pushed in isApplicable() method call
// we assume that each this begin
ActionData actionData = (ActionData) actionDataStack.pop();
if (actionData.inError) {
return... |
public IJavaModelStatus verify() {
IJavaModelStatus status = super.verify();
if (!status.isOK()) {
return status;
}
if (needValidation) {
// retrieve classpath
IClasspathEntry[] entries = this.newRawPath;
if (entries == ReuseClasspath){
try {
entries = project.getRawClasspath();
... | public IJavaModelStatus verify() {
IJavaModelStatus status = super.verify();
if (!status.isOK()) {
return status;
}
if (needValidation) {
// retrieve classpath
IClasspathEntry[] entries = this.newRawPath;
if (entries == ReuseClasspath){
try {
entries = project.getRawClasspath();
... |
public AdditionalTypeCollection(char[][] additionalTypeNames, char[][][] qualifiedReferences, char[][] simpleNameReferences) {
super(qualifiedReferences, simpleNameReferences);
this.additionalTypeNames = internSimpleNames(additionalTypeNames, false);
}
| public AdditionalTypeCollection(char[][] additionalTypeNames, char[][][] qualifiedReferences, char[][] simpleNameReferences) {
super(qualifiedReferences, simpleNameReferences);
this.additionalTypeNames = additionalTypeNames; // do not bother interning member type names (ie. 'A$M')
}
|
protected String getErrorDialogTitle() {
return WorkbenchMessages.getString("WizardExportPage.errorDialogTitle");
}
| protected String getErrorDialogTitle() {
return WorkbenchMessages.getString("WizardExportPage.errorDialogTitle"); //$NON-NLS-1$
}
|
private void connectMemberTypes() {
SourceTypeBinding sourceType = referenceContext.binding;
ReferenceBinding[] memberTypes = sourceType.memberTypes;
if (memberTypes != null && memberTypes != NoMemberTypes) {
for (int i = 0, size = memberTypes.length; i < size; i++)
((SourceTypeBinding) memberTypes[i]).s... | private void connectMemberTypes() {
SourceTypeBinding sourceType = referenceContext.binding;
ReferenceBinding[] memberTypes = sourceType.memberTypes;
if (memberTypes != null && memberTypes != NoMemberTypes) {
for (int i = 0, size = memberTypes.length; i < size; i++)
((SourceTypeBinding) memberTypes[i]).s... |
extends org.tigris.scarab.om.BaseModificationPeer
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Village classes
import com.workingdogs.village.*;
// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache.tur... | extends org.tigris.scarab.om.BaseModificationPeer
package org.tigris.scarab.om;
// JDK classes
import java.util.*;
// Village classes
import com.workingdogs.village.*;
// Turbine classes
import org.apache.turbine.om.peer.*;
import org.apache.turbine.util.*;
import org.apache.turbine.util.db.*;
import org.apache.tur... |
public void setProperties(Properties properties, String prefix) {
int len = prefix.length();
for (Enumeration e = properties.propertyNames(); e.hasMoreElements();) {
String key = (String) e.nextElement();
// handle only properties that start with the desired frefix.
if (key.startsWith(pref... | public void setProperties(Properties properties, String prefix) {
int len = prefix.length();
for (Enumeration e = properties.propertyNames(); e.hasMoreElements();) {
String key = (String) e.nextElement();
// handle only properties that start with the desired frefix.
if (key.startsWith(pref... |
public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Editor ce = org.tigris.gef.base.Globals.curEditor();
Vector sels = ce.getSelectionManager().getFigs();
java.util.Enumeration enum = sels.elements();
Vector classes = new Vector();
while (enum.hasMoreElements()) {
... | public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.getInstance();
Editor ce = org.tigris.gef.base.Globals.curEditor();
Vector sels = ce.getSelectionManager().getFigs();
java.util.Enumeration enum = sels.elements();
Vector classes = new Vector();
while (enum.hasMoreElements()) {
... |
public
static
Priority toLevel(String sArg, Priority defaultValue) {
if(sArg == null) {
return defaultValue;
}
String stringVal = sArg.toUpperCase();
if(stringVal.equals(TRACE_STR)) {
return XLevel.TRACE;
} else if(stringVal.equals(LETHAL_STR)) {
return XLevel.LETHAL;
... | public
static
Priority toLevel(String sArg, Priority defaultValue) {
if(sArg == null) {
return defaultValue;
}
String stringVal = sArg.toUpperCase();
if(stringVal.equals(TRACE_STR)) {
return XLevel.TRACE;
} else if(stringVal.equals(LETHAL_STR)) {
return XLevel.LETHAL;
... |
public String toString(int tab) {
String s = tabString(tab);
s += "<CompleteOnFieldName:"; //$NON-NLS-1$
if (type != null) s += type.toString() + " "; //$NON-NLS-1$
s += new String(name);
if (initialization != null) s += " = " + initialization.toStringExpression();
s += ">"; //$NON-NLS-1$
return s;
}
| public String toString(int tab) {
String s = tabString(tab);
s += "<CompleteOnFieldName:"; //$NON-NLS-1$
if (type != null) s += type.toString() + " "; //$NON-NLS-1$
s += new String(name);
if (initialization != null) s += " = " + initialization.toStringExpression(); //$NON-NLS-1$
s += ">"; //$NON-NLS-1$
r... |
public boolean handles(IPerspectiveDescriptor perspective,
WorkbenchPage workbenchPage) {
return this.perspective == perspective
&& this.workbenchPage == workbenchPage;
}
| public boolean handles(IPerspectiveDescriptor perspective,
IWorkbenchPage workbenchPage) {
return this.perspective == perspective
&& this.workbenchPage == workbenchPage;
}
|
protected CompilationUnitDeclaration buildBindings(ICompilationUnit compilationUnit, boolean isTopLevelOrMember) throws JavaModelException {
final IFile file = (IFile) compilationUnit.getResource();
final String fileName = file.getFullPath().lastSegment();
final char[] mainTypeName = fileName.substring(0, fileName.l... | protected CompilationUnitDeclaration buildBindings(ICompilationUnit compilationUnit, boolean isTopLevelOrMember) throws JavaModelException {
final IFile file = (IFile) compilationUnit.getResource();
final String fileName = file.getFullPath().lastSegment();
final char[] mainTypeName = Util.getNameWithoutJavaLikeExten... |
public static String[] getColumns() {
String[] userDefined=
CachedHeaderfields.getUserDefinedHeaderfieldArray();
String[] stringList= new String[userDefined.length + COLUMNS.length];
int index= 0;
for (int i= 0; i < COLUMNS.length; i++) {
stringList[i]= COLUMNS[i];
index= i;
}
index++;
for ... | public static String[] getColumns() {
String[] userDefined=
CachedHeaderfields.getUserDefinedHeaderfields();
String[] stringList= new String[userDefined.length + COLUMNS.length];
int index= 0;
for (int i= 0; i < COLUMNS.length; i++) {
stringList[i]= COLUMNS[i];
index= i;
}
index++;
for (int... |
public void
setOpcode(int value) {
if (value < 0 || value > 0xF)
throw new IllegalArgumentException("DNS Opcode " + value +
"is out of range");
flags &= ~0x87FF;
flags |= (value << 11);
}
| public void
setOpcode(int value) {
if (value < 0 || value > 0xF)
throw new IllegalArgumentException("DNS Opcode " + value +
"is out of range");
flags &= 0x87FF;
flags |= (value << 11);
}
|
private IAction getAction(String id) {
// Keep a cache, rather than creating a new action each time,
// so that image caching in ActionContributionItem works.
IAction action = (IAction) actions.get(id);
if (action == null) {
WorkbenchWizardElement element = reader.findWizard(id);
if (element != null) {
... | private IAction getAction(String id) {
// Keep a cache, rather than creating a new action each time,
// so that image caching in ActionContributionItem works.
IAction action = (IAction) actions.get(id);
if (action == null) {
WorkbenchWizardElement element = reader.findWizard(id);
if (element != null) {
... |
public SaveAllAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("SaveAll.text"), window); //$NON-NLS-1$
setToolTipText(WorkbenchMessages.getString("SaveAll.toolTip")); //$NON-NLS-1$
setId("saveAll"); //$NON-NLS-1$
setEnabled(false);
WorkbenchHelp.setHelp(thi... | public SaveAllAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("SaveAll.text"), window); //$NON-NLS-1$
setToolTipText(WorkbenchMessages.getString("SaveAll.toolTip")); //$NON-NLS-1$
setId("saveAll"); //$NON-NLS-1$
setEnabled(false);
WorkbenchHelp.setHelp(thi... |
public boolean isMoveable(IPresentablePart part) {
return isCloseable(part);
}
};
| public boolean isMoveable(IPresentablePart part) {
return true;
}
};
|
public Object getValueAt(int row, int col) {
AdapterNode contact;
contact = (AdapterNode) groupList.get(row);
if (contact == null) {
return "";
}
AdapterNode child = null;
String str = new String("");
if (contact.getName().equals("contact")) {
... | public Object getValueAt(int row, int col) {
AdapterNode contact;
contact = (AdapterNode) groupList.get(row);
if (contact == null) {
return "";
}
AdapterNode child = null;
String str = "";
if (contact.getName().equals("contact")) {
... |
private final void
addAdditional(Message response, int flags) {
addAdditional2(response, Section.ANSWER, flags);
addAdditional2(response, Section.AUTHORITY, flags);
}
byte
addAnswer(Message response, Name name, short type, short dclass,
int iterations, int flags)
{
SetResponse sr;
byte rcode = Rcode.NOERROR;
... | private final void
addAdditional(Message response, int flags) {
addAdditional2(response, Section.ANSWER, flags);
addAdditional2(response, Section.AUTHORITY, flags);
}
byte
addAnswer(Message response, Name name, short type, short dclass,
int iterations, int flags)
{
SetResponse sr;
byte rcode = Rcode.NOERROR;
... |
public BlockJUnit4ClassRunner(Class<?> klass) throws InitializationError {
super(new TestClass(klass));
fTestMethods= computeTestMethods();
validate();
}
| public BlockJUnit4ClassRunner(Class<?> klass) throws InitializationError {
super(klass);
fTestMethods= computeTestMethods();
validate();
}
|
public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
TypeBinding methodType =
(methodScope.referenceContext instanceof AbstractMethodDeclaration)
? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
? ... | public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
TypeBinding methodType =
(methodScope.referenceContext instanceof AbstractMethodDeclaration)
? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
? ... |
public void widgetDisposed(DisposeEvent event) {
JFaceResources.getFontRegistry().removeListener(fontListener);
}
});
Label messageLabel = new Label(messageComposite,SWT.NONE);
messageLabel.setText(APPLY_MESSAGE);
messageLabel.setFont(font);
Label spacer = new Label(composite, SWT.NONE);
Group colorCo... | public void widgetDisposed(DisposeEvent event) {
JFaceResources.getFontRegistry().removeListener(fontListener);
}
});
Label messageLabel = new Label(messageComposite,SWT.NONE);
messageLabel.setText(APPLY_MESSAGE);
messageLabel.setFont(font);
new Label(composite, SWT.NONE);
Group colorComposite = new G... |
public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
// only at the -end- like new int [4][][]. The parser allows new int[][4][]
// so this must be checked here......(this comes fro... | public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
// only at the -end- like new int [4][][]. The parser allows new int[][4][]
// so this must be checked here......(this comes fro... |
public void testAssertEqualsNull() {
assertEquals(null, null);
}
| public void testAssertEqualsNull() {
assertEquals((Object) null, (Object) null);
}
|
public void sendEmail( TemplateContext context, Issue issue,
String subject, String template )
throws Exception
{
TemplateEmail te = new TemplateEmail();
if ( context == null )
{
context = new DefaultTemplateContext();
}
... | public void sendEmail( TemplateContext context, Issue issue,
String subject, String template )
throws Exception
{
TemplateEmail te = new TemplateEmail();
if ( context == null )
{
context = new DefaultTemplateContext();
}
... |
public AbstractElement[] getElements() {
if (cachedElements == null) {
IWizardCategory rootCategory = WorkbenchPlugin.getDefault()
.getNewWizardRegistry().getRootCategory();
List result = new ArrayList();
collectWizards(rootCategory, result);
IWizardDescriptor[] wizards = (IWizardDescriptor[]) resul... | public AbstractElement[] getElements() {
if (cachedElements == null) {
IWizardCategory rootCategory = WorkbenchPlugin.getDefault()
.getNewWizardRegistry().getRootCategory();
List result = new ArrayList();
collectWizards(rootCategory, result);
IWizardDescriptor[] wizards = (IWizardDescriptor[]) resul... |
public SystemMenuMinimize(IStackPresentationSite site) {
super(site, WorkbenchMessages.getString("ViewPane.minimizeView"), //$NON-NLS-1$
IStackPresentationSite.STATE_MINIMIZED);
}
| public SystemMenuMinimize(IStackPresentationSite site) {
super(site, WorkbenchMessages.ViewPane_minimizeView,
IStackPresentationSite.STATE_MINIMIZED);
}
|
protected ActionForward execute(Exception ex,
ExceptionConfig ae,
ActionMapping mapping,
ActionForm formInstance,
HttpServletRequest request,
... | protected ActionForward execute(Exception ex,
ExceptionConfig ae,
ActionMapping mapping,
ActionForm formInstance,
HttpServletRequest request,
... |
public void delete( ScarabUser user )
throws Exception
{
Module module = getModule();
if (user.hasPermission(ScarabSecurity.MODULE__CONFIGURE, module))
{
// Delete attribute groups first
List attGroups = module.getAttributeGroups(getIssue... | public void delete( ScarabUser user )
throws Exception
{
Module module = getModule();
if (user.hasPermission(ScarabSecurity.MODULE__CONFIGURE, module))
{
// Delete attribute groups first
List attGroups = module.getAttributeGroups(getIssue... |
public void readNextRequest(Request req) throws IOException {
String dummy,token1,token2;
int marker;
int signal;
try {
boolean more=true;
while (more) {
marker = ajpin.read();
switch (marker) {
case 0: //NOP marker useful for testing if stream is OK
break;
case 1: /... | public void readNextRequest(Request req) throws IOException {
String dummy,token1,token2;
int marker;
int signal;
try {
boolean more=true;
while (more) {
marker = ajpin.read();
switch (marker) {
case 0: //NOP marker useful for testing if stream is OK
break;
case 1: /... |
protected void finalizeConverter(char c) {
PatternConverter pc = null;
String converterId = extractConverter(c);
//System.out.println("converter ID[" + converterId + "]");
//System.out.println("c is [" + c + "]");
String className = (String) findConverterClass(converterId);
//System.out.pri... | protected void finalizeConverter(char c) {
PatternConverter pc = null;
String converterId = extractConverter(c);
//System.out.println("converter ID[" + converterId + "]");
//System.out.println("c is [" + c + "]");
String className = (String) findConverterClass(converterId);
//System.out.pri... |
public static boolean isUnique(String name, Integer id)
throws Exception
{
boolean unique = true;
Criteria crit = new Criteria().add(IssueTypePeer.NAME, name.trim());
crit.setIgnoreCase(true);
List types = IssueTypePeer.doSelect(crit);
if (types.size() > 0)
... | public static boolean isUnique(String name, Integer id)
throws Exception
{
boolean unique = true;
Criteria crit = new Criteria().add(IssueTypePeer.NAME, name.trim());
crit.setIgnoreCase(true);
List types = IssueTypePeer.doSelect(crit);
if (types.size() > 0)
... |
public void updateDefinedCommandIds() {
if (registryReader == null)
registryReader = new RegistryReader(Platform.getPluginRegistry());
registryReader.load();
SortedMap commandElementsById = CommandElement.sortedMapById(registryReader.getCommandElements());
SortedSet commandElementAdditions = new TreeSe... | public void updateDefinedCommandIds() {
if (registryReader == null)
registryReader = new RegistryReader(Platform.getPluginRegistry());
registryReader.load();
SortedMap commandElementsById = CommandElement.sortedMapById(registryReader.getCommandElements());
SortedSet commandElementAdditions = new TreeSe... |
public int getNodeType() {
return SIMPLE_NAME;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
SimpleName result = new SimpleName(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setIdentifier(getIdentifier());
return r... | public int getNodeType() {
return SIMPLE_NAME;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
SimpleName result = new SimpleName(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setIdentifier(getIdentifier());
return ... |
public static void
main(String argv[]) throws IOException {
String server;
int arg;
dnsMessage query = new dnsMessage();
dnsRecord rec;
dnsResolver res = null;
query.getHeader().setFlag(dns.RD);
query.getHeader().setOpcode(dns.QUERY);
if (argv.length < 1) {
usage();
}
try {
arg = 0;
if (argv[arg].sta... | public static void
main(String argv[]) throws IOException {
String server;
int arg;
dnsMessage query = new dnsMessage();
dnsRecord rec;
dnsResolver res = null;
query.getHeader().setFlag(dns.RD);
query.getHeader().setOpcode(dns.QUERY);
if (argv.length < 1) {
usage();
}
try {
arg = 0;
if (argv[arg].sta... |
public ITypeBinding resolveTypeBinding() {
return getAST().getBindingResolver().resolveExpressionType(this);
}
| public ITypeBinding resolveTypeBinding() {
return this.ast.getBindingResolver().resolveExpressionType(this);
}
|
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
if (binding.canBeSeenBy(receiverType, this, currentScope)) {
// generate receiver/enclosing instance access
boolean isStatic = binding.isStatic();
// outer access ?
if (!isStat... | public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
boolean valueRequired) {
int pc = codeStream.position;
if (binding.canBeSeenBy(receiverType, this, currentScope)) {
// generate receiver/enclosing instance access
boolean isStatic = binding.isStatic();
// outer access ?
if (!isStat... |
private void format(ImportReference importRef, boolean isLast) {
this.scribe.printNextToken(TerminalTokens.TokenNameimport);
this.preferences.number_of_empty_lines_to_preserve = this.preferences.blank_lines_between_import_groups;
this.scribe.space();
if (importRef.isStatic()) {
this.scribe.printNextToken(Te... | private void format(ImportReference importRef, boolean isLast) {
this.scribe.printNextToken(TerminalTokens.TokenNameimport);
this.preferences.number_of_empty_lines_to_preserve = this.preferences.blank_lines_between_import_groups;
this.scribe.space();
if (importRef.isStatic()) {
this.scribe.printNextToken(Te... |
public SelectLineRange(View view)
{
super(view,jEdit.getProperty("selectlinerange.title"),true);
this.view = view;
JPanel content = new JPanel(new BorderLayout());
content.setBorder(new EmptyBorder(12,12,12,0));
setContentPane(content);
JLabel label = new JLabel(jEdit.getProperty(
"selectlinerange.ca... | public SelectLineRange(View view)
{
super(view,jEdit.getProperty("selectlinerange.title"),true);
this.view = view;
JPanel content = new JPanel(new BorderLayout());
content.setBorder(new EmptyBorder(12,12,12,0));
setContentPane(content);
JLabel label = new JLabel(jEdit.getProperty(
"selectlinerange.ca... |
public IJavaElement getPrimaryElement(boolean checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (checkOwner && cu.owner == DefaultWorkingCopyOwner.PRIMARY) return this;
return cu.getPackageDeclaration(fName);
}
| public IJavaElement getPrimaryElement(boolean checkOwner) {
CompilationUnit cu = (CompilationUnit)getAncestor(COMPILATION_UNIT);
if (checkOwner && cu.isPrimary()) return this;
return cu.getPackageDeclaration(fName);
}
|
public void manageSyntheticAccessIfNecessary(
BlockScope currentScope,
FieldBinding fieldBinding,
TypeBinding lastReceiverType,
int index,
FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if the binding declaring class is not visible, need special action
// for runtime compatibility on 1... | public void manageSyntheticAccessIfNecessary(
BlockScope currentScope,
FieldBinding fieldBinding,
TypeBinding lastReceiverType,
int index,
FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if the binding declaring class is not visible, need special action
// for runtime compatibility on 1... |
protected void addCompilationUnit(
ICompilationUnit sourceUnit,
CompilationUnitDeclaration parsedUnit) {
// append the unit to the list of ones to process later on
int size = this.unitsToProcess.length;
if (this.totalUnits == size) {
// when growing reposition units starting at position 0
int newSize ... | protected void addCompilationUnit(
ICompilationUnit sourceUnit,
CompilationUnitDeclaration parsedUnit) {
// append the unit to the list of ones to process later on
int size = this.unitsToProcess.length;
if (this.totalUnits == size) {
// when growing reposition units starting at position 0
int newSize ... |
public
CERTRecord(Name _name, short _dclass, int _ttl, int _certType,
int _keyTag, int _alg, byte [] _cert)
{
super(_name, Type.CERT, _dclass, _ttl);
certType = (short) _certType;
keyTag = (short) _keyTag;
alg = (byte) _alg;
cert = _cert;
}
CERTRecord(Name _name, short _dclass, int _ttl, int length,
D... | public
CERTRecord(Name _name, short _dclass, int _ttl, int _certType,
int _keyTag, int _alg, byte [] _cert)
{
super(_name, Type.CERT, _dclass, _ttl);
certType = (short) _certType;
keyTag = (short) _keyTag;
alg = (byte) _alg;
cert = _cert;
}
CERTRecord(Name _name, short _dclass, int _ttl, int length,
D... |
public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = this.type.resolveType(scope, true /* check bounds*/);
checkModifiers();
if (variableType != null) {
if (variableType == TypeBinding.VOID) {
scope.problemReporter().variableTypeCannotBeVoid(th... | public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = this.type.resolveType(scope, true /* check bounds*/);
checkModifiers();
if (variableType != null) {
if (variableType == TypeBinding.VOID) {
scope.problemReporter().variableTypeCannotBeVoid(th... |
private boolean hasPropertyPagesFor(Object object) {
return PropertyPageContributorManager.getManager().hasContributorsFor(object);
}
| private boolean hasPropertyPagesFor(Object object) {
return PropertyPageContributorManager.getManager().getApplicableContributors(object).size() != 0;
}
|
public double
getVPrecision() {
return (double)vPrecision / 100;
}
void
rrToWire(DataByteOutputStream out, Compression c) throws IOException {
if (latitude == 0 && longitude == 0 && altitude == 0)
return;
out.writeByte(0); /* version */
out.writeByte(toLOCformat(size));
out.writeByte(toLOCformat(hPrec... | public double
getVPrecision() {
return (double)vPrecision / 100;
}
void
rrToWire(DataByteOutputStream out, Compression c) {
if (latitude == 0 && longitude == 0 && altitude == 0)
return;
out.writeByte(0); /* version */
out.writeByte(toLOCformat(size));
out.writeByte(toLOCformat(hPrecision));
out.write... |
public static int MaxStructurallyChangedTypes = 100; // keep track of ? structurally changed types, otherwise consider all to be changed
static final byte VERSION = 0x0012; // added timestamps to external jars
| public static int MaxStructurallyChangedTypes = 100; // keep track of ? structurally changed types, otherwise consider all to be changed
static final byte VERSION = 0x0013; // added timestamps to external jars
|
public void open(URL url) {
try {
Desktop.browse(url);
} catch (DesktopException e) {
JOptionPane.showMessageDialog(null, GlobalResourceLoader
.getString("dialog", "error", "no_browser"), "Error",
JOptionPane.ERROR_MESSAGE);
}
}
| public void open(URL url) {
try {
Desktop.browse(url);
} catch (DesktopException e) {
JOptionPane.showMessageDialog(null, GlobalResourceLoader
.getString("org.columba.core.i18n.dialog", "error", "no_browser"), "Error",
JOptionPane.ERROR_MESSAGE);
}
}
|
protected void executeOperation() throws JavaModelException {
JavaElementDelta delta = null;
IPackageFragmentRoot root = (IPackageFragmentRoot) getParentElement();
String[] names = Signature.getSimpleNames(fName);
beginTask(Util.bind("operation.createPackageFragmentProgress"), names.length); //$NON-NLS-1$
IContain... | protected void executeOperation() throws JavaModelException {
JavaElementDelta delta = null;
IPackageFragmentRoot root = (IPackageFragmentRoot) getParentElement();
String[] names = Signature.getSimpleNames(fName);
beginTask(Util.bind("operation.createPackageFragmentProgress"), names.length); //$NON-NLS-1$
IContain... |
public void analyseCode(
ClassScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// starting of the code analysis for methods
if (ignoreFurtherInvestigation)
return;
try {
if (binding == null)
return;
// may be in a non necessary <clinit> for innerclass with static final consta... | public void analyseCode(
ClassScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// starting of the code analysis for methods
if (ignoreFurtherInvestigation)
return;
try {
if (binding == null)
return;
// may be in a non necessary <clinit> for innerclass with static final consta... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
QualifiedType(AST ast) {
super(ast);
unsupportedIn2();
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
re... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
QualifiedType(AST ast) {
super(ast);
unsupportedIn2();
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
re... |
private String returnConstantClassName(IConstantPoolEntry constantClass) {
char[] classInfoName = constantClass.getClassInfoName();
if (classInfoName.length == 0) {
return EMPTY_CLASS_NAME;
} else if ((mode & ClassFileBytesDisassembler.COMPACT) != 0) {
int lastIndexOfSlash = CharOperation.lastIndexOf('/', ... | private String returnConstantClassName(IConstantPoolEntry constantClass) {
char[] classInfoName = constantClass.getClassInfoName();
if (classInfoName.length == 0) {
return EMPTY_CLASS_NAME;
} else if (isCompact()) {
int lastIndexOfSlash = CharOperation.lastIndexOf('/', classInfoName);
if (lastIndexOfSla... |
private JobTreeElement[] findJobsToRemove(JobTreeElement info) {
if (info.isJobInfo()) {
Job myJob= null;
if (info instanceof JobInfo)
myJob= ((JobInfo)info).getJob();
else if (info instanceof SubTaskInfo) {
JobInfo parent= (JobInfo) ((SubTaskInfo)info).getParent();
... | private JobTreeElement[] findJobsToRemove(JobTreeElement info) {
if (info.isJobInfo()) {
Job myJob= null;
if (info instanceof JobInfo)
myJob= ((JobInfo)info).getJob();
else if (info instanceof SubTaskInfo) {
JobInfo parent= (JobInfo) ((SubTaskInfo)info).getParent();
... |
public StringBuffer printBody(int indent, StringBuffer output) {
if (this.statements == null) return output;
for (int i = 0; i < statements.length; i++) {
statements[i].printStatement(indent + 1, output);
output.append('\n');
};
return output;
}
| public StringBuffer printBody(int indent, StringBuffer output) {
if (this.statements == null) return output;
for (int i = 0; i < statements.length; i++) {
statements[i].printStatement(indent + 1, output);
output.append('\n');
}
return output;
}
|
private void setPerspective(Perspective newPersp) {
// Don't do anything if already active layout
Perspective oldPersp = getActivePerspective();
if (oldPersp == newPersp)
return;
if (newPersp != null) {
IStatus status = newPersp.restoreState();
if (status.getSeverity() != IStatus.OK) {
String tit... | private void setPerspective(Perspective newPersp) {
// Don't do anything if already active layout
Perspective oldPersp = getActivePerspective();
if (oldPersp == newPersp)
return;
if (newPersp != null) {
IStatus status = newPersp.restoreState();
if (status.getSeverity() != IStatus.OK) {
String tit... |
public int match(TypeDeclaration node, MatchingNodeSet nodeSet) {
if (this.pattern.simpleName == null || matchesName(this.pattern.simpleName, node.name))
return nodeSet.addMatch(node, ((InternalSearchPattern)this.pattern).mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH);
return IMPOSSIBLE_MATCH;
}
| public int match(TypeDeclaration node, MatchingNodeSet nodeSet) {
if (this.pattern.simpleName == null || matchesName(this.pattern.simpleName, node.name))
return nodeSet.addMatch(node, this.pattern.mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH);
return IMPOSSIBLE_MATCH;
}
|
public int getNodeType() {
return THROW_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ThrowStatement result = new ThrowStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setLeadingComment(getLeadingCo... | public int getNodeType() {
return THROW_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ThrowStatement result = new ThrowStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadingComment(this);
re... |
public JavadocArgumentExpression(char[] name, int startPos, int endPos, TypeReference typeRef) {
this.token = name;
this.sourceStart = startPos;
this.sourceEnd = endPos;
long pos = (((long) startPos) << 32) + endPos;
this.argument = new Argument(name, pos, typeRef, IConstants.AccDefault, false);
this.bits ... | public JavadocArgumentExpression(char[] name, int startPos, int endPos, TypeReference typeRef) {
this.token = name;
this.sourceStart = startPos;
this.sourceEnd = endPos;
long pos = (((long) startPos) << 32) + endPos;
this.argument = new Argument(name, pos, typeRef, IConstants.AccDefault);
this.bits |= Insi... |
public static long warningTokenToIrritant(String warningToken) {
if (warningToken == null || warningToken.length() == 0) return 0;
switch (warningToken.charAt(0)) {
case 'a' :
if ("all".equals(warningToken)) //$NON-NLS-1$
return 0xFFFFFFFFFFFFFFFFl; // suppress all warnings
if ("assertIdentifier".e... | public static long warningTokenToIrritant(String warningToken) {
if (warningToken == null || warningToken.length() == 0) return 0;
switch (warningToken.charAt(0)) {
case 'a' :
if ("all".equals(warningToken)) //$NON-NLS-1$
return 0xFFFFFFFFFFFFFFFFl; // suppress all warnings
if ("assertIdentifier".e... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
Constant cst = this.assertExpression.optimizedBooleanConstant();
if ((this.assertExpression.implicitConversion & TypeIds.... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
Constant cst = this.assertExpression.optimizedBooleanConstant();
if ((this.assertExpression.implicitConversion & TypeIds.... |
public IStatus restoreState() {
Assert.isTrue(!isRestored());
Status result = new Status(IStatus.OK,PlatformUI.PLUGIN_ID,0,"",null); //$NON-NLS-1$
IMemento memento = this.memento;
this.memento = null;
String factoryId = memento.getString(IWorkbenchConstants.TAG_FACTORY_ID);
if (factoryId == null) {
Workbench... | public IStatus restoreState() {
Assert.isTrue(!isRestored());
Status result = new Status(IStatus.OK,PlatformUI.PLUGIN_ID,0,"",null); //$NON-NLS-1$
IMemento memento = this.memento;
this.memento = null;
String factoryId = memento.getString(IWorkbenchConstants.TAG_FACTORY_ID);
if (factoryId == null) {
Workbench... |
public int requestMap(Request req) {
// If we have an explicit mapper - return
Container ct=req.getContainer();
// log( "Ct: " + ct.getHandler() + " " +
// ct.getPath() + " " + ct.getMapType());
if( req.getHandler()!=null &&
ct!=null &&
ct.getMapType() != Container.DEFAULT_MAP )
ret... | public int requestMap(Request req) {
// If we have an explicit mapper - return
Container ct=req.getContainer();
// log( "Ct: " + ct.getHandler() + " " +
// ct.getPath() + " " + ct.getMapType());
if( req.getHandler()!=null &&
ct!=null &&
ct.getMapType() != Container.DEFAULT_MAP )
ret... |
private static void declareDecorations(FieldDecorationRegistry registry) {
/*------------- Content Assist Cue ----------- */
registry.addFieldDecoration(
IWorkbenchFieldDecorationConstants.CONTENT_ASSIST_CUE,
new FieldDecoration(WorkbenchImages
.getImage(ISharedImages.IMG_DEC_CONTENTPROPOSAL),
... | private static void declareDecorations(FieldDecorationRegistry registry) {
/*------------- Content Assist Cue ----------- */
registry.addFieldDecoration(
IWorkbenchFieldDecorationConstants.CONTENT_ASSIST_CUE,
new FieldDecoration(WorkbenchImages
.getImage(ISharedImages.IMG_DEC_CONTENT_PROPOSAL),
... |
public void set(Map optionsMap) {
Object optionValue;
if ((optionValue = optionsMap.get(OPTION_PerformVisibilityCheck)) != null) {
if (ENABLED.equals(optionValue)) {
this.checkVisibility = true;
} else if (DISABLED.equals(optionValue)) {
this.checkVisibility = false;
}
}
if ((optionValue = op... | public void set(Map optionsMap) {
Object optionValue;
if ((optionValue = optionsMap.get(OPTION_PerformVisibilityCheck)) != null) {
if (ENABLED.equals(optionValue)) {
this.checkVisibility = true;
} else if (DISABLED.equals(optionValue)) {
this.checkVisibility = false;
}
}
if ((optionValue = op... |
public IResource resource(PackageFragmentRoot root) {
if (this.resource == null)
return (IResource) (this.resource = JavaModelManager.getExternalManager().getFolder(this.externalPath));
return super.resource(root);
}
| public IResource resource(PackageFragmentRoot root) {
if (this.resource == null)
return this.resource = JavaModelManager.getExternalManager().getFolder(this.externalPath);
return super.resource(root);
}
|
protected IJavaElement createHandle(AbstractMethodDeclaration method, IJavaElement parent) {
if (!(parent instanceof IType)) return parent;
IType type = (IType) parent;
Argument[] arguments = method.arguments;
int argCount = arguments == null ? 0 : arguments.length;
if (type.isBinary()) {
// don't cache the met... | protected IJavaElement createHandle(AbstractMethodDeclaration method, IJavaElement parent) {
if (!(parent instanceof IType)) return parent;
IType type = (IType) parent;
Argument[] arguments = method.arguments;
int argCount = arguments == null ? 0 : arguments.length;
if (type.isBinary()) {
// don't cache the met... |
public TestResult start(String args[]) throws Exception {
String testCase= "";
String method= "";
boolean wait= false;
for (int i= 0; i < args.length; i++) {
if (args[i].equals("-wait"))
wait= true;
else if (args[i].equals("-c"))
testCase= extractClassName(args[++i]);
else if (args[i].equals(... | public TestResult start(String args[]) throws Exception {
String testCase= "";
String method= "";
boolean wait= false;
for (int i= 0; i < args.length; i++) {
if (args[i].equals("-wait"))
wait= true;
else if (args[i].equals("-c"))
testCase= extractClassName(args[++i]);
else if (args[i].equals(... |
import org.eclipse.ui.components.IServiceProvider;
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v... | import org.eclipse.ui.components.IServiceProvider;
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v... |
public String getFullyQualifiedParameterizedName() throws JavaModelException {
if (this.isResolved()) {
return getFullyQualifiedParameterizedName(getFullyQualifiedName(), this.getKey());
}
return getFullyQualifiedName('.', true/*show parameters*/);
}
| public String getFullyQualifiedParameterizedName() throws JavaModelException {
if (this.isResolved()) {
return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.getKey());
}
return getFullyQualifiedName('.', true/*show parameters*/);
}
|
public boolean isDefaultConstructor() {
final ReferenceBinding declaringClassBinding = this.binding.declaringClass;
if (declaringClassBinding.isRawType()) {
RawTypeBinding rawTypeBinding = (RawTypeBinding) declaringClassBinding;
if (rawTypeBinding.type.isBinaryBinding()) {
return false;
}
return (t... | public boolean isDefaultConstructor() {
final ReferenceBinding declaringClassBinding = this.binding.declaringClass;
if (declaringClassBinding.isRawType()) {
RawTypeBinding rawTypeBinding = (RawTypeBinding) declaringClassBinding;
if (rawTypeBinding.genericType().isBinaryBinding()) {
return false;
}
... |
public
jnamed(String conffile) throws IOException {
FileInputStream fs;
boolean started = false;
try {
fs = new FileInputStream(conffile);
}
catch (Exception e) {
System.out.println("Cannot open " + conffile);
return;
}
caches = new Hashtable();
znames = new Hashtable();
TSIGs = new Hashtable();
Buffe... | public
jnamed(String conffile) throws IOException {
FileInputStream fs;
boolean started = false;
try {
fs = new FileInputStream(conffile);
}
catch (Exception e) {
System.out.println("Cannot open " + conffile);
return;
}
caches = new Hashtable();
znames = new Hashtable();
TSIGs = new Hashtable();
Buffe... |
public void testMain() {
CheckResourceBundle.checkResourceBundle(this,
new SettingsResourceBundle());
}
| public void testMain() {
CheckResourceBundle.checkResourceBundle(this,
"org.argouml.i18n.SettingsResourceBundle");
}
|
public static String id() {
return "4.5-SNAPSHOT-20080603-1001";
}
| public static String id() {
return "4.5-SNAPSHOT-20080617-1818";
}
|
public int getNodeType() {
return CONSTRUCTOR_INVOCATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
ConstructorInvocation result = new ConstructorInvocation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLeadi... | public int getNodeType() {
return CONSTRUCTOR_INVOCATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
ConstructorInvocation result = new ConstructorInvocation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.copyLead... |
public int getNodeType() {
return TAG_ELEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
TagElement result = new TagElement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setTagName(getTagName());
result.fragmen... | public int getNodeType() {
return TAG_ELEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
TagElement result = new TagElement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setTagName(getTagName());
result.fragme... |
private TypeBinding internalResolveType(Scope scope, 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) { // is a shared type reference which... | private TypeBinding internalResolveType(Scope scope, 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) { // is a shared type reference which... |
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0)
return;
int pc = codeStream.position;
exception.generateCode(currentScope, codeStream, true);
codeStream.athrow();
codeStream.recordPositionsFrom(pc, this);
}
| public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((bits & IsReachableMASK) == 0)
return;
int pc = codeStream.position;
exception.generateCode(currentScope, codeStream, true);
codeStream.athrow();
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
|
protected CompilationParticipantResult[] notifyParticipants(SourceFile[] unitsAboutToCompile) {
// TODO (kent) do we expect to have more than one participant?
// and if so should we pass the generated files from the each processor to the others to process?
CompilationParticipantResult[] results = null;
for (int i =... | protected CompilationParticipantResult[] notifyParticipants(SourceFile[] unitsAboutToCompile) {
// TODO (kent) do we expect to have more than one participant?
// and if so should we pass the generated files from the each processor to the others to process?
CompilationParticipantResult[] results = null;
for (int i =... |
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if method from parameterized type got found, use the original method at codegen time
this.codegenBinding = this.binding.original();
if (this.codegenBinding != this.binding) {
// ... | public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if method from parameterized type got found, use the original method at codegen time
this.codegenBinding = this.binding.original();
if (this.codegenBinding != this.binding) {
// ... |
protected void verifyAttachSource(IPath zipPath) throws JavaModelException {
if (!exists0()) {
throw newNotPresentException();
} else if (zipPath != null && !zipPath.isAbsolute()) {
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.RELATIVE_PATH, zipPath));
}
}
| protected void verifyAttachSource(IPath zipPath) throws JavaModelException {
if (!exists()) {
throw newNotPresentException();
} else if (zipPath != null && !zipPath.isAbsolute()) {
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.RELATIVE_PATH, zipPath));
}
}
|
public boolean isTriggeringEvent(File file) {
System.out.print("Size: "+ file.length());
return (file.length() > maxFileSize);
}
| public boolean isTriggeringEvent(File file) {
System.out.print("Size: "+ file.length());
return (file.length() >= maxFileSize);
}
|
public void set(Map settings) {
final Object allocationExpressionArgumentsAlignmentOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT);
if (allocationExpressionArgumentsAlignmentOption != null) {
this.allocation_expression_arguments_alignment = Integer.parseI... | public void set(Map settings) {
final Object allocationExpressionArgumentsAlignmentOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALLOCATION_EXPRESSION_ARGUMENTS_ALIGNMENT);
if (allocationExpressionArgumentsAlignmentOption != null) {
this.allocation_expression_arguments_alignment = Integer.parseI... |
public void addAttribute( Attribute attribute )
throws Exception
{
IssueType issueType = getIssueType();
Module module = getModule();
// add attribute group-attribute mapping
RAttributeAttributeGroup raag =
addRAttributeAttributeGroup(attribu... | public void addAttribute( Attribute attribute )
throws Exception
{
IssueType issueType = getIssueType();
Module module = getModule();
// add attribute group-attribute mapping
RAttributeAttributeGroup raag =
addRAttributeAttributeGroup(attribu... |
public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
if (this.leafComponentType == unresolvedType) {
this.leafComponentType = env.convertToRawType(resolvedType);
this.tagBits |= this.leafComponentType.tagBits & (TagBits.HasTypeVariable | TagB... | public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
if (this.leafComponentType == unresolvedType) {
this.leafComponentType = env.convertUnresolvedBinaryToRawType(resolvedType);
this.tagBits |= this.leafComponentType.tagBits & (TagBits.HasTyp... |
protected void initComponents()
{
JPanel contentPane = new JPanel();
contentPane.setLayout(new BorderLayout(0,0));
centerPane = new JTabbedPane();
generalPanel = new GeneralPanel();
//LOCALIZE
centerPane.add( generalPanel, "General" );
composerPanel = new ComposerPanel();
//LOCALIZE
centerPane.add( ... | protected void initComponents()
{
JPanel contentPane = new JPanel();
contentPane.setLayout(new BorderLayout(0,0));
centerPane = new JTabbedPane();
generalPanel = new GeneralPanel();
//LOCALIZE
centerPane.add( generalPanel, "General" );
composerPanel = new ComposerPanel();
//LOCALIZE
centerPane.add( ... |
public TypeHierarchy(IType type, ICompilationUnit[] workingCopies, IJavaSearchScope scope, boolean computeSubtypes) {
this.focusType = type;
this.workingCopies = workingCopies;
this.computeSubtypes = computeSubtypes;
this.scope = scope;
}
| public TypeHierarchy(IType type, ICompilationUnit[] workingCopies, IJavaSearchScope scope, boolean computeSubtypes) {
this.focusType = type == null ? null : (IType) ((JavaElement) type).unresolved(); // unsure the focus type is unresolved (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=92357)
this.workingCopies = ... |
public void
writeShortAt(int i, int pos) throws IllegalArgumentException {
if (pos < 0 || pos > count)
throw new IllegalArgumentException(pos + " out of range");
int oldcount = count;
count = pos;
writeShort(i);
count = oldcount;
}
| public void
writeShortAt(int i, int pos) {
if (pos < 0 || pos > count)
throw new IllegalArgumentException(pos + " out of range");
int oldcount = count;
count = pos;
writeShort(i);
count = oldcount;
}
|
public OpenNewMailWindowAction(IFrameMediator controller) {
super(controller, GlobalResourceLoader.getString(null, null,
"menu_file_new_mail"));
putValue(SMALL_ICON, ImageLoader.getSmallImageIcon("mail-new.png"));
}
| public OpenNewMailWindowAction(IFrameMediator controller) {
super(controller, GlobalResourceLoader.getString(null, null,
"menu_file_new_mail"));
//putValue(SMALL_ICON, ImageLoader.getSmallImageIcon("mail-new.png"));
}
|
public void remove(Object[] elements) {
if (list.isDisposed())
return;
if (DEBUG || true) System.err.println("remove"); //$NON-NLS-1$
boolean changed= false;
for (int i= 0; i < elements.length; i++) {
JobTreeItem ji= findJobItem(elements[i], false);
if (ji != null)
changed |= ji.rem... | public void remove(Object[] elements) {
if (list.isDisposed())
return;
if (DEBUG) System.err.println("remove"); //$NON-NLS-1$
boolean changed= false;
for (int i= 0; i < elements.length; i++) {
JobTreeItem ji= findJobItem(elements[i], false);
if (ji != null)
changed |= ji.remove();
... |
protected void getHandleMemento(StringBuffer buff) {
((JavaElement) getParent()).getHandleMemento(buff);
char delimiter = getHandleMementoDelimiter();
buff.append(delimiter);
escapeMementoName(buff, getElementName());
for (int i = 0; i < fParameterTypes.length; i++) {
buff.append(delimiter);
buff.append(fParam... | protected void getHandleMemento(StringBuffer buff) {
((JavaElement) getParent()).getHandleMemento(buff);
char delimiter = getHandleMementoDelimiter();
buff.append(delimiter);
escapeMementoName(buff, getElementName());
for (int i = 0; i < fParameterTypes.length; i++) {
buff.append(delimiter);
escapeMementoName(... |
public ResourceCompilationUnit(IFile file) {
super(null/*no contents*/, file.getLocationURI() == null ? file.getFullPath().toString() : file.getLocationURI().getPath(), null/*encoding is used only when retrieving the contents*/);
this.file = file;
}
| public ResourceCompilationUnit(IFile file) {
super(null/*no contents*/, file.getLocationURI() == null ? file.getFullPath().toString() : file.getLocationURI().getSchemeSpecificPart(), null/*encoding is used only when retrieving the contents*/);
this.file = file;
}
|
public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean assertMode, boolean recordLineSeparator){
Scanner scanner = new Scanner(tokenizeComments, tokenizeWhiteSpace, false/*nls*/, assertMode, null/*todo*/);
scanner.recordLineSeparator = recordLineSeparator;
return scan... | public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean assertMode, boolean recordLineSeparator){
Scanner scanner = new Scanner(tokenizeComments, tokenizeWhiteSpace, false/*nls*/, assertMode, null/*task*/);
scanner.recordLineSeparator = recordLineSeparator;
return scan... |
public void setUp() {
vectorAppender = new VectorAppender();
vectorAppender.setDelay(DELAY);
asyncAppender.addAppender(vectorAppender);
asyncAppender.activateOptions();
root.addAppender(asyncAppender);
}
| public void setUp() {
vectorAppender = new VectorAppender();
vectorAppender.setDelay(DELAY);
asyncAppender.addAppender(vectorAppender);
asyncAppender.activate();
root.addAppender(asyncAppender);
}
|
public IPackageFragmentRoot getPackageFragmentRoot(IPath path) {
if (!path.isAbsolute()) {
path = getPath().append(path);
}
int segmentCount = path.segmentCount();
if (segmentCount == 0) {
return null;
}
if (path.getDevice() != null || JavaModel.getExternalTarget(path, true/*check existence*/) != nul... | public IPackageFragmentRoot getPackageFragmentRoot(IPath path) {
if (!path.isAbsolute()) {
path = getPath().append(path);
}
int segmentCount = path.segmentCount();
if (segmentCount == 0) {
return null;
}
if (path.getDevice() != null || JavaModel.getExternalTarget(path, true/*check existence*/) != nul... |
public void consumeRawType() {
if (this.typeBinding == null) return;
this.typeBinding = this.environment.createRawType((ReferenceBinding) this.typeBinding, this.typeBinding.enclosingType());
}
| public void consumeRawType() {
if (this.typeBinding == null) return;
this.typeBinding = this.environment.convertToRawType(this.typeBinding);
}
|
public void processConnection(TcpConnection connection, Object thData[]) {
Socket socket=null;
HttpRequestAdapter reqA=null;
HttpResponseAdapter resA=null;
try {
// XXX - Add workarounds for the fact that the underlying
// serverSocket.accept() call can now time out. This whole
// architecture ... | public void processConnection(TcpConnection connection, Object thData[]) {
Socket socket=null;
HttpRequestAdapter reqA=null;
HttpResponseAdapter resA=null;
try {
// XXX - Add workarounds for the fact that the underlying
// serverSocket.accept() call can now time out. This whole
// architecture ... |
public SelectionOnQualifiedAllocationExpression(TypeDeclaration anonymous) {
anonymousType = anonymous ;
}
| public SelectionOnQualifiedAllocationExpression(TypeDeclaration anonymous) {
super(anonymous);
}
|
public boolean execute(){
try {
IProject project = resource.getProject();
IIndex index = manager.getIndex(project.getFullPath());
if (!resource.isLocal(IResource.DEPTH_ZERO)){
return FAILED;
}
/* ensure no concurrent write access to index */
if (index == null) return COMPLETE;
ReadWriteMonitor monit... | public boolean execute(){
try {
IProject project = resource.getProject();
IIndex index = manager.getIndex(project.getFullPath());
if (!resource.isLocal(IResource.DEPTH_ZERO)){
return FAILED;
}
/* ensure no concurrent write access to index */
if (index == null) return COMPLETE;
ReadWriteMonitor monit... |
public Thread newThread(Runnable r)
{
Thread t = new Thread(oiThreadGroup, r, "OI Connection Cleaner");
t.setDaemon(true);
return t;
}
});
}
| public Thread newThread(Runnable r)
{
Thread t = new Thread(oiThreadGroup, r, "Connection Cleaner");
t.setDaemon(true);
return t;
}
});
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.