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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
BrunoEberhard/minimal-j | src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java | FrameManager.closeWindowPerformed | public void closeWindowPerformed(SwingFrame frameView) {
if (!navigationFrames.contains(frameView)) return;
if (navigationFrames.size() == 1 && !askBeforeExit(frameView)) {
return;
}
if (frameView.tryToCloseWindow()) {
removeNavigationFrameView(frameView);
}
} | java | public void closeWindowPerformed(SwingFrame frameView) {
if (!navigationFrames.contains(frameView)) return;
if (navigationFrames.size() == 1 && !askBeforeExit(frameView)) {
return;
}
if (frameView.tryToCloseWindow()) {
removeNavigationFrameView(frameView);
}
} | [
"public",
"void",
"closeWindowPerformed",
"(",
"SwingFrame",
"frameView",
")",
"{",
"if",
"(",
"!",
"navigationFrames",
".",
"contains",
"(",
"frameView",
")",
")",
"return",
";",
"if",
"(",
"navigationFrames",
".",
"size",
"(",
")",
"==",
"1",
"&&",
"!",
... | Asks the use about closing and then tries to close the Window
@param frameView NavigationFrameView to close | [
"Asks",
"the",
"use",
"about",
"closing",
"and",
"then",
"tries",
"to",
"close",
"the",
"Window"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java#L96-L106 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java | FrameManager.askBeforeExit | private boolean askBeforeExit(SwingFrame navigationFrameView) {
if (Configuration.isDevModeActive()) {
return true;
} else {
int answer = JOptionPane.showConfirmDialog(navigationFrameView, Resources.getString("Exit.confirm"), Resources.getString("Exit.confirm.title"), JOptionPane.YES_NO_OPTION);
return ans... | java | private boolean askBeforeExit(SwingFrame navigationFrameView) {
if (Configuration.isDevModeActive()) {
return true;
} else {
int answer = JOptionPane.showConfirmDialog(navigationFrameView, Resources.getString("Exit.confirm"), Resources.getString("Exit.confirm.title"), JOptionPane.YES_NO_OPTION);
return ans... | [
"private",
"boolean",
"askBeforeExit",
"(",
"SwingFrame",
"navigationFrameView",
")",
"{",
"if",
"(",
"Configuration",
".",
"isDevModeActive",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"int",
"answer",
"=",
"JOptionPane",
".",
"showConfirmDi... | Asks about leaving the application
@param navigationFrameView used as parent of question dialog
@return true if user wants to leave | [
"Asks",
"about",
"leaving",
"the",
"application"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java#L151-L158 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java | FrameManager.closeAllWindows | private boolean closeAllWindows(SwingFrame navigationFrameView) {
// Die umgekehrte Reihenfolge fühlt sich beim Schliessen natürlicher an
for (int i = navigationFrames.size()-1; i>= 0; i--) {
SwingFrame frameView = navigationFrames.get(i);
if (!frameView.tryToCloseWindow()) return false;
removeNavigationFr... | java | private boolean closeAllWindows(SwingFrame navigationFrameView) {
// Die umgekehrte Reihenfolge fühlt sich beim Schliessen natürlicher an
for (int i = navigationFrames.size()-1; i>= 0; i--) {
SwingFrame frameView = navigationFrames.get(i);
if (!frameView.tryToCloseWindow()) return false;
removeNavigationFr... | [
"private",
"boolean",
"closeAllWindows",
"(",
"SwingFrame",
"navigationFrameView",
")",
"{",
"// Die umgekehrte Reihenfolge fühlt sich beim Schliessen natürlicher an",
"for",
"(",
"int",
"i",
"=",
"navigationFrames",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0... | Tries to close all windows. Stops at first failed attempt.
@param navigationFrameView used as parent of question dialogs
@return true if all windows are closed | [
"Tries",
"to",
"close",
"all",
"windows",
".",
"Stops",
"at",
"first",
"failed",
"attempt",
"."
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java#L166-L174 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java | FrameManager.removeNavigationFrameView | private void removeNavigationFrameView(SwingFrame frameView) {
navigationFrames.remove(frameView);
if (navigationFrames.size() == 0) {
System.exit(0);
}
} | java | private void removeNavigationFrameView(SwingFrame frameView) {
navigationFrames.remove(frameView);
if (navigationFrames.size() == 0) {
System.exit(0);
}
} | [
"private",
"void",
"removeNavigationFrameView",
"(",
"SwingFrame",
"frameView",
")",
"{",
"navigationFrames",
".",
"remove",
"(",
"frameView",
")",
";",
"if",
"(",
"navigationFrames",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"System",
".",
"exit",
"(",
... | Removes a frameView from the list and exits if it was the last
@param frameView NavigationFrameView to remove from the list | [
"Removes",
"a",
"frameView",
"from",
"the",
"list",
"and",
"exits",
"if",
"it",
"was",
"the",
"last"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/impl/swing/FrameManager.java#L181-L186 | train |
bazaarvoice/curator-extensions | recipes/src/main/java/com/bazaarvoice/curator/recipes/leader/LeaderService.java | LeaderService.sleep | private synchronized void sleep(long waitNanos) throws InterruptedException {
while (waitNanos > 0 && isRunning()) {
long start = System.nanoTime();
TimeUnit.NANOSECONDS.timedWait(this, waitNanos);
waitNanos -= System.nanoTime() - start;
}
} | java | private synchronized void sleep(long waitNanos) throws InterruptedException {
while (waitNanos > 0 && isRunning()) {
long start = System.nanoTime();
TimeUnit.NANOSECONDS.timedWait(this, waitNanos);
waitNanos -= System.nanoTime() - start;
}
} | [
"private",
"synchronized",
"void",
"sleep",
"(",
"long",
"waitNanos",
")",
"throws",
"InterruptedException",
"{",
"while",
"(",
"waitNanos",
">",
"0",
"&&",
"isRunning",
"(",
")",
")",
"{",
"long",
"start",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
... | Wait for the specified amount of time or until this service is stopped, whichever comes first. | [
"Wait",
"for",
"the",
"specified",
"amount",
"of",
"time",
"or",
"until",
"this",
"service",
"is",
"stopped",
"whichever",
"comes",
"first",
"."
] | eb1e1b478f1ae6aed602bb5d5cb481277203004e | https://github.com/bazaarvoice/curator-extensions/blob/eb1e1b478f1ae6aed602bb5d5cb481277203004e/recipes/src/main/java/com/bazaarvoice/curator/recipes/leader/LeaderService.java#L285-L291 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/ObjectDiff.java | ObjectDiff.loadKeyList | private List<String> loadKeyList() {
Set<String> keySet = new HashSet<String>();
for (EDBObjectEntry entry : startState.values()) {
keySet.add(entry.getKey());
}
for (EDBObjectEntry entry : endState.values()) {
keySet.add(entry.getKey());
}
return ... | java | private List<String> loadKeyList() {
Set<String> keySet = new HashSet<String>();
for (EDBObjectEntry entry : startState.values()) {
keySet.add(entry.getKey());
}
for (EDBObjectEntry entry : endState.values()) {
keySet.add(entry.getKey());
}
return ... | [
"private",
"List",
"<",
"String",
">",
"loadKeyList",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"keySet",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"EDBObjectEntry",
"entry",
":",
"startState",
".",
"values",
"(",
")",
")"... | loads all keys from the start state and the end state | [
"loads",
"all",
"keys",
"from",
"the",
"start",
"state",
"and",
"the",
"end",
"state"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/ObjectDiff.java#L90-L99 | train |
matthewhorridge/owlexplanation | src/main/java/org/semanticweb/owl/explanation/impl/laconic/OPlusGenerator.java | OPlusGenerator.getSameSourceAxioms | public Set<OWLAxiom> getSameSourceAxioms(OWLAxiom axiom, Set<OWLAxiom> toSearch) {
Set<OWLAxiom> axiomSources = axiom2SourceMap.get(axiom);
if(axiomSources == null) {
return Collections.emptySet();
}
Set<OWLAxiom> result = new HashSet<OWLAxiom>();
for(OWLAxiom ax : to... | java | public Set<OWLAxiom> getSameSourceAxioms(OWLAxiom axiom, Set<OWLAxiom> toSearch) {
Set<OWLAxiom> axiomSources = axiom2SourceMap.get(axiom);
if(axiomSources == null) {
return Collections.emptySet();
}
Set<OWLAxiom> result = new HashSet<OWLAxiom>();
for(OWLAxiom ax : to... | [
"public",
"Set",
"<",
"OWLAxiom",
">",
"getSameSourceAxioms",
"(",
"OWLAxiom",
"axiom",
",",
"Set",
"<",
"OWLAxiom",
">",
"toSearch",
")",
"{",
"Set",
"<",
"OWLAxiom",
">",
"axiomSources",
"=",
"axiom2SourceMap",
".",
"get",
"(",
"axiom",
")",
";",
"if",
... | Gets axioms that have the same source axioms as the specified axiom.
@param axiom The axiom for which axioms with the same sources will be retrieved.
@param toSearch The set of axioms to seach for the same sources. If <code>toSearch</code>
contains <code>axiom</code> then <code>axiom</code> will simply be ignored.
@re... | [
"Gets",
"axioms",
"that",
"have",
"the",
"same",
"source",
"axioms",
"as",
"the",
"specified",
"axiom",
"."
] | 439c5ca67835f5e421adde725e4e8a3bcd760ac8 | https://github.com/matthewhorridge/owlexplanation/blob/439c5ca67835f5e421adde725e4e8a3bcd760ac8/src/main/java/org/semanticweb/owl/explanation/impl/laconic/OPlusGenerator.java#L126-L144 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.tpCreate | private int[] tpCreate(int n) {
if (n > MAX_TPS) return null;
int[] ret = new int[n];
for (int i = 0; i < n; i++) ret[i] = tpCreate();
return ret;
} | java | private int[] tpCreate(int n) {
if (n > MAX_TPS) return null;
int[] ret = new int[n];
for (int i = 0; i < n; i++) ret[i] = tpCreate();
return ret;
} | [
"private",
"int",
"[",
"]",
"tpCreate",
"(",
"int",
"n",
")",
"{",
"if",
"(",
"n",
">",
"MAX_TPS",
")",
"return",
"null",
";",
"int",
"[",
"]",
"ret",
"=",
"new",
"int",
"[",
"n",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
... | Batch TP creation | [
"Batch",
"TP",
"creation"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L266-L271 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.tpDelete | private void tpDelete(int[] IDtimePoint) {
logger.finest("Deleting " + IDtimePoint.length + " TP");
for (int i = 0; i < IDtimePoint.length; i++) {
tPoints[IDtimePoint[i]].setUsed(false);
if (IDtimePoint[i] == MAX_USED) MAX_USED--;
SimpleDistanceConstraint conO = new SimpleDistanceConstraint();
... | java | private void tpDelete(int[] IDtimePoint) {
logger.finest("Deleting " + IDtimePoint.length + " TP");
for (int i = 0; i < IDtimePoint.length; i++) {
tPoints[IDtimePoint[i]].setUsed(false);
if (IDtimePoint[i] == MAX_USED) MAX_USED--;
SimpleDistanceConstraint conO = new SimpleDistanceConstraint();
... | [
"private",
"void",
"tpDelete",
"(",
"int",
"[",
"]",
"IDtimePoint",
")",
"{",
"logger",
".",
"finest",
"(",
"\"Deleting \"",
"+",
"IDtimePoint",
".",
"length",
"+",
"\" TP\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"IDtimePoint",
... | Batch Time point erase | [
"Batch",
"Time",
"point",
"erase"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L317-L347 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.cDelete | private boolean cDelete(Bounds[] in, int[] from, int[] to, boolean canRestore) throws ConstraintNotFound, MalformedSimpleDistanceConstraint {
for (int i = 0; i < in.length; i++) {
//Conversion
long min = in[i].min;
long max = in[i].max;
if (in[i].max == Long.MAX_VALUE - 1) max = H-O;
if (in[i].mi... | java | private boolean cDelete(Bounds[] in, int[] from, int[] to, boolean canRestore) throws ConstraintNotFound, MalformedSimpleDistanceConstraint {
for (int i = 0; i < in.length; i++) {
//Conversion
long min = in[i].min;
long max = in[i].max;
if (in[i].max == Long.MAX_VALUE - 1) max = H-O;
if (in[i].mi... | [
"private",
"boolean",
"cDelete",
"(",
"Bounds",
"[",
"]",
"in",
",",
"int",
"[",
"]",
"from",
",",
"int",
"[",
"]",
"to",
",",
"boolean",
"canRestore",
")",
"throws",
"ConstraintNotFound",
",",
"MalformedSimpleDistanceConstraint",
"{",
"for",
"(",
"int",
"... | throw error in case of parameter inconsistency | [
"throw",
"error",
"in",
"case",
"of",
"parameter",
"inconsistency"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L632-L667 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.getTimePoint | public TimePoint getTimePoint(int Id) {
if (Id >= MAX_TPS) return null;
if (tPoints[Id] == null) return null;
if (!tPoints[Id].isUsed()) return null;
return tPoints[Id];
} | java | public TimePoint getTimePoint(int Id) {
if (Id >= MAX_TPS) return null;
if (tPoints[Id] == null) return null;
if (!tPoints[Id].isUsed()) return null;
return tPoints[Id];
} | [
"public",
"TimePoint",
"getTimePoint",
"(",
"int",
"Id",
")",
"{",
"if",
"(",
"Id",
">=",
"MAX_TPS",
")",
"return",
"null",
";",
"if",
"(",
"tPoints",
"[",
"Id",
"]",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"!",
"tPoints",
"[",
"Id",
... | Get a timepoint given its ID.
@param Id The ID of the timepoint.
@return The timepoint referenced by passed ID. | [
"Get",
"a",
"timepoint",
"given",
"its",
"ID",
"."
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L677-L682 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.fromScratchDistanceMatrixComputation | private boolean fromScratchDistanceMatrixComputation() {
logger.fine("Propagating (cube) with (#TPs,#cons) = (" + this.MAX_USED + "," + this.theNetwork.getConstraints().length + ") (call num.: " + (++cubePropCount) + ")");
//*
//This code is not tested thoroughly but seems to work
for (int i = 0; i < MAX_US... | java | private boolean fromScratchDistanceMatrixComputation() {
logger.fine("Propagating (cube) with (#TPs,#cons) = (" + this.MAX_USED + "," + this.theNetwork.getConstraints().length + ") (call num.: " + (++cubePropCount) + ")");
//*
//This code is not tested thoroughly but seems to work
for (int i = 0; i < MAX_US... | [
"private",
"boolean",
"fromScratchDistanceMatrixComputation",
"(",
")",
"{",
"logger",
".",
"fine",
"(",
"\"Propagating (cube) with (#TPs,#cons) = (\"",
"+",
"this",
".",
"MAX_USED",
"+",
"\",\"",
"+",
"this",
".",
"theNetwork",
".",
"getConstraints",
"(",
")",
".",... | "from scratch" re-computation | [
"from",
"scratch",
"re",
"-",
"computation"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L704-L753 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.incrementalDistanceMatrixComputation | private boolean incrementalDistanceMatrixComputation(int from,int to,Bounds i) {
logger.fine("Propagating (quad) with (#TPs,#cons) = (" + this.MAX_USED + "," + this.theNetwork.getConstraints().length + ") (call num.: " + (++quadPropCount) + ")");
if (distance[to][from] != APSPSolver.INF && sum(i.max,distance[to... | java | private boolean incrementalDistanceMatrixComputation(int from,int to,Bounds i) {
logger.fine("Propagating (quad) with (#TPs,#cons) = (" + this.MAX_USED + "," + this.theNetwork.getConstraints().length + ") (call num.: " + (++quadPropCount) + ")");
if (distance[to][from] != APSPSolver.INF && sum(i.max,distance[to... | [
"private",
"boolean",
"incrementalDistanceMatrixComputation",
"(",
"int",
"from",
",",
"int",
"to",
",",
"Bounds",
"i",
")",
"{",
"logger",
".",
"fine",
"(",
"\"Propagating (quad) with (#TPs,#cons) = (\"",
"+",
"this",
".",
"MAX_USED",
"+",
"\",\"",
"+",
"this",
... | Gd graph propagation function | [
"Gd",
"graph",
"propagation",
"function"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L756-L796 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/APSPSolver.java | APSPSolver.changeHorizon | public boolean changeHorizon(long val)
{
this.removeConstraint(horizonConstraint);
SimpleDistanceConstraint sdc = new SimpleDistanceConstraint();
sdc.setFrom(this.getVariable(0));
sdc.setTo(this.getVariable(1));
sdc.setMinimum(val);
sdc.setMaximum(val);
if (this.addConstraint(sdc)) {
this.H =... | java | public boolean changeHorizon(long val)
{
this.removeConstraint(horizonConstraint);
SimpleDistanceConstraint sdc = new SimpleDistanceConstraint();
sdc.setFrom(this.getVariable(0));
sdc.setTo(this.getVariable(1));
sdc.setMinimum(val);
sdc.setMaximum(val);
if (this.addConstraint(sdc)) {
this.H =... | [
"public",
"boolean",
"changeHorizon",
"(",
"long",
"val",
")",
"{",
"this",
".",
"removeConstraint",
"(",
"horizonConstraint",
")",
";",
"SimpleDistanceConstraint",
"sdc",
"=",
"new",
"SimpleDistanceConstraint",
"(",
")",
";",
"sdc",
".",
"setFrom",
"(",
"this",... | Set a new horizon for this network.
@param val The new horizon.
@return {@code True} If the operation succeeded, {@code False} otherwise. | [
"Set",
"a",
"new",
"horizon",
"for",
"this",
"network",
"."
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/APSPSolver.java#L974-L988 | train |
openengsb/openengsb | components/common/src/main/java/org/openengsb/core/common/remote/FilterChainFactory.java | FilterChainFactory.create | public FilterChain create() throws FilterConfigurationException {
Preconditions.checkState(filters != null, "list of filters must be set");
Preconditions.checkState(inputType != null, "inputType must be set");
Preconditions.checkState(outputType != null, "outputType must be set");
Preco... | java | public FilterChain create() throws FilterConfigurationException {
Preconditions.checkState(filters != null, "list of filters must be set");
Preconditions.checkState(inputType != null, "inputType must be set");
Preconditions.checkState(outputType != null, "outputType must be set");
Preco... | [
"public",
"FilterChain",
"create",
"(",
")",
"throws",
"FilterConfigurationException",
"{",
"Preconditions",
".",
"checkState",
"(",
"filters",
"!=",
"null",
",",
"\"list of filters must be set\"",
")",
";",
"Preconditions",
".",
"checkState",
"(",
"inputType",
"!=",
... | The filters-list must be set. If the last-element is not set, the last element of the filters-list will be used.
@throws FilterConfigurationException if the filters in the filter-list are not compatible with each other | [
"The",
"filters",
"-",
"list",
"must",
"be",
"set",
".",
"If",
"the",
"last",
"-",
"element",
"is",
"not",
"set",
"the",
"last",
"element",
"of",
"the",
"filters",
"-",
"list",
"will",
"be",
"used",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/common/src/main/java/org/openengsb/core/common/remote/FilterChainFactory.java#L45-L75 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/DateUtils.java | DateUtils.parseCH | public static String parseCH(String inputText, boolean partialAllowed) {
if (StringUtils.isEmpty(inputText)) return null;
String text = cutNonDigitsAtBegin(inputText);
if (StringUtils.isEmpty(text)) return "";
text = cutNonDigitsAtEnd(text);
if (StringUtils.isEmpty(text)) return "";
// Nun hat der String... | java | public static String parseCH(String inputText, boolean partialAllowed) {
if (StringUtils.isEmpty(inputText)) return null;
String text = cutNonDigitsAtBegin(inputText);
if (StringUtils.isEmpty(text)) return "";
text = cutNonDigitsAtEnd(text);
if (StringUtils.isEmpty(text)) return "";
// Nun hat der String... | [
"public",
"static",
"String",
"parseCH",
"(",
"String",
"inputText",
",",
"boolean",
"partialAllowed",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"inputText",
")",
")",
"return",
"null",
";",
"String",
"text",
"=",
"cutNonDigitsAtBegin",
"(",
"... | Converts a CH - Date String in a yyyy-mm-dd String. The conversion
is very lenient and tries to convert as long as its somehow clear
what the user may have wanted.
@param inputText The input text. Maybe empty or <code>null</code>.
@param partialAllowed false if the inputText has to be a complete date with month and da... | [
"Converts",
"a",
"CH",
"-",
"Date",
"String",
"in",
"a",
"yyyy",
"-",
"mm",
"-",
"dd",
"String",
".",
"The",
"conversion",
"is",
"very",
"lenient",
"and",
"tries",
"to",
"convert",
"as",
"long",
"as",
"its",
"somehow",
"clear",
"what",
"the",
"user",
... | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/DateUtils.java#L80-L94 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/DateUtils.java | DateUtils.parse | public static LocalDate parse(String date) {
if (StringUtils.isEmpty(date)) return null;
try {
return parse_(date);
} catch (DateTimeParseException x) {
return InvalidValues.createInvalidLocalDate(date);
}
} | java | public static LocalDate parse(String date) {
if (StringUtils.isEmpty(date)) return null;
try {
return parse_(date);
} catch (DateTimeParseException x) {
return InvalidValues.createInvalidLocalDate(date);
}
} | [
"public",
"static",
"LocalDate",
"parse",
"(",
"String",
"date",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"date",
")",
")",
"return",
"null",
";",
"try",
"{",
"return",
"parse_",
"(",
"date",
")",
";",
"}",
"catch",
"(",
"DateTimeParseE... | Tries to be a little bit more clever than the normal parsing. Accept dates
like 1.2.2013 or 010214
@param date date as a String or <code>null</code>
@return LocalDate date object (valid or invalid) or <code>null</code> | [
"Tries",
"to",
"be",
"a",
"little",
"bit",
"more",
"clever",
"than",
"the",
"normal",
"parsing",
".",
"Accept",
"dates",
"like",
"1",
".",
"2",
".",
"2013",
"or",
"010214"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/DateUtils.java#L189-L196 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/DateUtils.java | DateUtils.parse_ | public static LocalDate parse_(String date) {
DateTimeFormatter dateTimeFormatter = getDateTimeFormatter();
if (germanDateStyle()) {
date = parseCH(date, false);
return LocalDate.parse(date);
} else {
return LocalDate.parse(date, dateTimeFormatter);
}
} | java | public static LocalDate parse_(String date) {
DateTimeFormatter dateTimeFormatter = getDateTimeFormatter();
if (germanDateStyle()) {
date = parseCH(date, false);
return LocalDate.parse(date);
} else {
return LocalDate.parse(date, dateTimeFormatter);
}
} | [
"public",
"static",
"LocalDate",
"parse_",
"(",
"String",
"date",
")",
"{",
"DateTimeFormatter",
"dateTimeFormatter",
"=",
"getDateTimeFormatter",
"(",
")",
";",
"if",
"(",
"germanDateStyle",
"(",
")",
")",
"{",
"date",
"=",
"parseCH",
"(",
"date",
",",
"fal... | framework internal, only used by LocalDateTimeFormElement | [
"framework",
"internal",
"only",
"used",
"by",
"LocalDateTimeFormElement"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/DateUtils.java#L199-L207 | train |
openengsb/openengsb | ui/admin/src/main/java/org/openengsb/ui/admin/global/menu/MenuTemplate.java | MenuTemplate.addMenuItem | public void addMenuItem(String index, Class<? extends WebPage> linkClass, String langKey, String langDescKey,
String... authority) {
addMenuItem(index, linkClass, langKey, langDescKey, null, authority);
} | java | public void addMenuItem(String index, Class<? extends WebPage> linkClass, String langKey, String langDescKey,
String... authority) {
addMenuItem(index, linkClass, langKey, langDescKey, null, authority);
} | [
"public",
"void",
"addMenuItem",
"(",
"String",
"index",
",",
"Class",
"<",
"?",
"extends",
"WebPage",
">",
"linkClass",
",",
"String",
"langKey",
",",
"String",
"langDescKey",
",",
"String",
"...",
"authority",
")",
"{",
"addMenuItem",
"(",
"index",
",",
... | Adds a new item to main header navigation where the index defines the name of the index, which should be the
class name; linkClass defines the class name to be linked to; langKey defines the language key for the text which
should be displayed and authority defines who is authorized to see the link | [
"Adds",
"a",
"new",
"item",
"to",
"main",
"header",
"navigation",
"where",
"the",
"index",
"defines",
"the",
"name",
"of",
"the",
"index",
"which",
"should",
"be",
"the",
"class",
"name",
";",
"linkClass",
"defines",
"the",
"class",
"name",
"to",
"be",
"... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/ui/admin/src/main/java/org/openengsb/ui/admin/global/menu/MenuTemplate.java#L128-L131 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/backend/Backend.java | Backend.read | public static <T> T read(Class<T> clazz, Object id) {
return execute(new ReadEntityTransaction<T>(clazz, id));
} | java | public static <T> T read(Class<T> clazz, Object id) {
return execute(new ReadEntityTransaction<T>(clazz, id));
} | [
"public",
"static",
"<",
"T",
">",
"T",
"read",
"(",
"Class",
"<",
"T",
">",
"clazz",
",",
"Object",
"id",
")",
"{",
"return",
"execute",
"(",
"new",
"ReadEntityTransaction",
"<",
"T",
">",
"(",
"clazz",
",",
"id",
")",
")",
";",
"}"
] | transaction is created. | [
"transaction",
"is",
"created",
"."
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/backend/Backend.java#L143-L145 | train |
openengsb/openengsb | components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java | ServicesHelper.listRunningServices | public void listRunningServices() {
try {
final List<String> formatedOutput =
SecurityContext.executeWithSystemPermissions(new Callable<List<String>>() {
@Override
public List<String> call() throws Exception {
List<Strin... | java | public void listRunningServices() {
try {
final List<String> formatedOutput =
SecurityContext.executeWithSystemPermissions(new Callable<List<String>>() {
@Override
public List<String> call() throws Exception {
List<Strin... | [
"public",
"void",
"listRunningServices",
"(",
")",
"{",
"try",
"{",
"final",
"List",
"<",
"String",
">",
"formatedOutput",
"=",
"SecurityContext",
".",
"executeWithSystemPermissions",
"(",
"new",
"Callable",
"<",
"List",
"<",
"String",
">",
">",
"(",
")",
"{... | prints out all available services and their alive state | [
"prints",
"out",
"all",
"available",
"services",
"and",
"their",
"alive",
"state"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java#L72-L98 | train |
openengsb/openengsb | components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java | ServicesHelper.deleteService | public void deleteService(String id, boolean force) {
try {
if (id == null || id.isEmpty()) {
id = selectRunningService();
}
final String idFinal = id;
int input = 'Y';
if (!force) {
OutputStreamFormater.printValue(Strin... | java | public void deleteService(String id, boolean force) {
try {
if (id == null || id.isEmpty()) {
id = selectRunningService();
}
final String idFinal = id;
int input = 'Y';
if (!force) {
OutputStreamFormater.printValue(Strin... | [
"public",
"void",
"deleteService",
"(",
"String",
"id",
",",
"boolean",
"force",
")",
"{",
"try",
"{",
"if",
"(",
"id",
"==",
"null",
"||",
"id",
".",
"isEmpty",
"(",
")",
")",
"{",
"id",
"=",
"selectRunningService",
"(",
")",
";",
"}",
"final",
"S... | delete a service identified by its id, if force is true, the user does not have to confirm | [
"delete",
"a",
"service",
"identified",
"by",
"its",
"id",
"if",
"force",
"is",
"true",
"the",
"user",
"does",
"not",
"have",
"to",
"confirm"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java#L119-L148 | train |
openengsb/openengsb | components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java | ServicesHelper.selectRunningService | private String selectRunningService() {
String selectedServiceId;
List<String> runningServiceIds = getRunningServiceIds();
for (int i = 0; i < runningServiceIds.size(); i++) {
String serviceId = runningServiceIds.get(i);
OutputStreamFormater.printTabbedValues(9, String.fo... | java | private String selectRunningService() {
String selectedServiceId;
List<String> runningServiceIds = getRunningServiceIds();
for (int i = 0; i < runningServiceIds.size(); i++) {
String serviceId = runningServiceIds.get(i);
OutputStreamFormater.printTabbedValues(9, String.fo... | [
"private",
"String",
"selectRunningService",
"(",
")",
"{",
"String",
"selectedServiceId",
";",
"List",
"<",
"String",
">",
"runningServiceIds",
"=",
"getRunningServiceIds",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"runningServiceIds",
... | let the user chose one of the running services
@return | [
"let",
"the",
"user",
"chose",
"one",
"of",
"the",
"running",
"services"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java#L155-L172 | train |
openengsb/openengsb | components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java | ServicesHelper.getRunningServiceIds | public List<String> getRunningServiceIds() {
List<ServiceReference<Domain>> serviceReferences = osgiUtilsService.listServiceReferences(Domain.class);
List<String> result = new ArrayList<String>();
for (ServiceReference<Domain> ref : serviceReferences) {
result.add((String) ref.getPro... | java | public List<String> getRunningServiceIds() {
List<ServiceReference<Domain>> serviceReferences = osgiUtilsService.listServiceReferences(Domain.class);
List<String> result = new ArrayList<String>();
for (ServiceReference<Domain> ref : serviceReferences) {
result.add((String) ref.getPro... | [
"public",
"List",
"<",
"String",
">",
"getRunningServiceIds",
"(",
")",
"{",
"List",
"<",
"ServiceReference",
"<",
"Domain",
">>",
"serviceReferences",
"=",
"osgiUtilsService",
".",
"listServiceReferences",
"(",
"Domain",
".",
"class",
")",
";",
"List",
"<",
"... | returns a list of all service ids | [
"returns",
"a",
"list",
"of",
"all",
"service",
"ids"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java#L177-L184 | train |
openengsb/openengsb | components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java | ServicesHelper.createService | public void createService(String domainProviderName, boolean force, Map<String, String> attributes) {
// check if a domain has been chosen
if (domainProviderName == null || domainProviderName.isEmpty()) {
domainProviderName = selectDomainProvider();
}
// get domain provider ... | java | public void createService(String domainProviderName, boolean force, Map<String, String> attributes) {
// check if a domain has been chosen
if (domainProviderName == null || domainProviderName.isEmpty()) {
domainProviderName = selectDomainProvider();
}
// get domain provider ... | [
"public",
"void",
"createService",
"(",
"String",
"domainProviderName",
",",
"boolean",
"force",
",",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"// check if a domain has been chosen",
"if",
"(",
"domainProviderName",
"==",
"null",
"||",
"do... | crate a service for the given domain, if force is true, input is not verified | [
"crate",
"a",
"service",
"for",
"the",
"given",
"domain",
"if",
"force",
"is",
"true",
"input",
"is",
"not",
"verified"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/console/src/main/java/org/openengsb/core/console/internal/util/ServicesHelper.java#L189-L255 | train |
openengsb/openengsb | components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/EntryFactory.java | EntryFactory.globalPermissionSetStructure | public static List<Entry> globalPermissionSetStructure(String permissionSet) {
Entry permissionSetEntry = namedObject(permissionSet, SchemaConstants.ouGlobalPermissionSets());
Entry ouDirect = organizationalUnit("direct", permissionSetEntry.getDn());
Entry ouChildrenSets = organizationalUnit("ch... | java | public static List<Entry> globalPermissionSetStructure(String permissionSet) {
Entry permissionSetEntry = namedObject(permissionSet, SchemaConstants.ouGlobalPermissionSets());
Entry ouDirect = organizationalUnit("direct", permissionSetEntry.getDn());
Entry ouChildrenSets = organizationalUnit("ch... | [
"public",
"static",
"List",
"<",
"Entry",
">",
"globalPermissionSetStructure",
"(",
"String",
"permissionSet",
")",
"{",
"Entry",
"permissionSetEntry",
"=",
"namedObject",
"(",
"permissionSet",
",",
"SchemaConstants",
".",
"ouGlobalPermissionSets",
"(",
")",
")",
";... | Returns a list of entries representing a permissionSet. The list should not be reordered since its order follows
the tree structure of the DIT. It can be inserted into the DIT right away. | [
"Returns",
"a",
"list",
"of",
"entries",
"representing",
"a",
"permissionSet",
".",
"The",
"list",
"should",
"not",
"be",
"reordered",
"since",
"its",
"order",
"follows",
"the",
"tree",
"structure",
"of",
"the",
"DIT",
".",
"It",
"can",
"be",
"inserted",
"... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/EntryFactory.java#L109-L115 | train |
openengsb/openengsb | components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/JdbcIndexEngine.java | JdbcIndexEngine.removeUnmappedFields | protected void removeUnmappedFields(JdbcIndex<?> index) {
Iterator<IndexField<?>> iterator = index.getFields().iterator();
while (iterator.hasNext()) {
IndexField<?> field = iterator.next();
if (field.getMappedType() == null) {
LOG.info("Removing {} from index {... | java | protected void removeUnmappedFields(JdbcIndex<?> index) {
Iterator<IndexField<?>> iterator = index.getFields().iterator();
while (iterator.hasNext()) {
IndexField<?> field = iterator.next();
if (field.getMappedType() == null) {
LOG.info("Removing {} from index {... | [
"protected",
"void",
"removeUnmappedFields",
"(",
"JdbcIndex",
"<",
"?",
">",
"index",
")",
"{",
"Iterator",
"<",
"IndexField",
"<",
"?",
">",
">",
"iterator",
"=",
"index",
".",
"getFields",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"ite... | Remove fields from the index that have no mapped type information.
@param index the index to be pruned | [
"Remove",
"fields",
"from",
"the",
"index",
"that",
"have",
"no",
"mapped",
"type",
"information",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/JdbcIndexEngine.java#L232-L244 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.loadPOM | public static Model loadPOM(String pomPath, String localRepo, Collection<RemoteRepository> repositories) throws ProjectException {
RepositoryClient repoClient = new RepositoryClient(localRepo);
NaetherModelResolver resolver = new NaetherModelResolver(repoClient, repositories);
ModelBuildingRequ... | java | public static Model loadPOM(String pomPath, String localRepo, Collection<RemoteRepository> repositories) throws ProjectException {
RepositoryClient repoClient = new RepositoryClient(localRepo);
NaetherModelResolver resolver = new NaetherModelResolver(repoClient, repositories);
ModelBuildingRequ... | [
"public",
"static",
"Model",
"loadPOM",
"(",
"String",
"pomPath",
",",
"String",
"localRepo",
",",
"Collection",
"<",
"RemoteRepository",
">",
"repositories",
")",
"throws",
"ProjectException",
"{",
"RepositoryClient",
"repoClient",
"=",
"new",
"RepositoryClient",
"... | Load Maven pom
@param pomPath String path
@param localRepo String
@param repositories {@link Collection}
@return {@link Model}
@throws ProjectException if fails to open, read, or parse the POM | [
"Load",
"Maven",
"pom"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L132-L148 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.getVersion | public String getVersion() {
String version = getMavenModel().getVersion();
if ( version == null && getMavenModel().getParent() != null ) {
version = getMavenModel().getParent().getVersion();
}
return version;
} | java | public String getVersion() {
String version = getMavenModel().getVersion();
if ( version == null && getMavenModel().getParent() != null ) {
version = getMavenModel().getParent().getVersion();
}
return version;
} | [
"public",
"String",
"getVersion",
"(",
")",
"{",
"String",
"version",
"=",
"getMavenModel",
"(",
")",
".",
"getVersion",
"(",
")",
";",
"if",
"(",
"version",
"==",
"null",
"&&",
"getMavenModel",
"(",
")",
".",
"getParent",
"(",
")",
"!=",
"null",
")",
... | Get version of the Project. If null, checks the Parent Project's version.
@return String | [
"Get",
"version",
"of",
"the",
"Project",
".",
"If",
"null",
"checks",
"the",
"Parent",
"Project",
"s",
"version",
"."
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L155-L162 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.addRepository | public void addRepository(String url) throws ProjectException {
List<Repository> repositories = getRepositories();
if ( repositories == null ) {
repositories = new ArrayList<Repository>();
}
try {
Repository repository = RepoBuilder.repositoryFromUrl( url );
... | java | public void addRepository(String url) throws ProjectException {
List<Repository> repositories = getRepositories();
if ( repositories == null ) {
repositories = new ArrayList<Repository>();
}
try {
Repository repository = RepoBuilder.repositoryFromUrl( url );
... | [
"public",
"void",
"addRepository",
"(",
"String",
"url",
")",
"throws",
"ProjectException",
"{",
"List",
"<",
"Repository",
">",
"repositories",
"=",
"getRepositories",
"(",
")",
";",
"if",
"(",
"repositories",
"==",
"null",
")",
"{",
"repositories",
"=",
"n... | Add a Repository to the Project
@param url String
@throws ProjectException exception | [
"Add",
"a",
"Repository",
"to",
"the",
"Project"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L204-L219 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.getRepositoryUrls | public List<String> getRepositoryUrls() {
List<String> urls = new ArrayList<String>();
for ( Repository repo : getRepositories() ) {
urls.add( repo.getUrl() );
}
return urls;
} | java | public List<String> getRepositoryUrls() {
List<String> urls = new ArrayList<String>();
for ( Repository repo : getRepositories() ) {
urls.add( repo.getUrl() );
}
return urls;
} | [
"public",
"List",
"<",
"String",
">",
"getRepositoryUrls",
"(",
")",
"{",
"List",
"<",
"String",
">",
"urls",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"Repository",
"repo",
":",
"getRepositories",
"(",
")",
")",
"{",
"u... | Get List of Repositories as String url
@return List | [
"Get",
"List",
"of",
"Repositories",
"as",
"String",
"url"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L254-L262 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.setProjectNotation | public void setProjectNotation(String notation) {
Map<String, String> notationMap = Notation.parse(notation);
this.setGroupId(notationMap.get("groupId"));
this.setArtifactId(notationMap.get("artifactId"));
this.setType(notationMap.get("type"));
this.setVersion(notationMap.get("ve... | java | public void setProjectNotation(String notation) {
Map<String, String> notationMap = Notation.parse(notation);
this.setGroupId(notationMap.get("groupId"));
this.setArtifactId(notationMap.get("artifactId"));
this.setType(notationMap.get("type"));
this.setVersion(notationMap.get("ve... | [
"public",
"void",
"setProjectNotation",
"(",
"String",
"notation",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"notationMap",
"=",
"Notation",
".",
"parse",
"(",
"notation",
")",
";",
"this",
".",
"setGroupId",
"(",
"notationMap",
".",
"get",
"(",
... | Set Maven Project from String notation
@param notation String | [
"Set",
"Maven",
"Project",
"from",
"String",
"notation"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L278-L284 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.addDependency | public void addDependency(String notation, String scope ) {
Map<String, String> notationMap = Notation.parse(notation);
Dependency dependency = new Dependency();
dependency.setGroupId(notationMap.get("groupId"));
dependency.setArtifactId(notationMap.get("artifactId"));
dependency... | java | public void addDependency(String notation, String scope ) {
Map<String, String> notationMap = Notation.parse(notation);
Dependency dependency = new Dependency();
dependency.setGroupId(notationMap.get("groupId"));
dependency.setArtifactId(notationMap.get("artifactId"));
dependency... | [
"public",
"void",
"addDependency",
"(",
"String",
"notation",
",",
"String",
"scope",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"notationMap",
"=",
"Notation",
".",
"parse",
"(",
"notation",
")",
";",
"Dependency",
"dependency",
"=",
"new",
"Depe... | Add a Dependency by String notation
@param notation String
@param scope String | [
"Add",
"a",
"Dependency",
"by",
"String",
"notation"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L401-L410 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/maven/Project.java | Project.toXml | public String toXml() throws ProjectException {
log.debug("Writing xml");
Project copy = this;
copy.removeProperty( "project.basedir" );
StringWriter writer = new StringWriter();
MavenXpp3Writer pomWriter = new MavenXpp3Writer();
try {
pomWriter.write(write... | java | public String toXml() throws ProjectException {
log.debug("Writing xml");
Project copy = this;
copy.removeProperty( "project.basedir" );
StringWriter writer = new StringWriter();
MavenXpp3Writer pomWriter = new MavenXpp3Writer();
try {
pomWriter.write(write... | [
"public",
"String",
"toXml",
"(",
")",
"throws",
"ProjectException",
"{",
"log",
".",
"debug",
"(",
"\"Writing xml\"",
")",
";",
"Project",
"copy",
"=",
"this",
";",
"copy",
".",
"removeProperty",
"(",
"\"project.basedir\"",
")",
";",
"StringWriter",
"writer",... | Convert Project to POM XML
@return String
@throws ProjectException exception | [
"Convert",
"Project",
"to",
"POM",
"XML"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/maven/Project.java#L543-L560 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/ExceptionUtils.java | ExceptionUtils.logReducedStackTrace | public static void logReducedStackTrace(Logger logger, Exception exception) {
Exception here = new Exception();
String[] hereStrings = getStackFrames(here);
String[] throwableStrings = getStackFrames(exception);
int linesToSkip = 1;
while (throwableStrings.length - linesToSkip > 0 && hereStrings.length - l... | java | public static void logReducedStackTrace(Logger logger, Exception exception) {
Exception here = new Exception();
String[] hereStrings = getStackFrames(here);
String[] throwableStrings = getStackFrames(exception);
int linesToSkip = 1;
while (throwableStrings.length - linesToSkip > 0 && hereStrings.length - l... | [
"public",
"static",
"void",
"logReducedStackTrace",
"(",
"Logger",
"logger",
",",
"Exception",
"exception",
")",
"{",
"Exception",
"here",
"=",
"new",
"Exception",
"(",
")",
";",
"String",
"[",
"]",
"hereStrings",
"=",
"getStackFrames",
"(",
"here",
")",
";"... | Logs only the relevant part of the stack trace. For example
if a getter fails it's irrelevant if the getter is called
by a swing class or something else
@param logger the logger where the output should go
@param exception the exception to be printed | [
"Logs",
"only",
"the",
"relevant",
"part",
"of",
"the",
"stack",
"trace",
".",
"For",
"example",
"if",
"a",
"getter",
"fails",
"it",
"s",
"irrelevant",
"if",
"the",
"getter",
"is",
"called",
"by",
"a",
"swing",
"class",
"or",
"something",
"else"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/ExceptionUtils.java#L21-L36 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/ExceptionUtils.java | ExceptionUtils.getStackTrace | private static String getStackTrace(final Throwable throwable) {
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw, true);
throwable.printStackTrace(pw);
return sw.getBuffer().toString();
} | java | private static String getStackTrace(final Throwable throwable) {
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw, true);
throwable.printStackTrace(pw);
return sw.getBuffer().toString();
} | [
"private",
"static",
"String",
"getStackTrace",
"(",
"final",
"Throwable",
"throwable",
")",
"{",
"final",
"StringWriter",
"sw",
"=",
"new",
"StringWriter",
"(",
")",
";",
"final",
"PrintWriter",
"pw",
"=",
"new",
"PrintWriter",
"(",
"sw",
",",
"true",
")",
... | from apache ExceptionUtil | [
"from",
"apache",
"ExceptionUtil"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/ExceptionUtils.java#L39-L44 | train |
mbeiter/util | db/src/main/java/org/beiter/michael/db/DataSourceFactory.java | DataSourceFactory.getDataSource | public static DataSource getDataSource(final String jndiName)
throws FactoryException {
Validate.notBlank(jndiName, "The validated character sequence 'jndiName' is null or empty");
// no need for defensive copies of Strings
try {
// the initial context is created from ... | java | public static DataSource getDataSource(final String jndiName)
throws FactoryException {
Validate.notBlank(jndiName, "The validated character sequence 'jndiName' is null or empty");
// no need for defensive copies of Strings
try {
// the initial context is created from ... | [
"public",
"static",
"DataSource",
"getDataSource",
"(",
"final",
"String",
"jndiName",
")",
"throws",
"FactoryException",
"{",
"Validate",
".",
"notBlank",
"(",
"jndiName",
",",
"\"The validated character sequence 'jndiName' is null or empty\"",
")",
";",
"// no need for de... | Return a DataSource instance for a JNDI managed JDBC data source.
@param jndiName The JNDI connection name
@return a JDBC data source
@throws FactoryException When no date source can be retrieved from JNDI
@throws NullPointerException When {@code jndiName} is null
@throws IllegalArgumentException When {@co... | [
"Return",
"a",
"DataSource",
"instance",
"for",
"a",
"JNDI",
"managed",
"JDBC",
"data",
"source",
"."
] | 490fcebecb936e00c2f2ce2096b679b2fd10865e | https://github.com/mbeiter/util/blob/490fcebecb936e00c2f2ce2096b679b2fd10865e/db/src/main/java/org/beiter/michael/db/DataSourceFactory.java#L89-L118 | train |
mbeiter/util | db/src/main/java/org/beiter/michael/db/DataSourceFactory.java | DataSourceFactory.loadDriver | private static void loadDriver(final String driver) throws FactoryException {
// assert in private method
assert driver != null : "The driver cannot be null";
LOG.debug("Loading the database driver '" + driver + "'");
// make sure the driver is available
try {
Clas... | java | private static void loadDriver(final String driver) throws FactoryException {
// assert in private method
assert driver != null : "The driver cannot be null";
LOG.debug("Loading the database driver '" + driver + "'");
// make sure the driver is available
try {
Clas... | [
"private",
"static",
"void",
"loadDriver",
"(",
"final",
"String",
"driver",
")",
"throws",
"FactoryException",
"{",
"// assert in private method",
"assert",
"driver",
"!=",
"null",
":",
"\"The driver cannot be null\"",
";",
"LOG",
".",
"debug",
"(",
"\"Loading the da... | Make sure that the database driver exists
@param driver The JDBC driver class to load
@throws FactoryException When the driver cannot be loaded | [
"Make",
"sure",
"that",
"the",
"database",
"driver",
"exists"
] | 490fcebecb936e00c2f2ce2096b679b2fd10865e | https://github.com/mbeiter/util/blob/490fcebecb936e00c2f2ce2096b679b2fd10865e/db/src/main/java/org/beiter/michael/db/DataSourceFactory.java#L211-L226 | train |
mbeiter/util | db/src/main/java/org/beiter/michael/db/DataSourceFactory.java | DataSourceFactory.getPoolingDataSource | private static PoolingDataSource<PoolableConnection> getPoolingDataSource(final String url,
final ConcurrentMap<String, String> properties,
final ConnectionProperti... | java | private static PoolingDataSource<PoolableConnection> getPoolingDataSource(final String url,
final ConcurrentMap<String, String> properties,
final ConnectionProperti... | [
"private",
"static",
"PoolingDataSource",
"<",
"PoolableConnection",
">",
"getPoolingDataSource",
"(",
"final",
"String",
"url",
",",
"final",
"ConcurrentMap",
"<",
"String",
",",
"String",
">",
"properties",
",",
"final",
"ConnectionProperties",
"poolSpec",
")",
"{... | Get a pooled data source for the provided connection parameters.
@param url The JDBC database URL of the form <code>jdbc:subprotocol:subname</code>
@param properties A list of key/value configuration parameters to pass as connection arguments. Normally at
least a "user" and "password" property should be include... | [
"Get",
"a",
"pooled",
"data",
"source",
"for",
"the",
"provided",
"connection",
"parameters",
"."
] | 490fcebecb936e00c2f2ce2096b679b2fd10865e | https://github.com/mbeiter/util/blob/490fcebecb936e00c2f2ce2096b679b2fd10865e/db/src/main/java/org/beiter/michael/db/DataSourceFactory.java#L237-L283 | train |
mguymon/naether | src/main/java/com/tobedevoured/naether/util/Notation.java | Notation.getLocalPaths | public static List<String> getLocalPaths( String localRepoPath, List<String> notations ) throws NaetherException {
DefaultServiceLocator locator = new DefaultServiceLocator();
SimpleLocalRepositoryManagerFactory factory = new SimpleLocalRepositoryManagerFactory();
factory.initService( locator );... | java | public static List<String> getLocalPaths( String localRepoPath, List<String> notations ) throws NaetherException {
DefaultServiceLocator locator = new DefaultServiceLocator();
SimpleLocalRepositoryManagerFactory factory = new SimpleLocalRepositoryManagerFactory();
factory.initService( locator );... | [
"public",
"static",
"List",
"<",
"String",
">",
"getLocalPaths",
"(",
"String",
"localRepoPath",
",",
"List",
"<",
"String",
">",
"notations",
")",
"throws",
"NaetherException",
"{",
"DefaultServiceLocator",
"locator",
"=",
"new",
"DefaultServiceLocator",
"(",
")"... | Get local paths for notations
@param localRepoPath String path
@param notations List of notations
@return List of paths
@throws NaetherException exception | [
"Get",
"local",
"paths",
"for",
"notations"
] | 218d8fd36c0b8b6e16d66e5715975570b4560ec4 | https://github.com/mguymon/naether/blob/218d8fd36c0b8b6e16d66e5715975570b4560ec4/src/main/java/com/tobedevoured/naether/util/Notation.java#L211-L233 | train |
aseovic/coherence-tools | loader/src/main/java/com/seovic/loader/source/JpaSource.java | JpaSource.iterator | public Iterator iterator()
{
Query readAll = m_em.createQuery(
createReadAllQuery(m_entityClass.getSimpleName()));
return new JpaIterator(readAll, m_batchSize);
} | java | public Iterator iterator()
{
Query readAll = m_em.createQuery(
createReadAllQuery(m_entityClass.getSimpleName()));
return new JpaIterator(readAll, m_batchSize);
} | [
"public",
"Iterator",
"iterator",
"(",
")",
"{",
"Query",
"readAll",
"=",
"m_em",
".",
"createQuery",
"(",
"createReadAllQuery",
"(",
"m_entityClass",
".",
"getSimpleName",
"(",
")",
")",
")",
";",
"return",
"new",
"JpaIterator",
"(",
"readAll",
",",
"m_batc... | Return an iterator that iterates over this source.
@return a source iterator
@see JpaIterator | [
"Return",
"an",
"iterator",
"that",
"iterates",
"over",
"this",
"source",
"."
] | 561a1d7e572ad98657fcd26beb1164891b0cd6fe | https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/loader/src/main/java/com/seovic/loader/source/JpaSource.java#L93-L98 | train |
openengsb/openengsb | api/workflow/src/main/java/org/openengsb/core/workflow/api/model/ProcessBag.java | ProcessBag.addProperty | public void addProperty(String key, Object value) throws ProcessBagException {
if (properties.containsKey(key)) {
throw new ProcessBagException(key + " already used!");
} else {
properties.put(key, value);
}
} | java | public void addProperty(String key, Object value) throws ProcessBagException {
if (properties.containsKey(key)) {
throw new ProcessBagException(key + " already used!");
} else {
properties.put(key, value);
}
} | [
"public",
"void",
"addProperty",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"throws",
"ProcessBagException",
"{",
"if",
"(",
"properties",
".",
"containsKey",
"(",
"key",
")",
")",
"{",
"throw",
"new",
"ProcessBagException",
"(",
"key",
"+",
"\" alre... | Adds a new property only if it does not exist already
@throws ProcessBagException if the key is already present | [
"Adds",
"a",
"new",
"property",
"only",
"if",
"it",
"does",
"not",
"exist",
"already"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/workflow/src/main/java/org/openengsb/core/workflow/api/model/ProcessBag.java#L134-L140 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/qualitative/SimpleInterval.java | SimpleInterval.compareTo | @Override
public int compareTo(Object arg0) {
if (arg0 instanceof SimpleInterval) {
SimpleInterval that = (SimpleInterval)arg0;
return intervalName.compareTo(that.getIntervalName());
}
return 0;
} | java | @Override
public int compareTo(Object arg0) {
if (arg0 instanceof SimpleInterval) {
SimpleInterval that = (SimpleInterval)arg0;
return intervalName.compareTo(that.getIntervalName());
}
return 0;
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"Object",
"arg0",
")",
"{",
"if",
"(",
"arg0",
"instanceof",
"SimpleInterval",
")",
"{",
"SimpleInterval",
"that",
"=",
"(",
"SimpleInterval",
")",
"arg0",
";",
"return",
"intervalName",
".",
"compareTo",
"... | Comapres this to another Interval
@return {@code 1} if this Interval's lower bound is lower than the argument's, {@code 0} if they are the same, {@code 1} otherwise | [
"Comapres",
"this",
"to",
"another",
"Interval"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/qualitative/SimpleInterval.java#L75-L82 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/application/Application.java | Application.initApplication | public static void initApplication(String... args) {
if (args.length < 1) {
System.err.println("Please specify an Application as argument");
System.exit(-1);
}
setInstance(createApplicationByClassName(args[0]));
} | java | public static void initApplication(String... args) {
if (args.length < 1) {
System.err.println("Please specify an Application as argument");
System.exit(-1);
}
setInstance(createApplicationByClassName(args[0]));
} | [
"public",
"static",
"void",
"initApplication",
"(",
"String",
"...",
"args",
")",
"{",
"if",
"(",
"args",
".",
"length",
"<",
"1",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"Please specify an Application as argument\"",
")",
";",
"System",
".",
... | This is just a shortcut for creating the application from jvm arguments.
Most frontend main classes use this method
@param args the arguments provided to the jvm | [
"This",
"is",
"just",
"a",
"shortcut",
"for",
"creating",
"the",
"application",
"from",
"jvm",
"arguments",
".",
"Most",
"frontend",
"main",
"classes",
"use",
"this",
"method"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/application/Application.java#L107-L113 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/utility/Permutation.java | Permutation.next | public int[] next() {
if (!hasNext) return null;
int[] result = new int[r];
for (int i=0; i<r; i++) result[i] = index[i];
moveIndex();
return result;
} | java | public int[] next() {
if (!hasNext) return null;
int[] result = new int[r];
for (int i=0; i<r; i++) result[i] = index[i];
moveIndex();
return result;
} | [
"public",
"int",
"[",
"]",
"next",
"(",
")",
"{",
"if",
"(",
"!",
"hasNext",
")",
"return",
"null",
";",
"int",
"[",
"]",
"result",
"=",
"new",
"int",
"[",
"r",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"r",
";",
"i",
"++... | Get the next permutation.
@return The next permutation, <code>null</code> if none exists. | [
"Get",
"the",
"next",
"permutation",
"."
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/Permutation.java#L66-L72 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/utility/Permutation.java | Permutation.reverseAfter | private void reverseAfter(int i) {
int start = i+1;
int end = n-1;
while (start < end) {
swap(index,start,end);
start++;
end--;
}
} | java | private void reverseAfter(int i) {
int start = i+1;
int end = n-1;
while (start < end) {
swap(index,start,end);
start++;
end--;
}
} | [
"private",
"void",
"reverseAfter",
"(",
"int",
"i",
")",
"{",
"int",
"start",
"=",
"i",
"+",
"1",
";",
"int",
"end",
"=",
"n",
"-",
"1",
";",
"while",
"(",
"start",
"<",
"end",
")",
"{",
"swap",
"(",
"index",
",",
"start",
",",
"end",
")",
";... | Reverse the index elements to the right of the specified index. | [
"Reverse",
"the",
"index",
"elements",
"to",
"the",
"right",
"of",
"the",
"specified",
"index",
"."
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/Permutation.java#L75-L83 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/utility/Permutation.java | Permutation.rightmostDip | private int rightmostDip() {
for (int i=n-2; i>=0; i--)
if (index[i] < index[i+1])
return i;
return -1;
} | java | private int rightmostDip() {
for (int i=n-2; i>=0; i--)
if (index[i] < index[i+1])
return i;
return -1;
} | [
"private",
"int",
"rightmostDip",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"n",
"-",
"2",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"if",
"(",
"index",
"[",
"i",
"]",
"<",
"index",
"[",
"i",
"+",
"1",
"]",
")",
"return",
"i",
";",
"ret... | that is less than its neighbor on the right. | [
"that",
"is",
"less",
"than",
"its",
"neighbor",
"on",
"the",
"right",
"."
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/Permutation.java#L87-L92 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/fuzzyAllenInterval/FuzzyAllenIntervalConstraint.java | FuzzyAllenIntervalConstraint.getInversePossibilities | public HashMap<Type, Double> getInversePossibilities() {
HashMap<Type, Double> ret = new HashMap<Type, Double>();
for (Type t : Type.values()) ret.put(t, 0.0);
for (Type t : types) {
//??? IS THIS CORRECT ??? --> Seems correct
//get inverse of each relation that is 1.0
Type inverseRelation = Fuzzy... | java | public HashMap<Type, Double> getInversePossibilities() {
HashMap<Type, Double> ret = new HashMap<Type, Double>();
for (Type t : Type.values()) ret.put(t, 0.0);
for (Type t : types) {
//??? IS THIS CORRECT ??? --> Seems correct
//get inverse of each relation that is 1.0
Type inverseRelation = Fuzzy... | [
"public",
"HashMap",
"<",
"Type",
",",
"Double",
">",
"getInversePossibilities",
"(",
")",
"{",
"HashMap",
"<",
"Type",
",",
"Double",
">",
"ret",
"=",
"new",
"HashMap",
"<",
"Type",
",",
"Double",
">",
"(",
")",
";",
"for",
"(",
"Type",
"t",
":",
... | Get the possibilities of all inverse relations.
@return The possibilities of all inverse relations | [
"Get",
"the",
"possibilities",
"of",
"all",
"inverse",
"relations",
"."
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/fuzzyAllenInterval/FuzzyAllenIntervalConstraint.java#L93-L125 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.addStep | public void addStep(String operationName, List<String> sourceFields, String targetField,
Map<String, String> parameters) {
TransformationStep step = new TransformationStep();
step.setOperationName(operationName);
step.setSourceFields(sourceFields.toArray(new String[sourceFields.size(... | java | public void addStep(String operationName, List<String> sourceFields, String targetField,
Map<String, String> parameters) {
TransformationStep step = new TransformationStep();
step.setOperationName(operationName);
step.setSourceFields(sourceFields.toArray(new String[sourceFields.size(... | [
"public",
"void",
"addStep",
"(",
"String",
"operationName",
",",
"List",
"<",
"String",
">",
"sourceFields",
",",
"String",
"targetField",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"Tran... | Adds a transformation step to this description | [
"Adds",
"a",
"transformation",
"step",
"to",
"this",
"description"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L54-L62 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.forwardField | public void forwardField(String sourceField, String targetField) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationName("forward");
steps.add(step);
} | java | public void forwardField(String sourceField, String targetField) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationName("forward");
steps.add(step);
} | [
"public",
"void",
"forwardField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setTargetField",
"(",
"targetField",
")",
";",
"step",
".",
"se... | Adds a forward transformation step to the transformation description. The value of the source field is copied to
the target field unchanged. Both fields need to have the same object type. | [
"Adds",
"a",
"forward",
"transformation",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"value",
"of",
"the",
"source",
"field",
"is",
"copied",
"to",
"the",
"target",
"field",
"unchanged",
".",
"Both",
"fields",
"need",
"to",
"have",
"th... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L68-L74 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.concatField | public void concatField(String targetField, String concatString, String... sourceFields) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceFields);
step.setOperationParameter(TransformationConstants.CONCAT_PARAM, concatStri... | java | public void concatField(String targetField, String concatString, String... sourceFields) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceFields);
step.setOperationParameter(TransformationConstants.CONCAT_PARAM, concatStri... | [
"public",
"void",
"concatField",
"(",
"String",
"targetField",
",",
"String",
"concatString",
",",
"String",
"...",
"sourceFields",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setTargetField",
"(",
"targ... | Adds a concat transformation step to the transformation description. The values of the source fields are
concatenated to the target field with the concat string between the source fields values. All fields need to be
of the type String. | [
"Adds",
"a",
"concat",
"transformation",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"values",
"of",
"the",
"source",
"fields",
"are",
"concatenated",
"to",
"the",
"target",
"field",
"with",
"the",
"concat",
"string",
"between",
"the",
"s... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L81-L88 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.splitField | public void splitField(String sourceField, String targetField, String splitString, String index) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationParameter(TransformationConstants.SPLIT_PARAM, spli... | java | public void splitField(String sourceField, String targetField, String splitString, String index) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationParameter(TransformationConstants.SPLIT_PARAM, spli... | [
"public",
"void",
"splitField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
",",
"String",
"splitString",
",",
"String",
"index",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setTargetFiel... | Adds a split transformation step to the transformation description. The value of the source field is split based
on the split string into parts. Based on the given index, the result will be set to the target field. The index
needs to be an integer value. All fields need to be of the type String. | [
"Adds",
"a",
"split",
"transformation",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"value",
"of",
"the",
"source",
"field",
"is",
"split",
"based",
"on",
"the",
"split",
"string",
"into",
"parts",
".",
"Based",
"on",
"the",
"given",
... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L95-L103 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.splitRegexField | public void splitRegexField(String sourceField, String targetField, String regexString, String index) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationParameter(TransformationConstants.REGEX_PARAM,... | java | public void splitRegexField(String sourceField, String targetField, String regexString, String index) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationParameter(TransformationConstants.REGEX_PARAM,... | [
"public",
"void",
"splitRegexField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
",",
"String",
"regexString",
",",
"String",
"index",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setTarge... | Adds a split regex transformation step to the transformation description. The value of the source field is split
based on the split string as regular expression into parts. Based on the given index, the result will be set to
the target field. The index needs to be an integer value. All fields need to be of the type Str... | [
"Adds",
"a",
"split",
"regex",
"transformation",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"value",
"of",
"the",
"source",
"field",
"is",
"split",
"based",
"on",
"the",
"split",
"string",
"as",
"regular",
"expression",
"into",
"parts",
... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L110-L118 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.substringField | public void substringField(String sourceField, String targetField, String from, String to) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationParameter(TransformationConstants.SUBSTRING_FROM_PARAM, f... | java | public void substringField(String sourceField, String targetField, String from, String to) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setSourceFields(sourceField);
step.setOperationParameter(TransformationConstants.SUBSTRING_FROM_PARAM, f... | [
"public",
"void",
"substringField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
",",
"String",
"from",
",",
"String",
"to",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setTargetField",
... | Adds a substring step to the transformation description. The value of the source field is taken and it is tried
to build the substring from the given index from to the given index to. From and to must be Integers written as
String, the value of the source field must also be a String. | [
"Adds",
"a",
"substring",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"value",
"of",
"the",
"source",
"field",
"is",
"taken",
"and",
"it",
"is",
"tried",
"to",
"build",
"the",
"substring",
"from",
"the",
"given",
"index",
"from",
"to"... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L139-L147 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.valueField | public void valueField(String targetField, String value) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.VALUE_PARAM, value);
step.setOperationName("value");
steps.add(step);
} | java | public void valueField(String targetField, String value) {
TransformationStep step = new TransformationStep();
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.VALUE_PARAM, value);
step.setOperationName("value");
steps.add(step);
} | [
"public",
"void",
"valueField",
"(",
"String",
"targetField",
",",
"String",
"value",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setTargetField",
"(",
"targetField",
")",
";",
"step",
".",
"setOperati... | Adds a value step to the transformation description. The given value is written to the target field. | [
"Adds",
"a",
"value",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"given",
"value",
"is",
"written",
"to",
"the",
"target",
"field",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L152-L158 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.replaceField | public void replaceField(String sourceField, String targetField, String oldString, String newString) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceField);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.REPLACE_OLD_P... | java | public void replaceField(String sourceField, String targetField, String oldString, String newString) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceField);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.REPLACE_OLD_P... | [
"public",
"void",
"replaceField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
",",
"String",
"oldString",
",",
"String",
"newString",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setSource... | Adds a replace step to the transformation description. The source and the target field need to be of String type.
Performs standard string replacement on the string of the source field and writes the result to the target field. | [
"Adds",
"a",
"replace",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"source",
"and",
"the",
"target",
"field",
"need",
"to",
"be",
"of",
"String",
"type",
".",
"Performs",
"standard",
"string",
"replacement",
"on",
"the",
"string",
"of"... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L215-L223 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.padField | public void padField(String sourceField, String targetField, String length, String character, String direction) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceField);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.PA... | java | public void padField(String sourceField, String targetField, String length, String character, String direction) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceField);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.PA... | [
"public",
"void",
"padField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
",",
"String",
"length",
",",
"String",
"character",
",",
"String",
"direction",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
... | Adds a pad step to the transformation description. The source and the target field need to be of String type.
Performs padding operation on the string of the source field and writes the result to the target field. The
length describes to which size the padding should be done, the pad character describes which character... | [
"Adds",
"a",
"pad",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"source",
"and",
"the",
"target",
"field",
"need",
"to",
"be",
"of",
"String",
"type",
".",
"Performs",
"padding",
"operation",
"on",
"the",
"string",
"of",
"the",
"sourc... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L244-L253 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.removeLeadingField | public void removeLeadingField(String sourceField, String targetField, String regexString, String length) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceField);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.REMOVELE... | java | public void removeLeadingField(String sourceField, String targetField, String regexString, String length) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceField);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstants.REMOVELE... | [
"public",
"void",
"removeLeadingField",
"(",
"String",
"sourceField",
",",
"String",
"targetField",
",",
"String",
"regexString",
",",
"String",
"length",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",
".",
"setS... | Adds a remove leading step to the transformation description. The source and the target field need to be of
String type. Based on the given regular expression string the beginning of the source string will be removed
until the given maximum length. If the length is 0, the maximum length is ignored. | [
"Adds",
"a",
"remove",
"leading",
"step",
"to",
"the",
"transformation",
"description",
".",
"The",
"source",
"and",
"the",
"target",
"field",
"need",
"to",
"be",
"of",
"String",
"type",
".",
"Based",
"on",
"the",
"given",
"regular",
"expression",
"string",
... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L260-L268 | train |
openengsb/openengsb | api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java | TransformationDescription.instantiateField | public void instantiateField(String targetField, String targetType, String targetTypeInit, String... sourceFields) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceFields);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstant... | java | public void instantiateField(String targetField, String targetType, String targetTypeInit, String... sourceFields) {
TransformationStep step = new TransformationStep();
step.setSourceFields(sourceFields);
step.setTargetField(targetField);
step.setOperationParameter(TransformationConstant... | [
"public",
"void",
"instantiateField",
"(",
"String",
"targetField",
",",
"String",
"targetType",
",",
"String",
"targetTypeInit",
",",
"String",
"...",
"sourceFields",
")",
"{",
"TransformationStep",
"step",
"=",
"new",
"TransformationStep",
"(",
")",
";",
"step",... | Adds an instantiate step to the transformation description. An object defined through the given target type will
be created. For the instantiation the targetTypeInit method will be used. If this parameter is null, the
constructor of the targetType will be used with the object type of the source object as parameter. | [
"Adds",
"an",
"instantiate",
"step",
"to",
"the",
"transformation",
"description",
".",
"An",
"object",
"defined",
"through",
"the",
"given",
"target",
"type",
"will",
"be",
"created",
".",
"For",
"the",
"instantiation",
"the",
"targetTypeInit",
"method",
"will"... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L275-L285 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/QueryRequestCriteriaBuilder.java | QueryRequestCriteriaBuilder.convertParametersToPredicate | @SuppressWarnings({ "unchecked" })
private Predicate convertParametersToPredicate(Root<?> from, CriteriaQuery<?> query) {
List<Predicate> predicates = new ArrayList<>();
for (Map.Entry<String, Set<Object>> value : request.getParameters().entrySet()) {
Subquery<JPAEntry> subquery = buildJ... | java | @SuppressWarnings({ "unchecked" })
private Predicate convertParametersToPredicate(Root<?> from, CriteriaQuery<?> query) {
List<Predicate> predicates = new ArrayList<>();
for (Map.Entry<String, Set<Object>> value : request.getParameters().entrySet()) {
Subquery<JPAEntry> subquery = buildJ... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
"}",
")",
"private",
"Predicate",
"convertParametersToPredicate",
"(",
"Root",
"<",
"?",
">",
"from",
",",
"CriteriaQuery",
"<",
"?",
">",
"query",
")",
"{",
"List",
"<",
"Predicate",
">",
"predicates",
"="... | Converts a query request parameter map for a query operation into a list of predicates which need to be added to
the criteria query. | [
"Converts",
"a",
"query",
"request",
"parameter",
"map",
"for",
"a",
"query",
"operation",
"into",
"a",
"list",
"of",
"predicates",
"which",
"need",
"to",
"be",
"added",
"to",
"the",
"criteria",
"query",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/QueryRequestCriteriaBuilder.java#L88-L100 | train |
aseovic/coherence-tools | core/src/main/java/com/seovic/core/processor/BinaryPropertyProcessor.java | BinaryPropertyProcessor.set | protected void set(PofValue target, Object value) {
navigator.navigate(target).setValue(value);
} | java | protected void set(PofValue target, Object value) {
navigator.navigate(target).setValue(value);
} | [
"protected",
"void",
"set",
"(",
"PofValue",
"target",
",",
"Object",
"value",
")",
"{",
"navigator",
".",
"navigate",
"(",
"target",
")",
".",
"setValue",
"(",
"value",
")",
";",
"}"
] | Set the property value into the specified PofValue object.
@param target PofValue to set the property value into
@param value new property value | [
"Set",
"the",
"property",
"value",
"into",
"the",
"specified",
"PofValue",
"object",
"."
] | 561a1d7e572ad98657fcd26beb1164891b0cd6fe | https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/core/src/main/java/com/seovic/core/processor/BinaryPropertyProcessor.java#L80-L82 | train |
bazaarvoice/curator-extensions | recipes/src/main/java/com/bazaarvoice/curator/recipes/NodeDiscovery.java | NodeDiscovery.getNodes | public Map<String, T> getNodes() {
return Maps.transformValues(Collections.unmodifiableMap(_nodes), input -> (input != null) ? input.orElse(null) : null);
} | java | public Map<String, T> getNodes() {
return Maps.transformValues(Collections.unmodifiableMap(_nodes), input -> (input != null) ? input.orElse(null) : null);
} | [
"public",
"Map",
"<",
"String",
",",
"T",
">",
"getNodes",
"(",
")",
"{",
"return",
"Maps",
".",
"transformValues",
"(",
"Collections",
".",
"unmodifiableMap",
"(",
"_nodes",
")",
",",
"input",
"->",
"(",
"input",
"!=",
"null",
")",
"?",
"input",
".",
... | Retrieve the available nodes.
@return The available nodes. | [
"Retrieve",
"the",
"available",
"nodes",
"."
] | eb1e1b478f1ae6aed602bb5d5cb481277203004e | https://github.com/bazaarvoice/curator-extensions/blob/eb1e1b478f1ae6aed602bb5d5cb481277203004e/recipes/src/main/java/com/bazaarvoice/curator/recipes/NodeDiscovery.java#L95-L97 | train |
bazaarvoice/curator-extensions | recipes/src/main/java/com/bazaarvoice/curator/recipes/NodeDiscovery.java | NodeDiscovery.loadExistingData | private synchronized void loadExistingData() {
for (ChildData childData : _pathCache.getCurrentData()) {
addNode(childData.getPath(), parseChildData(childData));
}
} | java | private synchronized void loadExistingData() {
for (ChildData childData : _pathCache.getCurrentData()) {
addNode(childData.getPath(), parseChildData(childData));
}
} | [
"private",
"synchronized",
"void",
"loadExistingData",
"(",
")",
"{",
"for",
"(",
"ChildData",
"childData",
":",
"_pathCache",
".",
"getCurrentData",
"(",
")",
")",
"{",
"addNode",
"(",
"childData",
".",
"getPath",
"(",
")",
",",
"parseChildData",
"(",
"chil... | Loads all of the existing data from the underlying path cache. | [
"Loads",
"all",
"of",
"the",
"existing",
"data",
"from",
"the",
"underlying",
"path",
"cache",
"."
] | eb1e1b478f1ae6aed602bb5d5cb481277203004e | https://github.com/bazaarvoice/curator-extensions/blob/eb1e1b478f1ae6aed602bb5d5cb481277203004e/recipes/src/main/java/com/bazaarvoice/curator/recipes/NodeDiscovery.java#L179-L183 | train |
openengsb/openengsb | components/ekb/persistence-query-edb/src/main/java/org/openengsb/core/ekb/persistence/query/edb/internal/QueryInterfaceService.java | QueryInterfaceService.convertEDBCommitToEKBCommit | private EKBCommit convertEDBCommitToEKBCommit(EDBCommit commit) throws EKBException {
EKBCommit result = new EKBCommit();
Map<ModelDescription, Class<?>> cache = new HashMap<>();
result.setRevisionNumber(commit.getRevisionNumber());
result.setComment(commit.getComment());
result.... | java | private EKBCommit convertEDBCommitToEKBCommit(EDBCommit commit) throws EKBException {
EKBCommit result = new EKBCommit();
Map<ModelDescription, Class<?>> cache = new HashMap<>();
result.setRevisionNumber(commit.getRevisionNumber());
result.setComment(commit.getComment());
result.... | [
"private",
"EKBCommit",
"convertEDBCommitToEKBCommit",
"(",
"EDBCommit",
"commit",
")",
"throws",
"EKBException",
"{",
"EKBCommit",
"result",
"=",
"new",
"EKBCommit",
"(",
")",
";",
"Map",
"<",
"ModelDescription",
",",
"Class",
"<",
"?",
">",
">",
"cache",
"="... | Converts an EDBCommit object into an EKBCommit object. | [
"Converts",
"an",
"EDBCommit",
"object",
"into",
"an",
"EKBCommit",
"object",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/persistence-query-edb/src/main/java/org/openengsb/core/ekb/persistence/query/edb/internal/QueryInterfaceService.java#L149-L169 | train |
openengsb/openengsb | components/ekb/persistence-query-edb/src/main/java/org/openengsb/core/ekb/persistence/query/edb/internal/QueryInterfaceService.java | QueryInterfaceService.createModelOfEDBObject | private Object createModelOfEDBObject(EDBObject object, Map<ModelDescription, Class<?>> cache) {
try {
ModelDescription description = getDescriptionFromObject(object);
Class<?> modelClass;
if (cache.containsKey(description)) {
modelClass = cache.get(descriptio... | java | private Object createModelOfEDBObject(EDBObject object, Map<ModelDescription, Class<?>> cache) {
try {
ModelDescription description = getDescriptionFromObject(object);
Class<?> modelClass;
if (cache.containsKey(description)) {
modelClass = cache.get(descriptio... | [
"private",
"Object",
"createModelOfEDBObject",
"(",
"EDBObject",
"object",
",",
"Map",
"<",
"ModelDescription",
",",
"Class",
"<",
"?",
">",
">",
"cache",
")",
"{",
"try",
"{",
"ModelDescription",
"description",
"=",
"getDescriptionFromObject",
"(",
"object",
")... | Converts an EDBObject instance into a model. For this, the method need to retrieve the model class to be able to
instantiate the corresponding model objects. If the conversion fails, null is returned. | [
"Converts",
"an",
"EDBObject",
"instance",
"into",
"a",
"model",
".",
"For",
"this",
"the",
"method",
"need",
"to",
"retrieve",
"the",
"model",
"class",
"to",
"be",
"able",
"to",
"instantiate",
"the",
"corresponding",
"model",
"objects",
".",
"If",
"the",
... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/persistence-query-edb/src/main/java/org/openengsb/core/ekb/persistence/query/edb/internal/QueryInterfaceService.java#L175-L190 | train |
openengsb/openengsb | components/ekb/persistence-query-edb/src/main/java/org/openengsb/core/ekb/persistence/query/edb/internal/QueryInterfaceService.java | QueryInterfaceService.getDescriptionFromObject | private ModelDescription getDescriptionFromObject(EDBObject obj) {
String modelName = obj.getString(EDBConstants.MODEL_TYPE);
String modelVersion = obj.getString(EDBConstants.MODEL_TYPE_VERSION);
if (modelName == null || modelVersion == null) {
throw new IllegalArgumentException("The... | java | private ModelDescription getDescriptionFromObject(EDBObject obj) {
String modelName = obj.getString(EDBConstants.MODEL_TYPE);
String modelVersion = obj.getString(EDBConstants.MODEL_TYPE_VERSION);
if (modelName == null || modelVersion == null) {
throw new IllegalArgumentException("The... | [
"private",
"ModelDescription",
"getDescriptionFromObject",
"(",
"EDBObject",
"obj",
")",
"{",
"String",
"modelName",
"=",
"obj",
".",
"getString",
"(",
"EDBConstants",
".",
"MODEL_TYPE",
")",
";",
"String",
"modelVersion",
"=",
"obj",
".",
"getString",
"(",
"EDB... | Extracts the required values to lookup a model class from the given EDBObject. If this object does not contain
the required information, an IllegalArgumentException is thrown. | [
"Extracts",
"the",
"required",
"values",
"to",
"lookup",
"a",
"model",
"class",
"from",
"the",
"given",
"EDBObject",
".",
"If",
"this",
"object",
"does",
"not",
"contain",
"the",
"required",
"information",
"an",
"IllegalArgumentException",
"is",
"thrown",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/persistence-query-edb/src/main/java/org/openengsb/core/ekb/persistence/query/edb/internal/QueryInterfaceService.java#L196-L203 | train |
aseovic/coherence-tools | loader/src/main/java/com/seovic/loader/target/CoherenceCacheTarget.java | CoherenceCacheTarget.init | private void init(String cacheName, NamedCache cache,
IdGenerator idGenerator,
IdExtractor idExtractor) {
m_cacheName = cacheName;
m_cache = cache;
m_idGenerator = idGenerator;
m_idExtractor = idExtractor;
} | java | private void init(String cacheName, NamedCache cache,
IdGenerator idGenerator,
IdExtractor idExtractor) {
m_cacheName = cacheName;
m_cache = cache;
m_idGenerator = idGenerator;
m_idExtractor = idExtractor;
} | [
"private",
"void",
"init",
"(",
"String",
"cacheName",
",",
"NamedCache",
"cache",
",",
"IdGenerator",
"idGenerator",
",",
"IdExtractor",
"idExtractor",
")",
"{",
"m_cacheName",
"=",
"cacheName",
";",
"m_cache",
"=",
"cache",
";",
"m_idGenerator",
"=",
"idGenera... | Initializes CoherenceCacheTarget instance.
@param cacheName the name of the cache to load objects into
@param cache the cache to load objects into
@param idGenerator identity generator to use to determine key
@param idExtractor identity extractor to use to determine key | [
"Initializes",
"CoherenceCacheTarget",
"instance",
"."
] | 561a1d7e572ad98657fcd26beb1164891b0cd6fe | https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/loader/src/main/java/com/seovic/loader/target/CoherenceCacheTarget.java#L148-L155 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/security/TextFileAuthentication.java | TextFileAuthentication.main | public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Two arguments needed as username and password");
System.exit(-1);
}
User user = new User();
user.name = args[0];
user.password.setPassword(args[1].toCharArray());
for (int i = 2; i<args.length; i++) {
user.roles.add... | java | public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Two arguments needed as username and password");
System.exit(-1);
}
User user = new User();
user.name = args[0];
user.password.setPassword(args[1].toCharArray());
for (int i = 2; i<args.length; i++) {
user.roles.add... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"args",
".",
"length",
"<",
"2",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"Two arguments needed as username and password\"",
")",
";",
"System",
".",
... | Can be used to create entries in the users textfile
@param args username and password | [
"Can",
"be",
"used",
"to",
"create",
"entries",
"in",
"the",
"users",
"textfile"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/security/TextFileAuthentication.java#L63-L75 | train |
openengsb/openengsb | components/common/src/main/java/org/openengsb/core/common/transformations/TransformationUtils.java | TransformationUtils.getDescriptionsFromXMLInputStream | public static List<TransformationDescription> getDescriptionsFromXMLInputStream(InputStream fileContent) {
List<TransformationDescription> desc = new ArrayList<TransformationDescription>();
try {
desc = loadDescrtipionsFromXMLInputSource(new InputSource(fileContent), null);
} catch (... | java | public static List<TransformationDescription> getDescriptionsFromXMLInputStream(InputStream fileContent) {
List<TransformationDescription> desc = new ArrayList<TransformationDescription>();
try {
desc = loadDescrtipionsFromXMLInputSource(new InputSource(fileContent), null);
} catch (... | [
"public",
"static",
"List",
"<",
"TransformationDescription",
">",
"getDescriptionsFromXMLInputStream",
"(",
"InputStream",
"fileContent",
")",
"{",
"List",
"<",
"TransformationDescription",
">",
"desc",
"=",
"new",
"ArrayList",
"<",
"TransformationDescription",
">",
"(... | Scans an input stream for transformation descriptions and returns all successfully read transformation
descriptions. | [
"Scans",
"an",
"input",
"stream",
"for",
"transformation",
"descriptions",
"and",
"returns",
"all",
"successfully",
"read",
"transformation",
"descriptions",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/common/src/main/java/org/openengsb/core/common/transformations/TransformationUtils.java#L45-L53 | train |
openengsb/openengsb | components/common/src/main/java/org/openengsb/core/common/transformations/TransformationUtils.java | TransformationUtils.getDescriptionsFromXMLFile | public static List<TransformationDescription> getDescriptionsFromXMLFile(File file) {
List<TransformationDescription> desc = new ArrayList<TransformationDescription>();
try {
return loadDescrtipionsFromXMLInputSource(new InputSource(file.getAbsolutePath()), file.getName());
} catch (... | java | public static List<TransformationDescription> getDescriptionsFromXMLFile(File file) {
List<TransformationDescription> desc = new ArrayList<TransformationDescription>();
try {
return loadDescrtipionsFromXMLInputSource(new InputSource(file.getAbsolutePath()), file.getName());
} catch (... | [
"public",
"static",
"List",
"<",
"TransformationDescription",
">",
"getDescriptionsFromXMLFile",
"(",
"File",
"file",
")",
"{",
"List",
"<",
"TransformationDescription",
">",
"desc",
"=",
"new",
"ArrayList",
"<",
"TransformationDescription",
">",
"(",
")",
";",
"t... | Scans a XML file for transformation descriptions and returns all successfully read transformation descriptions. | [
"Scans",
"a",
"XML",
"file",
"for",
"transformation",
"descriptions",
"and",
"returns",
"all",
"successfully",
"read",
"transformation",
"descriptions",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/common/src/main/java/org/openengsb/core/common/transformations/TransformationUtils.java#L58-L66 | train |
openengsb/openengsb | components/common/src/main/java/org/openengsb/core/common/transformations/TransformationUtils.java | TransformationUtils.loadDescrtipionsFromXMLInputSource | private static List<TransformationDescription> loadDescrtipionsFromXMLInputSource(InputSource source,
String fileName) throws Exception {
XMLReader xr = XMLReaderFactory.createXMLReader();
TransformationDescriptionXMLReader reader = new TransformationDescriptionXMLReader(fileName);
x... | java | private static List<TransformationDescription> loadDescrtipionsFromXMLInputSource(InputSource source,
String fileName) throws Exception {
XMLReader xr = XMLReaderFactory.createXMLReader();
TransformationDescriptionXMLReader reader = new TransformationDescriptionXMLReader(fileName);
x... | [
"private",
"static",
"List",
"<",
"TransformationDescription",
">",
"loadDescrtipionsFromXMLInputSource",
"(",
"InputSource",
"source",
",",
"String",
"fileName",
")",
"throws",
"Exception",
"{",
"XMLReader",
"xr",
"=",
"XMLReaderFactory",
".",
"createXMLReader",
"(",
... | Does the actual parsing. | [
"Does",
"the",
"actual",
"parsing",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/common/src/main/java/org/openengsb/core/common/transformations/TransformationUtils.java#L71-L78 | train |
aseovic/coherence-tools | loader/src/main/java/com/seovic/loader/target/AbstractBaseTarget.java | AbstractBaseTarget.getWriteableProperties | protected static List<PropertyDescriptor> getWriteableProperties(Class cls)
{
BeanWrapper beanWrapper = new BeanWrapperImpl(cls);
List<PropertyDescriptor> writeableProperties =
new ArrayList<PropertyDescriptor>();
PropertyDescriptor[] props = beanWrapper.getPropertyDescri... | java | protected static List<PropertyDescriptor> getWriteableProperties(Class cls)
{
BeanWrapper beanWrapper = new BeanWrapperImpl(cls);
List<PropertyDescriptor> writeableProperties =
new ArrayList<PropertyDescriptor>();
PropertyDescriptor[] props = beanWrapper.getPropertyDescri... | [
"protected",
"static",
"List",
"<",
"PropertyDescriptor",
">",
"getWriteableProperties",
"(",
"Class",
"cls",
")",
"{",
"BeanWrapper",
"beanWrapper",
"=",
"new",
"BeanWrapperImpl",
"(",
"cls",
")",
";",
"List",
"<",
"PropertyDescriptor",
">",
"writeableProperties",
... | Returns a list of all writeable properties of a class.
@param cls class to obtain a list of writeable properties for
@return a list of writeable properties of the specified class | [
"Returns",
"a",
"list",
"of",
"all",
"writeable",
"properties",
"of",
"a",
"class",
"."
] | 561a1d7e572ad98657fcd26beb1164891b0cd6fe | https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/loader/src/main/java/com/seovic/loader/target/AbstractBaseTarget.java#L112-L126 | train |
aseovic/coherence-tools | core/src/main/java/com/seovic/core/persistence/AbstractJdbcCacheStore.java | AbstractJdbcCacheStore.load | @Transactional(readOnly = true)
public Object load(Object key) {
List<T> results = getJdbcTemplate().query(
getSelectSql(), getRowMapper(), getPrimaryKeyComponents(key));
return results.size() == 0 ? null : results.get(0);
} | java | @Transactional(readOnly = true)
public Object load(Object key) {
List<T> results = getJdbcTemplate().query(
getSelectSql(), getRowMapper(), getPrimaryKeyComponents(key));
return results.size() == 0 ? null : results.get(0);
} | [
"@",
"Transactional",
"(",
"readOnly",
"=",
"true",
")",
"public",
"Object",
"load",
"(",
"Object",
"key",
")",
"{",
"List",
"<",
"T",
">",
"results",
"=",
"getJdbcTemplate",
"(",
")",
".",
"query",
"(",
"getSelectSql",
"(",
")",
",",
"getRowMapper",
"... | Load and return a single object from the data store.
@param key entry key that can be used to find the object in the data
store
@return loaded object or null if the object for the specified key was not
found | [
"Load",
"and",
"return",
"a",
"single",
"object",
"from",
"the",
"data",
"store",
"."
] | 561a1d7e572ad98657fcd26beb1164891b0cd6fe | https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/core/src/main/java/com/seovic/core/persistence/AbstractJdbcCacheStore.java#L101-L106 | train |
aseovic/coherence-tools | core/src/main/java/com/seovic/core/persistence/AbstractJdbcCacheStore.java | AbstractJdbcCacheStore.store | public void store(Object key, Object value) {
getJdbcTemplate().update(getMergeSql(),
new BeanPropertySqlParameterSource(value));
} | java | public void store(Object key, Object value) {
getJdbcTemplate().update(getMergeSql(),
new BeanPropertySqlParameterSource(value));
} | [
"public",
"void",
"store",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"getJdbcTemplate",
"(",
")",
".",
"update",
"(",
"getMergeSql",
"(",
")",
",",
"new",
"BeanPropertySqlParameterSource",
"(",
"value",
")",
")",
";",
"}"
] | Persist a single object into the data store.
@param key entry key of the object that should be persisted
@param value object to persist | [
"Persist",
"a",
"single",
"object",
"into",
"the",
"data",
"store",
"."
] | 561a1d7e572ad98657fcd26beb1164891b0cd6fe | https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/core/src/main/java/com/seovic/core/persistence/AbstractJdbcCacheStore.java#L117-L120 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/utility/UI/PlotSTPTemporalModule.java | PlotSTPTemporalModule.tableToString | String tableToString(Table table)
{
StringBuilder strb = new StringBuilder();
for(int row = 0; row < table.getRowCount(); row++)
{
for(int col = 0; col < table.getColumnCount(); col++)
{
strb.append(table.get(row, col));
strb.append(" ");
}
strb.append(... | java | String tableToString(Table table)
{
StringBuilder strb = new StringBuilder();
for(int row = 0; row < table.getRowCount(); row++)
{
for(int col = 0; col < table.getColumnCount(); col++)
{
strb.append(table.get(row, col));
strb.append(" ");
}
strb.append(... | [
"String",
"tableToString",
"(",
"Table",
"table",
")",
"{",
"StringBuilder",
"strb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"row",
"=",
"0",
";",
"row",
"<",
"table",
".",
"getRowCount",
"(",
")",
";",
"row",
"++",
")",
"{",
... | end of inner class LabelLayout | [
"end",
"of",
"inner",
"class",
"LabelLayout"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/utility/UI/PlotSTPTemporalModule.java#L168-L182 | train |
openengsb/openengsb | api/core/src/main/java/org/openengsb/core/api/model/ModelWrapper.java | ModelWrapper.wrap | public static ModelWrapper wrap(Object model) {
if (!(isModel(model.getClass()))) {
throw new IllegalArgumentException("The given object is no model");
}
return new ModelWrapper((OpenEngSBModel) model);
} | java | public static ModelWrapper wrap(Object model) {
if (!(isModel(model.getClass()))) {
throw new IllegalArgumentException("The given object is no model");
}
return new ModelWrapper((OpenEngSBModel) model);
} | [
"public",
"static",
"ModelWrapper",
"wrap",
"(",
"Object",
"model",
")",
"{",
"if",
"(",
"!",
"(",
"isModel",
"(",
"model",
".",
"getClass",
"(",
")",
")",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The given object is no model\"",
")... | Creates a model wrapper object out of the given model object. Throws IllegalArgumentException in case the given
model object is no model. | [
"Creates",
"a",
"model",
"wrapper",
"object",
"out",
"of",
"the",
"given",
"model",
"object",
".",
"Throws",
"IllegalArgumentException",
"in",
"case",
"the",
"given",
"model",
"object",
"is",
"no",
"model",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/core/src/main/java/org/openengsb/core/api/model/ModelWrapper.java#L40-L45 | train |
openengsb/openengsb | api/core/src/main/java/org/openengsb/core/api/model/ModelWrapper.java | ModelWrapper.getModelDescription | public ModelDescription getModelDescription() {
String modelName = retrieveModelName();
String modelVersion = retrieveModelVersion();
if (modelName == null || modelVersion == null) {
throw new IllegalArgumentException("Unsufficient information to create model description.");
... | java | public ModelDescription getModelDescription() {
String modelName = retrieveModelName();
String modelVersion = retrieveModelVersion();
if (modelName == null || modelVersion == null) {
throw new IllegalArgumentException("Unsufficient information to create model description.");
... | [
"public",
"ModelDescription",
"getModelDescription",
"(",
")",
"{",
"String",
"modelName",
"=",
"retrieveModelName",
"(",
")",
";",
"String",
"modelVersion",
"=",
"retrieveModelVersion",
"(",
")",
";",
"if",
"(",
"modelName",
"==",
"null",
"||",
"modelVersion",
... | Creates the model description object for the underlying model object. | [
"Creates",
"the",
"model",
"description",
"object",
"for",
"the",
"underlying",
"model",
"object",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/core/src/main/java/org/openengsb/core/api/model/ModelWrapper.java#L64-L71 | train |
openengsb/openengsb | api/core/src/main/java/org/openengsb/core/api/model/ModelWrapper.java | ModelWrapper.appendContextId | protected String appendContextId(Object modelId) {
return String.format("%s/%s", ContextHolder.get().getCurrentContextId(), modelId);
} | java | protected String appendContextId(Object modelId) {
return String.format("%s/%s", ContextHolder.get().getCurrentContextId(), modelId);
} | [
"protected",
"String",
"appendContextId",
"(",
"Object",
"modelId",
")",
"{",
"return",
"String",
".",
"format",
"(",
"\"%s/%s\"",
",",
"ContextHolder",
".",
"get",
"(",
")",
".",
"getCurrentContextId",
"(",
")",
",",
"modelId",
")",
";",
"}"
] | Appends the currentContext to the given model id. | [
"Appends",
"the",
"currentContext",
"to",
"the",
"given",
"model",
"id",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/core/src/main/java/org/openengsb/core/api/model/ModelWrapper.java#L186-L188 | train |
FedericoPecora/meta-csp-framework | src/main/java/org/metacsp/time/Interval.java | Interval.compareTo | @Override
public int compareTo(Object arg0) {
Interval that = (Interval)arg0;
return this.bounds.compareTo(that.getBounds());
} | java | @Override
public int compareTo(Object arg0) {
Interval that = (Interval)arg0;
return this.bounds.compareTo(that.getBounds());
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"Object",
"arg0",
")",
"{",
"Interval",
"that",
"=",
"(",
"Interval",
")",
"arg0",
";",
"return",
"this",
".",
"bounds",
".",
"compareTo",
"(",
"that",
".",
"getBounds",
"(",
")",
")",
";",
"}"
] | Compares this to another Interval
@return {@code 1} if this Interval's lower bound is lower than the argument's, {@code 0} if they are the same, {@code 1} otherwise | [
"Compares",
"this",
"to",
"another",
"Interval"
] | 42aaef2e2b76d0f738427f0dd9653c4f62b40517 | https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/time/Interval.java#L89-L93 | train |
openengsb/openengsb | connector/userprojectsfile/src/main/java/org/openengsb/connector/userprojects/file/internal/file/RoleFileAccessObject.java | RoleFileAccessObject.findAllRoles | public List<Role> findAllRoles() {
List<Role> list = new ArrayList<>();
List<String> roleStrings;
try {
roleStrings = readLines(rolesFile);
} catch (IOException e) {
throw new FileBasedRuntimeException(e);
}
for (String roleString : roleStrings) {... | java | public List<Role> findAllRoles() {
List<Role> list = new ArrayList<>();
List<String> roleStrings;
try {
roleStrings = readLines(rolesFile);
} catch (IOException e) {
throw new FileBasedRuntimeException(e);
}
for (String roleString : roleStrings) {... | [
"public",
"List",
"<",
"Role",
">",
"findAllRoles",
"(",
")",
"{",
"List",
"<",
"Role",
">",
"list",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"List",
"<",
"String",
">",
"roleStrings",
";",
"try",
"{",
"roleStrings",
"=",
"readLines",
"(",
"role... | Finds all the available roles.
@return the list of available roles | [
"Finds",
"all",
"the",
"available",
"roles",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/connector/userprojectsfile/src/main/java/org/openengsb/connector/userprojects/file/internal/file/RoleFileAccessObject.java#L45-L71 | train |
openengsb/openengsb | ui/common/src/main/java/org/openengsb/ui/common/editor/AttributeEditorUtil.java | AttributeEditorUtil.createFieldList | public static RepeatingView createFieldList(String id, Class<?> bean, Map<String, String> values) {
List<AttributeDefinition> attributes = MethodUtil.buildAttributesList(bean);
return createFieldList(id, attributes, values);
} | java | public static RepeatingView createFieldList(String id, Class<?> bean, Map<String, String> values) {
List<AttributeDefinition> attributes = MethodUtil.buildAttributesList(bean);
return createFieldList(id, attributes, values);
} | [
"public",
"static",
"RepeatingView",
"createFieldList",
"(",
"String",
"id",
",",
"Class",
"<",
"?",
">",
"bean",
",",
"Map",
"<",
"String",
",",
"String",
">",
"values",
")",
"{",
"List",
"<",
"AttributeDefinition",
">",
"attributes",
"=",
"MethodUtil",
"... | creates a RepeatingView providing a suitable editor field for every property.
@param values map used for saving the data @see org.openengsb.ui.common.wicket.model.MapModel | [
"creates",
"a",
"RepeatingView",
"providing",
"a",
"suitable",
"editor",
"field",
"for",
"every",
"property",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/ui/common/src/main/java/org/openengsb/ui/common/editor/AttributeEditorUtil.java#L53-L56 | train |
openengsb/openengsb | ui/common/src/main/java/org/openengsb/ui/common/editor/AttributeEditorUtil.java | AttributeEditorUtil.createFieldList | public static RepeatingView createFieldList(String id, List<AttributeDefinition> attributes,
Map<String, String> values) {
RepeatingView fields = new RepeatingView(id);
for (AttributeDefinition a : attributes) {
WebMarkupContainer row = new WebMarkupContainer(a.getId());
... | java | public static RepeatingView createFieldList(String id, List<AttributeDefinition> attributes,
Map<String, String> values) {
RepeatingView fields = new RepeatingView(id);
for (AttributeDefinition a : attributes) {
WebMarkupContainer row = new WebMarkupContainer(a.getId());
... | [
"public",
"static",
"RepeatingView",
"createFieldList",
"(",
"String",
"id",
",",
"List",
"<",
"AttributeDefinition",
">",
"attributes",
",",
"Map",
"<",
"String",
",",
"String",
">",
"values",
")",
"{",
"RepeatingView",
"fields",
"=",
"new",
"RepeatingView",
... | creates a RepeatingView providing a suitable editor field for every attribute in the list.
@param values map used for saving the data @see org.openengsb.ui.common.wicket.model.MapModel | [
"creates",
"a",
"RepeatingView",
"providing",
"a",
"suitable",
"editor",
"field",
"for",
"every",
"attribute",
"in",
"the",
"list",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/ui/common/src/main/java/org/openengsb/ui/common/editor/AttributeEditorUtil.java#L63-L73 | train |
openengsb/openengsb | components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java | PropertyConnectionCalculator.getPropertyConnections | public Map<String, Set<String>> getPropertyConnections(TransformationDescription description) {
Map<String, Set<String>> propertyMap = getSourceProperties(description.getSourceModel());
fillPropertyMap(propertyMap, description);
resolveTemporaryProperties(propertyMap);
deleteTemporaryPro... | java | public Map<String, Set<String>> getPropertyConnections(TransformationDescription description) {
Map<String, Set<String>> propertyMap = getSourceProperties(description.getSourceModel());
fillPropertyMap(propertyMap, description);
resolveTemporaryProperties(propertyMap);
deleteTemporaryPro... | [
"public",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"getPropertyConnections",
"(",
"TransformationDescription",
"description",
")",
"{",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"propertyMap",
"=",
"getSourceProperties",
"(",... | Calculates the connections of properties of the source and target model of a transformation description. Returns
a map where the keys are the properties of the source model and the values are a set of property names which are
influenced if the key property is changed. | [
"Calculates",
"the",
"connections",
"of",
"properties",
"of",
"the",
"source",
"and",
"target",
"model",
"of",
"a",
"transformation",
"description",
".",
"Returns",
"a",
"map",
"where",
"the",
"keys",
"are",
"the",
"properties",
"of",
"the",
"source",
"model",... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java#L52-L58 | train |
openengsb/openengsb | components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java | PropertyConnectionCalculator.getSourceProperties | private Map<String, Set<String>> getSourceProperties(ModelDescription description) {
Map<String, Set<String>> result = new LinkedHashMap<String, Set<String>>();
try {
Class<?> sourceModel = registry.loadModel(description);
while (sourceModel != null && !sourceModel.equals(Object.... | java | private Map<String, Set<String>> getSourceProperties(ModelDescription description) {
Map<String, Set<String>> result = new LinkedHashMap<String, Set<String>>();
try {
Class<?> sourceModel = registry.loadModel(description);
while (sourceModel != null && !sourceModel.equals(Object.... | [
"private",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"getSourceProperties",
"(",
"ModelDescription",
"description",
")",
"{",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"result",
"=",
"new",
"LinkedHashMap",
"<",
"String",
... | Returns a map where the keys are the properties of the model described by the given model description. The values
are empty sets. | [
"Returns",
"a",
"map",
"where",
"the",
"keys",
"are",
"the",
"properties",
"of",
"the",
"model",
"described",
"by",
"the",
"given",
"model",
"description",
".",
"The",
"values",
"are",
"empty",
"sets",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java#L64-L79 | train |
openengsb/openengsb | components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java | PropertyConnectionCalculator.fillPropertyMap | private void fillPropertyMap(Map<String, Set<String>> map, TransformationDescription description) {
for (TransformationStep step : description.getTransformingSteps()) {
if (step.getSourceFields() == null) {
LOGGER.debug("Step {} is ignored since no source properties are defined");
... | java | private void fillPropertyMap(Map<String, Set<String>> map, TransformationDescription description) {
for (TransformationStep step : description.getTransformingSteps()) {
if (step.getSourceFields() == null) {
LOGGER.debug("Step {} is ignored since no source properties are defined");
... | [
"private",
"void",
"fillPropertyMap",
"(",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"map",
",",
"TransformationDescription",
"description",
")",
"{",
"for",
"(",
"TransformationStep",
"step",
":",
"description",
".",
"getTransformingSteps",
"("... | Fills the given map based on the transformation steps given in the transformation description. It analyzes the
transformation step and adds the target of the transformation step to the set of properties which are influenced
by the source property. | [
"Fills",
"the",
"given",
"map",
"based",
"on",
"the",
"transformation",
"steps",
"given",
"in",
"the",
"transformation",
"description",
".",
"It",
"analyzes",
"the",
"transformation",
"step",
"and",
"adds",
"the",
"target",
"of",
"the",
"transformation",
"step",... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java#L86-L112 | train |
openengsb/openengsb | components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java | PropertyConnectionCalculator.resolveTemporaryProperties | private void resolveTemporaryProperties(Map<String, Set<String>> map) {
boolean temporaryPresent = false;
do {
temporaryPresent = false;
for (Map.Entry<String, Set<String>> entry : map.entrySet()) {
Set<String> newProperties = new HashSet<String>();
... | java | private void resolveTemporaryProperties(Map<String, Set<String>> map) {
boolean temporaryPresent = false;
do {
temporaryPresent = false;
for (Map.Entry<String, Set<String>> entry : map.entrySet()) {
Set<String> newProperties = new HashSet<String>();
... | [
"private",
"void",
"resolveTemporaryProperties",
"(",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"map",
")",
"{",
"boolean",
"temporaryPresent",
"=",
"false",
";",
"do",
"{",
"temporaryPresent",
"=",
"false",
";",
"for",
"(",
"Map",
".",
... | Resolves the temporary properties of the given property map. It replaces the temporary properties in the values
of the given map with the values of the temporary property it replaces. This procedure is done until there are no
more temporary fields present in the values of the map. | [
"Resolves",
"the",
"temporary",
"properties",
"of",
"the",
"given",
"property",
"map",
".",
"It",
"replaces",
"the",
"temporary",
"properties",
"in",
"the",
"values",
"of",
"the",
"given",
"map",
"with",
"the",
"values",
"of",
"the",
"temporary",
"property",
... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java#L119-L138 | train |
openengsb/openengsb | components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java | PropertyConnectionCalculator.deleteTemporaryProperties | private void deleteTemporaryProperties(Map<String, Set<String>> map) {
Iterator<String> iterator = map.keySet().iterator();
while (iterator.hasNext()) {
String key = iterator.next();
if (isTemporaryProperty(key)) {
LOGGER.debug("Delete temporary field {} from the ... | java | private void deleteTemporaryProperties(Map<String, Set<String>> map) {
Iterator<String> iterator = map.keySet().iterator();
while (iterator.hasNext()) {
String key = iterator.next();
if (isTemporaryProperty(key)) {
LOGGER.debug("Delete temporary field {} from the ... | [
"private",
"void",
"deleteTemporaryProperties",
"(",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"map",
")",
"{",
"Iterator",
"<",
"String",
">",
"iterator",
"=",
"map",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
... | Iterates over the map entries and removes all temporary properties so that a clean map can be returned to the
user which is interested in the property connections. | [
"Iterates",
"over",
"the",
"map",
"entries",
"and",
"removes",
"all",
"temporary",
"properties",
"so",
"that",
"a",
"clean",
"map",
"can",
"be",
"returned",
"to",
"the",
"user",
"which",
"is",
"interested",
"in",
"the",
"property",
"connections",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/PropertyConnectionCalculator.java#L144-L153 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/frontend/Frontend.java | Frontend.loginAtStart | public static boolean loginAtStart() {
boolean loginAtStart = Application.getInstance().isLoginRequired() || Configuration.get("MjLoginAtStart", "false").equals("true");
if (loginAtStart && !Backend.getInstance().isAuthenticationActive()) {
throw new IllegalStateException("Login required but authorization is not... | java | public static boolean loginAtStart() {
boolean loginAtStart = Application.getInstance().isLoginRequired() || Configuration.get("MjLoginAtStart", "false").equals("true");
if (loginAtStart && !Backend.getInstance().isAuthenticationActive()) {
throw new IllegalStateException("Login required but authorization is not... | [
"public",
"static",
"boolean",
"loginAtStart",
"(",
")",
"{",
"boolean",
"loginAtStart",
"=",
"Application",
".",
"getInstance",
"(",
")",
".",
"isLoginRequired",
"(",
")",
"||",
"Configuration",
".",
"get",
"(",
"\"MjLoginAtStart\"",
",",
"\"false\"",
")",
".... | just a helper method for all frontends. Is it at the right place here? | [
"just",
"a",
"helper",
"method",
"for",
"all",
"frontends",
".",
"Is",
"it",
"at",
"the",
"right",
"place",
"here?"
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/Frontend.java#L54-L60 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/frontend/Frontend.java | Frontend.createInput | public Optional<Input<String>> createInput(int maxLength, InputType inputType, InputComponentListener changeListener) {
return Optional.empty();
} | java | public Optional<Input<String>> createInput(int maxLength, InputType inputType, InputComponentListener changeListener) {
return Optional.empty();
} | [
"public",
"Optional",
"<",
"Input",
"<",
"String",
">",
">",
"createInput",
"(",
"int",
"maxLength",
",",
"InputType",
"inputType",
",",
"InputComponentListener",
"changeListener",
")",
"{",
"return",
"Optional",
".",
"empty",
"(",
")",
";",
"}"
] | Frontends may or may not provide special Inputs. Even a single Frontend
can sometimes support those Inputs and sometimes not. For example a HTML
Frontend depends on the used Browser. Firefox and Microsoft didn't
support date and time Inputs for a long time. Also the used device or the
user preferences can influence whe... | [
"Frontends",
"may",
"or",
"may",
"not",
"provide",
"special",
"Inputs",
".",
"Even",
"a",
"single",
"Frontend",
"can",
"sometimes",
"support",
"those",
"Inputs",
"and",
"sometimes",
"not",
".",
"For",
"example",
"a",
"HTML",
"Frontend",
"depends",
"on",
"the... | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/Frontend.java#L98-L100 | train |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/repository/sql/SqlRepository.java | SqlRepository.clear | public void clear() {
List<AbstractTable<?>> tableList = new ArrayList<AbstractTable<?>>(tables.values());
for (AbstractTable<?> table : tableList) {
table.clear();
}
} | java | public void clear() {
List<AbstractTable<?>> tableList = new ArrayList<AbstractTable<?>>(tables.values());
for (AbstractTable<?> table : tableList) {
table.clear();
}
} | [
"public",
"void",
"clear",
"(",
")",
"{",
"List",
"<",
"AbstractTable",
"<",
"?",
">",
">",
"tableList",
"=",
"new",
"ArrayList",
"<",
"AbstractTable",
"<",
"?",
">",
">",
"(",
"tables",
".",
"values",
"(",
")",
")",
";",
"for",
"(",
"AbstractTable",... | Use with care. Removes all content of all tables. Should only
be used for JUnit tests. | [
"Use",
"with",
"care",
".",
"Removes",
"all",
"content",
"of",
"all",
"tables",
".",
"Should",
"only",
"be",
"used",
"for",
"JUnit",
"tests",
"."
] | f7c5461b2b47a10b383aee1e2f1f150f6773703b | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/repository/sql/SqlRepository.java#L217-L222 | train |
openengsb/openengsb | api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java | EDBObject.getObject | @SuppressWarnings("unchecked")
public <T> T getObject(String key, Class<T> clazz) {
EDBObjectEntry entry = get(key);
return entry == null ? null : (T) entry.getValue();
} | java | @SuppressWarnings("unchecked")
public <T> T getObject(String key, Class<T> clazz) {
EDBObjectEntry entry = get(key);
return entry == null ? null : (T) entry.getValue();
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"getObject",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"EDBObjectEntry",
"entry",
"=",
"get",
"(",
"key",
")",
";",
"return",
"entry",
"==",
... | Returns the value of the EDBObjectEntry for the given key, casted as the given class. Returns null if there is no
element for the given key, or the value for the given key is null. | [
"Returns",
"the",
"value",
"of",
"the",
"EDBObjectEntry",
"for",
"the",
"given",
"key",
"casted",
"as",
"the",
"given",
"class",
".",
"Returns",
"null",
"if",
"there",
"is",
"no",
"element",
"for",
"the",
"given",
"key",
"or",
"the",
"value",
"for",
"the... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java#L154-L158 | train |
openengsb/openengsb | api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java | EDBObject.isDeleted | public final Boolean isDeleted() {
Boolean deleted = getObject(DELETED_CONST, Boolean.class);
return deleted != null ? deleted : false;
} | java | public final Boolean isDeleted() {
Boolean deleted = getObject(DELETED_CONST, Boolean.class);
return deleted != null ? deleted : false;
} | [
"public",
"final",
"Boolean",
"isDeleted",
"(",
")",
"{",
"Boolean",
"deleted",
"=",
"getObject",
"(",
"DELETED_CONST",
",",
"Boolean",
".",
"class",
")",
";",
"return",
"deleted",
"!=",
"null",
"?",
"deleted",
":",
"false",
";",
"}"
] | Returns true if the object is deleted. | [
"Returns",
"true",
"if",
"the",
"object",
"is",
"deleted",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java#L163-L166 | train |
openengsb/openengsb | api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java | EDBObject.putEDBObjectEntry | public void putEDBObjectEntry(String key, Object value) {
putEDBObjectEntry(key, value, value.getClass());
} | java | public void putEDBObjectEntry(String key, Object value) {
putEDBObjectEntry(key, value, value.getClass());
} | [
"public",
"void",
"putEDBObjectEntry",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"putEDBObjectEntry",
"(",
"key",
",",
"value",
",",
"value",
".",
"getClass",
"(",
")",
")",
";",
"}"
] | Adds an EDBObjectEntry to this EDBObject. It uses the type of the given object value as type parameter | [
"Adds",
"an",
"EDBObjectEntry",
"to",
"this",
"EDBObject",
".",
"It",
"uses",
"the",
"type",
"of",
"the",
"given",
"object",
"value",
"as",
"type",
"parameter"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java#L192-L194 | train |
openengsb/openengsb | api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java | EDBObject.appendEntry | private void appendEntry(Map.Entry<String, EDBObjectEntry> entry, StringBuilder builder) {
if (builder.length() > 2) {
builder.append(",");
}
builder.append(" \"").append(entry.getKey()).append("\"");
builder.append(" : ").append(entry.getValue());
} | java | private void appendEntry(Map.Entry<String, EDBObjectEntry> entry, StringBuilder builder) {
if (builder.length() > 2) {
builder.append(",");
}
builder.append(" \"").append(entry.getKey()).append("\"");
builder.append(" : ").append(entry.getValue());
} | [
"private",
"void",
"appendEntry",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"EDBObjectEntry",
">",
"entry",
",",
"StringBuilder",
"builder",
")",
"{",
"if",
"(",
"builder",
".",
"length",
"(",
")",
">",
"2",
")",
"{",
"builder",
".",
"append",
"(",... | Analyzes the entry and write the specific information into the StringBuilder. | [
"Analyzes",
"the",
"entry",
"and",
"write",
"the",
"specific",
"information",
"into",
"the",
"StringBuilder",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java#L210-L216 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java | EDBUtils.convertJPAEntryToEDBObjectEntry | public static EDBObjectEntry convertJPAEntryToEDBObjectEntry(JPAEntry entry) {
for (EDBConverterStep step : steps) {
if (step.doesStepFit(entry.getType())) {
LOGGER.debug("EDBConverterStep {} fit for type {}", step.getClass().getName(), entry.getType());
return step.c... | java | public static EDBObjectEntry convertJPAEntryToEDBObjectEntry(JPAEntry entry) {
for (EDBConverterStep step : steps) {
if (step.doesStepFit(entry.getType())) {
LOGGER.debug("EDBConverterStep {} fit for type {}", step.getClass().getName(), entry.getType());
return step.c... | [
"public",
"static",
"EDBObjectEntry",
"convertJPAEntryToEDBObjectEntry",
"(",
"JPAEntry",
"entry",
")",
"{",
"for",
"(",
"EDBConverterStep",
"step",
":",
"steps",
")",
"{",
"if",
"(",
"step",
".",
"doesStepFit",
"(",
"entry",
".",
"getType",
"(",
")",
")",
"... | Converts a JPAEntry object into an EDBObjectEntry element. If there is a problem with the instantiation of the
type of the JPAEntry, the simple string object will be written in the resulting element. To instantiate the type
first the static method "valueOf" of the type will be tried. If that didn't work, then the const... | [
"Converts",
"a",
"JPAEntry",
"object",
"into",
"an",
"EDBObjectEntry",
"element",
".",
"If",
"there",
"is",
"a",
"problem",
"with",
"the",
"instantiation",
"of",
"the",
"type",
"of",
"the",
"JPAEntry",
"the",
"simple",
"string",
"object",
"will",
"be",
"writ... | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java#L48-L57 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java | EDBUtils.convertEDBObjectEntryToJPAEntry | public static JPAEntry convertEDBObjectEntryToJPAEntry(EDBObjectEntry entry, JPAObject owner) {
for (EDBConverterStep step : steps) {
if (step.doesStepFit(entry.getType())) {
LOGGER.debug("EDBConverterStep {} fit for type {}", step.getClass().getName(), entry.getType());
... | java | public static JPAEntry convertEDBObjectEntryToJPAEntry(EDBObjectEntry entry, JPAObject owner) {
for (EDBConverterStep step : steps) {
if (step.doesStepFit(entry.getType())) {
LOGGER.debug("EDBConverterStep {} fit for type {}", step.getClass().getName(), entry.getType());
... | [
"public",
"static",
"JPAEntry",
"convertEDBObjectEntryToJPAEntry",
"(",
"EDBObjectEntry",
"entry",
",",
"JPAObject",
"owner",
")",
"{",
"for",
"(",
"EDBConverterStep",
"step",
":",
"steps",
")",
"{",
"if",
"(",
"step",
".",
"doesStepFit",
"(",
"entry",
".",
"g... | Converts a JPAEntry object into an EDBObjectEntry. | [
"Converts",
"a",
"JPAEntry",
"object",
"into",
"an",
"EDBObjectEntry",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java#L62-L71 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java | EDBUtils.convertJPAObjectToEDBObject | public static EDBObject convertJPAObjectToEDBObject(JPAObject object) {
EDBObject result = new EDBObject(object.getOID());
for (JPAEntry kvp : object.getEntries()) {
EDBObjectEntry entry = convertJPAEntryToEDBObjectEntry(kvp);
result.put(entry.getKey(), entry);
}
... | java | public static EDBObject convertJPAObjectToEDBObject(JPAObject object) {
EDBObject result = new EDBObject(object.getOID());
for (JPAEntry kvp : object.getEntries()) {
EDBObjectEntry entry = convertJPAEntryToEDBObjectEntry(kvp);
result.put(entry.getKey(), entry);
}
... | [
"public",
"static",
"EDBObject",
"convertJPAObjectToEDBObject",
"(",
"JPAObject",
"object",
")",
"{",
"EDBObject",
"result",
"=",
"new",
"EDBObject",
"(",
"object",
".",
"getOID",
"(",
")",
")",
";",
"for",
"(",
"JPAEntry",
"kvp",
":",
"object",
".",
"getEnt... | Converts a JPAObject object into an EDBObject. | [
"Converts",
"a",
"JPAObject",
"object",
"into",
"an",
"EDBObject",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java#L76-L87 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java | EDBUtils.convertEDBObjectToJPAObject | public static JPAObject convertEDBObjectToJPAObject(EDBObject object) {
JPAObject result = new JPAObject();
result.setTimestamp(object.getTimestamp());
result.setOID(object.getOID());
result.setDeleted(object.isDeleted());
List<JPAEntry> entries = new ArrayList<JPAEntry>();
... | java | public static JPAObject convertEDBObjectToJPAObject(EDBObject object) {
JPAObject result = new JPAObject();
result.setTimestamp(object.getTimestamp());
result.setOID(object.getOID());
result.setDeleted(object.isDeleted());
List<JPAEntry> entries = new ArrayList<JPAEntry>();
... | [
"public",
"static",
"JPAObject",
"convertEDBObjectToJPAObject",
"(",
"EDBObject",
"object",
")",
"{",
"JPAObject",
"result",
"=",
"new",
"JPAObject",
"(",
")",
";",
"result",
".",
"setTimestamp",
"(",
"object",
".",
"getTimestamp",
"(",
")",
")",
";",
"result"... | Converts an EDBObject object into a JPAObject object. | [
"Converts",
"an",
"EDBObject",
"object",
"into",
"a",
"JPAObject",
"object",
"."
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java#L92-L103 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java | EDBUtils.convertEDBObjectsToJPAObjects | public static List<JPAObject> convertEDBObjectsToJPAObjects(List<EDBObject> objects) {
List<JPAObject> result = new ArrayList<JPAObject>();
for (EDBObject object : objects) {
result.add(convertEDBObjectToJPAObject(object));
}
return result;
} | java | public static List<JPAObject> convertEDBObjectsToJPAObjects(List<EDBObject> objects) {
List<JPAObject> result = new ArrayList<JPAObject>();
for (EDBObject object : objects) {
result.add(convertEDBObjectToJPAObject(object));
}
return result;
} | [
"public",
"static",
"List",
"<",
"JPAObject",
">",
"convertEDBObjectsToJPAObjects",
"(",
"List",
"<",
"EDBObject",
">",
"objects",
")",
"{",
"List",
"<",
"JPAObject",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"JPAObject",
">",
"(",
")",
";",
"for",
"(",... | Converts a list of EDBObjects into a list of JPAObjects | [
"Converts",
"a",
"list",
"of",
"EDBObjects",
"into",
"a",
"list",
"of",
"JPAObjects"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java#L108-L114 | train |
openengsb/openengsb | components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java | EDBUtils.convertJPAObjectsToEDBObjects | public static List<EDBObject> convertJPAObjectsToEDBObjects(List<JPAObject> objects) {
List<EDBObject> result = new ArrayList<EDBObject>();
for (JPAObject object : objects) {
result.add(convertJPAObjectToEDBObject(object));
}
return result;
} | java | public static List<EDBObject> convertJPAObjectsToEDBObjects(List<JPAObject> objects) {
List<EDBObject> result = new ArrayList<EDBObject>();
for (JPAObject object : objects) {
result.add(convertJPAObjectToEDBObject(object));
}
return result;
} | [
"public",
"static",
"List",
"<",
"EDBObject",
">",
"convertJPAObjectsToEDBObjects",
"(",
"List",
"<",
"JPAObject",
">",
"objects",
")",
"{",
"List",
"<",
"EDBObject",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"EDBObject",
">",
"(",
")",
";",
"for",
"(",... | Converts a list of JPAObjects into a list of EDBObjects | [
"Converts",
"a",
"list",
"of",
"JPAObjects",
"into",
"a",
"list",
"of",
"EDBObjects"
] | d39058000707f617cd405629f9bc7f17da7b414a | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/util/EDBUtils.java#L119-L125 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.