Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
24
24
repo
stringlengths
5
58
path
stringlengths
4
194
func_name
stringlengths
1
153
url
stringlengths
86
292
split
stringclasses
3 values
language
stringclasses
4 values
docstring
stringlengths
1
46.9k
code
stringlengths
52
485k
text
stringlengths
100
486k
token_count
int32
24
195k
doc_chars
int32
1
46.9k
code_chars
int32
52
485k
license_basis
stringclasses
2 values
source
stringclasses
1 value
added
stringdate
2026-12-05 00:00:00
2026-12-05 00:00:00
record_sha256
stringlengths
64
64
license
stringclasses
1 value
license_class
stringclasses
1 value
license_source
stringlengths
42
99
320e21f9fa56d1d96806da3f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java
EventStackImpl.pushEvent
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java#L99-L103
train
java
Pushes the event onto the event stack. This action must be performed immediately before the event is being dispatched. Additionally, after the event has been dispatched, it has to be {@link #popEvent(Event) popped} off the stack again. @param <L> Type of the listener. @param event The event which will be dispatched. @...
public <L extends Listener> void pushEvent(Event<?, L> event) { synchronized (this.stack) { this.stack.push(event); } }
Pushes the event onto the event stack. This action must be performed immediately before the event is being dispatched. Additionally, after the event has been dispatched, it has to be {@link #popEvent(Event) popped} off the stack again. @param <L> Type of the listener. @param event The event which will be dispatched. @...
110
340
151
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dd27a0aab25ce1c540d80386393c1c599b6c68c7a78a4d298af3677dbf3e9f05
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
eec3b29eff668a94661ec98c
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java
EventStackImpl.popEvent
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java#L114-L123
train
java
Pops the top event off the current event stack. This action has to be performed immediately after the event has been dispatched to all listeners. @param <L> Type of the listener. @param expected The Event which is expected at the top of the stack. @see #pushEvent(Event)
public <L extends Listener> void popEvent(Event<?, L> expected) { synchronized (this.stack) { final Event<?, ?> actual = this.stack.pop(); if (actual != expected) { throw new IllegalStateException(String.format( "Unbalanced pop: expected '%s' but e...
Pops the top event off the current event stack. This action has to be performed immediately after the event has been dispatched to all listeners. @param <L> Type of the listener. @param expected The Event which is expected at the top of the stack. @see #pushEvent(Event) public <L extends Listener> void popEvent(Event...
139
271
430
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a085abd8ee89b913f34c11645df5252a8985c77af70182c8ac70f66aef65c54f
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
15a65fa1ff5dc80329ab0d05
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java
AbstractSynchronizedListenerSource.modify
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java#L48-L55
train
java
Executes the given transaction within the context of a write lock. @param t The transaction to execute.
protected void modify(Transaction t) { try { this.lock.writeLock().lock(); t.perform(); } finally { this.lock.writeLock().unlock(); } }
Executes the given transaction within the context of a write lock. @param t The transaction to execute. protected void modify(Transaction t) { try { this.lock.writeLock().lock(); t.perform(); } finally { this.lock.writeLock().unlock(); } }
58
104
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a5976d8943be1fa4a1ea6f5269a616f0a5927f2a15a4038a896455890e892fd4
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
a323956323662fb79c98b38f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java
AbstractSynchronizedListenerSource.read
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java#L64-L71
train
java
Executes the given supplier within the context of a read lock. @param <E> The result type. @param sup The supplier. @return The result of {@link Supplier#get()}.
protected <E> E read(Supplier<E> sup) { try { this.lock.readLock().lock(); return sup.get(); } finally { this.lock.readLock().unlock(); } }
Executes the given supplier within the context of a read lock. @param <E> The result type. @param sup The supplier. @return The result of {@link Supplier#get()}. protected <E> E read(Supplier<E> sup) { try { this.lock.readLock().lock(); return sup.get(); } finally { ...
81
162
203
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4bfc67898d64af1cce30e0f0ac14ab6a5878d2b4a7696b8645ebd0257db22570
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
3e249e1bbb9da4a0c5f9f72c
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java
ExceptionCallbacks.ignore
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java#L28-L35
train
java
The default {@link ExceptionCallback} which simply logs any failure but takes no further action. @return The callback.
public static ExceptionCallback ignore() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { FailedEventInvocation.log(LOG, invocation); } }; }
The default {@link ExceptionCallback} which simply logs any failure but takes no further action. @return The callback. public static ExceptionCallback ignore() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { FailedE...
67
119
266
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3d1097125705f8ef4154d037c34c8fec65affc87fa06dd9833768fbed473253b
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
2f6110412a262150e67e477f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java
ExceptionCallbacks.stopOnError
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java#L44-L52
train
java
The callback will set the Event's {@link Event#isHandled() handled} flag to <code>true</code> to gracefully stop the delegation process when an exception occurs. Like {@link #ignore()}, the exception will be logged. @return The callback.
public static ExceptionCallback stopOnError() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { FailedEventInvocation.log(LOG, invocation); invocation.getEvent().setHandled(true); } }...
The callback will set the Event's {@link Event#isHandled() handled} flag to <code>true</code> to gracefully stop the delegation process when an exception occurs. Like {@link #ignore()}, the exception will be logged. @return The callback. public static ExceptionCallback stopOnError() { return new ExceptionCall...
107
238
327
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
df300f072e64838178613ba2c4e339823a697305f236c301bc4151ff59fad346
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
1fc7c4cf2ba6bdd09f6b780f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java
ExceptionCallbacks.failOnError
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java#L61-L68
train
java
The callback will convert the occurred exception into an {@link AbortionException} and then throw it. This stops the delegation process with delegating the exception to the dispatcher of the event. @return The callback.
public static ExceptionCallback failOnError() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { throw new AbortionException(invocation.getException()); } }; }
The callback will convert the occurred exception into an {@link AbortionException} and then throw it. This stops the delegation process with delegating the exception to the dispatcher of the event. @return The callback. public static ExceptionCallback failOnError() { return new ExceptionCallback() { ...
90
220
283
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9238730ff7d0d7944ca51c119f5a783d3a320104b985fa93a8bf2bcd5f79229c
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
ff5c631cda16f34cdb471fb7
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/Event.java
Event.getValue
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/Event.java#L120-L126
train
java
Returns a value that has been stored using {@link #setValue(String, Object)}. As this method is generic, the value will automatically be casted to the target type of the expression in which this method is called. So this method has to be used with caution in respect to type safety. @param <E> Type of the resulting val...
@SuppressWarnings("unchecked") public <E> Optional<E> getValue(String key) { if (this.properties == null) { return Optional.empty(); } return Optional.ofNullable((E) getProperties().get(key)); }
Returns a value that has been stored using {@link #setValue(String, Object)}. As this method is generic, the value will automatically be casted to the target type of the expression in which this method is called. So this method has to be used with caution in respect to type safety. @param <E> Type of the resulting val...
163
481
238
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8c6b34c81a3641f755e87dc2ae22fefec89609996caf2159845eaa46e9993aa5
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
f812356ce50e4ae6a80ed2c2
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/Event.java
Event.getValueAs
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/Event.java#L139-L144
train
java
Returns a value that has been stored using {@link #setValue(String, Object)}. The value will be casted to the given type. @param <E> Type of the resulting value. @param key The key of the value to retrieve. @param type The type that the value will be casted to. @return The value or an empty optional if the value does ...
public <E> Optional<E> getValueAs(String key, Class<E> type) { if (this.properties == null) { return Optional.empty(); } return Optional.ofNullable(type.cast(getProperties().get(key))); }
Returns a value that has been stored using {@link #setValue(String, Object)}. The value will be casted to the given type. @param <E> Type of the resulting value. @param key The key of the value to retrieve. @param type The type that the value will be casted to. @return The value or an empty optional if the value does ...
131
353
227
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
131c7d788b46bc56cfd2cb33b8647873fd0557943a8c06a7cda96cb019aaf0d2
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
ea285bda41f5683dfad294a6
skuzzle/jeve
jeve/src/it/java/de/skuzzle/jeve/SynchronousEventProviderIT.java
SynchronousEventProviderIT.getParameters
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/it/java/de/skuzzle/jeve/SynchronousEventProviderIT.java#L29-L41
train
java
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}.
@Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends EventProvider>) SequentialEventProvider::new, (Supplier<ListenerStore>) DefaultListenerStore::create ...
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}. @Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends Ev...
122
121
605
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea671a0819c3b28cc03d52c0992926d103827f39f041472f8ff3160b18f22214
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
6ab894d0055095482cf9d3ad
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/AbstractListenerStore.java
AbstractListenerStore.copyList
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/AbstractListenerStore.java#L66-L74
train
java
Creates a collection from the given stream, casting each object to the provided listener class. The returned collection must not necessarily be mutable. @param <T> Type of the listeners in the given list. @param listenerClass The class of the objects in the provided list. @param listeners The stream to obtain the list...
protected <T extends Listener> Collection<T> copyList(Class<T> listenerClass, Stream<Object> listeners, int sizeHint) { if (sizeHint == 0) { return Collections.emptyList(); } return listeners .map(listenerClass::cast) .collect(Collectors.to...
Creates a collection from the given stream, casting each object to the provided listener class. The returned collection must not necessarily be mutable. @param <T> Type of the listeners in the given list. @param listenerClass The class of the objects in the provided list. @param listeners The stream to obtain the list...
160
445
371
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
668782d67481d5c1451dbcec0ea63d715002b353c0bde54a188080d5dbbb49a8
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
f90321a14c7609948f178fcb
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/DefaultListenerStoreImpl.java
DefaultListenerStoreImpl.removeInternal
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/DefaultListenerStoreImpl.java#L142-L150
train
java
Internal method for removing a single listener and notifying it about the removal. Prior to calling this method, the passed iterators {@link Iterator#hasNext() hasNext} method must hold <code>true</code>. @param <T> Type of the listener to remove @param listenerClass The class of the listener to remove. @param it Iter...
@Deprecated protected <T extends Listener> void removeInternal(Class<T> listenerClass, Iterator<Object> it) { final Object next = it.next(); final T listener = listenerClass.cast(next); it.remove(); final RegistrationEvent e = new RegistrationEvent(this, listenerClass); ...
Internal method for removing a single listener and notifying it about the removal. Prior to calling this method, the passed iterators {@link Iterator#hasNext() hasNext} method must hold <code>true</code>. @param <T> Type of the listener to remove @param listenerClass The class of the listener to remove. @param it Iter...
179
472
358
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
126fe82b86435c0d1865e2c56108e1251babfebd0d8fa35482d1cb47e1104818
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
297a095d52945338db7f8f3c
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/FailureCollector.java
FailureCollector.getFailedInvocations
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/FailureCollector.java#L77-L84
train
java
Gets the list of failed invocations that has been collected by this collector. @return The failed invocations.
public List<FailedEventInvocation> getFailedInvocations() { synchronized (this.mutex) { if (this.failedEvents == null) { return Collections.emptyList(); } return Collections.unmodifiableList(this.failedEvents); } }
Gets the list of failed invocations that has been collected by this collector. @return The failed invocations. public List<FailedEventInvocation> getFailedInvocations() { synchronized (this.mutex) { if (this.failedEvents == null) { return Collections.emptyList(); } ...
72
111
286
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ce454950279d960307a255c572aa4e88a092f128447e68d19259e25a9f2fae70
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
4b4884b07676a9dfe829423a
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.setEventStack
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L70-L75
train
java
Sets the EventStack which is used while this event is dispatched. This method will be called by the {@link SequentialEventProvider} right before dispatching this event. The stack is only set once, subsequent calls will have no effect. @param eventStack The current event stack.
public void setEventStack(EventStack eventStack) { if (this.eventStack == null) { this.eventStack = eventStack; this.cause = eventStack.peek(); } }
Sets the EventStack which is used while this event is dispatched. This method will be called by the {@link SequentialEventProvider} right before dispatching this event. The stack is only set once, subsequent calls will have no effect. @param eventStack The current event stack. public void setEventStack(EventStack eve...
100
278
191
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
815d4ffa71b0e766c50c93e40709c07e4bb1dc7815da4e7c02e5b113a321f3a1
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
49b29164e54bd843af837b90
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.addSuppressedEvent
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L109-L116
train
java
Adds a {@linkplain SuppressedEvent} to the set of suppressed events of this Event. If a capable EventProvider determines that a certain event has been prevented because its listener class has been registered on this event using {@link #preventCascade(Class)}, then the prevented event is registered here using this metho...
public void addSuppressedEvent(SuppressedEvent e) { if (e == null) { throw new IllegalArgumentException("e is null"); } else if (this.suppressedEvents == null) { this.suppressedEvents = new HashSet<>(); } this.suppressedEvents.add(e); }
Adds a {@linkplain SuppressedEvent} to the set of suppressed events of this Event. If a capable EventProvider determines that a certain event has been prevented because its listener class has been registered on this event using {@link #preventCascade(Class)}, then the prevented event is registered here using this metho...
148
418
296
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3ff84082a1ecb5ddfcfda3591f2a0de937e6f9ac57cfa16ce7309b028fefc939
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
b99d9c0a033429d4695a89a0
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.getSuppressedEvents
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L124-L129
train
java
Gets a read-only set of the suppressed events that have been registered at this event using {@link #addSuppressedEvent(SuppressedEvent)}. @return The suppressed events.
public Set<SuppressedEvent> getSuppressedEvents() { if (this.suppressedEvents == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(this.suppressedEvents); }
Gets a read-only set of the suppressed events that have been registered at this event using {@link #addSuppressedEvent(SuppressedEvent)}. @return The suppressed events. public Set<SuppressedEvent> getSuppressedEvents() { if (this.suppressedEvents == null) { return Collections.emptySet(); }...
81
169
222
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e1a8ba4ffd635d84e6b787f815f594c7470d8e84d1689e449d11b6fe04e7d274
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
87ab05f090bea24c39730306
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.preventCascade
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L145-L161
train
java
Prevents to dispatch events to the given listener class while this event is being dispatched. This is only supported when dispatching this event with an EventProvider which supports the {@link EventStack}. <p> Note: this method has to be called before this event is being dispatched. If called during dispatch, it will ...
public <E extends Listener> void preventCascade(Class<E> listenerClass) { if (listenerClass == null) { throw new IllegalArgumentException("listenerClass is null"); } else if (this.eventStack != null) { // this event is currently being dispatched, so adding a prevented ...
Prevents to dispatch events to the given listener class while this event is being dispatched. This is only supported when dispatching this event with an EventProvider which supports the {@link EventStack}. <p> Note: this method has to be called before this event is being dispatched. If called during dispatch, it will ...
254
470
854
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
27f5bf3a86a0bc1b1f878acb227cf15e71107e5e7aac346692cbd2532001ee9d
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
1af510731afac6276fb0b05f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.getPrevented
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L182-L187
train
java
Gets the listener classes to which dispatching should be prevented while this event is being dispatched. @return The listener classes marked to prevent. @see #preventCascade(Class)
public Set<Class<?>> getPrevented() { if (this.prevent == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(this.prevent); }
Gets the listener classes to which dispatching should be prevented while this event is being dispatched. @return The listener classes marked to prevent. @see #preventCascade(Class) public Set<Class<?>> getPrevented() { if (this.prevent == null) { return Collections.emptySet(); } re...
71
181
190
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
aaf1dffe7a033221e48f6edd96388d02bbaa3e4302a4b0b5c58bb297cff0b0d2
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
dd55c46307c64e8fdb979ca8
skuzzle/jeve
jeve/src/it/java/de/skuzzle/jeve/ThreadedEventProviderIT.java
ThreadedEventProviderIT.getParameters
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/it/java/de/skuzzle/jeve/ThreadedEventProviderIT.java#L43-L70
train
java
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}.
@Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends EventProvider>) ParallelEventProvider::new, (Supplier<ListenerStore>) () -> DefaultListenerStore.crea...
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}. @Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends Ev...
327
121
1,818
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b58f2d66d3c9d315db6841d0091ac31d42662d481f33e3da76f3b102daab6395
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
16992f9fd691277c712f0ddd
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/AbstractSphereObstacle.java
AbstractSphereObstacle.intersectionVolume
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/AbstractSphereObstacle.java#L87-L118
train
java
For 2D: Implements formula 14 of http://mathworld.wolfram.com/Circle-CircleIntersection.html For 3D: Implements formula 16 of http://mathworld.wolfram.com/Sphere-SphereIntersection.html
public double intersectionVolume(AbstractSphereObstacle o) { if(dimension != o.getDimension()){ throw new IllegalArgumentException("Obstacles have different dimensions"); } double result = 0; double distance = 0; for(int i = 0; i < dimension; i++){ distance += Math.pow(position[i]-o.getPosition()[i],...
For 2D: Implements formula 14 of http://mathworld.wolfram.com/Circle-CircleIntersection.html For 3D: Implements formula 16 of http://mathworld.wolfram.com/Sphere-SphereIntersection.html public double intersectionVolume(AbstractSphereObstacle o) { if(dimension != o.getDimension()){ throw new IllegalArgumentExce...
357
185
902
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ef5fef1d135c54f62ced21baa4e4e3173eddb7b6acbfc809e6e052fed789f2a4
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
e75b61453029afd75db94ea3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/drift/StaticDriftCalculator.java
StaticDriftCalculator.calculateDrift
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/drift/StaticDriftCalculator.java#L40-L64
train
java
Calculates the static drift. Static means, that the drift does not change direction or intensity over time. @param tracks Tracks which seems to exhibit a local drift @return The static drift over all trajectories
public double[] calculateDrift(ArrayList<T> tracks){ double[] result = new double[3]; double sumX =0; double sumY = 0; double sumZ = 0; int N=0; for(int i = 0; i < tracks.size(); i++){ T t = tracks.get(i); TrajectoryValidIndexTimelagIterator it = new TrajectoryValidIndexTimelagIterator(t,1); /...
Calculates the static drift. Static means, that the drift does not change direction or intensity over time. @param tracks Tracks which seems to exhibit a local drift @return The static drift over all trajectories public double[] calculateDrift(ArrayList<T> tracks){ double[] result = new double[3]; double sumX ...
269
213
624
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bc420d752a1c6e4ff8f7ab3cf4f86981a697af6b5a165b5869b9032471ecc272
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
1de6b476066033af26296fa5
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/ConfinedDiffusionSimulator.java
ConfinedDiffusionSimulator.nextConfinedPosition
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/ConfinedDiffusionSimulator.java#L73-L95
train
java
Simulates a single step (for dt) of a confined diffusion inside of a circle. Therefore each step is split up in N substeps. A substep which collidates with an object is set to the previous position. @param Nsub number of substeps @return
private Point3d nextConfinedPosition(Point3d lastPosition){ double timelagSub = timelag / numberOfSubsteps; Point3d center = new Point3d(0, 0, 0); Point3d lastValidPosition = lastPosition; int validSteps = 0; while(validSteps<numberOfSubsteps){ double u = r.nextDouble(); double steplength = Math.sqrt...
Simulates a single step (for dt) of a confined diffusion inside of a circle. Therefore each step is split up in N substeps. A substep which collidates with an object is set to the previous position. @param Nsub number of substeps @return private Point3d nextConfinedPosition(Point3d lastPosition){ double timelagSu...
247
237
680
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
42f6c5df0276ff204848e027e4403c54a2c39dbecb555ca57becfa2f0fe09aa2
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
5e2760cd7063ac23cfde5ff0
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/SimulationUtil.java
SimulationUtil.addPositionNoise
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/SimulationUtil.java#L45-L70
train
java
Adds position noise to the trajectories @param t @param sd @return trajectory with position noise
public static Trajectory addPositionNoise(Trajectory t, double sd){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); Trajectory newt = new Trajectory(t.getDimension()); for(int i = 0; i < t.size(); i++){ newt.add(t.get(i)); for(int j = 1; j <= t.getDimension(); j++){ switc...
Adds position noise to the trajectories @param t @param sd @return trajectory with position noise public static Trajectory addPositionNoise(Trajectory t, double sd){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); Trajectory newt = new Trajectory(t.getDimension()); for(int i = 0; ...
222
97
643
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
84df779efc6ad2a276ca5f4f8681299f8949e0e564406d01e299da46b6067dfb
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
bfc27c482ed614832cc1a64e
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/ConfinedDiffusionMSDCurveFit.java
ConfinedDiffusionMSDCurveFit.doFit
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/ConfinedDiffusionMSDCurveFit.java#L65-L94
train
java
Fits the curve y = a*(1-b*exp((-4*D)*(x/a)*c)) to the x- and y data. The parameters have the follow meaning: @param xdata @param ydata
public void doFit(double[] xdata, double[] ydata, boolean reduced){ CurveFitter fitter = new CurveFitter(xdata, ydata); if(reduced==false){ double ia = Double.isNaN(initA)?0:initA; double ib = Double.isNaN(initB)?0:initB; double ic = Double.isNaN(initC)?0:initC; double id = Double.isNaN(initD)?0:i...
Fits the curve y = a*(1-b*exp((-4*D)*(x/a)*c)) to the x- and y data. The parameters have the follow meaning: @param xdata @param ydata public void doFit(double[] xdata, double[] ydata, boolean reduced){ CurveFitter fitter = new CurveFitter(xdata, ydata); if(reduced==false){ double ia = Double.isNaN(initA)?0...
474
135
1,387
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3e195be260dd7ca72044f488225903e8a9517ea3e43574d01507142fca22d240
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
31cd7d02e1646419bba9f95f
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.calculateSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L107-L501
train
java
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline
public PolynomialSplineFunction calculateSpline(){ successfull= false; /* * 1.Calculate the minimum bounding rectangle */ ArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>(); for(int i = 0; i < t.size(); i++){ Point2D.Double p = new Point2D.Double(); p.setLocation(t.get(i).x, t.get...
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline public Polynom...
4,060
304
12,981
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b1b9448f821e7ac2d3b40f11a0960a7b21939933d2dddf70511b0b53dd09d5d1
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
410999b77e5f644f2a1745ec
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.distancePointLine
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L517-L530
train
java
Please see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_formula and http://mathworld.wolfram.com/Two-PointForm.html @param p1 First point on line @param p2 Second point on line @param p Point for which the distance should be calculated. @return distance of p to line defined by p1&p2
public double distancePointLine(Point2D.Double p1,Point2D.Double p2,Point2D.Double p){ double d; double m = (p2.y-p1.y)/(p2.x-p1.x); if(Double.isInfinite(m)) { d = Math.abs(p2.x-p.x); } else{ double k = -1*m*p1.x+p1.y; d = Math.sqrt( Math.pow( (p.x+m*p.y-m*k)/(m*m+1)-p.x , 2) + Math.pow( m*( (p...
Please see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_formula and http://mathworld.wolfram.com/Two-PointForm.html @param p1 First point on line @param p2 Second point on line @param p Point for which the distance should be calculated. @return distance of p to line defined by p1&p2 public do...
235
308
374
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bec87cd9e3b150f11fbb17759299fe4c84edfa9650f81eb7a02ab8e3a7911555
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
35fec672a0c34c2f7860b9d2
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.minDistancePointSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L538-L560
train
java
Finds to a given point p the point on the spline with minimum distance. @param p Point where the nearest distance is searched for @param nPointsPerSegment Number of interpolation points between two support points @return Point spline which has the minimum distance to p
public Point2D.Double minDistancePointSpline(Point2D.Double p, int nPointsPerSegment){ double minDistance = Double.MAX_VALUE; Point2D.Double minDistancePoint = null; int numberOfSplines = spline.getN(); double[] knots = spline.getKnots(); for(int i = 0; i < numberOfSplines; i++){ double x...
Finds to a given point p the point on the spline with minimum distance. @param p Point where the nearest distance is searched for @param nPointsPerSegment Number of interpolation points between two support points @return Point spline which has the minimum distance to p public Point2D.Double minDistancePointSpline(Poin...
250
269
768
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cfc2404adc0d60baf2071c02ab61b81c76380db140da004bfcea12092704e559
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
5f79518874215f28d37bc43b
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.showTrajectoryAndSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L604-L658
train
java
Plots the rotated trajectory, spline and support points.
public void showTrajectoryAndSpline(){ if(t.getDimension()==2){ double[] xData = new double[rotatedTrajectory.size()]; double[] yData = new double[rotatedTrajectory.size()]; for(int i = 0; i < rotatedTrajectory.size(); i++){ xData[i] = rotatedTrajectory.get(i).x; yData[i] = rotatedTra...
Plots the rotated trajectory, spline and support points. public void showTrajectoryAndSpline(){ if(t.getDimension()==2){ double[] xData = new double[rotatedTrajectory.size()]; double[] yData = new double[rotatedTrajectory.size()]; for(int i = 0; i < rotatedTrajectory.size(); i++){ xData[i] ...
549
56
2,024
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b84cedd2a1c5a7f23b88dce870a57da84d8127bc3511f0af86104e5e9292749c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
c4141d11eb1c71c720138cf7
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java
BoundednessFeature.calculateBoundedness
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java#L36-L41
train
java
Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps. @param D diffusion coefficient @param N Number of steps @param timelag Timelag @param confRadius Confinement radius @return Boundedness value
public static double calculateBoundedness(double D, int N, double timelag, double confRadius){ double r = confRadius; double cov_area = a(N)*D*timelag; double res = cov_area/(4*r*r); return res; }
Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps. @param D diffusion coefficient @param N Number of steps @param timelag Timelag @param confRadius Confinement radius @return Boundedness value public static double calculateBoundedness(double D, int N, doubl...
115
254
205
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
86e90ea6bbe3d7f12b31a9276ca2da151e6ed3fc35107b4f9c387df25472e11c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
506e5bce9c0877f58b0667f3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java
BoundednessFeature.getRadiusToBoundedness
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java#L51-L55
train
java
Calculates the radius to a given boundedness value @param D Diffusion coefficient @param N Number of steps @param timelag Timelag @param B Boundedeness @return Confinement radius
public static double getRadiusToBoundedness(double D, int N, double timelag, double B){ double cov_area = a(N)*D*timelag; double radius = Math.sqrt(cov_area/(4*B)); return radius; }
Calculates the radius to a given boundedness value @param D Diffusion coefficient @param N Number of steps @param timelag Timelag @param B Boundedeness @return Confinement radius public static double getRadiusToBoundedness(double D, int N, double timelag, double B){ double cov_area = a(N)*D*timelag; double radius ...
99
178
188
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b3736afbff72d424c15fe40a3788c1e8b64975da8d3e591d7e38ca3419cd71a0
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
092acae2e348a398f928c570
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/AnomalousDiffusionScene.java
AnomalousDiffusionScene.estimateExcludedVolumeFraction
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/AnomalousDiffusionScene.java#L71-L97
train
java
Estimate excluded volume fraction by monte carlo method @return excluded volume fraction
public double estimateExcludedVolumeFraction(){ //Calculate volume/area of the of the scene without obstacles if(recalculateVolumeFraction){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); boolean firstRandomDraw = false; if(randomNumbers==null){ randomNumbers = new double[...
Estimate excluded volume fraction by monte carlo method @return excluded volume fraction public double estimateExcludedVolumeFraction(){ //Calculate volume/area of the of the scene without obstacles if(recalculateVolumeFraction){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); bo...
234
88
846
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9d4641aaa7ae0a961a0f6a66c2947af44699247debb71de9c789778f43e46947
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
96e6403e44348e638e54d2fd
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getTrajectoryChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L56-L74
train
java
Plots the trajectory @param title Title of the plot @param t Trajectory to be plotted
public static Chart getTrajectoryChart(String title, Trajectory t){ if(t.getDimension()==2){ double[] xData = new double[t.size()]; double[] yData = new double[t.size()]; for(int i = 0; i < t.size(); i++){ xData[i] = t.get(i).x; yData[i] = t.get(i).y; } // Create Char...
Plots the trajectory @param title Title of the plot @param t Trajectory to be plotted public static Chart getTrajectoryChart(String title, Trajectory t){ if(t.getDimension()==2){ double[] xData = new double[t.size()]; double[] yData = new double[t.size()]; for(int i = 0; i < t.size(); i++){ xD...
179
85
542
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b27e956076b9c07e7136de44d8ec91343ab19796a3921649671ab58e26c87e87
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
e1a93c8d1d85519dd2c12b03
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L91-L112
train
java
Plots the MSD curve for trajectory t @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment
public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax, AbstractMeanSquaredDisplacmentEvaluator msdeval) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; msdeval.setTrajectory(t); msdeval.setTimelag(lagMin); for (int i = lagMin; i < la...
Plots the MSD curve for trajectory t @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment public st...
319
309
651
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
07ae44220770f2e06f1b7140211884e5df5712978e3c61eb093801e23034058d
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
455e83f31a95c1a48b71baee
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithConfinedModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L125-L156
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above. @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @pa...
public static Chart getMSDLineWithConfinedModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double a, double b, double c, double d) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanS...
Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above. @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @pa...
528
474
1,113
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b9c71c29c36e9e23b5ecd82d6a8180f79ab12921e350049e425743ba1045120e
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
319ef930e386756ba8e883c9
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithPowerModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L167-L193
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time betwe...
public static Chart getMSDLineWithPowerModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double a, double D) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanSquaredDisplacmentFeatur...
Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time betwe...
430
410
916
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a71446b9b1cdf7791b81b7da9fc0ed33ce93916a685865ba4fee43b6d4ee2edd
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
1411ab50c136ec6e387bcd36
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithFreeModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L204-L230
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between two fram...
public static Chart getMSDLineWithFreeModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double diffusionCoefficient, double intercept) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; Me...
Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between two fram...
436
390
989
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cf3f9783b86497c518ac1365f145c13a692da1c06093617a4080660e75584f56
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
21309dbb20c7db6b008628fe
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithActiveTransportModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L241-L267
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between t...
public static Chart getMSDLineWithActiveTransportModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double diffusionCoefficient, double velocity) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin ...
Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between t...
460
429
1,029
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3d3707ad9d5b8b6652e749bace2cb1eca0b11f54a9a49bead1826e777862d67c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
09870c5e3faefd3738c4337c
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L276-L304
train
java
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment
public static Chart getMSDLineChart(ArrayList<? extends Trajectory> t, int lagMin, int lagMax, AbstractMeanSquaredDisplacmentEvaluator msdeval) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; for (int j = lagMin; j < lagMax + 1; j++) { double msd = 0; ...
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment public sta...
371
308
792
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bd15068d7251978aa8dce2bfbe16aad735564e65dab3063c6e1e2ca3a112f0bb
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6b1501ddd76e7b7ae72ca2bb
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L312-L315
train
java
Plots the MSD curve for trajectory t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) { return getMSDLineChart(t, lagMin, lagMax, new MeanSquaredDisplacmentFeature(t, lagMin)); }
Plots the MSD curve for trajectory t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) { ...
132
240
173
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
51c133c73900efc31ef1fd785553afea9c2ca6bfea513b4086d19cfc22d243d3
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
4a5384cd1d4161adc58c1a8f
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L323-L327
train
java
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
public static Chart getMSDLineChart(ArrayList<Trajectory> t, int lagMin, int lagMax) { return getMSDLineChart(t, lagMin, lagMax, new MeanSquaredDisplacmentFeature(t.get(0), lagMin)); }
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds public static Chart getMSDLineChart(ArrayList<Trajectory> t, int...
139
254
194
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3026ffd065ab438ef7c19cc049920c19f46fbc603f3fe7b924191c6d2a25bc6d
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
2f39ab797b414178f106a037
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.plotCharts
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L341-L366
train
java
Plots a list of charts in matrix with 2 columns. @param charts
public static void plotCharts(List<Chart> charts){ int numRows =1; int numCols =1; if(charts.size()>1){ numRows = (int) Math.ceil(charts.size()/2.0); numCols = 2; } final JFrame frame = new JFrame(""); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.getContentPane().setLay...
Plots a list of charts in matrix with 2 columns. @param charts public static void plotCharts(List<Chart> charts){ int numRows =1; int numCols =1; if(charts.size()>1){ numRows = (int) Math.ceil(charts.size()/2.0); numCols = 2; } final JFrame frame = new JFrame(""); frame.setDefaultCloseOperat...
183
62
758
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
061113f20f78407212ed8154d45147c16649eb972b60ed136dccb45035c1f340
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
ab6bad9160cfec689b678a33
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryValidIndexTimelagIterator.java
TrajectoryValidIndexTimelagIterator.next
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryValidIndexTimelagIterator.java#L81-L98
train
java
Give next index i where i and i+timelag is valid
public Integer next() { for(int i = currentIndex; i < t.size(); i++){ if(i+timelag>=t.size()){ return null; } if((t.get(i) != null) && (t.get(i+timelag) != null)){ if(overlap){ currentIndex = i+1; } else{ currentIndex = i+timelag; } return i; } } return null; }
Give next index i where i and i+timelag is valid public Integer next() { for(int i = currentIndex; i < t.size(); i++){ if(i+timelag>=t.size()){ return null; } if((t.get(i) != null) && (t.get(i+timelag) != null)){ if(overlap){ currentIndex = i+1; } else{ currentIndex = i+timelag; ...
124
48
317
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ba476f351b92e7c636bb83796d69ba4dfee49357a8418319b32954fd40d2f28b
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6332493e7619204772ebe0c7
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/Trajectory.java
Trajectory.subList
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/Trajectory.java#L79-L87
train
java
Generates a sub-trajectory
@Override public Trajectory subList(int fromIndex, int toIndex) { Trajectory t = new Trajectory(dimension); for(int i = fromIndex; i < toIndex; i++){ t.add(this.get(i)); } return t; }
Generates a sub-trajectory @Override public Trajectory subList(int fromIndex, int toIndex) { Trajectory t = new Trajectory(dimension); for(int i = fromIndex; i < toIndex; i++){ t.add(this.get(i)); } return t; }
67
26
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
495345590e1f4a1d56d4baecee091b8b829537bfc22c2ed3bd5c3bcfd4b73b9c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
b1e7293e6f887e9a7b591865
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/Trajectory.java
Trajectory.getPositionsAsArray
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/Trajectory.java#L117-L130
train
java
Converts the positions to a 2D double array @return 2d double array [i][j], i=Time index, j=coordinate index
public double[][] getPositionsAsArray(){ double[][] posAsArr = new double[size()][3]; for(int i = 0; i < size(); i++){ if(get(i)!=null){ posAsArr[i][0] = get(i).x; posAsArr[i][1] = get(i).y; posAsArr[i][2] = get(i).z; } else{ posAsArr[i] = null; } } return posAsArr; }
Converts the positions to a 2D double array @return 2d double array [i][j], i=Time index, j=coordinate index public double[][] getPositionsAsArray(){ double[][] posAsArr = new double[size()][3]; for(int i = 0; i < size(); i++){ if(get(i)!=null){ posAsArr[i][0] = get(i).x; posAsArr[i][1] = get(i).y; ...
146
108
305
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f469466b70d3b94c100c75b962b3d896ff45062ad5c44d9f2a68f4c7ccc08347
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
31493d75a070c819f1863b6b
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/Trajectory.java
Trajectory.scale
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/Trajectory.java#L160-L164
train
java
Multiplies all positions with a factor v @param v Multiplication factor
public void scale(double v){ for(int i = 0; i < this.size(); i++){ this.get(i).scale(v);; } }
Multiplies all positions with a factor v @param v Multiplication factor public void scale(double v){ for(int i = 0; i < this.size(); i++){ this.get(i).scale(v);; } }
49
71
101
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f982648386e1af290f4726041671e77d1741d41ac1d19c6a07beb5565b49b3bc
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
2eb9b5289becf8c27db5abb3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFitLegacy.java
TrajectorySplineFitLegacy.calculateSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFitLegacy.java#L105-L495
train
java
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline
public PolynomialSplineFunction calculateSpline(){ /* * 1.Calculate the minimum bounding rectangle */ ArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>(); for(int i = 0; i < t.size(); i++){ Point2D.Double p = new Point2D.Double(); p.setLocation(t.get(i).x, t.get(i).y); points.a...
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline public Polynom...
4,007
304
12,757
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea21f3133df2e61b2e9f1530ddb95a706a4fc3cc5679e8bf75b8deeb1333044a
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
c534245a17f6cf2d6703e9f3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/RadiusGyrationTensor2D.java
RadiusGyrationTensor2D.getRadiusOfGyrationTensor
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/RadiusGyrationTensor2D.java#L56-L90
train
java
Calculates the radius of gyration tensor according to formula (6.3) in ELEMENTS OF THE RANDOM WALK by Rudnick and Gaspari @return Radius of gyration tensor
public static Array2DRowRealMatrix getRadiusOfGyrationTensor(Trajectory t){ double meanx =0; double meany =0; for(int i = 0; i < t.size(); i++){ meanx+= t.get(i).x; meany+= t.get(i).y; } meanx = meanx/t.size(); meany = meany/t.size(); double e11 = 0; double e12 = 0; double e21 = 0; double e...
Calculates the radius of gyration tensor according to formula (6.3) in ELEMENTS OF THE RANDOM WALK by Rudnick and Gaspari @return Radius of gyration tensor public static Array2DRowRealMatrix getRadiusOfGyrationTensor(Trajectory t){ double meanx =0; double meany =0; for(int i = 0; i < t.size(); i++){ meanx+=...
372
157
830
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f9d84f36580cbda20fe77d6419029c68cd23356a8dc2f1d402ceb8c2f5a9119f
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
3d716bc61da192a027334dcb
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java
StokesEinsteinConverter.convert
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java#L44-L46
train
java
Converters the diffusion coefficient to hydrodynamic diameter and vice versa @param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m] @param temperatur Temperatur in [Kelvin] @param viscosity Viscosity in [kg m^-1 s^-1] @return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1]
public double convert(double value, double temperatur, double viscosity){ return temperatur*kB / (Math.PI*viscosity*value); }
Converters the diffusion coefficient to hydrodynamic diameter and vice versa @param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m] @param temperatur Temperatur in [Kelvin] @param viscosity Viscosity in [kg m^-1 s^-1] @return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1] public...
111
312
128
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4003b223f4029f75d3fef47cbafde7e5c56d8cfb6df6a6b34871479ba3258700
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
89e71f6c68d9a429ac7eff3a
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java
StokesEinsteinConverter.ViscosityByAndradeEquation
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java#L54-L99
train
java
Calculates the viscosity for different solvent in dependence from the temperatur [k]. Please see https://de.wikipedia.org/wiki/Andrade-Gleichung @param temperatur Temperatur in Kelvin [K] @return Viscosity in [kg m^-1 s^-1]
public static double ViscosityByAndradeEquation(double temperatur, SOLVENT s){ double res = 0; double a; double b; switch (s) { case WATER: if(temperatur<274 || temperatur>373){ throw new IllegalArgumentException("The andrade equation can not be applied for this solvent/temperatur combination."); } ...
Calculates the viscosity for different solvent in dependence from the temperatur [k]. Please see https://de.wikipedia.org/wiki/Andrade-Gleichung @param temperatur Temperatur in Kelvin [K] @return Viscosity in [kg m^-1 s^-1] public static double ViscosityByAndradeEquation(double temperatur, SOLVENT s){ double res = 0...
452
223
1,302
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dc9a0d3b487894e6d6136f1fc02284781c239764b411fe91f844f8a8fe97ff62
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6c637db7122d50834ae7454e
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.combineTrajectory
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L45-L63
train
java
Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length. @param a The first trajectory @param b The second trajectory @return The combined trajectory
public static Trajectory combineTrajectory(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ throw new IllegalArgumentException("Combination not possible: The trajectorys does not have the same dimension"); } if(a.size()!=b.size()){ throw new IllegalArgumentException("Combination not poss...
Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length. @param a The first trajectory @param b The second trajectory @return The combined trajectory public static Trajectory combineTrajectory(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ ...
225
204
666
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f5f80dafd05df8be913d3701b290bbfcff475be689c6cf204ed17ac8116d6f15
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
dd2f5846fc05cb13b72ef817
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.concactTrajectorie
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L71-L97
train
java
Concatenates the trajectory a and b @param a The end of this trajectory will be connected to the start of trajectory b @param b The start of this trajectory will be connected to the end of trajectory a @return Concatenated trajectory
public static Trajectory concactTrajectorie(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ throw new IllegalArgumentException("Combination not possible: The trajectorys does not have the same dimension"); } Trajectory c = new Trajectory(a.getDimension()); for(int i = 0 ; i < a.size()...
Concatenates the trajectory a and b @param a The end of this trajectory will be connected to the start of trajectory b @param b The start of this trajectory will be connected to the end of trajectory a @return Concatenated trajectory public static Trajectory concactTrajectorie(Trajectory a, Trajectory b){ if(a.getDi...
300
233
739
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9f27a7ea12604874297f16963921bc6189fb94b2c45de6671c163ab30531e24f
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
128fcb62f9955ce9898c5749
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.resample
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L105-L113
train
java
Resamples a trajectory @param t Trajectory to resample @param n Resample rate @return Returns a resampled trajectory which contains every n'th position of t
public static Trajectory resample(Trajectory t, int n){ Trajectory t1 = new Trajectory(2); for(int i = 0; i < t.size(); i=i+n){ t1.add(t.get(i)); } return t1; }
Resamples a trajectory @param t Trajectory to resample @param n Resample rate @return Returns a resampled trajectory which contains every n'th position of t public static Trajectory resample(Trajectory t, int n){ Trajectory t1 = new Trajectory(2); for(int i = 0; i < t.size(); i=i+n){ t1.add(t.get(i)); } ...
99
156
178
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2cbbf1f0f97064622c7cd4992db87e5e48fe294585648e8b7271d127f8e2fa07
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6364ba5a6ab473f7189e705b
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.splitTrackInSubTracks
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L131-L156
train
java
Splits a trajectory in overlapping / non-overlapping sub-trajectories. @param t @param windowWidth Window width. Each sub-trajectory will have this length @param overlapping Allows the window to overlap @return ArrayList with sub-trajectories
public static ArrayList<Trajectory> splitTrackInSubTracks(Trajectory t, int windowWidth, boolean overlapping){ int increment = 1; if(overlapping==false){ increment=windowWidth; } ArrayList<Trajectory> subTrajectories = new ArrayList<Trajectory>(); boolean trackEndReached = false; for(int i = 0; i < t....
Splits a trajectory in overlapping / non-overlapping sub-trajectories. @param t @param windowWidth Window width. Each sub-trajectory will have this length @param overlapping Allows the window to overlap @return ArrayList with sub-trajectories public static ArrayList<Trajectory> splitTrackInSubTracks(Trajectory t, int ...
247
242
687
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1423c3204bd0a665b3935cae05dba87116570ccb3de9166e0e9bbea0184e6a59
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6be809e4188314f537a7f0f6
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.getTrajectoryByID
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L164-L173
train
java
Finds trajectory by ID @param t List of Trajectories @param id ID of the trajectorie @return Trajectory with ID=id
public static Trajectory getTrajectoryByID(List<? extends Trajectory> t, int id){ Trajectory track = null; for(int i = 0; i < t.size() ; i++){ if(t.get(i).getID()==id){ track = t.get(i); break; } } return track; }
Finds trajectory by ID @param t List of Trajectories @param id ID of the trajectorie @return Trajectory with ID=id public static Trajectory getTrajectoryByID(List<? extends Trajectory> t, int id){ Trajectory track = null; for(int i = 0; i < t.size() ; i++){ if(t.get(i).getID()==id){ track = t.get(i); br...
105
114
236
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bb89e89d1ae4468a22dd706bc4b04bf24ff37ecf3e1155a62b89605a93f14d15
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
29add73eff991cc8e872a8e6
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/LangUtils.java
LangUtils.getClassAnnotationValue
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/LangUtils.java#L19-L28
train
java
Get the value of a Annotation in a class declaration. @param classType @param annotationType @param attributeName @return the value of the annotation as String or null if something goes wrong
public static <T, A extends Annotation> String getClassAnnotationValue(Class<T> classType, Class<A> annotationType, String attributeName) { String value = null; Annotation annotation = classType.getAnnotation(annotationType); if (annotation != null) { try { value = (String) annotation.annotationType().getM...
Get the value of a Annotation in a class declaration. @param classType @param annotationType @param attributeName @return the value of the annotation as String or null if something goes wrong public static <T, A extends Annotation> String getClassAnnotationValue(Class<T> classType, Class<A> annotationType, String attr...
130
191
412
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
364c0796d11468535240e8ddd718f5e1196134e956df7b2a43aa1d0395a441f8
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
ad5585e94c7fdf34cfa4c5d5
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/StringUtils.java
StringUtils.allUpperCase
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/StringUtils.java#L20-L28
train
java
Make all elements of a String array upper case. @param strings string array, may contain null item but can't be null @return array containing all provided elements upper case
public static String[] allUpperCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ if(strings[idx] != null){ tmp[idx] = strings[idx].toUpperCase(); } } return tmp; }
Make all elements of a String array upper case. @param strings string array, may contain null item but can't be null @return array containing all provided elements upper case public static String[] allUpperCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ ...
99
174
241
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
24215d7c0324ee334106fcfb545987b70be49bbb19700a24919004390e828e8f
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
End of preview. Expand in Data Studio

CodeSearchNet — MIT-only union

Working copy (2026-12-05). Union of the MIT-licensed rows from the four per-language permissive datasets (Java, Go, Ruby, Python). Single licence: MIT.

  • 311,005 rows, 10,327 repositories
  • 297,766,019 characters, 69,745,584 tokens (tiktoken cl100k_base)
  • parquet 169,397,938 bytes (zstd), 20 columns
  • splits: train 281,635 · validation 14,041 · test 15,329

Full datasheet: datasheet.md.

By language

language rows tokens share
python 130,531 39,216,496 42.0%
go 86,803 13,714,759 27.9%
java 52,732 9,611,500 17.0%
ruby 40,939 7,202,829 13.2%

Schema

id, repo, path, func_name, url, split, language, docstring, code, text,
token_count, doc_chars, code_chars, license_basis, source, added,
record_sha256, license, license_class, license_source

text = docstring + \n\n + code. license == "MIT" and license_class == "permissive" for every row; license_source is the GitHub licence URL.

Rights

  • Single licence: MIT for all 311,005 rows, audited per repository via the GitHub licence API.
  • MIT requires preserving the copyright and permission notice. The parquet carries repo and url for attribution but does not bundle the upstream LICENSE files.
  • No copyleft and no NOASSERTION/unknown rows.

Not checked

  • PII in code/docstrings; no scrubber was run.
  • Whether GitHub's LICENSE-file detection matches the repo's actual terms.
  • Vendored/generated files inside repos that may carry other licences.
  • Cross-corpus dedup beyond exact-code SHA-256 within this union.

Authors

Piotr Styła (SlayerLab / Fabryka AI), 2026. See CITATION.cff.

Citation

If you use this dataset, cite it via CITATION.cff (or the Hugging Face dataset page). Upstream code should be cited/attributed via the repo and url fields.

Dataset licence

Curation, selection and metadata: MIT (see LICENSE). Code and documentation remain under their upstream licences, recorded per row in license / license_source; see NOTICE, ATTRIBUTION.md and LICENSES/.

Downloads last month
-