buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private String getMatchRuleString(final int matchRule) {
StringBuffer buffer = new StringBuffer();
for (int i=1; i<=8; i++) {
int bit = matchRule & (1<<(i-1));
if (buffer.length()>0) buffer.append(" | "); //$NON-NLS-1$
switch (bit) {
case SearchPattern.R_PREFIX_MATCH:
buffer.append("R_PREFIX_MATC... | private String getMatchRuleString(final int matchRule) {
StringBuffer buffer = new StringBuffer();
for (int i=1; i<=8; i++) {
int bit = matchRule & (1<<(i-1));
if (bit != 0 && buffer.length()>0) buffer.append(" | "); //$NON-NLS-1$
switch (bit) {
case SearchPattern.R_PREFIX_MATCH:
buffer.append("R... |
protected void playSound() {
// re-enable this feature later, make it a general option
// not a per-account based one
// -> playing wav-files should be only optional
// just play a system beep
// -> this works better for most people
// -> java doesn't support sound s... | protected void playSound() {
// re-enable this feature later, make it a general option
// not a per-account based one
// -> playing wav-files should be only optional
// just play a system beep
// -> this works better for most people
// -> java doesn't support sound s... |
public IDOMCompilationUnit createCompilationUnit(ICompilationUnit compilationUnit) {
initializeBuild(compilationUnit.getContents(), true, true);
getParser(JavaCore.getOptions()).parseCompilationUnit(compilationUnit, false);
return super.createCompilationUnit(compilationUnit);
}
| public IDOMCompilationUnit createCompilationUnit(ICompilationUnit compilationUnit) {
initializeBuild(compilationUnit.getContents(), true, true);
getParser(JavaCore.getOptions()).parseCompilationUnit(compilationUnit, false/*diet parse*/);
return super.createCompilationUnit(compilationUnit);
}
|
public void setJavaConventionsSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_argu... | public void setJavaConventionsSettings() {
this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
this.alignment_for_argu... |
static private RepositorySelector repositorySelector;
static {
// By default we use a DefaultRepositorySelector which always returns 'h'.
Hierarchy h = new Hierarchy(new RootCategory((Level) Level.DEBUG));
repositorySelector = new DefaultRepositorySelector(h);
Logger logger = LogManager.getLogger... | 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... |
private String getSelectClause(AbstractSchema schema,
JDBCReadAheadMetaData readAhead) {
JDBCEntityBridge selectEntity = schema.getEntityBridge();
// get a list of all fields to be loaded
List loadFields = new ArrayList();
loadFields.addAll(selectEntity.getPrimaryKeyFields());
... | private String getSelectClause(AbstractSchema schema,
JDBCReadAheadMetaData readAhead) {
JDBCEntityBridge selectEntity = schema.getEntityBridge();
// get a list of all fields to be loaded
List loadFields = new ArrayList();
loadFields.addAll(selectEntity.getPrimaryKeyFields());
... |
public void generateStoreSaveValueIfNecessary(BlockScope currentScope, CodeStream codeStream){
// push receiver
codeStream.aload_0();
// push the 2 parameters of "setResult(Object, Class)"
if (this.expression == null || this.expressionType == VoidBinding) { // expressionType == VoidBinding if code snippet is the ... | public void generateStoreSaveValueIfNecessary(BlockScope currentScope, CodeStream codeStream){
// push receiver
codeStream.aload_0();
// push the 2 parameters of "setResult(Object, Class)"
if (this.expression == null || this.expressionType == VoidBinding) { // expressionType == VoidBinding if code snippet is the ... |
public IClasspathEntry findSourceAttachmentRecommendation() {
try {
IPath rootPath = this.getPath();
IClasspathEntry entry;
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
// try on enclosing project first
JavaProject parentProject = (JavaProject) getJavaProject();
try {
entr... | public IClasspathEntry findSourceAttachmentRecommendation() {
try {
IPath rootPath = this.getPath();
IClasspathEntry entry;
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
// try on enclosing project first
JavaProject parentProject = (JavaProject) getJavaProject();
try {
entr... |
public void testModelElement() {
Object me = getFactory().create(Uml.OBJECT);
assertNotNull("Didn't create object", me);
assertTrue("Should be a base", ModelFacade.isABase(me));
assertTrue("Should be a model element", ModelFacade.isAModelElement(me));
}
| public void testModelElement() {
Object me = ModelFacade.getFacade().create(Uml.OBJECT);
assertNotNull("Didn't create object", me);
assertTrue("Should be a base", ModelFacade.isABase(me));
assertTrue("Should be a model element", ModelFacade.isAModelElement(me));
}
|
protected void initRenderer() throws Exception {
TableItem tableItem =
(TableItem) MailConfig.getMainFrameOptionsConfig().getTableItem();
TableRendererPluginHandler handler = null;
try {
handler =
(
TableRendererPluginHandler) MainInterface
.pluginManager
.getHandler(
"org.columb... | protected void initRenderer() throws Exception {
TableItem tableItem =
(TableItem) MailConfig.getMainFrameOptionsConfig().getTableItem();
TableRendererPluginHandler handler = null;
try {
handler =
(
TableRendererPluginHandler) MainInterface
.pluginManager
.getHandler(
"org.columb... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
boolean nonStatic = !binding.isStatic();
receiver.analyseCode(currentScope, flowContext, flowInfo, nonStatic);
if (nonStatic) {
receiver.checkNPE(currentScope, flowContext, flowInfo, true);
}
... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
boolean nonStatic = !binding.isStatic();
receiver.analyseCode(currentScope, flowContext, flowInfo, nonStatic);
if (nonStatic) {
receiver.checkNPE(currentScope, flowContext, flowInfo);
}
if ... |
protected ActionGenerateAll() {
super("Generate All Classes", NO_ICON);
}
| protected ActionGenerateAll() {
super("action.generate-all-classes", NO_ICON);
}
|
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("{");
for (Enumeration e= fMonies.elements(); e.hasMoreElements(); )
buffer.append((Money) e.nextElement());
buffer.append("}");
return buffer.toString();
}
| public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("{");
for (Enumeration e= fMonies.elements(); e.hasMoreElements(); )
buffer.append(e.nextElement());
buffer.append("}");
return buffer.toString();
}
|
public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
if (visitor.visit(this, scope)) {
if (this.memberValuePairs != null) {
int memberValuePairsLength = this.memberValuePairs.length;
for (int i = 0; i < memberValuePairsLength; i++)
this.memberValuePairs[i].traverse(visitor, scope);
... | public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.memberValuePairs != null) {
int memberValuePairsLength = this.memberValuePairs.length;
for (int i = 0; i < memberValuePairsLength; i++)
this.memberValuePairs[i].traverse(visitor, scope);
}
}
... |
protected Dimension getPreferredMenuItemSize(
JComponent c,
Icon checkIcon,
Icon arrowIcon,
int defaultTextIconGap) {
JMenuItem b = (JMenuItem) c;
Icon icon = (Icon) b.getIcon();
if (icon == null)
b.setIcon(new EmptyIcon());
Dimension d =
super.getPreferredMenuItemSize(
c,
checkIcon,
... | protected Dimension getPreferredMenuItemSize(
JComponent c,
Icon checkIcon,
Icon arrowIcon,
int defaultTextIconGap) {
JMenuItem b = (JMenuItem) c;
Icon icon = (Icon) b.getIcon();
if (icon == null)
b.setIcon(new EmptyIcon());
Dimension d =
super.getPreferredMenuItemSize(
c,
checkIcon,
... |
public void println( String str ) {
in();
super.print( str );
out();
}
| public void println( String str ) {
in();
super.println( str );
out();
}
|
public String toString(int tab) {
StringBuffer result = new StringBuffer(tabString(tab));
result.append("Recovered type:\n"); //$NON-NLS-1$
if ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0) {
result.append(tabString(tab));
result.append(" "); //$NON-NLS-1$
}
result.append(typeDeclaration.print(tab... | public String toString(int tab) {
StringBuffer result = new StringBuffer(tabString(tab));
result.append("Recovered type:\n"); //$NON-NLS-1$
if ((typeDeclaration.bits & ASTNode.IsAnonymousTypeMASK) != 0) {
result.append(tabString(tab));
result.append(" "); //$NON-NLS-1$
}
typeDeclaration.print(tab + 1, result);... |
private void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0))
throw new InvalidInputException(Main.bind("configure.noSourceFile")); //$NON-NLS-1$
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog =... | private void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0))
throw new InvalidInputException(Main.bind("configure.noSourceFile")); //$NON-NLS-1$
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog =... |
public SearchFrame(FrameMediator frameController,
MessageFolder folder) {
super();
this.frameController = frameController;
setTitle(MailResourceLoader.getString("dialog", "filter",
"searchdialog_title"));
//this.folder = folder;
//this.vFolderNode = v... | public SearchFrame(FrameMediator frameController,
MessageFolder folder) {
super(frameController.getView().getFrame(), true);
this.frameController = frameController;
setTitle(MailResourceLoader.getString("dialog", "filter",
"searchdialog_title"));
//this.folde... |
public void mouseMoved(MouseEvent me) {
int index = _list.locationToIndex(me.getPoint());
if (index == -1) return;
String tip = _list.getModel().getElementAt(index).toString();
System.out.println("tip=" + tip);
_list.setToolTipText(tip);
}
| public void mouseMoved(MouseEvent me) {
int index = _list.locationToIndex(me.getPoint());
if (index == -1) return;
String tip = _list.getModel().getElementAt(index).toString();
//System.out.println("tip=" + tip);
_list.setToolTipText(tip);
}
|
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$
}
if (!org.eclipse.jdt.internal.compiler.util.Util.isJavaFileName(name)) {
return new Status(IStatus.ERRO... | 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$
}
if (!org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(name)) {
return new Status(IStatus.ERRO... |
public
void main(String[] args) {
int t;
for(int len = SBUF_LEN; len <= BIGBUF_LEN; len*=4, RUN_LENGTH /= 4) {
System.out.println("<td>"+len+"\n");
for(int second = 0; second < 16;) {
System.out.println("SECOND loop="+second +", RUN_LENGTH="
+RUN_LENGTH+", len="+len);
t = (int)ne... | public
void main(String[] args) {
int t;
for(int len = SBUF_LEN; len <= BIGBUF_LEN; len*=4, RUN_LENGTH /= 4) {
System.out.println("<td>"+len+"\n");
for(int second = 0; second < 16;) {
System.out.println("SECOND loop="+second +", RUN_LENGTH="
+RUN_LENGTH+", len="+len);
t = (int)ne... |
private String getSecondaryMessage(StatusAdapter statusAdapter) {
String primary = getPrimaryMessage(statusAdapter);
// we can skip the title, it is always displayed as primary message
// if there was message set in the status
IStatus status = statusAdapter.getStatus();
if (status.getMessage() != null
&... | private String getSecondaryMessage(StatusAdapter statusAdapter) {
String primary = getPrimaryMessage(statusAdapter);
// we can skip the title, it is always displayed as primary message
// if there was message set in the status
IStatus status = statusAdapter.getStatus();
if (status.getMessage() != null
&... |
public void load()
throws IOException {
String preferenceString = preferenceStore.getString(KEY);
if (preferenceString != null && preferenceString.length() != 0) {
Reader reader = new StringReader(preferenceString);
try {
IMemento memento = XMLMemento.createReadRoot(reader);
activeKeyConfig... | public void load()
throws IOException {
String preferenceString = preferenceStore.getString(KEY);
if (preferenceString != null && preferenceString.length() != 0) {
Reader reader = new StringReader(preferenceString);
try {
IMemento memento = XMLMemento.createReadRoot(reader);
activeKeyConfig... |
public void addSearchToHistory() throws Exception {
VirtualFolder searchFolder = (VirtualFolder) FolderTreeModel
.getInstance().getFolder(106);
// only create new subfolders if we used the default "Search Folder"
if (!searchFolder.equals(this)) {
return;
}
// we only want 10 subfolders
// -> if mo... | public void addSearchToHistory() throws Exception {
VirtualFolder searchFolder = (VirtualFolder) FolderTreeModel
.getInstance().getFolder(106);
// only create new subfolders if we used the default "Search Folder"
if (!searchFolder.equals(this)) {
return;
}
// we only want 10 subfolders
// -> if mo... |
public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
ColumbaLogger.log.debug("Save Message Source As... called");
SaveMessageSourceAsCommand c = new SaveMessageSourceAsCommand(r);
MainIn... | public void actionPerformed(ActionEvent evt) {
FolderCommandReference[] r = ((AbstractMailFrameController) getFrameMediator()).getTableSelection();
ColumbaLogger.log.info("Save Message Source As... called");
SaveMessageSourceAsCommand c = new SaveMessageSourceAsCommand(r);
MainInt... |
protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException {
if (sourceFile == null || problems == null || problems.length == 0) return;
String missingClassFile = null;
IResource resource = sourceFile.resource;
HashSet managedMarkerTypes = JavaModelManager.getJavaMod... | protected void storeProblemsFor(SourceFile sourceFile, CategorizedProblem[] problems) throws CoreException {
if (sourceFile == null || problems == null || problems.length == 0) return;
String missingClassFile = null;
IResource resource = sourceFile.resource;
HashSet managedMarkerTypes = JavaModelManager.getJavaMod... |
public FlowInfo addPotentialInitializationsFrom(FlowInfo inits) {
if (this == DEAD_END){
return this;
}
if (inits == DEAD_END){
return this;
}
UnconditionalFlowInfo otherInits = inits.unconditionalInits();
// union of potentially set ones
this.potentialInits |= otherInits.potentialInits;
// treating extra s... | public FlowInfo addPotentialInitializationsFrom(FlowInfo inits) {
if (this == DEAD_END){
return this;
}
if (inits == DEAD_END){
return this;
}
UnconditionalFlowInfo otherInits = inits.unconditionalInits();
// union of potentially set ones
this.potentialInits |= otherInits.potentialInits;
// treating extra s... |
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
ToolBarManager shortcutBar = getShortcutBar();
Control shortcutBarControl = null;
if (shortcutBar != null)
shortcutBarControl = shortcutBar.getControl();
boolean shortcutbarW... | public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
ToolBarManager shortcutBar = getShortcutBar();
Control shortcutBarControl = null;
if (shortcutBar != null)
shortcutBarControl = shortcutBar.getControl();
boolean shortcutbarW... |
public FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
if (synthetics == null || synthetics[FIELD] == null) return null;
FieldBinding field = (FieldBinding) synthetics[FIELD].get(targetEnclosingType);
if (field != null) return field;
// type compatibility : to handle... | public FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
if (synthetics == null || synthetics[FIELD] == null) return null;
FieldBinding field = (FieldBinding) synthetics[FIELD].get(targetEnclosingType);
if (field != null) return field;
// type compatibility : to handle... |
protected boolean isRenamingMainType(IJavaElement element, IJavaElement dest) throws JavaModelException {
if ((isRename() || getNewNameFor(element) != null)
&& dest.getElementType() == IJavaElement.COMPILATION_UNIT) {
String typeName = dest.getElementName();
typeName = typeName.substring(0, typeName.length() - 5... | protected boolean isRenamingMainType(IJavaElement element, IJavaElement dest) throws JavaModelException {
if ((isRename() || getNewNameFor(element) != null)
&& dest.getElementType() == IJavaElement.COMPILATION_UNIT) {
String typeName = dest.getElementName();
typeName = org.eclipse.jdt.internal.core.util.Util.get... |
public
static
void main(String argv[]) {
if(argv.length == 1)
init(argv[0]);
else
usage("Wrong number of arguments.");
test();
}
static
void usage(String msg) {
System.err.println(msg);
System.err.println( "Usage: java " + DelayedLoop.class.getName() +
"configFile")... | public
static
void main(String argv[]) {
if(argv.length == 1)
init(argv[0]);
else
usage("Wrong number of arguments.");
test();
}
static
void usage(String msg) {
System.err.println(msg);
System.err.println( "Usage: java " + DelayedLoop.class.getName() +
"configFile")... |
public MethodDeclaration(CompilationResult compilationResult) {
super(compilationResult);
}
public void analyseCode(ClassScope classScope, InitializationFlowContext initializationContext, FlowInfo flowInfo) {
// starting of the code analysis for methods
if (this.ignoreFurtherInvestigation)
return;
try {
... | public MethodDeclaration(CompilationResult compilationResult) {
super(compilationResult);
}
public void analyseCode(ClassScope classScope, InitializationFlowContext initializationContext, FlowInfo flowInfo) {
// starting of the code analysis for methods
if (this.ignoreFurtherInvestigation)
return;
try {
... |
public RecoveredElement add(TypeDeclaration memberTypeDeclaration, int bracketBalanceValue) {
/* do not consider a type starting passed the type end (if set)
it must be belonging to an enclosing type */
if (typeDeclaration.declarationSourceEnd != 0
&& memberTypeDeclaration.declarationSourceStart > typeDeclarati... | public RecoveredElement add(TypeDeclaration memberTypeDeclaration, int bracketBalanceValue) {
/* do not consider a type starting passed the type end (if set)
it must be belonging to an enclosing type */
if (typeDeclaration.declarationSourceEnd != 0
&& memberTypeDeclaration.declarationSourceStart > typeDeclarati... |
private void makeActions() {
// The actions in jface do not have menu vs. enable, vs. disable vs. color
// There are actions in here being passed the workbench - problem
// Get services for notification.
IPartService partService = window.getPartService();
WWinKeyBindingService keyBindingService = window.g... | private void makeActions() {
// The actions in jface do not have menu vs. enable, vs. disable vs. color
// There are actions in here being passed the workbench - problem
// Get services for notification.
IPartService partService = window.getPartService();
WWinKeyBindingService keyBindingService = window.g... |
public void resolveStatements() {
if (this.statements != null) {
for (int i = 0, length = this.statements.length; i < length; i++) {
this.statements[i].resolve(this.scope);
}
} else if ((this.bits & UndocumentedEmptyBlockMASK) != 0) {
this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart... | public void resolveStatements() {
if (this.statements != null) {
for (int i = 0, length = this.statements.length; i < length; i++) {
this.statements[i].resolve(this.scope);
}
} else if ((this.bits & UndocumentedEmptyBlock) != 0) {
this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, ... |
public static void main(String[] args) throws Exception {
// Uncomment the following line in order to enable log statements generated
// from joran itself.
// org.apache.log4j.BasicConfigurator.configure();
RuleStore ruleStore = new SimpleRuleStore();
// we start with the rule for the t... | public static void main(String[] args) throws Exception {
// Uncomment the following line in order to enable log statements generated
// from joran itself.
// org.apache.log4j.BasicConfigurator.configure();
RuleStore ruleStore = new SimpleRuleStore();
// we start with the rule for the t... |
public int getNodeType() {
return TEXT_ELEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone(AST target) {
TextElement result = new TextElement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setText(getText());
return result;
}... | public int getNodeType() {
return TEXT_ELEMENT;
}
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
ASTNode clone0(AST target) {
TextElement result = new TextElement(target);
result.setSourceRange(this.getStartPosition(), this.getLength());
result.setText(getText());
return result;
... |
protected IClasspathEntry copy(IClasspathEntry entry) throws JavaModelException {
switch (entry.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
return JavaCore.newContainerEntry(entry.getPath(), entry.getAccessibleFiles(), entry.getNonAccessibleFiles(), entry.getExtraAttributes(), entry.isExported());
... | protected IClasspathEntry copy(IClasspathEntry entry) throws JavaModelException {
switch (entry.getEntryKind()) {
case IClasspathEntry.CPE_CONTAINER:
return JavaCore.newContainerEntry(entry.getPath(), entry.getAccessibleFiles(), entry.getNonAccessibleFiles(), entry.getExtraAttributes(), entry.isExported());
... |
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 configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0))
throw new InvalidInputException(Main.bind("configure.noSourceFile")); //$NON-NLS-1$
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog =... | private void configure(String[] argv) throws InvalidInputException {
if ((argv == null) || (argv.length == 0))
throw new InvalidInputException(Main.bind("configure.noSourceFile")); //$NON-NLS-1$
final int InsideClasspath = 1;
final int InsideDestinationPath = 2;
final int TargetSetting = 4;
final int InsideLog =... |
public void myDoubleClick(Object src) {
int row = _resultsTable.getSelectionModel().getMinSelectionIndex();
Object sel = null;
Diagram d = null;
if (src == _resultsTable) {
sel = _results.elementAt(row);
d = (Diagram) _diagrams.elementAt(row);
}
else {
_numJumpToRelated++;
... | public void myDoubleClick(Object src) {
int row = _resultsTable.getSelectionModel().getMinSelectionIndex();
Object sel = null;
Diagram d = null;
if (src == _resultsTable) {
sel = _results.elementAt(row);
d = (Diagram) _diagrams.elementAt(row);
}
else {
_numJumpToRelated++;
... |
public ReceiveSendAction(AbstractFrameController controller) {
super(
controller,
MailResourceLoader.getString(
"menu", "mainframe", "menu_file_receivesend"));
// tooltip text
setTooltipText(
MailResourceLoader.getString(
"menu", "mainframe", "menu_file_receivesend_tooltip"));
... | public ReceiveSendAction(AbstractFrameController controller) {
super(
controller,
MailResourceLoader.getString(
"menu", "mainframe", "menu_file_receivesend"));
// tooltip text
setTooltipText(
MailResourceLoader.getString(
"menu", "mainframe", "menu_file_receivesend_tooltip"));
... |
protected void executeOperation() throws JavaModelException {
if (this.progressMonitor != null){
if (this.progressMonitor.isCanceled())
throw new OperationCanceledException();
this.progressMonitor.beginTask(Messages.element_reconciling, 2);
}
CompilationUnit workingCopy = getWorkingCopy();
boolea... | protected void executeOperation() throws JavaModelException {
if (this.progressMonitor != null){
if (this.progressMonitor.isCanceled())
throw new OperationCanceledException();
this.progressMonitor.beginTask(Messages.element_reconciling, 2);
}
CompilationUnit workingCopy = getWorkingCopy();
boolea... |
// public boolean equalTo(Object other) { return true; }
// }
// interface Equivalent<T> { boolean equalTo(T other); }
// interface EqualityComparable { boolean equalTo(Object other); }
// class A<T extends Number> { void m(T t) {} }
// class B<S extends Integer> extends A<S> { void m(S t) {}}
// class ... | // public boolean equalTo(Object other) { return true; }
// }
// interface Equivalent<T> { boolean equalTo(T other); }
// interface EqualityComparable { boolean equalTo(Object other); }
// class A<T extends Number> { void m(T t) {} }
// class B<S extends Integer> extends A<S> { void m(S t) {}}
// class ... |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
Constant opConstant;
if ((opConstant = left.constant) != NotAConstant) {
if (opConstant.booleanValue() == true) {
// TRUE && anything
FlowInfo mergedInfo = right.analyseCode(currentScope, flowContext, flowInfo... | public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
Constant opConstant;
if ((opConstant = left.constant) != NotAConstant) {
if (opConstant.booleanValue() == true) {
// TRUE && anything
FlowInfo mergedInfo = right.analyseCode(currentScope, flowContext, flowInfo... |
public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRuleSet access) {
paths.add(documentPath);
return true;
}
| public boolean acceptIndexMatch(String documentPath, SearchPattern indexRecord, SearchParticipant participant, AccessRuleSet access) {
this.paths.add(documentPath);
return true;
}
|
public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
Expression reference, int checkType, FlowInfo flowInfo) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0 ||
flowInfo.isDefinitelyUnknown(local)) {
return;
}
switch (checkType) {
case CAN_ONLY_NULL_NON_NULL :
if (flowInfo.... | public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
Expression reference, int checkType, FlowInfo flowInfo) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0 ||
flowInfo.isDefinitelyUnknown(local)) {
return;
}
switch (checkType) {
case CAN_ONLY_NULL_NON_NULL :
if (flowInfo.... |
public void updateGUI() throws Exception {
System.out.println(body);
viewerPlugin.view(body);
}
| public void updateGUI() throws Exception {
LOG.info(body);
viewerPlugin.view(body);
}
|
public StackPresentation createViewPresentation(Composite parent,
IStackPresentationSite site) {
DefaultTabFolder folder = new DefaultTabFolder(parent, viewTabPosition
| SWT.BORDER, site
.supportsState(IStackPresentationSite.STATE_MINIMIZED), site
.supportsState(IStackPresentationSite.STATE_MAXIMIZED... | public StackPresentation createViewPresentation(Composite parent,
IStackPresentationSite site) {
DefaultTabFolder folder = new DefaultTabFolder(parent, viewTabPosition
| SWT.BORDER, site
.supportsState(IStackPresentationSite.STATE_MINIMIZED), site
.supportsState(IStackPresentationSite.STATE_MAXIMIZED... |
public static Test suite() {
TestSuite suite = new TestSuite("Test for org.columba.core.command");
//$JUnit-BEGIN$
suite.addTest(new TestSuite(DefaultProcessorTest.class));
//$JUnit-END$
return suite;
}
| public static Test suite() {
TestSuite suite = new TestSuite("Test for org.columba.api.command");
//$JUnit-BEGIN$
suite.addTest(new TestSuite(DefaultProcessorTest.class));
//$JUnit-END$
return suite;
}
|
public int
hashCode() {
int code = labels;
for (int i = 0; i < labels; i++) {
for (int j = 0; j < name[i].length(); j++)
code += name[i].charAt(j);
}
return code;
}
| public int
hashCode() {
int code = labels;
for (int i = 0; i < labels; i++) {
for (int j = 0; j < name[i].length(); j++)
code += Character.toLowerCase(name[i].charAt(j));
}
return code;
}
|
private void showErrorDialog(String details, Exception e) {
if (details == null)
details = e.toString();
new ErrorDialog(details, e);
}
| private void showErrorDialog(String details, Exception e) {
if (details == null)
details = e.toString();
ErrorDialog.createDialog(details, e);
}
|
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if method from parameterized type got found, use the original method at codegen time
this.codegenBinding = this.binding.original();
if (this.codegenBinding != this.binding) {
// ... | public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if (!flowInfo.isReachable()) return;
// if method from parameterized type got found, use the original method at codegen time
this.codegenBinding = this.binding.original();
if (this.codegenBinding != this.binding) {
// ... |
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.equalsIgnoreCase(exte... | 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.equalsIgnoreCase(exte... |
public MethodBinding[] methods() {
if ((tagBits & AreMethodsComplete) != 0)
return methods;
int failed = 0;
try {
boolean isViewedAsDeprecated = isViewedAsDeprecated();
boolean complyTo15 = fPackage.environment.options.sourceLevel >= ClassFileConstants.JDK1_5;
for (int i = 0, length = methods.length; i < le... | public MethodBinding[] methods() {
if ((tagBits & AreMethodsComplete) != 0)
return methods;
int failed = 0;
try {
boolean isViewedAsDeprecated = isViewedAsDeprecated();
boolean complyTo15 = fPackage.environment.options.sourceLevel >= ClassFileConstants.JDK1_5;
for (int i = 0, length = methods.length; i < le... |
public IStatus restoreState(IMemento memento, IPerspectiveDescriptor activeDescriptor) {
Assert.isNotNull(getShell());
MultiStatus result = new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, WorkbenchMessages.getString("WorkbenchWindow.problemsRestoringWindow"), null); //$NON-NLS-1$
// Read window's bounds and ... | public IStatus restoreState(IMemento memento, IPerspectiveDescriptor activeDescriptor) {
Assert.isNotNull(getShell());
MultiStatus result = new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, WorkbenchMessages.getString("WorkbenchWindow.problemsRestoringWindow"), null); //$NON-NLS-1$
// Read window's bounds and ... |
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
codeStream.aload_0();
codeStream.getfield(delegateThis);
}
codeStream.recordPositionsFrom(pc, this);
}
| public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
codeStream.aload_0();
codeStream.getfield(delegateThis);
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
|
public void doService(Request req, Response res)
throws Exception
{
// this is how get locale is implemented. Ugly, but it's in
// the next round of optimizations
Locale locale=RequestUtil.getLocale(req);
StringManager sm=StringManager.
getManager("org.apache.tomcat.resources",locale);
DateFormat dat... | public void doService(Request req, Response res)
throws Exception
{
// this is how get locale is implemented. Ugly, but it's in
// the next round of optimizations
Locale locale=RequestUtil.getLocale(req.getMimeHeaders());
StringManager sm=StringManager.
getManager("org.apache.tomcat.resources",locale)... |
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
if (value == null) {
setText("");
return this;
}
String str = null;
try {
str = (String) ((MessageNod... | public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
if (value == null) {
setText("");
return this;
}
String str = null;
try {
str = (String) ((MessageNod... |
public static Request aClass(Class<?> clazz) {
return new ClassRequest(clazz);
}
/**
* Create a <code>Request</code> that, when processed, will run all the tests
* in a set of classes.
* @param collectionName a name to identify this suite of tests
* @param classes the classes containing the tests
* @ret... | public static Request aClass(Class<?> clazz) {
return new ClassRequest(clazz);
}
/**
* Create a <code>Request</code> that, when processed, will run all the tests
* in a set of classes.
* @param collectionName a name to identify this suite of tests
* @param classes the classes containing the tests
* @ret... |
public void recentChanged(String arg0, int arg1) {
selectedStatus.setRecent(arg1);
// We trigger an update only when the exists changed
// which should be equal with a Recent change.
}
| public void recentChanged(String arg0, int arg1) {
//selectedStatus.setRecent(arg1);
// We trigger an update only when the exists changed
// which should be equal with a Recent change.
}
|
private TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = NotAConstant;
if (this.type == null) {
this.resolvedType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.res... | private TypeBinding internalResolveType(Scope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
this.constant = NotAConstant;
if (this.type == null) {
this.resolvedType = scope.enclosingSourceType();
} else if (scope.kind == Scope.CLASS_SCOPE) {
this.res... |
private void deletePackageFragment(IPackageFragment frag)
throws JavaModelException {
IResource res = frag.getCorrespondingResource();
if (res != null && res.getType() == IResource.FOLDER) {
// collect the children to remove
IJavaElement[] childrenOfInterest = frag.getChildren();
if (childrenOfInterest.length ... | private void deletePackageFragment(IPackageFragment frag)
throws JavaModelException {
IResource res = frag.getCorrespondingResource();
if (res != null && res.getType() == IResource.FOLDER) {
// collect the children to remove
IJavaElement[] childrenOfInterest = frag.getChildren();
if (childrenOfInterest.length ... |
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = receiver.resolveType(scope);
if (this.receiverType == null)... | public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
// and initialized with a (compile time) constant
// regular receiver reference
this.receiverType = receiver.resolveType(scope);
if (this.receiverType == null)... |
public CompilationResult compilationResult() {
return this.compilationResult;
}
/**
* Bytecode generation for a method
* @param classScope
* @param classFile
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false;... | public CompilationResult compilationResult() {
return this.compilationResult;
}
/**
* Bytecode generation for a method
* @param classScope
* @param classFile
*/
public void generateCode(ClassScope classScope, ClassFile classFile) {
int problemResetPC = 0;
classFile.codeStream.wideMode = false;... |
public void actionPerformed(ActionEvent evt) {
/*
* *20030620, karlpeder* Action has been implemented
*/
// get selected stuff
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameController()).
getTableSelection();
// add command for execution
CreateFilterOnMessageCommand c =... | public void actionPerformed(ActionEvent evt) {
/*
* *20030620, karlpeder* Action has been implemented
*/
// get selected stuff
FolderCommandReference[] r =
((AbstractMailFrameController) getFrameMediator()).
getTableSelection();
// add command for execution
CreateFilterOnMessageCommand c =
... |
public ChainsawAppenderHandler(ChainsawAppender appender) {
appender.addAppender(this);
activateOptions();
}
| public ChainsawAppenderHandler(ChainsawAppender appender) {
appender.setAppender(this);
activateOptions();
}
|
public ClassScope(Scope parent, TypeDeclaration context) {
super(CLASS_SCOPE, parent);
this.referenceContext = context;
}
void buildAnonymousTypeBinding(SourceTypeBinding enclosingType, ReferenceBinding supertype) {
LocalTypeBinding anonymousType = buildLocalType(enclosingType, enclosingType.fPackage);
... | public ClassScope(Scope parent, TypeDeclaration context) {
super(CLASS_SCOPE, parent);
this.referenceContext = context;
}
void buildAnonymousTypeBinding(SourceTypeBinding enclosingType, ReferenceBinding supertype) {
LocalTypeBinding anonymousType = buildLocalType(enclosingType, enclosingType.fPackage);
... |
public Expression getExpression() {
if (this.expression == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.expression == null) {
preLazyInit();
this.expression = new SimpleName(this.ast);
postLazyInit(this.expression, EXPRESSION_PROPERTY);
}
}
... | public Expression getExpression() {
if (this.expression == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.expression == null) {
preLazyInit();
this.expression = new SimpleName(this.ast);
postLazyInit(this.expression, EXPRESSION_PROPERTY);
}
}
}
... |
public TypeBinding literalType(BlockScope scope) {
return CharBinding;
}
| public TypeBinding literalType(BlockScope scope) {
return TypeBinding.CHAR;
}
|
public MathPackExample() {
try {
model = new Model("default");
mathPackClass = new MMClass("MathPack");
utilityStereotype = new Stereotype("utility", "Class");
realType = new DataType("Real");
angleType = new DataType("Angle");
op1 = new Operation(realType, "sin", angleType, "x... | public MathPackExample() {
try {
model = new Model("MathPackExample");
mathPackClass = new MMClass("MathPack");
utilityStereotype = new Stereotype("utility", "Class");
realType = new DataType("Real");
angleType = new DataType("Angle");
op1 = new Operation(realType, "sin", angle... |
public void layoutComponents() {
setBorder(BorderFactory.createEmptyBorder(1, 0, 1, 0));
FormLayout l = new FormLayout(
"default, 1dlu, fill:default:grow, 3dlu, default, 3dlu, default",
"fill:default:grow");
PanelBuilder b = new PanelBuilder(this, l);
CellConstraints c = new CellConstraints();
b.a... | public void layoutComponents() {
setBorder(BorderFactory.createEmptyBorder(1, 0, 1, 0));
FormLayout l = new FormLayout(
"default, 3dlu, fill:default:grow, 3dlu, default, 3dlu, default",
"fill:default:grow");
PanelBuilder b = new PanelBuilder(this, l);
CellConstraints c = new CellConstraints();
b.a... |
public void mouseClicked(MouseEvent me) {
super.mousePressed(me);
boolean targetIsSet = false;
| public void mouseClicked(MouseEvent me) {
super.mouseClicked(me);
boolean targetIsSet = false;
|
public static String id() {
return "4.5-SNAPSHOT-20070816-1619";
}
| public static String id() {
return "4.5-SNAPSHOT-20070831-1702";
}
|
protected void parseHostHeader() {
MessageBytes hH=getMimeHeaders().getValue("host");
serverPort = socket.getLocalPort();
if (hH != null) {
// XXX use MessageBytes
String hostHeader = hH.toString();
int i = hostHeader.indexOf(':');
if (i > -1) {
serverNameMB.setString( hostHeader.sub... | protected void parseHostHeader() {
MessageBytes hH=getMimeHeaders().getValue("host");
serverPort = socket.getLocalPort();
if (hH != null) {
// XXX use MessageBytes
String hostHeader = hH.toString();
int i = hostHeader.indexOf(':');
if (i > -1) {
serverNameMB.setString( hostHeader.sub... |
public DynamicHelpAction(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId(IWorkbenchCommandConstants.HELP_DYNAMICHELP);
// support for allowing a product to override the text for the action
String overrideText ... | public DynamicHelpAction(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
setActionDefinitionId(IWorkbenchCommandConstants.HELP_DYNAMIC_HELP);
// support for allowing a product to override the text for the action
String overrideText... |
public PropPanelInterface() {
super("Interface", _interfaceIcon,3);
Class mclass = MInterface.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo.localize("UMLMenu", "label.stereotype"),2,0,0);
// stereotypeBox.setEnabled(false);
... | public PropPanelInterface() {
super("Interface", _interfaceIcon,3);
Class mclass = MInterface.class;
addCaption(Argo.localize("UMLMenu", "label.name"),1,0,0);
addField(nameField,1,0,0);
addCaption(Argo.localize("UMLMenu", "label.stereotype"),2,0,0);
// stereotypeBox.setEnabled(false);
... |
protected void report(SearchMatch match) throws CoreException {
long start = -1;
if (BasicSearchEngine.VERBOSE) {
start = System.currentTimeMillis();
System.out.println("Reporting match"); //$NON-NLS-1$
System.out.println("\tResource: " + match.getResource()); //$NON-NLS-2$//$NON-NLS-1$
System.out.println("\t... | protected void report(SearchMatch match) throws CoreException {
long start = -1;
if (BasicSearchEngine.VERBOSE) {
start = System.currentTimeMillis();
System.out.println("Reporting match"); //$NON-NLS-1$
System.out.println("\tResource: " + match.getResource());//$NON-NLS-1$
System.out.println("\tPositions: [of... |
public SourceFile(String fileName, String initialTypeName, String encoding) {
this.fileName = fileName.toCharArray();
CharOperation.replace(this.fileName, '\\', '/');
char[] typeName = initialTypeName.toCharArray();
int lastIndex = CharOperation.lastIndexOf('/', typeName);
this.mainTypeName = CharOperatio... | public SourceFile(String fileName, String initialTypeName, String encoding) {
this.fileName = fileName.toCharArray();
CharOperation.replace(this.fileName, '\\', '/');
char[] typeName = initialTypeName.toCharArray();
int lastIndex = CharOperation.lastIndexOf('/', typeName);
this.mainTypeName = CharOperatio... |
private void setPerspective(Perspective newPersp) {
// Don't do anything if already active layout
Perspective oldPersp = getActivePerspective();
if (oldPersp == newPersp)
return;
if (newPersp != null) {
IStatus status = newPersp.restoreState();
if (status.getSeverity() != IStatus.OK) {
String tit... | private void setPerspective(Perspective newPersp) {
// Don't do anything if already active layout
Perspective oldPersp = getActivePerspective();
if (oldPersp == newPersp)
return;
if (newPersp != null) {
IStatus status = newPersp.restoreState();
if (status.getSeverity() != IStatus.OK) {
String tit... |
public SimpleName getName() {
if (this.fieldName == null) {
// lazy init must be thread-safe for readers
synchronized (this.ast) {
if (this.fieldName == null) {
preLazyInit();
this.fieldName = new SimpleName(this.ast);
postLazyInit(this.fieldName, NAME_PROPERTY);
}
}
}
return this... | public SimpleName getName() {
if (this.fieldName == null) {
// lazy init must be thread-safe for readers
synchronized (this) {
if (this.fieldName == null) {
preLazyInit();
this.fieldName = new SimpleName(this.ast);
postLazyInit(this.fieldName, NAME_PROPERTY);
}
}
}
return this.fie... |
public void finished() {
frame.setVisible(false);
//mainFrame.setVisible(true);
if (MailConfig.getAccountList().count()==0)
new AccountWizard();
new CmdLineArgumentHandler(args);
}
}; // StartupWorker$
worker.start();
} // main
| public void finished() {
frame.setVisible(false);
//mainFrame.setVisible(true);
if (MailConfig.getAccountList().count()==0)
new AccountWizard(false);
new CmdLineArgumentHandler(args);
}
}; // StartupWorker$
worker.start();
} // main
|
public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
try {
// if index is already cached, then do not perform any check
// MUST reset the IndexManager if a jar file is changed
IIndex index = (IIndex) mana... | public boolean execute(IProgressMonitor progressMonitor) {
if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
try {
// if index is already cached, then do not perform any check
// MUST reset the IndexManager if a jar file is changed
IIndex index = manager.getIn... |
public static void add(TableOwnerInterface frameController) {
list.add(frameController);
}
} | public static void add(TableOwner frameController) {
list.add(frameController);
}
} |
public boolean readViewerContributions(String id, ISelectionProvider prov,
IWorkbenchPart part) {
Assert.isTrue(part instanceof IViewPart || part instanceof IEditorPart);
provider = prov;
this.part = part;
readContributions(id, IWorkbenchRegistryConstants.TAG_CONTRIBUTION_TYPE,... | public boolean readViewerContributions(String id, ISelectionProvider prov,
IWorkbenchPart part) {
Assert.isTrue(part instanceof IViewPart || part instanceof IEditorPart);
provider = prov;
this.part = part;
readContributions(id, IWorkbenchRegistryConstants.TAG_VIEWER_CONTRIBUTIO... |
public void rollover() {
// Note: synchronization not necessary since doAppend is already synched
// make sure to close the hereto active log file!!
this.closeFile();
rollingPolicy.rollover();
// Although not certain, the active file name may change after roll over.
fileName = rollingPolicy.... | public void rollover() {
// Note: synchronization not necessary since doAppend is already synched
// make sure to close the hereto active log file!!
this.closeWriter();
rollingPolicy.rollover();
// Although not certain, the active file name may change after roll over.
fileName = rollingPolic... |
public String toString() {
StringBuffer buffer = new StringBuffer(20);
buffer
.append("AccessRestriction [includes:\"") //$NON-NLS-1$
.append(CharOperation.concatWith(this.inclusionPatterns,'/'))
.append("\"][excludes:\"") //$NON-NLS-1$
.append(CharOperation.concatWith(this.exclusionPatterns,'/'))
.... | public String toString() {
StringBuffer buffer = new StringBuffer(200);
buffer
.append("AccessRestriction [includes:\"") //$NON-NLS-1$
.append(CharOperation.concatWith(this.inclusionPatterns,'/'))
.append("\"][excludes:\"") //$NON-NLS-1$
.append(CharOperation.concatWith(this.exclusionPatterns,'/'))
... |
public void addSpecialMethods() {
// add all methods (default abstract methods and synthetic)
// default abstract methods
generateMissingAbstractMethods(referenceBinding.scope.referenceType().missingAbstractMethods, referenceBinding.scope.referenceCompilationUnit().compilationResult);
MethodBinding[] defaul... | public void addSpecialMethods() {
// add all methods (default abstract methods and synthetic)
// default abstract methods
generateMissingAbstractMethods(referenceBinding.scope.referenceType().missingAbstractMethods, referenceBinding.scope.referenceCompilationUnit().compilationResult);
MethodBinding[] defaul... |
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String name = request.getParameter("name");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
logger.info("About to say Tata to "+name);
... | public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String name = request.getParameter("name");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
logger.info("About to say Tata to "+name);
... |
public void run() {
WorkbenchPage page = (WorkbenchPage) getActivePage();
IEditorPart editor = getActiveEditor();
if (page == null || editor == null) {
return;
}
String editorId = editor.getSite().getId();
if (editorId == null) {
return;
}
try {
page.openEditor(editor.getEditorInput(), editorI... | public void run() {
WorkbenchPage page = (WorkbenchPage) getActivePage();
IEditorPart editor = getActiveEditor();
if (page == null || editor == null) {
return;
}
String editorId = editor.getSite().getId();
if (editorId == null) {
return;
}
try {
page.openEditor(editor.getEditorInput(), editorI... |
protected
Object convertArg(String val, Class type) {
if(val == null)
return null;
String v = val.trim();
if (String.class.isAssignableFrom(type)) {
return val;
} else if (Integer.TYPE.isAssignableFrom(type)) {
return new Integer(v);
} else if (Long.TYPE.isAssignableFrom(type)... | protected
Object convertArg(String val, Class type) {
if(val == null)
return null;
String v = val.trim();
if (String.class.isAssignableFrom(type)) {
return val;
} else if (Integer.TYPE.isAssignableFrom(type)) {
return new Integer(v);
} else if (Long.TYPE.isAssignableFrom(type)... |
public ImportExportAction(IWorkbenchWindow window) {
super(WorkbenchMessages.ImportExportAction_text); //$NON-NLS-1$
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
tracker = new PerspectiveTracker(window, this);
... | public ImportExportAction(IWorkbenchWindow window) {
super(WorkbenchMessages.ImportExportAction_text);
if (window == null) {
throw new IllegalArgumentException();
}
this.workbenchWindow = window;
tracker = new PerspectiveTracker(window, this);
setActionDef... |
public boolean sendEmail( TemplateContext context, Issue issue,
String subject, String template )
throws Exception
{
if ( context == null )
{
context = new DefaultTemplateContext();
}
// add data to context
contex... | public boolean sendEmail( TemplateContext context, Issue issue,
String subject, String template )
throws Exception
{
if ( context == null )
{
context = new DefaultTemplateContext();
}
// add data to context
contex... |
protected IWorkbenchPart createPart() {
PartInitException exception = null;
IWorkbenchPart result = null;
// Try to restore the editor -- this does the real work of restoring the editor
//
try {
result = createPartHelper();
... | protected IWorkbenchPart createPart() {
PartInitException exception = null;
IWorkbenchPart result = null;
// Try to restore the editor -- this does the real work of restoring the editor
//
try {
result = createPartHelper();
... |
public void addSystemActions(IMenuManager menuManager) {
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(fastViewAction)); //$NON-NLS-1$
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(detachViewAction)); //$NO... | public void addSystemActions(IMenuManager menuManager) {
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(fastViewAction)); //$NON-NLS-1$
appendToGroupIfPossible(menuManager,
"misc", new UpdatingActionContributionItem(detachViewAction)); //$NO... |
public PropPanelAssociation() {
super("Association",_associationIcon, ConfigLoader.getTabPropsOrientation());
Class mclass = MAssociation.class;
//
// this will cause the components on this page to be notified
// anytime a stereotype, namespace, operation, etc
// has its name cha... | public PropPanelAssociation() {
super("Association",_associationIcon, ConfigLoader.getTabPropsOrientation());
Class mclass = MAssociation.class;
//
// this will cause the components on this page to be notified
// anytime a stereotype, namespace, operation, etc
// has its name cha... |
package org.eclipse.ui.commands;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which... | package org.eclipse.ui.commands;
/*******************************************************************************
* Copyright (c) 2000, 2003 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which... |
public void saveFolders(AddressbookTreeNode folder) {
for (int i = 0; i < folder.getChildCount(); i++) {
AddressbookTreeNode child = (AddressbookTreeNode) folder.getChildAt(i);
if (child instanceof AddressbookFolder) {
try {
((AddressbookFolder) c... | public void saveFolders(AddressbookTreeNode folder) {
for (int i = 0; i < folder.getChildCount(); i++) {
AddressbookTreeNode child = (AddressbookTreeNode) folder.getChildAt(i);
if (child instanceof AddressbookFolder) {
try {
((AddressbookFolder) c... |
protected void processElement(IJavaElement element) throws JavaModelException {
ICompilationUnit cu = (ICompilationUnit) element;
// keep track of the import statements - if all are removed, delete
// the import container (i.e. report it in the delta)
int numberOfImports = cu.getImports().length;
IBuffer... | protected void processElement(IJavaElement element) throws JavaModelException {
ICompilationUnit cu = (ICompilationUnit) element;
// keep track of the import statements - if all are removed, delete
// the import container (i.e. report it in the delta)
int numberOfImports = cu.getImports().length;
IBuffer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.