query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Registers requirements to the requirements | private void registerRequirements() {
PermissionRequirement.register("global-permission");
NoPermissionRequirement.register("global-no-permission");
TimeRequirement.register("global-time");
DateRangeRequirement.register("date-range");
if(getProxy().getPluginManager().getPlugin("KaranteeniPerms") != n... | [
"public void addRequirements(SubsystemBase... requirements) {\n requiredSubsystem = requirements;\n }",
"private void setUpRequirements() {\r\n if (this.nodeTemplate.getRequirements() != null) {\r\n for (final TRequirement requirement : this.nodeTemplate.getRequirements().getRequiremen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Server registers itself to the bootstrap and either becomes primary server or updates address of primary server with itself | public void registerToBootstrap() {
try {
byte buf[] = SERVER.getBytes();
InetAddress aInetAddress = InetAddress.getByName(BOOTSTRAP_IP);
DatagramPacket packet = new DatagramPacket(buf, buf.length, aInetAddress, BOOTSTRAP_PORT);
serverSocket.send(packet);
buf = new byte[size];
... | [
"public void update_self() { \r\n\r\n\t\tPRIMARY_SERVER_IP = null; \r\n\t\tPRIMARY_SERVER_PORT = -1; \r\n\t\tisPrimary = true; \r\n\t\treportFailure = true;\r\n\r\n\t\t// replicate to other servers including bootstrap\r\n\t\tSet<String> key = IPADDRESS_TABLE.keySet(); \r\n\t\tIterator<String> it = key.iterator(); \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Argument__Group_0_2__0__Impl" $ANTLR start "rule__Argument__Group_0_2__1" ../org.waml.w3c.webidl.ui/srcgen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8859:1: rule__Argument__Group_0_2__1 : rule__Argument__Group_0_2__1__Impl ; | public final void rule__Argument__Group_0_2__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8863:1: ( rule__Argument__Group_0_2__1__Impl )
... | [
"public final void rule__Argument__Group_0__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:8777:1: ( ( ( rule__Argume... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves and removes the first element of this queue. | @Override
public E removeFirst() {
if (isEmpty()) {
throw new NoSuchElementException("No elements in dequeue");
}
E value = dequeue[head];
dequeue[head] = null;
head = ++head % dequeue.length;
size--;
if (size < dequeue.length / 2) {
re... | [
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"public Item removeFirst() {\n\n if (head == null) {\n System.out.println(\"Queue is empty. Please insert elements.\");\n return null;\n }\n Node r = head;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run annotation handler for return. | protected abstract void runReturnAnnotationHandler(); | [
"@Override\n protected void runReturnAnnotationHandler() {\n checkContainsAny(MSG_RETURN_VALUE_WITH_NONNULL_BY_DEFAULT,\n NullnessAnnotation.RETURN_VALUES_ARE_NONNULL_BY_DEFAULT);\n checkContainsAny(MSG_RETURN_VALUE_WITH_NULLABLE,\n NullnessAnnotati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines whether a given row is an outlier in the currently associated data transformation. | public boolean isOutlier(int row){
checkRegistry();
return registry.isOutlier(this, row);
} | [
"private boolean isOutlier(int measurement) {\n int target = this.target.get();\n return Math.abs(measurement - target) > target * 0.15;\n }",
"public boolean isOutlier() {\n return this.outlier;\n }",
"public boolean isOutlier(double valueToCheck, double[] timeSeriesData) {\n\n // get m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("expanded Item: " + item.getValue().getPath()); | public default void searchAllExpandedItems(TreeItem<PathItem> item){
if(item.getChildren().size() > 0){
for(TreeItem<PathItem> subItem : item.getChildren()){
if (subItem.isExpanded()) {
// PathTreeCell.saveExpandedItems.put(subItem.getValue().getPath(), subItem);
... | [
"public int getExpandedIndex() { return expandedIndex; }",
"public void expand() {\n openItems();\n }",
"public boolean getExpand() { return expand; }",
"public java.lang.String getExpanded_info() {\n return expanded_info;\n }",
"String getSubItem();",
"public ch.ivyteam.ivy.scripting.object... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ith parameter node. | public ParamNode getParamNode(int i) { return params[i]; } | [
"public Integer getParameterNum() {\n return parameterNum;\n }",
"public Parameter getParameter(int ordinal);",
"public Object getParamValue(int i);",
"Parameter getParameter();",
"ResolvedParameterDeclaration getParam(int i);",
"protected final Expression param(int idx) {\r\n return (Exp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes the CompilationUnit with defaults except for class loader. | public CompilationUnit(ClassLoader loader) {
this(null, null, loader);
} | [
"public CompilationUnit() {\n this(null, null, null);\n }",
"public SimpleClassLoader()\n {\n super();\n init();\n }",
"private static void initialize()\r\n\t{\r\n\t\tif(_compiler == null)\r\n\t\t{\r\n\t\t\t_compiler = new Compiler();\r\n\t\t}\r\n\t}",
"public CompilationUnit(CompilerConfi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
stores the Huffman codes for all characters Initialize important pieces. For the most part, what is initialized in here is the important info that we want. (Except the final tree.. that comes later) | public HuffmanCodes() {
huffBuilder = new PriorityQueue<CS232LinkedBinaryTree<Integer, Character>>();
fileData = new ArrayList<char[]>();
frequencyCount = new int[127];
huffCodeVals = new String[127];
} | [
"public HuffmanCompressor(){\n charList = new ArrayList<HuffmanNode>();\n }",
"public static void buildHuffmanTree(String text) {\n\t\t// count frequency of appearance of each character\n\t\t// and store it in a map\n\t\tMap<Character, Integer> freq = new HashMap<>();\n\t\tfor (char c : text.toCharArray()) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Information about incompatible devices. | public java.util.List<DevicePoolCompatibilityResult> getIncompatibleDevices() {
return incompatibleDevices;
} | [
"@Override\n\t\t\tpublic void incompatible() {\n\t\t\t\tshowVersions(ioio_, \"Incompatible firmware version!\");\n\t\t\t}",
"public void setIncompatibleDevices(java.util.Collection<DevicePoolCompatibilityResult> incompatibleDevices) {\n if (incompatibleDevices == null) {\n this.incompatibleDevic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets animation mode all available modes are named StapGraph.CONSTANT_ANIMATION_ | public void setAnimationMode(int mode) {
animation_mode = mode;
if (mode == CONSTANT_ANIMATION_SLOW){
callgraphView.getAnimation_slow().setChecked(true);
callgraphView.getAnimation_fast().setChecked(false);
}else if (mode == CONSTANT_ANIMATION_FASTEST){
callgraphView.getAnimation_slow().setChecked(... | [
"@JSProperty(\"animation\")\n void setAnimation(AnimationOptionsObject value);",
"public void setAnimation()\n {\n if(speed<0)\n {\n if(animationCount % 4 == 0)\n animateLeft();\n }\n else\n {\n if(animationCount % 4 == 0)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates an array called "holder" that is 1 larger than the array fed into it | public static int[] process(int[] prevHolder) {
int[] holder = new int[prevHolder.length + 1];
/**the first entry in holder will always be 1*/
holder[0] = 1;
/**this loop populates the numbers inbetween the first and last index values, the first and last values are alread... | [
"private static void generate(SortHolder holder){\t\t\n\t\tRandom rnd = new Random(77);\n\t\t\n\t\tholder.arr1 = new int[holder.cycles][holder.numbers];\n\t\tholder.arr2 = new Integer[holder.cycles][holder.numbers];\n\t\t\n\t\tfor(int idxCycle = 0; idxCycle < holder.cycles; ++idxCycle){\n\t\t\tfor(int idxNumber = 0... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column regsat_regist.test_type | public Integer getTestType() {
return testType;
} | [
"public Long getTestType() {\n return testType;\n }",
"public String getTestType() {\n return testType;\n }",
"public StrColumn getSpecimenType() {\n return delegate.getColumn(\"specimen_type\", DelegatingStrColumn::new);\n }",
"String getTestFieldTypeId();",
"public TestingTyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the audit indicators strategy where uuid = &63; and groupId = &63; or returns null if it could not be found, optionally using the finder cache. | public static AuditIndicatorsStrategy fetchByUUID_G(java.lang.String uuid,
long groupId, boolean retrieveFromCache) {
return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache);
} | [
"public static AuditIndicatorsStrategy fetchByUUID_G(java.lang.String uuid,\r\n\t\tlong groupId) {\r\n\t\treturn getPersistence().fetchByUUID_G(uuid, groupId);\r\n\t}",
"public static List<AuditIndicatorsStrategy> findByUuid(\r\n\t\tjava.lang.String uuid) {\r\n\t\treturn getPersistence().findByUuid(uuid);\r\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ending fill color of the row. The fill color is used to fill the interior of shapes. Color values as represented as an integer containing the red, green, blue, and alpha (transparency) color channels. A color with zero alpha component is fully transparent and will not be drawn. | public int getEndFillColor(int row) {
return getInt(row, VisualItem.ENDFILLCOLOR);
} | [
"public int getEndStrokeColor(int row) {\n return getInt(row, VisualItem.ENDSTROKECOLOR);\n }",
"public void setEndFillColor(int row, int color) {\n setInt(row, VisualItem.ENDFILLCOLOR, color);\n }",
"public static Color getFillColour() {\n return fillColor;\n }",
"public int get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test9: negative min, negative max, negative max | @Test
public void testNegMinNegMaxNegMax(){
int min=3, mid=5, max=10;
assertEquals( -min, MaxDiTre.max(-min, -max, -min) );
} | [
"@Test\n\tpublic void testNegMaxNegMaxNegMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-max, -max, -min) );\n\t}",
"@Test\n\tpublic void testNegMaxNegMinNegMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-max, -min, -max) );\n\t}",
"public static void ch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of search news in paging | public List<New> searchNew(String search, int page) {
List<New> listSearch = new ArrayList<>();
String sql = "SELECT * FROM News\n"
+ "WHERE Title LIKE ?\n"
+ "ORDER BY [Date] DESC\n"
+ "OFFSET ? ROWs\n"
+ "FETCH FIRST 2 ROWS ONLY";
... | [
"@Override\n public List<News> search(String txt, int pageIndex, int pageSize) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n List<News> list = new ArrayList<>();\n String query = \"select *from(\"\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
C++: static Ptr_SURF_CUDA cv::cuda::SURF_CUDA::create(double _hessianThreshold, int _nOctaves = 4, int _nOctaveLayers = 2, bool _extended = false, float _keypointsRatio = 0.01f, bool _upright = false) | public static SURF_CUDA create(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio, boolean _upright) {
return SURF_CUDA.__fromPtr__(create_0(_hessianThreshold, _nOctaves, _nOctaveLayers, _extended, _keypointsRatio, _upright));
} | [
"private static native long create_0(double _hessianThreshold, int _nOctaves, int _nOctaveLayers, boolean _extended, float _keypointsRatio, boolean _upright);",
"public FastHessianFeatureDetector(NonMaxSuppression extractor, int maxFeaturesPerScale,\n\t\t\t\t\t\t\t\t\t int initialSampleRate, int initialSize,\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes the workspace with the specified name from the repository, deleting all content within it. | public void deleteWorkspace(String name); | [
"protected void removeWorkspace( String workspaceName ) {\n }",
"void workspaceRemoved( String workspaceName );",
"public static void shutdownWorkspace(String name, RepositoryImpl repo)\n throws RepositoryException {\n repo.getWorkspaceInfo(name).dispose();\n }",
"@ServiceMethod(return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string src_actor = 3; | public java.lang.String getSrcActor() {
java.lang.Object ref = srcActor_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8()... | [
"java.lang.String getSrcActor();",
"public java.lang.String getSrcActor() {\n java.lang.Object ref = srcActor_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringU... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value for child leaf "statusfield", using a String value. | public void setStatusFieldValue(String statusFieldValue)
throws JNCException {
setStatusFieldValue(new YangEnumeration(statusFieldValue, new String[] {
"on",
"off",
}));
} | [
"public void setStatusFieldValue(YangEnumeration statusFieldValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"status-field\",\n statusFieldValue,\n childrenNames());\n }",
"public void addStatusField() throws JNCException {\n setLeafValue... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end rule__IntLeaf__Group__0 $ANTLR start rule__IntLeaf__Group__0__Impl ../fr.irisa.cairn.model.mathematica.xtext.ui/srcgen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:885:1: rule__IntLeaf__Group__0__Impl : ( ( rule__IntLeaf__SignedAssignment_0 )? ) ; | public final void rule__IntLeaf__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../fr.irisa.cairn.model.mathematica.xtext.ui/src-gen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:889:1: ( ( ( rule__IntLeaf... | [
"public final void rule__IntLeaf__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.irisa.cairn.model.mathematica.xtext.ui/src-gen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:877:1: ( rule__IntLe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/a public method called toString (NO PARAMETERS) that returns (in a return statement) the issuerID, accountNum and checkDigit , BUT WITH A '' BETWEEN EVERY 4 CHARACTERS! (don't change any of the instance variables here!) | public String toString() {
String str = issuerID + accountNum + checkDigit;
return str;
} | [
"public java.lang.String getAccountNumberString()\r\n\t{\r\n\t\t\r\n\t}",
"public void createCard(String tempIssuerID) {\n /*IF the parameter isn't null AND it's 6 characters long AND each char is a digit,\n assign the parameter to the instance variable for issuerID (otherwise LEAVE THE\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a clone of a specific triangle in the Mesh. A clone is returned, not the original triangle, so that external users cannot alter the data. | public Triangle getTriangleClone(int index) {
if (index < triangles.length)
return (Triangle) triangles[index].clone();
else
return null;
} | [
"public Triangle copy()\r\n {\r\n return new Triangle (v1.getX(),v1.getY(),v2.getX(),v2.getY(),v3.getX(),v3.getY());\r\n }",
"public final Shape copyShape()\n\t{\n\t\tTriangle newT = new Triangle();\n\t\tnewT.mySideA = mySideA;\n\t\tnewT.mySideB = mySideB;\n\t\tnewT.mySideC = mySideC;\n\t\treturn newT;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates Links from the ScopeRule for the Scope class | private void createLinksForMatchedASTRules(
Link<ASTMCGrammar, ASTCDCompilationUnit> rootLink) {
Set<Link<ASTMCGrammar, ASTCDClass>> linkList = rootLink.getLinks(ASTMCGrammar.class, ASTCDClass.class);
if (linkList.size() == 1) {
Link<ASTMCGrammar, ASTCDClass> link = linkList.stream().findFirst()... | [
"public abstract ImmutableSet<RuleScope> scopes();",
"protected abstract URL getScopeURL();",
"Scope createScope();",
"AccessRule createAccessRule();",
"Rule createRule();",
"LINK createLINK();",
"public Scope() {}",
"public List<? extends LegalScope> getChildScopes(LegalScope scope);",
"java.util.L... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Work Effort' reference. | WorkEffort getWorkEffort(); | [
"public double getEffort(){\n return Effort;\n }",
"int getEffort();",
"public java.lang.Integer getAvailableEffort() {\n return availableEffort;\n }",
"double getRepairEffort();",
"public String getEmploymentWork() {\n return employmentWork;\n }",
"public Duration getWork()\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show error message about game being cancelled and return to main screen. | void showGameError() {
new AlertDialog.Builder(this)
.setMessage(getString(R.string.game_problem))
.setNeutralButton(android.R.string.ok, null).create();
switchToMainScreen();
} | [
"public void displayAI_TurnError()\n {\n \tJOptionPane.showMessageDialog(this,\"Wait your turn!\", \"Not Your Turn\", JOptionPane.ERROR_MESSAGE);\n }",
"private void restartGame() {\n int option = JOptionPane.showConfirmDialog(\n frame_window, \"Do you want to restart the game? \", ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates the preferred buffering strategy for this stream implementation. | default StreamBuffering getBuffering() {
return StreamBuffering.UNSUPPORTED;
} | [
"public void initBufferStrategy() {\n // Triple-buffering\n createBufferStrategy(3);\n bufferStrategy = getBufferStrategy();\n }",
"public void setBuffered(boolean bufferMe)\r\n\t{\r\n\t\tthis._bufferMe = bufferMe;\r\n\t}",
"public abstract int getBufferMode();",
"public String getTcpB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getName method, of class BBDParameterMetaData. | @Test
public void getName() {
System.out.println("getName");
BBDParameterMetaData instance = new BBDParameterMetaData(1,"test",2);
String expResult = "test";
String result = instance.getName();
assertEquals(expResult, result);
} | [
"String getNameParam();",
"@Test\r\n public void getNameTest()\r\n {\r\n Assert.assertEquals(stub.getName(), NAME);\r\n }",
"@Test\n\tpublic void test_TCM__String_getName() {\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\");\n\t\tassertTrue(\"incorrect attribute name\", attr.getNam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the set of preferred scores for FDR calculation. | public List<String> getPreferredFDRScores() {
return preferredFDRScores;
} | [
"public double getBestScore();",
"private ArrayList<Integer> possibleScores() {\n return null;\n }",
"Float getAutoScore();",
"float getScore();",
"public String getFilesPreferredFDRScore(Long fileID) {\n // first look in the preferred scores\n for (String scoreShort : preferredFDRSc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method to allow subclasses to create different child for folder. | protected LookupNode createChild (DataFolder folder) {
return new LookupNode (folder);
} | [
"protected abstract boolean isCreateChild();",
"protected abstract void createChildren();",
"Folder createFolder();",
"@Test\n public void testRenameChildDirForbidden() throws Exception {\n Assume.assumeTrue(renameSupported());\n FileSystemContractBaseTest.LOG.info(\"testRenameChildDirForbidd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Welcomes user and prints new map | public static void intro(){
System.out.println("Welcome to Maze Runner!");
System.out.println("Here is your current position:");
myMap.printMap();
} | [
"public static void welcome(){\n\n System.out.print(\"Welcome to the Human Resources Management System.\"+\n \"\\nThis program allows you to add new employees and print all employees.\");\n \n }",
"protected void printWelcome() {\n System.out.println(\"Slot machine game... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads every Cell (its location, the figure type, and the state) and creates a map. Then it creates a society with the map and saves it in the society field. | private void getSociety() throws XMLException {
Map<Location, Cell> grid = new HashMap<Location, Cell>();
NodeList nList = getRootElement().getElementsByTagName(XMLWritter.CELL);
for (int temp = 0; temp < nList.getLength(); temp++) {
Node nNode = nList.item(temp);
if (nNode.getNodeType() == Node.ELEMENT_NOD... | [
"protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The wizard will see if there is a floor in the next step closer to the given position in the X/Y direction. | private boolean seeNextFloorX(Position target) {
if (target.x == position.x) {
return false;
}
if (target.x > position.x) {
return world[position.x + 1][position.y].equals(Tileset.FLOOR);
}
if (target.x < position.x) {
return world[position.x ... | [
"private boolean isMoveToLocationWithinPlateauBoundary() {\r\n\t\tfinal int maxX = plateau.getUpperRight().getXcoordinate();\r\n\t\tfinal int maxY = plateau.getUpperRight().getYcoordinate();\r\n\t\tfinal int minX = plateau.getLowerLeft().getXcoordinate();\r\n\t\tfinal int minY = plateau.getLowerLeft().getYcoordinat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ControlFlow__Group__0__Impl" $ANTLR start "rule__ControlFlow__Group__1" InternalActivityDiagram.g:6821:1: rule__ControlFlow__Group__1 : rule__ControlFlow__Group__1__Impl rule__ControlFlow__Group__2 ; | public final void rule__ControlFlow__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDiagram.g:6825:1: ( rule__ControlFlow__Group__1__Impl rule__ControlFlow__Group__2 )
// InternalActivityDiagram.g:6826:2: rule__C... | [
"public final void rule__Activity__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:3004:1: ( rule__Activity__Group__0__Impl rule__Activity__Group__1 )\n // InternalComponentDefinition.g:3005:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
RavenJObject representing document's metadata. | @Override
public RavenJObject getMetadata() {
return metadata;
} | [
"public RavenJObject getMetadata() {\n return metadata;\n }",
"public void setMetadata(RavenJObject metadata) {\n this.metadata = metadata;\n }",
"public Metadata getMetadata() { return metadata; }",
"Map<String, Object> getMetadata();",
"java.lang.String getMetadataJson();",
"public Document getI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Vertrag__Group_2__1" $ANTLR start "rule__Vertrag__Group_2__1__Impl" InternalVertrag.g:427:1: rule__Vertrag__Group_2__1__Impl : ( ( rule__Vertrag__Monatl_kostenAssignment_2_1 ) ) ; | public final void rule__Vertrag__Group_2__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalVertrag.g:431:1: ( ( ( rule__Vertrag__Monatl_kostenAssignment_2_1 ) ) )
// InternalVertrag.g:432:1: ( ( rule__Vertrag__Monatl_kostenAss... | [
"public final void rule__Vertrag__Group_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalVertrag.g:420:1: ( rule__Vertrag__Group_2__1__Impl )\n // InternalVertrag.g:421:2: rule__Vertrag__Group_2__1__Impl\n {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Prints the BreakPrintExample to the default printer. | public static void main(String[] args) {
// Workaround for SWT bug on GTK - force SWT to initialize so we don't
// crash.
Display.getDefault();
PaperClips.print(new PrintJob("BreakPrintExample.java", createPrint()),
new PrinterData());
} | [
"public void print() {\n window.print();\n setBackground();\n }",
"public void print() {\n\t\tPrinter.print(doPrint());\n\t}",
"Print createPrint();",
"public void print()\n {\n System.out.println();\n System.out.println(\"Ticket to \" + destination +\n \" Price : ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an NPC with no attached character (this does not spawn the NPC) | public NPC createNPC(CreatureType type, String name); | [
"public static GameObject createNpc() {\n return new GameObject(\n new DemoInputComponent(),\n new ObjectPhysicComponent(),\n new ObjectGraphicComponent(),\n \"npc\");\n }",
"public NPC createNPC(CreatureType type, String name, Character character);",
"public NPC createGhost(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
State in the perspective if the cart is active, merged with another cart or ordered. | CartState getCartState(); | [
"@Override\n public void syncExistingProductState(boolean isExistingProductRestored) {\n //Saving the state\n mIsExistingProductRestored = isExistingProductRestored;\n }",
"boolean isDealInCart();",
"public void updateClearedAndReconciled(){\n\t\tif (associatedSource.equals(from.getSelectedI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Information that actor has been unspawned | public void on_actor_unspawned(int actor_id) {
this.broadcast(new CharacterUnspawned(actor_id, this.thrd.iteration));
} | [
"@Override\r\n public void postStop() {\r\n \t\r\n \tcontext().actorSelection(\"/user/timeActor/\")\r\n .tell(new TimeActor.DeRegisterMsg(), self());\r\n }",
"public void deregister(ActorAgent anActorAgent);",
"public void destroyActor() {\n this.remove();\n }",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Description : Delete GraphFile and delete its entry from maps if this file is in .mprj file of this project | private String deleteGraphAndFile(int pintGraphId
, String pstrProjectExtension
, String pstrProjectDelimiter
, String pstrGraphDelimiter){
String messageReturned = "";
String graphFilePath = mapGraphs.get(pintGraphId).getGraphFile();
... | [
"public void deleteGeneratedFiles();",
"public void deleteFile() {\n\t\tthis.dataFile.delete();\n\n\t\tthis.dataFile = null;\n\t\tthis.currentObject = null;\n\t\tthis.dataIterator = null;\n\t}",
"private boolean removeFileOntology() {\n StringBuilder builder = new StringBuilder();\n builder.append... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the value associated with the column: CRT_DATE | public java.lang.String getCrtDate () {
return crtDate;
} | [
"@Temporal(TemporalType.DATE)\n\t@Column(name = \"CRTN_DATE\", nullable = false)\n\tpublic Date getCrtnDate() {\n\t\treturn crtnDate;\n\t}",
"Date getDateValue();",
"public Date getVALUE_DATE()\r\n {\r\n\treturn VALUE_DATE;\r\n }",
"public Date getVALUE_DATE() {\r\n return VALUE_DATE;\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Param In'. | ParamIn createParamIn(); | [
"ParamsIn createParamsIn();",
"In createIn();",
"ParameterObject createParameterObject();",
"Param createParam();",
"public InputParameterInfo() {\r\n }",
"Parameter createParameter();",
"InputParameterDeclaration createInputParameterDeclaration();",
"InOper createInOper();",
"public T addParam(I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for style called 0 times. Type: GENERATED_CSS. Build precedence: 1. | private com.sapientarrow.gwtapp.client.admin.AdminView_AdminViewUiBinderImpl_GenCss_style get_style() {
return build_style();
} | [
"private com.glassbox.webinvoice.client.ui.container.Container_ContainerUiBinderImpl_GenCss_style get_style() {\n return build_style();\n }",
"StyleValue getCSSValue();",
"public String getStyle() {\n \t\treturn null;\n \t}",
"protected String getStyleClass()\n {\n return _styleClass;\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ this method puts the scheduler to sleep for a time quantum | private void schedulerSleep() {
try {
Thread.sleep(timeSlice);
} catch (InterruptedException e) {
}
;
} | [
"private void sleep()\n\t{\n\t\ttry\n\t\t{\n\t\t\tThread.sleep(SLEEP_TIME);\n\t\t} catch (InterruptedException e)\n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void sleep()\n {\n try {\n Thread.sleep(Driver.sleepTimeMs);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/UserDetails user = User.builder() .username("cs") .password( passwordEncoder.encode("cs")) .roles("STUDENT") .build(); | @Override
@Bean
protected UserDetailsService userDetailsService() {
UserDetails user = User.builder()
.username("cs")
.password( passwordEncoder.encode("cs"))
.roles(STUDENT.name())
.build();
UserDetails admin = User.builder()
... | [
"@Bean\n public UserDetailsManager userDetailsManager() {\n\n\n CustomUserDetailsManager detailsManager = new CustomUserDetailsManager();\n detailsManager.createUser(new SecurityUser(\"sa\", \"123\"));\n return detailsManager;\n }",
"User selectUserByUserNameAndPassword(@Param(\"usernam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the current invaders in the game | public List<Invader> getInvaders(){
return invaders;
} | [
"public String getInviter()\n {\n return inviter;\n }",
"protected SIinvader findInvader()\n {\n for ( SIinvader[] invaders : this.invaders )\n for ( SIinvader invader : invaders )\n if ( invader != null ) return invader;\n return null;\n }",
"public MMatc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_txt_strike_priceKeyPressed change mouse cursor to a little hand when mouse entered the image | private void lbl_imgMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbl_imgMouseEntered
// TODO add your handling code here:
this.lbl_img.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
} | [
"public void zmienKursor()\n {\n if(kursor==7)//Ustaw kursor gumki\n {\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Image image = toolkit.getImage(\"gumka.png\");\n Point hotSpot = new Point(0, 0);\n Cursor cursor = toolkit.createCustomCursor(image,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Move the elevator to a given position in inches. | public void moveElevator(double inches) {
motorSetpoint = heightToPot(inches);
SmartDashboard.putNumber("Elev Setpoint", motorSetpoint);
motor.set(ControlMode.Position, motorSetpoint);
} | [
"void moveElevator(int toFloor);",
"public void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator throug... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct an instance of each generator specified in given configuration. | public GeneratorRegistry(final DDLGenConfiguration config) {
String prop = config.getStringValue(DDLGenConfiguration.GENERATORS_KEY, "");
StringTokenizer tokenizer = new StringTokenizer(prop, ",");
ClassLoader loader = GeneratorRegistry.class.getClassLoader();
while (tokenizer.hasMor... | [
"listOfDataGenerators createlistOfDataGenerators();",
"public MapGenerator(Config config) {\n this(config, getReliefMap(config), getTextureMap(config), new CustomHeader(config),\n new StaticGameObjects());\n }",
"private GeneratorBase createGenerator(Target target, FileConfig fileConfig... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the infohash of the torrent. | public Sha1Hash getInfoHash() {
return new Sha1Hash(ti.info_hash());
} | [
"public byte[] getTorrentInfoHash() {\r\n \t\treturn this.torrentInfo.info_hash.array();\r\n \t}",
"byte[] getInfoHash();",
"public String getInfoHash() {\r\n \t\treturn this.info_hash;\r\n \t}",
"String getHexInfoHash();",
"long getHash();",
"int getHash();",
"java.lang.String getHash();",
"com.googl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Literal'. | Literal createLiteral(); | [
"SimpleLiteral createSimpleLiteral();",
"public Literal getLiteral();",
"RealLiteral createRealLiteral();",
"LiteralInner createLiteralInner();",
"public Literal createLiteral(byte b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }",
"public Literal createLiteral(String lexica... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get the noun in a tree | private static List<CoreLabel> getNoun(Tree root) {
return root.getLeaves().stream().filter(l -> Arrays.asList("NN", "NNS").contains(l.parent(root).value())).map(l -> (CoreLabel) l.label()).collect(Collectors.toList());
} | [
"java.lang.String getNoun();",
"public Noun getNoun() {\n if(null == nouns){\n this.nouns = new HashSet<Noun>();\n this.nouns.add(new Noun());\n }\n return nouns.iterator().next();\n }",
"public String noun() {\n\t\treturn noun.getPrime();\n\t}",
"public static Tree getHeadWordOrPhrase(Tre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getAverageFund(int[]) Calculates the average frequency of multiple consecutive input lines, numbered from "firstInput" to "lastInput". | public float getAverageFund(int firstInput, int lastInput)
{
inputNumErrorCheck(firstInput, "getAverageFund(int, int) - first int");
inputNumErrorCheck(lastInput, "getAverageFund(int, int) - second int");
if (!(lastInput > firstInput)) {
throw new IllegalArgumentException("InputClassJack.getAverageFund(): ... | [
"public float getAverageAmp(int firstInput, int lastInput)\n\t{\n\t\tinputNumErrorCheck(firstInput, \"getAverageFund(int, int) - first int\");\n\t\tinputNumErrorCheck(lastInput, \"getAverageFund(int, int) - second int\");\n\t\tif (!(lastInput > firstInput)) { \n\t\t\tthrow new IllegalArgumentException(\"InputClass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Downgrade <summemietenetto> elements to OpenImmo 1.2.6. The attribute "summemieteust" of <summemietenetto> elements are renamed to "sonstigemieteust" in OpenImmo 1.2.6. | protected void downgradeSummemietenettoElements( Document doc ) throws JaxenException
{
List nodes = XmlUtils.newXPath(
"/io:openimmo/io:anbieter/io:immobilie/io:preise/io:summemietenetto[@summemieteust]",
doc ).selectNodes( doc );
for (Object item : nodes)
{
Element node = (Element) ite... | [
"protected void upgradeSummemietenettoElements( Document doc ) throws JaxenException\n {\n List nodes = XmlUtils.newXPath(\n \"/io:openimmo/io:anbieter/io:immobilie/io:preise/io:summemietenetto[@sonstigemieteust]\",\n doc ).selectNodes( doc );\n for (Object item : nodes)\n {\n Element node ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search for form definitions, no actual implementation yet, only returns an empty xml, this to minimize error logs on the orbeon side. | @RequestMapping(method = RequestMethod.GET, value =
{ FR_SERVICE_RESOURCE_PREFIX + "/form", FR_SERVICE_RESOURCE_PREFIX + "/form/{applicationId}",
FR_SERVICE_RESOURCE_PREFIX + "/form/{applicationId}/{formId}" })
public void searchFormDefinitions(final HttpServletRequest request, final HttpServletResponse response)
... | [
"public FormDefinition getForm();",
"private void loadForm(){\n\t\tFormUtil.dlg.setText(LocaleText.get(\"openingForm\"));\n\t\tFormUtil.dlg.center();\n\n\t\tDeferredCommand.addCommand(new Command(){\n\t\t\tpublic void execute() {\n\n\t\t\t\tString url = FormUtil.getHostPageBaseURL();\n\t\t\t\turl += FormUtil.getF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the message displayed in the message area. | public void setMessage (String msg)
{
messageArea.setText (msg);
} | [
"public void setMessage(String message)\n {\n writeMessagePanel.getEditorPane().setText(message);\n }",
"public void displayMessage(String theMessage)\n {\n message = theMessage;\n this.repaint();\n }",
"public void setMessage(String messageText) {\n this.messageText =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Release the possession of this distributed lock. | public void releaseLock() throws LockException {
long[] err = new long[1];
DpsHelper dps = null;
try {
dps = DpsHelperHolder.getDpsHelper();
dps.dlReleaseLock(id, err);
} catch(Exception e) {
// Either dps cannot be initialized or releaseLock went wrong.
// An error code of 65534 indicates that t... | [
"private void releaseLock()\r\n {\r\n Pair<Long, String> lockPair = lockThreadLocal.get();\r\n if (lockPair != null)\r\n {\r\n // We can't release without a token\r\n try\r\n {\r\n jobLockService.releaseLock(lockPair.getSecond(), LOCK_QNAME);\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
recursive func. Get query solutions for the "current arg", and call recursively to get solutions for remaining args. if we've reached the end, and we're still here, we're on a line of inquiry where all args were matched okay, so we return a result. but if an arg match fails, throw null into the stream and abort this li... | private Stream<Term> solutionsForArg(Queryable database, int argIdx, Map<Var, Term> bindings) {
if (argIdx >= args.size() ) { // success, we satisfied all args & have bindings.
// so, substitute bindings into this. (one-el array so we can return as stream).
Term result[] = { this.substitute(bindings) };... | [
"Pair<Boolean, List<Result>> execQuery(int matchLimit);",
"private Board iterativeDeepeningSearch(){\n\t\t\n\t\tif(printSummary){System.out.println(\"Iterative Deepening Search:\");}\n\t\t\n\t\tfor(int depth=0; depth < Integer.MAX_VALUE; depth++){\n\t\t\tBoard solution = depthLimitedSearch(depth);\n\t\t\tif(solut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method sets the value of the database column V_RP_WK_CELL.WEEK | public void setWeek(Integer week) {
this.week = week;
} | [
"public void setWeek(int week) {\n mWeek = week;\n }",
"public void setWeek(Integer week) {\r\n this.week = week;\r\n }",
"public void setWeekNum(Integer week_num);",
"public void setWeek(){\n\t\ttempCal.setTime(this.cal.getTime());;\n\t\tweeknr.setText(Integer.toString(tempCal.get(Calenda... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Series Valid Opening Shape constructor | public SeriesValidOpeningShape() {
} | [
"Shape createShape();",
"public EpsShape(Shape shape) {\n\t\tthis(shape,false);\n\t}",
"public SeriesValidOpeningShape(SeriesValidOpeningShapePK pk) {\n this.seriesValidOpeningPK = pk;\n }",
"public OvalShape() { super(); }",
"public Shape(Point startPoint)\n {\n this.startPoint = startP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
List tList = template.loadAll(ComicTypeBean.class); | public List<ComicTypeBean> getComicTypeList(){
List<ComicTypeBean> tList = template.find("from ComicTypeBean");
return tList;
} | [
"public List<ComicBean> getComicList(){\n\t\tList<ComicBean> clist = template.find(\"from ComicBean\");\n\t\treturn clist;\n\t}",
"TTemplateList getTemplateList();",
"public SampletypeBean[] loadUsingTemplate(SampletypeBean pObject) throws SQLException\n {\n Connection c = null;\n PreparedState... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The interface Filmmaker dao. | public interface FilmmakerDAO {
/**
* List all filmmakers list.
*
* @return the list
* @throws DataStorageException the data storage exception
*/
List<Filmmaker> listAllFilmmakers() throws DataStorageException;
} | [
"public interface FilmDAO {\n // Create\n\n /**\n * Add new film to DB, the production year is expected to be\n * after 1888 and and before 7 years ahead of current time\n *\n * @param film the film object to be added\n * @return true if the film was added, otherwise false\n */\n bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
call this to copy valid music to one dir | void copyValidMusics(String outDir, List<T> items); | [
"private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }",
"private void chooseSongFolder() throws NullPointerExcepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the refDate value for this E1Bpacre09. | public java.lang.String getRefDate() {
return refDate;
} | [
"public java.util.Date getRefDate () {\n\t\treturn refDate;\n\t}",
"public String getRefDate() {\n return refDate;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getReferenceDateInternal();",
"public java.lang.String getReferenceDate() {\n return referenceDate;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
f(New.map()); // Does not compile, But in 1.8 it does? uncomment | public static void main(String[] args) {
f(New.map()); // Does not compile, But in 1.8 it does?
} | [
"public Cons map(F f) {\n // TODO by student\n }",
"public interface FunctionMap {\n\n}",
"VariableMap getFunctionMap() {\n return new VariableMap(ImmutableMap.copyOf(renameMap));\n }",
"protected boolean isMapArgumentConstructorSupported() {\n return true;\n }",
"@Test\n public void te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new Pixmap instance from the given encoded image data. The image can be encoded as JPEG, PNG or BMP. | public Pixmap(byte[] encodedData, int offset, int len){
load(encodedData, offset, len, null);
} | [
"private BufferedImage createImageFromBytes(byte[] data) {\r\n ByteArrayInputStream stream = new ByteArrayInputStream(data);\r\n try {\r\n return ImageIO.read(stream);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To process cancel pending leave request by user | public ActionForward cancelPendingLeaveRequest(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
try {
PortalUserDetails sessionUser = (PortalUserDetails) SecurityContextHolder
.getContext().getAuthentication().getPrincipal();
L... | [
"void requestCancel();",
"public void requestCancel();",
"@RequestMapping(value = \"/cancel\", method = RequestMethod.POST)\n\tpublic String cancelleaves(@RequestBody Leaves leave) {\n\n\t\tString status = ls.cancelLeavesRepository(leave);\n\t\treturn status;\n\t}",
"Cancel createCancel();",
"public void ca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove shop types from the list of shop types the feature pack is available for. | public de.epages.ws.featurepack.model.TRemoveShopType_Return[] removeShopType(de.epages.ws.featurepack.model.TRemoveShopType_Input[] featurePacks) throws java.rmi.RemoteException; | [
"public void removeAllAppType()\n {\n _appTypeList.removeAllElements();\n }",
"void unsetProductType();",
"public de.epages.ws.featurepack.model.TRemoveFromShop_Return[] removeFromShop(de.epages.ws.featurepack.model.TRemoveFromShop_Input[] featurePacks) throws java.rmi.RemoteException;",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Does the fractal contain any 0's or 1's? Searches through each pixel in _fractal and checks to see if their escape time is 0 or a 1. Used for the Burning Ship test. | public boolean boolContainsNoZerosOrOnes(Pixel[][] fractal) {
for (int x = 0; x < fractal.length; x++) {
for (int y = 0; y < fractal[0].length; y++) {
if (fractal[x][y].getEscapeTime() == 0 | fractal[x][y].getEscapeTime() == 1) {
return false;
}
}
}
return true;
} | [
"boolean hasZeroCountFloat();",
"private boolean isGoodState() {\n\t resetMask();\n\t checkHorizontal();\n\t checkVertical();\n\n\t for(int i = 0; i < maskArray.length; i++){\n\t for (int j = 0; j < maskArray[i].length; j++){\n\n\t if (maskArray[i][j] == 1){\n\t return false;\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setNombre method, of class DboEdificio. | @Test
public void testSetNombre() {
System.out.println("setNombre");
String nombre = "T-3";
DboEdificio instance = new DboEdificio(1, "T-3");
instance.setNombre(nombre);
} | [
"@Test\r\n public void testSetNombre() {\r\n System.out.println(\"setNombre\");\r\n String Nombre = \"\";\r\n DMaestros instance = new DMaestros();\r\n instance.setNombre(Nombre);\r\n }",
"@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ pre: input != null initializes and fills the letter inventory sets size | public LetterInventory(String input)
{
if(input == null)
throw new IllegalArgumentException("input cannot be null");
input = input.toLowerCase();
letterStorage = new int[alphabetLength];
for(int i = 0; i < input.length(); i++)
{
char currLette... | [
"public void setCapacity(){\n \n int input;\n boolean flag;\n \n input = showMenu(\"\\nWhat is the capacity of this aircraft?\", capacityArray);\n \n this.capacity = capacityArray[input];\n\n }",
"public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantme... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a new Heartbeat instance. | public Heartbeat() {
} | [
"private void constructHeartbeatMessage() {\n // build head\n MessageProtobuf.Head.Builder headBuilder = MessageProtobuf.Head.newBuilder();\n headBuilder.setMsgId(UUID.randomUUID().toString());\n headBuilder.setMsgType(MsgConstant.MsgType.HEARTBEAT_MESSAGE);\n headBuilder.setTimeS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the contents of the chapter into the Chapter object. | public abstract void parseChapter(XMLObject xml, Chapter chapter); | [
"public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "use" attribute | public void unsetUse()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_attribute(USE$4);
}
} | [
"public void unsetUse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(USE$12);\n }\n }",
"public void unsetUse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use GetContactRspMsg.newBuilder() to construct. | private GetContactRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private ModifyContactRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private GetContactReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private AddContactRspMsg(com.google.protobuf.GeneratedMessageV3.Builde... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the standard display to be used. The method first checks, if the thread calling this method has an associated display. If so, this display is returned. Otherwise the method returns the default display. | public static Display getStandardDisplay() {
Display display = Display.getCurrent();
if (display == null) {
display = Display.getDefault();
}
return display;
} | [
"public static Display getStandardDisplay() {\n\t\tDisplay display = Display.getCurrent();\n\t\tif (display == null) {\n\t\t\tdisplay = Display.getDefault();\n\t\t}\n\t\treturn display;\n\t}",
"public static Display getStandardDisplay() {\n\t\tDisplay display = Display.getCurrent();\n\t\tif (display == null)\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the Site_GuiBean to reflect the chnaged SiteParams for the selected AttenuationRelationship. This method is called from the IMR_GuiBean to update the application with the Attenuation's Site Params. | public void updateSiteParams() {
//get the selected IMR
ScalarIntensityMeasureRelationshipAPI imr = imrGuiBean.getSelectedIMR_Instance();
siteGuiBean.replaceSiteParams(imr.getSiteParamsIterator());
siteGuiBean.validate();
siteGuiBean.repaint();
} | [
"protected void updateCoefficients() throws ParameterException {\n\n\t\t// Check that parameter exists\n\t\tif (im == null) {\n\t\t\tthrow new ParameterException(C +\n\t\t\t\t\t\": updateCoefficients(): \" +\n\t\t\t\t\t\"The Intensity Measusre Parameter has not been set yet, unable to process.\"\n\t\t\t);\n\t\t}\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles event signalling that a change in control of the stage by the mouse occurred. | @Subscribe
public void onMouseMovesStage(MouseMovesStageStateChangeEvent event) {
String icon = event.isEnabled() ? "move_hand_on.png" : "move_hand.png";
centerAndDragMenuItem_.setIcon(IconLoader.getIcon(
"/org/micromanager/icons/" + icon));
centerAndDragMenuItem_.setSelected(event.isEn... | [
"@Override\n public void handle(ActionEvent event) {(event)\n //mouse click\n //switch\n\n\n System.out.println(\"Action happened\");\n\n\n\n }",
"private void BotonActualizarMouseEntered(java.awt.event.MouseEvent evt) {\n }",
"@FXML\n private void setOnMouseDragged(MouseEvent e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the anite uri. | public URI getAniteUri()
{
return aniteUri;
} | [
"public String getUri() {\n return getResourceInfo().getUri();\n }",
"public String uri() {\n return this.uri;\n }",
"public java.lang.String getUri() {\n return uri;\n }",
"public String getUri() {\n\t\treturn getArguments().getString(AppConfig.FRAGMENT_TYPE);\n\t}",
"public S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simulation pseudocode 1. Determine run duration in days. 2. Do the following From day 1 to day d. 1. For each human in population 1. Check if human could be infected. 2. If human could be infected, increase number of infected (increment), and decrease the number of susceptible. 3. Check if human is infected. 4. If huma... | public void simulate() {
int run = pref.runDuration;
if (pref.inYears) {
run *= 365;
}
System.out.println("Simulation started.");
List<Agent> poplist = new ArrayList<Agent>(population);
// Go for every time step from day 1
for (int i = 0; i < run; i++) {
// Eval... | [
"private void continueSimulationForDays(BigDecimal days) {\r\n\t\tferengi.runMovementFor(days);\r\n\t\tbetasoide.runMovementFor(days);\r\n\t\tvulcano.runMovementFor(days);\r\n\t}",
"@Override\n public void analyzeCells() {\n for(Cell cell: getGrid()){\n int liveNeighborsCount = countLiveN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of REST_Usuarios | public REST_Usuarios() {
} | [
"public UsuarioRest() {\n usuarioRepository = new UsuarioRepository();\n usuario = new Usuario();\n }",
"public UsuarioResource() {\n }",
"public UsuariosWS() {\r\n }",
"public AltaUsuarioResource() {\r\n }",
"public Usuario create(long usuarioId);",
"public Usuario create(Usuari... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column query_cost.cost_type | public String getCost_type() {
return cost_type;
} | [
"public java.lang.String getCosttype () {\n\t\treturn _costtype;\n\t}",
"public java.lang.String getCosttype () {\n\t\treturn costtype;\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.CostType getCostType() {\n return (typekey.CostType)__getInternalInterface().getFieldValue(COSTTYPE_P... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
rescheduledTask method which returns string when a task time has been changed | public String rescheduledTask(Task task) {
return "The following task has been rescheduled to:\n"
+ task.toString();
} | [
"void refreshTaskInformation();",
"private void rescheduleOldDoneTasks() {\n\t\tlog.info(\"I am gonna list complete tasks and reschedule if they are too old...\");\n\n\t\tfor (Task task : schedulingPool.getDoneTasks()) {\n\t\t\t// skip GEN tasks\n\t\t\tif (task.getExecService() != null &&\n\t\t\t task.getExecS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Collection Return Code | public void setLBR_CollectionReturnCode (String LBR_CollectionReturnCode); | [
"public String getLBR_CollectionReturnCode();",
"void setReturnCode(int i) {\n this.returnCode = i;\n }",
"public void setReturnCode(int value) {\n this.returnCode = value;\n }",
"public void setReturnCode(Integer returnCode) {\r\n this.returnCode = returnCode;\r\n }",
"public void s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method wich init InformPanel | private void initInformPanel() {
statusPanel = findViewById(R.id.status_panel);
txtStatus = findViewById(R.id.txt_status);
} | [
"public InfoDataIF() {\n initComponents();\n }",
"public void init() {\r\n\t\t/*\r\n\t\t * Initialize panel for base\r\n\t\t */\r\n\t\tbaseList = GameMap.getBaseList();\r\n\t\tthis.add(new BaseInfoPanel(baseList.getFirst(), controlPanel));\r\n\t}",
"public void initCommonView() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a method that shows the message when user send request successfully to the recipient | private void showSuccessfulSendToast() {
Toast toast1 = Toast.makeText(getActivity(), "Sent Request Successfully to " + recipientUsername, Toast.LENGTH_LONG);
toast1.setGravity(Gravity.CENTER | Gravity.CENTER_HORIZONTAL, 0, 0);
toast1.show();
usernameEditText.setText("");
} | [
"void showSuccess(String message);",
"public void showSuccess() {\n System.out.println(successMessage);\n }",
"public void onSuccessfulMailSend()\r\n\t{\r\n\t\tfinal String message = getResources().getString(\r\n\t\t\t\tR.string.notification_email_notification_ok);\r\n\t\tToast.makeText(this, message,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HTTP Status Codes: Requests to "/" Gets all posts from database and returns them as JSON. | public String getAllPosts(Request request, Response response) {
response.type("application/json");
Collection<Post> posts = Server.database.getPosts();
try {
response.status(HTTP_OK);
return mapper.writeValueAsString(posts);
} catch (JsonProcessingException e) {
System.err.println("Jso... | [
"@GET(\"posts/\")\n Call<List<Post>>getPosts();",
"public ResponseEntity getPosts() {\n final String uri = \"https://jsonplaceholder.typicode.com/posts\";\n\n RestTemplate restTemplate = new RestTemplate();\n return restTemplate.getForEntity(uri, String.class);\n }",
"@PostMapping(\"/... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
register a Set of Scopes to the respective Indices | private void registerScopes(Set<Scope> scopes){
Iterator<Scope> i = scopes.iterator();
while(i.hasNext()){
Scope curS = i.next();
this.scopes.put(curS.getId(),curS);
}
} | [
"public void registerScope(OntologyScope scope, boolean activate);",
"public void enterScope(){\n\t\tscope.add(0, new ArrayList<SymbolEntry>());\n\t\t++scopeLevel;\n\t}",
"public void enterScope() {\n hash = new Hashtable<String, Object>();\n scopes.add(hash);\n\n }",
"public void addScope()\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add a new variable for the new SSA renaming of n | @Override
public Variable addVar(String n) {
Variable v = var.addVar(n);
floatCSP.addVar(v);
//For Fplib, we only add variables needed for the specification part
if (!isParsingMethodBody)
realCSP.addVar(v);
return v;
} | [
"public void renameVar(PlainGraph graph, String o, String n) {\n PlainNode node = graphNodeMap.get(graph).get(o);\n if (node != null) {\n // if the graph contains the old node, replace that name with the new name\n if (!graphNodeMap.get(graph).containsKey(n)) {\n g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/Main method which creates an instance of the WordGame class | public static void main(String[] args)
{
WordGame game = new WordGame();
} | [
"public Game()\n\t{\n\t\twords = Word.buildList();\n\t\tgrid = new Grid();\n\t}",
"public Game()\n {\n WordsManager wm = null;\n //TODO create a function to initialize this wordmanager\n this.level = new Level(DEFAULT_LEVEL,wm);\n // TODO (fixed) simply field initialization (us... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
does the tree contains point p? | public boolean contains(Point2D p) { return contains(root, p, true); } | [
"public boolean testPoint(Point p){\n\t\tif(parents.contains(p)) return false;\n\t\treturn true;\n\t}",
"public boolean contains(Point2D p)\n {\n if (p != null && !isEmpty())\n {\n Node current = root;\n while (current != null)\n {\n if (current.isV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .build_event_stream.WorkspaceStatus.Item item = 1; | com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.WorkspaceStatus.Item getItem(int index); | [
"com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.WorkspaceStatus.ItemOrBuilder getItemOrBuilder(\n int index);",
"public Builder addItem(com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.WorkspaceStatus.Item value) {\n if (itemBuilder_ == null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overriding to find a violation's index using only the code | @Override
public int indexOf (Object violationCode) {
if (violationCode instanceof Integer) {
for (int i = 0; i < this.size(); i++) {
Integer code = (Integer) violationCode;
if (code.equals(allViolations.get(i).getViolationCode())) {
... | [
"public abstract int getIndex();",
"long getIndex();",
"public int getIndexInAnalysis() { return index; }",
"int getIndexOfInternalTransaction();",
"int indexOf(Advice advice);",
"public int _indexof(byte[] _searchfor) throws Exception{\nif (true) return _indexof2(_searchfor,(int) (0));\n //BA.debugLineN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Give player a number of cards from a given index in euker cards. | private void addCardsToPlayer(int index, int numCards, Player player){
for(int i = 0; i < numCards; i++) {
player.addCardToHand(this.eukerCards.get(index+i));
}
} | [
"int getChiHuCards(int index);",
"private void returnInlayCard(int index)\n {\n\n }",
"int getCardIndex();",
"public void addCardIndex(Card card, int index){\n hand.add(index, card);\n }",
"@Override\n public int getCountOfDeck() {\n return cards.size();\n }",
"Card getCard(int index)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter This method set the max data rate by delivering the variable of DefaultPieDataset | public void setMaxDataRateLBL(DefaultPieDataset mdrlbl){
maxDataRateLBL = mdrlbl;
} | [
"public DefaultPieDataset getMaxDataRateLBL(){\n\t\treturn maxDataRateLBL;\n\t}",
"public void setMaxDataPoints(int max){\n maxDataPoints=max;\n plotXYSettings();\n }",
"public GaugeDataset(double max) {\n\t\tthis(max, Defaults.get().getGlobal());\n\t}",
"public void setValueMax(double valueM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decodes the remaining bytes in the buffer into a new buffer This is used for the appearance update | public static PacketBuffer decodeRemainingBytes(PacketBuffer buffer) {
// 5000 bytes is the length previously used in IncomingPackets
// we can probably refactor to use a smaller/dynamic length in future
int REMAINING_BYTES_LENGTH = 5000;
int remainingBytes = buffer.getSize() - buffer.c... | [
"void decode(byte[] bytes, StringBuilder buffer);",
"@Override\r\n\t\tprotected void decode() {\r\n\r\n\t\t\tByteBuffer chunkheaderbytes = ByteBuffer.allocate(AudChunkHeader.CHUNK_HEADER_SIZE);\r\n\t\t\tint[] update = new int[2];\r\n\r\n\t\t\t// Decompress the aud file data by chunks\r\n\t\t\twhile (true) {\r\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compares the rating between two bottles of wine. | public static int compare_rating(Wine i, Wine j) {
return i.get_rating().compareTo(j.get_rating());
} | [
"@Override\n public int compare(Hotel hotel1, Hotel hotel2) {\n Integer hotel1Rating = hotel1.getStarRating();\n Integer hotel2Rating = hotel2.getStarRating();\n int result = hotel2Rating.compareTo(hotel1Rating);\n if (result != 0) return result;\n return this.compareNames(hote... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |