query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Test case number: 12 /Coverage entropy=1.0061742195272536
@Test(timeout = 4000) public void test012() throws Throwable { StringReader stringReader0 = new StringReader("&&"); FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, true); JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-2058), 859, 859); JavaParserToken...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the specified int from magnitude array
private int getInt(int n) { if (n < 0) return 0; if (n >= mag.length) return (sign < 0) ? -1 : 0; int magInt = mag[mag.length-n-1]; return (sign >= 0 ? magInt : (n <= firstNonzeroIntNum() ? -magInt : ~magInt)); }
[ "public int getMagnitudeColor(double magnitude) {\r\n int magnitudeColorResourceId;\r\n int magnitudeFloor = (int) Math.floor(magnitude);\r\n switch (magnitudeFloor) {\r\n case 0:\r\n case 1:\r\n magnitudeColorResourceId = R.color.magnitude10plus;\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.im.turms.proto.CreateGroupJoinRequestRequest create_group_join_request_request = 502;
@java.lang.Override public boolean hasCreateGroupJoinRequestRequest() { return kindCase_ == 502; }
[ "im.turms.server.common.access.client.dto.request.group.enrollment.CreateGroupJoinRequestRequest getCreateGroupJoinRequestRequest();", "im.turms.server.common.access.client.dto.request.group.enrollment.CreateGroupJoinRequestRequestOrBuilder getCreateGroupJoinRequestRequestOrBuilder();", "im.turms.server.common....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void run() { System.out.println("I'm running"); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new Parser instance.
private Parser() { }
[ "protected Parser() {}", "public Parser() {\n this(null);\n }", "public Parser() {\n\t\tthis(new DefaultHapiContext());\n\t}", "private static void createParser(int layout){\n parser = new Parser(layout);\n }", "public Parser(){\r\n\t\tstack.add(nodes.eof);\r\n\t\tstack.add(nodes.Pgm);\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ compiled from: BUGLY
public interface UpgradeListener { void onUpgrade(int i, UpgradeInfo upgradeInfo, boolean z, boolean z2); }
[ "void mo62419c();", "void mo104306b();", "protected void mo4791d() {\n }", "void mo12019c();", "public void compileClass()\n {\n \n }", "SourceCode remainingSourceCode();", "void mo4616b();", "native int compile(String file);", "void mo67483c();", "void mo14470b();", "private B00...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute the get request
@Override public void execute() { try { getRequest= new HttpGet(this.params.get("uri")); prepareHeader(); response = httpClient.execute(getRequest); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOExcept...
[ "@Override\n public void doGet() throws Exception {\n getTransaction();\n\n // Collect parameter 'filename' from HttpRequest\n String fileName = getParamByValue(\"filename\");\n String alias = getParamByValue(\"alias\");\n String uuid = getParamByValue(\"uuid\");\n\n if (uuid != null) {\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks that the two HardWareResults are equal in BarCode & weight values, this does not compare probabilities and time stamps.
public boolean sameValues(HardWareResult hwr) { boolean result = true; //assumes equals if (hwr == null) { result = false; } else { if (this != hwr) { result = result && sameNullNess(hwr.weightPre, this.weightPre); if (result && (hwr.weightPre !=null)) { //get in here we know both are n...
[ "@Override\n public int compare(BytesWritable o1, BytesWritable o2) {\n \n BytesWritable bw1 = SparkAligner.copyByteFromBytesWritable( (BytesWritable) o1);\n BytesWritable bw2 = SparkAligner.copyByteFromBytesWritable( (BytesWritable) o2);\n \n byte [] b1 = bw1.getBytes();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the color to red
private void setRed(Node mNode){ if(mNode != null){ mNode.color = red; } }
[ "private void setRed(int red) {\n this.red = getColor(red);\n this.cyan = getComplement(getRed());\n }", "public void setRed();", "public void red() {\n g2.setPaint(Color.red);\n }", "@Override\r\n\tpublic void color() {\n\t\tSystem.out.println(\"red color...\");\r\n\t}", "public void s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Implement this method using streams to return a unique List of tweetusers.
public static List<String> getTweeters() { return tweetService.findTweets().stream().map(Tweet::getUsername).distinct().collect(Collectors.toList()); }
[ "public List<Tweet> tweets() {\n return getMany(Tweet.class, \"User\");\n }", "public ArrayList<Tweet> getFilteredTweets() {\n ArrayList<User> filteredUsers = mUserCollection.getFilteredUsers();\n\n mTweets = new ArrayList<>();\n for (int i = 0; i < filteredUsers.size(); i++) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback for when the crafting gui is closed.
public void onCraftGuiClosed(EntityPlayer var1) { super.onCraftGuiClosed(var1); ItemStack var2 = this.tile_entity.getStackInSlotOnClosing(0); if (var2 != null) { this.tile_entity.getStackInSlot(0); var1.dropPlayerItem(var2); } }
[ "public void onClose() {\n if (inGUI()) {\n crumb.remove(currentIndex());\n }\n }", "private void closePressed() {\n EditableManager.makeEditable(warngenLayer, false);\n hide();\n }", "@Override\n\t\t\tpublic void closing() {\n\t\t\t\tJOptionPane.showMessageDialog(to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor Params: idNode ID neiSet of neighbours
public Node(int id, HashSet<Integer> nei) { // Node must have neighbours if (nei == null || nei.size() == 0) throw new IllegalArgumentException("Node must have neighbours"); this.ID = id; for (int i : nei) // Initial decision will be false since the node won't have received // a message this...
[ "public NodeSet() {}", "public Node(int cost, int x, int y){\n this.cost = cost;\n this.x = x;\n this.y = y;\n neighbors = new ArrayList<>();\n\n\n }", "public NodeSet(NodeIterator ni)\n {\n\n this(32);\n\n addNodes(ni);\n }", "public neighbors(int key) {\n th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the innerProperties property: The properties that define a peer's ASN.
private PeerAsnProperties innerProperties() { return this.innerProperties; }
[ "private NetworkVirtualAppliancePropertiesFormat innerProperties() {\n return this.innerProperties;\n }", "private DataNetworkPropertiesFormat innerProperties() {\n return this.innerProperties;\n }", "private ApplicationGatewayAvailableSslOptionsPropertiesFormat innerProperties() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the drawing stroke.
public void setStroke(Stroke stroke) { drawingStroke = stroke; }
[ "public void setStroke(Stroke stroke)\r\n {\r\n\t this.stroke = stroke;\r\n }", "public void setStroke(BasicStroke stroke) {\r\n\t\tthis.stroke = stroke;\r\n\t}", "public void setStroke(Stroke stroke) {\n\tthis.stroke = stroke;\n }", "public void setStroke(final Stroke stroke)\n {\n this.st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Similar to the method above, but deserializes from a |ByteBuffer| instance.
public static CookieManagerGetAllCookiesParams deserialize(java.nio.ByteBuffer data) { if (data == null) return null; return deserialize(new org.chromium.mojo.bindings.Message( data, new java.util.ArrayList<org.chromium.mojo.system.Handle>())); }
[ "T readFrom(ByteBuffer byteBuffer);", "@NotNull ByteBuffer toByteBuffer();", "public static ObjectChanged fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }", "public static SmallConsumerObjectAvro fromByteBuffer(\n java.nio.ByteBuffer b) throws...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Control interface for fluent wait.
public interface AwaitControl { /** * wait for an asynchronous call * * @return FluentWait element */ FluentWait await(); }
[ "public void requestWait();", "void gtWait(Object waitObject);", "public void waiting();", "@Override\n public void run()\n {\n waiting = true;\n try\n {\n callWaitMethod();\n waiting = false;\n }\n catch (Inter...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
se crea metodo q valida que los campos rack sub rack y slot no sean nulo retorna true si esta bien,false si estan vacios y se iria aPGI
private boolean camposFTTCok(Recursos_linea_basicaLocal rlb, ActividadEJBDTO act, boolean esConf,String operacionComercial) throws FinderException, NamingException{ PeticionLocalHome peticionLocalHome = (PeticionLocalHome) HomeFactory.getHome(PeticionLocalHome.JNDI_NAME); PeticionKey peticionKey = new Petic...
[ "boolean hasSlotIn();", "protected boolean validateSlot(int slot) {\n int size = stacks.size();\n if (slot < 0 || slot > size) {\n throw new RuntimeException(\"Slot \" + slot + \" not in valid range - [0,\" + (size + 1) + \")\");\n }\n return slot == size;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ DTLearning output on features2.csv Parent Node>N/AParent Value>N/ACurrent Node>In RoomLeft>falseRight>true Parent Node>In RoomParent Value>falseCurrent Node>Distance Between ObjectsLeft>farRight>close Parent Node>Distance Between ObjectsParent Value>farCurrent Node>LeafChangeMonsterProbability=0.00684403752889453Path...
public NodeInterface makeLearnedTree() { NodeInterface randomPathFollowingLeaf = new SupermanFollowingLeaf(new InternalNode(), null, null); NodeInterface doResetLeaf = new doReset(new InternalNode(), null, null); NodeInterface highSpeedRot = new highSpeedRotLeaf(new InternalNode(), null, nu...
[ "public static void generateDataset(String filePath) {\n\n\t if(debugLevel <=1) {\n System.out.println(\"Parsing data ....\");\n }\n\n List<List<String>> proteins_input = new ArrayList<>();\n List<List<String>> proteins_output = new ArrayList<>();\n int newProtein = 0;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Letting test know that executeCall was triggered.
@Override public <ResponseType> void executeCall(Call<ResponseType> call, Callback<ResponseType> callback) { throw new IllegalArgumentException("Call execution successfully"); }
[ "@Test\n\tpublic void test_execute() {\n\t\ttestedAction.execute(mockedActor, mockedTarget);\n\t\tverifyZeroInteractions(mockedActor);\n\t\tverifyZeroInteractions(mockedTarget);\n\t}", "boolean isExecuted();", "@Test\n\tpublic void Calls_21066_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Runn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find out how far we have extruded so far
public ExtruderState getExtruderState() { return es; }
[ "private int extract(Line[] ea) {\n\t\tint readsize = Math.min(ea.length, readCount);\n\t\tfor (int i = 0; i < readsize; ++i) {\n\t\t\tea[i] = readArray[readArrayHP];\n\t\t\treadArray[readArrayHP] = null;\n\t\t\t++readArrayHP;\n\t\t\t--readCount;\n\t\t\t++lineTx;\n\t\t}\n\t\treturn readsize;\n\t}", "double getSta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a ...
public ListQuotaSpecForAllNamespaces allowWatchBookmarks(Boolean allowWatchBookmarks) { put("allowWatchBookmarks", allowWatchBookmarks); return this; }
[ "public ListValidatingWebhookConfiguration allowWatchBookmarks(Boolean allowWatchBookmarks) {\n put(\"allowWatchBookmarks\", allowWatchBookmarks);\n return this;\n }", "public ListNamespacedPingSource allowWatchBookmarks(Boolean allowWatchBookmarks) {\n put(\"allowWatchBookmarks\", allowWatchBoo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new parser. The parsable files specified must have pretranslated paths (variables expanded and file separator characters converted if necessary).
public ScriptParser(Collection<ParsableFile> files, VariableSubstitutor vs) { this.files = files; this.vs = vs; }
[ "public abstract FileParser parser(File file);", "public JavaParser(String filename) {\n this.filename = filename;\n }", "public TextParser(String fileName) throws FileNotFoundException{\n this(new File(fileName));\n }", "public Parser(File fileIn) {\n\n argType = -1;\n argument1 =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
String str="12345"; String subStr="25"; System.out.println(str.contains(subStr)); s1();
public static void main(String[] args) { s2(); }
[ "private boolean isSubString(String sub, String string) {\n return string.contains(sub);\n }", "public static void main(String[] args) {\n\t\tString originalstr = \"prashant\";\r\n\t\tString subs = \"prash\";\r\n\t\t// CREATE TWO CHAR ARRAY TO STORE TWO STRINGS\r\n\t\tchar[] originalstrArray = originals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Il seguente metodo legge il file in input e popola l'hashmap con i digest utilizzati come chiave
private void readFile(String filename){ try { File f = new File(filename); FileReader reader = new FileReader(f); BufferedReader buff = new BufferedReader(reader); String currentDigest = buff.readLine(); while(currentDigest != null){ digests.put(new Digest(currentDigest), currentDigest); cur...
[ "public static void criarHash()throws Exception\r\n\t{\n\t\t\t\tScanner keyboard = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Vamos criar um arquivo de Hash.\");\r\n\t\t\t\tSystem.out.println(\"Digite o nome do arquivo base para criacao do Hash (Ex:cep_ordenado.dat)\");\r\n\t\t\t\tString nomehash = key...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Takes a line and a point and returns the nearest point on the line to the given point
private Point nearestPoint(Pair<Point, Point> line, Point p) { Point ap = new Point(p.x() - line.first.x(), p.y() - line.first.y()); Point ab = new Point(line.second.x() - line.first.x(), line.second.y() - line.first.y()); double abDist = StaticUtils.dist(line.first, line.second); ...
[ "public Point3d closestPointOnLine(Line3d inLine)\n\t\tthrows NotUniqueValueException {\n\t\tVector3d crossProduct = new Vector3d();\n\t\tcrossProduct.cross(this.getDirection(), inLine.getDirection());\n\n\t\tif (Gtk.isZeroVector(crossProduct)) {\n\t\t\tthrow new NotUniqueValueException(\"line \"\n\t\t\t\t+ inLine\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional int32 energy_index = 2 [default = 13];
public Builder setEnergyIndex(int value) { bitField0_ |= 0x00000002; energyIndex_ = value; onChanged(); return this; }
[ "public int getEnergy() { return this.energy; }", "@Override\n \tpublic int getEnergy() {\n \t\treturn energy;\n \t}", "public void setEnergy(int energy) {\n this.energy = energy;\n }", "public int getEnergy() {\n \t\treturn energy;\n \t}", "@Override\n public int getEnergyStored()\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to close this frame. Depending on which value was given to the setDefaultCloseOperation() method, this method will either, dispose this frame, exit, or make this frame invisible.
private void close() { int closeOp = getDefaultCloseOperation(); if (closeOp==DISPOSE_ON_CLOSE) dispose(); else if (closeOp==EXIT_ON_CLOSE) System.exit(0); else if (closeOp==HIDE_ON_CLOSE) setVisible(false); }
[ "protected void close() {\n\t\tsetVisible(false);\n\t\tdispose();\n\t}", "public void quit() {\n this.setVisible(false);\n this.dispose();\n }", "public void closeFrame()\r\n\t{\r\n\t\tthis.dispose();\r\n\t}", "protected static void closeFrame() {\n \tMainMenu.frame.setEnabled(true);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize current node to dummy head of the returning list.
public static ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode dummyHead = new ListNode(0); // Initialize p and q to head of l1 and l2 respectively. ListNode p = l1, q = l2, curr = dummyHead; // Initialize carry to 0 int carry = 0; // Loop through lists l1 and l2 until you reach both ends. whi...
[ "public void reset() {\n\t\tif (current == null) {\n\t\t\tcurrent = head;\n\t\t}\n\t}", "protected void reset ()\r\n {\r\n\tcurPointer = head;\r\n }", "public void resetCurrent(){\r\n\t\tcurrent=head;\r\n\t}", "void initializeList(){\n\t\thead = null; tail = null; numElements = 0;\n\t}", "public Linke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers an event listener for network changes as an OSGi service (whiteboard pattern).
private void registerWorkflowHostSetListener() { serviceRegistryAccess = ServiceRegistry.createPublisherAccessFor(this); serviceRegistryAccess.registerService(WorkflowHostSetListener.class, new WorkflowHostSetListener() { @Override public void onReachableWorkflowHostsChanged(Se...
[ "void addNetworkListener(NetworkListener l);", "public void addServerEventListener(IClientEventListener listener);", "void register(EventLogListener listener);", "@Override\n\t\t public void serviceAdded(ServiceEvent event) {\n\t\t \t\t\n\t\t jmdns.requestServiceInfo(event.getType(), even...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string map_version = 5;
com.google.protobuf.ByteString getMapVersionBytes();
[ "public void setMapVer(Version mapVer) {\n\t\tthis.mapVer = mapVer;\n\t}", "public void testCodeTableMap() {\n//\t\tHL7Tools2LiteConverter app = new HL7Tools2LiteConverter();\n//\t\tapp.run();\n//\t\tIGLibrary ig = app.igLibraries.get(\"2.5.1\");\n////\t\tProfile profile = app.doVersion(\"2.5.1\");\n//\t\tassert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Public noargs constructor needed for fragment reinstantiation
public AccountSetupNoteDialogFragment() {}
[ "public _4_1_Fragment () {\n\t\t\n\t}", "public IrurFragment() {\n }", "public FragmentFourth() {}", "public HttpFragment() {\n }", "public SermonsFragment() {\n }", "public ActivityFragment() {}", "public NotFragment() {\n }", "public InfoRoutesFragment(){/*Empty constructor*/}", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
== public methods ==
public int getTimestampByDateString(String dateString) { for(Map.Entry<Integer, String> date : dates.entrySet()) { if (date.getValue().equals(dateString)) { return date.getKey(); } } return 0; }
[ "@Override\n }", "@Override\r\n public void publicando() {\n }", "@Override\n public void extornar() {\n \n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description: It calculates nodes equally spaced between a and b for a number of nodes n
public double[] equallySpaced(int nPoints, double a, double b) { n = nPoints; this.a = a; this.b = b; double[] x = new double[n]; double interval = b - a; double h = interval / (n-1); double pos = a; for (int i = 0; i < n; i++) { x[i] = pos; ...
[ "private void calculateNodes()\n {\n nodes.clear();\n for(int i = 0; i < numNodes; i++)\n {\n double r = Math.random();\n double x = r;\n r = Math.random();\n double y = r;\n \n nodes.add(new Point2D.Double(x, y));\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if this polynomial is same as the polynomial in the argument. Used for testing whether two polynomials have same content but occupy disjoint space in memory. Do not change this code, doing so may result in incorrect grades.
public boolean checkEqual(Polynomial p) { // Test for null pointer exceptions!! // Clearly two polynomials are not same if they have different number of terms if (polynomial == null || p.polynomial == null || size() != p.size()) return false; int index = 0; ...
[ "@Override\n public boolean isSame(Polynomial other) {\n return this.toString().equals(other.toString());\n }", "public void testEquals() {\n double[] coeffs = {15, 10, -2};\n Polynomial testQuadratic = new Polynomial(coeffs);\n Polynomial equalTestQuadratic = testQuadratic.clone();\n double[] di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TripleA stores two folders, one for user content that survives between game installs, and a second that contains binaries. This method returns the 'user folder', which contains maps and save games.
public static File getUserRootFolder() { final File userHome = new File(SystemProperties.getUserHome()); final File rootDir = new File(new File(userHome, "Documents"), "triplea"); return rootDir.exists() ? rootDir : new File(userHome, "triplea"); }
[ "public static File userDirectory() {\n\t return new File(USER_DIR);\n\t}", "public static String getUserDataDir() {\n String sep = System.getProperty(\"file.separator\");\n\n return String.format(\"%s%s.chgs%s%s\", getUserHome(), sep, sep, \"user.conf\");\n }", "public File getUserHome();",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_home, container, false); // return inflater.inflate(R.layout.fragment_home, container, false); ((MainA...
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }", "@Override\n\tprotected View initView(LayoutInflater inflate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the ShowList contains a certain show by its name or ID
public boolean contains(String ShowNameorID) { if (find(ShowNameorID)!=null) { return true; } else { return false; } }
[ "public boolean contains(String showID) {\n\t return (find(showID)!=null);\n\t}", "public static void carShowDataCheck() {\n List<CarShow> carShows = carShowArrayList.getList();\n for (CarShow c: carShows) {\n if (c.isSanctioned()) {\n System.out.println(c.getCarShowId() +...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
record that a crime occurred on the given day at the given location.
public void addCrime(int day, int location) { ArrayList<Integer> days = prevCrime.get(location); if (days == null) { days = new ArrayList<Integer>(); } days.add(day); prevCrime.put(location, days); }
[ "public void setCityCountry(Day day, Location location) throws IOException {\n if(day.getCity() != null && day.getCountry() != null && day.getLocation() != null) {\n return;\n }\n if(day.getLocation() == null) {\n day.setLocation(new ParseGeoPoint(location.getLatitude(), l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ / / / / / / /
public static final void fill(Shape shape) { /* 107 */ if (!validFill(shape)) { /* */ return; /* */ } /* */ /* 111 */ Texture t = TextureImpl.getLastBind(); /* 112 */ TextureImpl.bindNone(); /* */ /* 114 */ fill(shape, new PointCallback() /* */ { /* */...
[ "private void calculatePaths() {\n\n\n }", "public static void main (String arg[]){\n\tSystem.out.println(\" ( ) ( ( \"); \n\n\tSystem.out.println(\" ( )\\\\ ) ( /( ( )\\\\ ) ( )\\\\ ) \");\n\t\n\tSystem.out.println(\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the base offset values.
public Vector2 getBaseOffset() { return this.baseOffsetXY; }
[ "int getStandardOffset();", "@Override\n public float[] getBaselineOffsets() {\n // XXX: at the moment there only horizontal metrics are taken into\n // account. If there is no baseline information in TrueType font\n // file default values used: {0, -ascent, (-ascent+descent)/2}\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the setListsForeground(java.awt.Color) method descriptor.
public java.beans.MethodDescriptor setListsForeground_javaawtColorMethodDescriptor() { java.beans.MethodDescriptor aDescriptor = null; try { /* Create and return the setListsForeground(java.awt.Color) method descriptor. */ java.lang.reflect.Method aMethod = null; try { /* Attempt to find the method usi...
[ "public void setForeground(final Color c);", "public final Color getForeground() {\n return foreground;\n }", "@Override\r\n\tpublic void setForeground(int aRow, int aCol, Color newVal) {\n\t\t\r\n\t}", "ColorDescriptor getForegroundColor();", "public com.commutestream.nativeads.protobuf.Csnmess...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called during resolves when the character is still intersecting this body
public void persistContact(Shape otherShape);
[ "public void collide()\n {\n bY = -500;\n bX = -500;\n }", "@Override\r\n\tpublic boolean removeCollision() {\n\t\treturn false;\r\n\t}", "private void collision() {\n\n for (GameObject tempObject : overworldHandler.getObjects()) {\n\n if (tempObject instanceof Block)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
signup takes parameters email, username, and password from post request returns a json string of the error response or "success"
@PostMapping(value="/signup") @ResponseBody public String addAccount(@RequestParam("email") String email, @RequestParam("username") String username, @RequestParam("password") String password) { Account acc = new Account(); acc.setEmail(email); acc.setUsername(username); acc.setPassword(password); try { ...
[ "public int signUp(String username, String password, String email) {\n\t\twebResource = client.resource(\"http://localhost:8000/server/users/signup\");\n\t\tsession = new Session(username, password, email);\n\t\treturn webResource.type(MediaType.APPLICATION_JSON).post(ClientResponse.class, session).getStatus();\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getGameStatus helper method returns current game status.
public GameStatus getGameStatus() { return status; }
[ "public GameStatus getGameStatus() {\n if (isAllFilled()) {\n return GameStatus.DRAW;\n }\n\n if (checkForWinningCombination()) {\n return GameStatus.WIN;\n }\n\n return GameStatus.PLAYING;\n }", "public GameStatus getStatus() { return status; }", "@Ov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
endregion region Private methods It simply initializes the login form and its fields.
private void initializeLoginForm() { this.mEmailView = (AutoCompleteTextView) findViewById(R.id.email); this.mPasswordView = (EditText) this.findViewById(R.id.password); this.mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public...
[ "private void initialize() {\r\n\t\tfrmLogin = new JFrame();\r\n\t\tfrmLogin.setTitle(\"Login\");\r\n\t\tfrmLogin.setBounds(100, 100, 448, 326);\r\n\t\tfrmLogin.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmLogin.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a new dungeon and save all its floors into a temp directory
public static Array<FloorData> create(Dungeon.Parameters params, float[] progress) { // make sure dungeon dir exists // Gdx.files.absolute(tmpDir).mkdirs(); // make sure to create cache files one first create if (params.getCacheFile() != null) { try { FileHand...
[ "public void generateNewLevel() {\n mgRobot1s.clear();\n mgEnemies.clear();\n mgEnemyBullets.clear();\n mgItems.clear();\n mgBaseTiles.clear();\n mgPlayerBullets.clear();\n mgParticle1s.clear();\n mgPassiveTiles.clear();\n\n player.x = 800 / 2 - 64 / 2;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method initializes m_buttonPanel
private JPanel getButtonPanel() { if (m_buttonPanel == null) { m_buttonPanel = new JPanel(); FlowLayout m_buttonPanelLayout = new FlowLayout(); m_buttonPanel.setLayout(m_buttonPanelLayout); m_buttonPanel.add(getJPanelStatus()); m_buttonPanel.add(getGoButton()); m_buttonPanel.add(getM_stopButton()); ...
[ "public ButtonPanel()\n {\n setUpPanel();\n }", "private void initButton() {\r\n\t\tthis.panelButton = new JPanel();\r\n\t\tthis.panelButton.setLayout(new BoxLayout(this.panelButton,\r\n\t\t\t\tBoxLayout.LINE_AXIS));\r\n\t\tthis.modifyButton = new JButton(\"Modify\");\r\n\t\tthis.buttonSize(this.modifyButton...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column goku_bussiness.useflag
public void setUseflag(String useflag) { this.useflag = useflag == null ? null : useflag.trim(); }
[ "public void setUseFlag(Byte useFlag) {\n this.useFlag = useFlag;\n }", "public void setUseFlag(Short useFlag) {\n this.useFlag = useFlag;\n }", "public DBFlag(boolean use) {\n\t\tthis.inUse = use;\n\t\tthis.lastAccess = System.currentTimeMillis();\n\t}", "public void setUsageFlag(Byte usa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
time complexity:o(n) space complexity:o(1)
static public int removeElement(int[] nums, int val) { int left = 0; for (int i = 0; i < nums.length; i++){ if (nums[i] != val){ nums[left] = nums[i]; left++; } } return left; }
[ "for (int i = 1; i <= n; i++) {\n for(int j = 1; j <= n; j++) {\n // constant time code here\n }\n }", "public static int BigO(int[] list) {\n return list[0]; // We can see that the function executes only one operation\n // The efficiency is Big O of 1 or ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the mqtT broker table. Contains a list of configured MQTT brokers.
public void setBrokers(Collection<Broker> brokers) { this.brokers = brokers; }
[ "@Override\n public ObjectArrayList<BrokerSetup> getBrokerList() {\n return this.brokerList;\n }", "public void setTables(List<String> tables) {\n this.tables = tables;\n }", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/brokers/tables/{tableName}\")\n @ApiOperation(value = \"List brokers...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 25 / 1 covered goal: Goal 1. wheel.json.JSONObject.toJSONArray(Lwheel/json/JSONArray;)Lwheel/json/JSONArray;: I6 Branch 98 IFNULL L1113 true
@Test public void test25() throws Throwable { HashMap<IndexedWord, Long> hashMap0 = new HashMap<IndexedWord, Long>(); assertTrue(hashMap0.isEmpty()); assertEquals(0, hashMap0.size()); assertNotNull(hashMap0); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); assertE...
[ "@Test(timeout = 4000)\n public void test124() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONArray jSONArray0 = jSONObject0.toJSONArray((JSONArray) null);\n assertNull(jSONArray0);\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n JSONObje...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates the cell scoring
public Double cellScoring(TableModel gtTable, TableModel userTable) { LOGGER.log(Level.INFO, "Start calculating Cell Scoring"); Double cellScore; // // get first userTable table and find the same in groundTruth // // Start comparing cells // List<TableModel> gt = groundTruth.getGro...
[ "public void calculateScore() {\n\t\t\r\n\t}", "public double getResult(int playerNum){\n for(Cell c : cellMap.values()){\n if(c.getState() == 1){\n c.setScoreState(1);\n } else { \n c.setScoreState(2);\n }\n }\n\n int[] numGroups...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
================================================ Getters / Setters
public double getX() {return x;}
[ "@Override\n }", "@Override\r\n\t\tprotected void getData() {\n\r\n\t\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void setValue() {\n\t\t\n\t}", "@Override\n\tpublic void getPuntuacio() {\n\n\t}", "@Override\r\n\tpublic void getData() {\n\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sometimes you need to manually build an event based off of an existing Prism action handler. For example, if you're intercepting events and need to handle adding an action to the queue, you can build it manually. There are two ways to do this. Both are shown below.
public static void trigger( PrismApiDemo plugin, Player player ){ if (plugin.getPrism() != null) { /** * Here we'll generate a fake "item-insert" action using a very short "factory" system * that lets us pass in some args in a single line. * * It's not recommended because we *may* change t...
[ "public CreateEventHandlerUIAction(EditPart editPart) {\n\t\tsuper(editPart);\n\t}", "@Override\n public void handle(ActionEvent actionEvent) { // TODO\n\n }", "@Override\n public void handle(ActionEvent actionEvent) {\n }", "public void handle(ActionEvent event) {\n\t\r\n}...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
URL for the financial institution.
@Element ( name = "URL", order = 140 ) public String getSiteURL() { return siteURL; }
[ "private String getURL() {\n\t\t// TODO : 서버 URL\n\t\t// Sample : GitHub\n\t\treturn \"https://api.github.com/repos/pluu/PluuBasicLibrary/contributors\";\n\t}", "public String getInstitution() {\n return institution; \n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The URL for the ins...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the connection data.
public void setConnectionData(ServerConnectionDataInterface connectData);
[ "public void setConnection( Connection connection ) { this.conn = connection; }", "public void setConnection(Connection conn){\n\t\tthis.conn = conn;\n\t}", "@Override\n\tpublic void setConnection(Connection con) {\n\n\t}", "public void SetConnection();", "public void setDataEngineProxyConnection(Connection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) throws Exception { Connection con=DBconnect.mydbconnect(); Scanner s1=new Scanner(System.in); System.out.println("Person No: "); int id=s1.nextInt(); s1.nextLine(); System.out.println("PersonName:: "); String name=s1.nextLine(); System.out.println("Enter DOB(YYYY-M...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Hirofumi Nakagawa on 13/07/15.
public interface Callback<T> { public static final String EXCEPTIONS = "_exceptions"; public static final String RESULTS = "_results"; public void onSuccess(T result); public void onFailure(Bundle result, Exception exception); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
[ "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of a move option as a string. This method is just used for testing.
public String optionFor(String moveName) { int index = problem.getMover().getMoveNames().indexOf(moveName); if (index == -1) { throw new RuntimeException("Bad move name in ProblemConsole: " + moveName); } else { return Integer.toString(index+1); } }
[ "public int getMoveNum() {\n return moveNum;\n }", "private static String getMoveNum(Board board) {\n if(board == null) {\n return \"\";\n }\n int plyNum = board.getPlyNum();\n return \"\" + ((plyNum + 1) / 2) + \". \"\n + ((plyNum & 1) == 1 ? \"\" : \"......
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Command Interface that executes functions to take different behaviors from command classes accordingly.
public interface Query { void execute(); }
[ "public interface Command {\n String doAction(Object o1, Object o2);\n String getCmdName();\n}", "public interface CommandClass {\n public void run();\n}", "public abstract void handleCommand();", "public interface Command\n{\n void execute();\n void undo();\n}", "public interface Command\n{\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
connectBi functions: makes the connections needed to build the ith part of the whole filter.
private void connectB2() throws FilterException { AllPassFilter apfi = new AllPassFilter(0.25, 2734); // 62 ms AllPassFilter apfo = new AllPassFilter(0.5, 3837, apfi); // 87 ms DelayFilter dfr = new DelayFilter(750); // 17 ms DelayFilter dfl = new DelayFilter(1367); // 31 ms ...
[ "private Pair<CustomGraph, ArrayList<Edge>> filtering(CustomGraph graph) throws InterruptedException {\n\t\tCustomGraph biconnectedCore = new CustomGraph(graph);\n\t\t//HashMap to get the connection between the nodes of the original graph and the biconnectedCore\n\t\tHashMap<Edge,Edge> edgeMapping = new HashMap<Edg...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to handle the WAIT state. It will allow players to write EXIT which will bring the player to the CHOOSE state. Otherwise, it will just send a message to the player to wait for another player to join. Moving a player from the WAIT state to the PLAY state is not done here, it is done using callbacks given as param...
private synchronized void handleWait(String playerID, String input, ObjectOutputStream out) throws IOException { if (input.equals("EXIT")) { playerMatches.remove(playerID); inChoose.put(playerID, () -> { try { out.writeObject(ServerResponse.createChoos...
[ "public void playerWait() {\n isPlayerWait = true;\n updateLog(9);\n }", "public void waiting_match() throws Exception {\n for (int i=timer_waiting;i>0;i--){\n Thread.sleep(500);\n hub.notifyObserver(\"Timer\");\n hub.notifyObserver(i+\"\");\n Th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PojogenProperty__Group_9__1" $ANTLR start "rule__PojogenProperty__Group_9__1__Impl" ../org.sqlproc.meta.ui/srcgen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:13479:1: rule__PojogenProperty__Group_9__1__Impl : ( ( ( rule__PojogenProperty__Group_9_1__0 ) ) ( ( rule__PojogenP...
public final void rule__PojogenProperty__Group_9__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.sqlproc.meta.ui/src-gen/org/sqlproc/meta/ui/contentassist/antlr/internal/InternalProcessorMeta.g:13483:1: ( ( ( ( rule__PojogenProperty__...
[ "public final void rule__PropertyDefinition__Group__10() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.osate.xtext.aadl2.propertyset.ui/src-gen/org/osate/xtext/aadl2/propertyset/ui/contentassist/antlr/internal/InternalProp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by GreenTechAndroid on 3/26/2018.
public interface FixturePresenter { void onCreate(); void connectWithServer(); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\tprotected void onInit() {\n\n\t}", "@Override\n public int utilite() {\n return 0;\n }", "@Override\n public void onAlways() {\n\n }", "protected void on...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
clone all of of the data into the forge tile data
@Override public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) { CompoundNBT tag = pkt.getNbtCompound(); this.getTileData().merge(tag); }
[ "void refreshStoredData()\n\t{\n\t\ttile = (TileEntityArithmeticLogicMachine)tile.getWorld().getTileEntity(tile.getPos());\n\t}", "public void resetTiles() {\n for (int x = 0; x < size; ++x) {\n for (int y = 0; y < size; ++y) {\n Tile t = get(x, y);\n if (t != null) {\n t.mergedFrom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns the index where the object is
public Object getInt(Object a){ int place = -1; for(int i = 0; i < 10; i++){ if(arr[i] == a){ place = i; } } return place; }
[ "Object getIndex();", "private int getIndexOfObject(ViewObject viewObject) {\r\n for(int i = 0; i <vos.size(); i++){\r\n if(vos.get(i) == viewObject) return i;\r\n }\r\n return -1;\r\n }", "@Override\r\n\tpublic int getIndexOf(final Object anObject) {\r\n\t\treturn objects.ind...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
JFormDesigner End of variables declaration //GENEND:variables
public void showListData() { //刷新展示界面 List<Order> orders = orderService.queryAll(); String[][] datas = new String[orders.size()][14]; for (int i = 0; i < datas.length; i++) { datas[i][0] = orders.get(i).getISBN(); datas[i][1] = orders.get(i).getTypeId().toString()...
[ "private void initComponents() {\n\t\t// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents\n // Generated using JFormDesigner non-commercial license\n dialogPane = new JPanel();\n contentPanel = new JPanel();\n numFlatsField = new JTextField();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table t_cpy_flanging_regulation_report
int insertSelective(TCpyFlangingRegulationReport record);
[ "@Select({\n \"select\",\n \"REWARD_NO, TICK_NO, BET_NO, MERCHANTID, USER_ID, ISSUE_NO, LTYPE, PLAY_TYPE, \",\n \"CREATE_DATE, MODIFY_DATE, BET_AMOUNT, BET_COUNTS, REWARD_AMOUNT, REWARD_TYPE, \",\n \"REWARD_DESC, REWARD_RATIO, FUND_REWARD_AMOUNT, FUND_REF_ID_REWARD, FUND_REF_ID_CANCEL, \...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ A callback interface that all activities containing this fragment must implement. This mechanism allows activities to be notified of item selections.
public interface Callback { /** * DetailFragmentCallback for when an item has been selected. */ public void onItemSelected(Parcelable parcelableMovie); }
[ "public abstract void onSelected(Context context, Object data);", "public interface CallbackItemClicked {\n public void onListItemSelected(ListFragmentBase lfb, long id);\n }", "public interface MainFragmentCallback {\n public void onItemSelected(int itemId);\n}", "public interface OnSelectionCha...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Glide.with(getApplicationContext()) .load(url) .apply(new RequestOptions().override(600, 200)) .into((ImageView) findViewById(R.id.pokemonimage_ImageView));
@Override public void pokemonCallback(Pokemon pokemon) { Glide.with(getApplicationContext()) .load(pokemon.getSprites().getFront_default()) .apply(new RequestOptions().centerCrop().fitCenter()) .into((ImageView...
[ "public void loadImage(View view) {\n String url = \"http://p1.pstatp.com/large/166200019850062839d3\";\n Glide.with(this).load(url).placeholder(R.mipmap.ic_launcher).diskCacheStrategy(DiskCacheStrategy.NONE).into(imageView);\n }", "public static void glideLoad(Context context, ImageView view, St...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void competiteurAdded(ICompetiteur competiteur) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize with the date and hour in which the specified time falls
public DateAndHour(Date date) { this(date.getTime()); }
[ "public Time (int hour, int minute){\n\n this.hour = hour;\n this.minute = minute;\n }", "public abstract void setStartTime(int hour);", "@Override\n\tpublic void init(LocalDateTime time) {\n\t\tthis.time = time;\n\t}", "public abstract void setStartTime(int hour, int minute);", "public Tim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_manageshow.f_peoNum
public Integer getfPeonum() { return fPeonum; }
[ "public Integer getPno() {\n return pno;\n }", "public int getNaipe(){\n return this.naipe;\n }", "public int obtener_peso(){\r\n return peso;\r\n }", "public String getPebNumber()\n {\n return this.pebNumber;\n }", "@Override\n\tpublic int getNewNum() throws DataAccessExcep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns descriptors for all registered tactic parameterizers. The order of the returned array is of no significance and may change across multiple calls of the method.
IParameterizerDescriptor[] getParameterizerDescriptors();
[ "public Collection<ParameterDescriptor> getParameterDescriptors() {\n\t\treturn paramDescriptors.values();\n\t}", "public AnnotatedType[] getAnnotatedParameterTypes() {\n/* 695 */ return TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(), \n/* 696 */ SharedSecrets.getJavaLangAccess()\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new config printer.
ConfigPrinter(String confFile, String outputAPTFile) { configFile = confFile; this.outputAPTFile = outputAPTFile; entries = new ArrayList<ConfigEntry>(); }
[ "public Printer() {\r\n\tthis(getDefaultPrinterData());\r\n}", "public Printer() {\n\t\tisOn = false;\n\t\tsetPrinterName(\"Printer\");\n\t\tSystem.out.println(\"New Printer instance created.\");\n\t}", "public static Settings init() {\n return printer.init(DEFAULT_TAG);\n }", "public Printer create...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of field 'fork'. The field 'fork' has the following description: Spawns multiple concurrent paths of execution.
public void setFork( final com.orient.jpdl.model.Fork fork) { this._fork = fork; this._choiceValue = fork; }
[ "public Builder setForkPoint(int value) {\n \n forkPoint_ = value;\n onChanged();\n return this;\n }", "public Builder setNumForkEvents(int value) {\n copyOnWrite();\n instance.setNumForkEvents(value);\n return this;\n }", "public final void rul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 16 / 1 covered goal: Goal 1. wheel.json.JSONObject.testValidity(Ljava/lang/Object;)V: I23 Branch 93 IFNE L1090 true
@Test public void test16() throws Throwable { try { String string0 = JSONObject.numberToString((Number) Double.POSITIVE_INFINITY); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSON does not allow non-finite numbers. ...
[ "@Test(timeout = 4000)\n public void test026() throws Throwable {\n JSONObject.testValidity((Object) null);\n }", "@Test(timeout = 4000)\n public void test153() throws Throwable {\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject0 = new JSONObject(linkedL...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a Binary Tree, convert it into its mirror. Runtime Complexity Linear, O(n). Every subtree needs to be mirrored so we visit every node once and mirror the subtree starting there. Hence run time complexity is O(n).Memory ComplexityLinear, O(n) in the worst case.
public static void mirror(Node root) { if(root == null) return; // We will do a post-order traversal of the binary tree. if(root.left != null) { mirror(root.left); } if(root.right != null) { mirror(root.right); } // Let's swap the left and right nodes at current level. Node temp = root.le...
[ "private BinaryNode<AnyType> mirror1(BinaryNode<AnyType> t)\n\t{\n\t\tif(t==null)\n\t\t\treturn t;\n\n\t\tBinaryNode<AnyType> n1=mirror1(t.left);\n\t\tBinaryNode<AnyType> n2=mirror1(t.right);\n\t\tt.left=n2;\n\t\tt.right=n1;\n\t\treturn t;\n\t}", "private void mirror(Node node) {\n\t\tfor (Node child : node.child...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
listener para aumentar e diminuir o layout clicado//
public void abreLayout(View view) { final LinearLayout layout = (LinearLayout) view; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) TransitionManager.beginDelayedTransition(layout); int marginTop = dp2Px(10); if (layout.getLayoutParams().height == LinearLayout.La...
[ "@Override\n public void onLayoutChange(\n View v, int l, int t, int r, int b, int ol, int ot, int or, int ob) {\n mScrollView.removeOnLayoutChangeListener(this);\n mScrollView.setVisibility(View.VISIBLE);\n createDialogSlideAnimaton(true, n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialisation de la connexion avec le server
public void run() { isConnected = true; try { //here you must put your computer's IP address. InetAddress serverAddr = InetAddress.getByName(SERVERIP); Log.e("TCP Client", "C: Connecting..."); //create a socket to make the connection with the server ...
[ "public void init(){\n openConnection();\n }", "Connexion() {\n try {\n mSocket = IO.socket(\"http://10.0.2.2:10101\");\n } catch (URISyntaxException ex) {\n ex.printStackTrace();\n }\n écouterRéseau();\n }", "public Conexion() {\r\n this.setu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns pretty print of the specified xml string.
public static String format(final String xml) { try { final DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); final Document doc = db.parse(new InputSource(new StringReader(xml))); final Transformer transformer = TransformerFactory.newInstance()....
[ "public static String prettyPrint(String xml) {\n\t\tStringBuilder string = new StringBuilder();\n\n\t\tstring.append(prettyPrint(xml,0));\n\n\n\t\treturn string.toString();\n\t}", "public static String formatXML(String xml) {\n\t\tlogger.debug(\"pretty print processing xml input\");\n\t\ttry {\n\t\t\tDocument do...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
index1 = column, index2 = row
public double get(int index1, int index2) { return this.data[index1+this.attributes.length*index2]; }
[ "private int Pos2Index (int row, int col) {\n return row * dimension + col;\n }", "Integer getColumnIndex();", "public abstract int getColumn(final int x, final int y) throws Exception;", "private int index(int row, int col) {\n return (row - 1) * n + col;\n }", "private int getIndex(int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the quality of the stream.
public VideoQuality getVideoQuality() { return mRequestedQuality; }
[ "public int getQuality(){\n\t\treturn checkZero(get(QUALITY));\n\t}", "int getMultimediaQualityValue();", "byte getJpegQuality();", "int getQualityLevel();", "public com.google.protobuf.ByteString\n getQualityBytes() {\n Object ref = quality_;\n if (ref instanceof String) {\n com.goo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void removeEmployee(Integer employeeId) { EmployeeEntity employee = manager.find(EmployeeEntity.class, employeeId); manager.remove(employee); // return employeeId; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the current object model.
Map getObjectModel();
[ "public ModelObject getModelObject() {\r\n\t\treturn modelobject;\r\n\t}", "public ObjModel getModel(){\n\t\treturn model;\n\t}", "public T getModel() {\n return model;\n }", "public Model getModel()\r\n\t{\r\n\t\treturn model;\r\n\t}", "public M getModel() {\n return model;\n }", "public Ap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: d
Executor mo14658d() { return Executors.newCachedThreadPool(new C193762(this)); }
[ "private void d() {\n }", "public void mo1857d() {\n }", "public void setD(String d) {\n this.d = d;\n }", "public boolean d() {\n }", "protected void d()\r\n/* 49: */ {\r\n/* 50:57 */ super.d();\r\n/* 51: */ }", "protected void mo4791d() {\n }", "@Override\n\tpublic voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string hero_name = 3;
public java.lang.String getHeroName() { java.lang.Object ref = heroName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { ...
[ "public void setHero(String hero) {\n this.hero = hero;\n }", "public java.lang.String getRequiredHero() {\n java.lang.Object ref = requiredHero_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bidirectional manytoone association to IllnessSymptom
public Symptom() { }
[ "public void addNewSymptom(String nSymptom){\n\n setSymptom(nSymptom + getSymptom());\n\n }", "public CMLAtomCorrespondence() \r\n {}", "public void onSymptomListResume();", "public void _linkConstrainedStereotype(Stereotype constrainedStereotype1);", "public IOntoAssociation clone();", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
builds InventoryEntryChangeQuantityAction without checking for nonnull required values
public InventoryEntryChangeQuantityAction buildUnchecked() { return new InventoryEntryChangeQuantityActionImpl(quantity); }
[ "public MyCartChangeLineItemQuantityAction buildUnchecked() {\n return new MyCartChangeLineItemQuantityActionImpl(lineItemId, quantity, externalPrice, externalTotalPrice);\n }", "public static ShoppingListChangeLineItemQuantityActionBuilder of(\n final ShoppingListChangeLineItemQuantityAction...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retourne la taille du fichier
public long getTaille() { return this.taille; }
[ "public long getFileLenght(){\n\t\treturn file.length();\n\t}", "public byte[] tail(String fileName) throws Exception {\r\n\t\t// TODO: return the last page of the fileName\r\n\t\tJsonReader jr = readMetaData();\r\n\t\tJsonObject jrObject = jr.readObject();\r\n\t\tJsonObject jrMetaData = jrObject.getJsonObject(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pending change management due to the use of asyncExec in postRunnable.
public synchronized boolean hasPendingChanges() { return fPendingChanges > 0; }
[ "protected boolean applyRunAsync() { return false; }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tif (future.getState() == StateValue.PENDING) {\n\t\t\t\t\t\t\t\t\tfuture.firePropertyChange(\"state\", null, StateValue.PENDING);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "private void doSync(Runna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
confirm that team exists with sub classes
@Test public void testRemoveTopTeam() { testTopTeamList = fakedb.getAllTopTeams(); assertEquals(2, testTopTeamList.size()); assertEquals(3, testTopTeamList.get(1).getSubTeams().size()); assertTrue(fakedb.findTopTeam("The Office") != null); assertTrue(fakedb.findSubTeam("Party Planning Committee") != null); ...
[ "public boolean IsTeam() { return true; }", "boolean hasDeleteTeam();", "boolean hasEditTeam();", "private boolean checkTeam (String team) {\r\n\t\tboolean teamExists = false;\r\n\t\tQuery q = new Query(\"Team\", \"teamName\",\"teamName\",team);\r\n\t\tString t = q.generateQueryString(q);\r\n\t String a = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string content = 2;
public Builder setContent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; content_ = value; onChanged(); return this; }
[ "public void setContent( String c ){ content = c; }", "public void setContent( String arg0, String arg1 )\r\n \t\t{\n \r\n \t\t}", "public void setContent(@NotNull String content);", "private void setContent(String content){\n if(content == null || content == \"\"){\n throw new IllegalArgume...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find an obf entry of any type by name
public Obf getByName(String name) { Obf classObf = this.classObfs.get(name); if (classObf != null) { return classObf; } Obf methodObf = this.methodObfs.get(name); if (methodObf != null) { return methodObf; } Obf fieldObf = this.fieldObfs.get(name); if (fieldObf != null) ...
[ "public abstract Entry findEntryByName(String name);", "@Override\n\tpublic Btypes findtype(String name) {\n\t\treturn this.getBtypesDao().getByName(name);\n\t}", "private IngredientType findtypebyname(String name) {\n IngredientType tipo = null;\n for (Ingredient e : usedIngredients) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
check if hospitalLine queue is empty, if so, game is complete!
public void updateBusLine() { if (BusLine.isEmpty()) { command.setText("Congratulations!"); prompt.setText(R.string.priorityPrompt3); line1.setVisibility(View.VISIBLE); line2.setVisibility(View.VISIBLE); line0.setVisibility(View.VISIBLE); l...
[ "@Override\r\n\tpublic boolean recipientLineEmpty() {\r\n\r\n\t\treturn queue.isEmpty();\r\n\t}", "private boolean isFull() {\n return size == queue.length;\n }", "public boolean isFull() {\n return (queue.size() == 0);\n }", "@Override\n public boolean isEmpty() {\n return queue.i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public String getText(WebElement ele) { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify that it works for an empty list of stations
@Test public void testSort() throws InvalidTimeSpanException { assertTrue(new ArrayList<Station>().equals(leastOccupiedSort.sort(new ArrayList<Station>(), DateParser.parse("01/01/2000T00:00:00"), DateParser.parse("01/01/2000T01:00:00")))); ArrayList<Station> expectedStations = new ArrayList<Station>(); expected...
[ "@Test\n public void disembarkAllEmptyTrainTest() {\n assertFalse(this.trainH.disembarkAll(plistA));\n assertEquals(0, this.trainH.numberOfPassengersOnBoard());\n }", "public boolean isNilStation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This implementation substitutes the factory itself as the key for the adapter.
@Override public Adapter adapt(Notifier notifier, Object type) { return super.adapt(notifier, this); }
[ "abstract protected ActorFactory getKeyFactory();", "public KmAdaptorIF<T,String> getKeyAdapter()\n {\n return _keyAdapter;\n }", "public Object generateCacheKey(Object id, CollectionPersister persister, SessionFactoryImplementor factory, String tenantIdentifier);", "@Deprecated\n\tprotected fina...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new instance of FindingsFromPhysicalExaminations. Leaves the model unchanged.
public static FindingsFromPhysicalExaminations getFindingsFromPhysicalExaminations(Resource resource, Model model) throws JastorException { String code = (model.hashCode()*17 + com.mds.decisionsupport.model.FindingsFromPhysicalExaminations.class.hashCode()) + resource.toString(); com.mds.decisionsupport.model.Fin...
[ "public PhysicalEvaluation create(PhysicalEvaluation physicalEvaluation) {\n\t\tPhysicalEvaluation userAssistance = new PhysicalEvaluation();\n\t\ttry {\n\t\t\tif (userAssistance != null) {\n\t\t\t\tuserAssistance = physicalEvaluationRepository.save(physicalEvaluation);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }