query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Constructor builds packet from xml description | public GamePacket(String xml_str) throws DocumentException
{
SAXReader reader = new SAXReader();
Document document = reader.read(new ByteArrayInputStream(xml_str.getBytes()));
Element root = document.getRootElement();
//root must be packet element
if(root.getName() !... | [
"public Packet() {\n\t}",
"public Packet() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"private XmlConstants(String description) {\n _description = description ;\n }",
"public PacketBuilder() {\n\t\tthis(1024);\n\t}",
"public DNSMessage(byte[] packet) {\n parse(packet, 0, packet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates and initialize a new ScoreTrackingListener. | public ScoreTrackingListener(Counter scoreCounter) {
this.currentScore = scoreCounter;
} | [
"public ScoreTrackingListener(Counter scoreCounter) {\r\n this.currentScore = scoreCounter;\r\n }",
"public CollectScoresIterationListener() {\n this(1);\n }",
"public GameStartListener() {\r\n\t\tEventHandler.registerListener(this);\r\n\t}",
"private void initListener() {\n\n Utili... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Whether the withOnFleetSync() method should be called for this hullmod. | boolean withOnFleetSync(); | [
"boolean hasSyncDisabled();",
"public boolean isNeedSync() {\n return needSync;\n }",
"public synchronized boolean is_applicable_sync() {\n\t\treturn is_applicable();\n\t}",
"boolean getIsSync();",
"public abstract boolean isSyncable();",
"private boolean canDisableSync() {\n return !Prof... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert a string to an object array of target type. | public static Object[] stringToObjectArray(Object value, String separator, Class<?> targetType){
Object[] values = value.toString().split(separator);
for(int i=0; i<values.length;i++)
values[i] = simpleshop.common.ReflectionUtils.parseObject(values[i],targetType);
return values;
... | [
"protected Object stringToArray(String value, Type convertTo, Map<String, String> dynamicAttributes, String expression)\n throws ConversionException {\n if (value == null) {\n return null;\n }\n\n Object finalArray;\n Class<?> rawType = TypeTools.rawType(convertTo);\n if (StringUtils.isBlan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field862' field | public java.lang.CharSequence getField862() {
return field862;
} | [
"public java.lang.CharSequence getField862() {\n return field862;\n }",
"java.lang.String getField1371();",
"public java.lang.CharSequence getField863() {\n return field863;\n }",
"java.lang.String getField1393();",
"java.lang.String getField1571();",
"java.lang.String getField1372();",
"java.la... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds value in delta to healthCoefficient instance variable. If health becomes less than MINIMUM_HEALTH_COEFFICIENT sets isAlive to false and healthCoefficient to 0 If health becomes more than MAXIMUM_HEALTH_COEFFICIENT sets healthCoefficient to MAXIMUM_HEALTH_COEFFICIENT. | public void changeHealthCoefficient(double delta) {
if (this.healthCoefficient + delta < MINIMUM_HEALTH_COEFFICIENT) {
this.healthCoefficient = MINIMUM_HEALTH_COEFFICIENT;
this.isAlive = false;
} else {
this.healthCoefficient = Math.min(this.healthCoefficient + delta,... | [
"public void changeHealthCoefficient(final double delta) {\n healthCoefficient += delta;\n if (healthCoefficient <= MINIMUM_HEALTH_COEFFICIENT) {\n setHealthCoefficient(0.0);\n setIsAlive(false);\n } else if (healthCoefficient > MAXIMUM_HEALTH_COEFFICIENT) {\n s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an int equal to a random number based on the creature's strength. | public int damage(){
Random rand = new Random();
int damage = rand.nextInt(strength)+1;
return damage;
} | [
"public int generateStrength() {\n\t\tRandom rand = new Random();\n\t\tint strength = rand.nextInt(41) - 10;\n\t\treturn strength;\n\t}",
"public int monsterAttack(){\n Random ran = new Random();\n return ran.nextInt(4);\n }",
"public int damage()\n {\n Random rand = new Random();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Release speech focus for this Recognizer from the underlying speech recognition system. | public void releaseFocus() throws EngineStateError {
checkEngineState(DEALLOCATED | DEALLOCATING_RESOURCES);
if (testEngineState(FOCUS_OFF))
return;
long[] states = setEngineState(FOCUS_ON, FOCUS_OFF);
postFocusLost(states[0], states[1]);
notifyGrammarActivation();
} | [
"public void stopRecognition() {\n final Microphone microphone = getMicrophone();\n if (microphone != null) {\n microphone.stopRecording();\n }\n\n interrupt();\n }",
"public void abandonFocus() {\r\n\t\t\r\n\t\taudioMan = (AudioManager) ContextProvider.getContext().getS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the classCd variable. | public String getClassCd() {
return classCd;
} | [
"public String getClassCd()\n {\n return classCd;\n }",
"public int getCargoClassCd() {\n\t\treturn cargoClassCd;\n\t}",
"public final String getClassValue() {\r\n return (classValue);\r\n }",
"public String getSelectedClassValue() {\n return selectedClassValue;\n }",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all cache entries associated with the passed dpdType, such as "build", "commit", "unittest", "codeissue", "filemetric", etc. If this DPDClient does not have caching enabled, then this has no effect. | public synchronized void clearCache(String dpdType) {
if (this.uriCache != null) {
this.uriCache.clearGroup(dpdType);
}
} | [
"public synchronized boolean clearCache(String dpdType, String tstamp) {\r\n boolean success = false;\r\n if (this.uriCache != null) {\r\n for (Serializable key : this.uriCache.getGroupKeys(dpdType)) {\r\n if (((String) key).contains(tstamp)) {\r\n this.uriCache.removeFromGroup(key, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the title font color | public String getTitleFontColor() {
return titleFontColor;
} | [
"public Paint getColorTitle() {\n return bufColorTitle;\n }",
"public Color getTitleColour() {\n return titleColour;\n }",
"Color getHeaderTitleColor();",
"public Color getFontColor();",
"public String getTitleBgColor() {\n\t\treturn titleBgColor;\n\t}",
"public static Font getTitleFon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve los kilometros Recorridos | public int getKilometrosRecorridos() {
return kilometrosRecorridos;
} | [
"public int calcularKilometrosPorEstanque()\n {\n int totalKilometros=0;\n \n totalKilometros=estanque*30;\n \n return totalKilometros;\n \n }",
"public static int getKilometrosTotales() {\r\n\t\treturn kilometrosTotales;\r\n\t}",
"public double getKilometraza() {\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the given EJBObject/LocalObject has been removed. | void checkExists(EJBLocalRemoteObject ejbObj) {
if (ejbObj.isRemoved())
throw new NoSuchObjectLocalException("Bean has been removed");
} | [
"public void testEjbLocalObjectRemove() throws Exception\n {\n // Lookup Access Bean\n AccessLocalSfsbRemoteBusiness bean = (AccessLocalSfsbRemoteBusiness) this.getInitialContext().lookup(\n AccessLocalSfsbRemoteBusiness.JNDI_NAME);\n\n // Reset the number of calls, if any\n bean.re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Process a serve Resource request. | public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, java.io.IOException {
String resourceID = request.getResourceID();
if (resourceID.equals("resourceID")) {
// Insert code for serving the resource
}
} | [
"private void serve() {\n\t\tif (request == null) {\n\t\t\tchannel.close();\n\t\t\treturn;\n\t\t}\n\t\tlogger.fine(\"Serving \" + type + \" request : \" + request.getPath());\n\t\tResponse resp = RequestHandler.handle(request);\n\t\tif (resp.getRespCode() == ResponseCode.NOT_FOUND) {\n\t\t\terror404(resp);\n\t\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Timer id is aliased to dynamic timer tag in a TimerFamily timer. | @Override
public String timerId(DoFn<InputT, OutputT> doFn) {
return currentTimer.getDynamicTimerTag();
} | [
"public ITimerEvent makeTimerEvent(String name);",
"public void createTimer(long miliseconds, int userID);",
"StopTimerAction.Builder stopTimer(String timerId);",
"TimerType createTimerType();",
"public abstract long getTimeSpanId();",
"void processTimer(MetricName name, Timer timer, T context) throws Exc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EnumerationElement__Group__0" $ANTLR start "rule__EnumerationElement__Group__0__Impl" InternalBasicAttributes.g:1289:1: rule__EnumerationElement__Group__0__Impl : ( ( rule__EnumerationElement__NameAssignment_0 ) ) ; | public final void rule__EnumerationElement__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalBasicAttributes.g:1293:1: ( ( ( rule__EnumerationElement__NameAssignment_0 ) ) )
// InternalBasicAttributes.g:1294:1: ( ( rule... | [
"public final void rule__EnumerationElement__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:2247:1: ( ( ( rule__EnumerationElement__NameAssignment_0 ) ) )\n // InternalTaskDefinition.g:2248... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds an Entry by its primary key | public Entry findByPrimaryKey(EntryPK pk) throws FinderException, RemoteException; | [
"T findByPrimaryKey(Object id);",
"T findByPrimaryKey(Object id, ContextInfo contextInfo);",
"public Entry find(Object key) {\r\n Entry entry_with_key = new Entry();\r\n entry_with_key.key = key; \r\n int comp_hash = compFunction(entry_with_key.key.hashCode());\r\n if (hash_table[comp_hash] == null)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stopping Broadcast receiver to broadcast notify characteristics | void stopBroadcastDataNotify(
BluetoothGattCharacteristic gattCharacteristic) {
final int charaProp = gattCharacteristic.getProperties();
if ((charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) {
BluetoothLeService.setCharacteristicNotification(
ga... | [
"public void stopBroadcast(){\r\n\t\tthePres.stopBroadcast();\r\n\t\tstartBtn.setLabel(\"Start Broadcast\");\r\n\t\tdrawer.stopTasking();\r\n\t\tisPlaying = false;\r\n\t\tcurrRateLabel.setText(\"0 \");\r\n\t}",
"private void stopBroadcastDataNotify(BluetoothGatt bluetoothGatt,BluetoothGattCharacteristic ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply this swap on the given resource order, transforming it into a new solution. | public void applyOn(ResourceOrder order) {
Task aux = order.tasksByMachine[machine][t1];
order.tasksByMachine[machine][t1] = order.tasksByMachine[machine][t2] ;
order.tasksByMachine[machine][t2] = aux;
} | [
"public void applyOn(ResourceOrder order) {\n\t\t\tResourceOrder r_O_temp = order.copy();\n\t\t\torder.tasksByMachine[this.machine][this.t1] = r_O_temp.tasksByMachine[this.machine][this.t2];\n\t\t\torder.tasksByMachine[this.machine][this.t2] = r_O_temp.tasksByMachine[this.machine][this.t1];\n\t\t}",
"private Solu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
retrieves the value of pageType. | public final String getPageType() {
return pageType;
} | [
"public java.lang.String getPAGE_TYPE() {\r\n return PAGE_TYPE;\r\n }",
"public int getRequestPageType();",
"public void setPAGE_TYPE(java.lang.String PAGE_TYPE) {\r\n this.PAGE_TYPE = PAGE_TYPE;\r\n }",
"private void extractPageType() {\n _currentPageType = PageType.UNKNOWN;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_peptideExportActionPerformed Export all PSM features to file. | private void psmExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_psmExportActionPerformed
outputGenerator.getPSMsOutput(this, null, false, psmValidated.isSelected(), psmAccession.isSelected(), proteinDescriptionPsmTab.isSelected(), psmSequence.isSelected(),
psmModificat... | [
"private void peptideExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_peptideExportActionPerformed\r\n outputGenerator.getPeptidesOutput(this, null, null, false, peptideValidated.isSelected(),\r\n peptideAccession.isSelected(), proteinDescriptionPeptideTab.isSelected(),... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The main method. When run without arguments, you should start a game with four levels that run one after the other. When run with additional arguments the arguments should be treated as a list of level numbers to run in the specified order. Discard (ignore) any argument which is not a number, or not in your levels rang... | public static void main(String[] args) {
//Instalizing the gui and the keyboard sensor
GUI guiGame = new GUI("Arkanoid", 800, 600);
//Initializing and running the gameLevel.
List<LevelInformation> levels = new ArrayList<LevelInformation>();
//When run without parameters, you... | [
"public static void main(String[] args) {\n try {\n String arg_zero = args[0];\n String arg_one = args[1];\n int number_of_dice = Integer.parseInt(arg_zero);\n int number_of_sides = Integer.parseInt(arg_one);\n DiceSet game_set = new DiceSet(number_of_dice, number_of_sides);\n HighR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the total amount of reservation cars that were missed. These cars are missed because the queues were to long and the cars drove away. | public int getTotalReservationMissed() {
return totalReservationMissed;
} | [
"public int getTotalMissed() {\n \treturn totalCarsMissed;\n }",
"private void setTotalCarsMissed() {\n \ttotalCarsMissed = totalRegularMissed + totalReservationMissed;\n }",
"private int countCars() {\n \tint totalSpots = simulatorView.getNumberOfFloors() * simulatorView.getNumberOfPlaces() * si... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns count of records with commentary about the recieved count. | private int getRecordsCountWithComment(final HtmlPage resultPage) {
int recordsCount = getRecordsCount(resultPage);
if (resultPage == null || recordsCount == 0) {
logger.info("No results found");
return 0;
} else if (recordsCount > RECORDS_MAX_COUNT) {
... | [
"public int countComments() {\n \n return this.countList(this.comments);\n \n }",
"public long countRecords();",
"int getCommentCnt();",
"public int getRecordCount() {\n return recordCount;\n }",
"public int getNumRecordsHarvested() {\n\t\treturn recordCount;\n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
la Valang expression non fa passare la societa' 417, ma il flag filter e' a true quindi il secondo elemento sara' filtrato | @Test
public void processFilterTrue() throws Exception {
processor.setFilter(true);
for (Persona persona : items) {
Persona personaResult = processor.process(persona);
System.out.println(personaResult != null ? "filtrato NO"
: "filtrato SI");
}
} | [
"private void filtroRepujado() {\n /*{0, 0, 0},\n {1, 2, 1},\n {0, 0, -2}*/\n tf1.setText(\"0\");\n tf2.setText(\"0\");\n tf3.setText(\"0\");\n tf4.setText(\"1\");\n tf5.setText(\"2\");\n tf6.setText(\"1\");\n tf7.setText(\"0\");\n tf8.set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates default constructor for Appointment | public Appointment() {
} | [
"public Appointment() {\n\t\tsuper();\n\t}",
"public Appointment() {\n\t\t// TODO check for existing ids or make sure that counter is restored too with the appointments (from save)\n\t\tthis(null, null, \"<undefined>\", new ArrayList<>(), null);\n\t}",
"public Appointment()\r\n {\r\n appNo = 0;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the initial guess for a coefficient | public void setInitialGuess(String Name, double value) throws Exception {
int index = FittingNames.indexOf(Name);
if (index == -1) throw new Exception("ERROR: No coefficient with name: " + Name);
InitialGuess.set(index, value);
} | [
"public void init() {\n\t\tint size = matrix.length;\n\t\tint numberToGuess = (int) Math.abs(Math.pow(size,3)*Math.random());\n\t\treset(numberToGuess);\n }",
"public void setCoefficient(int newCoefficient){\n coefficient = newCoefficient;\n //creates a new coefficient from the coefficient\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
adds a new string constant to the pool | public final int addString(String val) {
return addConstant(new Constant(val));
} | [
"private static void patchIt(String old, String replacement,\n\t\t\t Constant[] constant_pool)\n {\n ConstantUtf8 c;\n String str;\n int index, old_index;\n StringBuffer buf;\n\n /* Loop through constant pool\n */\n for(short i=0; i < constant_pool.length; i++) {\n if... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the size of the diagram. Size is square and created based on the number of and the size of nodes. | private void calcSize(List<MemberModel> nodes) {
int numNodes = nodes.size();
double averageWidth = 0;
double sqrt = Math.floor(Math.sqrt(numNodes));
for (MemberModel node : nodes) {
averageWidth += node.getWidth();// * 2.5;
}
averageWidth /= numNodes;
width = new Double(averageWidth * ... | [
"public int getSize(){\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NODES IN THE TREE AND STORE THE VALUE IN CLASS VARIABLE \"size\"\n * RETURN THE \"size\" VALUE\n *\n * HINT: THE NMBER OF NODES CAN BE UPDATED IN THE \"size\" VARIABLE EVERY TIME A NODE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of InterestResource | public InterestResource() {
} | [
"public Interest() {\n \n }",
"public static final InterconnectsClient create() throws IOException {\n return create(InterconnectsSettings.newBuilder().build());\n }",
"public com.amf.user.profile.model.MovieInterest create(long movieInterestId);",
"InformationResource createInformationResource();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an boolean array. The array is true at the indices of the selected essids. The index of the selected essid is the same index in the essids() array. | public boolean[] selectedESSIDs(){
ArrayList<String> essids = this.essids();
boolean[] selected = new boolean[essids.size()];
int i = 0;
for(String essid : essids){
selected[i] =(this.filter.ESSIDs.contains(essid));
i++;
}
return selected;
} | [
"public boolean[] selectedBSSIDs(){\n\t\tArrayList<String> bssids = this.bssids();\n\t\tboolean[] selected = new boolean[bssids.size()];\n\n\t\tint i = 0;\n\t\tfor(String bssid : bssids){\n\t\t\tselected[i] =(this.filter.BSSIDs.contains(bssid));\n\t\t\ti++;\n\t\t}\n\t\treturn selected;\n\t}",
"public boolean[] se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original signature : int ftrScanRollSetCallBackFn(void, PFTRROLLFNCB, void) native declaration : line 550 | int ftrScanRollSetCallBackFn(Pointer ftrHandle, FTRSCANAPILibrary.PFTRROLLFNCB pUserCbFb, Pointer pUserContext); | [
"int ftrScanRollDoOperationFromCb(Pointer pFtrContext, NativeLong dwRollCbOperation, Pointer pRollCbOperationParam);",
"int ftrScanRollStart(Pointer ftrHandle);",
"int ftrScanRollRawStart(Pointer ftrHandle);",
"int ftrScanRollAbort(Pointer ftrHandle, int bSynchronous);",
"int ftrScanRollGetFrameParameters(P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new LiquidPointNode. | static <T extends LiquidNode> LiquidPointNode<T> pointOf(T start, T goal) {
return new LiquidPointNodeImpl<>(start, goal);
} | [
"public native static ParallaxNode create();",
"public PointNode (PointNode p){\r\n\t\t\r\n\t\tthis._next = p;\r\n\t\t\r\n\t}",
"public Node(Point newP) {\n p = newP;\n next = null;\n }",
"public Node(Point p) //is this needed\n\t{\n\t\tpoint = p;\n\t\tnext = null;\n\t}",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Insert the composite into the index at the correct index. | final void insert(List<Composite<?, ?>> index, Composite<?, ?> toInsert) {
if (index.size() == 0) {
index.add(toInsert);
} else {
long key = toInsert.getId();
int low = 0;
int high = index.size();
while (low <= high) {
i... | [
"public native void insert(int t, int index);",
"public void insert(int index, T element);",
"public void insert(IndexRec newIndex) {\r\n int j;\r\n for (j = numofElements - 1; j >= 0; j--) {\r\n \t//use compareto method from index records to compare the 2 strings\r\n if (indexRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
10) evaluateStreamEnthalpy() : Calculates the enthalpy of the stream. | public double evaluateStreamEnthalpy(double Tref, Stream stream, boolean derivative)
throws FunctionException {
return stream.evaluateStreamEnthalpy(Tref, derivative);
} | [
"public static IStream<Integer> primeStream(){\n @@student_primeStream@@\n }",
"public final String entryRulestreamOperator() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_rulestreamOperator = null;\n\n\n try {\n // InternalMASL.g:34... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the query string of the initial request that reached the portal. The request received by the dispatch filter wraps the initial request and hides the initial query string which usually contains only portal related information. In some cases the initial query string contains parameters set through JavaScript. The ... | private Map<String, List<String>> parseInitialQueryString() throws ServletException
{
HttpServletRequest initialRequest = (HttpServletRequest) getRequest();
while (initialRequest instanceof HttpServletRequestWrapper) {
initialRequest = (HttpServletRequest) ((HttpServletRequestWrapper... | [
"public void GenerateQueryString() throws HttpRequestParsingException\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tm_QueryString = new LinkedHashMap<HttpQueryStringType, LinkedHashMap<String, String>>();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// did we get any params from the URI?\r\n\t\t\tint paramSeperator = m_RequestedURI.indexOf(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
guess: correct guess answer: contains / to indicate multiple answers | @Test
void CorrectGuessMultipleWordRightSideSlash() {
Question testQuestion = new Question(Round.JEOPARDY, "Test Category", new GregorianCalendar(2018, 7, 7), "test question", "portal test/testing here", 0);
String guess = "portal testing here";
assertTrue(testQuestion.acceptAnswer(guess));
... | [
"@Test\n void IncorrectGuess() {\n Question testQuestion = new Question(Round.JEOPARDY, \"Test Category\", new GregorianCalendar(2018, 7, 7), \"test question\", \"test\", 0);\n String guess = \"\";\n assertFalse(testQuestion.acceptAnswer(guess));\n }",
"@Test\n void CorrectGuessMulti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleChangeValue" $ANTLR start "entryRuleChangeValueUnOp" InternalDsl.g:13062:1: entryRuleChangeValueUnOp returns [EObject current=null] : iv_ruleChangeValueUnOp= ruleChangeValueUnOp EOF ; | public final EObject entryRuleChangeValueUnOp() throws RecognitionException {
EObject current = null;
EObject iv_ruleChangeValueUnOp = null;
try {
// InternalDsl.g:13062:56: (iv_ruleChangeValueUnOp= ruleChangeValueUnOp EOF )
// InternalDsl.g:13063:2: iv_ruleChangeValue... | [
"public final void entryRuleChangeValueUnOp() throws RecognitionException {\n try {\n // InternalDsl.g:4155:1: ( ruleChangeValueUnOp EOF )\n // InternalDsl.g:4156:1: ruleChangeValueUnOp EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 seasonCount = 1; | boolean hasSeasonCount(); | [
"public int getSeasonNum()\n {\n return seasonNumber;\n }",
"int getSeasonShareCount();",
"int getSeasonCaptureScore();",
"public Integer getSeason() {\n return season;\n }",
"public int getSeasonId() {\n return seasonId;\n }",
"@java.lang.Override\n public int getSeas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the digest to use | public void setDigest(MessageDigest digest) {
this.digest = digest;
} | [
"void setDigestAlgorithm(String digestAlgorithm);",
"public void setMessageDigest(MessageDigest digest) {\n this.digest = digest;\n }",
"public void setDigest(Digest d) {\n passDown(new Event(Event.SET_DIGEST, d));\n }",
"void setDigestMethod(@Nullable final DigestMethod digestMethod);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates lists of pizzas, sides and drinks. | private void updateItems()
{
updatePizzaTypes(items);
updateSidesTypes(items);
updateDrinksTypes(items);
} | [
"private void updatePrices() {\r\n\t\tfor (int i=first; i<last; i++){\r\n\t\t\tProduct product=products.get(i);\r\n\t\t\tproduct.setPrice(product.getPrice()*(1+increment));\r\n\t\t}\r\n\t}",
"void updatePaintings(Painting p) {\r\n\t\t\tthis.paintings = new ConsList<Painting>(p, this.paintings);\r\n\t}",
"void u... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove weapon card client. | public WeaponCardClient remove(String weaponCard) {
WeaponCardClient toRemove = null;
for (WeaponCardClient weaponCardClient: weaponCards)
if (weaponCard.equals(weaponCardClient.getWeaponName()))
toRemove = weaponCardClient;
toRemove.setSlotPosition(null, -1);
... | [
"private void checkWeaponSprite(MMClient client) {\n\t\tbodyToRemove = weaponsToRemove.poll();\n\t\tif (bodyToRemove != null) {\n\t\t\t// Call MMclient to remove weapon\n\t\t\tclient.removeWeaponLocation(bodyToRemove.getPosition());\n\t\t\tweaponList.remove(bodyToRemove.getPosition());\n\t\t\tbodyToRemove.setActive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
rename element with name sOldName to sNewName | public boolean renameElement( XStorage xStorage, String sOldName, String sNewName )
{
try
{
xStorage.renameElement( sOldName, sNewName );
}
catch( Exception e )
{
Error( "Element renaming failed, exception: " + e );
return false;
}
return true;
} | [
"public void alterName(String newName) { name = newName; }",
"public void setName (String newname, String oldName) {\n setName(newname, entryNames.indexOf(oldName));\n }",
"public void renameTree(String oldName, String newName) throws DuplicateNameException;",
"public void rename (String newName) throws E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the updates from original graph to mirror. Original elements can be added or removed causing the mirror graph to change accordingly. | public final void updateMirror() {
updateOriginalNodesInMirror();
updateOriginalEdgesInMirror();
removeNoMoreExistingOriginalEdges();
removeNoMoreExistingOriginalNodes();
} | [
"private void updateOriginalNodesInMirror() {\n for (Node node : originalGraph.nodes()) {\n if (!mirrorGraph.has(node)) {\n mirrorGraph.add(node);\n }\n originalAttributesToMirror(node);\n }\n }",
"private void updateOriginalEdgesInMirror() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Public method to load all combination of card and store it in a deck; | public void loadDeck()
{
for(int i = 0; i < DESCRIPTIONS.length; i++)
{
for(int j = 0; j < SUITS.length; j++)
{
Card c = new Card();
c.setSuit(SUITS[j]);
c.setDescription(DESCRIPTIONS[i]);
deck.add(c);
... | [
"void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}",
"private void fillDeck() {\n \n // Loop for... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Contexts: case_limb returns case_limb Constraint: (cases=case_label_list statement=statement) | protected void sequence_case_limb(ISerializationContext context, case_limb semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, PascalPackage.Literals.CASE_LIMB__CASES) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(sem... | [
"public final AstValidator.case_cond_return case_cond() throws RecognitionException {\n AstValidator.case_cond_return retval = new AstValidator.case_cond_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An observer for the selection of a gene by the user. Will give the observer the corresponding data node of the selected gene. | public interface GeneSelectionObserver {
/**
* Called when a gene in the combo box is chosen.
*
* @param selectedGene
* The gene selected by the user.
*/
void update(String selectedGene);
} | [
"public void setGene(Gene gene)\r\n\t{\r\n\t\tthis.gene = gene;\r\n\t}",
"void registerObserver(ISelectionObserver observer);",
"public void setSelectedGene(String geneID)\n\t\t{\n\t\tselectedGene=geneID;\n\t\tSystem.out.println(selectedGene);\n\t\trepaint();\n\t\t}",
"public void selectGene(GeneMention gm) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns Batsman with best average and strike rate | public Batsman getBatsmanWithBestAverageAndStrikeRate() throws IPLAnalyserException {
checkEmptyList(batsmanList);
Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getAverageScore, Comparator.reverseOrder())
.thenComparing(Batsman::getStrikeRate, Comparator.reverseOr... | [
"public Batsman getBatsmanWithHighestStrikingRate() throws IPLAnalyserException {\n checkEmptyList(batsmanList);\n Comparator<Batsman> batsmanComparator = Comparator.comparing(Batsman::getStrikeRate).reversed();\n return sortList(batsmanComparator, batsmanList).get(0);\n\n }",
"public Bats... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read all analog channels and print to UART | public void loop() {
a0 = analogRead(A0);
a1 = analogRead(A1);
a2 = analogRead(A2);
a3 = analogRead(A3);
println(UART6,"A0: "+a0+" A1: "+a1+" A2: "+a2+" A3: "+a3); // this goes to the Serial port
println("A0: "+a0+" A1: "+a1+" A2: "+a2+" A3: "+a3); // this goe... | [
"private void printActualSensorData() throws IOException , InterruptedException{\n\n System.out.println(\"*----------------------------\");\n for (SensorData sensorData : actualSensorDatas) {\n System.out.println(\"Received a packet: IP:Port: \" + sensorData.printSensorData());\n }\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setPositionStart method, of class Ship. | @Test
public final void testNormalSetPositionStart() {
int expResX = 2;
int expResY = 3;
int resultX = ship.getX();
int resultY = ship.getY();
assertEquals(expResX, resultX);
assertEquals(expResY, resultY);
// Ship s = new Ship(1, true, 4, 5);
IShip s ... | [
"public void testSetStartLocation() {\n assertEquals(test, maze1.getStartLocation());\n test = new Location(0, 1);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n test = new Location(2, 2);\n maze1.setCell(test, MazeCell.WALL);\n maz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'EF Simple'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseEFSimple(EFSimple object) {
return null;
} | [
"public T caseSimple(Simple object) {\n\t\treturn null;\n\t}",
"public T caseEntity(Entity object)\n {\n return null;\n }",
"public T caseEntity(Entity object) {\n\t\treturn null;\n\t}",
"public T caseEntity(Entity object) {\r\n\t\treturn null;\r\n\t}",
"public T caseEFProcessing(EFProcessing object) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates a reset code. | public static String generateResetCode() {
return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);
} | [
"public void reset( )throws CodeGeneratorException;",
"public static String generateResetKey() {\n return RandomStringUtils.randomNumeric(DEF_COUNT);\n }",
"public synchronized String createResetCode(String username) {\r\n\t\tString code = generateRandomCode();\r\n\t\tlong timeCreated = new DateTime(D... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__GenLnCodeStatement__Group_1__0__Impl" $ANTLR start "rule__GenLnCodeStatement__Group_1__1" InternalDsl.g:29675:1: rule__GenLnCodeStatement__Group_1__1 : rule__GenLnCodeStatement__Group_1__1__Impl ; | public final void rule__GenLnCodeStatement__Group_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:29679:1: ( rule__GenLnCodeStatement__Group_1__1__Impl )
// InternalDsl.g:29680:2: rule__GenLnCodeStatement__Group_1__1__Impl... | [
"public final void rule__GenLnCodeStatement__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:29583:1: ( ( ( rule__GenLnCodeStatement__Group_1__0 )? ) )\n // InternalDsl.g:29584:1: ( ( rule__GenLnCodeSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the phone authentication. | public RecipientPhoneAuthentication getPhoneAuthentication() {
return phoneAuthentication;
} | [
"public String getPhonePassword() {\n return phonePassword;\n }",
"@JavascriptInterface // must be added for API 17 or higher\n public String GetPhoneNumber() {\n\n // only send the phone to authorize website\n if(etURL.getText().toString().indexOf(HostingURL)==0)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all input subsequence captured during last match operation performed by specified matcher. Returned array is empty if matcher has never been used or if input sequence does not match pattern. | public static RegexMatch[] getAll(Matcher matcher) {
RegexMatch[] list = new RegexMatch[1+matcher.groupCount()];
int count = 0;
for (int i = 0; i < list.length; ++i) {
int start = matcher.start(i);
if (start < 0)
continue;
list[count++] = new... | [
"private static @NotNull\n ArrayList<String> getGroupsFromMatcher(Matcher matcher) {\n ArrayList<String> data = new ArrayList<>();\n for (int i = 1; i <= matcher.groupCount(); i++) {\n data.add(matcher.group(i));\n System.out.println(\"[Panda, getGroupsFromMatcher()] | Group e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
checks wether the conditions of region are satisfied by the numbers or not and if not then it adds that number to the incorrect list. | public void check() {
for (int i = 0; i < regions.size(); i++) {
if (regions.get(i).verify() == false) {
verify1 = false;
int z = regions.get(i).getnumber();
incorrect.add(z);
} else {
verify1 = true;
}
... | [
"private static boolean checkAndMapPointToExistingRegion(int row, int col, HashMap<Integer, ArrayList<String>> boundedRegions) {\n\t\t\n\t\tboolean found = false;\n \n\t\t// Iterate over the existing bounded regions and check if current point falls under adjacent point of any region\n for(Integer key ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("students in period: " + students); System.out.println("students to remove:" + toRemove); | public void removeStudents(ArrayList<String> toRemove) {
for (int i=0; i<toRemove.size(); i++) {
if (students.indexOf(toRemove.get(i)) != -1) {
System.out.println("Removing " + toRemove.get(i) + " from " + day + " " + time);
students.remove(toRemove.get(i));
}
}
//System.out.println("students ... | [
"@SuppressWarnings(\"Duplicates\")\n private static void removeStudents() {\n if (FinalStudent.size() == 0) {\n System.out.println(\"\\nYou don't have any students in your roster. Let's add some.\\n\");\n ManageStudents.addStudents();\n }\n\n StringPrompt stringPrompt =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method getBabies has to be modified by you if you are not using the babies ArrayList that has been provided in the starter code. In any case, it has to be implemented for grading tests to work. Babies should be added to the general population at either the beginning OR the end of every timestep. | protected static List<Critter> getBabies() {
return babies;
} | [
"protected static List<Critter> getBabies() {\r\n \t ArrayList<Critter> critterList = new ArrayList<Critter>();\r\n //iterator through the keys in the babies hash map\r\n Iterator<String> populationIterator = babies.keySet().iterator();\r\n while(populationIterator.hasNext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the CompositionAreaOverlay associated to the CompositionArea. | public CompositionAreaOverlay getOverlay(){
return (CompositionAreaOverlay)layerUI;
} | [
"public PlacementOverlay getOverlay();",
"public OverlayManager getOverlayManager()\r\n\t{\r\n\t\treturn mOverlayManager;\r\n\t}",
"public Area getBoundingArea() {\n AffineTransform at = AffineTransform.getRotateInstance(angle,x + playerXSize/2, y + playerYSize/2);\n Area a = new Area(new Rectangl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column cal_fault_elevator.engineering_supervision_tel | public String getEngineering_supervision_tel() {
return engineering_supervision_tel;
} | [
"public void setEngineering_supervision_tel(String engineering_supervision_tel) {\n\t\tthis.engineering_supervision_tel = engineering_supervision_tel == null ? null\n\t\t\t\t: engineering_supervision_tel.trim();\n\t}",
"public String getEngineering_supervision() {\n\t\treturn engineering_supervision;\n\t}",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of all known hosts in the network. | private Collection<Host> getHosts() {
return this.knownHosts.values();
} | [
"Collection<HostInfo> getHosts();",
"private Collection<Host> getHosts()\n { return this.knownHosts.values(); }",
"public List<String> getHosts() {\n\t\treturn hosts;\n\t}",
"public static ArrayList<String> getAllHostAddress()\n\t{\n\t\treturn getAllHostAddress(null);\n\t}",
"public String[] getHosts() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Deletes the account with the given account number. | public void delete(int accountNumber) {
accounts.remove(accountNumber);
} | [
"void deleteById(String accountNumber) throws AccountException;",
"public void deleteAccount(Account account);",
"void deleteAccountByCustomer(String customerId, String accountNumber) throws AccountException, CustomerException;",
"public void delete(int acc_num) {\n accountRepository.deleteById(acc_num... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========================================================================= IEdgeMap methods ========================================================================= | @Override
public Collection<IEdge<S>> getEdges()
{
final List<IEdge<S>> set = new ArrayList<>(map.size());
for (final Entry<S, Integer> entry : map.entrySet())
{
set.add(createEdge(entry.getKey(), entry.getValue()));
}
return Collections.unmodifiableCollection(set);
} | [
"@Override\n public Map<VertexIdType, EdgeValueType> getEdgeMap() { return edgeMap; }",
"public Map<String, IEdge> getEdgeMap() {\n\n return Collections.unmodifiableMap(edgeMap);\n }",
"public abstract void map(Edge queryEdge, Edge graphEdge);",
"Graph<Integer, DefaultEdge> buildMap();",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getDataAccessResultsDir method, of class DataAccessPreferenceUtilities. | @Test
public void testGetDataAccessResultsDir3() {
System.out.println("getDataAccessResultsDir3");
final String key = "saveDataDir";
preferences.put(key, System.getProperty("user.dir"));
final File expResult = new File(System.getProperty("user.dir"));
final Path expectedPa... | [
"@Test\n public void testSetDataAccessResultsDir() {\n System.out.println(\"setDataAccessResultsDir\");\n\n final String previousDir = \"prevSaveDataDir\";\n final String currentDir = \"saveDataDir\";\n\n assertEquals(preferences.get(currentDir, null), null);\n assertEquals(pre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reserve 24 bit unsigned number | public static int reserveOrder24bit(int value) {
int ret = 0;
ret = ret | (value & 0xFF);
ret = ret << 8;
ret = ret | ((value >>> 8) & 0xFF);
ret = ret << 8;
ret = ret | ((value >>> 16) & 0xFF);
return ret;
} | [
"UnsignedValue createUnsignedValue();",
"private boolean isPackable(int val) {\r\n\t\tint lead = Integer.numberOfLeadingZeros(val);\r\n\t\tlead -= lead % 2;\t// make even, immediate operands can be shifted by an even number only\r\n\t\treturn lead + Integer.numberOfTrailingZeros(val) >= 24;\t\t\r\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new Cache with the specified maximum capacity and eviction policy | static <K, V> Cache<K, V> getInstance(long capacity, EvictionPolicy policy) {
if (capacity <= 0) {
throw new IllegalArgumentException();
}
return constructCache(capacity, policy);
} | [
"public LRUCachePolicy(int min, int max)\n {\n if (min < 2 || min > max) {throw new IllegalArgumentException(\"Illegal cache capacities\");}\n m_minCapacity = min;\n m_maxCapacity = max;\n }",
"static <K, V> Cache<K, V> getInstance(EvictionPolicy policy) {\r\n\t\treturn constructCache(10000, po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write byte array to channel starting at offset. | public void writeBytes(byte[] value, long offset) throws IOException {
write(ByteBuffer.wrap(value), offset);
} | [
"public void write(long offset, byte[] buf) throws CorfuException ;",
"public void write(byte[] buffer, int offset, int length) {\n\t}",
"void write(int blockOffset, byte[] buffer, int bufferOffset, int length) throws IOException;",
"public void write(byte b[]) throws IOException;",
"public void\n pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a name to the name of a file in the root output directory for the generation, and ensures that that directory exists if it has not already been created. | protected String nameToFileNameInRootGenerationDir(String name, String dirName)
{
// Ensure that the output directory exists for the location, if it has not already been created.
if (!createdOutputDirectories.contains(dirName))
{
File dir = new File(dirName);
dir.mkdi... | [
"protected String nameToFileName(String rootDirName, String packageName, String prefix, String name,\n String postfix, String extension)\n {\n // Work out the full path to the location to write to.\n String packagePath = packageName.replace('.', '/');\n\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column mz_order.visit_id | public long getVisitId() {
return visitId;
} | [
"public Integer getVisitId() {\n return visitId;\n }",
"String getVisitId();",
"public Long getVisitUserId() {\n return visitUserId;\n }",
"CustomerVisit selectByPrimaryKey(Integer id);",
"public int getVisitorid() {\n return visitorid_;\n }",
"int getVisitorid();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this token is bound to a user ID token. This implies the token is bound to a master token as well. | public boolean isUserIdTokenBound() {
return uitSerialNumber != -1;
} | [
"public boolean hasToken(final String user, final String name) {\n\t\treturn repository.findByUserAndName(user, name) != null;\n\t}",
"boolean checkUser(String token);",
"protected boolean hasValidUserInContext() {\n if ((sc != null) && (sc.getUserPrincipal() instanceof StorageOSUser)) {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes locale to american one. | public static void changeLocaleUS(){
JodaCalendar.prevLocale = Locale.getDefault();
Locale.setDefault(Locale.US);
} | [
"public void toEnglish() {\n LocaleContextHolder.setLocale(Locale.CANADA);\n }",
"void setLocale(Locale locale);",
"public void setLocale() {\n String specifiedLocale = System.getProperty(\"locale\", Locale.US.toString());\n String specifiedLang = specifiedLocale.split(\"_\")[0];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setSave method, of class Associate. | @Test
public void testSetSave() {
System.out.println("setSave");
boolean save = false;
Associate instance = null;
instance.setSave(save);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
} | [
"@Test\n public void testIsSave() {\n System.out.println(\"isSave\");\n Associate instance = null;\n boolean expResult = false;\n boolean result = instance.isSave();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
//GENEND:initComponents Back Button Closes the form taking you back to the previous form. | private void Back_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Back_btnActionPerformed
this.dispose();
frame.setVisible(true);
} | [
"public void backToForm()\n {\n ASPManager mgr = getASPManager();\n\n openBrowsWindow = true;\n saveOperation = false;\n savedItem = false;\n\n \n if (!mgr.isEmpty(ctx.readValue(\"REFERRER\")))\n { \n mgr.redirectTo(ctx.readValue(\"REFERRER\"));\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve and validate the list of embedded connectors and shift them for OpenMetadataArchiveStore connectors. | private List<ArchiveDestination> getEmbeddedArchiveStoresConnectors()
{
List<ArchiveDestination> archiveDestinations = new ArrayList<>();
if (embeddedConnectors != null)
{
for (Connector embeddedConnector : embeddedConnectors)
{
if (embeddedConnector ... | [
"public Connector[] findConnectors();",
"public void setConnectors(List<Connector> connectors) {\n Connectors = connectors;\n }",
"@Override\n public ProvisioningConnectorConfig[] getAllProvisioningConnectors()\n throws IdentityProviderManagementException {\n\n List<ProvisioningCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Anywhere'. | Anywhere createAnywhere(); | [
"public Sandwich getSandwich(){\n return new Sandwich();\n }",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public Forme newInstance() {\n return this.getInstance(Forme.class);\n }",
"private LegalEntity createAnyLE() {\n final LegalEntity legalEntity = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public Boolean insertNotice(String title, String content); | public void insertNotice(BbsNotice notice); | [
"public void createSpecialNotice(String title, String discription, int doctorID) {\n\t\tString sql = \"\";\n\t\ttry {\n\n\t\t\tConnection dbConnection = dbConn.returnConn();\n\n\t\t\tsql = \"insert into doctornotice (title,content,docid) values(?,?,?)\";\n\t\t\tPreparedStatement preparedStmt = dbConnection.prepareS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use ChunkRecords.newBuilder() to construct. | private ChunkRecords(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private ReqChunkRecords(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private Chunk(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private ChunkedSeries(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column forum_orders.pay_status | public void setPayStatus(Integer payStatus) {
this.payStatus = payStatus;
} | [
"public void setPayStatus(Boolean payStatus) {\n this.payStatus = payStatus;\n }",
"public void setPaidStatus(int paidStatus) {\n this.paidStatus = paidStatus;\n }",
"public void setUserpayStatus(Integer userpayStatus) {\n this.userpayStatus = userpayStatus;\n }",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the index of the first primary we see in the list of hits (either read1 or read2). NOTE: if the PrimaryAlignmentSelectionStrategy has not been run, the returned value may not represent the ONLY primary. | public int getIndexOfEarliestPrimary() {
for (int i = 0; i < numHits(); i++) {
final SAMRecord firstAligned = getFirstOfPair(i);
final SAMRecord secondAligned = getSecondOfPair(i);
final boolean isPrimaryAlignment = (firstAligned != null && !firstAligned.isSecondaryOrSuppleme... | [
"int getPrimaryIndex(final int defaultIndex) {\n if (getRoot() != null) {\n int i = 0;\n final List<Row> rowList = getRows();\n for (Row row : rowList) {\n if (row.isCheckBoxSelected()) {\n if (row.getPrimary() != null && row.getPrimary()) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field712' field | public java.lang.CharSequence getField712() {
return field712;
} | [
"public java.lang.CharSequence getField712() {\n return field712;\n }",
"java.lang.String getField1371();",
"java.lang.String getField1171();",
"java.lang.String getField1671();",
"java.lang.String getField1571();",
"java.lang.String getField1164();",
"java.lang.String getField1168();",
"java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use GetSamplesRequest.newBuilder() to construct. | private GetSamplesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private GetSamplesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public List<SampleInfo> getAllSamples();",
"public List getAllSamples();",
"@java.lang.Override\n public java.util.List<? extends prometheus.Types.SampleOrBuilder> \n getSamplesO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field362' field. | public void setField362(java.lang.CharSequence value) {
this.field362 = value;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField362(java.lang.CharSequence value) {\n validate(fields()[362], value);\n this.field362 = value;\n fieldSetFlags()[362] = true;\n return this; \n }",
"public void setField361(java.lang.CharSequence value) {\n this.field361 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method getFullStackTrace. Gets the full stack trace as a string. | public static String getFullStackTrace(Throwable e) {
ByteArrayOutputStream byteOutStr = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(byteOutStr);
e.printStackTrace(writer);
writer.flush();
writer.close();
return new String(byteOutStr.toByteArray());
} | [
"private String stackTraceString()\n {\n StringBuffer sb = new StringBuffer();\n \n // Main stacktrace\n StackTraceElement[] stack = getStackTrace();\n stackTraceStringBuffer(sb, this.toString(), stack, 0);\n \n // The cause(s)\n Throwable cause = getCause();\n while (cause != null)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
impl of dumping request query parameter to result | @Override
public void dumpRequest(Map<String, Object> result) {
exchange.getQueryParameters().forEach((k, v) -> {
if (config.getRequestFilteredQueryParameters().contains(k)) {
//mask query parameter value
String queryParameterValue = config.isMaskEnabled() ? Mask.... | [
"public abstract String toURLParam();",
"@Override\n protected void putDumpInfoTo(Map<String, Object> result) {\n if(this.queryParametersMap.size() > 0) {\n result.put(DumpConstants.QUERY_PARAMETERS, queryParametersMap);\n }\n }",
"public String toURLParam() {\n StringBuff... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens the connection with compression if the server supports | public void connect() throws IOException {
System.out.println("Connect to " + url);
URLConnection connection = url.openConnection();
// Set timeouts
connection.setConnectTimeout(connectTimeout);
connection.setReadTimeout(readTimeout);
// Try to get a better input stream s... | [
"public abstract boolean isUsingCompression();",
"public abstract void setUseCompression(boolean use_compression);",
"public abstract void setDefaultCompression(int compression);",
"private void serviceGZipCompressed(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getCon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates location of given vertex in the layout. | public void updateNode(MyVertex vertex) {
springLayout.setLocation(vertex, vertex.getXCoordinates(), vertex.getYCoordinates());
} | [
"public static void update(Vertex vertex) {\r\n\t\tConnection conn = DbManager.getConnection();\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE vertex SET \");\r\n\t\tsql.append(\"id=id\");\r\n\t\tif (vertex.getName() != null)\t\r\n\t\t\tsql.append(\", \").append(\"name='\").append(vertex.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transform min and max from slider values to image values | @Override
public void update(MinMaxData m) {
double[] mm = toImage(m.min, m.max);
transformed.reset();
transformed.setMinAndMax(mm[0], mm[1]);
super.transformedImage = makeImage(null, super.mask);
} | [
"public int getPixelsToMove(WebElement slider, double value, double sliderMax, double sliderMin) {\n\t\tint pixels = 0;\n\t\tdouble tempPixels = slider.getSize().getWidth();\n\t\ttempPixels = (tempPixels / (sliderMax - sliderMin));\n\t\ttempPixels = (tempPixels * (value - sliderMin));\n\t\tpixels = (int) tempPixels... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Save the message in the session, appending if messages already exist | @SuppressWarnings("unchecked")
protected void saveMessage(String msg) {
List messages = (List) getRequest().getSession().getAttribute(
"messages");
if (messages == null) {
messages = new ArrayList();
}
messages.add(msg);
getRequest().getSession().setAttribute("messages", messages);
} | [
"@SuppressWarnings(\"unchecked\")\n protected void saveMessage(String msg) {\n List messages = (List)getRequest().getSession().getAttribute(\"messages\");\n if (messages == null) {\n messages = new ArrayList();\n }\n messages.add(msg);\n getRequest().getSession().setAttribute(\"messages\", mess... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notify the mediascannerConnection that a new file is inserted | public static void notifyMediaScannerConnection(final Context context,String filepathName){
String[] paths= new String[]{filepathName};
String[] mimeTypes={"video/*"};
MediaScannerConnection.scanFile(context,paths,mimeTypes,
new MediaScannerConnection.OnScanCompletedListener(){
... | [
"public void fileContentsChanged();",
"public void fileAdded(FileEvent e);",
"@Override\n\tpublic void upload() {\n\t\tHelper.assertNotNull(this.audioDB);\n\t\tHelper.assertNotNull(this.sound);\n\t\t// TODO: Insert code here\n\t}",
"protected void fileSelected(){\n notifyFileSelected();\n }",
"pri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the right parent of the position. Requires: The position is valid and not a root. | public abstract Position<E> getRightParent(Position<E> p); | [
"public abstract Position<E> getLeftParent(Position<E> p);",
"public abstract Position<E> getRightChild(Position<E> p);",
"public int parent(int pos) {\n assert pos > 0 : \"Position has no parent\";\n return (pos-1)/2;\n }",
"EObject getLeftParent();",
"public abstract Position<E> g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the CVE JSON base URL. | public void setCveJsonUrlBase(URL url) {
this.cveJsonUrlBase = url;
} | [
"public URL getCveJsonUrlBase() {\n return cveJsonUrlBase;\n }",
"public void setVectorDataBaseURL(String baseurl);",
"public void setBaseURL(String baseURL) {\n this.baseURL = baseURL;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Set the baseurl for assets.\")\n @Json... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a ToolListener from receiving the specific event. | @Override
public void removeToolListener(ToolListener listener) {
//do nothing
} | [
"public void removeToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}",
"public void removeToolListener(ToolListener listener) {\n\t\ttoolListeners.remove(listener);\n\t}",
"public void removeMapToolSelectListener(MapToolSelectionListener listener) {\n eventListeners.remove(MapToo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of OriginalSparseVector | public OriginalSparseVector () {} | [
"public static SparseIndexedVector create(AVector source) {\n\t\tif (source instanceof ASparseVector) return create((ASparseVector) source);\n\t\tint srcLength = source.length();\n\t\tif (srcLength==0) throw new IllegalArgumentException(\"Can't create a length 0 SparseIndexedVector\");\n\t\tint[] indexes=source.non... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for class PluginLibrary. | public interface IPluginLibrary {
/*
* Initializes the library
*/
public void initialize(DefaultPluginsCollector collector);
/*
* Start the module and initialize components
*/
public void startLibrary();
/*
* Fetches all extensions for the given extension poin... | [
"public interface Plugin\n{\n\tpublic String getPluginName();\n}",
"public interface Plugin {\n\n /**\n * Invoked when plugin is loaded\n */\n void Initialize();\n\n /**\n * Get plugin name\n * @return plugin name\n */\n String getName();\n\n /**\n * Show the issue managemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the assessor details from the database. | protected AssessorDetails getStoredAssessorDetails(final String id) {
final String query = DataModelUtil.buildAssessorsViaIdQuery(id);
log.trace("Created a query {}", query);
final ListAssessorsResponse response = jdbcTemplate.query(query, new AssessorDetailsExtractor());
if (response.ge... | [
"public String getAssessor() {\r\n return assessor;\r\n }",
"public Long getAssessId() {\n return assessId;\n }",
"public AssayDetail getAssayDetails(String assayAccession) throws Exception {\n URL url = new URL(\"http://www.ebi.ac.uk/pride/ws/archive/assay/\" + assayAccession);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the invoiceDetailId property | public Integer getInvoiceDetailId() {
return this.invoiceDetailId;
} | [
"public String invoiceId() {\n return this.innerProperties() == null ? null : this.innerProperties().invoiceId();\n }",
"Long getInvoiceId();",
"public String getInvoiceId() {\n return invoiceId;\n }",
"public void setInvoiceDetailId(Integer invoiceDetailId) {\r\n this.invoiceDetail... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decode a previously encoded Resource. | public static Resource decodeResource(String encodedValue, ValueFactory valueFactory) {
if (encodedValue != null) {
return NTriplesUtil.parseResource(encodedValue, valueFactory);
}
return null;
} | [
"Object decode(String encoded);",
"T decode() throws IOException;",
"private void decode() {\n\t\tencoding = findEncoding();\n\t\tlog.debug(\"\\tChosen encoding is {}\", encoding);\n\t\tapplyEncoding(encoding);\n\t}",
"void decodeObject();",
"T decode(byte[] bytes) throws IOException;",
"Resource<R> trans... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method acts as the trade menu. It provides the player with options to buy or sell shares. It also displays the players shares as well as the total value of all their shares. | private void tradeCommand(){
out.println("\r\nShares you own:" +
"\r\nApple: " + player.getShares().get(0) +
"\r\nBP: " + player.getShares().get(1) +
"\r\nCisco: " + player.getShares().get(2) +
"\r\nDell: " + player.getShares().get(3) +
... | [
"private void botTrading(){\n if(game.isCardPositive(game.getHighestSharePriceStock())){\n int numShares = player.getFunds()/(game.getHighestSharePriceStock().getSharePrice()+3);\n player.getShares().set(game.getIndex(game.getHighestSharePriceStock()), player.getShares().get(game.getInd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Property Gets all property values for the judgement_passing_date property. | Collection<? extends Object> getJudgement_passing_date(); | [
"@Basic( optional = true )\r\n\t@Column( name = \"judgement_date\", length = 20 )\r\n\tpublic String getJudgementDate() {\r\n\t\treturn this.judgementDate;\r\n\t\t\r\n\t}",
"boolean hasJudgement_passing_date();",
"void addJudgement_passing_date(Object newJudgement_passing_date);",
"public void setJudgementDa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XUnaryOperation__OperandAssignment_0_2" $ANTLR start "rule__XCastedExpression__TypeAssignment_1_1" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18821:1: rule__XCastedExpression__TypeAssignment_1_1 : ( ruleJvmTypeReference ) ; | public final void rule__XCastedExpression__TypeAssignment_1_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18825:1: ( ( ... | [
"public final void rule__XCastedExpression__TypeAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30691:1:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |