query stringlengths 7 33.1k | document stringlengths 7 335k | metadata dict | negatives listlengths 3 101 | negative_scores listlengths 3 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Returns the number of items in queue | public int size() {
return qSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getCount() {\n return queue.size();\n }",
"public int size(){\r\n\t\treturn queue.size();\r\n\t}",
"public int size() {\n return queue.size();\n }",
"public int size() {\n return _queue.size();\n }",
"public int size() {\n return this.queue.size();\n }",
... | [
"0.8584875",
"0.8343274",
"0.8260372",
"0.82265806",
"0.8202201",
"0.8201931",
"0.8118455",
"0.8037433",
"0.79647887",
"0.77504444",
"0.7721498",
"0.7712807",
"0.76354307",
"0.76243514",
"0.7549107",
"0.7539609",
"0.7527137",
"0.751626",
"0.7466559",
"0.7457652",
"0.7415168",... | 0.6705607 | 94 |
Adds item in queue | public void enqueue(Item item) {
if (item == null) {
throw new IllegalArgumentException("Empty item");
}
if (queue.length == qSize) {
resize(qSize * 2);
}
queue[qSize] = item;
qSize++;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void addToQueue() {\n\t}",
"public void add( int item ) \n {\n\t//queue is empty\n\tif ( queue.isEmpty() ) {\n\t queue.add( item );\n\t return;\n\t}\n\t\n\t//queue is not empty\n\telse {\n\t //find spot of insetion\n\t for ( int i = 0; i < queue.size(); i++ ) {\t\t\t \n\t\ti... | [
"0.7978994",
"0.74622303",
"0.7447197",
"0.7437098",
"0.72358114",
"0.71773607",
"0.71016693",
"0.7040796",
"0.70292526",
"0.7028738",
"0.7010007",
"0.699905",
"0.699765",
"0.6996649",
"0.6990473",
"0.69873637",
"0.6961154",
"0.69558907",
"0.6937794",
"0.6921034",
"0.69174165... | 0.6659193 | 54 |
Removes and returns random item | public Item dequeue() {
if (qSize == 0) {
throw new java.util.NoSuchElementException("Empty queue");
}
int index = StdRandom.uniform(qSize);
Item item = queue[index];
if (index == qSize - 1) {
queue[index] = null;
} else {
queue[index] = queue[qSize - 1];
queue[qSize - 1] = null;
}
qSize--;
if (qSize > 0 && qSize == queue.length / 4) {
resize(queue.length / 2);
}
return item;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T removeRandom();",
"public T removeRandom ();",
"public String remove(){\n ListIterator<String> iter = bookkeeper.listIterator();\n int random = (int)(Math.random()*bookkeeper.size());\n System.out.println(\"\\n\\n***RANDOM = \" + random);\n String retrieve = bookkeeper.get(... | [
"0.78752136",
"0.7749351",
"0.7658643",
"0.75074434",
"0.69519717",
"0.6937248",
"0.68873894",
"0.6786662",
"0.675549",
"0.66103405",
"0.65982133",
"0.6587726",
"0.6519407",
"0.6474134",
"0.64650726",
"0.6447275",
"0.6440797",
"0.642409",
"0.64096725",
"0.6407933",
"0.6367563... | 0.0 | -1 |
Returns random item without remove | public Item sample() {
if (qSize == 0) {
throw new java.util.NoSuchElementException("Empty queue");
}
return queue[StdRandom.uniform(qSize)];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T getRandomElement() {\n\t\treturn this.itemList.get(this.getRandomIndex());\n\t}",
"public Item getRandomItem() {\n int index = 0;\n int i = (int) (Math.random() * getItems().size()) ;\n for (Item item : getItems()) {\n if (index == i) {\n return item;\n ... | [
"0.7774701",
"0.77620685",
"0.7691794",
"0.7656986",
"0.76101524",
"0.74995047",
"0.7488308",
"0.73904335",
"0.7359264",
"0.73550206",
"0.73290944",
"0.7292968",
"0.72847664",
"0.72554326",
"0.72453886",
"0.72272253",
"0.72239053",
"0.72231936",
"0.72015893",
"0.7197356",
"0.... | 0.6397682 | 98 |
Returns iterator in random order | public Iterator<Item> iterator() {
return new RandomArrayIterator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterator<Item> iterator() { return new RandomIterator();}",
"public Iterator<Item> iterator() {\n return new RandomizedIterator();\n }",
"public Iterator<Item> iterator() {\n return new RandomIterator(N, a);\n }",
"public Iterator<Item> iterator() {\n return new RandomIte... | [
"0.80623424",
"0.7533047",
"0.7378622",
"0.736524",
"0.7362575",
"0.7062736",
"0.69566643",
"0.6852825",
"0.68006146",
"0.67527956",
"0.6737806",
"0.66646874",
"0.6664496",
"0.66502565",
"0.6637409",
"0.6637409",
"0.6637409",
"0.66125065",
"0.6489009",
"0.6327259",
"0.6303994... | 0.6867529 | 7 |
Some kind of unit testing requirements was to print all methods to StdOutput | public static void main(String[] args) {
RandomizedQueue<Integer> rq = new RandomizedQueue<>();
StdOut.println(rq.size());
rq.enqueue(1);
rq.enqueue(2);
rq.enqueue(3);
rq.enqueue(4);
for (Integer i : rq) {
StdOut.println(i);
}
StdOut.println(rq.isEmpty());
StdOut.println(rq.sample());
StdOut.println(rq.sample());
StdOut.println(rq.size());
StdOut.println(rq.dequeue());
StdOut.println(rq.size());
for (Integer i : rq) {
StdOut.println(i);
}
StdOut.println(rq.dequeue());
StdOut.println(rq.dequeue());
StdOut.println(rq.dequeue());
StdOut.println(rq.isEmpty());
try {
StdOut.println(rq.dequeue());
} catch (java.util.NoSuchElementException exception) {
StdOut.println(exception.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void whenExecuteMainThenPrintToConsole() {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tSystem.setOut(new PrintStream(out));\n\t\tCalculate.main(null);\n\t\tassertThat(out.toString(), is(\"Hello World\\r\\n\"));\n\t}",
"@Test\n void printUnit() {\n }",
"@Override\n ... | [
"0.70814097",
"0.7042857",
"0.7002319",
"0.6836115",
"0.67651206",
"0.671582",
"0.66755456",
"0.66394275",
"0.663558",
"0.66328734",
"0.66266835",
"0.66201967",
"0.6544643",
"0.64512736",
"0.64485604",
"0.64370877",
"0.64355344",
"0.6427801",
"0.640936",
"0.63971937",
"0.6395... | 0.0 | -1 |
/ Outros No artigo de apoio que o Barreto passou xtimes | private int xtimes(int x){
x = x << 1;
if(x >= 0x100)
x = x ^ 0x14d;
return x;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void avvio_gioco(){\n\n punti = 3;\n //Posizione iniziale della x\n for (short i = 0; i < punti; i++) {\n x[i] = 150 - i*10;\n y[i] = 150;\n }\n posiziona_bersaglio();\n\n //Attivazione del timer\n tim... | [
"0.6372245",
"0.59982836",
"0.5948155",
"0.5907161",
"0.5873089",
"0.5849075",
"0.57386076",
"0.5737515",
"0.57270545",
"0.5713041",
"0.5700407",
"0.5697221",
"0.5680842",
"0.5648469",
"0.5648404",
"0.56384397",
"0.5638221",
"0.5634141",
"0.5619862",
"0.561617",
"0.56030184",... | 0.0 | -1 |
Created by kamil on 10.04.2017. | public interface CartDao {
Cart create(Cart cart);
Cart read(String cartId);
void update ( String cartId, Cart cart);
void delete (String cartId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public final voi... | [
"0.58104634",
"0.5757947",
"0.5610227",
"0.5561754",
"0.5539552",
"0.5539552",
"0.55245733",
"0.55226076",
"0.55107325",
"0.5474928",
"0.5450007",
"0.54481053",
"0.5409128",
"0.53968096",
"0.5394349",
"0.5386148",
"0.537619",
"0.5354411",
"0.5338037",
"0.5325808",
"0.5325798"... | 0.0 | -1 |
Sets the rumble on the driver controller | public void rumbleDriverController(double power, double time) {
rumbleController(driverController, power, time);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void rumbleInYourPants() {\n double accel_z = RobotMap.helmsman.getAcceleromoterZ();\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n Ro... | [
"0.7345032",
"0.7057584",
"0.67195886",
"0.62678176",
"0.6223996",
"0.61994123",
"0.61672264",
"0.61582536",
"0.6003312",
"0.5954568",
"0.59378284",
"0.58981496",
"0.586025",
"0.58447105",
"0.58373666",
"0.58118105",
"0.5807856",
"0.57807267",
"0.57439077",
"0.57236",
"0.5721... | 0.65755475 | 3 |
Sets the rumble on the operator controller | public void rumbleOperatorController(double power, double time) {
// rumbleController(operatorController, power, time);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void rumbleInYourPants() {\n double accel_z = RobotMap.helmsman.getAcceleromoterZ();\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kLeftRumble, (float) Math.abs(accel_z - 1));\n Robot.oi.getXBoxJoystick().setRumble(RumbleType.kRightRumble, (float) Math.abs(accel_z - 1));\n Ro... | [
"0.71457326",
"0.68920326",
"0.6574437",
"0.623442",
"0.6038388",
"0.59864444",
"0.59424263",
"0.59091777",
"0.58098674",
"0.5752929",
"0.56648874",
"0.5612384",
"0.5593613",
"0.5571874",
"0.55526286",
"0.55301553",
"0.5511056",
"0.5482756",
"0.5424539",
"0.54183245",
"0.5396... | 0.72250843 | 0 |
Creates new form MainView | public MainView() {
initComponents();
addWindowListener(new AreYouSure());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainView() {\n initComponents();\n \n }",
"public MainView() {\r\n\t\tinitialize();\r\n\t}",
"@Override\n public void Create() {\n\n initView();\n }",
"public MainView() {\n initComponents();\n }",
"public MainView() {\n initComponents();\n }",
"vo... | [
"0.70271724",
"0.69791716",
"0.69347966",
"0.68721944",
"0.68721944",
"0.6856781",
"0.6580709",
"0.6535334",
"0.6517715",
"0.6472099",
"0.64625853",
"0.63000906",
"0.62850356",
"0.6255951",
"0.6254966",
"0.62370384",
"0.6236967",
"0.6207785",
"0.6196538",
"0.614882",
"0.61374... | 0.6024321 | 26 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jToolBar1 = new javax.swing.JToolBar();
lblMessage = new javax.swing.JLabel();
panelPrincipal = new javax.swing.JPanel();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
miExit = new javax.swing.JMenuItem();
miTools = new javax.swing.JMenu();
miARTTool = new javax.swing.JMenuItem();
miGBSTool = new javax.swing.JMenuItem();
miHelp = new javax.swing.JMenu();
miAbout = new javax.swing.JMenuItem();
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
jToolBar1.setFloatable(false);
jToolBar1.add(lblMessage);
panelPrincipal.setLayout(new java.awt.GridLayout(0, 1));
jMenu1.setText("File");
miExit.setText("Exit");
miExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miExitActionPerformed(evt);
}
});
jMenu1.add(miExit);
jMenuBar1.add(jMenu1);
miTools.setText("Tools");
miARTTool.setText("ART Tool");
miARTTool.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miARTToolActionPerformed(evt);
}
});
miTools.add(miARTTool);
miGBSTool.setText("GBS Tool");
miGBSTool.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miGBSToolActionPerformed(evt);
}
});
miTools.add(miGBSTool);
jMenuBar1.add(miTools);
miHelp.setText("Help");
miAbout.setText("About");
miHelp.add(miAbout);
jMenuBar1.add(miHelp);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 948, Short.MAX_VALUE)
.addComponent(panelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(panelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
);
pack();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Form() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n }",
"public frmRectangulo() {\n initComponents();\n }",
"public form() {\n ... | [
"0.7321233",
"0.72922724",
"0.72922724",
"0.72922724",
"0.7287021",
"0.7250113",
"0.7214902",
"0.7209478",
"0.71973455",
"0.71915394",
"0.71855843",
"0.71602577",
"0.7149222",
"0.70949143",
"0.70813066",
"0.70579875",
"0.6988272",
"0.6978623",
"0.6956488",
"0.6954857",
"0.694... | 0.0 | -1 |
FIXME: use ImmutabmeMap and static initialization | private static void initializeMap() {
addressTypeToSerializerMap = new HashMap<>();
addressTypeToSerializerMap.put(NoAddressAfi.VALUE, NoAddressSerializer.getInstance());
addressTypeToSerializerMap.put(Ipv4Afi.VALUE, Ipv4Serializer.getInstance());
addressTypeToSerializerMap.put(Ipv4BinaryAfi.VALUE, Ipv4BinarySerializer.getInstance());
addressTypeToSerializerMap.put(Ipv4PrefixAfi.VALUE, Ipv4PrefixSerializer.getInstance());
addressTypeToSerializerMap.put(Ipv4PrefixBinaryAfi.VALUE, Ipv4PrefixBinarySerializer.getInstance());
addressTypeToSerializerMap.put(Ipv6Afi.VALUE, Ipv6Serializer.getInstance());
addressTypeToSerializerMap.put(Ipv6BinaryAfi.VALUE, Ipv6BinarySerializer.getInstance());
addressTypeToSerializerMap.put(Ipv6PrefixAfi.VALUE, Ipv6PrefixSerializer.getInstance());
addressTypeToSerializerMap.put(Ipv6PrefixBinaryAfi.VALUE, Ipv6PrefixBinarySerializer.getInstance());
addressTypeToSerializerMap.put(MacAfi.VALUE, MacSerializer.getInstance());
addressTypeToSerializerMap.put(DistinguishedNameAfi.VALUE, DistinguishedNameSerializer.getInstance());
addressTypeToSerializerMap.put(Lcaf.VALUE, LcafSerializer.getInstance());
addressTypeToSerializerMap.put(AfiListLcaf.VALUE, AfiListSerializer.getInstance());
addressTypeToSerializerMap.put(InstanceIdLcaf.VALUE, InstanceIdSerializer.getInstance());
addressTypeToSerializerMap.put(ApplicationDataLcaf.VALUE, ApplicationDataSerializer.getInstance());
addressTypeToSerializerMap.put(ExplicitLocatorPathLcaf.VALUE, ExplicitLocatorPathSerializer.getInstance());
addressTypeToSerializerMap.put(SourceDestKeyLcaf.VALUE, SourceDestKeySerializer.getInstance());
addressTypeToSerializerMap.put(KeyValueAddressLcaf.VALUE, KeyValueAddressSerializer.getInstance());
addressTypeToSerializerMap.put(ServicePathLcaf.VALUE, ServicePathSerializer.getInstance());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }",
"protected WumpusMap() {\n\t\t\n\t}",
"MAP createMAP();",
"protected Map method_1552() {\n return super.method_1552();\n }",
"private <T extends Reference> void buildMap(Map<String, T> map, Li... | [
"0.6384953",
"0.6129069",
"0.57505137",
"0.57403046",
"0.5605601",
"0.55530584",
"0.554987",
"0.55488855",
"0.5544588",
"0.5510913",
"0.550736",
"0.5507062",
"0.55050665",
"0.54946065",
"0.54930556",
"0.5484071",
"0.54837155",
"0.54830766",
"0.5438354",
"0.54229736",
"0.54223... | 0.0 | -1 |
A node where the jar with the basic Takamaka classes have been installed, along with a gamete and a manifest. It is a view of a Tendermint node, hence it uses the chain identifier and the validator set of the underlying Tendermint network. | @ThreadSafe
public interface TendermintInitializedNode extends InitializedNode {
/**
* Yields a decorated node with basic Takamaka classes, gamete and manifest.
* Uses the chain id and the validators
* of the underlying Tendermint network. It uses a generic gas station.
*
* @param parent the node to decorate
* @param consensus the consensus parameters that will be set for the node
* @param takamakaCode the jar containing the basic Takamaka classes
* @return a decorated view of {@code parent}
* @throws TransactionRejectedException if some transaction that installs the jar or creates the accounts is rejected
* @throws TransactionException if some transaction that installs the jar or creates the accounts fails
* @throws CodeExecutionException if some transaction that installs the jar or creates the accounts throws an exception
* @throws IOException if the jar file cannot be accessed
* @throws SignatureException if some initialization request could not be signed
* @throws InvalidKeyException if some key used for signing initialization transactions is invalid
* @throws NoSuchAlgorithmException if the signing algorithm for the node is not available in the Java installation
*/
static TendermintInitializedNode of(TendermintBlockchain parent, ValidatorsConsensusConfig consensus, Path takamakaCode) throws TransactionRejectedException, TransactionException, CodeExecutionException, IOException, InvalidKeyException, SignatureException, NoSuchAlgorithmException {
return new TendermintInitializedNodeImpl(parent, consensus, null, takamakaCode);
}
/**
* Yields a decorated node with basic Takamaka classes, gamete and manifest.
* Uses the chain id and the validators
* of the underlying Tendermint network. It allows one to specify the gas station to use.
*
* @param parent the node to decorate
* @param consensus the consensus parameters that will be set for the node
* @param producerOfGasStation an algorithm that creates the builder of the gas station to be installed in the manifest of the node;
* if this is {@code null}, a generic gas station is created
* @param takamakaCode the jar containing the basic Takamaka classes
* @return a decorated view of {@code parent}
* @throws TransactionRejectedException if some transaction that installs the jar or creates the accounts is rejected
* @throws TransactionException if some transaction that installs the jar or creates the accounts fails
* @throws CodeExecutionException if some transaction that installs the jar or creates the accounts throws an exception
* @throws IOException if the jar file cannot be accessed
* @throws SignatureException if some initialization request could not be signed
* @throws InvalidKeyException if some key used for signing initialization transactions is invalid
* @throws NoSuchAlgorithmException if the signing algorithm for the node is not available in the Java installation
*/
static TendermintInitializedNode of(TendermintBlockchain parent, ValidatorsConsensusConfig consensus,
ProducerOfStorageObject<ConsensusConfig> producerOfGasStation, Path takamakaCode, BigInteger redAmount) throws TransactionRejectedException, TransactionException, CodeExecutionException, IOException, InvalidKeyException, SignatureException, NoSuchAlgorithmException {
return new TendermintInitializedNodeImpl(parent, consensus, producerOfGasStation, takamakaCode);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) throws Throwable {\n NeoConfig.setMagicNumber(new byte[]{0x01, 0x03, 0x00, 0x0}); // Magic number 769\n\n // Set up the connection to the neo-node\n Neow3j neow3j = Neow3j.build(new HttpService(\"http://localhost:40332\"));\n // Setup an account an... | [
"0.58309406",
"0.54727846",
"0.49712262",
"0.49674737",
"0.49152017",
"0.4873573",
"0.48339546",
"0.4786473",
"0.47528595",
"0.47315332",
"0.47315332",
"0.46591112",
"0.46535784",
"0.46210638",
"0.46196803",
"0.45909837",
"0.45550618",
"0.45496625",
"0.451076",
"0.45012572",
... | 0.6453898 | 0 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
tabLayout = view.findViewById(R.id.tabs);
viewPager = view.findViewById(R.id.viewpager);
setViewPager();
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
TODO fix this!!!! (equals) | @Override
public String toString() {
return String.format("FrameData[%d: %d x %d] (%d,%d,%d) %s", frameId, width, height, d3dShareHandle, ioSurfaceHandle, textureName, surfaceData);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}",
"private Equals() {}",
"String getEqual();",
"@Override\n public boolean equals(Object other) {\n return super.equals(other);\n }",
"@Override\n\t\tpublic boolean equals(Object obj) {\n\t\t\treturn super.equals(obj);\n\t\t}",
"@Override... | [
"0.623337",
"0.6190611",
"0.6161924",
"0.60936105",
"0.59586877",
"0.59515184",
"0.58885413",
"0.5865564",
"0.5865564",
"0.5865564",
"0.5855894",
"0.5855894",
"0.5855894",
"0.5855894",
"0.5855894",
"0.5855894",
"0.5847763",
"0.5830493",
"0.58276486",
"0.5806893",
"0.5800287",... | 0.0 | -1 |
Main method. Different tests. | public static void main (String[] param) {
Fraction x = new Fraction (-8, 15);
Fraction y = new Fraction (5, -6);
Fraction z = null;
try {
z = (Fraction)x.clone();
} catch (CloneNotSupportedException e) {};
Fraction t = new Fraction (16, -30);
System.out.println (x + " times " + y + " is " + x.times (y));
System.out.println (x + " plus " + y + " is " + x.plus (y));
System.out.println (x + " minus " + y + " is " + x.minus (y));
System.out.println (x + " divideBy " + y + " is " + x.divideBy (y));
System.out.println (x + " compareTo " + y + " is " + x.compareTo (y));
System.out.println (x.inverse() + " integer part is "
+ x.inverse().integerPart());
System.out.println (x.inverse() + " fraction part is "
+ x.inverse().fractionPart());
System.out.println (x + " is approximately " +
String.valueOf (x.toDouble()));
System.out.println (Math.PI + " is approximately " +
Fraction.toFraction (Math.PI, 7)
+ " or " + Fraction.toFraction (Math.PI, 7).toDouble());
Fraction ff = Fraction.valueOf ("-4/7");
System.out.println (ff);
System.out.println ("hashCode of x: " + x.hashCode());
System.out.println ("hashCode of y: " + y.hashCode());
System.out.println ("hashCode of z: " + z.hashCode());
System.out.println ("hashCode of t: " + t.hashCode());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input ... | [
"0.78428227",
"0.77548516",
"0.77194667",
"0.7612889",
"0.76071525",
"0.75632113",
"0.7515029",
"0.75143206",
"0.7509402",
"0.74614435",
"0.7443439",
"0.7398789",
"0.7373054",
"0.7364984",
"0.73457545",
"0.7329306",
"0.7326196",
"0.7309668",
"0.7270568",
"0.7260601",
"0.72564... | 0.0 | -1 |
Default constructor returns 0/1. | Fraction () {
this (0, 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Counter()\n {\n this(0);\n }",
"DefaultConstructor(int a){}",
"public Int() {\n this(0);\n }",
"protected Int() {}",
"public MyInteger( )\n {\n this( 0 );\n }",
"defaultConstructor(){}",
"public Counter() {\r\n value = 0;\r\n }",
"public AllDiffere... | [
"0.7175936",
"0.7097531",
"0.70881885",
"0.7019328",
"0.7018581",
"0.6837372",
"0.68114716",
"0.6724462",
"0.6685829",
"0.6658548",
"0.6622475",
"0.6613026",
"0.6563088",
"0.651076",
"0.651076",
"0.65094095",
"0.6482177",
"0.64644545",
"0.6454913",
"0.6441951",
"0.6431257",
... | 0.606351 | 69 |
Public method to access the numerator field. | public int getNumerator() {
return numerator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumerator()\r\n {\r\n return numerator;\r\n }",
"public int getNumerator() {\n return numerator;\n }",
"public double getNumeratorValue() {\n return numeratorValue;\n }",
"public int getNumerator() {\r\n\t\treturn numerator;\r\n\t}",
"public int getNumerator()\n\t{\n\t\... | [
"0.80612636",
"0.804322",
"0.7907787",
"0.78717124",
"0.7822332",
"0.7802595",
"0.77772665",
"0.7113335",
"0.695186",
"0.69043577",
"0.68992025",
"0.6747765",
"0.6622151",
"0.66190714",
"0.65388757",
"0.65268964",
"0.6485569",
"0.6370051",
"0.6363475",
"0.6360755",
"0.6352671... | 0.81146187 | 0 |
Public method to access the denominator field. | public int getDenominator() {
return denominator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getDenominator()\r\n {\r\n return denominator;\r\n }",
"public double getValue(){\n return (double) numerator / (double) denominator;\n }",
"public int getDenominator()\n {\n return this.denominator;\n }",
"public int getDenominator() {\n return this.denominator;... | [
"0.8031469",
"0.79633176",
"0.7886073",
"0.77679247",
"0.7619961",
"0.74318326",
"0.73807174",
"0.73569953",
"0.7147148",
"0.7106477",
"0.69307995",
"0.6901467",
"0.6852794",
"0.68507975",
"0.68265724",
"0.6793107",
"0.6774194",
"0.6724536",
"0.67233634",
"0.6720709",
"0.6634... | 0.8141338 | 0 |
Greatest common divisor of two given integers. | private static int gcd (int a, int b) {
int m = Math.max (Math.abs (a), Math.abs (b));
if (m == 0) throw new ArithmeticException (" zero in gcd ");
int n = Math.min (Math.abs (a), Math.abs (b));
while (n > 0) {
a = m % n;
m = n;
n = a;
}
return m;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int greatestCommonDivisor(int inputOne, int inputTwo)\n {\n inputOne = Math.abs(inputOne);\t\t\n inputTwo = Math.abs(inputTwo);\t\t\n \t\t\n int smaller = Math.min(inputOne, inputTwo);\t\t\n int greatestCommonDivisor = 1;\n \t\t\n for (int index = 1; index <= sma... | [
"0.7972691",
"0.7510588",
"0.74857336",
"0.7457217",
"0.7399363",
"0.7362999",
"0.7362735",
"0.73582554",
"0.7356415",
"0.7337904",
"0.73070157",
"0.7303091",
"0.72854584",
"0.72539675",
"0.72451943",
"0.72285134",
"0.72124773",
"0.71995115",
"0.71893007",
"0.71516544",
"0.71... | 0.7654101 | 1 |
Reduce this fraction (and make denominator > 0). | private Fraction reduce() {
Fraction f = null;
try {
f = (Fraction)clone();
} catch (CloneNotSupportedException e) {};
if (denominator == 0)
throw new ArithmeticException (" illegal denominator zero ");
if (denominator < 0) {
f.numerator = -numerator;
f.denominator = -denominator;
}
if (numerator == 0)
f.denominator = 1;
else {
int n = gcd (numerator, denominator);
f.numerator = numerator / n;
f.denominator = denominator / n;
}
return f;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}",
"private void reduce() {\n /** The fraction is equal to 0. The numerator is 0 in this case */\n if(this.numerator == 0)\n this.denominator = 1;\n /** The numerator and d... | [
"0.8232469",
"0.7995409",
"0.7873992",
"0.78169614",
"0.7680819",
"0.73902416",
"0.7307941",
"0.72625273",
"0.72115207",
"0.69528943",
"0.6727647",
"0.6665192",
"0.6577517",
"0.6500464",
"0.64728504",
"0.6464681",
"0.6313467",
"0.63075566",
"0.6304652",
"0.62537414",
"0.61855... | 0.77593803 | 4 |
Hashcode has to be equal for equal fractions. | @Override
public int hashCode() {
return (int) (Double.doubleToLongBits (toDouble())>>31);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override public int hashCode() {\n\t\t// for details on the use of result and prime below, see Effective Java, 2E, page 47-48\n\t\tint result = 7; // arbitrary number\n\t\tint prime = 31; // this ensures order matters\n\t\t\n\t\t// factor in each field used in the equals method\n\t\tresult = prime * result + nume... | [
"0.71533906",
"0.67542064",
"0.66839564",
"0.6586728",
"0.65826654",
"0.6562221",
"0.6534472",
"0.64672023",
"0.6456049",
"0.6443152",
"0.6431716",
"0.6390713",
"0.63473594",
"0.6341219",
"0.63330036",
"0.63153255",
"0.63061434",
"0.629279",
"0.629279",
"0.62863976",
"0.62807... | 0.61466 | 42 |
Inverse of the fraction. n/d becomes d/n. | public Fraction inverse() {
return new Fraction (denominator, numerator).reduce();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction opposite() {\n return new Fraction (-numerator, denominator).reduce();\n }",
"public final void invert() {\n\tdouble s = determinant();\n\tif (s == 0.0)\n\t return;\n\ts = 1/s;\n\t// alias-safe way.\n\tset(\n\t m11*m22 - m12*m21, m02*m21 - m01*m22, m01*m12 - m02*m11,\n\t m12*m20 -... | [
"0.67512584",
"0.6605625",
"0.64188004",
"0.64130354",
"0.6378927",
"0.61871576",
"0.5966856",
"0.59212756",
"0.59161144",
"0.58808887",
"0.577919",
"0.57340306",
"0.5694598",
"0.56857276",
"0.5651094",
"0.56457984",
"0.5621532",
"0.55988795",
"0.55727696",
"0.5552027",
"0.55... | 0.7895754 | 0 |
Opposite of the fraction. n/d becomes n/d. | public Fraction opposite() {
return new Fraction (-numerator, denominator).reduce();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Fraction inverse() {\n return new Fraction (denominator, numerator).reduce();\n }",
"void unsetFractional();",
"private static void reduceFraction() {\n\t\tint temp=gcd(num,den);\n\t\tden=den/temp;\n\t\tnum=num/temp;\n\t}",
"public void subtract(Fraction f)\r\n {\r\n if(this.denominator ... | [
"0.7031492",
"0.6890945",
"0.6846739",
"0.6770786",
"0.6498943",
"0.6289274",
"0.6233391",
"0.62077856",
"0.6159316",
"0.6091861",
"0.5985239",
"0.59421194",
"0.59265435",
"0.59129053",
"0.5910371",
"0.58201",
"0.57793075",
"0.5776477",
"0.57673705",
"0.573997",
"0.57358634",... | 0.7396277 | 0 |
Clone of the fraction. | @Override
public Object clone() throws CloneNotSupportedException {
return new Fraction (getNumerator(), getDenominator());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Data clone() {\n final Data data = new Data(name, code, numeric, symbol, fractionSymbol, fractionsPerUnit, rounding, formatString,\n triangulated.clone());\n return data;\n }",
"@Override\n\tpublic <V extends Volume<Fraction>> V copy() {\n\t\treturn (V) of(getAmount(), g... | [
"0.73458105",
"0.70246094",
"0.66444546",
"0.65944564",
"0.65443754",
"0.6535522",
"0.652088",
"0.64753556",
"0.642075",
"0.6393762",
"0.63843757",
"0.63765776",
"0.6362588",
"0.6342973",
"0.6305858",
"0.6282979",
"0.6263398",
"0.62332356",
"0.6202689",
"0.6185717",
"0.615700... | 0.8399419 | 0 |
Integer part of the (improper) fraction. | public int integerPart() {
Fraction tmp = reduce();
return tmp.getNumerator()/tmp.getDenominator();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String get_fraction_part();",
"public static int findNumerator(String fraction) {\n \tif(fraction.contains(\"_\")) {\t//check if the frac has an _\r\n \t\tint numerator= Integer.parseInt(fraction.substring(fraction.indexOf(\"_\") +1, fraction.indexOf(\"/\")));\t//if so use substring from _ to the /;... | [
"0.6699341",
"0.6492069",
"0.6459511",
"0.6432813",
"0.6381435",
"0.6287398",
"0.6245742",
"0.62435764",
"0.6211786",
"0.61982024",
"0.6178816",
"0.6153206",
"0.6112426",
"0.6047947",
"0.60400856",
"0.6038618",
"0.60210025",
"0.60173887",
"0.5997904",
"0.59404945",
"0.5875568... | 0.7329721 | 0 |
Extract fraction part of the (improper) fraction (a proper fraction without the integer part). | public Fraction fractionPart() {
return new Fraction (numerator - denominator*integerPart(), denominator)
.reduce();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String get_fraction_part();",
"public static String parseExpressionForFirstFraction(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n return frac1;\n }",
"public static int parseFractionForNumerator(String fraction) {... | [
"0.7969688",
"0.6921883",
"0.68760943",
"0.68494093",
"0.6845079",
"0.6824622",
"0.6750856",
"0.66142666",
"0.66121954",
"0.6611573",
"0.65689987",
"0.65234435",
"0.649026",
"0.6278851",
"0.62728274",
"0.62106645",
"0.613052",
"0.6088342",
"0.60628337",
"0.598504",
"0.5979876... | 0.7289497 | 1 |
Approximate value of the fraction. | public double toDouble() {
return ((double)numerator) / ((double)denominator);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String get_fraction_part();",
"public String getFraction() {\n return fraction;\n }",
"public double value() {\n return ((double) this.numerator / this.denominator);\n }",
"public double floatValue() {\n\treturn numerator/(double)denominator;\n }",
"public Fraction getFraction... | [
"0.70220125",
"0.68476075",
"0.6768631",
"0.6768164",
"0.6678871",
"0.6624501",
"0.64481276",
"0.637029",
"0.6345738",
"0.6281887",
"0.6274477",
"0.6189347",
"0.61205107",
"0.6086534",
"0.5993526",
"0.5951215",
"0.595039",
"0.59403104",
"0.59257406",
"0.5901917",
"0.5901917",... | 0.5424779 | 79 |
Double value f presented as a fraction with denominator d > 0. | public static Fraction toFraction (double f, int d) {
if (d > 0)
return new Fraction ((int)(Math.round (f*d)), d);
else
throw new ArithmeticException (" illegal denominator ");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double frac(double d)\n {\n return frac( new BigDecimal(\"\" + d) ).doubleValue();\n }",
"public double floatValue() {\n\treturn numerator/(double)denominator;\n }",
"public Fraction divide(Fraction f){\n return new Fraction(this.numerator * f.denominator, this.denominator ... | [
"0.7174674",
"0.6509469",
"0.63903856",
"0.638533",
"0.63475096",
"0.62357193",
"0.61596185",
"0.610879",
"0.6103089",
"0.607933",
"0.6041774",
"0.59985477",
"0.5913861",
"0.5913195",
"0.5896058",
"0.58573985",
"0.5845707",
"0.5844652",
"0.5814319",
"0.5807584",
"0.5799905",
... | 0.7606457 | 0 |
Conversion from string to the fraction. Accepts strings of form that is defined by the toString method. | public static Fraction valueOf (String s) {
StringTokenizer st = new StringTokenizer (s, "/<>[](),");
int num = 0;
int den = 1;
if (st.hasMoreTokens()) {
num = Integer.parseInt (st.nextToken().trim());
} else {
throw new IllegalArgumentException ("not fraction " + s);
}
if (st.hasMoreTokens()) {
den = Integer.parseInt (st.nextToken());
} else {
// throw new IllegalArgumentException ("not fraction " + s);
den = 1;
}
if (st.hasMoreTokens()) {
throw new IllegalArgumentException ("not fraction " + s);
}
return new Fraction (num, den);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FractionImpl(String fraction) {\n\n //use the trim String method to remove white space before and after the fraction characters\n\n String trimmed = fraction.trim();\n\n //whole number procedure - if no \"/\" is present\n\n if (!trimmed.contains(\"/\")) {\n this.numera... | [
"0.7187001",
"0.7118024",
"0.64169496",
"0.64033073",
"0.6328769",
"0.63016397",
"0.62857866",
"0.610337",
"0.59234256",
"0.5761333",
"0.5734115",
"0.5731001",
"0.57280695",
"0.5720665",
"0.57027555",
"0.5628856",
"0.5622905",
"0.5553084",
"0.5539051",
"0.55150527",
"0.551233... | 0.77018076 | 0 |
/ JADX INFO: super call moved to the top of the method (can break code semantics) | ah(ar arVar, i iVar, int i, i iVar2) {
super(iVar);
this.c = arVar;
this.a = i;
this.b = iVar2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_6349() {\r\n super.method_6349();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"public void method_1449() {\r\n super.method_1449();\r\n }",
"protected void method_3848() {\... | [
"0.7415644",
"0.71204525",
"0.71204525",
"0.71204525",
"0.7115328",
"0.7021445",
"0.7006679",
"0.6958776",
"0.69348174",
"0.6828433",
"0.6789479",
"0.67588496",
"0.6725944",
"0.6725944",
"0.66789997",
"0.6669348",
"0.6636827",
"0.662735",
"0.6619289",
"0.6604606",
"0.66032183... | 0.0 | -1 |
/ access modifiers changed from: protected | public final void a() {
try {
((s) this.c.e.b()).c(this.c.c, ar.c(this.a), ar.c(), (u) new ak(this.c, this.b, (int[]) null));
} catch (RemoteException e) {
ar.a.a((Throwable) e, "notifySessionFailed", new Object[0]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override... | [
"0.7375736",
"0.7042321",
"0.6922649",
"0.6909494",
"0.68470824",
"0.6830288",
"0.68062353",
"0.6583185",
"0.6539446",
"0.65011257",
"0.64917654",
"0.64917654",
"0.64733833",
"0.6438831",
"0.64330196",
"0.64330196",
"0.64295477",
"0.6426414",
"0.6420484",
"0.64083177",
"0.640... | 0.0 | -1 |
this.total_moves = this.rand.nextInt(50) + 100; | public void start_game(String s) {
if (s.equals("New")) {
Long seed = Long.parseLong(this.input_seed);
this.rand = new Random(seed); // not sure if this is correct way to approach this problem?
Createworld cr = new Createworld(seed);
this.tiles = cr.returnTile();
int[] start_location = generate_avatar_location();
ArrayList<int[]> start_food = generate_foods();
this.position = start_location;
}
String cont = "continue";
this.ter.renderFrame(this.tiles);
InputSource inputSource = new KeyboardInputSource();
while (cont.equals("continue") && this.total_moves > 0 && this.number_of_foods > 0) {
while (!StdDraw.hasNextKeyTyped()) {
StdDraw.setPenColor(Color.BLACK);
StdDraw.filledRectangle(this.tiles[0].length / 2 + 30, this.tiles[1].length - 2, 10, 2);
StdDraw.filledRectangle(this.tiles[0].length / 2, this.tiles[1].length - 2, 10, 2);
StdDraw.filledRectangle(this.tiles[0].length / 2 + 47, this.tiles[1].length - 2, 10, 2);
TETile type = getTileat((int) StdDraw.mouseX(), (int) StdDraw.mouseY());
Font textfonttwo = new Font("sans serif", Font.BOLD, 25);
StdDraw.setFont(textfonttwo);
StdDraw.setPenColor(Color.WHITE);
String descriptiontwo = "Description: " + type.description();
String description = "Moves: " + total_moves;
String descriptionthree = "Foods Remaining: " + this.number_of_foods;
StdDraw.text(this.tiles[0].length / 2 + 30, this.tiles[1].length - 2, description);
StdDraw.text(this.tiles[0].length / 2, this.tiles[1].length - 2, descriptiontwo);
StdDraw.text(this.tiles[0].length/2 + 47, this.tiles[1].length -2, descriptionthree);
StdDraw.show();
StdDraw.enableDoubleBuffering();
}
char c = inputSource.getNextKey();
move(c, "keyboard");
if (c == ':' && inputSource.getNextKey() == 'Q') { // Breaks it if we press Q
saveEditor("seed", this.input_seed);
saveEditor("movements", this.directions);
System.out.println(this.directions);
System.exit(0);
break;
}
}
if(this.total_moves == 0){
sorry();
}
else if(this.number_of_foods == 0){
congrats();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int randomMove()\r\n {\r\n r = new Random();\r\n x = r.nextInt(7);\r\n return x;\r\n }",
"public int decideRandomMove() {\n return (int) (Math.random() * 4);\n }",
"private void randomMove() {\n }",
"private int Rand_Move() {\n\t\tRandom r = new Random();\n\t\ti... | [
"0.7430996",
"0.7401619",
"0.7356492",
"0.7278172",
"0.70338523",
"0.69479203",
"0.6930171",
"0.6830604",
"0.6819488",
"0.6817753",
"0.67942226",
"0.6789198",
"0.67654574",
"0.6748714",
"0.672684",
"0.66532654",
"0.6621154",
"0.6605213",
"0.65938354",
"0.657632",
"0.65675175"... | 0.0 | -1 |
Method used for exploring a fresh world. This method should handle all inputs, including inputs from the main menu. | public void interactWithKeyboard() {
initialize_frame();
InputSource inputSource = new KeyboardInputSource();
char c = inputSource.getNextKey();
while(inputSource.possibleNextInput() && c != 'Q') {
if (c == 'N') {
// instructions_page();
draw_frame_seed();
start_game("New");
break;
} else if (c == 'L') {
File seed = new File("seed.txt");
File directions = new File("movements.txt");
String old_seed = loadEditor(seed);
String old_directions = loadEditor(directions);
load_and_move(old_seed, old_directions);
start_game("Load");
} else if (c == 'I') {
instructions_page();
if (inputSource.getNextKey() == 'B') {
interactWithKeyboard();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void enterMain() {\n\t\tIsland island = game.getCurrentLocation();\n\t\tif (game.checkAccessibleIsland(island)) \n\t\t{\n\t\t\tboolean state = false;\n\t\t\twhile (state == false) {\n\t\t\t\tArrayList<Island> islands = game.getAvailableIslands();\n\t\t\t\tSystem.out.println(\"Your current money... | [
"0.6346533",
"0.6109726",
"0.6080916",
"0.59849274",
"0.59499073",
"0.5944411",
"0.5939047",
"0.58886003",
"0.58709544",
"0.58196884",
"0.57995987",
"0.5793531",
"0.5765542",
"0.5751859",
"0.575026",
"0.5698793",
"0.56608117",
"0.56600046",
"0.5622397",
"0.5609231",
"0.558333... | 0.0 | -1 |
Createworld jerod = new Createworld(5L); | public static void main(String[] args) {
Engine ry = new Engine();
ry.interactWithKeyboard();
// ry.interactWithKeyboard();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createWorld(){\n\n }",
"public abstract World create(World world);",
"public MyWorld()\n {\n super(600, 400, 1);\n }",
"public GameWorld(){\r\n\t\t\r\n\t}",
"public World()\n\t{\n\t\tinitWorld();\t\n\t}",
"public MyWorld()\n { \n // Create a new world with 600x400 c... | [
"0.7869585",
"0.75949997",
"0.75927854",
"0.745236",
"0.7386166",
"0.730855",
"0.7275365",
"0.7188638",
"0.7128042",
"0.7091683",
"0.7089519",
"0.70211446",
"0.6983793",
"0.696257",
"0.6953506",
"0.6948751",
"0.6946784",
"0.69301975",
"0.6898479",
"0.68926656",
"0.68880117",
... | 0.0 | -1 |
Method used for autograding and testing your code. The input string will be a series of characters (for example, "n123sswwdasdassadwas", "n123sss:q", "lwww". The engine should behave exactly as if the user typed these characters into the engine using interactWithKeyboard. Recall that strings ending in ":q" should cause the game to quite save. For example, if we do interactWithInputString("n123sss:q"), we expect the game to run the first 7 commands (n123sss) and then quit and save. If we then do interactWithInputString("l"), we should be back in the exact same state. In other words, both of these calls: interactWithInputString("n123sss:q") interactWithInputString("lww") should yield the exact same world state as: interactWithInputString("n123sssww") | public TETile[][] interactWithInputString(String input) {
// passed in as an argument, and return a 2D tile representation of the
// world that would have been drawn if the same inputs had been given
// to interactWithKeyboard().
//
// See proj3.byow.InputDemo for a demo of how you can make a nice clean interface
// that works for many different input types.
//String seedstring = input.substring(1, input.length() - 1);
if (input.substring(0,1).equals("n")) {
String seed = "";
String movements = "";
for (int i = 0; i < input.length(); i++) {
try { // I might be missing a step.
int num = Integer.parseInt(input.substring(i, i + 1));
seed += input.substring(i, i + 1);
} catch (Exception e) {
if ((input.substring(i, i+1).equals(":")) && input.substring(i, i+2).equals(":q")) {
System.out.println("saved");
saveEditor("seed", seed);
saveEditor("movements", movements);
break;
} else if (input.substring(i, i + 1).equals("w") || input.substring(i, i + 1).equals("s") || input.substring(i, i + 1).equals("a")
|| input.substring(i, i + 1).equals("d")) {
movements += input.substring(i, i + 1);
}
}
}
load_and_move(seed,movements);
ter.renderFrame(this.tiles);
return this.tiles;
}
else if(input.substring(0, 1).equals("l")) {
File seed_file = new File("seed.txt");
File movements_file = new File("movements.txt");
String seed = loadEditor(seed_file);
String movements = loadEditor(movements_file);
this.rand = new Random(Long.parseLong(seed));
for (int i = 0; i < input.length(); i++) {
if ((input.substring(i, i+1).equals(":")) && input.substring(i, i+2).equals(":q")) {
System.out.println("saved");
saveEditor( "seed", seed);
saveEditor("movements", movements);
break;
} else if (input.substring(i, i + 1).equals("w") || input.substring(i, i + 1).equals("s") || input.substring(i, i + 1).equals("a")
|| input.substring(i, i + 1).equals("d")) {
movements += input.substring(i, i + 1);
}
}
load_and_move(seed,movements);
ter.renderFrame(this.tiles);
return this.tiles;
}
else{
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TETile[][] interactWithInputString(String input) {\n // TODO: Fill out this method so that it run the engine using the input\n // passed in as an argument, and return a 2D tile representation of the\n // world that would have been drawn if the same inputs had been given\n // to i... | [
"0.69860935",
"0.64902765",
"0.63886017",
"0.62874806",
"0.6195457",
"0.61412424",
"0.5942875",
"0.58047104",
"0.5802443",
"0.5798058",
"0.5770262",
"0.57409865",
"0.5727583",
"0.57042277",
"0.5694956",
"0.5657937",
"0.56021386",
"0.558782",
"0.5580072",
"0.5566572",
"0.55583... | 0.6644915 | 1 |
Creates a hallway from a hallway | private Hallway hallWayCreatorFromHallway(Hallway hallway) {
int width;
int height;
if (hallway.orientation.equals("up") || hallway.orientation.equals("down")) {
width = 3;
height = hallway.length;
} else {
width = hallway.length;
height = 3;
}
int randside = r.nextInt(hallway.sides.size());
String direction = hallway.sides.remove(randside);
Hallway modifiedhallway = hallway;
String before = hallway.previousobject;
return hallWayCreator(modifiedhallway.bottomleft, width, height, direction, before, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void createHallway(int len) {\n createRoom(len, 0, 0);\n }",
"public Highway createHighway(RoadMap r) {\n\t\tHighway newHighway;\n\t\ttry {\n\t\t\tnewHighway = new Highway(roadID, length, maxVel, verifyJunction(r,\n\t\t\t\t\tini), verifyJunction(r, end), lanes);\n\n\t\t} catch (IllegalArgumentEx... | [
"0.7005917",
"0.6838355",
"0.65769523",
"0.62302876",
"0.590426",
"0.5759096",
"0.55600625",
"0.55589175",
"0.5315545",
"0.5305329",
"0.5279135",
"0.5218562",
"0.5217106",
"0.5197105",
"0.51597166",
"0.5135517",
"0.51275235",
"0.510077",
"0.5094231",
"0.5093247",
"0.5087535",... | 0.81571174 | 0 |
Creates a box from a hallway | private Room boxCreatorFromHallway(Hallway hallway) {
int[] previous = hallway.bottomleft;
int length = hallway.length;
String pdirection = hallway.orientation;
int width = r.nextInt(5) + 5;
int height = r.nextInt(6) + 5;
if (pdirection.equals("up")) {
int[] coordinates = new int[2];
coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1;
coordinates[1] = previous[1] + length;
ArrayList<String> sidesavailable = arrayMaker(pdirection);
String numberofrooms = "Room " + (this.numberofRooms + 1);
String received = "S";
Room room = new Room(1, width, height, coordinates,
false, sidesavailable, numberofrooms, received);
if (overlapRooms(room)) {
return null;
} else {
this.numberofRooms += 1;
boxCreator(coordinates, width, height);
tiles[previous[0] + 1][previous[1] + length] = Tileset.FLOWER;
this.rooms.put(this.numberofRooms, room);
return room;
}
} else if (pdirection.equals("down")) {
int[] coordinates = new int[2];
coordinates[0] = r.nextInt(width - 2) + previous[0] + 2 - width + 1;
coordinates[1] = previous[1] - height;
ArrayList<String> sidesavailable = arrayMaker(pdirection);
String numberofrooms = "Room " + (this.numberofRooms + 1);
String received = "N";
Room room = new Room(1, width, height, coordinates,
false, sidesavailable, numberofrooms, received);
if (overlapRooms(room)) {
return null;
} else {
this.numberofRooms += 1;
boxCreator(coordinates, width, height);
tiles[previous[0] + 1][previous[1]] = Tileset.FLOWER;
this.rooms.put(this.numberofRooms, room);
return room;
}
} else if (pdirection.equals("right")) {
int[] coordinates = new int[2];
coordinates[0] = previous[0] + length;
coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1;
ArrayList<String> sidesavailable = arrayMaker(pdirection);
String numberofrooms = "Room" + (this.numberofRooms + 1);
String received = "W";
Room room = new Room(1, width, height, coordinates,
false, sidesavailable, numberofrooms, received);
if (overlapRooms(room)) {
return null;
} else {
this.numberofRooms += 1;
boxCreator(coordinates, width, height);
tiles[previous[0] + length][previous[1] + 1] = Tileset.FLOWER;
this.rooms.put(numberofRooms, room);
return room;
}
} else {
int[] coordinates = new int[2];
coordinates[0] = previous[0] - width;
coordinates[1] = r.nextInt(height - 2) + previous[1] + 2 - height + 1;
ArrayList<String> sidesavailable = arrayMaker(pdirection);
String numberofrooms = "Room" + (this.numberofRooms + 1);
String received = "E";
Room room = new Room(1, width, height, coordinates,
false, sidesavailable, numberofrooms, received);
if (overlapRooms(room)) {
return null;
} else {
this.numberofRooms += 1;
boxCreator(coordinates, width, height);
tiles[previous[0]][previous[1] + 1] = Tileset.FLOWER;
this.rooms.put(this.numberofRooms, room);
return room;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Hallway hallWayCreatorFromHallway(Hallway hallway) {\n int width;\n int height;\n if (hallway.orientation.equals(\"up\") || hallway.orientation.equals(\"down\")) {\n width = 3;\n height = hallway.length;\n } else {\n w... | [
"0.6779806",
"0.62064976",
"0.6188543",
"0.6184353",
"0.61143166",
"0.6092298",
"0.592592",
"0.59211946",
"0.5910279",
"0.5898296",
"0.5881146",
"0.5865206",
"0.58561313",
"0.58105624",
"0.5808023",
"0.5802515",
"0.576342",
"0.56849974",
"0.5669289",
"0.5669191",
"0.5661955",... | 0.73750883 | 0 |
Calculates parameters I have to go through this with you. Draws t | private void boxCreator(int[] pos, int width, int height) {
for (int x = pos[0]; x < pos[0] + width; x++) {
tiles[x][pos[1]] = Tileset.WALL;
}
for (int y = pos[1]; y < pos[1] + height; y++) {
tiles[pos[0]][y] = Tileset.WALL;
}
for (int x = pos[0]; x < pos[0] + width; x++) {
tiles[x][pos[1] + height] = Tileset.WALL;
}
for (int y = pos[1]; y < pos[1] + height + 1; y++) {
tiles[pos[0] + width][y] = Tileset.WALL;
}
for (int y = pos[1] + 1; y < pos[1] + height; y++) {
for (int x = pos[0] + 1; x < pos[0] + width; x++) {
tiles[x][y] = Tileset.FLOWER;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void Draw(Graphics g)\n/* */ {\n/* 55 */ g.setColor(this.m_color);\n/* */ \n/* 57 */ Point prevPt = new Point(0, 0);Point currPt = new Point(0, 0);\n/* */ \n/* 59 */ for (double t = 0.0D; t < 1.01D; t += this.m_tValue) {\n/* 60 */ ptFromTVal(t, currPt);\n/* */ \... | [
"0.6325193",
"0.6201643",
"0.61736006",
"0.59959507",
"0.59591633",
"0.5923497",
"0.5859717",
"0.5739099",
"0.5685094",
"0.5631558",
"0.5607186",
"0.5602195",
"0.5574461",
"0.55492955",
"0.55199695",
"0.5504529",
"0.54865783",
"0.5477765",
"0.5473759",
"0.54722995",
"0.545866... | 0.0 | -1 |
RESTful Services for Confirmation Of Funds | @Path("/{version}/confirmation-of-funds")
@Api(value = "/{version}/accounts}", tags = { "Confirmation"}, consumes = "application/json", produces = "application/json")
public interface Confirmation {
/**
* For /v1/confirmation-of-funds requests
*
* @param version Version
* @param processId ID of the transaction as determined by the initiating party (UUID)
* @param requestId ID of the request (UUID)
* @param signature A signature of the request by the TPP on application level
* @param certificate The certificate used for signing the request
* @param date Standard https header element for Date and Time
* @param confirmationOfFundsRequest Body data
* @return Response
*/
@POST
@Path("/{provider-id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Confirmation of Funds (page 84) - creates a confirmation of funds request at the ASPSP")
@ApiResponses(
{@ApiResponse(code = 201, message = "OK, funds request was correctly performe", response = ConfirmationOfFundsResponse.class),
@ApiResponse(code = 400, message = "(Bad Request) Validation error occured"),
@ApiResponse(code = 401, message = "(Unauthorized) Access Token is not valid"),
@ApiResponse(code = 406, message = "(Not Acceptable) ? - not documented but necessary hier") })
public Response confirmationOfFunds(
@ApiParam(value = "Version") @PathParam("version") String version,
@ApiParam(value = "Provider Identification") @PathParam("provider-id") String providerId,
@ApiParam(value = "ID of the transaction as determined by the initiating party (UUID)", required = true)
@HeaderParam("Process-ID") String processId,
@ApiParam(value = "ID of the request (UUID)", required = true)
@HeaderParam("Request-ID") String requestId,
@ApiParam(value = "A signature of the request by the TPP on application level", required = false)
@HeaderParam("signature") String signature,
@ApiParam(value = "The certificate used for signing the request", required = false)
@HeaderParam("certificate") String certificate,
@ApiParam(value = "Standard https header element for Date and Time", required = true)
@HeaderParam("Date") String date,
@ApiParam(value = "Request body", required = true)
ConfirmationOfFundsRequest confirmationOfFundsRequest);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void confirmFlight();",
"@POST\n @Path(\"account/transactions/withdraw\")\n @Consumes(MediaType.APPLICATION_JSON)\n public void accountWithdrawal(String withdrawal){\n \n System.out.println(withdrawal);\n \n }",
"@GetMapping(\"/DepAcctBalRq/{rqUID}/{accountId}/{acctType}... | [
"0.58889073",
"0.58200026",
"0.5718805",
"0.5656392",
"0.56495875",
"0.5575771",
"0.556569",
"0.54044765",
"0.5399289",
"0.53738594",
"0.53472173",
"0.5343187",
"0.5336389",
"0.5332548",
"0.5325812",
"0.5304574",
"0.529859",
"0.5294342",
"0.5290049",
"0.5271506",
"0.5263942",... | 0.7541402 | 0 |
TODO: You will need to implement this | public double getObjectiveValue() {
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tprotected void interr() {... | [
"0.6330329",
"0.6089758",
"0.6085501",
"0.60460454",
"0.6043946",
"0.59456474",
"0.5896401",
"0.5874166",
"0.5849803",
"0.5844042",
"0.58428913",
"0.5792502",
"0.5768322",
"0.5743992",
"0.57193476",
"0.57193476",
"0.5675856",
"0.5675856",
"0.5675856",
"0.5675856",
"0.5675856"... | 0.0 | -1 |
TODO: You will need to implement this | public Vector<String> getCoursesForStudentSemester(String student,
String semester) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tprotected void interr() {... | [
"0.6330329",
"0.6089758",
"0.6085501",
"0.60460454",
"0.6043946",
"0.59456474",
"0.5896401",
"0.5874166",
"0.5849803",
"0.5844042",
"0.58428913",
"0.5792502",
"0.5768322",
"0.5743992",
"0.57193476",
"0.57193476",
"0.5675856",
"0.5675856",
"0.5675856",
"0.5675856",
"0.5675856"... | 0.0 | -1 |
TODO: You will need to implement this | public Vector<String> getStudentsForCourseSemester(String course,
String semester) {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tprotected void interr() {... | [
"0.6330329",
"0.6089758",
"0.6085501",
"0.60460454",
"0.6043946",
"0.59456474",
"0.5896401",
"0.5874166",
"0.5849803",
"0.5844042",
"0.58428913",
"0.5792502",
"0.5768322",
"0.5743992",
"0.57193476",
"0.57193476",
"0.5675856",
"0.5675856",
"0.5675856",
"0.5675856",
"0.5675856"... | 0.0 | -1 |
Inflate the layout for this fragment | public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
v = inflater.inflate(R.layout.intro_fragment, container, false);
setOnClickListeners();
return v;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }",
"@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup... | [
"0.6739604",
"0.67235583",
"0.6721706",
"0.6698254",
"0.6691869",
"0.6687986",
"0.66869223",
"0.6684548",
"0.66766286",
"0.6674615",
"0.66654444",
"0.66654384",
"0.6664403",
"0.66596216",
"0.6653321",
"0.6647136",
"0.66423255",
"0.66388357",
"0.6637491",
"0.6634193",
"0.66251... | 0.0 | -1 |
int n = mRisqueArrayList.size(); | @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
System.out.println("JE SUIS VRAIMENT A L'ECOLE JUSQU'A PRESENT, MOI MEME JE NE COMPRENDS PAS");
//for (Risque r: mRisqueArrayList)
//{
if (position == 0)
{
Toast.makeText(SignalActivity.this, mRisqueArrayList.get(position).getCaracterisation(), Toast.LENGTH_SHORT).show();
}
//}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int size(){\n return list.size();\n }",
"public int size(){return n;}",
"public int size(){\n\n \treturn list.size();\n\n }",
"public int size(){ return itemCount;}",
"int size(){\n\treturn m.size();\n }",
"public int size(){\n\t\treturn list.size();\n\t}",
"public int size(){\n\t\t... | [
"0.7519877",
"0.7425561",
"0.73700637",
"0.7363626",
"0.73227376",
"0.7241846",
"0.7241846",
"0.72402614",
"0.72402614",
"0.7213129",
"0.721214",
"0.7164455",
"0.7163192",
"0.71622944",
"0.7135995",
"0.7123263",
"0.7122778",
"0.71187747",
"0.7117642",
"0.7102524",
"0.7098855"... | 0.0 | -1 |
System.out.println("Starting Grid Scanning "); long startTime = System.currentTimeMillis(); | public void computeWords(){
loadDictionary();
CharacterGrid characterGrid = readCharacterGrid();
Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);
System.out.println(wordSet.size());
for (String word : wordSet) {
System.out.println(word);
}
// System.out.println("Finish scanning character grid in " + (System.currentTimeMillis() - startTime) + " ms");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void startTime() {\n\t\tSystem.out.println(\"인터페이스 ISports2메소드 --> startTime()\");\r\n\t\t\r\n\t}",
"public void startBatch() {\n\trunTimer.setVerbose(detailedMetrics);\n\trunTimer.start();\n }",
"public static void main(String[] args) {\n\n long preTime = System.currentTimeMill... | [
"0.6368904",
"0.62149614",
"0.6201887",
"0.61808914",
"0.6066521",
"0.6011023",
"0.60101676",
"0.5976125",
"0.5967421",
"0.5952613",
"0.5930682",
"0.590525",
"0.5813773",
"0.5777888",
"0.5775722",
"0.5746911",
"0.57448745",
"0.5743408",
"0.57343686",
"0.57318217",
"0.5682757"... | 0.0 | -1 |
System.out.println("Starting to read Grid "); | private CharacterGrid readCharacterGrid() { System.out.println("Starting to read Grid ");
//
long startTime = System.currentTimeMillis();
try {
BufferedReader br = new BufferedReader(new InputStreamReader(gridStream));
int numberOfRows;
int numberOfColumns;
char[][] rowCharArray;
String firstLineOfGridFile = br.readLine();
String[] rowAndColumn = firstLineOfGridFile.split(" ");
numberOfRows = Integer.parseInt(rowAndColumn[0]);
numberOfColumns = Integer.parseInt(rowAndColumn[1]);
String gridLine;
int currentRowNumber = 0;
rowCharArray = new char[numberOfRows][numberOfColumns];
while ((gridLine = br.readLine()) != null) {
String[] row = gridLine.split(" ");
if (row.length != numberOfColumns) {
throw new RuntimeException("Invalid grid file at line number " + currentRowNumber + 1);
}
char[] colCharArray = new char[numberOfColumns];
for (int i = 0; i < row.length; i++) {
colCharArray[i] = Character.toLowerCase(row[i].charAt(0));
}
rowCharArray[currentRowNumber] = colCharArray;
currentRowNumber++;
}
if (currentRowNumber != numberOfRows) {
throw new RuntimeException("Invalid grid file wrong number of rows found " + currentRowNumber);
}
br.close();
CharacterGrid characterGrid = new CharacterGrid(numberOfRows, numberOfColumns, rowCharArray);
// System.out.println("Finish reading character grid in " + (System.currentTimeMillis() - startTime) + " ms");
return characterGrid;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void displayGrid() {\r\n System.out.print(this.grid);\r\n }",
"public void printGrid(){\n System.out.println(\"printing the grid\");\n for(int i=0;i<row_size;i++){\n for(int j = 0;j<col_size;j++){\n System.out.println(grid[i][j]);\n }\n }\n... | [
"0.7058749",
"0.70352775",
"0.6630574",
"0.6625752",
"0.6601088",
"0.6524156",
"0.6492608",
"0.64924276",
"0.6490375",
"0.64841276",
"0.6455337",
"0.63534105",
"0.6343511",
"0.6329076",
"0.6187709",
"0.6177402",
"0.61593264",
"0.61561996",
"0.6132294",
"0.61298704",
"0.610456... | 0.5522188 | 84 |
TODO Autogenerated method stub | @Override
public boolean onLongClick(View v) {
if (mSpinner.getSelectedItemPosition() >= str1.length) {
mIsDelete = true;
Builder builder = new Builder(MainActivity.this);
builder.setMessage("确认删除此项吗?");
builder.setTitle("提示");
builder.setPositiveButton("确定",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
String[] strArray = { mSpinner
.getSelectedItem().toString() };
mWebDao.delete(strArray);
list.remove(mSpinner
.getSelectedItemPosition());
adapter.notifyDataSetChanged();
dialog.dismiss();
}
});
builder.setNegativeButton("取消",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
dialog.dismiss();
}
});
builder.create().show();
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(DialogInterface dialog,
int which) {
String[] strArray = { mSpinner
.getSelectedItem().toString() };
mWebDao.delete(strArray);
list.remove(mSpinner
.getSelectedItemPosition());
adapter.notifyDataSetChanged();
dialog.dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(DialogInterface dialog,
int which) {
dialog.dismiss();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onItemSelected(AdapterView<?> parent, View view,
int position, long id) {
if (mSpinner.getSelectedItemPosition() >= str1.length) {
mDesTextView.setVisibility(View.VISIBLE);
// Toast toast = Toast.makeText(MainActivity.this, "长按此项可删除",
// 2000);
// toast.setGravity(Gravity.TOP, 0, 150);
// toast.show();
}else {
mDesTextView.setVisibility(View.GONE);
}
if (!mIsBack) {
url = map.get(mSpinner.getSelectedItem());
if (url != null)
mWebView.loadUrl(url);
else {
}
if (mIsDelete) {
listSpinnerPosition.remove(listSpinnerPosition.size() - 1);
listSpinnerText.remove(listSpinnerText.size() - 1);
}
listSpinnerText.add(mSpinner.getSelectedItem().toString());
listSpinnerPosition.add(mSpinner.getSelectedItemPosition());
autoScrollTextView.setText(mSpinner.getSelectedItem()
.toString());
autoScrollTextView.init(getWindowManager());
autoScrollTextView.startScroll();
}
mIsBack = false;
mIsDelete = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onNothingSelected(AdapterView<?> parent) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case Menu.FIRST + 1:
Intent intent=new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "分享1");
intent.putExtra(Intent.EXTRA_TEXT, map.get(mSpinner.getSelectedItem()));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(Intent.createChooser(intent, getTitle()));
break;
case Menu.FIRST + 2:
Intent intent1 = new Intent();
intent1.setAction(intent1.ACTION_MAIN);
intent1.addCategory(intent1.CATEGORY_HOME);
startActivity(intent1);
default:
break;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
fill each nonkalah pit with stones according to game settings, for ex 6 pits 6 stones | @Override
public List<Pit> generatePitsFilledWithStones() {
List<Pit> pitList = Collections.synchronizedList(new ArrayList<Pit>());
int iCurrentIndex = 1;
int iTotalNumberOfPits = GameSettings.NUMBER_OF_PITS_PER_PLAYER * 2 + 2;
for (int i = 0; i < iTotalNumberOfPits; i++) {
Pit pit = new Pit(iCurrentIndex++);
if (!pit.isKalah()) {
for (int j = 0; j < GameSettings.NUMBER_OF_STONES_PER_PIT; j++) {
pit.addStone(new Stone());
}
}
pitList.add(pit);
}
return pitList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setShips(){\n\t\t\n\t\tint x,y;\n\t\tboolean orientacja;\n\t\tRandom generator = new Random();\n\t\t\n\t\tint ilosc = 1;\n\t\tint j = 0;\n\t\tfor(int i = 4; i > 0 ; i--){\n\t\t\twhile( j < ilosc ){\n\t\t\t\tx = generator.nextInt( 13 );\t\t\n\t\t\t\ty = generator.nextInt( 13 );\n\t\t\t\torientacja = ge... | [
"0.65272903",
"0.64055675",
"0.6401629",
"0.62819546",
"0.6275942",
"0.6213447",
"0.61736995",
"0.61736447",
"0.61689085",
"0.6122171",
"0.60934436",
"0.608592",
"0.6083554",
"0.60423434",
"0.6006078",
"0.597773",
"0.5975604",
"0.5973274",
"0.5953089",
"0.59519935",
"0.592026... | 0.7139973 | 0 |
private ImageLoader imageLoader; private DisplayImageOptions options; | public Comm2Adapter(List<String> titleList, List<String> urlList,
Context context) {
this.mContext = context;
this.titleList = titleList;
this.urlList = urlList;
inflater = LayoutInflater.from(mContext);
// imageLoader = ImageLoader.getInstance();
// options = new DisplayImageOptions.Builder().cacheInMemory(true)
// .cacheOnDisk(true)
// .showImageOnLoading(R.drawable.default_title)
// .showImageForEmptyUri(R.drawable.default_title)
// .showImageOnFail(R.drawable.default_title).build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ImageLoader {\n\n}",
"private ImageLoader() {}",
"public void setImageLoader(ImageLoader imageLoader) {\n/* 248 */ this.loader = imageLoader;\n/* */ }",
"public void initDisplayImageOptions() {\n this.mDisplayImageOptionBuilder = new DisplayImageOptions.Builder().cacheThumbn... | [
"0.7439895",
"0.73712957",
"0.7369206",
"0.69744277",
"0.67214054",
"0.6679005",
"0.65941",
"0.6562793",
"0.65439594",
"0.64978105",
"0.6492631",
"0.6473579",
"0.64666086",
"0.6437931",
"0.6430263",
"0.6393797",
"0.6370676",
"0.63163954",
"0.62834036",
"0.62765473",
"0.627421... | 0.0 | -1 |
Initiates the LightObject using the given Color | public Light(Color color, boolean castsShadows){
this.color = color;
this.castsShadows = castsShadows;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Light(Color color){\n this.color = color;\n this.castsShadows = false;\n }",
"public LightBulb(RGBColor color){\r\n _color = new RGBColor(color);\r\n }",
"public Light(Vector3f position, Vector3f color) {\n\t\tthis.position = position;\n\t\tthis.color = color;\n\t}",
"public ... | [
"0.76987547",
"0.7645402",
"0.72223514",
"0.6919948",
"0.67847073",
"0.66321224",
"0.6619878",
"0.6530159",
"0.63736004",
"0.6363866",
"0.6288672",
"0.6284043",
"0.6282106",
"0.6261202",
"0.6256188",
"0.62405753",
"0.6236928",
"0.6201221",
"0.6200058",
"0.6180991",
"0.6150024... | 0.6769268 | 5 |
Initiates the LightObject using the given Color | public Light(Color color){
this.color = color;
this.castsShadows = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LightBulb(RGBColor color){\r\n _color = new RGBColor(color);\r\n }",
"public Light(Vector3f position, Vector3f color) {\n\t\tthis.position = position;\n\t\tthis.color = color;\n\t}",
"public Light(Vector3f position, Vector3f colour) {\r\n\t\tthis.position = position;\r\n\t\tthis.colour = colour... | [
"0.7645402",
"0.72223514",
"0.6919948",
"0.67847073",
"0.6769268",
"0.66321224",
"0.6619878",
"0.6530159",
"0.63736004",
"0.6363866",
"0.6288672",
"0.6284043",
"0.6282106",
"0.6261202",
"0.6256188",
"0.62405753",
"0.6236928",
"0.6201221",
"0.6200058",
"0.6180991",
"0.61500245... | 0.76987547 | 0 |
Determines whether the given Point is illuminated by this light. | public abstract boolean illuminates(Point3 point); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean illuminates(Point3 point, World world);",
"public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }",
"public boolean pointWhithin(Point point) {\n\t\... | [
"0.7300288",
"0.60677844",
"0.606061",
"0.55559856",
"0.554468",
"0.5523969",
"0.54161733",
"0.54125184",
"0.54082364",
"0.53948236",
"0.5394392",
"0.5376372",
"0.537107",
"0.53324205",
"0.532726",
"0.5326398",
"0.53236854",
"0.5318646",
"0.5288224",
"0.52745634",
"0.5271162"... | 0.77294403 | 0 |
Determines whether the given Point is illuminated by this light. (including calculation of shadows) | public abstract boolean illuminates(Point3 point, World world); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean illuminates(Point3 point);",
"public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }",
"public boolean pointWhithin(Point point) {\n\t\treturn false... | [
"0.78371406",
"0.6196673",
"0.61297244",
"0.5929271",
"0.5793462",
"0.57385975",
"0.5655518",
"0.55526423",
"0.554884",
"0.55403376",
"0.55200565",
"0.54926205",
"0.54783946",
"0.54702765",
"0.545663",
"0.54449654",
"0.5421809",
"0.5419131",
"0.5410585",
"0.54091024",
"0.5408... | 0.7475738 | 1 |
Returns a Vector, representing the Direction from the given Point to the source of light. | public abstract Vector3 directionFrom(Point3 point); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vector getDirection(){\n\t\treturn new Vector(_direction);\n\t}",
"@Override\n public Vector getL(Point3D point) {\n // the L vector is same as the point light L vector\n return super.getL(point);\n }",
"public float getDirection();",
"default Vector3 getDirection() {\r\n re... | [
"0.6367671",
"0.5922243",
"0.5903874",
"0.58529735",
"0.58434033",
"0.58333975",
"0.5816163",
"0.57988125",
"0.57678866",
"0.57355356",
"0.57325846",
"0.5704712",
"0.56440866",
"0.5639096",
"0.56195676",
"0.5598586",
"0.5544156",
"0.55363876",
"0.5536146",
"0.55251706",
"0.55... | 0.69833684 | 0 |
String dname, String nickName, Integer level, String symptom, String cure | @Override
public List<Disease> findDiseaseByInfo(Disease diseaseInfo) {
List<Disease> list = diseaseRepository.findByInfo(diseaseInfo.getDname(),diseaseInfo.getNickName(),
diseaseInfo.getLevel(),diseaseInfo.getSymptom(),diseaseInfo.getCure());
return list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = n... | [
"0.5339481",
"0.53244174",
"0.53119534",
"0.5196121",
"0.5179437",
"0.51331574",
"0.5124915",
"0.5109708",
"0.5083",
"0.50501335",
"0.5034404",
"0.50327",
"0.5019594",
"0.5016253",
"0.5010465",
"0.50087285",
"0.50011283",
"0.50011283",
"0.50011283",
"0.4998636",
"0.49901456",... | 0.0 | -1 |
Convert an innerJunction of outerJunctions given as an array of terms into a Set of XJunctions. | private Set<XJunction> convertInnerJunctionOfOuterJunctionsToSet(final Term[] inputInnerJunction) {
final Set<XJunction> result = new HashSet<>();
for (final Term inputInnerJunct : inputInnerJunction) {
final Term[] inputOuterJunction = getOuterJuncts(inputInnerJunct);
try {
result.add(new XJunction(inputOuterJunction));
} catch (final AtomAndNegationException e) {
// do nothing, we omit this outerJunction because it is
// equivalent to the neutral element of the inner connective
// (true for ∧, false for ∨)
}
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<String> findAllChildrenAndParent( Collection<OntologyTerm> ontologyTerms ) {\n if ( this.ontologies.isEmpty() ) {\n resetOntologies();\n }\n Set<String> phenotypesFoundAndChildren = new HashSet<String>();\n\n for ( OntologyTerm ontologyTerm : ontologyTerms ) {\n ... | [
"0.48401353",
"0.47285298",
"0.46359354",
"0.45793688",
"0.45697838",
"0.455683",
"0.449281",
"0.4467505",
"0.44540146",
"0.44311765",
"0.44177786",
"0.44079015",
"0.43974894",
"0.4364984",
"0.43533078",
"0.43347725",
"0.43168247",
"0.4305188",
"0.42970517",
"0.42940322",
"0.... | 0.78178847 | 0 |
Remove from innerJunctionOfOuterJunctions all XJunctions that are singletons and move their elements to innerJunction. | private boolean moveSingletonsOutwards(final XJunction innerJunction,
final Set<XJunction> innerJunctionOfOuterJunctions) throws AtomAndNegationException {
boolean someSingletonContained = false;
final Iterator<XJunction> it = innerJunctionOfOuterJunctions.iterator();
while (it.hasNext()) {
final XJunction outerJunction = it.next();
if (outerJunction.size() == 1) {
final Entry<Term, Polarity> singleton = outerJunction.entrySet().iterator().next();
innerJunction.add(singleton.getKey(), singleton.getValue());
someSingletonContained = true;
it.remove();
}
}
return someSingletonContained;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Set<XJunction> convertInnerJunctionOfOuterJunctionsToSet(final Term[] inputInnerJunction) {\r\n\t\t\tfinal Set<XJunction> result = new HashSet<>();\r\n\t\t\tfor (final Term inputInnerJunct : inputInnerJunction) {\r\n\t\t\t\tfinal Term[] inputOuterJunction = getOuterJuncts(inputInnerJunct);\r\n\t\t\t\ttry {... | [
"0.7027492",
"0.49945712",
"0.49783248",
"0.4955152",
"0.48425013",
"0.48009104",
"0.47946298",
"0.4751611",
"0.4686053",
"0.4655701",
"0.46120724",
"0.46015903",
"0.4576601",
"0.45584312",
"0.45101428",
"0.45094123",
"0.44911107",
"0.44656524",
"0.44546583",
"0.44403064",
"0... | 0.7536334 | 0 |
Create all the components | private void initialize(){
imgurURL = new JTextField("", 20);
JLabel label = new JLabel("Imgur URL");
download = new JButton("Download");
savePath = new JButton("Set Download Path");
//Done creating components
//Set component attributes
setLayout(new FlowLayout());
setSize(575, 65);
setResizable(false);
add(label);
add(imgurURL);
add(download);
add(savePath);
//Done setting component attributes
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JFrame.setDefaultLookAndFeelDecorated(true);
setVisible(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }",
"private void createUIComponents() {\n }",
"private void createComponents() {\n\t\tbuttons = new Button[9];\r\n\t\tfor (int i = 0; i < 9... | [
"0.83671254",
"0.7790667",
"0.7782525",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
"0.77672344",
... | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
ImgurDownloadWindow w = new ImgurDownloadWindow();
w.buttonListeners();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Remove um insumo da encomenda | public void removerEncomendaInsumo(int insumoId){
Encomenda_insumoController encomenda_insumoController = new Encomenda_insumoController();
System.out.println(insumoId);
encomenda_insumoController.setup();
String resposta = encomenda_insumoController.delete(insumoId);
encomendaController = new EncomendaController();
encomendaController.setup();
if(!resposta.equals("ok")) {
exibirMsgErro(resposta);
return;
}
getAllEncomendas();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeGuest(Invitato in){\n AssegnamentiTavolo.remove(in);\n num_posti++;\n openAssignment();\n }",
"@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}",
"public void removeEmpleado(){\n //pregunt... | [
"0.6754007",
"0.6695396",
"0.66104126",
"0.6590461",
"0.6588394",
"0.6576323",
"0.65618205",
"0.65248847",
"0.65216255",
"0.65162015",
"0.65114963",
"0.6506896",
"0.6505557",
"0.65055484",
"0.6490193",
"0.6471168",
"0.64540654",
"0.6416346",
"0.6388495",
"0.6370613",
"0.63073... | 0.77864975 | 0 |
Lista todos os encomendas com nome e telefone semelhantes aos digitados | public void getEncomenda(String nome, String telefone) {
encomendas = encomendaController.read(nome.toUpperCase().trim(), telefone.trim());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Telefono> getTelefonos(String dni);",
"public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSy... | [
"0.6161782",
"0.58970493",
"0.58285755",
"0.57888204",
"0.57742673",
"0.56939846",
"0.5602051",
"0.556776",
"0.5491947",
"0.54833853",
"0.54672116",
"0.5456794",
"0.545388",
"0.54168946",
"0.5394703",
"0.53893733",
"0.53385967",
"0.53163016",
"0.5305975",
"0.53004235",
"0.527... | 0.6153624 | 1 |
quickly get the nb of token in that String | public static int getNbTokens(String s, String language){
int len=s.length();
int nb_tokens=0;
for (int i=1; i<len; i++){
if (s.charAt(i)==' ' && s.charAt(i-1)!=' ')
nb_tokens++;
}
return nb_tokens;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long tokenCount();",
"private int getCount(String token, String content) {\n int index = 0;\n int count = 0;\n// String[] parts = token.split(\"\\\\s+\");\n// int size = parts.length;\n boolean hasPreview = false;\n while ((index = content.indexOf(token, index)) != -1) {... | [
"0.7172913",
"0.6760258",
"0.63945234",
"0.63346195",
"0.6182097",
"0.6128935",
"0.60982263",
"0.6091378",
"0.59110993",
"0.58846736",
"0.58824956",
"0.58753514",
"0.5848637",
"0.58446246",
"0.5842243",
"0.5834441",
"0.58128446",
"0.5784961",
"0.5780739",
"0.57746804",
"0.577... | 0.66731775 | 2 |
get the index of the begining of each word. I prefer to do in two passes and output an array, this way dealing with the memory may be faster. | public static int[] getDelimiters(String s){
int len=s.length();
int nb_token=0;
boolean previous_is_delimiter=true;
for (int i=0; i<len; i++){
char c=s.charAt(i);
if (tokenize_isdelim(c)){
if (!previous_is_delimiter){
nb_token++;
}
previous_is_delimiter=true;
}
else{
if (previous_is_delimiter){
nb_token++;
}
previous_is_delimiter=false;
}
}
int[] delimiters=new int[nb_token];
int counter=0;
previous_is_delimiter=true;
for (int i=0; i<len; i++){
char c=s.charAt(i);
if (tokenize_isdelim(c)){
if (!previous_is_delimiter){
delimiters[counter]=i;
counter++;
}
previous_is_delimiter=true;
}
else{
if (previous_is_delimiter){
delimiters[counter]=i;
counter++;
}
previous_is_delimiter=false;
}
}
return delimiters;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Word> getWordsStartingAt(int start);",
"List<Integer> wordFinder(String text, String word) {\n\n List<Integer> indexes = new ArrayList<Integer>();\n String wordProper = \" \" + word + \" \";\n\n int index = 0;\n\n while (index != -1) {\n\n index = text.indexOf(w... | [
"0.66040695",
"0.6276317",
"0.6233002",
"0.6229048",
"0.61982065",
"0.60349584",
"0.59682685",
"0.5850107",
"0.5840263",
"0.5827324",
"0.5790815",
"0.57314175",
"0.57188255",
"0.5677872",
"0.56288177",
"0.55997515",
"0.559074",
"0.5589637",
"0.55323344",
"0.5522725",
"0.54588... | 0.0 | -1 |
Uses the BreakIndexer class from java | public static ArrayList<Integer> getDelimiters2(String s, String language){
ArrayList<Integer> list_boundaries=new ArrayList<Integer>();
BreakIterator bi=BreakIterator.getWordInstance(new Locale(language));
bi.setText(s);
int start=bi.first();
int end = 0;
try {
end=bi.next();
} catch(ArrayIndexOutOfBoundsException e) {
bi.setText( java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "") );
end=bi.next();
}
while (end != BreakIterator.DONE) {
if (end==start+1){
char c=s.charAt(start);
if (!tokenize_isdelim(c)){
list_boundaries.add(start);
list_boundaries.add(end);
}
}
else{
list_boundaries.add(start);
list_boundaries.add(end);
}
start = end;
end = bi.next();
}
return list_boundaries;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface LanguageBreakEngine {\n int findBreaks(CharacterIterator characterIterator, int i, int i2, DictionaryBreakEngine.DequeI dequeI);\n\n boolean handles(int i);\n}",
"void startIndexing();",
"public Break Break(){\n\t\treturn new Break();\r\n\t}",
"Break createBreak();",
"private void Pe... | [
"0.6324114",
"0.6245651",
"0.6210403",
"0.5972325",
"0.5558808",
"0.55546963",
"0.5536683",
"0.5493287",
"0.54138786",
"0.53994346",
"0.5361447",
"0.53483075",
"0.53399986",
"0.5334146",
"0.5283745",
"0.5278019",
"0.5272911",
"0.5271666",
"0.52585906",
"0.5249677",
"0.5232687... | 0.0 | -1 |
Constructeur du state (etat) menu | public MenuState(Handler handler) {
super(handler, handler.getStateManager());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MenuTamu() {\n initComponents();\n \n }",
"public Menu() {\n\n\t}",
"public Menu()\n {\n \n }",
"public Menu() {\r\n\r\n }",
"public void initMenu(){\n\t}",
"public Menu() {\n this(\"\");\n }",
"public menuAddStasiun() {\n initComponents();\n ... | [
"0.7300128",
"0.7101062",
"0.70486677",
"0.70260537",
"0.6965184",
"0.6957914",
"0.69451237",
"0.6938386",
"0.6891256",
"0.6861912",
"0.6832112",
"0.6830201",
"0.6830201",
"0.6818869",
"0.67743003",
"0.67706007",
"0.67404354",
"0.67057514",
"0.67057514",
"0.67057514",
"0.6683... | 0.6301552 | 58 |
Methode qui recupere les informations du clavier afin de naviguer le menu. | protected abstract void getInput(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"public void readTheMenu();",
"static void listerM... | [
"0.6846597",
"0.6801745",
"0.67175317",
"0.66409636",
"0.649565",
"0.6484766",
"0.6411993",
"0.6386585",
"0.63536453",
"0.6321463",
"0.62885845",
"0.6280275",
"0.627855",
"0.6263354",
"0.6250356",
"0.6224022",
"0.6213687",
"0.61694926",
"0.61594516",
"0.61368656",
"0.61316085... | 0.0 | -1 |
Not sure how to do this now.. | protected int getFilePriority(File file) {
return 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void method_4270() {}",
"private void poetries() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void strin() {\n\n\t}",
... | [
"0.54202545",
"0.5337336",
"0.5275917",
"0.52639234",
"0.52639127",
"0.5260837",
"0.5211833",
"0.51774484",
"0.51620173",
"0.51579046",
"0.5125278",
"0.50051135",
"0.50020003",
"0.4989285",
"0.49776557",
"0.49760443",
"0.4974508",
"0.49584103",
"0.49509966",
"0.49454418",
"0.... | 0.0 | -1 |
private static final int temp = 910; | public GripperController() {
super(GRIPPER, (min + max)/2, min, max);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getTemp(){\n return temp;\n }",
"public void temp();",
"static int getInt(){\n return j;\n }",
"public Integer getDefaultTemp() {\n return defaultTemp;\n }",
"public static int nextInt() {\n\treturn 0;\r\n}",
"public void setTemporaryMoney(Integer temporaryMoney... | [
"0.66296923",
"0.59109235",
"0.5855411",
"0.553395",
"0.54596037",
"0.53802705",
"0.5377171",
"0.53363067",
"0.5322076",
"0.5316216",
"0.5304424",
"0.5288356",
"0.52847683",
"0.52788246",
"0.5256005",
"0.51964116",
"0.5195076",
"0.51884747",
"0.518806",
"0.518806",
"0.518677"... | 0.0 | -1 |
note: 500 is closed, but below that clamps harder angle: "single" angle (full opening of gripper is 2x single) | public int calculatePWMfromAngle(double angle) {
return (int) restrict((angle + 1.04)/.00180, min, max);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"AngleSmaller createAngleSmaller();",
"boolean needToAim(double angle);",
"private int getAttackAngle() {\n\t\treturn (160 - (level * 10));\n\t}",
"public void goToAngle(){\n currentAngle = getAverageVoltage2(); \r\n if (Math.abs(elevationTarget - currentAngle) <= .1){//TODO: check angle\r\n ... | [
"0.66920745",
"0.6597268",
"0.65716475",
"0.6457552",
"0.643825",
"0.643136",
"0.6201602",
"0.6180506",
"0.6178289",
"0.61735106",
"0.6172719",
"0.6158354",
"0.6158354",
"0.6138898",
"0.6131013",
"0.6062242",
"0.60560185",
"0.6037712",
"0.5989121",
"0.597647",
"0.59763074",
... | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public boolean DigRequest(int TypeID, int ButtonIndex, int Step) {
if(ButtonIndex == CustomDialog.BUTTON_LEFT){
ExitGame();
//finish();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub | public boolean EvenRequest(int TypeID) {
if(TypeID == -1){
Intent intent = new Intent(this, GameItemsActivity.class);
startActivity(intent);
//Constants.ItemIconCanClick = true;
UIUtils.sendUIButtonChange(this, MIDlet.BTN_ITEM, true);
}else if(TypeID == -2){
Intent intent = new Intent(this, GameEquipActivity.class);
startActivity(intent);
//Constants.EquipIconCanClick = true;
UIUtils.sendUIButtonChange(this, MIDlet.BTN_EQUIP, true);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
Setup the panel parameters | private void setupPanel()
{
this.setLayout(baseLayout);
queryButton = new JButton("query");
this.add(queryButton);
this.add(displayPane);
displayArea = new JTextArea(10,30);
add(displayArea);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setupPanel()\n {\n\n }",
"@Override\r\n public void setup(Panel panel) {\n }",
"private void initializePanels()\r\n\t{\r\n\t\tthis.subscribersPanel = new SubscribersPanel(DIMENSIONS);\r\n\t\tthis.consolePanel = new ConsolePanel(DIMENSIONS);\r\n\r\n\t\tthis.parametersPanel... | [
"0.75993264",
"0.7253656",
"0.7137139",
"0.7095023",
"0.7055665",
"0.7024363",
"0.7012918",
"0.6996994",
"0.6950447",
"0.6913392",
"0.69023144",
"0.6826957",
"0.6805111",
"0.67964226",
"0.6784733",
"0.66998976",
"0.6699311",
"0.6652747",
"0.65716887",
"0.6535305",
"0.6532963"... | 0.67059475 | 15 |
Represents a source of the current time in nanoseconds. | public interface Clock {
public long nanoTime();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic long getTime()\n\t{\n\t\treturn source.getTime();\n\t}",
"@Override\n public void timingSourceTick(TimingSource source, long nanoTime) {\n if (isRunning())\n notifyListenersAboutATimingSourceTick(nanoTime);\n }",
"@Override\n public float getTimeInSeconds() {\n return ge... | [
"0.6100652",
"0.5998227",
"0.586545",
"0.5830658",
"0.57420844",
"0.5691621",
"0.5611379",
"0.5602757",
"0.55474687",
"0.5544514",
"0.5485918",
"0.54484993",
"0.54483145",
"0.5411026",
"0.53942996",
"0.53612965",
"0.5360825",
"0.5314391",
"0.5306229",
"0.52896637",
"0.5287835... | 0.5385622 | 15 |
visits a basic fighting pokemon | public void visitBasicFightingPokemon(BasicFightingPokemon basicFightingPokemon) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);",
"public void fight();",
"public void attack();",
"@Test\r\n\tpublic void testAttacks()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tCommand[] attacks = pk.getAttacks... | [
"0.69219244",
"0.67582226",
"0.6569717",
"0.6520394",
"0.6476709",
"0.64282507",
"0.62782896",
"0.6267874",
"0.6260976",
"0.6246648",
"0.6232138",
"0.62230724",
"0.61460584",
"0.61169976",
"0.6099484",
"0.60990256",
"0.6086639",
"0.6077341",
"0.6064362",
"0.6058761",
"0.60573... | 0.7086728 | 0 |
visits a phase one electric pokemon | public void visitPhaseOneElectricPokemon(PhaseOneElectricPokemon phaseOneElectricPokemon) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void attackPhase(Player p) \n\t{\n\t\tp.attack();\n\t}",
"public PerformAbilityVisitor(IPokemonCard pokemon) {\n this.pokemon = pokemon;\n }",
"@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ po... | [
"0.63228464",
"0.62359434",
"0.6101662",
"0.59918934",
"0.59603006",
"0.5959611",
"0.59211934",
"0.58953446",
"0.58950496",
"0.5815135",
"0.57917297",
"0.5790322",
"0.5700158",
"0.56996185",
"0.5639628",
"0.56251985",
"0.56213397",
"0.55838317",
"0.55457103",
"0.55454916",
"0... | 0.7399503 | 0 |
TODO Autogenerated method stub return false; | @Override
public boolean isViewFromObject(View arg0, Object arg1) {
return arg0 == arg1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean method_218() {\r\n return false;\r\n }",
"@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}",
"public boolean method_2453() {\r\n return false;\r\n }",
"public boolean method_4093() {\n return false;\n }",
"public boolean method_214() {\r\n return false;\... | [
"0.75644237",
"0.7549609",
"0.7278403",
"0.72512615",
"0.7232777",
"0.7156432",
"0.71557397",
"0.71438265",
"0.713694",
"0.71019363",
"0.70491886",
"0.7041244",
"0.7024102",
"0.7015872",
"0.69929415",
"0.6981114",
"0.69546676",
"0.6944537",
"0.6911757",
"0.6905579",
"0.686160... | 0.0 | -1 |
TODO Autogenerated method stub super.destroyItem(container, position, object); | @Override
public void destroyItem(View container, int position, Object object) {
((ViewPager)container).removeView(viewContainter.get(position));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void destroyItem(View container, int position, Object object) {\n\t\tsuper.destroyItem(container, position, object);\r\n\t}",
"@Override\n\tpublic void destroyItem(View container, int position, Object object) {\n\t}",
"@Override\n\t\tpublic void destroyItem(ViewGroup container, int positi... | [
"0.85541385",
"0.8544359",
"0.8452405",
"0.83865285",
"0.8356034",
"0.82519215",
"0.82297397",
"0.8221939",
"0.82193196",
"0.80860865",
"0.80860865",
"0.80401635",
"0.80350685",
"0.8003115",
"0.7822246",
"0.77630955",
"0.7665142",
"0.76488024",
"0.76440763",
"0.7606762",
"0.7... | 0.75731695 | 21 |
TODO Autogenerated method stub | @Override
public int getItemPosition(Object object) {
return super.getItemPosition(object);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExr... | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.608016... | 0.0 | -1 |
TODO Autogenerated method stub return super.instantiateItem(container, position); | @Override
public Object instantiateItem(ViewGroup container, int position) {
((ViewPager)container).addView(viewContainter.get(position));
return viewContainter.get(position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic View instantiateItem(ViewGroup container, int position) {\n\t\t\tToast.makeText(getBaseContext(), \"item instantiated\", Toast.LENGTH_SHORT).show();\n\t\t\treturn list.get(position);\n\t\t}",
"@Override\r\n\t\tpublic Object instantiateItem(ViewGroup container, int position) {\n\t\t\tcontain... | [
"0.78069556",
"0.7567638",
"0.75309354",
"0.7365308",
"0.7321629",
"0.7194566",
"0.7186243",
"0.70598406",
"0.70598406",
"0.70598406",
"0.70598406",
"0.70598406",
"0.70598406",
"0.70598406",
"0.70598406",
"0.7045528",
"0.7042597",
"0.7018311",
"0.7018311",
"0.7018311",
"0.701... | 0.6983676 | 47 |
Return the number of matching entities in the database. | @Transactional(readOnly = true)
public long countByCriteria(EstadoCandidaturaCriteria criteria) {
log.debug("count by criteria : {}", criteria);
final Specification<EstadoCandidatura> specification = createSpecification(criteria);
return estadoCandidaturaRepository.count(specification);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int findAllCount() ;",
"public int count() {\n\t Query count = getEntityManager().createQuery(\"select count(u) from \" + getEntityClass().getSimpleName() + \" u\");\n\t return Integer.parseInt(count.getSingleResult().toString());\n\t }",
"public int count() {\n return Query.count(itera... | [
"0.72055745",
"0.7112963",
"0.7040392",
"0.6930659",
"0.6835712",
"0.6823517",
"0.6775256",
"0.67737544",
"0.6716066",
"0.6703935",
"0.66931164",
"0.66503805",
"0.66427094",
"0.6639231",
"0.6639231",
"0.6639231",
"0.6639231",
"0.6639231",
"0.6639231",
"0.6639231",
"0.6639231"... | 0.0 | -1 |
Constructs a default LocalObject instance. | public LocalObject() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Local() {\n }",
"@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }",
"public Local createLocal(Position pos, LocalInstance li) {\n return (Local) xnf.Local(pos, xnf.Id(pos, li.name())).localInstance(li).type(li.type());\n }",
"public L... | [
"0.7339811",
"0.61537445",
"0.6083556",
"0.6078274",
"0.5988414",
"0.59289634",
"0.5893282",
"0.58762175",
"0.5829766",
"0.5825046",
"0.58094317",
"0.5809245",
"0.57507294",
"0.5722788",
"0.5710531",
"0.56895566",
"0.56523865",
"0.5638541",
"0.5638541",
"0.5638541",
"0.561811... | 0.8418152 | 0 |
Determines whether the two object references are equivalent, so far as the ORB can easily determine. Two object references are equivalent if they are identical. Two distinct object references which in fact refer to the same object are also equivalent. However, ORBs are not required to attempt determination of whether two distinct object references refer to the same object, since such determination could be impractically expensive. Default implementation of the org.omg.CORBA.Object method. | public boolean _is_equivalent(Object that) {
return equals(that) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }",
"boolean _is_equivalent(org.omg.CORBA.Object other);",
"public st... | [
"0.800182",
"0.7667263",
"0.7276438",
"0.6953216",
"0.68932307",
"0.6809989",
"0.67544115",
"0.6717217",
"0.6668339",
"0.6639067",
"0.6611637",
"0.65947413",
"0.6485368",
"0.6477629",
"0.6454611",
"0.6413129",
"0.6403093",
"0.6397599",
"0.6390462",
"0.6368044",
"0.63428956",
... | 0.6103022 | 44 |
Always returns false. This method is the default implementation of the org.omg.CORBA.Object method. | public boolean _non_existent() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isObject() {\n return false;\n }",
"@java.lang.Override\n public boolean hasObject() {\n return object_ != null;\n }",
"@Override\n public boolean isObject() {\n return false;\n }",
"protected synchronized boolean isObjectPresent() { return objPresent; }",
"public b... | [
"0.7268896",
"0.7262596",
"0.70481944",
"0.6971274",
"0.6906573",
"0.68793195",
"0.6822862",
"0.67729205",
"0.67729205",
"0.67729205",
"0.67729205",
"0.67729205",
"0.67729205",
"0.67729205",
"0.6752109",
"0.6728142",
"0.6724207",
"0.66841125",
"0.66730005",
"0.6581101",
"0.65... | 0.0 | -1 |
Returns a hash value that is consistent for the lifetime of the object, using the given number as the maximum. This method is the default implementation of the org.omg.CORBA.Object method. | public int _hash(int maximum) {
return hashCode() ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int _hash(int maximum);",
"@Override\r\n public int hashCode() {\r\n return this.number;\r\n }",
"public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getProjectName());\n hash = hash * UtilConstants.HASH_P... | [
"0.6635545",
"0.6175104",
"0.6019411",
"0.5921658",
"0.589955",
"0.58738565",
"0.58656836",
"0.5844865",
"0.5812596",
"0.5802868",
"0.5791384",
"0.5757375",
"0.5747017",
"0.574273",
"0.57366776",
"0.5736373",
"0.57049847",
"0.5697179",
"0.56823516",
"0.56797665",
"0.5678869",... | 0.66714215 | 0 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method. | public boolean _is_a(String repository_id) {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public abstract org.omg.CORBA.Object read_Object();",
"public LocalObject() {}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n ... | [
"0.63962483",
"0.63840675",
"0.6158492",
"0.615174",
"0.60899615",
"0.60842717",
"0.6051479",
"0.5900007",
"0.58709913",
"0.5840676",
"0.58274674",
"0.5824589",
"0.578535",
"0.57483524",
"0.57407755",
"0.5732347",
"0.5676089",
"0.5660036",
"0.5657385",
"0.5656312",
"0.5648001... | 0.0 | -1 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public Object _duplicate() {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6512437",
"0.6478393",
"0.6258392",
"0.6256161",
"0.6205298",
"0.615545",
"0.6037277",
"0.60164344",
"0.60033655",
"0.592476",
"0.59009516",
"0.58834183",
"0.5774403",
"0.576282",
"0.57368785",
"0.5734551",
"0.5731212",
"0.57273376",
"0.57109666",
"0.5699425",
"0.56763464"... | 0.5052123 | 98 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public void _release() {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6512437",
"0.6478393",
"0.6258392",
"0.6256161",
"0.6205298",
"0.615545",
"0.6037277",
"0.60164344",
"0.60033655",
"0.592476",
"0.59009516",
"0.58834183",
"0.5774403",
"0.576282",
"0.57368785",
"0.5734551",
"0.5731212",
"0.57273376",
"0.57109666",
"0.5699425",
"0.56763464"... | 0.0 | -1 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public Request _request(String operation) {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6512437",
"0.6478393",
"0.6258392",
"0.6256161",
"0.6205298",
"0.615545",
"0.6037277",
"0.60164344",
"0.60033655",
"0.592476",
"0.59009516",
"0.58834183",
"0.5774403",
"0.576282",
"0.57368785",
"0.5734551",
"0.5731212",
"0.57273376",
"0.57109666",
"0.5699425",
"0.56763464"... | 0.0 | -1 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public Request _create_request(Context ctx,
String operation,
NVList arg_list,
NamedValue result) {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6510526",
"0.6477",
"0.6257711",
"0.6256765",
"0.62042433",
"0.61538386",
"0.6038405",
"0.60151535",
"0.600293",
"0.5923568",
"0.59007293",
"0.58838385",
"0.577411",
"0.57611656",
"0.573652",
"0.5732086",
"0.57307076",
"0.5725131",
"0.5711146",
"0.5697668",
"0.56770754",
... | 0.0 | -1 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public Request _create_request(Context ctx,
String operation,
NVList arg_list,
NamedValue result,
ExceptionList exceptions,
ContextList contexts) {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6512437",
"0.6478393",
"0.6258392",
"0.6256161",
"0.6205298",
"0.615545",
"0.6037277",
"0.60164344",
"0.60033655",
"0.592476",
"0.59009516",
"0.58834183",
"0.5774403",
"0.576282",
"0.57368785",
"0.5734551",
"0.5731212",
"0.57273376",
"0.57109666",
"0.5699425",
"0.56763464"... | 0.0 | -1 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method does not apply to local objects and is therefore not implemented. This method is the default implementation of the org.omg.CORBA.Object method. | public Object _get_interface()
{
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public abstract org.omg.CORBA.Object read_Object();",
"public LocalObject() {}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n ... | [
"0.6396029",
"0.63822776",
"0.61573255",
"0.6151376",
"0.6089821",
"0.6084226",
"0.60506654",
"0.5898948",
"0.5870759",
"0.583996",
"0.58242613",
"0.57854563",
"0.57478654",
"0.5740336",
"0.5731119",
"0.56747174",
"0.5660005",
"0.56570226",
"0.5656142",
"0.56469774",
"0.56428... | 0.5827664 | 10 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public Object _get_interface_def()
{
// First try to call the delegate implementation class's
// "Object get_interface_def(..)" method (will work for JDK1.2
// ORBs).
// Else call the delegate implementation class's
// "InterfaceDef get_interface(..)" method using reflection
// (will work for pre-JDK1.2 ORBs).
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6512437",
"0.6478393",
"0.6258392",
"0.6256161",
"0.6205298",
"0.615545",
"0.6037277",
"0.60164344",
"0.60033655",
"0.592476",
"0.59009516",
"0.58834183",
"0.5774403",
"0.576282",
"0.57368785",
"0.5734551",
"0.5731212",
"0.57273376",
"0.57109666",
"0.5699425",
"0.56763464"... | 0.0 | -1 |
Throws an org.omg.CORBA.NO_IMPLEMENT exception with the message "This is a locally constrained object." This method is the default implementation of the org.omg.CORBA.Object method. | public ORB _orb() {
throw new NO_IMPLEMENT(reason);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract org.omg.CORBA.Object read_Object();",
"public interface Vehiculos extends VehiculosOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}",
"public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given inter... | [
"0.6510526",
"0.6477",
"0.6257711",
"0.62042433",
"0.61538386",
"0.6038405",
"0.60151535",
"0.600293",
"0.5923568",
"0.59007293",
"0.58838385",
"0.577411",
"0.57611656",
"0.573652",
"0.5732086",
"0.57307076",
"0.5725131",
"0.5711146",
"0.5697668",
"0.56770754",
"0.56593037",
... | 0.6256765 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.