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
static boolean isContextInsensitiveTypeState(TypeState state) { for (AnalysisObject object : state.objects()) { if (!object.isContextInsensitiveObject()) { return false; } } return true; }
static boolean isContextInsensitiveTypeState(TypeState state) { for (AnalysisObject object : state.objects()) { if (!object.isContextInsensitiveObject()) { return false; } } return true; }
/** * Check if a type state contains only context insensitive objects, i.e., the only information * it stores is the set of types. */
Check if a type state contains only context insensitive objects, i.e., the only information it stores is the set of types
isContextInsensitiveTypeState
{ "repo_name": "smarr/Truffle", "path": "substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/typestate/TypeStateUtils.java", "license": "gpl-2.0", "size": 14858 }
[ "com.oracle.graal.pointsto.flow.context.object.AnalysisObject" ]
import com.oracle.graal.pointsto.flow.context.object.AnalysisObject;
import com.oracle.graal.pointsto.flow.context.object.*;
[ "com.oracle.graal" ]
com.oracle.graal;
2,914,054
protected void showErrorPage(Exception exception) throws JspException { // reset the action parameter setParamAction(""); showErrorPage(this, exception); // save not successful, set cancel action setAction(ACTION_CANCEL); return; }
void function(Exception exception) throws JspException { setParamAction(""); showErrorPage(this, exception); setAction(ACTION_CANCEL); return; }
/** * Shows the selected error page in case of an exception.<p> * * @param exception the current exception * @throws JspException if inclusion of the error page fails */
Shows the selected error page in case of an exception
showErrorPage
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/workplace/editors/CmsEditor.java", "license": "lgpl-2.1", "size": 36249 }
[ "javax.servlet.jsp.JspException" ]
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
135,911
public void decode(final ActiveMQBuffer buffer) { name = buffer.readString(); factoryClassName = buffer.readString(); int num = buffer.readInt(); if (params == null) { if (num > 0) { params = new HashMap<>(); } } else { params.clear(); } ...
void function(final ActiveMQBuffer buffer) { name = buffer.readString(); factoryClassName = buffer.readString(); int num = buffer.readInt(); if (params == null) { if (num > 0) { params = new HashMap<>(); } } else { params.clear(); } for (int i = 0; i < num; i++) { String key = buffer.readString(); byte type = buffer.re...
/** * Decodes this TransportConfiguration from a buffer. * <p> * Note this is only used internally by ActiveMQ * * @param buffer the buffer to decode from */
Decodes this TransportConfiguration from a buffer. Note this is only used internally by ActiveMQ
decode
{ "repo_name": "tabish121/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java", "license": "apache-2.0", "size": 14561 }
[ "java.util.HashMap", "org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle" ]
import java.util.HashMap; import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
import java.util.*; import org.apache.activemq.artemis.core.client.*;
[ "java.util", "org.apache.activemq" ]
java.util; org.apache.activemq;
772,602
public DataDictionaryService getDataDictionaryService() { return dataDictionaryService; }
DataDictionaryService function() { return dataDictionaryService; }
/** * Gets the dataDictionaryService attribute. * @return Returns the dataDictionaryService. */
Gets the dataDictionaryService attribute
getDataDictionaryService
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/validation/impl/JournalVoucherAccountingLineEncumbranceReferenceValidation.java", "license": "agpl-3.0", "size": 8119 }
[ "org.kuali.rice.kns.service.DataDictionaryService" ]
import org.kuali.rice.kns.service.DataDictionaryService;
import org.kuali.rice.kns.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
811,403
public void testComponentWithDefaultAccessPrivilegedNamespace() throws Exception { String cmpSource = "<aura:component/>"; DefDescriptor<ComponentDef> descriptor = getAuraTestingUtil().addSourceAutoCleanup(ComponentDef.class, cmpSource, "privilegedNS:testComponent", ...
void function() throws Exception { String cmpSource = STR; DefDescriptor<ComponentDef> descriptor = getAuraTestingUtil().addSourceAutoCleanup(ComponentDef.class, cmpSource, STR, false, true); Source<ComponentDef> source = StringSourceLoader.getInstance().getSource(descriptor); Parser<ComponentDef> parser = ParserFactor...
/*********************************************************************************** ******************* Tests for Privileged Namespace start **************************** ************************************************************************************/
Tests for Privileged Namespace start
testComponentWithDefaultAccessPrivilegedNamespace
{ "repo_name": "badlogicmanpreet/aura", "path": "aura-impl/src/test/java/org/auraframework/impl/root/parser/handler/ComponentAccessAttributeTest.java", "license": "apache-2.0", "size": 90160 }
[ "org.auraframework.def.ComponentDef", "org.auraframework.def.DefDescriptor", "org.auraframework.def.Definition", "org.auraframework.impl.parser.ParserFactory", "org.auraframework.system.Parser", "org.auraframework.system.Source", "org.auraframework.test.source.StringSourceLoader" ]
import org.auraframework.def.ComponentDef; import org.auraframework.def.DefDescriptor; import org.auraframework.def.Definition; import org.auraframework.impl.parser.ParserFactory; import org.auraframework.system.Parser; import org.auraframework.system.Source; import org.auraframework.test.source.StringSourceLoader;
import org.auraframework.def.*; import org.auraframework.impl.parser.*; import org.auraframework.system.*; import org.auraframework.test.source.*;
[ "org.auraframework.def", "org.auraframework.impl", "org.auraframework.system", "org.auraframework.test" ]
org.auraframework.def; org.auraframework.impl; org.auraframework.system; org.auraframework.test;
2,095,470
public ServiceFuture<PrivateEndpointInner> getByResourceGroupAsync(String resourceGroupName, String privateEndpointName, final ServiceCallback<PrivateEndpointInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName), servic...
ServiceFuture<PrivateEndpointInner> function(String resourceGroupName, String privateEndpointName, final ServiceCallback<PrivateEndpointInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, privateEndpointName), serviceCallback); }
/** * Gets the specified private endpoint by resource group. * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws I...
Gets the specified private endpoint by resource group
getByResourceGroupAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/PrivateEndpointsInner.java", "license": "mit", "size": 59878 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
679,581
private Updates changes(Snapshot snapshot) { return shardChanges.computeIfAbsent(snapshot, k -> new Updates()); } private static class Updates { private Map<ShardId, ShardRestoreStatus> shards = new HashMap<>(); }
Updates function(Snapshot snapshot) { return shardChanges.computeIfAbsent(snapshot, k -> new Updates()); } private static class Updates { private Map<ShardId, ShardRestoreStatus> shards = new HashMap<>(); }
/** * Helper method that creates update entry for the given shard id if such an entry does not exist yet. */
Helper method that creates update entry for the given shard id if such an entry does not exist yet
changes
{ "repo_name": "fred84/elasticsearch", "path": "server/src/main/java/org/elasticsearch/snapshots/RestoreService.java", "license": "apache-2.0", "size": 52481 }
[ "java.util.HashMap", "java.util.Map", "org.elasticsearch.cluster.RestoreInProgress", "org.elasticsearch.index.shard.ShardId" ]
import java.util.HashMap; import java.util.Map; import org.elasticsearch.cluster.RestoreInProgress; import org.elasticsearch.index.shard.ShardId;
import java.util.*; import org.elasticsearch.cluster.*; import org.elasticsearch.index.shard.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.index" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.index;
2,422,531
public static long queryNumEntries(SQLiteDatabase db, String table, String selection, String[] selectionArgs) { String s = (!TextUtils.isEmpty(selection)) ? " where " + selection : ""; return longForQuery(db, "select count(*) from " + table + s, selectionArgs); }
static long function(SQLiteDatabase db, String table, String selection, String[] selectionArgs) { String s = (!TextUtils.isEmpty(selection)) ? STR + selection : STRselect count(*) from " + table + s, selectionArgs); }
/** * Query the table for the number of rows in the table. * @param db the database the table is in * @param table the name of the table to query * @param selection A filter declaring which rows to return, * formatted as an SQL WHERE clause (excluding the WHERE itself). * ...
Query the table for the number of rows in the table
queryNumEntries
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/database/DatabaseUtils.java", "license": "apache-2.0", "size": 53995 }
[ "android.database.sqlite.SQLiteDatabase", "android.text.TextUtils" ]
import android.database.sqlite.SQLiteDatabase; import android.text.TextUtils;
import android.database.sqlite.*; import android.text.*;
[ "android.database", "android.text" ]
android.database; android.text;
1,907,262
@Override public void delete(Integer id) { try (PreparedStatement ps = this.connect.prepareStatement(DELETE_ADDRESS)) { ps.setInt(1, id); ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
void function(Integer id) { try (PreparedStatement ps = this.connect.prepareStatement(DELETE_ADDRESS)) { ps.setInt(1, id); ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } }
/** * This method delete the address. * * @param id deleted id address. */
This method delete the address
delete
{ "repo_name": "amezgin/amezgin", "path": "chapter_009/testtask/src/main/java/ru/job4j/dao/AddressDaoImpl.java", "license": "apache-2.0", "size": 4900 }
[ "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
613,671
return token; } /** * Sets the value of the token property. * * @param value * allowed object is * {@link AuthToken }
return token; } /** * Sets the value of the token property. * * @param value * allowed object is * {@link AuthToken }
/** * Gets the value of the token property. * * @return * possible object is * {@link AuthToken } * */
Gets the value of the token property
getToken
{ "repo_name": "contactlab/soap-api-java-client-next", "path": "src/main/java/com/contactlab/api/ws/TriggerDeliveryByAlias.java", "license": "apache-2.0", "size": 3204 }
[ "com.contactlab.api.ws.domain.AuthToken" ]
import com.contactlab.api.ws.domain.AuthToken;
import com.contactlab.api.ws.domain.*;
[ "com.contactlab.api" ]
com.contactlab.api;
2,514,496
public Connector[] findConnectors();
Connector[] function();
/** * Find and return the set of Connectors associated with this Service. */
Find and return the set of Connectors associated with this Service
findConnectors
{ "repo_name": "Netprophets/JBOSSWEB_7_0_13_FINAL", "path": "java/org/apache/catalina/Service.java", "license": "lgpl-3.0", "size": 5153 }
[ "org.apache.catalina.connector.Connector" ]
import org.apache.catalina.connector.Connector;
import org.apache.catalina.connector.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,409,478
@Generated @Selector("adjustsFontSizeToFitWidth") public native boolean adjustsFontSizeToFitWidth();
@Selector(STR) native boolean function();
/** * default is NO. if YES, text will shrink to minFontSize along baseline */
default is NO. if YES, text will shrink to minFontSize along baseline
adjustsFontSizeToFitWidth
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UITextField.java", "license": "apache-2.0", "size": 46138 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,335,773
EReference getType_Wrapper();
EReference getType_Wrapper();
/** * Returns the meta object for the reference '{@link net.blimster.gwt.threejs.wdl.threeJsWrapperDescriptionLanguage.Type#getWrapper <em>Wrapper</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Wrapper</em>'. * @see net.blimster.gwt.threejs.wdl....
Returns the meta object for the reference '<code>net.blimster.gwt.threejs.wdl.threeJsWrapperDescriptionLanguage.Type#getWrapper Wrapper</code>'.
getType_Wrapper
{ "repo_name": "Blimster/three4g", "path": "net.blimster.gwt.threejs.wdl/src-gen/net/blimster/gwt/threejs/wdl/threeJsWrapperDescriptionLanguage/ThreeJsWrapperDescriptionLanguagePackage.java", "license": "lgpl-3.0", "size": 48992 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,479,106
public void onAfterExecuteBatch(StatementInformation statementInformation, long timeElapsedNanos, int[] updateCounts, SQLException e) { }
void function(StatementInformation statementInformation, long timeElapsedNanos, int[] updateCounts, SQLException e) { }
/** * This callback method is executed after the {@link Statement#executeBatch()} method is invoked. * * @param statementInformation The meta information about the {@link Statement} being invoked * @param timeElapsedNanos The execution time of the execute call * @param updateCounts An array o...
This callback method is executed after the <code>Statement#executeBatch()</code> method is invoked
onAfterExecuteBatch
{ "repo_name": "p6spy/p6spy", "path": "src/main/java/com/p6spy/engine/event/JdbcEventListener.java", "license": "apache-2.0", "size": 22874 }
[ "com.p6spy.engine.common.StatementInformation", "java.sql.SQLException" ]
import com.p6spy.engine.common.StatementInformation; import java.sql.SQLException;
import com.p6spy.engine.common.*; import java.sql.*;
[ "com.p6spy.engine", "java.sql" ]
com.p6spy.engine; java.sql;
1,673,319
public static Map<String, Object> getNewRow(String fullTableName) { String key = fullTableName.toUpperCase(); Queue<Map<String, Object>> tableRowsQueue = null; Map<String, Object> rowMap = null; synchronized (tableRowsQueueMap) { tableRowsQueue = tableRowsQueueMap.get(key); if (tableRowsQ...
static Map<String, Object> function(String fullTableName) { String key = fullTableName.toUpperCase(); Queue<Map<String, Object>> tableRowsQueue = null; Map<String, Object> rowMap = null; synchronized (tableRowsQueueMap) { tableRowsQueue = tableRowsQueueMap.get(key); if (tableRowsQueue == null) { DataGeneratorBB.getBB()...
/** * Get new row for the table form BlackBoard * * @param fullTableName * Format SchemaName.TableName * @return Map<String, Object> key=fully qualified columnName (SCHEMANAME.TABLENAME.COLUMNNAME) in upper case, value=Object */
Get new row for the table form BlackBoard
getNewRow
{ "repo_name": "gemxd/gemfirexd-oss", "path": "tests/sql/src/main/java/sql/datagen/DataGeneratorHelper.java", "license": "apache-2.0", "size": 6823 }
[ "java.util.Map", "java.util.Queue" ]
import java.util.Map; import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
225,623
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11") public long getRet() { return ret; }
@Generated(value = STR, date = STR, comments = STR) long function() { return ret; }
/** * Gets the value of the ret property. * */
Gets the value of the ret property
getRet
{ "repo_name": "kanonirov/lanb-client", "path": "src/main/java/ru/lanbilling/webservice/wsdl/PromisePaymentResponse.java", "license": "mit", "size": 1719 }
[ "javax.annotation.Generated" ]
import javax.annotation.Generated;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,884,908
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<WebApplicationFirewallPolicyInner>> listByResourceGroupSinglePageAsync( String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<WebApplicationFirewallPolicyInner>> function( String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArg...
/** * Lists all of the protection policies within a resource group. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. ...
Lists all of the protection policies within a resource group
listByResourceGroupSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/implementation/PoliciesClientImpl.java", "license": "mit", "size": 50976 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.frontdoor.fluent.models.WebApplicationFirewallPolicyInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.frontdoor.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,700,860
public ArrayList<DataCell> getRow(int index) { ArrayList<DataCell> row; row = new ArrayList<DataCell>(); for (ArrayList<DataCell> c: columns) { if (index < c.size()) { row.add(c.get(index)); } else { row.add(new DataCell("")); ...
ArrayList<DataCell> function(int index) { ArrayList<DataCell> row; row = new ArrayList<DataCell>(); for (ArrayList<DataCell> c: columns) { if (index < c.size()) { row.add(c.get(index)); } else { row.add(new DataCell("")); } } return row; }
/** * Returns the row at the given index. * * @param index * @return */
Returns the row at the given index
getRow
{ "repo_name": "alecdhuse/Folding-Map", "path": "FoldingMap/src/co/foldingmap/data/TabularData.java", "license": "gpl-3.0", "size": 18037 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,851,934
@Override public String getModifyColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon ) { return "ALTER TABLE " + tablename + " MODIFY COLUMN " + getFieldDefinition( v, tk, pk, use_autoinc, true, false ); }
String function( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon ) { return STR + tablename + STR + getFieldDefinition( v, tk, pk, use_autoinc, true, false ); }
/** * Generates the SQL statement to modify a column in the specified table * * @param tablename * The table to add * @param v * The column defined as a value * @param tk * the name of the technical key field * @param use_autoinc * whether or not this fi...
Generates the SQL statement to modify a column in the specified table
getModifyColumnStatement
{ "repo_name": "kurtwalker/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/database/Exasol4DatabaseMeta.java", "license": "apache-2.0", "size": 16318 }
[ "org.pentaho.di.core.row.ValueMetaInterface" ]
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.row.*;
[ "org.pentaho.di" ]
org.pentaho.di;
387,746
private final void init() {// called from ctor, so must not be overridable setLayout(new BorderLayout(0, 5)); if (displayName) { setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); } JPanel classnameRequestPanel = new JPanel(new BorderLayout(...
final void function() { setLayout(new BorderLayout(0, 5)); if (displayName) { setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); } JPanel classnameRequestPanel = new JPanel(new BorderLayout(0, 5)); classnameRequestPanel.add(createClassnamePanel(), BorderLayout.NORTH); classnameRequestPanel.add(createPa...
/** * Initialize the GUI components and layout. */
Initialize the GUI components and layout
init
{ "repo_name": "ufctester/apache-jmeter", "path": "src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java", "license": "apache-2.0", "size": 11748 }
[ "java.awt.BorderLayout", "javax.swing.JPanel" ]
import java.awt.BorderLayout; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,439,613
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); }
void function() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); }
/** * This method was generated by MyBatis Generator. This method corresponds to the database table BB_CODE_CONFIG * @mbggenerated Thu Jun 22 22:39:16 EDT 2017 */
This method was generated by MyBatis Generator. This method corresponds to the database table BB_CODE_CONFIG
clear
{ "repo_name": "ZFGCCP/ZFGC3", "path": "src/main/java/com/zfgc/dbobj/BbCodeConfigDbObjExample.java", "license": "mit", "size": 14904 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,626,499
public static String readFile(String name, boolean forceLoading) throws IOException { return provider.readFile(name, forceLoading); }
static String function(String name, boolean forceLoading) throws IOException { return provider.readFile(name, forceLoading); }
/** * Reads a file into a String. Lines are separated by <code>\n</code>. * If a file with the same name (the same file?) a cached value will be used. * @param name The name of the file to load * @param forceLoading if set to true the file will get read again and not read from cache * @return T...
Reads a file into a String. Lines are separated by <code>\n</code>. If a file with the same name (the same file?) a cached value will be used
readFile
{ "repo_name": "achtern/AchternEngine", "path": "src/main/java/org/achtern/AchternEngine/core/resource/ResourceLoader.java", "license": "mit", "size": 22085 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
333,790
public void i(String msg) { Log.i(mTag, msg); }
void function(String msg) { Log.i(mTag, msg); }
/** * Function to print info level logs * @param msg The log message */
Function to print info level logs
i
{ "repo_name": "rubensousa/exoplayer-amazon-port", "path": "exoplayer2/src/main/java/com/google/android/exoplayer2/util/Logger.java", "license": "apache-2.0", "size": 5730 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
774,426
public interface Visitor { boolean visit(Object parent, Object object); } private static class VisitStack { private ReferenceOpenHashSet seen = new ReferenceOpenHashSet(); private LinkedList stack = new LinkedList(); private Visitor visitor; private boolean includeStatics; ...
interface Visitor { boolean function(Object parent, Object object); } static class VisitStack { private ReferenceOpenHashSet seen = new ReferenceOpenHashSet(); private LinkedList stack = new LinkedList(); private Visitor functionor; boolean includeStatics; VisitStack(Visitor functionor, boolean includeStatics) { this.v...
/** * Visit an object * @param parent the parent of the object * @param object the object we are visiting * @return true the search should continue on and visit the children of this object as well */
Visit an object
visit
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/size/ObjectTraverser.java", "license": "apache-2.0", "size": 6441 }
[ "it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet", "java.util.LinkedList" ]
import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; import java.util.LinkedList;
import it.unimi.dsi.fastutil.objects.*; import java.util.*;
[ "it.unimi.dsi", "java.util" ]
it.unimi.dsi; java.util;
1,036,697
private T extractKeyAndRow(String timestamp, JSONObject jsonRow) { T rowValues = null; try { rowValues = rowMapper.newInstance(); rowValues.getClass().getMethod("setTimestamp", String.class).invoke(rowValues, timestamp); for (Object key : jsonRow.keySet()) { ...
T function(String timestamp, JSONObject jsonRow) { T rowValues = null; try { rowValues = rowMapper.newInstance(); rowValues.getClass().getMethod(STR, String.class).invoke(rowValues, timestamp); for (Object key : jsonRow.keySet()) { applyKVToBean(rowValues, key.toString(), jsonRow.get(key.toString())); } } catch (Instan...
/** * Extract v = all fields from json. The first field is always timestamp and * is not extracted here. * * @param timestamp * @param jsonRow * @return */
Extract v = all fields from json. The first field is always timestamp and is not extracted here
extractKeyAndRow
{ "repo_name": "lordmat0/teiid-druid", "path": "druid/Sql4Ddriver/src/main/java/com/yahoo/sql4d/sql4ddriver/Mapper4Bean.java", "license": "apache-2.0", "size": 3535 }
[ "java.lang.reflect.InvocationTargetException", "java.util.logging.Level", "java.util.logging.Logger", "org.json.JSONObject" ]
import java.lang.reflect.InvocationTargetException; import java.util.logging.Level; import java.util.logging.Logger; import org.json.JSONObject;
import java.lang.reflect.*; import java.util.logging.*; import org.json.*;
[ "java.lang", "java.util", "org.json" ]
java.lang; java.util; org.json;
872,707
public static File extractFromResourcePath(String name, ClassLoader loader) throws IOException { final boolean DEBUG = DEBUG_LOAD || (DEBUG_JNA_LOAD && name.indexOf("jnidispatch") != -1); if (loader == null) { loader = Thread.currentThread().getContextClassLoader(); ...
static File function(String name, ClassLoader loader) throws IOException { final boolean DEBUG = DEBUG_LOAD (DEBUG_JNA_LOAD && name.indexOf(STR) != -1); if (loader == null) { loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = Native.class.getClassLoader(); } } if (DEBUG) { System.ou...
/** Attempt to extract a native library from the resource path using the * given class loader. * @param name Base name of native library to extract. May also be an * absolute resource path (i.e. starts with "/"), in which case the * no transformations of the library name are performed. If only the...
Attempt to extract a native library from the resource path using the given class loader
extractFromResourcePath
{ "repo_name": "trejkaz/jna", "path": "src/com/sun/jna/Native.java", "license": "lgpl-2.1", "size": 98036 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.net.URISyntaxException", "java.net.URLClassLoader", "java.util.Arrays" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.net.URLClassLoader; import java.util.Arrays;
import java.io.*; import java.net.*; import java.util.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
2,731,666
void setDefaultMediaFormat(ContentType format);
void setDefaultMediaFormat(ContentType format);
/** * Sets the default OData media format. * * @param format default format. */
Sets the default OData media format
setDefaultMediaFormat
{ "repo_name": "apache/olingo-odata4", "path": "lib/client-api/src/main/java/org/apache/olingo/client/api/Configuration.java", "license": "apache-2.0", "size": 9156 }
[ "org.apache.olingo.commons.api.format.ContentType" ]
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.format.*;
[ "org.apache.olingo" ]
org.apache.olingo;
1,522,001
@Override public void setGraph(TransformationGraph graph) { this.graph = graph; }
void function(TransformationGraph graph) { this.graph = graph; }
/** * Sets the parent graph of this metadata * @param graph the parent graph to set */
Sets the parent graph of this metadata
setGraph
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.engine/src/org/jetel/metadata/DataRecordMetadata.java", "license": "lgpl-2.1", "size": 54601 }
[ "org.jetel.graph.TransformationGraph" ]
import org.jetel.graph.TransformationGraph;
import org.jetel.graph.*;
[ "org.jetel.graph" ]
org.jetel.graph;
2,829,329
public Privilege getPrivilegeByBit(final Integer bit) { return bitPrivMap.get(bit); }
Privilege function(final Integer bit) { return bitPrivMap.get(bit); }
/** * This method returns Privilege object by bit number. * @param bit bit number associated with privilege. * @return Privilege object. */
This method returns Privilege object by bit number
getPrivilegeByBit
{ "repo_name": "NCIP/catissue-security-manager", "path": "software/SecurityManager/src/main/java/edu/wustl/security/locator/PrivilegeLocator.java", "license": "bsd-3-clause", "size": 4032 }
[ "edu.wustl.security.privilege.Privilege" ]
import edu.wustl.security.privilege.Privilege;
import edu.wustl.security.privilege.*;
[ "edu.wustl.security" ]
edu.wustl.security;
2,464,902
public void setEndpointType(QName type) { endpointType = type; }
void function(QName type) { endpointType = type; }
/** * Sets the type of endpoint needed. * * @param type type of endpoint needed */
Sets the type of endpoint needed
setEndpointType
{ "repo_name": "Safewhere/kombit-web-java", "path": "kombit-opensaml-2.5.1/src/org/opensaml/common/binding/AbstractEndpointSelector.java", "license": "mit", "size": 5088 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,567,269
private static HashResult hashPaths(String id, Map<String, Object> bnodes, UniqueNamer namer, UniqueNamer pathNamer) { try { // create SHA-1 digest final MessageDigest md = MessageDigest.getInstance("SHA-1"); final Map<String, List<String>> groups = new...
static HashResult function(String id, Map<String, Object> bnodes, UniqueNamer namer, UniqueNamer pathNamer) { try { final MessageDigest md = MessageDigest.getInstance("SHA-1"); final Map<String, List<String>> groups = new LinkedHashMap<String, List<String>>(); List<String> groupHashes; final List<Object> quads = (List<...
/** * Produces a hash for the paths of adjacent bnodes for a bnode, * incorporating all information about its subgraph of bnodes. This method * will recursively pick adjacent bnode permutations that produce the * lexicographically-least 'path' serializations. * * @param id * ...
Produces a hash for the paths of adjacent bnodes for a bnode, incorporating all information about its subgraph of bnodes. This method will recursively pick adjacent bnode permutations that produce the lexicographically-least 'path' serializations
hashPaths
{ "repo_name": "tristan/jsonld-java", "path": "core/src/main/java/com/github/jsonldjava/core/NormalizeUtils.java", "license": "bsd-3-clause", "size": 26268 }
[ "java.io.UnsupportedEncodingException", "java.security.MessageDigest", "java.security.NoSuchAlgorithmException", "java.util.ArrayList", "java.util.Collections", "java.util.LinkedHashMap", "java.util.List", "java.util.Map" ]
import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map;
import java.io.*; import java.security.*; import java.util.*;
[ "java.io", "java.security", "java.util" ]
java.io; java.security; java.util;
180,100
protected static boolean isValidValue(Field f, Object value) { if (value != null) { return true; } Schema schema = f.schema(); Type type = schema.getType(); // If the type is null, any value is valid if (type == Type.NULL) { return true; } // If the type is a uni...
static boolean function(Field f, Object value) { if (value != null) { return true; } Schema schema = f.schema(); Type type = schema.getType(); if (type == Type.NULL) { return true; } if (type == Type.UNION) { for (Schema s : schema.getTypes()) { if (s.getType() == Type.NULL) { return true; } } } return false; }
/** * Tests whether a value is valid for a specified field. * @param f the field for which to test the value. * @param value the value to test. * @return true if the value is valid for the given field; false otherwise. */
Tests whether a value is valid for a specified field
isValidValue
{ "repo_name": "julianpeeters/avro", "path": "lang/java/avro/src/main/java/org/apache/avro/data/RecordBuilderBase.java", "license": "apache-2.0", "size": 7974 }
[ "org.apache.avro.Schema" ]
import org.apache.avro.Schema;
import org.apache.avro.*;
[ "org.apache.avro" ]
org.apache.avro;
1,906,530
void setOrthoShadowMatrix(Matrix4f modelView, GVRLightBase light) { GVROrthogonalCamera camera = (GVROrthogonalCamera) getCamera(); if (camera == null) { return; } float w = camera.getRightClippingDistance() - camera.getLeftClippingDistance(); float h...
void setOrthoShadowMatrix(Matrix4f modelView, GVRLightBase light) { GVROrthogonalCamera camera = (GVROrthogonalCamera) getCamera(); if (camera == null) { return; } float w = camera.getRightClippingDistance() - camera.getLeftClippingDistance(); float h = camera.getTopClippingDistance() - camera.getBottomClippingDistance...
/** * Sets the direct light shadow matrix for the light from the input model/view * matrix and the shadow camera projection matrix. * @param modelView light model/view transform * @param light direct light component to update */
Sets the direct light shadow matrix for the light from the input model/view matrix and the shadow camera projection matrix
setOrthoShadowMatrix
{ "repo_name": "ragner/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShadowMap.java", "license": "apache-2.0", "size": 8768 }
[ "org.joml.Matrix4f" ]
import org.joml.Matrix4f;
import org.joml.*;
[ "org.joml" ]
org.joml;
151,135
boolean isDocumentExist(String apiId, DocumentInfo documentInfo) throws APIMgtDAOException;
boolean isDocumentExist(String apiId, DocumentInfo documentInfo) throws APIMgtDAOException;
/** * Check if document Exist * * @param apiId UUID of the API. * @param documentInfo Document. * @return TRUE or false based on the existence of document. * @throws APIMgtDAOException If error occurs while checking if document exits. */
Check if document Exist
isDocumentExist
{ "repo_name": "sambaheerathan/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/dao/ApiDAO.java", "license": "apache-2.0", "size": 28726 }
[ "org.wso2.carbon.apimgt.core.exception.APIMgtDAOException", "org.wso2.carbon.apimgt.core.models.DocumentInfo" ]
import org.wso2.carbon.apimgt.core.exception.APIMgtDAOException; import org.wso2.carbon.apimgt.core.models.DocumentInfo;
import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.models.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,131,564
private Node parseXML2DOM( String xml ) { Node node = new Node( ); StringBuffer buffer = new StringBuffer( ); Stack stack = new Stack( ); ArrayList children = new ArrayList( ); Object obj; boolean flag = false; boolean reserved = false; char ch; for ( int i = 0; i < xml.length( ); i++ ) { ch ...
Node function( String xml ) { Node node = new Node( ); StringBuffer buffer = new StringBuffer( ); Stack stack = new Stack( ); ArrayList children = new ArrayList( ); Object obj; boolean flag = false; boolean reserved = false; char ch; for ( int i = 0; i < xml.length( ); i++ ) { ch = xml.charAt( i ); if ( reserved ) { if...
/** * This method is to parse the xml-formatted string to a Node. * *@param String xml-formatted string parsed from the configuration file *@return Node that stores all the useful information in the configuration file */
This method is to parse the xml-formatted string to a Node
parseXML2DOM
{ "repo_name": "sguan-actuate/birt", "path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/ConfigFileParser.java", "license": "epl-1.0", "size": 13878 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.Stack" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
2,639,524
public static ConstraintType fromInstanceName(String instanceName) { for (PlasmaEnum enm : enumValues()) { if (enm.getInstanceName().equals(instanceName)) return (ConstraintType) enm; } throw new IllegalArgumentException("no enumeration value found for instance name '" + instanceName...
static ConstraintType function(String instanceName) { for (PlasmaEnum enm : enumValues()) { if (enm.getInstanceName().equals(instanceName)) return (ConstraintType) enm; } throw new IllegalArgumentException(STR + instanceName + "'"); }
/** * Returns the enumeration value matching the given physical or instance name. */
Returns the enumeration value matching the given physical or instance name
fromInstanceName
{ "repo_name": "plasma-framework/plasma", "path": "plasma-provisioning/src/main/java/org/plasma/provisioning/rdb/oracle/g11/sys/ConstraintType.java", "license": "apache-2.0", "size": 3664 }
[ "org.plasma.sdo.PlasmaEnum" ]
import org.plasma.sdo.PlasmaEnum;
import org.plasma.sdo.*;
[ "org.plasma.sdo" ]
org.plasma.sdo;
2,153,065
SimpleString getManagementAddress();
SimpleString getManagementAddress();
/** * Returns the management address of this server. <br> * Clients can send management messages to this address to manage this server. <br> * Default value is {@link org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS}. */
Returns the management address of this server. Clients can send management messages to this address to manage this server. Default value is <code>org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration#DEFAULT_MANAGEMENT_ADDRESS</code>
getManagementAddress
{ "repo_name": "mnovak1/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java", "license": "apache-2.0", "size": 38918 }
[ "org.apache.activemq.artemis.api.core.SimpleString" ]
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,695,221
private void setupSymbolicCastMaps() { namesByQueryId = new ArrayList<JsName>(); for (JReferenceType type : program.getTypesByQueryId()) { String shortName; String longName; if (type instanceof JArrayType) { JArrayType arrayType = (JArrayType) type; JType lea...
void function() { namesByQueryId = new ArrayList<JsName>(); for (JReferenceType type : program.getTypesByQueryId()) { String shortName; String longName; if (type instanceof JArrayType) { JArrayType arrayType = (JArrayType) type; JType leafType = arrayType.getLeafType(); if (leafType instanceof JReferenceType) { shortNa...
/** * Create more readable output by generating symbolic constants for query * ids. */
Create more readable output by generating symbolic constants for query ids
setupSymbolicCastMaps
{ "repo_name": "syntelos/gwtcc", "path": "src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java", "license": "apache-2.0", "size": 97208 }
[ "com.google.gwt.dev.jjs.ast.JArrayType", "com.google.gwt.dev.jjs.ast.JClassType", "com.google.gwt.dev.jjs.ast.JMethod", "com.google.gwt.dev.jjs.ast.JReferenceType", "com.google.gwt.dev.jjs.ast.JType", "com.google.gwt.dev.js.ast.JsFunction", "com.google.gwt.dev.js.ast.JsName", "java.util.ArrayList", ...
import com.google.gwt.dev.jjs.ast.JArrayType; import com.google.gwt.dev.jjs.ast.JClassType; import com.google.gwt.dev.jjs.ast.JMethod; import com.google.gwt.dev.jjs.ast.JReferenceType; import com.google.gwt.dev.jjs.ast.JType; import com.google.gwt.dev.js.ast.JsFunction; import com.google.gwt.dev.js.ast.JsName; import j...
import com.google.gwt.dev.jjs.ast.*; import com.google.gwt.dev.js.ast.*; import java.util.*;
[ "com.google.gwt", "java.util" ]
com.google.gwt; java.util;
1,110,909
public void setPositiveItemLabelPositionFallback( ItemLabelPosition position) { this.positiveItemLabelPositionFallback = position; fireChangeEvent(); }
void function( ItemLabelPosition position) { this.positiveItemLabelPositionFallback = position; fireChangeEvent(); }
/** * Sets the fallback position for positive item labels that don't fit * within a bar, and sends a {@link RendererChangeEvent} to all registered * listeners. * * @param position the position (<code>null</code> permitted). * * @see #getPositiveItemLabelPositionFallback() ...
Sets the fallback position for positive item labels that don't fit within a bar, and sends a <code>RendererChangeEvent</code> to all registered listeners
setPositiveItemLabelPositionFallback
{ "repo_name": "aaronc/jfreechart", "path": "source/org/jfree/chart/renderer/category/BarRenderer.java", "license": "lgpl-2.1", "size": 50209 }
[ "org.jfree.chart.labels.ItemLabelPosition" ]
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
16,566
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String routeFilterName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, routeFilterName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String routeFilterName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, routeFilterName), serviceCallback); }
/** * Deletes the specified route filter. * * @param resourceGroupName The name of the resource group. * @param routeFilterName The name of the route filter. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thr...
Deletes the specified route filter
deleteAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java", "license": "mit", "size": 69813 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,603,787
public void testCloning() { HighLowRenderer r1 = new HighLowRenderer(); r1.setCloseTickPaint(Color.green); HighLowRenderer r2 = null; try { r2 = (HighLowRenderer) r1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); ...
void function() { HighLowRenderer r1 = new HighLowRenderer(); r1.setCloseTickPaint(Color.green); HighLowRenderer r2 = null; try { r2 = (HighLowRenderer) r1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2))...
/** * Confirm that cloning works. */
Confirm that cloning works
testCloning
{ "repo_name": "ilyessou/jfreechart", "path": "tests/org/jfree/chart/renderer/xy/junit/HighLowRendererTests.java", "license": "lgpl-2.1", "size": 7026 }
[ "java.awt.Color", "org.jfree.chart.renderer.xy.HighLowRenderer" ]
import java.awt.Color; import org.jfree.chart.renderer.xy.HighLowRenderer;
import java.awt.*; import org.jfree.chart.renderer.xy.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,396,643
public void setList(java.math.BigDecimal[] list) { this.list = list; }
void function(java.math.BigDecimal[] list) { this.list = list; }
/** * Sets the list value for this Result1. * * @param list */
Sets the list value for this Result1
setList
{ "repo_name": "grgrzybek/sws-extensions", "path": "jws/src/test/java/org/javelin/sws/ext/ws/axis1/case2/contractfirst/document_encoded_12_arraysplain/Result1.java", "license": "apache-2.0", "size": 3957 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
743,299
private void createResult(String labelText, Image image) { if (null == image) { image = imageProvider.getImage(); } result = new StaticLabelProvider(labelText, image); }
void function(String labelText, Image image) { if (null == image) { image = imageProvider.getImage(); } result = new StaticLabelProvider(labelText, image); }
/** * Creates the result label provider. * * @param labelText the label text * @param image the label image (may be <b>null</b>, then the * {@link #imageProvider fallback image provider} is taken into account) */
Creates the result label provider
createResult
{ "repo_name": "QualiMaster/QM-IConf", "path": "QualiMasterApplication/src/de/uni_hildesheim/sse/qmApp/tabbedViews/LabelProviderCreator.java", "license": "apache-2.0", "size": 7534 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,099,556
AzureQueueStorageImpl setVersion(String version) { this.version = version; return this; } private HttpPipeline httpPipeline;
AzureQueueStorageImpl setVersion(String version) { this.version = version; return this; } private HttpPipeline httpPipeline;
/** * Sets Specifies the version of the operation to use for this request. * * @param version the version value. */
Sets Specifies the version of the operation to use for this request
setVersion
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/azure-storage-queue/src/main/java/com/azure/storage/queue/implementation/AzureQueueStorageImpl.java", "license": "mit", "size": 3987 }
[ "com.azure.core.http.HttpPipeline" ]
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.*;
[ "com.azure.core" ]
com.azure.core;
2,670,409
public final static InputStream openClasspathResourceUrl(final String pName) throws IOException { return loadResourceUrlFromClasspath(pName).openStream(); }
final static InputStream function(final String pName) throws IOException { return loadResourceUrlFromClasspath(pName).openStream(); }
/** * Open a resource url input stream. Look at the loadResourceUrl method * for a description of how the resource is searched for. * @param pName The resource name. * @return The open input stream. * @throws IOException */
Open a resource url input stream. Look at the loadResourceUrl method for a description of how the resource is searched for
openClasspathResourceUrl
{ "repo_name": "deftlabs/mongo-java-logging", "path": "src/main/com/deftlabs/logging/mongo/LogConfigUtils.java", "license": "apache-2.0", "size": 2532 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
349,690
public Entry<Long, Future<?>> restartInstance(long instanceId, Properties restartParameters, long executionId) throws JobExecutionAlreadyCompleteException, NoSuchJobExecutionException, JobExecutionNotMostRecentException, ...
Entry<Long, Future<?>> function(long instanceId, Properties restartParameters, long executionId) throws JobExecutionAlreadyCompleteException, NoSuchJobExecutionException, JobExecutionNotMostRecentException, JobRestartException, JobSecurityException; /** * Stops a currently executing JobExecution * * Closely mirrors: * ...
/** * Restart an earlier job instance, creating a new, restart job execution. * * Closely mirrors the spec method: * * @see {@link JobOperator#restart(long, Properties)} with the security authorization checks being WAS-specific, however. * * @param instanceId the instance id of the...
Restart an earlier job instance, creating a new, restart job execution. Closely mirrors the spec method:
restartInstance
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/ws/WSJobOperator.java", "license": "epl-1.0", "size": 6349 }
[ "java.util.Map", "java.util.Properties", "java.util.concurrent.Future", "javax.batch.operations.JobExecutionAlreadyCompleteException", "javax.batch.operations.JobExecutionNotMostRecentException", "javax.batch.operations.JobOperator", "javax.batch.operations.JobRestartException", "javax.batch.operation...
import java.util.Map; import java.util.Properties; import java.util.concurrent.Future; import javax.batch.operations.JobExecutionAlreadyCompleteException; import javax.batch.operations.JobExecutionNotMostRecentException; import javax.batch.operations.JobOperator; import javax.batch.operations.JobRestartException; impor...
import java.util.*; import java.util.concurrent.*; import javax.batch.operations.*;
[ "java.util", "javax.batch" ]
java.util; javax.batch;
1,716,099
TEvidencniUdajeDokumentu eu = d.getEvidencniUdaje(); if (eu != null) { TVyrizeniEntity vyrizeni = eu.getVyrizeni(); if (vyrizeni != null) { replaceTSubjektExterni(vyrizeni.getPrijemce()); } TPuvodDokumentu puvod = eu.getPuvod(); if (puv...
TEvidencniUdajeDokumentu eu = d.getEvidencniUdaje(); if (eu != null) { TVyrizeniEntity vyrizeni = eu.getVyrizeni(); if (vyrizeni != null) { replaceTSubjektExterni(vyrizeni.getPrijemce()); } TPuvodDokumentu puvod = eu.getPuvod(); if (puvod != null) { TDorucenyDokument dorucenyDokument = puvod.getDorucenyDokument(); if (...
/** * Replaces {@link TSubjektExterni} to {@link SubjektExterni} to allow to recognize * the type of TSubjektExterni in JSON. TSubjektExterni is extended with subjectType * with possible values ("FyzickaOsoba", "PravnickaOsoba"). The synthetic subjectType * is discarded on JAXB serialization. *...
Replaces <code>TSubjektExterni</code> to <code>SubjektExterni</code> to allow to recognize the type of TSubjektExterni in JSON. TSubjektExterni is extended with subjectType with possible values ("FyzickaOsoba", "PravnickaOsoba"). The synthetic subjectType is discarded on JAXB serialization. It should be applied to /Dok...
replaceTSubjektExterni
{ "repo_name": "proarc/proarc", "path": "proarc-nsesss/src/main/java/cz/cas/lib/proarc/nsesss2/mapping/NsesssMapper.java", "license": "gpl-3.0", "size": 17504 }
[ "cz.cas.lib.proarc.nsesss2.TDorucenyDokument", "cz.cas.lib.proarc.nsesss2.TEvidencniUdajeDokumentu", "cz.cas.lib.proarc.nsesss2.TOsobaExterni", "cz.cas.lib.proarc.nsesss2.TPuvodDokumentu", "cz.cas.lib.proarc.nsesss2.TSubjektExterni", "cz.cas.lib.proarc.nsesss2.TVyrizeniEntity" ]
import cz.cas.lib.proarc.nsesss2.TDorucenyDokument; import cz.cas.lib.proarc.nsesss2.TEvidencniUdajeDokumentu; import cz.cas.lib.proarc.nsesss2.TOsobaExterni; import cz.cas.lib.proarc.nsesss2.TPuvodDokumentu; import cz.cas.lib.proarc.nsesss2.TSubjektExterni; import cz.cas.lib.proarc.nsesss2.TVyrizeniEntity;
import cz.cas.lib.proarc.nsesss2.*;
[ "cz.cas.lib" ]
cz.cas.lib;
2,878,874
public Render all(GenericDAO dao, HttpServletRequest request, String action, String id, String name, String callback) { if ("create".equals(action)) { return create(dao, request, callback); } else if ("find".equals(action)) { return find(dao,...
Render function(GenericDAO dao, HttpServletRequest request, String action, String id, String name, String callback) { if (STR.equals(action)) { return create(dao, request, callback); } else if ("find".equals(action)) { return find(dao, request, callback, id); } else if ("query".equals(action)) { return query(dao, reque...
/** * Manage all action. The parameter action is used to determine the action * to execute. * * @param dao generic dao injected * @param request http request injected * @param action action to do (create, find, query, update, delete) * @param id entity identifier * @param name ...
Manage all action. The parameter action is used to determine the action to execute
all
{ "repo_name": "tchemit/webmotion", "path": "webmotion-extra-jpa/src/main/java/org/debux/webmotion/jpa/Jpa.java", "license": "lgpl-3.0", "size": 6767 }
[ "javax.servlet.http.HttpServletRequest", "org.debux.webmotion.server.render.Render" ]
import javax.servlet.http.HttpServletRequest; import org.debux.webmotion.server.render.Render;
import javax.servlet.http.*; import org.debux.webmotion.server.render.*;
[ "javax.servlet", "org.debux.webmotion" ]
javax.servlet; org.debux.webmotion;
2,804,304
public void saveAndReopen() throws ConfigException, IOException { saveIndex(true); openIndex(); }
void function() throws ConfigException, IOException { saveIndex(true); openIndex(); }
/** * Save and reopen. * * @throws ConfigException the config exception * @throws IOException on err */
Save and reopen
saveAndReopen
{ "repo_name": "OpenSextant/Xponents", "path": "src/main/java/org/opensextant/util/SolrProxy.java", "license": "apache-2.0", "size": 10251 }
[ "java.io.IOException", "org.opensextant.ConfigException" ]
import java.io.IOException; import org.opensextant.ConfigException;
import java.io.*; import org.opensextant.*;
[ "java.io", "org.opensextant" ]
java.io; org.opensextant;
1,465,835
public boolean cancelSignatureRequest(String id) throws HelloSignException { String url = BASE_URI + SIGNATURE_REQUEST_CANCEL_URI + "/" + id; return HttpURLConnection.HTTP_OK == httpClient.withAuth(auth).post(url).asHttpCode(); }
boolean function(String id) throws HelloSignException { String url = BASE_URI + SIGNATURE_REQUEST_CANCEL_URI + "/" + id; return HttpURLConnection.HTTP_OK == httpClient.withAuth(auth).post(url).asHttpCode(); }
/** * Cancels an existing signature request. If it has been completed, it will delete the signature * request from your account. * * @param id SignatureRequest id * @return boolean true if successful * @throws HelloSignException thrown if there's a problem processing the HTTP request or th...
Cancels an existing signature request. If it has been completed, it will delete the signature request from your account
cancelSignatureRequest
{ "repo_name": "codylerum/hellosign-java-sdk", "path": "src/main/java/com/hellosign/sdk/HelloSignClient.java", "license": "mit", "size": 50594 }
[ "java.net.HttpURLConnection" ]
import java.net.HttpURLConnection;
import java.net.*;
[ "java.net" ]
java.net;
2,645,328
public SequenceConfig getSequenceConfig(AuthenticationContext context, Map<String, String[]> parameterMap) throws FrameworkException { String requestType = context.getRequestType(); String[] issuers = parameterMap.get(FrameworkConstants.RequestParams.ISSUER); String issuer = null...
SequenceConfig function(AuthenticationContext context, Map<String, String[]> parameterMap) throws FrameworkException { String requestType = context.getRequestType(); String[] issuers = parameterMap.get(FrameworkConstants.RequestParams.ISSUER); String issuer = null; if (!ArrayUtils.isEmpty(issuers)) { issuer = issuers[0...
/** * Returns the sequence config related to current Authentication Context. * @param context Authentication Context * @param parameterMap Parameter Map, retrieved from (Http/etc) Request. * @return Generated Sequence Config. * @throws FrameworkException when there is an error in loading the S...
Returns the sequence config related to current Authentication Context
getSequenceConfig
{ "repo_name": "omindu/carbon-identity-framework", "path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/handler/request/impl/AbstractRequestCoordinator.java", "license": "apache-2.0", ...
[ "java.util.Map", "org.apache.commons.lang.ArrayUtils", "org.wso2.carbon.identity.application.authentication.framework.config.ConfigurationFacade", "org.wso2.carbon.identity.application.authentication.framework.config.loader.SequenceLoader", "org.wso2.carbon.identity.application.authentication.framework.conf...
import java.util.Map; import org.apache.commons.lang.ArrayUtils; import org.wso2.carbon.identity.application.authentication.framework.config.ConfigurationFacade; import org.wso2.carbon.identity.application.authentication.framework.config.loader.SequenceLoader; import org.wso2.carbon.identity.application.authentication....
import java.util.*; import org.apache.commons.lang.*; import org.wso2.carbon.identity.application.authentication.framework.config.*; import org.wso2.carbon.identity.application.authentication.framework.config.loader.*; import org.wso2.carbon.identity.application.authentication.framework.config.model.*; import org.wso2....
[ "java.util", "org.apache.commons", "org.wso2.carbon" ]
java.util; org.apache.commons; org.wso2.carbon;
1,072,494
public void setAppStateApiOptions(NoOptions options) { doApiOptionsPreCheck(); mAppStateApiOptions = options; }
void function(NoOptions options) { doApiOptionsPreCheck(); mAppStateApiOptions = options; }
/** * Sets the options to pass when setting up the AppState API. Call before * setup(). */
Sets the options to pass when setting up the AppState API. Call before setup()
setAppStateApiOptions
{ "repo_name": "anoochit/taptaptap", "path": "app/src/main/java/net/redlinesoft/taptaptapfree/GameHelper.java", "license": "gpl-3.0", "size": 39582 }
[ "com.google.android.gms.common.api.Api" ]
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.*;
[ "com.google.android" ]
com.google.android;
715,616
public Object getDataElements(int rgb, Object pixel) { // FIXME: handle alpha multiply int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; // ...
Object function(int rgb, Object pixel) { int pixelValue = 0; int a = 0; if (hasAlpha()) { a = (rgb >>> 24) & 0xff; pixelValue = valueToField(a, 3, 8); } if (hasAlpha() && isAlphaPremultiplied()) { int r, g, b; r = ((rgb >>> 8) & 0xff00)*a/255; g = ((rgb >>> 0) & 0xff00)*a/255; b = ((rgb << 8) & 0xff00)*a/255; pixelValu...
/** * Converts a normalized pixel int value in the sRGB color * space to an array containing a single pixel of the color space * of the color model. * * <p>This method performs the inverse function of * <code>getRGB(Object inData)</code>. * * @param rgb pixel as a normalized sRGB, 0xAARRGGBB val...
Converts a normalized pixel int value in the sRGB color space to an array containing a single pixel of the color space of the color model. This method performs the inverse function of <code>getRGB(Object inData)</code>
getDataElements
{ "repo_name": "unofficial-opensource-apple/gcc_40", "path": "libjava/java/awt/image/DirectColorModel.java", "license": "gpl-2.0", "size": 12601 }
[ "gnu.java.awt.Buffers" ]
import gnu.java.awt.Buffers;
import gnu.java.awt.*;
[ "gnu.java.awt" ]
gnu.java.awt;
2,834,887
public void installUI(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).installUI(a); } }
void function(JComponent a) { for (int i = 0; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).installUI(a); } }
/** * Invokes the <code>installUI</code> method on each UI handled by this object. */
Invokes the <code>installUI</code> method on each UI handled by this object
installUI
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/javax/swing/plaf/multi/MultiTreeUI.java", "license": "apache-2.0", "size": 11329 }
[ "javax.swing.JComponent", "javax.swing.plaf.ComponentUI" ]
import javax.swing.JComponent; import javax.swing.plaf.ComponentUI;
import javax.swing.*; import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
837,613
protected void startActivityForResult(Intent intent, int code) { if (fragment == null) { activity.startActivityForResult(intent, code); } else { fragment.startActivityForResult(intent, code); } }
void function(Intent intent, int code) { if (fragment == null) { activity.startActivityForResult(intent, code); } else { fragment.startActivityForResult(intent, code); } }
/** * Start an activity. This method is defined to allow different methods of activity starting for * newer versions of Android and for compatibility library. * * @param intent Intent to start. * @param code Request code for the activity * @see android.app.Activity#startActivityForResult(I...
Start an activity. This method is defined to allow different methods of activity starting for newer versions of Android and for compatibility library
startActivityForResult
{ "repo_name": "aviary48/Ampath-QR-code-scanner", "path": "Scanner/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java", "license": "gpl-3.0", "size": 16113 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
256,904
@Test(timeout=30000) public void testLeaseRecoveryAfterFailover() throws Exception { final Configuration conf = new Configuration(); // Disable permissions so that another user can recover the lease. conf.setBoolean(DFSConfigKeys.DFS_PERMISSIONS_ENABLED_KEY, false); conf.setInt(DFSConfigKeys.DFS_BLO...
@Test(timeout=30000) void function() throws Exception { final Configuration conf = new Configuration(); conf.setBoolean(DFSConfigKeys.DFS_PERMISSIONS_ENABLED_KEY, false); conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE); FSDataOutputStream stm = null; final MiniDFSCluster cluster = newMiniCluster(conf, 3); try...
/** * Tests lease recovery if a client crashes. This approximates the * use case of HBase WALs being recovered after a NN failover. */
Tests lease recovery if a client crashes. This approximates the use case of HBase WALs being recovered after a NN failover
testLeaseRecoveryAfterFailover
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestPipelinesFailover.java", "license": "apache-2.0", "size": 22443 }
[ "java.util.concurrent.TimeUnit", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.hdfs.AppendTestUtil", "org.apache.hadoop.hdfs.DFSConfigKeys", "org.apache.hadoop.hdfs.MiniDFSCluster", "org.apache.hadoop.io.IOUtils...
import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.AppendTestUtil; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.a...
import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.io.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
2,613,953
@FIXVersion(introduced = "4.4") public int clearInstrumentLegs() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced = "4.4") int function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Deletes all the {@link InstrumentLeg} objects from the <code>instrumentLegs</code> array * (sets the array to 0 length)<br/> * This method will also update <code>noLegs</code> field and set it to null.<br/> * @return number of elements in array cleared */
Deletes all the <code>InstrumentLeg</code> objects from the <code>instrumentLegs</code> array (sets the array to 0 length) This method will also update <code>noLegs</code> field and set it to null
clearInstrumentLegs
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/DontKnowTradeMsg.java", "license": "gpl-3.0", "size": 48781 }
[ "net.hades.fix.message.anno.FIXVersion" ]
import net.hades.fix.message.anno.FIXVersion;
import net.hades.fix.message.anno.*;
[ "net.hades.fix" ]
net.hades.fix;
2,086,056
public static List<NabuccoPropertyDescriptor> getPropertyDescriptorList() { return PropertyCache.getInstance().retrieve(Subsidiary.class).getAllProperties(); }
static List<NabuccoPropertyDescriptor> function() { return PropertyCache.getInstance().retrieve(Subsidiary.class).getAllProperties(); }
/** * Getter for the PropertyDescriptorList. * * @return the List<NabuccoPropertyDescriptor>. */
Getter for the PropertyDescriptorList
getPropertyDescriptorList
{ "repo_name": "NABUCCO/org.nabucco.business.organization", "path": "org.nabucco.business.organization.facade.datatype/src/main/gen/org/nabucco/business/organization/facade/datatype/Subsidiary.java", "license": "epl-1.0", "size": 3826 }
[ "java.util.List", "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import java.util.List; import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import java.util.*; import org.nabucco.framework.base.facade.datatype.property.*;
[ "java.util", "org.nabucco.framework" ]
java.util; org.nabucco.framework;
1,862,111
protected void getURIs(String lcacheArchives, String lcacheFiles) { String archives[] = StringUtils.getStrings(lcacheArchives); String files[] = StringUtils.getStrings(lcacheFiles); fileURIs = StringUtils.stringToURI(files); archiveURIs = StringUtils.stringToURI(archives); }
void function(String lcacheArchives, String lcacheFiles) { String archives[] = StringUtils.getStrings(lcacheArchives); String files[] = StringUtils.getStrings(lcacheFiles); fileURIs = StringUtils.stringToURI(files); archiveURIs = StringUtils.stringToURI(archives); }
/** * get the uris of all the files/caches */
get the uris of all the files/caches
getURIs
{ "repo_name": "Microsoft-CISL/hadoop-prototype", "path": "hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/StreamJob.java", "license": "apache-2.0", "size": 41551 }
[ "org.apache.hadoop.util.StringUtils" ]
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,503,577
public SVGPoint getPointAtLength(float distance) { return SVGPathSupport.getPointAtLength(this, distance); }
SVGPoint function(float distance) { return SVGPathSupport.getPointAtLength(this, distance); }
/** * <b>DOM</b>: Implements {@link SVGPathElement#getPointAtLength(float)}. */
DOM: Implements <code>SVGPathElement#getPointAtLength(float)</code>
getPointAtLength
{ "repo_name": "Groostav/CMPT880-term-project", "path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMPathElement.java", "license": "apache-2.0", "size": 31448 }
[ "org.w3c.dom.svg.SVGPoint" ]
import org.w3c.dom.svg.SVGPoint;
import org.w3c.dom.svg.*;
[ "org.w3c.dom" ]
org.w3c.dom;
351,627
@Test public void testGetCalendarFromCollection() throws Exception { Calendar c1 = getCalendar("eventwithtimezone1.ics"); Calendar c2 = getCalendar("vtodo.ics"); NoteItem note1 = converter.convertEventCalendar(c1).iterator().next(); NoteItem note2 = converter.convertTask...
void function() throws Exception { Calendar c1 = getCalendar(STR); Calendar c2 = getCalendar(STR); NoteItem note1 = converter.convertEventCalendar(c1).iterator().next(); NoteItem note2 = converter.convertTaskCalendar(c2); MockCollectionItem collection = new MockCollectionItem(); collection.addStamp(new MockCalendarColl...
/** * Tests get calendar from collection. * @throws Exception - if something is wrong this exception is thrown. */
Tests get calendar from collection
testGetCalendarFromCollection
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/model/hibernate/EntityConverterTest.java", "license": "apache-2.0", "size": 24666 }
[ "net.fortuna.ical4j.model.Calendar", "net.fortuna.ical4j.model.Component", "org.junit.Assert", "org.unitedinternet.cosmo.model.NoteItem", "org.unitedinternet.cosmo.model.mock.MockCalendarCollectionStamp", "org.unitedinternet.cosmo.model.mock.MockCollectionItem" ]
import net.fortuna.ical4j.model.Calendar; import net.fortuna.ical4j.model.Component; import org.junit.Assert; import org.unitedinternet.cosmo.model.NoteItem; import org.unitedinternet.cosmo.model.mock.MockCalendarCollectionStamp; import org.unitedinternet.cosmo.model.mock.MockCollectionItem;
import net.fortuna.ical4j.model.*; import org.junit.*; import org.unitedinternet.cosmo.model.*; import org.unitedinternet.cosmo.model.mock.*;
[ "net.fortuna.ical4j", "org.junit", "org.unitedinternet.cosmo" ]
net.fortuna.ical4j; org.junit; org.unitedinternet.cosmo;
483,164
public Map<String, List<StepPerformanceSnapShot>> getStepPerformanceSnapShots() { return stepPerformanceSnapShots; }
Map<String, List<StepPerformanceSnapShot>> function() { return stepPerformanceSnapShots; }
/** * Gets a named list (map) of step performance snapshots. * * @return a named list (map) of step performance snapshots */
Gets a named list (map) of step performance snapshots
getStepPerformanceSnapShots
{ "repo_name": "AndreyBurikhin/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 190705 }
[ "java.util.List", "java.util.Map", "org.pentaho.di.trans.performance.StepPerformanceSnapShot" ]
import java.util.List; import java.util.Map; import org.pentaho.di.trans.performance.StepPerformanceSnapShot;
import java.util.*; import org.pentaho.di.trans.performance.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,358,916
public static boolean isValidName(String src) { // Path must be absolute. if (!src.startsWith(Path.SEPARATOR)) { return false; } // Check for ".." "." ":" "/" String[] components = StringUtils.split(src, '/'); for (int i = 0; i < components.length; i++) { String element = componen...
static boolean function(String src) { if (!src.startsWith(Path.SEPARATOR)) { return false; } String[] components = StringUtils.split(src, '/'); for (int i = 0; i < components.length; i++) { String element = components[i]; if (element.equals(".") (element.contains(":")) (element.contains("/"))) { return false; } if (ele...
/** * Whether the pathname is valid. Currently prohibits relative paths, * names which contain a ":" or "//", or other non-canonical paths. */
Whether the pathname is valid. Currently prohibits relative paths, names which contain a ":" or "//", or other non-canonical paths
isValidName
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSUtilClient.java", "license": "gpl-3.0", "size": 30688 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.util.StringUtils" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.fs.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,800,019
//<editor-fold desc="Tags management" defaultstate="collapsed"> public static int getTagsCount(String apiKey, JSONObject filter) throws CatchoomException, IOException, NoSuchAlgorithmException { return Commons.countObjectsInList(apiKey, "tag", filter, PROXY); }
static int function(String apiKey, JSONObject filter) throws CatchoomException, IOException, NoSuchAlgorithmException { return Commons.countObjectsInList(apiKey, "tag", filter, PROXY); }
/** * Returns the number of tags matching the filtering criterias. * * @param apiKey your API key * @param filter filtering criterias for reducing the result set; available criterias are <i>name</i> and * <i>name__contains</i> * @return the number of tags matching the filtering criterias * @throws Catchoo...
Returns the number of tags matching the filtering criterias
getTagsCount
{ "repo_name": "NoxWizard86/JCraftAR", "path": "src/main/java/com/noxwizard/jcraftar/Management.java", "license": "apache-2.0", "size": 40315 }
[ "java.io.IOException", "java.security.NoSuchAlgorithmException", "org.json.JSONObject" ]
import java.io.IOException; import java.security.NoSuchAlgorithmException; import org.json.JSONObject;
import java.io.*; import java.security.*; import org.json.*;
[ "java.io", "java.security", "org.json" ]
java.io; java.security; org.json;
2,623,129
@Override public Object clone() throws CloneNotSupportedException { SlidingCategoryDataset clone = (SlidingCategoryDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (Categor...
Object function() throws CloneNotSupportedException { SlidingCategoryDataset clone = (SlidingCategoryDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (CategoryDataset) pc.clone(); } return clone; }
/** * Returns an independent copy of the dataset. Note that: * <ul> * <li>the underlying dataset is only cloned if it implements the * {@link PublicCloneable} interface;</li> * <li>the listeners registered with this dataset are not carried over to * the cloned dataset.</li> * </ul> ...
Returns an independent copy of the dataset. Note that: the underlying dataset is only cloned if it implements the <code>PublicCloneable</code> interface; the listeners registered with this dataset are not carried over to the cloned dataset.
clone
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/main/java/org/jfree/data/category/SlidingCategoryDataset.java", "license": "gpl-3.0", "size": 10828 }
[ "org.jfree.chart.util.PublicCloneable" ]
import org.jfree.chart.util.PublicCloneable;
import org.jfree.chart.util.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,688,954
protected void onClientBandwidth(RTMPConnection conn, Channel channel, ClientBW message) { }
void function(RTMPConnection conn, Channel channel, ClientBW message) { }
/** * Client bandwidth / Peer bandwidth set event handler. * * @param conn * Connection * @param channel * Channel * @param message * ClientBW */
Client bandwidth / Peer bandwidth set event handler
onClientBandwidth
{ "repo_name": "bigbluebutton/red5-server-common", "path": "src/main/java/org/red5/server/net/rtmp/BaseRTMPHandler.java", "license": "apache-2.0", "size": 14463 }
[ "org.red5.server.net.rtmp.event.ClientBW" ]
import org.red5.server.net.rtmp.event.ClientBW;
import org.red5.server.net.rtmp.event.*;
[ "org.red5.server" ]
org.red5.server;
2,685,177
public static void checkForUpdates(final JFrame parent) { UpdateCheckHelper.checkForUpdatesWithUi( parent, Constants.PROJECT_NAME, Constants.PROJECT_VERSION); }
static void function(final JFrame parent) { UpdateCheckHelper.checkForUpdatesWithUi( parent, Constants.PROJECT_NAME, Constants.PROJECT_VERSION); }
/** * Checks for available product updates. * * @param parent Parent window for modal dialogs. */
Checks for available product updates
checkForUpdates
{ "repo_name": "google/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/MainWindow/Implementations/CWindowFunctions.java", "license": "apache-2.0", "size": 5275 }
[ "com.google.security.zynamics.binnavi.Resources", "com.google.security.zynamics.zylib.gui.license.UpdateCheckHelper", "javax.swing.JFrame" ]
import com.google.security.zynamics.binnavi.Resources; import com.google.security.zynamics.zylib.gui.license.UpdateCheckHelper; import javax.swing.JFrame;
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.zylib.gui.license.*; import javax.swing.*;
[ "com.google.security", "javax.swing" ]
com.google.security; javax.swing;
2,471,799
@Test public void testTwoIconsOneSizeDuplicatefile() throws Throwable { File iconEsa = new File(esaDir, "icontest.2icons.1size.duplicatefile.esa"); EsaResource autoFeatureInMassive = uploadAsset(iconEsa); assertEquals(1, countIcons(autoFeatureInMassive.getAttachments())); }
void function() throws Throwable { File iconEsa = new File(esaDir, STR); EsaResource autoFeatureInMassive = uploadAsset(iconEsa); assertEquals(1, countIcons(autoFeatureInMassive.getAttachments())); }
/** * Test for 2 icons, both in the manifest referring to the same filename * * @throws Throwable */
Test for 2 icons, both in the manifest referring to the same filename
testTwoIconsOneSizeDuplicatefile
{ "repo_name": "Azquelt/tool.lars", "path": "upload-lib/src/fat/java/com/ibm/ws/massive/esa/MassiveEsaTest.java", "license": "apache-2.0", "size": 71736 }
[ "com.ibm.ws.repository.resources.EsaResource", "java.io.File", "org.junit.Assert" ]
import com.ibm.ws.repository.resources.EsaResource; import java.io.File; import org.junit.Assert;
import com.ibm.ws.repository.resources.*; import java.io.*; import org.junit.*;
[ "com.ibm.ws", "java.io", "org.junit" ]
com.ibm.ws; java.io; org.junit;
575,248
public ByteBuffer sendRpcSync(ByteBuffer message, long timeoutMs) { final SettableFuture<ByteBuffer> result = SettableFuture.create();
ByteBuffer function(ByteBuffer message, long timeoutMs) { final SettableFuture<ByteBuffer> result = SettableFuture.create();
/** * Synchronously sends an opaque message to the RpcHandler on the server-side, waiting for up to * a specified timeout for a response. */
Synchronously sends an opaque message to the RpcHandler on the server-side, waiting for up to a specified timeout for a response
sendRpcSync
{ "repo_name": "javalovelinux/SparkGroovyScript", "path": "common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java", "license": "apache-2.0", "size": 12739 }
[ "com.google.common.util.concurrent.SettableFuture", "java.nio.ByteBuffer" ]
import com.google.common.util.concurrent.SettableFuture; import java.nio.ByteBuffer;
import com.google.common.util.concurrent.*; import java.nio.*;
[ "com.google.common", "java.nio" ]
com.google.common; java.nio;
1,159,275
JButton getDefaultButton() { return defaultButton; }
JButton getDefaultButton() { return defaultButton; }
/** * Gets the default button of this view. * Override this method to specify a default button. * @return the default button of this view or <code>null</code> if this view has no default button */
Gets the default button of this view. Override this method to specify a default button
getDefaultButton
{ "repo_name": "gogognome/gogoswing", "path": "src/main/java/nl/gogognome/lib/swing/views/View.java", "license": "apache-2.0", "size": 5842 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,609,636
public static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD) { final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value); paramsMD.add(paramValueMD); return paramValueMD; }
static ParamValueMetaData function(final String key, final String value, final List<ParamValueMetaData> paramsMD) { final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value); paramsMD.add(paramValueMD); return paramValueMD; }
/** * Creates new parameter meta data and associates it with parameters meta data. * * @param key parameter key * @param value parameter value * @param paramsMD parameters meta data * @return new parameter meta data */
Creates new parameter meta data and associates it with parameters meta data
newParamValue
{ "repo_name": "xasx/wildfly", "path": "webservices/server-integration/src/main/java/org/jboss/as/webservices/util/WebMetaDataHelper.java", "license": "lgpl-2.1", "size": 15042 }
[ "java.util.List", "org.jboss.metadata.javaee.spec.ParamValueMetaData" ]
import java.util.List; import org.jboss.metadata.javaee.spec.ParamValueMetaData;
import java.util.*; import org.jboss.metadata.javaee.spec.*;
[ "java.util", "org.jboss.metadata" ]
java.util; org.jboss.metadata;
2,619,137
public void setGroupType(Code groupType) { super.setGroupType(groupType); if ((groupType != null)) { this.setGroupTypeRefId(groupType.getId()); } else { this.setGroupTypeRefId(null); } }
void function(Code groupType) { super.setGroupType(groupType); if ((groupType != null)) { this.setGroupTypeRefId(groupType.getId()); } else { this.setGroupTypeRefId(null); } }
/** * Setter for the GroupType. * * @param groupType the Code. */
Setter for the GroupType
setGroupType
{ "repo_name": "NABUCCO/org.nabucco.framework.common.authorization", "path": "org.nabucco.framework.common.authorization.facade.datatype/src/main/gen/org/nabucco/framework/common/authorization/facade/datatype/AuthorizationGroup.java", "license": "epl-1.0", "size": 15627 }
[ "org.nabucco.framework.base.facade.datatype.code.Code" ]
import org.nabucco.framework.base.facade.datatype.code.Code;
import org.nabucco.framework.base.facade.datatype.code.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
2,696,646
@Test void testFilterClauseNotPushable() { // Currently the adapter does not support the LIKE operator String sql = "select sum(\"store_sales\") " + "filter (where \"the_year\" like '199_') from \"foodmart\""; String expectedSubExplain = "PLAN=EnumerableInterpreter\n" + " Drui...
@Test void testFilterClauseNotPushable() { String sql = STRstore_sales\STR + STRthe_year\STRfoodmart\STRPLAN=EnumerableInterpreter\nSTR DruidQuery(table=[[foodmart, foodmart]], STRintervals=[[1900-01-09T00:00:00.000Z/2992-01-10T00:00:00.000Z]], filter=[LIKESTR($83, '199_')], projects=[[$90, IS TRUE(LIKE($83, '199_'))]]...
/** * Test to ensure that aggregates with filter clauses that Druid cannot handle are not pushed in * as filtered aggregates. */
Test to ensure that aggregates with filter clauses that Druid cannot handle are not pushed in as filtered aggregates
testFilterClauseNotPushable
{ "repo_name": "googleinterns/calcite", "path": "druid/src/test/java/org/apache/calcite/test/DruidAdapter2IT.java", "license": "apache-2.0", "size": 202207 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
33,437
public void insert(Widget widget, String tabText, int beforeIndex) { insert(widget, tabText, false, beforeIndex); }
void function(Widget widget, String tabText, int beforeIndex) { insert(widget, tabText, false, beforeIndex); }
/** * Inserts a widget into the tab panel. If the Widget is already attached to * the TabPanel, it will be moved to the requested index. * * @param widget the widget to be inserted * @param tabText the text to be shown on its tab * @param beforeIndex the index before which it will be inser...
Inserts a widget into the tab panel. If the Widget is already attached to the TabPanel, it will be moved to the requested index
insert
{ "repo_name": "hal/core", "path": "gui/src/main/java/org/jboss/as/console/client/widgets/pages/Pages.java", "license": "lgpl-2.1", "size": 11712 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
28,476
private int deleteTicketGrantingTickets(final String ticketId) { int totalCount = 0; final TicketDefinition st = this.ticketCatalog.find(ServiceTicket.PREFIX); Query query = entityManager.createQuery("delete from " + getTicketEntityName(st) + " s where s.ticketGrantingTicket.id = :id"); ...
int function(final String ticketId) { int totalCount = 0; final TicketDefinition st = this.ticketCatalog.find(ServiceTicket.PREFIX); Query query = entityManager.createQuery(STR + getTicketEntityName(st) + STR); query.setParameter("id", ticketId); totalCount += query.executeUpdate(); final TicketDefinition tgt = this.ti...
/** * Delete ticket granting tickets int. * * @param ticketId the ticket id * @return the int */
Delete ticket granting tickets int
deleteTicketGrantingTickets
{ "repo_name": "creamer/cas", "path": "support/cas-server-support-jpa-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/JpaTicketRegistry.java", "license": "apache-2.0", "size": 6213 }
[ "javax.persistence.Query", "org.apereo.cas.ticket.ServiceTicket", "org.apereo.cas.ticket.TicketDefinition", "org.apereo.cas.ticket.TicketGrantingTicket" ]
import javax.persistence.Query; import org.apereo.cas.ticket.ServiceTicket; import org.apereo.cas.ticket.TicketDefinition; import org.apereo.cas.ticket.TicketGrantingTicket;
import javax.persistence.*; import org.apereo.cas.ticket.*;
[ "javax.persistence", "org.apereo.cas" ]
javax.persistence; org.apereo.cas;
2,551,388
public static Font getFont(String name, int height, int style) { return getFont(name, height, style, false, false); }
static Font function(String name, int height, int style) { return getFont(name, height, style, false, false); }
/** * Returns a font based on its name, height and style * @param name String The name of the font * @param height int The height of the font * @param style int The style of the font * @return Font The font matching the name, height and style */
Returns a font based on its name, height and style
getFont
{ "repo_name": "DdiEditor/ddieditor-ui", "path": "src/org/ddialliance/ddieditor/ui/util/swtdesigner/SWTResourceManager.java", "license": "lgpl-3.0", "size": 16065 }
[ "org.eclipse.swt.graphics.Font" ]
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,280,382
public static boolean isMountingPoint(String path, String[] fsTypes) throws IOException { List<UnixMountInfo> infoList = ShellUtils.getUnixMountInfo(); for (UnixMountInfo info : infoList) { Optional<String> mountPoint = info.getMountPoint(); Optional<String> fsType = info.getFsType(); if (mo...
static boolean function(String path, String[] fsTypes) throws IOException { List<UnixMountInfo> infoList = ShellUtils.getUnixMountInfo(); for (UnixMountInfo info : infoList) { Optional<String> mountPoint = info.getMountPoint(); Optional<String> fsType = info.getFsType(); if (mountPoint.isPresent() && mountPoint.get().e...
/** * Checks whether a path is the mounting point of a RAM disk volume. * * @param path a string represents the path to be checked * @param fsTypes an array of strings represents expected file system type * @return true if the path is the mounting point of volume with one of the given fsTypes, * ...
Checks whether a path is the mounting point of a RAM disk volume
isMountingPoint
{ "repo_name": "riversand963/alluxio", "path": "core/server/common/src/main/java/alluxio/cli/validation/Utils.java", "license": "apache-2.0", "size": 6621 }
[ "com.google.common.base.Optional", "java.io.IOException", "java.util.List" ]
import com.google.common.base.Optional; import java.io.IOException; import java.util.List;
import com.google.common.base.*; import java.io.*; import java.util.*;
[ "com.google.common", "java.io", "java.util" ]
com.google.common; java.io; java.util;
2,528,537
private String getThumbPrint(X509Certificate cert) throws NoSuchAlgorithmException, CertificateEncodingException { MessageDigest md = MessageDigest.getInstance("SHA-1"); byte[] certEncoded = cert.getEncoded(); md.update(certEncoded); return hexify(md.digest()); }
String function(X509Certificate cert) throws NoSuchAlgorithmException, CertificateEncodingException { MessageDigest md = MessageDigest.getInstance("SHA-1"); byte[] certEncoded = cert.getEncoded(); md.update(certEncoded); return hexify(md.digest()); }
/** * Helper method to retrieve the thumbprint of a X509 certificate * * @param cert X509 certificate * @return Thumbprint of the X509 certificate * @throws NoSuchAlgorithmException * @throws CertificateEncodingException */
Helper method to retrieve the thumbprint of a X509 certificate
getThumbPrint
{ "repo_name": "cdwijayarathna/carbon-identity", "path": "components/carbon-authenticators/mutual-ssl-authenticator/src/main/java/org/wso2/carbon/identity/authenticator/mutualssl/MutualSSLAuthenticator.java", "license": "apache-2.0", "size": 19196 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException", "java.security.cert.CertificateEncodingException", "java.security.cert.X509Certificate" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateEncodingException; import java.security.cert.X509Certificate;
import java.security.*; import java.security.cert.*;
[ "java.security" ]
java.security;
442,989
protected Identifier convertToLimitedLowerCase(JdbcEnvironment context, Identifier identifier, String prefix) { String identifierText = identifier.getText(); if (prefix != null) { identifierText = prefix + identifierText; } // always convert to lowercase identif...
Identifier function(JdbcEnvironment context, Identifier identifier, String prefix) { String identifierText = identifier.getText(); if (prefix != null) { identifierText = prefix + identifierText; } identifierText = identifierText.toLowerCase(); Integer lengthLimit = getIdentifierLengthLimit(context); if (lengthLimit != ...
/** * Converts a given {@link Identifier} to the lower case representation. If * the given context has a character limit for identifiers, this will be * respected. * * @param context The JDBC context * @param identifier The identifier * @param prefix Optional prefix to use for ...
Converts a given <code>Identifier</code> to the lower case representation. If the given context has a character limit for identifiers, this will be respected
convertToLimitedLowerCase
{ "repo_name": "buehner/shogun2", "path": "src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/naming/PhysicalNamingStrategyShogunCore.java", "license": "apache-2.0", "size": 4592 }
[ "org.apache.commons.lang3.StringUtils", "org.hibernate.boot.model.naming.Identifier", "org.hibernate.engine.jdbc.env.spi.JdbcEnvironment" ]
import org.apache.commons.lang3.StringUtils; import org.hibernate.boot.model.naming.Identifier; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
import org.apache.commons.lang3.*; import org.hibernate.boot.model.naming.*; import org.hibernate.engine.jdbc.env.spi.*;
[ "org.apache.commons", "org.hibernate.boot", "org.hibernate.engine" ]
org.apache.commons; org.hibernate.boot; org.hibernate.engine;
442,590
private String getCertFromHeader(final HttpServletRequest request) { val certHeaderValue = request.getHeader(sslClientCertHeader); if (StringUtils.isBlank(certHeaderValue)) { return null; } if ("(null)".equalsIgnoreCase(certHeaderValue)) { return null; ...
String function(final HttpServletRequest request) { val certHeaderValue = request.getHeader(sslClientCertHeader); if (StringUtils.isBlank(certHeaderValue)) { return null; } if (STR.equalsIgnoreCase(certHeaderValue)) { return null; } return StringUtils.trim(certHeaderValue); }
/** * Get certificate from header or return null. * HTTPD mod_header writes "(null)" when the ssl variable is not filled * so that is treated as if the header were not present or blank. * * @param request HTTP request object * @return Base64 encoded certificate */
Get certificate from header or return null. HTTPD mod_header writes "(null)" when the ssl variable is not filled so that is treated as if the header were not present or blank
getCertFromHeader
{ "repo_name": "rrenomeron/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/extractcert/RequestHeaderX509CertificateExtractor.java", "license": "apache-2.0", "size": 5064 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.commons.lang3.StringUtils" ]
import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.*; import org.apache.commons.lang3.*;
[ "javax.servlet", "org.apache.commons" ]
javax.servlet; org.apache.commons;
4,664
EAttribute getElasticitycontroller_ElasticitycontrollerMaximumLimit();
EAttribute getElasticitycontroller_ElasticitycontrollerMaximumLimit();
/** * Returns the meta object for the attribute '{@link org.eclipse.cmf.occi.multicloud.horizontalelasticity.Elasticitycontroller#getElasticitycontrollerMaximumLimit <em>Elasticitycontroller Maximum Limit</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>...
Returns the meta object for the attribute '<code>org.eclipse.cmf.occi.multicloud.horizontalelasticity.Elasticitycontroller#getElasticitycontrollerMaximumLimit Elasticitycontroller Maximum Limit</code>'.
getElasticitycontroller_ElasticitycontrollerMaximumLimit
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.horizontalelasticity/src-gen/org/eclipse/cmf/occi/multicloud/horizontalelasticity/HorizontalelasticityPackage.java", "license": "epl-1.0", "size": 170187 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,528,910
Observable<JobInformation> createAsync(String accountName, UUID jobIdentity, JobInformation parameters);
Observable<JobInformation> createAsync(String accountName, UUID jobIdentity, JobInformation parameters);
/** * Submits a job to the specified Data Lake Analytics account. * * @param accountName The Azure Data Lake Analytics account to execute job operations on. * @param jobIdentity The job ID (a GUID) for the job being submitted. * @param parameters The parameters to submit a job. * @throws I...
Submits a job to the specified Data Lake Analytics account
createAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Jobs.java", "license": "mit", "size": 25167 }
[ "com.microsoft.azure.management.datalake.analytics.models.JobInformation" ]
import com.microsoft.azure.management.datalake.analytics.models.JobInformation;
import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,106,492
public String decode(String pString, String charset) throws DecoderException, UnsupportedEncodingException { if (pString == null) { return null; } return new String(decode(StringUtils.getBytesUsAscii(pString)), charset); }
String function(String pString, String charset) throws DecoderException, UnsupportedEncodingException { if (pString == null) { return null; } return new String(decode(StringUtils.getBytesUsAscii(pString)), charset); }
/** * Decodes a URL safe string into its original form using the * specified encoding. Escaped characters are converted back * to their original representation. * * @param pString URL safe string to convert into its original form * @param charset the original string charset *...
Decodes a URL safe string into its original form using the specified encoding. Escaped characters are converted back to their original representation
decode
{ "repo_name": "renepreuss/P2P-Client", "path": "src/org/apache/commons/codec/net/URLCodec.java", "license": "mit", "size": 12641 }
[ "java.io.UnsupportedEncodingException", "org.apache.commons.codec.DecoderException", "org.apache.commons.codec.binary.StringUtils" ]
import java.io.UnsupportedEncodingException; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.StringUtils;
import java.io.*; import org.apache.commons.codec.*; import org.apache.commons.codec.binary.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,274,272
public static void main(String[] args) throws Exception { // System.setProperty("org.apache.logging.log4j.simplelog.StatusLogger.level", "trace"); System.out.println("Facet counting example:"); ComUtils.start(); SimpleFacetsExample example = new SimpleFacetsExample(); List<Fa...
static void function(String[] args) throws Exception { System.out.println(STR); ComUtils.start(); SimpleFacetsExample example = new SimpleFacetsExample(); List<FacetResult> results1 = example.runFacetOnly(); System.out.println(STR + results1.get(0)); System.out.println(STR + results1.get(1)); System.out.println(STR + r...
/** * Runs the search and drill-down examples and prints the results. */
Runs the search and drill-down examples and prints the results
main
{ "repo_name": "zevichen/base", "path": "src/main/java/com/czw/search/lucene/example/facet/SimpleFacetsExample.java", "license": "gpl-3.0", "size": 11755 }
[ "com.czw.util.ComUtils", "java.util.List", "org.apache.lucene.facet.FacetResult" ]
import com.czw.util.ComUtils; import java.util.List; import org.apache.lucene.facet.FacetResult;
import com.czw.util.*; import java.util.*; import org.apache.lucene.facet.*;
[ "com.czw.util", "java.util", "org.apache.lucene" ]
com.czw.util; java.util; org.apache.lucene;
1,661,276
public com.mozu.api.contracts.productadmin.Facet addFacet(com.mozu.api.contracts.productadmin.Facet facet, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Facet> client = com.mozu.api.clients.commerce.catalog.admin.FacetClient.addFacetClient( facet, responseFields); ...
com.mozu.api.contracts.productadmin.Facet function(com.mozu.api.contracts.productadmin.Facet facet, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Facet> client = com.mozu.api.clients.commerce.catalog.admin.FacetClient.addFacetClient( facet, responseFields); client.setContext(_...
/** * Creates a new category, price, or attribute facet. Define the category or attribute source to use for the facet values. * <p><pre><code> * Facet facet = new Facet(); * Facet facet = facet.addFacet( facet, responseFields); * </code></pre></p> * @param responseFields Use this field to include tho...
Creates a new category, price, or attribute facet. Define the category or attribute source to use for the facet values. <code><code> Facet facet = new Facet(); Facet facet = facet.addFacet( facet, responseFields); </code></code>
addFacet
{ "repo_name": "johngatti/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/FacetResource.java", "license": "mit", "size": 16774 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
2,378,030
private void addLeftComponents(Iterable<StateBarComponent> components) { for (StateBarComponent component : components) { if (component.getPosition() == StateBarComponent.Position.LEFT) { addComponent(component.getComponent()); leftFilled = true; ...
void function(Iterable<StateBarComponent> components) { for (StateBarComponent component : components) { if (component.getPosition() == StateBarComponent.Position.LEFT) { addComponent(component.getComponent()); leftFilled = true; } } addGlue(); }
/** * Add the components in the left. * * @param components The state bar components. */
Add the components in the left
addLeftComponents
{ "repo_name": "wichtounet/jtheque-core", "path": "jtheque-views/src/main/java/org/jtheque/views/impl/components/panel/JThequeStateBar.java", "license": "apache-2.0", "size": 6049 }
[ "org.jtheque.views.components.StateBarComponent" ]
import org.jtheque.views.components.StateBarComponent;
import org.jtheque.views.components.*;
[ "org.jtheque.views" ]
org.jtheque.views;
800,664
public AMImageConfigurationEntry updateAMImageConfigurationEntry( long companyId, String oldUuid, String name, String description, String newUuid, Map<String, String> properties) throws AMImageConfigurationException, IOException;
AMImageConfigurationEntry function( long companyId, String oldUuid, String name, String description, String newUuid, Map<String, String> properties) throws AMImageConfigurationException, IOException;
/** * Updates an existing image configuration entry. * * @param companyId the primary key of the company * @param oldUuid the image configuration entry's UUID to update * @param name the new image configuration entry's name * @param description the new image configuration entry's description * @param ...
Updates an existing image configuration entry
updateAMImageConfigurationEntry
{ "repo_name": "ambrinchaudhary/com-liferay-adaptive-media", "path": "adaptive-media-image-api/src/main/java/com/liferay/adaptive/media/image/configuration/AMImageConfigurationHelper.java", "license": "lgpl-3.0", "size": 6817 }
[ "com.liferay.adaptive.media.exception.AMImageConfigurationException", "java.io.IOException", "java.util.Map" ]
import com.liferay.adaptive.media.exception.AMImageConfigurationException; import java.io.IOException; import java.util.Map;
import com.liferay.adaptive.media.exception.*; import java.io.*; import java.util.*;
[ "com.liferay.adaptive", "java.io", "java.util" ]
com.liferay.adaptive; java.io; java.util;
147,134
public static String saveChartAsPNG(JFreeChart chart, int width, int height, ChartRenderingInfo info, HttpSession session) throws IOException { ParamChecks.nullNotPermitted(chart, "chart"); ServletUtilities.createTempDir(); String prefix = ServletUtilities.tempFilePrefix; ...
static String function(JFreeChart chart, int width, int height, ChartRenderingInfo info, HttpSession session) throws IOException { ParamChecks.nullNotPermitted(chart, "chart"); ServletUtilities.createTempDir(); String prefix = ServletUtilities.tempFilePrefix; if (session == null) { prefix = ServletUtilities.tempOneTime...
/** * Saves the chart as a PNG format file in the temporary directory and * populates the {@link ChartRenderingInfo} object which can be used to * generate an HTML image map. * * @param chart the chart to be saved (<code>null</code> not permitted). * @param width the width of the c...
Saves the chart as a PNG format file in the temporary directory and populates the <code>ChartRenderingInfo</code> object which can be used to generate an HTML image map
saveChartAsPNG
{ "repo_name": "m-altieri/speedhouse", "path": "speedhouse/lib/jfreechart_src/org/jfree/chart/servlet/ServletUtilities.java", "license": "mit", "size": 17191 }
[ "java.io.File", "java.io.IOException", "javax.servlet.http.HttpSession", "org.jfree.chart.ChartRenderingInfo", "org.jfree.chart.ChartUtilities", "org.jfree.chart.JFreeChart", "org.jfree.chart.util.ParamChecks" ]
import java.io.File; import java.io.IOException; import javax.servlet.http.HttpSession; import org.jfree.chart.ChartRenderingInfo; import org.jfree.chart.ChartUtilities; import org.jfree.chart.JFreeChart; import org.jfree.chart.util.ParamChecks;
import java.io.*; import javax.servlet.http.*; import org.jfree.chart.*; import org.jfree.chart.util.*;
[ "java.io", "javax.servlet", "org.jfree.chart" ]
java.io; javax.servlet; org.jfree.chart;
1,396,919
public synchronized void setBeanContext(BeanContext bc) throws PropertyVetoException { if (bc == beanContext) return; BeanContext oldValue = beanContext; BeanContext newValue = bc; if (!rejectedSetBCOnce) { if (rejectedSetBCOnce = !validatePendingSetBeanContext(bc)) { ...
synchronized void function(BeanContext bc) throws PropertyVetoException { if (bc == beanContext) return; BeanContext oldValue = beanContext; BeanContext newValue = bc; if (!rejectedSetBCOnce) { if (rejectedSetBCOnce = !validatePendingSetBeanContext(bc)) { throw new PropertyVetoException( STR, new PropertyChangeEvent(be...
/** * Sets the <code>BeanContext</code> for * this <code>BeanContextChildSupport</code>. * @param bc the new value to be assigned to the <code>BeanContext</code> * property * @throws PropertyVetoException if the change is rejected */
Sets the <code>BeanContext</code> for this <code>BeanContextChildSupport</code>
setBeanContext
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/java/beans/beancontext/BeanContextChildSupport.java", "license": "gpl-2.0", "size": 13359 }
[ "java.beans.PropertyChangeEvent", "java.beans.PropertyVetoException" ]
import java.beans.PropertyChangeEvent; import java.beans.PropertyVetoException;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,617,494
private void calculateTrackLength(GenericAudioHeader info) throws CannotReadException { //If we have fact chunk we can calculate accurately by taking total of samples (per channel) divided by the number //of samples taken per second (per channel) if (info.getNoOfSamples() != null) { ...
void function(GenericAudioHeader info) throws CannotReadException { if (info.getNoOfSamples() != null) { if (info.getSampleRateAsNumber() > 0) { info.setPreciseLength((float) info.getNoOfSamples() / info.getSampleRateAsNumber()); } } else if (info.getAudioDataLength() > 0) { info.setPreciseLength((float) info.getAudioD...
/** * Calculate track length, done it here because requires data from multiple chunks * * @param info * @throws CannotReadException */
Calculate track length, done it here because requires data from multiple chunks
calculateTrackLength
{ "repo_name": "GlennioTech/MetadataEditor", "path": "app/src/main/java/org/jaudiotagger/audio/wav/WavInfoReader.java", "license": "apache-2.0", "size": 7126 }
[ "org.jaudiotagger.audio.exceptions.CannotReadException", "org.jaudiotagger.audio.generic.GenericAudioHeader" ]
import org.jaudiotagger.audio.exceptions.CannotReadException; import org.jaudiotagger.audio.generic.GenericAudioHeader;
import org.jaudiotagger.audio.exceptions.*; import org.jaudiotagger.audio.generic.*;
[ "org.jaudiotagger.audio" ]
org.jaudiotagger.audio;
1,074,803
private void checkSecurityPermission(SecurityPermission perm) throws org.apache.ignite.plugin.security.SecurityException { if (!ctx.security().enabled()) return; ctx.security().authorize(cacheName, perm); }
void function(SecurityPermission perm) throws org.apache.ignite.plugin.security.SecurityException { if (!ctx.security().enabled()) return; ctx.security().authorize(cacheName, perm); }
/** * Check permissions for streaming. * * @param perm Security permission. * @throws org.apache.ignite.plugin.security.SecurityException If permissions are not enough for streaming. */
Check permissions for streaming
checkSecurityPermission
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java", "license": "apache-2.0", "size": 84377 }
[ "org.apache.ignite.plugin.security.SecurityPermission" ]
import org.apache.ignite.plugin.security.SecurityPermission;
import org.apache.ignite.plugin.security.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,310,012
@Nullable public BinaryType rawType() throws BinaryObjectException;
@Nullable BinaryType function() throws BinaryObjectException;
/** * Get raw type. * * @return Raw type * @throws BinaryObjectException If failed. */
Get raw type
rawType
{ "repo_name": "kromulan/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectEx.java", "license": "apache-2.0", "size": 1393 }
[ "org.apache.ignite.binary.BinaryObjectException", "org.apache.ignite.binary.BinaryType", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.binary.BinaryType; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.binary.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
2,044,210
public DateTimeFormatter getFormatter() { DateTimeFormatter result = null; if (null != getDateFormatString()) { if (getDateFormatString().equals(ISO_FORMAT)) { result = DateTimeFormatter.ISO_OFFSET_DATE_TIME; } else { result = DateTimeFormatter.ofPattern(getDateFormatString()); ...
DateTimeFormatter function() { DateTimeFormatter result = null; if (null != getDateFormatString()) { if (getDateFormatString().equals(ISO_FORMAT)) { result = DateTimeFormatter.ISO_OFFSET_DATE_TIME; } else { result = DateTimeFormatter.ofPattern(getDateFormatString()); } } return result; }
/** * Get the date format as a formatter object. If this assignment does not have * a format, the method returns null * * @return The formatter */
Get the date format as a formatter object. If this assignment does not have a format, the method returns null
getFormatter
{ "repo_name": "BjerknesClimateDataCentre/QuinCe", "path": "WebApp/src/uk/ac/exeter/QuinCe/data/Instrument/DataFormats/DateTimeColumnAssignment.java", "license": "gpl-3.0", "size": 6834 }
[ "java.time.format.DateTimeFormatter" ]
import java.time.format.DateTimeFormatter;
import java.time.format.*;
[ "java.time" ]
java.time;
1,131,310
public QuestionPageList getQuestionsByListCatetory(List<String> listCategoryId, boolean isNotYetAnswer) throws Exception;
QuestionPageList function(List<String> listCategoryId, boolean isNotYetAnswer) throws Exception;
/** * Gets all questions from a list of categories by its Id. * * @param listCategoryId Id of the categories list. * @param isNotYetAnswer If "true", all questions which are not yet answered are got. * If "false", all questions are got. * * @return Questions at the page list. * * @throw...
Gets all questions from a list of categories by its Id
getQuestionsByListCatetory
{ "repo_name": "exoplatform/answers", "path": "service/src/main/java/org/exoplatform/faq/service/FAQService.java", "license": "lgpl-3.0", "size": 36675 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,007,663
public final Vector2 localPoint2 = new Vector2(); public Vector2 getLocalPoint (Vector2 worldPoint) { jniGetLocalPoint(addr, worldPoint.x, worldPoint.y, tmp); localPoint2.x = tmp[0]; localPoint2.y = tmp[1]; return localPoint2; }
final Vector2 localPoint2 = new Vector2(); public Vector2 function (Vector2 worldPoint) { jniGetLocalPoint(addr, worldPoint.x, worldPoint.y, tmp); localPoint2.x = tmp[0]; localPoint2.y = tmp[1]; return localPoint2; }
/** * Gets a local point relative to the body's origin given a world point. * @param worldPoint a point in world coordinates. * @return the corresponding local point relative to the body's origin. */
Gets a local point relative to the body's origin given a world point
getLocalPoint
{ "repo_name": "ouyangwenyuan/androidapp", "path": "tofuflee/src/com/badlogic/gdx/physics/box2d/Body.java", "license": "apache-2.0", "size": 18960 }
[ "com.badlogic.gdx.math.Vector2" ]
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,616,471
@Transient public List<DiscreteCharState> getCharStateList() { if (mCharStateList == null) { mCharStateList = new ArrayList<DiscreteCharState>(getCharStates()); } return mCharStateList; }
List<DiscreteCharState> function() { if (mCharStateList == null) { mCharStateList = new ArrayList<DiscreteCharState>(getCharStates()); } return mCharStateList; }
/** * Create a list of char states to generate "STATELABEL" for nexus file. This property is not * persisted in the database. It is a transient property to make sure the same statelabel list * is used for the entire matrix. * * @return the charStateList */
Create a list of char states to generate "STATELABEL" for nexus file. This property is not persisted in the database. It is a transient property to make sure the same statelabel list is used for the entire matrix
getCharStateList
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-core/src/main/java/org/cipres/treebase/domain/matrix/DiscreteChar.java", "license": "bsd-3-clause", "size": 7698 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,501,571
private void verifyRecursiveExecution( Job parentJob, JobMeta jobMeta ) throws KettleException { if ( parentJob == null ) { return; // OK! } JobMeta parentJobMeta = parentJob.getJobMeta(); if ( parentJobMeta.getName() == null && jobMeta.getName() != null ) { return; // OK } if (...
void function( Job parentJob, JobMeta jobMeta ) throws KettleException { if ( parentJob == null ) { return; } JobMeta parentJobMeta = parentJob.getJobMeta(); if ( parentJobMeta.getName() == null && jobMeta.getName() != null ) { return; } if ( parentJobMeta.getName() != null && jobMeta.getName() == null ) { return; } th...
/** * Make sure that we are not loading jobs recursively... * * @param parentJobMeta * the parent job metadata * @param jobMeta * the job metadata * @throws KettleException * in case both jobs are loaded from the same source */
Make sure that we are not loading jobs recursively..
verifyRecursiveExecution
{ "repo_name": "TatsianaKasiankova/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/job/entries/job/JobEntryJob.java", "license": "apache-2.0", "size": 64846 }
[ "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.job.Job", "org.pentaho.di.job.JobMeta" ]
import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.Job; import org.pentaho.di.job.JobMeta;
import org.pentaho.di.core.exception.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,888,235
public static <A extends Annotation> A getAnnotation(AnnotatedElement element, final Class<A> annotationType, boolean transitive, BeanManager beanManager) { if (transitive) { return getAnnotation(element, annotationType, beanManager); } else { return element.getAnnotation(ann...
static <A extends Annotation> A function(AnnotatedElement element, final Class<A> annotationType, boolean transitive, BeanManager beanManager) { if (transitive) { return getAnnotation(element, annotationType, beanManager); } else { return element.getAnnotation(annotationType); } }
/** * Inspect the {@link AnnotatedElement} for a specific annotation type. If the * transitive argument is <code>true</code> , this method also discovers * annotations inherited from a CDI &#064; {@link Stereotype} on the element. * * @param element The element to inspect * @param a...
Inspect the <code>AnnotatedElement</code> for a specific annotation type. If the transitive argument is <code>true</code> , this method also discovers annotations inherited from a CDI &#064; <code>Stereotype</code> on the element
getAnnotation
{ "repo_name": "agorava/agorava-utils", "path": "solder-generics/api/src/main/java/org/agorava/utils/solder/reflection/AnnotationInspector.java", "license": "apache-2.0", "size": 13458 }
[ "java.lang.annotation.Annotation", "java.lang.reflect.AnnotatedElement", "javax.enterprise.inject.spi.BeanManager" ]
import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import javax.enterprise.inject.spi.BeanManager;
import java.lang.annotation.*; import java.lang.reflect.*; import javax.enterprise.inject.spi.*;
[ "java.lang", "javax.enterprise" ]
java.lang; javax.enterprise;
1,952,524
public List<Account> getReportInfoAccounts(){ if(reportInfo != null){ return new ArrayList<Account>(reportInfo.keySet()); }else{ return null; } }
List<Account> function(){ if(reportInfo != null){ return new ArrayList<Account>(reportInfo.keySet()); }else{ return null; } }
/** * Obtiene las cuentas que sirven de llave para la tabla principal del reporte * @return Lista con las cuentas que hacen parte del reporte */
Obtiene las cuentas que sirven de llave para la tabla principal del reporte
getReportInfoAccounts
{ "repo_name": "zerovirus23/MyBank", "path": "src/main/java/com/mybank/web/ReportBean.java", "license": "apache-2.0", "size": 5629 }
[ "com.mybank.model.Account", "java.util.ArrayList", "java.util.List" ]
import com.mybank.model.Account; import java.util.ArrayList; import java.util.List;
import com.mybank.model.*; import java.util.*;
[ "com.mybank.model", "java.util" ]
com.mybank.model; java.util;
302,459
public CustomerCertificateParameters withSubjectAlternativeNames(List<String> subjectAlternativeNames) { this.subjectAlternativeNames = subjectAlternativeNames; return this; }
CustomerCertificateParameters function(List<String> subjectAlternativeNames) { this.subjectAlternativeNames = subjectAlternativeNames; return this; }
/** * Set the subjectAlternativeNames property: The list of SANs. * * @param subjectAlternativeNames the subjectAlternativeNames value to set. * @return the CustomerCertificateParameters object itself. */
Set the subjectAlternativeNames property: The list of SANs
withSubjectAlternativeNames
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/CustomerCertificateParameters.java", "license": "mit", "size": 8487 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,100,860