repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/VdmDebugConsole.java
VdmDebugConsole.handleDebugEvents
public void handleDebugEvents(DebugEvent[] events) { for (int i = 0; i < events.length; i++) { DebugEvent event = events[i]; if (event.getSource().equals(getProcess())) { if (event.getKind() == DebugEvent.TERMINATE) { closeStreams(); DebugPlugin.getDefault().removeDebugEventListener(thi...
java
public void handleDebugEvents(DebugEvent[] events) { for (int i = 0; i < events.length; i++) { DebugEvent event = events[i]; if (event.getSource().equals(getProcess())) { if (event.getKind() == DebugEvent.TERMINATE) { closeStreams(); DebugPlugin.getDefault().removeDebugEventListener(thi...
[ "public", "void", "handleDebugEvents", "(", "DebugEvent", "[", "]", "events", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "events", ".", "length", ";", "i", "++", ")", "{", "DebugEvent", "event", "=", "events", "[", "i", "]", ";", ...
Notify listeners when name changes. @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
[ "Notify", "listeners", "when", "name", "changes", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/VdmDebugConsole.java#L320-L337
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/VdmDebugConsole.java
VdmDebugConsole.resetName
private void resetName() { UIJob job = new UIJob("Activating Console") { //$NON-NLS-1$ public IStatus runInUIThread(IProgressMonitor monitor) { warnOfContentChange(); return Status.OK_STATUS; } }; job.setSystem(true); job.schedule(); }
java
private void resetName() { UIJob job = new UIJob("Activating Console") { //$NON-NLS-1$ public IStatus runInUIThread(IProgressMonitor monitor) { warnOfContentChange(); return Status.OK_STATUS; } }; job.setSystem(true); job.schedule(); }
[ "private", "void", "resetName", "(", ")", "{", "UIJob", "job", "=", "new", "UIJob", "(", "\"Activating Console\"", ")", "{", "//$NON-NLS-1$", "public", "IStatus", "runInUIThread", "(", "IProgressMonitor", "monitor", ")", "{", "warnOfContentChange", "(", ")", ";"...
resets the name of this console to the original computed name
[ "resets", "the", "name", "of", "this", "console", "to", "the", "original", "computed", "name" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/VdmDebugConsole.java#L342-L356
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/VdmDebugConsole.java
VdmDebugConsole.warnOfContentChange
private void warnOfContentChange() { IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager().getConsoles(); for (IConsole iConsole : consoles) { if (iConsole instanceof VdmDebugConsole) { VdmDebugConsole vdmC = (VdmDebugConsole) iConsole; vdmC.activate(); } } // if (warn != nul...
java
private void warnOfContentChange() { IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager().getConsoles(); for (IConsole iConsole : consoles) { if (iConsole instanceof VdmDebugConsole) { VdmDebugConsole vdmC = (VdmDebugConsole) iConsole; vdmC.activate(); } } // if (warn != nul...
[ "private", "void", "warnOfContentChange", "(", ")", "{", "IConsole", "[", "]", "consoles", "=", "ConsolePlugin", ".", "getDefault", "(", ")", ".", "getConsoleManager", "(", ")", ".", "getConsoles", "(", ")", ";", "for", "(", "IConsole", "iConsole", ":", "c...
send notification of a change of content in this console
[ "send", "notification", "of", "a", "change", "of", "content", "in", "this", "console" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/VdmDebugConsole.java#L361-L377
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.idToName
protected LexNameToken idToName(LexIdentifierToken id) { LexNameToken name = new LexNameToken(reader.currentModule, id); return name; }
java
protected LexNameToken idToName(LexIdentifierToken id) { LexNameToken name = new LexNameToken(reader.currentModule, id); return name; }
[ "protected", "LexNameToken", "idToName", "(", "LexIdentifierToken", "id", ")", "{", "LexNameToken", "name", "=", "new", "LexNameToken", "(", "reader", ".", "currentModule", ",", "id", ")", ";", "return", "name", ";", "}" ]
Convert an identifier into a name. A name is an identifier that has a module name qualifier, so this method uses the current module to convert the identifier passed in. @param id The identifier to convert @return The corresponding name.
[ "Convert", "an", "identifier", "into", "a", "name", ".", "A", "name", "is", "an", "identifier", "that", "has", "a", "module", "name", "qualifier", "so", "this", "method", "uses", "the", "current", "module", "to", "convert", "the", "identifier", "passed", "...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L167-L171
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.checkFor
protected void checkFor(VDMToken tok, int number, String message) throws LexException, ParserException { if (lastToken().is(tok)) { nextToken(); } else { throwMessage(number, message); } }
java
protected void checkFor(VDMToken tok, int number, String message) throws LexException, ParserException { if (lastToken().is(tok)) { nextToken(); } else { throwMessage(number, message); } }
[ "protected", "void", "checkFor", "(", "VDMToken", "tok", ",", "int", "number", ",", "String", "message", ")", "throws", "LexException", ",", "ParserException", "{", "if", "(", "lastToken", "(", ")", ".", "is", "(", "tok", ")", ")", "{", "nextToken", "(",...
If the last token is as expected, advance, else raise an error. @param tok The token type to check for. @param number The error number. @param message The error message to raise if the token is not as expected. @throws LexException @throws ParserException
[ "If", "the", "last", "token", "is", "as", "expected", "advance", "else", "raise", "an", "error", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L445-L455
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.ignore
protected boolean ignore(VDMToken tok) throws LexException { if (lastToken().is(tok)) { nextToken(); return true; } else { return false; } }
java
protected boolean ignore(VDMToken tok) throws LexException { if (lastToken().is(tok)) { nextToken(); return true; } else { return false; } }
[ "protected", "boolean", "ignore", "(", "VDMToken", "tok", ")", "throws", "LexException", "{", "if", "(", "lastToken", "(", ")", ".", "is", "(", "tok", ")", ")", "{", "nextToken", "(", ")", ";", "return", "true", ";", "}", "else", "{", "return", "fals...
If the last token is the one passed, advance by one, else do nothing. @param tok The token type to check for. @return True if the token was skipped. @throws LexException
[ "If", "the", "last", "token", "is", "the", "one", "passed", "advance", "by", "one", "else", "do", "nothing", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L466-L476
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.report
protected void report(LocatedException error, VDMToken[] after, VDMToken[] upto) { VDMError vdmerror = new VDMError(error); errors.add(vdmerror); if (errors.size() >= MAX - 1) { errors.add(new VDMError(9, "Too many syntax errors", error.location)); throw new InternalException(9, "Too many syntax erro...
java
protected void report(LocatedException error, VDMToken[] after, VDMToken[] upto) { VDMError vdmerror = new VDMError(error); errors.add(vdmerror); if (errors.size() >= MAX - 1) { errors.add(new VDMError(9, "Too many syntax errors", error.location)); throw new InternalException(9, "Too many syntax erro...
[ "protected", "void", "report", "(", "LocatedException", "error", ",", "VDMToken", "[", "]", "after", ",", "VDMToken", "[", "]", "upto", ")", "{", "VDMError", "vdmerror", "=", "new", "VDMError", "(", "error", ")", ";", "errors", ".", "add", "(", "vdmerror...
Raise a syntax error and attempt to recover. The error is added to the errors list, and if this exceeds 100 errors the parser is aborted. The "after" and "upto" lists of token types are then used to control the advance of the parser to skip beyond the error. Tokens are read until one occurs in either list or EOF is rea...
[ "Raise", "a", "syntax", "error", "and", "attempt", "to", "recover", ".", "The", "error", "is", "added", "to", "the", "errors", "list", "and", "if", "this", "exceeds", "100", "errors", "the", "parser", "is", "aborted", ".", "The", "after", "and", "upto", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L543-L579
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.warning
protected void warning(int no, String msg, ILexLocation location) { VDMWarning vdmwarning = new VDMWarning(no, msg, location); warnings.add(vdmwarning); if (warnings.size() >= MAX - 1) { errors.add(new VDMError(9, "Too many warnings", location)); throw new InternalException(9, "Too many warnings"); } ...
java
protected void warning(int no, String msg, ILexLocation location) { VDMWarning vdmwarning = new VDMWarning(no, msg, location); warnings.add(vdmwarning); if (warnings.size() >= MAX - 1) { errors.add(new VDMError(9, "Too many warnings", location)); throw new InternalException(9, "Too many warnings"); } ...
[ "protected", "void", "warning", "(", "int", "no", ",", "String", "msg", ",", "ILexLocation", "location", ")", "{", "VDMWarning", "vdmwarning", "=", "new", "VDMWarning", "(", "no", ",", "msg", ",", "location", ")", ";", "warnings", ".", "add", "(", "vdmwa...
Report a warning. Unlike errors, this does no token recovery.
[ "Report", "a", "warning", ".", "Unlike", "errors", "this", "does", "no", "token", "recovery", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L585-L595
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.printErrors
public void printErrors(PrintWriter out) { for (VDMError e : getErrors()) { out.println(e.toString()); } }
java
public void printErrors(PrintWriter out) { for (VDMError e : getErrors()) { out.println(e.toString()); } }
[ "public", "void", "printErrors", "(", "PrintWriter", "out", ")", "{", "for", "(", "VDMError", "e", ":", "getErrors", "(", ")", ")", "{", "out", ".", "println", "(", "e", ".", "toString", "(", ")", ")", ";", "}", "}" ]
Print errors and warnings to the PrintWriter passed. @param out
[ "Print", "errors", "and", "warnings", "to", "the", "PrintWriter", "passed", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L669-L675
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/TypeCheckInfo.java
TypeCheckInfo.contextSet
public <T> void contextSet(Class<T> key, T value) { synchronized (TypeCheckInfo.class) { Stack<T> contextStack = lookupListForType(key); if (contextStack == null) { contextStack = new Stack<T>(); context.put(key, contextStack); } contextStack.push(value); } }
java
public <T> void contextSet(Class<T> key, T value) { synchronized (TypeCheckInfo.class) { Stack<T> contextStack = lookupListForType(key); if (contextStack == null) { contextStack = new Stack<T>(); context.put(key, contextStack); } contextStack.push(value); } }
[ "public", "<", "T", ">", "void", "contextSet", "(", "Class", "<", "T", ">", "key", ",", "T", "value", ")", "{", "synchronized", "(", "TypeCheckInfo", ".", "class", ")", "{", "Stack", "<", "T", ">", "contextStack", "=", "lookupListForType", "(", "key", ...
Associates the given key with the given value. @param <T> @param key @param value
[ "Associates", "the", "given", "key", "with", "the", "given", "value", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/TypeCheckInfo.java#L101-L113
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/TypeCheckInfo.java
TypeCheckInfo.contextRem
public <T> T contextRem(Class<T> key) { synchronized (TypeCheckInfo.class) { Stack<T> contextStack = lookupListForType(key); if (contextStack != null) { return contextStack.pop(); } } return null; }
java
public <T> T contextRem(Class<T> key) { synchronized (TypeCheckInfo.class) { Stack<T> contextStack = lookupListForType(key); if (contextStack != null) { return contextStack.pop(); } } return null; }
[ "public", "<", "T", ">", "T", "contextRem", "(", "Class", "<", "T", ">", "key", ")", "{", "synchronized", "(", "TypeCheckInfo", ".", "class", ")", "{", "Stack", "<", "T", ">", "contextStack", "=", "lookupListForType", "(", "key", ")", ";", "if", "(",...
Returns the value associated with key, and removes that binding from the context. @param <T> @param key @return value
[ "Returns", "the", "value", "associated", "with", "key", "and", "removes", "that", "binding", "from", "the", "context", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/TypeCheckInfo.java#L122-L133
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/actions/ToggleCommentAction.java
ToggleCommentAction.isSelectionCommented
private boolean isSelectionCommented(ISelection selection) { if (!(selection instanceof ITextSelection)) return false; ITextSelection textSelection= (ITextSelection) selection; if (textSelection.getStartLine() < 0 || textSelection.getEndLine() < 0) return false; IDocument document= getTextEditor().getDo...
java
private boolean isSelectionCommented(ISelection selection) { if (!(selection instanceof ITextSelection)) return false; ITextSelection textSelection= (ITextSelection) selection; if (textSelection.getStartLine() < 0 || textSelection.getEndLine() < 0) return false; IDocument document= getTextEditor().getDo...
[ "private", "boolean", "isSelectionCommented", "(", "ISelection", "selection", ")", "{", "if", "(", "!", "(", "selection", "instanceof", "ITextSelection", ")", ")", "return", "false", ";", "ITextSelection", "textSelection", "=", "(", "ITextSelection", ")", "selecti...
Is the given selection single-line commented? @param selection Selection to check @return <code>true</code> iff all selected lines are commented
[ "Is", "the", "given", "selection", "single", "-", "line", "commented?" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/actions/ToggleCommentAction.java#L117-L160
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getFullPredString
@Override public String getFullPredString() { if (valuetree.getPredicate() == null) { return ""; } String result = valuetree.getPredicate().toString(); return result; }
java
@Override public String getFullPredString() { if (valuetree.getPredicate() == null) { return ""; } String result = valuetree.getPredicate().toString(); return result; }
[ "@", "Override", "public", "String", "getFullPredString", "(", ")", "{", "if", "(", "valuetree", ".", "getPredicate", "(", ")", "==", "null", ")", "{", "return", "\"\"", ";", "}", "String", "result", "=", "valuetree", ".", "getPredicate", "(", ")", ".", ...
string as it exists in the current version
[ "string", "as", "it", "exists", "in", "the", "current", "version" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L124-L133
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getMultipleSetBind
protected PMultipleBind getMultipleSetBind(PExp setExp, ILexNameToken... patternNames) { ASetMultipleBind setBind = new ASetMultipleBind(); List<PPattern> patternList = new Vector<PPattern>(); for (ILexNameToken patternName : patternNames) { AIdentifierPattern pattern = new AIdentifierPattern(); patt...
java
protected PMultipleBind getMultipleSetBind(PExp setExp, ILexNameToken... patternNames) { ASetMultipleBind setBind = new ASetMultipleBind(); List<PPattern> patternList = new Vector<PPattern>(); for (ILexNameToken patternName : patternNames) { AIdentifierPattern pattern = new AIdentifierPattern(); patt...
[ "protected", "PMultipleBind", "getMultipleSetBind", "(", "PExp", "setExp", ",", "ILexNameToken", "...", "patternNames", ")", "{", "ASetMultipleBind", "setBind", "=", "new", "ASetMultipleBind", "(", ")", ";", "List", "<", "PPattern", ">", "patternList", "=", "new",...
Create a multiple set bind with a varargs list of pattern variables, like a,b,c in set S. This is used by several obligations.
[ "Create", "a", "multiple", "set", "bind", "with", "a", "varargs", "list", "of", "pattern", "variables", "like", "a", "b", "c", "in", "set", "S", ".", "This", "is", "used", "by", "several", "obligations", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L283-L300
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getEqualsExp
protected AEqualsBinaryExp getEqualsExp(PExp left, PExp right) { return AstExpressionFactory.newAEqualsBinaryExp(left.clone(), right.clone()); }
java
protected AEqualsBinaryExp getEqualsExp(PExp left, PExp right) { return AstExpressionFactory.newAEqualsBinaryExp(left.clone(), right.clone()); }
[ "protected", "AEqualsBinaryExp", "getEqualsExp", "(", "PExp", "left", ",", "PExp", "right", ")", "{", "return", "AstExpressionFactory", ".", "newAEqualsBinaryExp", "(", "left", ".", "clone", "(", ")", ",", "right", ".", "clone", "(", ")", ")", ";", "}" ]
Generate an AEqualsBinaryExp
[ "Generate", "an", "AEqualsBinaryExp" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L335-L338
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getVarExp
protected AVariableExp getVarExp(ILexNameToken name) { AVariableExp var = new AVariableExp(); var.setName(name.clone()); var.setOriginal(name.getFullName()); return var; }
java
protected AVariableExp getVarExp(ILexNameToken name) { AVariableExp var = new AVariableExp(); var.setName(name.clone()); var.setOriginal(name.getFullName()); return var; }
[ "protected", "AVariableExp", "getVarExp", "(", "ILexNameToken", "name", ")", "{", "AVariableExp", "var", "=", "new", "AVariableExp", "(", ")", ";", "var", ".", "setName", "(", "name", ".", "clone", "(", ")", ")", ";", "var", ".", "setOriginal", "(", "nam...
Generate an AVariableExp
[ "Generate", "an", "AVariableExp" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L343-L349
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getVarExp
protected AVariableExp getVarExp(ILexNameToken name, PType type) { AVariableExp var = getVarExp(name); var.setType(type.clone()); return var; }
java
protected AVariableExp getVarExp(ILexNameToken name, PType type) { AVariableExp var = getVarExp(name); var.setType(type.clone()); return var; }
[ "protected", "AVariableExp", "getVarExp", "(", "ILexNameToken", "name", ",", "PType", "type", ")", "{", "AVariableExp", "var", "=", "getVarExp", "(", "name", ")", ";", "var", ".", "setType", "(", "type", ".", "clone", "(", ")", ")", ";", "return", "var",...
Generate a Var Exp with associated type.
[ "Generate", "a", "Var", "Exp", "with", "associated", "type", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L354-L359
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getVarExp
protected AVariableExp getVarExp(ILexNameToken name, PDefinition vardef) { AVariableExp var = new AVariableExp(); var.setName(name.clone()); var.setOriginal(name.getFullName()); var.setVardef(vardef.clone()); return var; }
java
protected AVariableExp getVarExp(ILexNameToken name, PDefinition vardef) { AVariableExp var = new AVariableExp(); var.setName(name.clone()); var.setOriginal(name.getFullName()); var.setVardef(vardef.clone()); return var; }
[ "protected", "AVariableExp", "getVarExp", "(", "ILexNameToken", "name", ",", "PDefinition", "vardef", ")", "{", "AVariableExp", "var", "=", "new", "AVariableExp", "(", ")", ";", "var", ".", "setName", "(", "name", ".", "clone", "(", ")", ")", ";", "var", ...
Generate AVariableExp with corresponding definition
[ "Generate", "AVariableExp", "with", "corresponding", "definition" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L364-L371
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getVarExp
protected AVariableExp getVarExp(ILexNameToken name, PDefinition vardef, PType type){ AVariableExp var = getVarExp(name, vardef); var.setType(type); return var; }
java
protected AVariableExp getVarExp(ILexNameToken name, PDefinition vardef, PType type){ AVariableExp var = getVarExp(name, vardef); var.setType(type); return var; }
[ "protected", "AVariableExp", "getVarExp", "(", "ILexNameToken", "name", ",", "PDefinition", "vardef", ",", "PType", "type", ")", "{", "AVariableExp", "var", "=", "getVarExp", "(", "name", ",", "vardef", ")", ";", "var", ".", "setType", "(", "type", ")", ";...
Generate Var Exp with everything! @return
[ "Generate", "Var", "Exp", "with", "everything!" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L376-L380
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getApplyExp
protected AApplyExp getApplyExp(PExp root, PExp... arglist) { return getApplyExp(root, Arrays.asList(arglist)); }
java
protected AApplyExp getApplyExp(PExp root, PExp... arglist) { return getApplyExp(root, Arrays.asList(arglist)); }
[ "protected", "AApplyExp", "getApplyExp", "(", "PExp", "root", ",", "PExp", "...", "arglist", ")", "{", "return", "getApplyExp", "(", "root", ",", "Arrays", ".", "asList", "(", "arglist", ")", ")", ";", "}" ]
Generate an AApplyExp with varargs arguments
[ "Generate", "an", "AApplyExp", "with", "varargs", "arguments" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L392-L395
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getApplyExp
protected AApplyExp getApplyExp(PExp root, List<PExp> arglist) { AApplyExp apply = new AApplyExp(); apply.setRoot(root.clone()); List<PExp> args = new Vector<PExp>(); for (PExp arg : arglist) { args.add(arg.clone()); } apply.setArgs(args); return apply; }
java
protected AApplyExp getApplyExp(PExp root, List<PExp> arglist) { AApplyExp apply = new AApplyExp(); apply.setRoot(root.clone()); List<PExp> args = new Vector<PExp>(); for (PExp arg : arglist) { args.add(arg.clone()); } apply.setArgs(args); return apply; }
[ "protected", "AApplyExp", "getApplyExp", "(", "PExp", "root", ",", "List", "<", "PExp", ">", "arglist", ")", "{", "AApplyExp", "apply", "=", "new", "AApplyExp", "(", ")", ";", "apply", ".", "setRoot", "(", "root", ".", "clone", "(", ")", ")", ";", "L...
Generate an AApplyExp
[ "Generate", "an", "AApplyExp" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L400-L413
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getIntLiteral
protected AIntLiteralExp getIntLiteral(long i) { AIntLiteralExp number = new AIntLiteralExp(); ILexIntegerToken literal = new LexIntegerToken(i, null); number.setValue(literal); return number; }
java
protected AIntLiteralExp getIntLiteral(long i) { AIntLiteralExp number = new AIntLiteralExp(); ILexIntegerToken literal = new LexIntegerToken(i, null); number.setValue(literal); return number; }
[ "protected", "AIntLiteralExp", "getIntLiteral", "(", "long", "i", ")", "{", "AIntLiteralExp", "number", "=", "new", "AIntLiteralExp", "(", ")", ";", "ILexIntegerToken", "literal", "=", "new", "LexIntegerToken", "(", "i", ",", "null", ")", ";", "number", ".", ...
Generate an AIntLiteral from a long.
[ "Generate", "an", "AIntLiteral", "from", "a", "long", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L418-L424
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.makeAnd
protected PExp makeAnd(PExp root, PExp e) { if (root != null) { AAndBooleanBinaryExp a = new AAndBooleanBinaryExp(); a.setLeft(root.clone()); a.setOp(new LexKeywordToken(VDMToken.AND, null)); a.setType(new ABooleanBasicType()); a.setRight(e.clone()); return a; } else { return e; } }
java
protected PExp makeAnd(PExp root, PExp e) { if (root != null) { AAndBooleanBinaryExp a = new AAndBooleanBinaryExp(); a.setLeft(root.clone()); a.setOp(new LexKeywordToken(VDMToken.AND, null)); a.setType(new ABooleanBasicType()); a.setRight(e.clone()); return a; } else { return e; } }
[ "protected", "PExp", "makeAnd", "(", "PExp", "root", ",", "PExp", "e", ")", "{", "if", "(", "root", "!=", "null", ")", "{", "AAndBooleanBinaryExp", "a", "=", "new", "AAndBooleanBinaryExp", "(", ")", ";", "a", ".", "setLeft", "(", "root", ".", "clone", ...
Chain an AND expression onto a root, or just return the new expression if the root is null. Called in a loop, this left-associates an AND tree.
[ "Chain", "an", "AND", "expression", "onto", "a", "root", "or", "just", "return", "the", "new", "expression", "if", "the", "root", "is", "null", ".", "Called", "in", "a", "loop", "this", "left", "-", "associates", "an", "AND", "tree", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L430-L444
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.makeOr
protected PExp makeOr(PExp root, PExp e) { if (root != null) { AOrBooleanBinaryExp o = new AOrBooleanBinaryExp(); o.setLeft(root.clone()); o.setOp(new LexKeywordToken(VDMToken.OR, null)); o.setType(new ABooleanBasicType()); o.setRight(e.clone()); return o; } else { return e; } }
java
protected PExp makeOr(PExp root, PExp e) { if (root != null) { AOrBooleanBinaryExp o = new AOrBooleanBinaryExp(); o.setLeft(root.clone()); o.setOp(new LexKeywordToken(VDMToken.OR, null)); o.setType(new ABooleanBasicType()); o.setRight(e.clone()); return o; } else { return e; } }
[ "protected", "PExp", "makeOr", "(", "PExp", "root", ",", "PExp", "e", ")", "{", "if", "(", "root", "!=", "null", ")", "{", "AOrBooleanBinaryExp", "o", "=", "new", "AOrBooleanBinaryExp", "(", ")", ";", "o", ".", "setLeft", "(", "root", ".", "clone", "...
Chain an OR expression onto a root, or just return the new expression if the root is null. Called in a loop, this left-associates an OR tree.
[ "Chain", "an", "OR", "expression", "onto", "a", "root", "or", "just", "return", "the", "new", "expression", "if", "the", "root", "is", "null", ".", "Called", "in", "a", "loop", "this", "left", "-", "associates", "an", "OR", "tree", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L450-L464
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/lex/LexLocation.java
LexLocation.readResolve
private Object readResolve() throws ObjectStreamException { LexLocation existing = uniqueLocations.get(this); if (existing == null) { return this; } else { return existing; } }
java
private Object readResolve() throws ObjectStreamException { LexLocation existing = uniqueLocations.get(this); if (existing == null) { return this; } else { return existing; } }
[ "private", "Object", "readResolve", "(", ")", "throws", "ObjectStreamException", "{", "LexLocation", "existing", "=", "uniqueLocations", ".", "get", "(", "this", ")", ";", "if", "(", "existing", "==", "null", ")", "{", "return", "this", ";", "}", "else", "...
Method to resolve existing locations during de-serialise - as used during deep copy. This is to avoid problems with coverage.
[ "Method", "to", "resolve", "existing", "locations", "during", "de", "-", "serialise", "-", "as", "used", "during", "deep", "copy", ".", "This", "is", "to", "avoid", "problems", "with", "coverage", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/lex/LexLocation.java#L254-L265
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/messages/VDMMessage.java
VDMMessage.toProblemString
public String toProblemString() { StringBuilder sb = new StringBuilder(); sb.append(message); sb.append("."); for (String d : details) { sb.append(" "); sb.append(d); } return sb.toString(); }
java
public String toProblemString() { StringBuilder sb = new StringBuilder(); sb.append(message); sb.append("."); for (String d : details) { sb.append(" "); sb.append(d); } return sb.toString(); }
[ "public", "String", "toProblemString", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "message", ")", ";", "sb", ".", "append", "(", "\".\"", ")", ";", "for", "(", "String", "d", ":", "deta...
view, with details but without the file location and number.
[ "view", "with", "details", "but", "without", "the", "file", "location", "and", "number", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/messages/VDMMessage.java#L71-L84
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/launching/AbstractVdmMainLaunchConfigurationTab.java
AbstractVdmMainLaunchConfigurationTab.autoFillBaseSettings
protected String autoFillBaseSettings() { ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();// .getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); if (selection instanceof TreeSelection) { TreeSelection tSelection = (T...
java
protected String autoFillBaseSettings() { ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();// .getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); if (selection instanceof TreeSelection) { TreeSelection tSelection = (T...
[ "protected", "String", "autoFillBaseSettings", "(", ")", "{", "ISelection", "selection", "=", "PlatformUI", ".", "getWorkbench", "(", ")", ".", "getActiveWorkbenchWindow", "(", ")", ".", "getSelectionService", "(", ")", ".", "getSelection", "(", ")", ";", "// .g...
Gets the last selected project in the platform if selection is tree selection
[ "Gets", "the", "last", "selected", "project", "in", "the", "platform", "if", "selection", "is", "tree", "selection" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/launching/AbstractVdmMainLaunchConfigurationTab.java#L1009-L1029
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/assistant/module/AModuleModulesAssistantTC.java
AModuleModulesAssistantTC.processExports
public void processExports(AModuleModules m) { if (m.getExports() != null) { m.getExportdefs().clear(); if (!m.getIsDLModule()) { m.getExportdefs().addAll(getDefinitions(m.getExports(), m.getDefs())); } else { m.getExportdefs().addAll(getDefinitions(m.getExports())); } } }
java
public void processExports(AModuleModules m) { if (m.getExports() != null) { m.getExportdefs().clear(); if (!m.getIsDLModule()) { m.getExportdefs().addAll(getDefinitions(m.getExports(), m.getDefs())); } else { m.getExportdefs().addAll(getDefinitions(m.getExports())); } } }
[ "public", "void", "processExports", "(", "AModuleModules", "m", ")", "{", "if", "(", "m", ".", "getExports", "(", ")", "!=", "null", ")", "{", "m", ".", "getExportdefs", "(", ")", ".", "clear", "(", ")", ";", "if", "(", "!", "m", ".", "getIsDLModul...
Generate the exportdefs list of definitions. The exports list of export declarations is processed by searching the defs list of locally defined objects. The exportdefs field is populated with the result. @param m
[ "Generate", "the", "exportdefs", "list", "of", "definitions", ".", "The", "exports", "list", "of", "export", "declarations", "is", "processed", "by", "searching", "the", "defs", "list", "of", "locally", "defined", "objects", ".", "The", "exportdefs", "field", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/assistant/module/AModuleModulesAssistantTC.java#L54-L68
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/visitor/ExpVisitorIR.java
ExpVisitorIR.caseABooleanConstExp
@Override public SExpIR caseABooleanConstExp(ABooleanConstExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); boolean value = node.getValue().getValue(); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); ABoolLiteralExpIR boolLitCg = new ABoolLiteralExpIR();...
java
@Override public SExpIR caseABooleanConstExp(ABooleanConstExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); boolean value = node.getValue().getValue(); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); ABoolLiteralExpIR boolLitCg = new ABoolLiteralExpIR();...
[ "@", "Override", "public", "SExpIR", "caseABooleanConstExp", "(", "ABooleanConstExp", "node", ",", "IRInfo", "question", ")", "throws", "AnalysisException", "{", "PType", "type", "=", "node", ".", "getType", "(", ")", ";", "boolean", "value", "=", "node", ".",...
setValue at the current time of writing.
[ "setValue", "at", "the", "current", "time", "of", "writing", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/visitor/ExpVisitorIR.java#L1649-L1663
train
overturetool/overture
core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/copying/FastByteArrayOutputStream.java
FastByteArrayOutputStream.verifyBufferSize
private void verifyBufferSize(int sz) { if (sz > buf.length) { byte[] old = buf; buf = new byte[Math.max(sz, 2 * buf.length)]; System.arraycopy(old, 0, buf, 0, old.length); old = null; } }
java
private void verifyBufferSize(int sz) { if (sz > buf.length) { byte[] old = buf; buf = new byte[Math.max(sz, 2 * buf.length)]; System.arraycopy(old, 0, buf, 0, old.length); old = null; } }
[ "private", "void", "verifyBufferSize", "(", "int", "sz", ")", "{", "if", "(", "sz", ">", "buf", ".", "length", ")", "{", "byte", "[", "]", "old", "=", "buf", ";", "buf", "=", "new", "byte", "[", "Math", ".", "max", "(", "sz", ",", "2", "*", "...
Ensures that we have a large enough buffer for the given size.
[ "Ensures", "that", "we", "have", "a", "large", "enough", "buffer", "for", "the", "given", "size", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/copying/FastByteArrayOutputStream.java#L37-L46
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.execute
public Value execute(File file) throws Exception { BufferedReader br = new BufferedReader(new FileReader(file)); StringBuilder sb = new StringBuilder(); String line = br.readLine(); while (line != null) { sb.append(line); line = br.readLine(); } br.close(); Value result = execute(sb.toString(...
java
public Value execute(File file) throws Exception { BufferedReader br = new BufferedReader(new FileReader(file)); StringBuilder sb = new StringBuilder(); String line = br.readLine(); while (line != null) { sb.append(line); line = br.readLine(); } br.close(); Value result = execute(sb.toString(...
[ "public", "Value", "execute", "(", "File", "file", ")", "throws", "Exception", "{", "BufferedReader", "br", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "file", ")", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";...
Parse the content of the file passed, type check it and evaluate it as an expression in the initial context. @param file A file containing a VDM expression. @return The value of the expression. @throws Exception Parser, type checking or runtime errors.
[ "Parse", "the", "content", "of", "the", "file", "passed", "type", "check", "it", "and", "evaluate", "it", "as", "an", "expression", "in", "the", "initial", "context", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L240-L259
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.getSourceLine
public String getSourceLine(File file, int line, String sep) { SourceFile source = sourceFiles.get(file); if (source == null) { try { source = new SourceFile(file); sourceFiles.put(file, source); } catch (IOException e) { return "Cannot open source file: " + file; } } return line...
java
public String getSourceLine(File file, int line, String sep) { SourceFile source = sourceFiles.get(file); if (source == null) { try { source = new SourceFile(file); sourceFiles.put(file, source); } catch (IOException e) { return "Cannot open source file: " + file; } } return line...
[ "public", "String", "getSourceLine", "(", "File", "file", ",", "int", "line", ",", "String", "sep", ")", "{", "SourceFile", "source", "=", "sourceFiles", ".", "get", "(", "file", ")", ";", "if", "(", "source", "==", "null", ")", "{", "try", "{", "sou...
Get a line of a source file by its location. @param file @param line @param sep @return
[ "Get", "a", "line", "of", "a", "source", "file", "by", "its", "location", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L319-L336
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.getSourceFile
public SourceFile getSourceFile(File file) throws IOException { SourceFile source = sourceFiles.get(file); if (source == null) { source = new SourceFile(file); sourceFiles.put(file, source); } return source; }
java
public SourceFile getSourceFile(File file) throws IOException { SourceFile source = sourceFiles.get(file); if (source == null) { source = new SourceFile(file); sourceFiles.put(file, source); } return source; }
[ "public", "SourceFile", "getSourceFile", "(", "File", "file", ")", "throws", "IOException", "{", "SourceFile", "source", "=", "sourceFiles", ".", "get", "(", "file", ")", ";", "if", "(", "source", "==", "null", ")", "{", "source", "=", "new", "SourceFile",...
Get an entire source file object. @param file @return @throws IOException
[ "Get", "an", "entire", "source", "file", "object", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L346-L357
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.setTracepoint
public Breakpoint setTracepoint(PStm stmt, String trace) throws Exception { BreakpointManager.setBreakpoint(stmt, new Tracepoint(stmt.getLocation(), ++nextbreakpoint, trace)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(stmt)); return BreakpointManager.getBreakpoint(stmt); }
java
public Breakpoint setTracepoint(PStm stmt, String trace) throws Exception { BreakpointManager.setBreakpoint(stmt, new Tracepoint(stmt.getLocation(), ++nextbreakpoint, trace)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(stmt)); return BreakpointManager.getBreakpoint(stmt); }
[ "public", "Breakpoint", "setTracepoint", "(", "PStm", "stmt", ",", "String", "trace", ")", "throws", "Exception", "{", "BreakpointManager", ".", "setBreakpoint", "(", "stmt", ",", "new", "Tracepoint", "(", "stmt", ".", "getLocation", "(", ")", ",", "++", "ne...
Set a statement tracepoint. A tracepoint does not stop execution, but evaluates and displays an expression before continuing. @param stmt The statement to trace. @param trace The expression to evaluate. @return The Breakpoint object created. @throws Exception Expression is not valid.
[ "Set", "a", "statement", "tracepoint", ".", "A", "tracepoint", "does", "not", "stop", "execution", "but", "evaluates", "and", "displays", "an", "expression", "before", "continuing", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L427-L432
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.setTracepoint
public Breakpoint setTracepoint(PExp exp, String trace) throws ParserException, LexException { BreakpointManager.setBreakpoint(exp, new Tracepoint(exp.getLocation(), ++nextbreakpoint, trace)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(exp)); return BreakpointManager.getBreakpoint(exp); ...
java
public Breakpoint setTracepoint(PExp exp, String trace) throws ParserException, LexException { BreakpointManager.setBreakpoint(exp, new Tracepoint(exp.getLocation(), ++nextbreakpoint, trace)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(exp)); return BreakpointManager.getBreakpoint(exp); ...
[ "public", "Breakpoint", "setTracepoint", "(", "PExp", "exp", ",", "String", "trace", ")", "throws", "ParserException", ",", "LexException", "{", "BreakpointManager", ".", "setBreakpoint", "(", "exp", ",", "new", "Tracepoint", "(", "exp", ".", "getLocation", "(",...
Set an expression tracepoint. A tracepoint does not stop execution, but evaluates an expression before continuing. @param exp The expression to trace. @param trace The expression to evaluate. @return The Breakpoint object created. @throws LexException @throws ParserException
[ "Set", "an", "expression", "tracepoint", ".", "A", "tracepoint", "does", "not", "stop", "execution", "but", "evaluates", "an", "expression", "before", "continuing", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L447-L453
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.setBreakpoint
public Breakpoint setBreakpoint(PStm stmt, String condition) throws ParserException, LexException { BreakpointManager.setBreakpoint(stmt, new Stoppoint(stmt.getLocation(), ++nextbreakpoint, condition)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(stmt)); return BreakpointManager.getBreakpo...
java
public Breakpoint setBreakpoint(PStm stmt, String condition) throws ParserException, LexException { BreakpointManager.setBreakpoint(stmt, new Stoppoint(stmt.getLocation(), ++nextbreakpoint, condition)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(stmt)); return BreakpointManager.getBreakpo...
[ "public", "Breakpoint", "setBreakpoint", "(", "PStm", "stmt", ",", "String", "condition", ")", "throws", "ParserException", ",", "LexException", "{", "BreakpointManager", ".", "setBreakpoint", "(", "stmt", ",", "new", "Stoppoint", "(", "stmt", ".", "getLocation", ...
Set a statement breakpoint. A breakpoint stops execution and allows the user to query the environment. @param stmt The statement at which to stop. @param condition The condition when to stop. @return The Breakpoint object created. @throws LexException @throws ParserException
[ "Set", "a", "statement", "breakpoint", ".", "A", "breakpoint", "stops", "execution", "and", "allows", "the", "user", "to", "query", "the", "environment", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L467-L473
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.setBreakpoint
public Breakpoint setBreakpoint(PExp exp, String condition) throws ParserException, LexException { BreakpointManager.setBreakpoint(exp, new Stoppoint(exp.getLocation(), ++nextbreakpoint, condition)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(exp)); return BreakpointManager.getBreakpoint(...
java
public Breakpoint setBreakpoint(PExp exp, String condition) throws ParserException, LexException { BreakpointManager.setBreakpoint(exp, new Stoppoint(exp.getLocation(), ++nextbreakpoint, condition)); breakpoints.put(nextbreakpoint, BreakpointManager.getBreakpoint(exp)); return BreakpointManager.getBreakpoint(...
[ "public", "Breakpoint", "setBreakpoint", "(", "PExp", "exp", ",", "String", "condition", ")", "throws", "ParserException", ",", "LexException", "{", "BreakpointManager", ".", "setBreakpoint", "(", "exp", ",", "new", "Stoppoint", "(", "exp", ".", "getLocation", "...
Set an expression breakpoint. A breakpoint stops execution and allows the user to query the environment. @param exp The expression at which to stop. @param condition The condition when to stop. @return The Breakpoint object created. @throws LexException @throws ParserException
[ "Set", "an", "expression", "breakpoint", ".", "A", "breakpoint", "stops", "execution", "and", "allows", "the", "user", "to", "query", "the", "environment", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L487-L493
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.clearBreakpoint
public Breakpoint clearBreakpoint(int bpno) { Breakpoint old = breakpoints.remove(bpno); if (old != null) { PStm stmt = findStatement(old.location.getFile(), old.location.getStartLine()); if (stmt != null) { BreakpointManager.setBreakpoint(stmt, new Breakpoint(stmt.getLocation())); } else { ...
java
public Breakpoint clearBreakpoint(int bpno) { Breakpoint old = breakpoints.remove(bpno); if (old != null) { PStm stmt = findStatement(old.location.getFile(), old.location.getStartLine()); if (stmt != null) { BreakpointManager.setBreakpoint(stmt, new Breakpoint(stmt.getLocation())); } else { ...
[ "public", "Breakpoint", "clearBreakpoint", "(", "int", "bpno", ")", "{", "Breakpoint", "old", "=", "breakpoints", ".", "remove", "(", "bpno", ")", ";", "if", "(", "old", "!=", "null", ")", "{", "PStm", "stmt", "=", "findStatement", "(", "old", ".", "lo...
Clear the breakpoint given by the number. @param bpno The breakpoint number to remove. @return The breakpoint object removed, or null.
[ "Clear", "the", "breakpoint", "given", "by", "the", "number", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L503-L523
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java
Interpreter.typeCheck
public static void typeCheck(INode classdef, Interpreter interpreter, CallSequence test, Environment outer) throws AnalysisException, Exception { FlatEnvironment env = null; if (classdef instanceof SClassDefinition) { env = new FlatEnvironment(interpreter.getAssistantFactory(), classdef.apply(interpret...
java
public static void typeCheck(INode classdef, Interpreter interpreter, CallSequence test, Environment outer) throws AnalysisException, Exception { FlatEnvironment env = null; if (classdef instanceof SClassDefinition) { env = new FlatEnvironment(interpreter.getAssistantFactory(), classdef.apply(interpret...
[ "public", "static", "void", "typeCheck", "(", "INode", "classdef", ",", "Interpreter", "interpreter", ",", "CallSequence", "test", ",", "Environment", "outer", ")", "throws", "AnalysisException", ",", "Exception", "{", "FlatEnvironment", "env", "=", "null", ";", ...
type check a test @param classdef @param interpreter @param test @throws AnalysisException @throws Exception
[ "type", "check", "a", "test" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Interpreter.java#L787-L822
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/editor/syntax/MultipleWordsWordRule.java
MultipleWordsWordRule.getMaxPartCount
private int getMaxPartCount() { int max = 0; for (Object k : super.fWords.keySet()) { String key = k.toString(); int count = key.split("\\s+?").length; if (count > max) { max = count; } } return max; }
java
private int getMaxPartCount() { int max = 0; for (Object k : super.fWords.keySet()) { String key = k.toString(); int count = key.split("\\s+?").length; if (count > max) { max = count; } } return max; }
[ "private", "int", "getMaxPartCount", "(", ")", "{", "int", "max", "=", "0", ";", "for", "(", "Object", "k", ":", "super", ".", "fWords", ".", "keySet", "(", ")", ")", "{", "String", "key", "=", "k", ".", "toString", "(", ")", ";", "int", "count",...
Calculates the maximum number of parts in the largest word in the rule scanner @return the largest number of parts. (number of spaces spaced words"
[ "Calculates", "the", "maximum", "number", "of", "parts", "in", "the", "largest", "word", "in", "the", "rule", "scanner" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/editor/syntax/MultipleWordsWordRule.java#L83-L96
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java
CharOperation.charArrayToStringArray
public static String[] charArrayToStringArray(char[][] charArrays) { if (charArrays == null) { return null; } int length = charArrays.length; if (length == 0) { return NO_STRINGS; } String[] strings = new String[length]; for (int i = 0; i < length; i++) { strings[i] = new String(charArrays...
java
public static String[] charArrayToStringArray(char[][] charArrays) { if (charArrays == null) { return null; } int length = charArrays.length; if (length == 0) { return NO_STRINGS; } String[] strings = new String[length]; for (int i = 0; i < length; i++) { strings[i] = new String(charArrays...
[ "public", "static", "String", "[", "]", "charArrayToStringArray", "(", "char", "[", "]", "[", "]", "charArrays", ")", "{", "if", "(", "charArrays", "==", "null", ")", "{", "return", "null", ";", "}", "int", "length", "=", "charArrays", ".", "length", "...
Returns the char arrays as an array of Strings @param charArrays the char array to convert @return the char arrays as an array of Strings or null if the given char arrays is null.
[ "Returns", "the", "char", "arrays", "as", "an", "array", "of", "Strings" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java#L238-L255
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java
CharOperation.deepCopy
public static final char[][] deepCopy(char[][] toCopy) { int toCopyLength = toCopy.length; char[][] result = new char[toCopyLength][]; for (int i = 0; i < toCopyLength; i++) { char[] toElement = toCopy[i]; int toElementLength = toElement.length; char[] resultElement = new char[toElementLength]; Sys...
java
public static final char[][] deepCopy(char[][] toCopy) { int toCopyLength = toCopy.length; char[][] result = new char[toCopyLength][]; for (int i = 0; i < toCopyLength; i++) { char[] toElement = toCopy[i]; int toElementLength = toElement.length; char[] resultElement = new char[toElementLength]; Sys...
[ "public", "static", "final", "char", "[", "]", "[", "]", "deepCopy", "(", "char", "[", "]", "[", "]", "toCopy", ")", "{", "int", "toCopyLength", "=", "toCopy", ".", "length", ";", "char", "[", "]", "[", "]", "result", "=", "new", "char", "[", "to...
Answers a deep copy of the toCopy array. @param toCopy the array to copy @return a deep copy of the toCopy array.
[ "Answers", "a", "deep", "copy", "of", "the", "toCopy", "array", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java#L1279-L1292
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java
CharOperation.toStrings
final static public String[] toStrings(char[][] array) { if (array == null) { return NO_STRINGS; } int length = array.length; if (length == 0) { return NO_STRINGS; } String[] result = new String[length]; for (int i = 0; i < length; i++) { result[i] = new String(array[i]); } return resu...
java
final static public String[] toStrings(char[][] array) { if (array == null) { return NO_STRINGS; } int length = array.length; if (length == 0) { return NO_STRINGS; } String[] result = new String[length]; for (int i = 0; i < length; i++) { result[i] = new String(array[i]); } return resu...
[ "final", "static", "public", "String", "[", "]", "toStrings", "(", "char", "[", "]", "[", "]", "array", ")", "{", "if", "(", "array", "==", "null", ")", "{", "return", "NO_STRINGS", ";", "}", "int", "length", "=", "array", ".", "length", ";", "if",...
Answers an array of strings from the given array of char array. @param array the given array @return an array of strings
[ "Answers", "an", "array", "of", "strings", "from", "the", "given", "array", "of", "char", "array", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java#L4058-L4075
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/visitors/PatternToExpVisitor.java
PatternToExpVisitor.caseARecordPattern
public PExp caseARecordPattern(ARecordPattern node) throws AnalysisException { AMkTypeExp mkExp = new AMkTypeExp(); mkExp.setTypeName(node.getTypename().clone()); List<PExp> args = new Vector<PExp>(); for (PPattern p : node.getPlist()) { args.add(p.apply(this).clone()); } addPossibleType(mkExp, no...
java
public PExp caseARecordPattern(ARecordPattern node) throws AnalysisException { AMkTypeExp mkExp = new AMkTypeExp(); mkExp.setTypeName(node.getTypename().clone()); List<PExp> args = new Vector<PExp>(); for (PPattern p : node.getPlist()) { args.add(p.apply(this).clone()); } addPossibleType(mkExp, no...
[ "public", "PExp", "caseARecordPattern", "(", "ARecordPattern", "node", ")", "throws", "AnalysisException", "{", "AMkTypeExp", "mkExp", "=", "new", "AMkTypeExp", "(", ")", ";", "mkExp", ".", "setTypeName", "(", "node", ".", "getTypename", "(", ")", ".", "clone"...
Now, compound patterns involve recursive calls to expand their pattern components to expressions. @param node @return @throws AnalysisException
[ "Now", "compound", "patterns", "involve", "recursive", "calls", "to", "expand", "their", "pattern", "components", "to", "expressions", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/visitors/PatternToExpVisitor.java#L178-L192
train
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/assistant/definition/PDefinitionAssistantTC.java
PDefinitionAssistantTC.checkDuplicatePatterns
public List<PDefinition> checkDuplicatePatterns(PDefinition d, List<PDefinition> defs) { Set<PDefinition> noDuplicates = new HashSet<PDefinition>(); for (PDefinition d1 : defs) { for (PDefinition d2 : defs) { if (d1 != d2 && d1.getName() != null && d2.getName() != null && d1.getName().equals(...
java
public List<PDefinition> checkDuplicatePatterns(PDefinition d, List<PDefinition> defs) { Set<PDefinition> noDuplicates = new HashSet<PDefinition>(); for (PDefinition d1 : defs) { for (PDefinition d2 : defs) { if (d1 != d2 && d1.getName() != null && d2.getName() != null && d1.getName().equals(...
[ "public", "List", "<", "PDefinition", ">", "checkDuplicatePatterns", "(", "PDefinition", "d", ",", "List", "<", "PDefinition", ">", "defs", ")", "{", "Set", "<", "PDefinition", ">", "noDuplicates", "=", "new", "HashSet", "<", "PDefinition", ">", "(", ")", ...
Check a DefinitionList for incompatible duplicate pattern definitions. @param d @param defs @return
[ "Check", "a", "DefinitionList", "for", "incompatible", "duplicate", "pattern", "definitions", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/assistant/definition/PDefinitionAssistantTC.java#L400-L424
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.genIrStatus
protected void genIrStatus(List<IRStatus<PIR>> statuses, INode node) throws AnalysisException { IRStatus<PIR> status = generator.generateFrom(node); if (status != null) { statuses.add(status); } }
java
protected void genIrStatus(List<IRStatus<PIR>> statuses, INode node) throws AnalysisException { IRStatus<PIR> status = generator.generateFrom(node); if (status != null) { statuses.add(status); } }
[ "protected", "void", "genIrStatus", "(", "List", "<", "IRStatus", "<", "PIR", ">", ">", "statuses", ",", "INode", "node", ")", "throws", "AnalysisException", "{", "IRStatus", "<", "PIR", ">", "status", "=", "generator", ".", "generateFrom", "(", "node", ")...
This method translates a VDM node into an IR status. @param statuses A list of previously generated IR statuses. The generated IR status will be added to this list. @param node The VDM node from which we generate an IR status @throws AnalysisException If something goes wrong during the construction of the IR status.
[ "This", "method", "translates", "a", "VDM", "node", "into", "an", "IR", "status", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L138-L147
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.getModules
public static List<AModuleModules> getModules(List<INode> ast) { List<AModuleModules> modules = new LinkedList<>(); for (INode n : ast) { if (n instanceof AModuleModules) { modules.add((AModuleModules) n); } } return modules; }
java
public static List<AModuleModules> getModules(List<INode> ast) { List<AModuleModules> modules = new LinkedList<>(); for (INode n : ast) { if (n instanceof AModuleModules) { modules.add((AModuleModules) n); } } return modules; }
[ "public", "static", "List", "<", "AModuleModules", ">", "getModules", "(", "List", "<", "INode", ">", "ast", ")", "{", "List", "<", "AModuleModules", ">", "modules", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "INode", "n", ":", "ast", ...
Convenience method for extracting the VDM module definitions from a list of VDM nodes. @param ast A list of VDM nodes. @return The module definitions extracted from <code>ast</code>.
[ "Convenience", "method", "for", "extracting", "the", "VDM", "module", "definitions", "from", "a", "list", "of", "VDM", "nodes", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L223-L236
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.getClasses
public static List<SClassDefinition> getClasses(List<INode> ast) { List<SClassDefinition> classes = new LinkedList<>(); for (INode n : ast) { if (n instanceof SClassDefinition) { classes.add((SClassDefinition) n); } } return classes; }
java
public static List<SClassDefinition> getClasses(List<INode> ast) { List<SClassDefinition> classes = new LinkedList<>(); for (INode n : ast) { if (n instanceof SClassDefinition) { classes.add((SClassDefinition) n); } } return classes; }
[ "public", "static", "List", "<", "SClassDefinition", ">", "getClasses", "(", "List", "<", "INode", ">", "ast", ")", "{", "List", "<", "SClassDefinition", ">", "classes", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "INode", "n", ":", "ast...
Convenience method for extracting the VDM class definitions from a list of VDM nodes. @param ast A list of VDM nodes. @return The class definitions extracted from <code>ast</code>.
[ "Convenience", "method", "for", "extracting", "the", "VDM", "class", "definitions", "from", "a", "list", "of", "VDM", "nodes", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L245-L258
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.getNodes
public static List<INode> getNodes(List<? extends INode> ast) { List<INode> nodes = new LinkedList<>(); nodes.addAll(ast); return nodes; }
java
public static List<INode> getNodes(List<? extends INode> ast) { List<INode> nodes = new LinkedList<>(); nodes.addAll(ast); return nodes; }
[ "public", "static", "List", "<", "INode", ">", "getNodes", "(", "List", "<", "?", "extends", "INode", ">", "ast", ")", "{", "List", "<", "INode", ">", "nodes", "=", "new", "LinkedList", "<>", "(", ")", ";", "nodes", ".", "addAll", "(", "ast", ")", ...
Convenience method for converting a VDM AST into a list of nodes. @param ast The VDM AST. @return The VDM AST as a list of nodes.
[ "Convenience", "method", "for", "converting", "a", "VDM", "AST", "into", "a", "list", "of", "nodes", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L267-L274
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.getUserModules
protected List<INode> getUserModules(List<? extends INode> ast) { List<INode> userModules = new LinkedList<INode>(); for (INode node : ast) { if (!getInfo().getDeclAssistant().isLibrary(node)) { userModules.add(node); } } return userModules; }
java
protected List<INode> getUserModules(List<? extends INode> ast) { List<INode> userModules = new LinkedList<INode>(); for (INode node : ast) { if (!getInfo().getDeclAssistant().isLibrary(node)) { userModules.add(node); } } return userModules; }
[ "protected", "List", "<", "INode", ">", "getUserModules", "(", "List", "<", "?", "extends", "INode", ">", "ast", ")", "{", "List", "<", "INode", ">", "userModules", "=", "new", "LinkedList", "<", "INode", ">", "(", ")", ";", "for", "(", "INode", "nod...
This method extracts the user modules or classes from a VDM AST. @param ast The VDM AST. @return A list of user modules or classes.
[ "This", "method", "extracts", "the", "user", "modules", "or", "classes", "from", "a", "VDM", "AST", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L331-L344
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.removeUnreachableStms
protected void removeUnreachableStms(List<? extends INode> ast) throws AnalysisException { UnreachableStmRemover remover = new UnreachableStmRemover(); for (INode node : ast) { node.apply(remover); } }
java
protected void removeUnreachableStms(List<? extends INode> ast) throws AnalysisException { UnreachableStmRemover remover = new UnreachableStmRemover(); for (INode node : ast) { node.apply(remover); } }
[ "protected", "void", "removeUnreachableStms", "(", "List", "<", "?", "extends", "INode", ">", "ast", ")", "throws", "AnalysisException", "{", "UnreachableStmRemover", "remover", "=", "new", "UnreachableStmRemover", "(", ")", ";", "for", "(", "INode", "node", ":"...
This method removes unreachable statements from the VDM AST. @param ast The VDM AST subject to processing. @throws AnalysisException If something goes wrong when trying to remove unreachable statements from the <code>ast</code>.
[ "This", "method", "removes", "unreachable", "statements", "from", "the", "VDM", "AST", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L354-L363
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.simplifyLibrary
protected void simplifyLibrary(INode module) { List<PDefinition> defs = null; if (module instanceof SClassDefinition) { defs = ((SClassDefinition) module).getDefinitions(); } else if (module instanceof AModuleModules) { defs = ((AModuleModules) module).getDefs(); } else { // Nothing to do re...
java
protected void simplifyLibrary(INode module) { List<PDefinition> defs = null; if (module instanceof SClassDefinition) { defs = ((SClassDefinition) module).getDefinitions(); } else if (module instanceof AModuleModules) { defs = ((AModuleModules) module).getDefs(); } else { // Nothing to do re...
[ "protected", "void", "simplifyLibrary", "(", "INode", "module", ")", "{", "List", "<", "PDefinition", ">", "defs", "=", "null", ";", "if", "(", "module", "instanceof", "SClassDefinition", ")", "{", "defs", "=", "(", "(", "SClassDefinition", ")", "module", ...
Simplifies a VDM standard library class or module by removing sub-nodes that are likely not to be of interest during the generation of the IR. @param module A VDM class or module
[ "Simplifies", "a", "VDM", "standard", "library", "class", "or", "module", "by", "removing", "sub", "-", "nodes", "that", "are", "likely", "not", "to", "be", "of", "interest", "during", "the", "generation", "of", "the", "IR", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L372-L406
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.handleOldNames
protected void handleOldNames(List<? extends INode> vdmAst) throws AnalysisException { OldNameRenamer oldNameRenamer = new OldNameRenamer(); for (INode module : vdmAst) { module.apply(oldNameRenamer); } }
java
protected void handleOldNames(List<? extends INode> vdmAst) throws AnalysisException { OldNameRenamer oldNameRenamer = new OldNameRenamer(); for (INode module : vdmAst) { module.apply(oldNameRenamer); } }
[ "protected", "void", "handleOldNames", "(", "List", "<", "?", "extends", "INode", ">", "vdmAst", ")", "throws", "AnalysisException", "{", "OldNameRenamer", "oldNameRenamer", "=", "new", "OldNameRenamer", "(", ")", ";", "for", "(", "INode", "module", ":", "vdmA...
Processes old names by replacing the tilde sign '~' with an underscore. @param vdmAst The VDM AST subject to processing. @throws AnalysisException If something goes wrong during the renaming process.
[ "Processes", "old", "names", "by", "replacing", "the", "tilde", "sign", "~", "with", "an", "underscore", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L416-L425
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.shouldGenerateVdmNode
protected boolean shouldGenerateVdmNode(INode vdmNode) { DeclAssistantIR declAssistant = getInfo().getDeclAssistant(); if (declAssistant.isLibrary(vdmNode)) { return false; } else { return true; } }
java
protected boolean shouldGenerateVdmNode(INode vdmNode) { DeclAssistantIR declAssistant = getInfo().getDeclAssistant(); if (declAssistant.isLibrary(vdmNode)) { return false; } else { return true; } }
[ "protected", "boolean", "shouldGenerateVdmNode", "(", "INode", "vdmNode", ")", "{", "DeclAssistantIR", "declAssistant", "=", "getInfo", "(", ")", ".", "getDeclAssistant", "(", ")", ";", "if", "(", "declAssistant", ".", "isLibrary", "(", "vdmNode", ")", ")", "{...
Determines whether a VDM module or class should be code generated or not. @param vdmNode The node to be checked. @return True if <code>node</code> should be code generated - false otherwise.
[ "Determines", "whether", "a", "VDM", "module", "or", "class", "should", "be", "code", "generated", "or", "not", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L485-L496
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.genIrModule
protected GeneratedModule genIrModule(MergeVisitor mergeVisitor, IRStatus<? extends PIR> status) throws org.overture.codegen.ir.analysis.AnalysisException { if (status.canBeGenerated()) { mergeVisitor.init(); StringWriter writer = new StringWriter(); status.getIrNode().apply(mergeVisitor, writer); ...
java
protected GeneratedModule genIrModule(MergeVisitor mergeVisitor, IRStatus<? extends PIR> status) throws org.overture.codegen.ir.analysis.AnalysisException { if (status.canBeGenerated()) { mergeVisitor.init(); StringWriter writer = new StringWriter(); status.getIrNode().apply(mergeVisitor, writer); ...
[ "protected", "GeneratedModule", "genIrModule", "(", "MergeVisitor", "mergeVisitor", ",", "IRStatus", "<", "?", "extends", "PIR", ">", "status", ")", "throws", "org", ".", "overture", ".", "codegen", ".", "ir", ".", "analysis", ".", "AnalysisException", "{", "i...
This method translates an IR module or class into target language code. @param mergeVisitor The visitor that translates the IR module or class into target language code. @param status The IR status that holds the IR node that we want to code generate. @return The generated code and data about what has been generated. ...
[ "This", "method", "translates", "an", "IR", "module", "or", "class", "into", "target", "language", "code", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L509-L539
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.genIrExp
protected Generated genIrExp(IRStatus<SExpIR> expStatus, MergeVisitor mergeVisitor) throws org.overture.codegen.ir.analysis.AnalysisException { StringWriter writer = new StringWriter(); SExpIR expCg = expStatus.getIrNode(); if (expStatus.canBeGenerated()) { mergeVisitor.init(); expCg.apply(mergeV...
java
protected Generated genIrExp(IRStatus<SExpIR> expStatus, MergeVisitor mergeVisitor) throws org.overture.codegen.ir.analysis.AnalysisException { StringWriter writer = new StringWriter(); SExpIR expCg = expStatus.getIrNode(); if (expStatus.canBeGenerated()) { mergeVisitor.init(); expCg.apply(mergeV...
[ "protected", "Generated", "genIrExp", "(", "IRStatus", "<", "SExpIR", ">", "expStatus", ",", "MergeVisitor", "mergeVisitor", ")", "throws", "org", ".", "overture", ".", "codegen", ".", "ir", ".", "analysis", ".", "AnalysisException", "{", "StringWriter", "writer...
Translates an IR expression into target language code. @param expStatus The IR status that holds the expressions that we want to code generate. @param mergeVisitor The visitor that translates the IR expression into target language code. @return The generated code and data about what has been generated. @throws org.ove...
[ "Translates", "an", "IR", "expression", "into", "target", "language", "code", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L552-L582
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.emitCode
public static void emitCode(File outputFolder, String fileName, String code) { emitCode(outputFolder, fileName, code, "UTF-8"); }
java
public static void emitCode(File outputFolder, String fileName, String code) { emitCode(outputFolder, fileName, code, "UTF-8"); }
[ "public", "static", "void", "emitCode", "(", "File", "outputFolder", ",", "String", "fileName", ",", "String", "code", ")", "{", "emitCode", "(", "outputFolder", ",", "fileName", ",", "code", ",", "\"UTF-8\"", ")", ";", "}" ]
Emits generated code to a file. The file will be encoded using UTF-8. @param outputFolder The output folder that will store the generated code. @param fileName The name of the file that will store the generated code. @param code The generated code.
[ "Emits", "generated", "code", "to", "a", "file", ".", "The", "file", "will", "be", "encoded", "using", "UTF", "-", "8", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L594-L597
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java
CodeGenBase.emitCode
public static void emitCode(File outputFolder, String fileName, String code, String encoding) { try { File javaFile = new File(outputFolder, File.separator + fileName); javaFile.getParentFile().mkdirs(); javaFile.createNewFile(); PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOu...
java
public static void emitCode(File outputFolder, String fileName, String code, String encoding) { try { File javaFile = new File(outputFolder, File.separator + fileName); javaFile.getParentFile().mkdirs(); javaFile.createNewFile(); PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOu...
[ "public", "static", "void", "emitCode", "(", "File", "outputFolder", ",", "String", "fileName", ",", "String", "code", ",", "String", "encoding", ")", "{", "try", "{", "File", "javaFile", "=", "new", "File", "(", "outputFolder", ",", "File", ".", "separato...
Emits generated code to a file. @param outputFolder outputFolder The output folder that will store the generated code. @param fileName The name of the file that will store the generated code. @param code The generated code. @param encoding The encoding to use for the generated code.
[ "Emits", "generated", "code", "to", "a", "file", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/ir/CodeGenBase.java#L611-L629
train
overturetool/overture
core/codegen/isagen/src/main/java/org/overturetool/cgisa/IsaGen.java
IsaGen.genVdmToTargetLang
@Override protected GeneratedData genVdmToTargetLang(List<IRStatus<PIR>> statuses) throws AnalysisException { GeneratedData r = new GeneratedData(); try { // Apply transformations for (IRStatus<PIR> status : statuses) { // make init expression an op ...
java
@Override protected GeneratedData genVdmToTargetLang(List<IRStatus<PIR>> statuses) throws AnalysisException { GeneratedData r = new GeneratedData(); try { // Apply transformations for (IRStatus<PIR> status : statuses) { // make init expression an op ...
[ "@", "Override", "protected", "GeneratedData", "genVdmToTargetLang", "(", "List", "<", "IRStatus", "<", "PIR", ">", ">", "statuses", ")", "throws", "AnalysisException", "{", "GeneratedData", "r", "=", "new", "GeneratedData", "(", ")", ";", "try", "{", "// Appl...
Main entry point into the Isabelle Translator component. Takes an AST and returns corresponding Isabelle Syntax. @param statuses The IR statuses holding the nodes to be code generated. @return The generated Isabelle syntax @throws AnalysisException
[ "Main", "entry", "point", "into", "the", "Isabelle", "Translator", "component", ".", "Takes", "an", "AST", "and", "returns", "corresponding", "Isabelle", "Syntax", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/isagen/src/main/java/org/overturetool/cgisa/IsaGen.java#L91-L119
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/VdmThreadManager.java
VdmThreadManager.hasBreakpointAtCurrentPosition
private static boolean hasBreakpointAtCurrentPosition(VdmThread thread) { try { thread.updateStack(); if (thread.hasStackFrames()) { final IStackFrame top = thread.getTopStackFrame(); if (top instanceof IVdmStackFrame && top.getLineNumber() > 0) { final IVdmStackFrame frame = (IVdmStackFr...
java
private static boolean hasBreakpointAtCurrentPosition(VdmThread thread) { try { thread.updateStack(); if (thread.hasStackFrames()) { final IStackFrame top = thread.getTopStackFrame(); if (top instanceof IVdmStackFrame && top.getLineNumber() > 0) { final IVdmStackFrame frame = (IVdmStackFr...
[ "private", "static", "boolean", "hasBreakpointAtCurrentPosition", "(", "VdmThread", "thread", ")", "{", "try", "{", "thread", ".", "updateStack", "(", ")", ";", "if", "(", "thread", ".", "hasStackFrames", "(", ")", ")", "{", "final", "IStackFrame", "top", "=...
Tests if the specified thread has breakpoint at the same line @param thread @return
[ "Tests", "if", "the", "specified", "thread", "has", "breakpoint", "at", "the", "same", "line" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/VdmThreadManager.java#L229-L284
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/VdmThreadManager.java
VdmThreadManager.isValidStack
private static boolean isValidStack(VdmThread thread) { final IDebugOptions debugOptions = thread.getDbgpSession().getDebugOptions(); if (debugOptions.get(DebugOption.ENGINE_VALIDATE_STACK)) { thread.updateStack(); if (thread.hasStackFrames()) { return thread.isValidStack(); } } return true; ...
java
private static boolean isValidStack(VdmThread thread) { final IDebugOptions debugOptions = thread.getDbgpSession().getDebugOptions(); if (debugOptions.get(DebugOption.ENGINE_VALIDATE_STACK)) { thread.updateStack(); if (thread.hasStackFrames()) { return thread.isValidStack(); } } return true; ...
[ "private", "static", "boolean", "isValidStack", "(", "VdmThread", "thread", ")", "{", "final", "IDebugOptions", "debugOptions", "=", "thread", ".", "getDbgpSession", "(", ")", ".", "getDebugOptions", "(", ")", ";", "if", "(", "debugOptions", ".", "get", "(", ...
Tests if the specified thread has valid current stack. In some cases it is better to skip first internal location. @param thread @return
[ "Tests", "if", "the", "specified", "thread", "has", "valid", "current", "stack", ".", "In", "some", "cases", "it", "is", "better", "to", "skip", "first", "internal", "location", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/VdmThreadManager.java#L293-L305
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/utility/ast/AstLocationSearcher2.java
AstLocationSearcher2.caseILexLocation
@Override public void caseILexLocation(ILexLocation node) throws AnalysisException { AstLocation location = new AstLocation(current, node); if (reference.contains(node.getStartOffset(), node.getEndOffset(), node.getFile()))// we need to do set some // upper limit on the ...
java
@Override public void caseILexLocation(ILexLocation node) throws AnalysisException { AstLocation location = new AstLocation(current, node); if (reference.contains(node.getStartOffset(), node.getEndOffset(), node.getFile()))// we need to do set some // upper limit on the ...
[ "@", "Override", "public", "void", "caseILexLocation", "(", "ILexLocation", "node", ")", "throws", "AnalysisException", "{", "AstLocation", "location", "=", "new", "AstLocation", "(", "current", ",", "node", ")", ";", "if", "(", "reference", ".", "contains", "...
Never called by analysis from super
[ "Never", "called", "by", "analysis", "from", "super" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/utility/ast/AstLocationSearcher2.java#L133-L149
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/utilities/type/AllValuesCollector.java
AllValuesCollector.generateNumbers
protected ValueList generateNumbers(int min, int max, Context ctxt) throws ValueException { ValueList list = new ValueList(); for (int i = min; i < max + 1; i++) { list.add(NumericValue.valueOf(i, ctxt)); } return list; }
java
protected ValueList generateNumbers(int min, int max, Context ctxt) throws ValueException { ValueList list = new ValueList(); for (int i = min; i < max + 1; i++) { list.add(NumericValue.valueOf(i, ctxt)); } return list; }
[ "protected", "ValueList", "generateNumbers", "(", "int", "min", ",", "int", "max", ",", "Context", "ctxt", ")", "throws", "ValueException", "{", "ValueList", "list", "=", "new", "ValueList", "(", ")", ";", "for", "(", "int", "i", "=", "min", ";", "i", ...
Generator method for numeric type bindings. @param min the minimum number @param max the maximum number @param ctxt current context @return the newly generated list of values between min and max, including. @throws ValueException
[ "Generator", "method", "for", "numeric", "type", "bindings", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/utilities/type/AllValuesCollector.java#L118-L128
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/ConsoleTerminateAction.java
ConsoleTerminateAction.collectTargets
private List<IDebugTarget> collectTargets(IProcess process) { ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); ILaunch[] launches = launchManager.getLaunches(); List<IDebugTarget> targets = new ArrayList<IDebugTarget>(); for (int i = 0; i < launches.length; i++) { ILaunch launch...
java
private List<IDebugTarget> collectTargets(IProcess process) { ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); ILaunch[] launches = launchManager.getLaunches(); List<IDebugTarget> targets = new ArrayList<IDebugTarget>(); for (int i = 0; i < launches.length; i++) { ILaunch launch...
[ "private", "List", "<", "IDebugTarget", ">", "collectTargets", "(", "IProcess", "process", ")", "{", "ILaunchManager", "launchManager", "=", "DebugPlugin", ".", "getDefault", "(", ")", ".", "getLaunchManager", "(", ")", ";", "ILaunch", "[", "]", "launches", "=...
Collects targets associated with a process. @param process the process to collect {@link IDebugTarget}s for @return associated targets
[ "Collects", "targets", "associated", "with", "a", "process", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/ConsoleTerminateAction.java#L112-L136
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/VdmUILabelProvider.java
VdmUILabelProvider.addLabelDecorator
public void addLabelDecorator(ILabelDecorator decorator) { if (fLabelDecorators == null) { fLabelDecorators = new ArrayList<ILabelDecorator>(2); } fLabelDecorators.add(decorator); }
java
public void addLabelDecorator(ILabelDecorator decorator) { if (fLabelDecorators == null) { fLabelDecorators = new ArrayList<ILabelDecorator>(2); } fLabelDecorators.add(decorator); }
[ "public", "void", "addLabelDecorator", "(", "ILabelDecorator", "decorator", ")", "{", "if", "(", "fLabelDecorators", "==", "null", ")", "{", "fLabelDecorators", "=", "new", "ArrayList", "<", "ILabelDecorator", ">", "(", "2", ")", ";", "}", "fLabelDecorators", ...
Adds a decorator to the label provider @param decorator the decorator to add
[ "Adds", "a", "decorator", "to", "the", "label", "provider" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/VdmUILabelProvider.java#L86-L93
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/VdmUILabelProvider.java
VdmUILabelProvider.fireLabelProviderChanged
protected void fireLabelProviderChanged( final LabelProviderChangedEvent event) { Object[] listeners = fListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ILabelProviderListener l = (ILabelProviderListener) listeners[i]; SafeRunner.run(new SafeRunnable() { public void ru...
java
protected void fireLabelProviderChanged( final LabelProviderChangedEvent event) { Object[] listeners = fListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ILabelProviderListener l = (ILabelProviderListener) listeners[i]; SafeRunner.run(new SafeRunnable() { public void ru...
[ "protected", "void", "fireLabelProviderChanged", "(", "final", "LabelProviderChangedEvent", "event", ")", "{", "Object", "[", "]", "listeners", "=", "fListeners", ".", "getListeners", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "listeners...
Fires a label provider changed event to all registered listeners Only listeners registered at the time this method is called are notified. @param event a label provider changed event @see ILabelProviderListener#labelProviderChanged
[ "Fires", "a", "label", "provider", "changed", "event", "to", "all", "registered", "listeners", "Only", "listeners", "registered", "at", "the", "time", "this", "method", "is", "called", "are", "notified", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/internal/viewsupport/VdmUILabelProvider.java#L357-L372
train
overturetool/overture
ide/plugins/csk/src/main/java/org/overture/ide/plugins/csk/internal/WorkbenchPreferencePageCsk.java
WorkbenchPreferencePageCsk.createContents
@Override protected Control createContents(Composite parent) { Composite top = new Composite(parent, SWT.LEFT); // Sets the layout data for the top composite's // place in its parent's layout. top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Sets the layout for the top composite's // child...
java
@Override protected Control createContents(Composite parent) { Composite top = new Composite(parent, SWT.LEFT); // Sets the layout data for the top composite's // place in its parent's layout. top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Sets the layout for the top composite's // child...
[ "@", "Override", "protected", "Control", "createContents", "(", "Composite", "parent", ")", "{", "Composite", "top", "=", "new", "Composite", "(", "parent", ",", "SWT", ".", "LEFT", ")", ";", "// Sets the layout data for the top composite's ", "// place in its parent'...
DirectoryFieldEditor vicePathMac = null;
[ "DirectoryFieldEditor", "vicePathMac", "=", "null", ";" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/plugins/csk/src/main/java/org/overture/ide/plugins/csk/internal/WorkbenchPreferencePageCsk.java#L52-L102
train
overturetool/overture
ide/core/src/main/java/org/overture/ide/core/parser/AbstractParserParticipant.java
AbstractParserParticipant.setFileMarkers
private void setFileMarkers(IFile file, ParseResult result) throws CoreException { if (file != null) { FileUtility.deleteMarker(file, IMarker.PROBLEM, ICoreConstants.PLUGIN_ID); if (result.hasParseErrors()) { file.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE); int previousError...
java
private void setFileMarkers(IFile file, ParseResult result) throws CoreException { if (file != null) { FileUtility.deleteMarker(file, IMarker.PROBLEM, ICoreConstants.PLUGIN_ID); if (result.hasParseErrors()) { file.deleteMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE); int previousError...
[ "private", "void", "setFileMarkers", "(", "IFile", "file", ",", "ParseResult", "result", ")", "throws", "CoreException", "{", "if", "(", "file", "!=", "null", ")", "{", "FileUtility", ".", "deleteMarker", "(", "file", ",", "IMarker", ".", "PROBLEM", ",", "...
Adds markers to a file based on the result. if errors occurred the problem markers are first cleared. @param file the file where the markers should be set @param result the result indicating if parse errors occurred @param content @throws CoreException
[ "Adds", "markers", "to", "a", "file", "based", "on", "the", "result", ".", "if", "errors", "occurred", "the", "problem", "markers", "are", "first", "cleared", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/core/src/main/java/org/overture/ide/core/parser/AbstractParserParticipant.java#L164-L203
train
overturetool/overture
core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/StaticSentinel.java
StaticSentinel.leaving
public synchronized static void leaving(String classname, int fnr2) { int fn = fnr2; m.put(classname, StaticOperationsCounters.fin[fn]++);// fin[fn]++; //changes the #fin counter adding one to it. m.put(classname, StaticOperationsCounters.active[fn]--); // changes the #active counter removing one to it. stateC...
java
public synchronized static void leaving(String classname, int fnr2) { int fn = fnr2; m.put(classname, StaticOperationsCounters.fin[fn]++);// fin[fn]++; //changes the #fin counter adding one to it. m.put(classname, StaticOperationsCounters.active[fn]--); // changes the #active counter removing one to it. stateC...
[ "public", "synchronized", "static", "void", "leaving", "(", "String", "classname", ",", "int", "fnr2", ")", "{", "int", "fn", "=", "fnr2", ";", "m", ".", "put", "(", "classname", ",", "StaticOperationsCounters", ".", "fin", "[", "fn", "]", "++", ")", "...
this method is registering the termination of a method.
[ "this", "method", "is", "registering", "the", "termination", "of", "a", "method", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/StaticSentinel.java#L42-L48
train
overturetool/overture
core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/StaticSentinel.java
StaticSentinel.waiting
private synchronized static void waiting(String classname, int fnr, int offset) { m.put(classname, StaticOperationsCounters.waiting[fnr] += offset); stateChanged(); }
java
private synchronized static void waiting(String classname, int fnr, int offset) { m.put(classname, StaticOperationsCounters.waiting[fnr] += offset); stateChanged(); }
[ "private", "synchronized", "static", "void", "waiting", "(", "String", "classname", ",", "int", "fnr", ",", "int", "offset", ")", "{", "m", ".", "put", "(", "classname", ",", "StaticOperationsCounters", ".", "waiting", "[", "fnr", "]", "+=", "offset", ")",...
The offset defines how many methods of the same name are waiting.
[ "The", "offset", "defines", "how", "many", "methods", "of", "the", "same", "name", "are", "waiting", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/codegen-runtime/src/main/java/org/overture/codegen/runtime/StaticSentinel.java#L73-L78
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/VdmEvaluationContextManager.java
VdmEvaluationContextManager.setContext
private void setContext(IWorkbenchPage page, IVdmStackFrame frame) { // pageToContextMap.put(page, frame); // System.setProperty(DEBUGGER_ACTIVE, "true"); //$NON-NLS-1$ /* * if (frame.canForceReturn()) { System.setProperty(SUPPORTS_FORCE_RETURN, "true"); //$NON-NLS-1$ } else { * System.setProperty(SUPPOR...
java
private void setContext(IWorkbenchPage page, IVdmStackFrame frame) { // pageToContextMap.put(page, frame); // System.setProperty(DEBUGGER_ACTIVE, "true"); //$NON-NLS-1$ /* * if (frame.canForceReturn()) { System.setProperty(SUPPORTS_FORCE_RETURN, "true"); //$NON-NLS-1$ } else { * System.setProperty(SUPPOR...
[ "private", "void", "setContext", "(", "IWorkbenchPage", "page", ",", "IVdmStackFrame", "frame", ")", "{", "// pageToContextMap.put(page, frame);", "//\t\tSystem.setProperty(DEBUGGER_ACTIVE, \"true\"); //$NON-NLS-1$", "/*\n\t\t * if (frame.canForceReturn()) { System.setProperty(SUPPORTS_FOR...
Sets the evaluation context for the given page, and notes that a valid execution context exists. @param page @param frame
[ "Sets", "the", "evaluation", "context", "for", "the", "given", "page", "and", "notes", "that", "a", "valid", "execution", "context", "exists", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/VdmEvaluationContextManager.java#L135-L171
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/ui/VdmEvaluationContextManager.java
VdmEvaluationContextManager.removeContext
private void removeContext(IWorkbenchPage page) { // pageToContextMap.remove(page); // if (pageToContextMap.isEmpty()) // { // System.setProperty(DEBUGGER_ACTIVE, "false"); //$NON-NLS-1$ // // System.setProperty(INSTANCE_OF_IJAVA_STACK_FRAME, "false"); // // //$NON-NLS-1$ // // System.setProperty(S...
java
private void removeContext(IWorkbenchPage page) { // pageToContextMap.remove(page); // if (pageToContextMap.isEmpty()) // { // System.setProperty(DEBUGGER_ACTIVE, "false"); //$NON-NLS-1$ // // System.setProperty(INSTANCE_OF_IJAVA_STACK_FRAME, "false"); // // //$NON-NLS-1$ // // System.setProperty(S...
[ "private", "void", "removeContext", "(", "IWorkbenchPage", "page", ")", "{", "// pageToContextMap.remove(page);", "// if (pageToContextMap.isEmpty())", "// {", "//\t\t\tSystem.setProperty(DEBUGGER_ACTIVE, \"false\"); //$NON-NLS-1$", "// // System.setProperty(INSTANCE_OF_IJAVA_STACK_FRAME, \"...
Removes an evaluation context for the given page, and determines if any valid execution context remain. @param page
[ "Removes", "an", "evaluation", "context", "for", "the", "given", "page", "and", "determines", "if", "any", "valid", "execution", "context", "remain", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/VdmEvaluationContextManager.java#L178-L201
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/scheduler/SystemClock.java
SystemClock.timeToInternal
public static long timeToInternal(TimeUnit unit, Double time) { return Math.round(time * unit.getValue() / TimeUnit.nanosecond.getValue()); }
java
public static long timeToInternal(TimeUnit unit, Double time) { return Math.round(time * unit.getValue() / TimeUnit.nanosecond.getValue()); }
[ "public", "static", "long", "timeToInternal", "(", "TimeUnit", "unit", ",", "Double", "time", ")", "{", "return", "Math", ".", "round", "(", "time", "*", "unit", ".", "getValue", "(", ")", "/", "TimeUnit", ".", "nanosecond", ".", "getValue", "(", ")", ...
Utility method to convert a value in the given unit to the internal time @param unit The unit of the time parameter @param time The time to convert @return The internal time representation of the parameter
[ "Utility", "method", "to", "convert", "a", "value", "in", "the", "given", "unit", "to", "the", "internal", "time" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/scheduler/SystemClock.java#L100-L104
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/scheduler/SystemClock.java
SystemClock.internalToTime
public static Double internalToTime(TimeUnit unit, long internalTime) { return Math.round(internalTime * TimeUnit.nanosecond.getValue() / unit.getValue() * PRECISION) / PRECISION; }
java
public static Double internalToTime(TimeUnit unit, long internalTime) { return Math.round(internalTime * TimeUnit.nanosecond.getValue() / unit.getValue() * PRECISION) / PRECISION; }
[ "public", "static", "Double", "internalToTime", "(", "TimeUnit", "unit", ",", "long", "internalTime", ")", "{", "return", "Math", ".", "round", "(", "internalTime", "*", "TimeUnit", ".", "nanosecond", ".", "getValue", "(", ")", "/", "unit", ".", "getValue", ...
Utility method to convert the internal time to the given unit. @param unit The unit to convert the internal time to @param internalTime The internal time @return The internal time representation of the parameter
[ "Utility", "method", "to", "convert", "the", "internal", "time", "to", "the", "given", "unit", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/scheduler/SystemClock.java#L130-L135
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/VdmBreakpointManager.java
VdmBreakpointManager.addBreakpoint
protected void addBreakpoint(final IDbgpSession session, IVdmBreakpoint breakpoint) throws CoreException, DbgpException { final IDbgpCoreCommands commands = session.getCoreCommands(); DbgpBreakpointConfig config = createBreakpointConfig(breakpoint); String id = null; URI bpUri = null; // map the outgoin...
java
protected void addBreakpoint(final IDbgpSession session, IVdmBreakpoint breakpoint) throws CoreException, DbgpException { final IDbgpCoreCommands commands = session.getCoreCommands(); DbgpBreakpointConfig config = createBreakpointConfig(breakpoint); String id = null; URI bpUri = null; // map the outgoin...
[ "protected", "void", "addBreakpoint", "(", "final", "IDbgpSession", "session", ",", "IVdmBreakpoint", "breakpoint", ")", "throws", "CoreException", ",", "DbgpException", "{", "final", "IDbgpCoreCommands", "commands", "=", "session", ".", "getCoreCommands", "(", ")", ...
Adding, removing, updating
[ "Adding", "removing", "updating" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/internal/VdmBreakpointManager.java#L117-L178
train
overturetool/overture
core/interpreter/src/main/java/CSV.java
CSV.fwriteval
public static Value fwriteval(Value fval, Value tval, Value dval) { File file = getFile(fval); String fdir = dval.toString(); // <start>|<append> StringBuffer text = new StringBuffer(); if (tval instanceof SeqValue) { for (Value val : ((SeqValue) tval).values) { text.append(val.toString()); tex...
java
public static Value fwriteval(Value fval, Value tval, Value dval) { File file = getFile(fval); String fdir = dval.toString(); // <start>|<append> StringBuffer text = new StringBuffer(); if (tval instanceof SeqValue) { for (Value val : ((SeqValue) tval).values) { text.append(val.toString()); tex...
[ "public", "static", "Value", "fwriteval", "(", "Value", "fval", ",", "Value", "tval", ",", "Value", "dval", ")", "{", "File", "file", "=", "getFile", "(", "fval", ")", ";", "String", "fdir", "=", "dval", ".", "toString", "(", ")", ";", "// <start>|<app...
Writes a seq of ? in a CSV format to the file specified @param fval the filename @param tval the sequence to write @param dval append to or start a new file @return
[ "Writes", "a", "seq", "of", "?", "in", "a", "CSV", "format", "to", "the", "file", "specified" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/CSV.java#L54-L88
train
overturetool/overture
core/interpreter/src/main/java/CSV.java
CSV.freadval
public static Value freadval(Value fval, Value indexVal) { ValueList result = new ValueList(); try { File file = getFile(fval); long index = indexVal.intValue(null); SeqValue lineCells = new SeqValue(); boolean success = false; try { CsvParser parser = new CsvParser(new CsvValueBuilder() ...
java
public static Value freadval(Value fval, Value indexVal) { ValueList result = new ValueList(); try { File file = getFile(fval); long index = indexVal.intValue(null); SeqValue lineCells = new SeqValue(); boolean success = false; try { CsvParser parser = new CsvParser(new CsvValueBuilder() ...
[ "public", "static", "Value", "freadval", "(", "Value", "fval", ",", "Value", "indexVal", ")", "{", "ValueList", "result", "=", "new", "ValueList", "(", ")", ";", "try", "{", "File", "file", "=", "getFile", "(", "fval", ")", ";", "long", "index", "=", ...
Read a CSV live as a seq of ? in VDM @param fval name of the file to read from @param indexVal the line index @return true + seq of ? or false and nil
[ "Read", "a", "CSV", "live", "as", "a", "seq", "of", "?", "in", "VDM" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/CSV.java#L99-L152
train
overturetool/overture
core/interpreter/src/main/java/CSV.java
CSV.flinecount
public static Value flinecount(Value fval) { ValueList result = new ValueList(); try { File file = getFile(fval); long count = getLineCount(file); result.add(new BooleanValue(true)); result.add(new IntegerValue(count)); } catch (Exception e) { lastError = e.toString(); result = new ValueL...
java
public static Value flinecount(Value fval) { ValueList result = new ValueList(); try { File file = getFile(fval); long count = getLineCount(file); result.add(new BooleanValue(true)); result.add(new IntegerValue(count)); } catch (Exception e) { lastError = e.toString(); result = new ValueL...
[ "public", "static", "Value", "flinecount", "(", "Value", "fval", ")", "{", "ValueList", "result", "=", "new", "ValueList", "(", ")", ";", "try", "{", "File", "file", "=", "getFile", "(", "fval", ")", ";", "long", "count", "=", "getLineCount", "(", "fil...
Gets the line count of the CSV file @param fval name of the file @return int value with count
[ "Gets", "the", "line", "count", "of", "the", "CSV", "file" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/CSV.java#L161-L181
train
overturetool/overture
ide/core/src/main/java/org/overture/ide/internal/core/ResourceManager.java
ResourceManager.syncBuildPath
public synchronized void syncBuildPath(IVdmProject project) throws CoreException { List<IVdmSourceUnit> syncedVdmSourceUnits = project.getSpecFiles(); List<IFile> removedFiles = new Vector<IFile>(); IProject p = (IProject) project.getAdapter(IProject.class); for (IFile file : vdmSourceUnits.keySet()) { ...
java
public synchronized void syncBuildPath(IVdmProject project) throws CoreException { List<IVdmSourceUnit> syncedVdmSourceUnits = project.getSpecFiles(); List<IFile> removedFiles = new Vector<IFile>(); IProject p = (IProject) project.getAdapter(IProject.class); for (IFile file : vdmSourceUnits.keySet()) { ...
[ "public", "synchronized", "void", "syncBuildPath", "(", "IVdmProject", "project", ")", "throws", "CoreException", "{", "List", "<", "IVdmSourceUnit", ">", "syncedVdmSourceUnits", "=", "project", ".", "getSpecFiles", "(", ")", ";", "List", "<", "IFile", ">", "rem...
Sync existing IVdmSource files with the build path of the project. This is used when the build path changed and the project should be updated. This method removed old IVdmSource files which no longer is withing the build path. @param project @throws CoreException
[ "Sync", "existing", "IVdmSource", "files", "with", "the", "build", "path", "of", "the", "project", ".", "This", "is", "used", "when", "the", "build", "path", "changed", "and", "the", "project", "should", "be", "updated", ".", "This", "method", "removed", "...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/core/src/main/java/org/overture/ide/internal/core/ResourceManager.java#L436-L460
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/VdmDebugState.java
VdmDebugState.setState
public synchronized void setState(DebugState newState) { if (!states.contains(newState)) { switch (newState) { case Disconnected: Assert.isLegal(canChange(DebugState.Disconnected), "Cannot disconnect a terminated state"); case Terminated: Assert.isLegal(canChange(DebugState.Terminated), "Ca...
java
public synchronized void setState(DebugState newState) { if (!states.contains(newState)) { switch (newState) { case Disconnected: Assert.isLegal(canChange(DebugState.Disconnected), "Cannot disconnect a terminated state"); case Terminated: Assert.isLegal(canChange(DebugState.Terminated), "Ca...
[ "public", "synchronized", "void", "setState", "(", "DebugState", "newState", ")", "{", "if", "(", "!", "states", ".", "contains", "(", "newState", ")", ")", "{", "switch", "(", "newState", ")", "{", "case", "Disconnected", ":", "Assert", ".", "isLegal", ...
Sets a new state, an Assert.IsLegal is asserted if the given state is not valid based on the current state @param newState the new state to change into
[ "Sets", "a", "new", "state", "an", "Assert", ".", "IsLegal", "is", "asserted", "if", "the", "given", "state", "is", "not", "valid", "based", "on", "the", "current", "state" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/VdmDebugState.java#L62-L101
train
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/core/model/VdmDebugState.java
VdmDebugState.canChange
public synchronized boolean canChange(DebugState newState) { switch (newState) { case Disconnected: return !inState(DebugState.Terminated) && !inState(DebugState.Disconnected); case Terminated: return !inState(DebugState.Terminated); case Suspended: return inState(DebugState.Resumed);// ...
java
public synchronized boolean canChange(DebugState newState) { switch (newState) { case Disconnected: return !inState(DebugState.Terminated) && !inState(DebugState.Disconnected); case Terminated: return !inState(DebugState.Terminated); case Suspended: return inState(DebugState.Resumed);// ...
[ "public", "synchronized", "boolean", "canChange", "(", "DebugState", "newState", ")", "{", "switch", "(", "newState", ")", "{", "case", "Disconnected", ":", "return", "!", "inState", "(", "DebugState", ".", "Terminated", ")", "&&", "!", "inState", "(", "Debu...
Checks if a change to the newState is allowed @param newState the new state requested @return true if allowed else false
[ "Checks", "if", "a", "change", "to", "the", "newState", "is", "allowed" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/core/model/VdmDebugState.java#L122-L143
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/preview/GraphViz.java
GraphViz.getGraph
public byte[] getGraph(String dot_source, String type) throws GraphVizException { File dot; byte[] img_stream = null; try { dot = writeDotSourceToFile(dot_source); if (dot != null) { img_stream = get_img_stream(dot, type); if (!dot.delete()) { throw new GraphVizException("Warning: ...
java
public byte[] getGraph(String dot_source, String type) throws GraphVizException { File dot; byte[] img_stream = null; try { dot = writeDotSourceToFile(dot_source); if (dot != null) { img_stream = get_img_stream(dot, type); if (!dot.delete()) { throw new GraphVizException("Warning: ...
[ "public", "byte", "[", "]", "getGraph", "(", "String", "dot_source", ",", "String", "type", ")", "throws", "GraphVizException", "{", "File", "dot", ";", "byte", "[", "]", "img_stream", "=", "null", ";", "try", "{", "dot", "=", "writeDotSourceToFile", "(", ...
Returns the graph as an image in binary format. @param dot_source Source of the graph to be drawn. @param type Type of the output image to be produced, e.g.: gif, dot, fig, pdf, ps, svg, png. @return A byte array containing the image of the graph. @throws GraphVizException
[ "Returns", "the", "graph", "as", "an", "image", "in", "binary", "format", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/preview/GraphViz.java#L135-L160
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/preview/GraphViz.java
GraphViz.get_img_stream
private byte[] get_img_stream(File dot, String type) throws GraphVizException { File img; byte[] img_stream = null; try { img = File.createTempFile("graph_", "." + type); Runtime rt = Runtime.getRuntime(); // patch by Mike Chenault String[] args = { dotPath, "-T" + type, dot.getAbsolutePath(), ...
java
private byte[] get_img_stream(File dot, String type) throws GraphVizException { File img; byte[] img_stream = null; try { img = File.createTempFile("graph_", "." + type); Runtime rt = Runtime.getRuntime(); // patch by Mike Chenault String[] args = { dotPath, "-T" + type, dot.getAbsolutePath(), ...
[ "private", "byte", "[", "]", "get_img_stream", "(", "File", "dot", ",", "String", "type", ")", "throws", "GraphVizException", "{", "File", "img", ";", "byte", "[", "]", "img_stream", "=", "null", ";", "try", "{", "img", "=", "File", ".", "createTempFile"...
It will call the external dot program, and return the image in binary format. @param dot Source of the graph (in dot language). @param type Type of the output image to be produced, e.g.: gif, dot, fig, pdf, ps, svg, png. @return The image of the graph in .gif format. @throws GraphVizException
[ "It", "will", "call", "the", "external", "dot", "program", "and", "return", "the", "image", "in", "binary", "format", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/preview/GraphViz.java#L212-L248
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/preview/GraphViz.java
GraphViz.writeDotSourceToFile
private File writeDotSourceToFile(String str) throws java.io.IOException, GraphVizException { File temp; try { temp = File.createTempFile("graph_", ".dot.tmp"); FileWriter fout = new FileWriter(temp); fout.write(str); fout.close(); } catch (Exception e) { throw new GraphVizException("Error:...
java
private File writeDotSourceToFile(String str) throws java.io.IOException, GraphVizException { File temp; try { temp = File.createTempFile("graph_", ".dot.tmp"); FileWriter fout = new FileWriter(temp); fout.write(str); fout.close(); } catch (Exception e) { throw new GraphVizException("Error:...
[ "private", "File", "writeDotSourceToFile", "(", "String", "str", ")", "throws", "java", ".", "io", ".", "IOException", ",", "GraphVizException", "{", "File", "temp", ";", "try", "{", "temp", "=", "File", ".", "createTempFile", "(", "\"graph_\"", ",", "\".dot...
Writes the source of the graph in a file, and returns the written file as a File object. @param str Source of the graph (in dot language). @return The file (as a File object) that contains the source of the graph. @throws GraphVizException
[ "Writes", "the", "source", "of", "the", "graph", "in", "a", "file", "and", "returns", "the", "written", "file", "as", "a", "File", "object", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/preview/GraphViz.java#L258-L273
train
overturetool/overture
core/ast/src/main/java/org/overture/ast/preview/GraphViz.java
GraphViz.readSource
public void readSource(String input) throws GraphVizException { StringBuilder sb = new StringBuilder(); try { FileInputStream fis = new FileInputStream(input); DataInputStream dis = new DataInputStream(fis); BufferedReader br = new BufferedReader(new InputStreamReader(dis)); String line; while ((l...
java
public void readSource(String input) throws GraphVizException { StringBuilder sb = new StringBuilder(); try { FileInputStream fis = new FileInputStream(input); DataInputStream dis = new DataInputStream(fis); BufferedReader br = new BufferedReader(new InputStreamReader(dis)); String line; while ((l...
[ "public", "void", "readSource", "(", "String", "input", ")", "throws", "GraphVizException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "FileInputStream", "fis", "=", "new", "FileInputStream", "(", "input", ")", ";", "...
Read a DOT graph from a text file. @param input Input text file containing the DOT graph source. @throws GraphVizException
[ "Read", "a", "DOT", "graph", "from", "a", "text", "file", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/ast/src/main/java/org/overture/ast/preview/GraphViz.java#L304-L323
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/ExpressionReader.java
ExpressionReader.readDefEqualsExpression
public AEqualsBinaryExp readDefEqualsExpression() throws ParserException, LexException { // This is an oddball parse for the "def" expression :-) PExp exp = readEvaluatorP1Expression(); LexToken token = lastToken(); if (readToken().is(VDMToken.EQUALS)) { return AstFactory.newAEqualsBinaryExp(exp, tok...
java
public AEqualsBinaryExp readDefEqualsExpression() throws ParserException, LexException { // This is an oddball parse for the "def" expression :-) PExp exp = readEvaluatorP1Expression(); LexToken token = lastToken(); if (readToken().is(VDMToken.EQUALS)) { return AstFactory.newAEqualsBinaryExp(exp, tok...
[ "public", "AEqualsBinaryExp", "readDefEqualsExpression", "(", ")", "throws", "ParserException", ",", "LexException", "{", "// This is an oddball parse for the \"def\" expression :-)", "PExp", "exp", "=", "readEvaluatorP1Expression", "(", ")", ";", "LexToken", "token", "=", ...
Relations Family...
[ "Relations", "Family", "..." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/ExpressionReader.java#L197-L212
train
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/ExpressionReader.java
ExpressionReader.readEvaluatorP1Expression
private PExp readEvaluatorP1Expression() throws ParserException, LexException { PExp exp = readEvaluatorP2Expression(); boolean more = true; while (more) // Left grouping { LexToken token = lastToken(); switch (token.type) { case PLUS: nextToken(); exp = AstFactory.newAPlusNumericBi...
java
private PExp readEvaluatorP1Expression() throws ParserException, LexException { PExp exp = readEvaluatorP2Expression(); boolean more = true; while (more) // Left grouping { LexToken token = lastToken(); switch (token.type) { case PLUS: nextToken(); exp = AstFactory.newAPlusNumericBi...
[ "private", "PExp", "readEvaluatorP1Expression", "(", ")", "throws", "ParserException", ",", "LexException", "{", "PExp", "exp", "=", "readEvaluatorP2Expression", "(", ")", ";", "boolean", "more", "=", "true", ";", "while", "(", "more", ")", "// Left grouping", "...
Evaluator Family...
[ "Evaluator", "Family", "..." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/ExpressionReader.java#L315-L369
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java
DBGPReaderV2.xcmdOvertureResponse
private void xcmdOvertureResponse(DBGPXCmdOvertureCommandType overtureCmd, StringBuilder hdr, StringBuilder body) throws IOException { StringBuilder sb = new StringBuilder(); sb.append("<xcmd_overture_response command=\""); sb.append(command); sb.append("\""); sb.append(" overtureCmd=\""); sb.append(o...
java
private void xcmdOvertureResponse(DBGPXCmdOvertureCommandType overtureCmd, StringBuilder hdr, StringBuilder body) throws IOException { StringBuilder sb = new StringBuilder(); sb.append("<xcmd_overture_response command=\""); sb.append(command); sb.append("\""); sb.append(" overtureCmd=\""); sb.append(o...
[ "private", "void", "xcmdOvertureResponse", "(", "DBGPXCmdOvertureCommandType", "overtureCmd", ",", "StringBuilder", "hdr", ",", "StringBuilder", "body", ")", "throws", "IOException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", ...
Send a xcmd Overture Response @param overtureCmd The overture command which this is a response to @param hdr The header @param body The body @throws IOException
[ "Send", "a", "xcmd", "Overture", "Response" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java#L841-L875
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java
DBGPReaderV2.propertyResponse
@Override protected StringBuilder propertyResponse(NameValuePairMap vars, DBGPContextType context) throws UnsupportedEncodingException { StringBuilder sb = new StringBuilder(); for (Entry<ILexNameToken, Value> e : vars.entrySet()) { if (!e.getKey().getName().equals("self")) { // This test makes the se...
java
@Override protected StringBuilder propertyResponse(NameValuePairMap vars, DBGPContextType context) throws UnsupportedEncodingException { StringBuilder sb = new StringBuilder(); for (Entry<ILexNameToken, Value> e : vars.entrySet()) { if (!e.getKey().getName().equals("self")) { // This test makes the se...
[ "@", "Override", "protected", "StringBuilder", "propertyResponse", "(", "NameValuePairMap", "vars", ",", "DBGPContextType", "context", ")", "throws", "UnsupportedEncodingException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", ...
Overrides super class by filtering all entries against isDebugVisible
[ "Overrides", "super", "class", "by", "filtering", "all", "entries", "against", "isDebugVisible" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java#L927-L946
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java
DBGPReaderV2.getChildCount
private Integer getChildCount(Value value) { // all types listed here are directly toString() in the debugger if (value instanceof NumericValue || value instanceof CharacterValue || value instanceof NilValue || value instanceof TokenValue) { return 0; } else if (value instanceof SetValue) { return ...
java
private Integer getChildCount(Value value) { // all types listed here are directly toString() in the debugger if (value instanceof NumericValue || value instanceof CharacterValue || value instanceof NilValue || value instanceof TokenValue) { return 0; } else if (value instanceof SetValue) { return ...
[ "private", "Integer", "getChildCount", "(", "Value", "value", ")", "{", "// all types listed here are directly toString() in the debugger", "if", "(", "value", "instanceof", "NumericValue", "||", "value", "instanceof", "CharacterValue", "||", "value", "instanceof", "NilValu...
Calculates if a value has children and returns the child count @param value The value to determine child count for @return number of children
[ "Calculates", "if", "a", "value", "has", "children", "and", "returns", "the", "child", "count" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java#L1093-L1153
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java
DBGPReaderV2.deref
private Value deref(Value value) { if (value instanceof ReferenceValue || value instanceof UpdatableValue || value instanceof TransactionValue) { return value.deref(); } else { return value; } }
java
private Value deref(Value value) { if (value instanceof ReferenceValue || value instanceof UpdatableValue || value instanceof TransactionValue) { return value.deref(); } else { return value; } }
[ "private", "Value", "deref", "(", "Value", "value", ")", "{", "if", "(", "value", "instanceof", "ReferenceValue", "||", "value", "instanceof", "UpdatableValue", "||", "value", "instanceof", "TransactionValue", ")", "{", "return", "value", ".", "deref", "(", ")...
Deref Value of Reference and Updatable Value types @param value The value to deref @return The internal value of the parameter
[ "Deref", "Value", "of", "Reference", "and", "Updatable", "Value", "types" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java#L1288-L1298
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java
DBGPReaderV2.isDebugVisible
private boolean isDebugVisible(Value v) { return v instanceof ReferenceValue || v instanceof NumericValue || v instanceof CharacterValue || v instanceof BooleanValue || v instanceof SetValue || v instanceof SeqValue || v instanceof MapValue || v instanceof TokenValue || v instanceof RecordValue || v ...
java
private boolean isDebugVisible(Value v) { return v instanceof ReferenceValue || v instanceof NumericValue || v instanceof CharacterValue || v instanceof BooleanValue || v instanceof SetValue || v instanceof SeqValue || v instanceof MapValue || v instanceof TokenValue || v instanceof RecordValue || v ...
[ "private", "boolean", "isDebugVisible", "(", "Value", "v", ")", "{", "return", "v", "instanceof", "ReferenceValue", "||", "v", "instanceof", "NumericValue", "||", "v", "instanceof", "CharacterValue", "||", "v", "instanceof", "BooleanValue", "||", "v", "instanceof"...
Determines if a value should be shown in the debug client @param v The value to check @return True if the value is allowed to be displayed in the client
[ "Determines", "if", "a", "value", "should", "be", "shown", "in", "the", "debug", "client" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java#L1307-L1315
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java
DBGPReaderV2.processLog
@Override protected void processLog(DBGPCommand c) throws IOException { StringBuilder out = new StringBuilder(); try { if (c.data == null) { if (RTLogger.getLogSize() > 0) { out.append("Flushing " + RTLogger.getLogSize() + " RT events\n"); } RTLogger.setLogfile(RTTextLogger.c...
java
@Override protected void processLog(DBGPCommand c) throws IOException { StringBuilder out = new StringBuilder(); try { if (c.data == null) { if (RTLogger.getLogSize() > 0) { out.append("Flushing " + RTLogger.getLogSize() + " RT events\n"); } RTLogger.setLogfile(RTTextLogger.c...
[ "@", "Override", "protected", "void", "processLog", "(", "DBGPCommand", "c", ")", "throws", "IOException", "{", "StringBuilder", "out", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "if", "(", "c", ".", "data", "==", "null", ")", "{", "if", "...
Overrides processLog to support URI file format and xcmdOvertureResponse as reply
[ "Overrides", "processLog", "to", "support", "URI", "file", "format", "and", "xcmdOvertureResponse", "as", "reply" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/debug/DBGPReaderV2.java#L1968-L2005
train
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/TypeCompatibilityObligation.java
TypeCompatibilityObligation.newInstance
public static TypeCompatibilityObligation newInstance(PExp exp, PType etype, PType atype, IPOContextStack ctxt, IPogAssistantFactory assistantFactory) throws AnalysisException { TypeCompatibilityObligation sto = new TypeCompatibilityObligation(exp, etype, atype, ctxt, assistantFactory); if (sto.getValueTree...
java
public static TypeCompatibilityObligation newInstance(PExp exp, PType etype, PType atype, IPOContextStack ctxt, IPogAssistantFactory assistantFactory) throws AnalysisException { TypeCompatibilityObligation sto = new TypeCompatibilityObligation(exp, etype, atype, ctxt, assistantFactory); if (sto.getValueTree...
[ "public", "static", "TypeCompatibilityObligation", "newInstance", "(", "PExp", "exp", ",", "PType", "etype", ",", "PType", "atype", ",", "IPOContextStack", "ctxt", ",", "IPogAssistantFactory", "assistantFactory", ")", "throws", "AnalysisException", "{", "TypeCompatibili...
Factory Method since we need to return null STOs (which should be discarded @param exp The expression to be checked @param etype The expected type @param atype The actual type @param ctxt Context Information @param assistantFactory @return @throws AnalysisException
[ "Factory", "Method", "since", "we", "need", "to", "return", "null", "STOs", "(", "which", "should", "be", "discarded" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/TypeCompatibilityObligation.java#L111-L123
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java
Breakpoint.enterDebugger
public void enterDebugger(Context ctxt) { ISchedulableThread th = BasicSchedulableThread.getThread(Thread.currentThread()); if (th != null) { th.suspendOthers(); } if (Settings.usingDBGP) { ctxt.threadState.dbgp.stopped(ctxt, this); } else { new DebuggerReader(Interpreter.getInstance(), th...
java
public void enterDebugger(Context ctxt) { ISchedulableThread th = BasicSchedulableThread.getThread(Thread.currentThread()); if (th != null) { th.suspendOthers(); } if (Settings.usingDBGP) { ctxt.threadState.dbgp.stopped(ctxt, this); } else { new DebuggerReader(Interpreter.getInstance(), th...
[ "public", "void", "enterDebugger", "(", "Context", "ctxt", ")", "{", "ISchedulableThread", "th", "=", "BasicSchedulableThread", ".", "getThread", "(", "Thread", ".", "currentThread", "(", ")", ")", ";", "if", "(", "th", "!=", "null", ")", "{", "th", ".", ...
Actually stop and enter the debugger. The method returns when the user asks to continue or step the specification. @param ctxt
[ "Actually", "stop", "and", "enter", "the", "debugger", ".", "The", "method", "returns", "when", "the", "user", "asks", "to", "continue", "or", "step", "the", "specification", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java#L225-L242
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java
Breakpoint.catchReturn
public boolean catchReturn(Context ctxt) { ThreadState state = ctxt.threadState; return state.stepline != null && state.nextctxt == null && state.outctxt == null; }
java
public boolean catchReturn(Context ctxt) { ThreadState state = ctxt.threadState; return state.stepline != null && state.nextctxt == null && state.outctxt == null; }
[ "public", "boolean", "catchReturn", "(", "Context", "ctxt", ")", "{", "ThreadState", "state", "=", "ctxt", ".", "threadState", ";", "return", "state", ".", "stepline", "!=", "null", "&&", "state", ".", "nextctxt", "==", "null", "&&", "state", ".", "outctxt...
Test for whether an apply expression or operation call ought to catch a breakpoint after the return from the call. This only happens if we step into the call, so that when we step out it is clear where we're unwinding too, rather than jumping down the stack some considerable distance. @param ctxt @return
[ "Test", "for", "whether", "an", "apply", "expression", "or", "operation", "call", "ought", "to", "catch", "a", "breakpoint", "after", "the", "return", "from", "the", "call", ".", "This", "only", "happens", "if", "we", "step", "into", "the", "call", "so", ...
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java#L253-L257
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java
Breakpoint.isAboveNext
private boolean isAboveNext(Context current) { Context c = current.outer; while (c != null) { if (c == current.threadState.nextctxt) { return true; } c = c.outer; } return false; }
java
private boolean isAboveNext(Context current) { Context c = current.outer; while (c != null) { if (c == current.threadState.nextctxt) { return true; } c = c.outer; } return false; }
[ "private", "boolean", "isAboveNext", "(", "Context", "current", ")", "{", "Context", "c", "=", "current", ".", "outer", ";", "while", "(", "c", "!=", "null", ")", "{", "if", "(", "c", "==", "current", ".", "threadState", ".", "nextctxt", ")", "{", "r...
True, if the context passed is above nextctxt. That means that the current context must have an "outer" chain that reaches nextctxt. @param current The context to test. @return True if the current context is above nextctxt.
[ "True", "if", "the", "context", "passed", "is", "above", "nextctxt", ".", "That", "means", "that", "the", "current", "context", "must", "have", "an", "outer", "chain", "that", "reaches", "nextctxt", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java#L280-L294
train
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java
Breakpoint.isOutOrBelow
private boolean isOutOrBelow(Context current) { Context c = current.threadState.outctxt; while (c != null) { if (c == current) { return true; } c = c.outer; } return false; }
java
private boolean isOutOrBelow(Context current) { Context c = current.threadState.outctxt; while (c != null) { if (c == current) { return true; } c = c.outer; } return false; }
[ "private", "boolean", "isOutOrBelow", "(", "Context", "current", ")", "{", "Context", "c", "=", "current", ".", "threadState", ".", "outctxt", ";", "while", "(", "c", "!=", "null", ")", "{", "if", "(", "c", "==", "current", ")", "{", "return", "true", ...
True, if the context passed is equal to or below outctxt. That means that outctxt must have an "outer" chain that reaches current context. @param current The context to test. @return True if the current context is at or below outctxt.
[ "True", "if", "the", "context", "passed", "is", "equal", "to", "or", "below", "outctxt", ".", "That", "means", "that", "outctxt", "must", "have", "an", "outer", "chain", "that", "reaches", "current", "context", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/Breakpoint.java#L305-L319
train
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/navigator/ProblemLabelDecorator.java
ProblemLabelDecorator.containsSeverity
private boolean containsSeverity(IMarker[] markers, int severity) { for (int i = 0; i < markers.length; i++) { try { Object tmp = markers[i].getAttribute(IMarker.SEVERITY); if(tmp == null && !(tmp instanceof Integer)) { continue; } if (tmp!=null && ((Integer)tmp & severity)!=0) {...
java
private boolean containsSeverity(IMarker[] markers, int severity) { for (int i = 0; i < markers.length; i++) { try { Object tmp = markers[i].getAttribute(IMarker.SEVERITY); if(tmp == null && !(tmp instanceof Integer)) { continue; } if (tmp!=null && ((Integer)tmp & severity)!=0) {...
[ "private", "boolean", "containsSeverity", "(", "IMarker", "[", "]", "markers", ",", "int", "severity", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "markers", ".", "length", ";", "i", "++", ")", "{", "try", "{", "Object", "tmp", "=", ...
Checks if any marker in the array has a defined severity which is set to the @param markers @param severity @return
[ "Checks", "if", "any", "marker", "in", "the", "array", "has", "a", "defined", "severity", "which", "is", "set", "to", "the" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/navigator/ProblemLabelDecorator.java#L86-L107
train
overturetool/overture
core/codegen/platform/src/main/java/org/overture/codegen/trans/assistants/TransAssistantIR.java
TransAssistantIR.consComplexCompIterationBlock
public ABlockStmIR consComplexCompIterationBlock( List<SMultipleBindIR> multipleSetBinds, ITempVarGen tempGen, IIterationStrategy strategy, IterationVarPrefixes iteVarPrefixes) throws AnalysisException { ABlockStmIR outerBlock = new ABlockStmIR(); ABlockStmIR nextMultiBindBlock = outerBlock; for (SMul...
java
public ABlockStmIR consComplexCompIterationBlock( List<SMultipleBindIR> multipleSetBinds, ITempVarGen tempGen, IIterationStrategy strategy, IterationVarPrefixes iteVarPrefixes) throws AnalysisException { ABlockStmIR outerBlock = new ABlockStmIR(); ABlockStmIR nextMultiBindBlock = outerBlock; for (SMul...
[ "public", "ABlockStmIR", "consComplexCompIterationBlock", "(", "List", "<", "SMultipleBindIR", ">", "multipleSetBinds", ",", "ITempVarGen", "tempGen", ",", "IIterationStrategy", "strategy", ",", "IterationVarPrefixes", "iteVarPrefixes", ")", "throws", "AnalysisException", "...
FIXME make this method work on generic PMUltipleBinds
[ "FIXME", "make", "this", "method", "work", "on", "generic", "PMUltipleBinds" ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/codegen/platform/src/main/java/org/overture/codegen/trans/assistants/TransAssistantIR.java#L490-L532
train