query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
removes the element t from the Table calls the hash method on the key to determine correct placement has no effect if t is not in the Table | public void remove(T t) throws NoSuchElementException{
int bucket = hash(t);
int index = Table.get(bucket).linearSearch(t);
if (index == -1) {
throw new NoSuchElementException("remove(): "
+ "element is not in the table");
} else {
Table.get(bucket).advance... | [
"void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if a ListContainer exists in the named container | boolean doesListContainerExist(Object id, String containerName) throws IOException; | [
"boolean doesListContainerExist(Object id) throws IOException;",
"public abstract boolean doesContainerExist();",
"@Override\n public boolean existsContainer(IContainer con) {\n boolean aux = false;\n if (con instanceof IContainer) {\n for (int i = 0; i < containers.length; i++) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Returns selected shape; | public DShape getSelected() {
return selected;
} | [
"private PR1Model.Shape getSelection() { return selection.get(); }",
"public DGRShape getSelectedShape(Point2D p){\n for(DGRShape s:vShape){\n if(((DGRShape)s).contains(p)){\n return s; \n } \n }\n return null;\n }",
"IShape getCurrentShape();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Required. fully qualified name of the VPC Datastream will peer to. string vpc_name = 1 [(.google.api.field_behavior) = REQUIRED]; | java.lang.String getVpcName(); | [
"com.google.protobuf.ByteString getVpcNameBytes();",
"public String getVpcId() {\n return vpcId;\n }",
"static String nodeName(String vpcId) {\n return vpcId;\n }",
"public VPC getVpc() {\n return vpc;\n }",
"public String getVpcId() {\n return this.vpcId;\n }",
"public j... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XFeatureCall__FeatureCallArgumentsAssignment_3_1_1_0" $ANTLR start "rule__XFeatureCall__FeatureCallArgumentsAssignment_3_1_1_1_1" InternalDroneScript.g:18830:1: rule__XFeatureCall__FeatureCallArgumentsAssignment_3_1_1_1_1 : ( ruleXExpression ) ; | public final void rule__XFeatureCall__FeatureCallArgumentsAssignment_3_1_1_1_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDroneScript.g:18834:1: ( ( ruleXExpression ) )
// InternalDroneScript.g:18835:2: ( ruleXExpression )... | [
"public final void rule__XFeatureCall__FeatureCallArgumentsAssignment_3_1_1_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:18819:1: ( ( ruleXExpression ) )\r\n // InternalDroneScript.g:18820:2: (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method that paints red a square of the chess board with the corresponding number representing which number of movement is. | private void paintSquare(PositionInBoard position, int numberOfMovement){
board[position.row()][position.column()].setBackground(Color.red);
board[position.row()][position.column()].setText(""+numberOfMovement);
Font font = new Font("Arial", Font.PLAIN, 30);
board[position.row()][positi... | [
"public void drawLegalMoves() {\n ArrayList<Move[]> possibleMoves = activePiece.getLegalMoves(); \n ArrayList<Move[]> captureMoves;\n int deltaCol;\n int deltaRow;\n int newCol;\n int newRow;\n if (activePiece.isFirstMove() && !(activePiece.getLegalFirstMoves().isEmpty())) {\n possibleMove... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a text field component with the specified text model. | public LwTextField(TextModel model)
{
super (model);
setPosController(new PosController(this));
getViewMan(true).setBorder(LwToolkit.getView("br.sunken"));
} | [
"public void addTextComponentInTextModel(TextTree textTree) {\r\n\t\tif(this.textModel == null) return; // if there is no model, do nothing.\r\n\t\t\r\n\t\t/* Whenever we encounter a TextComponent in the model, we need to calculate\r\n\t\t* where the top-left corner of the textComponent should be.\r\n\t\t* In ord... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the attribute layouts parsed from the tokens in the shader source. | public abstract TObjectIntMap<String> getAttributeLayouts(); | [
"public List<Symbol> sourceOutputLayout(int sourceIndex)\n {\n return getOutputSymbols().stream()\n .map(symbol -> outputToInputs.get(symbol).get(sourceIndex))\n .collect(toImmutableList());\n }",
"public float[] convertShader() {\r\n\t\tfloat[] w = new float[16];\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required int32 scoreeffect = 6 [default = 0]; | int getScoreeffect(); | [
"public int getScoreeffect() {\n\t\t\treturn scoreeffect_;\n\t\t}",
"int getEffect();",
"public int getScoreeffect() {\n\t\t\t\treturn scoreeffect_;\n\t\t\t}",
"int getLoyaltyeffect();",
"public int getEffect() {\r\n return this.effect;\r\n }",
"int getEffectType();",
"public int increaseDefen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
pausarPartida Termina la partida de identificador id y estado est. Calcula los puntajes de la partida, y declara al ganador. | @Override
public void terminarPartida(String id, String est) throws SQLException {
/*IConexion con = ipool.obtenerConexion(true);
Partida part;
Jugador jPat, jPes;
part = daoPartida.encontrar(con, id);
jPat = part.getJpat();
jPes = part.getJpes();
jPat.sumarPuntos(part.getPtosJPat());
jPes.sumarPun... | [
"public void jugaPartida(Partida partida) {\n partidaActual = partida;\n }",
"public int crearPropiedadApto(int CantidadDormitorios, int CantidadBanios, String DireccionPropiedad, float PrecioPropiedad,\r\n float MetrosConstruidosPropiedad, float MetrosTerrenoPropiedad, int NumeroPadronPropie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method relocates a JLabel depending on the current position of the mouse. Local Variables: originalItemX Stores the original x coordinate of the JLabel that is clicked. originalItemY Stores the original y coordinate of the JLabel that is clicked. | public void moveItem ()
{
if (mouseIsPressed && item != null)
{
int originalItemX = originalCoords [itemsArray.indexOf (item)][0];
int originalItemY = originalCoords [itemsArray.indexOf (item)][1];
//sets new location of JLabel based on where the cursor h... | [
"@Override\n public void mouseDragged(MouseEvent e){\n lblNewLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }",
"private void MoveLabelMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MoveLabelMouseDragged\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that the configurable constructor can supply a custom distance function to use when replacing colors. Done by forcing the replacer to color red pixels blue. | @Test
public void testConfigurableConstructor(){
ColorDistanceFunction distanceFunction = mock(ColorDistanceFunction.class);
when(distanceFunction.getDistance(not(eq(new Tone(Color.BLUE))), any())).thenReturn(99.9);
when(distanceFunction.getDistance(eq(new Tone(Color.BLUE)), any())).then... | [
"@Test\r\n public void testCustomConstructor_CustomDistanceFunction_UsedForClusterer(){\r\n ColorDistanceFunction distanceFunction = spy(new EuclideanRgbaDistance());\r\n\r\n Palettester tester = new Palettester(null, distanceFunction, null, null);\r\n\r\n BufferedImage image = ImageFileUtil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the getProductsListResult value for this GetProductsListResponse. | public void setGetProductsListResult(pl.com.polcar.dedal.Nemesis.WebServices.GetProductsListResponseGetProductsListResult getProductsListResult) {
this.getProductsListResult = getProductsListResult;
} | [
"public pl.com.polcar.dedal.Nemesis.WebServices.GetProductsListResponseGetProductsListResult getGetProductsListResult() {\n return getProductsListResult;\n }",
"public void setGetProductListResponse(amdocs.iam.pd.pdwebservices.GetProductListResponseDocument.GetProductListResponse getProductListResponse)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for this cell, this method will return the only number set if any if more than one number is set, this method will return 1 if no numbers are set, this method will retrn 0 | public int getOnlyOneSet()
{
boolean b = false;
int num = 0;
int test = 0x1;
for (int i=0; i < mapSize; i++)
{
int x = test<<i;
//System.out.println ("x = " + x);
//DUMP_MAP();
if (((map & x) > 0) && (b==false))
{
num = i+1;
b = true;
continue;
}
if (((map & x) > 0) && (b==true))
ret... | [
"public int getNumBitsSet()\n \t{\n \t\tint count = 0;\n \n \t\tfor (int index = getLength() - 1; index >= 0; index--)\n \t\t{\n \t\t\tif (isSet(index))\n \t\t\t{\n \t\t\t\tcount++;\n \t\t\t}\n \t\t}\n \n \t\treturn count;\n \t}",
"public boolean isSetNum() {\n return this.Num != null;\n }",
"public int upd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the frontend service. | public FrontendService() throws Exception {
init();
} | [
"public Service createService();",
"Service createService();",
"public ServiceInterface createService();",
"Fog_Services createFog_Services();",
"ServiceType createServiceType();",
"public void createService() {\n mServiceConn.setValue(new ServiceConnection() {\n @Override\n p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find All by Vm and status. | List<VmInstance> findAllByUserAndStatus(User user, Status status) throws Exception; | [
"List<VmInstance> findByVmStatus(List<Status> status, Long userId) throws Exception;",
"Page<VmInstance> findAllByStatus(PagingAndSorting pagingAndSorting, Status status, Long userId) throws Exception;",
"List<VmInstance> findAllByComputeOfferingIdAndVmStatus(Long computeOfferingId, Status status) throws Except... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine the Hamming distance between two arrays of ints. Neither the parameter aList or bList are altered as a result of this method. | public static int hammingDistance(int[] aList, int[] bList){
// check preconditions
if (aList == null || bList == null || aList.length != bList.length)
throw new IllegalArgumentException("Violation of precondition: " +
"hammingDistance. neither parameter may equal null, arrays... | [
"public static int hammingDistance(int[] aData, int[] bData) {\n // check preconditions\n if (aData == null || bData == null || aData.length != bData.length) { \n throw new IllegalArgumentException(\"Violation of precondition: \" +\n \"hammingDistance. neither parameter m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find maximum sub sequence sum linear way (just improved little | public static int maxSubSeqSum5(int[] sequence) {
int maxSubSeqSum = 0, thisSum = 0;
for (int t: sequence) {
// if (t < 0) {
// continue;
// }
thisSum += t;
if (maxSubSeqSum < thisSum) {
maxSubSeqSum = thisSum;
}... | [
"public static int maxSubSeqSum1(int[] sequence) {\n int maxSum = 0;\n\n for (int i = 0; i < sequence.length; i++) {\n for (int j = i; j < sequence.length; j++) {\n int thisSum = 0;\n\n for (int k = i; k <= j; k++) {\n thisSum += sequence[k];... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getPreTransferCommand method, of class com.sun.jbi.ftpbc.ftp.FtpFileTransferNamesAndCommands. | public void testGetPreTransferCommand() throws Exception {
System.out.println("getPreTransferCommand");
String expResult = "None";
String result = instance.getPreTransferCommand();
assertEquals(expResult, result);
} | [
"public void testFtpFileTransferNamesAndCommands() throws Exception {\n System.out.println(\"FtpFileTransferNamesAndCommands\");\n // abstract now \n /*\n assertNotNull(new FtpFileTransferNamesAndCommands(ftp));\n assertNotNull(new FtpFileTransferNamesAndCommands(new FtpFileTransf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets boolean value telling if this employee is a manager. | public void setManager(boolean manager) {
this.manager = manager;
} | [
"public void setIsManager(Integer isManager) {\n this.isManager = isManager;\n }",
"public void setIsEmployee(java.lang.Boolean _isEmployee)\n {\n isEmployee = _isEmployee;\n }",
"public void setIsManager(Byte isManager) {\n this.isManager = isManager;\n }",
"public boolean isSetManag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compares this object against another VersionInfo object | public int compare(VersionInfo other) {
return compare(this, other);
} | [
"@Override\n public int compareTo(ApiVersion other) {\n if (!prerelease.isEmpty()) {\n if (other.prerelease.isEmpty()) {\n return -1;\n }\n return prerelease.compareTo(other.prerelease);\n }\n if (!other.prerelease.isEmpty()) {\n return 1;\n }\n if (major != other.major) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method takes a immutable boolean term and convert it into an old mutable boolean function. | public Expression convertToMutableBooleanExpression(ImmutableExpression booleanExpression) {
OperationPredicate pred = booleanExpression.getFunctionSymbol();
return termFactory.getExpression(pred, convertToMutableTerms(booleanExpression.getTerms()));
} | [
"BooleanFormula make_bool(String v) {\n\t\treturn bmgr.makeVariable(v);\n\t}",
"BoolOperation createBoolOperation();",
"BooleanExpression createBooleanExpression();",
"public static Value makeBool(boolean b) {\n if (b)\n return theBoolTrue;\n else\n return theBoolFalse;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set boolean for a key and value pair. | public void setBoolean(String key, boolean value) {
set(key, Boolean.toString(value));
} | [
"void setBoolean(String key, boolean value);",
"@NativeCallable\n public void putBoolean(String key, boolean value) {\n mMap.put(key, value);\n }",
"public void put(String key, boolean value) {\r\n super.put(key, new Boolean(value));\r\n }",
"public void setWithBoolean(String key, boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests DbProjectManagerDAOaddProjectManagers(ProjectManager[],boolean) for failure. It tests the case that when the connection name is invalid and expects DataAccessException. | public void testAddProjectManagers_InvalidConnectionName() throws Exception {
managerDao = new DbProjectManagerDAO("unknown", dbFactory, TestHelper.SEARCH_NAMESPACE,
"ProjectManagerSearchBundle", auditManager);
ProjectManager manager = TestHelper.createTestingProjectManager(null);
... | [
"public void testEnumerateProjectManagers_InvalidConnectionName() throws Exception {\r\n managerDao = new DbProjectManagerDAO(\"unknown\", dbFactory, TestHelper.SEARCH_NAMESPACE,\r\n \"ProjectManagerSearchBundle\", auditManager);\r\n try {\r\n managerDao.enumerateProjectManagers(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the location of LabelV and attributes needed for parsing | public static void updateLocation(LabelV labelV) {
FontMetrics fm = new Canvas().getFontMetrics(Const.DEFAULT_FONT);
int width = fm.stringWidth(labelV.getText());
int height = fm.getAscent();
int descent = fm.getDescent();
int spacing = labelV.getSpacing();
Point exitPoi... | [
"@Override\n protected void determineLabelPositions(DrawContext dc)\n {\n Iterable<? extends Position> positions = this.path.getPositions();\n if (positions == null)\n return;\n\t\n Iterator<? extends Position> iterator = positions.iterator();\n\n // Find the first and l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a set of external binding files, which are being applied. | public void setBindings(FileSet[] pBindings) {
bindings = pBindings;
} | [
"public void setBindings(Binding[] binds) {\n this.binds = binds;\n }",
"private void setBindings(Object... value) {\n this.bindings.addAll(Arrays.asList(value));\n }",
"protected void setUpBindings() {\n Binder.bind(\"selectedItem\", this.filesModel,\n \"selectedEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Run one tick in the current scenario | private void runOneStepInScenario(HttpServletRequest request, HttpServletResponse response) throws InterruptedException, QueryExecutionException, IOException {
String ifNextTick = SimApi.ifNextTick();
if (!"false".equals(ifNextTick)) {
SimApi.nextTick();
response.getWriter().writ... | [
"private void run() {\n switch (mode) {\n case FAST_FORWARD:\n simulation.run();\n break;\n case SINGLE_DAY:\n simulation.run24Hours();\n break;\n }\n }",
"public void oneRun(){\n\t\tfor(short i=0; i<100; i++){\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method assumes the initial call is isPalindrome(text, 0, |text|1) System.out.printf("text: %s left = %d right = %d\n", text, left, right); | private static boolean isPalindrome(String text, int left, int right)
{
if (right - left <= 0)
return true;
else if (text.charAt(left) != text.charAt(right))
return false;
else
return isPalindrome(text, left + 1, right - 1);
// do as homework the... | [
"public void isValidPalindrome(String s, int left, int right) {\n while(left >= 0 && right<s.length() && s.charAt(left) == s.charAt(right)){\n left--;\n right++;\n }\n // check if we found a longer palindrome\n if(maxLen < right - left - 1){\n maxLen = ri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Asigno para cada imagen una posicion donde se va a dibujar en el panel. Nota: la posicion en Y es la misma para todos, ver ImagenUbicacion class | private void definirPosicionesImagenes() {
if (imagenes.size() == 0)
return;
int puntero = ancho - 10; // comienzo en el extremo derecho del panel con un pequenio espacio para que no
// quede pegado al costado
for (int i = 0; i < imagenes.size(); i++) {
int decremento = imagenes.get(i).img.getWidt... | [
"public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this is done it creates n new blog | @Override
public String CreateBlog(LinkBuilders linksBuilders, UriInfo uriInfo,
String blog) {
System.out.println("Adding new blog");
try {
JSONObject json = new JSONObject(blog);
DBCollection col = connect();
BasicDBObject query1 = new BasicDBObject("blogid", -1);
DBCursor cursor1 = col.find().sor... | [
"public void createPost( BlogPost post );",
"public BlogEntry createBlogEntry(BlogEntry data);",
"void newBlogEntry(BlogEntry entry);",
"public void createNewPost(String title, String description){\r\n\t\t\r\n\t}",
"void addBlogPost(BlogPost newPost) throws DAOException;",
"private void createPost() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the JTree reference that utilizes this listener. | StatisticsTreeSelectionListener(final JTree tree) {
_tree = tree;
} | [
"public void setJTree(javax.swing.JTree tree) {\n this.remove(getJTree());\n jTree = tree;\n getJScrollPane().setViewportView(jTree);\n }",
"public void setTree(final Tree t) {\n \t\ttreeId = t.getTreeId();\n \t\ttreeObj = t;\n \t}",
"public void setTreeModel(HierarchicalConfiguration tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var150' field. | public java.lang.Integer getVar150() {
return var150;
} | [
"public java.lang.Integer getVar150() {\n return var150;\n }",
"public java.lang.Integer getVar151() {\n return var151;\n }",
"public java.lang.Integer getVar15() {\n return var15;\n }",
"public java.lang.Integer getVar151() {\n return var151;\n }",
"public java.lang.Integer getVar15... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searches for instances mentioned in the text extraction state as names. If it founds some similar names it creates recommendations. | private void findRecommendedInstancesFromNounMappingsThatAreSimilarToInstances(ModelExtractionState modelState, RecommendationState recommendationState,
TextState textState) {
for (ModelInstance instance : modelState.getInstances()) {
var similarToInstanceMappings = getSimilarNounMapping... | [
"public void searchAndUpdateResults(String searched) {\n if (searched == null || searched.isEmpty()) {\n return;\n }\n\n final String[] terms = searched.toLowerCase().split(\" \");\n searchStructuresResultsList.clear();\n\n for (String name : sceneElementsList.getAllSce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the stack trace element representing the method immediately preceding the current method on the stack. This gives methods the (dangerous, but useful for debugging) ability to "see" who is calling them. | public static StackTraceElement getCaller() {
// We could use Thread.getStackTrace(), but it's new in Java 5.
// Index 0 is this location; index 1 is the caller; index 2 is the caller's caller
try { return new Throwable().getStackTrace()[2]; }
catch (ArrayIndexOutOfBoundsException e) {
throw new I... | [
"public static StackFrame getCallerStackFrame() {\n return getStackFrame(2);\n }",
"public static StackTraceElement getCallerStackFrame(int PopFrame) {\n\t\treturn getCallerStackTrace(PopFrame + 1)[0];\n\t}",
"public static StackFrame getCallerCallerStackFrame() {\n return getStackFrame(3);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts a range selection. If a range selection is already active, this will start a new range selection (which will reset the range anchor). | void startRangeSelection(int pos) {
attemptSelect(mAdapter.getModelId(pos));
setSelectionRangeBegin(pos);
} | [
"public void beginSelection()\n {\n\tisMultiSelection = true;\n\tsetMaxCheckCount(-1);\n }",
"public void setSelectRange(int start, int end) {\n Logger.i(TAG, \"setSelectRange\", \"start = \" + start + \" ,end = \" + end);\n mSelectionStart = start;\n mSelectionEnd = end;\n postI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Do not modify addRestResourceClasses() method. It is automatically populated with all resources defined in the project. If required, comment out calling this method in getClasses(). | private void addRestResourceClasses(Set<Class<?>> resources) {
resources.add(CorsFilter.class);
resources.add(ExceptionHandler.class);
resources.add(org.glassfish.jersey.server.wadl.internal.WadlResource.class);
resources.add(BaseResource.class);
resources.add(CustomerResource.class);
} | [
"private void addRestResourceClasses(Set<Class<?>> resources) {\n resources.add(albo.comics.library.ws.ServicesResource.class);\n }",
"private void addRestResourceClasses(Set<Class<?>> resources) {\n resources.add(service.SpriteFacadeREST.class);\n }",
"private void addRestResourceClasses(Se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Loads response definition. | private ResponseDefinition loadResponse(XMLStreamReader reader) throws XMLStreamException {
ResponseDefinition response = new ResponseDefinition();
String name;
while (true) {
switch (reader.next()) {
case START_ELEMENT:
name = reader.getName().getLocal... | [
"private CallResponse() {\n initFields();\n }",
"com.exacttarget.wsdl.partnerapi.DefinitionResponseMsgDocument.DefinitionResponseMsg getDefinitionResponseMsg();",
"void setDefinitionResponseMsg(com.exacttarget.wsdl.partnerapi.DefinitionResponseMsgDocument.DefinitionResponseMsg definitionResponseMsg);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether there is currently a CRCL program running. | public boolean isRunningCrclProgram() {
if (null != crclClientJInternalFrame) {
return crclClientJInternalFrame.isRunningProgram();
}
return false;
} | [
"public boolean isCrclProgramPaused() {\n if (null != crclClientJInternalFrame) {\n return crclClientJInternalFrame.isPaused();\n }\n return false;\n }",
"public boolean isProgramActive(String programId);",
"public boolean isRunning() {\n\t\treturn \"RUNNING\".equals(this.exit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the following two tests was used test the checkSpace method the first for a space the already contains a avatar and the second for a space that does not already contain an avatar | @Test
public void CheckSpaceTest() {
grid.checkSpace(player1, new Position(0, 0));
assertFalse(grid.isEmpty());
} | [
"@Test\n public void test_equals() throws Exception {\n Space compareSameSpace = new Space(inRange, inRange, color);\n Space compareDiffSpace1 = new Space(3, 6, Space.Color.BLACK);\n Space compareDiffSpace2 = new Space(4, 6, Space.Color.BLACK);\n Space compareDiffSpace3 = new Space(5,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to set consignment line item detail | public void doSetConsignmentLineItemDetail(CMSConsignmentLineItemDetail val) {
this.consignmentLnItmDtl = val;
typeCode = POS_LINE_ITEM_TYPE_CONSIGNMENT;
} | [
"public void connectConsignmentLineItemDetail(CMSConsignmentLineItemDetail aCsgnLineItemDetail) {\n if (aCsgnLineItemDetail == null) {\n return;\n } else {\n this.doSetConsignmentLineItemDetail(aCsgnLineItemDetail);\n aCsgnLineItemDetail.doSetSaleLineItemDetail(this);\n return;\n }\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provide a list of route names from the Local Drive RouteSource matching the tag. | public void getLocalRouteNames(String tag, AsyncCallback<String[]> callback); | [
"public void getRouteNames(String routeSourceName, AsyncCallback<String[]> callback);",
"public void getLocalRouteNames(AsyncCallback<String[]> callback);",
"java.util.List<com.google.maps.routing.v2.Route> getRoutesList();",
"public abstract List<String> getTravelRoute();",
"List<VnetRoute> getRouteForVnet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Searching docs against the keyword list | DocSearchResponse keywordListSearch(KeywordListSearchParam param); | [
"Collection searchContent(String keywords) throws RepositoryException;",
"DocSearchResponse search(KeywordSearchParam param);",
"DocSearchResponse keywordSearch(KeywordSearchParam param);",
"public void search(String keyword){\n \r\n }",
"public List<Book> searchBooksByKeyword(String keyword);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if u want to use gt recipe maps... | @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return null;
} | [
"@ReLogoBuilderGeneratedFor(\"migration.relogo.Map\")\n\tpublic AgentSet<migration.relogo.Map> mapsOn(Turtle t){\n\t\tAgentSet<migration.relogo.Map> result = new AgentSet<migration.relogo.Map>();\t\t\t\t\t\t\n\t\tfor (Turtle tt : Utility.getTurtlesOnGridPoint(Utility.ndPointToGridPoint(t.getTurtleLocation()),getMyO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Integrates the data set, replacing existing data with integrated values and assuming starting values are 0. Used to calculate velocity from acceleration and then once again to get offsets from velocity todo: write to another data set instead of all this variable swapping | public static void integrate(DataSet3 dataSet) {
// Remember previous acceleration, because we're going to overwrite values in the data set itself
float ax = dataSet.valuesX[0];
float ay = dataSet.valuesY[0];
float az = dataSet.valuesZ[0];
float vx, vy, vz;
// Assume the... | [
"void startAccelerationIntegration(Position initalPosition, Velocity initialVelocity);",
"public void integrate(Vector3d velocity)\r\n\t{\r\n\t\tX += velocity.X;\r\n\t\tY += velocity.Y;\r\n\t\tZ += velocity.Z;\r\n\t}",
"public void accelerate()\n {\n double acceleration = this.getEngine().getNumCylind... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Refreshs the graphics screen | public void refreshScreen(){
StdDraw.setPenColor(StdDraw.BLACK);
StdDraw.filledSquare(0, 0, 20.0);
} | [
"private void refresh() {\r\n drawingPanel.repaint();\r\n }",
"public void refresh() {\n \t\tthis.renderer.repaint();\n \t}",
"public void flushGraphics() {\n ScreenContainer.getInstance().repaint();\n }",
"public void refresh() {\n\t\twhiteboard.repaint();\n\t\trepaint();\n\t}",
"protected vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes the listing of delegates available to the launching framework | private synchronized void initializeLaunchDelegates() {
if(fLaunchDelegates == null) {
fLaunchDelegates = new HashMap<String, LaunchDelegate>();
//get all launch delegate contributions
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugPlugin.getUniqueIdentifier(), DebugP... | [
"public List<? extends DelegateLoader> createDefaultDelegates()\n {\n return createDelegates(getPolicy());\n }",
"private synchronized void initializePreferredDelegates() {\n\t\tif(fPreferredDelegates == null) {\n\t\t\tfPreferredDelegates = new HashSet<PreferredDelegate>();\n\t\t\tString preferred = Plat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simulating the customer browsing the store | public synchronized void browseStore() {
// Use the sleep method and let the customer browse the store
// until (s)he finds an item that (s)he likes
Main.emptyStore = false;
try {
Thread.sleep((long) (Math.random()*2000));
} catch (InterruptedException e) {
e.printStackTrace();
}
msg("["+(System.... | [
"public EuromoneyStore goToStore() {\n\t\tengageMenu();\n\t\tclickEuromoneyStore();\n\t\treturn new EuromoneyStore();\n\t}",
"public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}",
"private void onStoresButtonClick() {\n new ManagementStoreScreen(this.authentificationSto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A repetition delay is being used for the workload, so the payloadSets will now be repeated | public void createRepeatingPayloads(){
this.sets = generateRepeatingPayload();
} | [
"public PayloadBuilderSet[] generateRepeatingPayload() {\n\t\tPayloadBuilderSet[] updatedPayloadList = new PayloadBuilderSet[(int)getNumberOfPayloadRepetitions()];\n\n\t\tSystem.arraycopy(sets, 0, updatedPayloadList, 0, sets.length); //keep the original payloads, and put them into the updated list\n\n\t\t// create ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets array of all "Timing" element | public void setTimingArray(org.landxml.schema.landXML11.TimingDocument.Timing[] timingArray)
{
synchronized (monitor())
{
check_orphaned();
arraySetterHelper(timingArray, TIMING$2);
}
} | [
"public void setTimingArray(int i, org.landxml.schema.landXML11.TimingDocument.Timing timing)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.TimingDocument.Timing target = null;\r\n target = (o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Description Getter method to the replyUserID | private String getReplyUserID() {
return replyUserID;
} | [
"public Long getReplyUserId() {\n return replyUserId;\n }",
"public int getReplyBy() {\n return replyBy;\n }",
"public String getReplyUserName() {\n return replyUserName;\n }",
"public void setReplyUserID(String replyUserId) {\n\t\tthis.replyUserID = replyUserId;\n\t}",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new properties soa error library. | public PropertiesSOAErrorLibrary() {
super();
} | [
"public PropertiesSOAErrorLibrary(String name, String version) {\r\n\t\tsuper();\r\n\t\tthis.name = name;\r\n\t\tthis.version = version;\r\n\t}",
"public ErrorClass() {\r\n\r\n\t}",
"public LibraryException() { }",
"public SLogoException(String arg0) {\n super(arg0);\n myErrorLoader = new Resour... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Sets theh Player's 'canJump' boolean which is used, unsurprisingly, to signify that the Player can or cannot jump. NOTE: This also sets isJumping to the inverse of b. | @Override
public void setCanJump(boolean b)
{
canJump = b;
isJumping = !b;
} | [
"public void setAbleToJump(boolean ableToJump) {\n isAbleToJump = ableToJump;\n }",
"public void setJumping(boolean jumping) { isJumping = jumping; }",
"public void setAsJumpMove()\n\t{\n\t\tjumpMove = true;\n\t}",
"public void setJumping(boolean jumping) {\n isJumping = jumping;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the file from a unicode | @NonNull
default LocaleFile getFileFromUnicode(@NonNull String unicode) {
return this.getFiles().stream()
.filter(file -> file.getUnicode().equalsIgnoreCase(unicode))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException(unicode + " is not a valid unicode"));
} | [
"static public Reader openFileUTF8(String filename) {\n return openFileReader(filename, StandardCharsets.UTF_8);\n }",
"public static InputStreamReader getFileReaderForGsonHandlingUnicode(String path) throws FileNotFoundException {\n\t\tInputStreamReader isr = null;\n\t\ttry {\n\t\t\tisr = new InputStre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply inverse of the function to Value 'v' (with result in 'v'). | abstract void applyInverseTo(Measurement v) throws Parser.Exception; | [
"public double inverseF(double u);",
"BiMap<V, K> inverse();",
"public void inv(T x);",
"Vector3D applyInverseTo(Vector3D position);",
"@Override\n public abstract MathTransform inverse();",
"private void setInternalValueFunction(Criterion criterion, ReversedLinearValueFunction vf) {\n checkNotN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Places an entity, for doomlike levels. | public void placeDoomEntity(int matrixX, int matrixY) {
MovingEntity entity = new DoomTestEntity(matrixY + 0.5, currentMap.getMapWidth() - (matrixX + 0.5), 1, 0, 0, -0.7);
entities.add(entity);
} | [
"public boolean PlaceEntity(Entity entity){\n return PlaceEntityAt(entity, entity.GetCoordinates());\n }",
"void spawnEntityAt(String typeName, int x, int y);",
"public interface Entity {\r\n\r\n /**\r\n * Gets the initial (relative, map) position of the entity.\r\n * \r\n * @return the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines the internal contents service API and the capabilities to handle and manage contents. | public interface ContentsService {
/**
* Add the given data as a new media contents entry.
*
* @param name of the contents file to add
* @param payload byte array to add
*/
void addMediaContent(String name, byte[] payload);
/**
* Fetch the media content data for the give... | [
"public interface JahiaContentManagementService extends RemoteService {\n void abortWorkflow(String processId, String provider) throws GWTJahiaServiceException;\n\n void activateVersioning(List<String> path) throws GWTJahiaServiceException;\n\n List<GWTJahiaWorkflowComment> addCommentToWorkflow(GWTJahiaWor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Highlight the offstreet parking (parking lot building) on the map. | private void highlightOffStreetParking() {
for (int i = 0; i < offStreetParkingIcons.size(); i++) {
offStreetParkingIcons.get(i).setVisible(true);
}
} | [
"private void highlightOnStreetParking() {\n\n for (int i = 0; i < onStreetParkingIcons.size(); i++) {\n\n Object icon = onStreetParkingIcons.get(i);\n\n if (icon instanceof Polyline) {\n Polyline polyline = (Polyline) icon;\n polyline.setVisible(true);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the string by combining all of keys/values in the given AccessibilityNodeInfo's extras. Separator is ";". "extras" is | @Nullable
public static String getExtrasAsString(AccessibilityNodeInfo nodeInfo) {
List<String> extras = new ArrayList<>();
Bundle extraBundle = nodeInfo.getExtras();
for (String key : extraBundle.keySet()) {
if (extraBundle.get(key) != null) {
extras.add(String.f... | [
"@Override\r\n public String toString() {\r\n String ret = \"Sandwich\";\r\n if (extras.size() > 0) {\r\n ret += \" with \";\r\n boolean gotSome = false;\r\n for (Extra e : extras) {\r\n if (gotSome)\r\n ret += \", \";\r\n ret += e.toString();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Show the manage dispatch controls dialog. | public void
showManageDispatchControlsDialog()
{
pManageDispatchControlsDialog.updateAll();
pManageDispatchControlsDialog.setVisible(true);
} | [
"public void \n showManageToolsetsDialog()\n {\n pManageToolsetsDialog.updateAll();\n pManageToolsetsDialog.setVisible(true);\n }",
"public void \n showManagePrivilegesDialog()\n {\n pManagePrivilegesDialog.updateAll();\n pManagePrivilegesDialog.setVisible(true);\n }",
"public void \n showMan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Event fired when groupe change | void onGroupeChange(Groupe groupe); | [
"private void ecouteurChoixGroupe() {\n\t\tcbgroupe.getSelectionModel().selectedIndexProperty().addListener((ChangeListener<? super Number>) (ov, value, new_value) -> {\n\t\t\ttry {\n\t\t\t\titems.removeAll(fs);\n\t\t\t\tcbgroupe.getSelectionModel().select((int) new_value);\n\t\t\t\tfs = connex.recupererFichierGrou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This adds a property descriptor for the Killed By feature. | protected void addKilledByPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Character_killedBy_feature"),
getString("_UI_PropertyDescriptor_descrip... | [
"protected void addKilledPropertyDescriptor(Object object) {\r\n\t\titemPropertyDescriptors\r\n\t\t\t\t.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),\r\n\t\t\t\t\t\tgetResourceLocator(), getString(\"_UI_Character_killed_feature\"),\r\n\t\t\t\t\t\tgetString(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
normalize with respect to our intial palm position | public void normalize() {
Vector initPos = palmData.get(0)[0];
for (int i=1; i<length; i++) { //skip first frame
//normalize palm
Vector framePos = palmData.get(i)[0];
framePos.setX(framePos.getX() - initPos.getX());
framePos.setY(framePos.getY() - initPos.getY());
framePos.setZ(framePos.getZ() - i... | [
"public void normalize(){\n\t\t//sort port assignments by their bitvector sizes\n\t\tthis.sortBySize();\n\t\t//create a new bit Vector holding the port assignment that is the center\n\t\t//of this cell, along with translate across center\n\t\tBitVector pa = new BitVector(this.center());\n\t\t//System.out.println(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Service Interface for managing Stade. | public interface StadeService {
/**
* Save a stade.
*
* @param stadeDTO the entity to save
* @return the persisted entity
*/
StadeDTO save(StadeDTO stadeDTO);
/**
* Get all the stades.
*
* @return the list of entities
*/
List<StadeDTO> findAll();
/**
... | [
"public void saveService();",
"public interface StationService {\n\n\t/**\n\t * Get all stations\n\t *\n\t * @return List of stations\n\t */\n\tList<StationModel> getAllStations();\n\n\t/**\n\t * Check if root station exist\n\t *\n\t * @return true if root station exists\n\t */\n\tboolean existsRootStation();\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests whether a white piece will be captured when it is to the right of the throne with the king NOT on it. The white piece is then sandwiched by a black piece, capture should occur | @Test
public void kingNotOnThroneWhitePieceRightBlackCapture()
{
Data d=new Data();
d.set(11,106);
d.set(4,96);
d.set(3,64);
d.set(0,85);
d.set(7,53);
d.set(16,62);
d.set(3,63);
ArrayList<Coordinate> test_arr=d.pieceLost(63);
assertTrue(6==test_arr.get(0).getX() && 5==test_arr.get(0).getY());
} | [
"@Test\n\tpublic void kingOnThroneBlackPieceRightWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\t//moving pieces out so capture can occur\n\t\td.set(24,68);\n\t\td.set(7,29);\n\t\td.set(36,119);\n\t\td.set(11,106);\n\t\td.set(20,33);\n\t\td.set(4,85);\n\t\td.set(35,118);\n\t\td.set(3,95);\n\t\td.set(25,62);\n\t\td... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
States if the Cocktail is alcoholic or not. | @Override
public boolean isAlcoholic() {
return liquids
.stream()
.anyMatch(liquid -> liquid.getAlcoholPercent() > 0);
} | [
"@Override\n public boolean isAlcoholic() {\n return false;\n }",
"boolean hasHasAlcohol();",
"boolean hasIsConjured();",
"boolean getIsConjured();",
"@Override\n public boolean isStealthActive() {\n return (isStealthy || isMimetic || hasCamoSystem);\n }",
"public abstract boolea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field209' field | public java.lang.CharSequence getField209() {
return field209;
} | [
"public java.lang.CharSequence getField209() {\n return field209;\n }",
"java.lang.String getField1020();",
"java.lang.String getField1301();",
"java.lang.String getField1393();",
"java.lang.String getField1371();",
"java.lang.String getField1599();",
"java.lang.String getField1538();",
"java.lang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given an integer array arr, count element x such that x + 1 is also in arr. If there are duplicates in arr, count them separately. Hashset approach. Build hashset then count how many valid elements in the array O(n) time, O(n) space | public static int countingElements1(int[] arr) {
Set<Integer> toCount = new HashSet<>();
for (int num : arr) {
toCount.add(num - 1);
}
int count = 0;
for (int num : arr) {
if (toCount.contains(num)) {
count++;
}
}
... | [
"public boolean uniqueOccurrences(int[] arr) {\n Map<Integer, Integer> map = new HashMap<>();\n\n for (int num:arr) {\n if (!map.containsKey(num)) {\n map.put(num, 1);\n } else {\n map.put(num, map.get(num) + 1);\n }\n }\n\n for (int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Feeds Type'. | FeedsType createFeedsType(); | [
"FeedType createFeedType();",
"@Override\n\tprotected Feed newFeed() {\n\t\treturn new Feed(this.feedType);\n\t}",
"public FeedType getType();",
"public String getFeedType() {\n return feedType;\n }",
"org.w3.x2005.atom.FeedType getFeed();",
"PostType createPostType();",
"FieldType createField... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Concatenates two Object arrays into one | private Object[] concatObjectArray(Object[] leftArray, Object[] rightArray) {
int leftLen = leftArray.length;
int rightLen = rightArray.length;
Object[] result = (Object[]) Array.newInstance(leftArray.getClass().getComponentType(), leftLen+rightLen);
System.arraycopy(leftArray, 0, resul... | [
"public static <T> Object[] concatenate(T[] a, T[] b)\r\n {\n return Stream.of(a, b)\r\n .flatMap(Stream::of)\r\n .toArray();\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate static JSONArray concatJSONArray(JSONArray arr1, JSONArray arr2) {\n\t\tJSONArray result = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine if subject is a Suite. | public static boolean isSuite(Class<?> subject) {
RunWith runWith = getRunWith(subject) ;
SuiteClasses suiteClasses = getSuiteClasses(subject) ;
if(runWith!=null&&suiteClasses!=null) {
return true ;
}
return false ;
} | [
"@BeforeSuite\n public void verifyTestSubject( ITestContext testContext ) {\n SuiteAttribute testFileAttr = SuiteAttribute.TEST_SUBJ_FILE;\n Object sutObj = testContext.getSuite().getAttribute( testFileAttr.getName() );\n Class expectedType = testFileAttr.getType();\n if ( sutObj == n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the Client that shall be used to send messages to the server. | public void setClient(Client client) {
this.client = client;
} | [
"public void setClient(Client client) {\r\n this.client = client;\r\n }",
"public void setClient(ConnectionToClient client) {\n this.client = client;\n }",
"public void setClient(Client client) {\n\t this.client = client;\n\n\t \n\t }",
"public void setClient(String client... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests write method with array argument | @Test
void writeArray() throws IOException {
outputStream.write(BYTES);
outputStream.flush();
assertArrayEquals(BYTES, bufferedStream.toByteArray());
} | [
"public void writeArray(Object[] val) throws IOException;",
"public abstract void write ( String[] strings ) throws IOException, ParameterTypeNotImplementedException;",
"public void writeArray(Object o) throws IOException;",
"public abstract void write ( double [] doubles ) throws IOException, ParameterTypeNo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
retrieve dev tools technology in a particular sub category | public ArrayList<Technology> retrieveDevToolsTech(int subCatId) {
ArrayList<Technology> technologies = new ArrayList<Technology>();
String query = "";
if(subCatId == 0){
query = "SELECT * FROM `is480-matching`.technologies WHERE tech_cat_id = 2 AND tech_sub_cat_id IS NULL";
}else{
query = "SELECT * ... | [
"Import getTechnology();",
"public ArrayList<Technology> retrieveDevToolsTechByTeam(int subcatid, int teamId) {\r\n\t\tArrayList<Technology> technologies = new ArrayList<Technology>();\r\n\t\tString query = \"\";\r\n\t\tif(subcatid == 0){\r\n\t\t\tquery = \"SELECT * FROM technologies t, team_preferred_technology ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether the board has been changed. If it has, it will set the boolean back to false. | public boolean changed()
{
if(changed)
{
changed = false;
return true;
}
return false;
} | [
"public boolean isOnBoard() {\n\t\treturn _onBoard;\n\t}",
"private void boardIsInvalid() {\n this.validBoard = false;\n }",
"@Override\n\tpublic boolean isChanged()\n\t{\n\t\treturn !isSaved;\n\t}",
"public boolean isChanged()\r\n\t{\r\n\t\treturn changed;\r\n\t}",
"public boolean boardIsValid() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a database manager. | DatabaseManager getDatabaseManager(); | [
"public static DbManagerImpl getInstance() {\n if (sInstance == null) {\n synchronized (DbManagerImpl.class) {\n if (sInstance == null)\n sInstance = new DbManagerImpl();\n }\n }\n return sInstance;\n }",
"public DatabaseAccessor getD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents that which can be stored in Elasticsearch. | public interface Elastic
{
/**
* @return The object's elastic ID.
*/
@Nullable
String getElasticId();
/**
* Sets the object's elastic ID.
*
* @param id The object's new elastic ID.
*/
void setElasticId(@NonNull final String id);
} | [
"public Elasticsearch() {}",
"interface IndexEntry {\n /**\n * Return the index key of the entry. May be NULL.\n */\n CachedDeserializable getKey();\n\n /**\n * Return the region key for the index\n */\n CachedDeserializable getRegionKey();\n\n /**\n * Return the value of the en... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether this decoder has reached EOF of the input char ring buffer. | public boolean isEOF() {
// We record the EOF on the output ring buffer.
return _byteRingBuffer.isEOF();
} | [
"public boolean eof() {\n\n\t\tif( fReadAhead ) \n\t\t\treturn false;\n\n\t\ttry {\n\t\t\treturn !stdin.ready();\n\t\t} catch (IOException e) {\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean isEOF() {\n if (last != -1) {\n getc();\n if (last != -1) {\n ungetc();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method is used to disable all the button and text field | public void disableAll(){
txtChatField.setEnabled(false);
btnBlock.setEnabled(false);
bttDltChat.setEnabled(false);
btnUnblock.setEnabled(false);
btnAddFile.setEnabled(false);
btnSend.setEnabled(false);
} | [
"private void disableInputs() {\n buttonTokenize.setEnabled(false);\n numberText.setEnabled(false);\n nameText.setEnabled(false);\n monthText.setEnabled(false);\n yearText.setEnabled(false);\n cvcText.setEnabled(false);\n }",
"private void disableButtons()\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getS1 method, of class Sense. | @Test
public void testGetS1() {
System.out.println("getS1");
Sense instance = new Sense(Sense.senseDir.HERE, 3, 6, Sense.condition.FOE);
int expResult = 3;
int result = instance.getS1();
assertEquals(expResult, result);
} | [
"java.lang.String getS1();",
"@Test\n public void testGetS2() {\n System.out.println(\"getS2\");\n Sense instance = new Sense(Sense.senseDir.HERE, 3, 6, Sense.condition.FOE);\n int expResult = 6;\n int result = instance.getS2();\n assertEquals(expResult, result);\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the phone1 country code. | public void setPhone1CountryCode(String phone1CountryCode)
{
this.phone1CountryCode = phone1CountryCode;
} | [
"public void setPhone1(String phone1) {\r\n this.phone1 = phone1;\r\n }",
"@Column(name = \"PHONE1_COUNTRY_CODE\")\n\tpublic String getPhone1CountryCode()\n\t{\n\t\treturn phone1CountryCode;\n\t}",
"public twitter.PlaceDetails.Builder setCountryCode(java.lang.CharSequence value) {\n validate(fiel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor with student object, arraylist student grade parameters | public StudentGrade(Student student, ArrayList<Grade> studentGrade) {
super();
this.student = student;
this.studentGrade = studentGrade;
} | [
"public Student(String name) {\n this.name = name;\n //initializing:\n grades = new ArrayList<>();\n }",
"public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all personnel in the database. | public List<PersonnelBean> getAllPersonnel() throws DBException {
try (Connection conn = factory.getConnection();
PreparedStatement stmt = conn
.prepareStatement("SELECT * FROM personnel where role in ('hcp','uap','er') ")) {
final ResultSet results = stmt.executeQuery();
final List<PersonnelBean> all... | [
"public PersonnelBean[] loadAll() throws SQLException \r\n {\r\n Connection c = null;\r\n PreparedStatement ps = null;\r\n try \r\n {\r\n c = getConnection();\r\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM personnel\",ResultSet.TYPE_SCROLL_INSENSI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the container "drawer_layout_frag_container" of the DrawerMenuActivity to the given Fragment. | private void setDisplayedFragment(Fragment frag) {
assert (frag != null);
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.replace(R.id.drawer_layout_frag_container, frag);
//transaction.addToBackStack(null);
... | [
"private void setViewFragment(Fragment fragment) {\n currentFragment = fragment;\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.replace(R.id.container, fragment);\n transaction.commit();\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds mouse samplers from specified capture | public static List<InteractionSampler> buildMouseSamplers(Capture capture,
Consumer<InteractionSampler> onSamplerCreated) {
final List<InteractionSampler> samplers = new ArrayList<>();
if (capture != null) {
final List<MouseCaptureGroup> groups = groupMouseCaptures(capture.getItems());
groups.stream().map... | [
"public static List<InteractionSampler> buildKeySamplers(Capture capture,\n\t\t\tConsumer<InteractionSampler> onSamplerCreated) {\n\t\tfinal List<InteractionSampler> samplers = new ArrayList<>();\n\t\tif (capture != null) {\n\t\t\tfinal List<KeyCaptureGroup> groups = groupKeyCaptures(capture.getItems());\n\n\t\t\tg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Locate a search direction based upon it's id. | public static SearchDirection find(int id) {
for (SearchDirection searchDirection : SearchDirection.values()) {
if (searchDirection.id == id)
return searchDirection;
}
return null;
} | [
"public static TrainDirection findById(Integer id) {\n\t\tfor (TrainDirection direction : TrainDirection.values()) {\n\t\t\tif (direction.getId().equals(id))\n\t\t\t\treturn direction;\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"int getSearchId();",
"public abstract int idToSortPosition(int id, MatchSensitivity sens... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search the collection for the requested VoteBlock. XXX: This is implemented as a simple linear search, so it is O(n). The disk structure is not terribly easy to seek into because each record is variable length, so I'm not sure it will be easy to implement binary search and improve performance. Therefore, this method sh... | public VoteBlock getVoteBlock(String url) {
VoteBlocksIterator iter = null;
try {
iter = iterator();
while (iter.hasNext()) {
VoteBlock vb = iter.next();
if (url.equals(vb.getUrl())) {
return vb;
}
}
return null;
} catch (IOException ex) {
log.... | [
"private int findBlock(int blockPos) {\r\n int pos = -1;\r\n for (int i = 0; i < size; i++) {\r\n if (pool[i].getPos() == blockPos) {\r\n pos = i;\r\n break;\r\n }\r\n }\r\n return pos;\r\n }",
"private int findBlockForRead(int blo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Append MyStringBuilder b to the end of the current MyStringBuilder, and return the current MyStringBuilder. Be careful for special cases! WORKS | public MyStringBuilder append(MyStringBuilder b)
{
if (b == null)
{
return append("null");
}
for (int i = 0; i < b.length; i++)
{
CNode newNode = new CNode(b.charAt(i));
lastC.next = newNode;
las... | [
"public MyStringBuilder2 append(MyStringBuilder2 b)\n\t{\n\t\tString str = b.toString();\n\t\t\n\t\tif(length == 0 && str != null) {\n\t\t\tCNode newNode = new CNode(str.charAt(0));\n\t\t\tfirstC = newNode;\n\t\t\tlastC = newNode;\n\t\t\tlength++;\n\t\t\trecursiveAppendString(str, 1);\n\t\t} else {\n\t\t\trecursive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns if verification is enabled or not. | public boolean verificationEnabled() {
return m_verification_enabled;
} | [
"public boolean isVerifyEnabled() {\n return verify;\n }",
"public boolean isVerifyEnabled() {\n return currentScope != null && currentScope.isVerifyEnabled();\n }",
"boolean isVerified();",
"boolean getIsEmailVerified();",
"public boolean isSetAvailableVerificationMethods() {\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'var49' field. | public void setVar49(java.lang.Double value) {
this.var49 = value;
} | [
"public com.dj.model.avro.LargeObjectAvro.Builder setVar49(java.lang.Double value) {\n validate(fields()[50], value);\n this.var49 = value;\n fieldSetFlags()[50] = true;\n return this;\n }",
"public void setVar19(java.lang.Integer value) {\n this.var19 = value;\n }",
"public void setV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EventTemplate__Group__4" $ANTLR start "rule__EventTemplate__Group__4__Impl" InternalDsl.g:24934:1: rule__EventTemplate__Group__4__Impl : ( ')' ) ; | public final void rule__EventTemplate__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDsl.g:24938:1: ( ( ')' ) )
// InternalDsl.g:24939:1: ( ')' )
{
// InternalDsl.g:24939:1: ( ')' )
... | [
"public final void rule__EventTemplate__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24927:1: ( rule__EventTemplate__Group__4__Impl )\n // InternalDsl.g:24928:2: rule__EventTemplate__Group__4__Impl\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets verbosity of the constraint solver output. 0 > quiet ... 9 > maximum diagnostic input. | public void setVerbosity(int verbosity) {
this.verbosity = verbosity;
} | [
"public void setVerbosity(boolean verbosity) {\n this.verbosity = verbosity;\n }",
"public void setVerbosity(Level verbosity) {\n this.verbosity = verbosity;\n }",
"public void setVerbose(boolean value);",
"public void setVerbose(Boolean v) { this.verbose = v; }",
"public void setVerbose... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns IImplementor object of the remoting service object. | public IImplementor getImplementor() {
return implementor;
} | [
"IRemoteMessageService getRemoteMessageService();",
"public RemotingService(IImplementor implementor) throws Exception {\n this.tcpService = new TCPService(new ImplementorTCPBridge(implementor));\n this.tcpService.setThreadName(implementor.getClass().getSimpleName());\n this.implementor = imp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spoofing information IP:hostname. The option is a: java.lang.String type. Group: producer | default GangliaEndpointBuilder spoofHostname(String spoofHostname) {
doSetProperty("spoofHostname", spoofHostname);
return this;
} | [
"private void getHost(){\n\t\tif (this.getParameter(\"hostname\")!= null)\n\t\t hostname =this.getParameter(\"hostname\");\n\t\telse\n\t\t\thostname = \"localhost\";\n\t}",
"public void setHostName(String hostname);",
"String getHostIP();",
"public void catchMasterIp() throws IOException{\n DatagramS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ftsCellSpacingOuterLeft field for the TAP record. | public byte getFtsCellSpacingOuterLeft()
{
return field_71_ftsCellSpacingOuterLeft;
} | [
"public short getWCellSpacingOuterLeft()\n {\n return field_67_wCellSpacingOuterLeft;\n }",
"public byte getFtsCellSpacingDefaultLeft()\n {\n return field_55_ftsCellSpacingDefaultLeft;\n }",
"public short getWCellSpacingDefaultLeft()\n {\n return field_51_wCellSpacingDefaultL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Set up client forwarder. Run handshake negotiation, then set up a listening socket and wait for user. When user has connected, start port forwarder thread. | static public void startForwardClient() throws Exception {
doHandshake();
// Wait for client. Accept one connection.
ForwardServerClientThread forwardThread;
ServerSocket listensocket;
try {
/* Create a new socket. This is to where the user should connect.
... | [
"private void serverStartUp(){\r\n\t\ttry {\r\n\t\twelcomesock = new ServerSocket(51711);\r\n\t\t \r\n\t\t//while(true){\r\n\t\t\t/* server waits until client get connected to port\r\n\t\t\t */\r\n\t\t\t\tSystem.out.println(\"Server waiting...\");\r\n\t\t\t\tsocket = welcomesock.accept();\r\n\t\t\t\tprocessRequest(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Class method to create the Snowy Hydro scheme object. This is a direct copy from the snowySystem.java class, from package tests. | private static SnowyScheme constructSnowyScheme() {
/* Setup a basic dam scheme */
/*Dam setup
* Used ML for water and MW for power, didn't add outflow as it depends on the dam, coeff wasn't changed
*/
/**dam
* @param count - Variable used as an identifier.
* @param capacity - The maximum water ... | [
"public IronToolFactory() {\n System.out.println(\"======== 使用抽象工厂 Abstract Factory 模式 ========\");\n this._smallHoe = null;\n this._bigHoe = null;\n this._smallShovel = null;\n this._bigHoe = null;\n System.out.println(\"成功创建铁制农具抽象工厂\");\n }",
"public abstract PlyFact... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the Kerberos credential configuration. | public void setKrb5CredentialConfiguration( Krb5CredentialConfiguration krb5CredentialConfiguration )
{
this.krb5CredentialConfiguration = krb5CredentialConfiguration;
} | [
"public void setKrbconfig(String krbconfig) {\r\n this.krbconfig = krbconfig;\r\n }",
"public void setKerberosAuthenticationEnabled(boolean kerberosAuthenticationEnabled) {\n this.kerberosAuthenticationEnabled = kerberosAuthenticationEnabled;\n }",
"public void setIsKerberos(String isKerberos) {\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add an alias to the index | public IndicesAliasesResponse addAlias(String aliasName); | [
"void alias(String name, String alias) throws Exception;",
"void setAlias(String alias);",
"public void setAlias(String alias);",
"public void setAlias (String Alias);",
"public void setAlias(String value) {\n alias = value;\n }",
"public void addAlias (String alias)\n {\n if (aliases.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'field933' field | public java.lang.CharSequence getField933() {
return field933;
} | [
"java.lang.String getField1033();",
"java.lang.String getField1001();",
"java.lang.String getField1003();",
"java.lang.String getField1301();",
"java.lang.String getField1307();",
"java.lang.String getField1414();",
"java.lang.String getField1231();",
"java.lang.String getField1164();",
"java.lang.S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the node label colorizer. | public NodeChildColorizer getNodeLabelColorizer() {
return nodeLabelColorizer;
} | [
"public NodeChildColorizer getNodeLabelBorderColorizer() {\n return nodeLabelBorderColorizer;\n }",
"public Color getLabelColor() {\n return label.getColor();\n }",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"public Vector4d getLabelColor() {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |