buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected void matchReportReference(ASTNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
SearchMatch match = JavaSearchMatch.newReferenceMatch(referenceType(), element, accuracy, reference.sourceStart, reference.sourceEnd+1, locator);
locator.report(match);
}
| protected void matchReportReference(ASTNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
SearchMatch match = locator.newReferenceMatch(referenceType(), element, accuracy, reference.sourceStart, reference.sourceEnd+1);
locator.report(match);
}
|
private void computeValue() {
//The source is a char[3] first and last char are '
//This is true for both regular char AND unicode char
//BUT not for escape char like '\b' which are char[4]....
if ((value = source[1]) != '\\')
return;
char digit;
switch (digit = source[2]) {
case 'b' :
value = '\b';
b... | private void computeValue() {
//The source is a char[3] first and last char are '
//This is true for both regular char AND unicode char
//BUT not for escape char like '\b' which are char[4]....
if ((value = source[1]) != '\\')
return;
char digit;
switch (digit = source[2]) {
case 'b' :
value = '\b';
b... |
private void buildMemberTypes(AccessRestriction accessRestriction) {
SourceTypeBinding sourceType = referenceContext.binding;
ReferenceBinding[] memberTypeBindings = NoMemberTypes;
if (referenceContext.memberTypes != null) {
int length = referenceContext.memberTypes.length;
memberTypeBindings = new Refe... | private void buildMemberTypes(AccessRestriction accessRestriction) {
SourceTypeBinding sourceType = referenceContext.binding;
ReferenceBinding[] memberTypeBindings = NoMemberTypes;
if (referenceContext.memberTypes != null) {
int length = referenceContext.memberTypes.length;
memberTypeBindings = new Refe... |
interface XmiExtensionParser {
package org.argouml.persistence;
public interface XmiExtensionParser {
void parse(String type, String xmlExtensionString);
} | interface XmiExtensionParser {
package org.argouml.persistence;
interface XmiExtensionParser {
void parse(String type, String xmlExtensionString);
} |
public Collection getChildren(Object parent) {
if (!(parent instanceof Project)) return null;
Vector res = new Vector();
Vector models = ((Project)parent).getModels();
if (models == null) return null;
java.util.Enumeration enum = models.elements();
while (enum.hasMoreElements()) {
MNames... | public Collection getChildren(Object parent) {
if (!(parent instanceof Project)) return null;
Vector res = new Vector();
Vector models = ((Project)parent).getUserDefinedModels();
if (models == null) return null;
java.util.Enumeration enum = models.elements();
while (enum.hasMoreElements()) {
... |
private void fillToolBar() {
// Create a CoolBar item for the workbench
CoolBarManager cBarMgr = getWindow().getCoolBarManager();
CoolBarContributionItem coolBarItem = new CoolBarContributionItem(cBarMgr, IWorkbenchActionConstants.TOOLBAR_FILE); //$NON-NLS-1$
cBarMgr.add(coolBarItem);
coolBarItem.setVisible(... | private void fillToolBar() {
// Create a CoolBar item for the workbench
CoolBarManager cBarMgr = getWindow().getCoolBarManager();
CoolBarContributionItem coolBarItem = new CoolBarContributionItem(cBarMgr, IWorkbenchActionConstants.TOOLBAR_FILE); //$NON-NLS-1$
cBarMgr.add(coolBarItem);
coolBarItem.setVisible(... |
public List<IHeaderItem> getAllHeaderItems(String folderId,
boolean flattenGroupItems) throws StoreException {
if (folderId == null)
throw new IllegalArgumentException("folderId == null");
Vector<IHeaderItem> v = new Vector<IHeaderItem>();
AddressbookTreeModel model = AddressbookTreeModel.getInstance();
... | public List<IHeaderItem> getAllHeaderItems(String folderId,
boolean flattenGroupItems) throws StoreException {
if (folderId == null)
throw new IllegalArgumentException("folderId == null");
Vector<IHeaderItem> v = new Vector<IHeaderItem>();
AddressbookTreeModel model = AddressbookTreeModel.getInstance();
... |
public boolean isRawMethod() {
return !(this.binding instanceof ParameterizedGenericMethodBinding);
}
| public boolean isRawMethod() {
return !isParameterizedMethod() && !isGenericMethod();
}
|
public PropPanelInteraction() {
super("Interaction", _interactionIcon, ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"), new UMLTextField2(new UMLModelElementNameDocument()));
addField(Argo.localize("UMLMenu", "label.stereotype"), getStereotypeBox());
... | public PropPanelInteraction() {
super("Interaction", ConfigLoader.getTabPropsOrientation());
addField(Argo.localize("UMLMenu", "label.name"), new UMLTextField2(new UMLModelElementNameDocument()));
addField(Argo.localize("UMLMenu", "label.stereotype"), getStereotypeBox());
addField(Arg... |
static public void main(String[] args) {
if(args.length == 0) {
// Note that the appender is added to root but that the log
// request is made to an instance of MyLogger. The output still
// goes to System.out.
Logger root = Logger.getRootLogger();
Layout layout = new PatternLay... | static public void main(String[] args) {
if(args.length == 0) {
// Note that the appender is added to root but that the log
// request is made to an instance of MyLogger. The output still
// goes to System.out.
Logger root = Logger.getRootLogger();
Layout layout = new PatternLay... |
static private RepositorySelector repositorySelector;
static {
// By default we use a DefaultRepositorySelector which always returns 'h'.
Hierarchy h = new Hierarchy(new RootCategory(Level.DEBUG));
repositorySelector = new DefaultRepositorySelector(h);
Logger logger = LogManager.getLoggerReposito... | static private RepositorySelector repositorySelector;
static {
// By default we use a DefaultRepositorySelector which always returns 'h'.
Hierarchy h = new Hierarchy(new RootCategory(Level.DEBUG));
repositorySelector = new DefaultRepositorySelector(h);
Logger logger = LogManager.getLoggerReposito... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new BounceCommand(r));
}
| public void actionPerformed(ActionEvent evt) {
FolderCommandReference r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
MainInterface.processor.addOp(new BounceCommand(r));
}
|
public String toString() {
StringBuffer buffer = new StringBuffer(10);
buffer.append("Enabled:").append(this.enabled).append('\n'); //$NON-NLS-1$
int numJobs = jobEnd - jobStart + 1;
buffer.append("Jobs in queue:").append(numJobs).append('\n'); //$NON-NLS-1$
if (numJobs > 0) {
buffer.append("First job: ").append... | public String toString() {
StringBuffer buffer = new StringBuffer(10);
buffer.append("Enabled:").append(this.enabled).append('\n'); //$NON-NLS-1$
int numJobs = jobEnd - jobStart + 1;
buffer.append("Jobs in queue:").append(numJobs).append('\n'); //$NON-NLS-1$
if (numJobs > 0) {
buffer.append("First job: ").append... |
public AbstractMethodDeclaration findMethod(IMethod methodHandle) {
TypeDeclaration typeDecl = findType((IType)methodHandle.getParent());
if (typeDecl == null) return null;
AbstractMethodDeclaration[] methods = typeDecl.methods;
if (methods != null) {
char[] selector = methodHandle.getElementName().toCharAr... | public AbstractMethodDeclaration findMethod(IMethod methodHandle) {
TypeDeclaration typeDecl = findType((IType)methodHandle.getParent());
if (typeDecl == null) return null;
AbstractMethodDeclaration[] methods = typeDecl.methods;
if (methods != null) {
char[] selector = methodHandle.getElementName().toCharAr... |
protected void buildBodyDeclarations(org.eclipse.jdt.internal.compiler.ast.EnumDeclaration enumDeclaration2, EnumDeclaration enumDeclaration) {
// add body declaration in the lexical order
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] members = enumDeclaration2.memberTypes;
org.eclipse.jdt.internal.com... | protected void buildBodyDeclarations(org.eclipse.jdt.internal.compiler.ast.EnumDeclaration enumDeclaration2, EnumDeclaration enumDeclaration) {
// add body declaration in the lexical order
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] members = enumDeclaration2.memberTypes;
org.eclipse.jdt.internal.com... |
public void format(Writer output, LoggingEvent event) throws IOException {
// We yield to the \r\n heresy.
output.write("<log4j:event logger=\"");
output.write(event.getLoggerName());
output.write("\" timestamp=\"");
output.write(Long.toString(event.getTimeStamp()));
output.write("\" sequenceN... | public void format(Writer output, LoggingEvent event) throws IOException {
// We yield to the \r\n heresy.
output.write("<log4j:event logger=\"");
output.write(event.getLoggerName());
output.write("\" timestamp=\"");
output.write(Long.toString(event.getTimeStamp()));
output.write("\" sequenceN... |
public void resolveStatements() {
// ========= abort on fatal error =============
if (this.returnType != null && this.binding != null) {
this.returnType.resolvedType = this.binding.returnType;
// record the return type binding
}
// look if the name of the method is correct
if (binding != null && isTyp... | public void resolveStatements() {
// ========= abort on fatal error =============
if (this.returnType != null && this.binding != null) {
this.returnType.resolvedType = this.binding.returnType;
// record the return type binding
}
// look if the name of the method is correct
if (binding != null && isTyp... |
public boolean isValid( Principal principal, Object credential )
{
return principal.getName().equals( credential.toString() );
}
| public boolean isValid( Principal principal, Object credential )
{
return credential != null && principal.getName().equals( credential.toString() );
}
|
public static
String substVars(String val, Properties props) throws
IllegalArgumentException {
sbuf.setLength(0);
int i = 0;
int j, k;
while(true) {
j=val.indexOf(DELIM_START, i);
if(j == -1) {
if(i==0)
return val;
else {
sbuf.append(val.substring(i,... | public static
String substVars(String val, Properties props) throws
IllegalArgumentException {
sbuf.setLength(0);
int i = 0;
int j, k;
while(true) {
j=val.indexOf(DELIM_START, i);
if(j == -1) {
if(i==0)
return val;
else {
sbuf.append(val.substring(i,... |
public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = manager.getIndex(this.containerPath, true, /*reuse index file*/ false /*create if none*/);
if... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
/* ensure no concurrent write access to index */
Index index = manager.getIndex(this.containerPath, true, /*reuse index file*/ false /*create if none*/);
if... |
protected void handleMoreInfoPressed() {
if (vendorInfo == null)
return;
TableItem[] items = vendorInfo.getSelection();
if (items.length <= 0)
return;
AboutBundleData bundleInfo = (AboutBundleData) items[0].getData();
if (bundleInfo == null)
... | protected void handleMoreInfoPressed() {
if (vendorInfo == null)
return;
TableItem[] items = vendorInfo.getSelection();
if (items.length <= 0)
return;
AboutBundleData bundleInfo = (AboutBundleData) items[0].getData();
if (bundleInfo == null)
... |
public AddAddressToBlackListAction(FrameMediator frameController) {
super(frameController, "Add Address to Blacklist");
// tooltip text
setTooltipText("Add Address to Blacklist");
setEnabled(false);
(
(
AbstractMailFrameController) frameController)
.registerTableSelectionListener(
this);
... | public AddAddressToBlackListAction(FrameMediator frameController) {
super(frameController, "Add Address to Blacklist");
// tooltip text
putValue(SHORT_DESCRIPTION, "Add Address to Blacklist");
setEnabled(false);
(
(
AbstractMailFrameController) frameController)
.registerTableSelectionListener... |
public void execute(IWorkerStatusController worker) throws Exception {
ComposerCommandReference r = (ComposerCommandReference) getReference();
ComposerController composerController = r.getComposerController();
AccountItem item = ((ComposerModel) composerController.getModel())
.getAccountItem();
Sendable... | public void execute(IWorkerStatusController worker) throws Exception {
ComposerCommandReference r = (ComposerCommandReference) getReference();
ComposerController composerController = r.getComposerController();
AccountItem item = ((ComposerModel) composerController.getModel())
.getAccountItem();
Sendable... |
public void actionPerformed(ActionEvent evt) {
new ImportWizardLauncher().launchWizard();
}
| public void actionPerformed(ActionEvent evt) {
new ImportWizardLauncher(getFrameMediator()).launchWizard();
}
|
public void testSingleton() {
Object o1 = ModelManagementFactory.getFactory();
Object o2 = ModelManagementFactory.getFactory();
assert("Different singletons", o1 == o2);
}
| public void testSingleton() {
Object o1 = ModelManagementFactory.getFactory();
Object o2 = ModelManagementFactory.getFactory();
assertTrue("Different singletons", o1 == o2);
}
|
static public void attachTemporaryConsoleAppender(LoggerRepository repository) {
Logger ll = repository.getLogger(Constants.LOG4J_PACKAGE_NAME);
ConsoleAppender appender = new ConsoleAppender();
appender.setLayout(
new PatternLayout("LOG4J-INTERNAL: %d %level [%t] %c - %m%n"));
appender.set... | static public void attachTemporaryConsoleAppender(LoggerRepository repository) {
Logger ll = repository.getLogger(Constants.LOG4J_PACKAGE_NAME);
ConsoleAppender appender = new ConsoleAppender();
appender.setLayout(
new PatternLayout("TEMPORARY CONSOLE APPPENDER: %d %level [%t] %c - %m%n"));
... |
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel,
boolean expanded,
boolean leaf, int row,
boolean hasFocus) {
Component r = super.getTreeCellRendererComponent(tree, value, sel,
... | public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel,
boolean expanded,
boolean leaf, int row,
boolean hasFocus) {
Component r = super.getTreeCellRendererComponent(tree, value, sel,
... |
public static void createProblemType(TypeDeclaration typeDeclaration, CompilationResult unitResult) {
SourceTypeBinding typeBinding = typeDeclaration.binding;
ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true);
// inner attributes
if (typeBinding.isMemberType())
classFile.recordEnclosingType... | public static void createProblemType(TypeDeclaration typeDeclaration, CompilationResult unitResult) {
SourceTypeBinding typeBinding = typeDeclaration.binding;
ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true);
// inner attributes
if (typeBinding.isMemberType())
classFile.recordEnclosingType... |
public void discardJobs(String jobFamily) {
if (VERBOSE)
Util.verbose("DISCARD background job family - " + jobFamily); //$NON-NLS-1$
try {
IJob currentJob;
// cancel current job if it belongs to the given family
synchronized(this){
currentJob = this.currentJob();
disable();
}
if (curr... | public void discardJobs(String jobFamily) {
if (VERBOSE)
Util.verbose("DISCARD background job family - " + jobFamily); //$NON-NLS-1$
try {
IJob currentJob;
// cancel current job if it belongs to the given family
synchronized(this){
currentJob = this.currentJob();
disable();
}
if (curr... |
public void setOption(ConfigurableOption setting) {
String optionID = setting.getID();
if(optionID.equals(OPTION_InsertNewlineBeforeOpeningBrace)){
setNewLineBeforeOpeningBraceMode(setting.getValueIndex() == 0);
}else if(optionID.equals(OPTION_InsertNewlineInControlStatement)){
setNewlineInControlStatementMo... | public void setOption(ConfigurableOption setting) {
String optionID = setting.getID();
if(optionID.equals(OPTION_InsertNewlineBeforeOpeningBrace)){
setNewLineBeforeOpeningBraceMode(setting.getValueIndex() == 0);
}else if(optionID.equals(OPTION_InsertNewlineInControlStatement)){
setNewlineInControlStatementMo... |
protected int retrieveClosingAngleBracketPosition(int start) {
this.scanner.resetTo(start, this.scanner.eofPosition);
this.scanner.returnOnlyGreater = true;
try {
int token;
while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
switch(token) {
case TerminalTokens.TokenName... | protected int retrieveClosingAngleBracketPosition(int start) {
this.scanner.resetTo(start, this.scanner.eofPosition);
this.scanner.returnOnlyGreater = true;
try {
int token;
while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
switch(token) {
case TerminalTokens.TokenName... |
protected void executeOperation() throws JavaModelException {
beginTask(Util.bind("workingCopy.commit"/*nonNLS*/), 2);
ICompilationUnit copy = getCompilationUnit();
ICompilationUnit original = (ICompilationUnit) copy.getOriginalElement();
// creates the delta builder (this remembers the content of the cu)
Java... | protected void executeOperation() throws JavaModelException {
beginTask(Util.bind("workingCopy.commit"), 2); //$NON-NLS-1$
ICompilationUnit copy = getCompilationUnit();
ICompilationUnit original = (ICompilationUnit) copy.getOriginalElement();
// creates the delta builder (this remembers the content of the cu)
... |
public String toString() {
return (fProblems.length == 0 ? ""/*nonNLS*/ : "*"/*nonNLS*/) + "ConvertedCompilationResult("/*nonNLS*/ + fPackageElement + ")"/*nonNLS*/;
}
| public String toString() {
return (fProblems.length == 0 ? "" : "*") + "ConvertedCompilationResult(" + fPackageElement + ")"; //$NON-NLS-1$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-4$
}
|
protected void verifyRenaming(IJavaElement element) throws JavaModelException {
String newName = getNewNameFor(element);
boolean isValid = true;
switch (element.getElementType()) {
case IJavaElement.PACKAGE_FRAGMENT :
if (element.getElementName().equals(IPackageFragment.DEFAULT_PACKAGE_NAME)) {
// ... | protected void verifyRenaming(IJavaElement element) throws JavaModelException {
String newName = getNewNameFor(element);
boolean isValid = true;
switch (element.getElementType()) {
case IJavaElement.PACKAGE_FRAGMENT :
if (((IPackageFragment) element).isDefaultPackage()) {
// don't allow renaming of... |
private CompilationUnitDeclaration convert(
ISourceType[] sourceTypes,
boolean needFieldsAndMethods,
boolean needMemberTypes,
CompilationResult compilationResult) {
ISourceType sourceType = sourceTypes[0];
if (sourceType.getName() == null)
return null; // do a basic test that the sourceType is valid
... | private CompilationUnitDeclaration convert(
ISourceType[] sourceTypes,
boolean needFieldsAndMethods,
boolean needMemberTypes,
CompilationResult compilationResult) {
ISourceType sourceType = sourceTypes[0];
if (sourceType.getName() == null)
return null; // do a basic test that the sourceType is valid
... |
public int postReadRequest( Request req ) {
MessageBytes pathMB = req.requestURI();
// copy the request
if( pathMB.isNull())
throw new RuntimeException("ASSERT: null path in request URI");
//if( path.indexOf("?") >=0 )
// throw new RuntimeException("ASSERT: ? in requestURI");
// If path is ... | public int postReadRequest( Request req ) {
MessageBytes pathMB = req.requestURI();
// copy the request
if( pathMB.isNull())
throw new RuntimeException("ASSERT: null path in request URI");
//if( path.indexOf("?") >=0 )
// throw new RuntimeException("ASSERT: ? in requestURI");
// If path is ... |
public String getQualifiedName() {
if (isAnonymous() || isLocal()) {
return NO_NAME;
}
if (isPrimitive() || isNullType()) {
BaseTypeBinding baseTypeBinding = (BaseTypeBinding) this.binding;
return new String(baseTypeBinding.simpleName);
}
if (isWildcardType()) {
WildcardBinding wildcardBinding = ... | public String getQualifiedName() {
if (isAnonymous() || isLocal()) {
return NO_NAME;
}
if (isPrimitive() || isNullType()) {
BaseTypeBinding baseTypeBinding = (BaseTypeBinding) this.binding;
return new String(baseTypeBinding.simpleName);
}
if (isWildcardType()) {
WildcardBinding wildcardBinding = ... |
public TypeBinding resolveType(BlockScope scope) {
if (arguments != null) {
int argsLength = arguments.length;
for (int a = argsLength; --a >= 0;)
arguments[a].resolveType(scope);
}
if (enclosingInstance != null) {
TypeBinding enclosingType = enclosingInstance.resolveType(scope);
if (enclosingType == nu... | public TypeBinding resolveType(BlockScope scope) {
if (arguments != null) {
int argsLength = arguments.length;
for (int a = argsLength; --a >= 0;)
arguments[a].resolveType(scope);
}
if (enclosingInstance != null) {
TypeBinding enclosingType = enclosingInstance.resolveType(scope);
if (enclosingType == nu... |
private void appendOutputForConstantString(IConstantPoolEntry constantPoolEntry) {
this.buffer
.append("<String ") //$NON-NLS-1$
.append(constantPoolEntry.getStringValue())
.append("\">"); //$NON-NLS-1$
}
| private void appendOutputForConstantString(IConstantPoolEntry constantPoolEntry) {
this.buffer
.append("<String \"") //$NON-NLS-1$
.append(constantPoolEntry.getStringValue())
.append("\">"); //$NON-NLS-1$
}
|
public synchronized boolean resetIndex(IPath containerPath) {
// only called to over write an existing cached index...
String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString();
try {
// Path is already canonical
IPath indexLocation = computeIndexLocat... | public synchronized boolean resetIndex(IPath containerPath) {
// only called to over write an existing cached index...
String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString();
try {
// Path is already canonical
IPath indexLocation = computeIndexLocat... |
public HeaderTableMenu( TableController headerTableViewer )
{
this.headerTableViewer = headerTableViewer;
initPopupMenu();
}
| public HeaderTableMenu( TableController headerTableViewer )
{
this.headerTableViewer = headerTableViewer;
//initPopupMenu();
}
|
public static IStatus validateCompilationUnitName(String name) {
if (name == null) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Util.bind("convention.unit.nullName"), null); //$NON-NLS-1$
}
String extension;
String identifier;
int index;
index = name.indexOf('.');
if (index == -1) {
return new ... | public static IStatus validateCompilationUnitName(String name) {
if (name == null) {
return new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, -1, Util.bind("convention.unit.nullName"), null); //$NON-NLS-1$
}
String extension;
String identifier;
int index;
index = name.lastIndexOf('.');
if (index == -1) {
return ... |
public void actionPerformed(ActionEvent evt) {
MainInterface.processor.addOp(
new OpenWithAttachmentCommand(
getFrameController()
.getSelectionManager()
.getHandler("mail.attachment")
.getSelection()));
}
| public void actionPerformed(ActionEvent evt) {
MainInterface.processor.addOp(
new OpenWithAttachmentCommand(
getFrameMediator()
.getSelectionManager()
.getHandler("mail.attachment")
.getSelection()));
}
|
DUMP.info( "Dump of integer array:");
package org.apache.log4j.examples;
import org.apache.log4j.Category;
import org.apache.log4j.NDC;
/**
Example code for log4j to viewed in conjunction with the {@link
org.apache.log4j.examples.Sort Sort} class.
<p>SortAlgo uses the bubble sort algorithm to sort a... | DUMP.info( "Dump of integer array:");
package org.apache.log4j.examples;
import org.apache.log4j.Category;
import org.apache.log4j.NDC;
/**
Example code for log4j to viewed in conjunction with the {@link
org.apache.log4j.examples.Sort Sort} class.
<p>SortAlgo uses the bubble sort algorithm to sort a... |
public String toString() {
StringBuffer buf = new StringBuffer("ModifiedBuilderType("); //$NON-NLS-1$
return buf.append(fOldTSEntry.getType().getName()).append(')').toString();
}
| public String toString() {
StringBuffer buf = new StringBuffer("ModifiedBuilderType("/*nonNLS*/);
return buf.append(fOldTSEntry.getType().getName()).append(')').toString();
}
|
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... |
protected void executeOperation() throws JavaModelException {
try {
JavaElementDelta delta = null;
PackageFragmentRoot root = (PackageFragmentRoot) getParentElement();
beginTask(Messages.operation_createPackageFragmentProgress, this.pkgName.length);
IContainer parentFolder = (IContainer) root.resource();
St... | protected void executeOperation() throws JavaModelException {
try {
JavaElementDelta delta = null;
PackageFragmentRoot root = (PackageFragmentRoot) getParentElement();
beginTask(Messages.operation_createPackageFragmentProgress, this.pkgName.length);
IContainer parentFolder = (IContainer) root.resource();
St... |
public void actionPerformed(ActionEvent evt) {
EditFolderDialog dialog = new EditFolderDialog("New Folder");
dialog.showDialog();
String name;
if (dialog.success() == true) {
// ok pressed
name = dialog.getName();
} else {
// cancel pressed
return;
}
FolderCommandReference[] r =
(Folder... | public void actionPerformed(ActionEvent evt) {
EditFolderDialog dialog = new EditFolderDialog("New Folder");
dialog.showDialog();
String name;
if (dialog.success()) {
// ok pressed
name = dialog.getName();
} else {
// cancel pressed
return;
}
FolderCommandReference[] r =
(FolderCommandR... |
public void resolve(MethodScope initializationScope) {
// the two <constant = Constant.NotAConstant> could be regrouped into
// a single line but it is clearer to have two lines while the reason of their
// existence is not at all the same. See comment for the second one.
//----------------------------------------... | public void resolve(MethodScope initializationScope) {
// the two <constant = Constant.NotAConstant> could be regrouped into
// a single line but it is clearer to have two lines while the reason of their
// existence is not at all the same. See comment for the second one.
//----------------------------------------... |
private void postView() {
// setup base url in order to be able to display images
// in html-component
URL baseUrl = DiskIO.getResourceURL("org/columba/core/images/");
((HTMLDocument) textPane.getDocument()).setBase(baseUrl);
// scroll window to the beginning
textPane.setCaretPosition(0);
}
| private void postView() {
// setup base url in order to be able to display images
// in html-component
URL baseUrl = DiskIO.getResourceURL("org/columba/core/icons/MISC/");
((HTMLDocument) textPane.getDocument()).setBase(baseUrl);
// scroll window to the beginning
textPane.setCaretPosition(0);
}
|
public String getPluginId() {
return getDeclaringNamespace();
}
/**
* Return the config element for this descriptor.
*
* @return the config element
* @since 3.3
*/
IConfigurationElement getConfigurationElement() {
return configElement;
}
} | public IConfigurationElement getConfigurationElement() {
return configElement;
}
} |
public StringBuffer print(int indent, StringBuffer output) {
output.append("<SelectOnName:"); //$NON-NLS-1$
output.append(name);
output.append(">"); //$NON-NLS-1$
return output;
}
| public StringBuffer print(int indent, StringBuffer output) {
output.append("<SelectOnName:"); //$NON-NLS-1$
output.append(this.name);
output.append(">"); //$NON-NLS-1$
return output;
}
|
public void mouseExited(MouseEvent evt)
{
view.getStatus().setMessage(null);
}
};
Vector recentVector = BufferHistory.getBufferHistory();
if(recentVector.size() == 0)
{
add(GUIUtilities.loadMenuItem("no-recent"));
return;
}
/*
* While recentVector has 50 entries or so, ... | public void mouseExited(MouseEvent evt)
{
view.getStatus().setMessage(null);
}
};
Vector recentVector = BufferHistory.getBufferHistory();
if(recentVector.size() == 0)
{
add(GUIUtilities.loadMenuItem("no-recent"));
return;
}
/*
* While recentVector has 50 entries or so, ... |
public void body(String text) throws Exception
{
log().debug("(" + getState() + ") attachment Mime Type body: " + text);
if(getState().equals(DBImport.STATE_DB_INSERTION))
{
Attachment attachment = (Attachment)digester.pop();
attachment.setMimeType(text);
... | public void body(String text) throws Exception
{
log().debug("(" + getState() + ") attachment Mime Type body: " + text);
if(getState().equals(XMLImport.STATE_DB_INSERTION))
{
Attachment attachment = (Attachment)digester.pop();
attachment.setMimeType(text);
... |
public String toString() {
// don't use + with char[]
return new StringBuffer("TypeHierarchyIndictment("/*nonNLS*/).append(fName).append(")"/*nonNLS*/).toString();
}
| public String toString() {
// don't use + with char[]
return new StringBuffer("TypeHierarchyIndictment(").append(fName).append(")").toString(); //$NON-NLS-1$ //$NON-NLS-2$
}
|
protected void updateComponents(boolean b) {
if (b) {
loginTextField.setText(serverItem.get("user"));
passwordTextField.setText(serverItem.get("password"));
hostTextField.setText(serverItem.get("host"));
portTextField.setText(serverItem.get("port"));
storePasswordCheckBox.setSelected(
serverItem... | protected void updateComponents(boolean b) {
if (b) {
loginTextField.setText(serverItem.get("user"));
passwordTextField.setText(serverItem.get("password"));
hostTextField.setText(serverItem.get("host"));
portTextField.setText(serverItem.get("port"));
storePasswordCheckBox.setSelected(
serverItem... |
public void openEditor(IEditorReference ref, boolean setVisible) {
EditorPane pane = new EditorPane(ref, page, editorArea.getActiveWorkbook());
initPane(pane, ref);
// Show the editor.
editorArea.addEditor(pane);
if (setVisible)
setVisibleEditor(ref, true);
}
| public void openEditor(IEditorReference ref, boolean setVisible) {
EditorPane pane = new EditorPane(ref, page, editorArea.getActiveWorkbook());
initPane(pane, ref);
// Show the editor.
editorArea.addEditor(pane);
if (setVisible)
setVisibleEditor(ref, false);
}
|
public ViewMessageSourceAction(IFrameMediator controller) {
super(controller, MailResourceLoader.getString("menu", "mainframe",
"menu_view_source"));
// tooltip text
putValue(SHORT_DESCRIPTION, MailResourceLoader.getString("menu",
"mainframe", "menu_view_source_tooltip").replaceAll("&", ""));
// smal... | public ViewMessageSourceAction(IFrameMediator controller) {
super(controller, MailResourceLoader.getString("menu", "mainframe",
"menu_view_source"));
// tooltip text
putValue(SHORT_DESCRIPTION, MailResourceLoader.getString("menu",
"mainframe", "menu_view_source_tooltip").replaceAll("&", ""));
// smal... |
protected static String imageName(String name) {
return "Images/Tree" + stripJunk(name) + ".gif";
}
| protected static String imageName(String name) {
return "/Images/Tree" + stripJunk(name) + ".gif";
}
|
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
//super.getTableCellRendererComponent( table, value, isSelected, hasFocus, row, column );
if (isBordered) {
if (isSelected) {
if... | public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
//super.getTableCellRendererComponent( table, value, isSelected, hasFocus, row, column );
if (isBordered) {
if (isSelected) {
if... |
public
static
Level toLevel(String sArg, Level defaultLevel) {
if(sArg == null)
return defaultLevel;
String s = sArg.toUpperCase();
if(s.equals("ALL")) return Level.ALL;
if(s.equals("DEBUG")) return Level.DEBUG;
if(s.equals("FINE")) return Level.FINE;
if(s... | public
static
Level toLevel(String sArg, Level defaultLevel) {
if(sArg == null)
return defaultLevel;
String s = sArg.toUpperCase();
if(s.equals("ALL")) return Level.ALL;
if(s.equals("DEBUG")) return Level.DEBUG;
//if(s.equals("FINE")) return Level.FINE;
if(... |
public boolean visit(IResource resource) {
if (isCancelled) return false;
if (resource.getType() == IResource.FILE) {
String extension = resource.getFileExtension();
if ((extension != null)
&& extension.equalsIgnoreCase("class")) { //$NON-NLS-1$
IPath path = resource.getLocation(... | public boolean visit(IResource resource) {
if (isCancelled) return false;
if (resource.getType() == IResource.FILE) {
String extension = resource.getFileExtension();
if ((extension != null)
&& extension.equalsIgnoreCase("class")) { //$NON-NLS-1$
IPath path = resource.getLocation(... |
protected void matchReportReference(AstNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
if (this.isDeclarationOfReferencedMethodsPattern) {
// need exact match to be able to open on type ref
if (accuracy != IJavaSearchResultCollector.EXACT_MATCH) return;
// elemen... | protected void matchReportReference(AstNode reference, IJavaElement element, int accuracy, MatchLocator locator) throws CoreException {
if (this.isDeclarationOfReferencedMethodsPattern) {
// need exact match to be able to open on type ref
if (accuracy != IJavaSearchResultCollector.EXACT_MATCH) return;
// elemen... |
public FramePluginHandler() {
super("org.columba.core.frame", "org/columba/core/frame/frame.xml");
parentNode = getConfig().getRoot().getElement("framelist");
}
| public FramePluginHandler() {
super("org.columba.core.frame", "org/columba/core/plugin/frame.xml");
parentNode = getConfig().getRoot().getElement("framelist");
}
|
public AddressbookTreeNode add(XmlElement childNode,
AddressbookTreeNode parentFolder) {
FolderItem item = new FolderItem(childNode);
if (item == null) {
return null;
}
// XmlElement.printNode(item.getRoot(), "");
int uid = item.getInteger("uid");
if (AddressbookTreeNode.getNextFolderUid() <= u... | public AddressbookTreeNode add(XmlElement childNode,
AddressbookTreeNode parentFolder) {
FolderItem item = new FolderItem(childNode);
if (item == null) {
return null;
}
// XmlElement.printNode(item.getRoot(), "");
int uid = item.getInteger("uid");
if (AddressbookTreeNode.getNextFolderUid() <= u... |
public void run(String args[]) {
ColumbaLogger.createDefaultHandler();
registerCommandLineArguments();
// handle commandline parameters
if (handleCoreCommandLineParameters(args)) {
System.exit(0);
}
// prompt user for profile
Profile profile = ProfileManager.getInstance().getProfile(path);
// ini... | public void run(String args[]) {
ColumbaLogger.createDefaultHandler();
registerCommandLineArguments();
// handle commandline parameters
if (handleCoreCommandLineParameters(args)) {
System.exit(0);
}
// prompt user for profile
Profile profile = ProfileManager.getInstance().getProfile(path);
// ini... |
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing && castType == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
tagAsUnnece... | public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
if (match == castType) {
if (!isNarrowing && castType == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
tagAsUnnece... |
public TypeBinding resolveType(BlockScope scope) {
// specs p.368
constant = NotAConstant;
LookupEnvironment env = scope.environment();
boolean use15specifics = env.options.sourceLevel >= ClassFileConstants.JDK1_5;
TypeBinding conditionType = condition.resolveTypeExpecting(scope, BooleanBinding);
if (va... | public TypeBinding resolveType(BlockScope scope) {
// specs p.368
constant = NotAConstant;
LookupEnvironment env = scope.environment();
boolean use15specifics = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
TypeBinding conditionType = condition.resolveTypeExpecting(scope, BooleanBinding);... |
public IClasspathEntry[] resolveClasspath(IClasspathEntry[] rawClasspath) throws JavaModelException {
return resolveClasspath(rawClasspath, false/*don't use previous session*/, true/*resolve chained libraries*/).resolvedClasspath;
}
class ResolvedClasspath {
IClasspathEntry[] resolvedClasspath;
IJavaModelSta... | public IClasspathEntry[] resolveClasspath(IClasspathEntry[] rawClasspath) throws JavaModelException {
return resolveClasspath(rawClasspath, false/*don't use previous session*/, true/*resolve chained libraries*/).resolvedClasspath;
}
static class ResolvedClasspath {
IClasspathEntry[] resolvedClasspath;
IJavaM... |
private void updateGradient() {
Color fgColor;
ITheme currentTheme = PlatformUI.getWorkbench().getThemeManager()
.getCurrentTheme();
FontRegistry fontRegistry = currentTheme.getFontRegistry();
ColorRegistry colorRegistry = currentTheme.getColorRegistry();
Colo... | private void updateGradient() {
Color fgColor;
ITheme currentTheme = PlatformUI.getWorkbench().getThemeManager()
.getCurrentTheme();
FontRegistry fontRegistry = currentTheme.getFontRegistry();
ColorRegistry colorRegistry = currentTheme.getColorRegistry();
Colo... |
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 boolean setVisibleEditor(IEditorReference ref, boolean setFocus) {
IEditorReference visibleEditor = getVisibleEditor();
if (ref != visibleEditor) {
IEditorPart part = (IEditorPart) ref.getPart(true);
EditorPane pane = null;
if (part != null)
... | public boolean setVisibleEditor(IEditorReference ref, boolean setFocus) {
IEditorReference visibleEditor = getVisibleEditor();
if (ref != visibleEditor) {
IEditorPart part = (IEditorPart) ref.getPart(true);
EditorPane pane = null;
if (part != null)
... |
public boolean visit(IResource resource) throws CoreException {
switch(resource.getType()) {
case IResource.FILE :
String extension = resource.getFileExtension();
if (JavaBuilder.JAVA_EXTENSION.equalsIgnoreCase(extension)) return false;
if (JavaBuilder.CLASS_EXTENSION.equalsIgnoreCas... | public boolean visit(IResource resource) throws CoreException {
switch(resource.getType()) {
case IResource.FILE :
String extension = resource.getFileExtension();
if (JavaBuilder.JAVA_EXTENSION.equalsIgnoreCase(extension)) return false;
if (JavaBuilder.CLASS_EXTENSION.equalsIgnoreCas... |
private boolean readDeprecatedAccelerator(IConfigurationElement element) {
if (keyConfiguration == null || scope == null)
return false;
String id = element.getAttribute(Persistence.TAG_ID);
String key = element.getAttribute(DEPRECATED_TAG_KEY);
if (key != null) {
List keySequences = new ArrayLis... | private boolean readDeprecatedAccelerator(IConfigurationElement element) {
if (keyConfiguration == null || scope == null)
return false;
String id = element.getAttribute(Persistence.TAG_ID);
String key = element.getAttribute(DEPRECATED_TAG_KEY);
if (key != null) {
List keySequences = new ArrayLis... |
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = this.receiver.resolveType(scope);
if (this.receiverType == null){
... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = this.receiver.resolveType(scope);
if (this.receiverType == null){
... |
public void processEnabledSubmissions(boolean force,
final Shell newActiveShell) {
IWorkbenchSite newActiveWorkbenchSite = null;
final IWorkbenchWindow newActiveWorkbenchWindow = workbench
.getActiveWorkbenchWindow();
boolean update = false;
// Update the... | public void processEnabledSubmissions(boolean force,
final Shell newActiveShell) {
IWorkbenchSite newActiveWorkbenchSite = null;
final IWorkbenchWindow newActiveWorkbenchWindow = workbench
.getActiveWorkbenchWindow();
boolean update = false;
// Update the... |
public void service(HttpServletRequest request,HttpServletResponse response)
throws ServletException, IOException
{
String requestPath = request.getRequestURI();
String pathInfo = (String)request.getAttribute(
Constants.ATTRIBUTE_PathInfo);
if (pathInfo == null) {
pathInfo = request... | public void service(HttpServletRequest request,HttpServletResponse response)
throws ServletException, IOException
{
String requestPath = request.getRequestURI();
String pathInfo = (String)request.getAttribute(
Constants.ATTRIBUTE_PathInfo);
if (pathInfo == null) {
pathInfo = request... |
public void indexAll(IProject project) {
if (JavaCore.getPlugin() == null) return;
// Also request indexing of binaries on the classpath
// determine the new children
try {
JavaModel model = JavaModelManager.getJavaModelManager().getJavaModel();
JavaProject javaProject = (JavaProject) model.getJavaProject(proj... | public void indexAll(IProject project) {
if (JavaCore.getPlugin() == null) return;
// Also request indexing of binaries on the classpath
// determine the new children
try {
JavaModel model = JavaModelManager.getJavaModelManager().getJavaModel();
JavaProject javaProject = (JavaProject) model.getJavaProject(proj... |
private ASTNode.NodeList expressions =
new ASTNode.NodeList(EXPRESSIONS_PROPERTY);
/**
* Creates a new AST node for an array initializer owned by the
* given AST. By default, the list of expressions is empty.
*
* @param ast the AST that is to own this node
*/
ArrayInitializer(AST ast) {
super(ast); ... | private ASTNode.NodeList expressions =
new ASTNode.NodeList(EXPRESSIONS_PROPERTY);
/**
* Creates a new AST node for an array initializer owned by the
* given AST. By default, the list of expressions is empty.
*
* @param ast the AST that is to own this node
*/
ArrayInitializer(AST ast) {
super(ast); ... |
public AbstractMessage getMessage(
Object uid,
WorkerStatusController worker)
throws Exception {
if (aktMessage != null) {
if (aktMessage.getUID().equals(uid)) {
// this message is already cached
ColumbaLogger.log.info("using already cached message..");
return aktMessage;
}
}
String sou... | public AbstractMessage getMessage(
Object uid,
WorkerStatusController worker)
throws Exception {
if (aktMessage != null) {
if (aktMessage.getUID().equals(uid)) {
// this message is already cached
ColumbaLogger.log.info("using already cached message..");
return aktMessage;
}
}
String sou... |
public static void rename(String from, String to) throws RolloverFailure {
File fromFile = new File(from);
boolean success = false;
if (fromFile.exists()) {
File toFile = new File(to);
getLogger().debug("Renaming file [" + fromFile + "] to [" + toFile + "]");
boolean result = fromFile.... | public static void rename(String from, String to) throws RolloverFailure {
File fromFile = new File(from);
boolean success = false;
if (fromFile.exists()) {
File toFile = new File(to);
getLogger().debug("Renaming file [{} to [{}]", fromFile, toFile);
boolean result = fromFile.renameTo(... |
public void update() {
if (editorPane == null) {
setEnabled(false);
return;
}
setEnabled(editorPane.getPage().getEditors().length >= 1);
}
| public void update() {
if (editorPane == null) {
setEnabled(false);
return;
}
setEnabled(editorPane.getPage().getEditorReferences().length >= 1);
}
|
protected CharsetMenuItem createMenuItem(Charset charset) {
CharsetMenuItem menuItem = new CharsetMenuItem(charset);
group.add(menuItem);
menuItem.addMouseListener(controller.getMouseTooltipHandler());
menuItem.addActionListener(this);
if (charset != null) hashtable.put(chars... | protected CharsetMenuItem createMenuItem(Charset charset) {
CharsetMenuItem menuItem = new CharsetMenuItem(charset);
group.add(menuItem);
menuItem.addMouseListener(controller.getContainer().getMouseTooltipHandler());
menuItem.addActionListener(this);
if (charset != null) hash... |
public Object eval(
Class type, CallStack callstack, Interpreter interpreter )
throws EvalError
{
Interpreter.debug("array base type = "+type);
baseType = type;
return eval( callstack, interpreter );
}
| public Object eval(
Class type, CallStack callstack, Interpreter interpreter )
throws EvalError
{
if ( Interpreter.DEBUG ) Interpreter.debug("array base type = "+type);
baseType = type;
return eval( callstack, interpreter );
}
|
public void extendLayout(String id, PageLayout out)
{
targetID = id;
pageLayout = out;
readRegistry(Platform.getPluginRegistry(),
PlatformUI.PLUGIN_ID,
IWorkbenchConstants.PL_PERSPECTIVE_EXTENSIONS);
}
| public void extendLayout(String id, PageLayout out)
{
targetID = id;
pageLayout = out;
readRegistry(Platform.getExtensionRegistry(),
PlatformUI.PLUGIN_ID,
IWorkbenchConstants.PL_PERSPECTIVE_EXTENSIONS);
}
|
public AbstractElement[] getElements() {
if (cachedElements == null) {
WorkbenchWindow window = (WorkbenchWindow) PlatformUI
.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
MenuManager menu = window.getMenuManager();
Set result = new HashSet();
collectContributions(menu, resu... | public AbstractElement[] getElements() {
if (cachedElements == null) {
WorkbenchWindow window = (WorkbenchWindow) PlatformUI
.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
MenuManager menu = window.getMenuManager();
Set result = new HashSet();
collectContributions(menu, resu... |
public Object getConstant() throws JavaModelException {
SourceFieldElementInfo info = (SourceFieldElementInfo) getElementInfo();
return convertConstant(info.getConstant());
}
| public Object getConstant() throws JavaModelException {
SourceFieldElementInfo info = (SourceFieldElementInfo) getElementInfo();
return info.initializationSource;
}
|
private Message
sendAXFR(Message query) throws IOException {
Socket s = new Socket(addr, port);
s.setSoTimeout(timeoutValue);
try {
query = (Message) query.clone();
if (tsig != null)
tsig.apply(query, null);
byte [] out = query.toWire(Message.MAXLENGTH);
writeTCP(s, out);
byte [] in = readTCP(s);
Me... | private Message
sendAXFR(Message query) throws IOException {
Socket s = new Socket(addr, port);
s.setSoTimeout(timeoutValue);
try {
query = (Message) query.clone();
if (tsig != null)
tsig.apply(query, null);
byte [] out = query.toWire(Message.MAXLENGTH);
writeTCP(s, out);
byte [] in = readTCP(s);
Me... |
public MatchingNodeSet(boolean mustResolvePattern) {
super();
mustResolve = mustResolvePattern;
}
| public MatchingNodeSet(boolean mustResolvePattern) {
super();
this.mustResolve = mustResolvePattern;
}
|
public HtmlEditorController(ComposerController controller) {
super(controller);
// create view (by passing null as document, the view creates it)
view = new HtmlEditorView(this, null);
// FocusManager.getInstance().registerComponent(this);
view.addCaretListener(this);
}
| public HtmlEditorController(ComposerController controller) {
super(controller);
// create view (by passing null as document, the view creates it)
view = new HtmlEditorView(null);
// FocusManager.getInstance().registerComponent(this);
view.addCaretListener(this);
}
|
public void resolve() {
int startingTypeIndex = 0;
boolean isPackageInfo = isPackageInfo();
if (this.types != null && isPackageInfo) {
// resolve synthetic type declaration
final TypeDeclaration syntheticTypeDeclaration = types[0];
// set empty javadoc to avoid missing warning (see bug https://... | public void resolve() {
int startingTypeIndex = 0;
boolean isPackageInfo = isPackageInfo();
if (this.types != null && isPackageInfo) {
// resolve synthetic type declaration
final TypeDeclaration syntheticTypeDeclaration = types[0];
// set empty javadoc to avoid missing warning (see bug https://... |
public
static
void permutationDump() {
System.out.print("Current permutation is - ");
for(int i = 0; i < LENGTH; i++) {
System.out.print(names[i] + " ");
}
System.out.println();
}
// Loop through all possible 3^n combinations of not instantiating,
// instantiating and setting/not se... | public
static
void permutationDump() {
System.out.print("Current permutation is - ");
for(int i = 0; i < LENGTH; i++) {
System.out.print(names[i] + " ");
}
System.out.println();
}
// Loop through all possible 3^n combinations of not instantiating,
// instantiating and setting/not se... |
public void delete( ScarabUser user )
throws Exception
{
ModuleEntity module = getScarabModule();
if (user.hasPermission(ScarabSecurity.ITEM__APPROVE, module))
{
Criteria c = new Criteria()
.add(RModuleAttributePeer.MODULE_ID, getModu... | public void delete( ScarabUser user )
throws Exception
{
ModuleEntity module = getScarabModule();
if (user.hasPermission(ScarabSecurity.MODULE__EDIT, module))
{
Criteria c = new Criteria()
.add(RModuleAttributePeer.MODULE_ID, getModul... |
public static byte
value(String s) {
byte i = (byte) sections.getValue(s.toUpperCase());
if (i >= 0)
return i;
try {
return Byte.parseByte(s);
}
catch (Exception e) {
return (-1);
}
}
| public static byte
value(String s) {
byte i = (byte) sections.getValue(s.toLowerCase());
if (i >= 0)
return i;
try {
return Byte.parseByte(s);
}
catch (Exception e) {
return (-1);
}
}
|
public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
/* do not consider a type starting passed the type end (if set)
it must be belonging to an enclosing type */
if (methodDeclaration.declarationSourceEnd != 0
&& typeDeclaration.declarationSourceStart > methodDeclaration.decla... | public RecoveredElement add(TypeDeclaration typeDeclaration, int bracketBalanceValue) {
/* do not consider a type starting passed the type end (if set)
it must be belonging to an enclosing type */
if (methodDeclaration.declarationSourceEnd != 0
&& typeDeclaration.declarationSourceStart > methodDeclaration.decla... |
protected void pop3Authentification() throws Exception {
String password = new String("");
//String user = "";
String method = new String("");
boolean save = false;
boolean login = false;
boolean cancel = false;
PopItem item = accountItem.getPopItem();
PasswordDialog dialog = null;
// try to login u... | protected void pop3Authentification() throws Exception {
String password = new String("");
//String user = "";
String method = new String("");
boolean save = false;
boolean login = false;
boolean cancel = false;
PopItem item = accountItem.getPopItem();
PasswordDialog dialog = null;
// try to login u... |
public void actionPerformed(ActionEvent evt) {
final ComposerController composerController =
(ComposerController) getFrameController();
if (composerController.checkState())
return;
AccountItem item =
((ComposerModel) composerController.getModel()).getAccountItem();
SpecialFoldersItem folderItem = it... | public void actionPerformed(ActionEvent evt) {
final ComposerController composerController =
(ComposerController) getFrameMediator();
if (composerController.checkState())
return;
AccountItem item =
((ComposerModel) composerController.getModel()).getAccountItem();
SpecialFoldersItem folderItem = item... |
public boolean isVisible() {
String val = element.getAttribute(IWorkbenchRegistryConstants.ATT_VISIBLE);
return Boolean.parseBoolean(val);
}
| public boolean isVisible() {
String val = element.getAttribute(IWorkbenchRegistryConstants.ATT_VISIBLE);
return Boolean.valueOf(val).booleanValue();
}
|
public NewWizardDropDownAction(IWorkbenchWindow window,
ActionFactory.IWorkbenchAction showDlgAction,
IContributionItem newWizardMenu) {
super(WorkbenchMessages.getString("NewWizardDropDown.text")); //$NON-NLS-1$
if (window == null) {
throw new IllegalArgumentExc... | public NewWizardDropDownAction(IWorkbenchWindow window,
ActionFactory.IWorkbenchAction showDlgAction,
IContributionItem newWizardMenu) {
super(WorkbenchMessages.NewWizardDropDown_text);
if (window == null) {
throw new IllegalArgumentException();
}
... |
public static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory){
// if factory is null, default factory must be used
if (factory == null) factory = BufferManager.getDefaultBufferManager().getDefaultBufferFactory();
return getWorkingCopies(new BufferFactoryWrapper(factory));
}
| public static IWorkingCopy[] getSharedWorkingCopies(IBufferFactory factory){
// if factory is null, default factory must be used
if (factory == null) factory = BufferManager.getDefaultBufferManager().getDefaultBufferFactory();
return getWorkingCopies(BufferFactoryWrapper.create(factory));
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.