method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Test public void toAndFromNullNotNullable() throws Exception { Moshi moshi = new Moshi.Builder() .add(new NotNullablePointAsListOfIntegersJsonAdapter()) .build(); JsonAdapter<Point> pointAdapter = moshi.adapter(Point.class).lenient(); assertThat(pointAdapter.toJson(null)).isEqualTo("null"); assertThat(pointAdapter.fromJson("null")).isNull(); }
@Test void function() throws Exception { Moshi moshi = new Moshi.Builder() .add(new NotNullablePointAsListOfIntegersJsonAdapter()) .build(); JsonAdapter<Point> pointAdapter = moshi.adapter(Point.class).lenient(); assertThat(pointAdapter.toJson(null)).isEqualTo("null"); assertThat(pointAdapter.fromJson("null")).isNull(); }
/** * Simple adapter methods are not invoked for null values unless they're annotated {@code * @Nullable}. (The specific annotation class doesn't matter; just its simple name.) */
Simple adapter methods are not invoked for null values unless they're annotated {@code
toAndFromNullNotNullable
{ "repo_name": "vipulshah2010/moshi", "path": "moshi/src/test/java/com/squareup/moshi/AdapterMethodsTest.java", "license": "apache-2.0", "size": 10758 }
[ "org.assertj.core.api.Assertions", "org.junit.Test" ]
import org.assertj.core.api.Assertions; import org.junit.Test;
import org.assertj.core.api.*; import org.junit.*;
[ "org.assertj.core", "org.junit" ]
org.assertj.core; org.junit;
1,357,756
public void walk(JavaClass aJavaClass) { DescendingVisitor visitor = new DescendingVisitor(aJavaClass, mVisitor); aJavaClass.accept(visitor); }
void function(JavaClass aJavaClass) { DescendingVisitor visitor = new DescendingVisitor(aJavaClass, mVisitor); aJavaClass.accept(visitor); }
/** * Traverses a JavaClass parse tree and accepts all registered * visitors. * @param aJavaClass the root of the tree. */
Traverses a JavaClass parse tree and accepts all registered visitors
walk
{ "repo_name": "kiwiwin/git-sniffer", "path": "third_party_tools/checkstyle-5.6/contrib/bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/JavaClassWalker.java", "license": "mit", "size": 1113 }
[ "org.apache.bcel.classfile.DescendingVisitor", "org.apache.bcel.classfile.JavaClass" ]
import org.apache.bcel.classfile.DescendingVisitor; import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.*;
[ "org.apache.bcel" ]
org.apache.bcel;
2,087,242
int getMax() throws NoSuchElementException;
int getMax() throws NoSuchElementException;
/** * Returns the largest integer in this tree. * * @return the largest integer in this tree * @throws NoSuchElementException - if this tree is empty */
Returns the largest integer in this tree
getMax
{ "repo_name": "marcelherd/hochschule-mannheim", "path": "Workspace/ADS/src/com/marcelherd/uebung6/BinaryTree.java", "license": "apache-2.0", "size": 2718 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
2,208,479
public String getShowExplorerFileDateCreated() { return getExplorerSetting(CmsUserSettings.FILELIST_DATE_CREATED); }
String function() { return getExplorerSetting(CmsUserSettings.FILELIST_DATE_CREATED); }
/** * Gets if the file creation date should be shown in explorer view.<p> * * @return <code>"true"</code> if the file creation date should be shown, otherwise <code>"false"</code> */
Gets if the file creation date should be shown in explorer view
getShowExplorerFileDateCreated
{ "repo_name": "serrapos/opencms-core", "path": "src/org/opencms/configuration/CmsDefaultUserSettings.java", "license": "lgpl-2.1", "size": 33724 }
[ "org.opencms.db.CmsUserSettings" ]
import org.opencms.db.CmsUserSettings;
import org.opencms.db.*;
[ "org.opencms.db" ]
org.opencms.db;
2,383,285
@Test public void testOneWayServicesInOneCommonICWithOtherName() throws IOException { for (MuleVersionEnum v: getMuleVersions()) { if (!v.isEEVersion()) { doTestOneWayServicesInOneCommonIC("org.soitoolkit.tool.generator-tests", "Oneway-Tests-SA-v1-mule" + v.getVerNoNumbersOnly(), v, STANDALONE_DEPLOY); } } }
void function() throws IOException { for (MuleVersionEnum v: getMuleVersions()) { if (!v.isEEVersion()) { doTestOneWayServicesInOneCommonIC(STR, STR + v.getVerNoNumbersOnly(), v, STANDALONE_DEPLOY); } } }
/** * Test all combinations of supported inbound and outbound endpoints with one common integration component but with another component names to ensure that we don't have any hardcoded component names in the templates * * @throws IOException */
Test all combinations of supported inbound and outbound endpoints with one common integration component but with another component names to ensure that we don't have any hardcoded component names in the templates
testOneWayServicesInOneCommonICWithOtherName
{ "repo_name": "soi-toolkit/soi-toolkit-mule", "path": "tools/soitoolkit-generator/soitoolkit-generator/src/test/java/org/soitoolkit/tools/generator/OneWayServiceGeneratorTest.java", "license": "apache-2.0", "size": 11772 }
[ "java.io.IOException", "org.soitoolkit.tools.generator.model.enums.MuleVersionEnum" ]
import java.io.IOException; import org.soitoolkit.tools.generator.model.enums.MuleVersionEnum;
import java.io.*; import org.soitoolkit.tools.generator.model.enums.*;
[ "java.io", "org.soitoolkit.tools" ]
java.io; org.soitoolkit.tools;
1,375,041
private static long computeChecksum(byte magic, byte attributes, long timestamp, ByteBuffer key, ByteBuffer value) { Crc32 crc = new Crc32(); crc.update(magic); crc.update(attributes); if (magic > 0) crc.updateLong(timestamp); // update for the key if (key == null) { crc.updateInt(-1); } else { int size = key.remaining(); crc.updateInt(size); crc.update(key.array(), key.arrayOffset(), size); } // update for the value if (value == null) { crc.updateInt(-1); } else { int size = value.remaining(); crc.updateInt(size); crc.update(value.array(), value.arrayOffset(), size); } return crc.getValue(); }
static long function(byte magic, byte attributes, long timestamp, ByteBuffer key, ByteBuffer value) { Crc32 crc = new Crc32(); crc.update(magic); crc.update(attributes); if (magic > 0) crc.updateLong(timestamp); if (key == null) { crc.updateInt(-1); } else { int size = key.remaining(); crc.updateInt(size); crc.update(key.array(), key.arrayOffset(), size); } if (value == null) { crc.updateInt(-1); } else { int size = value.remaining(); crc.updateInt(size); crc.update(value.array(), value.arrayOffset(), size); } return crc.getValue(); }
/** * Compute the checksum of the record from the attributes, key and value payloads */
Compute the checksum of the record from the attributes, key and value payloads
computeChecksum
{ "repo_name": "eribeiro/kafka", "path": "clients/src/main/java/org/apache/kafka/common/record/Record.java", "license": "apache-2.0", "size": 24702 }
[ "java.nio.ByteBuffer", "org.apache.kafka.common.utils.Crc32" ]
import java.nio.ByteBuffer; import org.apache.kafka.common.utils.Crc32;
import java.nio.*; import org.apache.kafka.common.utils.*;
[ "java.nio", "org.apache.kafka" ]
java.nio; org.apache.kafka;
2,340,767
if (connected()) { LOG.log(Level.INFO, "Close network connection"); try { clientConnection.stop(); } catch (Exception e) { LOG.log(Level.WARNING, "Failed to close socket", e); } } }
if (connected()) { LOG.log(Level.INFO, STR); try { clientConnection.stop(); } catch (Exception e) { LOG.log(Level.WARNING, STR, e); } } }
/** * clean up library. */
clean up library
dispose
{ "repo_name": "neophob/PixelController", "path": "pixelcontroller-core/src/main/java/com/neophob/sematrix/core/output/pixelinvaders/Lpd6803Net.java", "license": "gpl-3.0", "size": 6083 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
406,888
Option getOption(String optionCode);
Option getOption(String optionCode);
/** * Retrieve a option from its code * * @param optionCode * @return */
Retrieve a option from its code
getOption
{ "repo_name": "dzc34/Asqatasun", "path": "web-app/tgol-api/src/main/java/org/asqatasun/webapp/entity/service/option/OptionDataService.java", "license": "agpl-3.0", "size": 1276 }
[ "org.asqatasun.webapp.entity.option.Option" ]
import org.asqatasun.webapp.entity.option.Option;
import org.asqatasun.webapp.entity.option.*;
[ "org.asqatasun.webapp" ]
org.asqatasun.webapp;
883,565
public ExtendedWebModuleInfo createWebModuleInfo(ExtendedModuleInfo moduleInfo, String contextPath) throws UnableToAdaptException;
ExtendedWebModuleInfo function(ExtendedModuleInfo moduleInfo, String contextPath) throws UnableToAdaptException;
/** * Create Web Router module based on the ModuleInfo parameter, it is used for EJB based web services * * @param moduleInfo * @return * @throws UnableToAdaptException */
Create Web Router module based on the ModuleInfo parameter, it is used for EJB based web services
createWebModuleInfo
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jaxws.2.3.common/src/com/ibm/ws/jaxws/support/JaxWsWebContainerManager.java", "license": "epl-1.0", "size": 1187 }
[ "com.ibm.ws.container.service.app.deploy.extended.ExtendedModuleInfo", "com.ibm.ws.container.service.app.deploy.extended.ExtendedWebModuleInfo", "com.ibm.wsspi.adaptable.module.UnableToAdaptException" ]
import com.ibm.ws.container.service.app.deploy.extended.ExtendedModuleInfo; import com.ibm.ws.container.service.app.deploy.extended.ExtendedWebModuleInfo; import com.ibm.wsspi.adaptable.module.UnableToAdaptException;
import com.ibm.ws.container.service.app.deploy.extended.*; import com.ibm.wsspi.adaptable.module.*;
[ "com.ibm.ws", "com.ibm.wsspi" ]
com.ibm.ws; com.ibm.wsspi;
2,213,644
public Observable<ServiceResponse<Object>> runWithServiceResponseAsync(String resourceGroupName, String workflowName, String triggerName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (workflowName == null) { throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); } if (triggerName == null) { throw new IllegalArgumentException("Parameter triggerName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); }
Observable<ServiceResponse<Object>> function(String resourceGroupName, String workflowName, String triggerName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (workflowName == null) { throw new IllegalArgumentException(STR); } if (triggerName == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); }
/** * Runs a workflow trigger. * * @param resourceGroupName The resource group name. * @param workflowName The workflow name. * @param triggerName The workflow trigger name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Object object */
Runs a workflow trigger
runWithServiceResponseAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-logic/src/main/java/com/microsoft/azure/management/logic/implementation/WorkflowTriggersInner.java", "license": "mit", "size": 40372 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,473,623
public static boolean isReservedLabel(Label label) { return label.toString().equals(DEFAULT_CONDITION_KEY); } } public static final class SelectorList<T> { private final Type<T> originalType; private final List<Selector<T>> elements; @VisibleForTesting SelectorList(List<Object> x, String what, @Nullable Label currentRule, Type<T> originalType) throws ConversionException { if (x.size() > 1 && originalType.concat(ImmutableList.<T>of()) == null) { throw new ConversionException( String.format("type '%s' doesn't support select concatenation", originalType)); } ImmutableList.Builder<Selector<T>> builder = ImmutableList.builder(); for (Object elem : x) { if (elem instanceof SelectorValue) { builder.add(new Selector<T>(((SelectorValue) elem).getDictionary(), what, currentRule, originalType)); } else { T directValue = originalType.convert(elem, what, currentRule); builder.add(new Selector<T>(ImmutableMap.of(Selector.DEFAULT_CONDITION_KEY, directValue), what, currentRule, originalType)); } } this.originalType = originalType; this.elements = builder.build(); }
static boolean function(Label label) { return label.toString().equals(DEFAULT_CONDITION_KEY); } } public static final class SelectorList<T> { private final Type<T> originalType; private final List<Selector<T>> elements; SelectorList(List<Object> x, String what, @Nullable Label currentRule, Type<T> originalType) throws ConversionException { if (x.size() > 1 && originalType.concat(ImmutableList.<T>of()) == null) { throw new ConversionException( String.format(STR, originalType)); } ImmutableList.Builder<Selector<T>> builder = ImmutableList.builder(); for (Object elem : x) { if (elem instanceof SelectorValue) { builder.add(new Selector<T>(((SelectorValue) elem).getDictionary(), what, currentRule, originalType)); } else { T directValue = originalType.convert(elem, what, currentRule); builder.add(new Selector<T>(ImmutableMap.of(Selector.DEFAULT_CONDITION_KEY, directValue), what, currentRule, originalType)); } } this.originalType = originalType; this.elements = builder.build(); }
/** * Returns true for labels that are "reserved selector key words" and not intended to * map to actual targets. */
Returns true for labels that are "reserved selector key words" and not intended to map to actual targets
isReservedLabel
{ "repo_name": "charlieaustin/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/Type.java", "license": "apache-2.0", "size": 36290 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableMap", "com.google.devtools.build.lib.syntax.Label", "com.google.devtools.build.lib.syntax.SelectorValue", "java.util.List", "javax.annotation.Nullable" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.syntax.Label; import com.google.devtools.build.lib.syntax.SelectorValue; import java.util.List; import javax.annotation.Nullable;
import com.google.common.collect.*; import com.google.devtools.build.lib.syntax.*; import java.util.*; import javax.annotation.*;
[ "com.google.common", "com.google.devtools", "java.util", "javax.annotation" ]
com.google.common; com.google.devtools; java.util; javax.annotation;
2,188,885
public int loadUrl(final String url) throws IllegalArgumentException, InterruptedException { return loadUrlInTab(url, PageTransition.TYPED | PageTransition.FROM_ADDRESS_BAR, getActivity().getActivityTab()); } /** * @param url The url of the page to load. * @param pageTransition The type of transition. see * {@link org.chromium.ui.base.PageTransition}
int function(final String url) throws IllegalArgumentException, InterruptedException { return loadUrlInTab(url, PageTransition.TYPED PageTransition.FROM_ADDRESS_BAR, getActivity().getActivityTab()); } /** * @param url The url of the page to load. * @param pageTransition The type of transition. see * {@link org.chromium.ui.base.PageTransition}
/** * Navigates to a URL directly without going through the UrlBar. This bypasses the page * preloading mechanism of the UrlBar. * @param url The url to load in the current tab. * @return FULL_PRERENDERED_PAGE_LOAD or PARTIAL_PRERENDERED_PAGE_LOAD if the page has been * prerendered. DEFAULT_PAGE_LOAD if it had not. */
Navigates to a URL directly without going through the UrlBar. This bypasses the page preloading mechanism of the UrlBar
loadUrl
{ "repo_name": "axinging/chromium-crosswalk", "path": "chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java", "license": "bsd-3-clause", "size": 40529 }
[ "org.chromium.ui.base.PageTransition" ]
import org.chromium.ui.base.PageTransition;
import org.chromium.ui.base.*;
[ "org.chromium.ui" ]
org.chromium.ui;
2,295,797
@Override public boolean exceptionInThreads() { return exceptionInThreads || LoggingUncaughtExceptionHandler.getUncaughtExceptionsCount() > 0; }
boolean function() { return exceptionInThreads LoggingUncaughtExceptionHandler.getUncaughtExceptionsCount() > 0; }
/** * Did an exception occur in one of the threads launched by this distribution manager? */
Did an exception occur in one of the threads launched by this distribution manager
exceptionInThreads
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java", "license": "apache-2.0", "size": 93878 }
[ "org.apache.geode.logging.internal.executors.LoggingUncaughtExceptionHandler" ]
import org.apache.geode.logging.internal.executors.LoggingUncaughtExceptionHandler;
import org.apache.geode.logging.internal.executors.*;
[ "org.apache.geode" ]
org.apache.geode;
2,724,646
public void start_circle(Point2D p_point) { if (board_is_read_only) { // no interactive action when logfile is running return; } FloatPoint location = graphics_context.coordinate_transform.screen_to_board(p_point); set_interactive_state(CircleConstructionState.get_instance(location, this.interactive_state, this, logfile)); }
void function(Point2D p_point) { if (board_is_read_only) { return; } FloatPoint location = graphics_context.coordinate_transform.screen_to_board(p_point); set_interactive_state(CircleConstructionState.get_instance(location, this.interactive_state, this, logfile)); }
/** * Start interactively creating a circle obstacle. */
Start interactively creating a circle obstacle
start_circle
{ "repo_name": "andrasfuchs/BioBalanceDetector", "path": "Tools/KiCad_FreeRouting/FreeRouting-cchamilt-master/interactive/BoardHandling.java", "license": "gpl-3.0", "size": 56889 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,419,160
private void generateTypeClassFullName(TypeClass typeClass, boolean shouldGenerateHyperlinks, StyleClass styleClassForTypeClassName) { int nParentClasses = typeClass.getNParentClasses(); if (nParentClasses > 0) { //// /// Loop through each parent class and generate its name, appropriately hyperlinked. // currentPage.openTag(HTML.Tag.SPAN, classAttribute(StyleClassConstants.TYPE_CONSTRAINT)).addText(CALFragments.OPEN_PAREN); for (int i = 0; i < nParentClasses; i++) { if (i > 0) { currentPage.addText(CALFragments.COMMA_AND_SPACE); } QualifiedName parentClassName = typeClass.getNthParentClass(i).getName(); if (shouldGenerateHyperlinks) { generateTypeClassReference(parentClassName); } else { currentPage.addText(getAppropriatelyQualifiedName(parentClassName.getModuleName(), parentClassName.getUnqualifiedName())); } currentPage.addText("&nbsp;" + CALFragments.STANDARD_TYPE_VAR); } currentPage.addText(CALFragments.CLOSE_PAREN).addText(" ").addTaggedText(HTML.Tag.SPAN, classAttribute(StyleClassConstants.CAL_SYMBOL), CALFragments.IMPLIES).closeTag(HTML.Tag.SPAN).addText(" "); } /// Finally generate the name of the type class itself. // currentPage.addTaggedText(HTML.Tag.SPAN, classAttribute(styleClassForTypeClassName), typeClass.getName().getUnqualifiedName() + "&nbsp;" + CALFragments.STANDARD_TYPE_VAR); }
void function(TypeClass typeClass, boolean shouldGenerateHyperlinks, StyleClass styleClassForTypeClassName) { int nParentClasses = typeClass.getNParentClasses(); if (nParentClasses > 0) { currentPage.openTag(HTML.Tag.SPAN, classAttribute(StyleClassConstants.TYPE_CONSTRAINT)).addText(CALFragments.OPEN_PAREN); for (int i = 0; i < nParentClasses; i++) { if (i > 0) { currentPage.addText(CALFragments.COMMA_AND_SPACE); } QualifiedName parentClassName = typeClass.getNthParentClass(i).getName(); if (shouldGenerateHyperlinks) { generateTypeClassReference(parentClassName); } else { currentPage.addText(getAppropriatelyQualifiedName(parentClassName.getModuleName(), parentClassName.getUnqualifiedName())); } currentPage.addText(STR + CALFragments.STANDARD_TYPE_VAR); } currentPage.addText(CALFragments.CLOSE_PAREN).addText(" ").addTaggedText(HTML.Tag.SPAN, classAttribute(StyleClassConstants.CAL_SYMBOL), CALFragments.IMPLIES).closeTag(HTML.Tag.SPAN).addText(" "); } currentPage.addTaggedText(HTML.Tag.SPAN, classAttribute(styleClassForTypeClassName), typeClass.getName().getUnqualifiedName() + STR + CALFragments.STANDARD_TYPE_VAR); }
/** * Generates the full name of a type class (i.e. including its parent classes), appropriately hyperlinked if requested. * @param typeClass the type class whose name is to be generated. * @param shouldGenerateHyperlinks whether hyperlinks should be generated. * @param styleClassForTypeClassName the style class to use for the type class name. */
Generates the full name of a type class (i.e. including its parent classes), appropriately hyperlinked if requested
generateTypeClassFullName
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/caldoc/HTMLDocumentationGenerator.java", "license": "bsd-3-clause", "size": 414134 }
[ "org.openquark.cal.compiler.QualifiedName", "org.openquark.cal.compiler.TypeClass" ]
import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.TypeClass;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
669,387
@Test public void simplifyAddConstants4() { // Setup. final TreeNode<Integer> child0 = new ConstantTerminal<Integer>(converterInteger, 2); final TreeNode<Integer> child1 = new ConstantTerminal<Integer>(converterInteger, 3); final TreeNode<Integer> child2 = new ConstantTerminal<Integer>(converterInteger, 4); final TreeNode<Integer> child3 = new ConstantTerminal<Integer>(converterInteger, 5); final Function<Integer> function0 = new AddFunction<Integer>(converterInteger, child0, child1); final Function<Integer> function1 = new AddFunction<Integer>(converterInteger, child2, child3); final Function<Integer> function = new AddFunction<Integer>(converterInteger, function0, function1); assertThat(PrefixNotationVisitor.toEquation(function), is("+ + 2 3 + 4 5")); final Simplifier<Integer> simplifier = new DefaultSimplifier<Integer>(); // Run. final TreeNode<Integer> result = simplifier.simplify(function); // Verify. assertNotNull(result); final String expected = "14"; assertThat(PrefixNotationVisitor.toEquation(result), is(expected)); }
void function() { final TreeNode<Integer> child0 = new ConstantTerminal<Integer>(converterInteger, 2); final TreeNode<Integer> child1 = new ConstantTerminal<Integer>(converterInteger, 3); final TreeNode<Integer> child2 = new ConstantTerminal<Integer>(converterInteger, 4); final TreeNode<Integer> child3 = new ConstantTerminal<Integer>(converterInteger, 5); final Function<Integer> function0 = new AddFunction<Integer>(converterInteger, child0, child1); final Function<Integer> function1 = new AddFunction<Integer>(converterInteger, child2, child3); final Function<Integer> function = new AddFunction<Integer>(converterInteger, function0, function1); assertThat(PrefixNotationVisitor.toEquation(function), is(STR)); final Simplifier<Integer> simplifier = new DefaultSimplifier<Integer>(); final TreeNode<Integer> result = simplifier.simplify(function); assertNotNull(result); final String expected = "14"; assertThat(PrefixNotationVisitor.toEquation(result), is(expected)); }
/** * Test the <code>simplify()</code> method. */
Test the <code>simplify()</code> method
simplifyAddConstants4
{ "repo_name": "jmthompson2015/vizzini", "path": "ai/src/test/java/org/vizzini/ai/geneticalgorithm/geneticprogramming/DefaultSimplifierTest.java", "license": "mit", "size": 28651 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
2,182,304
public static String getSubjectUri(final Exchange exchange) throws NoSuchHeaderException { final String uri = exchange.getIn().getHeader(FCREPO_URI, "", String.class); if (uri.isEmpty()) { final String base = getMandatoryHeader(exchange, FCREPO_BASE_URL, String.class); final String path = exchange.getIn().getHeader(FCREPO_IDENTIFIER, "", String.class); return trimTrailingSlash(base) + path; } return uri; }
static String function(final Exchange exchange) throws NoSuchHeaderException { final String uri = exchange.getIn().getHeader(FCREPO_URI, STR", String.class); return trimTrailingSlash(base) + path; } return uri; }
/** * Extract the subject URI from the incoming exchange. * @param exchange the incoming Exchange * @return the subject URI * @throws NoSuchHeaderException when the CamelFcrepoBaseUrl header is not present */
Extract the subject URI from the incoming exchange
getSubjectUri
{ "repo_name": "fcrepo4-exts/fcrepo-camel", "path": "src/main/java/org/fcrepo/camel/processor/ProcessorUtils.java", "license": "apache-2.0", "size": 5043 }
[ "org.apache.camel.Exchange", "org.apache.camel.NoSuchHeaderException" ]
import org.apache.camel.Exchange; import org.apache.camel.NoSuchHeaderException;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,226,767
private void sendVODInitCM(IMessageInput msgIn, IPlayItem item) { OOBControlMessage oobCtrlMsg = new OOBControlMessage(); oobCtrlMsg.setTarget(IPassive.KEY); oobCtrlMsg.setServiceName("init"); Map<String, Object> paramMap = new HashMap<String, Object>(1); paramMap.put("startTS", (int) item.getStart()); oobCtrlMsg.setServiceParamMap(paramMap); msgIn.sendOOBControlMessage(this, oobCtrlMsg); }
void function(IMessageInput msgIn, IPlayItem item) { OOBControlMessage oobCtrlMsg = new OOBControlMessage(); oobCtrlMsg.setTarget(IPassive.KEY); oobCtrlMsg.setServiceName("init"); Map<String, Object> paramMap = new HashMap<String, Object>(1); paramMap.put(STR, (int) item.getStart()); oobCtrlMsg.setServiceParamMap(paramMap); msgIn.sendOOBControlMessage(this, oobCtrlMsg); }
/** * Send VOD init control message * @param msgIn Message input * @param item Playlist item */
Send VOD init control message
sendVODInitCM
{ "repo_name": "OpenCorrelate/red5load", "path": "red5/src/main/java/org/red5/server/stream/PlayEngine.java", "license": "lgpl-3.0", "size": 47873 }
[ "java.util.HashMap", "java.util.Map", "org.red5.server.api.stream.IPlayItem", "org.red5.server.messaging.IMessageInput", "org.red5.server.messaging.IPassive", "org.red5.server.messaging.OOBControlMessage" ]
import java.util.HashMap; import java.util.Map; import org.red5.server.api.stream.IPlayItem; import org.red5.server.messaging.IMessageInput; import org.red5.server.messaging.IPassive; import org.red5.server.messaging.OOBControlMessage;
import java.util.*; import org.red5.server.api.stream.*; import org.red5.server.messaging.*;
[ "java.util", "org.red5.server" ]
java.util; org.red5.server;
1,813,465
@SuppressWarnings("unchecked") public void setWriterPostProcessors(Set<String> writerPostProcessors) { if (writePostProcessors == null) { writePostProcessors = new LinkedList<>(); } for (String writerPostProcessor : writerPostProcessors) { try { writePostProcessors.add((Class<IPostProcessor>) Class.forName(writerPostProcessor)); } catch (Exception e) { log.debug("Write post process implementation: {} was not found", writerPostProcessor); } } }
@SuppressWarnings(STR) void function(Set<String> writerPostProcessors) { if (writePostProcessors == null) { writePostProcessors = new LinkedList<>(); } for (String writerPostProcessor : writerPostProcessors) { try { writePostProcessors.add((Class<IPostProcessor>) Class.forName(writerPostProcessor)); } catch (Exception e) { log.debug(STR, writerPostProcessor); } } }
/** * Sets a group of writer post processors. * * @param writerPostProcessors IPostProcess implementation class names */
Sets a group of writer post processors
setWriterPostProcessors
{ "repo_name": "solomax/red5-io", "path": "src/main/java/org/red5/io/flv/impl/FLV.java", "license": "apache-2.0", "size": 11355 }
[ "java.util.LinkedList", "java.util.Set", "org.red5.media.processor.IPostProcessor" ]
import java.util.LinkedList; import java.util.Set; import org.red5.media.processor.IPostProcessor;
import java.util.*; import org.red5.media.processor.*;
[ "java.util", "org.red5.media" ]
java.util; org.red5.media;
1,605,236
protected Socket openSocket(Socket sock, InetSocketAddress remAddr, IgniteSpiOperationTimeoutHelper timeoutHelper) throws IOException, IgniteSpiOperationTimeoutException { assert remAddr != null; InetSocketAddress resolved = remAddr.isUnresolved() ? new InetSocketAddress(InetAddress.getByName(remAddr.getHostName()), remAddr.getPort()) : remAddr; InetAddress addr = resolved.getAddress(); assert addr != null; sock.connect(resolved, (int)timeoutHelper.nextTimeoutChunk(sockTimeout)); writeToSocket(sock, null, U.IGNITE_HEADER, timeoutHelper.nextTimeoutChunk(sockTimeout)); return sock; }
Socket function(Socket sock, InetSocketAddress remAddr, IgniteSpiOperationTimeoutHelper timeoutHelper) throws IOException, IgniteSpiOperationTimeoutException { assert remAddr != null; InetSocketAddress resolved = remAddr.isUnresolved() ? new InetSocketAddress(InetAddress.getByName(remAddr.getHostName()), remAddr.getPort()) : remAddr; InetAddress addr = resolved.getAddress(); assert addr != null; sock.connect(resolved, (int)timeoutHelper.nextTimeoutChunk(sockTimeout)); writeToSocket(sock, null, U.IGNITE_HEADER, timeoutHelper.nextTimeoutChunk(sockTimeout)); return sock; }
/** * Connects to remote address sending {@code U.IGNITE_HEADER} when connection is established. * * @param sock Socket bound to a local host address. * @param remAddr Remote address. * @param timeoutHelper Timeout helper. * @return Connected socket. * @throws IOException If failed. * @throws IgniteSpiOperationTimeoutException In case of timeout. */
Connects to remote address sending U.IGNITE_HEADER when connection is established
openSocket
{ "repo_name": "afinka77/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java", "license": "apache-2.0", "size": 70334 }
[ "java.io.IOException", "java.net.InetAddress", "java.net.InetSocketAddress", "java.net.Socket", "org.apache.ignite.spi.IgniteSpiOperationTimeoutException", "org.apache.ignite.spi.IgniteSpiOperationTimeoutHelper" ]
import java.io.IOException; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import org.apache.ignite.spi.IgniteSpiOperationTimeoutException; import org.apache.ignite.spi.IgniteSpiOperationTimeoutHelper;
import java.io.*; import java.net.*; import org.apache.ignite.spi.*;
[ "java.io", "java.net", "org.apache.ignite" ]
java.io; java.net; org.apache.ignite;
836,378
public static <T> T loads( byte[] encoded, Class<T> type ) throws IOException { try ( ByteArrayInputStream content = new ByteArrayInputStream(encoded); Input input = new Input(content) ) { //noinspection unchecked return KRYO_POOLS.get().readObject(input, type); } }
static <T> T function( byte[] encoded, Class<T> type ) throws IOException { try ( ByteArrayInputStream content = new ByteArrayInputStream(encoded); Input input = new Input(content) ) { return KRYO_POOLS.get().readObject(input, type); } }
/** * load object from byte array * * @param encoded encoded byte array * @param type type template * @param <T> type template * @return object instance * @throws IOException io error */
load object from byte array
loads
{ "repo_name": "rostam/gradoop", "path": "gradoop-store/gradoop-accumulo/src/main/java/org/gradoop/storage/utils/KryoUtils.java", "license": "apache-2.0", "size": 2346 }
[ "com.esotericsoftware.kryo.io.Input", "java.io.ByteArrayInputStream", "java.io.IOException" ]
import com.esotericsoftware.kryo.io.Input; import java.io.ByteArrayInputStream; import java.io.IOException;
import com.esotericsoftware.kryo.io.*; import java.io.*;
[ "com.esotericsoftware.kryo", "java.io" ]
com.esotericsoftware.kryo; java.io;
1,221,265
@Operation(desc = "Move the messages corresponding to the given filter (and returns the number of moved messages)", impact = MBeanOperationInfo.ACTION) int moveMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter, @Parameter(name = "otherQueueName", desc = "The name of the queue to move the messages to") String otherQueueName, @Parameter(name = "rejectDuplicates", desc = "Reject messages identified as duplicate by the duplicate message") boolean rejectDuplicates) throws Exception;
@Operation(desc = STR, impact = MBeanOperationInfo.ACTION) int moveMessages(@Parameter(name = STR, desc = STR) String filter, @Parameter(name = STR, desc = STR) String otherQueueName, @Parameter(name = STR, desc = STR) boolean rejectDuplicates) throws Exception;
/** * Moves all the message corresponding to the specified filter to the specified other queue. * <br> * Using {@code null} or an empty filter will move <em>all</em> messages from this queue. * * @return the number of moved messages */
Moves all the message corresponding to the specified filter to the specified other queue. Using null or an empty filter will move all messages from this queue
moveMessages
{ "repo_name": "iweiss/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java", "license": "apache-2.0", "size": 30161 }
[ "javax.management.MBeanOperationInfo" ]
import javax.management.MBeanOperationInfo;
import javax.management.*;
[ "javax.management" ]
javax.management;
2,243,441
@Override protected void createInitialPermutations() { mOrientations[0] = new Permutation( this, null ); // first, define the 7-fold rotation int[] map = new int[]{ 1, 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, 12, 13, 7 }; mOrientations[1] = new Permutation( this, map ); // then, then 2-fold rotation map = new int[]{ 7, 13, 12, 11, 10, 9, 8, 0, 6, 5, 4, 3, 2, 1 }; mOrientations[7] = new Permutation( this, map ); }
void function() { mOrientations[0] = new Permutation( this, null ); int[] map = new int[]{ 1, 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, 12, 13, 7 }; mOrientations[1] = new Permutation( this, map ); map = new int[]{ 7, 13, 12, 11, 10, 9, 8, 0, 6, 5, 4, 3, 2, 1 }; mOrientations[7] = new Permutation( this, map ); }
/** * Called by the super constructor. */
Called by the super constructor
createInitialPermutations
{ "repo_name": "david-hall/vzome-core", "path": "src/main/java/com/vzome/fields/heptagon/HeptagonalAntiprismSymmetry.java", "license": "apache-2.0", "size": 8375 }
[ "com.vzome.core.math.symmetry.Permutation" ]
import com.vzome.core.math.symmetry.Permutation;
import com.vzome.core.math.symmetry.*;
[ "com.vzome.core" ]
com.vzome.core;
2,350,488
GraphDatabaseService getGraphDatabaseService();
GraphDatabaseService getGraphDatabaseService();
/** * Return the underlying graph database service instance. * * @return The graph data base service. */
Return the underlying graph database service instance
getGraphDatabaseService
{ "repo_name": "khmarbaise/jqassistant", "path": "core/store/src/main/java/com/buschmais/jqassistant/core/store/api/Store.java", "license": "gpl-3.0", "size": 6701 }
[ "org.neo4j.graphdb.GraphDatabaseService" ]
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.*;
[ "org.neo4j.graphdb" ]
org.neo4j.graphdb;
859,237
protected void emit_AttrAssignment_SemicolonKeyword_9_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
/** * Ambiguous syntax: * ';'? * * This ambiguous syntax occurs at: * elements+=AttrAssignment '}' (ambiguity) (rule end) * elements+=ExpressionStatement '}' (ambiguity) (rule end) * elements+=VariableDeclaration '}' (ambiguity) (rule end) */
Ambiguous syntax: ';'? This ambiguous syntax occurs at: elements+=AttrAssignment '}' (ambiguity) (rule end) elements+=ExpressionStatement '}' (ambiguity) (rule end) elements+=VariableDeclaration '}' (ambiguity) (rule end)
emit_AttrAssignment_SemicolonKeyword_9_q
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/IVML/de.uni_hildesheim.sse.ivml/src-gen/de/uni_hildesheim/sse/serializer/AbstractIvmlSyntacticSequencer.java", "license": "apache-2.0", "size": 6473 }
[ "java.util.List", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.nodemodel.INode", "org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider" ]
import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
794,070
public static <T> TreeIterator<T> getAllContents(EObject eObject, boolean resolve) { return new ContentTreeIterator<T>(eObject, resolve) { private static final long serialVersionUID = 1L;
static <T> TreeIterator<T> function(EObject eObject, boolean resolve) { return new ContentTreeIterator<T>(eObject, resolve) { private static final long serialVersionUID = 1L;
/** * Returns a tree iterator that iterates over all the {@link EObject#eContents direct contents} and indirect contents of the object. * @param eObject the object to iterate over. * @param resolve whether proxies should be resolved. * @return a tree iterator that iterates over all contents. * @see EObject#eAllContents * @see Resource#getAllContents */
Returns a tree iterator that iterates over all the <code>EObject#eContents direct contents</code> and indirect contents of the object
getAllContents
{ "repo_name": "LangleyStudios/eclipse-avro", "path": "test/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/EcoreUtil.java", "license": "epl-1.0", "size": 154916 }
[ "org.eclipse.emf.common.util.TreeIterator", "org.eclipse.emf.ecore.EObject" ]
import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,167,268
public void setBboxSize(float[] val) { if ( bboxSize == null ) { bboxSize = (SFVec3f)getField( "bboxSize" ); } bboxSize.setValue( val ); }
void function(float[] val) { if ( bboxSize == null ) { bboxSize = (SFVec3f)getField( STR ); } bboxSize.setValue( val ); }
/** Set the bboxSize field. * @param val The float[] to set. */
Set the bboxSize field
setBboxSize
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/external/node/cadgeometry/SAICADPart.java", "license": "gpl-2.0", "size": 7402 }
[ "org.web3d.x3d.sai.SFVec3f" ]
import org.web3d.x3d.sai.SFVec3f;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
114,217
void purgeEcmpGraph(DeviceId deviceId) { statusLock.lock(); try { if (populationStatus == Status.STARTED) { log.warn("Previous rule population is not finished. Cannot" + " proceeed with purgeEcmpGraph for {}", deviceId); return; } log.debug("Updating ECMPspg for unavailable dev:{}", deviceId); currentEcmpSpgMap.remove(deviceId); if (updatedEcmpSpgMap != null) { updatedEcmpSpgMap.remove(deviceId); } } finally { statusLock.unlock(); } }
void purgeEcmpGraph(DeviceId deviceId) { statusLock.lock(); try { if (populationStatus == Status.STARTED) { log.warn(STR + STR, deviceId); return; } log.debug(STR, deviceId); currentEcmpSpgMap.remove(deviceId); if (updatedEcmpSpgMap != null) { updatedEcmpSpgMap.remove(deviceId); } } finally { statusLock.unlock(); } }
/** * Remove ECMP graph entry for the given device. Typically called when * device is no longer available. * * @param deviceId the device for which graphs need to be purged */
Remove ECMP graph entry for the given device. Typically called when device is no longer available
purgeEcmpGraph
{ "repo_name": "oplinkoms/onos", "path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java", "license": "apache-2.0", "size": 103484 }
[ "org.onosproject.net.DeviceId" ]
import org.onosproject.net.DeviceId;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,196,387
void removeValidatedNodeType(SqlNode node);
void removeValidatedNodeType(SqlNode node);
/** * Removes a node from the set of validated nodes * * @param node node to be removed */
Removes a node from the set of validated nodes
removeValidatedNodeType
{ "repo_name": "mehant/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java", "license": "apache-2.0", "size": 23451 }
[ "org.apache.calcite.sql.SqlNode" ]
import org.apache.calcite.sql.SqlNode;
import org.apache.calcite.sql.*;
[ "org.apache.calcite" ]
org.apache.calcite;
529,405
public void rerouteInactiveFlows(MessageSender sender, String correlationId, RerouteInactiveFlows command) { PathNode pathNode = command.getPathNode(); int port = pathNode.getPortNo(); SwitchId switchId = pathNode.getSwitchId(); transactionManager.doInTransaction(() -> { Map<Flow, Set<PathId>> flowsForRerouting = getInactiveFlowsForRerouting(); for (Entry<Flow, Set<PathId>> entry : flowsForRerouting.entrySet()) { Flow flow = entry.getKey(); Set<IslEndpoint> allAffectedIslEndpoints = new HashSet<>(); for (FlowPath flowPath : flow.getPaths()) { Set<IslEndpoint> affectedIslEndpoints = new HashSet<>(); PathSegment firstSegment = null; int failedSegmentsCount = 0; for (PathSegment pathSegment : flowPath.getSegments()) { if (firstSegment == null) { firstSegment = pathSegment; } if (pathSegment.isFailed()) { affectedIslEndpoints.add(new IslEndpoint( pathSegment.getSrcSwitchId(), pathSegment.getSrcPort())); affectedIslEndpoints.add(new IslEndpoint( pathSegment.getDestSwitchId(), pathSegment.getDestPort())); if (pathSegment.containsNode(switchId, port)) { pathSegment.setFailed(false); pathSegmentRepository.updateFailedStatus(flowPath, pathSegment, false); } else { failedSegmentsCount++; } } } if (flowPath.getStatus().equals(FlowPathStatus.INACTIVE) && failedSegmentsCount == 0) { updateFlowPathStatus(flowPath, FlowPathStatus.ACTIVE); // force reroute of failed path only (required due to inaccurate path/segment state management) if (affectedIslEndpoints.isEmpty() && firstSegment != null) { affectedIslEndpoints.add(new IslEndpoint( firstSegment.getSrcSwitchId(), firstSegment.getSrcPort())); } } allAffectedIslEndpoints.addAll(affectedIslEndpoints); } FlowStatus flowStatus = flow.computeFlowStatus(); String flowStatusInfo = null; if (!FlowStatus.UP.equals(flowStatus)) { flowStatusInfo = command.getReason(); } flowRepository.updateStatusSafe(flow, flowStatus, flowStatusInfo); if (flow.isPinned()) { log.info("Skipping reroute command for pinned flow {}", flow.getFlowId()); } else { log.info("Produce reroute(attempt to restore inactive flows) request for {} (affected ISL " + "endpoints: {})", flow.getFlowId(), allAffectedIslEndpoints); FlowThrottlingData flowThrottlingData = getFlowThrottlingDataBuilder(flow) .correlationId(correlationId) .affectedIsl(allAffectedIslEndpoints) .force(false) .effectivelyDown(true) .reason(command.getReason()) .build(); sender.emitRerouteCommand(flow.getFlowId(), flowThrottlingData); } } }); }
void function(MessageSender sender, String correlationId, RerouteInactiveFlows command) { PathNode pathNode = command.getPathNode(); int port = pathNode.getPortNo(); SwitchId switchId = pathNode.getSwitchId(); transactionManager.doInTransaction(() -> { Map<Flow, Set<PathId>> flowsForRerouting = getInactiveFlowsForRerouting(); for (Entry<Flow, Set<PathId>> entry : flowsForRerouting.entrySet()) { Flow flow = entry.getKey(); Set<IslEndpoint> allAffectedIslEndpoints = new HashSet<>(); for (FlowPath flowPath : flow.getPaths()) { Set<IslEndpoint> affectedIslEndpoints = new HashSet<>(); PathSegment firstSegment = null; int failedSegmentsCount = 0; for (PathSegment pathSegment : flowPath.getSegments()) { if (firstSegment == null) { firstSegment = pathSegment; } if (pathSegment.isFailed()) { affectedIslEndpoints.add(new IslEndpoint( pathSegment.getSrcSwitchId(), pathSegment.getSrcPort())); affectedIslEndpoints.add(new IslEndpoint( pathSegment.getDestSwitchId(), pathSegment.getDestPort())); if (pathSegment.containsNode(switchId, port)) { pathSegment.setFailed(false); pathSegmentRepository.updateFailedStatus(flowPath, pathSegment, false); } else { failedSegmentsCount++; } } } if (flowPath.getStatus().equals(FlowPathStatus.INACTIVE) && failedSegmentsCount == 0) { updateFlowPathStatus(flowPath, FlowPathStatus.ACTIVE); if (affectedIslEndpoints.isEmpty() && firstSegment != null) { affectedIslEndpoints.add(new IslEndpoint( firstSegment.getSrcSwitchId(), firstSegment.getSrcPort())); } } allAffectedIslEndpoints.addAll(affectedIslEndpoints); } FlowStatus flowStatus = flow.computeFlowStatus(); String flowStatusInfo = null; if (!FlowStatus.UP.equals(flowStatus)) { flowStatusInfo = command.getReason(); } flowRepository.updateStatusSafe(flow, flowStatus, flowStatusInfo); if (flow.isPinned()) { log.info(STR, flow.getFlowId()); } else { log.info(STR + STR, flow.getFlowId(), allAffectedIslEndpoints); FlowThrottlingData flowThrottlingData = getFlowThrottlingDataBuilder(flow) .correlationId(correlationId) .affectedIsl(allAffectedIslEndpoints) .force(false) .effectivelyDown(true) .reason(command.getReason()) .build(); sender.emitRerouteCommand(flow.getFlowId(), flowThrottlingData); } } }); }
/** * Handles reroute on ISL up events. * * @param sender transport sender * @param correlationId correlation id to pass through * @param command origin command */
Handles reroute on ISL up events
rerouteInactiveFlows
{ "repo_name": "jonvestal/open-kilda", "path": "src-java/reroute-topology/reroute-storm-topology/src/main/java/org/openkilda/wfm/topology/reroute/service/RerouteService.java", "license": "apache-2.0", "size": 19289 }
[ "java.util.HashSet", "java.util.Map", "java.util.Set", "org.openkilda.messaging.command.reroute.RerouteInactiveFlows", "org.openkilda.messaging.info.event.PathNode", "org.openkilda.model.Flow", "org.openkilda.model.FlowPath", "org.openkilda.model.FlowPathStatus", "org.openkilda.model.FlowStatus", "org.openkilda.model.IslEndpoint", "org.openkilda.model.PathId", "org.openkilda.model.PathSegment", "org.openkilda.model.SwitchId", "org.openkilda.wfm.topology.reroute.bolts.MessageSender", "org.openkilda.wfm.topology.reroute.model.FlowThrottlingData" ]
import java.util.HashSet; import java.util.Map; import java.util.Set; import org.openkilda.messaging.command.reroute.RerouteInactiveFlows; import org.openkilda.messaging.info.event.PathNode; import org.openkilda.model.Flow; import org.openkilda.model.FlowPath; import org.openkilda.model.FlowPathStatus; import org.openkilda.model.FlowStatus; import org.openkilda.model.IslEndpoint; import org.openkilda.model.PathId; import org.openkilda.model.PathSegment; import org.openkilda.model.SwitchId; import org.openkilda.wfm.topology.reroute.bolts.MessageSender; import org.openkilda.wfm.topology.reroute.model.FlowThrottlingData;
import java.util.*; import org.openkilda.messaging.command.reroute.*; import org.openkilda.messaging.info.event.*; import org.openkilda.model.*; import org.openkilda.wfm.topology.reroute.bolts.*; import org.openkilda.wfm.topology.reroute.model.*;
[ "java.util", "org.openkilda.messaging", "org.openkilda.model", "org.openkilda.wfm" ]
java.util; org.openkilda.messaging; org.openkilda.model; org.openkilda.wfm;
69,842
public String decodePredictions(INDArray predictions) { Preconditions.checkState(predictions.size(1) == predictionLabels.size(), "Invalid input array:" + " expected array with size(1) equal to numLabels (%s), got array with shape %s", predictionLabels.size(), predictions.shape()); String predictionDescription = ""; int[] top5 = new int[5]; float[] top5Prob = new float[5]; //brute force collect top 5 int i = 0; for (int batch = 0; batch < predictions.size(0); batch++) { predictionDescription += "Predictions for batch "; if (predictions.size(0) > 1) { predictionDescription += String.valueOf(batch); } predictionDescription += " :"; INDArray currentBatch = predictions.getRow(batch).dup(); while (i < 5) { top5[i] = Nd4j.argMax(currentBatch, 1).getInt(0); top5Prob[i] = currentBatch.getFloat(batch, top5[i]); currentBatch.putScalar(0, top5[i], 0); predictionDescription += "\n\t" + String.format("%3f", top5Prob[i] * 100) + "%, " + predictionLabels.get(top5[i]); i++; } } return predictionDescription; }
String function(INDArray predictions) { Preconditions.checkState(predictions.size(1) == predictionLabels.size(), STR + STR, predictionLabels.size(), predictions.shape()); String predictionDescription = STRPredictions for batch STR :STR\n\tSTR%3fSTR%, " + predictionLabels.get(top5[i]); i++; } } return predictionDescription; }
/** * Given predictions from the trained model this method will return a string * listing the top five matches and the respective probabilities * @param predictions * @return */
Given predictions from the trained model this method will return a string listing the top five matches and the respective probabilities
decodePredictions
{ "repo_name": "RobAltena/deeplearning4j", "path": "deeplearning4j/deeplearning4j-zoo/src/main/java/org/deeplearning4j/zoo/util/imagenet/ImageNetLabels.java", "license": "apache-2.0", "size": 4352 }
[ "org.nd4j.base.Preconditions", "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.base.Preconditions; import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.base.*; import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.base", "org.nd4j.linalg" ]
org.nd4j.base; org.nd4j.linalg;
866,422
public void setEncoding(String encoding) { String old = getEncoding(); super.setEncoding(encoding); if (old == null || !old.equals(encoding)) { // If we have changed the setting of the m_encodingInfo = Encodings.getEncodingInfo(encoding); if (encoding != null && m_encodingInfo.name == null) { // We tried to get an EncodingInfo for Object for the given // encoding, but it came back with an internall null name // so the encoding is not supported by the JDK, issue a message. String msg = Utils.messages.createMessage( MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ encoding }); try { // Prepare to issue the warning message Transformer tran = super.getTransformer(); if (tran != null) { ErrorListener errHandler = tran.getErrorListener(); // Issue the warning message if (null != errHandler && m_sourceLocator != null) errHandler.warning(new TransformerException(msg, m_sourceLocator)); else System.out.println(msg); } else System.out.println(msg); } catch (Exception e){} } } return; } static final class BoolStack { private boolean m_values[]; private int m_allocatedSize; private int m_index; public BoolStack() { this(32); } public BoolStack(int size) { m_allocatedSize = size; m_values = new boolean[size]; m_index = -1; }
void function(String encoding) { String old = getEncoding(); super.setEncoding(encoding); if (old == null !old.equals(encoding)) { m_encodingInfo = Encodings.getEncodingInfo(encoding); if (encoding != null && m_encodingInfo.name == null) { String msg = Utils.messages.createMessage( MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ encoding }); try { Transformer tran = super.getTransformer(); if (tran != null) { ErrorListener errHandler = tran.getErrorListener(); if (null != errHandler && m_sourceLocator != null) errHandler.warning(new TransformerException(msg, m_sourceLocator)); else System.out.println(msg); } else System.out.println(msg); } catch (Exception e){} } } return; } static final class BoolStack { private boolean m_values[]; private int m_allocatedSize; private int m_index; public BoolStack() { this(32); } public BoolStack(int size) { m_allocatedSize = size; m_values = new boolean[size]; m_index = -1; }
/** * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. * @param encoding the character encoding */
Sets the character encoding coming from the xsl:output encoding stylesheet attribute
setEncoding
{ "repo_name": "karianna/jdk8_tl", "path": "jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java", "license": "gpl-2.0", "size": 110211 }
[ "com.sun.org.apache.xml.internal.serializer.utils.MsgKey", "com.sun.org.apache.xml.internal.serializer.utils.Utils", "javax.xml.transform.ErrorListener", "javax.xml.transform.Transformer", "javax.xml.transform.TransformerException" ]
import com.sun.org.apache.xml.internal.serializer.utils.MsgKey; import com.sun.org.apache.xml.internal.serializer.utils.Utils; import javax.xml.transform.ErrorListener; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException;
import com.sun.org.apache.xml.internal.serializer.utils.*; import javax.xml.transform.*;
[ "com.sun.org", "javax.xml" ]
com.sun.org; javax.xml;
2,719,851
public boolean onUpdate(Session s) throws CallbackException;
boolean function(Session s) throws CallbackException;
/** * Called when an entity is passed to <tt>Session.update()</tt>. * This method is <em>not</em> called every time the object's * state is persisted during a flush. * @param s the session * @return true to veto update * @throws CallbackException */
Called when an entity is passed to Session.update(). This method is not called every time the object's state is persisted during a flush
onUpdate
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "thirdparty/plugins/org.csstudio.platform.libs.hibernate/project/core/src/main/java/org/hibernate/classic/Lifecycle.java", "license": "epl-1.0", "size": 3857 }
[ "org.hibernate.CallbackException", "org.hibernate.Session" ]
import org.hibernate.CallbackException; import org.hibernate.Session;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
2,305,102
String ver = AppVersion.getVersion(); out.writeln("JSwat " + ver + '\n' + com.bluemarsh.jswat.Bundle.getString("about1") + '\n' + com.bluemarsh.jswat.Bundle.getString("about2") + '\n' + com.bluemarsh.jswat.Bundle.getString("about3")); } // perform
String ver = AppVersion.getVersion(); out.writeln(STR + ver + '\n' + com.bluemarsh.jswat.Bundle.getString(STR) + '\n' + com.bluemarsh.jswat.Bundle.getString(STR) + '\n' + com.bluemarsh.jswat.Bundle.getString(STR)); }
/** * Perform the 'about' command. * * @param session JSwat session on which to operate. * @param args Tokenized string of command arguments. * @param out Output to write messages to. */
Perform the 'about' command
perform
{ "repo_name": "mbertacca/JSwat2", "path": "classes/com/bluemarsh/jswat/command/aboutCommand.java", "license": "gpl-2.0", "size": 2242 }
[ "com.bluemarsh.jswat.util.AppVersion" ]
import com.bluemarsh.jswat.util.AppVersion;
import com.bluemarsh.jswat.util.*;
[ "com.bluemarsh.jswat" ]
com.bluemarsh.jswat;
51,057
private void responseError(final HttpServletRequest req, final ServletResponse res) throws IOException { HttpServletResponse response = (HttpServletResponse) res; this.logger.error(SessionFilter.ACCESS_DENIED); response.sendRedirect(req.getContextPath()); }
void function(final HttpServletRequest req, final ServletResponse res) throws IOException { HttpServletResponse response = (HttpServletResponse) res; this.logger.error(SessionFilter.ACCESS_DENIED); response.sendRedirect(req.getContextPath()); }
/** * Response an error. * * @param res * ServletResponse * @param req * HTTP request. * @throws IOException * if the writer is not available. */
Response an error
responseError
{ "repo_name": "oswa/bianccoAdmin", "path": "BianccoAdministrator/src/main/java/com/biancco/admin/filter/SessionFilter.java", "license": "apache-2.0", "size": 3521 }
[ "java.io.IOException", "javax.servlet.ServletResponse", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
622,488
protected Set<IntFilter> getFilters() { return mFilters; } public CSVFilter(String aPattern) throws NumberFormatException { final StringTokenizer tokenizer = new StringTokenizer(aPattern, ","); while (tokenizer.hasMoreTokens()) { final String token = tokenizer.nextToken().trim(); final int index = token.indexOf("-"); if (index == -1) { final int matchValue = Integer.parseInt(token); addFilter(new IntMatchFilter(matchValue)); } else { final int lowerBound = Integer.parseInt(token.substring(0, index)); final int upperBound = Integer.parseInt(token.substring(index + 1)); addFilter(new IntRangeFilter(lowerBound, upperBound)); } } }
Set<IntFilter> function() { return mFilters; } public CSVFilter(String aPattern) throws NumberFormatException { final StringTokenizer tokenizer = new StringTokenizer(aPattern, ","); while (tokenizer.hasMoreTokens()) { final String token = tokenizer.nextToken().trim(); final int index = token.indexOf("-"); if (index == -1) { final int matchValue = Integer.parseInt(token); addFilter(new IntMatchFilter(matchValue)); } else { final int lowerBound = Integer.parseInt(token.substring(0, index)); final int upperBound = Integer.parseInt(token.substring(index + 1)); addFilter(new IntRangeFilter(lowerBound, upperBound)); } } }
/** * Returns the IntFilters of the filter set. * @return the IntFilters of the filter set. */
Returns the IntFilters of the filter set
getFilters
{ "repo_name": "lhanson/checkstyle", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/filters/CSVFilter.java", "license": "lgpl-2.1", "size": 3930 }
[ "java.util.Set", "java.util.StringTokenizer" ]
import java.util.Set; import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
2,876,343
public void processQueuedMessagesForBlock(Block b) throws IOException { Queue<ReportedBlockInfo> queue = pendingDNMessages.takeBlockQueue(b); if (queue == null) { // Nothing to re-process return; } processQueuedMessages(queue); }
void function(Block b) throws IOException { Queue<ReportedBlockInfo> queue = pendingDNMessages.takeBlockQueue(b); if (queue == null) { return; } processQueuedMessages(queue); }
/** * Try to process any messages that were previously queued for the given * block. This is called from FSEditLogLoader whenever a block's state * in the namespace has changed or a new block has been created. */
Try to process any messages that were previously queued for the given block. This is called from FSEditLogLoader whenever a block's state in the namespace has changed or a new block has been created
processQueuedMessagesForBlock
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 194442 }
[ "java.io.IOException", "java.util.Queue", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.hdfs.server.blockmanagement.PendingDataNodeMessages" ]
import java.io.IOException; import java.util.Queue; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.blockmanagement.PendingDataNodeMessages;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.blockmanagement.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,475,921
TaskList selectByPrimaryKey(Integer id);
TaskList selectByPrimaryKey(Integer id);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_prj_task_list * * @mbggenerated Thu Jul 16 10:50:12 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table m_prj_task_list
selectByPrimaryKey
{ "repo_name": "uniteddiversity/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/project/dao/TaskListMapper.java", "license": "agpl-3.0", "size": 5566 }
[ "com.esofthead.mycollab.module.project.domain.TaskList" ]
import com.esofthead.mycollab.module.project.domain.TaskList;
import com.esofthead.mycollab.module.project.domain.*;
[ "com.esofthead.mycollab" ]
com.esofthead.mycollab;
2,076,314
public List<ContentItem> getItems() { return items; }
List<ContentItem> function() { return items; }
/** * Gets the items. * * @return the items */
Gets the items
getItems
{ "repo_name": "synergynet/synergynet2.5", "path": "synergynet2.5/src/main/java/apps/twentyfourpoint/message/BroadcastData.java", "license": "bsd-3-clause", "size": 2556 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
241,944
public Set<IV> getSet() { return getSubProperties(); } }; } }
Set<IV> function() { return getSubProperties(); } }; } }
/** * Note: This is the set {P} in the fast closure * program. */
Note: This is the set {P} in the fast closure program
getSet
{ "repo_name": "blazegraph/database", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/rules/RuleFastClosure3.java", "license": "gpl-2.0", "size": 3439 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,203,481
public final static NumberFormat getNumberInstance() { return getNumberInstance(Locale.getDefault()); }
final static NumberFormat function() { return getNumberInstance(Locale.getDefault()); }
/** * Returns a {@code NumberFormat} for formatting and parsing numbers for the * default locale. * * @return a {@code NumberFormat} for handling {@code Number} objects. */
Returns a NumberFormat for formatting and parsing numbers for the default locale
getNumberInstance
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/text/src/main/java/java/text/NumberFormat.java", "license": "gpl-2.0", "size": 35215 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,959,211
@Test public void testIntegerInjectBound() throws InjectionException { List<String> injected = new ArrayList<>(); injected.add("1"); injected.add("2"); injected.add("3"); JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder(); cb.bindList(IntegerList.class, injected); List<Integer> actual = Tang.Factory.getTang().newInjector(cb.build()).getInstance(IntegerClass.class).integerList; List<Integer> expected = new ArrayList<>(); expected.add(1); expected.add(2); expected.add(3); Assert.assertEquals(expected, actual); }
void function() throws InjectionException { List<String> injected = new ArrayList<>(); injected.add("1"); injected.add("2"); injected.add("3"); JavaConfigurationBuilder cb = Tang.Factory.getTang().newConfigurationBuilder(); cb.bindList(IntegerList.class, injected); List<Integer> actual = Tang.Factory.getTang().newInjector(cb.build()).getInstance(IntegerClass.class).integerList; List<Integer> expected = new ArrayList<>(); expected.add(1); expected.add(2); expected.add(3); Assert.assertEquals(expected, actual); }
/** * Test code for injecting list with parsable non-string values * * @throws InjectionException */
Test code for injecting list with parsable non-string values
testIntegerInjectBound
{ "repo_name": "beysims/reef", "path": "lang/java/reef-tang/tang/src/test/java/org/apache/reef/tang/TestListInjection.java", "license": "apache-2.0", "size": 11705 }
[ "java.util.ArrayList", "java.util.List", "org.apache.reef.tang.exceptions.InjectionException", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.List; import org.apache.reef.tang.exceptions.InjectionException; import org.junit.Assert;
import java.util.*; import org.apache.reef.tang.exceptions.*; import org.junit.*;
[ "java.util", "org.apache.reef", "org.junit" ]
java.util; org.apache.reef; org.junit;
1,964,353
static Object getType(String name, Object defaultSpace) { Object type = null; Project p = ProjectManager.getManager().getCurrentProject(); // Should we be getting this from the GUI? BT 11 aug 2002 type = p.findType(name, false); if (type == null) { // no type defined yet type = Model.getCoreFactory().buildClass(name, defaultSpace); } return type; }
static Object getType(String name, Object defaultSpace) { Object type = null; Project p = ProjectManager.getManager().getCurrentProject(); type = p.findType(name, false); if (type == null) { type = Model.getCoreFactory().buildClass(name, defaultSpace); } return type; }
/** * Finds the classifier associated with the type named in name. * * @param name * The name of the type to get. * @param defaultSpace * The default name-space to place the type in. * @return The classifier associated with the name. */
Finds the classifier associated with the type named in name
getType
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_critics/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java", "license": "gpl-3.0", "size": 52562 }
[ "org.argouml.kernel.Project", "org.argouml.kernel.ProjectManager", "org.argouml.model.Model" ]
import org.argouml.kernel.Project; import org.argouml.kernel.ProjectManager; import org.argouml.model.Model;
import org.argouml.kernel.*; import org.argouml.model.*;
[ "org.argouml.kernel", "org.argouml.model" ]
org.argouml.kernel; org.argouml.model;
2,174,744
public void setPropertyForIndex(Element element, String key, Object value) { setPropertyForIndex(element, key, value, false); }
void function(Element element, String key, Object value) { setPropertyForIndex(element, key, value, false); }
/** * Add the property to this index, if autoindexing is enabled * and/or the given key has indexing enabled. * @param element * @param key * @param value */
Add the property to this index, if autoindexing is enabled and/or the given key has indexing enabled
setPropertyForIndex
{ "repo_name": "estkae/AccumuloGraph", "path": "src/main/java/edu/jhuapl/tinkerpop/tables/index/BaseIndexValuesTableWrapper.java", "license": "apache-2.0", "size": 6015 }
[ "com.tinkerpop.blueprints.Element" ]
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.blueprints.*;
[ "com.tinkerpop.blueprints" ]
com.tinkerpop.blueprints;
821,019
@BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final ArtifactRegistryClient create(ArtifactRegistryStub stub) { return new ArtifactRegistryClient(stub); } protected ArtifactRegistryClient(ArtifactRegistrySettings settings) throws IOException { this.settings = settings; this.stub = ((ArtifactRegistryStubSettings) settings.getStubSettings()).createStub(); } @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected ArtifactRegistryClient(ArtifactRegistryStub stub) { this.settings = null; this.stub = stub; }
@BetaApi(STR) static final ArtifactRegistryClient function(ArtifactRegistryStub stub) { return new ArtifactRegistryClient(stub); } protected ArtifactRegistryClient(ArtifactRegistrySettings settings) throws IOException { this.settings = settings; this.stub = ((ArtifactRegistryStubSettings) settings.getStubSettings()).createStub(); } @BetaApi(STR) protected ArtifactRegistryClient(ArtifactRegistryStub stub) { this.settings = null; this.stub = stub; }
/** * Constructs an instance of ArtifactRegistryClient, using the given stub for making calls. This * is for advanced usage - prefer using create(ArtifactRegistrySettings). */
Constructs an instance of ArtifactRegistryClient, using the given stub for making calls. This is for advanced usage - prefer using create(ArtifactRegistrySettings)
create
{ "repo_name": "googleapis/java-artifact-registry", "path": "google-cloud-artifact-registry/src/main/java/com/google/devtools/artifactregistry/v1/ArtifactRegistryClient.java", "license": "apache-2.0", "size": 25063 }
[ "com.google.api.core.BetaApi", "com.google.devtools.artifactregistry.v1.stub.ArtifactRegistryStub", "com.google.devtools.artifactregistry.v1.stub.ArtifactRegistryStubSettings", "java.io.IOException" ]
import com.google.api.core.BetaApi; import com.google.devtools.artifactregistry.v1.stub.ArtifactRegistryStub; import com.google.devtools.artifactregistry.v1.stub.ArtifactRegistryStubSettings; import java.io.IOException;
import com.google.api.core.*; import com.google.devtools.artifactregistry.v1.stub.*; import java.io.*;
[ "com.google.api", "com.google.devtools", "java.io" ]
com.google.api; com.google.devtools; java.io;
2,695,583
@Column(name = "RNT_CAR_FUEL_AMT", precision=8, scale=2, nullable = true) public KualiDecimal getRentalCarFuelAmount() { return rentalCarFuelAmount; }
@Column(name = STR, precision=8, scale=2, nullable = true) KualiDecimal function() { return rentalCarFuelAmount; }
/** * Gets the rentalCarFuelAmount attribute. * @return Returns the rentalCarFuelAmount. */
Gets the rentalCarFuelAmount attribute
getRentalCarFuelAmount
{ "repo_name": "bhutchinson/kfs", "path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/businessobject/AgencyStagingData.java", "license": "agpl-3.0", "size": 52782 }
[ "javax.persistence.Column", "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import javax.persistence.Column; import org.kuali.rice.core.api.util.type.KualiDecimal;
import javax.persistence.*; import org.kuali.rice.core.api.util.type.*;
[ "javax.persistence", "org.kuali.rice" ]
javax.persistence; org.kuali.rice;
2,056,270
public static void updateWidget(Context context, AppWidgetManager manager, Song song, int state) { if (!sEnabled) return; RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_d); Bitmap cover = null; if ((state & PlaybackService.FLAG_NO_MEDIA) != 0) { views.setViewVisibility(R.id.buttons, View.GONE); views.setViewVisibility(R.id.title, View.GONE); views.setInt(R.id.artist, "setText", R.string.no_songs); } else if (song == null) { views.setViewVisibility(R.id.buttons, View.VISIBLE); views.setViewVisibility(R.id.title, View.GONE); views.setInt(R.id.artist, "setText", R.string.app_name); } else { views.setViewVisibility(R.id.title, View.VISIBLE); views.setViewVisibility(R.id.buttons, View.VISIBLE); views.setTextViewText(R.id.title, song.title); views.setTextViewText(R.id.artist, song.artist); cover = song.getCover(context); } if (cover == null) { views.setImageViewResource(R.id.cover, R.drawable.fallback_cover); } else { views.setImageViewBitmap(R.id.cover, cover); } boolean playing = (state & PlaybackService.FLAG_PLAYING) != 0; views.setImageViewResource(R.id.play_pause, playing ? R.drawable.pause : R.drawable.play); views.setImageViewResource(R.id.end_action, SongTimeline.FINISH_ICONS[PlaybackService.finishAction(state)]); views.setImageViewResource(R.id.shuffle, SongTimeline.SHUFFLE_ICONS[PlaybackService.shuffleMode(state)]); Intent intent; PendingIntent pendingIntent; ComponentName service = new ComponentName(context, PlaybackService.class); intent = new Intent(context, LibraryActivity.class); intent.setAction(Intent.ACTION_MAIN); pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.cover, pendingIntent); intent = new Intent(PlaybackService.ACTION_TOGGLE_PLAYBACK).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.play_pause, pendingIntent); intent = new Intent(PlaybackService.ACTION_NEXT_SONG).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.next, pendingIntent); intent = new Intent(PlaybackService.ACTION_PREVIOUS_SONG).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.previous, pendingIntent); intent = new Intent(PlaybackService.ACTION_CYCLE_SHUFFLE).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.shuffle, pendingIntent); intent = new Intent(PlaybackService.ACTION_CYCLE_REPEAT).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.end_action, pendingIntent); manager.updateAppWidget(new ComponentName(context, WidgetD.class), views); }
static void function(Context context, AppWidgetManager manager, Song song, int state) { if (!sEnabled) return; RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_d); Bitmap cover = null; if ((state & PlaybackService.FLAG_NO_MEDIA) != 0) { views.setViewVisibility(R.id.buttons, View.GONE); views.setViewVisibility(R.id.title, View.GONE); views.setInt(R.id.artist, STR, R.string.no_songs); } else if (song == null) { views.setViewVisibility(R.id.buttons, View.VISIBLE); views.setViewVisibility(R.id.title, View.GONE); views.setInt(R.id.artist, STR, R.string.app_name); } else { views.setViewVisibility(R.id.title, View.VISIBLE); views.setViewVisibility(R.id.buttons, View.VISIBLE); views.setTextViewText(R.id.title, song.title); views.setTextViewText(R.id.artist, song.artist); cover = song.getCover(context); } if (cover == null) { views.setImageViewResource(R.id.cover, R.drawable.fallback_cover); } else { views.setImageViewBitmap(R.id.cover, cover); } boolean playing = (state & PlaybackService.FLAG_PLAYING) != 0; views.setImageViewResource(R.id.play_pause, playing ? R.drawable.pause : R.drawable.play); views.setImageViewResource(R.id.end_action, SongTimeline.FINISH_ICONS[PlaybackService.finishAction(state)]); views.setImageViewResource(R.id.shuffle, SongTimeline.SHUFFLE_ICONS[PlaybackService.shuffleMode(state)]); Intent intent; PendingIntent pendingIntent; ComponentName service = new ComponentName(context, PlaybackService.class); intent = new Intent(context, LibraryActivity.class); intent.setAction(Intent.ACTION_MAIN); pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.cover, pendingIntent); intent = new Intent(PlaybackService.ACTION_TOGGLE_PLAYBACK).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.play_pause, pendingIntent); intent = new Intent(PlaybackService.ACTION_NEXT_SONG).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.next, pendingIntent); intent = new Intent(PlaybackService.ACTION_PREVIOUS_SONG).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.previous, pendingIntent); intent = new Intent(PlaybackService.ACTION_CYCLE_SHUFFLE).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.shuffle, pendingIntent); intent = new Intent(PlaybackService.ACTION_CYCLE_REPEAT).setComponent(service); pendingIntent = PendingIntent.getService(context, 0, intent, 0); views.setOnClickPendingIntent(R.id.end_action, pendingIntent); manager.updateAppWidget(new ComponentName(context, WidgetD.class), views); }
/** * Populate the widgets with the given ids with the given info. * * @param context A Context to use. * @param manager The AppWidgetManager that will be used to update the * widget. * @param song The current Song in PlaybackService. * @param state The current PlaybackService state. */
Populate the widgets with the given ids with the given info
updateWidget
{ "repo_name": "owoc/teardrop", "path": "app/src/main/java/mp/teardrop/WidgetD.java", "license": "gpl-3.0", "size": 5875 }
[ "android.app.PendingIntent", "android.appwidget.AppWidgetManager", "android.content.ComponentName", "android.content.Context", "android.content.Intent", "android.graphics.Bitmap", "android.view.View", "android.widget.RemoteViews" ]
import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.view.View; import android.widget.RemoteViews;
import android.app.*; import android.appwidget.*; import android.content.*; import android.graphics.*; import android.view.*; import android.widget.*;
[ "android.app", "android.appwidget", "android.content", "android.graphics", "android.view", "android.widget" ]
android.app; android.appwidget; android.content; android.graphics; android.view; android.widget;
281,781
public BigDecimal getBigDecimal (int index) throws LOGJException { Object object = this.get(index); try { return new BigDecimal(object.toString()); } catch (Exception e) { throw new LOGJException("JSONArray[" + index + "] could not convert to BigDecimal."); } }
BigDecimal function (int index) throws LOGJException { Object object = this.get(index); try { return new BigDecimal(object.toString()); } catch (Exception e) { throw new LOGJException(STR + index + STR); } }
/** * Get the BigDecimal value associated with an index. * * @param index * The index must be between 0 and length() - 1. * @return The value. * @throws LOGJException * If the key is not found or if the value cannot be converted * to a BigDecimal. */
Get the BigDecimal value associated with an index
getBigDecimal
{ "repo_name": "tiscover/logger", "path": "src/main/java/com/tiscover/logging/logstash/messages/json/LOGJArray.java", "license": "gpl-3.0", "size": 41058 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,518,948
private StackPane getRelatedArticlesPane(BibEntry entry) { StackPane root = new StackPane(); root.getStyleClass().add("related-articles-tab"); ProgressIndicator progress = new ProgressIndicator(); progress.setMaxSize(100, 100); MrDLibFetcher fetcher = new MrDLibFetcher(Globals.prefs.get(JabRefPreferences.LANGUAGE), Globals.BUILD_INFO.getVersion()); BackgroundTask .wrap(() -> fetcher.performSearch(entry)) .onRunning(() -> progress.setVisible(true)) .onSuccess(relatedArticles -> { progress.setVisible(false); root.getChildren().add(getRelatedArticleInfo(relatedArticles, fetcher)); }) .onFailure(exception -> { LOGGER.error("Error while fetching from Mr. DLib", exception); progress.setVisible(false); root.getChildren().add(getErrorInfo()); }) .executeWith(Globals.TASK_EXECUTOR); root.getChildren().add(progress); return root; }
StackPane function(BibEntry entry) { StackPane root = new StackPane(); root.getStyleClass().add(STR); ProgressIndicator progress = new ProgressIndicator(); progress.setMaxSize(100, 100); MrDLibFetcher fetcher = new MrDLibFetcher(Globals.prefs.get(JabRefPreferences.LANGUAGE), Globals.BUILD_INFO.getVersion()); BackgroundTask .wrap(() -> fetcher.performSearch(entry)) .onRunning(() -> progress.setVisible(true)) .onSuccess(relatedArticles -> { progress.setVisible(false); root.getChildren().add(getRelatedArticleInfo(relatedArticles, fetcher)); }) .onFailure(exception -> { LOGGER.error(STR, exception); progress.setVisible(false); root.getChildren().add(getErrorInfo()); }) .executeWith(Globals.TASK_EXECUTOR); root.getChildren().add(progress); return root; }
/** * Gets a StackPane of related article information to be displayed in the Related Articles tab * @param entry The currently selected BibEntry on the JabRef UI. * @return A StackPane with related article information to be displayed in the Related Articles tab. */
Gets a StackPane of related article information to be displayed in the Related Articles tab
getRelatedArticlesPane
{ "repo_name": "zellerdev/jabref", "path": "src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java", "license": "mit", "size": 11053 }
[ "org.jabref.Globals", "org.jabref.gui.util.BackgroundTask", "org.jabref.logic.importer.fetcher.MrDLibFetcher", "org.jabref.model.entry.BibEntry", "org.jabref.preferences.JabRefPreferences" ]
import org.jabref.Globals; import org.jabref.gui.util.BackgroundTask; import org.jabref.logic.importer.fetcher.MrDLibFetcher; import org.jabref.model.entry.BibEntry; import org.jabref.preferences.JabRefPreferences;
import org.jabref.*; import org.jabref.gui.util.*; import org.jabref.logic.importer.fetcher.*; import org.jabref.model.entry.*; import org.jabref.preferences.*;
[ "org.jabref", "org.jabref.gui", "org.jabref.logic", "org.jabref.model", "org.jabref.preferences" ]
org.jabref; org.jabref.gui; org.jabref.logic; org.jabref.model; org.jabref.preferences;
670,276
public RouteCalculator getRide(String rideId) { return new RouteCalculator(new File(ridesDirName, rideId)); }
RouteCalculator function(String rideId) { return new RouteCalculator(new File(ridesDirName, rideId)); }
/** * Gets all of the ride data (locations included) associated with a specified ride * @param rideId the identifier of the ride * @return Returns the Ride */
Gets all of the ride data (locations included) associated with a specified ride
getRide
{ "repo_name": "PedalPDX/android-client", "path": "RouteTracker/src/main/java/edu/pdx/cs/pedal/routetracker/DataLayer.java", "license": "mit", "size": 7521 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
944,098
private static void eliminateGroupsWithUnknownTerms(final QueryRoot queryRoot, final GroupNodeBase<IGroupMemberNode> op) { for (int i = 0; i < op.arity(); i++) { final BOp sp = op.get(i); if (!(sp instanceof StatementPatternNode)) { continue; } for (int j = 0; j < sp.arity(); j++) { final BOp term = sp.get(j); if (term instanceof ConstantNode) { final IV iv = ((ConstantNode) term).getValue().getIV(); if (iv == null || iv.isNullIV()) { pruneGroup(queryRoot, op); } } } } for (int i = 0; i < op.arity(); i++) { final BOp child = op.get(i); if (child instanceof GroupNodeBase<?>) { @SuppressWarnings("unchecked") final GroupNodeBase<IGroupMemberNode> childGroup = (GroupNodeBase<IGroupMemberNode>) child; eliminateGroupsWithUnknownTerms(queryRoot, childGroup); } else if (child instanceof QueryBase) { final QueryBase subquery = (QueryBase) child; final GroupNodeBase<IGroupMemberNode> childGroup = (GroupNodeBase<IGroupMemberNode>) subquery .getWhereClause(); eliminateGroupsWithUnknownTerms(queryRoot, childGroup); } } }
static void function(final QueryRoot queryRoot, final GroupNodeBase<IGroupMemberNode> op) { for (int i = 0; i < op.arity(); i++) { final BOp sp = op.get(i); if (!(sp instanceof StatementPatternNode)) { continue; } for (int j = 0; j < sp.arity(); j++) { final BOp term = sp.get(j); if (term instanceof ConstantNode) { final IV iv = ((ConstantNode) term).getValue().getIV(); if (iv == null iv.isNullIV()) { pruneGroup(queryRoot, op); } } } } for (int i = 0; i < op.arity(); i++) { final BOp child = op.get(i); if (child instanceof GroupNodeBase<?>) { @SuppressWarnings(STR) final GroupNodeBase<IGroupMemberNode> childGroup = (GroupNodeBase<IGroupMemberNode>) child; eliminateGroupsWithUnknownTerms(queryRoot, childGroup); } else if (child instanceof QueryBase) { final QueryBase subquery = (QueryBase) child; final GroupNodeBase<IGroupMemberNode> childGroup = (GroupNodeBase<IGroupMemberNode>) subquery .getWhereClause(); eliminateGroupsWithUnknownTerms(queryRoot, childGroup); } } }
/** * If the group has an unknown term, simply prune it out from its parent. * If the group happens to be the top-level of the where, simply replace * the where with an empty join group. * * @param op */
If the group has an unknown term, simply prune it out from its parent. If the group happens to be the top-level of the where, simply replace the where with an empty join group
eliminateGroupsWithUnknownTerms
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTUnknownTermOptimizer.java", "license": "gpl-2.0", "size": 10807 }
[ "com.bigdata.bop.BOp", "com.bigdata.rdf.sparql.ast.ConstantNode", "com.bigdata.rdf.sparql.ast.GroupNodeBase", "com.bigdata.rdf.sparql.ast.IGroupMemberNode", "com.bigdata.rdf.sparql.ast.QueryBase", "com.bigdata.rdf.sparql.ast.QueryRoot", "com.bigdata.rdf.sparql.ast.StatementPatternNode" ]
import com.bigdata.bop.BOp; import com.bigdata.rdf.sparql.ast.ConstantNode; import com.bigdata.rdf.sparql.ast.GroupNodeBase; import com.bigdata.rdf.sparql.ast.IGroupMemberNode; import com.bigdata.rdf.sparql.ast.QueryBase; import com.bigdata.rdf.sparql.ast.QueryRoot; import com.bigdata.rdf.sparql.ast.StatementPatternNode;
import com.bigdata.bop.*; import com.bigdata.rdf.sparql.ast.*;
[ "com.bigdata.bop", "com.bigdata.rdf" ]
com.bigdata.bop; com.bigdata.rdf;
1,668,153
public A4TupleSet eval(Sig sig, int state) { try { if (!solved || eval == null) return new A4TupleSet(factory.noneOf(1), this); if (evalCache.get(state) == null) evalCache.put(state, new LinkedHashMap<Expr,A4TupleSet>()); A4TupleSet ans = evalCache.get(state).get(sig); if (ans != null) return ans; TupleSet ts = eval.evaluate((Expression) TranslateAlloyToKodkod.alloy2kodkod(this, sig), state); ans = new A4TupleSet(ts, this); evalCache.get(state).put(sig, ans); return ans; } catch (Err er) { return new A4TupleSet(factory.noneOf(1), this); } }
A4TupleSet function(Sig sig, int state) { try { if (!solved eval == null) return new A4TupleSet(factory.noneOf(1), this); if (evalCache.get(state) == null) evalCache.put(state, new LinkedHashMap<Expr,A4TupleSet>()); A4TupleSet ans = evalCache.get(state).get(sig); if (ans != null) return ans; TupleSet ts = eval.evaluate((Expression) TranslateAlloyToKodkod.alloy2kodkod(this, sig), state); ans = new A4TupleSet(ts, this); evalCache.get(state).put(sig, ans); return ans; } catch (Err er) { return new A4TupleSet(factory.noneOf(1), this); } }
/** * Return the A4TupleSet for the given sig (if solution not yet solved, or * unsatisfiable, or sig not found, then return an empty tupleset). */
Return the A4TupleSet for the given sig (if solution not yet solved, or unsatisfiable, or sig not found, then return an empty tupleset)
eval
{ "repo_name": "AlloyTools/org.alloytools.alloy", "path": "org.alloytools.alloy.core/src/main/java/edu/mit/csail/sdg/translator/A4Solution.java", "license": "apache-2.0", "size": 84767 }
[ "edu.mit.csail.sdg.alloy4.Err", "edu.mit.csail.sdg.ast.Expr", "edu.mit.csail.sdg.ast.Sig", "java.util.LinkedHashMap" ]
import edu.mit.csail.sdg.alloy4.Err; import edu.mit.csail.sdg.ast.Expr; import edu.mit.csail.sdg.ast.Sig; import java.util.LinkedHashMap;
import edu.mit.csail.sdg.alloy4.*; import edu.mit.csail.sdg.ast.*; import java.util.*;
[ "edu.mit.csail", "java.util" ]
edu.mit.csail; java.util;
928,421
void updateSignupMeeting(SignupMeeting meeting, boolean isOrganizer) throws Exception;
void updateSignupMeeting(SignupMeeting meeting, boolean isOrganizer) throws Exception;
/** * This updates the SingupMeeting object into the database storage. If it's * an organizer, permission: signup.update is required. Otherwise * permission: signup.attend/signup.attend.all is required * * @param meeting * a SignupMeeting object * @param isOrganizer * true if the user is event-organizer * @throws Exception * thrown if something goes bad */
This updates the SingupMeeting object into the database storage. If it's an organizer, permission: signup.update is required. Otherwise permission: signup.attend/signup.attend.all is required
updateSignupMeeting
{ "repo_name": "harfalm/Sakai-10.1", "path": "signup/api/src/java/org/sakaiproject/signup/logic/SignupMeetingService.java", "license": "apache-2.0", "size": 16027 }
[ "org.sakaiproject.signup.model.SignupMeeting" ]
import org.sakaiproject.signup.model.SignupMeeting;
import org.sakaiproject.signup.model.*;
[ "org.sakaiproject.signup" ]
org.sakaiproject.signup;
2,170,614
Assert.isTrue(this.name != null, "name parameter cannot be null"); Assert.isTrue(this.style != null, "style parameter cannot be null"); Assert.isTrue(this.size > 1, "size must be greater than 1"); Font baseFont = null; for (String fontName: this.name) { try { baseFont = new Font(fontName, this.style.styleId, this.size); break; } catch (Exception e) { // try next font in list } } if (baseFont == null) { String[] legalFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); throw new IllegalArgumentException( Arrays.toString(this.name) + " does not contain a font that can be created by this Java " + "Virtual Machine, legal options are: \n" + Arrays.toString(legalFonts)); } }
Assert.isTrue(this.name != null, STR); Assert.isTrue(this.style != null, STR); Assert.isTrue(this.size > 1, STR); Font baseFont = null; for (String fontName: this.name) { try { baseFont = new Font(fontName, this.style.styleId, this.size); break; } catch (Exception e) { } } if (baseFont == null) { String[] legalFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); throw new IllegalArgumentException( Arrays.toString(this.name) + STR + STR + Arrays.toString(legalFonts)); } }
/** * Initialize default values and validate that config is correct. */
Initialize default values and validate that config is correct
postConstruct
{ "repo_name": "marcjansen/mapfish-print", "path": "core/src/main/java/org/mapfish/print/map/geotools/grid/GridFontParam.java", "license": "bsd-2-clause", "size": 1915 }
[ "com.vividsolutions.jts.util.Assert", "java.awt.Font", "java.awt.GraphicsEnvironment", "java.util.Arrays" ]
import com.vividsolutions.jts.util.Assert; import java.awt.Font; import java.awt.GraphicsEnvironment; import java.util.Arrays;
import com.vividsolutions.jts.util.*; import java.awt.*; import java.util.*;
[ "com.vividsolutions.jts", "java.awt", "java.util" ]
com.vividsolutions.jts; java.awt; java.util;
1,915,936
public static HashMap<Integer, String> getNonSiblingCompanySchemas(final Statement statement) throws Exception { // map of company schemas (database names) with SIIE module of Human Resources enabled: HashMap<Integer, String> hrsCompanySchemasMap = getHrsCompanySchemas(statement); // get list of sibling-company ID's: String[] siblingCompanyIds = SLibUtils.textExplode(SCfgUtils.getParamValue(statement, SDataConstantsSys.CFG_PARAM_HRS_SIBLING_COMPANIES), ";"); // get current company ID: int currentCompanyId = getCurrentCompanyId(statement); // prepare map of ID's of company (key) and schemas (database names) (value) of non-sibling companies with SIIE module of Human Resources enabled: HashMap<Integer, String> schemasMap = new HashMap<>(); for (Integer hrsCompanyId : hrsCompanySchemasMap.keySet()) { if (hrsCompanyId == currentCompanyId) { continue; // skip current company (obviously) } boolean isSibling = false; for (String siblingCompanyId : siblingCompanyIds) { if (hrsCompanyId == SLibUtils.parseInt(siblingCompanyId)) { isSibling = true; break; } } if (!isSibling) { schemasMap.put(hrsCompanyId, hrsCompanySchemasMap.get(hrsCompanyId)); } } return schemasMap; }
static HashMap<Integer, String> function(final Statement statement) throws Exception { HashMap<Integer, String> hrsCompanySchemasMap = getHrsCompanySchemas(statement); String[] siblingCompanyIds = SLibUtils.textExplode(SCfgUtils.getParamValue(statement, SDataConstantsSys.CFG_PARAM_HRS_SIBLING_COMPANIES), ";"); int currentCompanyId = getCurrentCompanyId(statement); HashMap<Integer, String> schemasMap = new HashMap<>(); for (Integer hrsCompanyId : hrsCompanySchemasMap.keySet()) { if (hrsCompanyId == currentCompanyId) { continue; } boolean isSibling = false; for (String siblingCompanyId : siblingCompanyIds) { if (hrsCompanyId == SLibUtils.parseInt(siblingCompanyId)) { isSibling = true; break; } } if (!isSibling) { schemasMap.put(hrsCompanyId, hrsCompanySchemasMap.get(hrsCompanyId)); } } return schemasMap; }
/** * Get map of non sibling-company schemas (database names) with SIIE module of Human Resources enabled. * @param statement Database statement. * @return <code>HashMap</code> of non sibling-company schemas (database names) with SIIE module of Human Resources enabled: key = ID of company; value = schema (database name) of company. * @throws java.lang.Exception */
Get map of non sibling-company schemas (database names) with SIIE module of Human Resources enabled
getNonSiblingCompanySchemas
{ "repo_name": "swaplicado/siie32", "path": "src/erp/mod/hrs/db/SHrsEmployeeUtils.java", "license": "mit", "size": 11726 }
[ "java.sql.Statement", "java.util.HashMap", "sa.lib.SLibUtils" ]
import java.sql.Statement; import java.util.HashMap; import sa.lib.SLibUtils;
import java.sql.*; import java.util.*; import sa.lib.*;
[ "java.sql", "java.util", "sa.lib" ]
java.sql; java.util; sa.lib;
1,315,204
public synchronized boolean hasExpiredCnxToServer(ServerLocation currentServer) { if (!this.allConnections.isEmpty()) { //boolean idlePossible = isIdleExpirePossible(); final long now = System.nanoTime(); for (Iterator it = this.allConnections.iterator(); it.hasNext();) { PooledConnection pc = (PooledConnection)it.next(); if (pc.shouldDestroy()) { // this con has already been destroyed so ignore it continue; } else if ( currentServer.equals(pc.getServer()) ) { { long life = pc.remainingLife(now, lifetimeTimeoutNanos); if (life <= 0) { return true; } } } } } return false; }
synchronized boolean function(ServerLocation currentServer) { if (!this.allConnections.isEmpty()) { final long now = System.nanoTime(); for (Iterator it = this.allConnections.iterator(); it.hasNext();) { PooledConnection pc = (PooledConnection)it.next(); if (pc.shouldDestroy()) { continue; } else if ( currentServer.equals(pc.getServer()) ) { { long life = pc.remainingLife(now, lifetimeTimeoutNanos); if (life <= 0) { return true; } } } } } return false; }
/** * Return true if we have a connection to the currentServer whose * lifetime has expired. * Otherwise return false; */
Return true if we have a connection to the currentServer whose lifetime has expired. Otherwise return false
hasExpiredCnxToServer
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java", "license": "apache-2.0", "size": 58172 }
[ "com.gemstone.gemfire.distributed.internal.ServerLocation", "java.util.Iterator" ]
import com.gemstone.gemfire.distributed.internal.ServerLocation; import java.util.Iterator;
import com.gemstone.gemfire.distributed.internal.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
2,805,032
public Map<String, NXmoderator> getAllModerator();
Map<String, NXmoderator> function();
/** * Get all NXmoderator nodes: * <ul> * <li></li> * </ul> * * @return a map from node names to the NXmoderator for that node. */
Get all NXmoderator nodes:
getAllModerator
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXinstrument.java", "license": "epl-1.0", "size": 30156 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,616,711
public boolean dispatchMediaKeyEvent(KeyEvent event) { return useController() && controller.dispatchMediaKeyEvent(event); }
boolean function(KeyEvent event) { return useController() && controller.dispatchMediaKeyEvent(event); }
/** * Called to process media key events. Any {@link KeyEvent} can be passed but only media key * events will be handled. Does nothing if playback controls are disabled. * * @param event A key event. * @return Whether the key event was handled. */
Called to process media key events. Any <code>KeyEvent</code> can be passed but only media key events will be handled. Does nothing if playback controls are disabled
dispatchMediaKeyEvent
{ "repo_name": "ened/ExoPlayer", "path": "library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java", "license": "apache-2.0", "size": 60097 }
[ "android.view.KeyEvent" ]
import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
2,012,601
public void selectFolder(@Nullable final Uri startUri) { selectFolderInternal(SelectAction.SELECT_FOLDER, null, startUri, null); }
void function(@Nullable final Uri startUri) { selectFolderInternal(SelectAction.SELECT_FOLDER, null, startUri, null); }
/** Asks user to select a folder for single-time-usage (location and permission is not persisted) * if a callback for action {@link SelectAction#SELECT_FOLDER} is registered, it will be called after selection has finished * */
Asks user to select a folder for single-time-usage (location and permission is not persisted) if a callback for action <code>SelectAction#SELECT_FOLDER</code> is registered, it will be called after selection has finished
selectFolder
{ "repo_name": "matej116/cgeo", "path": "main/src/cgeo/geocaching/storage/ContentStorageActivityHelper.java", "license": "apache-2.0", "size": 23914 }
[ "android.net.Uri", "androidx.annotation.Nullable" ]
import android.net.Uri; import androidx.annotation.Nullable;
import android.net.*; import androidx.annotation.*;
[ "android.net", "androidx.annotation" ]
android.net; androidx.annotation;
2,736,301
protected boolean scanStartElementAfterName() throws IOException, XNIException { // REVISIT - [Q] Why do we need this temp variable? -- mrglavas String rawname = fElementQName.rawname; if (fBindNamespaces) { fNamespaceContext.pushContext(); if (fScannerState == SCANNER_STATE_ROOT_ELEMENT) { if (fPerformValidation) { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "MSG_GRAMMAR_NOT_FOUND", new Object[]{ rawname}, XMLErrorReporter.SEVERITY_ERROR); if (fDoctypeName == null || !fDoctypeName.equals(rawname)) { fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN, "RootElementTypeMustMatchDoctypedecl", new Object[]{fDoctypeName, rawname}, XMLErrorReporter.SEVERITY_ERROR); } } } } // push element stack fCurrentElement = fElementStack.pushElement(fElementQName); // attributes boolean empty = false; fAttributes.removeAllAttributes(); do { // end tag? int c = fEntityScanner.peekChar(); if (c == '>') { fEntityScanner.scanChar(); break; } else if (c == '/') { fEntityScanner.scanChar(); if (!fEntityScanner.skipChar('>')) { reportFatalError("ElementUnterminated", new Object[]{rawname}); } empty = true; break; } else if (!isValidNameStartChar(c) || !fSawSpace) { reportFatalError("ElementUnterminated", new Object[]{rawname}); } // attributes scanAttribute(fAttributes); // spaces fSawSpace = fEntityScanner.skipSpaces(); } while (true); if (fBindNamespaces) { // REVISIT: is it required? forbit xmlns prefix for element if (fElementQName.prefix == XMLSymbols.PREFIX_XMLNS) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "ElementXMLNSPrefix", new Object[]{fElementQName.rawname}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } // bind the element String prefix = fElementQName.prefix != null ? fElementQName.prefix : XMLSymbols.EMPTY_STRING; // assign uri to the element fElementQName.uri = fNamespaceContext.getURI(prefix); // make sure that object in the element stack is updated as well fCurrentElement.uri = fElementQName.uri; if (fElementQName.prefix == null && fElementQName.uri != null) { fElementQName.prefix = XMLSymbols.EMPTY_STRING; // making sure that the object in the element stack is updated too. fCurrentElement.prefix = XMLSymbols.EMPTY_STRING; } if (fElementQName.prefix != null && fElementQName.uri == null) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "ElementPrefixUnbound", new Object[]{fElementQName.prefix, fElementQName.rawname}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } // bind attributes (xmlns are already bound bellow) int length = fAttributes.getLength(); // fLength = 0; //initialize structure for (int i = 0; i < length; i++) { fAttributes.getName(i, fAttributeQName); String aprefix = fAttributeQName.prefix != null ? fAttributeQName.prefix : XMLSymbols.EMPTY_STRING; String uri = fNamespaceContext.getURI(aprefix); // REVISIT: try removing the first "if" and see if it is faster. // if (fAttributeQName.uri != null && fAttributeQName.uri == uri) { // checkDuplicates(fAttributeQName, fAttributes); continue; } if (aprefix != XMLSymbols.EMPTY_STRING) { fAttributeQName.uri = uri; if (uri == null) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "AttributePrefixUnbound", new Object[]{fElementQName.rawname,fAttributeQName.rawname,aprefix}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } fAttributes.setURI(i, uri); // checkDuplicates(fAttributeQName, fAttributes); } } if (length > 1) { QName name = fAttributes.checkDuplicatesNS(); if (name != null) { if (name.uri != null) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "AttributeNSNotUnique", new Object[]{fElementQName.rawname, name.localpart, name.uri}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } else { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, "AttributeNotUnique", new Object[]{fElementQName.rawname, name.rawname}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } } } } // call handler if (fDocumentHandler != null) { if (empty) { //decrease the markup depth.. fMarkupDepth--; // check that this element was opened in the same entity if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) { reportFatalError("ElementEntityMismatch", new Object[]{fCurrentElement.rawname}); } fDocumentHandler.emptyElement(fElementQName, fAttributes, null); if (fBindNamespaces) { fNamespaceContext.popContext(); } //pop the element off the stack.. fElementStack.popElement(fElementQName); } else { fDocumentHandler.startElement(fElementQName, fAttributes, null); } } if (DEBUG_CONTENT_SCANNING) System.out.println("<<< scanStartElementAfterName(): "+empty); return empty; } // scanStartElementAfterName()
boolean function() throws IOException, XNIException { String rawname = fElementQName.rawname; if (fBindNamespaces) { fNamespaceContext.pushContext(); if (fScannerState == SCANNER_STATE_ROOT_ELEMENT) { if (fPerformValidation) { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, STR, new Object[]{ rawname}, XMLErrorReporter.SEVERITY_ERROR); if (fDoctypeName == null !fDoctypeName.equals(rawname)) { fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN, STR, new Object[]{fDoctypeName, rawname}, XMLErrorReporter.SEVERITY_ERROR); } } } } fCurrentElement = fElementStack.pushElement(fElementQName); boolean empty = false; fAttributes.removeAllAttributes(); do { int c = fEntityScanner.peekChar(); if (c == '>') { fEntityScanner.scanChar(); break; } else if (c == '/') { fEntityScanner.scanChar(); if (!fEntityScanner.skipChar('>')) { reportFatalError(STR, new Object[]{rawname}); } empty = true; break; } else if (!isValidNameStartChar(c) !fSawSpace) { reportFatalError(STR, new Object[]{rawname}); } scanAttribute(fAttributes); fSawSpace = fEntityScanner.skipSpaces(); } while (true); if (fBindNamespaces) { if (fElementQName.prefix == XMLSymbols.PREFIX_XMLNS) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, STR, new Object[]{fElementQName.rawname}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } String prefix = fElementQName.prefix != null ? fElementQName.prefix : XMLSymbols.EMPTY_STRING; fElementQName.uri = fNamespaceContext.getURI(prefix); fCurrentElement.uri = fElementQName.uri; if (fElementQName.prefix == null && fElementQName.uri != null) { fElementQName.prefix = XMLSymbols.EMPTY_STRING; fCurrentElement.prefix = XMLSymbols.EMPTY_STRING; } if (fElementQName.prefix != null && fElementQName.uri == null) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, STR, new Object[]{fElementQName.prefix, fElementQName.rawname}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } int length = fAttributes.getLength(); for (int i = 0; i < length; i++) { fAttributes.getName(i, fAttributeQName); String aprefix = fAttributeQName.prefix != null ? fAttributeQName.prefix : XMLSymbols.EMPTY_STRING; String uri = fNamespaceContext.getURI(aprefix); continue; } if (aprefix != XMLSymbols.EMPTY_STRING) { fAttributeQName.uri = uri; if (uri == null) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, STR, new Object[]{fElementQName.rawname,fAttributeQName.rawname,aprefix}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } fAttributes.setURI(i, uri); } } if (length > 1) { QName name = fAttributes.checkDuplicatesNS(); if (name != null) { if (name.uri != null) { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, STR, new Object[]{fElementQName.rawname, name.localpart, name.uri}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } else { fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN, STR, new Object[]{fElementQName.rawname, name.rawname}, XMLErrorReporter.SEVERITY_FATAL_ERROR); } } } } if (fDocumentHandler != null) { if (empty) { fMarkupDepth--; if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) { reportFatalError(STR, new Object[]{fCurrentElement.rawname}); } fDocumentHandler.emptyElement(fElementQName, fAttributes, null); if (fBindNamespaces) { fNamespaceContext.popContext(); } fElementStack.popElement(fElementQName); } else { fDocumentHandler.startElement(fElementQName, fAttributes, null); } } if (DEBUG_CONTENT_SCANNING) System.out.println(STR+empty); return empty; }
/** * Scans the remainder of a start or empty tag after the element name. * * @see #scanStartElement * @return True if element is empty. */
Scans the remainder of a start or empty tag after the element name
scanStartElementAfterName
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/xerces/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java", "license": "gpl-2.0", "size": 32797 }
[ "java.io.IOException", "org.apache.xerces.impl.msg.XMLMessageFormatter", "org.apache.xerces.util.XMLSymbols", "org.apache.xerces.xni.QName", "org.apache.xerces.xni.XNIException" ]
import java.io.IOException; import org.apache.xerces.impl.msg.XMLMessageFormatter; import org.apache.xerces.util.XMLSymbols; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XNIException;
import java.io.*; import org.apache.xerces.impl.msg.*; import org.apache.xerces.util.*; import org.apache.xerces.xni.*;
[ "java.io", "org.apache.xerces" ]
java.io; org.apache.xerces;
1,529,067
public void setChargeAmt (BigDecimal ChargeAmt);
void function (BigDecimal ChargeAmt);
/** Set Charge amount. * Charge Amount */
Set Charge amount. Charge Amount
setChargeAmt
{ "repo_name": "armenrz/adempiere", "path": "base/src/org/compiere/model/I_M_Movement.java", "license": "gpl-2.0", "size": 16685 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,619,733
@Override public Feed getCollection(final AtomRequest areq) throws AtomException { LOG.debug("getCollection"); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBasedCollection col = service.findCollectionByHandle(handle, collection); return col.getFeedDocument(); }
Feed function(final AtomRequest areq) throws AtomException { LOG.debug(STR); final String[] pathInfo = StringUtils.split(areq.getPathInfo(), "/"); final String handle = pathInfo[0]; final String collection = pathInfo[1]; final FileBasedCollection col = service.findCollectionByHandle(handle, collection); return col.getFeedDocument(); }
/** * Get collection specified by pathinfo. * * @param areq Details of HTTP request * @return ROME feed representing collection. * @throws com.rometools.rome.propono.atom.server.AtomException Invalid collection or other * exception. */
Get collection specified by pathinfo
getCollection
{ "repo_name": "rometools/rome-propono", "path": "src/main/java/com/rometools/propono/atom/server/impl/FileBasedAtomHandler.java", "license": "apache-2.0", "size": 16890 }
[ "com.rometools.propono.atom.server.AtomException", "com.rometools.propono.atom.server.AtomRequest", "com.rometools.rome.feed.atom.Feed", "org.apache.commons.lang3.StringUtils" ]
import com.rometools.propono.atom.server.AtomException; import com.rometools.propono.atom.server.AtomRequest; import com.rometools.rome.feed.atom.Feed; import org.apache.commons.lang3.StringUtils;
import com.rometools.propono.atom.server.*; import com.rometools.rome.feed.atom.*; import org.apache.commons.lang3.*;
[ "com.rometools.propono", "com.rometools.rome", "org.apache.commons" ]
com.rometools.propono; com.rometools.rome; org.apache.commons;
627,605
public boolean removeAttribute(Name attrName) { AttributesImpl attributes = makeAttributesEditable(); boolean removed = false; for (int i = 0; i < attributes.getLength() && !removed; i++) { if (attributes.getURI(i).equals(attrName.getURI()) && attributes.getLocalName(i).equals(attrName.getLocalName())) { attributes.removeAttribute(i); removed = true; } } return removed; }
boolean function(Name attrName) { AttributesImpl attributes = makeAttributesEditable(); boolean removed = false; for (int i = 0; i < attributes.getLength() && !removed; i++) { if (attributes.getURI(i).equals(attrName.getURI()) && attributes.getLocalName(i).equals(attrName.getLocalName())) { attributes.removeAttribute(i); removed = true; } } return removed; }
/** * remove an element * @param attrName name of the element * @return true if the attribute was found and removed. * @see javax.xml.soap.SOAPElement#removeAttribute(javax.xml.soap.Name) */
remove an element
removeAttribute
{ "repo_name": "hugosato/apache-axis", "path": "src/org/apache/axis/message/MessageElement.java", "license": "apache-2.0", "size": 72601 }
[ "javax.xml.soap.Name", "org.xml.sax.helpers.AttributesImpl" ]
import javax.xml.soap.Name; import org.xml.sax.helpers.AttributesImpl;
import javax.xml.soap.*; import org.xml.sax.helpers.*;
[ "javax.xml", "org.xml.sax" ]
javax.xml; org.xml.sax;
562,601
@Deprecated public long renewDelegationToken(Token<DelegationTokenIdentifier> token) throws IOException { LOG.info("Renewing " + DelegationTokenIdentifier.stringifyToken(token)); try { return token.renew(conf); } catch (InterruptedException ie) { throw new RuntimeException("caught interrupted", ie); } catch (RemoteException re) { throw re.unwrapRemoteException(InvalidToken.class, AccessControlException.class); } }
long function(Token<DelegationTokenIdentifier> token) throws IOException { LOG.info(STR + DelegationTokenIdentifier.stringifyToken(token)); try { return token.renew(conf); } catch (InterruptedException ie) { throw new RuntimeException(STR, ie); } catch (RemoteException re) { throw re.unwrapRemoteException(InvalidToken.class, AccessControlException.class); } }
/** * Renew a delegation token * @param token the token to renew * @return the new expiration time * @throws IOException * @deprecated Use Token.renew instead. */
Renew a delegation token
renewDelegationToken
{ "repo_name": "apache/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "apache-2.0", "size": 126123 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier", "org.apache.hadoop.ipc.RemoteException", "org.apache.hadoop.security.AccessControlException", "org.apache.hadoop.security.token.SecretManager", "org.apache.hadoop.security.token.Token" ]
import java.io.IOException; import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; import org.apache.hadoop.ipc.RemoteException; import org.apache.hadoop.security.AccessControlException; import org.apache.hadoop.security.token.SecretManager; import org.apache.hadoop.security.token.Token;
import java.io.*; import org.apache.hadoop.hdfs.security.token.delegation.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.token.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
598,215
private void fetchAuthorizations(final Map<Integer, SystemRoleVo> results) { final var auths = authorizationRepository.findAll(); for (final var auth : auths) { final var authVo = new AuthorizationEditionVo(); results.get(auth.getRole().getId()).getAuthorizations().add(authVo); authVo.setId(auth.getId()); authVo.setPattern(auth.getPattern()); authVo.setType(auth.getType()); } }
void function(final Map<Integer, SystemRoleVo> results) { final var auths = authorizationRepository.findAll(); for (final var auth : auths) { final var authVo = new AuthorizationEditionVo(); results.get(auth.getRole().getId()).getAuthorizations().add(authVo); authVo.setId(auth.getId()); authVo.setPattern(auth.getPattern()); authVo.setType(auth.getType()); } }
/** * Fetch authorizations and add them to result parameter. */
Fetch authorizations and add them to result parameter
fetchAuthorizations
{ "repo_name": "ligoj/bootstrap", "path": "bootstrap-business/src/main/java/org/ligoj/bootstrap/resource/system/security/RoleResource.java", "license": "mit", "size": 5727 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,548,703
public void displayOnlyType(@AllTypes int postType) { for (int type : getPossibleTypes()) { if (type == postType) SharedPreferenceHelper.setSharedPreferenceBoolean(mView, SettingsHelper.getSharedPreferenceKeyForType(type), true); else SharedPreferenceHelper.setSharedPreferenceBoolean(mView, SettingsHelper.getSharedPreferenceKeyForType(type), false); } SettingsHelper.loadAllSettings(mView); updateCurrentPosts(); }
void function(@AllTypes int postType) { for (int type : getPossibleTypes()) { if (type == postType) SharedPreferenceHelper.setSharedPreferenceBoolean(mView, SettingsHelper.getSharedPreferenceKeyForType(type), true); else SharedPreferenceHelper.setSharedPreferenceBoolean(mView, SettingsHelper.getSharedPreferenceKeyForType(type), false); } SettingsHelper.loadAllSettings(mView); updateCurrentPosts(); }
/** * Sets the allowedTypes only to the received postType, to display just one category. * * @param postType Type to display */
Sets the allowedTypes only to the received postType, to display just one category
displayOnlyType
{ "repo_name": "Gambleon/pietsmiet_android", "path": "app/src/main/java/de/pscom/pietsmiet/util/PostManager.java", "license": "gpl-3.0", "size": 14206 }
[ "de.pscom.pietsmiet.util.PostType" ]
import de.pscom.pietsmiet.util.PostType;
import de.pscom.pietsmiet.util.*;
[ "de.pscom.pietsmiet" ]
de.pscom.pietsmiet;
1,906,066
private void initGUI() { // C O M P O N E N T S --------------------------------------------- this.jlblName = new JLabel(EzimLang.To); this.jtfdName = new JTextField(this.ec.getName()); this.jtfdName.setEditable(false); this.jlblFName = new JLabel(EzimLang.Filename); this.jtfdFName = new JTextField(); if (this.file != null) this.jtfdFName.setText(this.file.getName()); this.jtfdFName.setEditable(false); this.jlblSize = new JLabel(EzimLang.Size); this.jtfdSize = new JTextField(); this.jtfdSize.setEditable(false); this.jpbProgress = new JProgressBar(); this.jpbProgress.setStringPainted(true); this.jlblSysMsg = new JLabel(EzimLang.WaitingForResponse);
void function() { this.jlblName = new JLabel(EzimLang.To); this.jtfdName = new JTextField(this.ec.getName()); this.jtfdName.setEditable(false); this.jlblFName = new JLabel(EzimLang.Filename); this.jtfdFName = new JTextField(); if (this.file != null) this.jtfdFName.setText(this.file.getName()); this.jtfdFName.setEditable(false); this.jlblSize = new JLabel(EzimLang.Size); this.jtfdSize = new JTextField(); this.jtfdSize.setEditable(false); this.jpbProgress = new JProgressBar(); this.jpbProgress.setStringPainted(true); this.jlblSysMsg = new JLabel(EzimLang.WaitingForResponse);
/** * initialize GUI components */
initialize GUI components
initGUI
{ "repo_name": "ldohxc/SOEN343", "path": "org/ezim/ui/EzimFileOut.java", "license": "gpl-3.0", "size": 11667 }
[ "javax.swing.JLabel", "javax.swing.JProgressBar", "javax.swing.JTextField", "org.ezim.core.EzimLang" ]
import javax.swing.JLabel; import javax.swing.JProgressBar; import javax.swing.JTextField; import org.ezim.core.EzimLang;
import javax.swing.*; import org.ezim.core.*;
[ "javax.swing", "org.ezim.core" ]
javax.swing; org.ezim.core;
2,622,540
@Override public DecimalType transform(PowerConsumptionState powerConsumptionState) { return new DecimalType(powerConsumptionState.getCurrent() * MILLI_TO_AMPERE); }
DecimalType function(PowerConsumptionState powerConsumptionState) { return new DecimalType(powerConsumptionState.getCurrent() * MILLI_TO_AMPERE); }
/** * Get the current in milli ampere from a PowerConsumptionState. * * @param powerConsumptionState the state * * @return the current in milli ampere */
Get the current in milli ampere from a PowerConsumptionState
transform
{ "repo_name": "DivineThreepwood/bco.core-manager", "path": "openhab/src/main/java/org/openbase/bco/device/openhab/manager/transform/PowerConsumptionStateDecimalTypeTransformer.java", "license": "lgpl-3.0", "size": 2546 }
[ "org.eclipse.smarthome.core.library.types.DecimalType", "org.openbase.type.domotic.state.PowerConsumptionStateType" ]
import org.eclipse.smarthome.core.library.types.DecimalType; import org.openbase.type.domotic.state.PowerConsumptionStateType;
import org.eclipse.smarthome.core.library.types.*; import org.openbase.type.domotic.state.*;
[ "org.eclipse.smarthome", "org.openbase.type" ]
org.eclipse.smarthome; org.openbase.type;
2,288,207
public static MozuClient bulkAddPriceListEntriesClient(List<com.mozu.api.contracts.productadmin.PriceListEntry> priceListEntriesIn) throws Exception { return bulkAddPriceListEntriesClient( priceListEntriesIn, null, null); }
static MozuClient function(List<com.mozu.api.contracts.productadmin.PriceListEntry> priceListEntriesIn) throws Exception { return bulkAddPriceListEntriesClient( priceListEntriesIn, null, null); }
/** * * <p><pre><code> * MozuClient mozuClient=BulkAddPriceListEntriesClient( priceListEntriesIn); * client.setBaseAddress(url); * client.executeRequest(); * </code></pre></p> * @param priceListEntriesIn * @return Mozu.Api.MozuClient * @see com.mozu.api.contracts.productadmin.PriceListEntry */
<code><code> MozuClient mozuClient=BulkAddPriceListEntriesClient( priceListEntriesIn); client.setBaseAddress(url); client.executeRequest(); </code></code>
bulkAddPriceListEntriesClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/PriceListClient.java", "license": "mit", "size": 19072 }
[ "com.mozu.api.MozuClient", "java.util.List" ]
import com.mozu.api.MozuClient; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
493,546
@GET @Path("/{entityType}/{entityId}") @Produces({ MediaType.APPLICATION_JSON }) public TimelineEntity getEntity( @Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("entityType") String entityType, @PathParam("entityId") String entityId, @QueryParam("fields") String fields) { init(res); TimelineEntity entity = null; try { entity = timelineDataManager.getEntity( parseStr(entityType), parseStr(entityId), parseFieldsStr(fields, ","), getUser(req)); } catch (IllegalArgumentException e) { throw new BadRequestException( "requested invalid field."); } catch (Exception e) { LOG.error("Error getting entity", e); throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR); } if (entity == null) { throw new NotFoundException("Timeline entity " + new EntityIdentifier(parseStr(entityId), parseStr(entityType)) + " is not found"); } return entity; }
@Path(STR) @Produces({ MediaType.APPLICATION_JSON }) TimelineEntity function( @Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam(STR) String entityType, @PathParam(STR) String entityId, @QueryParam(STR) String fields) { init(res); TimelineEntity entity = null; try { entity = timelineDataManager.getEntity( parseStr(entityType), parseStr(entityId), parseFieldsStr(fields, ","), getUser(req)); } catch (IllegalArgumentException e) { throw new BadRequestException( STR); } catch (Exception e) { LOG.error(STR, e); throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR); } if (entity == null) { throw new NotFoundException(STR + new EntityIdentifier(parseStr(entityId), parseStr(entityType)) + STR); } return entity; }
/** * Return a single entity of the given entity type and Id. */
Return a single entity of the given entity type and Id
getEntity
{ "repo_name": "aliyun-beta/aliyun-oss-hadoop-fs", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/TimelineWebServices.java", "license": "apache-2.0", "size": 14588 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.WebApplicationException", "javax.ws.rs.core.Context", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.apache.hadoop.yarn.api.records.timeline.TimelineEntity", "org.apache.hadoop.yarn.server.timeline.EntityIdentifier", "org.apache.hadoop.yarn.webapp.BadRequestException", "org.apache.hadoop.yarn.webapp.NotFoundException" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity; import org.apache.hadoop.yarn.server.timeline.EntityIdentifier; import org.apache.hadoop.yarn.webapp.BadRequestException; import org.apache.hadoop.yarn.webapp.NotFoundException;
import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.hadoop.yarn.api.records.timeline.*; import org.apache.hadoop.yarn.server.timeline.*; import org.apache.hadoop.yarn.webapp.*;
[ "javax.servlet", "javax.ws", "org.apache.hadoop" ]
javax.servlet; javax.ws; org.apache.hadoop;
550,207
static void printarray(PrintStream out, String name, int expectedLen, double[][] array2d) { out.println(name); MathUtils.checkDimension(expectedLen, array2d.length); out.println(TABLE_START_DECL + " "); int i = 0; for(double[] array : array2d) { // "double array[]" causes PMD parsing error out.print(" {"); for(double d : array) { // assume inner array has very few entries out.printf("%-25.25s", format(d)); // multiple entries per line } out.println("}, // " + i++); } out.println(TABLE_END_DECL); }
static void printarray(PrintStream out, String name, int expectedLen, double[][] array2d) { out.println(name); MathUtils.checkDimension(expectedLen, array2d.length); out.println(TABLE_START_DECL + " "); int i = 0; for(double[] array : array2d) { out.print(STR); for(double d : array) { out.printf(STR, format(d)); } out.println("}, } out.println(TABLE_END_DECL); }
/** * Print an array. * @param out text output stream where output should be printed * @param name array name * @param expectedLen expected length of the array * @param array2d array data */
Print an array
printarray
{ "repo_name": "sdinot/hipparchus", "path": "hipparchus-core/src/main/java/org/hipparchus/util/FastMathCalc.java", "license": "apache-2.0", "size": 21311 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
348,668
@Test public void testRoundLang346() throws Exception { TimeZone.setDefault(defaultZone); dateTimeParser.setTimeZone(defaultZone); final Calendar testCalendar = Calendar.getInstance(); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); Date date = testCalendar.getTime(); assertEquals("Minute Round Up Failed", dateTimeParser.parse("July 2, 2007 08:09:00.000"), DateUtils.round(date, Calendar.MINUTE)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 20); date = testCalendar.getTime(); assertEquals("Minute No Round Failed", dateTimeParser.parse("July 2, 2007 08:08:00.000"), DateUtils.round(date, Calendar.MINUTE)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); testCalendar.set(Calendar.MILLISECOND, 600); date = testCalendar.getTime(); assertEquals("Second Round Up with 600 Milli Seconds Failed", dateTimeParser.parse("July 2, 2007 08:08:51.000"), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); testCalendar.set(Calendar.MILLISECOND, 200); date = testCalendar.getTime(); assertEquals("Second Round Down with 200 Milli Seconds Failed", dateTimeParser.parse("July 2, 2007 08:08:50.000"), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 20); testCalendar.set(Calendar.MILLISECOND, 600); date = testCalendar.getTime(); assertEquals("Second Round Up with 200 Milli Seconds Failed", dateTimeParser.parse("July 2, 2007 08:08:21.000"), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 20); testCalendar.set(Calendar.MILLISECOND, 200); date = testCalendar.getTime(); assertEquals("Second Round Down with 200 Milli Seconds Failed", dateTimeParser.parse("July 2, 2007 08:08:20.000"), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); date = testCalendar.getTime(); assertEquals("Hour Round Down Failed", dateTimeParser.parse("July 2, 2007 08:00:00.000"), DateUtils.round(date, Calendar.HOUR)); testCalendar.set(2007, Calendar.JULY, 2, 8, 31, 50); date = testCalendar.getTime(); assertEquals("Hour Round Up Failed", dateTimeParser.parse("July 2, 2007 09:00:00.000"), DateUtils.round(date, Calendar.HOUR)); }
void function() throws Exception { TimeZone.setDefault(defaultZone); dateTimeParser.setTimeZone(defaultZone); final Calendar testCalendar = Calendar.getInstance(); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); Date date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.MINUTE)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 20); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.MINUTE)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); testCalendar.set(Calendar.MILLISECOND, 600); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); testCalendar.set(Calendar.MILLISECOND, 200); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 20); testCalendar.set(Calendar.MILLISECOND, 600); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 20); testCalendar.set(Calendar.MILLISECOND, 200); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.SECOND)); testCalendar.set(2007, Calendar.JULY, 2, 8, 8, 50); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.HOUR)); testCalendar.set(2007, Calendar.JULY, 2, 8, 31, 50); date = testCalendar.getTime(); assertEquals(STR, dateTimeParser.parse(STR), DateUtils.round(date, Calendar.HOUR)); }
/** * Tests the Changes Made by LANG-346 to the DateUtils.modify() private method invoked * by DateUtils.round(). * * @throws java.lang.Exception so we don't have to catch it */
Tests the Changes Made by LANG-346 to the DateUtils.modify() private method invoked by DateUtils.round()
testRoundLang346
{ "repo_name": "xiwc/commons-lang", "path": "src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java", "license": "apache-2.0", "size": 77393 }
[ "java.util.Calendar", "java.util.Date", "java.util.TimeZone", "org.junit.Assert" ]
import java.util.Calendar; import java.util.Date; import java.util.TimeZone; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,542,630
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items) { if (this.isInCreativeTab(tab)) { for (int i = 0; i < SKULL_TYPES.length; ++i) { items.add(new ItemStack(this, 1, i)); } } }
void function(CreativeTabs tab, NonNullList<ItemStack> items) { if (this.isInCreativeTab(tab)) { for (int i = 0; i < SKULL_TYPES.length; ++i) { items.add(new ItemStack(this, 1, i)); } } }
/** * returns a list of items with the same ID, but different meta (eg: dye returns 16 items) */
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
getSubItems
{ "repo_name": "InverMN/MinecraftForgeReference", "path": "MinecraftItems/ItemSkull.java", "license": "unlicense", "size": 8049 }
[ "net.minecraft.creativetab.CreativeTabs", "net.minecraft.util.NonNullList" ]
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.NonNullList;
import net.minecraft.creativetab.*; import net.minecraft.util.*;
[ "net.minecraft.creativetab", "net.minecraft.util" ]
net.minecraft.creativetab; net.minecraft.util;
1,774,266
Input findInput(Operator operator);
Input findInput(Operator operator);
/** * Returns the input port of this sub-plan for the operator. * @param operator the operator * @return the input port which original operator is the specified one */
Returns the input port of this sub-plan for the operator
findInput
{ "repo_name": "ashigeru/asakusafw-compiler", "path": "compiler-project/plan/src/main/java/com/asakusafw/lang/compiler/planning/SubPlan.java", "license": "apache-2.0", "size": 5626 }
[ "com.asakusafw.lang.compiler.model.graph.Operator" ]
import com.asakusafw.lang.compiler.model.graph.Operator;
import com.asakusafw.lang.compiler.model.graph.*;
[ "com.asakusafw.lang" ]
com.asakusafw.lang;
1,935,519
@SuppressWarnings("PMD.ShortMethodName") public int id() throws IOException { return this.user.json().getJsonNumber("id").intValue(); }
@SuppressWarnings(STR) int function() throws IOException { return this.user.json().getJsonNumber("id").intValue(); }
/** * Get his ID. * @return Unique user ID * @throws IOException If it fails * @checkstyle MethodName (3 lines) */
Get his ID
id
{ "repo_name": "cvrebert/typed-github", "path": "src/main/java/com/jcabi/github/User.java", "license": "bsd-3-clause", "size": 17501 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
442,997
private void runUsingStampedeId(CommandRunnerParams params, StampedeId stampedeId) throws IOException { try (DistBuildService service = DistBuildFactory.newDistBuildService(params)) { BuildJobState jobState = service.fetchBuildJobState(stampedeId); outputResultToTempFile(params, jobState); } }
void function(CommandRunnerParams params, StampedeId stampedeId) throws IOException { try (DistBuildService service = DistBuildFactory.newDistBuildService(params)) { BuildJobState jobState = service.fetchBuildJobState(stampedeId); outputResultToTempFile(params, jobState); } }
/** * Fetches the state from a previous distributed build and outputs all source files that were * deemed required for that build to take place. */
Fetches the state from a previous distributed build and outputs all source files that were deemed required for that build to take place
runUsingStampedeId
{ "repo_name": "rmaz/buck", "path": "src/com/facebook/buck/cli/DistBuildSourceFilesCommand.java", "license": "apache-2.0", "size": 8061 }
[ "com.facebook.buck.distributed.DistBuildService", "com.facebook.buck.distributed.thrift.BuildJobState", "com.facebook.buck.distributed.thrift.StampedeId", "java.io.IOException" ]
import com.facebook.buck.distributed.DistBuildService; import com.facebook.buck.distributed.thrift.BuildJobState; import com.facebook.buck.distributed.thrift.StampedeId; import java.io.IOException;
import com.facebook.buck.distributed.*; import com.facebook.buck.distributed.thrift.*; import java.io.*;
[ "com.facebook.buck", "java.io" ]
com.facebook.buck; java.io;
728,351
public JButton createCancelButton(String uiKey) { return createCancelButton(uiKey, closeListener); }
JButton function(String uiKey) { return createCancelButton(uiKey, closeListener); }
/** * Special method to create a cancel button. Differs from a * standard button because it does not require a mnemonic, per * the Java Look and Feel standard. * @param uiKey key to use to get the tooltip with * @return the button that was created */
Special method to create a cancel button. Differs from a standard button because it does not require a mnemonic, per the Java Look and Feel standard
createCancelButton
{ "repo_name": "Distrotech/icedtea6-1.12", "path": "src/jtreg/com/sun/javatest/tool/UIFactory.java", "license": "gpl-2.0", "size": 117735 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
931,072
final void updateStatsReturn(final Duration activeTime) { returnedCount.incrementAndGet(); activeTimes.add(activeTime); }
final void updateStatsReturn(final Duration activeTime) { returnedCount.incrementAndGet(); activeTimes.add(activeTime); }
/** * Updates statistics after an object is returned to the pool. * * @param activeTime the amount of time (in milliseconds) that the returning * object was checked out */
Updates statistics after an object is returned to the pool
updateStatsReturn
{ "repo_name": "apache/tomcat", "path": "java/org/apache/tomcat/dbcp/pool2/impl/BaseGenericObjectPool.java", "license": "apache-2.0", "size": 75879 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
196,521
EClass getQoolTransformation();
EClass getQoolTransformation();
/** * Returns the meta object for class '{@link org.eclectic.idc.qool.QoolTransformation <em>Transformation</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Transformation</em>'. * @see org.eclectic.idc.qool.QoolTransformation * @generated */
Returns the meta object for class '<code>org.eclectic.idc.qool.QoolTransformation Transformation</code>'.
getQoolTransformation
{ "repo_name": "jesusc/eclectic", "path": "plugins/org.eclectic.idc/src-gen/org/eclectic/idc/qool/QoolPackage.java", "license": "gpl-3.0", "size": 60729 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
644,444
public Handler getAssociatedCompensationHandler(IntermediateEvent event) { List<Association> associations = getAssociationsWithSource(event.getId(), Association.DIRECTION_FROM, Handler.class); for (Iterator<Association> it = associations.iterator(); it.hasNext();) { Handler handler = (Handler)it.next().getTarget(); if (handler.getHandlerType().equals(Handler.TYPE_COMPENSATION)) { return handler; } } associations = getAssociationsWithTarget(event.getId(), Association.DIRECTION_TO, Handler.class); for (Iterator<Association> it = associations.iterator(); it.hasNext();) { Handler handler = (Handler)it.next().getSource(); if (handler.getHandlerType().equals(Handler.TYPE_COMPENSATION)) { return handler; } } return null; }
Handler function(IntermediateEvent event) { List<Association> associations = getAssociationsWithSource(event.getId(), Association.DIRECTION_FROM, Handler.class); for (Iterator<Association> it = associations.iterator(); it.hasNext();) { Handler handler = (Handler)it.next().getTarget(); if (handler.getHandlerType().equals(Handler.TYPE_COMPENSATION)) { return handler; } } associations = getAssociationsWithTarget(event.getId(), Association.DIRECTION_TO, Handler.class); for (Iterator<Association> it = associations.iterator(); it.hasNext();) { Handler handler = (Handler)it.next().getSource(); if (handler.getHandlerType().equals(Handler.TYPE_COMPENSATION)) { return handler; } } return null; }
/** * Determines the first handler that is connected the given event by an * association. Only association with the direction To or From are * considered. Moreover the arrow head of the association must always * be on the handler side. * * @param event The intermediate event to determine the connected handler * for. * * @return The first handler that is connected with the event. Or null if no * handler was found. */
Determines the first handler that is connected the given event by an association. Only association with the direction To or From are considered. Moreover the arrow head of the association must always be on the handler side
getAssociatedCompensationHandler
{ "repo_name": "grasscrm/gdesigner", "path": "editor/server/src/de/hpi/bpel4chor/model/Diagram.java", "license": "apache-2.0", "size": 24986 }
[ "de.hpi.bpel4chor.model.activities.Handler", "de.hpi.bpel4chor.model.activities.IntermediateEvent", "de.hpi.bpel4chor.model.connections.Association", "java.util.Iterator", "java.util.List" ]
import de.hpi.bpel4chor.model.activities.Handler; import de.hpi.bpel4chor.model.activities.IntermediateEvent; import de.hpi.bpel4chor.model.connections.Association; import java.util.Iterator; import java.util.List;
import de.hpi.bpel4chor.model.activities.*; import de.hpi.bpel4chor.model.connections.*; import java.util.*;
[ "de.hpi.bpel4chor", "java.util" ]
de.hpi.bpel4chor; java.util;
2,653,923
public void setDisabledStatus(LockOutFlag flag) { setEnabledStatus(flag.getUsername(), false); }
void function(LockOutFlag flag) { setEnabledStatus(flag.getUsername(), false); }
/** * The ClearspaceLockOutProvider will set lockouts in Clearspace itself. * @see org.jivesoftware.openfire.lockout.LockOutProvider#setDisabledStatus(org.jivesoftware.openfire.lockout.LockOutFlag) */
The ClearspaceLockOutProvider will set lockouts in Clearspace itself
setDisabledStatus
{ "repo_name": "281451241/openfire_src", "path": "src/java/org/jivesoftware/openfire/clearspace/ClearspaceLockOutProvider.java", "license": "apache-2.0", "size": 9374 }
[ "org.jivesoftware.openfire.lockout.LockOutFlag" ]
import org.jivesoftware.openfire.lockout.LockOutFlag;
import org.jivesoftware.openfire.lockout.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
2,230,084
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { if (this.isEntityInvulnerable()) { return false; } else { Entity entity = p_70097_1_.getEntity(); if (entity instanceof EntityPlayer) { List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(32.0D, 32.0D, 32.0D)); for (int i = 0; i < list.size(); ++i) { Entity entity1 = (Entity)list.get(i); if (entity1 instanceof EntityPigZombie) { EntityCandyzombie_pigman EntityCandyzombie_pigman = (EntityCandyzombie_pigman)entity1; EntityCandyzombie_pigman.becomeAngryAt(entity); } } this.becomeAngryAt(entity); } return super.attackEntityFrom(p_70097_1_, p_70097_2_); } }
boolean function(DamageSource p_70097_1_, float p_70097_2_) { if (this.isEntityInvulnerable()) { return false; } else { Entity entity = p_70097_1_.getEntity(); if (entity instanceof EntityPlayer) { List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(32.0D, 32.0D, 32.0D)); for (int i = 0; i < list.size(); ++i) { Entity entity1 = (Entity)list.get(i); if (entity1 instanceof EntityPigZombie) { EntityCandyzombie_pigman EntityCandyzombie_pigman = (EntityCandyzombie_pigman)entity1; EntityCandyzombie_pigman.becomeAngryAt(entity); } } this.becomeAngryAt(entity); } return super.attackEntityFrom(p_70097_1_, p_70097_2_); } }
/** * Called when the entity is attacked. */
Called when the entity is attacked
attackEntityFrom
{ "repo_name": "jtrent238/jtrent238FoodMod", "path": "src/main/java/com/jtrent238/foodmod/EntityCandyzombie_pigman.java", "license": "lgpl-2.1", "size": 8173 }
[ "java.util.List", "net.minecraft.entity.Entity", "net.minecraft.entity.monster.EntityPigZombie", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.util.DamageSource" ]
import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.monster.EntityPigZombie; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.DamageSource;
import java.util.*; import net.minecraft.entity.*; import net.minecraft.entity.monster.*; import net.minecraft.entity.player.*; import net.minecraft.util.*;
[ "java.util", "net.minecraft.entity", "net.minecraft.util" ]
java.util; net.minecraft.entity; net.minecraft.util;
2,836,369
void returnConnection(Connection connection);
void returnConnection(Connection connection);
/** * Return a connection to the pool. The connection should not be * used after it is returned. * @param connection the connection to return */
Return a connection to the pool. The connection should not be used after it is returned
returnConnection
{ "repo_name": "papicella/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManager.java", "license": "apache-2.0", "size": 4708 }
[ "com.gemstone.gemfire.cache.client.internal.Connection" ]
import com.gemstone.gemfire.cache.client.internal.Connection;
import com.gemstone.gemfire.cache.client.internal.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
1,421,316
static StructTypeInfo getTypeInfo(Configuration conf) { StructTypeInfo inputTypeInfo = (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString(conf.get(INPUT_TYPE_INFO)); LOG.debug("Got input typeInfo from conf: {}", inputTypeInfo); return inputTypeInfo; }
static StructTypeInfo getTypeInfo(Configuration conf) { StructTypeInfo inputTypeInfo = (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString(conf.get(INPUT_TYPE_INFO)); LOG.debug(STR, inputTypeInfo); return inputTypeInfo; }
/** * Gets the StructTypeInfo that declares the columns to be read from the configuration */
Gets the StructTypeInfo that declares the columns to be read from the configuration
getTypeInfo
{ "repo_name": "nahguam/corc", "path": "corc-core/src/main/java/com/hotels/corc/mapred/CorcInputFormat.java", "license": "apache-2.0", "size": 12330 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo", "org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hive.serde2.typeinfo.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,010,983
public Attribute getStorageClass() { return storage; }
Attribute function() { return storage; }
/** * Get the storage class. * * @return The storage class or <code>null</code> if the * specifiers do contain one. */
Get the storage class
getStorageClass
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/CAnalyzer.java", "license": "lgpl-2.1", "size": 231201 }
[ "xtc.tree.Attribute" ]
import xtc.tree.Attribute;
import xtc.tree.*;
[ "xtc.tree" ]
xtc.tree;
148,240
Builder addExtraImportLibraries(Iterable<Artifact> extraImportLibraries) { this.extraImportLibraries = Iterables.concat(this.extraImportLibraries, extraImportLibraries); return this; }
Builder addExtraImportLibraries(Iterable<Artifact> extraImportLibraries) { this.extraImportLibraries = Iterables.concat(this.extraImportLibraries, extraImportLibraries); return this; }
/** * Adds additional static libraries to be linked into the final ObjC application bundle. */
Adds additional static libraries to be linked into the final ObjC application bundle
addExtraImportLibraries
{ "repo_name": "werkt/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcCommon.java", "license": "apache-2.0", "size": 26967 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Artifact;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,590,311
public SocketExtendedByteBufferInputStream getSocketExtendedByteBufferInputStream(SocketChannel socketChannel) { SocketExtendedByteBufferInputStream inputStream = createSocketExtendedByteBufferInputStream(); inputStream.setSocketChannel(socketChannel); inputStream.prepare(); return inputStream; }
SocketExtendedByteBufferInputStream function(SocketChannel socketChannel) { SocketExtendedByteBufferInputStream inputStream = createSocketExtendedByteBufferInputStream(); inputStream.setSocketChannel(socketChannel); inputStream.prepare(); return inputStream; }
/** * Returns the {@link SocketExtendedByteBufferInputStream} initialized by Spring and prepared. * Caller must first call {@link SocketExtendedByteBufferInputStream#reset(int)} before reading * any data. * * @param socketChannel * Underlying {@link SocketChannel} for the stream. * @return {@link SocketExtendedByteBufferInputStream}. */
Returns the <code>SocketExtendedByteBufferInputStream</code> initialized by Spring and prepared. Caller must first call <code>SocketExtendedByteBufferInputStream#reset(int)</code> before reading any data
getSocketExtendedByteBufferInputStream
{ "repo_name": "kugelr/inspectIT", "path": "Commons/src/info/novatec/inspectit/storage/nio/stream/StreamProvider.java", "license": "agpl-3.0", "size": 2512 }
[ "java.nio.channels.SocketChannel" ]
import java.nio.channels.SocketChannel;
import java.nio.channels.*;
[ "java.nio" ]
java.nio;
2,642,563
public String getUnlocalizedNameInefficiently(ItemStack stack) { String s = this.getUnlocalizedName(stack); return s == null ? "" : StatCollector.translateToLocal(s); }
String function(ItemStack stack) { String s = this.getUnlocalizedName(stack); return s == null ? "" : StatCollector.translateToLocal(s); }
/** * Translates the unlocalized name of this item, but without the .name suffix, so the translation fails and the * unlocalized name itself is returned. */
Translates the unlocalized name of this item, but without the .name suffix, so the translation fails and the unlocalized name itself is returned
getUnlocalizedNameInefficiently
{ "repo_name": "TorchPowered/Thallium", "path": "src/main/java/net/minecraft/item/Item.java", "license": "mit", "size": 52640 }
[ "net.minecraft.util.StatCollector" ]
import net.minecraft.util.StatCollector;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
470,758
public ConcreteMembersOrderedForTranspiler getCachedCMOFT(TClassifier classifierDecl) { return cachedCMOFTs.get(classifierDecl); }
ConcreteMembersOrderedForTranspiler function(TClassifier classifierDecl) { return cachedCMOFTs.get(classifierDecl); }
/** * DO NOT USE THIS METHOD DIRECTLY, USE {@link TypeAssistant#getOrCreateCMOFT(TClassifier)} INSTEAD! */
DO NOT USE THIS METHOD DIRECTLY, USE <code>TypeAssistant#getOrCreateCMOFT(TClassifier)</code> INSTEAD
getCachedCMOFT
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.transpiler/src/org/eclipse/n4js/transpiler/InformationRegistry.java", "license": "epl-1.0", "size": 11445 }
[ "org.eclipse.n4js.transpiler.utils.ConcreteMembersOrderedForTranspiler", "org.eclipse.n4js.ts.types.TClassifier" ]
import org.eclipse.n4js.transpiler.utils.ConcreteMembersOrderedForTranspiler; import org.eclipse.n4js.ts.types.TClassifier;
import org.eclipse.n4js.transpiler.utils.*; import org.eclipse.n4js.ts.types.*;
[ "org.eclipse.n4js" ]
org.eclipse.n4js;
897,550
protected Object writeReplace() throws ObjectStreamException { return new Stub(iID); } private static final class Stub implements Serializable { private static final long serialVersionUID = -6471952376487863581L; private transient String iID; Stub(String id) { iID = id; }
Object function() throws ObjectStreamException { return new Stub(iID); } private static final class Stub implements Serializable { private static final long serialVersionUID = -6471952376487863581L; private transient String iID; Stub(String id) { iID = id; }
/** * By default, when DateTimeZones are serialized, only a "stub" object * referring to the id is written out. When the stub is read in, it * replaces itself with a DateTimeZone object. * @return a stub object to go in the stream */
By default, when DateTimeZones are serialized, only a "stub" object referring to the id is written out. When the stub is read in, it replaces itself with a DateTimeZone object
writeReplace
{ "repo_name": "redfish64/TinyTravelTracker", "path": "app/src/main/java/org/joda/time/DateTimeZone.java", "license": "gpl-3.0", "size": 52033 }
[ "java.io.ObjectStreamException", "java.io.Serializable" ]
import java.io.ObjectStreamException; import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,577,367
private boolean checkResponseTypes(final String type, final OAuth20ResponseTypes... expectedTypes) { LOGGER.debug("Response type: [{}]", type); final boolean checked = Stream.of(expectedTypes).anyMatch(t -> isResponseType(type, t)); if (!checked) { LOGGER.error("Unsupported response type: [{}]", type); } return checked; }
boolean function(final String type, final OAuth20ResponseTypes... expectedTypes) { LOGGER.debug(STR, type); final boolean checked = Stream.of(expectedTypes).anyMatch(t -> isResponseType(type, t)); if (!checked) { LOGGER.error(STR, type); } return checked; }
/** * Check the response type against expected response types. * * @param type the current response type * @param expectedTypes the expected response types * @return whether the response type is supported */
Check the response type against expected response types
checkResponseTypes
{ "repo_name": "creamer/cas", "path": "support/cas-server-support-oauth/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20AuthorizeEndpointController.java", "license": "apache-2.0", "size": 16525 }
[ "java.util.stream.Stream", "org.apereo.cas.support.oauth.OAuth20ResponseTypes" ]
import java.util.stream.Stream; import org.apereo.cas.support.oauth.OAuth20ResponseTypes;
import java.util.stream.*; import org.apereo.cas.support.oauth.*;
[ "java.util", "org.apereo.cas" ]
java.util; org.apereo.cas;
2,898,368
public static Class classForName( String className, Map<String, Class<?>> properties, ClassLoaderService classLoaderService) { Class aClass = loadClass( className, classLoaderService ); if ( aClass == null ) { aClass = generate( className, properties ); } return aClass; }
static Class function( String className, Map<String, Class<?>> properties, ClassLoaderService classLoaderService) { Class aClass = loadClass( className, classLoaderService ); if ( aClass == null ) { aClass = generate( className, properties ); } return aClass; }
/** * Generates/loads proxy class for given name with properties for map. * * @param className name of the class that will be generated/loaded * @param properties list of properties that should be exposed via java bean * @param classLoaderService * * @return proxy class that wraps map into java bean */
Generates/loads proxy class for given name with properties for map
classForName
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-envers/src/main/java/org/hibernate/envers/internal/tools/MapProxyTool.java", "license": "lgpl-2.1", "size": 6236 }
[ "java.util.Map", "org.hibernate.boot.registry.classloading.spi.ClassLoaderService" ]
import java.util.Map; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService;
import java.util.*; import org.hibernate.boot.registry.classloading.spi.*;
[ "java.util", "org.hibernate.boot" ]
java.util; org.hibernate.boot;
379,796
@Override public void fromData(DataInput in, DeserializationContext context) throws IOException, ClassNotFoundException { super.fromData(in, context); this.flags = in.readShort(); setFlags(this.flags, in, context); this.regionPath = DataSerializer.readString(in); this.isTransactionDistributed = in.readBoolean(); }
void function(DataInput in, DeserializationContext context) throws IOException, ClassNotFoundException { super.fromData(in, context); this.flags = in.readShort(); setFlags(this.flags, in, context); this.regionPath = DataSerializer.readString(in); this.isTransactionDistributed = in.readBoolean(); }
/** * Fill out this instance of the message using the <code>DataInput</code> Required to be a * {@link org.apache.geode.DataSerializable}Note: must be symmetric with * {@link DataSerializableFixedID#toData(DataOutput, SerializationContext)}in what it reads */
Fill out this instance of the message using the <code>DataInput</code> Required to be a <code>org.apache.geode.DataSerializable</code>Note: must be symmetric with <code>DataSerializableFixedID#toData(DataOutput, SerializationContext)</code>in what it reads
fromData
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/tx/RemoteOperationMessage.java", "license": "apache-2.0", "size": 21164 }
[ "java.io.DataInput", "java.io.IOException", "org.apache.geode.DataSerializer", "org.apache.geode.internal.serialization.DeserializationContext" ]
import java.io.DataInput; import java.io.IOException; import org.apache.geode.DataSerializer; import org.apache.geode.internal.serialization.DeserializationContext;
import java.io.*; import org.apache.geode.*; import org.apache.geode.internal.serialization.*;
[ "java.io", "org.apache.geode" ]
java.io; org.apache.geode;
740,628
@Override public prot_mgmt_overall findByPrimaryKey(Serializable primaryKey) throws NoSuchModelException, SystemException { return findByPrimaryKey(((Long)primaryKey).longValue()); }
prot_mgmt_overall function(Serializable primaryKey) throws NoSuchModelException, SystemException { return findByPrimaryKey(((Long)primaryKey).longValue()); }
/** * Returns the prot_mgmt_overall with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found. * * @param primaryKey the primary key of the prot_mgmt_overall * @return the prot_mgmt_overall * @throws com.liferay.portal.NoSuchModelException if a prot_mgmt_overall with the primary key could not be found * @throws SystemException if a system exception occurred */
Returns the prot_mgmt_overall with the primary key or throws a <code>com.liferay.portal.NoSuchModelException</code> if it could not be found
findByPrimaryKey
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/prot_mgmt_overallPersistenceImpl.java", "license": "gpl-2.0", "size": 68339 }
[ "com.liferay.portal.NoSuchModelException", "com.liferay.portal.kernel.exception.SystemException", "java.io.Serializable" ]
import com.liferay.portal.NoSuchModelException; import com.liferay.portal.kernel.exception.SystemException; import java.io.Serializable;
import com.liferay.portal.*; import com.liferay.portal.kernel.exception.*; import java.io.*;
[ "com.liferay.portal", "java.io" ]
com.liferay.portal; java.io;
1,055,611
@Test(expected = NullPointerException.class) public void testDecrypt_BigIntegerNullMessage() { getEncryptor(PASSWORD, SALT, null, true).decrypt((BigInteger) null); }
@Test(expected = NullPointerException.class) void function() { getEncryptor(PASSWORD, SALT, null, true).decrypt((BigInteger) null); }
/** * Tests the {@link JasyptPBEncryptor#decrypt(java.math.BigInteger)} method. Checks that when * the message is {@code null}, then a {@link NullPointerException} is thrown. */
Tests the <code>JasyptPBEncryptor#decrypt(java.math.BigInteger)</code> method. Checks that when the message is null, then a <code>NullPointerException</code> is thrown
testDecrypt_BigIntegerNullMessage
{ "repo_name": "firstStraw/jasypt-convenience", "path": "src/test/java/com/github/firststraw/jasypt/JasyptPBEncryptorTest.java", "license": "cc0-1.0", "size": 12163 }
[ "java.math.BigInteger", "org.junit.Test" ]
import java.math.BigInteger; import org.junit.Test;
import java.math.*; import org.junit.*;
[ "java.math", "org.junit" ]
java.math; org.junit;
1,036,957
public void testGetRdns001() throws Exception { LdapName ln = new LdapName(""); List<Rdn> empty = ln.getRdns(); assertTrue(empty.isEmpty()); }
void function() throws Exception { LdapName ln = new LdapName(""); List<Rdn> empty = ln.getRdns(); assertTrue(empty.isEmpty()); }
/** * <p> * Test method for 'javax.naming.ldap.LdapName.getRdns()' * </p> * <p> * Here we are testing if this method correctly returns the contents of this * LdapName as a list of Rdns. * </p> * <p> * The expected result is the list of Rdns. * </p> */
Test method for 'javax.naming.ldap.LdapName.getRdns()' Here we are testing if this method correctly returns the contents of this LdapName as a list of Rdns. The expected result is the list of Rdns.
testGetRdns001
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java", "license": "apache-2.0", "size": 119091 }
[ "java.util.List", "javax.naming.ldap.LdapName", "javax.naming.ldap.Rdn" ]
import java.util.List; import javax.naming.ldap.LdapName; import javax.naming.ldap.Rdn;
import java.util.*; import javax.naming.ldap.*;
[ "java.util", "javax.naming" ]
java.util; javax.naming;
176,974
static BytesReference fromByteArray(ByteArray byteArray, int length) { if (length == 0) { return BytesArray.EMPTY; } if (byteArray.hasArray()) { return new BytesArray(byteArray.array(), 0, length); } return new PagedBytesReference(byteArray, 0, length); }
static BytesReference fromByteArray(ByteArray byteArray, int length) { if (length == 0) { return BytesArray.EMPTY; } if (byteArray.hasArray()) { return new BytesArray(byteArray.array(), 0, length); } return new PagedBytesReference(byteArray, 0, length); }
/** * Returns BytesReference either wrapping the provided {@link ByteArray} or in case the has a backing raw byte array one that wraps * that backing array directly. */
Returns BytesReference either wrapping the provided <code>ByteArray</code> or in case the has a backing raw byte array one that wraps that backing array directly
fromByteArray
{ "repo_name": "nknize/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/bytes/BytesReference.java", "license": "apache-2.0", "size": 6390 }
[ "org.elasticsearch.common.util.ByteArray" ]
import org.elasticsearch.common.util.ByteArray;
import org.elasticsearch.common.util.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,314,688
protected JSONObject getJobIdForExternalId(String jobType, String externalId) throws XServletException, IOException { JSONObject json = null; jobType = (jobType != null) ? jobType : "wf"; if (jobType.contains("wf")) { json = getWorkflowJobIdForExternalId(jobType, externalId); } else { json = getCoordinatorJobIdForExternalId(jobType, externalId); } return json; } // protected JSONObject getJobs(String jobType) throws XServletException, IOException { // JSONObject json = null; // jobType = (jobType != null) ? jobType : "wf"; // // if (jobType.contains("wf")) { // json = getWorkflowJobs(jobType); // } // else if (jobType.contains("coord")) { // json = getCoordinatorJobs(jobType); // } // else if (jobType.contains("bundle")) { // json = getBundleJobs(); // } // return json; // }
JSONObject function(String jobType, String externalId) throws XServletException, IOException { JSONObject json = null; jobType = (jobType != null) ? jobType : "wf"; if (jobType.contains("wf")) { json = getWorkflowJobIdForExternalId(jobType, externalId); } else { json = getCoordinatorJobIdForExternalId(jobType, externalId); } return json; }
/** * v1 service implementation to get a JSONObject representation of a job from its external ID */
v1 service implementation to get a JSONObject representation of a job from its external ID
getJobIdForExternalId
{ "repo_name": "gruter/cloumon-oozie", "path": "src/main/java/org/cloumon/gruter/oozie/service/OozieJobUtil.java", "license": "apache-2.0", "size": 10829 }
[ "java.io.IOException", "org.apache.oozie.servlet.XServletException", "org.json.simple.JSONObject" ]
import java.io.IOException; import org.apache.oozie.servlet.XServletException; import org.json.simple.JSONObject;
import java.io.*; import org.apache.oozie.servlet.*; import org.json.simple.*;
[ "java.io", "org.apache.oozie", "org.json.simple" ]
java.io; org.apache.oozie; org.json.simple;
954,358
static ClientCHK parseCHK(String s) throws MalformedURLException { String[] triple = s.split(","); try { return new ClientCHK(Base64.decode(triple[0]), Base64.decode(triple[1]), Base64.decode(triple[2])); } catch (IllegalBase64Exception e) { throw new MalformedURLException("Cannot parse CHK \"" + s + "\""); } }
static ClientCHK parseCHK(String s) throws MalformedURLException { String[] triple = s.split(","); try { return new ClientCHK(Base64.decode(triple[0]), Base64.decode(triple[1]), Base64.decode(triple[2])); } catch (IllegalBase64Exception e) { throw new MalformedURLException(STRSTR\""); } }
/** * Parses a CHK string with only the base64 encoded triple of routing key * symmetric key, and encryption info. */
Parses a CHK string with only the base64 encoded triple of routing key symmetric key, and encryption info
parseCHK
{ "repo_name": "Ademan/gitfreenet", "path": "src/freenet/FileRepository.java", "license": "gpl-2.0", "size": 7030 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
1,353,037
EClass getEStructuralFeatureConfiguration();
EClass getEStructuralFeatureConfiguration();
/** * Returns the meta object for class '{@link org.nasdanika.codegen.ecore.web.ui.model.EStructuralFeatureConfiguration <em>EStructural Feature Configuration</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>EStructural Feature Configuration</em>'. * @see org.nasdanika.codegen.ecore.web.ui.model.EStructuralFeatureConfiguration * @generated */
Returns the meta object for class '<code>org.nasdanika.codegen.ecore.web.ui.model.EStructuralFeatureConfiguration EStructural Feature Configuration</code>'.
getEStructuralFeatureConfiguration
{ "repo_name": "Nasdanika/codegen-ecore-web-ui", "path": "org.nasdanika.codegen.ecore.web.ui.model/src/org/nasdanika/codegen/ecore/web/ui/model/ModelPackage.java", "license": "epl-1.0", "size": 78619 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,169,547