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 testConstructor4NullCookie() { SimplePagedResultsControl c = new SimplePagedResultsControl(3, null); assertEquals(c.getSize(), 3); assertNotNull(c.getCookie()); assertEquals(c.getCookie().getValue().length, 0); assertFalse(c.moreResultsToReturn()); assertFalse(c.isCritical()); assertNotNull(c.getControlName()); assertNotNull(c.toString()); }
@Test() void function() { SimplePagedResultsControl c = new SimplePagedResultsControl(3, null); assertEquals(c.getSize(), 3); assertNotNull(c.getCookie()); assertEquals(c.getCookie().getValue().length, 0); assertFalse(c.moreResultsToReturn()); assertFalse(c.isCritical()); assertNotNull(c.getControlName()); assertNotNull(c.toString()); }
/** * Tests the fourth constructor with a {@code null} cookie. */
Tests the fourth constructor with a null cookie
testConstructor4NullCookie
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/controls/SimplePagedResultsControlTestCase.java", "license": "gpl-2.0", "size": 13663 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,374,238
private void validateChildType(final UmlElement child) { if (!elementType.getChildren().contains(child.getElementType())) { throw new BusinessRuleException(cannotAddMessage(child.getElementType(), elementType, "incompatible parent/child item types")); } }
void function(final UmlElement child) { if (!elementType.getChildren().contains(child.getElementType())) { throw new BusinessRuleException(cannotAddMessage(child.getElementType(), elementType, STR)); } }
/** * Validate: is a child of a valid for insertion under this element. * * @param child * prospective child element */
Validate: is a child of a valid for insertion under this element
validateChildType
{ "repo_name": "openfurther/further-open-core", "path": "mdr/mdr-api/src/main/java/edu/utah/further/mdr/api/domain/uml/UmlElementImpl.java", "license": "apache-2.0", "size": 13839 }
[ "edu.utah.further.core.api.exception.BusinessRuleException" ]
import edu.utah.further.core.api.exception.BusinessRuleException;
import edu.utah.further.core.api.exception.*;
[ "edu.utah.further" ]
edu.utah.further;
2,750,983
private void assertFutureIsNotFinish(IgniteInternalFuture future) throws IgniteCheckedException { try { future.get(20); fail("Timeout should be appear because thread should be still work"); } catch (IgniteFutureTimeoutCheckedException ignore) { } }
void function(IgniteInternalFuture future) throws IgniteCheckedException { try { future.get(20); fail(STR); } catch (IgniteFutureTimeoutCheckedException ignore) { } }
/** * Assert that future is still not finished. * * @param future Future to check. */
Assert that future is still not finished
assertFutureIsNotFinish
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentAwareTest.java", "license": "apache-2.0", "size": 22330 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.IgniteFutureTimeoutCheckedException", "org.apache.ignite.internal.IgniteInternalFuture", "org.junit.Assert" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.IgniteFutureTimeoutCheckedException; import org.apache.ignite.internal.IgniteInternalFuture; import org.junit.Assert;
import org.apache.ignite.*; import org.apache.ignite.internal.*; import org.junit.*;
[ "org.apache.ignite", "org.junit" ]
org.apache.ignite; org.junit;
1,433,327
public ReportGenerator.Format getReportFormat() { return reportFormat; }
ReportGenerator.Format function() { return reportFormat; }
/** * Get the value of reportFormat. * * @return the value of reportFormat */
Get the value of reportFormat
getReportFormat
{ "repo_name": "adilakhter/DependencyCheck", "path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java", "license": "apache-2.0", "size": 31316 }
[ "org.owasp.dependencycheck.reporting.ReportGenerator" ]
import org.owasp.dependencycheck.reporting.ReportGenerator;
import org.owasp.dependencycheck.reporting.*;
[ "org.owasp.dependencycheck" ]
org.owasp.dependencycheck;
627,812
public List<Object> getValues() { return values; }
List<Object> function() { return values; }
/** * Gets the values if this criteria's operator has arguments * * @return the values array */
Gets the values if this criteria's operator has arguments
getValues
{ "repo_name": "smartsheet-platform/smartsheet-java-sdk", "path": "src/main/java/com/smartsheet/api/models/Criteria.java", "license": "apache-2.0", "size": 2739 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,779,211
public Cell peekAtNextCell(ScannerContext scannerContext) throws IOException { if (currentIndex >= availableCells.size()) { // done with current batch availableCells.clear(); currentIndex = 0; hasMore = flowRunScanner.next(availableCells, scannerContext); } Cell cell = null; if (currentIndex < availableCells.size()) { cell = availableCells.get(currentIndex); if (currentRow == null) { currentRow = CellUtil.cloneRow(cell); } else if (!CellUtil.matchingRow(cell, currentRow)) { // moved on to the next row // don't use the current cell // also signal no more cells for this row return null; } } return cell; }
Cell function(ScannerContext scannerContext) throws IOException { if (currentIndex >= availableCells.size()) { availableCells.clear(); currentIndex = 0; hasMore = flowRunScanner.next(availableCells, scannerContext); } Cell cell = null; if (currentIndex < availableCells.size()) { cell = availableCells.get(currentIndex); if (currentRow == null) { currentRow = CellUtil.cloneRow(cell); } else if (!CellUtil.matchingRow(cell, currentRow)) { return null; } } return cell; }
/** * Returns the next available cell for the current row, without advancing the * pointer. Calling this method multiple times in a row will continue to * return the same cell. * * @param scannerContext * context information for the batch of cells under consideration * @return the next available cell or null if no more cells are available for * the current row * @throws IOException if any problem is encountered while grabbing the next * cell. */
Returns the next available cell for the current row, without advancing the pointer. Calling this method multiple times in a row will continue to return the same cell
peekAtNextCell
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/flow/FlowScanner.java", "license": "apache-2.0", "size": 26510 }
[ "java.io.IOException", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.CellUtil", "org.apache.hadoop.hbase.regionserver.ScannerContext" ]
import java.io.IOException; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.regionserver.ScannerContext;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.regionserver.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
96,266
private void export( XMLStreamWriter xmlWriter, GetRecordById getRecBI, Version version, MetadataStore<?> store ) throws XMLStreamException, OWSException, MetadataStoreException { List<String> supportedVersions = profile.getSupportedVersions(); if ( supportedVersions.contains( version.toString() ) ) { export202( xmlWriter, getRecBI, store ); } else { StringBuilder sb = new StringBuilder(); sb.append( "Version '" ).append( version ); sb.append( "' is not supported." ); sb.append( " Supported versions are " ); boolean isFirst = true; for ( String v : supportedVersions ) { if ( isFirst ) { isFirst = false; } else { sb.append( ", " ); } sb.append( v ); } throw new IllegalArgumentException( sb.toString() ); } }
void function( XMLStreamWriter xmlWriter, GetRecordById getRecBI, Version version, MetadataStore<?> store ) throws XMLStreamException, OWSException, MetadataStoreException { List<String> supportedVersions = profile.getSupportedVersions(); if ( supportedVersions.contains( version.toString() ) ) { export202( xmlWriter, getRecBI, store ); } else { StringBuilder sb = new StringBuilder(); sb.append( STR ).append( version ); sb.append( STR ); sb.append( STR ); boolean isFirst = true; for ( String v : supportedVersions ) { if ( isFirst ) { isFirst = false; } else { sb.append( STR ); } sb.append( v ); } throw new IllegalArgumentException( sb.toString() ); } }
/** * Exports the correct recognized request and determines to which version export it should delegate the request */
Exports the correct recognized request and determines to which version export it should delegate the request
export
{ "repo_name": "deegree/deegree3", "path": "deegree-services/deegree-services-csw/src/main/java/org/deegree/services/csw/getrecordbyid/DefaultGetRecordByIdHandler.java", "license": "lgpl-2.1", "size": 10435 }
[ "java.util.List", "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamWriter", "org.deegree.commons.ows.exception.OWSException", "org.deegree.commons.tom.ows.Version", "org.deegree.metadata.persistence.MetadataStore", "org.deegree.protocol.csw.MetadataStoreException" ]
import java.util.List; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.deegree.commons.ows.exception.OWSException; import org.deegree.commons.tom.ows.Version; import org.deegree.metadata.persistence.MetadataStore; import org.deegree.protocol.csw.MetadataStoreException;
import java.util.*; import javax.xml.stream.*; import org.deegree.commons.ows.exception.*; import org.deegree.commons.tom.ows.*; import org.deegree.metadata.persistence.*; import org.deegree.protocol.csw.*;
[ "java.util", "javax.xml", "org.deegree.commons", "org.deegree.metadata", "org.deegree.protocol" ]
java.util; javax.xml; org.deegree.commons; org.deegree.metadata; org.deegree.protocol;
2,874,332
public static void generateEventsByDestroyEntryOperation() throws Exception { Connection connection = pool.acquireConnection(); String regionName = Region.SEPARATOR + REGION_NAME; ServerRegionProxy srp = new ServerRegionProxy(regionName, pool); for (int i = 0; i < eventIds.length; i++) { srp.destroyOnForTestsOnly(connection, "KEY-" + i, null, Operation.DESTROY, new EntryEventImpl(eventIds[i]), null); } srp.destroyOnForTestsOnly(connection, LAST_KEY, null, Operation.DESTROY, new EntryEventImpl(eventIdForLastKey), null); }
static void function() throws Exception { Connection connection = pool.acquireConnection(); String regionName = Region.SEPARATOR + REGION_NAME; ServerRegionProxy srp = new ServerRegionProxy(regionName, pool); for (int i = 0; i < eventIds.length; i++) { srp.destroyOnForTestsOnly(connection, "KEY-" + i, null, Operation.DESTROY, new EntryEventImpl(eventIds[i]), null); } srp.destroyOnForTestsOnly(connection, LAST_KEY, null, Operation.DESTROY, new EntryEventImpl(eventIdForLastKey), null); }
/** * Generates events having specific values of threadId and sequenceId, via * destroyEntry operation through connection object * * @throws Exception - * thrown if any problem occurs in destroyEntry operation */
Generates events having specific values of threadId and sequenceId, via destroyEntry operation through connection object
generateEventsByDestroyEntryOperation
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java", "license": "apache-2.0", "size": 21306 }
[ "com.gemstone.gemfire.cache.Operation", "com.gemstone.gemfire.cache.Region", "com.gemstone.gemfire.cache.client.internal.Connection", "com.gemstone.gemfire.cache.client.internal.ServerRegionProxy", "com.gemstone.gemfire.internal.cache.EntryEventImpl" ]
import com.gemstone.gemfire.cache.Operation; import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.client.internal.Connection; import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy; import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.cache.client.internal.*; import com.gemstone.gemfire.internal.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
2,232,493
// Generated window is very simple... private Frame createMainWindow(Vector<IVdmDefinition> vector, String title) { Frame frame = objFactory.createFrame(); frame.setSize("220,220"); frame.setDefaultcloseoperation("JFrame.EXIT_ON_CLOSE"); frame.setId(NamingPolicies.getMainWindowId()); frame.setTitle(title); Scrollpane panel = objFactory.createScrollpane(); panel.setConstraints("BorderLayout.CENTER"); frame.getContent().add(panel); Vbox vbox = objFactory.createVbox(); panel.getContent().add(vbox); for (IVdmDefinition c : vector) { Button button = objFactory.createButton(); button.setId(NamingPolicies.getButtonWindowCallerId(c.getName())); button.setText(c.getName()); vbox.getContent().add(button); } return frame; }
Frame function(Vector<IVdmDefinition> vector, String title) { Frame frame = objFactory.createFrame(); frame.setSize(STR); frame.setDefaultcloseoperation(STR); frame.setId(NamingPolicies.getMainWindowId()); frame.setTitle(title); Scrollpane panel = objFactory.createScrollpane(); panel.setConstraints(STR); frame.getContent().add(panel); Vbox vbox = objFactory.createVbox(); panel.getContent().add(vbox); for (IVdmDefinition c : vector) { Button button = objFactory.createButton(); button.setId(NamingPolicies.getButtonWindowCallerId(c.getName())); button.setText(c.getName()); vbox.getContent().add(button); } return frame; }
/** * Function to build the elements of a main window * * @param vector * List of vdm classes that ui fronts for * @param title * Title of teh main window * @return A Frame xml node */
Function to build the elements of a main window
createMainWindow
{ "repo_name": "jmcPereira/overture", "path": "core/guibuilder/src/main/java/org/overture/guibuilder/internal/SwiXMLGenerator.java", "license": "gpl-3.0", "size": 12148 }
[ "java.util.Vector", "org.overture.guibuilder.generated.swixml.schema.Button", "org.overture.guibuilder.generated.swixml.schema.Frame", "org.overture.guibuilder.generated.swixml.schema.Scrollpane", "org.overture.guibuilder.generated.swixml.schema.Vbox", "org.overture.guibuilder.internal.ir.IVdmDefinition" ]
import java.util.Vector; import org.overture.guibuilder.generated.swixml.schema.Button; import org.overture.guibuilder.generated.swixml.schema.Frame; import org.overture.guibuilder.generated.swixml.schema.Scrollpane; import org.overture.guibuilder.generated.swixml.schema.Vbox; import org.overture.guibuilder.internal.ir.IVdmDefinition;
import java.util.*; import org.overture.guibuilder.generated.swixml.schema.*; import org.overture.guibuilder.internal.ir.*;
[ "java.util", "org.overture.guibuilder" ]
java.util; org.overture.guibuilder;
1,050,011
public void setNegativeItemLabelPosition(ItemLabelPosition position, boolean notify) { this.negativeItemLabelPosition = position; if (notify) { fireChangeEvent(); } } /** * Returns the flag that controls whether or not chart entities are created * for the items in ALL series. This flag overrides the per series and * default settings - you must set it to <code>null</code> if you want the * other settings to apply. * * @return The flag (possibly <code>null</code>). * * @deprecated This method should no longer be used (as of version 1.0.6). * It is sufficient to rely on {@link #getSeriesCreateEntities(int)}
void function(ItemLabelPosition position, boolean notify) { this.negativeItemLabelPosition = position; if (notify) { fireChangeEvent(); } } /** * Returns the flag that controls whether or not chart entities are created * for the items in ALL series. This flag overrides the per series and * default settings - you must set it to <code>null</code> if you want the * other settings to apply. * * @return The flag (possibly <code>null</code>). * * @deprecated This method should no longer be used (as of version 1.0.6). * It is sufficient to rely on {@link #getSeriesCreateEntities(int)}
/** * Sets the item label position for negative values in ALL series and (if * requested) sends a {@link RendererChangeEvent} to all registered * listeners. * * @param position the position (<code>null</code> permitted). * @param notify notify registered listeners? * * @see #getNegativeItemLabelPosition() * * @deprecated This method should no longer be used (as of version 1.0.6). * It is sufficient to rely on * {@link #setSeriesNegativeItemLabelPosition(int, ItemLabelPosition, * boolean)} and {@link #setBaseNegativeItemLabelPosition( * ItemLabelPosition, boolean)}. */
Sets the item label position for negative values in ALL series and (if requested) sends a <code>RendererChangeEvent</code> to all registered listeners
setNegativeItemLabelPosition
{ "repo_name": "ciaracdb/LOG6302", "path": "examples/jfreechart/source/org/jfree/chart/renderer/AbstractRenderer.java", "license": "apache-2.0", "size": 142729 }
[ "org.jfree.chart.labels.ItemLabelPosition" ]
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
742,992
private boolean staticParent(AnonymousClassDeclaration node) { ITypeBinding type = Types.getTypeBinding(node); IMethodBinding declaringMethod = type.getDeclaringMethod(); if (declaringMethod != null) { return Modifier.isStatic(declaringMethod.getModifiers()); } ASTNode parent = node.getParent(); while (parent != null) { if (parent instanceof BodyDeclaration) { return Modifier.isStatic(((BodyDeclaration) parent).getModifiers()); } parent = parent.getParent(); } return false; }
boolean function(AnonymousClassDeclaration node) { ITypeBinding type = Types.getTypeBinding(node); IMethodBinding declaringMethod = type.getDeclaringMethod(); if (declaringMethod != null) { return Modifier.isStatic(declaringMethod.getModifiers()); } ASTNode parent = node.getParent(); while (parent != null) { if (parent instanceof BodyDeclaration) { return Modifier.isStatic(((BodyDeclaration) parent).getModifiers()); } parent = parent.getParent(); } return false; }
/** * Returns true if this anonymous class is defined in a static method or * used to initialize a static variable. */
Returns true if this anonymous class is defined in a static method or used to initialize a static variable
staticParent
{ "repo_name": "rwl/j2objc", "path": "src/main/java/com/google/devtools/j2objc/translate/AnonymousClassConverter.java", "license": "apache-2.0", "size": 24998 }
[ "com.google.devtools.j2objc.types.Types", "java.lang.reflect.Modifier", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.AnonymousClassDeclaration", "org.eclipse.jdt.core.dom.BodyDeclaration", "org.eclipse.jdt.core.dom.IMethodBinding", "org.eclipse.jdt.core.dom.ITypeBinding" ]
import com.google.devtools.j2objc.types.Types; import java.lang.reflect.Modifier; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.AnonymousClassDeclaration; import org.eclipse.jdt.core.dom.BodyDeclaration; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding;
import com.google.devtools.j2objc.types.*; import java.lang.reflect.*; import org.eclipse.jdt.core.dom.*;
[ "com.google.devtools", "java.lang", "org.eclipse.jdt" ]
com.google.devtools; java.lang; org.eclipse.jdt;
1,459,282
public JavaPlatform getJavaPlatform() { return _javaPlatform; }
JavaPlatform function() { return _javaPlatform; }
/** * Returns the java platform. */
Returns the java platform
getJavaPlatform
{ "repo_name": "christianchristensen/resin", "path": "artifacts/netbeans/src/com/caucho/netbeans/ResinConfiguration.java", "license": "gpl-2.0", "size": 14493 }
[ "org.netbeans.api.java.platform.JavaPlatform" ]
import org.netbeans.api.java.platform.JavaPlatform;
import org.netbeans.api.java.platform.*;
[ "org.netbeans.api" ]
org.netbeans.api;
2,703,437
private void fromWindow(PatternDescrBuilder<?> pattern) throws RecognitionException { String window = ""; match(input, DRL6Lexer.ID, DroolsSoftKeywords.WINDOW, null, DroolsEditorType.KEYWORD); if (state.failed) return; Token id = match(input, DRL6Lexer.ID, null, null, DroolsEditorType.IDENTIFIER); if (state.failed) return; window = id.getText(); if (state.backtracking == 0) { pattern.from().window(window); if (input.LA(1) != DRL6Lexer.EOF) { helper.emit(Location.LOCATION_LHS_BEGIN_OF_CONDITION); } } }
void function(PatternDescrBuilder<?> pattern) throws RecognitionException { String window = ""; match(input, DRL6Lexer.ID, DroolsSoftKeywords.WINDOW, null, DroolsEditorType.KEYWORD); if (state.failed) return; Token id = match(input, DRL6Lexer.ID, null, null, DroolsEditorType.IDENTIFIER); if (state.failed) return; window = id.getText(); if (state.backtracking == 0) { pattern.from().window(window); if (input.LA(1) != DRL6Lexer.EOF) { helper.emit(Location.LOCATION_LHS_BEGIN_OF_CONDITION); } } }
/** * fromWindow := WINDOW ID * * @param pattern * @throws org.antlr.runtime.RecognitionException */
fromWindow := WINDOW ID
fromWindow
{ "repo_name": "amckee23/drools", "path": "drools-compiler/src/main/java/org/drools/compiler/lang/DRL6Parser.java", "license": "apache-2.0", "size": 172886 }
[ "org.antlr.runtime.RecognitionException", "org.antlr.runtime.Token", "org.drools.compiler.lang.api.PatternDescrBuilder" ]
import org.antlr.runtime.RecognitionException; import org.antlr.runtime.Token; import org.drools.compiler.lang.api.PatternDescrBuilder;
import org.antlr.runtime.*; import org.drools.compiler.lang.api.*;
[ "org.antlr.runtime", "org.drools.compiler" ]
org.antlr.runtime; org.drools.compiler;
2,425,090
private void setUsername(AccountViewHolderItem viewHolder, Account account) { try { OwnCloudAccount oca = new OwnCloudAccount(account, context); viewHolder.usernameViewItem.setText(oca.getDisplayName()); } catch (Exception e) { Log_OC.w(TAG, "Account not found right after being read; using account name instead"); viewHolder.usernameViewItem.setText(UserAccountManager.getUsername(account)); } viewHolder.usernameViewItem.setTag(account.name); }
void function(AccountViewHolderItem viewHolder, Account account) { try { OwnCloudAccount oca = new OwnCloudAccount(account, context); viewHolder.usernameViewItem.setText(oca.getDisplayName()); } catch (Exception e) { Log_OC.w(TAG, STR); viewHolder.usernameViewItem.setText(UserAccountManager.getUsername(account)); } viewHolder.usernameViewItem.setTag(account.name); }
/** * Sets the username of the account * * @param viewHolder the view holder that contains the account * @param account the account */
Sets the username of the account
setUsername
{ "repo_name": "SpryServers/sprycloud-android", "path": "src/main/java/com/owncloud/android/ui/adapter/AccountListAdapter.java", "license": "gpl-2.0", "size": 12484 }
[ "android.accounts.Account", "com.nextcloud.client.account.UserAccountManager", "com.owncloud.android.lib.common.OwnCloudAccount" ]
import android.accounts.Account; import com.nextcloud.client.account.UserAccountManager; import com.owncloud.android.lib.common.OwnCloudAccount;
import android.accounts.*; import com.nextcloud.client.account.*; import com.owncloud.android.lib.common.*;
[ "android.accounts", "com.nextcloud.client", "com.owncloud.android" ]
android.accounts; com.nextcloud.client; com.owncloud.android;
1,882,769
@Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addTypeReferencePropertyDescriptor(object); } return itemPropertyDescriptors; }
List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addTypeReferencePropertyDescriptor(object); } return itemPropertyDescriptors; }
/** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the property descriptors for the adapted class.
getPropertyDescriptors
{ "repo_name": "CloudScale-Project/StaticSpotter", "path": "plugins/org.reclipse.behavior.specification.edit/src/org/reclipse/behavior/specification/provider/BPObjectItemProvider.java", "license": "apache-2.0", "size": 4925 }
[ "java.util.List", "org.eclipse.emf.edit.provider.IItemPropertyDescriptor" ]
import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import java.util.*; import org.eclipse.emf.edit.provider.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
215,645
@Trivial private static SerializableProtectedString getSerializableProtectedStringValue(Map<String, Object> configProps, String property) { Object value = configProps.get(property); if (value == null) { return null; } return (SerializableProtectedString) value; }
static SerializableProtectedString function(Map<String, Object> configProps, String property) { Object value = configProps.get(property); if (value == null) { return null; } return (SerializableProtectedString) value; }
/** * Get a {@link String} value from the config properties. * * @param configProps * The configuration properties passed in by declarative * services. * @param property * The property to lookup. * @return The {@link String} value, or null if it doesn't exist. */
Get a <code>String</code> value from the config properties
getSerializableProtectedStringValue
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.acme/src/com/ibm/ws/security/acme/internal/AcmeConfig.java", "license": "epl-1.0", "size": 27283 }
[ "com.ibm.wsspi.kernel.service.utils.SerializableProtectedString", "java.util.Map" ]
import com.ibm.wsspi.kernel.service.utils.SerializableProtectedString; import java.util.Map;
import com.ibm.wsspi.kernel.service.utils.*; import java.util.*;
[ "com.ibm.wsspi", "java.util" ]
com.ibm.wsspi; java.util;
624,948
private void readAdductList(BufferedReader br) { try { String line = ""; while ((line = br.readLine()) != null) { if (line.startsWith(COMMENT)) continue; String[] lineElements = line.split(SEPARATOR); if (lineElements.length != 3) continue; adductList.add(new AdductSingle(lineElements[0], Integer.parseInt(lineElements[1]), Double.parseDouble(lineElements[2]))); } } catch (Exception exception) { LOGGER.log(Level.INFO, "Adduct record not readable. " + exception.getMessage()); } }
void function(BufferedReader br) { try { String line = STRAdduct record not readable. " + exception.getMessage()); } }
/** * Reads the file line by line and parses the 'mass,label' records. */
Reads the file line by line and parses the 'mass,label' records
readAdductList
{ "repo_name": "tomas-pluskal/masscascade", "path": "MassCascadeCore/src/main/java/uk/ac/ebi/masscascade/identification/AdductDetector.java", "license": "gpl-3.0", "size": 9858 }
[ "java.io.BufferedReader" ]
import java.io.BufferedReader;
import java.io.*;
[ "java.io" ]
java.io;
722,277
@BeforeAll void setup() { mvc = MockMvcBuilders .webAppContextSetup(context) .apply(springSecurity()) .build(); }
void setup() { mvc = MockMvcBuilders .webAppContextSetup(context) .apply(springSecurity()) .build(); }
/** * Setup mock mvc. */
Setup mock mvc
setup
{ "repo_name": "bremersee/common", "path": "common-base-actuator-autoconfigure/src/test/java/org/bremersee/actuator/security/authentication/resourceserver/servlet/JwtTest.java", "license": "apache-2.0", "size": 5822 }
[ "org.springframework.test.web.servlet.setup.MockMvcBuilders" ]
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.test.web.servlet.setup.*;
[ "org.springframework.test" ]
org.springframework.test;
1,832,522
// ----------------------------------------------- private int on_request_create_url( String s_tile_id, String s_url_source ) { int i_rc = 0; int indexOfZ = s_url_source.indexOf("ZZZ"); int[] zxy_osm_tms = MBTilesDroidSpitter.get_zxy_from_tile_id(s_tile_id); if ((zxy_osm_tms != null) && (zxy_osm_tms.length == 4)) { int i_z = zxy_osm_tms[0]; int i_x = zxy_osm_tms[1]; int i_y_osm = zxy_osm_tms[2]; int i_y_tms = zxy_osm_tms[3]; int i_y = i_y_osm; if (s_request_y_type.equals("tms")) { i_y = i_y_tms; } String s_tile_url = s_url_source; if (i_tile_server > 0) { // ['http://otileSSS.mqcdn.com/'] replace // 'http://otile1.mqcdn.com/' with ''http://otile2.mqcdn.com/' s_tile_url = s_tile_url.replaceFirst("SSS", String.valueOf(i_tile_server++)); //$NON-NLS-1$ if (i_tile_server > 2) i_tile_server = 1; } if (indexOfZ != -1) { // tile-server: replace ZZZ,XXX,YYY s_tile_url = s_tile_url.replaceFirst("ZZZ", String.valueOf(i_z)); //$NON-NLS-1$ s_tile_url = s_tile_url.replaceFirst("XXX", String.valueOf(i_x)); //$NON-NLS-1$ s_tile_url = s_tile_url.replaceFirst("YYY", String.valueOf(i_y)); //$NON-NLS-1$ } else { // wms_server double[] tileBounds = MBTilesDroidSpitter.tileLatLonBounds(i_x, i_y_osm, i_z, 256); s_tile_url = s_tile_url.replaceFirst("XXX", String.valueOf(tileBounds[0])); //$NON-NLS-1$ s_tile_url = s_tile_url.replaceFirst("YYY", String.valueOf(tileBounds[1])); //$NON-NLS-1$ s_tile_url = s_tile_url.replaceFirst("XXX", String.valueOf(tileBounds[2])); //$NON-NLS-1$ s_tile_url = s_tile_url.replaceFirst("YYY", String.valueOf(tileBounds[3])); //$NON-NLS-1$ } if (s_request_protocol.equals("file")) { File file_tile = new File(s_tile_url); if (file_tile.exists()) { s_tile_url = "file:" + s_tile_url; } else { s_tile_url = ""; } } if (!s_tile_url.equals("")) { mbtiles_request_url.put(s_tile_id, s_tile_url); } } else { i_rc = -1; } // GPLog.androidLog(4,"on_request_create_url["+s_tile_id+"] rc="+i_rc); return i_rc; }
int function( String s_tile_id, String s_url_source ) { int i_rc = 0; int indexOfZ = s_url_source.indexOf("ZZZ"); int[] zxy_osm_tms = MBTilesDroidSpitter.get_zxy_from_tile_id(s_tile_id); if ((zxy_osm_tms != null) && (zxy_osm_tms.length == 4)) { int i_z = zxy_osm_tms[0]; int i_x = zxy_osm_tms[1]; int i_y_osm = zxy_osm_tms[2]; int i_y_tms = zxy_osm_tms[3]; int i_y = i_y_osm; if (s_request_y_type.equals("tms")) { i_y = i_y_tms; } String s_tile_url = s_url_source; if (i_tile_server > 0) { s_tile_url = s_tile_url.replaceFirst("SSS", String.valueOf(i_tile_server++)); if (i_tile_server > 2) i_tile_server = 1; } if (indexOfZ != -1) { s_tile_url = s_tile_url.replaceFirst("ZZZ", String.valueOf(i_z)); s_tile_url = s_tile_url.replaceFirst("XXX", String.valueOf(i_x)); s_tile_url = s_tile_url.replaceFirst("YYY", String.valueOf(i_y)); } else { double[] tileBounds = MBTilesDroidSpitter.tileLatLonBounds(i_x, i_y_osm, i_z, 256); s_tile_url = s_tile_url.replaceFirst("XXX", String.valueOf(tileBounds[0])); s_tile_url = s_tile_url.replaceFirst("YYY", String.valueOf(tileBounds[1])); s_tile_url = s_tile_url.replaceFirst("XXX", String.valueOf(tileBounds[2])); s_tile_url = s_tile_url.replaceFirst("YYY", String.valueOf(tileBounds[3])); } if (s_request_protocol.equals("file")) { File file_tile = new File(s_tile_url); if (file_tile.exists()) { s_tile_url = "file:" + s_tile_url; } else { s_tile_url = STR")) { mbtiles_request_url.put(s_tile_id, s_tile_url); } } else { i_rc = -1; } return i_rc; }
/** * will fill source_url [with placeholder] with valid values to retrieve requested tile-image * - adds result to 'mbtiles_request_url' * @param s_tile_id tile_id to use * @param s_url_source source url with placeholders for ZZZ,XXX,YYY and SSS * @return i_rc [ -1: s_tile_id incorrectly formatted; 0=valid s_tile_id and s_tile_url were added to the list ; ] */
will fill source_url [with placeholder] with valid values to retrieve requested tile-image - adds result to 'mbtiles_request_url'
on_request_create_url
{ "repo_name": "Huertix/geopaparazzi", "path": "geopaparazzispatialitelibrary/src/eu/geopaparazzi/spatialite/database/spatial/core/mbtiles/MBtilesAsync.java", "license": "gpl-3.0", "size": 50636 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,850,572
public TableWriteItems addItemToPut(Item item) { if (item != null) { if (itemsToPut == null) itemsToPut = new ArrayList<Item>(); this.itemsToPut.add(item); } return this; }
TableWriteItems function(Item item) { if (item != null) { if (itemsToPut == null) itemsToPut = new ArrayList<Item>(); this.itemsToPut.add(item); } return this; }
/** * Adds an item to be put to the current table in a batch write operation. */
Adds an item to be put to the current table in a batch write operation
addItemToPut
{ "repo_name": "aws/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableWriteItems.java", "license": "apache-2.0", "size": 10640 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
348,925
public static ServiceDescriptor getDataspaceStorer(String policy, String... sdbConfig) throws IOException { return (getDataspaceStorer(policy, Booter.getPort(), sdbConfig)); }
static ServiceDescriptor function(String policy, String... sdbConfig) throws IOException { return (getDataspaceStorer(policy, Booter.getPort(), sdbConfig)); }
/** * Get the {@link com.sun.jini.start.ServiceDescriptor} instance for * {@link sorcer.core.provider.DataspaceStorer} using the Webster port created * by this utility. * * @param policy * The security policy file to use * @param exertmonitorConfig * The configuration options the DataspaceStore will use * @return The {@link com.sun.jini.start.ServiceDescriptor} instance for the * Monitor using an anonymous port. The <tt>sdb-prv.jar</tt> file * will be loaded from <tt>sorcer.home/lib</tt> * * @throws IOException * If there are problems getting the anonymous port * @throws RuntimeException * If the <tt>sorcer.home</tt> system property is not set */
Get the <code>com.sun.jini.start.ServiceDescriptor</code> instance for <code>sorcer.core.provider.DataspaceStorer</code> using the Webster port created by this utility
getDataspaceStorer
{ "repo_name": "dudzislaw/SORCER", "path": "tools/sorcer-boot/src/main/java/sorcer/provider/boot/SorcerDescriptorUtil.java", "license": "apache-2.0", "size": 51715 }
[ "com.sun.jini.start.ServiceDescriptor", "java.io.IOException" ]
import com.sun.jini.start.ServiceDescriptor; import java.io.IOException;
import com.sun.jini.start.*; import java.io.*;
[ "com.sun.jini", "java.io" ]
com.sun.jini; java.io;
1,603,236
public @Nonnull SpotPriceHistoryFilterOptions matchingAny() { this.matchesAny = true; return this; }
@Nonnull SpotPriceHistoryFilterOptions function() { this.matchesAny = true; return this; }
/** * Indicates that the criteria associated with this filter must match just one single criterion. * * @return this */
Indicates that the criteria associated with this filter must match just one single criterion
matchingAny
{ "repo_name": "unwin/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/compute/SpotPriceHistoryFilterOptions.java", "license": "apache-2.0", "size": 5660 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
132,243
public static Identity serviceAccount(String email) { return new Identity(Type.SERVICE_ACCOUNT, checkNotNull(email)); }
static Identity function(String email) { return new Identity(Type.SERVICE_ACCOUNT, checkNotNull(email)); }
/** * Returns a new service account identity. * * @param email An email address that represents a service account. For example, * <I>my-other-app@appspot.gserviceaccount.com</I>. */
Returns a new service account identity
serviceAccount
{ "repo_name": "jabubake/google-cloud-java", "path": "google-cloud-core/src/main/java/com/google/cloud/Identity.java", "license": "apache-2.0", "size": 6869 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,452,052
@LuaProperty public EnumFacing getSideHit() { return delegate.sideHit; } }
EnumFacing function() { return delegate.sideHit; } }
/** * This is the name of the block's side where the scan hit the block. This can be one of 'down', * 'up', 'south', 'west', 'north', and 'east'. */
This is the name of the block's side where the scan hit the block. This can be one of 'down', 'up', 'south', 'west', 'north', and 'east'
getSideHit
{ "repo_name": "wizards-of-lua/wizards-of-lua", "path": "src/main/java/net/wizardsoflua/lua/classes/scan/BlockHitClass.java", "license": "gpl-3.0", "size": 2566 }
[ "net.minecraft.util.EnumFacing" ]
import net.minecraft.util.EnumFacing;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
641,684
public static String getJsonFriendlyString(String value) { if (!"null".equals(value) && (JSONUtils.mayBeJSON(value) || isFunction(value))) { return "'" + value + "'"; } return value; }
static String function(String value) { if (!"null".equals(value) && (JSONUtils.mayBeJSON(value) isFunction(value))) { return "'" + value + "'"; } return value; }
/** * Gets the given value in a form that can be safely put in a {@code JSONObject}. * * <p>{@code JSONObject} automatically parses strings that look like JSON arrays/objects, so * they need to be processed (quoted) to prevent that behaviour. * * @param value the value to process. * @return the value that can be safely put in a {@code JSONObject}. */
Gets the given value in a form that can be safely put in a JSONObject. JSONObject automatically parses strings that look like JSON arrays/objects, so they need to be processed (quoted) to prevent that behaviour
getJsonFriendlyString
{ "repo_name": "kingthorin/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/utils/JsonUtil.java", "license": "apache-2.0", "size": 2705 }
[ "net.sf.json.util.JSONUtils" ]
import net.sf.json.util.JSONUtils;
import net.sf.json.util.*;
[ "net.sf.json" ]
net.sf.json;
1,513,066
private void outputXMPMetadata(ContentHandler ch, String xmpStr) throws SAXException { XMLReader reader = null; try { reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); } catch (ParserConfigurationException x) { throw new SAXException(x); } // If we can't write out an element we want to fail immediately AttributesImpl atts = new AttributesImpl(); ch.startElement(PNG_URI, XMP_TAG, PNG_PREFIX + ":" + XMP_TAG, atts); try { // Do not load external DTDs reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
void function(ContentHandler ch, String xmpStr) throws SAXException { XMLReader reader = null; try { reader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); } catch (ParserConfigurationException x) { throw new SAXException(x); } AttributesImpl atts = new AttributesImpl(); ch.startElement(PNG_URI, XMP_TAG, PNG_PREFIX + ":" + XMP_TAG, atts); try { reader.setFeature("http:
/** * Output the XMP metadata. XMP is an XML format so we simply write it out as-is. * @param ch ContentHandler which will write XML to the Xena file * @param xmpStr String representation of the XMP XML * @throws SAXException */
Output the XMP metadata. XMP is an XML format so we simply write it out as-is
outputXMPMetadata
{ "repo_name": "srnsw/xena", "path": "plugins/image/src/au/gov/naa/digipres/xena/plugin/image/tiff/TiffToXenaPngNormaliser.java", "license": "gpl-3.0", "size": 38593 }
[ "javax.xml.parsers.ParserConfigurationException", "javax.xml.parsers.SAXParserFactory", "org.xml.sax.ContentHandler", "org.xml.sax.SAXException", "org.xml.sax.XMLReader", "org.xml.sax.helpers.AttributesImpl" ]
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import org.xml.sax.helpers.AttributesImpl;
import javax.xml.parsers.*; import org.xml.sax.*; import org.xml.sax.helpers.*;
[ "javax.xml", "org.xml.sax" ]
javax.xml; org.xml.sax;
2,068,927
public Body createBody (BodyDef def) { org.jbox2d.dynamics.BodyDef bd = new org.jbox2d.dynamics.BodyDef(); bd.active = def.active; bd.allowSleep = def.allowSleep; bd.angle = def.angle; bd.angularDamping = def.angularDamping; bd.angularVelocity = def.angularVelocity; bd.awake = def.awake; bd.bullet = def.bullet; bd.fixedRotation = def.fixedRotation; bd.gravityScale = def.gravityScale; bd.linearDamping = def.linearDamping; bd.linearVelocity.set(def.linearVelocity.x, def.linearVelocity.y); bd.position.set(def.position.x, def.position.y); if (def.type == BodyType.DynamicBody) bd.type = org.jbox2d.dynamics.BodyType.DYNAMIC; if (def.type == BodyType.StaticBody) bd.type = org.jbox2d.dynamics.BodyType.STATIC; if (def.type == BodyType.KinematicBody) bd.type = org.jbox2d.dynamics.BodyType.KINEMATIC; org.jbox2d.dynamics.Body b = world.createBody(bd); Body body = new Body(this, b); bodies.put(b, body); return body; }
Body function (BodyDef def) { org.jbox2d.dynamics.BodyDef bd = new org.jbox2d.dynamics.BodyDef(); bd.active = def.active; bd.allowSleep = def.allowSleep; bd.angle = def.angle; bd.angularDamping = def.angularDamping; bd.angularVelocity = def.angularVelocity; bd.awake = def.awake; bd.bullet = def.bullet; bd.fixedRotation = def.fixedRotation; bd.gravityScale = def.gravityScale; bd.linearDamping = def.linearDamping; bd.linearVelocity.set(def.linearVelocity.x, def.linearVelocity.y); bd.position.set(def.position.x, def.position.y); if (def.type == BodyType.DynamicBody) bd.type = org.jbox2d.dynamics.BodyType.DYNAMIC; if (def.type == BodyType.StaticBody) bd.type = org.jbox2d.dynamics.BodyType.STATIC; if (def.type == BodyType.KinematicBody) bd.type = org.jbox2d.dynamics.BodyType.KINEMATIC; org.jbox2d.dynamics.Body b = world.createBody(bd); Body body = new Body(this, b); bodies.put(b, body); return body; }
/** Create a rigid body given a definition. No reference to the definition is retained. * @warning This function is locked during callbacks. */
Create a rigid body given a definition. No reference to the definition is retained
createBody
{ "repo_name": "0359xiaodong/libgdx", "path": "extensions/gdx-box2d/gdx-box2d-gwt/src/com/badlogic/gdx/physics/box2d/gwt/emu/com/badlogic/gdx/physics/box2d/World.java", "license": "apache-2.0", "size": 14902 }
[ "com.badlogic.gdx.physics.box2d.BodyDef" ]
import com.badlogic.gdx.physics.box2d.BodyDef;
import com.badlogic.gdx.physics.box2d.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
177,530
public void updateObject(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { throw new NotUpdatable(); }
void function(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { throw new NotUpdatable(); }
/** * Support for java.sql.JDBCType/java.sql.SQLType. * * @param columnIndex * @param x * @param targetSqlType * @param scaleOrLength * @throws SQLException */
Support for java.sql.JDBCType/java.sql.SQLType
updateObject
{ "repo_name": "swankjesse/mysql-connector-j", "path": "src/com/mysql/jdbc/JDBC42ResultSet.java", "license": "gpl-2.0", "size": 4850 }
[ "java.sql.SQLException", "java.sql.SQLType" ]
import java.sql.SQLException; import java.sql.SQLType;
import java.sql.*;
[ "java.sql" ]
java.sql;
760,800
public void setInputMethodContext(InputMethodContext context) { }
void function(InputMethodContext context) { }
/** * Does nothing - this adapter doesn't use the input method context. * * @see java.awt.im.spi.InputMethod#setInputMethodContext */
Does nothing - this adapter doesn't use the input method context
setInputMethodContext
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/solaris/classes/sun/awt/X11InputMethod.java", "license": "mit", "size": 40313 }
[ "java.awt.im.spi.InputMethodContext" ]
import java.awt.im.spi.InputMethodContext;
import java.awt.im.spi.*;
[ "java.awt" ]
java.awt;
2,884,808
public java.util.List<fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI> getInput_terms_ProductSortHLAPI() { java.util.List<fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI>(); for (Sort elemnt : getInput()) { if (elemnt.getClass().equals(fr.lip6.move.pnml.pthlpng.terms.impl.ProductSortImpl.class)) { retour.add(new fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI( (fr.lip6.move.pnml.pthlpng.terms.ProductSort) elemnt)); } } return retour; }
java.util.List<fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI> function() { java.util.List<fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI>(); for (Sort elemnt : getInput()) { if (elemnt.getClass().equals(fr.lip6.move.pnml.pthlpng.terms.impl.ProductSortImpl.class)) { retour.add(new fr.lip6.move.pnml.pthlpng.terms.hlapi.ProductSortHLAPI( (fr.lip6.move.pnml.pthlpng.terms.ProductSort) elemnt)); } } return retour; }
/** * This accessor return a list of encapsulated subelement, only of * ProductSortHLAPI kind. WARNING : this method can creates a lot of new object * in memory. */
This accessor return a list of encapsulated subelement, only of ProductSortHLAPI kind. WARNING : this method can creates a lot of new object in memory
getInput_terms_ProductSortHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/booleans/hlapi/ImplyHLAPI.java", "license": "epl-1.0", "size": 69671 }
[ "fr.lip6.move.pnml.pthlpng.terms.Sort", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.pthlpng.terms.Sort; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.pthlpng.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,901,150
public SortedMap<String, Float> getRecallOfEachClassType();
SortedMap<String, Float> function();
/** * Return recall by class * * @return */
Return recall by class
getRecallOfEachClassType
{ "repo_name": "biotextmining/core", "path": "src/main/java/com/silicolife/textmining/core/interfaces/process/IE/ner/eval/INERSchemaClassEvaluationResults.java", "license": "lgpl-3.0", "size": 768 }
[ "java.util.SortedMap" ]
import java.util.SortedMap;
import java.util.*;
[ "java.util" ]
java.util;
2,580,258
private JdbcResponse registerBinaryType(JdbcBinaryTypeNamePutRequest req) { try { boolean res = getMarshallerCtx().registerClassName(req.platformId(), req.typeId(), req.typeName(), false); return resultToResonse(new JdbcUpdateBinarySchemaResult(req.requestId(), res)); } catch (Exception e) { U.error(log, "Failed to register new type [reqId=" + req.requestId() + ", req=" + req + ']', e); return exceptionToResult(e); } }
JdbcResponse function(JdbcBinaryTypeNamePutRequest req) { try { boolean res = getMarshallerCtx().registerClassName(req.platformId(), req.typeId(), req.typeName(), false); return resultToResonse(new JdbcUpdateBinarySchemaResult(req.requestId(), res)); } catch (Exception e) { U.error(log, STR + req.requestId() + STR + req + ']', e); return exceptionToResult(e); } }
/** * Handler for register new binary type requests. * * @param req Incoming request. * @return Acknowledgement in case of successful registration. */
Handler for register new binary type requests
registerBinaryType
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandler.java", "license": "apache-2.0", "size": 56295 }
[ "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,426,443
@Override public Edge<I, E> getCurrentEdge() throws IOException, InterruptedException { return this.edge; }
Edge<I, E> function() throws IOException, InterruptedException { return this.edge; }
/** * Gets current edge. * * @return The edge object represented by a Gora object */
Gets current edge
getCurrentEdge
{ "repo_name": "dcrankshaw/giraph", "path": "giraph-gora/src/main/java/org/apache/giraph/io/gora/GoraEdgeInputFormat.java", "license": "apache-2.0", "size": 12128 }
[ "java.io.IOException", "org.apache.giraph.edge.Edge" ]
import java.io.IOException; import org.apache.giraph.edge.Edge;
import java.io.*; import org.apache.giraph.edge.*;
[ "java.io", "org.apache.giraph" ]
java.io; org.apache.giraph;
1,480,648
public interface ValidationResultService { void saveValidationResults( Collection<ValidationResult> validationResults );
interface ValidationResultService { void function( Collection<ValidationResult> validationResults );
/** * Saves a set of ValidationResults in a bulk action * @param validationResults */
Saves a set of ValidationResults in a bulk action
saveValidationResults
{ "repo_name": "vmluan/dhis2-core", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResultService.java", "license": "bsd-3-clause", "size": 2207 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
769,437
private String getOrcDataLocation() { String orcDataLocation = getConversionConfig().getDestinationDataPath(); return orcDataLocation + Path.SEPARATOR + PUBLISHED_TABLE_SUBDIRECTORY; }
String function() { String orcDataLocation = getConversionConfig().getDestinationDataPath(); return orcDataLocation + Path.SEPARATOR + PUBLISHED_TABLE_SUBDIRECTORY; }
/*** * Get the ORC final table location of format: <ORC final table location>/final * @return ORC final table location. */
Get the ORC final table location of format: /final
getOrcDataLocation
{ "repo_name": "yukuai518/gobblin", "path": "gobblin-data-management/src/main/java/gobblin/data/management/conversion/hive/converter/AbstractAvroToOrcConverter.java", "license": "apache-2.0", "size": 31163 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
507,466
@Override public Set<Integer> primaryPartitions(UUID nodeId) { Set<Integer> set = primary.get(nodeId); return set == null ? Collections.emptySet() : Collections.unmodifiableSet(set); }
@Override Set<Integer> function(UUID nodeId) { Set<Integer> set = primary.get(nodeId); return set == null ? Collections.emptySet() : Collections.unmodifiableSet(set); }
/** * Get primary partitions for specified node ID. * * @param nodeId Node ID to get primary partitions for. * @return Primary partitions for specified node ID. */
Get primary partitions for specified node ID
primaryPartitions
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentV2.java", "license": "apache-2.0", "size": 10626 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,494,018
private Expression resolve(VarModelIdentifierExpression ex) { Expression result = null; String id = ex.getIdentifier(); try { IRuntimeEnvironment env = getResolver().getRuntimeEnvironment(); Object res = env.getIvmlValue(id); if (res instanceof DecisionVariable) { DecisionVariable var = ((DecisionVariable) res); TypeDescriptor<?> type = var.getType(); result = new ConstantExpression(type, var.getValue(), environment.getTypeRegistry()); } } catch (VilException e) { warnParsingIgnoring(id, e); } return result; }
Expression function(VarModelIdentifierExpression ex) { Expression result = null; String id = ex.getIdentifier(); try { IRuntimeEnvironment env = getResolver().getRuntimeEnvironment(); Object res = env.getIvmlValue(id); if (res instanceof DecisionVariable) { DecisionVariable var = ((DecisionVariable) res); TypeDescriptor<?> type = var.getType(); result = new ConstantExpression(type, var.getValue(), environment.getTypeRegistry()); } } catch (VilException e) { warnParsingIgnoring(id, e); } return result; }
/** * Resolves a {@link VarModelIdentifierExpression} based on the actual runtime environment * and, if resolved, replaces it by a constant. * * @param ex the expression to resolve * @return the resolved expression, <b>null</b> if not possible to resolve * @throws VilException in case of resolution problems */
Resolves a <code>VarModelIdentifierExpression</code> based on the actual runtime environment and, if resolved, replaces it by a constant
resolve
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/de.uni_hildesheim.sse.easy.instantiatorCore/src/net/ssehub/easy/instantiation/core/model/expressions/StringReplacer.java", "license": "apache-2.0", "size": 19106 }
[ "net.ssehub.easy.instantiation.core.model.common.VilException", "net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor", "net.ssehub.easy.instantiation.core.model.vilTypes.configuration.DecisionVariable" ]
import net.ssehub.easy.instantiation.core.model.common.VilException; import net.ssehub.easy.instantiation.core.model.vilTypes.TypeDescriptor; import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.DecisionVariable;
import net.ssehub.easy.instantiation.core.model.*; import net.ssehub.easy.instantiation.core.model.common.*;
[ "net.ssehub.easy" ]
net.ssehub.easy;
1,897,128
protected Path getPath() { return PATH; } /** * Parses a String array into a fully typed single reading. * @param triple A String[] of length 3, e.g. {"42", "15/12/2015 02:16:14", "37.0"}
Path function() { return PATH; } /** * Parses a String array into a fully typed single reading. * @param triple A String[] of length 3, e.g. {"42", STR, "37.0"}
/** * Utility method for allowing unit tests of the parser * @return The path of the directory containing the meat probe files */
Utility method for allowing unit tests of the parser
getPath
{ "repo_name": "m-markovic/FoodSafety", "path": "src/main/java/uk/ac/abdn/iotstreams/simulator/meatprobe/MeatProbeFilesParser.java", "license": "lgpl-2.1", "size": 3829 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
236,861
public static String escape(final Object self, final Object string) { final String str = JSType.toString(string); final int length = str.length(); if (length == 0) { return str; } final StringBuilder sb = new StringBuilder(); for (int k = 0; k < length; k++) { final char ch = str.charAt(k); if (UNESCAPED.indexOf(ch) != -1) { sb.append(ch); } else if (ch < 256) { sb.append('%'); if (ch < 16) { sb.append('0'); } sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH)); } else { sb.append("%u"); if (ch < 4096) { sb.append('0'); } sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH)); } } return sb.toString(); }
static String function(final Object self, final Object string) { final String str = JSType.toString(string); final int length = str.length(); if (length == 0) { return str; } final StringBuilder sb = new StringBuilder(); for (int k = 0; k < length; k++) { final char ch = str.charAt(k); if (UNESCAPED.indexOf(ch) != -1) { sb.append(ch); } else if (ch < 256) { sb.append('%'); if (ch < 16) { sb.append('0'); } sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH)); } else { sb.append("%u"); if (ch < 4096) { sb.append('0'); } sb.append(Integer.toHexString(ch).toUpperCase(Locale.ENGLISH)); } } return sb.toString(); }
/** * ECMA B.2.1, escape implementation * * @param self self reference * @param string string to escape * * @return escaped string */
ECMA B.2.1, escape implementation
escape
{ "repo_name": "DavidAlphaFox/jdk8u", "path": "nashorn/src/jdk/nashorn/internal/runtime/GlobalFunctions.java", "license": "gpl-2.0", "size": 17701 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
961,377
public SelectablePublishers getSelectablePublishers() { return _selectablePublishers; }
SelectablePublishers function() { return _selectablePublishers; }
/** * Gets list of selectable publishers. * @return the list of selectable publishers */
Gets list of selectable publishers
getSelectablePublishers
{ "repo_name": "Esri/geoportal-server", "path": "geoportal/src/com/esri/gpt/control/publication/ManageMetadataController.java", "license": "apache-2.0", "size": 24444 }
[ "com.esri.gpt.control.view.SelectablePublishers" ]
import com.esri.gpt.control.view.SelectablePublishers;
import com.esri.gpt.control.view.*;
[ "com.esri.gpt" ]
com.esri.gpt;
1,830,085
private static List<String> createHTMLFiles(List<Player> players) throws IOException { // Initialize a list of files to return List<String> files = new ArrayList<String>(); // Create the String representation of the /html directory String htmlDirStr = System.getProperty("user.dir") + System.getProperty("file.separator") + "html"; // If the directory doesn't already exist, create it File htmlDir = new File(htmlDirStr); if (!htmlDir.exists() && !htmlDir.isDirectory()) htmlDir.mkdir(); // Create the player data HTML files for (Player player : players) { // Initialize a file String fileName = htmlDirStr + System.getProperty("file.separator") + player.getId() + ".html"; File fileToWrite = new File(fileName); // If the file already exists, append a number in parentheses int index = 0; while (!fileToWrite.createNewFile()) { // Append (<index>).html after the Player ID fileName = htmlDirStr + System.getProperty("file.separator") + player.getId() + "(" + ++index + ")" + ".html"; // Try to create a file with this name fileToWrite = new File(fileName); } // Write the player data to ./html/<player-id>.html player.writeToHTML(fileToWrite); // Add the filename to the return list files.add(fileToWrite.getAbsolutePath()); } return files; }
static List<String> function(List<Player> players) throws IOException { List<String> files = new ArrayList<String>(); String htmlDirStr = System.getProperty(STR) + System.getProperty(STR) + "html"; File htmlDir = new File(htmlDirStr); if (!htmlDir.exists() && !htmlDir.isDirectory()) htmlDir.mkdir(); for (Player player : players) { String fileName = htmlDirStr + System.getProperty(STR) + player.getId() + ".html"; File fileToWrite = new File(fileName); int index = 0; while (!fileToWrite.createNewFile()) { fileName = htmlDirStr + System.getProperty(STR) + player.getId() + "(" + ++index + ")" + ".html"; fileToWrite = new File(fileName); } player.writeToHTML(fileToWrite); files.add(fileToWrite.getAbsolutePath()); } return files; }
/** * This method loops over the list of input {@link Player} objects and * attempts to write HTML files for the player data. * * @param players * The list of {@link Player} objects to use to create HTML files * @return The list of Strings for the path to the created files * @throws IOException */
This method loops over the list of input <code>Player</code> objects and attempts to write HTML files for the player data
createHTMLFiles
{ "repo_name": "tcpatt/tmn", "path": "tmn.dev.project/src/tmn/dev/project/Controller.java", "license": "epl-1.0", "size": 6241 }
[ "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,917,168
Index getIndexForColumns(OrderedIntHashSet set) { int maxMatchCount = 0; Index selected = null; if (set.isEmpty()) { return null; } for (int i = 0, count = indexList.length; i < count; i++) { Index currentindex = getIndex(i); int[] indexcols = currentindex.getColumns(); int matchCount = set.getOrderedMatchCount(indexcols); if (matchCount == 0) { continue; } if (matchCount == indexcols.length) { return currentindex; } if (matchCount > maxMatchCount) { maxMatchCount = matchCount; selected = currentindex; } } if (selected != null) { return selected; } switch (tableType) { case TableBase.SYSTEM_SUBQUERY : case TableBase.SYSTEM_TABLE : case TableBase.VIEW_TABLE : case TableBase.TEMP_TABLE : { selected = createIndexForColumns(set.toArray()); } } return selected; }
Index getIndexForColumns(OrderedIntHashSet set) { int maxMatchCount = 0; Index selected = null; if (set.isEmpty()) { return null; } for (int i = 0, count = indexList.length; i < count; i++) { Index currentindex = getIndex(i); int[] indexcols = currentindex.getColumns(); int matchCount = set.getOrderedMatchCount(indexcols); if (matchCount == 0) { continue; } if (matchCount == indexcols.length) { return currentindex; } if (matchCount > maxMatchCount) { maxMatchCount = matchCount; selected = currentindex; } } if (selected != null) { return selected; } switch (tableType) { case TableBase.SYSTEM_SUBQUERY : case TableBase.SYSTEM_TABLE : case TableBase.VIEW_TABLE : case TableBase.TEMP_TABLE : { selected = createIndexForColumns(set.toArray()); } } return selected; }
/** * Finds an existing index for a column set or create one for temporary * tables */
Finds an existing index for a column set or create one for temporary tables
getIndexForColumns
{ "repo_name": "anhnv-3991/VoltDB", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/Table.java", "license": "agpl-3.0", "size": 82842 }
[ "org.hsqldb_voltpatches.index.Index", "org.hsqldb_voltpatches.lib.OrderedIntHashSet" ]
import org.hsqldb_voltpatches.index.Index; import org.hsqldb_voltpatches.lib.OrderedIntHashSet;
import org.hsqldb_voltpatches.index.*; import org.hsqldb_voltpatches.lib.*;
[ "org.hsqldb_voltpatches.index", "org.hsqldb_voltpatches.lib" ]
org.hsqldb_voltpatches.index; org.hsqldb_voltpatches.lib;
104,886
private void processStatusCheckMessage(final TcpDiscoveryStatusCheckMessage msg) { assert msg != null; UUID locNodeId = getLocalNodeId(); if (msg.failedNodeId() != null) { if (locNodeId.equals(msg.failedNodeId())) { if (log.isDebugEnabled()) log.debug("Status check message discarded (suspect node is local node)."); return; } if (locNodeId.equals(msg.creatorNodeId()) && msg.senderNodeId() != null) { if (log.isDebugEnabled()) log.debug("Status check message discarded (local node is the sender of the status message)."); return; } if (isLocalNodeCoordinator() && ring.node(msg.creatorNodeId()) == null) { if (log.isDebugEnabled()) log.debug("Status check message discarded (creator node is not in topology)."); return; } } else { if (isLocalNodeCoordinator() && !locNodeId.equals(msg.creatorNodeId())) { // Local node is real coordinator, it should respond and discard message. if (ring.node(msg.creatorNodeId()) != null) { // Sender is in topology, send message via ring. msg.status(STATUS_OK); sendMessageAcrossRing(msg); } else { // Sender is not in topology, it should reconnect. msg.status(STATUS_RECON);
void function(final TcpDiscoveryStatusCheckMessage msg) { assert msg != null; UUID locNodeId = getLocalNodeId(); if (msg.failedNodeId() != null) { if (locNodeId.equals(msg.failedNodeId())) { if (log.isDebugEnabled()) log.debug(STR); return; } if (locNodeId.equals(msg.creatorNodeId()) && msg.senderNodeId() != null) { if (log.isDebugEnabled()) log.debug(STR); return; } if (isLocalNodeCoordinator() && ring.node(msg.creatorNodeId()) == null) { if (log.isDebugEnabled()) log.debug(STR); return; } } else { if (isLocalNodeCoordinator() && !locNodeId.equals(msg.creatorNodeId())) { if (ring.node(msg.creatorNodeId()) != null) { msg.status(STATUS_OK); sendMessageAcrossRing(msg); } else { msg.status(STATUS_RECON);
/** * Processes status check message. * * @param msg Status check message. */
Processes status check message
processStatusCheckMessage
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java", "license": "apache-2.0", "size": 314884 }
[ "org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessage" ]
import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessage;
import org.apache.ignite.spi.discovery.tcp.messages.*;
[ "org.apache.ignite" ]
org.apache.ignite;
175,976
@SafeVarargs public static <T> T[] append(IntFunction<T[]> arrayFunction, T[] arrayA, T... arrayB) { if ((arrayB == null) || (arrayB.length == 0)) { return arrayA; } if ((arrayA == null) || (arrayA.length == 0)) { return arrayB; } T[] array = arrayFunction.apply(arrayA.length + arrayB.length); copy(array, arrayA, arrayB, true); return array; }
static <T> T[] function(IntFunction<T[]> arrayFunction, T[] arrayA, T... arrayB) { if ((arrayB == null) (arrayB.length == 0)) { return arrayA; } if ((arrayA == null) (arrayA.length == 0)) { return arrayB; } T[] array = arrayFunction.apply(arrayA.length + arrayB.length); copy(array, arrayA, arrayB, true); return array; }
/** * Joins 2 arrays together, if any array is null or empty then other array will be returned without coping anything. * * @param arrayFunction * function that create array of given size, just T[]::new. * @param arrayA * first array. * @param arrayB * second array. * @param <T> * type of array. * * @return new joined array, or one of given ones if any of arrays was empty. */
Joins 2 arrays together, if any array is null or empty then other array will be returned without coping anything
append
{ "repo_name": "Diorite/Diorite", "path": "diorite-utils/commons/src/main/java/org/diorite/commons/arrays/DioriteArrayUtils.java", "license": "mit", "size": 105368 }
[ "java.util.function.IntFunction" ]
import java.util.function.IntFunction;
import java.util.function.*;
[ "java.util" ]
java.util;
125,975
public static void receivedNotification(Connection c) { c.finishConnection(); }
static void function(Connection c) { c.finishConnection(); }
/** * Closes a connection after it has received some data that won't be * replied. * * @param c Connection to close. */
Closes a connection after it has received some data that won't be replied
receivedNotification
{ "repo_name": "flordan/COMPSs-Mobile", "path": "code/runtime/commons/src/main/java/es/bsc/mobile/comm/CommunicationManager.java", "license": "apache-2.0", "size": 8117 }
[ "es.bsc.comm.Connection" ]
import es.bsc.comm.Connection;
import es.bsc.comm.*;
[ "es.bsc.comm" ]
es.bsc.comm;
1,663,960
protected void drawBody(Canvas canvas, Paint paint, long now) { // If not overridden, just fill with BG colour. canvas.drawColor(colBg); }
void function(Canvas canvas, Paint paint, long now) { canvas.drawColor(colBg); }
/** * Do the subclass-specific parts of drawing for this element. * * Subclasses should override this to do their drawing. * * @param canvas Canvas to draw into. * @param paint The Paint which was set up in initializePaint(). * @param now Nominal system time in ms. of this update. */
Do the subclass-specific parts of drawing for this element. Subclasses should override this to do their drawing
drawBody
{ "repo_name": "jmwhite999/_android_utilpad", "path": "HermitAndroid/src/org/hermit/android/instruments/Gauge.java", "license": "gpl-2.0", "size": 23454 }
[ "android.graphics.Canvas", "android.graphics.Paint" ]
import android.graphics.Canvas; import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
60,903
public void updateShort(int columnIndex, short x) throws SQLException { throw new NotUpdatable(); }
void function(int columnIndex, short x) throws SQLException { throw new NotUpdatable(); }
/** * JDBC 2.0 Update a column with a short value. The updateXXX() methods are * used to update column values in the current row, or the insert row. The * updateXXX() methods do not update the underlying database, instead the * updateRow() or insertRow() methods are called to update the database. * * @param columnIndex * the first column is 1, the second is 2, ... * @param x * the new column value * * @exception SQLException * if a database-access error occurs * @throws NotUpdatable * DOCUMENT ME! */
JDBC 2.0 Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database
updateShort
{ "repo_name": "Ytrio/Project-RPG-Story", "path": "mysql-connector-java-5.1.23/mysql-connector-java-5.1.23/src/com/mysql/jdbc/ResultSetImpl.java", "license": "gpl-2.0", "size": 246055 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
437,058
public void addRepositoryPermission(String role) { AccessPermission permission = AccessPermission.permissionFromRole(role); String repository = AccessPermission.repositoryFromRole(role).toLowerCase(); repositories.add(repository); permissions.put(repository, permission); }
void function(String role) { AccessPermission permission = AccessPermission.permissionFromRole(role); String repository = AccessPermission.repositoryFromRole(role).toLowerCase(); repositories.add(repository); permissions.put(repository, permission); }
/** * Adds a repository permission to the team. * <p> * Role may be formatted as: * <ul> * <li> myrepo.git <i>(this is implicitly RW+)</i> * <li> RW+:myrepo.git * </ul> * @param role */
Adds a repository permission to the team. Role may be formatted as: myrepo.git (this is implicitly RW+) RW+:myrepo.git
addRepositoryPermission
{ "repo_name": "BullShark/IRCBlit", "path": "src/main/java/com/gitblit/models/UserModel.java", "license": "apache-2.0", "size": 18123 }
[ "com.gitblit.Constants" ]
import com.gitblit.Constants;
import com.gitblit.*;
[ "com.gitblit" ]
com.gitblit;
2,457,770
protected int getSelectedIconColor(Context ctx) { return ColorHolder.color(getSelectedIconColor(), ctx, R.attr.material_drawer_selected_text, R.color.material_drawer_selected_text); }
int function(Context ctx) { return ColorHolder.color(getSelectedIconColor(), ctx, R.attr.material_drawer_selected_text, R.color.material_drawer_selected_text); }
/** * helper method to decide for the correct color * * @param ctx * @return */
helper method to decide for the correct color
getSelectedIconColor
{ "repo_name": "rabyunghwa/MaterialDrawer", "path": "library/src/main/java/com/mikepenz/materialdrawer/model/BaseDrawerItem.java", "license": "apache-2.0", "size": 9974 }
[ "android.content.Context", "com.mikepenz.materialdrawer.holder.ColorHolder" ]
import android.content.Context; import com.mikepenz.materialdrawer.holder.ColorHolder;
import android.content.*; import com.mikepenz.materialdrawer.holder.*;
[ "android.content", "com.mikepenz.materialdrawer" ]
android.content; com.mikepenz.materialdrawer;
1,686,059
private boolean verify(URI repo, String path, String algorithm) throws Exception { String digestPath = path + "." + algorithm; File actualFile = new File(root, path); if (download(repo, digestPath)) { File digestFile = new File(root, digestPath); final MessageDigest md = MessageDigest.getInstance(algorithm); IO.copy(actualFile, md); byte[] digest = md.digest(); String source = IO.collect(digestFile).toUpperCase(); String hex = Hex.toHexString(digest).toUpperCase(); if (source.startsWith(hex)) { System.err.println("Verified ok " + actualFile + " digest " + algorithm); return true; } } System.err.println("Failed to verify " + actualFile + " for digest " + algorithm); return false; }
boolean function(URI repo, String path, String algorithm) throws Exception { String digestPath = path + "." + algorithm; File actualFile = new File(root, path); if (download(repo, digestPath)) { File digestFile = new File(root, digestPath); final MessageDigest md = MessageDigest.getInstance(algorithm); IO.copy(actualFile, md); byte[] digest = md.digest(); String source = IO.collect(digestFile).toUpperCase(); String hex = Hex.toHexString(digest).toUpperCase(); if (source.startsWith(hex)) { System.err.println(STR + actualFile + STR + algorithm); return true; } } System.err.println(STR + actualFile + STR + algorithm); return false; }
/** * Verify the path against its digest for the given algorithm. * * @param repo * @param path * @param algorithm * @throws Exception */
Verify the path against its digest for the given algorithm
verify
{ "repo_name": "mcculls/bnd", "path": "biz.aQute.bndlib/src/aQute/bnd/maven/support/MavenEntry.java", "license": "apache-2.0", "size": 8221 }
[ "java.io.File", "java.security.MessageDigest" ]
import java.io.File; import java.security.MessageDigest;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
2,529,991
@Override public String getName() { return elektraPlugin.name; } public static class ElektraPlugin extends Structure {
String function() { return elektraPlugin.name; } public static class ElektraPlugin extends Structure {
/** * Returns the plugin name * * @return plugin name */
Returns the plugin name
getName
{ "repo_name": "mpranj/libelektra", "path": "src/bindings/jna/libelektra/src/main/java/org/libelektra/NativePlugin.java", "license": "bsd-3-clause", "size": 7350 }
[ "com.sun.jna.Structure" ]
import com.sun.jna.Structure;
import com.sun.jna.*;
[ "com.sun.jna" ]
com.sun.jna;
2,035,918
public static int checkedAdd(int a, int b) { long result = (long) a + b; checkNoOverflow(result == (int) result); return (int) result; }
static int function(int a, int b) { long result = (long) a + b; checkNoOverflow(result == (int) result); return (int) result; }
/** * Returns the sum of {@code a} and {@code b}, provided it does not overflow. * * @throws ArithmeticException if {@code a + b} overflows in signed {@code int} arithmetic */
Returns the sum of a and b, provided it does not overflow
checkedAdd
{ "repo_name": "10xEngineer/My-Wallet-Android", "path": "src/com/google/common/math/IntMath.java", "license": "gpl-3.0", "size": 18313 }
[ "com.google.common.math.MathPreconditions" ]
import com.google.common.math.MathPreconditions;
import com.google.common.math.*;
[ "com.google.common" ]
com.google.common;
2,053,715
public List<ContributorType> getPossibleContributions(Long personNameId, Long itemId);
List<ContributorType> function(Long personNameId, Long itemId);
/** * Get the list of contributions this person has made based on a given name. It * should not include a contribution type that is already associated * to this item for the given person name. * * @param personNameId - name id of the person who made the contribution * @param itemId - GenericItem the contribution was made to. * @return list of available contributions. */
Get the list of contributions this person has made based on a given name. It should not include a contribution type that is already associated to this item for the given person name
getPossibleContributions
{ "repo_name": "nate-rcl/irplus", "path": "ir_dao/src/edu/ur/ir/item/GenericItemDAO.java", "license": "apache-2.0", "size": 3667 }
[ "edu.ur.ir.person.ContributorType", "java.util.List" ]
import edu.ur.ir.person.ContributorType; import java.util.List;
import edu.ur.ir.person.*; import java.util.*;
[ "edu.ur.ir", "java.util" ]
edu.ur.ir; java.util;
2,722,689
public Observable<ServiceResponse<RoleAssignmentInner>> getWithServiceResponseAsync(String scope, String roleAssignmentName) { if (scope == null) { throw new IllegalArgumentException("Parameter scope is required and cannot be null."); } if (roleAssignmentName == null) { throw new IllegalArgumentException("Parameter roleAssignmentName 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<RoleAssignmentInner>> function(String scope, String roleAssignmentName) { if (scope == null) { throw new IllegalArgumentException(STR); } if (roleAssignmentName == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); }
/** * Get the specified role assignment. * * @param scope The scope of the role assignment. * @param roleAssignmentName The name of the role assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the RoleAssignmentInner object */
Get the specified role assignment
getWithServiceResponseAsync
{ "repo_name": "ljhljh235/azure-sdk-for-java", "path": "azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/RoleAssignmentsInner.java", "license": "apache-2.0", "size": 130184 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
153,974
public static Bitmap decodeFile(String pathName, BitmapFactory.Options opts) { return decodeFile(pathName, null, opts); }
static Bitmap function(String pathName, BitmapFactory.Options opts) { return decodeFile(pathName, null, opts); }
/** * Decode a file path into a bitmap using Options opts. * * @param pathName path to file to be decoded * @param opts Options to use during decoding * @return Bitmap created from file contents */
Decode a file path into a bitmap using Options opts
decodeFile
{ "repo_name": "frydsh/FlickrGuideViewDemo", "path": "src/com/yahoo/mobile/client/android/ymagine/BitmapFactory.java", "license": "apache-2.0", "size": 35416 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,087,136
public YangUInt32 getAuditIntervalValue() throws JNCException { YangUInt32 auditInterval = (YangUInt32)getValue("audit-interval"); if (auditInterval == null) { auditInterval = new YangUInt32("30000"); // default } return auditInterval; }
YangUInt32 function() throws JNCException { YangUInt32 auditInterval = (YangUInt32)getValue(STR); if (auditInterval == null) { auditInterval = new YangUInt32("30000"); } return auditInterval; }
/** * Gets the value for child leaf "audit-interval". * @return The value of the leaf. */
Gets the value for child leaf "audit-interval"
getAuditIntervalValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/interface_/MmeM3ua.java", "license": "apache-2.0", "size": 44401 }
[ "com.tailf.jnc.YangUInt32" ]
import com.tailf.jnc.YangUInt32;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
2,677,886
public Builder withAction(PiTableAction tableAction) { this.tableAction = checkNotNull(tableAction); return this; }
Builder function(PiTableAction tableAction) { this.tableAction = checkNotNull(tableAction); return this; }
/** * Sets the action of this table entry. * * @param tableAction table action * @return this */
Sets the action of this table entry
withAction
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/api/src/main/java/org/onosproject/net/pi/runtime/PiTableEntry.java", "license": "apache-2.0", "size": 6923 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,367,984
@Test public void testAcceptance_15() throws Exception { String request = "Delete /forbidden/absolute.html HTTP/1.0\r\n" + "Host: vHa\r\n" + "\r\n"; String response = this.sendRequest("127.0.0.1:18185", request); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_STATUS_403)); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_CONTENT_TYPE)); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_CONTENT_LENGTH)); Assert.assertFalse(response.matches(Pattern.HTTP_RESPONSE_LAST_MODIFIED_DIFFUSE)); String accessLog = this.accessStreamCaptureLine(ACCESS_LOG_RESPONSE_UUID(response)); Assert.assertTrue(accessLog, accessLog.matches(Pattern.ACCESS_LOG_STATUS_403)); }
void function() throws Exception { String request = STR + STR + "\r\n"; String response = this.sendRequest(STR, request); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_STATUS_403)); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_CONTENT_TYPE)); Assert.assertTrue(response.matches(Pattern.HTTP_RESPONSE_CONTENT_LENGTH)); Assert.assertFalse(response.matches(Pattern.HTTP_RESPONSE_LAST_MODIFIED_DIFFUSE)); String accessLog = this.accessStreamCaptureLine(ACCESS_LOG_RESPONSE_UUID(response)); Assert.assertTrue(accessLog, accessLog.matches(Pattern.ACCESS_LOG_STATUS_403)); }
/** * Test case for acceptance. * Delete with a forbidden URL. * The request is responded with status 403. * @throws Exception */
Test case for acceptance. Delete with a forbidden URL. The request is responded with status 403
testAcceptance_15
{ "repo_name": "seanox/devwex-test", "path": "test/com/seanox/devwex/WorkerTest_Delete.java", "license": "gpl-2.0", "size": 28922 }
[ "com.seanox.test.utils.Pattern", "org.junit.Assert" ]
import com.seanox.test.utils.Pattern; import org.junit.Assert;
import com.seanox.test.utils.*; import org.junit.*;
[ "com.seanox.test", "org.junit" ]
com.seanox.test; org.junit;
1,814,824
public void exit(Context context) { try { finishAllActivity(); ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); manager.killBackgroundProcesses(context.getPackageName()); System.exit(0); } catch (Exception e) { } }
void function(Context context) { try { finishAllActivity(); ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); manager.killBackgroundProcesses(context.getPackageName()); System.exit(0); } catch (Exception e) { } }
/** * Exit application * @param context */
Exit application
exit
{ "repo_name": "PanZeYong/AndroidApp", "path": "app/src/main/java/com/demo/panju/androidapp/base/AppManager.java", "license": "apache-2.0", "size": 2710 }
[ "android.app.ActivityManager", "android.content.Context" ]
import android.app.ActivityManager; import android.content.Context;
import android.app.*; import android.content.*;
[ "android.app", "android.content" ]
android.app; android.content;
446,963
private boolean setSizeXYRelativeToParent(AbstractShape shape, float width, float height){ if (width > 0 && height > 0){ Vector3D centerPoint; if (shape.hasBounds()){ centerPoint = shape.getBounds().getCenterPointLocal(); centerPoint.transform(shape.getLocalMatrix()); //TODO neccessary? }else{ centerPoint = shape.getCenterPointGlobal(); centerPoint.transform(shape.getGlobalInverseMatrix()); } shape.scale(width* (1/shape.getWidthXY(TransformSpace.RELATIVE_TO_PARENT)), height*(1/shape.getHeightXY(TransformSpace.RELATIVE_TO_PARENT)), 1, centerPoint); return true; }else return false; } }//class
boolean function(AbstractShape shape, float width, float height){ if (width > 0 && height > 0){ Vector3D centerPoint; if (shape.hasBounds()){ centerPoint = shape.getBounds().getCenterPointLocal(); centerPoint.transform(shape.getLocalMatrix()); }else{ centerPoint = shape.getCenterPointGlobal(); centerPoint.transform(shape.getGlobalInverseMatrix()); } shape.scale(width* (1/shape.getWidthXY(TransformSpace.RELATIVE_TO_PARENT)), height*(1/shape.getHeightXY(TransformSpace.RELATIVE_TO_PARENT)), 1, centerPoint); return true; }else return false; } }
/** * Sets the size xy relative to parent. * * @param shape the shape * @param width the width * @param height the height * * @return true, if successful */
Sets the size xy relative to parent
setSizeXYRelativeToParent
{ "repo_name": "theoreme/MT4J", "path": "src/org/mt4j/components/visibleComponents/widgets/keyboard/MTKeyboard.java", "license": "gpl-2.0", "size": 39027 }
[ "org.mt4j.components.TransformSpace", "org.mt4j.components.visibleComponents.shapes.AbstractShape", "org.mt4j.util.math.Vector3D" ]
import org.mt4j.components.TransformSpace; import org.mt4j.components.visibleComponents.shapes.AbstractShape; import org.mt4j.util.math.Vector3D;
import org.mt4j.components.*; import org.mt4j.util.math.*;
[ "org.mt4j.components", "org.mt4j.util" ]
org.mt4j.components; org.mt4j.util;
436,215
public Map getCommands() { return this.commandMap; }
Map function() { return this.commandMap; }
/** * returns a map of string to commads. All commands are returned, not just ones which someone has permission to use. */
returns a map of string to commads. All commands are returned, not just ones which someone has permission to use
getCommands
{ "repo_name": "mviitanen/marsmod", "path": "mcp/src/minecraft_server/net/minecraft/command/CommandHandler.java", "license": "gpl-2.0", "size": 8312 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,915,214
public void searchFolder(File aFolder) { resetSearch(); searchSingleFolder(aFolder); bSearchFinished = true; }
void function(File aFolder) { resetSearch(); searchSingleFolder(aFolder); bSearchFinished = true; }
/** * Search the folder and it's subfolders for files/folders matching the query. * * @param aFolder - root folder to start the search */
Search the folder and it's subfolders for files/folders matching the query
searchFolder
{ "repo_name": "baracudda/androidBits", "path": "lib_androidBits/src/main/java/com/blackmoonit/androidbits/filesystem/FileMatcher.java", "license": "apache-2.0", "size": 16020 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,588,492
public static void dumpBitmaps(Bitmap idealBitmap, Bitmap testedBitmap, String testName, String className, DifferenceVisualizer differenceVisualizer) { Bitmap visualizerBitmap; int width = idealBitmap.getWidth(); int height = idealBitmap.getHeight(); int[] testedArray = new int[width * height]; int[] idealArray = new int[width * height]; idealBitmap.getPixels(testedArray, 0, width, 0, 0, width, height); testedBitmap.getPixels(idealArray, 0, width, 0, 0, width, height); int[] visualizerArray = differenceVisualizer.getDifferences(idealArray, testedArray); visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); visualizerBitmap.setPixels(visualizerArray, 0, width, 0, 0, width, height); Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); saveFile(className, testName, IDEAL_RENDERING_FILE_NAME, idealBitmap); saveFile(className, testName, TESTED_RENDERING_FILE_NAME, croppedBitmap); saveFile(className, testName, VISUALIZER_RENDERING_FILE_NAME, visualizerBitmap); }
static void function(Bitmap idealBitmap, Bitmap testedBitmap, String testName, String className, DifferenceVisualizer differenceVisualizer) { Bitmap visualizerBitmap; int width = idealBitmap.getWidth(); int height = idealBitmap.getHeight(); int[] testedArray = new int[width * height]; int[] idealArray = new int[width * height]; idealBitmap.getPixels(testedArray, 0, width, 0, 0, width, height); testedBitmap.getPixels(idealArray, 0, width, 0, 0, width, height); int[] visualizerArray = differenceVisualizer.getDifferences(idealArray, testedArray); visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); visualizerBitmap.setPixels(visualizerArray, 0, width, 0, 0, width, height); Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); saveFile(className, testName, IDEAL_RENDERING_FILE_NAME, idealBitmap); saveFile(className, testName, TESTED_RENDERING_FILE_NAME, croppedBitmap); saveFile(className, testName, VISUALIZER_RENDERING_FILE_NAME, visualizerBitmap); }
/** * Saves two files, one the capture of an ideal drawing, and one the capture of the tested * drawing. The third file saved is a bitmap that is returned from the given visualizer's * method. * The files are saved to the sdcard directory */
Saves two files, one the capture of an ideal drawing, and one the capture of the tested drawing. The third file saved is a bitmap that is returned from the given visualizer's method. The files are saved to the sdcard directory
dumpBitmaps
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "cts/tests/tests/uirendering/src/android/uirendering/cts/util/BitmapDumper.java", "license": "gpl-3.0", "size": 5451 }
[ "android.graphics.Bitmap", "android.uirendering.cts.differencevisualizers.DifferenceVisualizer" ]
import android.graphics.Bitmap; import android.uirendering.cts.differencevisualizers.DifferenceVisualizer;
import android.graphics.*; import android.uirendering.cts.differencevisualizers.*;
[ "android.graphics", "android.uirendering" ]
android.graphics; android.uirendering;
830,258
try { FileOutputStream fos = new FileOutputStream(new File(filename)); fos.write(value.getBytes()); fos.flush(); fos.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
try { FileOutputStream fos = new FileOutputStream(new File(filename)); fos.write(value.getBytes()); fos.flush(); fos.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
/** * Write a string value to the specified file. * @param filename The filename * @param value The value */
Write a string value to the specified file
writeValue
{ "repo_name": "CyanideL/ShiftTools", "path": "src/mobi/cyann/shifttools/Utils.java", "license": "gpl-3.0", "size": 1987 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,836,183
public static long findFirstSyncPosition(RcFileDataSource dataSource, long offset, long length, long syncFirst, long syncSecond) throws IOException { requireNonNull(dataSource, "dataSource is null"); checkArgument(offset >= 0, "offset is negative"); checkArgument(length >= 1, "length must be at least 1"); checkArgument(offset + length <= dataSource.getSize(), "offset plus length is greater than data size"); // The full sync sequence is "0xFFFFFFFF syncFirst syncSecond". If // this sequence begins the file range, the start position is returned // even if the sequence finishes after length. // NOTE: this decision must agree with RcFileReader.nextBlock Slice sync = Slices.allocate(SIZE_OF_INT + SIZE_OF_LONG + SIZE_OF_LONG); sync.setInt(0, 0xFFFF_FFFF); sync.setLong(SIZE_OF_INT, syncFirst); sync.setLong(SIZE_OF_INT + SIZE_OF_LONG, syncSecond); // read 1 MB chunks at a time, but only skip ahead 1 MB - SYNC_SEQUENCE_LENGTH bytes // this causes a re-read of SYNC_SEQUENCE_LENGTH bytes each time, but is much simpler code byte[] buffer = new byte[toIntExact(min(1 << 20, length + (SYNC_SEQUENCE_LENGTH - 1)))]; Slice bufferSlice = Slices.wrappedBuffer(buffer); for (long position = 0; position < length; position += bufferSlice.length() - (SYNC_SEQUENCE_LENGTH - 1)) { // either fill the buffer entirely, or read enough to allow all bytes in offset + length to be a start sequence int bufferSize = toIntExact(min(buffer.length, length + (SYNC_SEQUENCE_LENGTH - 1) - position)); // don't read off the end of the file bufferSize = toIntExact(min(bufferSize, dataSource.getSize() - offset - position)); dataSource.readFully(offset + position, buffer, 0, bufferSize); // find the starting index position of the sync sequence int index = bufferSlice.indexOf(sync); if (index >= 0) { // If the starting position is before the end of the search region, return the // absolute start position of the sequence. if (position + index < length) { long startOfSyncSequence = offset + position + index; return startOfSyncSequence; } else { // Otherwise, this is not a match for this region // Note: this case isn't strictly needed as the loop will exit, but it is // simpler to explicitly call it out. return -1; } } } return -1; }
static long function(RcFileDataSource dataSource, long offset, long length, long syncFirst, long syncSecond) throws IOException { requireNonNull(dataSource, STR); checkArgument(offset >= 0, STR); checkArgument(length >= 1, STR); checkArgument(offset + length <= dataSource.getSize(), STR); Slice sync = Slices.allocate(SIZE_OF_INT + SIZE_OF_LONG + SIZE_OF_LONG); sync.setInt(0, 0xFFFF_FFFF); sync.setLong(SIZE_OF_INT, syncFirst); sync.setLong(SIZE_OF_INT + SIZE_OF_LONG, syncSecond); byte[] buffer = new byte[toIntExact(min(1 << 20, length + (SYNC_SEQUENCE_LENGTH - 1)))]; Slice bufferSlice = Slices.wrappedBuffer(buffer); for (long position = 0; position < length; position += bufferSlice.length() - (SYNC_SEQUENCE_LENGTH - 1)) { int bufferSize = toIntExact(min(buffer.length, length + (SYNC_SEQUENCE_LENGTH - 1) - position)); bufferSize = toIntExact(min(bufferSize, dataSource.getSize() - offset - position)); dataSource.readFully(offset + position, buffer, 0, bufferSize); int index = bufferSlice.indexOf(sync); if (index >= 0) { if (position + index < length) { long startOfSyncSequence = offset + position + index; return startOfSyncSequence; } else { return -1; } } } return -1; }
/** * Find the beginning of the first full sync sequence that starts within the specified range. */
Find the beginning of the first full sync sequence that starts within the specified range
findFirstSyncPosition
{ "repo_name": "cberner/presto", "path": "presto-rcfile/src/main/java/com/facebook/presto/rcfile/RcFileDecoderUtils.java", "license": "apache-2.0", "size": 7292 }
[ "com.google.common.base.Preconditions", "io.airlift.slice.Slice", "io.airlift.slice.Slices", "java.io.IOException", "java.lang.Math", "java.util.Objects" ]
import com.google.common.base.Preconditions; import io.airlift.slice.Slice; import io.airlift.slice.Slices; import java.io.IOException; import java.lang.Math; import java.util.Objects;
import com.google.common.base.*; import io.airlift.slice.*; import java.io.*; import java.lang.*; import java.util.*;
[ "com.google.common", "io.airlift.slice", "java.io", "java.lang", "java.util" ]
com.google.common; io.airlift.slice; java.io; java.lang; java.util;
149,599
public AzureBlobStorageLinkedService withServiceEndpoint(String serviceEndpoint) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new AzureBlobStorageLinkedServiceTypeProperties(); } this.innerTypeProperties().withServiceEndpoint(serviceEndpoint); return this; }
AzureBlobStorageLinkedService function(String serviceEndpoint) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new AzureBlobStorageLinkedServiceTypeProperties(); } this.innerTypeProperties().withServiceEndpoint(serviceEndpoint); return this; }
/** * Set the serviceEndpoint property: Blob service endpoint of the Azure Blob Storage resource. It is mutually * exclusive with connectionString, sasUri property. * * @param serviceEndpoint the serviceEndpoint value to set. * @return the AzureBlobStorageLinkedService object itself. */
Set the serviceEndpoint property: Blob service endpoint of the Azure Blob Storage resource. It is mutually exclusive with connectionString, sasUri property
withServiceEndpoint
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/AzureBlobStorageLinkedService.java", "license": "mit", "size": 15618 }
[ "com.azure.resourcemanager.datafactory.fluent.models.AzureBlobStorageLinkedServiceTypeProperties" ]
import com.azure.resourcemanager.datafactory.fluent.models.AzureBlobStorageLinkedServiceTypeProperties;
import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,156,148
protected static Table<String, Attribute<String>, List<Attribute<String>>> getCachedByDAO( @NotNull final String dao) { return FIND_BY_DAO_CACHE.get(dao.toLowerCase(Locale.US)); }
static Table<String, Attribute<String>, List<Attribute<String>>> function( @NotNull final String dao) { return FIND_BY_DAO_CACHE.get(dao.toLowerCase(Locale.US)); }
/** * Retrieves the {@link Table} associated to given DAO, from local cache. * @param dao the DAO. * @return such {@link Table}, or <code>null</code> if not found. */
Retrieves the <code>Table</code> associated to given DAO, from local cache
getCachedByDAO
{ "repo_name": "rydnr/queryj-rt", "path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/engines/MetadataManagerTableDAO.java", "license": "gpl-2.0", "size": 24112 }
[ "java.util.List", "java.util.Locale", "org.acmsl.queryj.metadata.vo.Attribute", "org.acmsl.queryj.metadata.vo.Table", "org.jetbrains.annotations.NotNull" ]
import java.util.List; import java.util.Locale; import org.acmsl.queryj.metadata.vo.Attribute; import org.acmsl.queryj.metadata.vo.Table; import org.jetbrains.annotations.NotNull;
import java.util.*; import org.acmsl.queryj.metadata.vo.*; import org.jetbrains.annotations.*;
[ "java.util", "org.acmsl.queryj", "org.jetbrains.annotations" ]
java.util; org.acmsl.queryj; org.jetbrains.annotations;
2,152,648
public void setSelectedIndexWithCallback(float index) { float angle; int index1 = (int)Math.round(index); if (isStepped) { if (index1 < 0) index1 = 0; else if (index1 > stepValues.size()-1) index1 = stepValues.size()-1; setInternalIndex(index1); angle = index1*stepSize-180+startGap; } else { if (index1 < 0) index1 = 0; else if (index1 > 100) index1 = 100; setInternalIndex(index1); angle = index*stepSize-180+startGap; } elCenter.setLocalRotation(elCenter.getLocalRotation().fromAngleAxis(-(angle*FastMath.DEG_TO_RAD), Vector3f.UNIT_Z)); }
void function(float index) { float angle; int index1 = (int)Math.round(index); if (isStepped) { if (index1 < 0) index1 = 0; else if (index1 > stepValues.size()-1) index1 = stepValues.size()-1; setInternalIndex(index1); angle = index1*stepSize-180+startGap; } else { if (index1 < 0) index1 = 0; else if (index1 > 100) index1 = 100; setInternalIndex(index1); angle = index*stepSize-180+startGap; } elCenter.setLocalRotation(elCenter.getLocalRotation().fromAngleAxis(-(angle*FastMath.DEG_TO_RAD), Vector3f.UNIT_Z)); }
/** * For use with free-floating Dials - Sets the selected index of the Dial * @param index float A range from 0.0 to 100.0 for a more accurate representation of the angle desired */
For use with free-floating Dials - Sets the selected index of the Dial
setSelectedIndexWithCallback
{ "repo_name": "sytrox/fortgeschrittene-Spieleenticklung", "path": "src/tonegod/gui/controls/lists/Dial.java", "license": "apache-2.0", "size": 14484 }
[ "com.jme3.math.FastMath", "com.jme3.math.Vector3f" ]
import com.jme3.math.FastMath; import com.jme3.math.Vector3f;
import com.jme3.math.*;
[ "com.jme3.math" ]
com.jme3.math;
729,487
private static Artifact makeArtifact(String value) { Artifact element = artifactBuilder.buildObject(); element.setArtifact(value); return element; }
static Artifact function(String value) { Artifact element = artifactBuilder.buildObject(); element.setArtifact(value); return element; }
/** * Static factory for SAML {@link Artifact} objects. * * @param value The artifact string. * @return A new <code>Artifact</code> object. */
Static factory for SAML <code>Artifact</code> objects
makeArtifact
{ "repo_name": "dweidenfeld/library", "path": "src/com/google/enterprise/adaptor/secmgr/saml/OpenSamlUtil.java", "license": "apache-2.0", "size": 43010 }
[ "org.opensaml.saml2.core.Artifact" ]
import org.opensaml.saml2.core.Artifact;
import org.opensaml.saml2.core.*;
[ "org.opensaml.saml2" ]
org.opensaml.saml2;
2,398,014
public static Vector tokenizeString(String source, char separator) { Vector tokenized = new Vector(); int len = source.length(); boolean lastSeparator = false; StringBuilder buf = new StringBuilder(); for(int iter = 0 ; iter < len ; iter++) { char current = source.charAt(iter); if(current == separator) { if(lastSeparator) { buf.append(separator); lastSeparator = false; continue; } lastSeparator = true; if(buf.length() > 0) { tokenized.addElement(buf.toString()); buf = new StringBuilder(); } } else { lastSeparator = false; buf.append(current); } } if(buf.length() > 0) { tokenized.addElement(buf.toString()); } return tokenized; }
static Vector function(String source, char separator) { Vector tokenized = new Vector(); int len = source.length(); boolean lastSeparator = false; StringBuilder buf = new StringBuilder(); for(int iter = 0 ; iter < len ; iter++) { char current = source.charAt(iter); if(current == separator) { if(lastSeparator) { buf.append(separator); lastSeparator = false; continue; } lastSeparator = true; if(buf.length() > 0) { tokenized.addElement(buf.toString()); buf = new StringBuilder(); } } else { lastSeparator = false; buf.append(current); } } if(buf.length() > 0) { tokenized.addElement(buf.toString()); } return tokenized; }
/** * Breaks a String to multiple strings. * * @param source the String to break * @param separator the pattern to search and break. * @return a Vector of Strings * @deprecated use the tokenize() method instead */
Breaks a String to multiple strings
tokenizeString
{ "repo_name": "codenameone/CodenameOne", "path": "CodenameOne/src/com/codename1/util/StringUtil.java", "license": "gpl-2.0", "size": 9562 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,675,161
public List<DTNHost> getHosts() { return this.hosts; }
List<DTNHost> function() { return this.hosts; }
/** * Returns the hosts in a list * @return the hosts in a list */
Returns the hosts in a list
getHosts
{ "repo_name": "nickprogr/The-ONE-Simulator-for-FMI-Buiding-TUM", "path": "core/World.java", "license": "gpl-3.0", "size": 7809 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
322,229
Map<String, IEffector> createEffectors();
Map<String, IEffector> createEffectors();
/** * Creates all Effectors based on this meta-model * @return a map with all effectors */
Creates all Effectors based on this meta-model
createEffectors
{ "repo_name": "HSOAutonomy/base", "path": "src/hso/autonomy/agent/model/agentmeta/IAgentMetaModel.java", "license": "mit", "size": 2675 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,909,360
public PageBlobAsyncClient getPageBlobAsyncClient() { return prepareBuilder().buildPageBlobAsyncClient(); }
PageBlobAsyncClient function() { return prepareBuilder().buildPageBlobAsyncClient(); }
/** * Creates a new {@link PageBlobAsyncClient} associated with this blob. * * @return A {@link PageBlobAsyncClient} associated with this blob. */
Creates a new <code>PageBlobAsyncClient</code> associated with this blob
getPageBlobAsyncClient
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobAsyncClient.java", "license": "mit", "size": 40386 }
[ "com.azure.storage.blob.specialized.PageBlobAsyncClient" ]
import com.azure.storage.blob.specialized.PageBlobAsyncClient;
import com.azure.storage.blob.specialized.*;
[ "com.azure.storage" ]
com.azure.storage;
1,544,589
public void setUseSubrangePaint(boolean flag) { this.useSubrangePaint = flag; notifyListeners(new PlotChangeEvent(this)); }
void function(boolean flag) { this.useSubrangePaint = flag; notifyListeners(new PlotChangeEvent(this)); }
/** * Sets the range colour change option. * * @param flag The new range colour change option */
Sets the range colour change option
setUseSubrangePaint
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/plot/ThermometerPlot.java", "license": "gpl-2.0", "size": 48435 }
[ "org.jfree.chart.event.PlotChangeEvent" ]
import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,699,175
public void setTextObjects(FSArray v) { if (Section_Type.featOkTst && ((Section_Type)jcasType).casFeat_textObjects == null) jcasType.jcas.throwFeatMissing("textObjects", "de.julielab.jules.types.Section"); jcasType.ll_cas.ll_setRefValue(addr, ((Section_Type)jcasType).casFeatCode_textObjects, jcasType.ll_cas.ll_getFSRef(v));}
void function(FSArray v) { if (Section_Type.featOkTst && ((Section_Type)jcasType).casFeat_textObjects == null) jcasType.jcas.throwFeatMissing(STR, STR); jcasType.ll_cas.ll_setRefValue(addr, ((Section_Type)jcasType).casFeatCode_textObjects, jcasType.ll_cas.ll_getFSRef(v));}
/** setter for textObjects - sets the text objects (figure, table, boxed text etc.) that are associated with a particular section * @generated * @param v value to set into the feature */
setter for textObjects - sets the text objects (figure, table, boxed text etc.) that are associated with a particular section
setTextObjects
{ "repo_name": "BlueBrain/bluima", "path": "modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Section.java", "license": "apache-2.0", "size": 7949 }
[ "org.apache.uima.jcas.cas.FSArray" ]
import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.cas.*;
[ "org.apache.uima" ]
org.apache.uima;
1,311,381
private void setDeprecatedPropertiesForUpgrade(Properties props) { deprecatedProperties = new HashMap<>(); String md5 = props.getProperty(DEPRECATED_MESSAGE_DIGEST_PROPERTY); if (md5 != null) { deprecatedProperties.put(DEPRECATED_MESSAGE_DIGEST_PROPERTY, md5); } }
void function(Properties props) { deprecatedProperties = new HashMap<>(); String md5 = props.getProperty(DEPRECATED_MESSAGE_DIGEST_PROPERTY); if (md5 != null) { deprecatedProperties.put(DEPRECATED_MESSAGE_DIGEST_PROPERTY, md5); } }
/** * Pull any properties out of the VERSION file that are from older * versions of HDFS and only necessary during upgrade. */
Pull any properties out of the VERSION file that are from older versions of HDFS and only necessary during upgrade
setDeprecatedPropertiesForUpgrade
{ "repo_name": "nandakumar131/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java", "license": "apache-2.0", "size": 39931 }
[ "java.util.HashMap", "java.util.Properties" ]
import java.util.HashMap; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
274,316
public void deleteIfExists(File path, String user, String logPrefix) throws IOException { //by default no need to do this as a different user deleteIfExists(path); }
void function(File path, String user, String logPrefix) throws IOException { deleteIfExists(path); }
/** * Delete a file or a directory and all of the children. If it exists. * @param path what to delete * @param user who to delete it as if doing it as someone else is supported * @param logPrefix if an external process needs to be launched to delete * the object what prefix to include in the logs * @throws IOException on any error. */
Delete a file or a directory and all of the children. If it exists
deleteIfExists
{ "repo_name": "anshuiisc/storm-Allbolts-wiring", "path": "storm-core/src/jvm/org/apache/storm/daemon/supervisor/AdvancedFSOps.java", "license": "apache-2.0", "size": 13042 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
305,832
public static boolean isAbsolute(File file) { if (isWindows()) { // special for windows String path = file.getPath(); if (path.startsWith(File.separator)) { return true; } } return file.isAbsolute(); }
static boolean function(File file) { if (isWindows()) { String path = file.getPath(); if (path.startsWith(File.separator)) { return true; } } return file.isAbsolute(); }
/** * Is the given file an absolute file. * <p/> * Will also work around issue on Windows to consider files on Windows starting with a \ * as absolute files. This makes the logic consistent across all OS platforms. * * @param file the file * @return <tt>true</ff> if its an absolute path, <tt>false</tt> otherwise. */
Is the given file an absolute file. Will also work around issue on Windows to consider files on Windows starting with a \ as absolute files. This makes the logic consistent across all OS platforms
isAbsolute
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/main/java/org/apache/camel/util/FileUtil.java", "license": "apache-2.0", "size": 11836 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
908,812
public void handleRegionLoss(SystemMemberRegionEvent event); /** * Implementation should handle client membership changes. * * @param clientId * id of the client for whom membership change happened * @param eventType * membership change type; one of * {@link ClientMembershipMessage#JOINED}, * {@link ClientMembershipMessage#LEFT}, * {@link ClientMembershipMessage#CRASHED}
void function(SystemMemberRegionEvent event); /** * Implementation should handle client membership changes. * * @param clientId * id of the client for whom membership change happened * @param eventType * membership change type; one of * {@link ClientMembershipMessage#JOINED}, * {@link ClientMembershipMessage#LEFT}, * {@link ClientMembershipMessage#CRASHED}
/** * Implementation should handle loss of region by extracting the details * from the given event object. * * @param event * event object corresponding to the loss of a region */
Implementation should handle loss of region by extracting the details from the given event object
handleRegionLoss
{ "repo_name": "upthewaterspout/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmx.java", "license": "apache-2.0", "size": 18785 }
[ "com.gemstone.gemfire.admin.SystemMemberRegionEvent", "com.gemstone.gemfire.internal.admin.ClientMembershipMessage" ]
import com.gemstone.gemfire.admin.SystemMemberRegionEvent; import com.gemstone.gemfire.internal.admin.ClientMembershipMessage;
import com.gemstone.gemfire.admin.*; import com.gemstone.gemfire.internal.admin.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
91,812
@Override public boolean receive(CarbonMessage carbonMessage, CarbonCallback carbonCallback) { // If we are running on OSGi mode need to get the registry based on the channel_id. executorService.execute(() -> { MicroservicesRegistryImpl currentMicroservicesRegistry = DataHolder.getInstance().getMicroservicesRegistries() .get(carbonMessage.getProperty(MSF4JConstants.CHANNEL_ID)); Request request = new Request(carbonMessage); request.setSessionManager(currentMicroservicesRegistry.getSessionManager()); Response response = new Response(carbonCallback, request); try { dispatchMethod(currentMicroservicesRegistry, request, response); } catch (HandlerException e) { handleHandlerException(e, carbonCallback); } catch (InvocationTargetException e) { Throwable targetException = e.getTargetException(); if (targetException instanceof HandlerException) { handleHandlerException((HandlerException) targetException, carbonCallback); } else { handleThrowable(currentMicroservicesRegistry, targetException, carbonCallback, request); } } catch (InterceptorException e) { log.warn("Interceptors threw an exception", e); // TODO: improve the response carbonCallback.done(HttpUtil.createTextResponse( javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), HttpUtil.EMPTY_BODY)); } catch (Throwable t) { handleThrowable(currentMicroservicesRegistry, t, carbonCallback, request); } finally { // Calling the release method to make sure that there won't be any memory leaks from netty carbonMessage.release(); } }); return true; }
boolean function(CarbonMessage carbonMessage, CarbonCallback carbonCallback) { executorService.execute(() -> { MicroservicesRegistryImpl currentMicroservicesRegistry = DataHolder.getInstance().getMicroservicesRegistries() .get(carbonMessage.getProperty(MSF4JConstants.CHANNEL_ID)); Request request = new Request(carbonMessage); request.setSessionManager(currentMicroservicesRegistry.getSessionManager()); Response response = new Response(carbonCallback, request); try { dispatchMethod(currentMicroservicesRegistry, request, response); } catch (HandlerException e) { handleHandlerException(e, carbonCallback); } catch (InvocationTargetException e) { Throwable targetException = e.getTargetException(); if (targetException instanceof HandlerException) { handleHandlerException((HandlerException) targetException, carbonCallback); } else { handleThrowable(currentMicroservicesRegistry, targetException, carbonCallback, request); } } catch (InterceptorException e) { log.warn(STR, e); carbonCallback.done(HttpUtil.createTextResponse( javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), HttpUtil.EMPTY_BODY)); } catch (Throwable t) { handleThrowable(currentMicroservicesRegistry, t, carbonCallback, request); } finally { carbonMessage.release(); } }); return true; }
/** * Carbon message handler. */
Carbon message handler
receive
{ "repo_name": "callkalpa/product-mss", "path": "core/src/main/java/org/wso2/msf4j/internal/MSF4JMessageProcessor.java", "license": "apache-2.0", "size": 7959 }
[ "java.lang.reflect.InvocationTargetException", "org.wso2.carbon.messaging.CarbonCallback", "org.wso2.carbon.messaging.CarbonMessage", "org.wso2.msf4j.Request", "org.wso2.msf4j.Response", "org.wso2.msf4j.internal.router.HandlerException", "org.wso2.msf4j.util.HttpUtil" ]
import java.lang.reflect.InvocationTargetException; import org.wso2.carbon.messaging.CarbonCallback; import org.wso2.carbon.messaging.CarbonMessage; import org.wso2.msf4j.Request; import org.wso2.msf4j.Response; import org.wso2.msf4j.internal.router.HandlerException; import org.wso2.msf4j.util.HttpUtil;
import java.lang.reflect.*; import org.wso2.carbon.messaging.*; import org.wso2.msf4j.*; import org.wso2.msf4j.internal.router.*; import org.wso2.msf4j.util.*;
[ "java.lang", "org.wso2.carbon", "org.wso2.msf4j" ]
java.lang; org.wso2.carbon; org.wso2.msf4j;
2,505,047
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> revokePermissionWithResponseAsync( String hub, String permission, String connectionId, RequestOptions requestOptions) { if (hub == null) { return Mono.error(new IllegalArgumentException("Parameter hub is required and cannot be null.")); } if (permission == null) { return Mono.error(new IllegalArgumentException("Parameter permission is required and cannot be null.")); } if (connectionId == null) { return Mono.error(new IllegalArgumentException("Parameter connectionId is required and cannot be null.")); } return FluxUtil.withContext( context -> service.revokePermission( this.client.getEndpoint(), hub, permission, connectionId, this.client.getServiceVersion().getVersion(), requestOptions, context)); }
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String hub, String permission, String connectionId, RequestOptions requestOptions) { if (hub == null) { return Mono.error(new IllegalArgumentException(STR)); } if (permission == null) { return Mono.error(new IllegalArgumentException(STR)); } if (connectionId == null) { return Mono.error(new IllegalArgumentException(STR)); } return FluxUtil.withContext( context -> service.revokePermission( this.client.getEndpoint(), hub, permission, connectionId, this.client.getServiceVersion().getVersion(), requestOptions, context)); }
/** * Revoke permission for the connection. * * <p><strong>Query Parameters</strong> * * <table border="1"> * <caption>Query Parameters</caption> * <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr> * <tr><td>targetName</td><td>String</td><td>No</td><td>The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name.</td></tr> * <tr><td>apiVersion</td><td>String</td><td>Yes</td><td>Api Version</td></tr> * </table> * * @param hub Target hub name, which should start with alphabetic characters and only contain alpha-numeric * characters or underscore. * @param permission The permission: current supported actions are joinLeaveGroup and sendToGroup. * @param connectionId Target connection Id. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @return the completion. */
Revoke permission for the connection. Query Parameters Query Parameters NameTypeRequiredDescription targetNameStringNoThe meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. apiVersionStringYesApi Version
revokePermissionWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/webpubsub/azure-messaging-webpubsub/src/main/java/com/azure/messaging/webpubsub/implementation/WebPubSubsImpl.java", "license": "mit", "size": 121300 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.RequestOptions", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
1,218,299
MultiMap headers();
MultiMap headers();
/** * Return the headers corresponding to the last request for this socket or the websocket handshake * Any cookie headers will be removed for security reasons */
Return the headers corresponding to the last request for this socket or the websocket handshake Any cookie headers will be removed for security reasons
headers
{ "repo_name": "lingkong7/vertx-web", "path": "vertx-web/src/main/java/io/vertx/ext/web/handler/sockjs/SockJSSocket.java", "license": "apache-2.0", "size": 3712 }
[ "io.vertx.core.MultiMap" ]
import io.vertx.core.MultiMap;
import io.vertx.core.*;
[ "io.vertx.core" ]
io.vertx.core;
648,465
public Set<String> getUuids() { return _uuids; }
Set<String> function() { return _uuids; }
/** * Gets selected uuids. * @return collection of uuids */
Gets selected uuids
getUuids
{ "repo_name": "GeoinformationSystems/GeoprocessingAppstore", "path": "src/com/esri/gpt/catalog/arcims/QueryRequest.java", "license": "apache-2.0", "size": 5934 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
783,396
@Test(expected = IllegalArgumentException.class) public void testEntryConstructorGroupFunction() { final IsIntervalInvariant functionMock = PowerMockito .mock(IsIntervalInvariant.class); // test to create an invalid function entry new BaseRasterModelEntry("NAME", RasterModelEntryType.GROUP, functionMock); }
@Test(expected = IllegalArgumentException.class) void function() { final IsIntervalInvariant functionMock = PowerMockito .mock(IsIntervalInvariant.class); new BaseRasterModelEntry("NAME", RasterModelEntryType.GROUP, functionMock); }
/** * Tests the creation of an invalid <code>RasterModelEntry</code>, using an * invalid function as <code>RasterModelEntryType.GROUP</code> */
Tests the creation of an invalid <code>RasterModelEntry</code>, using an invalid function as <code>RasterModelEntryType.GROUP</code>
testEntryConstructorGroupFunction
{ "repo_name": "pmeisen/gen-misc", "path": "test/net/meisen/general/genmisc/raster/definition/impl/TestBaseRasterModelEntry.java", "license": "mit", "size": 3290 }
[ "net.meisen.general.genmisc.raster.definition.RasterModelEntryType", "net.meisen.general.genmisc.raster.definition.impl.BaseRasterModelEntry", "net.meisen.general.genmisc.raster.function.IsIntervalInvariant", "org.junit.Test", "org.powermock.api.mockito.PowerMockito" ]
import net.meisen.general.genmisc.raster.definition.RasterModelEntryType; import net.meisen.general.genmisc.raster.definition.impl.BaseRasterModelEntry; import net.meisen.general.genmisc.raster.function.IsIntervalInvariant; import org.junit.Test; import org.powermock.api.mockito.PowerMockito;
import net.meisen.general.genmisc.raster.definition.*; import net.meisen.general.genmisc.raster.definition.impl.*; import net.meisen.general.genmisc.raster.function.*; import org.junit.*; import org.powermock.api.mockito.*;
[ "net.meisen.general", "org.junit", "org.powermock.api" ]
net.meisen.general; org.junit; org.powermock.api;
962,109
@Override public Fragment getItem(int position) { return ColorPaletteFragment.newInstance(colorArray[position]); }
Fragment function(int position) { return ColorPaletteFragment.newInstance(colorArray[position]); }
/** * getItem() is called to instantiate the fragment for the given color palette. * Returns a PlaceholderFragment (defined as a static inner class below). */
getItem() is called to instantiate the fragment for the given color palette. Returns a PlaceholderFragment (defined as a static inner class below)
getItem
{ "repo_name": "aporter/androidui", "path": "Examples/ColorPaletteWithNavDrawer/app/src/main/java/course/examples/colorpalettewithnavdrawer/DisplayColorActivity.java", "license": "mit", "size": 4842 }
[ "android.app.Fragment" ]
import android.app.Fragment;
import android.app.*;
[ "android.app" ]
android.app;
335,090
protected Commandline getCommandLine( File srcFile, File destFile, CompilerConfiguration config ) throws NativeBuildException { if ( config.getExecutable() == null ) { config.setExecutable( "gcc" ); } Commandline cl = new Commandline(); cl.setExecutable( config.getExecutable() ); if ( config.getWorkingDirectory() != null ) { cl.setWorkingDirectory( config.getWorkingDirectory().getPath() ); } this.setStartOptions( cl, config ); this.setIncludePaths( cl, config.getIncludePaths() ); this.setIncludePaths( cl, config.getSystemIncludePaths() ); this.setMiddleOptions( cl, config ); this.setOutputArgs( cl, destFile ); this.setSourceArgs( cl, srcFile ) ; this.setEndOptions( cl, config ); return cl; }
Commandline function( File srcFile, File destFile, CompilerConfiguration config ) throws NativeBuildException { if ( config.getExecutable() == null ) { config.setExecutable( "gcc" ); } Commandline cl = new Commandline(); cl.setExecutable( config.getExecutable() ); if ( config.getWorkingDirectory() != null ) { cl.setWorkingDirectory( config.getWorkingDirectory().getPath() ); } this.setStartOptions( cl, config ); this.setIncludePaths( cl, config.getIncludePaths() ); this.setIncludePaths( cl, config.getSystemIncludePaths() ); this.setMiddleOptions( cl, config ); this.setOutputArgs( cl, destFile ); this.setSourceArgs( cl, srcFile ) ; this.setEndOptions( cl, config ); return cl; }
/** * Setup Compiler Command line */
Setup Compiler Command line
getCommandLine
{ "repo_name": "dukeboard/maven-native-plugin", "path": "maven-native-components/maven-native-generic-c/src/main/java/org/codehaus/mojo/natives/c/AbstractCCompiler.java", "license": "mit", "size": 4455 }
[ "java.io.File", "org.codehaus.mojo.natives.NativeBuildException", "org.codehaus.mojo.natives.compiler.CompilerConfiguration", "org.codehaus.plexus.util.cli.Commandline" ]
import java.io.File; import org.codehaus.mojo.natives.NativeBuildException; import org.codehaus.mojo.natives.compiler.CompilerConfiguration; import org.codehaus.plexus.util.cli.Commandline;
import java.io.*; import org.codehaus.mojo.natives.*; import org.codehaus.mojo.natives.compiler.*; import org.codehaus.plexus.util.cli.*;
[ "java.io", "org.codehaus.mojo", "org.codehaus.plexus" ]
java.io; org.codehaus.mojo; org.codehaus.plexus;
198,252
void unlock(String collectionName, DoxID doxId, int lockId);
void unlock(String collectionName, DoxID doxId, int lockId);
/** * Unlocks a record. * * @param collectionName * @param doxId * @param lockId */
Unlocks a record
unlock
{ "repo_name": "trajano/doxdb", "path": "doxdb-rest/src/main/java/net/trajano/doxdb/ejb/DoxLocal.java", "license": "epl-1.0", "size": 5672 }
[ "net.trajano.doxdb.DoxID" ]
import net.trajano.doxdb.DoxID;
import net.trajano.doxdb.*;
[ "net.trajano.doxdb" ]
net.trajano.doxdb;
2,552,148
@NonNull static String printElement( @NonNull Node node, @NonNull Map<String, String> nsPrefix, @NonNull String prefix) { StringBuilder sb = new StringBuilder(); sb.append(prefix).append('<'); String uri = node.getNamespaceURI(); if (uri != null) { sb.append(uri).append(':'); nsPrefix.put(uri, node.getPrefix()); } sb.append(node.getLocalName()); printAttributes(sb, node, nsPrefix, prefix); sb.append(">\n"); //$NON-NLS-1$ printChildren(sb, node.getFirstChild(), true, nsPrefix, prefix + " "); //$NON-NLS-1$ sb.append(prefix).append("</"); //$NON-NLS-1$ if (uri != null) { sb.append(uri).append(':'); } sb.append(node.getLocalName()); sb.append(">\n"); //$NON-NLS-1$ return sb.toString(); }
static String printElement( @NonNull Node node, @NonNull Map<String, String> nsPrefix, @NonNull String prefix) { StringBuilder sb = new StringBuilder(); sb.append(prefix).append('<'); String uri = node.getNamespaceURI(); if (uri != null) { sb.append(uri).append(':'); nsPrefix.put(uri, node.getPrefix()); } sb.append(node.getLocalName()); printAttributes(sb, node, nsPrefix, prefix); sb.append(">\n"); printChildren(sb, node.getFirstChild(), true, nsPrefix, prefix + " "); sb.append(prefix).append("</"); if (uri != null) { sb.append(uri).append(':'); } sb.append(node.getLocalName()); sb.append(">\n"); return sb.toString(); }
/** * Flatten the element to a string. This "pretty prints" the XML tree starting * from the given node and all its children and attributes. * <p/> * The output is designed to be printed using {@link #printXmlDiff}. * * @param node The root node to print. * @param nsPrefix A map that is filled with all the URI=>prefix found. * The internal string only contains the expanded URIs but this is rather verbose * so when printing the diff these will be replaced by the prefixes collected here. * @param prefix A "space" prefix added at the beginning of each line for indentation * purposes. The diff printer later relies on this to find out the structure. */
Flatten the element to a string. This "pretty prints" the XML tree starting from the given node and all its children and attributes. The output is designed to be printed using <code>#printXmlDiff</code>
printElement
{ "repo_name": "tranleduy2000/javaide", "path": "aosp/manifest-merger/src/main/java/com/android/manifmerger/MergerXmlUtils.java", "license": "gpl-3.0", "size": 38357 }
[ "com.android.annotations.NonNull", "java.util.Map", "org.w3c.dom.Node" ]
import com.android.annotations.NonNull; import java.util.Map; import org.w3c.dom.Node;
import com.android.annotations.*; import java.util.*; import org.w3c.dom.*;
[ "com.android.annotations", "java.util", "org.w3c.dom" ]
com.android.annotations; java.util; org.w3c.dom;
183,869
public Builder<R, C, V> orderRowsBy(Comparator<? super R> rowComparator) { this.rowComparator = checkNotNull(rowComparator); return this; }
Builder<R, C, V> function(Comparator<? super R> rowComparator) { this.rowComparator = checkNotNull(rowComparator); return this; }
/** * Specifies the ordering of the generated table's rows. */
Specifies the ordering of the generated table's rows
orderRowsBy
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/externals/guava/src/main/java/com/google/common/collect/ImmutableTable.java", "license": "apache-2.0", "size": 12849 }
[ "com.google.common.base.Preconditions", "java.util.Comparator" ]
import com.google.common.base.Preconditions; import java.util.Comparator;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,402,838
public static String xwDetailed(IXwFormatter xw, Instance instance, Agent agent) { Focus fc = agent.getFocus(); xwConcise(xw, instance, agent); xw.add(""); xw.indent(); xw.add("Scene: " + xwConcise(xw, instance.getScene(), agent)); xw.deindent(); String prefix = ""; List<VerbInstance> vis = null; // binary context relations, from vis = RelationHelper.getRelationsFrom(agent, instance, false); if (!vis.isEmpty()) { xw.add("Binary context relations from:"); xw.indent(); for (VerbInstance vi : vis) { VerbOverlay vo = MetaVerbHelper.removeMetaVerbs(vi.getVerbs(), agent); if (fc.getSalience(vi, EnergyColors.FOCUS_VI) > 0) { prefix = ""; } else { prefix = "(inactive)"; } xw.add(prefix + "this -- " + PrettyPrint.ppConcise(vo, agent) + "-->" + PrettyPrint.ppConcise(vi.getObject(), agent)); } xw.deindent(); } // binary context relations, to vis = RelationHelper.getRelationsTo(agent, instance, false); if (!vis.isEmpty()) { xw.add("Binary context relations to:"); xw.indent(); for (VerbInstance vi : vis) { VerbOverlay vo = MetaVerbHelper.removeMetaVerbs(vi.getVerbs(), agent); if (fc.getSalience(vi, EnergyColors.FOCUS_VI) > 0) { prefix = ""; } else { prefix = "(inactive)"; } xw.add(PrettyPrint.ppConcise(vi.getSubject(), agent) + "--" + PrettyPrint.ppConcise(vo, agent) + "--> this"); } xw.deindent(); } // print the firedShadowVis if (instance.isScene()) { xw.add("firedShadowVis"); xw.indent(); xw.add(PpViSet.ppConcise(instance.getSceneParameters() .getFiredShadowVis(), agent)); xw.deindent(); } return xw.toString(); }
static String function(IXwFormatter xw, Instance instance, Agent agent) { Focus fc = agent.getFocus(); xwConcise(xw, instance, agent); xw.add(STRScene: STRSTRBinary context relations from:STRSTR(inactive)STRthis -- STR-->STRBinary context relations to:STRSTR(inactive)STR--STR--> thisSTRfiredShadowVis"); xw.indent(); xw.add(PpViSet.ppConcise(instance.getSceneParameters() .getFiredShadowVis(), agent)); xw.deindent(); } return xw.toString(); }
/** * Returns a detailed version of the instance description which outlines the * composites * * @param xw * @param instance * @param agent * @return */
Returns a detailed version of the instance description which outlines the composites
xwDetailed
{ "repo_name": "Xapagy/Xapagy", "path": "src/main/java/org/xapagy/ui/prettygeneral/xwInstance.java", "license": "agpl-3.0", "size": 4636 }
[ "org.xapagy.agents.Agent", "org.xapagy.agents.Focus", "org.xapagy.instances.Instance", "org.xapagy.ui.formatters.IXwFormatter", "org.xapagy.ui.prettyprint.PpViSet" ]
import org.xapagy.agents.Agent; import org.xapagy.agents.Focus; import org.xapagy.instances.Instance; import org.xapagy.ui.formatters.IXwFormatter; import org.xapagy.ui.prettyprint.PpViSet;
import org.xapagy.agents.*; import org.xapagy.instances.*; import org.xapagy.ui.formatters.*; import org.xapagy.ui.prettyprint.*;
[ "org.xapagy.agents", "org.xapagy.instances", "org.xapagy.ui" ]
org.xapagy.agents; org.xapagy.instances; org.xapagy.ui;
566,709
Principal getPrincipal();
Principal getPrincipal();
/** * This method returns the principal name derived from input credentials. */
This method returns the principal name derived from input credentials
getPrincipal
{ "repo_name": "atricore/josso1", "path": "core/josso-core/src/main/java/org/josso/auth/scheme/AuthenticationScheme.java", "license": "lgpl-2.1", "size": 3934 }
[ "java.security.Principal" ]
import java.security.Principal;
import java.security.*;
[ "java.security" ]
java.security;
2,630,068
SelectorList parseSelectors(String source) throws CSSException, IOException;
SelectorList parseSelectors(String source) throws CSSException, IOException;
/** * Parse a comma separated list of selectors. * * * @exception CSSException Any CSS exception, possibly * wrapping another exception. * @exception java.io.IOException An IO exception from the parser, * possibly from a byte stream or character stream * supplied by the application. */
Parse a comma separated list of selectors
parseSelectors
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/css/parser/ExtendedParser.java", "license": "apache-2.0", "size": 4102 }
[ "java.io.IOException", "org.w3c.css.sac.CSSException", "org.w3c.css.sac.SelectorList" ]
import java.io.IOException; import org.w3c.css.sac.CSSException; import org.w3c.css.sac.SelectorList;
import java.io.*; import org.w3c.css.sac.*;
[ "java.io", "org.w3c.css" ]
java.io; org.w3c.css;
819,017
public static boolean isRetractMsg(RowData row) { RowKind kind = row.getRowKind(); return kind == RowKind.UPDATE_BEFORE || kind == RowKind.DELETE; }
static boolean function(RowData row) { RowKind kind = row.getRowKind(); return kind == RowKind.UPDATE_BEFORE kind == RowKind.DELETE; }
/** * Returns true if the message is either {@link RowKind#DELETE} or {@link RowKind#UPDATE_BEFORE}, * which refers to a retract operation of aggregation. */
Returns true if the message is either <code>RowKind#DELETE</code> or <code>RowKind#UPDATE_BEFORE</code>, which refers to a retract operation of aggregation
isRetractMsg
{ "repo_name": "hequn8128/flink", "path": "flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/data/util/RowDataUtil.java", "license": "apache-2.0", "size": 2247 }
[ "org.apache.flink.table.data.RowData", "org.apache.flink.types.RowKind" ]
import org.apache.flink.table.data.RowData; import org.apache.flink.types.RowKind;
import org.apache.flink.table.data.*; import org.apache.flink.types.*;
[ "org.apache.flink" ]
org.apache.flink;
754,783
@Test() public void testStandardErrorMessageWithOneControl() throws Exception { CollectSupportDataOutputIntermediateResponse r = new CollectSupportDataOutputIntermediateResponse( CollectSupportDataOutputStream.STANDARD_ERROR, "bar", new Control("1.2.3.4")); r = new CollectSupportDataOutputIntermediateResponse(r); assertNotNull(r.getOID()); assertEquals(r.getOID(), "1.3.6.1.4.1.30221.2.6.65"); assertNotNull(r.getValue()); assertNotNull(r.getControls()); assertEquals(r.getControls().length, 1); assertNotNull(r.getOutputStream()); assertEquals(r.getOutputStream(), CollectSupportDataOutputStream.STANDARD_ERROR); assertNotNull(r.getOutputMessage()); assertEquals(r.getOutputMessage(), "bar"); assertNotNull(r.getIntermediateResponseName()); assertFalse(r.getIntermediateResponseName().isEmpty()); assertNotNull(r.valueToString()); assertFalse(r.valueToString().isEmpty()); assertNotNull(r.toString()); assertFalse(r.toString().isEmpty()); }
@Test() void function() throws Exception { CollectSupportDataOutputIntermediateResponse r = new CollectSupportDataOutputIntermediateResponse( CollectSupportDataOutputStream.STANDARD_ERROR, "bar", new Control(STR)); r = new CollectSupportDataOutputIntermediateResponse(r); assertNotNull(r.getOID()); assertEquals(r.getOID(), STR); assertNotNull(r.getValue()); assertNotNull(r.getControls()); assertEquals(r.getControls().length, 1); assertNotNull(r.getOutputStream()); assertEquals(r.getOutputStream(), CollectSupportDataOutputStream.STANDARD_ERROR); assertNotNull(r.getOutputMessage()); assertEquals(r.getOutputMessage(), "bar"); assertNotNull(r.getIntermediateResponseName()); assertFalse(r.getIntermediateResponseName().isEmpty()); assertNotNull(r.valueToString()); assertFalse(r.valueToString().isEmpty()); assertNotNull(r.toString()); assertFalse(r.toString().isEmpty()); }
/** * Tests a valid instance of the intermediate response with a standard * error message and one control. * * @throws Exception If an unexpected problem occurs. */
Tests a valid instance of the intermediate response with a standard error message and one control
testStandardErrorMessageWithOneControl
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/CollectSupportDataOutputIntermediateResponseTestCase.java", "license": "gpl-2.0", "size": 7451 }
[ "com.unboundid.ldap.sdk.Control", "org.testng.annotations.Test" ]
import com.unboundid.ldap.sdk.Control; import org.testng.annotations.Test;
import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.ldap; org.testng.annotations;
1,686,472
private void initializeTableModel() { tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES[0], COLUMN_NAMES[1], COLUMN_NAMES[2] }, LDAPArgument.class, new Functor[] { new Functor("getName"), new Functor("getValue"), new Functor("getOpcode") }, new Functor[] { new Functor("setName"), new Functor("setValue"), new Functor("setOpcode") }, new Class[] { String.class, String.class, String.class }); }
void function() { tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES[0], COLUMN_NAMES[1], COLUMN_NAMES[2] }, LDAPArgument.class, new Functor[] { new Functor(STR), new Functor(STR), new Functor(STR) }, new Functor[] { new Functor(STR), new Functor(STR), new Functor(STR) }, new Class[] { String.class, String.class, String.class }); }
/** * Initialize the table model used for the arguments table. */
Initialize the table model used for the arguments table
initializeTableModel
{ "repo_name": "apache/jmeter", "path": "src/protocol/ldap/src/main/java/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java", "license": "apache-2.0", "size": 11775 }
[ "org.apache.jorphan.gui.ObjectTableModel", "org.apache.jorphan.reflect.Functor" ]
import org.apache.jorphan.gui.ObjectTableModel; import org.apache.jorphan.reflect.Functor;
import org.apache.jorphan.gui.*; import org.apache.jorphan.reflect.*;
[ "org.apache.jorphan" ]
org.apache.jorphan;
674,734
int insert(WeixinCustomer record);
int insert(WeixinCustomer record);
/** * This method was generated by MyBatis Generator. This method corresponds to the database table weixin_customer * @mbggenerated Mon Dec 07 22:17:15 CST 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table weixin_customer
insert
{ "repo_name": "smartgear/timeholder", "path": "trymvc/src/main/java/com/toy/data/generate/WeixinCustomerMapper.java", "license": "mit", "size": 2829 }
[ "com.toy.model.generate.WeixinCustomer" ]
import com.toy.model.generate.WeixinCustomer;
import com.toy.model.generate.*;
[ "com.toy.model" ]
com.toy.model;
1,586,647
public void connect(final String url, final IOCallback callback) throws MalformedURLException { if (setAndConnect(new URL(url), callback) == false) { if (url == null || callback == null) throw new RuntimeException("url and callback may not be null."); else throw new RuntimeException( "connect(String, IOCallback) can only be invoked after SocketIO()"); } }
void function(final String url, final IOCallback callback) throws MalformedURLException { if (setAndConnect(new URL(url), callback) == false) { if (url == null callback == null) throw new RuntimeException(STR); else throw new RuntimeException( STR); } }
/** * connects to supplied host using callback. Do only use this method if you * instantiate {@link SocketIO} using {@link #SocketIO()}. * * @param url * the url * @param callback * the callback */
connects to supplied host using callback. Do only use this method if you instantiate <code>SocketIO</code> using <code>#SocketIO()</code>
connect
{ "repo_name": "beamly/socket.io-java-client", "path": "src/io/socket/SocketIO.java", "license": "mit", "size": 10827 }
[ "java.net.MalformedURLException" ]
import java.net.MalformedURLException;
import java.net.*;
[ "java.net" ]
java.net;
465,472
@Constraints.NotNull MessageType messageType();
@Constraints.NotNull MessageType messageType();
/** * Message type, can be INCOMING, OUTGOING or DRAFT * * @return message type */
Message type, can be INCOMING, OUTGOING or DRAFT
messageType
{ "repo_name": "mailrest/maildal", "path": "src/main/java/com/mailrest/maildal/model/Message.java", "license": "apache-2.0", "size": 3962 }
[ "com.noorq.casser.mapping.annotation.Constraints" ]
import com.noorq.casser.mapping.annotation.Constraints;
import com.noorq.casser.mapping.annotation.*;
[ "com.noorq.casser" ]
com.noorq.casser;
51,980
@Override public int compare(Revision o1, Revision o2) { return ComparisonChain.start() .compare(o1.getLocator(), o2.getLocator()) .compare(o1.getKey(), o2.getKey()) .compare(o1.getVersion(), o2.getVersion()) .compare(o1.getValue(), o2.getValue()).result(); } }
int function(Revision o1, Revision o2) { return ComparisonChain.start() .compare(o1.getLocator(), o2.getLocator()) .compare(o1.getKey(), o2.getKey()) .compare(o1.getVersion(), o2.getVersion()) .compare(o1.getValue(), o2.getValue()).result(); } }
/** * Sorts by locator followed by key followed by version. */
Sorts by locator followed by key followed by version
compare
{ "repo_name": "hcuffy/concourse", "path": "concourse-server/src/main/java/com/cinchapi/concourse/server/storage/db/Block.java", "license": "apache-2.0", "size": 30849 }
[ "com.google.common.collect.ComparisonChain" ]
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
232,526
public static String getLocalDataFolderLocation(String databaseName, String tableName, String taskId, String partitionId, String segmentId, boolean isCompactionFlow) { String tempLocationKey = getTempStoreLocationKey(databaseName, tableName, segmentId, taskId, isCompactionFlow); String baseStorePath = CarbonProperties.getInstance().getProperty(tempLocationKey); if (baseStorePath == null) { LOGGER.warn("Location not set for the key " + tempLocationKey); } CarbonTable carbonTable = CarbonMetadata.getInstance() .getCarbonTable(databaseName + CarbonCommonConstants.UNDERSCORE + tableName); CarbonTablePath carbonTablePath = CarbonStorePath.getCarbonTablePath(baseStorePath, carbonTable.getCarbonTableIdentifier()); String carbonDataDirectoryPath = carbonTablePath.getCarbonDataDirectoryPath(partitionId, segmentId + ""); return carbonDataDirectoryPath + File.separator + taskId; }
static String function(String databaseName, String tableName, String taskId, String partitionId, String segmentId, boolean isCompactionFlow) { String tempLocationKey = getTempStoreLocationKey(databaseName, tableName, segmentId, taskId, isCompactionFlow); String baseStorePath = CarbonProperties.getInstance().getProperty(tempLocationKey); if (baseStorePath == null) { LOGGER.warn(STR + tempLocationKey); } CarbonTable carbonTable = CarbonMetadata.getInstance() .getCarbonTable(databaseName + CarbonCommonConstants.UNDERSCORE + tableName); CarbonTablePath carbonTablePath = CarbonStorePath.getCarbonTablePath(baseStorePath, carbonTable.getCarbonTableIdentifier()); String carbonDataDirectoryPath = carbonTablePath.getCarbonDataDirectoryPath(partitionId, segmentId + ""); return carbonDataDirectoryPath + File.separator + taskId; }
/** * This method will form the local data folder store location * * @param databaseName * @param tableName * @param taskId * @param partitionId * @param segmentId * @return */
This method will form the local data folder store location
getLocalDataFolderLocation
{ "repo_name": "shivangi1015/incubator-carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/util/CarbonDataProcessorUtil.java", "license": "apache-2.0", "size": 22126 }
[ "java.io.File", "org.apache.carbondata.core.constants.CarbonCommonConstants", "org.apache.carbondata.core.metadata.CarbonMetadata", "org.apache.carbondata.core.metadata.schema.table.CarbonTable", "org.apache.carbondata.core.util.CarbonProperties", "org.apache.carbondata.core.util.path.CarbonStorePath", "org.apache.carbondata.core.util.path.CarbonTablePath" ]
import java.io.File; import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.metadata.CarbonMetadata; import org.apache.carbondata.core.metadata.schema.table.CarbonTable; import org.apache.carbondata.core.util.CarbonProperties; import org.apache.carbondata.core.util.path.CarbonStorePath; import org.apache.carbondata.core.util.path.CarbonTablePath;
import java.io.*; import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.metadata.*; import org.apache.carbondata.core.metadata.schema.table.*; import org.apache.carbondata.core.util.*; import org.apache.carbondata.core.util.path.*;
[ "java.io", "org.apache.carbondata" ]
java.io; org.apache.carbondata;
2,608,043