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
public void setCvType(CvType cvType) { this.cvType = cvType; }
void function(CvType cvType) { this.cvType = cvType; }
/** * Sets CV Type. * @param cvType CV Type Object. */
Sets CV Type
setCvType
{ "repo_name": "cytoscape/psi-mi", "path": "impl/src/main/java/org/cytoscape/psi_mi/internal/model/AttributeBag.java", "license": "lgpl-2.1", "size": 2725 }
[ "org.cytoscape.psi_mi.internal.schema.mi25.CvType" ]
import org.cytoscape.psi_mi.internal.schema.mi25.CvType;
import org.cytoscape.psi_mi.internal.schema.mi25.*;
[ "org.cytoscape.psi_mi" ]
org.cytoscape.psi_mi;
717,990
public Vector<Vector<byte[]>> segmentData(AudioInputStream input) { Vector<byte[]> buffer = new Vector<byte[]>(); Vector<Vector<byte[]>> returnValue = new Vector<Vector<byte[]>>(); byte[] temp = new byte[1024]; try { for (int i = 0; i < speechIndex.size(); i++) { if (speechIndex.get(i) == 0) { input.read(temp); nonSpeechTime++; } else { input.read(temp); buffer.add(temp); speechTime++; nonSpeechTime = 0; } if (speechTime > 34 && nonSpeechTime == 43) { Vector<byte[]> temp_vector = new Vector<byte[]>(); for (int l = 0; l < buffer.size(); l++) { temp_vector.add(buffer.get(l)); } buffer.removeAllElements(); returnValue.add(temp_vector); speechTime = 0; nonSpeechTime = 0; remainedNumber = i; } else if (nonSpeechTime > 43) { buffer.removeAllElements(); } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return returnValue; }
Vector<Vector<byte[]>> function(AudioInputStream input) { Vector<byte[]> buffer = new Vector<byte[]>(); Vector<Vector<byte[]>> returnValue = new Vector<Vector<byte[]>>(); byte[] temp = new byte[1024]; try { for (int i = 0; i < speechIndex.size(); i++) { if (speechIndex.get(i) == 0) { input.read(temp); nonSpeechTime++; } else { input.read(temp); buffer.add(temp); speechTime++; nonSpeechTime = 0; } if (speechTime > 34 && nonSpeechTime == 43) { Vector<byte[]> temp_vector = new Vector<byte[]>(); for (int l = 0; l < buffer.size(); l++) { temp_vector.add(buffer.get(l)); } buffer.removeAllElements(); returnValue.add(temp_vector); speechTime = 0; nonSpeechTime = 0; remainedNumber = i; } else if (nonSpeechTime > 43) { buffer.removeAllElements(); } } } catch (IOException e) { e.printStackTrace(); } return returnValue; }
/** * Segmenting the data * @param input input audio stream data to segment * @return segmented audio data */
Segmenting the data
segmentData
{ "repo_name": "ubiquitous-computing-lab/Mining-Minds", "path": "information-curation-layer/low-level-context-awareness/src/org/uclab/mm/icl/llc/MachineLearningTools/EventBasedSegmentation.java", "license": "apache-2.0", "size": 3917 }
[ "java.io.IOException", "java.util.Vector", "javax.sound.sampled.AudioInputStream" ]
import java.io.IOException; import java.util.Vector; import javax.sound.sampled.AudioInputStream;
import java.io.*; import java.util.*; import javax.sound.sampled.*;
[ "java.io", "java.util", "javax.sound" ]
java.io; java.util; javax.sound;
532,912
private Step createReplacementStep(boolean enteredWrong, boolean verifyFailed) { String title = lang.translationForKey(CANSTEP_TITLE); CANEntryStep canStep = new CANEntryStep("can-entry", title, capturePin, state, enteredWrong, verifyFailed); StepAction pinAction = new CANStepAction(capturePin, conHandle, dispatcher, canStep, state); canStep.setAction(pinAction); return canStep; }
Step function(boolean enteredWrong, boolean verifyFailed) { String title = lang.translationForKey(CANSTEP_TITLE); CANEntryStep canStep = new CANEntryStep(STR, title, capturePin, state, enteredWrong, verifyFailed); StepAction pinAction = new CANStepAction(capturePin, conHandle, dispatcher, canStep, state); canStep.setAction(pinAction); return canStep; }
/** * Create the step that asks the user to insert the CAN. * * @return Step for CAN entry */
Create the step that asks the user to insert the CAN
createReplacementStep
{ "repo_name": "credentials/irma_future_id", "path": "addons/abc4trust/src/main/java/org/openecard/plugins/abc4trustplugin/gui/CANStepAction.java", "license": "apache-2.0", "size": 7701 }
[ "org.openecard.gui.definition.Step", "org.openecard.gui.executor.StepAction" ]
import org.openecard.gui.definition.Step; import org.openecard.gui.executor.StepAction;
import org.openecard.gui.definition.*; import org.openecard.gui.executor.*;
[ "org.openecard.gui" ]
org.openecard.gui;
426,656
private TableViewer createProjectsTableViewer(Composite container) { TableViewer projectsTableViewer = new TableViewer(container, SWT.BORDER | SWT.CHECK); projectsTableViewer.setLabelProvider(new ProjectLabelProvider()); projectsTableViewer.setContentProvider(ArrayContentProvider.getInstance()); projectsTableViewer.setInput(getProjectsFromWorkspace()); return projectsTableViewer; }
TableViewer function(Composite container) { TableViewer projectsTableViewer = new TableViewer(container, SWT.BORDER SWT.CHECK); projectsTableViewer.setLabelProvider(new ProjectLabelProvider()); projectsTableViewer.setContentProvider(ArrayContentProvider.getInstance()); projectsTableViewer.setInput(getProjectsFromWorkspace()); return projectsTableViewer; }
/** * Create a table viewer with check box elements. * * @param container * Container in which the table viewer will be created. * @return The created table viewer. */
Create a table viewer with check box elements
createProjectsTableViewer
{ "repo_name": "kopl/SPLevo", "path": "UI/org.splevo.ui.wizard.consolidation/src/org/splevo/ui/wizard/consolidation/ProjectsSelectionWizardPage.java", "license": "epl-1.0", "size": 12176 }
[ "org.eclipse.jface.viewers.ArrayContentProvider", "org.eclipse.jface.viewers.TableViewer", "org.eclipse.swt.widgets.Composite", "org.splevo.ui.wizard.consolidation.provider.ProjectLabelProvider" ]
import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.widgets.Composite; import org.splevo.ui.wizard.consolidation.provider.ProjectLabelProvider;
import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.*; import org.splevo.ui.wizard.consolidation.provider.*;
[ "org.eclipse.jface", "org.eclipse.swt", "org.splevo.ui" ]
org.eclipse.jface; org.eclipse.swt; org.splevo.ui;
2,193,712
RequestExecutionFactory getRequestExecutionFactory();
RequestExecutionFactory getRequestExecutionFactory();
/** * Get the Factory to create Request schedules * @return the request execution factory */
Get the Factory to create Request schedules
getRequestExecutionFactory
{ "repo_name": "radicalbit/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java", "license": "apache-2.0", "size": 30426 }
[ "org.apache.ambari.server.state.scheduler.RequestExecutionFactory" ]
import org.apache.ambari.server.state.scheduler.RequestExecutionFactory;
import org.apache.ambari.server.state.scheduler.*;
[ "org.apache.ambari" ]
org.apache.ambari;
935,874
protected void initErrorReporter() { if (fXPointerErrorReporter == null) { fXPointerErrorReporter = new XMLErrorReporter(); } if (fErrorHandler == null) { fErrorHandler = new XPointerErrorHandler(); } fXPointerErrorReporter.putMessageFormatter( XPointerMessageFormatter.XPOINTER_DOMAIN, new XPointerMessageFormatter()); }
void function() { if (fXPointerErrorReporter == null) { fXPointerErrorReporter = new XMLErrorReporter(); } if (fErrorHandler == null) { fErrorHandler = new XPointerErrorHandler(); } fXPointerErrorReporter.putMessageFormatter( XPointerMessageFormatter.XPOINTER_DOMAIN, new XPointerMessageFormatter()); }
/** * Initializes error handling objects * */
Initializes error handling objects
initErrorReporter
{ "repo_name": "openjdk/jdk8u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java", "license": "gpl-2.0", "size": 46927 }
[ "com.sun.org.apache.xerces.internal.impl.XMLErrorReporter" ]
import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
import com.sun.org.apache.xerces.internal.impl.*;
[ "com.sun.org" ]
com.sun.org;
328,998
private void initialize() { random = new SecureRandom(); for (int i = 0; i < neuronCount; i++) { for (int j = 0; j < inputVectorSize; j++) { weightMatrix[i][j] = random.nextDouble(); } } }
void function() { random = new SecureRandom(); for (int i = 0; i < neuronCount; i++) { for (int j = 0; j < inputVectorSize; j++) { weightMatrix[i][j] = random.nextDouble(); } } }
/** * Initializes the neuron's weight matrix to all random doubles. */
Initializes the neuron's weight matrix to all random doubles
initialize
{ "repo_name": "gamma9mu/SOMa", "path": "src/cs437/som/network/NetworkBase.java", "license": "bsd-3-clause", "size": 10148 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
1,357,006
@Test(timeout = 2000) public void testOrderedWaitUserExceptionHandling() throws Exception { testUserExceptionHandling(AsyncDataStream.OutputMode.ORDERED); }
@Test(timeout = 2000) void function() throws Exception { testUserExceptionHandling(AsyncDataStream.OutputMode.ORDERED); }
/** * FLINK-6435 * * <p>Tests that a user exception triggers the completion of a StreamElementQueueEntry and does not wait to until * another StreamElementQueueEntry is properly completed before it is collected. */
FLINK-6435 Tests that a user exception triggers the completion of a StreamElementQueueEntry and does not wait to until another StreamElementQueueEntry is properly completed before it is collected
testOrderedWaitUserExceptionHandling
{ "repo_name": "haohui/flink", "path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/async/AsyncWaitOperatorTest.java", "license": "apache-2.0", "size": 35995 }
[ "org.apache.flink.streaming.api.datastream.AsyncDataStream", "org.junit.Test" ]
import org.apache.flink.streaming.api.datastream.AsyncDataStream; import org.junit.Test;
import org.apache.flink.streaming.api.datastream.*; import org.junit.*;
[ "org.apache.flink", "org.junit" ]
org.apache.flink; org.junit;
750,092
@Override public synchronized TestEnvironment createTestEnvironment( TestParameters Param, PrintWriter log ) throws StatusException { XAutoTextContainer oContainer = null; // creation of testobject here // first we write what we are intend to do to log file log.println("creating a AutoTextContainer"); try { XMultiServiceFactory myMSF = Param.getMSF(); Object oInst = myMSF.createInstance ("com.sun.star.text.AutoTextContainer"); oContainer = UnoRuntime.queryInterface (XAutoTextContainer.class,oInst); } catch (com.sun.star.uno.Exception e) { e.printStackTrace(log); throw new StatusException("Couldn't create AutoTextContainer", e); } TestEnvironment tEnv = new TestEnvironment(oContainer); return tEnv; }
synchronized TestEnvironment function( TestParameters Param, PrintWriter log ) throws StatusException { XAutoTextContainer oContainer = null; log.println(STR); try { XMultiServiceFactory myMSF = Param.getMSF(); Object oInst = myMSF.createInstance (STR); oContainer = UnoRuntime.queryInterface (XAutoTextContainer.class,oInst); } catch (com.sun.star.uno.Exception e) { e.printStackTrace(log); throw new StatusException(STR, e); } TestEnvironment tEnv = new TestEnvironment(oContainer); return tEnv; }
/** * Creating a Testenvironment for the interfaces to be tested. * Creates an instance of the service * <code>com.sun.star.text.AutoTextContainer</code>.<p> */
Creating a Testenvironment for the interfaces to be tested. Creates an instance of the service <code>com.sun.star.text.AutoTextContainer</code>
createTestEnvironment
{ "repo_name": "Limezero/libreoffice", "path": "qadevOOo/tests/java/mod/_sw/SwXAutoTextContainer.java", "license": "gpl-3.0", "size": 2934 }
[ "com.sun.star.lang.XMultiServiceFactory", "com.sun.star.text.XAutoTextContainer", "com.sun.star.uno.UnoRuntime", "java.io.PrintWriter" ]
import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.text.XAutoTextContainer; import com.sun.star.uno.UnoRuntime; import java.io.PrintWriter;
import com.sun.star.lang.*; import com.sun.star.text.*; import com.sun.star.uno.*; import java.io.*;
[ "com.sun.star", "java.io" ]
com.sun.star; java.io;
1,163,648
public FXOMObject getAncestor() { final FXOMObject result; if (group == null) { // Selection is emtpy result = null; } else { result = group.getAncestor(); } return result; }
FXOMObject function() { final FXOMObject result; if (group == null) { result = null; } else { result = group.getAncestor(); } return result; }
/** * Returns the common ancestor of the selected items or null if selection * is empty or root object is selected. * * @return */
Returns the common ancestor of the selected items or null if selection is empty or root object is selected
getAncestor
{ "repo_name": "teamfx/openjfx-9-dev-rt", "path": "apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/selection/Selection.java", "license": "gpl-2.0", "size": 17120 }
[ "com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject" ]
import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject;
import com.oracle.javafx.scenebuilder.kit.fxom.*;
[ "com.oracle.javafx" ]
com.oracle.javafx;
1,773,321
@Override public Ref getRef(String parameterName) throws SQLException { throw unsupported("ref"); }
Ref function(String parameterName) throws SQLException { throw unsupported("ref"); }
/** * [Not supported] Gets a column as a reference. */
[Not supported] Gets a column as a reference
getRef
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/main/org/h2/jdbc/JdbcCallableStatement.java", "license": "apache-2.0", "size": 53148 }
[ "java.sql.Ref", "java.sql.SQLException" ]
import java.sql.Ref; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,447,653
private ValueVector createResultColumnVector(TwoDEval tableArray, int colIndex) throws EvaluationException { if(colIndex >= tableArray.getWidth()) { throw EvaluationException.invalidRef(); } return LookupUtils.createColumnVector(tableArray, colIndex); }
ValueVector function(TwoDEval tableArray, int colIndex) throws EvaluationException { if(colIndex >= tableArray.getWidth()) { throw EvaluationException.invalidRef(); } return LookupUtils.createColumnVector(tableArray, colIndex); }
/** * Returns one column from an <tt>AreaEval</tt> * * @param colIndex assumed to be non-negative * * @throws EvaluationException (#REF!) if colIndex is too high */
Returns one column from an AreaEval
createResultColumnVector
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/poi/org/apache/poi/ss/formula/functions/Vlookup.java", "license": "gpl-2.0", "size": 3909 }
[ "org.apache.poi.ss.formula.TwoDEval", "org.apache.poi.ss.formula.eval.EvaluationException", "org.apache.poi.ss.formula.functions.LookupUtils" ]
import org.apache.poi.ss.formula.TwoDEval; import org.apache.poi.ss.formula.eval.EvaluationException; import org.apache.poi.ss.formula.functions.LookupUtils;
import org.apache.poi.ss.formula.*; import org.apache.poi.ss.formula.eval.*; import org.apache.poi.ss.formula.functions.*;
[ "org.apache.poi" ]
org.apache.poi;
1,834,457
@Test public void createPdfNoPAy() throws Exception { Account user2 = new Account("user2", "2", "25555555C", "London", "user2", "user2@udc.es", "666666666", "666666666", "demo", roles.ROLE_USER); accountService.save(user2); Account user3 = new Account("user3", "3", "35555555C", "London", "user3", "user3@udc.es", "666666666", "666666666", "demo", roles.ROLE_USER); user3.setInstallments(2); accountService.save(user3); Account user4 = new Account("user4", "4S", "45555555C", "London", "user4", "user4@udc.es", "666666666", "666666666", "demo", roles.ROLE_USER); accountService.save(user4); FeeMember feeMember2 = new FeeMember("pay of 2015", 2015, Double.valueOf(20), DateUtils.format("2015-04-05", DateUtils.FORMAT_DATE), DateUtils.format("2015-07-05", DateUtils.FORMAT_DATE), "pay of 2015"); feeMemberService.save(feeMember2); List<PayMember> payMembers = payMemberService.findByPayMemberIds(user2.getId(), feeMember2.getId()); payMemberService.pay(payMembers.get(0)); mockMvc.perform(post("/feeMemberList/payMemberList/" + feeMember2.getId()).locale(Locale.ENGLISH).session(defaultSession)) .andExpect(view().name("redirect:/feeMemberList/payMemberList")); mockMvc.perform(post("/feeMemberList/payMemberList/createPdf/" + feeMember.getId()).locale(Locale.ENGLISH).session(defaultSession) .param("createPdf", "NOPAY")); }
void function() throws Exception { Account user2 = new Account("user2", "2", STR, STR, "user2", STR, STR, STR, "demo", roles.ROLE_USER); accountService.save(user2); Account user3 = new Account("user3", "3", STR, STR, "user3", STR, STR, STR, "demo", roles.ROLE_USER); user3.setInstallments(2); accountService.save(user3); Account user4 = new Account("user4", "4S", STR, STR, "user4", STR, STR, STR, "demo", roles.ROLE_USER); accountService.save(user4); FeeMember feeMember2 = new FeeMember(STR, 2015, Double.valueOf(20), DateUtils.format(STR, DateUtils.FORMAT_DATE), DateUtils.format(STR, DateUtils.FORMAT_DATE), STR); feeMemberService.save(feeMember2); List<PayMember> payMembers = payMemberService.findByPayMemberIds(user2.getId(), feeMember2.getId()); payMemberService.pay(payMembers.get(0)); mockMvc.perform(post(STR + feeMember2.getId()).locale(Locale.ENGLISH).session(defaultSession)) .andExpect(view().name(STR)); mockMvc.perform(post(STR + feeMember.getId()).locale(Locale.ENGLISH).session(defaultSession) .param(STR, "NOPAY")); }
/** * Creates the pdf no pay. * * @throws Exception the exception */
Creates the pdf no pay
createPdfNoPAy
{ "repo_name": "pablogrela/members_cuacfm", "path": "src/test/java/org/cuacfm/members/test/web/paymember/PayMemberListControllerTest.java", "license": "apache-2.0", "size": 14076 }
[ "java.util.List", "java.util.Locale", "org.cuacfm.members.model.account.Account", "org.cuacfm.members.model.feemember.FeeMember", "org.cuacfm.members.model.paymember.PayMember", "org.cuacfm.members.model.util.DateUtils", "org.springframework.test.web.servlet.request.MockMvcRequestBuilders" ]
import java.util.List; import java.util.Locale; import org.cuacfm.members.model.account.Account; import org.cuacfm.members.model.feemember.FeeMember; import org.cuacfm.members.model.paymember.PayMember; import org.cuacfm.members.model.util.DateUtils; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import java.util.*; import org.cuacfm.members.model.account.*; import org.cuacfm.members.model.feemember.*; import org.cuacfm.members.model.paymember.*; import org.cuacfm.members.model.util.*; import org.springframework.test.web.servlet.request.*;
[ "java.util", "org.cuacfm.members", "org.springframework.test" ]
java.util; org.cuacfm.members; org.springframework.test;
604,531
public boolean isEmpty() { return (mLayout == R.layout.file_details_empty || getFile() == null || mAccount == null); } /** * Use this method to signal this Activity that it shall update its view. * * @param file : An {@link OCFile}
boolean function() { return (mLayout == R.layout.file_details_empty getFile() == null mAccount == null); } /** * Use this method to signal this Activity that it shall update its view. * * @param file : An {@link OCFile}
/** * Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced. * * @return True when the fragment was created with the empty layout. */
Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced
isEmpty
{ "repo_name": "noyo/android", "path": "src/com/owncloud/android/ui/fragment/FileDetailFragment.java", "license": "gpl-2.0", "size": 20019 }
[ "com.owncloud.android.datamodel.OCFile" ]
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.*;
[ "com.owncloud.android" ]
com.owncloud.android;
658,089
public UninstallationResult calculateUninstallChanges(Set<AddOn> selectedAddOns) { List<AddOn> remainingAddOns = new ArrayList<>(installedAddOns.getAddOns()); remainingAddOns.removeAll(selectedAddOns); Set<AddOn> uninstallations = new HashSet<>(); List<AddOn> addOnsToCheck = new ArrayList<>(remainingAddOns); while (!addOnsToCheck.isEmpty()) { AddOn addOn = addOnsToCheck.remove(0); AddOn.AddOnRunRequirements requirements = addOn.calculateRunRequirements(remainingAddOns); if (!requirements.hasDependencyIssue()) { addOnsToCheck.removeAll(requirements.getDependencies()); } else if (AddOn.InstallationStatus.UNINSTALLATION_FAILED != addOn.getInstallationStatus()) { uninstallations.add(addOn); } } for (Iterator<AddOn> it = uninstallations.iterator(); it.hasNext();) { AddOn addOn = it.next(); if (addOn.calculateRunRequirements(installedAddOns.getAddOns()).hasDependencyIssue() && !containsAny(addOn.getIdsAddOnDependencies(), uninstallations)) { it.remove(); } } remainingAddOns.removeAll(uninstallations); Set<Extension> extensions = new HashSet<>(); for (AddOn addOn : remainingAddOns) { if (addOn.hasExtensionsWithDeps()) { for (Extension ext : addOn.getLoadedExtensions()) { AddOn.AddOnRunRequirements requirements = addOn.calculateExtensionRunRequirements(ext, remainingAddOns); if (!requirements.getExtensionRequirements().isEmpty()) { AddOn.ExtensionRunRequirements extReqs = requirements.getExtensionRequirements().get(0); if (!extReqs.isRunnable()) { extensions.add(ext); } } } } } uninstallations.addAll(selectedAddOns); return new UninstallationResult(selectedAddOns, uninstallations, extensions); }
UninstallationResult function(Set<AddOn> selectedAddOns) { List<AddOn> remainingAddOns = new ArrayList<>(installedAddOns.getAddOns()); remainingAddOns.removeAll(selectedAddOns); Set<AddOn> uninstallations = new HashSet<>(); List<AddOn> addOnsToCheck = new ArrayList<>(remainingAddOns); while (!addOnsToCheck.isEmpty()) { AddOn addOn = addOnsToCheck.remove(0); AddOn.AddOnRunRequirements requirements = addOn.calculateRunRequirements(remainingAddOns); if (!requirements.hasDependencyIssue()) { addOnsToCheck.removeAll(requirements.getDependencies()); } else if (AddOn.InstallationStatus.UNINSTALLATION_FAILED != addOn.getInstallationStatus()) { uninstallations.add(addOn); } } for (Iterator<AddOn> it = uninstallations.iterator(); it.hasNext();) { AddOn addOn = it.next(); if (addOn.calculateRunRequirements(installedAddOns.getAddOns()).hasDependencyIssue() && !containsAny(addOn.getIdsAddOnDependencies(), uninstallations)) { it.remove(); } } remainingAddOns.removeAll(uninstallations); Set<Extension> extensions = new HashSet<>(); for (AddOn addOn : remainingAddOns) { if (addOn.hasExtensionsWithDeps()) { for (Extension ext : addOn.getLoadedExtensions()) { AddOn.AddOnRunRequirements requirements = addOn.calculateExtensionRunRequirements(ext, remainingAddOns); if (!requirements.getExtensionRequirements().isEmpty()) { AddOn.ExtensionRunRequirements extReqs = requirements.getExtensionRequirements().get(0); if (!extReqs.isRunnable()) { extensions.add(ext); } } } } } uninstallations.addAll(selectedAddOns); return new UninstallationResult(selectedAddOns, uninstallations, extensions); }
/** * Calculates the changes required to uninstall the given add-ons. * <p> * It might require uninstalling other add-ons depending on the dependencies of the affected add-ons. * * @param selectedAddOns the add-ons that would be uninstalled * @return the resulting changes with the add-ons that need to be uninstalled */
Calculates the changes required to uninstall the given add-ons. It might require uninstalling other add-ons depending on the dependencies of the affected add-ons
calculateUninstallChanges
{ "repo_name": "JordanGS/zaproxy", "path": "src/org/zaproxy/zap/extension/autoupdate/AddOnDependencyChecker.java", "license": "apache-2.0", "size": 40883 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Set", "org.parosproxy.paros.extension.Extension", "org.zaproxy.zap.control.AddOn" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.parosproxy.paros.extension.Extension; import org.zaproxy.zap.control.AddOn;
import java.util.*; import org.parosproxy.paros.extension.*; import org.zaproxy.zap.control.*;
[ "java.util", "org.parosproxy.paros", "org.zaproxy.zap" ]
java.util; org.parosproxy.paros; org.zaproxy.zap;
1,321,876
private static void generateFileList(final File node, final List<File> fileList){ //add file only if(node.isFile()){ fileList.add(node); } if(node.isDirectory()){ final String[] subNote = node.list(); for(final String filename : subNote){ generateFileList(new File(node, filename),fileList); } } }
static void function(final File node, final List<File> fileList){ if(node.isFile()){ fileList.add(node); } if(node.isDirectory()){ final String[] subNote = node.list(); for(final String filename : subNote){ generateFileList(new File(node, filename),fileList); } } }
/** * Traverse a directory and get all files, * and add the file into fileList * @param node file or directory */
Traverse a directory and get all files, and add the file into fileList
generateFileList
{ "repo_name": "IHTSDO/release-validation-framework", "path": "validation-service/src/main/java/org/ihtsdo/rvf/util/ZipFileUtils.java", "license": "apache-2.0", "size": 6566 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,555,367
private void activatePush1PadSettings (final ISettingsUI settingsUI) { this.velocityCurveSetting = settingsUI.getEnumSetting ("Velocity Curve", CATEGORY_PADS, PushControlSurface.PUSH_PAD_CURVES_NAME, PushControlSurface.PUSH_PAD_CURVES_NAME.get (1)); this.velocityCurveSetting.addValueObserver (value -> { this.velocityCurve = lookupIndex (PushControlSurface.PUSH_PAD_CURVES_NAME, value); this.notifyObservers (VELOCITY_CURVE); }); this.padThresholdSetting = settingsUI.getEnumSetting ("Pad Threshold", CATEGORY_PADS, PushControlSurface.PUSH_PAD_THRESHOLDS_NAME, PushControlSurface.PUSH_PAD_THRESHOLDS_NAME.get (20)); this.padThresholdSetting.addValueObserver (value -> { this.padThreshold = lookupIndex (PushControlSurface.PUSH_PAD_THRESHOLDS_NAME, value); this.notifyObservers (PAD_THRESHOLD); }); }
void function (final ISettingsUI settingsUI) { this.velocityCurveSetting = settingsUI.getEnumSetting (STR, CATEGORY_PADS, PushControlSurface.PUSH_PAD_CURVES_NAME, PushControlSurface.PUSH_PAD_CURVES_NAME.get (1)); this.velocityCurveSetting.addValueObserver (value -> { this.velocityCurve = lookupIndex (PushControlSurface.PUSH_PAD_CURVES_NAME, value); this.notifyObservers (VELOCITY_CURVE); }); this.padThresholdSetting = settingsUI.getEnumSetting (STR, CATEGORY_PADS, PushControlSurface.PUSH_PAD_THRESHOLDS_NAME, PushControlSurface.PUSH_PAD_THRESHOLDS_NAME.get (20)); this.padThresholdSetting.addValueObserver (value -> { this.padThreshold = lookupIndex (PushControlSurface.PUSH_PAD_THRESHOLDS_NAME, value); this.notifyObservers (PAD_THRESHOLD); }); }
/** * Activate the Push 1 pad settings. * * @param settingsUI The settings */
Activate the Push 1 pad settings
activatePush1PadSettings
{ "repo_name": "git-moss/DrivenByMoss", "path": "src/main/java/de/mossgrabers/controller/ableton/push/PushConfiguration.java", "license": "lgpl-3.0", "size": 44599 }
[ "de.mossgrabers.controller.ableton.push.controller.PushControlSurface", "de.mossgrabers.framework.configuration.ISettingsUI" ]
import de.mossgrabers.controller.ableton.push.controller.PushControlSurface; import de.mossgrabers.framework.configuration.ISettingsUI;
import de.mossgrabers.controller.ableton.push.controller.*; import de.mossgrabers.framework.configuration.*;
[ "de.mossgrabers.controller", "de.mossgrabers.framework" ]
de.mossgrabers.controller; de.mossgrabers.framework;
713,399
public static Map parse(final InputStream xmlStream) throws JDOMException, IOException { InputStreamReader isr = null; try { isr = new InputStreamReader(xmlStream); return parse(isr, null); } finally { if (isr != null) { isr.close(); } } }
static Map function(final InputStream xmlStream) throws JDOMException, IOException { InputStreamReader isr = null; try { isr = new InputStreamReader(xmlStream); return parse(isr, null); } finally { if (isr != null) { isr.close(); } } }
/** * Method based on InputStream. Reads the XMLDocument for a PZMetaData * file from an InputStream, WebStart combatible. Parses the XML file, and * returns a Map containing Lists of ColumnMetaData. * * @param xmlStream * @return Map <records> with their corrisponding * @throws IOException * @throws JDOMException * @deprecated please use parse(Reader) */
Method based on InputStream. Reads the XMLDocument for a PZMetaData file from an InputStream, WebStart combatible. Parses the XML file, and returns a Map containing Lists of ColumnMetaData
parse
{ "repo_name": "olibye/flatpack", "path": "flatpack/src/main/java/net/sf/flatpack/xml/MapParser.java", "license": "apache-2.0", "size": 12647 }
[ "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.util.Map", "org.jdom.JDOMException" ]
import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Map; import org.jdom.JDOMException;
import java.io.*; import java.util.*; import org.jdom.*;
[ "java.io", "java.util", "org.jdom" ]
java.io; java.util; org.jdom;
2,338,769
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<TableInner> list(String resourceGroupName, String accountName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<TableInner> function(String resourceGroupName, String accountName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, accountName, context)); }
/** * Gets a list of all the tables under the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage account within the specified resource group. Storage account names * must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all the tables under the specified storage account as paginated response with {@link * PagedIterable}. */
Gets a list of all the tables under the specified storage account
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/TablesClientImpl.java", "license": "mit", "size": 61429 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.storage.fluent.models.TableInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.storage.fluent.models.TableInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,058,028
public static Channel intercept(Channel channel, List<ClientInterceptor> interceptors) { Preconditions.checkNotNull(channel); if (interceptors.isEmpty()) { return channel; } return new InterceptorChannel(channel, interceptors); } private static class InterceptorChannel extends Channel { private final Channel channel; private final Iterable<ClientInterceptor> interceptors; private InterceptorChannel(Channel channel, List<ClientInterceptor> interceptors) { this.channel = channel; this.interceptors = ImmutableList.copyOf(interceptors); }
static Channel function(Channel channel, List<ClientInterceptor> interceptors) { Preconditions.checkNotNull(channel); if (interceptors.isEmpty()) { return channel; } return new InterceptorChannel(channel, interceptors); } static class InterceptorChannel extends Channel { private final Channel channel; private final Iterable<ClientInterceptor> functionors; InterceptorChannel(Channel channel, List<ClientInterceptor> functionors) { this.channel = channel; this.interceptors = ImmutableList.copyOf(interceptors); }
/** * Create a new {@link Channel} that will call {@code interceptors} before starting a call on the * given channel. * * @param channel the underlying channel to intercept. * @param interceptors a list of interceptors to bind to {@code channel}. * @return a new channel instance with the interceptors applied. */
Create a new <code>Channel</code> that will call interceptors before starting a call on the given channel
intercept
{ "repo_name": "jcanizales/grpc-java", "path": "core/src/main/java/io/grpc/ClientInterceptors.java", "license": "bsd-3-clause", "size": 8174 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableList", "java.util.List" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import java.util.List;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,894,508
private void cancelar() { accion = Accion.CANCELAR; setVisible(false); }
void function() { accion = Accion.CANCELAR; setVisible(false); }
/** * Invocado cuando el usuario cancela. Simplemente cierra la ventana */
Invocado cuando el usuario cancela. Simplemente cierra la ventana
cancelar
{ "repo_name": "sfaci/java-hibernate", "path": "Cine v2/Cine/src/org/sfsoft/cine/gui/JActor.java", "license": "gpl-2.0", "size": 4152 }
[ "org.sfsoft.hibernate.util.Util" ]
import org.sfsoft.hibernate.util.Util;
import org.sfsoft.hibernate.util.*;
[ "org.sfsoft.hibernate" ]
org.sfsoft.hibernate;
900,311
T read(ByteBuf buffer) throws Exception;
T read(ByteBuf buffer) throws Exception;
/** * Read a value from a ByteBuf * * @param buffer The buffer to read from. * @return The type based on the class type. * @throws Exception Throws exception if it failed reading. */
Read a value from a ByteBuf
read
{ "repo_name": "Matsv/ViaVersion", "path": "common/src/main/java/us/myles/ViaVersion/api/type/ByteBufReader.java", "license": "mit", "size": 372 }
[ "io.netty.buffer.ByteBuf" ]
import io.netty.buffer.ByteBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
1,079,299
protected void onRequestComplete() throws IOException { }
void function() throws IOException { }
/** * Callback called when the request and its body have been sent to the server. This implementation does nothing. * * @throws IOException * allowed to be thrown by overriding code */
Callback called when the request and its body have been sent to the server. This implementation does nothing
onRequestComplete
{ "repo_name": "thomasbecker/jetty-7", "path": "jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java", "license": "apache-2.0", "size": 38272 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,262,276
private static KeyValue trivialCompact(final ArrayList<KeyValue> row, final int qual_len, final int val_len) { // Now let's simply concatenate all the qualifiers and values together. final byte[] qualifier = new byte[qual_len]; final byte[] value = new byte[val_len]; // Now populate the arrays by copying qualifiers/values over. int qual_idx = 0; int val_idx = 0; for (final KeyValue kv : row) { final byte[] q = kv.qualifier(); // We shouldn't get into this function if this isn't true. assert q.length == 2: "Qualifier length must be 2: " + kv; final byte[] v = fixFloatingPointValue(q[1], kv.value()); qualifier[qual_idx++] = q[0]; qualifier[qual_idx++] = fixQualifierFlags(q[1], v.length); System.arraycopy(v, 0, value, val_idx, v.length); val_idx += v.length; } // Right now we leave the last byte all zeros, this last byte will be // used in the future to introduce more formats/encodings. final KeyValue first = row.get(0); return new KeyValue(first.key(), first.family(), qualifier, value); }
static KeyValue function(final ArrayList<KeyValue> row, final int qual_len, final int val_len) { final byte[] qualifier = new byte[qual_len]; final byte[] value = new byte[val_len]; int qual_idx = 0; int val_idx = 0; for (final KeyValue kv : row) { final byte[] q = kv.qualifier(); assert q.length == 2: STR + kv; final byte[] v = fixFloatingPointValue(q[1], kv.value()); qualifier[qual_idx++] = q[0]; qualifier[qual_idx++] = fixQualifierFlags(q[1], v.length); System.arraycopy(v, 0, value, val_idx, v.length); val_idx += v.length; } final KeyValue first = row.get(0); return new KeyValue(first.key(), first.family(), qualifier, value); }
/** * Performs a trivial compaction of a row. * <p> * This method is to be used only when all the cells in the given row * are individual data points (nothing has been compacted yet). If any of * the cells have already been compacted, the caller is expected to call * {@link #complexCompact} instead. * @param row The row to compact. Assumed to have 2 elements or more. * @param qual_len Exact number of bytes to hold the compacted qualifiers. * @param val_len Exact number of bytes to hold the compacted values. * @return a {@link KeyValue} containing the result of the merge of all the * {@code KeyValue}s given in argument. */
Performs a trivial compaction of a row. This method is to be used only when all the cells in the given row are individual data points (nothing has been compacted yet). If any of the cells have already been compacted, the caller is expected to call <code>#complexCompact</code> instead
trivialCompact
{ "repo_name": "tsuna/opentsdb", "path": "src/core/CompactionQueue.java", "license": "gpl-3.0", "size": 41458 }
[ "java.util.ArrayList", "org.hbase.async.KeyValue" ]
import java.util.ArrayList; import org.hbase.async.KeyValue;
import java.util.*; import org.hbase.async.*;
[ "java.util", "org.hbase.async" ]
java.util; org.hbase.async;
1,620,468
public UserCustomResultSet queryForChunk(GeometryEnvelope envelope, String orderBy, int limit) { return queryForChunk(false, envelope, orderBy, limit); }
UserCustomResultSet function(GeometryEnvelope envelope, String orderBy, int limit) { return queryForChunk(false, envelope, orderBy, limit); }
/** * Query for rows within the geometry envelope, starting at the offset and * returning no more than the limit * * @param envelope * geometry envelope * @param orderBy * order by * @param limit * chunk limit * @return results * @since 6.2.0 */
Query for rows within the geometry envelope, starting at the offset and returning no more than the limit
queryForChunk
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "mil.nga.geopackage.user.custom.UserCustomResultSet", "mil.nga.sf.GeometryEnvelope" ]
import mil.nga.geopackage.user.custom.UserCustomResultSet; import mil.nga.sf.GeometryEnvelope;
import mil.nga.geopackage.user.custom.*; import mil.nga.sf.*;
[ "mil.nga.geopackage", "mil.nga.sf" ]
mil.nga.geopackage; mil.nga.sf;
1,962,634
public static String getAvatar(User user, String avatarSize) { return UserAvatarResolver.resolve(user, avatarSize); } /** * @deprecated as of 1.451 * Use {@link #getAvatar}
static String function(User user, String avatarSize) { return UserAvatarResolver.resolve(user, avatarSize); } /** * @deprecated as of 1.451 * Use {@link #getAvatar}
/** * Returns an avatar image URL for the specified user and preferred image size * @param user the user * @param avatarSize the preferred size of the avatar image * @return a URL string * @since 1.433 */
Returns an avatar image URL for the specified user and preferred image size
getAvatar
{ "repo_name": "yannrouillard/pkg-jenkins", "path": "core/src/main/java/hudson/Functions.java", "license": "mit", "size": 67115 }
[ "hudson.model.User", "hudson.tasks.UserAvatarResolver" ]
import hudson.model.User; import hudson.tasks.UserAvatarResolver;
import hudson.model.*; import hudson.tasks.*;
[ "hudson.model", "hudson.tasks" ]
hudson.model; hudson.tasks;
1,116,281
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux<ManagedInstanceLongTermRetentionBackupInner> listByResourceGroupLocationAsync( String resourceGroupName, String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( () -> listByResourceGroupLocationSinglePageAsync( resourceGroupName, locationName, onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ManagedInstanceLongTermRetentionBackupInner> function( String resourceGroupName, String locationName) { final Boolean onlyLatestPerDatabase = null; final DatabaseState databaseState = null; return new PagedFlux<>( () -> listByResourceGroupLocationSinglePageAsync( resourceGroupName, locationName, onlyLatestPerDatabase, databaseState), nextLink -> listByResourceGroupLocationNextSinglePageAsync(nextLink)); }
/** * Lists the long term retention backups for managed databases in a given location. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param locationName The location of the database. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of long term retention backups for managed database(s). */
Lists the long term retention backups for managed databases in a given location
listByResourceGroupLocationAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/LongTermRetentionManagedInstanceBackupsClientImpl.java", "license": "mit", "size": 162168 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInner", "com.azure.resourcemanager.sql.models.DatabaseState" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.sql.fluent.models.ManagedInstanceLongTermRetentionBackupInner; import com.azure.resourcemanager.sql.models.DatabaseState;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.sql.fluent.models.*; import com.azure.resourcemanager.sql.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,812,921
public WebView getWebView() { return mIsWebViewAvailable ? mWebView : null; }
WebView function() { return mIsWebViewAvailable ? mWebView : null; }
/** * Gets the WebView. */
Gets the WebView
getWebView
{ "repo_name": "flibbertigibbet/SEPTA-Android", "path": "app/src/main/java/org/septa/android/app/utilities/WebViewFragment.java", "license": "gpl-3.0", "size": 4358 }
[ "android.webkit.WebView" ]
import android.webkit.WebView;
import android.webkit.*;
[ "android.webkit" ]
android.webkit;
1,613,731
private JSONObject readJSONObjFromWire(SocketChannel sc, String remoteAddressForErrorMsg) throws IOException, JSONException { // length prefix ByteBuffer lengthBuffer = ByteBuffer.allocate(4); while (lengthBuffer.remaining() > 0) { int read = sc.read(lengthBuffer); if (read == -1) { throw new EOFException(remoteAddressForErrorMsg); } } lengthBuffer.flip(); int length = lengthBuffer.getInt(); // don't allow for a crazy unallocatable json payload if (length > 16 * 1024) { throw new IOException( "Length prefix on wire for expected JSON string is greater than 16K max."); } if (length < 2) { throw new IOException( "Length prefix on wire for expected JSON string is less than minimum document size of 2."); } // content ByteBuffer messageBytes = ByteBuffer.allocate(length); while (messageBytes.hasRemaining()) { int read = sc.read(messageBytes); if (read == -1) { throw new EOFException(remoteAddressForErrorMsg); } } messageBytes.flip(); JSONObject jsObj = new JSONObject(new String(messageBytes.array(), Constants.UTF8ENCODING)); return jsObj; }
JSONObject function(SocketChannel sc, String remoteAddressForErrorMsg) throws IOException, JSONException { ByteBuffer lengthBuffer = ByteBuffer.allocate(4); while (lengthBuffer.remaining() > 0) { int read = sc.read(lengthBuffer); if (read == -1) { throw new EOFException(remoteAddressForErrorMsg); } } lengthBuffer.flip(); int length = lengthBuffer.getInt(); if (length > 16 * 1024) { throw new IOException( STR); } if (length < 2) { throw new IOException( STR); } ByteBuffer messageBytes = ByteBuffer.allocate(length); while (messageBytes.hasRemaining()) { int read = sc.read(messageBytes); if (read == -1) { throw new EOFException(remoteAddressForErrorMsg); } } messageBytes.flip(); JSONObject jsObj = new JSONObject(new String(messageBytes.array(), Constants.UTF8ENCODING)); return jsObj; }
/** * Read a length prefixed JSON message */
Read a length prefixed JSON message
readJSONObjFromWire
{ "repo_name": "zheguang/voltdb", "path": "src/frontend/org/voltcore/messaging/SocketJoiner.java", "license": "agpl-3.0", "size": 29770 }
[ "java.io.EOFException", "java.io.IOException", "java.nio.ByteBuffer", "java.nio.channels.SocketChannel", "org.json_voltpatches.JSONException", "org.json_voltpatches.JSONObject", "org.voltdb.common.Constants" ]
import java.io.EOFException; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.SocketChannel; import org.json_voltpatches.JSONException; import org.json_voltpatches.JSONObject; import org.voltdb.common.Constants;
import java.io.*; import java.nio.*; import java.nio.channels.*; import org.json_voltpatches.*; import org.voltdb.common.*;
[ "java.io", "java.nio", "org.json_voltpatches", "org.voltdb.common" ]
java.io; java.nio; org.json_voltpatches; org.voltdb.common;
423,618
protected Map<String, Set<String>> decomposePropertyPaths(Set<String> changedPropertyPaths) { return decomposePropertyPaths(changedPropertyPaths, ""); }
Map<String, Set<String>> function(Set<String> changedPropertyPaths) { return decomposePropertyPaths(changedPropertyPaths, ""); }
/** * Returns decomposed property paths based on changedPropertyPaths * * @param changedPropertyPaths changes to property paths * @return map decomposed property paths with changedPropertyPaths */
Returns decomposed property paths based on changedPropertyPaths
decomposePropertyPaths
{ "repo_name": "bhutchinson/rice", "path": "rice-framework/krad-data/src/main/java/org/kuali/rice/krad/data/util/ReferenceLinker.java", "license": "apache-2.0", "size": 21807 }
[ "java.util.Map", "java.util.Set" ]
import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,637,743
public Description getDescription(Long id) throws Exception;
Description function(Long id) throws Exception;
/** * Returns the description. * * @param id the id * @return the description * @throws Exception the exception */
Returns the description
getDescription
{ "repo_name": "WestCoastInformatics/ihtsdo-refset-tool", "path": "services/src/main/java/org/ihtsdo/otf/refset/services/handlers/TerminologyHandler.java", "license": "apache-2.0", "size": 9993 }
[ "org.ihtsdo.otf.refset.rf2.Description" ]
import org.ihtsdo.otf.refset.rf2.Description;
import org.ihtsdo.otf.refset.rf2.*;
[ "org.ihtsdo.otf" ]
org.ihtsdo.otf;
2,662,528
default Value<DyeColor> baseColor() { return getValue(Keys.BANNER_BASE_COLOR).get(); }
default Value<DyeColor> baseColor() { return getValue(Keys.BANNER_BASE_COLOR).get(); }
/** * Gets the {@link Value} for the base {@link DyeColor}. * * @return The value for the base color */
Gets the <code>Value</code> for the base <code>DyeColor</code>
baseColor
{ "repo_name": "JBYoshi/SpongeAPI", "path": "src/main/java/org/spongepowered/api/block/tileentity/Banner.java", "license": "mit", "size": 2412 }
[ "org.spongepowered.api.data.key.Keys", "org.spongepowered.api.data.type.DyeColor", "org.spongepowered.api.data.value.mutable.Value" ]
import org.spongepowered.api.data.key.Keys; import org.spongepowered.api.data.type.DyeColor; import org.spongepowered.api.data.value.mutable.Value;
import org.spongepowered.api.data.key.*; import org.spongepowered.api.data.type.*; import org.spongepowered.api.data.value.mutable.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,508,207
@SmallTest @Feature({"AndroidWebView"}) public void testSocksExplicitPort() throws Exception { System.setProperty("socksProxyHost", "socksproxy.com"); System.setProperty("socksProxyPort", "9000"); checkMapping("http://example.com/", "SOCKS5 socksproxy.com:9000"); }
@Feature({STR}) void function() throws Exception { System.setProperty(STR, STR); System.setProperty(STR, "9000"); checkMapping("http: }
/** * SOCKS proxy port is used if specified * * @throws Exception */
SOCKS proxy port is used if specified
testSocksExplicitPort
{ "repo_name": "plxaye/chromium", "path": "src/net/android/javatests/src/org/chromium/net/AndroidProxySelectorTest.java", "license": "apache-2.0", "size": 10218 }
[ "org.chromium.base.test.util.Feature" ]
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.*;
[ "org.chromium.base" ]
org.chromium.base;
397,531
// NOTE: This method may be called by privileged threads. // This functionality is implemented in a package-private method // to insure that it cannot be overridden by client subclasses. // DO NOT INVOKE CLIENT CODE ON THIS THREAD! void flushText() { String flush = (committedText != null ? committedText : ""); if (composedText != null) { flush += composedText.toString(); } if (!flush.equals("")) { AttributedString attrstr = new AttributedString(flush); postInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, attrstr.getIterator(), flush.length(), null, null, EventQueue.getMostRecentEventTime()); composedText = null; committedText = null; } }
void flushText() { String flush = (committedText != null ? committedText : STR")) { AttributedString attrstr = new AttributedString(flush); postInputMethodEvent(InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, attrstr.getIterator(), flush.length(), null, null, EventQueue.getMostRecentEventTime()); composedText = null; committedText = null; } }
/** * Flushes composed and committed text held in this context. * This method is invoked in the AWT Toolkit (X event loop) thread context * and thus inside the AWT Lock. */
Flushes composed and committed text held in this context. This method is invoked in the AWT Toolkit (X event loop) thread context and thus inside the AWT Lock
flushText
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/solaris/classes/sun/awt/X11InputMethod.java", "license": "mit", "size": 40313 }
[ "java.awt.EventQueue", "java.awt.event.InputMethodEvent", "java.text.AttributedString" ]
import java.awt.EventQueue; import java.awt.event.InputMethodEvent; import java.text.AttributedString;
import java.awt.*; import java.awt.event.*; import java.text.*;
[ "java.awt", "java.text" ]
java.awt; java.text;
2,884,817
@Test public void testSecondaryFailsWithErrorBeforeSettingHeaders() throws IOException { Mockito.doThrow(new Error("If this exception is not caught by the " + "name-node, fs image will be truncated.")) .when(faultInjector).beforeGetImageSetsHeaders(); doSecondaryFailsToReturnImage(); }
void function() throws IOException { Mockito.doThrow(new Error(STR + STR)) .when(faultInjector).beforeGetImageSetsHeaders(); doSecondaryFailsToReturnImage(); }
/** * Simulate a secondary node failure to transfer image. Uses an unchecked * error and fail transfer before even setting the length header. This used to * cause image truncation. Regression test for HDFS-3330. */
Simulate a secondary node failure to transfer image. Uses an unchecked error and fail transfer before even setting the length header. This used to cause image truncation. Regression test for HDFS-3330
testSecondaryFailsWithErrorBeforeSettingHeaders
{ "repo_name": "samuelan/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java", "license": "apache-2.0", "size": 88157 }
[ "java.io.IOException", "org.mockito.Mockito" ]
import java.io.IOException; import org.mockito.Mockito;
import java.io.*; import org.mockito.*;
[ "java.io", "org.mockito" ]
java.io; org.mockito;
2,549,643
int checkBucket (String bucketName) throws BucketException, CDNException;
int checkBucket (String bucketName) throws BucketException, CDNException;
/** * check bucket info * * @param bucketName * bucket name * * @throws BucketException * bucket exception * @throws CDNException * cdn exception */
check bucket info
checkBucket
{ "repo_name": "CiNC0/Cartier", "path": "cartier-cdn/src/main/java/xyz/vopen/cartier/cdn/CDNHandler.java", "license": "apache-2.0", "size": 5178 }
[ "xyz.vopen.cartier.cdn.exception.BucketException", "xyz.vopen.cartier.cdn.exception.CDNException" ]
import xyz.vopen.cartier.cdn.exception.BucketException; import xyz.vopen.cartier.cdn.exception.CDNException;
import xyz.vopen.cartier.cdn.exception.*;
[ "xyz.vopen.cartier" ]
xyz.vopen.cartier;
620,031
public static void verifySyncIsDisabled(Context context, Account account) { Assert.assertTrue("Expected sync to be disabled.", isSyncOff()); verifySignedInWithAccount(context, account); }
static void function(Context context, Account account) { Assert.assertTrue(STR, isSyncOff()); verifySignedInWithAccount(context, account); }
/** * Verifies that the sync is off but signed in with the account. */
Verifies that the sync is off but signed in with the account
verifySyncIsDisabled
{ "repo_name": "axinging/chromium-crosswalk", "path": "chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/sync/SyncTestUtil.java", "license": "bsd-3-clause", "size": 10247 }
[ "android.accounts.Account", "android.content.Context", "junit.framework.Assert" ]
import android.accounts.Account; import android.content.Context; import junit.framework.Assert;
import android.accounts.*; import android.content.*; import junit.framework.*;
[ "android.accounts", "android.content", "junit.framework" ]
android.accounts; android.content; junit.framework;
1,019,829
private void startNonECOCProcess(ExampleSet originalExampleSet, int classificationStrategy) throws OperatorException { ExampleSet exampleSet = (ExampleSet) originalExampleSet.clone(); int numberOfClasses = getLabel().getMapping().getValues().size(); // Hash maps are used for addressing particular class values using // indices without relying // upon a consistent index distribution of the corresponding // substructure. int currentNumber = 0; HashMap<Integer, Integer> classIndexMap = new HashMap<Integer, Integer>(numberOfClasses); for (String currentClass : getLabel().getMapping().getValues()) { classIndexMap.put(currentNumber, getLabel().getMapping().mapString(currentClass)); currentNumber++; } double[][] confidenceMatrix = new double[exampleSet.size()][getNumberOfModels()]; // 1. Iterate over all models and all examples for every model to // receive all confidence // values. for (int k = 0; k < confidenceMatrix[0].length; k++) { Model model = getModel(k); exampleSet = model.apply(exampleSet); Iterator<Example> reader = exampleSet.iterator(); int counter = 0; while (reader.hasNext()) { Example example = reader.next(); if (classificationStrategy == ONE_AGAINST_ONE) { for (String className : exampleSet.getAttributes().getPredictedLabel().getMapping().getValues()) { confidenceMatrix[counter][getLabel().getMapping().mapString(className)] += example .getConfidence(className); } } else { Integer index = classIndexMap.get(k); confidenceMatrix[counter][k] = example.getConfidence(getLabel().getMapping().mapIndex(index)); } counter++; } PredictionModel.removePredictedLabel(exampleSet); } Iterator<Example> reader = originalExampleSet.iterator(); int counter = 0; OperatorProgress progress = null; if (getShowProgress() && getOperator() != null && getOperator().getProgress() != null) { progress = getOperator().getProgress(); progress.setTotal(originalExampleSet.size()); } // 2. Iterate again over all examples to compute a prediction and a // confidence distribution // for // all examples depending on the results of step 1. while (reader.hasNext()) { Example example = reader.next(); double confidenceSum = 0.0, currentConfidence = 0.0, bestConfidence = Double.NEGATIVE_INFINITY; int bestIndex = -1; for (int i = 0; i < confidenceMatrix[counter].length; i++) { currentConfidence = confidenceMatrix[counter][i]; if (currentConfidence > bestConfidence) { bestConfidence = currentConfidence; bestIndex = i; } confidenceSum += currentConfidence; } example.setPredictedLabel(classIndexMap.get(bestIndex)); for (int i = 0; i < numberOfClasses; i++) { example.setConfidence(getLabel().getMapping().mapIndex(classIndexMap.get(i)), confidenceMatrix[counter][i] / confidenceSum); } counter++; if (progress != null && counter % OPERATOR_PROGRESS_STEPS == 0) { progress.setCompleted(counter); } } }
void function(ExampleSet originalExampleSet, int classificationStrategy) throws OperatorException { ExampleSet exampleSet = (ExampleSet) originalExampleSet.clone(); int numberOfClasses = getLabel().getMapping().getValues().size(); int currentNumber = 0; HashMap<Integer, Integer> classIndexMap = new HashMap<Integer, Integer>(numberOfClasses); for (String currentClass : getLabel().getMapping().getValues()) { classIndexMap.put(currentNumber, getLabel().getMapping().mapString(currentClass)); currentNumber++; } double[][] confidenceMatrix = new double[exampleSet.size()][getNumberOfModels()]; for (int k = 0; k < confidenceMatrix[0].length; k++) { Model model = getModel(k); exampleSet = model.apply(exampleSet); Iterator<Example> reader = exampleSet.iterator(); int counter = 0; while (reader.hasNext()) { Example example = reader.next(); if (classificationStrategy == ONE_AGAINST_ONE) { for (String className : exampleSet.getAttributes().getPredictedLabel().getMapping().getValues()) { confidenceMatrix[counter][getLabel().getMapping().mapString(className)] += example .getConfidence(className); } } else { Integer index = classIndexMap.get(k); confidenceMatrix[counter][k] = example.getConfidence(getLabel().getMapping().mapIndex(index)); } counter++; } PredictionModel.removePredictedLabel(exampleSet); } Iterator<Example> reader = originalExampleSet.iterator(); int counter = 0; OperatorProgress progress = null; if (getShowProgress() && getOperator() != null && getOperator().getProgress() != null) { progress = getOperator().getProgress(); progress.setTotal(originalExampleSet.size()); } while (reader.hasNext()) { Example example = reader.next(); double confidenceSum = 0.0, currentConfidence = 0.0, bestConfidence = Double.NEGATIVE_INFINITY; int bestIndex = -1; for (int i = 0; i < confidenceMatrix[counter].length; i++) { currentConfidence = confidenceMatrix[counter][i]; if (currentConfidence > bestConfidence) { bestConfidence = currentConfidence; bestIndex = i; } confidenceSum += currentConfidence; } example.setPredictedLabel(classIndexMap.get(bestIndex)); for (int i = 0; i < numberOfClasses; i++) { example.setConfidence(getLabel().getMapping().mapIndex(classIndexMap.get(i)), confidenceMatrix[counter][i] / confidenceSum); } counter++; if (progress != null && counter % OPERATOR_PROGRESS_STEPS == 0) { progress.setCompleted(counter); } } }
/** * This method applies the models and evaluates the results of a multi class classification * process according to a classification strategy that does not use error-correcting output * codes. (currently supported: "1 against all", "1 against 1") * * @param originalExampleSet * @param classificationStrategy * @throws OperatorException */
This method applies the models and evaluates the results of a multi class classification process according to a classification strategy that does not use error-correcting output codes. (currently supported: "1 against all", "1 against 1")
startNonECOCProcess
{ "repo_name": "boob-sbcm/3838438", "path": "src/main/java/com/rapidminer/operator/learner/meta/Binary2MultiClassModel.java", "license": "agpl-3.0", "size": 12121 }
[ "com.rapidminer.example.Example", "com.rapidminer.example.ExampleSet", "com.rapidminer.operator.Model", "com.rapidminer.operator.OperatorException", "com.rapidminer.operator.OperatorProgress", "com.rapidminer.operator.learner.PredictionModel", "java.util.HashMap", "java.util.Iterator" ]
import com.rapidminer.example.Example; import com.rapidminer.example.ExampleSet; import com.rapidminer.operator.Model; import com.rapidminer.operator.OperatorException; import com.rapidminer.operator.OperatorProgress; import com.rapidminer.operator.learner.PredictionModel; import java.util.HashMap; import java.util.Iterator;
import com.rapidminer.example.*; import com.rapidminer.operator.*; import com.rapidminer.operator.learner.*; import java.util.*;
[ "com.rapidminer.example", "com.rapidminer.operator", "java.util" ]
com.rapidminer.example; com.rapidminer.operator; java.util;
649,558
public final void registerAdditionalTREdescriptor(final Source source) throws NitfFormatException { initialiseTreCollectionParserIfRequired(); treCollectionParser.registerAdditionalTREdescriptor(source); } /** * {@inheritDoc}
final void function(final Source source) throws NitfFormatException { initialiseTreCollectionParserIfRequired(); treCollectionParser.registerAdditionalTREdescriptor(source); } /** * {@inheritDoc}
/** * Register an additional TRE descriptor. * * @param source the source of the additional TreImpl descriptor. * @throws NitfFormatException - when the TRE descriptors in the source are not in the expected format. */
Register an additional TRE descriptor
registerAdditionalTREdescriptor
{ "repo_name": "bradh/imaging-nitf", "path": "core/src/main/java/org/codice/imaging/nitf/core/SlottedParseStrategy.java", "license": "lgpl-2.1", "size": 13008 }
[ "javax.xml.transform.Source", "org.codice.imaging.nitf.core.common.NitfFormatException" ]
import javax.xml.transform.Source; import org.codice.imaging.nitf.core.common.NitfFormatException;
import javax.xml.transform.*; import org.codice.imaging.nitf.core.common.*;
[ "javax.xml", "org.codice.imaging" ]
javax.xml; org.codice.imaging;
2,818,958
public static String minus(CharSequence self, Pattern pattern) { return pattern.matcher(self).replaceFirst(""); }
static String function(CharSequence self, Pattern pattern) { return pattern.matcher(self).replaceFirst(""); }
/** * Remove a part of a CharSequence. This replaces the first occurrence * of the pattern within self with '' and returns the result. * * @param self a String * @param pattern a Pattern representing the part to remove * @return a String minus the part to be removed * @since 2.2.0 */
Remove a part of a CharSequence. This replaces the first occurrence of the pattern within self with '' and returns the result
minus
{ "repo_name": "pledbrook/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 142054 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,893,625
EClass getIncludeType();
EClass getIncludeType();
/** * Returns the meta object for class '{@link org.ebxml.business.process.IncludeType <em>Include Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Include Type</em>'. * @see org.ebxml.business.process.IncludeType * @generated */
Returns the meta object for class '<code>org.ebxml.business.process.IncludeType Include Type</code>'.
getIncludeType
{ "repo_name": "GRA-UML/tool", "path": "plugins/org.ijis.gra.ebxml.ebBPSS/src/main/java/org/ebxml/business/process/ProcessPackage.java", "license": "epl-1.0", "size": 274455 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,355,807
private synchronized boolean complete() throws IOException { int count = compacter.length(); if(count > 0) { compacter.compact(); } return count <= 0; }
synchronized boolean function() throws IOException { int count = compacter.length(); if(count > 0) { compacter.compact(); } return count <= 0; }
/** * This is used to determine the the writer is done writing all * of the enqueued packets. This is determined by checking if * the sum of the number of packets remaining is greater than * zero. If there are remaining packets they are compacted. * * @return this returns true if the writer is now empty */
This is used to determine the the writer is done writing all of the enqueued packets. This is determined by checking if the sum of the number of packets remaining is greater than zero. If there are remaining packets they are compacted
complete
{ "repo_name": "ael-code/preston", "path": "src/org/simpleframework/transport/SocketWriter.java", "license": "gpl-2.0", "size": 7377 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,341,390
List<Device> getDevicesByStatus(PaginationRequest request, int tenantId) throws DeviceManagementDAOException;
List<Device> getDevicesByStatus(PaginationRequest request, int tenantId) throws DeviceManagementDAOException;
/** * This method is used to retrieve devices of a given enrollment status as a paginated result * * @param request PaginationRequest object holding the data for pagination * @param tenantId tenant id. * @return returns paginated list of devices of given status. * @throws DeviceManagementDAOException */
This method is used to retrieve devices of a given enrollment status as a paginated result
getDevicesByStatus
{ "repo_name": "prithvi66/carbon-device-mgt", "path": "components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/dao/DeviceDAO.java", "license": "apache-2.0", "size": 16585 }
[ "java.util.List", "org.wso2.carbon.device.mgt.common.Device", "org.wso2.carbon.device.mgt.common.PaginationRequest" ]
import java.util.List; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.PaginationRequest;
import java.util.*; import org.wso2.carbon.device.mgt.common.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,783,547
public static void sendImage(DocuImage img, String mimeType, HttpServletResponse response) throws ImageOpException, ServletException { ServletOps.sendImage(img, mimeType, response, ServletOps.logger); }
static void function(DocuImage img, String mimeType, HttpServletResponse response) throws ImageOpException, ServletException { ServletOps.sendImage(img, mimeType, response, ServletOps.logger); }
/** * Write image img to ServletResponse response. * * @param img * @param mimeType * @param response * @throws ImageOpException * @throws ServletException Exception on sending data. */
Write image img to ServletResponse response
sendImage
{ "repo_name": "BackupTheBerlios/digilib", "path": "servlet/src/main/java/digilib/servlet/ServletOps.java", "license": "lgpl-3.0", "size": 14321 }
[ "javax.servlet.ServletException", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse;
import javax.servlet.*; import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,627,148
public long timeLeft() { long millisUntilFinished; if (isPaused()) { millisUntilFinished = mPauseTimeRemaining; } else { millisUntilFinished = mStopTimeInFuture - SystemClock.elapsedRealtime(); if (millisUntilFinished < 0) millisUntilFinished = 0; } return millisUntilFinished; }
long function() { long millisUntilFinished; if (isPaused()) { millisUntilFinished = mPauseTimeRemaining; } else { millisUntilFinished = mStopTimeInFuture - SystemClock.elapsedRealtime(); if (millisUntilFinished < 0) millisUntilFinished = 0; } return millisUntilFinished; }
/** * Returns the number of milliseconds remaining until the timer is finished * @return number of milliseconds remaining until the timer is finished */
Returns the number of milliseconds remaining until the timer is finished
timeLeft
{ "repo_name": "bigscreen/binary-game", "path": "app/src/main/java/com/bigscreen/binarygame/common/timer/CustomCountDownTimer.java", "license": "apache-2.0", "size": 7123 }
[ "android.os.SystemClock" ]
import android.os.SystemClock;
import android.os.*;
[ "android.os" ]
android.os;
2,088,614
EList<DropNotNullConstraintType> getDropNotNullConstraint();
EList<DropNotNullConstraintType> getDropNotNullConstraint();
/** * Returns the value of the '<em><b>Drop Not Null Constraint</b></em>' containment reference list. * The list contents are of type {@link org.liquibase.xml.ns.dbchangelog.DropNotNullConstraintType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Drop Not Null Constraint</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Drop Not Null Constraint</em>' containment reference list. * @see org.liquibase.xml.ns.dbchangelog.DbchangelogPackage#getRollbackType_DropNotNullConstraint() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='dropNotNullConstraint' namespace='##targetNamespace' group='#ChangeSetChildren:1'" * @generated */
Returns the value of the 'Drop Not Null Constraint' containment reference list. The list contents are of type <code>org.liquibase.xml.ns.dbchangelog.DropNotNullConstraintType</code>. If the meaning of the 'Drop Not Null Constraint' containment reference list isn't clear, there really should be more of a description here...
getDropNotNullConstraint
{ "repo_name": "dzonekl/LiquibaseEditor", "path": "plugins/org.liquidbase.model/src/org/liquibase/xml/ns/dbchangelog/RollbackType.java", "license": "mit", "size": 47925 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,871,357
public Calendar getSignDate() { return this.signDate; }
Calendar function() { return this.signDate; }
/** * Getter for property signDate. * * @return Value of property signDate. */
Getter for property signDate
getSignDate
{ "repo_name": "SafetyCulture/DroidText", "path": "app/src/main/java/com/lowagie/text/pdf/PdfPKCS7.java", "license": "lgpl-3.0", "size": 57524 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
2,489,672
EAttribute getFDescription_Mgl();
EAttribute getFDescription_Mgl();
/** * Returns the meta object for the attribute '{@link norwegiangambit.psqt.pSQT.FDescription#getMgl <em>Mgl</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Mgl</em>'. * @see norwegiangambit.psqt.pSQT.FDescription#getMgl() * @see #getFDescription() * @generated */
Returns the meta object for the attribute '<code>norwegiangambit.psqt.pSQT.FDescription#getMgl Mgl</code>'.
getFDescription_Mgl
{ "repo_name": "pdigre/NorwegianGambit", "path": "norwegiangambit.psqt/src-gen/norwegiangambit/psqt/pSQT/PSQTPackage.java", "license": "epl-1.0", "size": 26716 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
511,426
int indexOf(Advice advice);
int indexOf(Advice advice);
/** * Return the index (from 0) of the given AOP Alliance Advice, * or -1 if no such advice is an advice for this proxy. * <p>The return value of this method can be used to index into * the advisors array. * @param advice AOP Alliance advice to search for * @return index from 0 of this advice, or -1 if there's no such advice */
Return the index (from 0) of the given AOP Alliance Advice, or -1 if no such advice is an advice for this proxy. The return value of this method can be used to index into the advisors array
indexOf
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/aop/framework/Advised.java", "license": "unlicense", "size": 8756 }
[ "org.aopalliance.aop.Advice" ]
import org.aopalliance.aop.Advice;
import org.aopalliance.aop.*;
[ "org.aopalliance.aop" ]
org.aopalliance.aop;
2,122,889
public void addBoardListener(BoardListener listener) { if (listeners == null) { listeners = new LinkedList<BoardListener>(); } listeners.add(listener); }
void function(BoardListener listener) { if (listeners == null) { listeners = new LinkedList<BoardListener>(); } listeners.add(listener); }
/** * The given listener will be called for important game updates like when a * piece is moved on the board. * * @param listener * The listener instance to be called. */
The given listener will be called for important game updates like when a piece is moved on the board
addBoardListener
{ "repo_name": "coreyabshire/DTF", "path": "src/edu/purdue/dtf/game/Board.java", "license": "gpl-2.0", "size": 13665 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
2,347,295
static void testUpdateConfiguration() { String configFile = null; try { // manager initialized with default configuration. LogManager manager = LogManager.getLogManager(); // Test default configuration. It should not have // any value for "com.foo.level" and "com.foo.handlers" assertEquals(null, manager.getProperty("com.foo.level"), "com.foo.level in default configuration"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in default configuration"); // Create a logging configuration file that contains // com.foo.level=FINEST // and set "java.util.logging.config.file" to this file. Properties props = new Properties(); props.setProperty("com.foo.level", "FINEST"); configFile = storePropertyToFile("config1", props); setSystemProperty("java.util.logging.config.file", configFile); // Update configuration with configFile // then test that the new configuration has // com.foo.level=FINEST // and nothing for com.foo.handlers manager.updateConfiguration(null); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level in " + configFile); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in " + configFile); // clear ("java.util.logging.config.file" system property, // and call updateConfiguration again. // check that the new configuration no longer has // any value for com.foo.level, and still no value // for com.foo.handlers setSystemProperty("java.util.logging.config.file", null); manager.updateConfiguration(null); assertEquals(null, manager.getProperty("com.foo.level"), "com.foo.level in default configuration"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in default configuration"); // creates the com.foo logger, check it has // the default config: no level, and no handlers final Logger logger = Logger.getLogger("com.foo"); assertEquals(null, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertDeepEquals(new Handler[0], logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); // set "java.util.logging.config.file" to configFile and // call updateConfiguration. // check that the configuration has // com.foo.level=FINEST // and nothing for com.foo.handlers // check that the logger has now a FINEST level and still // no handlers setSystemProperty("java.util.logging.config.file", configFile); manager.updateConfiguration(null); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level in " + configFile); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertDeepEquals(new Handler[0], logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in " + configFile); // Calls updateConfiguration with a lambda whose effect should // be to set the FINER level on the "com.foo" logger. // Check that the new configuration has // com.foo.level=FINER // and nothing for com.foo.handlers // check that the logger has now a FINER level and still // no handlers manager.updateConfiguration( (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n)); assertEquals("FINER", manager.getProperty("com.foo.level"), "com.foo.level set to FINER by updateConfiguration"); assertEquals(Level.FINER, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertDeepEquals(new Handler[0], logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in " + configFile); // Calls updateConfiguration with a lambda whose effect is a noop. // This should not change the configuration, so // check that the new configuration still has // com.foo.level=FINER // and nothing for com.foo.handlers // check that the logger still has FINER level and still // no handlers manager.updateConfiguration( (k) -> ((o, n) -> o)); assertEquals("FINER", manager.getProperty("com.foo.level"), "com.foo.level preserved by updateConfiguration"); assertEquals(Level.FINER, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertDeepEquals(new Handler[0], logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in " + configFile); // Calls updateConfiguration with a lambda whose effect is to // take all values from the new configuration. // This should update the configuration to what is in configFile, so // check that the new configuration has // com.foo.level=FINEST // and nothing for com.foo.handlers // check that the logger now has FINEST level and still // no handlers manager.updateConfiguration( (k) -> ((o, n) -> n)); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertDeepEquals(new Handler[0], logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in " + configFile); // now set a handler on the com.foo logger. MyHandler h = new MyHandler(); logger.addHandler(h); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); // Calls updateConfiguration with a lambda whose effect should // be to set the FINER level on the "com.foo" logger, and // take the value from configFile for everything else. // Check that the new configuration has // com.foo.level=FINER // and nothing for com.foo.handlers // check that the logger has now a FINER level, but that its // handlers are still present and have not been reset // since neither the old nor new configuration defined them. manager.updateConfiguration( (k) -> ("com.foo.level".equals(k) ? (o, n) -> "FINER" : (o, n) -> n)); assertEquals("FINER", manager.getProperty("com.foo.level"), "com.foo.level set to FINER by updateConfiguration"); assertEquals(Level.FINER, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "com.foo.handlers in " + configFile); // now add some configuration for com.foo.handlers in the // configuration file. props.setProperty("com.foo.handlers", MyHandler.class.getName()); storePropertyToFile("config1", props); // we didn't call updateConfiguration, so just changing the // content of the file should have had no no effect yet. assertEquals("FINER", manager.getProperty("com.foo.level"), "com.foo.level set to FINER by updateConfiguration"); assertEquals(Level.FINER, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); // Calls updateConfiguration with a lambda whose effect is a noop. // This should not change the current configuration, so // check that the new configuration still has // com.foo.level=FINER // and nothing for com.foo.handlers // check that the logger still has FINER level and still // has its handlers and that they haven't been reset. manager.updateConfiguration((k) -> ((o, n) -> o)); assertEquals("FINER", manager.getProperty("com.foo.level"), "com.foo.level set to FINER by updateConfiguration"); assertEquals(Level.FINER, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); // Calls updateConfiguration with a lambda whose effect is to // take all values from the new configuration. // This should update the configuration to what is in configFile, so // check that the new configuration has // com.foo.level=FINEST // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler // check that the logger now has FINEST level // and a new handler instance, since the old config // had no handlers for com.foo and the new config has one. manager.updateConfiguration((k) -> ((o, n) -> n)); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(MyHandler.class.getName(), manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); Handler[] loggerHandlers = logger.getHandlers().clone(); assertEquals(1, loggerHandlers.length, "Logger.getLogger(\"com.foo\").getHandlers().length"); assertEquals(MyHandler.class, loggerHandlers[0].getClass(), "Logger.getLogger(\"com.foo\").getHandlers()[0].getClass()"); assertEquals(h.count + 1, ((MyHandler)logger.getHandlers()[0]).count, "Logger.getLogger(\"com.foo\").getHandlers()[0].count"); // Calls updateConfiguration with a lambda whose effect is a noop. // This should not change the current configuration, so // check that the new configuration still has // com.foo.level=FINEST // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler // check that the logger still has FINEST level and still // has its handlers and that they haven't been reset. manager.updateConfiguration((k) -> ((o, n) -> o)); assertDeepEquals(loggerHandlers, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(MyHandler.class.getName(), manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); // Calls updateConfiguration with a lambda whose effect is to // take all values from the new configuration. // Because the content of the configFile hasn't changed, then // it should also be a noop. // check that the new configuration still has // com.foo.level=FINEST // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler // check that the logger still has FINEST level and still // has its handlers and that they haven't been reset. manager.updateConfiguration((k) -> ((o, n) -> n)); assertDeepEquals(loggerHandlers, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(MyHandler.class.getName(), manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); // Calls updateConfiguration with a null lambda, whose effect is to // take all values from the new configuration. // Because the content of the configFile hasn't changed, then // it should also be a noop. // check that the new configuration still has // com.foo.level=FINEST // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler // check that the logger still has FINEST level and still // has its handlers and that they haven't been reset. manager.updateConfiguration((k) -> ((o, n) -> n)); assertDeepEquals(loggerHandlers, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(MyHandler.class.getName(), manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); // no remove com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler // from the configuration file. props.remove("com.foo.handlers"); storePropertyToFile("config1", props); // Calls updateConfiguration with a lambda whose effect is a noop. // This should not change the current configuration, so // check that the new configuration still has // com.foo.level=FINEST // com.foo.handlers=SimpleUpdateConfigurationTest$MyHandler // check that the logger still has FINEST level and still // has its handlers and that they haven't been reset. manager.updateConfiguration((k) -> ((o, n) -> o)); assertDeepEquals(loggerHandlers, logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(MyHandler.class.getName(), manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); // Calls updateConfiguration with a lambda whose effect is to // take all values from the new configuration. // This should update the configuration to what is in configFile, so // check that the new configuration has // com.foo.level=FINEST // and nothing for com.foo.handlers // check that the logger still has FINEST level // and no handlers, since the old config // had an handler for com.foo and the new config doesn't. manager.updateConfiguration((k) -> ((o, n) -> n)); assertDeepEquals(new Handler[0], logger.getHandlers(), "Logger.getLogger(\"com.foo\").getHandlers()"); assertEquals("FINEST", manager.getProperty("com.foo.level"), "com.foo.level updated by updateConfiguration"); assertEquals(Level.FINEST, logger.getLevel(), "Logger.getLogger(\"com.foo\").getLevel()"); assertEquals(null, manager.getProperty("com.foo.handlers"), "manager.getProperty(\"com.foo.handlers\")"); } catch (RuntimeException | Error r) { throw r; } catch (Exception x) { throw new RuntimeException(x); } finally { if (configFile != null) { // cleanup final String file = configFile; Configure.doPrivileged(() -> { try { Files.delete(Paths.get(file)); } catch (RuntimeException | Error r) { throw r; } catch (Exception x) { throw new RuntimeException(x); } }, SimplePolicy.allowAll); } } }
static void testUpdateConfiguration() { String configFile = null; try { LogManager manager = LogManager.getLogManager(); assertEquals(null, manager.getProperty(STR), STR); assertEquals(null, manager.getProperty(STR), STR); Properties props = new Properties(); props.setProperty(STR, STR); configFile = storePropertyToFile(STR, props); setSystemProperty(STR, configFile); manager.updateConfiguration(null); assertEquals(STR, manager.getProperty(STR), STR + configFile); assertEquals(null, manager.getProperty(STR), STR + configFile); setSystemProperty(STR, null); manager.updateConfiguration(null); assertEquals(null, manager.getProperty(STR), STR); assertEquals(null, manager.getProperty(STR), STR); final Logger logger = Logger.getLogger(STR); assertEquals(null, logger.getLevel(), STRcom.foo\STR); assertDeepEquals(new Handler[0], logger.getHandlers(), STRcom.foo\STR); setSystemProperty(STR, configFile); manager.updateConfiguration(null); assertEquals(STR, manager.getProperty(STR), STR + configFile); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertDeepEquals(new Handler[0], logger.getHandlers(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STR + configFile); manager.updateConfiguration( (k) -> (STR.equals(k) ? (o, n) -> "FINER" : (o, n) -> n)); assertEquals("FINER", manager.getProperty(STR), STR); assertEquals(Level.FINER, logger.getLevel(), STRcom.foo\STR); assertDeepEquals(new Handler[0], logger.getHandlers(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STR + configFile); manager.updateConfiguration( (k) -> ((o, n) -> o)); assertEquals("FINER", manager.getProperty(STR), STR); assertEquals(Level.FINER, logger.getLevel(), STRcom.foo\STR); assertDeepEquals(new Handler[0], logger.getHandlers(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STR + configFile); manager.updateConfiguration( (k) -> ((o, n) -> n)); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertDeepEquals(new Handler[0], logger.getHandlers(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STR + configFile); MyHandler h = new MyHandler(); logger.addHandler(h); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), STRcom.foo\STR); manager.updateConfiguration( (k) -> (STR.equals(k) ? (o, n) -> "FINER" : (o, n) -> n)); assertEquals("FINER", manager.getProperty(STR), STR); assertEquals(Level.FINER, logger.getLevel(), STRcom.foo\STR); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STR + configFile); props.setProperty(STR, MyHandler.class.getName()); storePropertyToFile(STR, props); assertEquals("FINER", manager.getProperty(STR), STR); assertEquals(Level.FINER, logger.getLevel(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STRcom.foo.handlers\")"); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), STRcom.foo\STR); manager.updateConfiguration((k) -> ((o, n) -> o)); assertEquals("FINER", manager.getProperty(STR), STR); assertEquals(Level.FINER, logger.getLevel(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STRcom.foo.handlers\")"); assertDeepEquals(new Handler[] {h}, logger.getHandlers(), STRcom.foo\STR); manager.updateConfiguration((k) -> ((o, n) -> n)); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertEquals(MyHandler.class.getName(), manager.getProperty(STR), STRcom.foo.handlers\")"); Handler[] loggerHandlers = logger.getHandlers().clone(); assertEquals(1, loggerHandlers.length, STRcom.foo\STR); assertEquals(MyHandler.class, loggerHandlers[0].getClass(), STRcom.foo\STR); assertEquals(h.count + 1, ((MyHandler)logger.getHandlers()[0]).count, STRcom.foo\STR); manager.updateConfiguration((k) -> ((o, n) -> o)); assertDeepEquals(loggerHandlers, logger.getHandlers(), STRcom.foo\STR); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertEquals(MyHandler.class.getName(), manager.getProperty(STR), STRcom.foo.handlers\")"); manager.updateConfiguration((k) -> ((o, n) -> n)); assertDeepEquals(loggerHandlers, logger.getHandlers(), STRcom.foo\STR); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertEquals(MyHandler.class.getName(), manager.getProperty(STR), STRcom.foo.handlers\")"); manager.updateConfiguration((k) -> ((o, n) -> n)); assertDeepEquals(loggerHandlers, logger.getHandlers(), STRcom.foo\STR); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertEquals(MyHandler.class.getName(), manager.getProperty(STR), STRcom.foo.handlers\")"); props.remove(STR); storePropertyToFile(STR, props); manager.updateConfiguration((k) -> ((o, n) -> o)); assertDeepEquals(loggerHandlers, logger.getHandlers(), STRcom.foo\STR); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertEquals(MyHandler.class.getName(), manager.getProperty(STR), STRcom.foo.handlers\")"); manager.updateConfiguration((k) -> ((o, n) -> n)); assertDeepEquals(new Handler[0], logger.getHandlers(), STRcom.foo\STR); assertEquals(STR, manager.getProperty(STR), STR); assertEquals(Level.FINEST, logger.getLevel(), STRcom.foo\STR); assertEquals(null, manager.getProperty(STR), STRcom.foo.handlers\")"); } catch (RuntimeException Error r) { throw r; } catch (Exception x) { throw new RuntimeException(x); } finally { if (configFile != null) { final String file = configFile; Configure.doPrivileged(() -> { try { Files.delete(Paths.get(file)); } catch (RuntimeException Error r) { throw r; } catch (Exception x) { throw new RuntimeException(x); } }, SimplePolicy.allowAll); } } }
/** * Tests one of the configuration defined above. * <p> * This is the main test method (the rest is infrastructure). */
Tests one of the configuration defined above. This is the main test method (the rest is infrastructure)
testUpdateConfiguration
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/logging/LogManager/Configuration/updateConfiguration/SimpleUpdateConfigurationTest.java", "license": "gpl-2.0", "size": 32472 }
[ "java.nio.file.Files", "java.nio.file.Paths", "java.util.Properties", "java.util.logging.Handler", "java.util.logging.Level", "java.util.logging.LogManager", "java.util.logging.Logger" ]
import java.nio.file.Files; import java.nio.file.Paths; import java.util.Properties; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogManager; import java.util.logging.Logger;
import java.nio.file.*; import java.util.*; import java.util.logging.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
860,552
private void init(final CommonResources commons, final VideoAudio media, SwappableRenderer surface) { final ResourcePlace audio = commons.audio(media.audio); final ResourcePlace video = commons.video(media.video, true); if (video == null) { Exceptions.add(new AssertionError("Missing video: " + media.video)); } final CyclicBarrier barrier = new CyclicBarrier(audio != null ? 2 : 1); continuation = new AtomicInteger(barrier.getParties()); audioFinish = new AtomicInteger(1); ResourcePlace sub = commons.rl.get(media.video, ResourceType.SUBTITLE); if (sub != null) { subtitle = new SubtitleManager(sub.open()); } else { subtitle = null; }
void function(final CommonResources commons, final VideoAudio media, SwappableRenderer surface) { final ResourcePlace audio = commons.audio(media.audio); final ResourcePlace video = commons.video(media.video, true); if (video == null) { Exceptions.add(new AssertionError(STR + media.video)); } final CyclicBarrier barrier = new CyclicBarrier(audio != null ? 2 : 1); continuation = new AtomicInteger(barrier.getParties()); audioFinish = new AtomicInteger(1); ResourcePlace sub = commons.rl.get(media.video, ResourceType.SUBTITLE); if (sub != null) { subtitle = new SubtitleManager(sub.open()); } else { subtitle = null; }
/** * Initialize the playback threads. * @param commons the common resources * @param media the media record * @param surface the surface to render to */
Initialize the playback threads
init
{ "repo_name": "p-smith/open-ig", "path": "src/hu/openig/screen/MediaPlayer.java", "license": "lgpl-3.0", "size": 8321 }
[ "hu.openig.core.ResourceType", "hu.openig.core.SwappableRenderer", "hu.openig.model.ResourceLocator", "hu.openig.model.VideoAudio", "hu.openig.utils.Exceptions", "java.util.concurrent.CyclicBarrier", "java.util.concurrent.atomic.AtomicInteger" ]
import hu.openig.core.ResourceType; import hu.openig.core.SwappableRenderer; import hu.openig.model.ResourceLocator; import hu.openig.model.VideoAudio; import hu.openig.utils.Exceptions; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicInteger;
import hu.openig.core.*; import hu.openig.model.*; import hu.openig.utils.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*;
[ "hu.openig.core", "hu.openig.model", "hu.openig.utils", "java.util" ]
hu.openig.core; hu.openig.model; hu.openig.utils; java.util;
1,592,995
public void testMatrixExponential7( ) throws NotInvertibleException { final DoubleElemFactory fac = new DoubleElemFactory(); final TestDimensionTwo td = new TestDimensionTwo(); final SquareMatrixElem<TestDimensionTwo,DoubleElem,DoubleElemFactory> el = new SquareMatrixElem<TestDimensionTwo,DoubleElem,DoubleElemFactory>( fac , td ); final double EPS = 1E-8; el.setVal( BigInteger.ZERO , BigInteger.ZERO , new DoubleElem( 1.0 + EPS ) ); el.setVal( BigInteger.ZERO , BigInteger.ONE , new DoubleElem( 1.0 ) ); el.setVal( BigInteger.ONE , BigInteger.ZERO , new DoubleElem( 0.0 ) ); el.setVal( BigInteger.ONE , BigInteger.ONE , new DoubleElem( 1.0 - EPS ) ); final SquareMatrixElem<TestDimensionTwo,DoubleElem,DoubleElemFactory> exp = el.exp( 10 ); Assert.assertEquals( 2.718281828 , exp.getVal(BigInteger.ZERO , BigInteger.ZERO).getVal() , 1E-4 ); Assert.assertEquals( 2.718281828 , exp.getVal(BigInteger.ZERO , BigInteger.ONE).getVal() , 1E-4 ); Assert.assertEquals( 0.0 , exp.getVal(BigInteger.ONE , BigInteger.ZERO).getVal() , 1E-4 ); Assert.assertEquals( 2.718281828 , exp.getVal(BigInteger.ONE , BigInteger.ONE).getVal() , 1E-4 ); }
void function( ) throws NotInvertibleException { final DoubleElemFactory fac = new DoubleElemFactory(); final TestDimensionTwo td = new TestDimensionTwo(); final SquareMatrixElem<TestDimensionTwo,DoubleElem,DoubleElemFactory> el = new SquareMatrixElem<TestDimensionTwo,DoubleElem,DoubleElemFactory>( fac , td ); final double EPS = 1E-8; el.setVal( BigInteger.ZERO , BigInteger.ZERO , new DoubleElem( 1.0 + EPS ) ); el.setVal( BigInteger.ZERO , BigInteger.ONE , new DoubleElem( 1.0 ) ); el.setVal( BigInteger.ONE , BigInteger.ZERO , new DoubleElem( 0.0 ) ); el.setVal( BigInteger.ONE , BigInteger.ONE , new DoubleElem( 1.0 - EPS ) ); final SquareMatrixElem<TestDimensionTwo,DoubleElem,DoubleElemFactory> exp = el.exp( 10 ); Assert.assertEquals( 2.718281828 , exp.getVal(BigInteger.ZERO , BigInteger.ZERO).getVal() , 1E-4 ); Assert.assertEquals( 2.718281828 , exp.getVal(BigInteger.ZERO , BigInteger.ONE).getVal() , 1E-4 ); Assert.assertEquals( 0.0 , exp.getVal(BigInteger.ONE , BigInteger.ZERO).getVal() , 1E-4 ); Assert.assertEquals( 2.718281828 , exp.getVal(BigInteger.ONE , BigInteger.ONE).getVal() , 1E-4 ); }
/** * Test method for {@link simplealgebra.Elem#exp(int)}. */
Test method for <code>simplealgebra.Elem#exp(int)</code>
testMatrixExponential7
{ "repo_name": "viridian1138/SimpleAlgebra_V2", "path": "src/test_simplealgebra/TestMatrixExponential.java", "license": "gpl-3.0", "size": 22461 }
[ "java.math.BigInteger", "junit.framework.Assert" ]
import java.math.BigInteger; import junit.framework.Assert;
import java.math.*; import junit.framework.*;
[ "java.math", "junit.framework" ]
java.math; junit.framework;
1,220,721
@Override public Date readDate(Type target) { int ref = readAMF3Integer(); if ((ref & 1) == 0) { // Reference to previously found date return (Date) getReference(ref >> 1); } long ms = (long) buf.getDouble(); Date date = new Date(ms); storeReference(date); return date; } // Array
Date function(Type target) { int ref = readAMF3Integer(); if ((ref & 1) == 0) { return (Date) getReference(ref >> 1); } long ms = (long) buf.getDouble(); Date date = new Date(ms); storeReference(date); return date; }
/** * Returns a date * * @return Date Date object */
Returns a date
readDate
{ "repo_name": "zofuthan/red5-io", "path": "src/main/java/org/red5/io/amf3/Input.java", "license": "apache-2.0", "size": 31354 }
[ "java.lang.reflect.Type", "java.util.Date" ]
import java.lang.reflect.Type; import java.util.Date;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,680,811
protected void applyMembership(Authorizable member, Set<String> groups) throws RepositoryException { for (String groupName: groups) { Authorizable group = userManager.getAuthorizable(groupName); if (group == null) { log.warn("Unable to apply auto-membership to {}. No such group: {}", member.getID(), groupName); } else if (group instanceof Group) { ((Group) group).addMember(member); } else { log.warn("Unable to apply auto-membership to {}. Authorizable '{}' is not a group.", member.getID(), groupName); } } }
void function(Authorizable member, Set<String> groups) throws RepositoryException { for (String groupName: groups) { Authorizable group = userManager.getAuthorizable(groupName); if (group == null) { log.warn(STR, member.getID(), groupName); } else if (group instanceof Group) { ((Group) group).addMember(member); } else { log.warn(STR, member.getID(), groupName); } } }
/** * Ensures that the given authorizable is member of the specific groups. Note that it does not create groups * if missing, nor remove memberships of groups not in the given set. * @param member the authorizable * @param groups set of groups. */
Ensures that the given authorizable is member of the specific groups. Note that it does not create groups if missing, nor remove memberships of groups not in the given set
applyMembership
{ "repo_name": "AndreasAbdi/jackrabbit-oak", "path": "oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/basic/DefaultSyncContext.java", "license": "apache-2.0", "size": 28885 }
[ "java.util.Set", "javax.jcr.RepositoryException", "org.apache.jackrabbit.api.security.user.Authorizable", "org.apache.jackrabbit.api.security.user.Group" ]
import java.util.Set; import javax.jcr.RepositoryException; import org.apache.jackrabbit.api.security.user.Authorizable; import org.apache.jackrabbit.api.security.user.Group;
import java.util.*; import javax.jcr.*; import org.apache.jackrabbit.api.security.user.*;
[ "java.util", "javax.jcr", "org.apache.jackrabbit" ]
java.util; javax.jcr; org.apache.jackrabbit;
45,602
@Test public void testProxyEntity() throws DatabaseException { try { open(ProxyExtendsEntity.class); fail(); } catch (IllegalArgumentException e) { assertTrue(e.toString(), e.getMessage().contains ("A proxy may not be an entity")); } } @Persistent(proxyFor=Locale.class) static class ProxyExtendsEntity extends EntitySuperClass implements PersistentProxy<Locale> { String language; String country; String variant;
void function() throws DatabaseException { try { open(ProxyExtendsEntity.class); fail(); } catch (IllegalArgumentException e) { assertTrue(e.toString(), e.getMessage().contains (STR)); } } @Persistent(proxyFor=Locale.class) static class ProxyExtendsEntity extends EntitySuperClass implements PersistentProxy<Locale> { String language; String country; String variant;
/** * Disallow a persistent proxy that extends an entity. [#15950] */
Disallow a persistent proxy that extends an entity. [#15950]
testProxyEntity
{ "repo_name": "hyc/BerkeleyDB", "path": "test/java/compat/src/com/sleepycat/persist/test/NegativeTest.java", "license": "agpl-3.0", "size": 19623 }
[ "com.sleepycat.db.DatabaseException", "com.sleepycat.persist.model.Persistent", "com.sleepycat.persist.model.PersistentProxy", "java.util.Locale", "org.junit.Assert" ]
import com.sleepycat.db.DatabaseException; import com.sleepycat.persist.model.Persistent; import com.sleepycat.persist.model.PersistentProxy; import java.util.Locale; import org.junit.Assert;
import com.sleepycat.db.*; import com.sleepycat.persist.model.*; import java.util.*; import org.junit.*;
[ "com.sleepycat.db", "com.sleepycat.persist", "java.util", "org.junit" ]
com.sleepycat.db; com.sleepycat.persist; java.util; org.junit;
1,277,874
@Source("com/google/appinventor/images/phoneCall.png") ImageResource phonecall();
@Source(STR) ImageResource phonecall();
/** * Designer palette item: PhoneCall component */
Designer palette item: PhoneCall component
phonecall
{ "repo_name": "codimeo/codi-studio", "path": "appinventor/appengine/src/com/google/appinventor/client/Images.java", "license": "apache-2.0", "size": 13788 }
[ "com.google.gwt.resources.client.ImageResource" ]
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,823,375
public jsx3.xml.Node insertRecord(jsx3.lang.Object objRecord, String strParentRecordId, boolean bRedraw) { String extension = "insertRecord(\"" + objRecord + "\", \"" + strParentRecordId + "\", \"" + bRedraw + "\")."; try { java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class.getConstructor(Context.class, String.class); return ctor.newInstance(this, extension); } catch (Exception ex) { throw new IllegalArgumentException("Unsupported type: " + jsx3.xml.Node.class.getName()); } } /** * Creates a new CDF record and inserts it into the CDF data source of this object, before the record identified by strSiblingRecordId. This method fails quietly if any of the following conditions apply: there is no existing record with a jsxid equal to strSiblingRecordId
jsx3.xml.Node function(jsx3.lang.Object objRecord, String strParentRecordId, boolean bRedraw) { String extension = STRSTR\STRSTR\STRSTR\")."; try { java.lang.reflect.Constructor<jsx3.xml.Node> ctor = jsx3.xml.Node.class.getConstructor(Context.class, String.class); return ctor.newInstance(this, extension); } catch (Exception ex) { throw new IllegalArgumentException(STR + jsx3.xml.Node.class.getName()); } } /** * Creates a new CDF record and inserts it into the CDF data source of this object, before the record identified by strSiblingRecordId. This method fails quietly if any of the following conditions apply: there is no existing record with a jsxid equal to strSiblingRecordId
/** * Inserts a new record into the XML data source of this object. If no XML data source exists yet for this object, an empty one is created before adding the new record. If a record already exists with an id equal to the jsxid property of objRecord, the operation is treated as an update, meaning the existing record is completely removed and a new record with the given jsxid is inserted. * @param objRecord a JavaScript object containing property/value pairs that define the attributes of the XML entity to create. Note that most classes that implement this interface require that all records have an attribute named <code>jsxid</code> that is unique across all records in the XML document. All property values will be treated as strings. Additionally, the following 3 characters are escaped: <code>" &gt; &lt;</code>. * @param strParentRecordId the unique <code>jsxid</code> of an existing record. If this optional parameter is provided and a record exists with a matching <code>jsxid</code> attribute, the new record will be added as a child of this record. Otherwise, the new record will be added to the root <code>data</code> element. However, if a record already exists with a <code>jsxid</code> attribute equal to the <code>jsxid</code> property of <code>objRecord</code>, this parameter will be ignored. In this case <code>adoptRecord()</code> must be called to change the parent of the record. * @param bRedraw if <code>true</code> or <code>null</code>, the on-screen view of this object is immediately updated to reflect the additional record. * @return the newly created or updated entity. */
Inserts a new record into the XML data source of this object. If no XML data source exists
insertRecord
{ "repo_name": "burris/dwr", "path": "ui/gi/generated/java/jsx3/gui/Tree.java", "license": "apache-2.0", "size": 87147 }
[ "org.directwebremoting.io.Context" ]
import org.directwebremoting.io.Context;
import org.directwebremoting.io.*;
[ "org.directwebremoting.io" ]
org.directwebremoting.io;
1,788,948
public Optional<DataQuery> scalingNode() { if (!this.scaled) { return Optional.empty(); } return Optional.of(new DataQuery(this.nodeAsString() + "-per-level")); }
Optional<DataQuery> function() { if (!this.scaled) { return Optional.empty(); } return Optional.of(new DataQuery(this.nodeAsString() + STR)); }
/** * Gets the 'per-level' string node for this setting if applicable. <p>If the node is not a * scaling node, the this will return {@link Optional#empty()}</p> * * @return The 'per-level' string node for this setting */
Gets the 'per-level' string node for this setting if applicable. If the node is not a scaling node, the this will return <code>Optional#empty()</code>
scalingNode
{ "repo_name": "AfterKraft/KraftRPG-API", "path": "src/main/java/com/afterkraft/kraftrpg/api/skill/SkillSetting.java", "license": "mit", "size": 9474 }
[ "java.util.Optional", "org.spongepowered.api.data.DataQuery" ]
import java.util.Optional; import org.spongepowered.api.data.DataQuery;
import java.util.*; import org.spongepowered.api.data.*;
[ "java.util", "org.spongepowered.api" ]
java.util; org.spongepowered.api;
522,561
private static boolean hasHandler(Context context, Intent intent) { List<ResolveInfo> handlers = context.getPackageManager().queryIntentActivities(intent, 0); return !handlers.isEmpty(); }
static boolean function(Context context, Intent intent) { List<ResolveInfo> handlers = context.getPackageManager().queryIntentActivities(intent, 0); return !handlers.isEmpty(); }
/** * Queries on-device packages for a handler for the supplied {@link Intent}. */
Queries on-device packages for a handler for the supplied <code>Intent</code>
hasHandler
{ "repo_name": "shubhamchaudhary/wordpowermadeeasy", "path": "app/src/main/java/org/developfreedom/wordpowermadeeasy/utils/Intents.java", "license": "gpl-3.0", "size": 1931 }
[ "android.content.Context", "android.content.Intent", "android.content.pm.ResolveInfo", "java.util.List" ]
import android.content.Context; import android.content.Intent; import android.content.pm.ResolveInfo; import java.util.List;
import android.content.*; import android.content.pm.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
2,849,368
public YangUInt8 getWaitForNotificationTimerValue() throws JNCException { YangUInt8 waitForNotificationTimer = (YangUInt8)getValue("wait-for-notification-timer"); if (waitForNotificationTimer == null) { waitForNotificationTimer = new YangUInt8("5"); // default } return waitForNotificationTimer; }
YangUInt8 function() throws JNCException { YangUInt8 waitForNotificationTimer = (YangUInt8)getValue(STR); if (waitForNotificationTimer == null) { waitForNotificationTimer = new YangUInt8("5"); } return waitForNotificationTimer; }
/** * Gets the value for child leaf "wait-for-notification-timer". * @return The value of the leaf. */
Gets the value for child leaf "wait-for-notification-timer"
getWaitForNotificationTimerValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/interface_/s101/MmeS101If.java", "license": "apache-2.0", "size": 14237 }
[ "com.tailf.jnc.YangUInt8" ]
import com.tailf.jnc.YangUInt8;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
893,537
public void postFetchInit(DatabaseImpl db, long sourceLsn) throws DatabaseException { super.postFetchInit(db, sourceLsn); memBudget = db.getDbEnvironment().getMemoryBudget(); if (entryVersion == 1 && db.getDbEnvironment().getUtilizationProfile().isRMWFixEnabled()) { obsoleteOffsets = new PackedOffsets(); } }
void function(DatabaseImpl db, long sourceLsn) throws DatabaseException { super.postFetchInit(db, sourceLsn); memBudget = db.getDbEnvironment().getMemoryBudget(); if (entryVersion == 1 && db.getDbEnvironment().getUtilizationProfile().isRMWFixEnabled()) { obsoleteOffsets = new PackedOffsets(); } }
/** * Initialize a node that has been faulted in from the log. If this FSLN * contains version 1 offsets that can be incorrect when RMW was used, and * if je.cleaner.rmwFix is enabled, discard the offsets. [#13158] */
Initialize a node that has been faulted in from the log. If this FSLN contains version 1 offsets that can be incorrect when RMW was used, and if je.cleaner.rmwFix is enabled, discard the offsets. [#13158]
postFetchInit
{ "repo_name": "plast-lab/DelphJ", "path": "examples/berkeleydb/com/sleepycat/je/tree/FileSummaryLN.java", "license": "mit", "size": 13728 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.cleaner.PackedOffsets", "com.sleepycat.je.dbi.DatabaseImpl" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.cleaner.PackedOffsets; import com.sleepycat.je.dbi.DatabaseImpl;
import com.sleepycat.je.*; import com.sleepycat.je.cleaner.*; import com.sleepycat.je.dbi.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,527,168
public synchronized Set<T1> getKeys(T2 value) { Set<T1> keys = _reverse.get(value); if (null == keys) { return Collections.emptySet(); } return new HashSet<>(keys); }
synchronized Set<T1> function(T2 value) { Set<T1> keys = _reverse.get(value); if (null == keys) { return Collections.emptySet(); } return new HashSet<>(keys); }
/** * Search the reverse map for all keys that have been associated with * a particular value. * @return the set of keys that are associated with the specified value, * or an empty set if the value does not exist in the map. */
Search the reverse map for all keys that have been associated with a particular value
getKeys
{ "repo_name": "Niky4000/UsefulUtils", "path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/ManyToMany.java", "license": "gpl-3.0", "size": 11897 }
[ "java.util.Collections", "java.util.HashSet", "java.util.Set" ]
import java.util.Collections; import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
165,930
protected boolean interact(EntityPlayer p_70085_1_) { ItemStack itemstack = p_70085_1_.inventory.getCurrentItem(); if (itemstack != null && itemstack.getItem() == Items.flint_and_steel) { this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.ignite", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F); p_70085_1_.swingItem(); if (!this.worldObj.isRemote) { this.func_146079_cb(); itemstack.damageItem(1, p_70085_1_); return true; } } return super.interact(p_70085_1_); }
boolean function(EntityPlayer p_70085_1_) { ItemStack itemstack = p_70085_1_.inventory.getCurrentItem(); if (itemstack != null && itemstack.getItem() == Items.flint_and_steel) { this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, STR, 1.0F, this.rand.nextFloat() * 0.4F + 0.8F); p_70085_1_.swingItem(); if (!this.worldObj.isRemote) { this.func_146079_cb(); itemstack.damageItem(1, p_70085_1_); return true; } } return super.interact(p_70085_1_); }
/** * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. */
Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig
interact
{ "repo_name": "kenny2810/Mankini", "path": "src/main/java/matgm50/mankini/entity/EntityMankiniCreeper.java", "license": "mit", "size": 10474 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.init.Items", "net.minecraft.item.ItemStack" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack;
import net.minecraft.entity.player.*; import net.minecraft.init.*; import net.minecraft.item.*;
[ "net.minecraft.entity", "net.minecraft.init", "net.minecraft.item" ]
net.minecraft.entity; net.minecraft.init; net.minecraft.item;
2,091,316
private static void checkRequiredArgs(final List<String> requiredArgs, final CommandLine line) { for (final String arg : requiredArgs) { if (!line.hasOption(arg)) { System.err.println("Option is missing: " + arg); printHelpAndExit(); } } }
static void function(final List<String> requiredArgs, final CommandLine line) { for (final String arg : requiredArgs) { if (!line.hasOption(arg)) { System.err.println(STR + arg); printHelpAndExit(); } } }
/** * Check the required args * * @param requiredArgs */
Check the required args
checkRequiredArgs
{ "repo_name": "jnidzwetzki/bboxdb", "path": "bboxdb-experiments/src/main/java/org/bboxdb/tools/generator/SyntheticDataStreamGenerator.java", "license": "apache-2.0", "size": 10871 }
[ "java.util.List", "org.apache.commons.cli.CommandLine" ]
import java.util.List; import org.apache.commons.cli.CommandLine;
import java.util.*; import org.apache.commons.cli.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
322,739
@Override public boolean write(SpreadSheet[] content, OutputStream stream) { switch (getOutputType()) { case FILE: throw new IllegalStateException("Can only write to files!"); case STREAM: return doWrite(content, stream); case WRITER: return doWrite(content, new OutputStreamWriter(stream)); default: throw new IllegalStateException("Unhandled output type: " + getOutputType()); } }
boolean function(SpreadSheet[] content, OutputStream stream) { switch (getOutputType()) { case FILE: throw new IllegalStateException(STR); case STREAM: return doWrite(content, stream); case WRITER: return doWrite(content, new OutputStreamWriter(stream)); default: throw new IllegalStateException(STR + getOutputType()); } }
/** * Writes the spreadsheets to the given output stream. The caller * must ensure that the stream gets closed. * * @param content the spreadsheet to write * @param stream the output stream to write the spreadsheet to * @return true if successfully written */
Writes the spreadsheets to the given output stream. The caller must ensure that the stream gets closed
write
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-spreadsheet/src/main/java/adams/data/io/output/AbstractMultiSheetSpreadSheetWriter.java", "license": "gpl-3.0", "size": 7965 }
[ "java.io.OutputStream", "java.io.OutputStreamWriter" ]
import java.io.OutputStream; import java.io.OutputStreamWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,759,767
Assert.notNull(candidate, "Candidate object must not be null"); Object current = candidate; Class<?> result = null; while (current instanceof TargetClassAware) { result = ((TargetClassAware) current).getTargetClass(); Object nested = null; if (current instanceof Advised) { TargetSource targetSource = ((Advised) current).getTargetSource(); if (targetSource instanceof SingletonTargetSource) { nested = ((SingletonTargetSource) targetSource).getTarget(); } } current = nested; } if (result == null) { result = (AopUtils.isCglibProxy(candidate) ? candidate.getClass().getSuperclass() : candidate.getClass()); } return result; }
Assert.notNull(candidate, STR); Object current = candidate; Class<?> result = null; while (current instanceof TargetClassAware) { result = ((TargetClassAware) current).getTargetClass(); Object nested = null; if (current instanceof Advised) { TargetSource targetSource = ((Advised) current).getTargetSource(); if (targetSource instanceof SingletonTargetSource) { nested = ((SingletonTargetSource) targetSource).getTarget(); } } current = nested; } if (result == null) { result = (AopUtils.isCglibProxy(candidate) ? candidate.getClass().getSuperclass() : candidate.getClass()); } return result; }
/** * Determine the ultimate target class of the given bean instance, traversing * not only a top-level proxy but any number of nested proxies as well &mdash; * as long as possible without side effects, that is, just for singleton targets. * @param candidate the instance to check (might be an AOP proxy) * @return the ultimate target class (or the plain class of the given * object as fallback; never {@code null}) * @see org.springframework.aop.TargetClassAware#getTargetClass() * @see Advised#getTargetSource() */
Determine the ultimate target class of the given bean instance, traversing not only a top-level proxy but any number of nested proxies as well &mdash; as long as possible without side effects, that is, just for singleton targets
ultimateTargetClass
{ "repo_name": "shivpun/spring-framework", "path": "spring-aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java", "license": "apache-2.0", "size": 8945 }
[ "org.springframework.aop.TargetClassAware", "org.springframework.aop.TargetSource", "org.springframework.aop.support.AopUtils", "org.springframework.aop.target.SingletonTargetSource", "org.springframework.util.Assert" ]
import org.springframework.aop.TargetClassAware; import org.springframework.aop.TargetSource; import org.springframework.aop.support.AopUtils; import org.springframework.aop.target.SingletonTargetSource; import org.springframework.util.Assert;
import org.springframework.aop.*; import org.springframework.aop.support.*; import org.springframework.aop.target.*; import org.springframework.util.*;
[ "org.springframework.aop", "org.springframework.util" ]
org.springframework.aop; org.springframework.util;
805,850
protected void setCsip() { try { csip = (Inet4Address) Inet4Address.getByAddress(reader.readIP(CSIP_POS + position)); } catch (UnknownHostException ex) { Logger.getLogger(QueueIndexImpl.class.getName()).log(Level.SEVERE, null, ex); } }
void function() { try { csip = (Inet4Address) Inet4Address.getByAddress(reader.readIP(CSIP_POS + position)); } catch (UnknownHostException ex) { Logger.getLogger(QueueIndexImpl.class.getName()).log(Level.SEVERE, null, ex); } }
/** * <p>Setter for the field <code>csip</code>.</p> */
Setter for the field <code>csip</code>
setCsip
{ "repo_name": "mikepthomas/fahview", "path": "FAHView-v6project/src/main/java/info/mikethomas/fahview/v6project/model/QueueIndexImpl.java", "license": "gpl-3.0", "size": 21521 }
[ "java.net.Inet4Address", "java.net.UnknownHostException", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.net.Inet4Address; import java.net.UnknownHostException; import java.util.logging.Level; import java.util.logging.Logger;
import java.net.*; import java.util.logging.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,622,895
@Override public void onBindViewHolder(@NonNull FAQViewHolder viewHolder, int position) { FAQItem faqItem = mFaqs.get(position); viewHolder.question.setText(faqItem.getQuestion()); viewHolder.answer.setText(faqItem.getAnswer()); boolean isExpanded = faqItem.isExpanded(); viewHolder.expandableView.setVisibility(isExpanded ? View.VISIBLE : View.GONE); }
void function(@NonNull FAQViewHolder viewHolder, int position) { FAQItem faqItem = mFaqs.get(position); viewHolder.question.setText(faqItem.getQuestion()); viewHolder.answer.setText(faqItem.getAnswer()); boolean isExpanded = faqItem.isExpanded(); viewHolder.expandableView.setVisibility(isExpanded ? View.VISIBLE : View.GONE); }
/** * Binds the FAQItem with the proper data that it fetches from List * @param viewHolder - holds view * @param position - view position */
Binds the FAQItem with the proper data that it fetches from List
onBindViewHolder
{ "repo_name": "Swati4star/Images-to-PDF", "path": "app/src/main/java/swati4star/createpdf/adapter/FAQAdapter.java", "license": "gpl-3.0", "size": 2889 }
[ "android.view.View", "androidx.annotation.NonNull" ]
import android.view.View; import androidx.annotation.NonNull;
import android.view.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
603,594
public static String[][] executeQuery(String sql, Connection connection, Object... params) { PreparedStatement prepareStatement = null; ResultSet rs = null; logger.debug("Executing the SQL : " + sql); try { prepareStatement = connection.prepareStatement(sql); int index = 1; for (Object param : params) { logger.debug("Param " + index + " : " + param); if (param instanceof BigDecimal) { prepareStatement.setBigDecimal(index++, (BigDecimal) param); } else if (param instanceof String) { prepareStatement.setString(index++, (String) param); } else if (param instanceof Long) { prepareStatement.setLong(index++, (Long) param); } else if (param instanceof Integer) { prepareStatement.setInt(index++, (Integer) param); } else if (param instanceof Float) { prepareStatement.setFloat(index++, (Float) param); } else { logger.error("Object Type not identfied for param " + param.toString()); prepareStatement.setObject(index++, param); } } rs = prepareStatement.executeQuery(); String[][] results = getResult(rs); close(rs); return results; } catch (SQLException e) { throw new RuntimeException("Exception while firing Parameterized query.", e, ErrorCodeConstants.DB_0003); } }
static String[][] function(String sql, Connection connection, Object... params) { PreparedStatement prepareStatement = null; ResultSet rs = null; logger.debug(STR + sql); try { prepareStatement = connection.prepareStatement(sql); int index = 1; for (Object param : params) { logger.debug(STR + index + STR + param); if (param instanceof BigDecimal) { prepareStatement.setBigDecimal(index++, (BigDecimal) param); } else if (param instanceof String) { prepareStatement.setString(index++, (String) param); } else if (param instanceof Long) { prepareStatement.setLong(index++, (Long) param); } else if (param instanceof Integer) { prepareStatement.setInt(index++, (Integer) param); } else if (param instanceof Float) { prepareStatement.setFloat(index++, (Float) param); } else { logger.error(STR + param.toString()); prepareStatement.setObject(index++, param); } } rs = prepareStatement.executeQuery(); String[][] results = getResult(rs); close(rs); return results; } catch (SQLException e) { throw new RuntimeException(STR, e, ErrorCodeConstants.DB_0003); } }
/** * This method executes the given SELECT SQL query using passes parameters. * It uses prepare statement and maintains a static map of those to reuse those if same query is fired again. * @param sql The SQL statement. * @param connection database connection to be used * @param params All the parameter objects. * @return String[][] as result of the query with each row represents one record of result set and * each column in array is a column present in SELECT clause. * The order of columns is same as that present in the passes SQL. */
This method executes the given SELECT SQL query using passes parameters. It uses prepare statement and maintains a static map of those to reuse those if same query is fired again
executeQuery
{ "repo_name": "NCIP/cab2b", "path": "software/cab2b/src/java/server/edu/wustl/cab2b/server/util/SQLQueryUtil.java", "license": "bsd-3-clause", "size": 6435 }
[ "edu.wustl.cab2b.common.errorcodes.ErrorCodeConstants", "edu.wustl.cab2b.common.exception.RuntimeException", "java.math.BigDecimal", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import edu.wustl.cab2b.common.errorcodes.ErrorCodeConstants; import edu.wustl.cab2b.common.exception.RuntimeException; import java.math.BigDecimal; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import edu.wustl.cab2b.common.errorcodes.*; import edu.wustl.cab2b.common.exception.*; import java.math.*; import java.sql.*;
[ "edu.wustl.cab2b", "java.math", "java.sql" ]
edu.wustl.cab2b; java.math; java.sql;
1,196,664
public static void setSubject(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.set(model, instanceResource, SUBJECT, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.set(model, instanceResource, SUBJECT, value); }
/** * Sets a value of property Subject from an RDF2Go node. First, all existing * values are removed, then this value is added. Cardinality constraints are * not checked, but this method exists only for properties with no * minCardinality or minCardinality == 1. * * @param model * an RDF2Go model * @param resource * an RDF2Go resource * @param value * the value to be set * * [Generated from RDFReactor template rule #set1static] */
Sets a value of property Subject from an RDF2Go node. First, all existing values are removed, then this value is added. Cardinality constraints are not checked, but this method exists only for properties with no minCardinality or minCardinality == 1
setSubject
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java", "license": "mit", "size": 317844 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
1,084,048
private AbstractOutlineConfiguration createBubbleSetConfiguration( final Canvas canvas) { return new AbstractOutlineConfiguration(canvas, this) { // the serial version uid private static final long serialVersionUID = -4099593260786691472L; private static final double GRANULARITY = 0.5; private final JSlider routingIt = new JSlider(10, 1000); private final JSlider marchingIt = new JSlider(1, 100); private final JSlider pixelGroup = new JSlider(1, 10); private final JSlider edgeR0 = new JSlider(1, 200); private final JSlider edgeR1 = new JSlider(1, 200); private final JSlider nodeR0 = new JSlider(1, 200); private final JSlider nodeR1 = new JSlider(1, 200); private final JSlider morphingSlider = new JSlider(1, 200); private final JSlider skip = new JSlider(1, 30); private final JLabel routingItLabel = new JLabel(); private final JLabel marchingItLabel = new JLabel(); private final JLabel pixelGroupLabel = new JLabel(); private final JLabel edgeR0Label = new JLabel(); private final JLabel edgeR1Label = new JLabel(); private final JLabel nodeR0Label = new JLabel(); private final JLabel nodeR1Label = new JLabel(); private final JLabel morphingSliderLabel = new JLabel(); private final JLabel skipLabel = new JLabel(); private boolean textUpdate = true;
AbstractOutlineConfiguration function( final Canvas canvas) { return new AbstractOutlineConfiguration(canvas, this) { private static final long serialVersionUID = -4099593260786691472L; private static final double GRANULARITY = 0.5; private final JSlider routingIt = new JSlider(10, 1000); private final JSlider marchingIt = new JSlider(1, 100); private final JSlider pixelGroup = new JSlider(1, 10); private final JSlider edgeR0 = new JSlider(1, 200); private final JSlider edgeR1 = new JSlider(1, 200); private final JSlider nodeR0 = new JSlider(1, 200); private final JSlider nodeR1 = new JSlider(1, 200); private final JSlider morphingSlider = new JSlider(1, 200); private final JSlider skip = new JSlider(1, 30); private final JLabel routingItLabel = new JLabel(); private final JLabel marchingItLabel = new JLabel(); private final JLabel pixelGroupLabel = new JLabel(); private final JLabel edgeR0Label = new JLabel(); private final JLabel edgeR1Label = new JLabel(); private final JLabel nodeR0Label = new JLabel(); private final JLabel nodeR1Label = new JLabel(); private final JLabel morphingSliderLabel = new JLabel(); private final JLabel skipLabel = new JLabel(); private boolean textUpdate = true;
/** * Creates a bubble set configuration panel for the given canvas. * * @param canvas * The canvas. * @return The bubble set configuration panel. */
Creates a bubble set configuration panel for the given canvas
createBubbleSetConfiguration
{ "repo_name": "Caleydo/caleydo", "path": "org.caleydo.util.bubblesets/src/setvis/gui/OutlineType.java", "license": "bsd-3-clause", "size": 12812 }
[ "javax.swing.JLabel", "javax.swing.JSlider" ]
import javax.swing.JLabel; import javax.swing.JSlider;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,412,665
public final AlgorithmParameterSpec getParameterSpec(Class paramSpec) throws InvalidParameterSpecException { return paramSpi.engineGetParameterSpec(paramSpec); }
final AlgorithmParameterSpec function(Class paramSpec) throws InvalidParameterSpecException { return paramSpi.engineGetParameterSpec(paramSpec); }
/** * Returns a new instance of <code>AlgorithmParameters</code> as a * designated parameter specification {@link Class}. * * @param paramSpec * the {@link Class} to use. * @return the parameter specification. * @throws InvalidParameterSpecException * if <code>paramSpec</code> is invalid. */
Returns a new instance of <code>AlgorithmParameters</code> as a designated parameter specification <code>Class</code>
getParameterSpec
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/java/security/AlgorithmParameters.java", "license": "bsd-3-clause", "size": 10089 }
[ "java.security.spec.AlgorithmParameterSpec", "java.security.spec.InvalidParameterSpecException" ]
import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidParameterSpecException;
import java.security.spec.*;
[ "java.security" ]
java.security;
2,204,802
public boolean checkAccess(ContextEntry contextEntry, BusinessControl businessControl, Identity identity, Roles roles);
boolean function(ContextEntry contextEntry, BusinessControl businessControl, Identity identity, Roles roles);
/** * Check access for certain business-control (resourceUrl) and user with roles. * @param contextEntry * @param businessControl * @param identity * @param roles * @return */
Check access for certain business-control (resourceUrl) and user with roles
checkAccess
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/main/java/org/olat/search/service/indexer/IndexerAccessSecurityCallback.java", "license": "apache-2.0", "size": 1579 }
[ "org.olat.core.id.Identity", "org.olat.core.id.Roles", "org.olat.core.id.context.BusinessControl", "org.olat.core.id.context.ContextEntry" ]
import org.olat.core.id.Identity; import org.olat.core.id.Roles; import org.olat.core.id.context.BusinessControl; import org.olat.core.id.context.ContextEntry;
import org.olat.core.id.*; import org.olat.core.id.context.*;
[ "org.olat.core" ]
org.olat.core;
122,560
public List<Integer> toList() { final TreeToList treeToList = new TreeToList(); this.root.forEach(treeToList); return treeToList.getList(); }
List<Integer> function() { final TreeToList treeToList = new TreeToList(); this.root.forEach(treeToList); return treeToList.getList(); }
/** * Return list of elements. * @return list of elements */
Return list of elements
toList
{ "repo_name": "tgenman/dbondarev", "path": "chapter_004/src/main/java/ru/job4j/tree/BinarySearchTree.java", "license": "apache-2.0", "size": 2172 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,257,420
public static Drawable getSaveFlowStartIconForBookmark(BookmarkId bookmarkId) { // TODO(crbug.com/1243383): Add start icon for price tracking. return null; }
static Drawable function(BookmarkId bookmarkId) { return null; }
/** * Retrieve the save flow start icon for the given bookmark. * * @param bookmarkId The {@link BookmarkId} to get the start icon for. * @return The start icon associated with the given bookmarkId. */
Retrieve the save flow start icon for the given bookmark
getSaveFlowStartIconForBookmark
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java", "license": "bsd-3-clause", "size": 36062 }
[ "android.graphics.drawable.Drawable", "org.chromium.components.bookmarks.BookmarkId" ]
import android.graphics.drawable.Drawable; import org.chromium.components.bookmarks.BookmarkId;
import android.graphics.drawable.*; import org.chromium.components.bookmarks.*;
[ "android.graphics", "org.chromium.components" ]
android.graphics; org.chromium.components;
1,737,232
@Test public void testCleanEmptyParentDirWithSystemMetaDataFile() throws Exception { File emptyGrandParent = new File(rootDir, "ae"); emptyGrandParent.mkdir(); File metaDataFile = new File(emptyGrandParent, ".DS_Store"); metaDataFile.createNewFile(); assertThat(emptyGrandParent.exists(), is(true)); assertThat(metaDataFile.exists(), is(true)); Map<String, Set<String>> result = repository.cleanObsoleteContent(); // To mark content for deletion assertThat(result.get(ContentRepository.MARKED_CONTENT).size(), is(1)); assertThat(result.get(ContentRepository.DELETED_CONTENT).size(), is(0)); assertThat(result.get(ContentRepository.MARKED_CONTENT).contains(metaDataFile.getAbsolutePath()), is(true)); Thread.sleep(10); result = repository.cleanObsoleteContent(); assertThat(emptyGrandParent.exists(), is(false)); assertThat(metaDataFile.exists(), is(false)); assertThat(result.get(ContentRepository.MARKED_CONTENT).size(), is(0)); assertThat(result.get(ContentRepository.DELETED_CONTENT).size(), is(1)); assertThat(result.get(ContentRepository.DELETED_CONTENT).contains(metaDataFile.getAbsolutePath()), is(true)); }
void function() throws Exception { File emptyGrandParent = new File(rootDir, "ae"); emptyGrandParent.mkdir(); File metaDataFile = new File(emptyGrandParent, STR); metaDataFile.createNewFile(); assertThat(emptyGrandParent.exists(), is(true)); assertThat(metaDataFile.exists(), is(true)); Map<String, Set<String>> result = repository.cleanObsoleteContent(); assertThat(result.get(ContentRepository.MARKED_CONTENT).size(), is(1)); assertThat(result.get(ContentRepository.DELETED_CONTENT).size(), is(0)); assertThat(result.get(ContentRepository.MARKED_CONTENT).contains(metaDataFile.getAbsolutePath()), is(true)); Thread.sleep(10); result = repository.cleanObsoleteContent(); assertThat(emptyGrandParent.exists(), is(false)); assertThat(metaDataFile.exists(), is(false)); assertThat(result.get(ContentRepository.MARKED_CONTENT).size(), is(0)); assertThat(result.get(ContentRepository.DELETED_CONTENT).size(), is(1)); assertThat(result.get(ContentRepository.DELETED_CONTENT).contains(metaDataFile.getAbsolutePath()), is(true)); }
/** * Test that an empty dir with a system metadata file .DS_Store will be removed during cleaning. */
Test that an empty dir with a system metadata file .DS_Store will be removed during cleaning
testCleanEmptyParentDirWithSystemMetaDataFile
{ "repo_name": "JiriOndrusek/wildfly-core", "path": "deployment-repository/src/test/java/org/jboss/as/repository/ContentRepositoryTest.java", "license": "lgpl-2.1", "size": 34875 }
[ "java.io.File", "java.util.Map", "java.util.Set", "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import java.io.File; import java.util.Map; import java.util.Set; import org.hamcrest.CoreMatchers; import org.junit.Assert;
import java.io.*; import java.util.*; import org.hamcrest.*; import org.junit.*;
[ "java.io", "java.util", "org.hamcrest", "org.junit" ]
java.io; java.util; org.hamcrest; org.junit;
2,019,578
@Test public void testGetDummy_1() throws Exception { ClearCookiesStep fixture = new ClearCookiesStep(); fixture.setDummy(""); fixture.stepIndex = 1; String result = fixture.getDummy(); assertEquals("", result); }
void function() throws Exception { ClearCookiesStep fixture = new ClearCookiesStep(); fixture.setDummy(STR", result); }
/** * Run the String getDummy() method test. * * @throws Exception * * @generatedBy CodePro at 9/10/14 9:36 AM */
Run the String getDummy() method test
testGetDummy_1
{ "repo_name": "rkadle/Tank", "path": "harness_data/src/test/java/com/intuit/tank/harness/data/ClearCookiesStepTest.java", "license": "epl-1.0", "size": 2805 }
[ "com.intuit.tank.harness.data.ClearCookiesStep" ]
import com.intuit.tank.harness.data.ClearCookiesStep;
import com.intuit.tank.harness.data.*;
[ "com.intuit.tank" ]
com.intuit.tank;
2,451,726
public void addRow(ListItemObject newObj) { final CustomArrayAdapter adapter = (CustomArrayAdapter)getAdapter(); final HashMap<Long, Rect> listViewItemBounds = new HashMap<Long, Rect>(); final HashMap<Long, BitmapDrawable> listViewItemDrawables = new HashMap<Long, BitmapDrawable>(); int firstVisiblePosition = getFirstVisiblePosition(); for (int i = 0; i < getChildCount(); ++i) { View child = getChildAt(i); int position = firstVisiblePosition + i; long itemID = adapter.getItemId(position); Rect startRect = new Rect(child.getLeft(), child.getTop(), child.getRight(), child.getBottom()); listViewItemBounds.put(itemID, startRect); listViewItemDrawables.put(itemID, getBitmapDrawableFromView(child)); } mData.add(0, newObj); adapter.addStableIdForDataAtPosition(0); adapter.notifyDataSetChanged();
void function(ListItemObject newObj) { final CustomArrayAdapter adapter = (CustomArrayAdapter)getAdapter(); final HashMap<Long, Rect> listViewItemBounds = new HashMap<Long, Rect>(); final HashMap<Long, BitmapDrawable> listViewItemDrawables = new HashMap<Long, BitmapDrawable>(); int firstVisiblePosition = getFirstVisiblePosition(); for (int i = 0; i < getChildCount(); ++i) { View child = getChildAt(i); int position = firstVisiblePosition + i; long itemID = adapter.getItemId(position); Rect startRect = new Rect(child.getLeft(), child.getTop(), child.getRight(), child.getBottom()); listViewItemBounds.put(itemID, startRect); listViewItemDrawables.put(itemID, getBitmapDrawableFromView(child)); } mData.add(0, newObj); adapter.addStableIdForDataAtPosition(0); adapter.notifyDataSetChanged();
/** * Modifies the underlying data set and adapter through the addition of the new object * to the first item of the ListView. The new cell is then animated into place from * above the bounds of the ListView. */
Modifies the underlying data set and adapter through the addition of the new object to the first item of the ListView. The new cell is then animated into place from above the bounds of the ListView
addRow
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/development/samples/devbytes/animation/ListViewCellInsertion/src/com/example/android/insertingcells/InsertionListView.java", "license": "apache-2.0", "size": 16406 }
[ "android.graphics.Rect", "android.graphics.drawable.BitmapDrawable", "android.view.View", "java.util.HashMap" ]
import android.graphics.Rect; import android.graphics.drawable.BitmapDrawable; import android.view.View; import java.util.HashMap;
import android.graphics.*; import android.graphics.drawable.*; import android.view.*; import java.util.*;
[ "android.graphics", "android.view", "java.util" ]
android.graphics; android.view; java.util;
2,864,009
@Test public void testRpcValues() { // Test Values Double testScale = ((ShowConstantTbt) msg).getDistanceToManeuverScale(); Double testDistance = ((ShowConstantTbt) msg).getDistanceToManeuver(); String testEta = ((ShowConstantTbt) msg).getEta(); String testTimeToDestination = ((ShowConstantTbt) msg).getTimeToDestination(); String testTotalDistance = ((ShowConstantTbt) msg).getTotalDistance(); String testNavText2 = ((ShowConstantTbt) msg).getNavigationText2(); String testNavText1 = ((ShowConstantTbt) msg).getNavigationText1(); Boolean testManeuverComplete = ((ShowConstantTbt) msg).getManeuverComplete(); Image testTurnIcon = ((ShowConstantTbt) msg).getTurnIcon(); Image testNextTurnIcon = ((ShowConstantTbt) msg).getNextTurnIcon(); List<SoftButton> testSoftButtons = ((ShowConstantTbt) msg).getSoftButtons(); // Valid Test assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testTimeToDestination); assertEquals(TestValues.MATCH, TestValues.GENERAL_DOUBLE, testScale); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testNavText1); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testNavText2); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testEta); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testTotalDistance); assertEquals(TestValues.MATCH, TestValues.GENERAL_DOUBLE, testDistance); assertTrue(TestValues.TRUE, testManeuverComplete); assertTrue(TestValues.TRUE, Validator.validateSoftButtons(TestValues.GENERAL_SOFTBUTTON_LIST, testSoftButtons)); assertTrue(TestValues.TRUE, Validator.validateImage(TestValues.GENERAL_IMAGE, testTurnIcon)); assertTrue(TestValues.TRUE, Validator.validateImage(TestValues.GENERAL_IMAGE, testNextTurnIcon)); // Invalid/Null Tests ShowConstantTbt msg = new ShowConstantTbt(); assertNotNull(TestValues.NOT_NULL, msg); testNullBase(msg); assertNull(TestValues.NULL, msg.getSoftButtons()); assertNull(TestValues.NULL, msg.getNavigationText1()); assertNull(TestValues.NULL, msg.getNavigationText2()); assertNull(TestValues.NULL, msg.getDistanceToManeuver()); assertNull(TestValues.NULL, msg.getDistanceToManeuverScale()); assertNull(TestValues.NULL, msg.getEta()); assertNull(TestValues.NULL, msg.getManeuverComplete()); assertNull(TestValues.NULL, msg.getNextTurnIcon()); assertNull(TestValues.NULL, msg.getTimeToDestination()); assertNull(TestValues.NULL, msg.getTotalDistance()); assertNull(TestValues.NULL, msg.getTurnIcon()); }
void function() { Double testScale = ((ShowConstantTbt) msg).getDistanceToManeuverScale(); Double testDistance = ((ShowConstantTbt) msg).getDistanceToManeuver(); String testEta = ((ShowConstantTbt) msg).getEta(); String testTimeToDestination = ((ShowConstantTbt) msg).getTimeToDestination(); String testTotalDistance = ((ShowConstantTbt) msg).getTotalDistance(); String testNavText2 = ((ShowConstantTbt) msg).getNavigationText2(); String testNavText1 = ((ShowConstantTbt) msg).getNavigationText1(); Boolean testManeuverComplete = ((ShowConstantTbt) msg).getManeuverComplete(); Image testTurnIcon = ((ShowConstantTbt) msg).getTurnIcon(); Image testNextTurnIcon = ((ShowConstantTbt) msg).getNextTurnIcon(); List<SoftButton> testSoftButtons = ((ShowConstantTbt) msg).getSoftButtons(); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testTimeToDestination); assertEquals(TestValues.MATCH, TestValues.GENERAL_DOUBLE, testScale); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testNavText1); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testNavText2); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testEta); assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testTotalDistance); assertEquals(TestValues.MATCH, TestValues.GENERAL_DOUBLE, testDistance); assertTrue(TestValues.TRUE, testManeuverComplete); assertTrue(TestValues.TRUE, Validator.validateSoftButtons(TestValues.GENERAL_SOFTBUTTON_LIST, testSoftButtons)); assertTrue(TestValues.TRUE, Validator.validateImage(TestValues.GENERAL_IMAGE, testTurnIcon)); assertTrue(TestValues.TRUE, Validator.validateImage(TestValues.GENERAL_IMAGE, testNextTurnIcon)); ShowConstantTbt msg = new ShowConstantTbt(); assertNotNull(TestValues.NOT_NULL, msg); testNullBase(msg); assertNull(TestValues.NULL, msg.getSoftButtons()); assertNull(TestValues.NULL, msg.getNavigationText1()); assertNull(TestValues.NULL, msg.getNavigationText2()); assertNull(TestValues.NULL, msg.getDistanceToManeuver()); assertNull(TestValues.NULL, msg.getDistanceToManeuverScale()); assertNull(TestValues.NULL, msg.getEta()); assertNull(TestValues.NULL, msg.getManeuverComplete()); assertNull(TestValues.NULL, msg.getNextTurnIcon()); assertNull(TestValues.NULL, msg.getTimeToDestination()); assertNull(TestValues.NULL, msg.getTotalDistance()); assertNull(TestValues.NULL, msg.getTurnIcon()); }
/** * Tests the expected values of the RPC message. */
Tests the expected values of the RPC message
testRpcValues
{ "repo_name": "smartdevicelink/sdl_android", "path": "android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java", "license": "bsd-3-clause", "size": 9924 }
[ "com.smartdevicelink.proxy.rpc.Image", "com.smartdevicelink.proxy.rpc.ShowConstantTbt", "com.smartdevicelink.proxy.rpc.SoftButton", "com.smartdevicelink.test.TestValues", "com.smartdevicelink.test.Validator", "java.util.List", "junit.framework.TestCase" ]
import com.smartdevicelink.proxy.rpc.Image; import com.smartdevicelink.proxy.rpc.ShowConstantTbt; import com.smartdevicelink.proxy.rpc.SoftButton; import com.smartdevicelink.test.TestValues; import com.smartdevicelink.test.Validator; import java.util.List; import junit.framework.TestCase;
import com.smartdevicelink.proxy.rpc.*; import com.smartdevicelink.test.*; import java.util.*; import junit.framework.*;
[ "com.smartdevicelink.proxy", "com.smartdevicelink.test", "java.util", "junit.framework" ]
com.smartdevicelink.proxy; com.smartdevicelink.test; java.util; junit.framework;
65,660
private String extractStreamMessageContent(ByteBuffer wrapMsgContent, String encoding) throws CharacterCodingException { String wholeMsg; boolean eofReached = false; StringBuilder messageContentBuilder = new StringBuilder(); while (!eofReached) { try { Object obj = readObject(wrapMsgContent, encoding); // obj could be null if the wire type is AbstractBytesTypedMessage.NULL_STRING_TYPE if (null != obj) { messageContentBuilder.append(obj.toString()).append(", "); } } catch (MessageEOFException ex) { eofReached = true; } catch (MessageNotReadableException e) { eofReached = true; } catch (MessageFormatException e) { eofReached = true; } catch (JMSException e) { eofReached = true; } } wholeMsg = StringEscapeUtils.escapeHtml(messageContentBuilder.toString()); return wholeMsg; }
String function(ByteBuffer wrapMsgContent, String encoding) throws CharacterCodingException { String wholeMsg; boolean eofReached = false; StringBuilder messageContentBuilder = new StringBuilder(); while (!eofReached) { try { Object obj = readObject(wrapMsgContent, encoding); if (null != obj) { messageContentBuilder.append(obj.toString()).append(STR); } } catch (MessageEOFException ex) { eofReached = true; } catch (MessageNotReadableException e) { eofReached = true; } catch (MessageFormatException e) { eofReached = true; } catch (JMSException e) { eofReached = true; } } wholeMsg = StringEscapeUtils.escapeHtml(messageContentBuilder.toString()); return wholeMsg; }
/** * Extract StreamMessage from ByteBuffer * * @param wrapMsgContent ByteBuffer which contains data * @param encoding message encoding * @return extracted content as text * @throws CharacterCodingException */
Extract StreamMessage from ByteBuffer
extractStreamMessageContent
{ "repo_name": "Asitha/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/server/information/management/QueueManagementInformationMBean.java", "license": "apache-2.0", "size": 46750 }
[ "java.nio.charset.CharacterCodingException", "javax.jms.JMSException", "javax.jms.MessageEOFException", "javax.jms.MessageFormatException", "javax.jms.MessageNotReadableException", "org.apache.commons.lang.StringEscapeUtils", "org.apache.mina.common.ByteBuffer" ]
import java.nio.charset.CharacterCodingException; import javax.jms.JMSException; import javax.jms.MessageEOFException; import javax.jms.MessageFormatException; import javax.jms.MessageNotReadableException; import org.apache.commons.lang.StringEscapeUtils; import org.apache.mina.common.ByteBuffer;
import java.nio.charset.*; import javax.jms.*; import org.apache.commons.lang.*; import org.apache.mina.common.*;
[ "java.nio", "javax.jms", "org.apache.commons", "org.apache.mina" ]
java.nio; javax.jms; org.apache.commons; org.apache.mina;
2,847,883
@Test public void testRuleConditions() { RuleEngine ruleEngine = createRuleEngine(); Rule rule1 = createRule(); ruleEngine.addRule(rule1, true); Rule rule1Get = ruleEngine.getRule("rule1"); List<Condition> conditionsGet = rule1Get.getConditions(); Assert.assertNotNull("Null conditions list", conditionsGet); Assert.assertEquals("Empty conditions list", 1, conditionsGet.size()); Assert.assertEquals("Returned conditions list should not be a copy", conditionsGet, rule1Get.getConditions()); conditionsGet.add(new Condition("conditionId2", "typeUID2", null, null)); ruleEngine.updateRule(rule1Get);// ruleEngine.update will update the RuntimeRule.moduleMap with the new // module Rule rule2Get = ruleEngine.getRule("rule1"); List<Condition> conditionsGet2 = rule2Get.getConditions(); Assert.assertNotNull("Null conditions list", conditionsGet2); Assert.assertEquals("Condition was not added to the rule's list of conditions", 2, conditionsGet2.size()); Assert.assertEquals("Returned conditions list should not be a copy", conditionsGet2, rule2Get.getConditions()); Assert.assertNotNull("Rule condition with wrong id is returned: " + conditionsGet2, rule2Get.getModule("conditionId2")); }
void function() { RuleEngine ruleEngine = createRuleEngine(); Rule rule1 = createRule(); ruleEngine.addRule(rule1, true); Rule rule1Get = ruleEngine.getRule("rule1"); List<Condition> conditionsGet = rule1Get.getConditions(); Assert.assertNotNull(STR, conditionsGet); Assert.assertEquals(STR, 1, conditionsGet.size()); Assert.assertEquals(STR, conditionsGet, rule1Get.getConditions()); conditionsGet.add(new Condition(STR, STR, null, null)); ruleEngine.updateRule(rule1Get); Rule rule2Get = ruleEngine.getRule("rule1"); List<Condition> conditionsGet2 = rule2Get.getConditions(); Assert.assertNotNull(STR, conditionsGet2); Assert.assertEquals(STR, 2, conditionsGet2.size()); Assert.assertEquals(STR, conditionsGet2, rule2Get.getConditions()); Assert.assertNotNull(STR + conditionsGet2, rule2Get.getModule(STR)); }
/** * test rule conditions */
test rule conditions
testRuleConditions
{ "repo_name": "shry15harsh/smarthome", "path": "bundles/automation/org.eclipse.smarthome.automation.core.test/src/test/java/org/eclipse/smarthome/automation/core/internal/RuleEngineTest.java", "license": "epl-1.0", "size": 18243 }
[ "java.util.List", "org.eclipse.smarthome.automation.Condition", "org.eclipse.smarthome.automation.Rule", "org.junit.Assert" ]
import java.util.List; import org.eclipse.smarthome.automation.Condition; import org.eclipse.smarthome.automation.Rule; import org.junit.Assert;
import java.util.*; import org.eclipse.smarthome.automation.*; import org.junit.*;
[ "java.util", "org.eclipse.smarthome", "org.junit" ]
java.util; org.eclipse.smarthome; org.junit;
2,002,493
public String getEffectiveListName() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String activeListName = getActiveListName(); if (activeListName != null) { return activeListName; } return getDefaultListName(); }
String function() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String activeListName = getActiveListName(); if (activeListName != null) { return activeListName; } return getDefaultListName(); }
/** * Returns the name of the effective privacy list. * <p> * The effective privacy list is the one that is currently enforced on the connection. It's either the active * privacy list, or, if the active privacy list is not set, the default privacy list. * </p> * * @return the name of the effective privacy list or null if there is none set. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @since 4.1 */
Returns the name of the effective privacy list. The effective privacy list is the one that is currently enforced on the connection. It's either the active privacy list, or, if the active privacy list is not set, the default privacy list.
getEffectiveListName
{ "repo_name": "lovely3x/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java", "license": "apache-2.0", "size": 24096 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,782,358
public QueryAtomGroupImpl pop() { QueryAtomGroupImpl group = new QueryAtomGroupImpl(); boolean first = true; for(QueryAtom atom : atoms) { if(first) { first = false; } else { group.addAtom(atom); } } return group; }
QueryAtomGroupImpl function() { QueryAtomGroupImpl group = new QueryAtomGroupImpl(); boolean first = true; for(QueryAtom atom : atoms) { if(first) { first = false; } else { group.addAtom(atom); } } return group; }
/** * A convenience method to clone the atom group instance and pop the first atom. * Only the instance itself will be cloned not the atoms. * * @return A new query instance with the first atom removed. */
A convenience method to clone the atom group instance and pop the first atom. Only the instance itself will be cloned not the atoms
pop
{ "repo_name": "modelfabric/sparql-dl-api", "path": "src/main/java/de/derivo/sparqldlapi/impl/QueryAtomGroupImpl.java", "license": "lgpl-3.0", "size": 3165 }
[ "de.derivo.sparqldlapi.QueryAtom" ]
import de.derivo.sparqldlapi.QueryAtom;
import de.derivo.sparqldlapi.*;
[ "de.derivo.sparqldlapi" ]
de.derivo.sparqldlapi;
1,030,066
private DefaultSetting readPropertiesFile(String filename) throws IOException { Properties prop = new Properties(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream input = loader.getResourceAsStream(filename); DefaultSetting setting = new DefaultSetting(); // load a properties file prop.load(input); // get the property value, store it, and return it setting.setPrepend(prop.getProperty("prepend")); setting.setPrefix(prop.getProperty("prefix")); setting.setCacheSize(Long.parseLong(prop.getProperty("cacheSize"))); setting.setCharMap(prop.getProperty("charMap")); setting.setTokenType(Token.valueOf(prop.getProperty("tokenType"))); setting.setRootLength(Integer.parseInt(prop.getProperty("rootLength"))); setting.setSansVowels(Boolean.parseBoolean(prop.getProperty("sansVowel"))); setting.setAuto(Boolean.parseBoolean(prop.getProperty("auto"))); setting.setRandom(Boolean.parseBoolean(prop.getProperty("random"))); // close and return input.close(); return setting; }
DefaultSetting function(String filename) throws IOException { Properties prop = new Properties(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); InputStream input = loader.getResourceAsStream(filename); DefaultSetting setting = new DefaultSetting(); prop.load(input); setting.setPrepend(prop.getProperty(STR)); setting.setPrefix(prop.getProperty(STR)); setting.setCacheSize(Long.parseLong(prop.getProperty(STR))); setting.setCharMap(prop.getProperty(STR)); setting.setTokenType(Token.valueOf(prop.getProperty(STR))); setting.setRootLength(Integer.parseInt(prop.getProperty(STR))); setting.setSansVowels(Boolean.parseBoolean(prop.getProperty(STR))); setting.setAuto(Boolean.parseBoolean(prop.getProperty("auto"))); setting.setRandom(Boolean.parseBoolean(prop.getProperty(STR))); input.close(); return setting; }
/** * Read a given properties file and return its values in the form of a * DefaultSetting object * * @return DefaultSetting object with read values * @throws IOException Thrown when the file cannot be found */
Read a given properties file and return its values in the form of a DefaultSetting object
readPropertiesFile
{ "repo_name": "Khyzad/PID-webservice", "path": "Minter/src/test/java/com/hida/service/MinterServiceTest.java", "license": "apache-2.0", "size": 18393 }
[ "com.hida.model.DefaultSetting", "com.hida.model.Token", "java.io.IOException", "java.io.InputStream", "java.util.Properties" ]
import com.hida.model.DefaultSetting; import com.hida.model.Token; import java.io.IOException; import java.io.InputStream; import java.util.Properties;
import com.hida.model.*; import java.io.*; import java.util.*;
[ "com.hida.model", "java.io", "java.util" ]
com.hida.model; java.io; java.util;
286,474
public void deleteInMap(Map<Object, StreamEvent> candidateEvents) { for (Map.Entry<Object, StreamEvent> entry : candidateEvents.entrySet()) { StreamEvent streamEvent = entry.getValue(); if (outsideTimeWindow(streamEvent)) { break; } if (execute(streamEvent)) { candidateEvents.remove(entry.getKey()); } } }
void function(Map<Object, StreamEvent> candidateEvents) { for (Map.Entry<Object, StreamEvent> entry : candidateEvents.entrySet()) { StreamEvent streamEvent = entry.getValue(); if (outsideTimeWindow(streamEvent)) { break; } if (execute(streamEvent)) { candidateEvents.remove(entry.getKey()); } } }
/** * Deletes events from a Map of StreamEvent. * * @param candidateEvents Map of events. */
Deletes events from a Map of StreamEvent
deleteInMap
{ "repo_name": "sacjaya/siddhi", "path": "modules/siddhi-extensions/event-table/src/main/java/org/wso2/siddhi/extension/eventtable/hazelcast/HazelcastOperator.java", "license": "apache-2.0", "size": 24263 }
[ "java.util.Map", "org.wso2.siddhi.core.event.stream.StreamEvent" ]
import java.util.Map; import org.wso2.siddhi.core.event.stream.StreamEvent;
import java.util.*; import org.wso2.siddhi.core.event.stream.*;
[ "java.util", "org.wso2.siddhi" ]
java.util; org.wso2.siddhi;
1,593,089
public static List<Tuple> zip(List<?> arg1, List<?> arg2) { List<Tuple> tuples = new ArrayList<Tuple>(); int len = Math.min(arg1.size(), arg2.size()); for (int i = 0; i < len; i++) { tuples.add(new Tuple(arg1.get(i), arg2.get(i))); } return tuples; }
static List<Tuple> function(List<?> arg1, List<?> arg2) { List<Tuple> tuples = new ArrayList<Tuple>(); int len = Math.min(arg1.size(), arg2.size()); for (int i = 0; i < len; i++) { tuples.add(new Tuple(arg1.get(i), arg2.get(i))); } return tuples; }
/** * Return a list of tuples, where each tuple contains the i-th element * from each of the argument sequences. The returned list is * truncated in length to the length of the shortest argument sequence. * * @param arg1 the first list to be the zero'th entry in the returned tuple * @param arg2 the first list to be the one'th entry in the returned tuple * @return a list of tuples */
Return a list of tuples, where each tuple contains the i-th element from each of the argument sequences. The returned list is truncated in length to the length of the shortest argument sequence
zip
{ "repo_name": "UniKnow/htm.java", "path": "src/main/java/org/numenta/nupic/util/ArrayUtils.java", "license": "gpl-3.0", "size": 52874 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,492,862
@SuppressWarnings("unchecked") public List<Department> getAllDepartmentsOrderByName(int startRecord, int numRecords) { return departmentDAO.getAllOrderByName(startRecord, numRecords); }
@SuppressWarnings(STR) List<Department> function(int startRecord, int numRecords) { return departmentDAO.getAllOrderByName(startRecord, numRecords); }
/** * Get all departments within the specified range. * * @see edu.ur.ir.user.DepartmentService#getAllDepartmentsOrderByName(int, int) */
Get all departments within the specified range
getAllDepartmentsOrderByName
{ "repo_name": "nate-rcl/irplus", "path": "ir_service/src/edu/ur/ir/user/service/DefaultDepartmentService.java", "license": "apache-2.0", "size": 4225 }
[ "edu.ur.ir.user.Department", "java.util.List" ]
import edu.ur.ir.user.Department; import java.util.List;
import edu.ur.ir.user.*; import java.util.*;
[ "edu.ur.ir", "java.util" ]
edu.ur.ir; java.util;
430,997
public List getGroupBy();
List function();
/** * Gets the groupby for ReportQueries of all Criteria and Sub Criteria * the elements are of class FieldHelper * @return List of FieldHelper */
Gets the groupby for ReportQueries of all Criteria and Sub Criteria the elements are of class FieldHelper
getGroupBy
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/java/org/apache/ojb/broker/query/Query.java", "license": "apache-2.0", "size": 5250 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,745,679
public static String getTagContents(Element parent, String tagName, boolean throwExceptionOnError) throws XMLException { NodeList nodeList = parent.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if (node instanceof Element && ((Element) node).getTagName().equals(tagName)) { Element child = (Element) node; return child.getTextContent(); } } if (throwExceptionOnError) { throw new XMLException("Missing tag: <" + tagName + "> in <" + parent.getTagName() + ">."); } else { return null; } }
static String function(Element parent, String tagName, boolean throwExceptionOnError) throws XMLException { NodeList nodeList = parent.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if (node instanceof Element && ((Element) node).getTagName().equals(tagName)) { Element child = (Element) node; return child.getTextContent(); } } if (throwExceptionOnError) { throw new XMLException(STR + tagName + STR + parent.getTagName() + ">."); } else { return null; } }
/** * For a tag <parent> <tagName>content</tagName> <something>else</something> ... </parent> * * returns "content". This will return the content of the first occurring child element with name tagName. If no * such tag exists and {@link XMLException} is thrown if throwExceptionOnError is true. Otherwise null is returned. * */
For a tag content else ... returns "content". This will return the content of the first occurring child element with name tagName. If no such tag exists and <code>XMLException</code> is thrown if throwExceptionOnError is true. Otherwise null is returned
getTagContents
{ "repo_name": "aborg0/RapidMiner-Unuk", "path": "src/com/rapidminer/io/process/XMLTools.java", "license": "agpl-3.0", "size": 29144 }
[ "com.rapidminer.tools.XMLException", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import com.rapidminer.tools.XMLException; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import com.rapidminer.tools.*; import org.w3c.dom.*;
[ "com.rapidminer.tools", "org.w3c.dom" ]
com.rapidminer.tools; org.w3c.dom;
1,198,930
public void addActionListener(ActionListener listener) { synchronized(actionListeners) { actionListeners.add(listener); } }
void function(ActionListener listener) { synchronized(actionListeners) { actionListeners.add(listener); } }
/** * Adds an action listener which gets notified when the channel selection changed. * @param listener Listener to add. */
Adds an action listener which gets notified when the channel selection changed
addActionListener
{ "repo_name": "langmo/youscope", "path": "core/api/src/main/java/org/youscope/uielements/ChannelField.java", "license": "gpl-2.0", "size": 10080 }
[ "java.awt.event.ActionListener" ]
import java.awt.event.ActionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,631,213
public void testDerby4095OldTriggerRows() throws SQLException { Statement s = createStatement(); s.executeUpdate("CREATE TABLE APP.TAB (I INT)"); s.executeUpdate("CREATE TABLE APP.LOG (I INT, NAME VARCHAR(30), DELTIME TIMESTAMP)"); s.executeUpdate("CREATE TABLE APP.NAMES(ID INT, NAME VARCHAR(30))"); s.executeUpdate("CREATE TRIGGER APP.MYTRIG AFTER DELETE ON APP.TAB REFERENCING OLD_TABLE AS OLDROWS FOR EACH STATEMENT INSERT INTO APP.LOG(i,name,deltime) SELECT OLDROWS.I, NAMES.NAME, CURRENT_TIMESTAMP FROM --DERBY-PROPERTIES joinOrder=FIXED\n NAMES, OLDROWS --DERBY-PROPERTIES joinStrategy = NESTEDLOOP\n WHERE (OLDROWS.i = NAMES.ID) AND (1 = 1)"); s.executeUpdate("insert into APP.tab values(1)"); s.executeUpdate("insert into APP.tab values(2)"); s.executeUpdate("insert into APP.tab values(3)"); s.executeUpdate("insert into APP.names values(1,'Charlie')"); s.executeUpdate("insert into APP.names values(2,'Hugh')"); s.executeUpdate("insert into APP.names values(3,'Alex')"); // Now delete a row so we fire the trigger. s.executeUpdate("delete from tab where i = 1"); // Check the log to make sure the trigger fired ok ResultSet loggedDeletes = s.executeQuery("SELECT * FROM APP.LOG"); JDBC.assertDrainResults(loggedDeletes, 1); s.executeUpdate("DROP TABLE APP.TAB"); s.executeUpdate("DROP TABLE APP.LOG"); s.executeUpdate("DROP TABLE APP.NAMES"); }
void function() throws SQLException { Statement s = createStatement(); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); ResultSet loggedDeletes = s.executeQuery(STR); JDBC.assertDrainResults(loggedDeletes, 1); s.executeUpdate(STR); s.executeUpdate(STR); s.executeUpdate(STR); }
/** * Test that a nested loop join that accesses the * TriggerOldTransitionRowsVTI can reopen the ResultSet properly * when it re-executes. * @throws SQLException */
Test that a nested loop join that accesses the TriggerOldTransitionRowsVTI can reopen the ResultSet properly when it re-executes
testDerby4095OldTriggerRows
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java", "license": "apache-2.0", "size": 118077 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
877,908
protected Properties loadProperties( PluginInterface plugin, String relativeName ) throws KettleFileException, IOException { if ( plugin == null ) { throw new NullPointerException(); } FileObject propFile = KettleVFS.getFileObject( plugin.getPluginDirectory().getPath() + Const.FILE_SEPARATOR + relativeName ); if ( !propFile.exists() ) { throw new FileNotFoundException( propFile.toString() ); } try { return new PropertiesConfigurationProperties( propFile ); } catch ( ConfigurationException e ) { throw new IOException( e ); } }
Properties function( PluginInterface plugin, String relativeName ) throws KettleFileException, IOException { if ( plugin == null ) { throw new NullPointerException(); } FileObject propFile = KettleVFS.getFileObject( plugin.getPluginDirectory().getPath() + Const.FILE_SEPARATOR + relativeName ); if ( !propFile.exists() ) { throw new FileNotFoundException( propFile.toString() ); } try { return new PropertiesConfigurationProperties( propFile ); } catch ( ConfigurationException e ) { throw new IOException( e ); } }
/** * Loads a properties file from the plugin directory for the plugin interface provided * * @param plugin * @return * @throws KettleFileException * @throws IOException */
Loads a properties file from the plugin directory for the plugin interface provided
loadProperties
{ "repo_name": "pentaho/pentaho-hadoop-shims", "path": "common-fragment-V1/src/main/java/org/pentaho/hadoop/PluginPropertiesUtil.java", "license": "apache-2.0", "size": 3769 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.Properties", "org.apache.commons.configuration.ConfigurationException", "org.apache.commons.vfs2.FileObject", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleFileException", "org.pentaho.di.core.plugins.PluginInterface", "org.pentaho.di.core.vfs.KettleVFS" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.vfs2.FileObject; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleFileException; import org.pentaho.di.core.plugins.PluginInterface; import org.pentaho.di.core.vfs.KettleVFS;
import java.io.*; import java.util.*; import org.apache.commons.configuration.*; import org.apache.commons.vfs2.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.core.vfs.*;
[ "java.io", "java.util", "org.apache.commons", "org.pentaho.di" ]
java.io; java.util; org.apache.commons; org.pentaho.di;
1,003,667
public IPackageFragmentRoot[] computePackageFragmentRoots(IClasspathEntry resolvedEntry) { try { return computePackageFragmentRoots( new IClasspathEntry[] {resolvedEntry}, false, // don't retrieve exported roots null ); } catch (JavaModelException e) { return new IPackageFragmentRoot[] {}; } }
IPackageFragmentRoot[] function(IClasspathEntry resolvedEntry) { try { return computePackageFragmentRoots( new IClasspathEntry[] {resolvedEntry}, false, null ); } catch (JavaModelException e) { return new IPackageFragmentRoot[] {}; } }
/** * Computes the package fragment roots identified by the given entry. Only works with resolved * entry * * @param resolvedEntry IClasspathEntry * @return IPackageFragmentRoot[] */
Computes the package fragment roots identified by the given entry. Only works with resolved entry
computePackageFragmentRoots
{ "repo_name": "TypeFox/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/core/JavaProject.java", "license": "epl-1.0", "size": 88596 }
[ "org.eclipse.jdt.core.IClasspathEntry", "org.eclipse.jdt.core.IPackageFragmentRoot", "org.eclipse.jdt.core.JavaModelException" ]
import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
801,840
private ProtocolProcessorDesc getProtocolProcessor(Transport transport, DataBindingDesc requestDataBinding, DataBindingDesc responseDataBinding) throws ServiceException { String protocolName = m_invokerOptions.getMessageProtocolName(); if (protocolName == null) { protocolName = m_serviceDesc.getMessageProtocolName(); } if (protocolName == null) { return m_serviceDesc.getNullProtocolProcessor(); } ProtocolProcessorDesc result = m_serviceDesc .getProtocolProcessor(protocolName); if (result == null) { throw new ServiceException(ErrorDataFactory.createErrorData(ErrorConstants.SVC_CLIENT_UNKNOWN_PROTOCOL, ErrorConstants.ERRORDOMAIN, new Object[] {protocolName, getAdminName() })); } String requestPayload = requestDataBinding.getPayloadType(); if (!result.isPayloadSupported(requestPayload)) { throw new ServiceException(ErrorDataFactory.createErrorData(ErrorConstants.SVC_PROTOCOLPROCESSOR_UNSUPPORTED_REQUEST_FORMAT, ErrorConstants.ERRORDOMAIN, new Object[] { protocolName, getAdminName(), requestPayload })); } String responsePayload = responseDataBinding.getPayloadType(); if (!result.isPayloadSupported(responsePayload)) { throw new ServiceException(ErrorDataFactory.createErrorData(ErrorConstants.SVC_PROTOCOLPROCESSOR_UNSUPPORTED_RESPONSE_FORMAT, ErrorConstants.ERRORDOMAIN, new Object[] { protocolName, getAdminName(),responsePayload })); } return result; }
ProtocolProcessorDesc function(Transport transport, DataBindingDesc requestDataBinding, DataBindingDesc responseDataBinding) throws ServiceException { String protocolName = m_invokerOptions.getMessageProtocolName(); if (protocolName == null) { protocolName = m_serviceDesc.getMessageProtocolName(); } if (protocolName == null) { return m_serviceDesc.getNullProtocolProcessor(); } ProtocolProcessorDesc result = m_serviceDesc .getProtocolProcessor(protocolName); if (result == null) { throw new ServiceException(ErrorDataFactory.createErrorData(ErrorConstants.SVC_CLIENT_UNKNOWN_PROTOCOL, ErrorConstants.ERRORDOMAIN, new Object[] {protocolName, getAdminName() })); } String requestPayload = requestDataBinding.getPayloadType(); if (!result.isPayloadSupported(requestPayload)) { throw new ServiceException(ErrorDataFactory.createErrorData(ErrorConstants.SVC_PROTOCOLPROCESSOR_UNSUPPORTED_REQUEST_FORMAT, ErrorConstants.ERRORDOMAIN, new Object[] { protocolName, getAdminName(), requestPayload })); } String responsePayload = responseDataBinding.getPayloadType(); if (!result.isPayloadSupported(responsePayload)) { throw new ServiceException(ErrorDataFactory.createErrorData(ErrorConstants.SVC_PROTOCOLPROCESSOR_UNSUPPORTED_RESPONSE_FORMAT, ErrorConstants.ERRORDOMAIN, new Object[] { protocolName, getAdminName(),responsePayload })); } return result; }
/** * Selects protocol processor for this request */
Selects protocol processor for this request
getProtocolProcessor
{ "repo_name": "vthangathurai/SOA-Runtime", "path": "soa-client/src/main/java/org/ebayopensource/turmeric/runtime/sif/impl/internal/service/BaseServiceDispatchImpl.java", "license": "apache-2.0", "size": 36820 }
[ "org.ebayopensource.turmeric.runtime.common.binding.DataBindingDesc", "org.ebayopensource.turmeric.runtime.common.exceptions.ErrorDataFactory", "org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException", "org.ebayopensource.turmeric.runtime.common.impl.internal.service.ProtocolProcessorDesc", "org.ebayopensource.turmeric.runtime.common.pipeline.Transport", "org.ebayopensource.turmeric.runtime.errorlibrary.ErrorConstants" ]
import org.ebayopensource.turmeric.runtime.common.binding.DataBindingDesc; import org.ebayopensource.turmeric.runtime.common.exceptions.ErrorDataFactory; import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException; import org.ebayopensource.turmeric.runtime.common.impl.internal.service.ProtocolProcessorDesc; import org.ebayopensource.turmeric.runtime.common.pipeline.Transport; import org.ebayopensource.turmeric.runtime.errorlibrary.ErrorConstants;
import org.ebayopensource.turmeric.runtime.common.binding.*; import org.ebayopensource.turmeric.runtime.common.exceptions.*; import org.ebayopensource.turmeric.runtime.common.impl.internal.service.*; import org.ebayopensource.turmeric.runtime.common.pipeline.*; import org.ebayopensource.turmeric.runtime.errorlibrary.*;
[ "org.ebayopensource.turmeric" ]
org.ebayopensource.turmeric;
90,320
public Comparator<DiGraphNode<N, Branch>> getOptionalNodeComparator( boolean isForward) { return null; } public static enum Branch { ON_TRUE, ON_FALSE, UNCOND, ON_EX, SYN_BLOCK;
Comparator<DiGraphNode<N, Branch>> function( boolean isForward) { return null; } public static enum Branch { ON_TRUE, ON_FALSE, UNCOND, ON_EX, SYN_BLOCK;
/** * Gets a comparator for the nodes. The default implementation returns * {@code null}. See {@link ControlFlowGraph#getOptionalNodeComparator}. * @param isForward Whether the comparator sorts the nodes in the direction of * the flow. * @return a comparator or null (in particular, if not overridden) */
Gets a comparator for the nodes. The default implementation returns null. See <code>ControlFlowGraph#getOptionalNodeComparator</code>
getOptionalNodeComparator
{ "repo_name": "abdullah38rcc/closure-compiler", "path": "src/com/google/javascript/jscomp/ControlFlowGraph.java", "license": "apache-2.0", "size": 6764 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
741,730
@SuppressWarnings("StatementWithEmptyBody") public ContainerHeartbeatResponse processHeartbeat(ContainerHeartbeat heartbeat) { long currentTimeMillis = clock.getTime(); final StreamingContainerAgent sca = this.containers.get(heartbeat.getContainerId()); if (sca == null || sca.container.getState() == PTContainer.State.KILLED) { // could be orphaned container that was replaced and needs to terminate LOG.error("Unknown container {}", heartbeat.getContainerId()); ContainerHeartbeatResponse response = new ContainerHeartbeatResponse(); response.shutdown = ShutdownType.ABORT; return response; } //LOG.debug("{} {} {}", new Object[]{sca.container.containerId, sca.container.bufferServerAddress, sca.container.getState()}); if (sca.container.getState() == PTContainer.State.ALLOCATED) { // capture dynamically assigned address from container if (sca.container.bufferServerAddress == null && heartbeat.bufferServerHost != null) { sca.container.bufferServerAddress = InetSocketAddress.createUnresolved(heartbeat.bufferServerHost, heartbeat.bufferServerPort); LOG.info("Container {} buffer server: {}", sca.container.getExternalId(), sca.container.bufferServerAddress); }
@SuppressWarnings(STR) ContainerHeartbeatResponse function(ContainerHeartbeat heartbeat) { long currentTimeMillis = clock.getTime(); final StreamingContainerAgent sca = this.containers.get(heartbeat.getContainerId()); if (sca == null sca.container.getState() == PTContainer.State.KILLED) { LOG.error(STR, heartbeat.getContainerId()); ContainerHeartbeatResponse response = new ContainerHeartbeatResponse(); response.shutdown = ShutdownType.ABORT; return response; } if (sca.container.getState() == PTContainer.State.ALLOCATED) { if (sca.container.bufferServerAddress == null && heartbeat.bufferServerHost != null) { sca.container.bufferServerAddress = InetSocketAddress.createUnresolved(heartbeat.bufferServerHost, heartbeat.bufferServerPort); LOG.info(STR, sca.container.getExternalId(), sca.container.bufferServerAddress); }
/** * process the heartbeat from each container. * called by the RPC thread for each container. (i.e. called by multiple threads) * * @param heartbeat * @return heartbeat response */
process the heartbeat from each container. called by the RPC thread for each container. (i.e. called by multiple threads)
processHeartbeat
{ "repo_name": "simplifi-it/otterx", "path": "engine/src/main/java/com/datatorrent/stram/StreamingContainerManager.java", "license": "apache-2.0", "size": 137040 }
[ "com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol", "com.datatorrent.stram.plan.physical.PTContainer", "com.datatorrent.stram.plan.physical.PTOperator", "java.net.InetSocketAddress" ]
import com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol; import com.datatorrent.stram.plan.physical.PTContainer; import com.datatorrent.stram.plan.physical.PTOperator; import java.net.InetSocketAddress;
import com.datatorrent.stram.api.*; import com.datatorrent.stram.plan.physical.*; import java.net.*;
[ "com.datatorrent.stram", "java.net" ]
com.datatorrent.stram; java.net;
2,294,803
public void testBugzilla206591B() throws Exception { final String projName = RegressionTests.class.getName() + "206591.Project"; //$NON-NLS-1$ IPath projectPath = env.addProject( projName, "1.5" ); //$NON-NLS-1$ env.addExternalJars( projectPath, Util.getJavaClassLibs() ); env.removePackageFragmentRoot( projectPath, "" ); //$NON-NLS-1$ env.addPackageFragmentRoot( projectPath, "src" ); //$NON-NLS-1$ env.setOutputFolder( projectPath, "bin" ); //$NON-NLS-1$ TestUtil.createAndAddAnnotationJar( env .getJavaProject( projectPath ) ); IProject project = env.getProject( projName ); IFolder srcFolder = project.getFolder( "src" ); IPath srcRoot = srcFolder.getFullPath(); String a1Code = "package pkg; " + "\n" + "import org.eclipse.jdt.apt.tests.annotations.apitest.AssignableTo;\n" + "public interface A1 {\n " + "}\n" + "class A2 implements A1 {\n" + "}\n" + "class A3 extends A2 {\n" + " @AssignableTo(A1.class) // yes\n" + " A2 _foo;\n" + " @AssignableTo(int.class) // yes\n" + " byte _bar;\n" + " @AssignableTo(A1.class) // yes\n" + " A3 _baz;\n" + " @AssignableTo(A2.class) // no\n" + " A1 _quux;\n" + "}"; final IPath a1Path = env.addClass( srcRoot, "pkg", "A1", a1Code ); //$NON-NLS-1$ //$NON-NLS-2$ // Set some per-project preferences IJavaProject jproj = env.getJavaProject( projName ); AptConfig.setEnabled(jproj, true); fullBuild( project.getFullPath() ); expectingSpecificProblemsFor(a1Path, new ExpectedProblem[]{ new ExpectedProblem("", "pkg.A2 is assignable to pkg.A1", a1Path), new ExpectedProblem("", "byte is assignable to int", a1Path), new ExpectedProblem("", "pkg.A3 is assignable to pkg.A1", a1Path), new ExpectedProblem("", "pkg.A1 is not assignable to pkg.A2", a1Path), } ); }
void function() throws Exception { final String projName = RegressionTests.class.getName() + STR; IPath projectPath = env.addProject( projName, "1.5" ); env.addExternalJars( projectPath, Util.getJavaClassLibs() ); env.removePackageFragmentRoot( projectPath, STRsrcSTRbinSTRsrcSTRpackage pkg; STR\nSTRimport org.eclipse.jdt.apt.tests.annotations.apitest.AssignableTo;\nSTRpublic interface A1 {\n STR}\nSTRclass A2 implements A1 {\nSTR}\nSTRclass A3 extends A2 {\nSTR @AssignableTo(A1.class) + " A2 _foo;\nSTR @AssignableTo(int.class) + " byte _bar;\nSTR @AssignableTo(A1.class) + " A3 _baz;\nSTR @AssignableTo(A2.class) + " A1 _quux;\nSTR}STRpkgSTRA1STRSTRpkg.A2 is assignable to pkg.A1STRSTRbyte is assignable to intSTRSTRpkg.A3 is assignable to pkg.A1STRSTRpkg.A1 is not assignable to pkg.A2", a1Path), } ); }
/** * Test the Types.isAssignable() API, in various inheritance scenarios * @throws Exception */
Test the Types.isAssignable() API, in various inheritance scenarios
testBugzilla206591B
{ "repo_name": "maxeler/eclipse", "path": "eclipse.jdt.core/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/RegressionTests.java", "license": "epl-1.0", "size": 12551 }
[ "org.eclipse.core.runtime.IPath", "org.eclipse.jdt.core.tests.util.Util" ]
import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.tests.util.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
2,056,593
private Vector2f calculateForceAlongAnEdge( code_swarm.Edge edge ) { float distance; float deltaDistance; Vector2f force = new Vector2f(); Vector2f tforce = new Vector2f(); // distance calculation tforce.sub( edge.nodeTo.mPosition, edge.nodeFrom.mPosition); distance = tforce.length(); // force calculation (increase when distance is different from targeted len) deltaDistance = (edge.len - distance); // force projection onto x and y axis tforce.scale( deltaDistance * FORCE_EDGE_MULTIPLIER ); force.set(tforce); return force; }
Vector2f function( code_swarm.Edge edge ) { float distance; float deltaDistance; Vector2f force = new Vector2f(); Vector2f tforce = new Vector2f(); tforce.sub( edge.nodeTo.mPosition, edge.nodeFrom.mPosition); distance = tforce.length(); deltaDistance = (edge.len - distance); tforce.scale( deltaDistance * FORCE_EDGE_MULTIPLIER ); force.set(tforce); return force; }
/** * Simple method that calculate the attractive/repulsive force between a person and one of its file along their link (the edge). * * @param edge the link between a person and one of its file * @return force force calculated between those two nodes */
Simple method that calculate the attractive/repulsive force between a person and one of its file along their link (the edge)
calculateForceAlongAnEdge
{ "repo_name": "danieljue/codeswarm", "path": "src/PhysicsEngineSimple.java", "license": "gpl-3.0", "size": 12745 }
[ "javax.vecmath.Vector2f" ]
import javax.vecmath.Vector2f;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
690,962
public static void rebindCasConfigurationProperties(final ConfigurationPropertiesBindingPostProcessor binder, final ApplicationContext applicationContext) { val map = applicationContext.getBeansOfType(CasConfigurationProperties.class); val name = map.keySet().iterator().next(); LOGGER.debug("Reloading CAS configuration via [{}]", name); val e = applicationContext.getBean(name); binder.postProcessBeforeInitialization(e, name); val bean = applicationContext.getAutowireCapableBeanFactory().initializeBean(e, name); applicationContext.getAutowireCapableBeanFactory().autowireBean(bean); LOGGER.debug("Reloaded CAS configuration [{}]", name); }
static void function(final ConfigurationPropertiesBindingPostProcessor binder, final ApplicationContext applicationContext) { val map = applicationContext.getBeansOfType(CasConfigurationProperties.class); val name = map.keySet().iterator().next(); LOGGER.debug(STR, name); val e = applicationContext.getBean(name); binder.postProcessBeforeInitialization(e, name); val bean = applicationContext.getAutowireCapableBeanFactory().initializeBean(e, name); applicationContext.getAutowireCapableBeanFactory().autowireBean(bean); LOGGER.debug(STR, name); }
/** * Rebind cas configuration properties. * * @param binder the binder * @param applicationContext the application context */
Rebind cas configuration properties
rebindCasConfigurationProperties
{ "repo_name": "robertoschwald/cas", "path": "core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/CasConfigurationPropertiesEnvironmentManager.java", "license": "apache-2.0", "size": 3762 }
[ "org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor", "org.springframework.context.ApplicationContext" ]
import org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor; import org.springframework.context.ApplicationContext;
import org.springframework.boot.context.properties.*; import org.springframework.context.*;
[ "org.springframework.boot", "org.springframework.context" ]
org.springframework.boot; org.springframework.context;
741,286