buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public RMIClientNotificationListener(
ObjectName pSender,
NotificationListener pClientListener,
Object pHandback,
NotificationFilter pFilter,
MEJB pConnector
) throws
RemoteException,
JMException
{
super( pSender, pClientListener, pHandback );
// Export the... | public RMIClientNotificationListener(
ObjectName pSender,
NotificationListener pClientListener,
Object pHandback,
NotificationFilter pFilter,
MEJB pConnector
) throws
RemoteException,
JMException
{
super( pSender, pClientListener, pHandback );
// Export the... |
public boolean search(Index index, IProgressMonitor progressMonitor) {
if (index == null) return COMPLETE;
if (indexes.addIfNotIncluded(index) == index)
index.startQuery();
return super.search(index, progressMonitor);
}
| public boolean search(Index index, IProgressMonitor progressMonitor) {
if (index == null) return COMPLETE;
if (this.indexes.addIfNotIncluded(index) == index)
index.startQuery();
return super.search(index, progressMonitor);
}
|
public String toString() {
return "Classpath for jar file " + zipFile; //$NON-NLS-1$
}
}
| public String toString() {
return "Classpath for jar file " + zipFile.getName(); //$NON-NLS-1$
}
}
|
if (isPrivate()) s += "private "; //$NON-NLS-1$
if (isAbstract() && isClass()) s += "abstract "; //$NON-NLS-1$
if (isStatic() && isNestedType()) s += "static "; //$NON-NLS-1$
if (isFinal()) s += "final "; //$NON-NLS-1$
s += isInterface() ? "interface " : "class "; //$NON-NLS-1$ //$NON-NLS-2$
s += (compoundName !... | if (isPrivate()) s += "private "; //$NON-NLS-1$
if (isAbstract() && isClass()) s += "abstract "; //$NON-NLS-1$
if (isStatic() && isNestedType()) s += "static "; //$NON-NLS-1$
if (isFinal()) s += "final "; //$NON-NLS-1$
s += isInterface() ? "interface " : "class "; //$NON-NLS-1$ //$NON-NLS-2$
s += (compoundName !... |
public
SIGRecord(Name name, int dclass, long ttl, int covered, int alg, int origttl,
Date expire, Date timeSigned, int footprint, Name signer,
| public
SIGRecord(Name name, int dclass, long ttl, int covered, int alg, long origttl,
Date expire, Date timeSigned, int footprint, Name signer,
|
public Remote toStub(Remote obj) throws NoSuchObjectException {
try {
Method exportO = unicastClass.getMethod("exportObject", new Class [] { Remote.class });
return (Remote)exportO.invoke(unicastClass, (new Object[] { obj } ));
} catch (Exception e) {
throw new NoSuchObjectException(e.toString());... | public Remote toStub(Remote obj) throws NoSuchObjectException {
try {
Method exportO = unicastClass.getMethod("toStub", new Class [] { Remote.class });
return (Remote)exportO.invoke(unicastClass, (new Object[] { obj } ));
} catch (Exception e) {
throw new NoSuchObjectException(e.toString());
}
... |
public int getExtendedLength(ASTNode node) {
return getExtendedEnd(node) - getExtendedStartPosition(node) + 1;
}
/*
* Initialize leading and trailing comments tables in whole nodes hierarchy of a compilation
* unit.
* Scanner is necessary to scan between nodes and comments and verify if there's
* nothing ... | public int getExtendedLength(ASTNode node) {
return getExtendedEnd(node) - getExtendedStartPosition(node) + 1;
}
/*
* Initialize leading and trailing comments tables in whole nodes hierarchy of a compilation
* unit.
* Scanner is necessary to scan between nodes and comments and verify if there's
* nothing ... |
public SetResponse
findRecords(Name name, short type) {
SetResponse zr = null;
if (findName(name) == null) {
if (name.isWild())
return new SetResponse(SetResponse.NXDOMAIN);
else
return findRecords(name.wild(), type);
}
Object [] objects = findSets(name, type, dclass);
if (objects == null)
return new ... | public SetResponse
findRecords(Name name, short type) {
SetResponse zr = null;
if (findName(name) == null) {
if (name.isWild())
return new SetResponse(SetResponse.NXDOMAIN);
else
return findRecords(name.wild(1), type);
}
Object [] objects = findSets(name, type, dclass);
if (objects == null)
return new... |
public boolean isKnownType(String qualifiedTypeName) {
return this.typeLocators.containsKey(qualifiedTypeName);
}
boolean isSourceFolderEmpty(IContainer sourceFolder) {
String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
Object[] table = this.typeLocators.valueTable;
... | public boolean isKnownType(String qualifiedTypeName) {
return this.typeLocators.containsKey(qualifiedTypeName);
}
boolean isSourceFolderEmpty(IContainer sourceFolder) {
String sourceFolderName = sourceFolder.getProjectRelativePath().addTrailingSeparator().toString();
Object[] table = this.typeLocators.valueTable;
... |
public String toString() {
return "Classpath for jar file " + zipFile;
}
| public String toString() {
return "Classpath for jar file "/*nonNLS*/ + zipFile;
}
|
private void updateCommandsAndContexts() {
IWorkbenchWindow activeWorkbenchWindow = getActiveWorkbenchWindow();
if (!(activeWorkbenchWindow instanceof WorkbenchWindow))
activeWorkbenchWindow = null;
ICommandHandlerService activeWorkbenchWindowCommandHandlerService = activeWorkbenchWindow != null ? ((Wor... | private void updateCommandsAndContexts() {
IWorkbenchWindow activeWorkbenchWindow = getActiveWorkbenchWindow();
if (activeWorkbenchWindow != null && !(activeWorkbenchWindow instanceof WorkbenchWindow))
activeWorkbenchWindow = null;
ICommandHandlerService activeWorkbenchWindowCommandHandlerService = acti... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
LocalVariable... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
LocalVariable... |
public synchronized void readModels(Project p, URL url) throws IOException {
_proj = p;
Argo.log.info("=======================================");
Argo.log.info("== READING MODEL " + url);
try {
XMIReader reader = new XMIReader();
InputSource source = new Inp... | public synchronized void readModels(Project p, URL url) throws IOException {
_proj = p;
Argo.log.info("=======================================");
Argo.log.info("== READING MODEL " + url);
try {
XMIReader reader = new XMIReader();
InputSource source = new Inp... |
private static Class getTextSelectionClass() {
if (iTextSelectionClass != null) {
// tried before and succeeded
return iTextSelectionClass;
}
if (!textSelectionPossible) {
// tried before and failed
return null;
}
// JFace text... | private static Class getTextSelectionClass() {
if (iTextSelectionClass != null) {
// tried before and succeeded
return iTextSelectionClass;
}
if (!textSelectionPossible) {
// tried before and failed
return null;
}
// JFace text... |
public String toString() {
return "NewBuilderType(" + fNewTSEntry.getType().getName() + ")";
}
| public String toString() {
return "NewBuilderType("/*nonNLS*/ + fNewTSEntry.getType().getName() + ")"/*nonNLS*/;
}
|
private boolean readKeyBinding(IConfigurationElement element) {
IKeyBinding keyBinding = Persistence.readKeyBinding(new ConfigurationElementMemento(element), getPluginId(element));
| private boolean readKeyBinding(IConfigurationElement element) {
IKeyBinding keyBinding = Persistence.readKeyBinding(new ConfigurationElementMemento(element), getPluginId(element), 2);
|
private void openErrorLogBrowser() {
String filename = Platform.getLogFileLocation().toOSString();
File log = new File(filename);
if (log.exists()) {
openLink(filename);
return;
}
MessageDialog.openInformation(getShell(), WorkbenchMessages.AboutSyste... | private void openErrorLogBrowser() {
String filename = Platform.getLogFileLocation().toOSString();
File log = new File(filename);
if (log.exists()) {
openLink("file:///" + filename); //$NON-NLS-1$
return;
}
MessageDialog.openInformation(getShell(), W... |
protected ShowViewAction(IWorkbenchWindow window, IViewDescriptor desc, boolean makeFast) {
super(""); //$NON-NLS-1$
// TODO: is this wart still needed?
String accel = desc instanceof ViewDescriptor ? ((ViewDescriptor) desc)
.getAccelerator() : null;
String label = desc... | protected ShowViewAction(IWorkbenchWindow window, IViewDescriptor desc, boolean makeFast) {
super(""); //$NON-NLS-1$
// TODO: is this wart still needed?
String accel = desc instanceof ViewDescriptor ? ((ViewDescriptor) desc)
.getAccelerator() : null;
String label = '&' ... |
private HashtableOfObject addQueryResult(HashtableOfObject results, char[] word, HashtableOfObject wordsToDocNumbers, MemoryIndex memoryIndex) throws IOException {
// must skip over documents which have been added/changed/deleted in the memory index
if (results == null)
results = new HashtableOfObject(13);
EntryRe... | private HashtableOfObject addQueryResult(HashtableOfObject results, char[] word, HashtableOfObject wordsToDocNumbers, MemoryIndex memoryIndex) throws IOException {
// must skip over documents which have been added/changed/deleted in the memory index
if (results == null)
results = new HashtableOfObject(13);
EntryRe... |
protected IMethod findCorrespondingMethod(IMethod method, IMethod[] methods) {
String elementName = method.getElementName();
String[] parameters = method.getParameterTypes();
int paramLength = parameters.length;
String[] simpleNames = new String[paramLength];
for (int i = 0; i < paramLength; i++) {
simpleNames[i... | protected IMethod findCorrespondingMethod(IMethod method, IMethod[] methods) {
String elementName = method.getElementName();
String[] parameters = method.getParameterTypes();
int paramLength = parameters.length;
String[] simpleNames = new String[paramLength];
for (int i = 0; i < paramLength; i++) {
simpleNames[i... |
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... | public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... |
public void complainIfUnusedExceptionHandlers(AbstractMethodDeclaration method) {
MethodScope scope = method.scope;
// can optionally skip overriding methods
if ((method.binding.modifiers & (CompilerModifiers.AccOverriding | CompilerModifiers.AccImplementing)) != 0
&& !scope.environment().options.repor... | public void complainIfUnusedExceptionHandlers(AbstractMethodDeclaration method) {
MethodScope scope = method.scope;
// can optionally skip overriding methods
if ((method.binding.modifiers & (CompilerModifiers.AccOverriding | CompilerModifiers.AccImplementing)) != 0
&& !scope.compilerOptions().reportUnu... |
public void applySourceDelta(Hashtable deltas) {
fNotifier = new BuildNotifier(fDC, false);
fNotifier.begin();
fNotifier.subTask(Util.bind("build.preparingBuild"/*nonNLS*/));
fSourceDeltas = deltas;
fNewState = fOldState.copy(fNewProject, fImageContext);
// options might have changed since last builder run, thus... | public void applySourceDelta(Hashtable deltas) {
fNotifier = new BuildNotifier(fDC, false);
fNotifier.begin();
fNotifier.subTask(Util.bind("build.preparingBuild"/*nonNLS*/));
fSourceDeltas = deltas;
fNewState = fOldState.copy(fNewProject, fImageContext);
// options might have changed since last builder run, thus... |
protected void initComponents() {
// Set the icon and the title
this.setIconImage(ImageLoader.getImageIcon("icon16.png").getImage());
windowname = "Columba";
setTitle("");
// register statusbar at global taskmanager
statusBar = new StatusBar(TaskManager.getInstance());
// JPanel panel = (JPanel) this... | protected void initComponents() {
// Set the icon and the title
this.setIconImage(ImageLoader.getMiscIcon("icon16.png").getImage());
windowname = "Columba";
setTitle("");
// register statusbar at global taskmanager
statusBar = new StatusBar(TaskManager.getInstance());
// JPanel panel = (JPanel) this.... |
public void extendLayout(String id, PageLayout out)
{
targetID = id;
pageLayout = out;
readRegistry(Platform.getPluginRegistry(),
IWorkbenchConstants.PLUGIN_ID,
IWorkbenchConstants.PL_PERSPECTIVE_EXTENSIONS);
}
| public void extendLayout(String id, PageLayout out)
{
targetID = id;
pageLayout = out;
readRegistry(Platform.getPluginRegistry(),
PlatformUI.PLUGIN_ID,
IWorkbenchConstants.PL_PERSPECTIVE_EXTENSIONS);
}
|
public
DNAMERecord(Name name, short dclass, int ttl, Name target)
throws IOException
{
super(_name, Type.DNAME, dclass, ttl, target);
}
| public
DNAMERecord(Name name, short dclass, int ttl, Name target)
throws IOException
{
super(name, Type.DNAME, dclass, ttl, target);
}
|
public Toolbar(String title) {
this(title, false);
}
| public Toolbar(String title) {
this(title, true);
}
|
public static String getString(String sPath, String sName, String sID) {
if (sID == null || sID.equals(""))
return null;
ResourceBundle bundle = null;
String sBundlePath = null;
if (sPath != null && !sPath.equals("")) {
//Find out if we already loaded the ... | public static String getString(String sPath, String sName, String sID) {
if (sID == null || sID.equals(""))
return null;
ResourceBundle bundle = null;
String sBundlePath = null;
if (sPath != null && !sPath.equals("")) {
//Find out if we already loaded the ... |
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICodeCompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nul... | protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICodeCompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nul... |
public void treeWillExpand(TreeExpansionEvent e) throws ExpandVetoException {
ColumbaLogger.log.debug("treeWillExpand=" + e.getPath().toString());
FolderTreeNode treeNode = (FolderTreeNode) e.getPath()
.getLastPathComponent();
if (treeNod... | public void treeWillExpand(TreeExpansionEvent e) throws ExpandVetoException {
ColumbaLogger.log.info("treeWillExpand=" + e.getPath().toString());
FolderTreeNode treeNode = (FolderTreeNode) e.getPath()
.getLastPathComponent();
if (treeNode... |
private void
lookup(Name current) {
SetResponse sr = cache.lookupRecords(current, type, credibility);
if (verbose) {
System.err.println("lookup " + current + " " +
Type.string(type));
System.err.println(sr);
}
processResponse(current, sr);
if (done)
return;
Record question = Record.newRecord(current... | private void
lookup(Name current) {
SetResponse sr = cache.lookupRecords(current, type, credibility);
if (verbose) {
System.err.println("lookup " + current + " " +
Type.string(type));
System.err.println(sr);
}
processResponse(current, sr);
if (done)
return;
Record question = Record.newRecord(current... |
public String
rdataToString() {
StringBuffer sb = new StringBuffer();
if (next != null) {
sb.append(next);
int length = BitSetLength(bitmap);
for (int i = 0; i < length; i++)
if (bitmap.get(i)) {
sb.append(" ");
sb.append(Type.string(i));
}
}
return sb.toString();
}
| public String
rdataToString() {
StringBuffer sb = new StringBuffer();
if (next != null) {
sb.append(next);
int length = BitSetLength(bitmap);
for (short i = 0; i < length; i++)
if (bitmap.get(i)) {
sb.append(" ");
sb.append(Type.string(i));
}
}
return sb.toString();
}
|
public void run() {
try {
manager.beginRule(rule, null);
runnable.run(null);
} catch (InvocationTargetException e) {
exception[0] = e;
} catch (InterruptedException e) {
canceled[0] = e;
} catch (OperationCanceledException e) {
canceled[0] = new InterruptedException(e.getMess... | public void run() {
try {
manager.beginRule(rule, null);
runnable.run(new NullProgressMonitor());
} catch (InvocationTargetException e) {
exception[0] = e;
} catch (InterruptedException e) {
canceled[0] = e;
} catch (OperationCanceledException e) {
canceled[0] = new Interrupt... |
protected boolean readElement(IConfigurationElement element) {
String name = element.getName();
if (Persistence.TAG_COMMAND.equals(name))
return readCommand(element);
return false;
}
| protected boolean readElement(IConfigurationElement element) {
String name = element.getName();
if (Persistence.TAG_COMMAND.equals(name))
return readCommand(element);
return true; // TODO return false once commands extension point is complete
}
|
private void verifyApplicationClassLoadedByTestLoader() {
assert(isTestCaseClassLoader(getClass().getClassLoader()));
}
| private void verifyApplicationClassLoadedByTestLoader() {
assertTrue(isTestCaseClassLoader(getClass().getClassLoader()));
}
|
public void end( SaxContext ctx) throws Exception {
Stack st=ctx.getObjectStack();
Context tcCtx=(Context)st.pop(); // get the Context
HostConfig hc=(HostConfig)st.peek();
st.push( tcCtx );
// put back the context, to be cleaned up corectly
hc.addContext( tcCtx );
}... | public void end( SaxContext ctx) throws Exception {
Stack st=ctx.getObjectStack();
Context tcCtx=(Context)st.pop(); // get the Context
HostConfig hc=(HostConfig)st.peek();
st.push( tcCtx );
// put back the context, to be cleaned up corectly
hc.addContext( tcCtx );
}... |
public int getNodeType() {
return METHOD_INVOCATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
MethodInvocation result = new MethodInvocation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setName((SimpleName) get... | public int getNodeType() {
return METHOD_INVOCATION;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
MethodInvocation result = new MethodInvocation(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setName((SimpleName) ge... |
public static final String[] DEFAULT_HEADERFIELDS = {
"Subject", "From", "To", "Cc", "Date", "Message-Id", "In-Reply-To",
"References", "Content-Type"
};
| public static final String[] DEFAULT_HEADERFIELDS = {
"Subject", "From", "To", "Cc", "Date", "Message-ID", "In-Reply-To",
"References", "Content-Type"
};
|
public void setTitle(String title) {
if (title == null) {
throw new IllegalArgumentException();
}
windowTitle = title;
Shell shell = window.getShell();
if (shell != null && !shell.isDisposed()) {
shell.setText(TextProcessor.process(title, "-")); //$NO... | public void setTitle(String title) {
if (title == null) {
throw new IllegalArgumentException();
}
windowTitle = title;
Shell shell = window.getShell();
if (shell != null && !shell.isDisposed()) {
shell.setText(TextProcessor.process(title, WorkbenchWind... |
private void collectContributions(MenuManager menu, Set result) {
IContributionItem[] items = menu.getItems();
for (int i = 0; i < items.length; i++) {
IContributionItem item = items[i];
if (item instanceof SubContributionItem) {
item = ((SubContributionItem) item).getInnerItem();
}
if (item instan... | private void collectContributions(MenuManager menu, Set result) {
IContributionItem[] items = menu.getItems();
for (int i = 0; i < items.length; i++) {
IContributionItem item = items[i];
if (item instanceof SubContributionItem) {
item = ((SubContributionItem) item).getInnerItem();
}
if (item instan... |
public void fetchHeaderList(IHeaderList headerList, List list,
IMAPFolder folder) throws Exception {
try {
// make sure this mailbox is selected
ensureSelectedState(folder);
//get list of user-defined headerfields
String[] headerFields = CachedHeaderfields.getCachedHeaderfields();
IMAPHeader[] he... | public void fetchHeaderList(IHeaderList headerList, List list,
IMAPFolder folder) throws Exception {
try {
// make sure this mailbox is selected
ensureSelectedState(folder);
//get list of user-defined headerfields
String[] headerFields = CachedHeaderfields.getDefaultHeaderfields();
IMAPHeader[] h... |
public ParameterizedFieldBinding(ParameterizedTypeBinding parameterizedDeclaringClass, FieldBinding originalField) {
super (
originalField.name,
originalField.isStatic() ? originalField.type : parameterizedDeclaringClass.substitute(originalField.type),
originalField.modifi... | public ParameterizedFieldBinding(ParameterizedTypeBinding parameterizedDeclaringClass, FieldBinding originalField) {
super (
originalField.name,
originalField.isStatic() ? originalField.type : Scope.substitute(parameterizedDeclaringClass, originalField.type),
originalField.... |
public AnnotationComponentValue(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int t = u1At(classFileBytes, 0, offset);
this.tag = t;
this.readOffset = 1;
switch(t) {
case 'B' :
case 'C' :
case 'D' :
case 'F' :
case 'I' :
case 'J' ... | public AnnotationComponentValue(
byte[] classFileBytes,
IConstantPool constantPool,
int offset) throws ClassFormatException {
final int t = u1At(classFileBytes, 0, offset);
this.tag = t;
this.readOffset = 1;
switch(t) {
case 'B' :
case 'C' :
case 'D' :
case 'F' :
case 'I' :
case 'J' ... |
public int getNodeType() {
return TYPE_DECLARATION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
TypeDeclarationStatement result =
new TypeDeclarationStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
re... | public int getNodeType() {
return TYPE_DECLARATION_STATEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
TypeDeclarationStatement result =
new TypeDeclarationStatement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
r... |
public int
hashCode() {
int code = labels;
for (int i = 0; i < labels; i++) {
if (name[i] instanceof BitString) {
BitString b = (BitString) name[i];
for (int j = 0; j < b.bytes(); j++)
code += ((code << 3) + b.data[i]);
}
else {
byte [] b = (byte []) name[i];
for (int j = 0; j < b.length; j++)
... | public int
hashCode() {
int code = labels;
for (int i = 0; i < labels; i++) {
if (name[i] instanceof BitString) {
BitString b = (BitString) name[i];
for (int j = 0; j < b.bytes(); j++)
code += ((code << 3) + b.data[j]);
}
else {
byte [] b = (byte []) name[i];
for (int j = 0; j < b.length; j++)
... |
private Object encodeObject(Object o, Object name, boolean replace) throws NamingException {
try {
if ((!(o instanceof Remote)) && (o instanceof Referenceable)) {
IIOPReferenceWrapper irw = new IIOPReferenceWrapper(((Referenceable)o).getReference());
ProtocolCurrent.getCurrent().getCurrentPortableRemoteO... | private Object encodeObject(Object o, Object name, boolean replace) throws NamingException {
try {
if ((!(o instanceof Remote)) && (o instanceof Referenceable)) {
IIOPReferenceWrapper irw = new IIOPReferenceWrapper(((Referenceable)o).getReference());
ProtocolCurrent.getCurrent().getCurrentPortableRemoteO... |
public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
// tolerate some error cases
if ((binding == null || binding.problemId() == ProblemReasons.NotFound )&&
receiverType != null &&
receiverType.isValidBinding() &&
selector != null &&
selector.length > 0) {
MethodBindi... | public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
// tolerate some error cases
if ((binding == null || binding.problemId() == ProblemReasons.NotFound )&&
receiverType != null &&
receiverType.isValidBinding() &&
selector != null &&
selector.length > 0) {
MethodBindi... |
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("OK")) {
//name = textField.getText();
bool = true;
dialog.dispose();
} else if (action.equals("CANCEL")) {
bool = false;
dialog... | public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("OK")) {
//name = textField.getText();
bool = true;
dialog.dispose();
} else if (action.equals("CANCEL")) {
bool = false;
dialog... |
public void resolve(BlockScope scope) {
assertExpression.resolveTypeExpecting(scope, BooleanBinding);
if (exceptionArgument != null) {
TypeBinding exceptionArgumentType = exceptionArgument.resolveType(scope);
if (exceptionArgumentType != null){
int id = exceptionArgumentType.id;
switch(id) {
... | public void resolve(BlockScope scope) {
assertExpression.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
if (exceptionArgument != null) {
TypeBinding exceptionArgumentType = exceptionArgument.resolveType(scope);
if (exceptionArgumentType != null){
int id = exceptionArgumentType.id;
switch(id... |
protected void executeOperation() throws JavaModelException {
JavaElementDelta delta = null;
IPackageFragmentRoot root = (IPackageFragmentRoot) getParentElement();
String[] names = Util.getTrimmedSimpleNames(fName);
beginTask(Util.bind("operation.createPackageFragmentProgress"), names.length); //$NON-NLS-1$
IConta... | protected void executeOperation() throws JavaModelException {
JavaElementDelta delta = null;
IPackageFragmentRoot root = (IPackageFragmentRoot) getParentElement();
String[] names = Util.getTrimmedSimpleNames(fName);
beginTask(Util.bind("operation.createPackageFragmentProgress"), names.length); //$NON-NLS-1$
IConta... |
public IssueType getIssueType()
throws Exception
{
if (issueType == null)
{
String key = data.getParameters()
.getString("issuetypeid");
if (key == null)
{
// get new issue type
issueType = new IssueTyp... | public IssueType getIssueType()
throws Exception
{
if (issueType == null)
{
String key = data.getParameters()
.getString("issuetypeid");
if (key == null)
{
// get new issue type
issueType = new IssueTyp... |
public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
if (!project.isOpen())
return COMPLETE; // nothing to do
IIndex index = manager.getIndex(project.getFullPath());
if (index == null)
return COMPLETE;
ReadWriteMon... | public boolean execute(IProgressMonitor progressMonitor) {
if (progressMonitor != null && progressMonitor.isCanceled()) return COMPLETE;
if (!project.isOpen())
return COMPLETE; // nothing to do
IIndex index = manager.getIndex(project.getFullPath());
if (index == null)
return COMPLETE;
ReadWriteMon... |
public String toString() {
return "Source classpath directory " + sourceFolder.getFullPath().toString() + //$NON-NLS-1$
" with binary directory " + binaryFolder.getFullPath().toString(); //$NON-NLS-1$
}
| public String toString() {
return "Source classpath directory " + sourceFolder.getFullPath().toString() + //$NON-NLS-1$
" with " + super.toString(); //$NON-NLS-1$
}
|
public static String id() {
return "4.4-snapshot-20070712-1321";
}
| public static String id() {
return "4.4";
}
|
public void updateGUI() throws Exception {
if (header.getMimeType().getType().toLowerCase().indexOf("message") != -1) {
MessageFrameController c = new MessageFrameController();
new DefaultContainer(c);
Object[] uidList = new Object[1];
uidList[0] = tempMessageUid;
MailFolderCommandReference r = ... | public void updateGUI() throws Exception {
if (header.getMimeType().getType().toLowerCase().indexOf("message") != -1) {
MessageFrameController c = new MessageFrameController();
new DefaultContainer(c);
Object[] uidList = new Object[1];
uidList[0] = tempMessageUid;
MailFolderCommandReference r = ... |
private boolean isPerTabHistoryEnabled() {
return ((TabBehaviour)Tweaklets.get(TabBehaviour.class)).isPerTabHistoryEnabled();
}
| private boolean isPerTabHistoryEnabled() {
return ((TabBehaviour)Tweaklets.get(TabBehaviour.KEY)).isPerTabHistoryEnabled();
}
|
public
String convert(LoggingEvent event) {
date.setTime(event.timeStamp);
String converted = null;
try {
converted = df.format(date);
}
catch (Exception ex) {
LogLog.error("Error occured while converting date. Exception message: " + ex.getMessage() + ".");
}
... | public
String convert(LoggingEvent event) {
date.setTime(event.timeStamp);
String converted = null;
try {
converted = df.format(date);
}
catch (Exception ex) {
LogLog.error("Error occured while converting date.", ex);
}
return converted;
}
|
public boolean performConcurrentJob(IJob searchJob, int waitingPolicy, IProgressMonitor progress) {
if (VERBOSE)
Util.verbose("STARTING concurrent job - " + searchJob); //$NON-NLS-1$
searchJob.ensureReadyToRun();
boolean status = IJob.FAILED;
try {
int concurrentJobWork = 100;
if (progress != null)... | public boolean performConcurrentJob(IJob searchJob, int waitingPolicy, IProgressMonitor progress) {
if (VERBOSE)
Util.verbose("STARTING concurrent job - " + searchJob); //$NON-NLS-1$
searchJob.ensureReadyToRun();
boolean status = IJob.FAILED;
try {
int concurrentJobWork = 100;
if (progress != null)... |
private char[] getQualifiedName() {
if (this.openable instanceof CompilationUnit) {
// get file name
String fileName = this.resource.getFullPath().lastSegment();
// get main type name
char[] mainTypeName = fileName.substring(0, fileName.length()-5).toCharArray();
CompilationUnit cu = (CompilationUnit) this.... | private char[] getQualifiedName() {
if (this.openable instanceof CompilationUnit) {
// get file name
String fileName = this.resource.getFullPath().lastSegment();
// get main type name
char[] mainTypeName = fileName.substring(0, fileName.length()-5).toCharArray(); //TODO (jerome) should not hardcode extension l... |
public Name getName() {
if (this.importName == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.importName == null) {
preLazyInit();
this.importName =this.ast.newQualifiedName(
new SimpleName(this.ast), new SimpleName(this.ast));
postLazyInit(th... | public Name getName() {
if (this.importName == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.importName == null) {
preLazyInit();
this.importName =this.ast.newQualifiedName(
new SimpleName(this.ast), new SimpleName(this.ast));
postLazyInit(this.i... |
public ConcurrentSubstatesExample() {
try {
model = new Model("ConcurrentSubstatesExample");
courseClass = new MMClass("Course");
sm = new StateMachine("States", courseClass);
taking = new CompositeState("Taking Class");
taking.addSubstate(incomplete = new CompositeStat... | public ConcurrentSubstatesExample() {
try {
model = new Model("ConcurrentSubstatesExample");
courseClass = new MMClass("Course");
sm = new StateMachine("States", courseClass);
taking = new CompositeState("Taking Class");
taking.addSubstate(incomplete = new CompositeStat... |
public void testMain() {
CheckResourceBundle.checkResourceBundle(this,
new UMLCognitiveResourceBundle());
}
| public void testMain() {
CheckResourceBundle.checkResourceBundle(this,
"org.argouml.i18n.UMLCognitiveResourceBundle");
}
|
public void worked(int work) {
Iterator iterator = providers.iterator();
while (iterator.hasNext()) {
ProgressContentProvider provider =
(ProgressContentProvider) iterator.next();
provider.worked(job, work);
}
}
};
| public void worked(int work) {
Iterator iterator = providers.iterator();
while (iterator.hasNext()) {
ProgressContentProvider provider =
(ProgressContentProvider) iterator.next();
provider.worked(job, work);
}
}
}
|
public void execute(Worker worker) throws Exception {
// calling CopyMessageCommand.execute() here!
super.execute(worker);
// get source reference array
FolderCommandReference[] r = adapter.getSourceFolderReferences();
// for every source reference
for (int i = 0; i... | public void execute(Worker worker) throws Exception {
// calling CopyMessageCommand.execute() here!
super.execute(worker);
// get source reference array
FolderCommandReference[] r = adapter.getSourceFolderReferences();
// for every source reference
for (int i = 0; i... |
public DeclarationOfAccessedFieldsPattern(IJavaElement enclosingElement) {
super(false, true, true, null, PATTERN_MATCH, false, null, null, null, null);
this.enclosingElement = enclosingElement;
this.knownFields = new SimpleSet();
this.mustResolve = true;
}
| public DeclarationOfAccessedFieldsPattern(IJavaElement enclosingElement) {
super(false, true, true, null, null, null, null, null, R_PATTERN_MATCH);
this.enclosingElement = enclosingElement;
this.knownFields = new SimpleSet();
this.mustResolve = true;
}
|
public static GroupFolder createGroupFolder(AbstractFolder parent,
IGroup group) {
XmlElement folder = new XmlElement("folder");
folder.addAttribute("uid", (AddressbookTreeNode.generateNextFolderUid())
.toString());
folder.addAttribute("type", "GroupFolder");
XmlElement property = new XmlElement("prope... | public static IGroupFolder createGroupFolder(AbstractFolder parent,
IGroup group) {
XmlElement folder = new XmlElement("folder");
folder.addAttribute("uid", (AddressbookTreeNode.generateNextFolderUid())
.toString());
folder.addAttribute("type", "GroupFolder");
XmlElement property = new XmlElement("prop... |
public void setIdentifier(String identifier) {
if (identifier == null) {
throw new IllegalArgumentException();
}
Scanner scanner = getAST().scanner;
char[] source = identifier.toCharArray();
scanner.setSourceBuffer(source);
scanner.resetTo(0, source.length);
try {
int tokenType = scanner.getNextTok... | public void setIdentifier(String identifier) {
if (identifier == null) {
throw new IllegalArgumentException();
}
Scanner scanner = getAST().scanner;
char[] source = identifier.toCharArray();
scanner.setSource(source);
scanner.resetTo(0, source.length);
try {
int tokenType = scanner.getNextToken();
... |
public void test2() throws Exception { common(2); }
void common(int number) throws Exception {
DOMConfigurator.configure("input/xml/customLogger"+number+".xml");
int i = -1;
Logger root = Logger.getRootLogger();
logger.trace("Message " + ++i);
logger.debug("Message " + ++i);
logger.warn... | public void test2() throws Exception { common(2); }
void common(int number) throws Exception {
DOMConfigurator.configure("input/xml/customLogger"+number+".xml");
int i = -1;
Logger root = Logger.getRootLogger();
logger.trace("Message " + ++i);
logger.debug("Message " + ++i);
logger.warn... |
private byte[] getCodeSnippetBytes() {
return new byte[] {
-54, -2, -70, -66, 0, 3, 0, 45, 0, 35, 1, 0, 48, 111, 114, 103, 47, 101, 99, 108, 105, 112, 115, 101, 47, 106, 100, 116, 47, 105, 110, 116, 101, 114, 110, 97, 108, 47, 101, 118, 97, 108, 47, 116, 97, 114, 103, 101, 116, 47, 67, 111, 100, 101, 83, 110, 105, 1... | buffer.append("private byte[] getCodeSnippetBytes() {\n");
buffer.append(" return new byte[] {\n");
buffer.append(" ");
for (int i = 0; i < bytes.length; i++) {
buffer.append(bytes[i]);
if (i == bytes.length - 1) {
buffer.append("\n");
} else {
buffer.append(", ");
}
}
buffer.append(" };\n");
buffer.append("}"... |
protected void matchReportReference(QualifiedTypeReference qTypeRef, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {
TypeBinding typeBinding = qTypeRef.resolvedType;
int lastIndex = qTypeRef.tokens.length - 1;
if (typeBinding instanceof ArrayBinding)
typeBin... | protected void matchReportReference(QualifiedTypeReference qTypeRef, IJavaElement element, Binding elementBinding, int accuracy, MatchLocator locator) throws CoreException {
TypeBinding typeBinding = qTypeRef.resolvedType;
int lastIndex = qTypeRef.tokens.length - 1;
if (typeBinding instanceof ArrayBinding)
typeBin... |
protected void invokeTestMethod(Method method, RunNotifier notifier) {
Description description= methodDescription(method);
Object test;
try {
test= createTest();
} catch (InvocationTargetException e) {
notifier.testAborted(description, e.getCause());
return;
} catch (Exception e) {
notifier.te... | protected void invokeTestMethod(Method method, RunNotifier notifier) {
Description description= methodDescription(method);
Object test;
try {
test= createTest();
} catch (InvocationTargetException e) { //TODO looks like this could use ExplosiveMethod
notifier.testAborted(description, e.getCause());
re... |
public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Project p = pb.getProject();
try {
MModelElement me = (MModelElement)pb.getDetailsTarget();
if (!((me instanceof MNamespace) && ((me instanceof MUseCase) || (me instanceof MClass)))) {
JOptionPane.showM... | public void actionPerformed(ActionEvent ae) {
ProjectBrowser pb = ProjectBrowser.TheInstance;
Project p = pb.getProject();
try {
Object me = pb.getDetailsTarget();
if (!((me instanceof MNamespace) && ((me instanceof MUseCase) || (me instanceof MClass)))) {
JOptionPane.showMessageDialog(null,
... |
public ReferenceBinding findMemberType(char[] typeName, ReferenceBinding enclosingType) {
if ((enclosingType.tagBits & TagBits.HasNoMemberTypes) != 0)
return null; // know it has no member types (nor inherited member types)
ReferenceBinding enclosingSourceType = enclosingSourceType();
PackageBinding currentP... | public ReferenceBinding findMemberType(char[] typeName, ReferenceBinding enclosingType) {
if ((enclosingType.tagBits & TagBits.HasNoMemberTypes) != 0)
return null; // know it has no member types (nor inherited member types)
ReferenceBinding enclosingSourceType = enclosingSourceType();
PackageBinding currentP... |
public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope);
checkModifiers();
if (variableType != null) {
if (variableType == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
return;
}
if (vari... | public void resolve(BlockScope scope) {
// create a binding and add it to the scope
TypeBinding variableType = type.resolveType(scope);
checkModifiers();
if (variableType != null) {
if (variableType == VoidBinding) {
scope.problemReporter().variableTypeCannotBeVoid(this);
return;
}
if (vari... |
public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope);
if (exceptionTy... | public TypeBinding resolveForCatch(BlockScope scope) {
// resolution on an argument of a catch clause
// provide the scope with a side effect : insertion of a LOCAL
// that represents the argument. The type must be from JavaThrowable
TypeBinding exceptionType = this.type.resolveType(scope, true /* check boun... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
if (this.re... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
if (this.re... |
protected AbstractImageBuilder(JavaBuilder javaBuilder) {
this.javaBuilder = javaBuilder;
this.newState = new State(javaBuilder);
// local copies
this.outputFolder = javaBuilder.outputFolder;
this.sourceFolders = javaBuilder.sourceFolders;
this.notifier = javaBuilder.notifier;
// only perform resource copying ... | protected AbstractImageBuilder(JavaBuilder javaBuilder) {
this.javaBuilder = javaBuilder;
this.newState = new State(javaBuilder);
// local copies
this.outputFolder = javaBuilder.outputFolder;
this.sourceFolders = javaBuilder.sourceFolders;
this.notifier = javaBuilder.notifier;
// only perform resource copying ... |
protected void execute(String sql) throws SQLException {
Connection con = null;
Statement stmt = null;
try {
con = getConnection();
stmt = con.createStatement();
stmt.executeUpdate(sql);
} catch (SQLException e) {
if (stmt != null)
stmt.close();
throw e;
... | protected void execute(String sql) throws SQLException {
Connection con = null;
Statement stmt = null;
try {
con = getConnection();
stmt = con.createStatement();
stmt.executeUpdate(sql);
} catch (SQLException e) {
if (stmt != null)
stmt.close();
throw e;
... |
public String toString() {
return name + " (" + id + ')';
}
| public String toString() {
return name + " (" + id + ')'; //$NON-NLS-1$
}
|
private TypeBinding internalResolveType(Scope scope) {
// Answer the signature return type
// Base type promotion
this.constant = Constant.NotAConstant;
if (this.receiver == null) {
this.actualReceiverType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.actualReceiverT... | private TypeBinding internalResolveType(Scope scope) {
// Answer the signature return type
// Base type promotion
this.constant = Constant.NotAConstant;
if (this.receiver == null) {
this.actualReceiverType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.actualReceiverT... |
IContactItem get(Object uid);
// The contents of this file are subject to the Mozilla Public License Version
// 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed under the License is di... | IContactItem get(Object uid);
// The contents of this file are subject to the Mozilla Public License Version
// 1.1
//(the "License"); you may not use this file except in compliance with the
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
//
//Software distributed under the License is di... |
private static List getTargetList(Control control) {
List result = (List) control.getData(DROP_TARGET_ID);;
return result;
}
| private static List getTargetList(Control control) {
List result = (List) control.getData(DROP_TARGET_ID);
return result;
}
|
private void exportPreferences(IPath path, IEclipsePreferences[] preferences) {
File file = path.toFile();
if (file.exists())
file.delete();
File parent = file.getParentFile();
if (parent != null)
file.getParentFile().mkdirs();
IPreferencesService service = Platform.getPreferencesService();
OutputS... | private void exportPreferences(IPath path, IEclipsePreferences[] preferences) {
File file = path.toFile();
if (file.exists())
file.delete();
File parent = file.getParentFile();
if (parent != null)
file.getParentFile().mkdirs();
IPreferencesService service = Platform.getPreferencesService();
OutputS... |
protected void setUp() throws Exception {
// create config-folder
File file = new File("test_config");
file.mkdir();
new Config(file);
Logging.DEBUG = true;
Logging.createDefaultHandler();
// init mail component
new MailMain().init();
new AddressbookMain().init();
// now load all available plu... | protected void setUp() throws Exception {
// create config-folder
File file = new File("test_config");
file.mkdir();
new Config(file);
Logging.DEBUG = true;
Logging.createDefaultHandler();
// init mail component
new MailMain().init();
new AddressbookMain().init();
// now load all available plu... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
BooleanLiteral(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescripto... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
BooleanLiteral(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescripto... |
public short
getFootprint() {
if (footprint >= 0)
return (short)footprint;
int foot = 0;
DataByteOutputStream out = new DataByteOutputStream();
try {
rrToWire(out, null);
}
catch (IOException e) {}
byte [] rdata = out.toByteArray();
if (alg == DNSSEC.RSA) {
int d1 = rdata[key.length - 3] & 0xFF;
int... | public short
getFootprint() {
if (footprint >= 0)
return (short)footprint;
int foot = 0;
DataByteOutputStream out = new DataByteOutputStream();
try {
rrToWire(out, null);
}
catch (IOException e) {}
byte [] rdata = out.toByteArray();
if (alg == DNSSEC.RSA) {
int d1 = rdata[key.length - 3] & 0xFF;
int... |
public static String escapeText(String txt) {
StringBuffer buffer = new StringBuffer(txt);
// Important!!
// -> replacing this character must happen first
stringReplaceAll(buffer, '&', "&");
stringReplaceAll(buffer, '<', "<");
stringReplaceAll(buffer, '>', "&tg;");
stringReplaceAll(buffer, '"', ... | public static String escapeText(String txt) {
StringBuffer buffer = new StringBuffer(txt);
// Important!!
// -> replacing this character must happen first
stringReplaceAll(buffer, '&', "&");
stringReplaceAll(buffer, '<', "<");
stringReplaceAll(buffer, '>', ">");
stringReplaceAll(buffer, '"', ... |
public void actionPerformed(final java.awt.event.ActionEvent event) {
// We could get a run-time problem in the method we invoke, so trap
// that.
try {
Object[] argValue = { new Integer(_index), _subEntry };
_action.invoke(_actionObj, argValue);
}
... | public void actionPerformed(final java.awt.event.ActionEvent event) {
// We could get a run-time problem in the method we invoke, so trap
// that.
try {
Object[] argValue = { new Integer(_index), _subEntry };
_action.invoke(_actionObj, argValue);
}
... |
private String createCriteria(ISearchCriteria r) {
return "Search Results for \"<font class=\"italic\">" + r.getName() + "</font>\":";
}
| private String createCriteria(ISearchCriteria r) {
return "Search Results for \"<font class=\"italic\">" + r.getTitle() + "</font>\":";
}
|
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
... | public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
// just a local variable.
... |
* N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
Block(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLev... | * N.B. This constructor is package-private.
* </p>
*
* @param ast the AST that is to own this node
*/
Block(AST ast) {
super(ast);
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
return propertyDescriptors(apiLev... |
public ChInterface() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the class?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Should {name} be its own cla... | public ChInterface() {
setNextCategory("Naming");
addItem("Does the name '{name}' clearly describe the class?");
addItem("Is '{name}' a noun or noun phrase?");
addItem("Could the name '{name}' be misinterpreted to mean something else?");
setNextCategory("Encoding");
addItem("Should {name} be its own cla... |
public PropPanelDependency() {
super("Dependency",2);
Class mclass = MDependency.class;
addCaption("Name:",0,0,0);
addField(new UMLTextField(this,new UMLTextProperty(mclass,"name","getName","setName")),0,0,0);
addCaption("Stereotype:",1,0,0);
JComboBox stereotypeB... | public PropPanelDependency() {
super("Dependency",2);
Class mclass = MDependency.class;
addCaption("Name:",0,0,0);
addField(new UMLTextField(this,new UMLTextProperty(mclass,"name","getName","setName")),0,0,0);
addCaption("Stereotype:",1,0,0);
JComboBox stereotypeB... |
public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if ((targetType = type.resolveType(scope)) == null)
return null;
if (targetType.isArrayType()
&& ((ArrayBinding) targetType).leafComponentType == VoidBinding) {
scope.problemReporter().cannotAllocateVoidArray(this);
return ... | public TypeBinding resolveType(BlockScope scope) {
constant = NotAConstant;
if ((targetType = type.resolveType(scope)) == null)
return null;
if (targetType.isArrayType()
&& ((ArrayBinding) targetType).leafComponentType == VoidBinding) {
scope.problemReporter().cannotAllocateVoidArray(this);
return ... |
public void removePopServer(int uid) {
int index = getIndex(uid);
POP3ServerController server;
if (index == -1) {
ColumbaLogger.log.error("could not find popserver");
return;
} else {
server = (POP3ServerController) serverList.remove(index);
... | public void removePopServer(int uid) {
int index = getIndex(uid);
POP3ServerController server;
if (index == -1) {
ColumbaLogger.log.severe("could not find popserver");
return;
} else {
server = (POP3ServerController) serverList.remove(index);
... |
public boolean trySave(boolean overwrite) {
StringBuffer msg = new StringBuffer();
msg.append("This is a developer release of ArgoUML. You should not use it \n");
msg.append("for production use, it's only for testing. You may save your models,\n");
msg.append("but do not expect future release... | public boolean trySave(boolean overwrite) {
StringBuffer msg = new StringBuffer();
msg.append("This is a developer release of ArgoUML. You should not use it \n");
msg.append("for production use, it's only for testing. You may save your models,\n");
msg.append("but do not expect future release... |
public EditActionSetsAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("EditActionSetsAction.text")); //$NON-NLS-1$
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId("org.eclipse.ui... | public EditActionSetsAction(IWorkbenchWindow window) {
super(WorkbenchMessages.getString("EditActionSetsAction.text")); //$NON-NLS-1$
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId("org.eclipse.ui... |
public void setEscapedValue(String value) {
if (value == null) {
throw new IllegalArgumentException();
}
Scanner scanner = getAST().scanner;
char[] source = value.toCharArray();
scanner.setSourceBuffer(source);
scanner.resetTo(0, source.length);
try {
int tokenType = scanner.getNextToken();
swit... | public void setEscapedValue(String value) {
if (value == null) {
throw new IllegalArgumentException();
}
Scanner scanner = getAST().scanner;
char[] source = value.toCharArray();
scanner.setSource(source);
scanner.resetTo(0, source.length);
try {
int tokenType = scanner.getNextToken();
switch(tok... |
public TypeBinding resolveType(BlockScope scope) {
TypeBinding expressionType = this.expression.resolveType(scope);
if (expressionType == null) {
this.constant = NotAConstant;
return null;
}
int expressionId = expressionType.id;
if (expressionId > 15) {
this.constant = NotAConstant;
scope.prob... | public TypeBinding resolveType(BlockScope scope) {
TypeBinding expressionType = this.expression.resolveType(scope);
if (expressionType == null) {
this.constant = NotAConstant;
return null;
}
int expressionId = expressionType.id;
if (expressionId > 15) {
this.constant = NotAConstant;
scope.prob... |
public void execute(WorkerStatusController worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
inboxFolder = (MessageFolder) r[0].getFolder();
ColumbaMessage message = (ColumbaMessage) r[0].getMessage();
// add message to folder
... | public void execute(WorkerStatusController worker) throws Exception {
FolderCommandReference[] r = (FolderCommandReference[]) getReferences();
inboxFolder = (MessageFolder) r[0].getFolder();
ColumbaMessage message = (ColumbaMessage) r[0].getMessage();
// add message to folder
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.